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AcF,EAAUE,aACxBJ,KAAMiM,EAAcjM,KACpBM,aAAc2L,EAAc3L,aAC5BE,kBAAmByL,EAAczL,kBACjC8H,iBAAkB2D,EAAc3D,kBAEnC,IACD,SAAA6D,GAAQ,OACNC,EAAAA,GAAAA,KAAmB,kCAEZC,GAAAA,GACAC,GAAAA,GACAC,GAAAA,GACAC,GAAAA,IAELL,EARI,GAbV,CAuBE3H,G","sources":["components/CsvExport/CsvSizeWarningDialog.tsx","components/document/GridViewDocument.tsx","containers/extremesearch/RetsinfoKlassifikation.ts","containers/extremesearch/DropDownMenu.ts","containers/extremesearch/config.tsx","containers/extremesearch/templates/01.ts","containers/extremesearch/templates/02.ts","containers/extremesearch/templates/03.ts","containers/extremesearch/templates/04.ts","containers/extremesearch/templates/05.ts","containers/extremesearch/templates/06.ts","containers/extremesearch/ExtremeSearchHelper.ts","components/CsvExport/CsvExportBtn.tsx","containers/extremesearch/ExtremeSearchContainer.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from \"reactstrap\";\r\n\r\nexport interface ICsvSizeWarningDialogProps {\r\n  isModalOpen: boolean;\r\n  confirmed: () => void;\r\n  dismissed: () => void;\r\n}\r\n\r\nexport const CsvSizeWarningDialog: React.FC<ICsvSizeWarningDialogProps> = (props: ICsvSizeWarningDialogProps) => {\r\n  const { dismissed, confirmed, isModalOpen } = props;\r\n  return (\r\n    <Modal isOpen={isModalOpen} toggle={dismissed}>\r\n      <ModalHeader toggle={dismissed}>Eksportér søgeresultat</ModalHeader>\r\n      <ModalBody>Det aktuelle søgeresultat indeholder mange dokumenter, og det vil derfor tage længere tid at eksportere. Vil du fortsætte?</ModalBody>\r\n      <ModalFooter>\r\n        <Button color=\"primary\" onClick={confirmed}>\r\n          Ok\r\n        </Button>\r\n        <Button color=\"primary\" onClick={dismissed}>\r\n          Annullér\r\n        </Button>\r\n      </ModalFooter>\r\n    </Modal>\r\n  );\r\n};\r\n","import * as React from \"react\";\r\nimport { Row, Col, Badge, Container, Button } from \"reactstrap\";\r\nimport \"./GridViewDocument.scss\";\r\nimport { EliClass } from \"../eli/eli-class\";\r\nimport { EliProperty } from \"../eli/eli-property\";\r\nimport { DataType } from \"../eli/data-type\";\r\nimport { EliResource } from \"../eli/eli-resource\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Icon, IconType } from \"@lexdania/components\";\r\nimport RelatedDocs from \"./RelatedDocs\";\r\nimport { GeografiskDaekning } from \"../../models/GeografiskDaekningEnum\";\r\nimport ReprintNotes from \"../reprintNotes/ReprintNotes\";\r\nimport { IDocumentProps, nlToBr } from \"./Document\";\r\n\r\nexport interface IGridViewDocumentProps extends IDocumentProps {\r\n  fullScreen?: boolean;\r\n}\r\n\r\nexport const GridViewDocument: React.FC<IGridViewDocumentProps> = props => {\r\n  const { document } = props;\r\n  const [show, setShow] = React.useState(false);\r\n  const [showReprintNotes, setShowReprintNotes] = React.useState(false);\r\n\r\n  const toggleReprintNotes = () => {\r\n    setShowReprintNotes(!showReprintNotes);\r\n  };\r\n\r\n  const handleKeyUp = (e: React.KeyboardEvent<HTMLElement>) => {\r\n    switch (e.key) {\r\n      case \"Enter\":\r\n        setShow(!show);\r\n        break;\r\n    }\r\n  };\r\n\r\n  return (\r\n    <>\r\n      <ReprintNotes\r\n        ressort={document.ressortName}\r\n        isOpen={showReprintNotes}\r\n        toggleModal={toggleReprintNotes}\r\n        docId={document.id}\r\n        title={document.title}\r\n        shortName={document.shortName}\r\n      />\r\n\r\n      <Container className=\"document-entry\">\r\n        <Row>\r\n          <Col md=\"9\">\r\n            <Row>\r\n              <Col md={props.fullScreen ? 3 : 5} className=\"pr-1 pl-0\">\r\n                <div className=\"document-short-name py-1\" property={EliProperty.ShortTitle} datatype={DataType.RDFsLiteral}>\r\n                  {document.shortName}\r\n                </div>\r\n                <div className=\"document-date py-1 pr-2\">\r\n                  <span property={EliProperty.PublicationDate} datatype={DataType.XSDdate}>\r\n                    {document.offentliggoerelsesDato}\r\n                  </span>\r\n                  {showDocumentStateBadge(document.geografiskDaekningId, document.retsinfoKlassifikationId) && (\r\n                    <Badge\r\n                      color=\"secondary\"\r\n                      className={\"py-1 px-2 ml-2 mb-1\" + (document.isHistoryFlag ? \" historic-badge \" : \"\")}\r\n                      property={EliProperty.InForce}\r\n                      resource={document.isHistoryFlag ? EliResource.OntologyNotInForce : EliResource.OntologyInForce}\r\n                    >\r\n                      {document.isHistoryFlag ? \"HISTORISK\" : \"GÆLDENDE\"}\r\n                    </Badge>\r\n                  )}\r\n                  {document.hasReprintNotes && (\r\n                    <Button color=\"primary\" className=\"ml-2 action-badge badge btn-badge py-1 px-2 mb-1 \" onClick={toggleReprintNotes}>\r\n                      OMTRYKT\r\n                    </Button>\r\n                  )}\r\n                </div>\r\n              </Col>\r\n              <Col md={props.fullScreen ? 9 : 7} className=\"px-0\">\r\n                <div className=\"py-1\">\r\n                  <Link\r\n                    to={document.retsinfoLink}\r\n                    className=\"document-title\"\r\n                    resource={document.retsinfoLink + \"/dan/html\"}\r\n                    title={nlToBr(document.title).toString()}\r\n                    {...{ rev: EliProperty.Embodies, rel: EliProperty.IsEmbodiedBy }}\r\n                  >\r\n                    <span resource={document.retsinfoLink + \"/dan/html\"} typeof={EliClass.Format}>\r\n                      <span property={EliProperty.Format} resource={EliResource.FormatHtml} />\r\n                      <span property={EliProperty.MediaType} resource={EliResource.MediaTypeHtml} />\r\n                      <span about={document.retsinfoLink + \"/dan\"} property={EliProperty.Title} datatype={DataType.XSDdate}>\r\n                        {nlToBr(document.title)}\r\n                      </span>\r\n                    </span>\r\n                  </Link>\r\n                </div>\r\n                <div className=\"py-1 wrapper\">\r\n                  {document.popularTitle && (\r\n                    <span className=\"document-popular-title\" property={EliProperty.TitleAlternative} datatype={DataType.RDFsLiteral}>\r\n                      {document.popularTitle}\r\n                    </span>\r\n                  )}\r\n                </div>\r\n              </Col>\r\n            </Row>\r\n          </Col>\r\n          <Col md={3}>\r\n            <Row className=\"inner-row\">\r\n              <Col\r\n                md={10}\r\n                className=\"pr-0  py-1 text-right\"\r\n                about={document.retsinfoLink}\r\n                property={EliProperty.ResponsibilityOf}\r\n                datatype={DataType.XSDstring}\r\n              >\r\n                <div className=\"document-ressort\">{document.ressortName}</div>\r\n                <div className=\" document-ressort\">\r\n                  {document.fobRessortNames !== undefined && document.fobRessortNames.length > 0 ? <> ({document.fobRessortNames.join(\", \")})</> : \" \"}\r\n                </div>\r\n              </Col>\r\n              <Col\r\n                md={2}\r\n                className=\"d-flex align-items-center more-info-toggler pr-0\"\r\n                onClick={e => {\r\n                  e.preventDefault();\r\n                  setShow(!show);\r\n                }}\r\n                onKeyUp={handleKeyUp}\r\n                tabIndex={0}\r\n                aria-expanded={show ? true : false}\r\n              >\r\n                <div>\r\n                  <Icon icon={IconType.AngleRight} iconSize={32} className={!show ? \"svg-rotate collapsed\" : \"svg-rotate\"} />\r\n                  {show ? <span className=\"sr-only\">Skjul relaterede dokumenter</span> : <span className=\"sr-only\">Vis relaterede dokumenter</span>}\r\n                </div>\r\n              </Col>\r\n            </Row>\r\n          </Col>\r\n        </Row>\r\n        <Row>\r\n          <Col className=\"px-0\">\r\n            <RelatedDocs show={show} docId={document.id} />\r\n          </Col>\r\n        </Row>\r\n      </Container>\r\n    </>\r\n  );\r\n};\r\n\r\nfunction showDocumentStateBadge(geografiskDakning: number, retsinfoKlassifikation: number) {\r\n  const folketingRetsinfoKlassifikationer = [50, 60, 70];\r\n  return (\r\n    (geografiskDakning === GeografiskDaekning.IkkeGronlandOgFaeroerne || geografiskDakning === GeografiskDaekning.HeleRigsfaellesskabet) &&\r\n    !folketingRetsinfoKlassifikationer.includes(retsinfoKlassifikation)\r\n  );\r\n}\r\n","export enum RetsinfoKlassifikation {\r\n  ALL = \"0\",\r\n  REGLER = \"10\",\r\n  AFGOERELSER = \"20\",\r\n  FOLKETINGETSOMBUDSMAND = \"30\",\r\n  LOVOGBESLUTNINGSFORSLAG = \"50-60\",\r\n}\r\n","import { ISelectItem } from \"../../models/ISelectItem\";\r\nexport const DropDownMenu: ISelectItem[] = [\r\n  {\r\n    label: \"Intet valgt\",\r\n    value: 1,\r\n  },\r\n  {\r\n    label: \"Regler\",\r\n    value: 2,\r\n  },\r\n  {\r\n    label: \"Folketingets Ombudsmands beretningssager\",\r\n    value: 3,\r\n  },\r\n  {\r\n    label: \"Afgørelser\",\r\n    value: 4,\r\n  },\r\n  {\r\n    label: \"Lov- og beslutningsforslag\",\r\n    value: 6,\r\n  },\r\n];\r\n","import merge from \"lodash/merge\";\r\nimport moment from \"moment\";\r\nimport da_DK from \"antd/lib/locale-provider/da_DK\";\r\nimport \"moment/locale/da\";\r\nimport {\r\n  Widgets,\r\n  // types:\r\n  Operators,\r\n  Config,\r\n  Types,\r\n  Conjunctions,\r\n  Settings,\r\n  LocaleSettings,\r\n  Funcs,\r\n  Field,\r\n  TreeSelectFieldSettings,\r\n  TreeItem,\r\n  SelectFieldSettings,\r\n  ListItem,\r\n  Fields,\r\n} from \"react-awesome-query-builder/\";\r\nimport AntdConfig from \"react-awesome-query-builder/lib/config/antd\";\r\n\r\nmoment.locale(\"da\");\r\n\r\nconst conjunctions: Conjunctions = {\r\n  ...AntdConfig.conjunctions,\r\n};\r\n\r\nconst operators: Operators = {\r\n  ...AntdConfig.operators,\r\n  // examples of  overriding\r\n  like: {\r\n    ...AntdConfig.operators.like,\r\n    label: \"Indeholder\",\r\n  },\r\n  is_empty: {\r\n    ...AntdConfig.operators.is_empty,\r\n    label: \"NULL\",\r\n  },\r\n  is_not_empty: {\r\n    ...AntdConfig.operators.is_not_empty,\r\n    label: \"NOT NULL\",\r\n  },\r\n  multiselect_equals: {\r\n    ...AntdConfig.operators.multiselect_equals,\r\n    label: \"==\",\r\n  },\r\n  starts_with: {\r\n    ...AntdConfig.operators.starts_with,\r\n    label: \"Frasesøgning\",\r\n  },\r\n};\r\n\r\nconst widgets: Widgets = {\r\n  ...AntdConfig.widgets,\r\n  //examples of  overriding\r\n  text: {\r\n    ...AntdConfig.widgets.text,\r\n    valuePlaceholder: \"Søg\",\r\n  },\r\n  date: {\r\n    ...AntdConfig.widgets.date,\r\n    dateFormat: \"DD/MM/YYYY\",\r\n    valueFormat: \"YYYY-MM-DD\",\r\n    valuePlaceholder: \"Dato (dd/mm/yyyy)\",\r\n  },\r\n  func: {\r\n    ...AntdConfig.widgets.func,\r\n    customProps: {\r\n      showSearch: false,\r\n    },\r\n  },\r\n  treemultiselect: {\r\n    ...AntdConfig.widgets.treemultiselect,\r\n    valuePlaceholder: \"Vælg\",\r\n    customProps: {\r\n      showSearch: false,\r\n    },\r\n  },\r\n  treeselect: {\r\n    ...AntdConfig.widgets.treeselect,\r\n    valuePlaceholder: \"Vælg\",\r\n  },\r\n  select: {\r\n    ...AntdConfig.widgets.select,\r\n    valuePlaceholder: \"Vælg\",\r\n    customProps: {\r\n      showSearch: true,\r\n    },\r\n  },\r\n};\r\n\r\nconst types: Types = {\r\n  ...AntdConfig.types,\r\n  // examples of  overriding\r\n  boolean: merge(AntdConfig.types.boolean, {\r\n    widgets: {\r\n      boolean: {\r\n        widgetProps: {\r\n          hideOperator: true,\r\n          operatorInlineLabel: \"is\",\r\n        },\r\n      },\r\n    },\r\n  }),\r\n};\r\n\r\nconst localeSettings: LocaleSettings = {\r\n  locale: {\r\n    // short: \"da\",\r\n    // full: \"da_DK\",\r\n    antd: da_DK,\r\n  },\r\n  valueLabel: \"Værdi\",\r\n  valuePlaceholder: \"Værdi\",\r\n  fieldLabel: \"Felt\",\r\n  operatorLabel: \"Operator\",\r\n  funcLabel: \"Funktion\",\r\n  fieldPlaceholder: \"Vælg felt\",\r\n  funcPlaceholder: \"Vælg funktion\",\r\n  operatorPlaceholder: \"\",\r\n  deleteLabel: undefined,\r\n  addGroupLabel: \"Tilføj gruppe\",\r\n  addRuleLabel: \"Tilføj regel\",\r\n  delGroupLabel: undefined,\r\n  notLabel: \"Not\",\r\n  valueSourcesPopupTitle: \"Select value source\",\r\n};\r\n\r\nconst settings: Settings = {\r\n  ...AntdConfig.settings,\r\n  ...localeSettings,\r\n\r\n  valueSourcesInfo: {\r\n    value: {\r\n      label: \"Value\",\r\n    },\r\n    field: {\r\n      label: \"Field\",\r\n      widget: \"field\",\r\n    },\r\n    func: {\r\n      label: \"Function\",\r\n      widget: \"func\",\r\n    },\r\n  },\r\n  canRegroup: true,\r\n  maxNesting: 3,\r\n  canLeaveEmptyGroup: true,\r\n\r\n  customFieldSelectProps: {\r\n    showSearch: true,\r\n  },\r\n};\r\n\r\n//////////////////////////////////////////////////////////////////////\r\n\r\nconst fields: Fields = {\r\n  accessionsNummer: {\r\n    label: \"Accessionsnummer\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    operators: [\"equal\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\", \"like\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: A20190105229\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  administrerendeMyndighed: {\r\n    label: \"Administrerende myndighed\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: Ankestyrelsen\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  publiceringsmedieId: {\r\n    label: \"Bekendtgørelsesmedie\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      10: \"Lovtidende A\",\r\n      20: \"Lovtidende B\",\r\n      30: \"Lovtidende C\",\r\n      40: \"Ministerialtidende\",\r\n      50: \"Retsinformation\",\r\n    },\r\n    widgets: {\r\n      select: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Vælg\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  docId: {\r\n    label: \"DocID\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    operators: [\"equal\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\", \"like\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: AN012892\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  dokumentTypeId: {\r\n    type: \"treeselect\",\r\n    label: \"Dokumenttype\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    fieldSettings: {\r\n      treeExpandAll: true,\r\n      listValues: [],\r\n    },\r\n  },\r\n  underskriftDato: {\r\n    label: \"Dato for underskrift\",\r\n    type: \"date\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n  },\r\n  publiceretTidspunkt: {\r\n    label: \"Dato for førstegangsindlæggelse\",\r\n    type: \"date\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n  },\r\n  sidstPubliceretTidspunkt: {\r\n    label: \"Dato for seneste indlæggelse\",\r\n    type: \"date\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n  },\r\n  offentliggoerelsesDato: {\r\n    label: \"Offentliggørelsesdato\",\r\n    type: \"date\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n  },\r\n  fobEmneordIder: {\r\n    label: \"Emneord\",\r\n    type: \"treemultiselect\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"multiselect_equals\",\r\n    excludeOperators: [\"multiselect_not_equals\"],\r\n    fieldSettings: {\r\n      treeExpandAll: false,\r\n      allowCustomValues: true,\r\n      listValues: [],\r\n    },\r\n  },\r\n  dokumentCelex_celexNummer: {\r\n    label: \"EU celex nummer\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"proximity\", \"like\", \"is_empty\", \"is_not_empty\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: 31971L0118\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  dokumentCelex_celexType: {\r\n    label: \"EU type\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      10: \"Implementering\",\r\n      20: \"Reference\",\r\n    },\r\n  },\r\n  dokumentCelex_sektor: {\r\n    label: \"EU dokument sektor\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      0: \"0 Konsoliderede retsakter\",\r\n      1: \"1 Traktater\",\r\n      2: \"2 Internationale aftaler\",\r\n      3: \"3 Lovgivning\",\r\n      4: \"4 Supplerende lovgivning\",\r\n      5: \"5 Forberedende retsakter og arbejdsdokumenter\",\r\n      6: \"6 Retspraksis\",\r\n      7: \"7 Nationale gennemførelsesforanstaltninger\",\r\n      8: \"8 Henvisninger til national retspraksis, der vedrører EU-lovgivningen\",\r\n      9: \"9 Forespørgsler fra Parlamentet\",\r\n      C: \"C Andre dokumenter offentliggjort i C-udgaven af EU-Tidende\",\r\n      E: \"E EFTA-dokumenter\",\r\n    },\r\n  },\r\n  dokumentCelex_aar: {\r\n    label: \"EU dokument år\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"proximity\", \"like\", \"is_empty\", \"is_not_empty\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: 2006\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  dokumentCelex_dokType: {\r\n    label: \"EU dokument type\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      L: \"L – Direktiver\",\r\n      R: \"R – Forordninger\",\r\n      D: \"D – Afgørelser\",\r\n    },\r\n  },\r\n  dokumentCelex_dokNummer: {\r\n    label: \"EU dokument nummer\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"like\", \"proximity\", \"is_empty\", \"is_not_empty\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: 2394\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  publiceringsNummer: {\r\n    label: \"Forskriftens nummer\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"proximity\", \"is_empty\", \"is_not_empty\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: 24\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  content: {\r\n    label: \"Forskriftens fulde tekst\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"is_empty\", \"is_not_empty\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Fritekst søgning\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  folketingssamling: {\r\n    label: \"Folketingssamling\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"like\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks 1\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  geografiskDaekningId: {\r\n    label: \"Geografisk dækning\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      0: \"Fremgår af forskriften\",\r\n      10: \"Kun Færøerne\",\r\n      20: \"Kun Grønland\",\r\n      30: \"Kun Grønland og Færøerne\",\r\n    },\r\n  },\r\n  hjemmelVedroerer: {\r\n    label: \"Hjemmel/vedrører reference\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"like\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: A19220014930\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  historiskDato: {\r\n    label: \"Historisk dato\",\r\n    type: \"date\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n  },\r\n  ressortId: {\r\n    label: \"Ministerium\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: [],\r\n  },\r\n  fobRessortIds: {\r\n    label: \"Myndighed (FOB)\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: [],\r\n  },\r\n  officielNote: {\r\n    label: \"Noter - officielle\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Fritekst søgning\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  redaktionelNote: {\r\n    label: \"Noter - redaktionelle\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Fritekst søgning\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  omtryksNote: {\r\n    label: \"Noter - omtryk\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Fritekst søgning\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  alternativeMedierNote: {\r\n    label: \"Noter - andre medier\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Fritekst søgning\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  populaerTitel: {\r\n    label: \"Populærtitel\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: Rottevejledningen\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  rank: {\r\n    label: \"Rank\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: [\r\n      { value: \"A\", title: \"A\" },\r\n      { value: \"B\", title: \"B\" },\r\n      { value: \"C\", title: \"C\" },\r\n      { value: \"G\", title: \"G\" },\r\n      { value: \"L\", title: \"L\" },\r\n    ],\r\n  },\r\n  journalNummer: {\r\n    label: \"Ressortministeriets journalnummer\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n  },\r\n  resume: {\r\n    label: \"Resume\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"Fritekst søgning\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  anvendtRetsforskrift: {\r\n    label: \"Retsforskrift\",\r\n    type: \"treemultiselect\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"multiselect_equals\",\r\n    excludeOperators: [\"multiselect_not_equals\"],\r\n    fieldSettings: {\r\n      treeExpandAll: true,\r\n      allowCustomValues: true,\r\n      listValues: [],\r\n    },\r\n  },\r\n  senereAendringerAccn: {\r\n    label: \"Senere ændringer reference\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"like\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: A20190105229\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  erHistoriskFlag: {\r\n    label: \"Status\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      false: \"Gældende\",\r\n      true: \"Historisk\",\r\n    },\r\n  },\r\n  fremtidigHistoriskDato: {\r\n    label: \"Sunset dato\",\r\n    type: \"date\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n  },\r\n  anfoerINote: {\r\n    label: \"Sætter i kraft\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: ACCN på den forskrift der sætter en anden forskrift i kraft\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  retsinfoklassifikationId: {\r\n    label: \"Søgeområde\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: {\r\n      SortIndicator_10_40: \"Regler\", // Store vejledninger(40) is added to Regler. This will result in the same seach as the search page with documenttype \"Skatteministeriets store vejledninger\"\r\n      SortIndicator_20: \"Afgørelser\",\r\n      SortIndicator_50_60: \"Lov- og beslutningsforslag mv.\",\r\n      SortIndicator_30: \"Folketingets Ombudsmands beretningssager\",\r\n    },\r\n  },\r\n  titel: {\r\n    label: \"Titel\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"like\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"equal\", \"proximity\", \"is_empty\", \"is_not_empty\", \"ends_with\"],\r\n  },\r\n  tiltraederFra: {\r\n    label: \"Tiltræder reference\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"like\", \"proximity\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: L19970011964\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  undtagetFraOffentliggoerelse: {\r\n    label: \"Undtaget fra offentliggørelse\",\r\n    type: \"text\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\"not_like\", \"not_equal\", \"proximity\", \"like\", \"starts_with\", \"ends_with\"],\r\n    widgets: {\r\n      text: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: B20120042505\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  aar: {\r\n    label: \"År for udstedelse\",\r\n    type: \"number\",\r\n    valueSources: [\"value\"],\r\n    defaultOperator: \"equal\",\r\n    excludeOperators: [\r\n      \"not_like\",\r\n      \"not_equal\",\r\n      \"proximity\",\r\n      \"greater_or_equal\",\r\n      \"less_or_equal\",\r\n      \"not_between\",\r\n      \"range_between\",\r\n      \"range_not_between\",\r\n      \"between\",\r\n      \"is_empty\",\r\n      \"is_not_empty\",\r\n    ],\r\n    widgets: {\r\n      number: {\r\n        widgetProps: {\r\n          valuePlaceholder: \"F.eks: 2016\",\r\n        },\r\n      },\r\n    },\r\n  },\r\n  styreDokumentStatusId: {\r\n    label: \"Sagsforløbets status\",\r\n    type: \"select\",\r\n    valueSources: [\"value\"],\r\n    excludeOperators: [\"select_any_in\", \"select_not_any_in\", \"select_not_equals\"],\r\n    defaultOperator: \"select_equals\",\r\n    listValues: [],\r\n  },\r\n};\r\n\r\n//////////////////////////////////////////////////////////////////////\r\n\r\nconst funcs: Funcs = {\r\n  LOWER: {\r\n    label: \"Lowercase\",\r\n    mongoFunc: \"$toLower\",\r\n    jsonLogic: \"toLowerCase\",\r\n    jsonLogicIsMethod: true,\r\n    returnType: \"text\",\r\n    args: {\r\n      str: {\r\n        label: \"String\",\r\n        type: \"text\",\r\n        valueSources: [\"value\", \"field\"],\r\n      },\r\n    },\r\n  },\r\n  LINEAR_REGRESSION: {\r\n    label: \"Linear regression\",\r\n    returnType: \"number\",\r\n    formatFunc: ({ coef, bias, val }) => `(${coef} * ${val} + ${bias})`,\r\n    sqlFormatFunc: ({ coef, bias, val }) => `(${coef} * ${val} + ${bias})`,\r\n    mongoFormatFunc: ({ coef, bias, val }) => ({ $sum: [{ $multiply: [coef, val] }, bias] }),\r\n    jsonLogic: ({ coef, bias, val }) => ({ \"+\": [{ \"*\": [coef, val] }, bias] }),\r\n    renderBrackets: [\"\", \"\"],\r\n    renderSeps: [\" * \", \" + \"],\r\n    args: {\r\n      coef: {\r\n        label: \"Coef\",\r\n        type: \"number\",\r\n        defaultValue: 1,\r\n        valueSources: [\"value\"],\r\n      },\r\n      val: {\r\n        label: \"Value\",\r\n        type: \"number\",\r\n        valueSources: [\"value\"],\r\n      },\r\n      bias: {\r\n        label: \"Bias\",\r\n        type: \"number\",\r\n        defaultValue: 0,\r\n        valueSources: [\"value\"],\r\n      },\r\n    },\r\n  },\r\n};\r\n\r\nconst config: Config = {\r\n  conjunctions,\r\n  operators,\r\n  widgets,\r\n  types,\r\n  settings,\r\n  fields,\r\n  funcs,\r\n};\r\n\r\nexport function getConfig() {\r\n  return config;\r\n}\r\n\r\nexport const setDocumentTypeValues = (listValues: TreeItem[], config: Config) => setTreeSelectValues(\"dokumentTypeId\", listValues, config);\r\nexport const setRessortIdValues = (listValues: ListItem[], config: Config) => setSelectValues(\"ressortId\", listValues, config);\r\nexport const setFobRessortIdValues = (listValues: ListItem[], config: Config) => setSelectValues(\"fobRessortIds\", listValues, config);\r\nexport const setRetsforskriftIdValues = (treeValuesString: string, config: Config) =>\r\n  setTreeSelectValues(\"anvendtRetsforskrift\", JSON.parse(treeValuesString) as TreeItem[], config);\r\nexport const setfobEmneordIder = (treeValuesString: string, config: Config) =>\r\n  setTreeSelectValues(\"fobEmneordIder\", JSON.parse(treeValuesString) as TreeItem[], config);\r\nexport const setStyreDokumentStatusIdValues = (listValues: ListItem[], config: Config) => setSelectValues(\"styreDokumentStatusId\", listValues, config);\r\n\r\nfunction setTreeSelectValues(fieldName: string, listValues: TreeItem[], config: Config) {\r\n  const field = config.fields[fieldName] as Field;\r\n  const settings = field.fieldSettings as TreeSelectFieldSettings;\r\n  settings.listValues = listValues;\r\n}\r\n\r\nfunction setSelectValues(fieldName: string, listValues: ListItem[], config: Config) {\r\n  const field = config.fields[fieldName] as Field;\r\n  const settings = field.fieldSettings as SelectFieldSettings;\r\n  settings.listValues = listValues;\r\n}\r\n","export default {\r\n  type: \"group\",\r\n  id: \"0985DB6C-9E5B-430F-9BA6-DEAAD7CD0091\",\r\n  children1: {\r\n    \"55434E1C-8DD2-4C46-9082-813902814890\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: null,\r\n        operator: null,\r\n        value: [],\r\n        valueSrc: [],\r\n        operatorOptions: null,\r\n      },\r\n    },\r\n  },\r\n  properties: {\r\n    conjunction: \"AND\",\r\n  },\r\n};\r\n","export default {\r\n  type: \"group\",\r\n  id: \"ab889989-0123-4456-b89a-b16f139daa93\",\r\n  children1: {\r\n    \"b8b9b9a9-cdef-4012-b456-716f139daa93\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"retsinfoklassifikationId\",\r\n        operator: \"select_equals\",\r\n        value: [\"SortIndicator_10_40\"],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"aaba9aa8-cdef-4012-b456-716fc3780da3\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"dokumentTypeId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"9bba98ba-cdef-4012-b456-716fc37a4f30\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"erHistoriskFlag\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"989ab88b-89ab-4cde-b012-316fc37a6bcd\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"geografiskDaekningId\",\r\n        operator: \"select_equals\",\r\n        value: [\"0\"],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"ab8888ba-cdef-4012-b456-716fc37bd3db\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"publiceringsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"8b88a88b-89ab-4cde-b012-316fc37bede0\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"aar\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"number\"],\r\n      },\r\n    },\r\n    \"9a9aaaab-4567-489a-bcde-f16fc37bfd57\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"underskriftDato\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"date\"],\r\n      },\r\n    },\r\n    \"9889baab-0123-4456-b89a-b16fc37c196c\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"publiceringsmedieId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"a9bab9bb-cdef-4012-b456-716fc37c5085\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"titel\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"8ab8a99b-89ab-4cde-b012-316fc37c7619\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"populaerTitel\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"b88baa9b-4567-489a-bcde-f16fc37cb407\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"ressortId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"ab8a989b-0123-4456-b89a-b16fc37cd61e\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"administrerendeMyndighed\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"89b9ba8b-cdef-4012-b456-716fc37d0800\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"journalNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"989aa8aa-89ab-4cde-b012-316fc37d381d\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"content\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"a8ba88bb-4567-489a-bcde-f16fc37d7e41\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"officielNote\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"89b9a899-0123-4456-b89a-b16fc37d9add\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"redaktionelNote\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"899a8ab9-cdef-4012-b456-716fc37e0360\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"accessionsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"aaabaaa9-89ab-4cde-b012-316fc37e2d26\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"docId\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n  },\r\n  properties: {\r\n    conjunction: \"AND\",\r\n  },\r\n};\r\n","export default {\r\n  type: \"group\",\r\n  id: \"ab889989-0123-4456-b89a-b16f139daa93\",\r\n  children1: {\r\n    \"b8b9b9a9-cdef-4012-b456-716f139daa93\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"retsinfoklassifikationId\",\r\n        operator: \"select_equals\",\r\n        value: [\"SortIndicator_30\"],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"98a9988b-cdef-4012-b456-716fc7103dc1\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"accessionsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"88aba9b9-89ab-4cde-b012-316fc7107b9f\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"docId\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"9b9a8899-4567-489a-bcde-f16fc710a80d\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"dokumentTypeId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"888ab99b-0123-4456-b89a-b16fc710c87f\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"publiceringsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"b8bababa-cdef-4012-b456-716fc710db3e\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"aar\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"number\"],\r\n      },\r\n    },\r\n    \"89baa8ba-89ab-4cde-b012-316fc710f755\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"titel\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"899a9a9b-4567-489a-bcde-f16fc7111a63\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"fobRessortIds\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"8aa8a9b8-cdef-4012-b456-716febed96b0\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"anvendtRetsforskrift\",\r\n        operator: \"multiselect_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"treemultiselect\"],\r\n      },\r\n    },\r\n    \"b888ab88-cdef-4012-b456-716febeefed1\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"fobEmneordIder\",\r\n        operator: \"multiselect_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"treemultiselect\"],\r\n      },\r\n    },\r\n    \"99aaabba-0123-4456-b89a-b16fc715c5cc\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"resume\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"98aaabba-0123-4456-b89a-b16fc713c2cc\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"content\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"89b9ba8b-cdef-4012-b456-716fc37d0800\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"journalNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"9a9aaaab-4567-489a-bcde-f16fc37bfd57\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"underskriftDato\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"date\"],\r\n      },\r\n    },\r\n  },\r\n  properties: {\r\n    conjunction: \"AND\",\r\n  },\r\n};\r\n","export default {\r\n  id: \"b9ba998b-0123-4456-b89a-b16fc7239a36\",\r\n  type: \"group\",\r\n  children1: {\r\n    \"b8b9b9a9-cdef-4012-b456-716f139daa93\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"retsinfoklassifikationId\",\r\n        operator: \"select_equals\",\r\n        value: [\"SortIndicator_20\"],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"a8aba999-89ab-4cde-b012-316fc725687b\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"dokumentTypeId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"b989ba8a-89ab-4cde-b012-316fc725e9d2\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"underskriftDato\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"date\"],\r\n      },\r\n    },\r\n    \"a999b98a-cdef-4012-b456-716fc725d6a9\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"aar\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"number\"],\r\n      },\r\n    },\r\n    \"9a8ba98b-0123-4456-b89a-b16fc725bd21\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"publiceringsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"99b9a8aa-4567-489a-bcde-f16fc72592c5\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"erHistoriskFlag\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"9b9a9898-4567-489a-bcde-f16fc7260a10\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"publiceringsmedieId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"a9989889-89ab-4cde-b012-316fc7264700\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"titel\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"8b89bb8b-cdef-4012-b456-716fc7263409\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"ressortId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"a88bb899-4567-489a-bcde-f16fc7266560\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"administrerendeMyndighed\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"b9ba98ba-0123-4456-b89a-b16fc726d82d\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"resume\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"a8b9888a-cdef-4012-b456-716fc726f69f\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"journalNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"a8aabaaa-89ab-4cde-b012-316fc7271c74\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"content\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"8baba9ba-4567-489a-bcde-f16fc72767c6\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"redaktionelNote\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"9baab9b9-0123-4456-b89a-b16fc727ad63\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"accessionsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"8a9b9bba-cdef-4012-b456-716fc727db50\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"docId\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n  },\r\n  properties: {\r\n    conjunction: \"AND\",\r\n  },\r\n};\r\n","export default {\r\n  id: \"ab9b8a9b-0123-4456-b89a-b16fc7295664\",\r\n  type: \"group\",\r\n  children1: {\r\n    \"89b8b9b8-cdef-4012-b456-716fc72a352d\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"retsinfoklassifikationId\",\r\n        operator: \"select_equals\",\r\n        value: [\"SortIndicator_40\"],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"9b99a99b-89ab-4cde-b012-316fc72a5cda\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"accessionsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"b8aa98bb-4567-489a-bcde-f16fc72a8d41\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"docId\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"b98aa9a9-0123-4456-b89a-b16fc72aaea6\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"aar\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"number\"],\r\n      },\r\n    },\r\n    \"9b88aa88-cdef-4012-b456-716fc72aed49\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"titel\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"8b98a988-89ab-4cde-b012-316fc72afc36\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"content\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n  },\r\n  properties: {\r\n    conjunction: \"AND\",\r\n  },\r\n};\r\n","export default {\r\n  id: \"aabb8bb8-0123-4456-b89a-b16fc72c0673\",\r\n  type: \"group\",\r\n  children1: {\r\n    \"a9b9a988-cdef-4012-b456-716fc731f2d2\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"retsinfoklassifikationId\",\r\n        operator: \"select_equals\",\r\n        value: [\"SortIndicator_50_60\"],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"bba998aa-89ab-4cde-b012-316fc7323754\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"dokumentTypeId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"898888b8-0123-4456-b89a-b16fc7327575\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"publiceringsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"baa8898b-89ab-4cde-b012-316fc7330d3c\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"aar\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"number\"],\r\n      },\r\n    },\r\n    \"b88babbb-0123-4456-b89a-b16fc73341d9\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"folketingssamling\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"a9b99888-89ab-4cde-b012-316fc7338401\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"titel\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"bb8889a9-4567-489a-bcde-f16fc7331ac3\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"ressortId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n    \"8a9a8b89-4567-489a-bcde-f16fc73442ad\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"content\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"a9b8b9bb-0123-4456-b89a-b16fc73445c4\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"officielNote\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"aaabb88b-cdef-4012-b456-716fc7344b9c\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"redaktionelNote\",\r\n        operator: \"like\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"889b8b89-89ab-4cde-b012-316fc7360f9b\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"accessionsNummer\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"aa9b8a9a-4567-489a-bcde-f16fc736143e\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"docId\",\r\n        operator: \"equal\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"text\"],\r\n      },\r\n    },\r\n    \"5e7fa445-e379-4d8c-a55c-4ff59095df46\": {\r\n      type: \"rule\",\r\n      properties: {\r\n        field: \"styreDokumentStatusId\",\r\n        operator: \"select_equals\",\r\n        value: [null],\r\n        valueSrc: [\"value\"],\r\n        valueType: [\"select\"],\r\n      },\r\n    },\r\n  },\r\n  properties: {\r\n    conjunction: \"AND\",\r\n  },\r\n};\r\n","import { IDocumentClassification } from \"../../models/IDocumentClassification\";\r\nimport { RetsinfoKlassifikation } from \"./RetsinfoKlassifikation\";\r\nimport { IDocumentType } from \"../../models/IDocumentType\";\r\nimport { IRessort } from \"../../models/IRessort\";\r\nimport { ICaseHistoryStatus } from \"../../models/ICaseHistoryStatus\";\r\nimport { ListItem, JsonTree, Utils, Config, TreeItem } from \"react-awesome-query-builder\";\r\nimport {\r\n  setDocumentTypeValues,\r\n  setRetsforskriftIdValues,\r\n  setRessortIdValues,\r\n  setFobRessortIdValues,\r\n  setfobEmneordIder,\r\n  setStyreDokumentStatusIdValues,\r\n} from \"./config\";\r\nimport { IExtremeSearchContainerProps } from \"./ExtremeSearchContainer\";\r\nimport template01 from \"./templates/01\";\r\nimport template02 from \"./templates/02\";\r\nimport template03 from \"./templates/03\";\r\nimport template04 from \"./templates/04\";\r\nimport template05 from \"./templates/05\";\r\nimport template06 from \"./templates/06\";\r\nconst { uuid } = Utils;\r\nconst emptyInitValue: JsonTree = { id: uuid(), type: \"group\" };\r\nconst SortHack = \"SortIndicator_\";\r\nconst PageClass = \"extreme-search-container\";\r\n\r\nexport function getDocumentClassificationList(documentClassifications: IDocumentClassification[], filterValue: RetsinfoKlassifikation): TreeItem[] {\r\n  const filterDocumentType: IDocumentType[] = [];\r\n  const returnList: TreeItem[] = [];\r\n\r\n  if (filterValue === RetsinfoKlassifikation.ALL) {\r\n    documentClassifications.map((documentClassification: IDocumentClassification) => {\r\n      return documentClassification.documentTypes\r\n        .sort(x => x.sorteringsId)\r\n        .map((documentType: IDocumentType) => {\r\n          return filterDocumentType.push(documentType);\r\n        });\r\n    });\r\n  } else {\r\n    documentClassifications\r\n      .filter(x => x.ids === filterValue)\r\n      .map((documentClassification: IDocumentClassification) => {\r\n        const documentTypesSorted = documentClassification.documentTypes.sort(x => x.sorteringsId);\r\n        return documentTypesSorted.map((documentType: IDocumentType) => {\r\n          return filterDocumentType.push(documentType);\r\n        });\r\n      });\r\n  }\r\n\r\n  // SortHack is added, to fix sorting and must be removed on backend\r\n  filterDocumentType.map((documentType: IDocumentType) => {\r\n    return returnList.push({ value: SortHack + documentType.documentTypeId, title: documentType.name });\r\n  });\r\n\r\n  return returnList;\r\n}\r\n\r\nexport function getGroupedDocumentTypesList(documentClassifications: IDocumentClassification[], filterValue: RetsinfoKlassifikation): TreeItem[] {\r\n  const returnList: TreeItem[] = [];\r\n\r\n  let lastClassification: any;\r\n\r\n  if (filterValue === RetsinfoKlassifikation.ALL) {\r\n    documentClassifications.map((classification: IDocumentClassification) => {\r\n      return classification.documentTypes.map(documentType => {\r\n        if (!lastClassification || lastClassification.title !== documentType.documentClassificationName) {\r\n          lastClassification = {\r\n            value: returnList.length,\r\n            title: documentType.documentClassificationName,\r\n          };\r\n          returnList.push(lastClassification);\r\n        }\r\n\r\n        return returnList.push({\r\n          value: documentType.documentTypeId,\r\n          title: documentType.name,\r\n          parent: lastClassification.value,\r\n        });\r\n      });\r\n    });\r\n    return returnList;\r\n  } else {\r\n    documentClassifications\r\n      .filter(x => filterValue === x.ids)\r\n      .map((classification: IDocumentClassification) => {\r\n        return classification.documentTypes.map(documentType => {\r\n          if (!lastClassification || lastClassification.title !== documentType.documentClassificationName) {\r\n            lastClassification = {\r\n              value: returnList.length,\r\n              title: documentType.documentClassificationName,\r\n            };\r\n            returnList.push(lastClassification);\r\n          }\r\n\r\n          return returnList.push({\r\n            value: documentType.documentTypeId,\r\n            title: documentType.name,\r\n            parent: lastClassification.value,\r\n          });\r\n        });\r\n      });\r\n    return returnList;\r\n  }\r\n}\r\n\r\nexport function mapRessortListToObject(documentClassifications: IRessort[]): ListItem[] {\r\n  const returnList: ListItem[] = [];\r\n\r\n  documentClassifications.map((ressort: IRessort) => {\r\n    return returnList.push({ value: SortHack + ressort.id, title: ressort.name });\r\n  });\r\n\r\n  return returnList;\r\n}\r\n\r\nfunction caseHistoryToListItem(s: ICaseHistoryStatus): ListItem {\r\n  return { value: s.id.toString(), title: s.name };\r\n}\r\n\r\nexport function setExtremeSearchConfig(templateId: number, props: IExtremeSearchContainerProps, config: Config) {\r\n  switch (templateId) {\r\n    case 2: {\r\n      setDocumentTypeValues(getDocumentClassificationList(props.documentClassifications!, RetsinfoKlassifikation.REGLER), config);\r\n      break;\r\n    }\r\n    case 3: {\r\n      setDocumentTypeValues(getDocumentClassificationList(props.documentClassifications!, RetsinfoKlassifikation.FOLKETINGETSOMBUDSMAND), config);\r\n      break;\r\n    }\r\n    case 4: {\r\n      setDocumentTypeValues(getDocumentClassificationList(props.documentClassifications!, RetsinfoKlassifikation.AFGOERELSER), config);\r\n      break;\r\n    }\r\n    case 6: {\r\n      setDocumentTypeValues(getGroupedDocumentTypesList(props.documentClassifications!, RetsinfoKlassifikation.LOVOGBESLUTNINGSFORSLAG), config);\r\n      break;\r\n    }\r\n    default: {\r\n      setDocumentTypeValues(getDocumentClassificationList(props.documentClassifications!, RetsinfoKlassifikation.ALL), config);\r\n    }\r\n  }\r\n\r\n  // Always\r\n  setfobEmneordIder(props.tags, config);\r\n  setRessortIdValues(mapRessortListToObject(props.ressorter!), config);\r\n  setFobRessortIdValues(mapRessortListToObject(props.fobRessorter!), config);\r\n  setRetsforskriftIdValues(props.lawRegisters, config);\r\n  setStyreDokumentStatusIdValues(props.caseHistoryStatus.map(caseHistoryToListItem), config);\r\n}\r\n\r\nexport function getTemplate(templateId?: number): any {\r\n  switch (templateId) {\r\n    case 2: {\r\n      return template02;\r\n    }\r\n    case 3: {\r\n      return template03;\r\n    }\r\n    case 4: {\r\n      return template04;\r\n    }\r\n    case 5: {\r\n      return template05;\r\n    }\r\n    case 6: {\r\n      return template06;\r\n    }\r\n    default: {\r\n      return template01;\r\n    }\r\n  }\r\n}\r\n\r\nexport function createJsonTree(treeObject: object): JsonTree {\r\n  return treeObject && Object.keys(treeObject).length > 0 ? (treeObject as JsonTree) : emptyInitValue;\r\n}\r\n\r\nexport function isDataLoaded(props: IExtremeSearchContainerProps, dataLoaded: boolean): boolean {\r\n  return (\r\n    props.documentClassifications.length > 0 &&\r\n    props.ressorter.length > 0 &&\r\n    props.fobRessorter.length > 0 &&\r\n    props.tags !== undefined &&\r\n    props.tags.length > 0 &&\r\n    props.lawRegisters.length > 0 &&\r\n    dataLoaded === false\r\n  );\r\n}\r\n\r\nexport function handleWcagIssues(classSelector: string, ariaLabel: string) {\r\n  const matchingElements = document.getElementsByClassName(classSelector);\r\n  for (let i = 0; i < matchingElements.length; i++) {\r\n    const inputElement = matchingElements[i] as HTMLInputElement;\r\n    inputElement.setAttribute(\"aria-label\", ariaLabel);\r\n  }\r\n}\r\n\r\nexport function addPageClassToElement(classSelector1: string, classSelector2: string) {\r\n  const matchingElements = document.getElementsByClassName(classSelector1);\r\n  for (let i = 0; i < matchingElements.length; i++) {\r\n    const inputElement = matchingElements[i] as HTMLElement;\r\n    if (inputElement.classList.contains(classSelector2) && !inputElement.classList.contains(PageClass)) {\r\n      const parent = inputElement.parentNode as HTMLElement;\r\n      parent.classList.add(PageClass);\r\n    }\r\n  }\r\n}\r\nexport function isClientBrowserSupported(): boolean {\r\n  const ua = navigator.userAgent;\r\n  if (ua.indexOf(\"Edge/\") !== -1) return false; // Old Edge version\r\n\r\n  if (ua.indexOf(\"Chrome\") !== -1) return true; // Also new Edge version\r\n  if (ua.indexOf(\"Firefox\") !== -1) return true;\r\n  if (ua.indexOf(\"Safari\") !== -1) return true;\r\n\r\n  return false;\r\n}\r\n","import * as React from \"react\";\r\nimport { Spinner } from \"reactstrap\";\r\nimport { apiPOST } from \"../../store/api\";\r\nimport FileSaver from \"file-saver\";\r\nimport { IconButton, IconType } from \"@lexdania/components\";\r\nimport { IQueryBuilderSearchParameters } from \"../../models/IQueryBuilderSearchParameters\";\r\nimport { CsvSizeWarningDialog } from \"./CsvSizeWarningDialog\";\r\n\r\nexport interface ICsvExportBtnProps {\r\n  model: IQueryBuilderSearchParameters;\r\n  warnWhenDownloadingResult: boolean;\r\n}\r\n\r\ninterface ICsvExportBtnState {\r\n  isFetchingData: boolean;\r\n  isWarningDialogOpen: boolean;\r\n}\r\n\r\nexport class CsvExportBtn extends React.Component<ICsvExportBtnProps, ICsvExportBtnState> {\r\n  constructor(props: ICsvExportBtnProps) {\r\n    super(props);\r\n    this.state = { isFetchingData: false, isWarningDialogOpen: false };\r\n  }\r\n\r\n  render() {\r\n    const isFetchingData = this.state.isFetchingData;\r\n\r\n    if (isFetchingData) {\r\n      return (\r\n        <IconButton icon={IconType.FileExport} className=\"mb-1 ml-2 mr-1 action-btn\" disabled={true}>\r\n          <span className=\"mb-1 ml-2 mr-1 action-btn\">\r\n            <Spinner as=\"span\" animation=\"border\" size=\"sm\" role=\"status\" aria-hidden=\"true\" />\r\n            Eksporterer...\r\n          </span>\r\n        </IconButton>\r\n      );\r\n    } else {\r\n      return (\r\n        <>\r\n          <CsvSizeWarningDialog\r\n            isModalOpen={this.state.isWarningDialogOpen}\r\n            dismissed={() => this.setState({ isWarningDialogOpen: false })}\r\n            confirmed={async () => await this.exportSearch(this.props.model)}\r\n          ></CsvSizeWarningDialog>\r\n          <IconButton className=\"mb-1 ml-2 mr-1 action-btn\" icon={IconType.FileExport} onClick={() => this.beginExport()}>\r\n            Eksportér søgeresultat\r\n          </IconButton>\r\n        </>\r\n      );\r\n    }\r\n  }\r\n\r\n  private async beginExport() {\r\n    if (this.props.warnWhenDownloadingResult) {\r\n      this.setState({ isWarningDialogOpen: true });\r\n    } else {\r\n      await this.exportSearch(this.props.model);\r\n    }\r\n  }\r\n\r\n  private async exportSearch(model: IQueryBuilderSearchParameters) {\r\n    this.setState({ isFetchingData: true, isWarningDialogOpen: false });\r\n    const result = await apiPOST<string>(\"api/extremesearch/csv\", model, { responseType: \"blob\" });\r\n    FileSaver.saveAs(result, \"Resultat.csv\");\r\n    this.setState({ isFetchingData: false });\r\n  }\r\n}\r\n","import * as React from \"react\";\r\nimport {\r\n  Query,\r\n  Builder,\r\n  Utils,\r\n  //types:\r\n  ImmutableTree,\r\n  Config,\r\n  BuilderProps,\r\n  JsonTree,\r\n} from \"react-awesome-query-builder\";\r\nimport \"./AntdImport.scss\";\r\nimport \"./ExtremeSearchContainer.scss\";\r\nimport throttle from \"lodash/throttle\";\r\nimport { connect } from \"react-redux\";\r\nimport { apiPOST } from \"../../store/api\";\r\nimport { Row, Col, DropdownItem, UncontrolledDropdown, DropdownToggle, DropdownMenu } from \"reactstrap\";\r\nimport { IDocumentSearchResult } from \"../../models/IDocumentSearchResult\";\r\nimport { IQueryBuilderSearchParameters } from \"../../models/IQueryBuilderSearchParameters\";\r\nimport { Document } from \"../../components/document/Document\";\r\nimport { IOrderByValue, IconButton, IconType, PageSize, SearchResultView } from \"@lexdania/components\";\r\nimport { RouteComponentProps } from \"react-router\";\r\nimport { OrderByValues, Direction, OrderByKey } from \"../../models/DocumentOrderByValues\";\r\nimport { parse, stringify } from \"query-string\";\r\nimport { ISelectItem } from \"../../models/ISelectItem\";\r\nimport { DropDownMenu } from \"./DropDownMenu\";\r\nimport {\r\n  setExtremeSearchConfig,\r\n  getTemplate,\r\n  createJsonTree,\r\n  isDataLoaded,\r\n  handleWcagIssues,\r\n  addPageClassToElement,\r\n  isClientBrowserSupported,\r\n} from \"./ExtremeSearchHelper\";\r\nimport { IDocumentClassificationActions, DocumentClassificationActions } from \"../../store/documentClassification/documentClassificationReducer\";\r\nimport { IRessortActions, RessortActions } from \"../../store/ressorter/ressortReducer\";\r\nimport { IExtremeSearchActions, ExtremeSearchActions } from \"../../store/extremeSearch/extremeSearchReducer\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { AppState } from \"../../store\";\r\nimport { IDocumentClassification } from \"../../models/IDocumentClassification\";\r\nimport { IRessort } from \"../../models/IRessort\";\r\nimport { getConfig } from \"./config\";\r\nimport { IMaintenanceMessagesActions, MaintenanceMessagesActions } from \"../../store/maintenance/maintenanceMessagesReducer\";\r\nimport { ICaseHistoryStatus } from \"../../models/ICaseHistoryStatus\";\r\nimport { CsvExportBtn } from \"../../components/CsvExport/CsvExportBtn\";\r\nimport { GridViewDocument } from \"../../components/document/GridViewDocument\";\r\nimport { ISearchDocument } from \"../../models/ISearchDocument\";\r\n\r\nconst { checkTree, loadTree, getTree } = Utils;\r\n\r\ninterface IExtremeSearchParams {\r\n  activePage: number;\r\n  activePageSize: PageSize;\r\n  paramsQuery?: string;\r\n  selectedOrderByValue?: IOrderByValue;\r\n  isAscendingOrder?: boolean;\r\n}\r\n\r\ninterface IExtremeSearchParamsState extends IExtremeSearchParams {\r\n  tree: ImmutableTree;\r\n  config: any;\r\n  templateId: number;\r\n}\r\n\r\ninterface IExtremeSearchContainerState extends IExtremeSearchParamsState {\r\n  searchResult: IDocumentSearchResult;\r\n  dataLoaded: boolean;\r\n}\r\n\r\nconst defaultParams: IExtremeSearchParams = {\r\n  activePage: 0,\r\n  activePageSize: PageSize.Ten,\r\n  paramsQuery: undefined,\r\n  selectedOrderByValue: OrderByValues[2],\r\n  isAscendingOrder: OrderByValues[2].isDefaultDirectionAscending,\r\n};\r\n\r\nexport interface IExtremeSearchContainerProps\r\n  extends RouteComponentProps<any>,\r\n    IDocumentClassificationActions,\r\n    IRessortActions,\r\n    IExtremeSearchActions,\r\n    IMaintenanceMessagesActions {\r\n  documentClassifications: IDocumentClassification[];\r\n  ressorter: IRessort[];\r\n  fobRessorter: IRessort[];\r\n  tags: string;\r\n  lawRegisters: string;\r\n  caseHistoryStatus: ICaseHistoryStatus[];\r\n  paramsString: string;\r\n  isGridViewActive: boolean;\r\n}\r\n\r\nclass ExtremeSearchContainer extends React.Component<IExtremeSearchContainerProps, IExtremeSearchContainerState> {\r\n  private container: React.RefObject<HTMLDivElement>;\r\n\r\n  constructor(props: IExtremeSearchContainerProps) {\r\n    super(props);\r\n    this.doSearch = this.doSearch.bind(this);\r\n    this.doClear = this.doClear.bind(this);\r\n    this.fixAntInputIssues = this.fixAntInputIssues.bind(this);\r\n\r\n    this.container = React.createRef<HTMLDivElement>();\r\n\r\n    this.state = {\r\n      ...defaultParams,\r\n      searchResult: { pageCount: 0, documents: [], resultCount: 0, warnWhenExportingResult: false },\r\n      tree: this.CreateImmutableTree(undefined),\r\n      templateId: 1,\r\n      config: getConfig(),\r\n      dataLoaded: false,\r\n      paramsQuery: undefined,\r\n    };\r\n  }\r\n  async componentDidMount() {\r\n    document.title = \"Retsinformation | Avanceret søgning\";\r\n    this.props.getDocumentClassification();\r\n    this.props.getRessorter();\r\n    this.props.getFobRessorter();\r\n    this.props.getLawRegisters();\r\n    this.props.getFobTags();\r\n    this.props.getCaseHistoryStatus();\r\n\r\n    if (!isClientBrowserSupported()) {\r\n      this.props.browserIsNotSupported();\r\n    }\r\n\r\n    this.hideAntInput();\r\n    this.fixAntInputIssues();\r\n    this.startExtremeSearch();\r\n\r\n    // Parse and set state from url parameters\r\n    const newState = { ...defaultParams };\r\n    const querystring = this.props.location.search;\r\n    const params = parse(querystring);\r\n    if (params.q) {\r\n      const queryString = params.q.toString();\r\n      newState.paramsQuery = queryString;\r\n    }\r\n\r\n    if (params.p) {\r\n      newState.activePage = +params.p - 1;\r\n    }\r\n    if (params.ps) {\r\n      newState.activePageSize = +params.ps;\r\n    }\r\n\r\n    if (params.o) {\r\n      newState.selectedOrderByValue = OrderByValues.find(x => x.key.toString() === params.o);\r\n    }\r\n\r\n    if (params.d) {\r\n      newState.isAscendingOrder = params.d === \"false\";\r\n    }\r\n    this.setState(newState);\r\n\r\n    if (this.container && this.container.current) this.container.current.onkeyup = this.checkForEnterAndDoSearch;\r\n  }\r\n\r\n  componentDidUpdate(prev: IExtremeSearchContainerProps) {\r\n    if (this.state.activePageSize < PageSize.Twenty && this.props.isGridViewActive && !prev.isGridViewActive) {\r\n      this.setState({ activePageSize: PageSize.Twenty }, this.doSearch);\r\n    } else {\r\n      this.startExtremeSearch();\r\n      this.fixAntInputIssues();\r\n    }\r\n  }\r\n\r\n  componentWillUnmount() {\r\n    this.setState({ dataLoaded: false });\r\n\r\n    if (this.container && this.container.current) this.container.current.onkeyup = null;\r\n  }\r\n\r\n  public initFilters() {\r\n    if (this.state.paramsQuery) {\r\n      const tree = JSON.parse(this.state.paramsQuery);\r\n      const immutableTree = checkTree(loadTree(tree), this.state.config);\r\n      this.setState({ tree: immutableTree }, () => this.doSearch());\r\n    } else {\r\n      const jsonTree: JsonTree = createJsonTree(getTemplate(1));\r\n      const newTree = checkTree(loadTree(jsonTree), this.state.config);\r\n      this.setState({ tree: newTree, templateId: 1 }, () => this.doSearch());\r\n    }\r\n  }\r\n\r\n  renderBuilder = (props: BuilderProps) => (\r\n    <div className=\"query-builder-container\" style={{ padding: \"10px\" }}>\r\n      <div className=\"query-builder qb-lite\">\r\n        <Builder {...props} />\r\n      </div>\r\n    </div>\r\n  );\r\n\r\n  public render() {\r\n    const { searchResult, activePage, selectedOrderByValue, isAscendingOrder, tree, config, activePageSize } = this.state;\r\n\r\n    return (\r\n      <div>\r\n        <div className=\"extreme-search-container\" ref={this.container} onClick={this.fixAntInputIssues}>\r\n          <Row className=\"mb-5 mb-md-0\">\r\n            <Col>\r\n              <Row className=\"extreme-search-header align-items-md-center d-md-flex justify-content-between\">\r\n                <Col className=\"pl-0\">\r\n                  <h1>Avanceret søgning</h1>\r\n                </Col>\r\n                <Col className=\"d-md-none d-lg-block col-12 col-md-auto label py-1\">Vælg søgeområde</Col>\r\n                <span className=\"button-template\">\r\n                  <UncontrolledDropdown>\r\n                    <DropdownToggle className=\"btn-narrow font-weight-bold\" caret={true}>\r\n                      {this.setDropdownLabel()}\r\n                    </DropdownToggle>\r\n                    <DropdownMenu>\r\n                      {DropDownMenu.map((dropDownItem: ISelectItem, index: number) => {\r\n                        return (\r\n                          <DropdownItem value={dropDownItem.value} onClick={() => this.onHandleSelect(dropDownItem.value)} key={index}>\r\n                            {dropDownItem.label}\r\n                          </DropdownItem>\r\n                        );\r\n                      })}\r\n                    </DropdownMenu>\r\n                  </UncontrolledDropdown>\r\n                </span>\r\n              </Row>\r\n            </Col>\r\n          </Row>\r\n          <Query {...config} value={tree} onChange={this.onChange} renderBuilder={this.renderBuilder} />\r\n          <Row>\r\n            <Col className=\"text-right extreme-search-footer mb-2 mr-4\">\r\n              <CsvExportBtn model={this.createQueryBuilderSearchParameters()} warnWhenDownloadingResult={searchResult.warnWhenExportingResult} />\r\n              <IconButton className=\"mb-1 ml-2 mr-1 action-btn\" icon={IconType.TrashAlt} onClick={() => this.doClear()}>\r\n                Nulstil søgning\r\n              </IconButton>\r\n              <IconButton className=\"mb-1 ml-2 mr-1 action-btn\" icon={IconType.Search} onClick={() => this.doSearch()}>\r\n                Søg\r\n              </IconButton>\r\n            </Col>\r\n          </Row>\r\n        </div>\r\n        <Row>\r\n          <Col className=\"col-md-12 search-result-container\">\r\n            <SearchResultView\r\n              searchResultItems={searchResult.documents}\r\n              isGridViewActive={this.props.isGridViewActive}\r\n              renderGridItem={(searchReslutItem: ISearchDocument) => <GridViewDocument fullScreen={true} document={searchReslutItem} />}\r\n              renderItem={(document: ISearchDocument) => <Document document={document} />}\r\n              isError={searchResult.isError}\r\n              resultCount={searchResult.resultCount}\r\n              searchOrderBy={selectedOrderByValue}\r\n              orderByValues={OrderByValues.filter(o => o.key !== OrderByKey.Relevans).map(obv => obv)}\r\n              onOrderByChanged={this.onOrderByChange}\r\n              isSearchDirectionAscending={isAscendingOrder}\r\n              onSearchDirectionChange={this.onOrderChange}\r\n              onGridViewToggled={this.props.toggleGridViewActive}\r\n              onPageChange={this.onPageChange}\r\n              activePage={activePage}\r\n              pageCount={searchResult.pageCount}\r\n              activePageSize={activePageSize}\r\n              onPageSizeChange={this.onPageSizeChange}\r\n            ></SearchResultView>\r\n          </Col>\r\n        </Row>\r\n      </div>\r\n    );\r\n  }\r\n\r\n  private startExtremeSearch() {\r\n    if (isDataLoaded(this.props, this.state.dataLoaded)) {\r\n      setExtremeSearchConfig(this.state.templateId, this.props, this.state.config);\r\n      this.setState({ config: this.state.config }, () => this.initFilters());\r\n      this.setState({ dataLoaded: true });\r\n    }\r\n  }\r\n\r\n  private CreateImmutableTree(template?: number): ImmutableTree {\r\n    const jsonTree: JsonTree = createJsonTree(getTemplate(template));\r\n    const newTree = checkTree(loadTree(jsonTree), getConfig());\r\n    return newTree;\r\n  }\r\n\r\n  private fixAntInputIssues() {\r\n    addPageClassToElement(\"ant-picker-dropdown\", \"ant-picker-dropdown-placement-bottomLeft\");\r\n    addPageClassToElement(\"ant-select-dropdown\", \"ant-tree-select-dropdown\");\r\n    addPageClassToElement(\"ant-select-dropdown\", \"ant-select-dropdown-placement-bottomLeft\");\r\n    handleWcagIssues(\"ant-select-search__field\", \"Vælg værdi\");\r\n    handleWcagIssues(\"ant-input-number-input-wrap\", \"Indtast værdi\");\r\n    handleWcagIssues(\"ant-input-number-input\", \"Indtast værdi\");\r\n    handleWcagIssues(\"ant-input\", \"Indtast værdi\");\r\n    handleWcagIssues(\"ant-btn-icon-only\", \"Slet regel\");\r\n  }\r\n\r\n  private replaceUrl() {\r\n    const immutableTree = this.state.tree;\r\n    const jsonTree = getTree(immutableTree);\r\n    const treeUrlParameter = JSON.stringify(jsonTree);\r\n    const qs = stringify({\r\n      q: treeUrlParameter,\r\n      p: this.state.activePage + 1,\r\n      ps: this.state.activePageSize,\r\n      o: this.state.selectedOrderByValue?.key,\r\n      d: !this.state.isAscendingOrder,\r\n    });\r\n    const querystring = `?${qs}`;\r\n    this.props.history.replace(querystring !== \"\" ? querystring : this.props.history.location.pathname);\r\n  }\r\n\r\n  private setDropdownLabel(): string {\r\n    const dropDown = DropDownMenu.find(x => x.value === this.state.templateId);\r\n    return dropDown === undefined ? \"Intet valgt\" : dropDown.label;\r\n  }\r\n\r\n  private hideAntInput() {\r\n    window.requestAnimationFrame(function() {\r\n      const antElement = document.getElementsByClassName(\"ant-select-search__field\");\r\n\r\n      for (let i = 0; i < antElement.length; i++) {\r\n        const inputElement = antElement[i] as HTMLInputElement;\r\n        inputElement.type = \"hidden\";\r\n      }\r\n    });\r\n  }\r\n\r\n  private checkForEnterAndDoSearch = (e: KeyboardEvent) => {\r\n    if (e.key !== \"Enter\" && e.key !== \"NumpadEnter\") return;\r\n\r\n    if (!this.isSearchInputField(e)) {\r\n      return;\r\n    }\r\n\r\n    this.doSearch();\r\n  };\r\n\r\n  private isSearchInputField(event: KeyboardEvent): boolean {\r\n    var target = event.target as HTMLElement;\r\n    if (target === null) return false;\r\n    var classList = target.classList;\r\n\r\n    for (let index = 0; index < classList.length; index++) {\r\n      if (classList[index] === \"ant-input\") return true;\r\n      if (classList[index] === \"ant-input-number-input\") return true;\r\n      if (classList[index] === \"ant-select-selection-search-input\" && target.getAttribute(\"aria-expanded\") !== \"true\") return true; // Don't search when expanding dropdown\r\n    }\r\n\r\n    // Tree selector\r\n    if (target.parentElement?.parentElement?.parentElement?.className.indexOf(\"ant-tree-select\") !== -1) return true;\r\n\r\n    // Datepicker - verify by parent\r\n    if (target.parentElement && target.parentElement.className.indexOf(\"ant-picker-input\") !== -1) return true;\r\n\r\n    return false;\r\n  }\r\n\r\n  private onHandleSelect = (id: number) => {\r\n    setExtremeSearchConfig(id, this.props, this.state.config);\r\n    this.setExtremeSearchTemplate(id, this.state.config);\r\n  };\r\n\r\n  private onPageChange = (newPage: number) => {\r\n    this.setState({ activePage: newPage - 1 }, () => {\r\n      this.doSearch();\r\n    });\r\n    this.scrollToTop();\r\n  };\r\n\r\n  private onPageSizeChange = (newPageSize: number) => {\r\n    this.setState({ activePageSize: newPageSize, activePage: 0 }, this.doSearch);\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 onChange = (immutableTree: ImmutableTree, config: Config) => {\r\n    this.thrrottleUpdateQueryBuilder(config, immutableTree);\r\n    const jsonTree = getTree(immutableTree);\r\n    const q = JSON.stringify(jsonTree);\r\n    const qs = stringify({ q });\r\n    const querystring = `?${qs}`;\r\n    this.props.history.replace(querystring !== \"\" ? querystring : this.props.history.location.pathname);\r\n  };\r\n\r\n  private thrrottleUpdateQueryBuilder = throttle((config: Config, tree: ImmutableTree) => {\r\n    this.setState({ config: config, tree: tree });\r\n  }, 100);\r\n\r\n  private onOrderByChange = (value: IOrderByValue) => (e: React.SyntheticEvent) => {\r\n    e.preventDefault();\r\n    return this.state.selectedOrderByValue === value\r\n      ? this.onOrderChange()\r\n      : this.setState(\r\n          {\r\n            selectedOrderByValue: value,\r\n            isAscendingOrder: value.isDefaultDirectionAscending || false,\r\n            activePage: 0,\r\n          },\r\n          () => this.doSearch()\r\n        );\r\n  };\r\n\r\n  private onOrderChange = () => {\r\n    this.setState({ isAscendingOrder: !this.state.isAscendingOrder, activePage: 0 }, () => this.doSearch());\r\n  };\r\n\r\n  private doSearch(): void {\r\n    const model = this.createQueryBuilderSearchParameters();\r\n\r\n    apiPOST<IDocumentSearchResult>(`api/extremesearch`, model).then(response => {\r\n      if (response.pageCount > 0 && this.state.activePage > response.pageCount - 1) {\r\n        const activePageFromResult = response.pageCount > 0 ? response.pageCount - 1 : 0;\r\n        this.setState({ activePage: Math.min(this.state.activePage, activePageFromResult) }, () => this.doSearch());\r\n      } else {\r\n        this.setState({ searchResult: response });\r\n      }\r\n    });\r\n\r\n    this.replaceUrl();\r\n  }\r\n\r\n  private createQueryBuilderSearchParameters(): IQueryBuilderSearchParameters {\r\n    const { selectedOrderByValue, isAscendingOrder, tree } = this.state;\r\n\r\n    const model = {} as IQueryBuilderSearchParameters;\r\n    model.pageNumber = this.state.activePage;\r\n    model.pageSize = this.state.activePageSize;\r\n    model.tree = tree;\r\n    model.orderDirection = isAscendingOrder ? Direction.Ascending : Direction.Decending;\r\n    model.orderBy = selectedOrderByValue?.key;\r\n\r\n    return model;\r\n  }\r\n\r\n  private doClear(): void {\r\n    this.setExtremeSearchTemplate(this.state.templateId, this.state.config);\r\n    this.setState(\r\n      {\r\n        searchResult: { pageCount: 0, documents: [], resultCount: 0, warnWhenExportingResult: false },\r\n        activePage: 0,\r\n        selectedOrderByValue: OrderByValues[2],\r\n        isAscendingOrder: false,\r\n      },\r\n      () => this.doSearch()\r\n    );\r\n  }\r\n\r\n  private setExtremeSearchTemplate(templateId: number, config: Config) {\r\n    const jsonTree: JsonTree = createJsonTree(getTemplate(templateId));\r\n    const newTree = checkTree(loadTree(jsonTree), config);\r\n    this.setState({ tree: newTree, templateId: templateId }, () => this.doSearch());\r\n  }\r\n}\r\n\r\nexport default connect(\r\n  ({ documentClassifications, ressorter, extremeSearch }: AppState, ownProps: IExtremeSearchContainerProps): IExtremeSearchContainerProps => {\r\n    return {\r\n      ...ownProps,\r\n      documentClassifications: documentClassifications.documentClassifications,\r\n      ressorter: ressorter.ministryRessorter,\r\n      fobRessorter: ressorter.fobRessorter,\r\n      tags: extremeSearch.tags,\r\n      lawRegisters: extremeSearch.lawRegisters,\r\n      caseHistoryStatus: extremeSearch.caseHistoryStatus,\r\n      isGridViewActive: extremeSearch.isGridViewActive,\r\n    };\r\n  },\r\n  dispatch =>\r\n    bindActionCreators(\r\n      {\r\n        ...DocumentClassificationActions,\r\n        ...RessortActions,\r\n        ...ExtremeSearchActions,\r\n        ...MaintenanceMessagesActions,\r\n      },\r\n      dispatch\r\n    )\r\n)(ExtremeSearchContainer);\r\n"],"names":["CsvSizeWarningDialog","props","dismissed","confirmed","isModalOpen","isOpen","toggle","color","onClick","GridViewDocument","document","React","show","setShow","showReprintNotes","setShowReprintNotes","toggleReprintNotes","ReprintNotes","ressort","ressortName","toggleModal","docId","id","title","shortName","Container","className","Row","Col","md","fullScreen","property","EliProperty","datatype","DataType","offentliggoerelsesDato","showDocumentStateBadge","geografiskDaekningId","retsinfoKlassifikationId","Badge","isHistoryFlag","resource","EliResource","hasReprintNotes","Button","Link","to","retsinfoLink","nlToBr","toString","rev","rel","typeof","EliClass","about","popularTitle","undefined","fobRessortNames","length","join","e","preventDefault","onKeyUp","key","tabIndex","Icon","icon","IconType","iconSize","RelatedDocs","geografiskDakning","retsinfoKlassifikation","GeografiskDaekning","includes","RetsinfoKlassifikation","DropDownMenu","label","value","moment","conjunctions","AntdConfig","operators","like","is_empty","is_not_empty","multiselect_equals","starts_with","widgets","text","valuePlaceholder","date","dateFormat","valueFormat","func","customProps","showSearch","treemultiselect","treeselect","select","types","boolean","merge","widgetProps","hideOperator","operatorInlineLabel","localeSettings","locale","antd","da_DK","valueLabel","fieldLabel","operatorLabel","funcLabel","fieldPlaceholder","funcPlaceholder","operatorPlaceholder","deleteLabel","addGroupLabel","addRuleLabel","delGroupLabel","notLabel","valueSourcesPopupTitle","config","settings","valueSourcesInfo","field","widget","canRegroup","maxNesting","canLeaveEmptyGroup","customFieldSelectProps","fields","accessionsNummer","type","valueSources","excludeOperators","administrerendeMyndighed","defaultOperator","publiceringsmedieId","listValues","dokumentTypeId","fieldSettings","treeExpandAll","underskriftDato","publiceretTidspunkt","sidstPubliceretTidspunkt","fobEmneordIder","allowCustomValues","dokumentCelex_celexNummer","dokumentCelex_celexType","dokumentCelex_sektor","C","E","dokumentCelex_aar","dokumentCelex_dokType","L","R","D","dokumentCelex_dokNummer","publiceringsNummer","content","folketingssamling","hjemmelVedroerer","historiskDato","ressortId","fobRessortIds","officielNote","redaktionelNote","omtryksNote","alternativeMedierNote","populaerTitel","rank","journalNummer","resume","anvendtRetsforskrift","senereAendringerAccn","erHistoriskFlag","false","true","fremtidigHistoriskDato","anfoerINote","retsinfoklassifikationId","SortIndicator_10_40","SortIndicator_20","SortIndicator_50_60","SortIndicator_30","titel","tiltraederFra","undtagetFraOffentliggoerelse","aar","number","styreDokumentStatusId","funcs","LOWER","mongoFunc","jsonLogic","jsonLogicIsMethod","returnType","args","str","LINEAR_REGRESSION","formatFunc","coef","bias","val","sqlFormatFunc","mongoFormatFunc","$sum","$multiply","renderBrackets","renderSeps","defaultValue","getConfig","setDocumentTypeValues","setTreeSelectValues","fieldName","setSelectValues","children1","properties","operator","valueSrc","operatorOptions","conjunction","valueType","emptyInitValue","uuid","Utils","SortHack","PageClass","getDocumentClassificationList","documentClassifications","filterValue","filterDocumentType","returnList","ALL","map","documentClassification","documentTypes","sort","x","sorteringsId","documentType","push","filter","ids","documentTypeId","name","mapRessortListToObject","caseHistoryToListItem","s","setExtremeSearchConfig","templateId","REGLER","FOLKETINGETSOMBUDSMAND","AFGOERELSER","lastClassification","classification","documentClassificationName","parent","getGroupedDocumentTypesList","LOVOGBESLUTNINGSFORSLAG","treeValuesString","JSON","parse","setfobEmneordIder","tags","setRessortIdValues","ressorter","setFobRessortIdValues","fobRessorter","setRetsforskriftIdValues","lawRegisters","setStyreDokumentStatusIdValues","caseHistoryStatus","getTemplate","template02","template03","template04","template05","template06","template01","createJsonTree","treeObject","Object","keys","handleWcagIssues","classSelector","ariaLabel","matchingElements","getElementsByClassName","i","setAttribute","addPageClassToElement","classSelector1","classSelector2","inputElement","classList","contains","parentNode","add","isClientBrowserSupported","ua","navigator","userAgent","indexOf","CsvExportBtn","state","isFetchingData","isWarningDialogOpen","this","IconButton","disabled","Spinner","as","animation","size","role","setState","exportSearch","model","beginExport","warnWhenDownloadingResult","apiPOST","responseType","result","FileSaver","checkTree","loadTree","getTree","defaultParams","activePage","activePageSize","PageSize","paramsQuery","selectedOrderByValue","OrderByValues","isAscendingOrder","ExtremeSearchContainer","container","renderBuilder","style","padding","checkForEnterAndDoSearch","isSearchInputField","doSearch","onHandleSelect","setExtremeSearchTemplate","onPageChange","newPage","scrollToTop","onPageSizeChange","newPageSize","onChange","immutableTree","thrrottleUpdateQueryBuilder","jsonTree","q","stringify","qs","querystring","history","replace","location","pathname","throttle","tree","onOrderByChange","onOrderChange","isDefaultDirectionAscending","bind","doClear","fixAntInputIssues","searchResult","pageCount","documents","resultCount","warnWhenExportingResult","CreateImmutableTree","dataLoaded","getDocumentClassification","getRessorter","getFobRessorter","getLawRegisters","getFobTags","getCaseHistoryStatus","browserIsNotSupported","hideAntInput","startExtremeSearch","newState","search","params","queryString","p","ps","o","d","current","onkeyup","prev","isGridViewActive","newTree","ref","UncontrolledDropdown","DropdownToggle","caret","setDropdownLabel","DropdownMenu","dropDownItem","index","DropdownItem","createQueryBuilderSearchParameters","SearchResultView","searchResultItems","renderGridItem","searchReslutItem","renderItem","Document","isError","searchOrderBy","orderByValues","OrderByKey","obv","onOrderByChanged","isSearchDirectionAscending","onSearchDirectionChange","onGridViewToggled","toggleGridViewActive","initFilters","template","treeUrlParameter","dropDown","find","window","requestAnimationFrame","antElement","event","target","getAttribute","parentElement","scrollHere","getElementById","getComputedStyle","display","scrollTo","scrollIntoView","then","response","activePageFromResult","Math","min","replaceUrl","pageNumber","pageSize","orderDirection","Direction","orderBy","connect","ownProps","extremeSearch","ministryRessorter","dispatch","bindActionCreators","DocumentClassificationActions","RessortActions","ExtremeSearchActions","MaintenanceMessagesActions"],"sourceRoot":""}