@beinformed/react 1.0.0-beta.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/chunk-4IDEBSD5.js +2 -0
- package/dist/chunk-4IDEBSD5.js.map +1 -0
- package/dist/chunk-6AKWSGWH.js +2 -0
- package/dist/chunk-6AKWSGWH.js.map +1 -0
- package/dist/{chunk-LYHN5GC6.js → chunk-6EK3TAMN.js} +2 -2
- package/dist/{chunk-3UHZ6GBP.js → chunk-BV77KA4Y.js} +2 -2
- package/dist/{chunk-GHKA2XFO.js → chunk-ITSZQHGD.js} +2 -2
- package/dist/chunk-ITSZQHGD.js.map +1 -0
- package/dist/chunk-JWOBKHOJ.js +2 -0
- package/dist/chunk-JWOBKHOJ.js.map +1 -0
- package/dist/{chunk-X6L6BWD4.js → chunk-KZB56W7Q.js} +2 -2
- package/dist/chunk-KZB56W7Q.js.map +1 -0
- package/dist/{chunk-LJM2ADG6.js → chunk-KZLW2NHD.js} +2 -2
- package/dist/{chunk-7LGDJBGK.js → chunk-OQK6SSUD.js} +2 -2
- package/dist/{chunk-ALGSLJJI.js → chunk-SPV6MD7J.js} +2 -2
- package/dist/{chunk-ZNJONDQ6.js → chunk-TAWZ2VIM.js} +2 -2
- package/dist/chunk-VXOYOMNN.js +2 -0
- package/dist/chunk-VXOYOMNN.js.map +1 -0
- package/dist/chunk-WEJGEXAP.js +2 -0
- package/dist/chunk-WEJGEXAP.js.map +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +79 -8
- package/dist/hooks/index.d.ts +79 -8
- package/dist/hooks/index.js +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +20 -2
- package/dist/i18n/index.d.ts +20 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/redux/index.cjs +1 -1
- package/dist/redux/index.cjs.map +1 -1
- package/dist/redux/index.d.cts +3 -3
- package/dist/redux/index.d.ts +3 -3
- package/dist/redux/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +6 -1
- package/dist/utils/index.d.ts +6 -1
- package/dist/utils/index.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-5MOCT43G.js +0 -2
- package/dist/chunk-5MOCT43G.js.map +0 -1
- package/dist/chunk-AMFWIR2R.js +0 -2
- package/dist/chunk-AMFWIR2R.js.map +0 -1
- package/dist/chunk-GHKA2XFO.js.map +0 -1
- package/dist/chunk-JYAETKRB.js +0 -2
- package/dist/chunk-JYAETKRB.js.map +0 -1
- package/dist/chunk-LUXTQYD2.js +0 -2
- package/dist/chunk-LUXTQYD2.js.map +0 -1
- package/dist/chunk-TRPPQFNA.js +0 -2
- package/dist/chunk-TRPPQFNA.js.map +0 -1
- package/dist/chunk-TYEAR2B7.js +0 -2
- package/dist/chunk-TYEAR2B7.js.map +0 -1
- package/dist/chunk-X6L6BWD4.js.map +0 -1
- /package/dist/{chunk-LYHN5GC6.js.map → chunk-6EK3TAMN.js.map} +0 -0
- /package/dist/{chunk-3UHZ6GBP.js.map → chunk-BV77KA4Y.js.map} +0 -0
- /package/dist/{chunk-LJM2ADG6.js.map → chunk-KZLW2NHD.js.map} +0 -0
- /package/dist/{chunk-7LGDJBGK.js.map → chunk-OQK6SSUD.js.map} +0 -0
- /package/dist/{chunk-ALGSLJJI.js.map → chunk-SPV6MD7J.js.map} +0 -0
- /package/dist/{chunk-ZNJONDQ6.js.map → chunk-TAWZ2VIM.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/languages.ts","../src/i18n/Locale.ts","../src/i18n/Locales.ts","../src/i18n/translations/beinformed_error_messages_en.nl.json","../src/i18n/translations/beinformed_error_messages_nl.nl.json","../src/redux/i18n/i18nReducer.ts","../src/redux/i18n/i18nSelectors.ts"],"sourcesContent":["interface LanguagesObject {\n attribute: { name: number; nativeName: number };\n rtl: Record<string, number>;\n lang: Record<string, string[]>;\n}\n\nexport const languages: LanguagesObject = {\n attribute: {\n name: 0,\n nativeName: 1,\n },\n rtl: {\n ar: 1,\n dv: 1,\n fa: 1,\n ha: 1,\n he: 1,\n ks: 1,\n ku: 1,\n ps: 1,\n ur: 1,\n yi: 1,\n },\n lang: {\n aa: [\"Afar\", \"Afar\"],\n ab: [\"Abkhazian\", \"Аҧсуа\"],\n af: [\"Afrikaans\", \"Afrikaans\"],\n ak: [\"Akan\", \"Akana\"],\n am: [\"Amharic\", \"አማርኛ\"],\n an: [\"Aragonese\", \"Aragonés\"],\n ar: [\"Arabic\", \"العربية\"],\n as: [\"Assamese\", \"অসমীয়া\"],\n av: [\"Avar\", \"Авар\"],\n ay: [\"Aymara\", \"Aymar\"],\n az: [\"Azerbaijani\", \"Azərbaycanca / آذربايجان\"],\n ba: [\"Bashkir\", \"Башҡорт\"],\n be: [\"Belarusian\", \"Беларуская\"],\n bg: [\"Bulgarian\", \"Български\"],\n bh: [\"Bihari\", \"भोजपुरी\"],\n bi: [\"Bislama\", \"Bislama\"],\n bm: [\"Bambara\", \"Bamanankan\"],\n bn: [\"Bengali\", \"বাংলা\"],\n bo: [\"Tibetan\", \"བོད་ཡིག / Bod skad\"],\n br: [\"Breton\", \"Brezhoneg\"],\n bs: [\"Bosnian\", \"Bosanski\"],\n ca: [\"Catalan\", \"Català\"],\n ce: [\"Chechen\", \"Нохчийн\"],\n ch: [\"Chamorro\", \"Chamoru\"],\n co: [\"Corsican\", \"Corsu\"],\n cr: [\"Cree\", \"Nehiyaw\"],\n cs: [\"Czech\", \"Česky\"],\n cu: [\"Old Church Slavonic / Old Bulgarian\", \"словѣньскъ / slověnĭskŭ\"],\n cv: [\"Chuvash\", \"Чăваш\"],\n cy: [\"Welsh\", \"Cymraeg\"],\n da: [\"Danish\", \"Dansk\"],\n de: [\"German\", \"Deutsch\"],\n dv: [\"Divehi\", \"ދިވެހިބަސް\"],\n dz: [\"Dzongkha\", \"ཇོང་ཁ\"],\n ee: [\"Ewe\", \"Ɛʋɛ\"],\n el: [\"Greek\", \"Ελληνικά\"],\n en: [\"English\", \"English\"],\n eo: [\"Esperanto\", \"Esperanto\"],\n es: [\"Spanish\", \"Español\"],\n et: [\"Estonian\", \"Eesti\"],\n eu: [\"Basque\", \"Euskara\"],\n fa: [\"Persian\", \"فارسی\"],\n ff: [\"Peul\", \"Fulfulde\"],\n fi: [\"Finnish\", \"Suomi\"],\n fj: [\"Fijian\", \"Na Vosa Vakaviti\"],\n fo: [\"Faroese\", \"Føroyskt\"],\n fr: [\"French\", \"Français\"],\n fy: [\"West Frisian\", \"Frysk\"],\n ga: [\"Irish\", \"Gaeilge\"],\n gd: [\"Scottish Gaelic\", \"Gàidhlig\"],\n gl: [\"Galician\", \"Galego\"],\n gn: [\"Guarani\", \"Avañe'ẽ\"],\n gu: [\"Gujarati\", \"ગુજરાતી\"],\n gv: [\"Manx\", \"Gaelg\"],\n ha: [\"Hausa\", \"هَوُسَ\"],\n he: [\"Hebrew\", \"עברית\"],\n hi: [\"Hindi\", \"हिन्दी\"],\n ho: [\"Hiri Motu\", \"Hiri Motu\"],\n hr: [\"Croatian\", \"Hrvatski\"],\n ht: [\"Haitian\", \"Krèyol ayisyen\"],\n hu: [\"Hungarian\", \"Magyar\"],\n hy: [\"Armenian\", \"Հայերեն\"],\n hz: [\"Herero\", \"Otsiherero\"],\n ia: [\"Interlingua\", \"Interlingua\"],\n id: [\"Indonesian\", \"Bahasa Indonesia\"],\n ie: [\"Interlingue\", \"Interlingue\"],\n ig: [\"Igbo\", \"Igbo\"],\n ii: [\"Sichuan Yi\", \"ꆇꉙ / 四川彝语\"],\n ik: [\"Inupiak\", \"Iñupiak\"],\n io: [\"Ido\", \"Ido\"],\n is: [\"Icelandic\", \"Íslenska\"],\n it: [\"Italian\", \"Italiano\"],\n iu: [\"Inuktitut\", \"ᐃᓄᒃᑎᑐᑦ\"],\n ja: [\"Japanese\", \"日本語\"],\n jv: [\"Javanese\", \"Basa Jawa\"],\n ka: [\"Georgian\", \"ქართული\"],\n kg: [\"Kongo\", \"KiKongo\"],\n ki: [\"Kikuyu\", \"Gĩkũyũ\"],\n kj: [\"Kuanyama\", \"Kuanyama\"],\n kk: [\"Kazakh\", \"Қазақша\"],\n kl: [\"Greenlandic\", \"Kalaallisut\"],\n km: [\"Cambodian\", \"ភាសាខ្មែរ\"],\n kn: [\"Kannada\", \"ಕನ್ನಡ\"],\n ko: [\"Korean\", \"한국어\"],\n kr: [\"Kanuri\", \"Kanuri\"],\n ks: [\"Kashmiri\", \"कश्मीरी / كشميري\"],\n ku: [\"Kurdish\", \"Kurdî / كوردی\"],\n kv: [\"Komi\", \"Коми\"],\n kw: [\"Cornish\", \"Kernewek\"],\n ky: [\"Kirghiz\", \"Kırgızca / Кыргызча\"],\n la: [\"Latin\", \"Latina\"],\n lb: [\"Luxembourgish\", \"Lëtzebuergesch\"],\n lg: [\"Ganda\", \"Luganda\"],\n li: [\"Limburgian\", \"Limburgs\"],\n ln: [\"Lingala\", \"Lingála\"],\n lo: [\"Laotian\", \"ລາວ / Pha xa lao\"],\n lt: [\"Lithuanian\", \"Lietuvių\"],\n lv: [\"Latvian\", \"Latviešu\"],\n mg: [\"Malagasy\", \"Malagasy\"],\n mh: [\"Marshallese\", \"Kajin Majel / Ebon\"],\n mi: [\"Maori\", \"Māori\"],\n mk: [\"Macedonian\", \"Македонски\"],\n ml: [\"Malayalam\", \"മലയാളം\"],\n mn: [\"Mongolian\", \"Монгол\"],\n mo: [\"Moldovan\", \"Moldovenească\"],\n mr: [\"Marathi\", \"मराठी\"],\n ms: [\"Malay\", \"Bahasa Melayu\"],\n mt: [\"Maltese\", \"bil-Malti\"],\n my: [\"Burmese\", \"Myanmasa\"],\n na: [\"Nauruan\", \"Dorerin Naoero\"],\n nd: [\"North Ndebele\", \"Sindebele\"],\n ne: [\"Nepali\", \"नेपाली\"],\n ng: [\"Ndonga\", \"Oshiwambo\"],\n nl: [\"Dutch\", \"Nederlands\"],\n nn: [\"Norwegian Nynorsk\", \"Norsk (nynorsk)\"],\n no: [\"Norwegian\", \"Norsk (bokmål / riksmål)\"],\n nr: [\"South Ndebele\", \"isiNdebele\"],\n nv: [\"Navajo\", \"Diné bizaad\"],\n ny: [\"Chichewa\", \"Chi-Chewa\"],\n oc: [\"Occitan\", \"Occitan\"],\n oj: [\"Ojibwa\", \"ᐊᓂᔑᓈᐯᒧᐎᓐ / Anishinaabemowin\"],\n om: [\"Oromo\", \"Oromoo\"],\n or: [\"Oriya\", \"ଓଡ଼ିଆ\"],\n os: [\"Ossetian / Ossetic\", \"Иронау\"],\n pa: [\"Panjabi / Punjabi\", \"ਪੰਜਾਬੀ / पंजाबी / پنجابي\"],\n pi: [\"Pali\", \"Pāli / पाऴि\"],\n pl: [\"Polish\", \"Polski\"],\n ps: [\"Pashto\", \"پښتو\"],\n pt: [\"Portuguese\", \"Português\"],\n qu: [\"Quechua\", \"Runa Simi\"],\n rm: [\"Raeto Romance\", \"Rumantsch\"],\n rn: [\"Kirundi\", \"Kirundi\"],\n ro: [\"Romanian\", \"Română\"],\n ru: [\"Russian\", \"Русский\"],\n rw: [\"Rwandi\", \"Kinyarwandi\"],\n sa: [\"Sanskrit\", \"संस्कृतम्\"],\n sc: [\"Sardinian\", \"Sardu\"],\n sd: [\"Sindhi\", \"सिनधि\"],\n se: [\"Northern Sami\", \"Sámegiella\"],\n sg: [\"Sango\", \"Sängö\"],\n sh: [\"Serbo-Croatian\", \"Srpskohrvatski / Српскохрватски\"],\n si: [\"Sinhalese\", \"සිංහල\"],\n sk: [\"Slovak\", \"Slovenčina\"],\n sl: [\"Slovenian\", \"Slovenščina\"],\n sm: [\"Samoan\", \"Gagana Samoa\"],\n sn: [\"Shona\", \"chiShona\"],\n so: [\"Somalia\", \"Soomaaliga\"],\n sq: [\"Albanian\", \"Shqip\"],\n sr: [\"Serbian\", \"Српски\"],\n ss: [\"Swati\", \"SiSwati\"],\n st: [\"Southern Sotho\", \"Sesotho\"],\n su: [\"Sundanese\", \"Basa Sunda\"],\n sv: [\"Swedish\", \"Svenska\"],\n sw: [\"Swahili\", \"Kiswahili\"],\n ta: [\"Tamil\", \"தமிழ்\"],\n te: [\"Telugu\", \"తెలుగు\"],\n tg: [\"Tajik\", \"Тоҷикӣ\"],\n th: [\"Thai\", \"ไทย / Phasa Thai\"],\n ti: [\"Tigrinya\", \"ትግርኛ\"],\n tk: [\"Turkmen\", \"Туркмен / تركمن\"],\n tl: [\"Tagalog / Filipino\", \"Tagalog\"],\n tn: [\"Tswana\", \"Setswana\"],\n to: [\"Tonga\", \"Lea Faka-Tonga\"],\n tr: [\"Turkish\", \"Türkçe\"],\n ts: [\"Tsonga\", \"Xitsonga\"],\n tt: [\"Tatar\", \"Tatarça\"],\n tw: [\"Twi\", \"Twi\"],\n ty: [\"Tahitian\", \"Reo Mā`ohi\"],\n ug: [\"Uyghur\", \"Uyƣurqə / ئۇيغۇرچە\"],\n uk: [\"Ukrainian\", \"Українська\"],\n ur: [\"Urdu\", \"اردو\"],\n uz: [\"Uzbek\", \"Ўзбек\"],\n ve: [\"Venda\", \"Tshivenḓa\"],\n vi: [\"Vietnamese\", \"Tiếng Việt\"],\n vo: [\"Volapük\", \"Volapük\"],\n wa: [\"Walloon\", \"Walon\"],\n wo: [\"Wolof\", \"Wollof\"],\n xh: [\"Xhosa\", \"isiXhosa\"],\n yi: [\"Yiddish\", \"ייִדיש\"],\n yo: [\"Yoruba\", \"Yorùbá\"],\n za: [\"Zhuang\", \"Cuengh / Tôô / 壮语\"],\n zh: [\"Chinese\", \"中文\"],\n zu: [\"Zulu\", \"isiZulu\"],\n pap: [\"Papiamento\", \"Papiamento\"],\n },\n};\n","import formatMessage from \"format-message\";\nimport { immerable } from \"immer\";\n\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { getBooleanSetting } from \"@beinformed/ui/settings\";\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport { languages } from \"./languages\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\nimport type { LocaleConfiguration } from \"./types\";\n\n/**\n * Create a locale\n */\nexport class Locale {\n [immerable] = true;\n\n #code: string;\n #messages: Record<string, string>;\n #errors: Record<string, string>;\n #nativeName: string | undefined;\n\n constructor(locale: LocaleConfiguration) {\n this.#code = locale.code;\n\n this.#messages = this.fixPlaceHoldersInObject(locale.messages);\n this.#errors = this.fixPlaceHoldersInObject(locale.errors);\n\n this.#nativeName = locale.nativeName;\n\n formatMessage.setup({\n missingTranslation: \"ignore\",\n });\n }\n\n /**\n * Retrieve locale code\n */\n get code() {\n return this.#code;\n }\n\n /**\n * Retrieve nativeName\n */\n get nativeName() {\n if (this.#nativeName) {\n return this.#nativeName;\n }\n\n const locale = this.code.split(\"-\");\n\n if (locale.length > 0) {\n const languageCode = locale[0];\n if (languageCode) {\n const language = languages.lang[languageCode];\n\n if (language) {\n return (\n language[1] + (locale[1] ? ` (${locale[1].toUpperCase()})` : \"\")\n );\n }\n }\n }\n\n throw new IllegalStateException(\n `Can not find language name based on locale: ${this.code}`,\n );\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHolders(message: string | undefined) {\n if (typeof message === \"string\") {\n return message\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\");\n }\n\n return null;\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n private fixPlaceHoldersInObject(messages: Record<string, string> = {}) {\n return JSON.parse(\n JSON.stringify(messages)\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\"),\n );\n }\n\n /**\n * Retrieve message by id\n */\n getBaseMessage(id: string, defaultMessage?: string) {\n if (!id && !defaultMessage) {\n return \"[message: id or defaultMessage missing]\";\n }\n\n const messageFromLocale = this.#messages[id] || this.#errors[id];\n\n if (\n IS_DEV &&\n !messageFromLocale &&\n id &&\n getBooleanSetting(\"DEBUG_I18N_MESSAGE_NOT_FOUND\")\n ) {\n console.debug(\n `Message with id ${id} not found for locale ${this.code} in layout translations`,\n );\n }\n return messageFromLocale || this.fixPlaceHolders(defaultMessage) || id;\n }\n\n /**\n * Format message using formatMessage library\n */\n formatMessage(message: string, parameters?: MessageParameters) {\n if (parameters) {\n return formatMessage(message, parameters);\n }\n\n return message;\n }\n\n /**\n * Retrieve a messages with replaced parameters\n */\n getMessage(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n ): string {\n const message = this.getBaseMessage(id, defaultMessage);\n return this.formatMessage(message, parameters);\n }\n\n /**\n * Add or change messages for this locale. It is not possible to remove messages.\n */\n update(\n messages: Record<string, string> = {},\n errors: Record<string, string> = {},\n ) {\n this.#messages = {\n ...this.#messages,\n ...this.fixPlaceHoldersInObject(messages),\n };\n\n this.#errors = {\n ...this.#errors,\n ...this.fixPlaceHoldersInObject(errors),\n };\n }\n}\n","import { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\nimport { BaseCollection } from \"@beinformed/ui/models\";\n\nimport { Locale } from \"./Locale\";\nimport englishErrors from \"./translations/beinformed_error_messages_en.nl.json\";\nimport dutchErrors from \"./translations/beinformed_error_messages_nl.nl.json\";\n\nimport type { LocaleConfiguration } from \"./types\";\n\ntype ErrorMessageObject = Record<string, Record<string, string>>;\n\ninterface HydratedLocales {\n collection: {\n code: string;\n messages: Record<string, string>;\n errors: Record<string, string>;\n }[];\n}\n\n/**\n * Array of available locales\n * Order of locales is the preferred order of locales.\n * When user has an accept language header that does not correspond to the locales array,\n * the first one is used as the preferred language\n */\nexport const availableLocales: LocaleConfiguration[] = [\n {\n code: \"en\",\n messages: {},\n errors: englishErrors,\n },\n {\n code: \"nl\",\n messages: {},\n errors: dutchErrors,\n },\n];\n\n/**\n * Merge an object with custom error messages (exported and translated from be informed for example) and merge them with the existing translations.\n */\nexport const createLocalesWithConfiguredErrors = (\n configuredErrors: ErrorMessageObject,\n) =>\n availableLocales.map((availableLocale) => {\n if (configuredErrors[availableLocale.code]) {\n return {\n ...availableLocale,\n errors: {\n ...availableLocale.errors,\n ...configuredErrors[availableLocale.code],\n },\n };\n }\n\n return availableLocale;\n });\n\n/**\n * Locales, collection of Locale\n */\nexport class Locales extends BaseCollection<Locale> {\n constructor(locales: LocaleConfiguration[] = availableLocales) {\n super(locales.map((locale) => new Locale(locale)));\n }\n\n /**\n * rehydrate\n */\n static rehydrate(hydatedLocales: HydratedLocales): Locales {\n if (hydatedLocales && hydatedLocales.collection) {\n return new Locales(\n hydatedLocales.collection.map((locale) => ({\n code: locale.code,\n messages: locale.messages,\n errors: locale.errors,\n })),\n );\n }\n\n return new Locales([]);\n }\n\n /**\n * Check if locale with localeCode exists\n */\n hasLocale(localeCode: string) {\n return this.some((item) => localeCode.startsWith(item.code));\n }\n\n /**\n * Retrieve locales by localeCode from Locales collection\n */\n getLocale(localeCode: string) {\n if (this.hasLocale(localeCode)) {\n const locale = this.find((item) => localeCode.startsWith(item.code));\n if (locale) {\n return locale;\n }\n }\n throw new IllegalArgumentException(\n `Locale configuration for locale ${localeCode} not found`,\n );\n }\n\n /**\n * Retrieve all available locale codes\n */\n get availableLocaleCodes() {\n return this.map((locale) => locale.code);\n }\n\n /**\n * Retrieve preferred locale based on the accept header of a browser\n */\n getPreferredLocale(acceptLanguageHeader: string | null) {\n if (acceptLanguageHeader != null) {\n const acceptLanguages =\n acceptLanguageHeader.match(/[-A-Za-z]{2,10}/gu) || [];\n\n const preferredLocales = acceptLanguages\n .filter((locale) =>\n this.availableLocaleCodes.some((availableLocale) =>\n locale.startsWith(availableLocale),\n ),\n )\n .map((locale) =>\n this.availableLocaleCodes.find((availableLocale) =>\n locale.startsWith(availableLocale),\n ),\n );\n\n if (preferredLocales.length > 0) {\n return preferredLocales[0];\n }\n }\n\n return this.availableLocaleCodes[0];\n }\n\n /**\n * Add or change messages and errors for the given locale.<br>\n * It is not possible to remove messages.\n */\n update(\n locale: string,\n messages: Record<string, string> = {},\n errors: Record<string, string> = {},\n ) {\n if (this.hasLocale(locale)) {\n this.getLocale(locale).update(messages, errors);\n } else {\n this.add(\n new Locale({\n code: locale,\n messages,\n errors,\n }),\n );\n }\n }\n}\n","{\n \"Constraint.Attribute.IncorrectValue\": \"Incorrect value\",\n \"Constraint.Boolean.InvalidValue\": \"Invalid boolean value, only values 'true' or 'false' are valid\",\n \"Constraint.BSN.InvalidFormat\": \"Must be a valid BSN\",\n \"Constraint.Captcha.InvalidToken\": \"The captcha is invalid\",\n \"Constraint.Choice.ConflictingAnswer\": \"Cannot select '${answer-option-key}' because this is not a relevant option, given the other answers\",\n \"Constraint.Choice.ConflictingOptions\": \"Cannot select '${answer-option-key1}' and '${answer-option-key2}' at the same time\",\n \"Constraint.Choice.InvalidOption\": \"Allowed options are: ${options}\",\n \"Constraint.Choice.InvalidOption.General\": \"Value '${value}' is not allowed\",\n \"Constraint.Choice.MultipleNotAllowed\": \"Selecting multiple options is not allowed\",\n \"Constraint.ConfirmCurrentPassword.Invalid\": \"Must match the current password\",\n \"Constraint.Date.AboveMaximum\": \"Must be on or before ${max-date}\",\n \"Constraint.Date.BelowMinimum\": \"Must be on or after ${min-date}\",\n \"Constraint.Date.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.Date.NotOnDate\": \"Must be on ${date}\",\n \"Constraint.Date.OutOfRange\": \"Must be between ${min-date} and ${max-date}\",\n \"Constraint.DateRange.InvalidRange\": \"Start date must be before end date\",\n \"Constraint.DateRange.Mandatory\": \"Field is mandatory: must contain at least a start or end date\",\n \"Constraint.DateTime.AboveMaximum\": \"Must be before ${max-date-time}\",\n \"Constraint.DateTime.BelowMinimum\": \"Must be at ${min-date-time} or after\",\n \"Constraint.DateTime.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.DateTime.OutOfRange\": \"Must be between ${min-date-time} and ${max-date-time}\",\n \"Constraint.DateTimeRange.InvalidRange\": \"Start date-time must be before end date-time\",\n \"Constraint.DateTimeRange.Mandatory\": \"Field is mandatory: must contain at least a start or end date-time\",\n \"Constraint.Document.MimeTypeNotAllowed\": \"The document mime type is not valid for the selected document type\",\n \"Constraint.Email.InvalidFormat\": \"Must be a valid e-mail address\",\n \"Constraint.File.DataEmpty\": \"File does not exist or has no content\",\n \"Constraint.File.InvalidExtension\": \"Allowed extensions are: ${extensions}\",\n \"Constraint.File.InvalidFormat\": \"Must meet the requirements of the file name\",\n \"Constraint.File.InvalidMimeType\": \"Allowed mime types are: ${mime-types}\",\n \"Constraint.File.MaxFileSizeExceeded\": \"Maximum file upload size is ${max-filesize}\",\n \"Constraint.File.OnlyAllowsOneFile\": \"Only one file is allowed\",\n \"Constraint.IBAN.InvalidFormat\": \"Must be a valid IBAN number\",\n \"Constraint.InvalidLengthBetween\": \"Length must be between ${min-length} and ${max-length} characters\",\n \"Constraint.InvalidLengthExact\": \"Length must be precisely ${length} characters\",\n \"Constraint.InvalidLengthTooLong\": \"Length must not be larger than ${max-length} characters\",\n \"Constraint.InvalidLengthTooShort\": \"Length must be at least ${min-length} characters\",\n \"Constraint.InvalidRegularExpression\": \"The value is not according the given regular expression ${regexp}\",\n \"Constraint.Mandatory\": \"Field is mandatory\",\n \"Constraint.Missing\": \"Field is mandatory\",\n \"Constraint.Number.AboveMaximum\": \"Must be at most ${max-number}\",\n \"Constraint.Number.BelowMinimum\": \"Must be at least ${min-number}\",\n \"Constraint.Number.InvalidDecimal\": \"Must be a number with up to ${max-digits} decimal places\",\n \"Constraint.Number.InvalidInteger\": \"Must be a whole number\",\n \"Constraint.Number.InvalidLong\": \"Must be a whole number\",\n \"Constraint.Number.OutOfRange\": \"Must be between ${min-number} and ${max-number}\",\n \"Constraint.NumberRange.BothFieldsMandatory\": \"Must contain start and end value\",\n \"Constraint.NumberRange.InvalidRange\": \"Start value must be less than the end value\",\n \"Constraint.NumberRange.Mandatory\": \"Field is mandatory: must contain at least a start or end value\",\n \"Constraint.Password.AlreadyUsed\": \"Must not have been used before\",\n \"Constraint.Password.LowerAndUpperCaseMandatory\": \"Must contain both upper and lowercase characters\",\n \"Constraint.Password.MinNumericCharactersMandatory\": \"Must contain ${min-numeric} or more numerical characters\",\n \"Constraint.Password.MinSpecialCharactersMandatory\": \"Must contain ${min-special} or more special characters\",\n \"Constraint.Password.ThreeConsecutiveCharactersNotAllowed\": \"Must not contain any character more than twice consecutively\",\n \"Constraint.Password.Unchanged\": \"Must not be the same as the old password\",\n \"Constraint.Password.UserNameSubstringNotAllowed\": \"Must not have 5 consecutive characters from username\",\n \"Constraint.SortParameter.InvalidValue\": \"Invalid sort parameter. Allowed values: field+[asc|desc]\",\n \"Constraint.Time.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.TimeRange.InvalidRange\": \"Start time must be before end time\",\n \"Constraint.TimeRange.Mandatory\": \"Field is mandatory: must contain at least a start or end time\",\n \"Constraint.TimeStamp.AboveMaximum\": \"Must be on or before ${max-date}\",\n \"Constraint.TimeStamp.BelowMinimum\": \"Must be on or after ${min-date}\",\n \"Constraint.Timestamp.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.TimeStampRange.InvalidRange\": \"Start value must be before end value\",\n \"Constraint.TimeStampRange.Mandatory\": \"Field is mandatory: must contain at least a start or end value\",\n \"Constraint.XML.InvalidFormat\": \"Must be well-formed XML\",\n \"Constraint.ZipCode.InvalidFormat\": \"Must be a valid Dutch ZIP code, e.g. 1234AB\",\n \"Error.AcceptHeaderRequired\": \"The 'Accept' request-header field must be provided\",\n \"Error.Authentication.BlockedUser\": \"You have been logged out, because your account has been blocked\",\n \"Error.Authentication.ConcurrentUser\": \"You have been logged out, since your username has been used at a different location.\",\n \"Error.Authentication.InvalidCredentials\": \"Authentication failed\",\n \"Error.Authentication.InvalidUsername\": \"You have been logged out, because your username is not valid anymore\",\n \"Error.Authentication.Required\": \"Authentication is required\",\n \"Error.Case.ConcurrentModification\": \"Another user has updated a case used in this task. As a result, this task can not be completed.\",\n \"Error.ChangePasswordRequired\": \"User password is initial or expired, and must be changed \",\n \"Error.CodemapLookup.InvalidToken\": \"Token for codemap lookup is not valid\",\n \"Error.DataStore.ConcurrentModification\": \"Another user has updated a record used in this task\",\n \"Error.DataStore.RecordAlreadyExists\": \"\",\n \"Error.DataStore.RowCannotBeLocked\": \"Another user has already locked a record used in this task\",\n \"Error.Form.DataNotAvailableForId\": \"Service can not be completed, data not available for mandatory element ${elementid}\",\n \"Error.Form.ObjectNotAllowed\": \"Object '${objectid}' is not allowed\",\n \"Error.Form.ReadOnlyElementId\": \"Element '${elementid}' is read only\",\n \"Error.Form.TooManyObjects\": \"Too many objects '${objectid}' provided\",\n \"Error.Form.UndefinedElementId\": \"Undefined element '${elementid}'\",\n \"Error.Form.UndefinedObject\": \"Undefined object(s) '${objectid}'\",\n \"Error.GeneralError\": \"An unexpected error occurred\",\n \"Error.MethodNotAllowed\": \"The given HTTP method is not allowed for this resource\",\n \"Error.Parameter.InvalidValue\": \"The parameter contains characters that are not allowed\",\n \"Error.Parameter.Mandatory\": \"Parameter ${parameter} is mandatory\",\n \"Error.Parameter.NotAllowed\": \"Parameter '${parameter}' is not allowed\",\n \"Error.ResourceNotFound\": \"The requested resource cannot be found\",\n \"Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch\": \"Password and password confirmation do not match.\",\n \"Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists\": \"A user with email address '${Email}' already exists\",\n \"Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists\": \"A user with username '${Username}' already exists\",\n \"Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists\": \"An organization with id '${ID}' already exists\"\n}\n","{\n \"Constraint.Attribute.IncorrectValue\": \"Ongeldige waarde\",\n \"Constraint.Boolean.InvalidValue\": \"Waarde voldoet niet aan het boolean formaat, alleen waarden 'true' en 'false' zijn toegestaan\",\n \"Constraint.BSN.InvalidFormat\": \"Moet een geldig BSN zijn\",\n \"Constraint.Captcha.InvalidToken\": \"Captcha is niet correct\",\n \"Constraint.Choice.ConflictingAnswer\": \"'${answer-option-key}' kan niet worden gekozen omdat dit geen relevante optie is, gegeven de andere antwoorden\",\n \"Constraint.Choice.ConflictingOptions\": \"'${answer-option-key1}' and '${answer-option-key2}' kunnen niet tegelijkertijd worden gekozen\",\n \"Constraint.Choice.InvalidOption\": \"Toegestane waarden zijn: ${options}\",\n \"Constraint.Choice.InvalidOption.General\": \"Waarde '${value}' is niet toegestaan\",\n \"Constraint.Choice.MultipleNotAllowed\": \"Meerdere opties selecteren is niet toegestaan\",\n \"Constraint.ConfirmCurrentPassword.Invalid\": \"Moet overeenkomen met het huidige wachtwoord\",\n \"Constraint.Date.AboveMaximum\": \"Moet op of voor ${max-date} liggen\",\n \"Constraint.Date.BelowMinimum\": \"Moet op of na ${min-date} liggen\",\n \"Constraint.Date.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.Date.NotOnDate\": \"Moet op ${date} liggen\",\n \"Constraint.Date.OutOfRange\": \"Moet tussen ${min-date} en ${max-date} liggen\",\n \"Constraint.DateRange.InvalidRange\": \"De begindatum dient voor de einddatum te liggen\",\n \"Constraint.DateRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of einddatum bevatten\",\n \"Constraint.DateTime.AboveMaximum\": \"Moet voor ${max-date-time} liggen\",\n \"Constraint.DateTime.BelowMinimum\": \"Moet op ${min-date-time} of later liggen\",\n \"Constraint.DateTime.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.DateTime.OutOfRange\": \"Moet tussen ${min-date-time} en ${max-date-time} liggen\",\n \"Constraint.DateTimeRange.InvalidRange\": \"De begindatumtijd dient voor de einddatumtijd te liggen\",\n \"Constraint.DateTimeRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of einddatumtijd bevatten\",\n \"Constraint.Document.MimeTypeNotAllowed\": \"Het document mime type voldoet niet aan het document type\",\n \"Constraint.Email.InvalidFormat\": \"Moet een geldig emailadres zijn\",\n \"Constraint.File.DataEmpty\": \"Bestand bestaat niet of heeft geen inhoud\",\n \"Constraint.File.InvalidExtension\": \"Toegestane extensies zijn: ${extensions}\",\n \"Constraint.File.InvalidFormat\": \"Voldoet niet aan de voorwaarden van een bestandsnaam\",\n \"Constraint.File.InvalidMimeType\": \"Toegestane mime-types zijn: ${mime-types}\",\n \"Constraint.File.MaxFileSizeExceeded\": \"De maximum file grootte voor upload is ${max-filesize}\",\n \"Constraint.File.OnlyAllowsOneFile\": \"Er is slechts één bestand toegestaan\",\n \"Constraint.IBAN.InvalidFormat\": \"Moet een geldig IBAN nummer zijn\",\n \"Constraint.InvalidLengthBetween\": \"Lengte moet tussen ${min-length} en ${max-length} karakters liggen\",\n \"Constraint.InvalidLengthExact\": \"Lengte moet precies ${length} karakters zijn\",\n \"Constraint.InvalidLengthTooLong\": \"Lengte mag niet langer dan ${max-length} karakters zijn\",\n \"Constraint.InvalidLengthTooShort\": \"Lengte moet tenminste ${min-length} karakters zijn\",\n \"Constraint.InvalidRegularExpression\": \"De waarde voldoet niet aan de reguliere expressie ${regexp}\",\n \"Constraint.Mandatory\": \"Veld is verplicht\",\n \"Constraint.Missing\": \"Veld is verplicht\",\n \"Constraint.Number.AboveMaximum\": \"Mag niet groter dan ${max-number} zijn\",\n \"Constraint.Number.BelowMinimum\": \"Moet minstens ${min-number} zijn\",\n \"Constraint.Number.InvalidDecimal\": \"Moet een getal zijn met maximaal ${max-digits} decimalen\",\n \"Constraint.Number.InvalidInteger\": \"Moet een geheel getal zijn\",\n \"Constraint.Number.InvalidLong\": \"Moet een geheel getal zijn\",\n \"Constraint.Number.OutOfRange\": \"Moet tussen ${min-number} en ${max-number} liggen\",\n \"Constraint.NumberRange.BothFieldsMandatory\": \"Moet zowel een begin- als een eindwaarde bevatten\",\n \"Constraint.NumberRange.InvalidRange\": \"De beginwaarde dient kleiner te zijn dan de eindwaarde\",\n \"Constraint.NumberRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten\",\n \"Constraint.Password.AlreadyUsed\": \"Mag niet eerder zijn gebruikt\",\n \"Constraint.Password.LowerAndUpperCaseMandatory\": \"Moet zowel hoofdletters als kleine letters bevatten\",\n \"Constraint.Password.MinNumericCharactersMandatory\": \"Moet ${min-numeric} of meer numerieke karakters bevatten\",\n \"Constraint.Password.MinSpecialCharactersMandatory\": \"Moet ${min-special} of meer speciale karakters bevatten\",\n \"Constraint.Password.ThreeConsecutiveCharactersNotAllowed\": \"Mag niet meer dan twee dezelfde karakters achter elkaar bevatten\",\n \"Constraint.Password.Unchanged\": \"Mag niet hetzelfde zijn als het oude wachtwoord\",\n \"Constraint.Password.UserNameSubstringNotAllowed\": \"Mag niet vijf opeenvolgende karakters van de gebruikersnaam bevatten\",\n \"Constraint.SortParameter.InvalidValue\": \"Ongeldige sorteerparameter. Toegestane waardes: veld+[asc|desc]\",\n \"Constraint.Time.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.TimeRange.InvalidRange\": \"De begintijd dient voor de eindtijd te liggen\",\n \"Constraint.TimeRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindtijd bevatten\",\n \"Constraint.TimeStamp.AboveMaximum\": \"Moet op of voor ${max-date} liggen\",\n \"Constraint.TimeStamp.BelowMinimum\": \"Moet op of na ${min-date} liggen\",\n \"Constraint.Timestamp.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.TimeStampRange.InvalidRange\": \"De beginwaarde dient voor de eindwaarde te liggen\",\n \"Constraint.TimeStampRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten\",\n \"Constraint.XML.InvalidFormat\": \"Moet geldige XML zijn\",\n \"Constraint.ZipCode.InvalidFormat\": \"Moet een geldige postcode zijn, bijvoorbeeld 1234AB\",\n \"Error.AcceptHeaderRequired\": \"De 'Accept' request-header moet worden meegegeven\",\n \"Error.Authentication.BlockedUser\": \"U bent uitgelogd omdat uw account geblokkeerd is\",\n \"Error.Authentication.ConcurrentUser\": \"U bent uitgelogd omdat uw gebruikersnaam op een andere locatie is gebruikt om in te loggen.\",\n \"Error.Authentication.InvalidCredentials\": \"Inloggen is mislukt\",\n \"Error.Authentication.InvalidUsername\": \"U bent uitgelogd omdat uw gebruikersnaam niet meer geldig is\",\n \"Error.Authentication.Required\": \"Autorisatie is vereist\",\n \"Error.Case.ConcurrentModification\": \"Een andere gebruiker heeft het dossier aangepast waardoor deze taak nu niet meer is toegestaan\",\n \"Error.ChangePasswordRequired\": \"Gebruikerswachtwoord is initieel of verlopen, en moet worden aangepast\",\n \"Error.CodemapLookup.InvalidToken\": \"Token voor keuzelijst lookup is niet valide\",\n \"Error.DataStore.ConcurrentModification\": \"Een andere gebruiker heeft de rij in de datastore reeds aangepast\",\n \"Error.DataStore.RecordAlreadyExists\": \"\",\n \"Error.DataStore.RowCannotBeLocked\": \"Een andere gebruiker heeft de rij in bewerking en daarom kan deze taak niet worden volbracht.\",\n \"Error.Form.DataNotAvailableForId\": \"Service kan niet worden afgrond, data voor verplicht element ${elementid} is niet beschikbaar\",\n \"Error.Form.ObjectNotAllowed\": \"Object '${objectid}' is niet toegestaan\",\n \"Error.Form.ReadOnlyElementId\": \"Element '${elementid}' is alleen lezen\",\n \"Error.Form.TooManyObjects\": \"Te veel objecten '${objectid}' aangeleverd\",\n \"Error.Form.UndefinedElementId\": \"Element '${elementid}' is ongedefinieerd\",\n \"Error.Form.UndefinedObject\": \"Object(en) '${objectid}' ongedefinieerd\",\n \"Error.GeneralError\": \"Er is een onverwachte fout opgetreden\",\n \"Error.MethodNotAllowed\": \"De opgegeven HTTP methode is niet toegestaan op deze resource\",\n \"Error.Parameter.InvalidValue\": \"De parameter bevat karakters die niet zijn toegestaan\",\n \"Error.Parameter.Mandatory\": \"De parameter ${parameter} is verplicht\",\n \"Error.Parameter.NotAllowed\": \"Parameter '${parameter}' is niet toegestaan\",\n \"Error.ResourceNotFound\": \"De opgevraagde resource kan niet worden gevonden\",\n \"Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch\": \"Het wachtwoord en de wachtwoordbevestiging komen niet overeen\",\n \"Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists\": \"Een gebruiker met e-mailadres '${Email}' bestaat al\",\n \"Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists\": \"Een gebruiker met gebruikersnaam '${Username}' bestaat al\",\n \"Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists\": \"Een organisatie met id '${ID}' bestaat al\"\n}\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport { Cache, clearCookie, setCookie } from \"@beinformed/ui/utils\";\n\nimport { Locales } from \"../../i18n/Locales\";\n\nexport interface I18nState {\n locales: Locales;\n locale: string;\n}\n\nexport const receiveLocale = (locale: string) => updateLocale(locale);\n\nexport const updateLocale = createAction(\"UPDATE_LOCALE\", (locale: string) => {\n return { payload: locale };\n});\n\nexport const setLocales = createAction(\n \"SET_LOCALES\",\n (locales: Locales, locale: string) => {\n return { payload: { locales, locale } };\n },\n);\n\nconst getDefaultLocale = () => {\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator?.language.split(\"-\")[0] || \"en\";\n }\n return \"en\";\n};\n\nconst initialState = {\n locales: new Locales(),\n locale: getDefaultLocale(),\n};\n\nexport const i18nReducer = createReducer<I18nState>(initialState, (builder) => {\n builder\n .addCase(updateLocale, (state, action) => {\n if (state.locales?.length > 1) {\n setCookie(\"locale\", action.payload);\n } else {\n clearCookie(\"locale\");\n }\n\n // clear cache because of cached contributions\n Cache.clear();\n\n state.locale = action.payload;\n })\n .addCase(setLocales, (state, action) => {\n const { locale, locales } = action.payload;\n\n if (state.locales.length > 1) {\n setCookie(\"locale\", locale);\n } else {\n clearCookie(\"locale\");\n }\n\n state.locales = locales;\n if (locale) {\n state.locale = locale;\n }\n });\n});\n","import type { Locales } from \"../../i18n/Locales\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve the locale from state\n */\nexport const getLocale = (state: RootState) => {\n return state.i18n?.locale ?? \"en\";\n};\n\n/**\n * Retrieve all available locales in the store\n */\nexport const getLocales = (state: RootState): Locales => state.i18n.locales;\n"],"mappings":"AAMO,IAAMA,EAA6B,CACxC,UAAW,CACT,KAAM,EACN,WAAY,CACd,EACA,IAAK,CACH,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,CACN,EACA,KAAM,CACJ,GAAI,CAAC,OAAQ,MAAM,EACnB,GAAI,CAAC,YAAa,gCAAO,EACzB,GAAI,CAAC,YAAa,WAAW,EAC7B,GAAI,CAAC,OAAQ,OAAO,EACpB,GAAI,CAAC,UAAW,0BAAM,EACtB,GAAI,CAAC,YAAa,aAAU,EAC5B,GAAI,CAAC,SAAU,4CAAS,EACxB,GAAI,CAAC,WAAY,4CAAS,EAC1B,GAAI,CAAC,OAAQ,0BAAM,EACnB,GAAI,CAAC,SAAU,OAAO,EACtB,GAAI,CAAC,cAAe,4EAA0B,EAC9C,GAAI,CAAC,UAAW,4CAAS,EACzB,GAAI,CAAC,aA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AAmB,IACnB,OAAO,UAAc,KAAe,WAAW,UAC1C,WAAW,SAAS,MAAM,GAAG,EAAE,CAAC,GAAK,KAK1CC,EAAe,CACnB,QAAS,IAAIC,EACb,OAAQF,EAAiB,CAC3B,EAEaG,EAAcC,EAAyBH,EAAeI,GAAY,CAC7EA,EACG,QAAQT,EAAc,CAACU,EAAOC,IAAW,CACpCD,EAAM,SAAS,OAAS,EAC1BE,EAAU,SAAUD,EAAO,OAAO,EAElCE,EAAY,QAAQ,EAItBC,EAAM,MAAM,EAEZJ,EAAM,OAASC,EAAO,OACxB,CAAC,EACA,QAAQT,EAAY,CAACQ,EAAOC,IAAW,CACtC,GAAM,CAAE,OAAAZ,EAAQ,QAAAI,CAAQ,EAAIQ,EAAO,QAE/BD,EAAM,QAAQ,OAAS,EACzBE,EAAU,SAAUb,CAAM,EAE1Bc,EAAY,QAAQ,EAGtBH,EAAM,QAAUP,EACZJ,IACFW,EAAM,OAASX,EAEnB,CAAC,CACL,CAAC,EC1DM,IAAMgB,EAAaC,GACjBA,EAAM,MAAM,QAAU,KAMlBC,GAAcD,GAA8BA,EAAM,KAAK","names":["languages","formatMessage","immerable","IllegalStateException","getBooleanSetting","IS_DEV","Locale","immerable","#code","#messages","#errors","#nativeName","locale","formatMessage","languageCode","language","languages","IllegalStateException","message","messages","id","defaultMessage","messageFromLocale","IS_DEV","getBooleanSetting","parameters","errors","IllegalArgumentException","BaseCollection","beinformed_error_messages_en_nl_default","beinformed_error_messages_nl_nl_default","availableLocales","beinformed_error_messages_en_nl_default","beinformed_error_messages_nl_nl_default","createLocalesWithConfiguredErrors","configuredErrors","availableLocale","Locales","_Locales","BaseCollection","locales","locale","Locale","hydatedLocales","localeCode","item","IllegalArgumentException","acceptLanguageHeader","preferredLocales","messages","errors","createAction","createReducer","Cache","clearCookie","setCookie","receiveLocale","locale","updateLocale","createAction","setLocales","locales","getDefaultLocale","initialState","Locales","i18nReducer","createReducer","builder","state","action","setCookie","clearCookie","Cache","getLocale","state","getLocales"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-SPV6MD7J.js";import{e as s}from"./chunk-KZB56W7Q.js";import{b as a}from"./chunk-FW4363Y4.js";var n=a(p(),1);import{ModelResolver as f,ModularUIResponse as h}from"@beinformed/ui/modularui";var l=r=>{let o=h.rehydrate(r),e=f.resolve(o);if(e){let t=new e(o);if(r.childModels){let d=r.childModels.map(c=>l(c)).filter(c=>c!=null);t.addChildModels(d)}return t}},u=r=>r!=null&&typeof r=="object"&&(0,n.default)(r,"data")&&(0,n.default)(r,"contributions")&&(0,n.default)(r,"key")&&typeof r.key=="string"&&(0,n.default)(r,"locale")&&typeof r.locale=="string",y=(r,o)=>Array.isArray(o)?o.map(t=>i(t)):u(o)?l(o):r==="i18n"&&(0,n.default)(o,"locales")&&(0,n.default)(o,"locale")?{locales:s.rehydrate(o.locales),locale:o?.locale}:["preferences","router","progressindicator","modelcatalog"].includes(r)?o:o!==null&&typeof o=="object"?i(o):o,i=r=>{let o={};return Object.keys(r).forEach(e=>{let t=r[e];o[e]=y(e,t)}),o};import{JsonParseException as m}from"@beinformed/ui/exceptions";var k=()=>{let r=document.querySelector('script[type="application/json"][data-app-state="app-json"]');if(r){if(r?.textContent?.trim()==="")return{}}else throw new Error("Error loading state, json not found");let o=r.textContent||"";try{let e=JSON.parse(o);return i(e)}catch{throw new m(`Error parsing content ${o}`)}};export{i as a,k as b};
|
|
2
|
+
//# sourceMappingURL=chunk-KZLW2NHD.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as _,e as E}from"./chunk-
|
|
1
|
+
import{b as _,e as E}from"./chunk-BV77KA4Y.js";import{a as d,b as U,i as T}from"./chunk-SPV6MD7J.js";import{H as P}from"./chunk-ITSZQHGD.js";import{j as y}from"./chunk-KZB56W7Q.js";import{a as R}from"./chunk-6AKWSGWH.js";import{a as v,b as x}from"./chunk-GD4NSZBN.js";import{b as h,e as c,g as u,h as S,i as g}from"./chunk-FBCZEJSD.js";import{b as M}from"./chunk-FW4363Y4.js";import{ModularUIRequest as L}from"@beinformed/ui/modularui";var I=e=>{try{let t=y(e.getState()),r=new L("/",{locale:t}).fetchSync();r.connectKey=`application(/)(${t})`,e.dispatch(P([{key:`application(/)(${t})`,model:r}]))}catch{}};import{getContextPath as N}from"@beinformed/ui/settings";(function(){typeof __webpack_public_path__<"u"&&(__webpack_public_path__=`${N()}/`)})();var w=e=>{if(e?.contextPath===void 0)throw new Error("Missing contextPath argument");if(e.html===void 0)throw new Error("Missing html for server");let{head:t={}}=e;return`
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html ${t.htmlAttributes?t.htmlAttributes.toString():""}>
|
|
4
4
|
<head>
|
|
@@ -19,4 +19,4 @@ import{b as _,e as E}from"./chunk-3UHZ6GBP.js";import{a as d,b as U,i as T}from"
|
|
|
19
19
|
</body>
|
|
20
20
|
</html>
|
|
21
21
|
`.replace(/{CONTEXT_PATH}/g,e.contextPath).trim()};import{renderToString as O}from"react-dom/server";import{Provider as $}from"react-redux";import{ServerStyleSheet as D,StyleSheetManager as V}from"styled-components";import{getContextPathServer as j}from"@beinformed/ui/settings";var b=e=>{let t=e.getState(),r={};for(let o in t.modularui){let n=t.modularui[o];if(n){let{status:s,model:p,lastModification:m}=n;p?r[o]={status:s,lastModification:m,model:p}:r[o]={status:s,lastModification:m,model:void 0}}}let i={...t,modularui:r};return JSON.stringify(i).replace(/</g,"\\u003c")};import{jsx as l}from"react/jsx-runtime";var k=({store:e,theme:t,UUID:r="",render:i,template:o=w})=>{let n=new D,s=O(l($,{store:e,children:l(V,{sheet:n.instance,children:l(x,{theme:t,children:i()})})})),p=F(n);return o({contextPath:j(),html:s,head:p,state:b(e),UUID:r})},F=(e,t)=>{let r=e.getStyleTags(),i=t?.helmet,o=t?[...i.meta]:[];return t?{...i,style:r,meta:o}:{style:r,meta:o}};var B=M(U(),1);import{createUUID as X}from"@beinformed/ui/utils";var J=(e,t)=>{t.forEach(r=>{if(typeof r=="object"){let{name:i,defaultValue:o,type:n}=r;o&&e.dispatch(c(i,o,n))}else e.dispatch(c(r,null))})},A=(e,t)=>{Array.isArray(t)&&J(e,t),e.dispatch(u()),e.dispatch(g()),e.dispatch(S()),preferencesProvider&&preferencesProvider.isStudioContext&&preferencesProvider.isStudioContext()&&e.dispatch(h("isStudioContext",!0))};var q=e=>{let t=e.getState();if(t.error&&(t.error.shouldThrowOnServer||!(0,B.default)(t.error,"shouldThrowOnServer")))throw t.error},Ee=({request:e,locales:t,customReducers:r,serverPreferences:i=[],theme:o,render:n,template:s,beforeRenderHooks:p,preloadApplication:m=!0})=>{if(e.getHeader("X-BI-Preview-Available"))return"<h1>Preview Available</h1>";let f=X();__webpack_nonce__=f;let C=_(e),a=T({router:{location:C,action:void 0}},r);if(A(a,i),R(a),o){let H=a.getState()?.preferences?.theme;v(H,o)}return E(a,t,e),m&&I(a),q(a),d(p,{store:a,request:e}),k({store:a,theme:o,UUID:f,render:n,template:s})};export{I as a,w as b,b as c,k as d,F as e,J as f,A as g,Ee as h};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-OQK6SSUD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as a,A as w,D,F as H,G as x,H as k,I as E,J as P,K as b,L as B,f as l,h as J,j as c,k as p,l as u,m,n as f,r as y,u as S,v as I,w as h,x as M,y as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{$ as a,A as w,D,F as H,G as x,H as k,I as E,J as P,K as b,L as B,f as l,h as J,j as c,k as p,l as u,m,n as f,r as y,u as S,v as I,w as h,x as M,y as g}from"./chunk-ITSZQHGD.js";import{i as C}from"./chunk-KZB56W7Q.js";import{d as R}from"./chunk-FBCZEJSD.js";import{a as s}from"./chunk-FW4363Y4.js";var G=s((rt,W)=>{"use strict";var ye=Object.prototype,Re=ye.hasOwnProperty;function Se(e,t){return e!=null&&Re.call(e,t)}W.exports=Se});var ge=s((nt,_)=>{"use strict";var Ie=G(),he=J();function Me(e,t){return e!=null&&he(e,t,Ie)}_.exports=Me});var we=(e=[],t)=>{if(e.length>0)for(let o of e)o(t)};import{createBrowserHistory as z}from"history";import{getContextPathServer as $}from"@beinformed/ui/settings";var i=null,O=null;function v(){if(typeof window>"u")throw new Error("getBrowserHistory can only be used in a browser environment.");let e=$();return(!i||e!==O)&&(i=z({basename:e}),O=e),i}import{createAction as Q,createReducer as V}from"@reduxjs/toolkit";var X={location:void 0,action:void 0},Y=Q("ROUTER/LOCATION_CHANGE",(e,t)=>({payload:{location:e,action:t}})),U=V(X,e=>{e.addCase(Y,(t,o)=>{t.location=o.payload.location,t.action=o.payload.action})});import{createReducer as Z}from"@reduxjs/toolkit";import{ApplicationModel as ee}from"@beinformed/ui/models";var te={},oe=(e,t)=>{let{key:o,error:r}=t.payload;e[o]?(e[o].status="ERROR",e[o].lastModification=Date.now()):e[o]={model:void 0,status:"ERROR",lastModification:Date.now()},e[o].error=r},re=(e,t)=>{let{key:o,model:r}=t.payload;e[o]={model:r||void 0,lastModification:Date.now(),status:r?"FINISHED":"IDLE"}},ne=(e,t)=>{let{payload:o}=t;for(let{key:r,model:n}of o)e[r]={status:"FINISHED",lastModification:Date.now(),model:n}},F=(e,t)=>{let o=t.payload,r=Object.keys(e).find(n=>e[n]?.model?.connectKey===o.connectKey);r&&e[r]?(e[r].model=o,e[r].lastModification=Date.now(),e[r].status="FINISHED",e[r].error=void 0):console.debug(`ModularUIReducer: Cannot update model with key ${o.connectKey} - model not found in state.`)},ae=(e,t)=>{delete e[t.payload]},de=e=>{for(let t in e)e[t]?.model instanceof ee||delete e[t]},ie=(e,t)=>{let{key:o}=t.meta.arg;e[o]?(e[o].status="LOADING",e[o].lastModification=Date.now(),e[o].error=void 0):e[o]={model:void 0,status:"LOADING",lastModification:Date.now(),error:void 0}},se=(e,t)=>{let{key:o,model:r,updateHandler:n}=t.payload,d=r;n&&(d=n(r)),e[o]={model:d,lastModification:Date.now(),status:"FINISHED",error:void 0}},le=(e,t)=>{let{key:o}=t.meta.arg,r=t.payload;e[o]?(e[o].status="ERROR",e[o].lastModification=Date.now(),e[o].error=r):e[o]={model:void 0,status:"ERROR",lastModification:Date.now(),error:r}},T=Z(te,e=>{e.addCase(H,oe).addCase(x,re).addCase(k,ne).addCase(E,F).addCase(P,F).addCase(b,ae).addCase(B,de).addCase(a.pending,ie).addCase(a.fulfilled,se).addCase(a.rejected,le)});import{createReducer as ce}from"@reduxjs/toolkit";var pe={count:0,timestamp:0,percentComplete:0},A=e=>({...e,count:e.count+1}),L=e=>{let t=e.count-1===0;return{...e,count:e.count<=0?0:e.count-1,timestamp:t?Date.now():e.timestamp,percentComplete:t?0:e.percentComplete}},ue=e=>({...e,count:0,timestamp:Date.now(),percentComplete:0}),j=ce(pe,e=>{e.addCase(p,A).addCase(u,L).addCase(m,t=>({...t,count:0})).addCase(f,(t,o)=>({...t,percentComplete:o.payload?.percentComplete})).addCase(a.pending,A).addCase(a.fulfilled,L).addCase(a.rejected,ue)});var N=e=>t=>o=>r=>{if(S.match(r)){let{location:n,state:d}=r.payload;e.push(n,d)}else if(I.match(r)){let{location:n,state:d}=r.payload;e.replace(n,d)}else if(h.match(r)){let{delta:n}=r.payload;e.go(n)}else M.match(r)?e.goBack():g.match(r)&&e.goForward();return o(r)};import{combineReducers as K,configureStore as me}from"@reduxjs/toolkit";var q={router:U,preferences:R,modularui:T,i18n:C,auth:l,error:w,modals:D,modelcatalog:c,notification:y,progressindicator:j},fe=K(q),tt=(e,t,o=v())=>{let r=t?K({...q,...t}):fe;return me({reducer:r,middleware:n=>n({serializableCheck:!1}).concat(N(o)),preloadedState:e})};export{we as a,ge as b,v as c,Y as d,U as e,T as f,j as g,N as h,tt as i};
|
|
2
|
+
//# sourceMappingURL=chunk-SPV6MD7J.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as b,J as u,L as w,U as C,V as p,a as B,b as M,c as k,k as f,l,u as _,x as q}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{$ as b,J as u,L as w,U as C,V as p,a as B,b as M,c as k,k as f,l,u as _,x as q}from"./chunk-ITSZQHGD.js";import{c as bt}from"./chunk-L7DO7AZT.js";import{a as ft,d as U}from"./chunk-HTR32BUX.js";import{a as g,b as R}from"./chunk-FW4363Y4.js";var W=g((Re,K)=>{"use strict";var Ot=ft(),Mt=function(){return Ot.Date.now()};K.exports=Mt});var G=g((Be,$)=>{"use strict";var At=/\s/;function Et(t){for(var e=t.length;e--&&At.test(t.charAt(e)););return e}$.exports=Et});var z=g((ke,X)=>{"use strict";var Tt=G(),It=/^\s+/;function St(t){return t&&t.slice(0,Tt(t)+1).replace(It,"")}X.exports=St});var Z=g((Ue,Y)=>{"use strict";var vt=z(),J=U(),Dt=bt(),Q=NaN,jt=/^[-+]0x[0-9a-f]+$/i,xt=/^0b[01]+$/i,Pt=/^0o[0-7]+$/i,Rt=parseInt;function Bt(t){if(typeof t=="number")return t;if(Dt(t))return Q;if(J(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=J(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=vt(t);var o=xt.test(t);return o||Pt.test(t)?Rt(t.slice(2),o?2:8):jt.test(t)?Q:+t}Y.exports=Bt});var S=g((_e,et)=>{"use strict";var kt=U(),I=W(),tt=Z(),Ut="Expected a function",_t=Math.max,qt=Math.min;function wt(t,e,o){var r,i,s,m,a,c,h=0,D=!1,F=!1,A=!0;if(typeof t!="function")throw new TypeError(Ut);e=tt(e)||0,kt(o)&&(D=!!o.leading,F="maxWait"in o,s=F?_t(tt(o.maxWait)||0,e):s,A="trailing"in o?!!o.trailing:A);function E(n){var d=r,y=i;return r=i=void 0,h=n,m=t.apply(y,d),m}function ct(n){return h=n,a=setTimeout(O,e),D?E(n):m}function dt(n){var d=n-c,y=n-h,P=e-d;return F?qt(P,s-y):P}function j(n){var d=n-c,y=n-h;return c===void 0||d>=e||d<0||F&&y>=s}function O(){var n=I();if(j(n))return x(n);a=setTimeout(O,dt(n))}function x(n){return a=void 0,A&&r?E(n):(r=i=void 0,m)}function lt(){a!==void 0&&clearTimeout(a),h=0,r=c=i=a=void 0}function pt(){return a===void 0?m:x(I())}function T(){var n=I(),d=j(n);if(r=arguments,i=this,c=n,d){if(a===void 0)return ct(c);if(F)return clearTimeout(a),a=setTimeout(O,e),E(c)}return a===void 0&&(a=setTimeout(O,e)),m}return T.cancel=lt,T.flush=pt,T}et.exports=wt});import{createAsyncThunk as L}from"@reduxjs/toolkit";import{CHANGEPASSWORD_PATH as ht}from"@beinformed/ui/constants";import{Authenticate as Ft}from"@beinformed/ui/modularui";import{Cache as H}from"@beinformed/ui/utils";var N=t=>k(t),V=L("auth/change_pass",(t,{getState:e})=>{let o=e().router.location?.state?.modal,r=e().router.location?.state?.from;return _(ht,{from:r||e().router.location,modal:o})}),Ae=L("auth/login",async({username:t,password:e},{dispatch:o,getState:r})=>{o(f());try{await new Ft().login(t,e),await o(p()),H.addItem("auth",!0),C(r())?.userMustChangePassword?o(V()):o(B()),o(l())}catch(i){typeof i=="object"&&i!=null&&"id"in i&&typeof i.id=="string"?i.id==="Error.ChangePasswordRequired"?(H.addItem("auth",!0),await o(p()),o(V())):o(N(i.id)):i instanceof Error&&o(N(i.message)),o(l())}});import{createAsyncThunk as yt}from"@reduxjs/toolkit";import{Authenticate as gt}from"@beinformed/ui/modularui";var xe=yt("auth/logout",async(t,{dispatch:e})=>{e(f()),await new gt().logout(),e(w()),e(p()),e(M()),e(l())});var rt=R(S(),1);import{HTTP_METHODS as Ct}from"@beinformed/ui/constants";import{FormModel as Ht}from"@beinformed/ui/models";import{ModularUIRequest as Nt}from"@beinformed/ui/modularui";import{getNumberSetting as Vt}from"@beinformed/ui/settings";var Lt=(o=>(o[o.START=0]="START",o[o.FINISHED=1]="FINISHED",o))(Lt||{}),ot=(t,e)=>({type:"UPDATE_AUTOSAVE_STATUS",payload:{status:t,model:e}}),Kt=(t,e)=>{t(ot(0,e));let o=e.getFormData(!0,!1);new Nt(e.selfhref.setParameter("commit","true"),{method:Ct.POST,data:o,childmodels:!1,locale:e.locale}).fetch().then(r=>{r instanceof Ht&&(e.lastServerUpdate=r.lastServerUpdate,t(u(e)),t(ot(1,r)))})},Wt=(0,rt.default)((t,e)=>{Kt(t,e)},Vt("VALIDATE_DEBOUNCE_TIMEOUT",500)),it=t=>e=>Wt(e,t);import{produce as $t}from"immer";import{HTTP_METHODS as Gt}from"@beinformed/ui/constants";import{FormModel as Xt}from"@beinformed/ui/models";var at=(t,e,o=!1)=>{for(;t.allObjects.length>0&&(!t.currentFormObject||!t.currentFormObject.hasAttributeByKey(e.key));)t.setPreviousObject();return t.isChanged()||o?b({key:t.connectKey||t.key,href:t.selfhref,options:{method:Gt.POST,data:t.formdata,updateHandler:r=>r instanceof Xt?$t(t,i=>{i.update(r)}):r}}):null};import{produce as zt}from"immer";import{HTTP_METHODS as Jt}from"@beinformed/ui/constants";import{FormModel as Qt}from"@beinformed/ui/models";var nt=(t,e)=>{for(;t.allObjects.length>0&&(!t.currentFormObject||!t.currentFormObject.hasAttributeByKey(e.key));)t.setPreviousObject();return t.isChanged()?b({key:t.connectKey||t.key,href:t.selfhref.setParameter("commit","false"),options:{method:Jt.POST,data:t.formdata,updateHandler:o=>o instanceof Qt?zt(t,r=>{r.updateCurrentFormObject(o)}):o}}):null};var mt=R(S(),1);import{createAsyncThunk as Yt}from"@reduxjs/toolkit";import{produce as Zt}from"immer";import{HTTP_METHODS as te}from"@beinformed/ui/constants";import{FormModel as st}from"@beinformed/ui/models";import{ModularUIRequest as ee}from"@beinformed/ui/modularui";import{getNumberSetting as oe}from"@beinformed/ui/settings";var re=Yt("",({form:t,formWithValidations:e},{dispatch:o,getState:r})=>{if(t.connectKey){let i=r().modularui[t.connectKey];if(i){let s=i.model;if(s instanceof st){let m=Zt(s,a=>{a.updateValidations(e.data)});o(u(m))}}}}),ie=(0,mt.default)((t,e)=>{new ee(e.selfhref.setParameter("commit","false"),{method:te.POST,data:e.validationData,childmodels:!1,isValidationRequest:!0,locale:e.locale}).fetch().then(o=>{o instanceof st&&t(re({form:e,formWithValidations:o}))})},oe("VALIDATE_DEBOUNCE_TIMEOUT",500),{leading:!0,trailing:!0}),ut=t=>e=>ie(e,t);import{createAsyncThunk as ae}from"@reduxjs/toolkit";import{produce as ne}from"immer";import{getBooleanSetting as me}from"@beinformed/ui/settings";var ho=ae("form/attribute",async({form:t,formObject:e,attribute:o,inputvalue:r,options:i={autosubmit:!1,autosave:!1,autoupdate:!1,forceUpdate:!1,validate:!0}},{dispatch:s})=>{i.validate===void 0&&(i.validate=!0);let m=ne(t,a=>{a.currentFormObject?.equals(e)?a.currentFormObject.updateAttribute(o,r):a.completedFormObjects.forEach(c=>{c.equals(e)&&c.updateAttribute(o,r)})});if(i.autosubmit&&m.isValid){let a=at(m,o,i.forceUpdate);if(a){s(a);return}}if(i.autoupdate&&m.isValid){let a=nt(m,o);if(a){s(a);return}}se(s,m,i),ue(s,m,i),s(u(m))}),se=(t,e,o)=>{o.autosave&&e.isValid&&e.isChanged()&&t(it(e))},ue=(t,e,o)=>{o.validate&&e.currentFormObject?.hasDynamicValidations&&me("USE_INSTANT_SERVER_VALIDATION",!1)&&t(ut(e))};import{createAsyncThunk as ce}from"@reduxjs/toolkit";import{produce as de}from"immer";import{Authenticate as le}from"@beinformed/ui/modularui";var So=t=>{let e=de(t,o=>{o.setPreviousObject()});return u(e)},vo=ce("form/cancel",async(t,{dispatch:e,getState:o})=>(t.key==="ChangePassword"&&o().auth.mustChangePassword&&(e(f()),await new le().logout(),e(M()),e(p()),e(l())),q()));import{produce as v}from"immer";var Po=t=>{let e=v(t,o=>{o.addEmptyFormObject()});return u(e)},Ro=(t,e)=>{let o=v(t,r=>{r.addEmptyFormObject(),r.removeFormObject(e)});return u(o)},Bo=(t,e)=>{let o=v(t,r=>{r.removeFormObject(e)});return u(o)};var Uo=t=>{if(t.modelcatalog?.entryDate)return t.modelcatalog?.entryDate;let e=new Date().toISOString();return e.split("T")[0]||e};var wo=(t,e)=>b({key:t.connectKey||"",href:t.selfhref||"",options:{...e,isReload:!0}});export{N as a,V as b,Ae as c,xe as d,Lt as e,it as f,at as g,nt as h,ut as i,ho as j,So as k,vo as l,Po as m,Ro as n,Bo as o,Uo as p,wo as q};
|
|
2
|
+
//# sourceMappingURL=chunk-TAWZ2VIM.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as k}from"./chunk-JWOBKHOJ.js";import{c as Oe,d as Se,j as Ue,k as Ce,l as Te,m as be,n as Re,o as He,p as ve,q as N}from"./chunk-TAWZ2VIM.js";import{$ as C,B as ce,C as ue,K as v,M as de,N as me,O as fe,P as Me,Q as ge,R as he,S as ye,T as xe,U as Ie,d as W,g as Bt,h as Ft,i as j,k as Y,l as X,m as Z,n as ee,p as te,q as oe,s as re,u as ne,v as se,w as ie,x as ae,y as le}from"./chunk-ITSZQHGD.js";import{j as pe}from"./chunk-KZB56W7Q.js";import{a as wt}from"./chunk-7JMMW2FM.js";import{a as qt}from"./chunk-TDYPCNQI.js";import{d as J,f as Dt}from"./chunk-L7DO7AZT.js";import{d as Et,e as At,f as Lt,h as M,i as u}from"./chunk-HTR32BUX.js";import{a as h,b as Pt}from"./chunk-FW4363Y4.js";var V=h((na,Ke)=>{"use strict";var er=At(),tr=(function(){try{var e=er(Object,"defineProperty");return e({},"",{}),e}catch{}})();Ke.exports=tr});var ze=h((sa,Qe)=>{"use strict";var Ge=V();function or(e,t,o){t=="__proto__"&&Ge?Ge(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}Qe.exports=or});var We=h((ia,Ve)=>{"use strict";var rr=ze(),nr=Lt(),sr=Object.prototype,ir=sr.hasOwnProperty;function ar(e,t,o){var r=e[t];(!(ir.call(e,t)&&nr(r,o))||o===void 0&&!(t in e))&&rr(e,t,o)}Ve.exports=ar});var Ye=h((aa,je)=>{"use strict";var lr=We(),cr=J(),ur=Bt(),Je=Et(),pr=Dt();function dr(e,t,o,r){if(!Je(e))return e;t=cr(t,e);for(var n=-1,s=t.length,i=s-1,a=e;a!=null&&++n<s;){var l=pr(t[n]),d=o;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(n!=i){var m=a[l];d=r?r(m,l,a):void 0,d===void 0&&(d=Je(m)?m:ur(t[n+1])?[]:{})}lr(a,l,d),a=a[l]}return e}je.exports=dr});var Ze=h((la,Xe)=>{"use strict";var mr=wt(),fr=Ye(),Mr=J();function gr(e,t,o){for(var r=-1,n=t.length,s={};++r<n;){var i=t[r],a=mr(e,i);o(a,i)&&fr(s,Mr(i,e),a)}return s}Xe.exports=gr});var tt=h((ca,et)=>{"use strict";function hr(e,t){return e!=null&&t in Object(e)}et.exports=hr});var rt=h((ua,ot)=>{"use strict";var yr=tt(),xr=Ft();function Ir(e,t){return e!=null&&xr(e,t,yr)}ot.exports=Ir});var st=h((pa,nt)=>{"use strict";var Or=Ze(),Sr=rt();function Ur(e,t){return Or(e,t,function(o,r){return Sr(e,r)})}nt.exports=Ur});var at=h((da,it)=>{"use strict";var Cr=qt();function Tr(e){var t=e==null?0:e.length;return t?Cr(e,1):[]}it.exports=Tr});var ct=h((ma,lt)=>{"use strict";function br(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}lt.exports=br});var dt=h((fa,pt)=>{"use strict";var Rr=ct(),ut=Math.max;function Hr(e,t,o){return t=ut(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,s=ut(r.length-t,0),i=Array(s);++n<s;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=o(i),Rr(e,this,a)}}pt.exports=Hr});var ft=h((Ma,mt)=>{"use strict";function vr(e){return function(){return e}}mt.exports=vr});var gt=h((ga,Mt)=>{"use strict";function kr(e){return e}Mt.exports=kr});var xt=h((ha,yt)=>{"use strict";var Pr=ft(),ht=V(),Er=gt(),Ar=ht?function(e,t){return ht(e,"toString",{configurable:!0,enumerable:!1,value:Pr(t),writable:!0})}:Er;yt.exports=Ar});var Ot=h((ya,It)=>{"use strict";var Lr=800,Br=16,Dr=Date.now;function Fr(e){var t=0,o=0;return function(){var r=Dr(),n=Br-(r-o);if(o=r,n>0){if(++t>=Lr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}It.exports=Fr});var Ut=h((xa,St)=>{"use strict";var qr=xt(),wr=Ot(),Nr=wr(qr);St.exports=Nr});var Tt=h((Ia,Ct)=>{"use strict";var _r=at(),$r=dt(),Kr=Ut();function Gr(e){return Kr($r(e,void 0,_r),e+"")}Ct.exports=Gr});var Rt=h((Oa,bt)=>{"use strict";var Qr=st(),zr=Tt(),Vr=zr(function(e,t){return e==null?{}:Qr(e,t)});bt.exports=Vr});import{useEffect as Kt,useMemo as Gt,useState as ke}from"react";import{HTTP_METHODS as Qt}from"@beinformed/ui/constants";import{FormModel as zt,ListModel as Vt}from"@beinformed/ui/models";import{createSelector as Nt}from"reselect";import{ModularUIRequest as _t}from"@beinformed/ui/modularui";var $t=Nt([pe],e=>(t,o)=>{let r=new _t(t,o);return r.locale=e,r}),P=()=>u($t);var ln=e=>{let t=P(),[o,r]=ke(null),[n,s]=ke(0),i=Gt(()=>Wt(e),[e]),a=i.length;return Kt(()=>{let l=i.map(d=>{let m=d.selfhref.addParameter("commit","false");return t(m,{method:Qt.POST}).fetch().then(g=>(g instanceof zt&&(g.tokens=[]),{[d.name]:g}))});Promise.all(l).then(d=>{let m=Object.assign({},...d);r(m),s(d.length)})},[i,t]),n===a?o:null},Wt=e=>{if(!e.actionCollection)return[];let o=[...e.actionCollection.getActionsByType("create").filter(s=>!s.isDisabled)];e instanceof Vt&&e.listItemCollection.forEach(s=>{let i=s.actionCollection.getActionsByType("update").filter(a=>!a.isDisabled);o.push(...i)});let r=[],n=[];return o.forEach(s=>{n.includes(s.name)||(n.push(s.name),r.push(s))}),r};import{INTERNAL_LOGIN_TYPE as go}from"@beinformed/ui/constants";import{IllegalStateException as ho}from"@beinformed/ui/exceptions";import{Authenticate as yo}from"@beinformed/ui/modularui";import{getContextPath as xo,getContextPathServer as Io}from"@beinformed/ui/settings";import{Cache as T}from"@beinformed/ui/utils";import{ApplicationModel as co,CaseViewModel as uo,DetailModel as po,GroupingPanelModel as mo,TabModel as fo,UserProfileModel as Mo}from"@beinformed/ui/models";import{useMemo as L}from"react";import{HTTP_METHODS as Be}from"@beinformed/ui/constants";import{useMemo as Jt}from"react";var I=()=>u(e=>e.router.location),mn=()=>I()?.key??"",fn=()=>I()?.search,Mn=()=>I()?.pathname,Pe=()=>{let e=M();return Jt(()=>({push:(t,o)=>e(ne(t,o)),replace:(t,o)=>e(se(t,o)),go:t=>e(ie(t)),goBack:()=>e(ae()),goForward:()=>e(le())}),[e])};import{useEffect as Ae,useMemo as _,useRef as ro}from"react";import{useLocation as no}from"react-router";import{HTTP_METHODS as so}from"@beinformed/ui/constants";import{Href as $}from"@beinformed/ui/models";import{useEffect as jt,useRef as Yt}from"react";import{dequal as Xt}from"dequal/lite";import{IS_DEV as Zt}from"@beinformed/ui/utils";function eo(e){Zt&&(!e||e.length===0)&&console.warn("useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.")}function to(e){let t=Yt(e);return Xt(e,t.current)||(t.current=e),t.current}function Ee(e,t){eo(t),jt(e,to(t))}import{useMemo as oo}from"react";var E=(e,t)=>{let o=k();return oo(()=>`${e}(${t.split("?")[0]})(${o})`,[e,t,o])};var A=(e,t,o={})=>{let r=M(),n=_(()=>new $(t),[t]),s=_(()=>n.toString(),[n]),i=n.querystring,a=ro(i),l=E(e,s),d=u(p=>p.modularui[l]),m=_(()=>{let p={method:so.GET,removeOnUnmount:!0,...o};return t instanceof $&&(p.origin=p.origin??t.origin,p.contextPath=p.contextPath??t.contextPath),p},[o,t]),x=no().state?.redirectLocation,S=a.current!==i,c=d==null||d.status==="ERROR"||S||(x instanceof $?x.equals(s):!1)||m.isReload===!0;return Ae(()=>{a.current=i},[i]),Ee(()=>{s!==""&&c&&r(C({key:l,href:s,options:m}))},[l,s,m,c]),Ae(()=>{if(m.removeOnUnmount)return()=>{r(v(l))}},[r,l,m.removeOnUnmount]),d};var io=(e,t)=>{let o={expectedModels:[],method:Be.GET,data:void 0,...e,isReload:t||e.isReload};return e.formdata!=null&&(o.method=Be.POST,o.data=e.formdata),o},ao=(e,t)=>{t.length>0&&e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&(t.includes(e.type)||console.warn(e,"is not of instance",t))},f=(e,t,o={})=>{let r=L(()=>t.toString(),[t]),n=o.key??e,s=lo(n,r),i=L(()=>io(o,s),[o,s]),a=A(n,t,i),l=L(()=>o.expectedModels??[],[o.expectedModels]);return L(()=>{if(a?.model)return ao(a.model,l),a.model},[l,a])},lo=(e,t)=>{let o=I(),r=E(e,t),n=u(s=>s.modularui[r]);if(n){let s=o?.state?.reload||0;if(s>0){let i=n?.status==="FINISHED",a=n?.lastModification??0;if(i&&a<s)return!0}}return!1};var K=e=>f("application","/",{expectedModels:["Application"],targetModel:co,...e}),Qn=(e,t)=>f("tab",e,{expectedModels:["Tab"],targetModel:fo,...t}),zn=(e,t)=>f("caseview",e,{expectedModels:["CaseView"],targetModel:uo,...t}),Vn=(e,t)=>f("groupingpanel",e,{expectedModels:["GroupingPanel"],targetModel:mo,...t}),Wn=(e,t)=>f("detailpanel",e,{expectedModels:["Detail"],targetModel:po,...t}),Jn=(e,t)=>f("userprofile",e,{expectedModels:["UserProfile"],targetModel:Mo,...t});var as=()=>{T.setItem("isRedirectLogin",!1);let e=M(),t=K(),o=u(s=>s.auth),r=t?.isLoggedIn??!1,n=T.getItem("primaryAuthenticationType");return{isAuthenticated:r,primaryAuthenticationType:n??t?.authenticationTypes[0],authenticationTypes:t?.authenticationTypes??[],errorMessage:o.error,resetErrors:()=>e(W()),login:(s,i)=>e(Oe({username:s,password:i})),redirectLogin:s=>{if(T.getItem("isRedirectLogin"))throw new ho(`Could not redirect to '${s.authentication}' using url: '${s.redirectUri??""}'`);r||(T.setItem("isRedirectLogin",!0),window.location.assign(`${Io()}${s.redirectUri??""}`))}}},ls=()=>{let e=M(),t=K(),o=xo(),r=new yo,n=T.getItem("primaryAuthenticationType");return{isAuthenticated:t?.isLoggedIn??!1,primaryAuthenticationType:n??t?.authenticationTypes[0],authenticationTypes:t?.authenticationTypes??[],logout:()=>{if(r.authenticationType===go.PAC4J_INDIRECT)r.redirectToLogout();else if(T.getItem("isRedirectLogin")){let a=window.location.origin,l=`${a}${o}/logout?url=${a}${o}`;T.setItem("isRedirectLogin",!1),window.location.assign(l)}else return e(Se())},logoutUrl:r.getLogoutUrl()}};import{useEffect as Oo,useState as So}from"react";import{ModularUIRequest as Uo}from"@beinformed/ui/modularui";import{useCallback as B}from"react";var D=()=>{let e=M(),t=B(()=>{e(Y())},[e]),o=B(()=>{e(X())},[e]),r=B(()=>{e(Z())},[e]),n=B(s=>{e(ee(s))},[e]);return{start:t,finish:o,reset:r,update:n}},ms=()=>u(e=>e.progressindicator);var xs=(e,t)=>{let[o,r]=So([]),n=k(),{start:s,finish:i}=D(),a=e.map(d=>d.link?.selfhref.href).filter((d,m,g)=>g.indexOf(d)===m).map(d=>d?.toString()),l=JSON.stringify(a);return Oo(()=>{let d=JSON.parse(l).map(m=>{let g=new Uo(m);return g.locale=n,g.fetchContent(t)});s(),Promise.all(d).then(m=>{r(m),i()})},[l,n,t,s,i]),o};import{produce as Co}from"immer";import{HTTP_METHODS as De}from"@beinformed/ui/constants";import{FormModel as F,Href as To}from"@beinformed/ui/models";import{getSetting as bo}from"@beinformed/ui/settings";var As=(e,t)=>{let o=new To(e);bo("ALWAYS_COMMIT_FORM")||o.addParameter("commit","false");let r=A("form",o,{method:De.POST,targetModel:F,removeOnUnmount:!0,data:t?JSON.stringify(t):void 0,origin:o.origin,contextPath:o.contextPath});if(r?.model instanceof F)return r.model},Ls=()=>{let e=M();return{previous:i=>e(Ce(i)),cancel:i=>e(Te(i)),submit:i=>e(C({key:i.connectKey||i.key,href:i.selfhref,options:{method:De.POST,data:i.formdata,updateHandler:a=>a instanceof F?Co(a,l=>{l.update(a)}):a,targetModel:F}})),remove:i=>e(v(i.connectKey||"")),showFormNotification:i=>e(re(i))}},Bs=(e,t)=>{let o=M();return(r,n,s)=>o(Ue({form:e,formObject:t,attribute:r,inputvalue:n,options:s}))},Ds=e=>{let t=M();return{save:()=>t(be(e)),cancel:o=>t(Re(e,o)),remove:o=>t(He(e,o))}};import{useCallback as U,useMemo as Ro}from"react";import{HTTP_METHODS as G}from"@beinformed/ui/constants";import{AssignmentFilterModel as Ho,CaseSearchModel as Fe,DetailModel as vo,FilterModel as ko,ListDetailModel as Po,ListModel as q}from"@beinformed/ui/models";var Qs=(e,t)=>f("list",e,{expectedModels:["List"],targetModel:q,...t}),zs=(e,t)=>f("list",e,{expectedModels:["List","Detail"],targetModel:[q,vo],...t}),Vs=(e,t)=>f("listdetail",e,{expectedModels:["ListDetail"],targetModel:Po,forceTargetModel:!0,...t}),Ws=({syncLocation:e=!0,historyAction:t="push"}={})=>{let{push:o,replace:r}=Pe(),n=M(),s=t==="push"?o:r,i=U((c,p=!1)=>{let y=c.selfhref;p&&(y.page=void 0),c.requestMethod===G.POST?(e&&s({pathname:y.path,search:y.getQuerystring(!0),state:{formdata:c.formdata}}),n(C({key:c.connectKey||c.key,href:y,options:{method:G.POST,data:c.formdata,targetModel:[q,Fe]}}))):(e&&s({pathname:y.path,search:y.getQuerystring(!0)}),n(C({key:c.connectKey||c.key,href:y,options:{method:G.GET,targetModel:[q,Fe]}})))},[n,s,e]),a=U((c,p)=>{c.filterCollection=p,i(c,!0)},[i]),l=U((c,p,y,O)=>{if(p instanceof Ho&&!O)throw new TypeError("AssignmentFilterModel needs the attribute argument to be able to update the filter");let H=null,w=O;if(O?H=c.filterCollection.getFilterByAttributeKey(O.key):p instanceof ko&&(H=c.filterCollection.getFilterByName(p.name),w=p.attribute),H&&w)H.update(w,y);else{let kt=O?`key: ${O.key}`:`name: ${p.name}`;console.error(`Can't find a filter to update by ${kt} on list: ${c.selfhref.toString()}`)}i(c,!0)},[i]),d=U(c=>{c.filterCollection.reset(),i(c,!0)},[i]),m=U((c,p)=>{p.name&&c.filterCollection.getFilterByName(p.name)?.reset(),i(c,!0)},[i]),g=U((c,p)=>{c.sorting.value=p,i(c,!0)},[i]),x=U((c,p)=>{c.paging.page=p,i(c)},[i]),S=U((c,p)=>{c.paging.pagesize.value=p,i(c,!0)},[i]);return Ro(()=>({update:i,updateFilters:a,updateFilter:l,updateSort:g,updatePage:x,updatePageSize:S,resetFilters:d,removeFilter:m}),[m,d,i,l,a,x,S,g])};import{useEffect as Eo,useState as qe}from"react";import{HTTP_METHODS as Ao}from"@beinformed/ui/constants";import{Href as Lo,LookupOptionsModel as Bo}from"@beinformed/ui/models";var ti=(e,t="",o=1,r=300)=>{let{start:n,finish:s}=D(),i=P(),[a,l]=qe(null),[d,m]=qe(!1),{href:g,filterName:x,method:S}=e;return(t.length<o||!x)&&a!==null&&l(null),Eo(()=>{if(t.length<o||!x)return;let c=setTimeout(async()=>{m(!0),n();let p=new Lo(g),y={method:S,data:void 0};S===Ao.POST?y.data={[x]:t}:p.addParameter(x,t),i(p,y).fetch().then(O=>{O instanceof Bo&&l(O)}).finally(()=>{s(),m(!1)})},r);return()=>{clearTimeout(c)}},[r,t,x,s,g,S,o,i,n]),{lookupOptions:a,lookupLoading:d}};import{useCallback as we}from"react";import{IllegalArgumentException as Do}from"@beinformed/ui/exceptions";var ai=e=>{if(!e)throw new Do("Missing modalId argument for useModal hook");let t=M(),o=u(s=>s.modals.modals.find(i=>i.key===e)),r=we(()=>{t(ce(e))},[t,e]),n=we(()=>{t(ue(e))},[t,e]);return{key:o?o.key:null,size:o?o.size:null,visible:o?o.visible:!1,show:r,close:n}};import{ConceptIndexModel as Ne,ContentIndexModel as Fo,ContentTOCModel as qo,ContentTypeModel as wo,Href as No,ModelCatalogModel as _o}from"@beinformed/ui/models";import{createHref as R,filterParameters as Q}from"@beinformed/ui/utils";var gi=e=>f("modelcatalog","/modelcatalog",{expectedModels:["ModelCatalog"],targetModel:_o,...e}),$o=(e,t="conceptindex",o)=>{let{entryDate:r}=b(),n=Q(e,["index","label","modelcategory","type"]);return n.setParameter("entryDate",r),f(t,n,{expectedModels:["ConceptIndex"],targetModel:Ne,...o})},hi=(e,t="conceptdetail",o)=>{let{entryDate:r}=b(),n=I(),s=R("concepts",e,r,n,[]);return f(t,s,{expectedModels:["ConceptDetail","BusinessScenario"],...o})},Ko=(e,t="contentindex",o)=>{let r=Q(e,["index","label","type"]);return f(t,r,{expectedModels:["ContentIndex"],targetModel:Fo,...o})},yi=(e,t="contenttoc",o)=>{let{entryDate:r}=b(),n=I(),s=R("content",e,r,n,["complete"]);return f(t,s,{expectedModels:["ContentTOC"],targetModel:qo,...o})},xi=(e,t="content",o)=>{let{entryDate:r}=b(),n=I(),s=R("content",e,r,n,["complete"]);return f(t,s,{expectedModels:["Content","ContentTOC"],...o})},Ii=(e,t="content",o)=>{let{entryDate:r}=b(),n=I(),s=new No(e);s.removeParameter("complete"),s.addParameter("complete","true");let i=R("content",s,r,n,["complete"]);return f(t,i,{expectedModels:["Content","ContentTOC"],...o})},Oi=(e,t="contenttypes",o)=>{let r=R("contenttypes",e,void 0,void 0,[]);return f(t,r,{expectedModels:["ContentType"],targetModel:wo,...o})},Si=(e,t="relatedconcepts",o)=>{let{entryDate:r}=b(),n=Q(e,["modelcategory"]);return n.setParameter("entryDate",r),f(t,n,{expectedModels:["ConceptIndex"],targetModel:Ne,...o})},_e=(e,t)=>{let o=[];for(let r of Object.keys(t)){let n=t[r];if(n){let s=Array.isArray(n)?n.join(","):n;r==="type"&&(s=s.replace("#","%23")),o.push(`${r}=${s}`)}}return o.length?`${e}?${o.join("&")}`:e},Ui=(e,t,o)=>{let r=_e("/concepts",e);return $o(r,t,o)},Ci=(e,t,o)=>{let r=_e("/content",e);return Ko(r,t,o)},b=()=>{let e=M();return{entryDate:u(ve),setEntryDate:o=>e(j(o))}};import{ApplicationModel as Go}from"@beinformed/ui/models";var ki=e=>u(t=>de(t,e)),Pi=e=>u(t=>me(t,e)),Ei=e=>u(t=>fe(t,e)),Ai=e=>u(t=>Me(t,e)),Li=e=>u(t=>ge(t,e)),Bi=e=>u(t=>he(t,e)),Di=()=>u(ye),Fi=()=>u(xe),qi=()=>{let e=u(Ie);return e instanceof Go?e:null};import{createSelector as Qo}from"reselect";var Gi=()=>{let e=M(),o=Qo([n=>n.modularui],n=>{let s=[],i=Object.keys(n);for(let a of i){let l=n[a];l?.status==="FINISHED"&&s.push(l.model)}return s}),r=u(o);return{reload:(n,s)=>{e(N(n,s))},reloadWithFilter:(n,s)=>{let i=r.filter(n);for(let a of i)a&&e(N(a,s))}}};var Ji=()=>{let e=M(),{render:t,messageType:o,message:r,error:n}=u(s=>s.notification);return{render:t,messageType:o,message:r,error:n,dismiss:()=>{e(oe())}}},ji=()=>{let e=M();return(t,o)=>e(te({type:"ERROR",message:t,error:o}))};import{useMemo as zo,useState as $e}from"react";import{useLocation as Vo,useRouteMatch as Wo}from"react-router";import{CaseSearchModel as Jo,DetailModel as jo,GroupingPanelModel as Yo,Href as z,ListModel as Xo}from"@beinformed/ui/models";var Zo=(e,t=!1)=>{let[o,r]=$e(null),[n,s]=$e(!1),i=Wo(),a=Vo(),l=zo(()=>{if(e==null&&o==null)return new z("");let g=e instanceof z?e:new z(e);return t&&i.isExact&&g.addParametersFromString(a.search),g},[e,o,t,i.isExact,a.search]),m=!l.equalsWithParameters(o)&&(i.isExact||n===i.isExact||!o?.startsWith(i.url));return m&&(r(l),s(i.isExact)),m?l:o||l},oa=(e,t)=>{let{fromRoute:o,...r}=t||{fromRoute:!1},n=Zo(e,o||!1);return f("panel",n,{expectedModels:["List","GroupingPanel","Detail","CaseSearch"],targetModel:[Xo,Yo,jo,Jo],...r})};var Ht=Pt(Rt(),1);import{useMemo as Wr}from"react";import{createSelector as Jr}from"reselect";var jr=e=>e.preferences,Yr=e=>{let t=Array.isArray(e)?e:[e];return Jr([jr],o=>(0,Ht.default)(o,t))},Ta=e=>{let t=Wr(()=>Yr(e),[e]);return u(t)};import{CaseSearchModel as vt}from"@beinformed/ui/models";var va=(e,t)=>f("quicksearch",e,{expectedModels:["CaseSearch"],targetModel:vt,...t}),ka=(e,t)=>f("search",e,{expectedModels:["CaseSearch"],targetModel:vt,...t});export{P as a,ln as b,I as c,mn as d,fn as e,Mn as f,Pe as g,Ee as h,E as i,A as j,f as k,lo as l,K as m,Qn as n,zn as o,Vn as p,Wn as q,Jn as r,as as s,ls as t,D as u,ms as v,xs as w,As as x,Ls as y,Bs as z,Ds as A,Qs as B,zs as C,Vs as D,Ws as E,ti as F,ai as G,gi as H,$o as I,hi as J,Ko as K,yi as L,xi as M,Ii as N,Oi as O,Si as P,Ui as Q,Ci as R,b as S,ki as T,Pi as U,Ei as V,Ai as W,Li as X,Bi as Y,Di as Z,Fi as _,qi as $,Gi as aa,Ji as ba,ji as ca,oa as da,Ta as ea,va as fa,ka as ga};
|
|
2
|
+
//# sourceMappingURL=chunk-VXOYOMNN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js","../src/hooks/useAllFormsOnModel.ts","../src/hooks/useModularUIRequest.ts","../src/hooks/useAuthentication.ts","../src/hooks/useModularUIModel.ts","../src/hooks/useModularUIBasic.ts","../src/hooks/useRouter.ts","../src/hooks/useModularUI.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useModularUIKey.ts","../src/hooks/useContent.ts","../src/hooks/useProgressIndicator.ts","../src/hooks/useForm.ts","../src/hooks/useList.ts","../src/hooks/useLookup.ts","../src/hooks/useModal.ts","../src/hooks/useModelCatalog.ts","../src/hooks/useModelSelectors.ts","../src/hooks/useModels.ts","../src/hooks/useNotification.ts","../src/hooks/usePanel.ts","../src/hooks/usePreference.ts","../src/hooks/useSearch.ts"],"sourcesContent":["var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, ListModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport type { ActionModel, DetailModel, TabModel } from \"@beinformed/ui/models\";\n\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n) => {\n const modularui = useModularUIRequest();\n\n const [forms, setForms] = useState(null);\n const [responseCount, setResponseCount] = useState(0);\n\n const actions = useMemo(() => getActions(model), [model]);\n const requestCount = actions.length;\n\n useEffect(() => {\n const requests = actions.map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [actions, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (model: ListModel | DetailModel | TabModel) => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions: ActionModel[] = [];\n const unique: string[] = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: ModularUIRequestOptions) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: ModularUIRequestOptions,\n) => ModularUIRequest) => useBEISelector(getModularUIRequest);\n","import { INTERNAL_LOGIN_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { getContextPath, getContextPathServer } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { resetAuthErrors } from \"../redux/auth/authReducer\";\nimport { login } from \"../redux/auth/signinActions\";\nimport { logout } from \"../redux/auth/signoutActions\";\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\n\nimport { useApplication } from \"./useModularUIModel\";\n\nimport type { AuthenticationType } from \"@beinformed/ui/modularui\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Provides access to authentication state and actions.\n * Includes functionality for standard username/password login and redirect-based login.\n * @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.\n */\nexport const useLogin = () => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useBEIDispatch();\n\n const application = useApplication();\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * The current authentication error message, if any.\n */\n errorMessage: auth.error,\n\n /**\n * Resets the authentication error message in the Redux store.\n */\n resetErrors: () => dispatch(resetAuthErrors()),\n\n /**\n * Attempts to log in the user with the provided username and password.\n * Dispatches the `login` action to the Redux store.\n * @param username The username for authentication.\n * @param password The password for authentication.\n */\n login: (username: string, password: string) =>\n dispatch(login({ username, password })),\n\n /**\n * Initiates a redirect-based login flow for a specific authentication type.\n * If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.\n * If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.\n * @param authenticationType The authentication type to initiate the redirect for.\n * @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.\n */\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getContextPathServer()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n * Provides access to logout functionality.\n * Handles both standard logout and redirect-based logout scenarios.\n * @returns An object containing the authentication status, available authentication types, and the logout function.\n */\nexport const useLogout = () => {\n const dispatch = useBEIDispatch();\n const application = useApplication();\n\n const BASE_PATH = getContextPath();\n\n const authenticate = new Authenticate();\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * Initiates the logout process.\n * If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.\n * Otherwise, it dispatches the `logout` action to the Redux store.\n */\n logout: () => {\n const type = authenticate.authenticationType;\n if (type === INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT) {\n authenticate.redirectToLogout();\n } else if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n\n logoutUrl: authenticate.getLogoutUrl(),\n };\n};\n","import {\n ApplicationModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (options?: HookOptions) =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n ...options,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n ...options,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n ...options,\n });\n\nexport const useGroupingPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n ...options,\n });\n\nexport const useDetailPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n ...options,\n });\n\nexport const useUserProfile = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n ...options,\n });\n","import { useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\n\nimport { useLocation } from \"../hooks/useRouter\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\n\n/**\n * Configuration options for low-level modular UI requests.\n */\nexport interface HookOptions {\n key?: string;\n origin?: string;\n contextPath?: string;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null;\n}\n\n/**\n * Configuration options for the useModularUIBasic hook.\n * Allows for type enforcement, caching control, and reload behavior.\n */\nexport interface UseModularUIBasicOptions<T> {\n expectedModels?: string[];\n targetModel?: new (modularuiResponse: ModularUIResponse) => T;\n forceTargetModel?: boolean;\n origin?: string;\n contextPath?: string;\n cache?: boolean;\n key?: string;\n isReload?: boolean;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null; // If present, the hook switches from GET to POST\n}\n\n/**\n * Internal helper to transform high-level hook options into a configuration\n * object compatible with the core useModularUI fetcher.\n * Logic:\n * 1. Defaults to GET method.\n * 2. If 'formdata' is present, it switches to POST and assigns 'data'.\n * 3. Forces 'isReload' if the useReload check returns true.\n */\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n mustReload: boolean,\n) => {\n const baseOptions: Record<string, unknown> = {\n expectedModels: [],\n method: HTTP_METHODS.GET,\n data: undefined,\n ...options,\n isReload: mustReload || options.isReload,\n };\n\n if (options.formdata != null) {\n baseOptions.method = HTTP_METHODS.POST;\n baseOptions.data = options.formdata;\n }\n\n return baseOptions;\n};\n\n/**\n * Validates that the returned model type matches one of the expected model strings.\n * Logs a warning to the console if there is a mismatch (useful for debugging UI-backend contracts).\n */\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (\n expectedModels.length > 0 &&\n model !== null &&\n typeof model === \"object\" &&\n \"type\" in model &&\n typeof model.type === \"string\"\n ) {\n const isCorrectModel = expectedModels.includes(model.type);\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * A simplified abstraction over useModularUI that includes automatic\n * model validation and smart-reload logic based on router state.\n *\n * @param {string} defaultKey - The default identifier for the model.\n * @param {string | Href} href - The endpoint to fetch.\n * @param {UseModularUIBasicOptions} options - Extended configuration options.\n */\nexport const useModularUIBasic = <T>(\n defaultKey: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {},\n): T | undefined => {\n const memoizedHref = useMemo(() => href.toString(), [href]);\n\n // Use the key provided in options if available, otherwise fallback to the default\n const key = options.key ?? defaultKey;\n\n // Determine if we need to bypass cache based on navigation 'reload' signals\n const mustReload = useReload(key, memoizedHref);\n\n // Memoize options to prevent useModularUI from re-fetching on every parent render\n const modularUIOptions = useMemo(\n () => createUseModularUIOptions(options, mustReload),\n [options, mustReload],\n );\n\n const modularUI = useModularUI(key, href, modularUIOptions);\n\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\n // Extract and validate the model from the modularUI wrapper object\n return useMemo((): T | undefined => {\n if (modularUI?.model) {\n validateModel(modularUI.model, expectedModels);\n return modularUI.model as T;\n }\n return undefined;\n }, [expectedModels, modularUI]);\n};\n\n/**\n * Determines if a model should be reloaded based on the 'reload' timestamp\n * found in the React Router location state.\n * This is used for \"force refresh\" scenarios where a user navigates to a\n * page and expects fresh data (e.g., after a form submission elsewhere).\n * @param {string} modelKey - The model type key.\n * @param {string} url - The resource URL.\n * @returns {boolean} True if the store data is stale compared to the reload signal.\n */\nexport const useReload = (modelKey: string, url: string): boolean => {\n const location = useLocation();\n const key = useModularUIKey(modelKey, url);\n\n // Access the current entry in the Redux store\n const modelEntry = useBEISelector((state) => state.modularui[key]);\n\n if (modelEntry) {\n const reload = (location?.state?.reload || 0) as number;\n\n // If a reload timestamp exists in the router state\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n // Trigger reload only if the model is already finished loading\n // AND the data we have is older than the requested reload time.\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n }\n return false;\n};\n","import { useMemo } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n go,\n goBack,\n goForward,\n push,\n replace,\n} from \"../redux/router/routerActions\";\n\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns the full location object from the router state.\n */\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\n/**\n * Returns the unique key of the current location.\n */\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\n/**\n * Returns the current search (querystring) portion of the URL.\n */\nexport const useQuerystring = () => useLocation()?.search;\n\n/**\n * Returns the current URL pathname.\n */\nexport const usePathname = () => useLocation()?.pathname;\n\n/**\n * Provides navigation methods.\n */\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return useMemo(\n () => ({\n push: (location: RouterLocation | string, state?: RootState) =>\n dispatch(push(location, state)),\n replace: (location: RouterLocation | string, state?: RootState) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n }),\n [dispatch],\n );\n};\n","import { useEffect, useMemo, useRef } from \"react\";\n\nimport { useLocation } from \"react-router\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\n\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { ModelEntry } from \"../redux/modularui/types\";\n\n/**\n * A custom hook to fetch and manage Be Informed modular UI resources.\n * It handles automatic data fetching based on URL/query changes, manages Redux state\n * synchronization, and provides cleanup logic when components unmount.\n *\n * @param {string} modelKey - A unique identifier for the type of model being fetched.\n * @param {string | Href} url - The endpoint URL or Href instance to fetch data from.\n * @param {RequestModularUIOptions} options - Configuration for the request (method, headers, etc.).\n * @returns {ModelEntry} The model data retrieved from the Redux store.\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {},\n): ModelEntry | undefined => {\n const dispatch = useBEIDispatch();\n\n // Normalize the URL input into a Href instance to safely access query params and paths\n const hrefInstance = useMemo(() => new Href(url), [url]);\n const requestUrl = useMemo(() => hrefInstance.toString(), [hrefInstance]);\n const currentQueryString = hrefInstance.querystring;\n\n // Persistence ref to detect if query parameters have changed between renders\n const prevQueryRef = useRef(currentQueryString);\n\n // Generate a unique key for the Redux store based on the model type and the full URL\n const key = useModularUIKey(modelKey, requestUrl);\n\n // Select the specific piece of state corresponding to this modular UI component\n const model = useBEISelector((state) => state.modularui[key]);\n\n /**\n * Memoize request options to prevent unnecessary re-renders.\n * Merges default settings (GET method, auto-cleanup) with user-provided options.\n */\n const requestOptions = useMemo(() => {\n const merged = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: true,\n ...options,\n };\n\n if (url instanceof Href) {\n merged.origin = merged.origin ?? url.origin;\n merged.contextPath = merged.contextPath ?? url.contextPath;\n }\n return merged;\n }, [options, url]);\n\n const location = useLocation<{ redirectLocation?: string | Href }>();\n const redirectLocation = location.state?.redirectLocation;\n\n // eslint-disable-next-line react-hooks/refs\n const isQueryChanged = prevQueryRef.current !== currentQueryString;\n\n /**\n * Determines if a network request should be initiated.\n * Logic includes:\n * - Model doesn't exist yet (Initial load)\n * - Previous request resulted in an error (Retry)\n * - The query parameters changed (Filtering/Paging)\n * - A redirect was triggered specifically for this URL\n * - Manual 'isReload' flag is passed in options\n */\n const shouldLoad =\n model == null ||\n model.status === MODULARUI_STATUS.ERROR ||\n isQueryChanged ||\n (redirectLocation instanceof Href\n ? redirectLocation.equals(requestUrl)\n : false) ||\n requestOptions.isReload === true;\n\n // Synchronize the ref after the render cycle determines if we should load\n useEffect(() => {\n prevQueryRef.current = currentQueryString;\n }, [currentQueryString]);\n\n // Execute the load action. Deep compare is used on options to prevent\n // infinite loops caused by passing inline object literals.\n useDeepCompareEffect(() => {\n if (requestUrl !== \"\" && shouldLoad) {\n dispatch(fetchModel({ key, href: requestUrl, options: requestOptions }));\n }\n }, [key, requestUrl, requestOptions, shouldLoad]);\n\n // Cleanup Effect:\n // If 'removeOnUnmount' is true, this removes the model data from the Redux store\n // when the component using this hook is destroyed.\n useEffect(() => {\n if (requestOptions.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n }, [dispatch, key, requestOptions.removeOnUnmount]);\n\n return model;\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport type { DependencyList, EffectCallback } from \"react\";\n\n/**\n * Validates that dependencies are used correctly.\n * Deep compare should not be used with empty arrays or no dependencies.\n */\nfunction checkDeps(deps: DependencyList) {\n if (IS_DEV) {\n if (!deps || deps.length === 0) {\n console.warn(\n \"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.\",\n );\n }\n }\n}\n\n/**\n * Custom hook to generate a stable signal (number) that only changes when\n * the 'dependencies' array changes value via a deep comparison.\n *\n * * NOTE: This function intentionally reads `ref.current` during the render phase\n * to perform memoization. This is a well-known pattern for deep-compare hooks\n * but requires an ESLint bypass for the strict 'no-accessing-refs-during-render' rule.\n */\nfunction useDeepCompareMemoize(dependencies: DependencyList) {\n const ref = useRef<DependencyList>(dependencies);\n\n // Only update the ref if the deep equality check fails\n // eslint-disable-next-line react-hooks/refs\n if (!deepEqual(dependencies, ref.current)) {\n // eslint-disable-next-line react-hooks/refs\n ref.current = dependencies;\n }\n\n // eslint-disable-next-line react-hooks/refs\n return ref.current;\n}\n\n/**\n * A replacement for useEffect that compares dependencies deeply.\n */\nexport function useDeepCompareEffect(\n callback: EffectCallback,\n dependencies: DependencyList,\n) {\n checkDeps(dependencies);\n\n // We use the memoized ref as the dependency.\n // React's shallow check will only trigger when the ref object itself changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { useMemo } from \"react\";\n\nimport { useLocale } from \"./useI18n\";\n\n/**\n * Generates the key that is used in the modular ui reducer of redux\n */\nexport const useModularUIKey = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n","import { useEffect, useState } from \"react\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useLocale } from \"../hooks/useI18n\";\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type {\n ContentModel,\n Href,\n SourceReferenceCollection,\n} from \"@beinformed/ui/models\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): ContentModel[] => {\n const [content, setContent] = useState<ContentModel[]>([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link?.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href?.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href: Href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n }, [allHrefs, localeCode, renderChildSections, start, finish]);\n\n return content;\n};\n","// @flow\nimport { useCallback } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n\n const start = useCallback(() => {\n dispatch(startProgress());\n }, [dispatch]);\n const finish = useCallback(() => {\n dispatch(finishProgress());\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch(resetProgress());\n }, [dispatch]);\n const update = useCallback(\n (percentComplete: number) => {\n dispatch(updateProgress(percentComplete));\n },\n [dispatch],\n );\n\n return { start, finish, reset, update };\n};\n\n/**\n */\nexport const useProgressIndicatorState = () =>\n useBEISelector((state) => state.progressindicator);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\n\nimport { updateFormAttribute } from \"../redux/form/attributeActions\";\nimport { cancelForm, previousObject } from \"../redux/form/formActions\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../redux/form/formAttributesetRepeatable\";\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { showFormNotification } from \"../redux/notifications/notificationActions\";\n\nimport { useModularUI } from \"./useModularUI\";\n\nimport type {\n AttributeModel,\n FormObjectModel,\n ModularUIModel,\n} from \"@beinformed/ui/models\";\n\nexport interface UpdateFormOptions {\n autosubmit: boolean;\n autosave: boolean;\n autoupdate: boolean;\n forceUpdate?: boolean;\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean;\n}\n\n/**\n * Load a form by href\n */\nexport const useForm = (\n href: string | Href,\n data?: Record<string, unknown>,\n) => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data: data ? JSON.stringify(data) : undefined,\n origin: formHref.origin,\n contextPath: formHref.contextPath,\n });\n\n if (form?.model instanceof FormModel) {\n return form.model;\n }\n\n return;\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = () => {\n const dispatch = useBEIDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel: ModularUIModel): ModularUIModel => {\n if (newModel instanceof FormModel) {\n return produce(newModel, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n targetModel: FormModel,\n },\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey || \"\"));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Hook that returns a function to update attributes of a form object.\n * <br >\n * The returned function accepts the following options:\n *\n * - autosubmit: Automatically submit the form after a change\n * - autosav: Automatically save the form (in the background) after a change\n * - autoupdate: Automatically update the current form object after a change\n * - forceUpdate: Force the update even if conditions are not met.\n * - validate: Activate/deactivate the form object validation by an update.\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const dispatch = useBEIDispatch();\n\n return (\n attribute: AttributeModel,\n inputvalue: string,\n options?: UpdateFormOptions,\n ) =>\n dispatch(\n updateFormAttribute({ form, formObject, attribute, inputvalue, options }),\n );\n};\n\n/**\n * Repeatable attributeset actions\n */\nexport const useRepeatableAttributeSet = (form: FormModel) => {\n const dispatch = useBEIDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n","import { useCallback, useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport {\n AssignmentFilterModel,\n CaseSearchModel,\n DetailModel,\n FilterModel,\n ListDetailModel,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useNavigation } from \"./useRouter\";\n\nimport type {\n AttributeModel,\n FilterCollection,\n Href,\n IFilter,\n} from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\ninterface ListNavigationOptions {\n syncLocation?: boolean;\n historyAction?: \"push\" | \"replace\";\n}\n\nexport const useList = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n ...options,\n });\n\nexport const useListOrDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | DetailModel>(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, DetailModel],\n ...options,\n });\n\nexport const useListDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n ...options,\n });\n\nexport const useListNavigation = ({\n syncLocation = true,\n historyAction = \"push\",\n}: ListNavigationOptions = {}) => {\n const { push, replace } = useNavigation();\n const dispatch = useBEIDispatch();\n\n const navigate = historyAction === \"push\" ? push : replace;\n\n const update = useCallback(\n (list: ListModel, resetPage = false) => {\n const listHref = list.selfhref;\n if (resetPage) {\n listHref.page = undefined;\n }\n\n if (list.requestMethod === HTTP_METHODS.POST) {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n state: { formdata: list.formdata },\n });\n }\n\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.POST,\n data: list.formdata,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n } else {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n });\n }\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.GET,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n }\n },\n [dispatch, navigate, syncLocation],\n );\n\n const updateFilters = useCallback(\n (list: ListModel, filters: FilterCollection | IFilter[]) => {\n list.filterCollection = filters;\n update(list, true);\n },\n [update],\n );\n\n const updateFilter = useCallback(\n (\n list: ListModel,\n filter: IFilter,\n value: string,\n attribute?: AttributeModel,\n ) => {\n if (filter instanceof AssignmentFilterModel && !attribute) {\n throw new TypeError(\n \"AssignmentFilterModel needs the attribute argument to be able to update the filter\",\n );\n }\n\n let filterToUpdate = null;\n let targetAttr = attribute;\n\n if (attribute) {\n filterToUpdate = list.filterCollection.getFilterByAttributeKey(\n attribute.key,\n );\n } else if (filter instanceof FilterModel) {\n filterToUpdate = list.filterCollection.getFilterByName(filter.name);\n targetAttr = filter.attribute;\n }\n\n if (filterToUpdate && targetAttr) {\n filterToUpdate.update(targetAttr, value);\n } else {\n const searchKey = attribute\n ? `key: ${attribute.key}`\n : `name: ${filter.name}`;\n console.error(\n `Can't find a filter to update by ${searchKey} on list: ${list.selfhref.toString()}`,\n );\n }\n\n update(list, true);\n },\n [update],\n );\n\n const resetFilters = useCallback(\n (list: ListModel) => {\n list.filterCollection.reset();\n update(list, true);\n },\n [update],\n );\n\n const removeFilter = useCallback(\n (list: ListModel, filter: IFilter) => {\n if (filter.name) {\n list.filterCollection.getFilterByName(filter.name)?.reset();\n }\n update(list, true);\n },\n [update],\n );\n\n const updateSort = useCallback(\n (list: ListModel, sortOption: string) => {\n list.sorting.value = sortOption;\n update(list, true);\n },\n [update],\n );\n\n const updatePage = useCallback(\n (list: ListModel, page: number) => {\n list.paging.page = page;\n update(list);\n },\n [update],\n );\n\n const updatePageSize = useCallback(\n (list: ListModel, pagesize: number) => {\n list.paging.pagesize.value = pagesize;\n update(list, true);\n },\n [update],\n );\n\n return useMemo(\n () => ({\n update,\n updateFilters,\n updateFilter,\n updateSort,\n updatePage,\n updatePageSize,\n resetFilters,\n removeFilter,\n }),\n [\n removeFilter,\n resetFilters,\n update,\n updateFilter,\n updateFilters,\n updatePage,\n updatePageSize,\n updateSort,\n ],\n );\n};\n","import { useEffect, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href, LookupOptionsModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\nimport { useProgressIndicator } from \"./useProgressIndicator\";\n\nimport type { LinkModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\ninterface UseLookupHook {\n lookupOptions: LookupOptionsModel | null;\n lookupLoading: boolean;\n}\n\n/**\n * Lookup options call\n */\nexport const useLookup = (\n lookupLink: LinkModel,\n filterInput = \"\",\n minLength = 1,\n debounceMs = 300,\n): UseLookupHook => {\n const { start, finish } = useProgressIndicator();\n const modularuiRequest = useModularUIRequest();\n\n const [lookupOptions, setLookupOptions] = useState<LookupOptionsModel | null>(\n null,\n );\n const [lookupLoading, setLookupLoading] = useState(false);\n\n const { href, filterName, method } = lookupLink;\n\n if (filterInput.length < minLength || !filterName) {\n if (lookupOptions !== null) {\n setLookupOptions(null);\n }\n }\n\n useEffect(() => {\n if (filterInput.length < minLength || !filterName) {\n return;\n }\n\n const timeoutId = setTimeout(async () => {\n setLookupLoading(true);\n start();\n\n const lookupHref = new Href(href);\n const requestOptions: ModularUIRequestOptions = {\n method,\n data: undefined,\n };\n if (method === HTTP_METHODS.POST) {\n requestOptions.data = { [filterName]: filterInput };\n } else {\n lookupHref.addParameter(filterName, filterInput);\n }\n\n modularuiRequest(lookupHref, requestOptions)\n .fetch()\n .then((lookupResponse) => {\n if (lookupResponse instanceof LookupOptionsModel) {\n setLookupOptions(lookupResponse);\n }\n })\n .finally(() => {\n finish();\n setLookupLoading(false);\n });\n }, debounceMs);\n\n return () => {\n clearTimeout(timeoutId);\n };\n }, [\n debounceMs,\n filterInput,\n filterName,\n finish,\n href,\n method,\n minLength,\n modularuiRequest,\n start,\n ]);\n\n return { lookupOptions, lookupLoading };\n};\n","import { useCallback } from \"react\";\n\nimport { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { closeModal, showModal } from \"../redux/modals/modalsReducer\";\n\nimport type { RootState } from \"../redux/store\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null;\n size?: string | null;\n visible: boolean;\n show: () => void;\n close: () => void;\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useBEIDispatch();\n const modal = useBEISelector((state: RootState) =>\n state.modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n","import {\n ConceptIndexModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentTypeModel,\n Href,\n ModelCatalogModel,\n} from \"@beinformed/ui/models\";\nimport { createHref, filterParameters } from \"@beinformed/ui/utils\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { getEntryDate } from \"../redux/modelcatalog/modelCatalogSelectors\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { ConceptDetailModel, ContentModel } from \"@beinformed/ui/models\";\nimport type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\n\nexport interface SearchFilter {\n index?: string;\n label?: string;\n type?: string | string[];\n modelCategory?: string | string[];\n entryDate?: string;\n}\n\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n) =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\nexport const useConceptIndex = (\n href: string | Href,\n key = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nexport const useConceptDetail = (\n concept: string | Href,\n key = \"conceptdetail\",\n options?: UseModularUIBasicOptions<ConceptDetailModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, entryDate, location, []);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\nexport const useContentIndex = (\n href: string | Href,\n key = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\nexport const useContentTOC = (\n content: string | Href,\n key = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\nexport const useContent = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useCompleteSource = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const contentHref = new Href(content);\n contentHref.removeParameter(\"complete\");\n contentHref.addParameter(\"complete\", \"true\");\n\n const href = createHref(\"content\", contentHref, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useContentType = (\n contentType: string | Href,\n key = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n) => {\n const href = createHref(\n \"contenttypes\",\n contentType,\n undefined,\n undefined,\n [],\n );\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\nexport const useRelatedConcepts = (\n href: string | Href,\n key = \"relatedconcepts\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\"modelcategory\"]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nconst getSearchHref = (uri: string, filters: SearchFilter) => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key as keyof SearchFilter];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\nexport const useConceptSearch = (\n filters: SearchFilter,\n key: string | \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\nexport const useContentSearch = (\n filters: SearchFilter,\n key: string | \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n\n/**\n * Retrieve and update the entrydate for the modelcatalog\n */\nexport const useEntryDate = () => {\n const dispatch = useBEIDispatch();\n const entryDate = useBEISelector(getEntryDate);\n\n return {\n entryDate,\n setEntryDate: (entryDate: ISO_DATE) => dispatch(updateEntryDate(entryDate)),\n };\n};\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport { getApplication } from \"../redux/application/applicationSelectors\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport {\n allKeysByHref,\n getActiveModelByInstance,\n getActiveModels,\n getAllFinishedModels,\n getAllModelsByInstance,\n getFirstModelByInstance,\n keyByHref,\n modelByHref,\n} from \"../redux/shared/selectors\";\n\nimport type { Href, ResourceModel } from \"@beinformed/ui/models\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns all models in the store that are instances of the provided class\n * and match the current application locale.\n */\nexport const useAllModelsByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getAllModelsByInstance(state, instance),\n );\n};\n\n/**\n * Returns the first model found in the store that is an instance of the\n * provided class and matches the current locale.\n */\nexport const useFirstModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getFirstModelByInstance(state, instance),\n );\n};\n\n/**\n * Returns the model instance that is currently \"active\" based on the URL path.\n * It checks if the current router location starts with the model's selfhref path.\n */\nexport const useActiveModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getActiveModelByInstance(state, instance),\n );\n};\n\n/**\n * Retrieves a specific model from the store based on its unique Href.\n * @param {Href | string} href - The Href object or string path of the model.\n * @returns {ModularUIModel | null} The model matching the href or null.\n */\nexport const useModelByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => modelByHref(state, href));\n};\n\n/**\n * Returns the unique store key (identifier) for a model associated with a specific Href.\n * @param {Href | string} href - The Href object or string path.\n * @returns {string | null | void} The internal key of the model.\n */\nexport const useKeyByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => keyByHref(state, href));\n};\n\n/**\n * Returns all internal keys found in the store for a specific Href.\n * Useful if multiple versions/entries exist for the same path.\n * @param {Href | string} href - The Href object or string path.\n * @returns {Array<string>} An array of keys.\n */\nexport const useAllKeysByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => allKeysByHref(state, href));\n};\n\n/**\n * Returns a list of simplified model info (key, href, label, type) for all\n * models currently active in the navigation context (breadcrumbs).\n * @returns {Array<{key: string, href: Href, label: string, type: string}>}\n */\nexport const useActiveModels = () => {\n return useBEISelector(getActiveModels);\n};\n\n/**\n * Returns all models in the store that have a status of MODULARUI_STATUS.FINISHED.\n * @returns {Array<ModularUIModel>} An array of fully loaded models.\n */\nexport const useAllFinishedModels = () => {\n return useBEISelector(getAllFinishedModels);\n};\n\n/**\n * Returns the current active application, without retrying to request it.\n */\nexport const useCurrentApplication = () => {\n const application = useBEISelector(getApplication);\n if (application instanceof ApplicationModel) {\n return application;\n }\n return null;\n};\n","import { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { reloadModel } from \"../redux/modularui/reloadModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\ntype ReloadCallback = (model: ModularUIModel | undefined) => boolean;\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => void;\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useBEIDispatch();\n\n const selectModularUI = (state: RootState) => state.modularui;\n const selector = createSelector([selectModularUI], (modularui) => {\n const models = [];\n const keys = Object.keys(modularui);\n for (const key of keys) {\n const model = modularui[key];\n if (model?.status === MODULARUI_STATUS.FINISHED) {\n models.push(model.model);\n }\n }\n return models;\n });\n\n const modularuiModels = useBEISelector(selector);\n\n return {\n reload: (model: ModularUIModel, options?: ModularUIRequestOptions) => {\n dispatch(reloadModel(model, options));\n },\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => {\n const modelsToReload = modularuiModels.filter(callbackFn);\n for (const modelToReload of modelsToReload) {\n if (modelToReload) {\n dispatch(reloadModel(modelToReload, options));\n }\n }\n },\n };\n};\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"../redux/notifications/notificationReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../i18n/types\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useNotification = () => {\n const dispatch = useBEIDispatch();\n const { render, messageType, message, error } = useBEISelector(\n (state: RootState) => state.notification,\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => {\n dispatch(dismissNotification());\n },\n };\n};\n\nexport const useErrorNotification = () => {\n const dispatch = useBEIDispatch();\n return (message: MessageObject, error?: ErrorResponse) => {\n return dispatch(\n showNotification({ type: NOTIFICATION_TYPES.ERROR, message, error }),\n );\n };\n};\n","import { useMemo, useState } from \"react\";\n\nimport { useLocation, useRouteMatch } from \"react-router\";\n\nimport {\n CaseSearchModel,\n DetailModel,\n GroupingPanelModel,\n Href,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nconst useUrl = (href?: string | Href, fromRoute = false): Href => {\n const [previousUrl, setPreviousUrl] = useState<Href | null>(null);\n const [previousExact, setPreviousExact] = useState(false);\n\n const match = useRouteMatch();\n const location = useLocation();\n\n const url = useMemo(() => {\n if (href == null && previousUrl == null) {\n return new Href(\"\");\n }\n\n const currentUrl = href instanceof Href ? href : new Href(href);\n\n if (!fromRoute) {\n return currentUrl;\n }\n\n if (match.isExact) {\n currentUrl.addParametersFromString(location.search);\n }\n\n return currentUrl;\n }, [href, previousUrl, fromRoute, match.isExact, location.search]);\n\n // Check equality to prevent unnecessary state updates\n const isUrlChanged = !url.equalsWithParameters(previousUrl);\n\n const shouldUpdate =\n isUrlChanged &&\n (match.isExact ||\n previousExact === match.isExact ||\n !previousUrl?.startsWith(match.url));\n\n if (shouldUpdate) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n }\n\n return shouldUpdate ? url : previousUrl || url;\n};\n\nexport const usePanel = (\n href?: string | Href,\n options?: HookOptions & {\n fromRoute?: boolean;\n },\n):\n | ListModel\n | GroupingPanelModel\n | DetailModel\n | CaseSearchModel\n | undefined => {\n const { fromRoute, ...hookOptions } = options || { fromRoute: false };\n\n const url = useUrl(href, fromRoute || false);\n\n return useModularUIBasic(\"panel\", url, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\", \"CaseSearch\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, GroupingPanelModel, DetailModel, CaseSearchModel],\n ...hookOptions,\n });\n};\n","import { useMemo } from \"react\";\n\nimport pick from \"lodash/pick\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\n\nimport type { RootState } from \"../redux/store\";\n\nconst getPreferences = (state: RootState) => state.preferences;\n\nconst makeSelectPreference = (preferenceNames: string | string[]) => {\n const names = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return createSelector([getPreferences], (preferences) =>\n pick(preferences, names),\n );\n};\n\nexport const usePreference = (preferenceNames: string | string[]) => {\n const selectPreference = useMemo(\n () => makeSelectPreference(preferenceNames),\n [preferenceNames],\n );\n\n return useBEISelector(selectPreference);\n};\n","import { CaseSearchModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nexport const useQuicksearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n\nexport const useSearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"search\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n"],"mappings":"4rBAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAY,KAEZC,IAAkB,UAAW,CAC/B,GAAI,CACF,IAAIC,EAAOF,GAAU,OAAQ,gBAAgB,EAC7C,OAAAE,EAAK,CAAC,EAAG,GAAI,CAAC,CAAC,EACRA,CACT,MAAY,CAAC,CACf,GAAE,EAEFH,GAAO,QAAUE,KCVjB,IAAAE,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAiB,IAWrB,SAASC,GAAgBC,EAAQC,EAAKC,EAAO,CACvCD,GAAO,aAAeH,GACxBA,GAAeE,EAAQC,EAAK,CAC1B,aAAgB,GAChB,WAAc,GACd,MAASC,EACT,SAAY,EACd,CAAC,EAEDF,EAAOC,CAAG,EAAIC,CAElB,CAEAL,GAAO,QAAUE,KCxBjB,IAAAI,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAkB,KAClBC,GAAK,KAGLC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAYjC,SAASE,GAAYC,EAAQC,EAAKC,EAAO,CACvC,IAAIC,EAAWH,EAAOC,CAAG,GACrB,EAAEH,GAAe,KAAKE,EAAQC,CAAG,GAAKL,GAAGO,EAAUD,CAAK,IACv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Y,CAACJ,EAAqBC,IAC7CC,EAAkB,SAAUF,EAAM,CAChC,eAAgB,CAAC,YAAY,EAC7B,YAAaG,GACb,GAAGF,CACL,CAAC","names":["require_defineProperty","__commonJSMin","exports","module","getNative","defineProperty","func","require_baseAssignValue","__commonJSMin","exports","module","defineProperty","baseAssignValue","object","key","value","require_assignValue","__commonJSMin","exports","module","baseAssignValue","eq","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","require_baseSet","__commonJSMin","exports","module","assignValue","castPath","isIndex","isObject","toKey","baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","require_basePickBy","__commonJSMin","exports","module","baseGet","baseSet","castPath","basePickBy","object","paths","predicate","index","length","result","path","value","require_baseHasIn","__commonJSMin","exports","module","baseHasIn","object","key","require_hasIn","__commonJSMin","exports","module","baseHasIn","hasPath","hasIn","object","path","require_basePick","__commonJSMin","exports","module","basePickBy","hasIn","basePick","object","paths","value","path","require_flatten","__commonJSMin","exports","module","baseFlatten","flatten","array","length","require_apply","__commonJSMin","exports","module","apply","func","thisArg","args","require_overRest","__commonJSMin","exports","module","apply","nativeMax","overRest","func","start","transform","args","index","length","array","otherArgs","require_constant","__commonJSMin","exports","module","constant","value","require_identity","__commonJSMin","exports","module","identity","value","require_baseSetToString","__commonJSMin","exports","module","constant","defineProperty","identity","baseSetToString","func","string","require_shortOut","__commonJSMin","exports","module","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","func","count","lastCalled","stamp","remaining","require_setToString","__commonJSMin","exports","module","baseSetToString","shortOut","setToString","require_flatRest","__commonJSMin","exports","module","flatten","overRest","setToString","flatRest","func","require_pick","__commonJSMin","exports","module","basePick","flatRest","pick","object","paths","useEffect","useMemo","useState","HTTP_METHODS","FormModel","ListModel","createSelector","ModularUIRequest","getModularUIRequest","createSelector","getLocale","localeCode","href","options","request","ModularUIRequest","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","responseCount","setResponseCount","actions","useMemo","getActions","requestCount","useEffect","requests","action","href","HTTP_METHODS","form","FormModel","responses","actionForms","allActions","ListModel","listItem","updateActions","unique","INTERNAL_LOGIN_TYPE","IllegalStateException","Authenticate","getContextPath","getContextPathServer","Cache","ApplicationModel","CaseViewModel","DetailModel","GroupingPanelModel","TabModel","UserProfileModel","useMemo","HTTP_METHODS","useMemo","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","useMemo","location","push","replace","delta","go","goBack","goForward","useEffect","useMemo","useRef","useLocation","HTTP_METHODS","Href","useEffect","useRef","deepEqual","IS_DEV","checkDeps","deps","useDeepCompareMemoize","dependencies","ref","useDeepCompareEffect","callback","useMemo","useModularUIKey","modelKey","url","locale","useLocale","useMemo","useModularUI","modelKey","url","options","dispatch","useBEIDispatch","hrefInstance","useMemo","Href","requestUrl","currentQueryString","prevQueryRef","useRef","key","useModularUIKey","model","useBEISelector","state","requestOptions","merged","HTTP_METHODS","redirectLocation","useLocation","isQueryChanged","shouldLoad","useEffect","useDeepCompareEffect","fetchModel","removeModelByKey","createUseModularUIOptions","options","mustReload","baseOptions","HTTP_METHODS","validateModel","model","expectedModels","useModularUIBasic","defaultKey","href","memoizedHref","useMemo","key","useReload","modularUIOptions","modularUI","useModularUI","modelKey","url","location","useLocation","useModularUIKey","modelEntry","useBEISelector","state","reload","isFullyLoaded","lastModification","useApplication","options","useModularUIBasic","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","DetailModel","useUserProfile","UserProfileModel","useLogin","Cache","dispatch","useBEIDispatch","application","useApplication","auth","useBEISelector","state","isAuthenticated","primaryAuthenticationType","resetAuthErrors","username","password","login","authenticationType","IllegalStateException","getContextPathServer","useLogout","BASE_PATH","getContextPath","authenticate","Authenticate","INTERNAL_LOGIN_TYPE","origin","url","logout","useEffect","useState","ModularUIRequest","useCallback","useProgressIndicator","dispatch","useBEIDispatch","start","useCallback","startProgress","finish","finishProgress","reset","resetProgress","update","percentComplete","updateProgress","useProgressIndicatorState","useBEISelector","state","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","useEffect","requests","modularuiRequest","ModularUIRequest","responseContent","produce","HTTP_METHODS","FormModel","Href","getSetting","useForm","href","data","formHref","Href","getSetting","form","useModularUI","HTTP_METHODS","FormModel","useFormNavigation","dispatch","useBEIDispatch","previousObject","cancelForm","fetchModel","newModel","produce","draft","removeModelByKey","showFormNotification","useAttributeUpdate","formObject","attribute","inputvalue","options","updateFormAttribute","useRepeatableAttributeSet","addRepeatableAttributeSet","object","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","useCallback","useMemo","HTTP_METHODS","AssignmentFilterModel","CaseSearchModel","DetailModel","FilterModel","ListDetailModel","ListModel","useList","href","options","useModularUIBasic","ListModel","useListOrDetail","DetailModel","useListDetail","ListDetailModel","useListNavigation","syncLocation","historyAction","push","replace","useNavigation","dispatch","useBEIDispatch","navigate","update","useCallback","list","resetPage","listHref","HTTP_METHODS","fetchModel","CaseSearchModel","updateFilters","filters","updateFilter","filter","value","attribute","AssignmentFilterModel","filterToUpdate","targetAttr","FilterModel","searchKey","resetFilters","removeFilter","updateSort","sortOption","updatePage","page","updatePageSize","pagesize","useMemo","useEffect","useState","HTTP_METHODS","Href","LookupOptionsModel","useLookup","lookupLink","filterInput","minLength","debounceMs","start","finish","useProgressIndicator","modularuiRequest","useModularUIRequest","lookupOptions","setLookupOptions","useState","lookupLoading","setLookupLoading","href","filterName","method","useEffect","timeoutId","lookupHref","Href","requestOptions","HTTP_METHODS","lookupResponse","LookupOptionsModel","useCallback","IllegalArgumentException","useModal","modalId","IllegalArgumentException","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","useCallback","showModal","close","closeModal","ConceptIndexModel","ContentIndexModel","ContentTOCModel","ContentTypeModel","Href","ModelCatalogModel","createHref","filterParameters","useModelCatalog","options","useModularUIBasic","ModelCatalogModel","useConceptIndex","href","key","entryDate","useEntryDate","url","filterParameters","ConceptIndexModel","useConceptDetail","concept","location","useLocation","createHref","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","useCompleteSource","contentHref","Href","useContentType","contentType","ContentTypeModel","useRelatedConcepts","getSearchHref","uri","filters","filterString","filterValue","value","useConceptSearch","useContentSearch","dispatch","useBEIDispatch","useBEISelector","getEntryDate","updateEntryDate","ApplicationModel","useAllModelsByInstance","instance","useBEISelector","state","getAllModelsByInstance","useFirstModelByInstance","getFirstModelByInstance","useActiveModelByInstance","getActiveModelByInstance","useModelByHref","href","modelByHref","useKeyByHref","keyByHref","useAllKeysByHref","allKeysByHref","useActiveModels","getActiveModels","useAllFinishedModels","getAllFinishedModels","useCurrentApplication","application","getApplication","ApplicationModel","createSelector","useModels","dispatch","useBEIDispatch","selector","createSelector","state","modularui","models","keys","key","model","modularuiModels","useBEISelector","options","reloadModel","callbackFn","modelsToReload","modelToReload","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","useMemo","useState","useLocation","useRouteMatch","CaseSearchModel","DetailModel","GroupingPanelModel","Href","ListModel","useUrl","href","fromRoute","previousUrl","setPreviousUrl","useState","previousExact","setPreviousExact","match","useRouteMatch","location","useLocation","url","useMemo","Href","currentUrl","shouldUpdate","usePanel","options","hookOptions","useModularUIBasic","ListModel","GroupingPanelModel","DetailModel","CaseSearchModel","import_pick","useMemo","createSelector","getPreferences","state","makeSelectPreference","preferenceNames","names","createSelector","preferences","pick","usePreference","selectPreference","useMemo","useBEISelector","CaseSearchModel","useQuicksearch","href","options","useModularUIBasic","CaseSearchModel","useSearch"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getStringSetting as n}from"@beinformed/ui/settings";import{getRepositoryResourceUrl as i}from"@beinformed/ui/utils";var s=()=>{let e=n("SWIM_LANE_DIAGRAM_CONFIGURATION","/Library/Diagrams/Overviews.json");return e.startsWith("/")||(e=`/${e}`),i(e)};var f=(e,o="Component",t)=>{let r=e.displayName||e.name||o;return t?`${r}[${t}]`:r},c=e=>o=>{e.forEach(t=>{typeof t=="function"?t(o):t!=null&&typeof t=="object"&&(t.current=o)})};export{s as a,f as b,c};
|
|
2
|
+
//# sourceMappingURL=chunk-WEJGEXAP.js.map
|