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b,MAAO,OACPuN,MAAO,wBACPkD,YAAY,MAkBlBkE,EAA2BtP,KAZd,CACXvI,GAAI,GACJkD,MAAO,IACPuN,MAAO,eACP1M,SAAU,CACR,CACEb,MAAO,MACPuN,MAAO,oCACPkD,YAAY,K,qCCvGX,IAAKlB,E,gCAAZ,SAAYA,GAAAA,EAAAA,EAAAA,MAAAA,GAAAA,QAAAA,EAAAA,EAAAA,aAAAA,GAAAA,cAAAA,CAAZ,CAAYA,IAAAA,EAAAA,CAAAA,G,mCCUVsK,EACAC,EACAC,GAIA,IAAIC,EAEJ,YAAO,IAAP,IAPAF,EAAAA,SAAAA,IAAAA,IACAC,EAAAA,CACEE,aAAa,IAKR,eAAoB,aAAAC,EAAAA,UAAAA,OAAAA,IAAAC,EAAAA,GAAAA,UAAAA,GACzB,IAAMC,EAAUxY,KASVyY,EAAgBN,EAAQE,kBAAAA,IAAeD,OAAAA,IAEzCA,GACFM,aAAaN,GAGfA,EAAYO,YAbI,WACdP,OAAAA,EACKD,EAAQE,aACXJ,EAAKW,MAAMJ,EAASD,EAAAA,GAUQL,GAE5BO,GACFR,EAAKW,MAAMJ,EAASD,EAAAA,CAAAA,C,mGCjCX,SAASM,EAAmBxd,GACzC,OCJa,SAA4BA,GACzC,GAAIyC,MAAMC,QAAQ1C,GAAM,OAAO,EAAAyd,EAAA,GAAiBzd,EAClD,CDES,CAAkBA,IELZ,SAA0B0d,GACvC,GAAsB,qBAAXnb,QAAmD,MAAzBmb,EAAKnb,OAAOC,WAA2C,MAAtBkb,EAAK,cAAuB,OAAOjb,MAAMyI,KAAKwS,EACtH,CFGmC,CAAgB1d,KAAQ,EAAA2C,EAAA,GAA2B3C,IGLvE,WACb,MAAM,IAAIkD,UAAU,uIACtB,CHG8F,EAC9F,C","sources":["components/reprintNotes/ReprintNotes.tsx","components/document/Tags.tsx","components/document/Document.tsx","../node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","../node_modules/reactstrap/es/Input.js","../node_modules/reactstrap/es/Form.js","../node_modules/reactstrap/es/FormGroup.js","../node_modules/reactstrap/es/Label.js","../node_modules/reactstrap/es/FormFeedback.js","containers/documents/SearchSubscription.tsx","containers/documents/DocumentsContainer.tsx","data/orderByValues.ts","data/publicationMediaFilterData.ts","models/MatchField.ts","../node_modules/ts-debounce/src/index.ts","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"],"sourcesContent":["import * as React from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col } from \"reactstrap\";\r\nimport { IReprintNote } from \"../../models/IReprintNote\";\r\nimport { AppState } from \"../../store\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport { IReprintInformationActions, ReprintInformationActions } from \"../../store/notes/notesReducer\";\r\nimport \"./ReprintNotes.scss\";\r\nimport { Icon, IconType } from \"@lexdania/components\";\r\n\r\nexport interface IReprintNotesProps extends IReprintInformationActions {\r\n docId: number;\r\n isOpen: boolean;\r\n toggleModal: () => void;\r\n reprintNotes?: IReprintNote[];\r\n title: string;\r\n shortName: string;\r\n ressort: string;\r\n}\r\n\r\nexport const ReprintNotes: React.FC<IReprintNotesProps> = props => {\r\n const { toggleModal, isOpen, reprintNotes, getReprintNotes, docId, shortName, title, ressort } = props;\r\n\r\n React.useEffect(() => {\r\n if (isOpen) {\r\n getReprintNotes(docId);\r\n }\r\n }, [docId, getReprintNotes, isOpen]);\r\n\r\n return (\r\n <Modal isOpen={isOpen} className=\"modal-xl reprint-notes-modal\">\r\n <ModalHeader tag=\"div\">\r\n <div>{shortName}</div>\r\n <h3>{title}</h3>\r\n <div className=\"text-muted\">{ressort}</div>\r\n </ModalHeader>\r\n <ModalBody className=\"background-secondary\">\r\n {reprintNotes &&\r\n reprintNotes.map((note, index) => (\r\n <div key={index} className=\"reprint-note\">\r\n <Row className=\"\">\r\n <Col className=\"mb-2\">\r\n <span>{note.date}</span>\r\n </Col>\r\n <Col classname=\"mb-2\">\r\n <a href={`/api/pdf/${note.reprintOfId}`} className=\"float-right pr-2\">\r\n <span className=\"sr-only\">Åbn PDF af dokumentet inden dette omtryk</span>\r\n <Icon icon={IconType.FilePdf} iconSize={22}></Icon>\r\n </a>\r\n </Col>\r\n </Row>\r\n <div dangerouslySetInnerHTML={{ __html: note.note.replace(\"\\\\r\\\\n\", \"<br />\") }} />\r\n </div>\r\n ))}\r\n </ModalBody>\r\n <ModalFooter>\r\n <Button color=\"primary\" onClick={toggleModal}>\r\n Ok\r\n </Button>\r\n </ModalFooter>\r\n </Modal>\r\n );\r\n};\r\n\r\nexport default connect(\r\n ({ notes }: AppState, ownProps: any): IReprintNotesProps => {\r\n return {\r\n ...ownProps,\r\n reprintNotes: notes.reprintNotes,\r\n };\r\n },\r\n dispatch =>\r\n bindActionCreators(\r\n {\r\n ...ReprintInformationActions,\r\n },\r\n dispatch\r\n )\r\n)(ReprintNotes);\r\n","import { IDocumentTag } from \"models/IDocumentTag\";\r\nimport React from \"react\";\r\nimport { Col } from \"reactstrap\";\r\nimport \"./Tags.scss\";\r\n\r\ninterface IDocumentProps {\r\n documentId: number;\r\n heading: string;\r\n tags: IDocumentTag[];\r\n publicationMediaId: number;\r\n}\r\n\r\nexport const Tags: React.FC<IDocumentProps> = props => {\r\n if (props.tags.length > 0) {\r\n return (\r\n <Col lg={6}>\r\n <dl>\r\n {props.publicationMediaId !== 20 && <dt>{props.heading}</dt>}\r\n {props.tags.map(tag => (\r\n <dd key={props.documentId + \"_tag_\" + tag.id} className=\"mb-0\">\r\n {tag.emneord}{\" \"}\r\n {tag.underskriftDato && props.publicationMediaId !== 10 && props.publicationMediaId !== 20 && (\r\n <span className=\"tag-signature\">\r\n {tag.underskriftSted && (\r\n <>\r\n ({tag.underskriftDato}, {tag.underskriftSted})\r\n </>\r\n )}\r\n {!tag.underskriftSted && <>({tag.underskriftDato})</>}\r\n </span>\r\n )}\r\n </dd>\r\n ))}\r\n </dl>\r\n </Col>\r\n );\r\n } else {\r\n return <></>;\r\n }\r\n};\r\n","import * as React from \"react\";\r\nimport { Col, Row, Badge, Container, Button } from \"reactstrap\";\r\nimport { Icon, IconType } from \"@lexdania/components\";\r\nimport { IDocument } from \"./../../models/IDocument\";\r\nimport \"./Document.scss\";\r\nimport ReprintNotes from \"../reprintNotes/ReprintNotes\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Tags } from \"./Tags\";\r\n\r\nfunction nlToBr(str: string = \"\"): string | JSX.Element[] {\r\n const arr = str.split(\"\\\\n\");\r\n if (arr.length < 2) {\r\n return str;\r\n }\r\n const elmsArr = arr.flatMap((s, i) => [<span key={i}>{s}</span>, <br key={\"b\" + i} />]);\r\n elmsArr.pop();\r\n return elmsArr;\r\n}\r\n\r\ninterface IDocumentProps {\r\n document: IDocument;\r\n sidebarVisible: boolean;\r\n}\r\n\r\nconst Document: React.FC<IDocumentProps> = props => {\r\n const { document: d } = props;\r\n const [showReprintNotes, setShowReprintNotes] = React.useState(false);\r\n const [showTags, setShowTags] = React.useState(false);\r\n\r\n const toggleReprintNotes = () => {\r\n setShowReprintNotes(!showReprintNotes);\r\n };\r\n\r\n React.useEffect(() => {\r\n setShowTags(false);\r\n setShowReprintNotes(false);\r\n }, [d.id]);\r\n\r\n return (\r\n <Container className=\"document-entry py-3 px-sm-0 pl-sm-0\">\r\n <ReprintNotes ressort={d.ressortName} isOpen={showReprintNotes} toggleModal={toggleReprintNotes} docId={d.id} title={d.title} shortName={d.shortName} />\r\n <Row className=\"my-2\">\r\n <Col lg={8} xl={7} className=\"px-xs-0\">\r\n <div className=\"document-short-name d-block d-sm-inline pb-1 pb-sm-0 mr-sm-2\">{d.shortName}</div>\r\n <div className=\"badge-container d-block d-sm-inline py-1 py-md-0 mr-sm-2\">\r\n <Badge color=\"secondary\" className=\"py-2 px-3\">\r\n {d.publicationMedia.name}\r\n </Badge>\r\n </div>\r\n {d.isReprint && (\r\n <Button color=\"primary\" className=\" py-2 px-3 omtrykt-badge badge btn-badge \" onClick={toggleReprintNotes}>\r\n OMTRYKT\r\n </Button>\r\n )}\r\n </Col>\r\n <Col className=\"document-ressort text-lg-right text-sm-left py-1 py-md-0 px-xs-0 \">{d.ressortName}</Col>\r\n </Row>\r\n <Row>\r\n <Col lg={12} className=\"px-xs-0\">\r\n <a href={`/api/pdf/${d.id}`}>\r\n <h3>{nlToBr(d.title)}</h3>\r\n </a>\r\n </Col>\r\n </Row>\r\n <Row className=\"mt-md-2\">\r\n <Col md={props.sidebarVisible ? 5 : 6} className=\"document-popular-title my-2 my-md-0 px-xs-0\">\r\n {d.offentliggoerelsesDato}\r\n {d.popularTitle && d.offentliggoerelsesDato && <div className=\" seperator\" />}\r\n {d.popularTitle}\r\n </Col>\r\n\r\n <Col md={props.sidebarVisible ? 7 : 6} className=\"text-right px-xs-0 d-flex d-md-block justify-content-between\">\r\n {d.lovtidendeAEmneord.length + d.lovtidendeCBilateraleEmneord.length + d.lovtidendeCMultilateraleEmneord.length > 0 && (\r\n <>\r\n <Link\r\n to=\"#\"\r\n onClick={e => {\r\n e.preventDefault();\r\n setShowTags(!showTags);\r\n }}\r\n aria-controls=\"tags-area\"\r\n >\r\n <span className=\"sr-only\">{showTags ? \"Skjul \" : \"Vis \"}</span>Emneord\r\n <div className=\"angle-container\">\r\n <Icon icon={IconType.AngleRight} iconSize={20} className={!showTags ? \"svg-rotate collapsed ml-2\" : \"svg-rotate ml-2\"} />\r\n </div>\r\n </Link>\r\n <div className=\"seperator d-none d-md-inline-block\" />\r\n </>\r\n )}\r\n {d.retsinfoLink && (\r\n <a href={d.retsinfoLink} target=\"_blank\" rel=\"noopener noreferrer\" className=\"d-block d-md-inline mt-0\">\r\n <span className=\"sr-only\">Åbn dokumentet på </span>Retsinformation\r\n <Icon icon={IconType.ExternalLink} className=\"ml-2\" />\r\n </a>\r\n )}\r\n </Col>\r\n </Row>\r\n {showTags && (\r\n <Row id=\"tags-area\">\r\n <Col>\r\n <div className=\"tags\">\r\n <Row>\r\n <Tags publicationMediaId={d.publicationMedia.id} tags={d.lovtidendeAEmneord} documentId={d.id} heading=\"Lovtidende A\" />\r\n <Tags\r\n publicationMediaId={d.publicationMedia.id}\r\n tags={d.lovtidendeCBilateraleEmneord}\r\n documentId={d.id}\r\n heading=\"Lovtidende C Bilaterale overenskomster\"\r\n />\r\n <Tags\r\n publicationMediaId={d.publicationMedia.id}\r\n tags={d.lovtidendeCMultilateraleEmneord}\r\n documentId={d.id}\r\n heading=\"Lovtidende C Multilaterale overenskomster\"\r\n />\r\n </Row>\r\n </div>\r\n </Col>\r\n </Row>\r\n )}\r\n </Container>\r\n );\r\n};\r\n\r\nexport default Document;\r\n","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nvar _excluded = [\"className\", \"cssModule\", \"type\", \"bsSize\", \"valid\", \"invalid\", \"tag\", \"addon\", \"plaintext\", \"innerRef\"];\n\n/* eslint react/prefer-stateless-function: 0 */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, warnOnce, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n type: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n bsSize: PropTypes.string,\n valid: PropTypes.bool,\n invalid: PropTypes.bool,\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n plaintext: PropTypes.bool,\n addon: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n type: 'text'\n};\n\nvar Input = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Input, _React$Component);\n\n function Input(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));\n _this.focus = _this.focus.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = Input.prototype;\n\n _proto.getRef = function getRef(ref) {\n if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n this.ref = ref;\n };\n\n _proto.focus = function focus() {\n if (this.ref) {\n this.ref.focus();\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n type = _this$props.type,\n bsSize = _this$props.bsSize,\n valid = _this$props.valid,\n invalid = _this$props.invalid,\n tag = _this$props.tag,\n addon = _this$props.addon,\n plaintext = _this$props.plaintext,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;\n var isNotaNumber = new RegExp('\\\\D', 'g');\n var fileInput = type === 'file';\n var textareaInput = type === 'textarea';\n var selectInput = type === 'select';\n var rangeInput = type === 'range';\n var Tag = tag || (selectInput || textareaInput ? type : 'input');\n var formControlClass = 'form-control';\n\n if (plaintext) {\n formControlClass = formControlClass + \"-plaintext\";\n Tag = tag || 'input';\n } else if (fileInput) {\n formControlClass = formControlClass + \"-file\";\n } else if (rangeInput) {\n formControlClass = formControlClass + \"-range\";\n } else if (checkInput) {\n if (addon) {\n formControlClass = null;\n } else {\n formControlClass = 'form-check-input';\n }\n }\n\n if (attributes.size && isNotaNumber.test(attributes.size)) {\n warnOnce('Please use the prop \"bsSize\" instead of the \"size\" to bootstrap\\'s input sizing.');\n bsSize = attributes.size;\n delete attributes.size;\n }\n\n var classes = mapToCssModules(classNames(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? \"form-control-\" + bsSize : false, formControlClass), cssModule);\n\n if (Tag === 'input' || tag && typeof tag === 'function') {\n attributes.type = type;\n }\n\n if (attributes.children && !(plaintext || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {\n warnOnce(\"Input with a type of \\\"\" + type + \"\\\" cannot have children. Please use \\\"value\\\"/\\\"defaultValue\\\" instead.\");\n delete attributes.children;\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n ref: innerRef,\n className: classes,\n \"aria-invalid\": invalid\n }));\n };\n\n return Input;\n}(React.Component);\n\nInput.propTypes = propTypes;\nInput.defaultProps = defaultProps;\nexport default Input;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nvar _excluded = [\"className\", \"cssModule\", \"inline\", \"tag\", \"innerRef\"];\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n inline: PropTypes.bool,\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n tag: 'form'\n};\n\nvar Form = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Form, _Component);\n\n function Form(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));\n _this.submit = _this.submit.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = Form.prototype;\n\n _proto.getRef = function getRef(ref) {\n if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n this.ref = ref;\n };\n\n _proto.submit = function submit() {\n if (this.ref) {\n this.ref.submit();\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n inline = _this$props.inline,\n Tag = _this$props.tag,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n var classes = mapToCssModules(classNames(className, inline ? 'form-inline' : false), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n ref: innerRef,\n className: classes\n }));\n };\n\n return Form;\n}(Component);\n\nForm.propTypes = propTypes;\nForm.defaultProps = defaultProps;\nexport default Form;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"cssModule\", \"row\", \"disabled\", \"check\", \"inline\", \"tag\"];\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n row: PropTypes.bool,\n check: PropTypes.bool,\n inline: PropTypes.bool,\n disabled: PropTypes.bool,\n tag: tagPropType,\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n tag: 'div'\n};\n\nvar FormGroup = function FormGroup(props) {\n var className = props.className,\n cssModule = props.cssModule,\n row = props.row,\n disabled = props.disabled,\n check = props.check,\n inline = props.inline,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, _excluded);\n\n var classes = mapToCssModules(classNames(className, row ? 'row' : false, check ? 'form-check' : 'form-group', check && inline ? 'form-check-inline' : false, check && disabled ? 'disabled' : false), cssModule);\n\n if (Tag === 'fieldset') {\n attributes.disabled = disabled;\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nFormGroup.propTypes = propTypes;\nFormGroup.defaultProps = defaultProps;\nexport default FormGroup;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"cssModule\", \"hidden\", \"widths\", \"tag\", \"check\", \"size\", \"for\"];\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType, isObject } from './utils';\nvar colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];\nvar stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);\nvar columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number, PropTypes.shape({\n size: stringOrNumberProp,\n order: stringOrNumberProp,\n offset: stringOrNumberProp\n})]);\nvar propTypes = {\n children: PropTypes.node,\n hidden: PropTypes.bool,\n check: PropTypes.bool,\n size: PropTypes.string,\n for: PropTypes.string,\n tag: tagPropType,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n xs: columnProps,\n sm: columnProps,\n md: columnProps,\n lg: columnProps,\n xl: columnProps,\n widths: PropTypes.array\n};\nvar defaultProps = {\n tag: 'label',\n widths: colWidths\n};\n\nvar getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {\n if (colSize === true || colSize === '') {\n return isXs ? 'col' : \"col-\" + colWidth;\n } else if (colSize === 'auto') {\n return isXs ? 'col-auto' : \"col-\" + colWidth + \"-auto\";\n }\n\n return isXs ? \"col-\" + colSize : \"col-\" + colWidth + \"-\" + colSize;\n};\n\nvar Label = function Label(props) {\n var className = props.className,\n cssModule = props.cssModule,\n hidden = props.hidden,\n widths = props.widths,\n Tag = props.tag,\n check = props.check,\n size = props.size,\n htmlFor = props.for,\n attributes = _objectWithoutPropertiesLoose(props, _excluded);\n\n var colClasses = [];\n widths.forEach(function (colWidth, i) {\n var columnProp = props[colWidth];\n delete attributes[colWidth];\n\n if (!columnProp && columnProp !== '') {\n return;\n }\n\n var isXs = !i;\n var colClass;\n\n if (isObject(columnProp)) {\n var _classNames;\n\n var colSizeInterfix = isXs ? '-' : \"-\" + colWidth + \"-\";\n colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);\n colClasses.push(mapToCssModules(classNames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames[\"order\" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames[\"offset\" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames))), cssModule);\n } else {\n colClass = getColumnSizeClass(isXs, colWidth, columnProp);\n colClasses.push(colClass);\n }\n });\n var classes = mapToCssModules(classNames(className, hidden ? 'sr-only' : false, check ? 'form-check-label' : false, size ? \"col-form-label-\" + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({\n htmlFor: htmlFor\n }, attributes, {\n className: classes\n }));\n};\n\nLabel.propTypes = propTypes;\nLabel.defaultProps = defaultProps;\nexport default Label;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"cssModule\", \"valid\", \"tooltip\", \"tag\"];\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n tag: tagPropType,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n valid: PropTypes.bool,\n tooltip: PropTypes.bool\n};\nvar defaultProps = {\n tag: 'div',\n valid: undefined\n};\n\nvar FormFeedback = function FormFeedback(props) {\n var className = props.className,\n cssModule = props.cssModule,\n valid = props.valid,\n tooltip = props.tooltip,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, _excluded);\n\n var validMode = tooltip ? 'tooltip' : 'feedback';\n var classes = mapToCssModules(classNames(className, valid ? \"valid-\" + validMode : \"invalid-\" + validMode), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nFormFeedback.propTypes = propTypes;\nFormFeedback.defaultProps = defaultProps;\nexport default FormFeedback;","import { ISearchSubscribeFilters, ICollapsableTreeNode, IKeywordSection, IKeyword } from \"@lexdania/components\";\r\nimport * as React from \"react\";\r\nimport { Alert, Button, Form, FormFeedback, FormGroup, Input, Label, Modal, ModalBody, ModalFooter, ModalHeader } from \"reactstrap\";\r\nimport { apiPOST } from \"../../store/api\";\r\nimport { ISubscriptionResult } from \"../../models/ISubscriptionResult\";\r\n\r\nexport interface IDocumentSubscribeFormModel {\r\n email: string;\r\n title: string;\r\n ressortFilters: ICollapsableTreeNode[];\r\n publicationMediaFilters: ICollapsableTreeNode[];\r\n tagsFilters: IKeywordSection[];\r\n}\r\n\r\ninterface IQuerySubscriberModel {\r\n email: string;\r\n title: string;\r\n searchFilters: ISearchSubscribeFilters;\r\n}\r\n\r\ninterface IProps {\r\n showModal: boolean;\r\n subscriptionUrl: string;\r\n titleErrorText: string;\r\n emailErrorText: string;\r\n formErrorText: string;\r\n onDismiss: () => void;\r\n ressortFilters: ICollapsableTreeNode[];\r\n publicationMediaFilters: ICollapsableTreeNode[];\r\n tagsFilters: IKeywordSection[];\r\n chips: JSX.Element;\r\n}\r\n\r\ninterface IState {\r\n email: string;\r\n title: string;\r\n isTitleValid: boolean;\r\n isEmailValid: boolean;\r\n isFormValid: boolean;\r\n isSubmitted: boolean;\r\n}\r\n\r\nexport class SearchSubscription extends React.Component<IProps, IState> {\r\n private readonly InputEmailId = \"subscribeEmail\";\r\n private readonly InputTitleId = \"subscribeTitle\";\r\n\r\n public constructor(props: IProps) {\r\n super(props);\r\n\r\n this.state = {\r\n email: \"\",\r\n title: \"\",\r\n isTitleValid: true,\r\n isEmailValid: true,\r\n isFormValid: true,\r\n isSubmitted: false,\r\n };\r\n }\r\n\r\n public render() {\r\n const { showModal, onDismiss, titleErrorText, emailErrorText, formErrorText, ressortFilters, tagsFilters, chips, publicationMediaFilters } = this.props;\r\n const { email, title, isTitleValid, isEmailValid, isFormValid, isSubmitted } = this.state;\r\n const subscription: IDocumentSubscribeFormModel = {\r\n email,\r\n title,\r\n ressortFilters: ressortFilters,\r\n tagsFilters,\r\n publicationMediaFilters: publicationMediaFilters,\r\n };\r\n\r\n return (\r\n <Modal isOpen={showModal}>\r\n <Form onSubmit={this.handleSubmit(subscription)} className=\"needs-validation\" noValidate={true}>\r\n <ModalHeader>Abonnér på søgning</ModalHeader>\r\n <ModalBody>\r\n {!isSubmitted && (\r\n <>\r\n <FormGroup>\r\n <Label>Vil du abonnere på følgende filtre?</Label>\r\n <div>{chips}</div>\r\n <Alert color=\"info\">\r\n <p>Bemærk at kun følgende filtre er inkluderet i søgningen:</p>\r\n <ul>\r\n <li>Ministerier</li>\r\n <li>Publiceringsmedie</li>\r\n <li>Emneord</li>\r\n </ul>\r\n </Alert>\r\n </FormGroup>\r\n <FormGroup>\r\n <Label for={this.InputTitleId}>Søgetitel</Label>\r\n <Input\r\n type=\"text\"\r\n required={true}\r\n pattern=\".*\\S.*\"\r\n id={this.InputTitleId}\r\n value={title}\r\n onChange={this.handleInputChange}\r\n invalid={!isTitleValid}\r\n />\r\n <FormFeedback tooltip={true}>{titleErrorText}</FormFeedback>\r\n </FormGroup>\r\n <FormGroup>\r\n <Label for={this.InputEmailId}>E-mail</Label>\r\n <Input type=\"email\" required={true} id={this.InputEmailId} value={email} onChange={this.handleInputChange} invalid={!isEmailValid} />\r\n <FormFeedback tooltip={true}>{emailErrorText}</FormFeedback>\r\n </FormGroup>\r\n </>\r\n )}\r\n {isSubmitted && (\r\n <p>\r\n Din søgning er nu registreret. Du vil modtage en email på {email}, hvori du skal aktivere abonnementet og give samtykke til, at Civilstyrelsen\r\n indsamler og behandler relevante personoplysninger.\r\n </p>\r\n )}\r\n {!isFormValid && (\r\n <FormGroup>\r\n <Alert>\r\n <p>Der er fejl fra serveren:</p>\r\n <p>{formErrorText}</p>\r\n </Alert>\r\n </FormGroup>\r\n )}\r\n </ModalBody>\r\n {!isSubmitted && (\r\n <ModalFooter>\r\n <Button color=\"primary\" type=\"submit\">\r\n Abonnér\r\n </Button>\r\n <Button color=\"secondary\" onClick={onDismiss}>\r\n Annuller\r\n </Button>\r\n </ModalFooter>\r\n )}\r\n {isSubmitted && (\r\n <ModalFooter>\r\n <Button color=\"primary\" onClick={onDismiss}>\r\n OK\r\n </Button>\r\n </ModalFooter>\r\n )}\r\n </Form>\r\n </Modal>\r\n );\r\n }\r\n\r\n public handleInputChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n switch (e.currentTarget.id) {\r\n case this.InputEmailId:\r\n this.setState({ email: e.currentTarget.value, isEmailValid: true });\r\n break;\r\n case this.InputTitleId:\r\n this.setState({ title: e.currentTarget.value, isTitleValid: true });\r\n break;\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n public handleSubmit = (subscribeForm: IDocumentSubscribeFormModel) => async (e: React.SyntheticEvent<HTMLFormElement>) => {\r\n e.preventDefault();\r\n\r\n const isFormValid: boolean = e.currentTarget.checkValidity();\r\n if (isFormValid) {\r\n const body = this.getQuerySubscriberModel(subscribeForm);\r\n const result = await apiPOST<ISubscriptionResult>(this.props.subscriptionUrl, JSON.stringify(body));\r\n this.setState({ isFormValid: !result.isError });\r\n if (!result.isError) {\r\n this.setState({ isSubmitted: true });\r\n }\r\n } else {\r\n this.handleFormErrors(e);\r\n }\r\n };\r\n\r\n private handleFormErrors(e: React.SyntheticEvent<HTMLFormElement>) {\r\n const formElements = Array.from(e.currentTarget.elements).filter(element => {\r\n return [this.InputEmailId, this.InputTitleId].includes(element.id);\r\n });\r\n for (const element of formElements) {\r\n const el = element as HTMLInputElement;\r\n switch (element.id) {\r\n case this.InputEmailId:\r\n this.setState({ isEmailValid: el.validity.valid });\r\n break;\r\n case this.InputTitleId:\r\n this.setState({ isTitleValid: el.validity.valid });\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n\r\n private getQuerySubscriberModel(subscribeForm: IDocumentSubscribeFormModel): IQuerySubscriberModel {\r\n const rFilters = subscribeForm.ressortFilters\r\n .filter((f: ICollapsableTreeNode) => f.checked)\r\n .map((f: ICollapsableTreeNode) => ({ value: f.value, key: \"r\" }));\r\n\r\n const dtFilters = subscribeForm.publicationMediaFilters\r\n .flatMap((pubMedParent: ICollapsableTreeNode) => pubMedParent.children!)\r\n .filter((f: ICollapsableTreeNode) => f.checked)\r\n .map((f: ICollapsableTreeNode) => ({ value: f.value, key: \"dt\" }));\r\n\r\n const eFilters = subscribeForm.tagsFilters.map((x: IKeywordSection) =>\r\n x.keywords.filter((f: IKeyword) => f.checked).map((v: IKeyword) => ({ value: v.id, key: \"e\" }))\r\n );\r\n\r\n return {\r\n email: subscribeForm.email,\r\n title: subscribeForm.title,\r\n searchFilters: {\r\n r: rFilters,\r\n dt: dtFilters,\r\n e: eFilters,\r\n },\r\n };\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as qs from \"query-string\";\r\nimport \"./DocumentsContainer.scss\";\r\nimport { DocumentSearchActions, IDocumentSearchActions, DocumentSearchParams } from \"../../store/documents/documentSearchReducer\";\r\nimport { RessortActions, IRessortActions } from \"../../store/ressorter/ressortReducer\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { RouteComponentProps } from \"react-router\";\r\nimport { apiGET } from \"../../store/api\";\r\nimport { Col, Row, Card, Input } from \"reactstrap\";\r\nimport {\r\n IconType,\r\n SearchChip,\r\n DoubleSlider,\r\n CollapsableTree,\r\n ICollapsableTreeNode,\r\n updateOnArrowClick,\r\n LiveSearch,\r\n EmptyStringArray,\r\n ILiveResultItemProps,\r\n SearchChipHistory,\r\n LiveResultTemplateEnum,\r\n IKeywordSection,\r\n Keyword,\r\n updateKeywordOnChecked,\r\n toggleNodeCheckedAndUpdate,\r\n PageSize,\r\n SearchResultView,\r\n CollapsibleBox,\r\n IOrderByValue,\r\n} from \"@lexdania/components\";\r\nimport { IDocumentSearchResult } from \"models/IDocumentSearchResult\";\r\nimport { AppState } from \"../../store\";\r\nimport { IRessort } from \"models/IRessort\";\r\nimport { publicationMediaFilterData } from \"../../data/publicationMediaFilterData\";\r\nimport { debounce } from \"ts-debounce\";\r\nimport { IDocument } from \"models/IDocument\";\r\nimport { IRessortCollection } from \"models/IRessortCollection\";\r\nimport { SearchSubscription } from \"./SearchSubscription\";\r\nimport { LiveSearchHitDto } from \"models/LiveSearchHitDto\";\r\nimport { MatchField } from \"models/MatchField\";\r\nimport Document from \"../../components/document/Document\";\r\nimport { orderByValues } from \"./../../data/orderByValues\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { TagActions, ITagActions } from \"store/tags/tagsReducer\";\r\nimport { ITagSectionList } from \"./../../models/ITagSectionList\";\r\nimport { ITag } from \"models/ITag\";\r\n\r\ninterface IDocumentsContainerProps extends IDocumentSearchActions, RouteComponentProps<{}>, IRessortActions, ITagActions {\r\n paramsString: string;\r\n paramsOrDefaults: Readonly<DocumentSearchParams>;\r\n ressorter: IRessortCollection;\r\n tags: ITagSectionList;\r\n}\r\n\r\ninterface IDocumentSearchParamsState {\r\n activePage: number;\r\n activePageSize: PageSize;\r\n selectedOrderByValue?: IOrderByValue;\r\n ascendingOrder: boolean;\r\n yearStart: number;\r\n yearEnd: number;\r\n searchTerms: string[];\r\n titles: string[];\r\n popularTitles: string[];\r\n historicalRessorter: string[];\r\n st: string;\r\n et: string;\r\n documentNumberRange: string; // can be values: 10 | <12 | >100 | 20-30\r\n}\r\n\r\ninterface ILiveSearchState {\r\n liveSearchTerm: string;\r\n hits: ILiveResultItemProps[];\r\n staticLiveSearchItemsCount: number;\r\n}\r\n\r\ninterface IDocumentsContainerState extends IDocumentSearchParamsState {\r\n searchResult: IDocumentSearchResult;\r\n ressortList: ICollapsableTreeNode[];\r\n tagSectionList: IKeywordSection[];\r\n builtFilters: boolean;\r\n searchTerms: string[];\r\n currentSearchTerm: string;\r\n liveSearchState: ILiveSearchState;\r\n publicationMediaList: ICollapsableTreeNode[];\r\n searchSubscriptionModalShown: boolean;\r\n yearStartTmp: number | \"\";\r\n yearEndTmp: number | \"\";\r\n}\r\n\r\nconst keys = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"æ\", \"ø\", \"å\"];\r\n\r\n// does the rawSearchTerm match number/year pattern\r\n// match for: 20 2018 | >10 2014 | <50 2015 | 22-33 2017 but not 20 1999 | 1-3 1960\r\nconst numberAndYearRegExp: RegExp = /(^(<|>){1}([1-9]\\d*)|^([1-9]\\d*)|^([1-9]\\d*)(-)([1-9]\\d*))( (200[89])|(20[1-9]\\d)|(21\\d\\d))?$/;\r\nconst allNumbersRegExp: RegExp = /\\d+/g;\r\nconst validYearsRegExp: RegExp = /(?:^|\\D)(200[89])|(20[1-9]\\d)|(21\\d\\d)(?!\\d)/g;\r\n\r\nfunction removeNewline(str: string = \"\", replaceWith: string = \"\"): string {\r\n return str.replace(\"\\\\n\", replaceWith);\r\n}\r\n\r\nfunction getNumberText(number: string | null) {\r\n if (number === null || number === \"\") return \"\";\r\n return \"Søg efter nummer <strong>\" + number + \"</strong>\";\r\n}\r\n\r\nfunction getYearText(year: string | null) {\r\n if (year === null) return \"\";\r\n return \" i årgang <strong>\" + year + \"</strong>\";\r\n}\r\n\r\n// investigate match array and build a more readable text\r\nfunction getNumberAndYearText(arr: RegExpMatchArray | null): string {\r\n let buildText = \"\";\r\n if (arr === null) {\r\n return \"\";\r\n }\r\n\r\n if (arr[2] === undefined) {\r\n buildText = getNumberText(arr[1]);\r\n }\r\n\r\n if (arr[2] === \"<\") {\r\n buildText = \"Søg efter numre <strong>mindre end \" + arr[3] + \"</strong>\";\r\n }\r\n\r\n if (arr[2] === \">\") {\r\n buildText = \"Søg efter numre <strong>større end \" + arr[3] + \"</strong>\";\r\n }\r\n\r\n if (arr[6] === \"-\") {\r\n buildText = \"Søg efter numre i intervallet <strong>\" + arr[1] + \"</strong>\";\r\n }\r\n\r\n if (arr[8] !== undefined) {\r\n buildText = buildText + getYearText(arr[8]);\r\n }\r\n return buildText;\r\n}\r\n\r\nconst defaultLiveSearchState: Readonly<{ liveSearchTerm: string; hits: ILiveResultItemProps[]; staticLiveSearchItemsCount: number }> = {\r\n liveSearchTerm: \"\",\r\n hits: [],\r\n staticLiveSearchItemsCount: 0,\r\n};\r\n\r\nconst defaultParams: Readonly<DocumentSearchParams> = {\r\n page: 0,\r\n ps: PageSize.Ten,\r\n yh: new Date().getFullYear(),\r\n yl: 2008,\r\n o: orderByValues[0].key,\r\n d: false,\r\n r: EmptyStringArray,\r\n t: EmptyStringArray,\r\n dt: EmptyStringArray,\r\n ttl: EmptyStringArray,\r\n pttl: EmptyStringArray,\r\n hr: EmptyStringArray,\r\n st: \"\",\r\n et: \"\",\r\n dnr: \"\",\r\n e: EmptyStringArray,\r\n};\r\n\r\nconst yearLow = 2008;\r\nconst yearHigh = new Date().getFullYear();\r\n\r\nconst isNaNOrEmptyString = (numOrEmptyString: number | \"\") => numOrEmptyString === \"\" || Number.isNaN(numOrEmptyString);\r\n\r\nconst clampYear = (year: number) => Math.min(Math.max(year, yearLow), yearHigh);\r\n\r\nfunction paramsToDspState(dsp: DocumentSearchParams): IDocumentSearchParamsState {\r\n return {\r\n activePage: dsp.page,\r\n activePageSize: dsp.ps,\r\n selectedOrderByValue: orderByValues.find(obv => obv.key === dsp.o) || orderByValues[0],\r\n ascendingOrder: dsp.d,\r\n yearStart: clampYear(dsp.yl),\r\n yearEnd: clampYear(dsp.yh),\r\n searchTerms: dsp.t,\r\n titles: dsp.ttl,\r\n popularTitles: dsp.pttl,\r\n historicalRessorter: dsp.hr,\r\n st: dsp.st,\r\n et: dsp.et,\r\n documentNumberRange: dsp.dnr,\r\n };\r\n}\r\n\r\nclass DocumentsContainer extends React.Component<IDocumentsContainerProps, IDocumentsContainerState> {\r\n public readonly state: IDocumentsContainerState = {\r\n searchResult: { pageCount: 0, documents: [], resultCount: 0 },\r\n ...paramsToDspState(this.props.paramsOrDefaults),\r\n ressortList: [],\r\n tagSectionList: [{ label: \"Lovtidende X\", id: \"lovX\", keywords: [] }],\r\n currentSearchTerm: \"\",\r\n liveSearchState: defaultLiveSearchState,\r\n builtFilters: false,\r\n publicationMediaList: [],\r\n searchSubscriptionModalShown: false,\r\n yearStartTmp: \"\",\r\n yearEndTmp: \"\",\r\n };\r\n\r\n componentDidMount() {\r\n document.title = \"Lovtidende | Søg dokumenter\";\r\n this.initFiltersAndSearch();\r\n this.props.getRessorter();\r\n this.props.getTags();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.initFiltersAndSearch();\r\n }\r\n\r\n public initFiltersAndSearch() {\r\n if (this.props.paramsString !== this.props.location.search) {\r\n if (this.props.location.search) {\r\n this.props.setParams(this.props.location.search);\r\n } else {\r\n this.props.history.replace(this.props.paramsString);\r\n }\r\n this.setState({ builtFilters: false });\r\n return;\r\n }\r\n\r\n if (this.props.ressorter.active.length === 0) {\r\n return;\r\n }\r\n if (this.props.tags.lovA.length === 0) {\r\n return;\r\n }\r\n\r\n if (this.state.builtFilters) {\r\n return;\r\n }\r\n\r\n const stateFromParams = paramsToDspState(this.props.paramsOrDefaults);\r\n this.setState(\r\n {\r\n ...stateFromParams,\r\n builtFilters: true,\r\n ressortList: this.getRessortFilters(this.props.ressorter.active!),\r\n tagSectionList: this.getTagSectionListFilters(this.props.tags),\r\n publicationMediaList: this.getPublicationMediaDocTypeFilters(publicationMediaFilterData),\r\n yearStartTmp: stateFromParams.yearStart,\r\n yearEndTmp: stateFromParams.yearEnd,\r\n },\r\n () => this.doSearch(this.props.paramsString)\r\n );\r\n }\r\n\r\n public onOrderByChange = (value: IOrderByValue) => (e: React.SyntheticEvent) => {\r\n e.preventDefault();\r\n if (this.state.selectedOrderByValue !== value) {\r\n this.setState(\r\n {\r\n selectedOrderByValue: value,\r\n ascendingOrder: value.isDefaultDirectionAscending || false,\r\n activePage: 0,\r\n },\r\n this.setParamsAndSearch\r\n );\r\n }\r\n };\r\n\r\n public onOrderChange = () => this.setState({ ascendingOrder: !this.state.ascendingOrder, activePage: 0 }, this.setParamsAndSearch);\r\n\r\n private historicalRessortNameById = (id: string): string => {\r\n const ressorter = this.props.ressorter.all.find(hr => hr.id === id);\r\n return ressorter ? ressorter.name : \"Ukendt ministerie\";\r\n };\r\n\r\n public render() {\r\n const {\r\n searchResult,\r\n activePage,\r\n activePageSize,\r\n selectedOrderByValue,\r\n ascendingOrder,\r\n yearStart,\r\n yearStartTmp,\r\n yearEnd,\r\n yearEndTmp,\r\n currentSearchTerm,\r\n liveSearchState,\r\n } = this.state;\r\n\r\n return (\r\n <div className=\"documents-container\">\r\n {/* Modal */}\r\n {this.state.searchSubscriptionModalShown && (\r\n <SearchSubscription\r\n showModal={true}\r\n subscriptionUrl={`api/document/search/subscribe`}\r\n titleErrorText=\"Titel er ikke gyldig\"\r\n emailErrorText=\"Emailadressen er ikke gyldig\"\r\n formErrorText=\"Ikke gyldig\"\r\n onDismiss={this.onToggleSubscribeModal}\r\n ressortFilters={this.state.ressortList}\r\n publicationMediaFilters={this.state.publicationMediaList}\r\n tagsFilters={this.state.tagSectionList}\r\n chips={this.renderChips(false)}\r\n />\r\n )}\r\n {/* Search box */}\r\n <Row className=\"mb-3\">\r\n <Col className=\"px-xs-0\">\r\n <Card color=\"primary\" className=\"searchbox-container p-4\">\r\n <LiveSearch\r\n onChange={e => this.onLiveSearchTermChange(e, false)}\r\n onSearchButtonClicked={this.onSearchButtonClicked}\r\n searchTerm={currentSearchTerm}\r\n data={liveSearchState.hits}\r\n searchPlaceHolder=\"Søg efter nummer og år, titel eller populærtitel\"\r\n buttonStyle=\"secondary\"\r\n autofocus={true}\r\n />\r\n </Card>\r\n </Col>\r\n </Row>\r\n <Row>\r\n {/* Filters */}\r\n <Col lg=\"4\" className=\"search-filter-col px-xs-0\">\r\n {/* Chip actions */}\r\n <div className=\"chip-action-container d-flex justify-content-between\">\r\n <Link\r\n to=\"#\"\r\n className=\"font-weight-bold pt-1 ml-3 ml-sm-0\"\r\n onClick={e => {\r\n e.preventDefault();\r\n this.clearSearch();\r\n }}\r\n >\r\n Nulstil <span className=\"d-none d-lg-inline\">søgning</span>\r\n </Link>\r\n <Link\r\n to=\"#\"\r\n className=\"font-weight-bold mr-3 pt-1 mr-sm-0\"\r\n onClick={e => {\r\n e.preventDefault();\r\n this.onToggleSubscribeModal();\r\n }}\r\n >\r\n Abonnér <span className=\"d-none d-lg-inline\">på søgning</span>\r\n </Link>\r\n </div>\r\n\r\n {/* Publikations og dokumenttypefiltre */}\r\n <CollapsibleBox isOpen={true} className=\"filterbox tree-filterbox\" icon={IconType.BookReader} heading=\"Publiceringsmedie\">\r\n <CollapsableTree\r\n listOfNodes={this.state.publicationMediaList}\r\n onChange={this.onPublicationMediaFilterChange}\r\n className=\"collapsable-tree-container\"\r\n activeTreeStructure={true}\r\n onArrowClick={this.onArrowClickPublication}\r\n />\r\n </CollapsibleBox>\r\n\r\n {/* Year filter */}\r\n <CollapsibleBox isOpen={true} className=\"filterbox\" icon={IconType.CalendarAlt} heading=\"Årgang\">\r\n <DoubleSlider min={2008} max={new Date().getFullYear()} defaultValueLow={yearStart} defaultValueHigh={yearEnd} onChanged={this.onYearChange} />\r\n <br />\r\n <Row>\r\n <Col>\r\n <Input\r\n aria-label=\"Søg startende fra årgang\"\r\n type=\"number\"\r\n value={yearStartTmp}\r\n onChange={e => this.onYearStartChange(Number.parseFloat(e.currentTarget.value))}\r\n onBlur={e => this.onYearStartBlur(Number.parseFloat(e.currentTarget.value))}\r\n />\r\n </Col>\r\n <Col>\r\n <Input\r\n aria-label=\"Søg til og med årgang\"\r\n type=\"number\"\r\n value={yearEndTmp}\r\n onChange={e => this.onYearEndChange(Number.parseFloat(e.currentTarget.value))}\r\n onBlur={e => this.onYearEndBlur(Number.parseFloat(e.currentTarget.value))}\r\n />\r\n </Col>\r\n </Row>\r\n </CollapsibleBox>\r\n\r\n {/* Ministrefiltre */}\r\n <CollapsibleBox isOpen={true} className=\"filterbox tree-filterbox\" icon={IconType.City} heading=\"Ministerium\">\r\n <CollapsableTree\r\n listOfNodes={this.state.ressortList}\r\n onChange={this.onRessortFilterChange}\r\n className=\"collapsable-tree-container\"\r\n activeTreeStructure={true}\r\n onArrowClick={this.onArrowClick}\r\n />\r\n </CollapsibleBox>\r\n {/* Emneord */}\r\n <CollapsibleBox isOpen={true} className=\"filterbox\" icon={IconType.Font} heading=\"Emneord\">\r\n <Keyword keys={keys} keywordSections={this.state.tagSectionList} handleKeywordChecked={this.handleKeywordChecked} />\r\n </CollapsibleBox>\r\n </Col>\r\n {/* Search result */}\r\n <Col lg={8} className=\"mt-3 mt-md-2 mt-lg-0\">\r\n <SearchResultView\r\n searchResultItems={searchResult.documents}\r\n activePage={activePage}\r\n activePageSize={activePageSize}\r\n onPageChange={this.onPageChange}\r\n onPageSizeChange={this.onPageSizeChange}\r\n pageCount={searchResult.pageCount}\r\n renderItem={(searchResultItem: IDocument) => <Document sidebarVisible={true} document={searchResultItem} />}\r\n isSearchDirectionAscending={ascendingOrder}\r\n onOrderByChanged={this.onOrderByChange}\r\n onSearchDirectionChange={this.onOrderChange}\r\n orderByValues={orderByValues.map(obv => obv)}\r\n renderChips={() => this.renderChips(true)}\r\n resultCount={searchResult.resultCount}\r\n searchOrderBy={selectedOrderByValue}\r\n ></SearchResultView>\r\n </Col>\r\n </Row>\r\n </div>\r\n );\r\n }\r\n\r\n public onSearchButtonClicked = (searchTerm: string, skipNumberYearMatch: boolean = false) => {\r\n const trimmedSearchTerm = searchTerm.trim();\r\n if (!trimmedSearchTerm) {\r\n return;\r\n }\r\n\r\n if (!skipNumberYearMatch) {\r\n const numberYearMatch = trimmedSearchTerm.match(numberAndYearRegExp);\r\n const numberMatches = trimmedSearchTerm.match(allNumbersRegExp);\r\n\r\n if (numberYearMatch !== null) {\r\n this.onYearAndNumberMatchClicked(numberYearMatch[1], numberYearMatch[8]);\r\n return;\r\n } else if (numberMatches !== null && typeof numberMatches !== \"undefined\") {\r\n var validYearsMatch = searchTerm.match(validYearsRegExp);\r\n var year = validYearsMatch && numberMatches.length !== 1 ? validYearsMatch[validYearsMatch.length - 1].replace(/\\D/, \"\") : null;\r\n var num = numberMatches.find(x => x !== year) || \"\";\r\n this.onYearAndNumberMatchClicked(num, year);\r\n return;\r\n }\r\n }\r\n\r\n if (!this.state.searchTerms.some(t => t === trimmedSearchTerm)) {\r\n this.state.searchTerms.push(trimmedSearchTerm);\r\n }\r\n\r\n this.setState(\r\n {\r\n currentSearchTerm: \"\",\r\n searchTerms: this.state.searchTerms,\r\n liveSearchState: defaultLiveSearchState,\r\n activePage: 0,\r\n },\r\n this.setParamsAndSearch\r\n );\r\n };\r\n\r\n public addLiveSearchTerm = (hit: LiveSearchHitDto) => {\r\n const stateKey: keyof IDocumentSearchParamsState = hit.field === MatchField.Title ? \"titles\" : \"popularTitles\";\r\n const arr = this.state[stateKey];\r\n if (!arr.some(t => t === hit.value)) {\r\n arr.push(hit.value);\r\n }\r\n this.setState({ currentSearchTerm: \"\", liveSearchState: defaultLiveSearchState, ...{ [stateKey]: arr }, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private renderChips = (renderAllChips: boolean) => {\r\n return (\r\n <React.Fragment>\r\n {renderAllChips && this.state.documentNumberRange && (\r\n <SearchChip icon={IconType.Hashtag} onClick={() => this.removeDocumentNumber()}>\r\n Nr: {this.state.documentNumberRange}\r\n </SearchChip>\r\n )}\r\n {renderAllChips && this.isYearFilterChipVisible() && (\r\n <SearchChip key={\"chip_years\"} icon={IconType.CalendarAlt} onClick={this.onYearChipRemove}>\r\n År: {this.state.yearStart}-{this.state.yearEnd}\r\n </SearchChip>\r\n )}\r\n\r\n {renderAllChips &&\r\n this.state.searchTerms.map((searchTerm, index) => {\r\n return (\r\n <SearchChip title={searchTerm} icon={IconType.Search} key={\"chip_searchTerm_\" + index} onClick={() => this.removeSearchTerm(index)}>\r\n {searchTerm}\r\n </SearchChip>\r\n );\r\n })}\r\n\r\n {renderAllChips &&\r\n this.state.titles.map((title, index) => {\r\n return (\r\n <SearchChip icon={IconType.Search} title={removeNewline(title, \" \")} key={\"chip_ttl_\" + index} onClick={() => this.removeTitle(index)}>\r\n {removeNewline(title, \" \")}\r\n </SearchChip>\r\n );\r\n })}\r\n\r\n {renderAllChips &&\r\n this.state.popularTitles.map((popularTitle, index) => {\r\n return (\r\n <SearchChip icon={IconType.Search} key={\"chip_pttl_\" + index} onClick={() => this.removePopularTitle(index)}>\r\n {removeNewline(popularTitle, \" \")}\r\n </SearchChip>\r\n );\r\n })}\r\n\r\n {renderAllChips &&\r\n this.state.historicalRessorter.map((historicalRessorter, index: number) => {\r\n return (\r\n <SearchChipHistory icon={IconType.City} key={\"chip_hr_\" + index} onClick={() => this.removeHistoricalRessort(index)}>\r\n {this.historicalRessortNameById(historicalRessorter)}\r\n </SearchChipHistory>\r\n );\r\n })}\r\n\r\n {this.state.ressortList.map((ressortParent: ICollapsableTreeNode, indexParent: number) => {\r\n return (\r\n ressortParent.checked && (\r\n <SearchChip icon={IconType.City} key={\"chip_ressort_\" + indexParent} onClick={this.onRessortChipRemove(ressortParent)}>\r\n {ressortParent.label}\r\n </SearchChip>\r\n )\r\n );\r\n })}\r\n {this.state.tagSectionList.map(section =>\r\n section.keywords.map(tag => {\r\n return (\r\n tag.checked && (\r\n <SearchChip icon={IconType.Font} key={\"chip_tag_\" + tag.id} onClick={this.onTagChipRemove(section.id, tag.id)}>\r\n {tag.label}\r\n </SearchChip>\r\n )\r\n );\r\n })\r\n )}\r\n\r\n {this.state.publicationMediaList.map((pubMedParent: ICollapsableTreeNode, indexParent: number) => {\r\n return pubMedParent && !pubMedParent.children!.some(child => child.checked === false && child.noCheckBox === false) ? (\r\n <SearchChip icon={IconType.BookReader} key={\"chip_pubmed_\" + indexParent} onClick={this.onPublicationMediaChipRemove(pubMedParent)}>\r\n {pubMedParent.label}\r\n </SearchChip>\r\n ) : (\r\n pubMedParent.children!.map((pubMedChild: ICollapsableTreeNode, indexChild: number) => {\r\n return (\r\n pubMedChild.checked && (\r\n <SearchChip\r\n icon={IconType.BookReader}\r\n key={\"chip_pubmed_\" + indexParent + \"_\" + indexChild}\r\n onClick={this.onPublicationMediaChipRemove(pubMedChild)}\r\n >\r\n {pubMedParent.label} {\">\"} {pubMedChild.label}\r\n </SearchChip>\r\n )\r\n );\r\n })\r\n );\r\n })}\r\n </React.Fragment>\r\n );\r\n };\r\n private removeDocumentNumber = () => {\r\n this.setState({ documentNumberRange: \"\", activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private onPageChange = (newPage: number) => {\r\n this.setState({ activePage: newPage - 1 }, this.setParamsAndSearch);\r\n this.scrollToTop();\r\n };\r\n\r\n private onPageSizeChange = (newPageSize: number) => {\r\n this.setState({ activePageSize: newPageSize, activePage: 0 }, this.setParamsAndSearch);\r\n this.scrollToTop();\r\n };\r\n\r\n private scrollToTop() {\r\n const scrollHere = document.getElementById(\"scroll-here\")!;\r\n window.getComputedStyle(scrollHere).display === \"none\" ? window.scrollTo(0, 0) : scrollHere.scrollIntoView();\r\n }\r\n\r\n private onYearChange = (yearStart: number, yearEnd: number) => {\r\n if (\r\n this.state.yearStart !== yearStart ||\r\n this.state.yearEnd !== yearEnd ||\r\n this.state.yearStart !== this.state.yearStartTmp ||\r\n this.state.yearEnd !== this.state.yearEndTmp\r\n ) {\r\n this.setState({ yearStart, yearEnd, yearStartTmp: yearStart, yearEndTmp: yearEnd, activePage: 0 }, this.setParamsAndSearch);\r\n }\r\n };\r\n\r\n private onYearStartChange = (year: number) => {\r\n this.setState({ yearStartTmp: isNaNOrEmptyString(year) ? \"\" : year });\r\n if (!isNaNOrEmptyString(year)) {\r\n const startClamped = clampYear(year);\r\n if (startClamped === year) {\r\n const end = this.state.yearEnd > startClamped ? this.state.yearEnd : startClamped;\r\n this.onYearChange(startClamped, end);\r\n }\r\n }\r\n };\r\n\r\n private onYearEndChange = (year: number) => {\r\n this.setState({ yearEndTmp: isNaNOrEmptyString(year) ? \"\" : year });\r\n if (!isNaNOrEmptyString(year)) {\r\n const endClamped = clampYear(year);\r\n if (endClamped === year) {\r\n const start = this.state.yearStart < endClamped ? this.state.yearStart : endClamped;\r\n this.onYearChange(start, endClamped);\r\n }\r\n }\r\n };\r\n\r\n private onYearStartBlur = (year: number) => {\r\n if (isNaNOrEmptyString(year) || year < yearLow || year > yearHigh) {\r\n this.onYearChange(yearLow, this.state.yearEnd);\r\n }\r\n };\r\n\r\n private onYearEndBlur = (year: number) => {\r\n if (isNaNOrEmptyString(year) || year < yearLow || year > yearHigh) {\r\n this.onYearChange(this.state.yearStart, yearHigh);\r\n }\r\n };\r\n\r\n private removeSearchTerm = (index: number) => {\r\n this.state.searchTerms.splice(index, 1);\r\n this.setState({ searchTerms: this.state.searchTerms, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private removeHistoricalRessort = (index: number) => {\r\n this.state.historicalRessorter.splice(index, 1);\r\n this.setState({ historicalRessorter: this.state.historicalRessorter, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private removeTitle = (index: number) => {\r\n this.state.titles.splice(index, 1);\r\n this.setState({ titles: this.state.titles, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private removePopularTitle = (index: number) => {\r\n this.state.popularTitles.splice(index, 1);\r\n this.setState({ popularTitles: this.state.popularTitles, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private onToggleSubscribeModal = () => {\r\n this.setState({\r\n searchSubscriptionModalShown: !this.state.searchSubscriptionModalShown,\r\n });\r\n };\r\n\r\n private handleKeywordChecked = (sectionId: string, keywordId: string) => {\r\n const updatedTagSectionList = updateKeywordOnChecked(sectionId, keywordId, [...this.state.tagSectionList]);\r\n this.setState({ tagSectionList: updatedTagSectionList, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n private onRessortFilterChange = (selectedNode: ICollapsableTreeNode) => {\r\n toggleNodeCheckedAndUpdate(selectedNode, this.state.ressortList);\r\n\r\n this.setState({ ressortList: this.state.ressortList, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private onPublicationMediaFilterChange = (selectedNode: ICollapsableTreeNode) => {\r\n toggleNodeCheckedAndUpdate(selectedNode, this.state.publicationMediaList);\r\n\r\n this.setState({ publicationMediaList: this.state.publicationMediaList, activePage: 0 }, this.setParamsAndSearch);\r\n };\r\n\r\n private onArrowClick = (selectedNode: ICollapsableTreeNode) => {\r\n updateOnArrowClick(selectedNode, this.state.ressortList);\r\n this.setState({ ressortList: this.state.ressortList });\r\n };\r\n\r\n private onArrowClickPublication = (selectedNode: ICollapsableTreeNode) => {\r\n updateOnArrowClick(selectedNode, this.state.publicationMediaList);\r\n this.setState({ publicationMediaList: this.state.publicationMediaList });\r\n };\r\n\r\n private clearSearch = () => {\r\n const clearedRessortFilters = this.clearAllRessortFilters();\r\n const clearedPubMedFilters = this.clearAllPublicationMediaFilters();\r\n const clearedTagFilters = this.clearAllTagFilters();\r\n\r\n this.setState(\r\n {\r\n yearStart: yearLow,\r\n yearEnd: yearHigh,\r\n yearStartTmp: yearLow,\r\n yearEndTmp: yearHigh,\r\n ressortList: clearedRessortFilters,\r\n tagSectionList: clearedTagFilters,\r\n publicationMediaList: clearedPubMedFilters,\r\n searchTerms: [],\r\n titles: [],\r\n popularTitles: [],\r\n liveSearchState: defaultLiveSearchState,\r\n historicalRessorter: [],\r\n documentNumberRange: \"\",\r\n activePage: 0,\r\n ascendingOrder: defaultParams.d,\r\n selectedOrderByValue: orderByValues[0],\r\n },\r\n this.setParamsAndSearch\r\n );\r\n };\r\n\r\n private clearAllRessortFilters = () => {\r\n this.state.ressortList.forEach(filter => (filter.checked = false));\r\n return this.state.ressortList;\r\n };\r\n\r\n private clearAllPublicationMediaFilters = () => {\r\n this.state.publicationMediaList.forEach(section => {\r\n section.checked = false;\r\n section.indeterminate = undefined;\r\n section.children!.forEach(filter => {\r\n if (!filter.noCheckBox) {\r\n filter.checked = false;\r\n }\r\n });\r\n });\r\n return this.state.publicationMediaList;\r\n };\r\n\r\n private clearAllTagFilters = () => {\r\n const tagSectionListCopy = [...this.state.tagSectionList];\r\n tagSectionListCopy.forEach(section => section.keywords.forEach(tag => (tag.checked = false)));\r\n return tagSectionListCopy;\r\n };\r\n\r\n private onYearChipRemove = () => {\r\n this.onYearChange(defaultParams.yl, defaultParams.yh);\r\n };\r\n\r\n private isYearFilterChipVisible = () => !(this.state.yearStart === 2008 && this.state.yearEnd === new Date().getFullYear());\r\n\r\n private setParamsAndSearch() {\r\n const {\r\n activePage,\r\n activePageSize,\r\n ascendingOrder,\r\n selectedOrderByValue,\r\n yearStart,\r\n yearEnd,\r\n ressortList,\r\n tagSectionList,\r\n searchTerms,\r\n publicationMediaList,\r\n titles,\r\n popularTitles,\r\n historicalRessorter,\r\n st,\r\n et,\r\n documentNumberRange: documentNumber,\r\n } = this.state;\r\n\r\n const params: Partial<DocumentSearchParams> = {};\r\n\r\n if (activePage !== defaultParams.page) {\r\n params.page = activePage;\r\n }\r\n\r\n if (activePageSize !== defaultParams.ps) {\r\n params.ps = activePageSize;\r\n }\r\n\r\n if (ascendingOrder) {\r\n params.d = ascendingOrder;\r\n }\r\n\r\n if (selectedOrderByValue && selectedOrderByValue.key !== defaultParams.o) {\r\n params.o = selectedOrderByValue.key;\r\n }\r\n\r\n if (st !== defaultParams.st) {\r\n params.st = st;\r\n }\r\n\r\n if (et !== defaultParams.et) {\r\n params.et = et;\r\n }\r\n\r\n if (yearStart !== defaultParams.yl) {\r\n params.yl = yearStart;\r\n }\r\n\r\n if (yearEnd !== defaultParams.yh) {\r\n params.yh = yearEnd;\r\n }\r\n\r\n if (documentNumber !== \"\") {\r\n params.dnr = documentNumber;\r\n }\r\n\r\n if (historicalRessorter.length > 0) {\r\n params.hr = historicalRessorter;\r\n }\r\n\r\n if (ressortList.some(ressorter => ressorter.checked)) {\r\n params.r = ressortList.filter(ressorter => ressorter.checked).map(r => r.value);\r\n }\r\n\r\n if (tagSectionList.some(section => section.keywords.some(tag => tag.checked)))\r\n params.e = tagSectionList.flatMap(section => section.keywords.filter(tag => tag.checked).map(e => e.id));\r\n\r\n if (searchTerms.length > 0) {\r\n params.t = searchTerms;\r\n }\r\n\r\n if (publicationMediaList.some(section => section.indeterminate || section.checked)) {\r\n params.dt = publicationMediaList\r\n .filter(section => section.indeterminate || section.checked)\r\n .flatMap(section => section.children!)\r\n .filter(docType => !docType.noCheckBox)\r\n .filter(docType => docType.checked)\r\n .map(docType => docType.value);\r\n }\r\n\r\n if (titles.length > 0) {\r\n params.ttl = titles;\r\n }\r\n\r\n if (popularTitles.length > 0) {\r\n params.pttl = popularTitles;\r\n }\r\n\r\n const paramsString = qs.stringify(params);\r\n const paramsQuery = `?${paramsString}`;\r\n this.props.history.replace(paramsString ? paramsQuery : this.props.history.location.pathname);\r\n this.doSearch(paramsQuery);\r\n this.props.setParams(paramsQuery === \"?\" ? \"\" : paramsQuery);\r\n // Force update on liveseach\r\n if (this.state.currentSearchTerm) this.onLiveSearchTermChange(this.state.currentSearchTerm, true);\r\n }\r\n\r\n private doSearchDocumentCount(paramsString: string) {\r\n apiGET<{ [k: string]: number | undefined }>(\"api/document/search/count\", {\r\n params: qs.parse(paramsString),\r\n paramsSerializer: (p: object) => qs.stringify(p),\r\n }).then(response => {\r\n for (const child of this.state.publicationMediaList.flatMap(p => p.children || [])) {\r\n child.count = response[child.value] || 0;\r\n }\r\n this.setState({\r\n publicationMediaList: this.state.publicationMediaList,\r\n });\r\n });\r\n }\r\n\r\n private doSearch(paramsString: string) {\r\n apiGET<IDocumentSearchResult>(\"api/document/search\", {\r\n params: qs.parse(paramsString),\r\n paramsSerializer: (p: object) => qs.stringify(p),\r\n }).then(response => {\r\n this.setState({ searchResult: response });\r\n });\r\n\r\n this.doSearchDocumentCount(paramsString);\r\n }\r\n\r\n private onLiveSearchTermChange = (rawSearchTerm: string, forceSeach: boolean) => {\r\n const trimmedSearchTerm = rawSearchTerm.trim();\r\n const newLiveSearchState: ILiveSearchState = { liveSearchTerm: trimmedSearchTerm, hits: [], staticLiveSearchItemsCount: 0 };\r\n let counter = 0; // counter for static live search items\r\n\r\n if (!trimmedSearchTerm) {\r\n this.setState({ currentSearchTerm: rawSearchTerm, liveSearchState: newLiveSearchState });\r\n return;\r\n }\r\n\r\n // If only different in spaces and not forceSeach, update state but dont do livesearch request\r\n if (trimmedSearchTerm === this.state.currentSearchTerm.trim() && !forceSeach) {\r\n this.setState({ currentSearchTerm: rawSearchTerm });\r\n return;\r\n }\r\n\r\n // \"Number/year\" livesearch results\r\n const numberMatches = rawSearchTerm.match(allNumbersRegExp);\r\n const numberYearMatch = rawSearchTerm.match(numberAndYearRegExp);\r\n if (numberYearMatch !== null) {\r\n const buildText = getNumberAndYearText(numberYearMatch);\r\n\r\n newLiveSearchState.hits.push({\r\n text: buildText,\r\n onClick: () => this.onYearAndNumberMatchClicked(numberYearMatch[1], numberYearMatch[8]),\r\n aria: \"Klik her for at \" + buildText.replace(\"Søg\", \"søge\"),\r\n icon: IconType.Hashtag,\r\n });\r\n counter++;\r\n } else if (numberMatches !== null && typeof numberMatches !== \"undefined\") {\r\n var validYearsMatch = rawSearchTerm.match(validYearsRegExp);\r\n var year = validYearsMatch && numberMatches.length !== 1 ? validYearsMatch[validYearsMatch.length - 1].replace(/\\D/, \"\") : null;\r\n var num = numberMatches.find(x => x !== year) || \"\";\r\n\r\n const buildText = getNumberText(num) + getYearText(year);\r\n newLiveSearchState.hits.push({\r\n text: buildText,\r\n onClick: () => this.onYearAndNumberMatchClicked(num, year),\r\n aria: \"Klik her for at \" + buildText.replace(\"Søg\", \"søge\"),\r\n icon: IconType.Hashtag,\r\n });\r\n counter++;\r\n }\r\n\r\n // \"Search for\" livesearch results\r\n const quoteDelimited: RegExp = /\"[^\"]+\"$/;\r\n if (quoteDelimited.test(trimmedSearchTerm)) {\r\n newLiveSearchState.hits.push({\r\n text: \"Søg efter nøjagtigt udtryk <strong>\" + trimmedSearchTerm + \"</strong>\",\r\n onClick: () => this.onSearchButtonClicked(trimmedSearchTerm, true),\r\n aria: \"Klik her for at søge efter nøjagtigt udtryk \" + trimmedSearchTerm,\r\n });\r\n counter++;\r\n } else {\r\n newLiveSearchState.hits.push({\r\n text: \"Søg efter <strong>\" + trimmedSearchTerm + \"</strong>\",\r\n onClick: () => this.onSearchButtonClicked(trimmedSearchTerm, true),\r\n aria: \"Klik her for at søge efter \" + trimmedSearchTerm,\r\n });\r\n counter++;\r\n\r\n newLiveSearchState.hits.push({\r\n text: 'Søg efter nøjagtigt udtryk \"<strong>' + trimmedSearchTerm + '</strong>\"',\r\n onClick: () => this.onSearchButtonClicked('\"' + trimmedSearchTerm + '\"', true),\r\n aria: \"Klik her for at søge efter nøjagtigt udtryk \" + trimmedSearchTerm,\r\n });\r\n counter++;\r\n }\r\n\r\n // Update the static live search items counter\r\n newLiveSearchState.staticLiveSearchItemsCount = counter;\r\n\r\n this.setState(\r\n { currentSearchTerm: rawSearchTerm, liveSearchState: newLiveSearchState },\r\n debounce(() => this.getDynamicLiveSearchItems(newLiveSearchState), 200)\r\n );\r\n };\r\n\r\n private getDynamicLiveSearchItems = (newLiveSearchState: ILiveSearchState) => {\r\n // Block dynamic live search for outdated/debounced calls and less than 3 characters\r\n if (this.state.currentSearchTerm === newLiveSearchState.liveSearchTerm && newLiveSearchState.liveSearchTerm.trim().length > 2) {\r\n this.getLiveSearchSuggestionItems();\r\n }\r\n };\r\n\r\n private getLiveSearchSuggestionItems() {\r\n var lst: ILiveSearchState = this.state.liveSearchState;\r\n var parameterString;\r\n if (this.props.paramsString) parameterString = this.props.paramsString + \"&q=\" + lst.liveSearchTerm;\r\n else parameterString = \"q=\" + lst.liveSearchTerm;\r\n\r\n apiGET<LiveSearchHitDto[]>(\"api/document/search/matching\", {\r\n params: qs.parse(parameterString),\r\n paramsSerializer: (p: object) => qs.stringify(p),\r\n }).then(result => {\r\n if (this.state.currentSearchTerm !== lst.liveSearchTerm) {\r\n return;\r\n }\r\n\r\n const hits: ILiveResultItemProps[] = result.map((hit: LiveSearchHitDto) => ({\r\n text: `${hit.value.replace(/\\\\n/g, \"<br />\")}`,\r\n icon: IconType.Search,\r\n onClick: () => this.addLiveSearchTerm(hit),\r\n label: hit.field === MatchField.Title ? \"(titel)\" : \"(populærtitel)\",\r\n template: LiveResultTemplateEnum.DOUBLE_LINE_WITH_LABEL,\r\n aria: \"Klik her for at søge efter dokumenter med \" + (hit.field === MatchField.Title ? \"titlen\" : \"populærtitlen\") + \": \" + hit.value,\r\n }));\r\n // remember to prepend hits with the sliced static items\r\n this.setState({ liveSearchState: { ...lst, hits: [...lst.hits, ...hits] } });\r\n });\r\n }\r\n\r\n private getRessortFilters(resorts: IRessort[]): ICollapsableTreeNode[] {\r\n return resorts.map(resort => {\r\n return {\r\n value: resort.id,\r\n label: resort.name,\r\n checked: this.props.paramsOrDefaults.r.some(r => r === resort.id),\r\n children: undefined,\r\n isOpen: false,\r\n indeterminate: undefined,\r\n isChild: false,\r\n };\r\n });\r\n }\r\n\r\n // reuse then yearStart and yearEnd filter, update the documentNumberRange\r\n private onYearAndNumberMatchClicked = (num: string, year: string | null) => {\r\n if (year) {\r\n this.setState(\r\n {\r\n yearStart: +year,\r\n yearEnd: +year,\r\n yearStartTmp: +year,\r\n yearEndTmp: +year,\r\n documentNumberRange: num,\r\n liveSearchState: defaultLiveSearchState,\r\n currentSearchTerm: \"\",\r\n activePage: 0,\r\n },\r\n this.setParamsAndSearch\r\n );\r\n } else {\r\n this.setState(\r\n {\r\n yearStart: +yearLow,\r\n yearEnd: +yearHigh,\r\n yearStartTmp: +yearLow,\r\n yearEndTmp: +yearHigh,\r\n documentNumberRange: num,\r\n liveSearchState: defaultLiveSearchState,\r\n currentSearchTerm: \"\",\r\n activePage: 0,\r\n },\r\n this.setParamsAndSearch\r\n );\r\n }\r\n };\r\n\r\n private getTagSectionListFilters(tags: ITagSectionList): IKeywordSection[] {\r\n var tagList: IKeywordSection[] = [this.addTagSection(tags.lovA, \"Lovtidende A\", \"lovA\")];\r\n tagList.push(this.addTagSection(tags.lovCBilateral, \"Lovtidende C Bilaterale overenskomster\", \"lovCBi\"));\r\n tagList.push(this.addTagSection(tags.lovCMultilateral, \"Lovtidende C Multilaterale overenskomster\", \"lovCMulti\"));\r\n\r\n return tagList;\r\n }\r\n\r\n private addTagSection(tagSection: ITag[], label: string, id: string): IKeywordSection {\r\n var tagFilterSection: IKeywordSection = { id: id, label: label, keywords: [] };\r\n tagSection.forEach((tag, index) => {\r\n tagFilterSection.keywords[index] = {\r\n key: tag.key,\r\n label: tag.label,\r\n id: tag.id,\r\n checked: this.props.paramsOrDefaults.e.some(e => e === tag.id),\r\n };\r\n });\r\n return tagFilterSection;\r\n }\r\n\r\n private getPublicationMediaDocTypeFilters(publicationMediaFilterData: any[]): ICollapsableTreeNode[] {\r\n const pubMedDocFilter: ICollapsableTreeNode[] = [];\r\n\r\n publicationMediaFilterData.map((parentNode: ICollapsableTreeNode, parentIndex: number) => {\r\n pubMedDocFilter[parentIndex] = {\r\n value: parentNode.value,\r\n label: parentNode.label,\r\n children: [],\r\n isChild: false,\r\n checked: false,\r\n isOpen: false,\r\n };\r\n return parentNode.children!.map((childNode: ICollapsableTreeNode, childIndex: number) => {\r\n return (pubMedDocFilter[parentIndex].children![childIndex] = {\r\n value: childNode.value,\r\n label: childNode.label,\r\n isChild: true,\r\n checked: this.props.paramsOrDefaults.dt.some(dt => dt === childNode.value),\r\n isOpen: false,\r\n noCheckBox: childNode.noCheckBox ? childNode.noCheckBox : false,\r\n });\r\n });\r\n });\r\n\r\n for (const filter of pubMedDocFilter) {\r\n filter.checked = filter.children!.filter(c => !c.noCheckBox).every(f => f.checked) ? true : false;\r\n filter.indeterminate = !filter.checked && filter.children!.filter(c => !c.noCheckBox).some(f => f.checked) ? \" \" : undefined;\r\n filter.isOpen = filter.checked || filter.indeterminate;\r\n }\r\n\r\n return pubMedDocFilter;\r\n }\r\n\r\n private onRessortChipRemove = (selectedNode: ICollapsableTreeNode) => () => {\r\n this.onRessortFilterChange(selectedNode);\r\n };\r\n\r\n private onPublicationMediaChipRemove = (selectedNode: ICollapsableTreeNode) => () => {\r\n this.onPublicationMediaFilterChange(selectedNode);\r\n };\r\n\r\n private onTagChipRemove = (sectionId: string, tagId: string) => () => {\r\n this.handleKeywordChecked(sectionId, tagId);\r\n };\r\n}\r\n\r\nexport default connect(\r\n ({ documentSearch, ressorter, tags }: AppState, ownProps: IDocumentsContainerProps): IDocumentsContainerProps => {\r\n return {\r\n ...ownProps,\r\n paramsString: documentSearch.params,\r\n paramsOrDefaults: documentSearch.parseWithDefaults(defaultParams),\r\n ressorter: ressorter,\r\n tags: tags,\r\n };\r\n },\r\n dispatch =>\r\n bindActionCreators(\r\n {\r\n ...DocumentSearchActions,\r\n ...RessortActions,\r\n ...TagActions,\r\n },\r\n dispatch\r\n )\r\n)(DocumentsContainer);\r\n","import { IOrderByValue } from \"@lexdania/components/build/lib/components/search/models/SearchModels\";\r\n\r\nexport enum OrderByKey {\r\n Underskrift = 10,\r\n Titel = 20,\r\n Ministerium = 30,\r\n NummerOgAar = 40,\r\n Rank = 50,\r\n Offentliggoerelse = 80,\r\n}\r\n\r\nexport const orderByValues: ReadonlyArray<IOrderByValue> = [\r\n { text: \"Relevans\", key: OrderByKey.Rank, hasOrderDirection: false, isDefaultDirectionAscending: false },\r\n { text: \"Offentliggørelsesdato\", key: OrderByKey.Offentliggoerelse, hasOrderDirection: true, isDefaultDirectionAscending: false },\r\n { text: \"Forskriftens nr. / år\", key: OrderByKey.NummerOgAar, hasOrderDirection: true, isDefaultDirectionAscending: false },\r\n { text: \"Ministerium\", key: OrderByKey.Ministerium, hasOrderDirection: true, isDefaultDirectionAscending: true },\r\n { text: \"Titel\", key: OrderByKey.Titel, hasOrderDirection: true, isDefaultDirectionAscending: true },\r\n { text: \"Underskriftdato\", key: OrderByKey.Underskrift, hasOrderDirection: true, isDefaultDirectionAscending: false },\r\n];\r\n","const publicationMediaFilterData: any[] = [];\r\n\r\nconst lovA = {\r\n id: 10,\r\n value: \"A\",\r\n label: \"Lovtidende A\",\r\n children: [\r\n {\r\n value: \"\",\r\n label: \"Love & lovbekendtgørelser\",\r\n noCheckBox: true,\r\n },\r\n {\r\n value: \"10\",\r\n label: \"Lov\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"20\",\r\n label: \"Ændringslov\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"30\",\r\n label: \"Lovbekendtgørelse\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"\",\r\n label: \"Administrative forskrifter\",\r\n noCheckBox: true,\r\n },\r\n {\r\n value: \"90\",\r\n label: \"Ikrafttræd. bekendtgørelse\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"120\",\r\n label: \"Ikrafttræd. anordning\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"270\",\r\n label: \"Ikrafttræd. anordning (GL og FO)\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"60\",\r\n label: \"Bekendtgørelse\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"100\",\r\n label: \"Anordning\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"80\",\r\n label: \"Ændringsbekendtgørelse\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"110\",\r\n label: \"Ændringsanordning\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"130\",\r\n label: \"Åbent brev\",\r\n noCheckBox: false,\r\n },\r\n {\r\n value: \"1510\",\r\n label: \"Anordningsbekendtgørelse\",\r\n noCheckBox: false,\r\n },\r\n ],\r\n};\r\npublicationMediaFilterData.push(lovA);\r\n\r\nconst lovB = {\r\n id: 20,\r\n value: \"B\",\r\n label: \"Lovtidende B\",\r\n children: [\r\n {\r\n value: \"1480\",\r\n label: \"Lovtidende B dokument\",\r\n noCheckBox: false,\r\n },\r\n ],\r\n};\r\npublicationMediaFilterData.push(lovB);\r\n\r\nconst lovC = {\r\n id: 30,\r\n value: \"C\",\r\n label: \"Lovtidende C\",\r\n children: [\r\n {\r\n value: \"220\",\r\n label: \"Bekendtgørelse (international)\",\r\n noCheckBox: false,\r\n },\r\n ],\r\n};\r\npublicationMediaFilterData.push(lovC);\r\n\r\nexport { publicationMediaFilterData };\r\n","export enum MatchField {\r\n Title = 1,\r\n PopularTitle = 2,\r\n}\r\n","/**\n * A function that emits a side effect and does not return anything.\n */\nexport type Procedure = (...args: any[]) => void;\n\nexport type Options = {\n isImmediate: boolean,\n}\n\nexport function debounce<F extends Procedure>(\n func: F,\n waitMilliseconds = 50,\n options: Options = {\n isImmediate: false\n },\n): F {\n let timeoutId: NodeJS.Timeout | undefined;\n\n return function(this: any, ...args: any[]) {\n const context = this;\n\n const doLater = function() {\n timeoutId = undefined;\n if (!options.isImmediate) {\n func.apply(context, args);\n }\n }\n\n const shouldCallNow = options.isImmediate && timeoutId === undefined;\n\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n }\n\n timeoutId = setTimeout(doLater, waitMilliseconds);\n\n if (shouldCallNow) {\n func.apply(context, args);\n }\n } as any\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}"],"names":["connect","ownProps","notes","reprintNotes","dispatch","bindActionCreators","ReprintInformationActions","props","toggleModal","isOpen","getReprintNotes","docId","shortName","title","ressort","React","Modal","className","ModalHeader","tag","ModalBody","map","note","index","Row","Col","date","classname","href","reprintOfId","Icon","icon","IconType","iconSize","dangerouslySetInnerHTML","__html","replace","ModalFooter","Button","color","onClick","Tags","tags","length","lg","publicationMediaId","heading","emneord","underskriftDato","underskriftSted","documentId","id","nlToBr","str","arr","split","elmsArr","flatMap","s","i","pop","d","document","showReprintNotes","setShowReprintNotes","showTags","setShowTags","toggleReprintNotes","Container","ressortName","xl","Badge","publicationMedia","name","isReprint","md","sidebarVisible","offentliggoerelsesDato","popularTitle","lovtidendeAEmneord","lovtidendeCBilateraleEmneord","lovtidendeCMultilateraleEmneord","Link","to","e","preventDefault","retsinfoLink","target","rel","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","unsupportedIterableToArray","F","n","done","value","_e","f","TypeError","err","normalCompletion","didErr","call","step","next","_e2","_excluded","propTypes","children","PropTypes","type","size","bsSize","valid","invalid","tagPropType","innerRef","plaintext","addon","cssModule","Input","_React$Component","_this","this","getRef","bind","_assertThisInitialized","focus","_inheritsLoose","_proto","prototype","ref","render","_this$props","attributes","_objectWithoutPropertiesLoose","checkInput","indexOf","isNotaNumber","RegExp","Tag","formControlClass","test","warnOnce","classes","mapToCssModules","classNames","_extends","defaultProps","inline","Form","_Component","submit","Component","row","check","disabled","FormGroup","stringOrNumberProp","columnProps","order","offset","hidden","for","xs","sm","widths","getColumnSizeClass","isXs","colWidth","colSize","Label","htmlFor","colClasses","forEach","columnProp","colClass","isObject","_classNames","colSizeInterfix","push","tooltip","undefined","FormFeedback","validMode","SearchSubscription","InputEmailId","InputTitleId","handleInputChange","currentTarget","setState","email","isEmailValid","isTitleValid","handleSubmit","subscribeForm","checkValidity","body","getQuerySubscriberModel","apiPOST","subscriptionUrl","JSON","stringify","result","isFormValid","isError","isSubmitted","handleFormErrors","state","showModal","onDismiss","titleErrorText","emailErrorText","formErrorText","ressortFilters","tagsFilters","chips","publicationMediaFilters","subscription","onSubmit","noValidate","Alert","required","pattern","onChange","formElements","from","elements","filter","element","includes","el","validity","rFilters","checked","key","dtFilters","pubMedParent","eFilters","x","keywords","v","searchFilters","r","dt","keys","numberAndYearRegExp","allNumbersRegExp","validYearsRegExp","removeNewline","replaceWith","getNumberText","number","getYearText","year","getNumberAndYearText","buildText","defaultLiveSearchState","liveSearchTerm","hits","staticLiveSearchItemsCount","defaultParams","page","ps","PageSize","yh","Date","getFullYear","yl","orderByValues","EmptyStringArray","t","ttl","pttl","hr","st","et","dnr","yearLow","yearHigh","isNaNOrEmptyString","numOrEmptyString","Number","isNaN","clampYear","Math","min","max","paramsToDspState","dsp","activePage","activePageSize","selectedOrderByValue","obv","ascendingOrder","yearStart","yearEnd","searchTerms","titles","popularTitles","historicalRessorter","documentNumberRange","DocumentsContainer","searchResult","pageCount","documents","resultCount","paramsOrDefaults","ressortList","tagSectionList","label","currentSearchTerm","liveSearchState","builtFilters","publicationMediaList","searchSubscriptionModalShown","yearStartTmp","yearEndTmp","onOrderByChange","isDefaultDirectionAscending","setParamsAndSearch","onOrderChange","historicalRessortNameById","ressorter","all","find","onSearchButtonClicked","searchTerm","skipNumberYearMatch","trimmedSearchTerm","trim","numberYearMatch","match","numberMatches","onYearAndNumberMatchClicked","validYearsMatch","num","some","addLiveSearchTerm","hit","stateKey","field","MatchField","renderChips","renderAllChips","SearchChip","removeDocumentNumber","isYearFilterChipVisible","onYearChipRemove","removeSearchTerm","removeTitle","removePopularTitle","SearchChipHistory","removeHistoricalRessort","ressortParent","indexParent","onRessortChipRemove","section","onTagChipRemove","child","noCheckBox","onPublicationMediaChipRemove","pubMedChild","indexChild","onPageChange","newPage","scrollToTop","onPageSizeChange","newPageSize","onYearChange","onYearStartChange","startClamped","end","onYearEndChange","endClamped","start","onYearStartBlur","onYearEndBlur","splice","onToggleSubscribeModal","handleKeywordChecked","sectionId","keywordId","updatedTagSectionList","updateKeywordOnChecked","onRessortFilterChange","selectedNode","toggleNodeCheckedAndUpdate","onPublicationMediaFilterChange","onArrowClick","updateOnArrowClick","onArrowClickPublication","clearSearch","clearedRessortFilters","clearAllRessortFilters","clearedPubMedFilters","clearAllPublicationMediaFilters","clearedTagFilters","clearAllTagFilters","indeterminate","tagSectionListCopy","onLiveSearchTermChange","rawSearchTerm","forceSeach","newLiveSearchState","counter","text","aria","debounce","getDynamicLiveSearchItems","getLiveSearchSuggestionItems","tagId","initFiltersAndSearch","getRessorter","getTags","paramsString","location","search","setParams","history","active","lovA","stateFromParams","getRessortFilters","getTagSectionListFilters","getPublicationMediaDocTypeFilters","publicationMediaFilterData","doSearch","Card","LiveSearch","data","searchPlaceHolder","buttonStyle","autofocus","CollapsibleBox","CollapsableTree","listOfNodes","activeTreeStructure","DoubleSlider","defaultValueLow","defaultValueHigh","onChanged","parseFloat","onBlur","Keyword","keywordSections","SearchResultView","searchResultItems","renderItem","searchResultItem","Document","isSearchDirectionAscending","onOrderByChanged","onSearchDirectionChange","searchOrderBy","scrollHere","getElementById","window","getComputedStyle","display","scrollTo","scrollIntoView","documentNumber","params","docType","qs","paramsQuery","pathname","apiGET","paramsSerializer","p","then","response","count","doSearchDocumentCount","parameterString","lst","template","LiveResultTemplateEnum","resorts","resort","isChild","tagList","addTagSection","lovCBilateral","lovCMultilateral","tagSection","tagFilterSection","pubMedDocFilter","parentNode","parentIndex","childNode","childIndex","c","every","documentSearch","parseWithDefaults","DocumentSearchActions","RessortActions","TagActions","OrderByKey","Rank","hasOrderDirection","Offentliggoerelse","NummerOgAar","Ministerium","Titel","Underskrift","func","waitMilliseconds","options","timeoutId","isImmediate","_i","args","context","shouldCallNow","clearTimeout","setTimeout","apply","_toConsumableArray","arrayLikeToArray","iter"],"sourceRoot":""}