@beinformed/ui 1.67.1 → 1.67.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 CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [1.67.3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.67.2...v1.67.3) (2026-03-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **choice-attribute:** render choice option readonlyvalue with multiple attributes ([a4687c3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/a4687c35e4c6f5885d7de93ca4de7b9caa401d00))
11
+
12
+ ## [1.67.2](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.67.0...v1.67.2) (2026-02-16)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **hooks:** add hook to retrieve Locales ([46a77c3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/46a77c3cd6272e9a1fa972f703dc135a453c35e9))
18
+ * **index:** export new hooks ([e7aa504](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/e7aa504757217be747620732d3b9d46197724b41))
19
+
5
20
  ## [1.67.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.67.0...v1.67.1) (2026-02-16)
6
21
 
7
22
 
@@ -1,6 +1,8 @@
1
1
  export * from "./useAllFormsOnModel";
2
2
  export * from "./useAuthentication";
3
3
  export * from "./useContent";
4
+ export * from "./useDeepCompareEffect";
5
+ export * from "./useErrorHandler";
4
6
  export * from "./useForm";
5
7
  export * from "./useI18n";
6
8
  export * from "./useList";
@@ -11,6 +13,7 @@ export * from "./useModels";
11
13
  export * from "./useModelSelectors";
12
14
  export * from "./useModularUI";
13
15
  export * from "./useModularUIBasic";
16
+ export * from "./useModularUIKey";
14
17
  export * from "./useModularUIModel";
15
18
  export * from "./useModularUIRequest";
16
19
  export * from "./useNotification";
@@ -2,6 +2,8 @@
2
2
  export * from "./useAllFormsOnModel";
3
3
  export * from "./useAuthentication";
4
4
  export * from "./useContent";
5
+ export * from "./useDeepCompareEffect";
6
+ export * from "./useErrorHandler";
5
7
  export * from "./useForm";
6
8
  export * from "./useI18n";
7
9
  export * from "./useList";
@@ -12,6 +14,7 @@ export * from "./useModels";
12
14
  export * from "./useModelSelectors";
13
15
  export * from "./useModularUI";
14
16
  export * from "./useModularUIBasic";
17
+ export * from "./useModularUIKey";
15
18
  export * from "./useModularUIModel";
16
19
  export * from "./useModularUIRequest";
17
20
  export * from "./useNotification";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/hooks/index.js"],"sourcesContent":["// @flow\nexport * from \"./useAllFormsOnModel\";\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useList\";\nexport * from \"./useLookup\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModelSelectors\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePanel\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useSearch\";\n"],"mappings":"AACA,cAAc,sBAAsB;AACpC,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,aAAa;AAC3B,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,aAAa;AAC3B,cAAc,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/hooks/index.js"],"sourcesContent":["// @flow\nexport * from \"./useAllFormsOnModel\";\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useDeepCompareEffect\";\nexport * from \"./useErrorHandler\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useList\";\nexport * from \"./useLookup\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModelSelectors\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIKey\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePanel\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useSearch\";\n"],"mappings":"AACA,cAAc,sBAAsB;AACpC,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,wBAAwB;AACtC,cAAc,mBAAmB;AACjC,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,aAAa;AAC3B,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,qBAAqB;AACnC,cAAc,mBAAmB;AACjC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,aAAa;AAC3B,cAAc,aAAa","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
2
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
3
3
  import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
4
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
5
4
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
5
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
6
  import BaseModel from "../base/BaseModel";
7
7
  import ChoiceAttributeOptionCollection from "./ChoiceAttributeOptionCollection";
8
8
  import { has } from "../../utils/helpers/objects";
@@ -142,13 +142,12 @@ class ChoiceAttributeOptionModel extends BaseModel {
142
142
  return this.contributions.label;
143
143
  }
144
144
  if (this.attributeCollection.hasItems) {
145
+ var _context;
145
146
  const title = this.attributeCollection.getAttributeByLayoutHint(TITLE);
146
147
  if (title) {
147
148
  return title.readonlyvalue;
148
149
  }
149
- if (this.attributeCollection.first) {
150
- return this.attributeCollection.first.readonlyvalue;
151
- }
150
+ return _mapInstanceProperty(_context = this.attributeCollection.all).call(_context, attribute => attribute.readonlyvalue).join(" · ");
152
151
  }
153
152
  return "";
154
153
  }
@@ -160,11 +159,11 @@ class ChoiceAttributeOptionModel extends BaseModel {
160
159
  getContentConfiguredLabel(contentConfiguration) {
161
160
  const configuredLabelProperties = contentConfiguration?.labelConfig?.[0]?.types ?? [];
162
161
  if (!this.hasContentFromData && this.concept && configuredLabelProperties.length > 0) {
163
- var _context;
164
- const configuredLabels = _filterInstanceProperty(_context = this.concept.getLabelElementByIds(configuredLabelProperties)).call(_context, configuredLabel => configuredLabel.value && configuredLabel.value !== "");
162
+ var _context2;
163
+ const configuredLabels = _filterInstanceProperty(_context2 = this.concept.getLabelElementByIds(configuredLabelProperties)).call(_context2, configuredLabel => configuredLabel.value && configuredLabel.value !== "");
165
164
  if (configuredLabels.length > 0) {
166
- var _context2;
167
- return _mapInstanceProperty(_context2 = _filterInstanceProperty(configuredLabelProperties).call(configuredLabelProperties, configuredLabelProperty => configuredLabels.some(configuredLabel => configuredLabel._id === configuredLabelProperty))).call(_context2, configuredLabelProperty => _findInstanceProperty(configuredLabels).call(configuredLabels, configuredLabel => configuredLabel._id === configuredLabelProperty))[0].value;
165
+ var _context3;
166
+ return _mapInstanceProperty(_context3 = _filterInstanceProperty(configuredLabelProperties).call(configuredLabelProperties, configuredLabelProperty => configuredLabels.some(configuredLabel => configuredLabel._id === configuredLabelProperty))).call(_context3, configuredLabelProperty => _findInstanceProperty(configuredLabels).call(configuredLabels, configuredLabel => configuredLabel._id === configuredLabelProperty))[0].value;
168
167
  }
169
168
  }
170
169
  return this.label;
@@ -195,9 +195,9 @@ class ChoiceAttributeOptionModel
195
195
  return title.readonlyvalue;
196
196
  }
197
197
 
198
- if (this.attributeCollection.first) {
199
- return this.attributeCollection.first.readonlyvalue;
200
- }
198
+ return this.attributeCollection.all
199
+ .map((attribute) => attribute.readonlyvalue)
200
+ .join(" · ");
201
201
  }
202
202
 
203
203
  return "";
@@ -1 +1 @@
1
- {"version":3,"file":"ChoiceAttributeOptionModel.js","names":["BaseModel","ChoiceAttributeOptionCollection","has","TIMEVERSION_FILTER_NAME","TITLE","hasAllContentInData","LinkCollection","AttributeCollection","ConceptDetailModel","AttributeContent","ChoiceAttributeOptionModel","constructor","selectedValues","option","modelOptions","_defineProperty","code","contributions","key","_isSelected","_includesInstanceProperty","call","_referenceDate","referenceDate","Date","toISOString","split","_level","_attributeCollection","createAttributeCollection","_children","addChildren","_links","origin","contextPath","_content","content","_isUser","optionType","createFromListItemModel","listitem","id","toString","attributeCollection","clone","links","isChoiceAttributeOptionModel","getInitialChildModelLinks","initialLinks","hasContentFromData","conceptLink","push","children","setChildModels","models","errors","conceptHref","href","concept","_findInstanceProperty","model","selfhref","equalsWithParameters","_code","equals","getContribution","data","isReadonly","label","hasItems","title","getAttributeByLayoutHint","readonlyvalue","first","getContentConfiguredLabel","contentConfiguration","configuredLabelProperties","labelConfig","types","length","_context","configuredLabels","_filterInstanceProperty","getLabelElementByIds","configuredLabel","value","_context2","_mapInstanceProperty","configuredLabelProperty","some","_id","selected","count","create","options","date","getLinkByKey","addParameter","isCacheable","avatarLink","_concept","level","isBooleanType","hasAlternativeLabel","mergeOption","withOption","mergeOptions","isUser"],"sources":["../../../src/models/attributes/ChoiceAttributeOptionModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport ChoiceAttributeOptionCollection from \"./ChoiceAttributeOptionCollection\";\n\nimport { has } from \"../../utils/helpers/objects\";\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport { TITLE } from \"../../constants/LayoutHints\";\nimport { hasAllContentInData } from \"../../constants/Settings\";\n\nimport LinkCollection from \"../links/LinkCollection\";\nimport AttributeCollection from \"./AttributeCollection\";\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\nimport AttributeContent from \"./AttributeContent\";\n\nimport type {\n IModelWithChildModels,\n ModelOptions,\n ModularUIModel,\n} from \"../types\";\nimport type ListItemModel from \"../list/ListItemModel\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\nexport type ChoiceAttributeOptionModelOptions = {\n ...ModelOptions,\n referenceDate: ISO_DATE,\n};\n\n/**\n */\nclass ChoiceAttributeOptionModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _code: string;\n _isSelected: boolean;\n _referenceDate: ISO_DATE;\n _level: number;\n _children: ChoiceAttributeOptionCollection;\n _concept: ?ConceptDetailModel;\n _links: LinkCollection;\n _attributeCollection: AttributeCollection;\n _content: AttributeContent;\n _isUser: boolean = false;\n\n /**\n */\n constructor(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ) {\n super({}, option);\n\n this.code = this.contributions.code ?? this.contributions.key ?? \"\";\n\n this._isSelected = selectedValues.includes(this.code);\n\n this._referenceDate =\n modelOptions?.referenceDate || new Date().toISOString().split(\"T\")[0];\n\n this._level = 0;\n\n this._attributeCollection = this.createAttributeCollection(modelOptions);\n this._children = this.addChildren(selectedValues, option, modelOptions);\n\n this._links = new LinkCollection(\n this.contributions._links,\n {},\n { origin: modelOptions?.origin, contextPath: modelOptions?.contextPath },\n );\n\n this._content = new AttributeContent(option.content);\n\n this._isUser = option.optionType === \"user\";\n }\n\n /**\n */\n static createFromListItemModel(\n listitem: ListItemModel,\n ): ChoiceAttributeOptionModel {\n const option = new ChoiceAttributeOptionModel();\n\n option.code = listitem.id.toString();\n option.attributeCollection = listitem.attributeCollection.clone();\n option.links = listitem.links.clone();\n\n return option;\n }\n\n /**\n * Indicates that this a choice attribute option model, used when adding options to a choice attribute\n * @returns {boolean}\n */\n get isChoiceAttributeOptionModel(): boolean {\n return true;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const initialLinks = [];\n\n if (!this.hasContentFromData && this.conceptLink !== null) {\n initialLinks.push(this.conceptLink);\n }\n\n if (this.children) {\n initialLinks.push(...this.children.getInitialChildModelLinks());\n }\n\n return initialLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n if (this.conceptLink !== null) {\n const conceptHref = this.conceptLink.href;\n\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref),\n );\n }\n\n if (this.children) {\n this.children.setChildModels(models, errors);\n }\n }\n\n /**\n * Get code of option\n */\n get code(): string {\n return this._code;\n }\n\n /**\n */\n set code(code: string) {\n this._code = code;\n }\n\n /**\n */\n equals(model: ChoiceAttributeOptionModel): boolean {\n return this.code.toString() === model.code.toString();\n }\n\n /**\n * Retrieve attributes for Composite codemaps (e.g. table and case list codemaps)\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n set attributeCollection(attributeCollection: AttributeCollection) {\n this._attributeCollection = attributeCollection;\n }\n\n /**\n */\n createAttributeCollection(\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): AttributeCollection {\n const contributions = this.getContribution(\"elementsContributions\", []);\n\n if (has(this.contributions, \"elements\")) {\n const data = this.getContribution(\"elements\", {});\n return new AttributeCollection(data, contributions, {\n origin: modelOptions?.origin,\n contextPath: modelOptions?.contextPath,\n isReadonly: true,\n });\n }\n\n return new AttributeCollection();\n }\n\n /**\n * Get label of option for simple codemaps (e.g. static codemap)\n */\n get label(): string {\n if (this.contributions.label) {\n return this.contributions.label;\n }\n\n if (this.attributeCollection.hasItems) {\n const title = this.attributeCollection.getAttributeByLayoutHint(TITLE);\n\n if (title) {\n return title.readonlyvalue;\n }\n\n if (this.attributeCollection.first) {\n return this.attributeCollection.first.readonlyvalue;\n }\n }\n\n return \"\";\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(contentConfiguration: Object): string {\n const configuredLabelProperties =\n contentConfiguration?.labelConfig?.[0]?.types ?? [];\n\n if (\n !this.hasContentFromData &&\n this.concept &&\n configuredLabelProperties.length > 0\n ) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\",\n );\n\n if (configuredLabels.length > 0) {\n return configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )[0].value;\n }\n }\n\n return this.label;\n }\n\n /**\n * Indicates if option is selected\n */\n get selected(): boolean {\n return this._isSelected;\n }\n\n /**\n * Set selected property of option\n */\n set selected(selected: boolean) {\n this._isSelected = selected;\n }\n\n /**\n * Retrieve count of filter for option\n */\n get count(): number | null {\n return this.getContribution(\"count\");\n }\n\n /**\n */\n addChildren(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): ChoiceAttributeOptionCollection {\n // When contributions contain elements this is a list not nested options\n if (has(option, \"elements\")) {\n return new ChoiceAttributeOptionCollection(modelOptions);\n }\n\n return ChoiceAttributeOptionCollection.create(\n {\n value: selectedValues,\n },\n { options: option?.children ?? [] },\n modelOptions,\n );\n }\n\n /**\n * get children of option\n */\n get children(): ChoiceAttributeOptionCollection {\n return this._children;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n return this._links;\n }\n\n /**\n */\n set links(links: LinkCollection) {\n this._links = links;\n }\n\n /**\n * referenceDate received from attribute\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate,\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n *\n */\n get avatarLink(): LinkModel | null {\n return this.links.getLinkByKey(\"avatar\");\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept || null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Get level of option, used in tree view choice attributes (taxonomy)\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Set level of option\n */\n set level(level: number) {\n this._level = level;\n }\n\n /**\n */\n get isBooleanType(): boolean {\n return this.getContribution(\"isBooleanType\", false);\n }\n\n /**\n */\n get hasAlternativeLabel(): boolean {\n return this.getContribution(\"hasAlternativeLabel\", false);\n }\n\n /**\n */\n mergeOption(withOption: ChoiceAttributeOptionModel) {\n this.concept = withOption.concept;\n\n if (this.children != null && withOption.children != null) {\n this.children.mergeOptions(withOption.children);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return this._content;\n }\n\n /**\n */\n get isUser(): boolean {\n return this._isUser;\n }\n}\n\nexport default ChoiceAttributeOptionModel;\n"],"mappings":";;;;;AACA,OAAOA,SAAS,MAAM,mBAAmB;AACzC,OAAOC,+BAA+B,MAAM,mCAAmC;AAE/E,SAASC,GAAG,QAAQ,6BAA6B;AACjD,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,kBAAkB,MAAM,gCAAgC;AAC/D,OAAOC,gBAAgB,MAAM,oBAAoB;AAgBjD;AACA;AACA,MAAMC,0BAA0B,SACtBV,SAAS,CAEnB;EAYE;AACF;EACEW,WAAWA,CACTC,cAA6B,GAAG,EAAE,EAClCC,MAAc,GAAG,CAAC,CAAC,EACnBC,YAAgD,EAChD;IACA,KAAK,CAAC,CAAC,CAAC,EAAED,MAAM,CAAC;IAACE,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,kBATD,KAAK;IAWtB,IAAI,CAACC,IAAI,GAAG,IAAI,CAACC,aAAa,CAACD,IAAI,IAAI,IAAI,CAACC,aAAa,CAACC,GAAG,IAAI,EAAE;IAEnE,IAAI,CAACC,WAAW,GAAGC,yBAAA,CAAAR,cAAc,EAAAS,IAAA,CAAdT,cAAc,EAAU,IAAI,CAACI,IAAI,CAAC;IAErD,IAAI,CAACM,cAAc,GACjBR,YAAY,EAAES,aAAa,IAAI,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAACC,KAAK,CAAC,G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IAAI;EAC9B;;EAEA;AACF;AACA;EACE,IAAI1C,OAAOA,CAACA,OAAwB,EAAE;IACpC,IAAI,CAAC0C,QAAQ,GAAG1C,OAAO,YAAYlD,kBAAkB,GAAGkD,OAAO,GAAG,IAAI;EACxE;;EAEA;AACF;AACA;EACE,IAAI2C,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAAC1E,MAAM;EACpB;;EAEA;AACF;AACA;EACE,IAAI0E,KAAKA,CAACA,KAAa,EAAE;IACvB,IAAI,CAAC1E,MAAM,GAAG0E,KAAK;EACrB;;EAEA;AACF;EACE,IAAIC,aAAaA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAACrC,eAAe,CAAC,eAAe,EAAE,KAAK,CAAC;EACrD;;EAEA;AACF;EACE,IAAIsC,mBAAmBA,CAAA,EAAY;IACjC,OAAO,IAAI,CAACtC,eAAe,CAAC,qBAAqB,EAAE,KAAK,CAAC;EAC3D;;EAEA;AACF;EACEuC,WAAWA,CAACC,UAAsC,EAAE;IAClD,IAAI,CAAC/C,OAAO,GAAG+C,UAAU,CAAC/C,OAAO;IAEjC,IAAI,IAAI,CAACN,QAAQ,IAAI,IAAI,IAAIqD,UAAU,CAACrD,QAAQ,IAAI,IAAI,EAAE;MACxD,IAAI,CAACA,QAAQ,CAACsD,YAAY,CAACD,UAAU,CAACrD,QAAQ,CAAC;IACjD;EACF;;EAEA;AACF;AACA;EACE,IAAIH,kBAAkBA,CAAA,EAAY;IAChC,OAAO5C,mBAAmB,CAAC,CAAC;EAC9B;;EAEA;AACF;EACE,IAAI+B,OAAOA,CAAA,EAAqB;IAC9B,OAAO,IAAI,CAACD,QAAQ;EACtB;;EAEA;AACF;EACE,IAAIwE,MAAMA,CAAA,EAAY;IACpB,OAAO,IAAI,CAACtE,OAAO;EACrB;AACF;AAEA,eAAe3B,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"ChoiceAttributeOptionModel.js","names":["BaseModel","ChoiceAttributeOptionCollection","has","TIMEVERSION_FILTER_NAME","TITLE","hasAllContentInData","LinkCollection","AttributeCollection","ConceptDetailModel","AttributeContent","ChoiceAttributeOptionModel","constructor","selectedValues","option","modelOptions","_defineProperty","code","contributions","key","_isSelected","_includesInstanceProperty","call","_referenceDate","referenceDate","Date","toISOString","split","_level","_attributeCollection","createAttributeCollection","_children","addChildren","_links","origin","contextPath","_content","content","_isUser","optionType","createFromListItemModel","listitem","id","toString","attributeCollection","clone","links","isChoiceAttributeOptionModel","getInitialChildModelLinks","initialLinks","hasContentFromData","conceptLink","push","children","setChildModels","models","errors","conceptHref","href","concept","_findInstanceProperty","model","selfhref","equalsWithParameters","_code","equals","getContribution","data","isReadonly","label","hasItems","_context","title","getAttributeByLayoutHint","readonlyvalue","_mapInstanceProperty","all","attribute","join","getContentConfiguredLabel","contentConfiguration","configuredLabelProperties","labelConfig","types","length","_context2","configuredLabels","_filterInstanceProperty","getLabelElementByIds","configuredLabel","value","_context3","configuredLabelProperty","some","_id","selected","count","create","options","date","getLinkByKey","addParameter","isCacheable","avatarLink","_concept","level","isBooleanType","hasAlternativeLabel","mergeOption","withOption","mergeOptions","isUser"],"sources":["../../../src/models/attributes/ChoiceAttributeOptionModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport ChoiceAttributeOptionCollection from \"./ChoiceAttributeOptionCollection\";\n\nimport { has } from \"../../utils/helpers/objects\";\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport { TITLE } from \"../../constants/LayoutHints\";\nimport { hasAllContentInData } from \"../../constants/Settings\";\n\nimport LinkCollection from \"../links/LinkCollection\";\nimport AttributeCollection from \"./AttributeCollection\";\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\nimport AttributeContent from \"./AttributeContent\";\n\nimport type {\n IModelWithChildModels,\n ModelOptions,\n ModularUIModel,\n} from \"../types\";\nimport type ListItemModel from \"../list/ListItemModel\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\nexport type ChoiceAttributeOptionModelOptions = {\n ...ModelOptions,\n referenceDate: ISO_DATE,\n};\n\n/**\n */\nclass ChoiceAttributeOptionModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _code: string;\n _isSelected: boolean;\n _referenceDate: ISO_DATE;\n _level: number;\n _children: ChoiceAttributeOptionCollection;\n _concept: ?ConceptDetailModel;\n _links: LinkCollection;\n _attributeCollection: AttributeCollection;\n _content: AttributeContent;\n _isUser: boolean = false;\n\n /**\n */\n constructor(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ) {\n super({}, option);\n\n this.code = this.contributions.code ?? this.contributions.key ?? \"\";\n\n this._isSelected = selectedValues.includes(this.code);\n\n this._referenceDate =\n modelOptions?.referenceDate || new Date().toISOString().split(\"T\")[0];\n\n this._level = 0;\n\n this._attributeCollection = this.createAttributeCollection(modelOptions);\n this._children = this.addChildren(selectedValues, option, modelOptions);\n\n this._links = new LinkCollection(\n this.contributions._links,\n {},\n { origin: modelOptions?.origin, contextPath: modelOptions?.contextPath },\n );\n\n this._content = new AttributeContent(option.content);\n\n this._isUser = option.optionType === \"user\";\n }\n\n /**\n */\n static createFromListItemModel(\n listitem: ListItemModel,\n ): ChoiceAttributeOptionModel {\n const option = new ChoiceAttributeOptionModel();\n\n option.code = listitem.id.toString();\n option.attributeCollection = listitem.attributeCollection.clone();\n option.links = listitem.links.clone();\n\n return option;\n }\n\n /**\n * Indicates that this a choice attribute option model, used when adding options to a choice attribute\n * @returns {boolean}\n */\n get isChoiceAttributeOptionModel(): boolean {\n return true;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const initialLinks = [];\n\n if (!this.hasContentFromData && this.conceptLink !== null) {\n initialLinks.push(this.conceptLink);\n }\n\n if (this.children) {\n initialLinks.push(...this.children.getInitialChildModelLinks());\n }\n\n return initialLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n if (this.conceptLink !== null) {\n const conceptHref = this.conceptLink.href;\n\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref),\n );\n }\n\n if (this.children) {\n this.children.setChildModels(models, errors);\n }\n }\n\n /**\n * Get code of option\n */\n get code(): string {\n return this._code;\n }\n\n /**\n */\n set code(code: string) {\n this._code = code;\n }\n\n /**\n */\n equals(model: ChoiceAttributeOptionModel): boolean {\n return this.code.toString() === model.code.toString();\n }\n\n /**\n * Retrieve attributes for Composite codemaps (e.g. table and case list codemaps)\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n set attributeCollection(attributeCollection: AttributeCollection) {\n this._attributeCollection = attributeCollection;\n }\n\n /**\n */\n createAttributeCollection(\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): AttributeCollection {\n const contributions = this.getContribution(\"elementsContributions\", []);\n\n if (has(this.contributions, \"elements\")) {\n const data = this.getContribution(\"elements\", {});\n return new AttributeCollection(data, contributions, {\n origin: modelOptions?.origin,\n contextPath: modelOptions?.contextPath,\n isReadonly: true,\n });\n }\n\n return new AttributeCollection();\n }\n\n /**\n * Get label of option for simple codemaps (e.g. static codemap)\n */\n get label(): string {\n if (this.contributions.label) {\n return this.contributions.label;\n }\n\n if (this.attributeCollection.hasItems) {\n const title = this.attributeCollection.getAttributeByLayoutHint(TITLE);\n\n if (title) {\n return title.readonlyvalue;\n }\n\n return this.attributeCollection.all\n .map((attribute) => attribute.readonlyvalue)\n .join(\" · \");\n }\n\n return \"\";\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(contentConfiguration: Object): string {\n const configuredLabelProperties =\n contentConfiguration?.labelConfig?.[0]?.types ?? [];\n\n if (\n !this.hasContentFromData &&\n this.concept &&\n configuredLabelProperties.length > 0\n ) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\",\n );\n\n if (configuredLabels.length > 0) {\n return configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )[0].value;\n }\n }\n\n return this.label;\n }\n\n /**\n * Indicates if option is selected\n */\n get selected(): boolean {\n return this._isSelected;\n }\n\n /**\n * Set selected property of option\n */\n set selected(selected: boolean) {\n this._isSelected = selected;\n }\n\n /**\n * Retrieve count of filter for option\n */\n get count(): number | null {\n return this.getContribution(\"count\");\n }\n\n /**\n */\n addChildren(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): ChoiceAttributeOptionCollection {\n // When contributions contain elements this is a list not nested options\n if (has(option, \"elements\")) {\n return new ChoiceAttributeOptionCollection(modelOptions);\n }\n\n return ChoiceAttributeOptionCollection.create(\n {\n value: selectedValues,\n },\n { options: option?.children ?? [] },\n modelOptions,\n );\n }\n\n /**\n * get children of option\n */\n get children(): ChoiceAttributeOptionCollection {\n return this._children;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n return this._links;\n }\n\n /**\n */\n set links(links: LinkCollection) {\n this._links = links;\n }\n\n /**\n * referenceDate received from attribute\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate,\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n *\n */\n get avatarLink(): LinkModel | null {\n return this.links.getLinkByKey(\"avatar\");\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept || null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Get level of option, used in tree view choice attributes (taxonomy)\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Set level of option\n */\n set level(level: number) {\n this._level = level;\n }\n\n /**\n */\n get isBooleanType(): boolean {\n return this.getContribution(\"isBooleanType\", false);\n }\n\n /**\n */\n get hasAlternativeLabel(): boolean {\n return this.getContribution(\"hasAlternativeLabel\", false);\n }\n\n /**\n */\n mergeOption(withOption: ChoiceAttributeOptionModel) {\n this.concept = withOption.concept;\n\n if (this.children != null && withOption.children != null) {\n this.children.mergeOptions(withOption.children);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return this._content;\n }\n\n /**\n */\n get isUser(): boolean {\n return this._isUser;\n }\n}\n\nexport default ChoiceAttributeOptionModel;\n"],"mappings":";;;;;AACA,OAAOA,SAAS,MAAM,mBAAmB;AACzC,OAAOC,+BAA+B,MAAM,mCAAmC;AAE/E,SAASC,GAAG,QAAQ,6BAA6B;AACjD,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,kBAAkB,MAAM,gCAAgC;AAC/D,OAAOC,gBAAgB,MAAM,oBAAoB;AAgBjD;AACA;AACA,MAAMC,0BAA0B,SACtBV,SAAS,CAEnB;EAYE;AACF;EACEW,WAAWA,CACTC,cAA6B,GAAG,EAAE,EAClCC,MAAc,GAAG,CAAC,CAAC,EACnBC,YAAgD,EAChD;IACA,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C,EAAE;IAClD,IAAI,CAAClD,OAAO,GAAGkD,UAAU,CAAClD,OAAO;IAEjC,IAAI,IAAI,CAACN,QAAQ,IAAI,IAAI,IAAIwD,UAAU,CAACxD,QAAQ,IAAI,IAAI,EAAE;MACxD,IAAI,CAACA,QAAQ,CAACyD,YAAY,CAACD,UAAU,CAACxD,QAAQ,CAAC;IACjD;EACF;;EAEA;AACF;AACA;EACE,IAAIH,kBAAkBA,CAAA,EAAY;IAChC,OAAO5C,mBAAmB,CAAC,CAAC;EAC9B;;EAEA;AACF;EACE,IAAI+B,OAAOA,CAAA,EAAqB;IAC9B,OAAO,IAAI,CAACD,QAAQ;EACtB;;EAEA;AACF;EACE,IAAI2E,MAAMA,CAAA,EAAY;IACpB,OAAO,IAAI,CAACzE,OAAO;EACrB;AACF;AAEA,eAAe3B,0BAA0B","ignoreList":[]}
@@ -37,6 +37,28 @@ _Object$keys(_useContent).forEach(function (key) {
37
37
  }
38
38
  });
39
39
  });
40
+ var _useDeepCompareEffect = require("./useDeepCompareEffect");
41
+ _Object$keys(_useDeepCompareEffect).forEach(function (key) {
42
+ if (key === "default" || key === "__esModule") return;
43
+ if (key in exports && exports[key] === _useDeepCompareEffect[key]) return;
44
+ Object.defineProperty(exports, key, {
45
+ enumerable: true,
46
+ get: function () {
47
+ return _useDeepCompareEffect[key];
48
+ }
49
+ });
50
+ });
51
+ var _useErrorHandler = require("./useErrorHandler");
52
+ _Object$keys(_useErrorHandler).forEach(function (key) {
53
+ if (key === "default" || key === "__esModule") return;
54
+ if (key in exports && exports[key] === _useErrorHandler[key]) return;
55
+ Object.defineProperty(exports, key, {
56
+ enumerable: true,
57
+ get: function () {
58
+ return _useErrorHandler[key];
59
+ }
60
+ });
61
+ });
40
62
  var _useForm = require("./useForm");
41
63
  _Object$keys(_useForm).forEach(function (key) {
42
64
  if (key === "default" || key === "__esModule") return;
@@ -147,6 +169,17 @@ _Object$keys(_useModularUIBasic).forEach(function (key) {
147
169
  }
148
170
  });
149
171
  });
172
+ var _useModularUIKey = require("./useModularUIKey");
173
+ _Object$keys(_useModularUIKey).forEach(function (key) {
174
+ if (key === "default" || key === "__esModule") return;
175
+ if (key in exports && exports[key] === _useModularUIKey[key]) return;
176
+ Object.defineProperty(exports, key, {
177
+ enumerable: true,
178
+ get: function () {
179
+ return _useModularUIKey[key];
180
+ }
181
+ });
182
+ });
150
183
  var _useModularUIModel = require("./useModularUIModel");
151
184
  _Object$keys(_useModularUIModel).forEach(function (key) {
152
185
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_useAllFormsOnModel","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_useAuthentication","_useContent","_useForm","_useI18n","_useList","_useLookup","_useModal","_useModelCatalog","_useModels","_useModelSelectors","_useModularUI","_useModularUIBasic","_useModularUIModel","_useModularUIRequest","_useNotification","_usePanel","_usePreference","_useProgressIndicator","_useRouter","_useSearch"],"sources":["../../src/hooks/index.js"],"sourcesContent":["// @flow\nexport * from \"./useAllFormsOnModel\";\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useList\";\nexport * from \"./useLookup\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModelSelectors\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePanel\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useSearch\";\n"],"mappings":";;;;;;AACA,IAAAA,mBAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,mBAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,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AAAA;AACA,IAAAuB,qBAAA,GAAA1B,OAAA;AAAAC,YAAA,CAAAyB,qBAAA,EAAAxB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAuB,qBAAA,CAAAvB,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAkB,qBAAA,CAAAvB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAwB,UAAA,GAAA3B,OAAA;AAAAC,YAAA,CAAA0B,UAAA,EAAAzB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAwB,UAAA,CAAAxB,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAmB,UAAA,CAAAxB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAyB,UAAA,GAAA5B,OAAA;AAAAC,YAAA,CAAA2B,UAAA,EAAA1B,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAyB,UAAA,CAAAzB,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAoB,UAAA,CAAAzB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_useAllFormsOnModel","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_useAuthentication","_useContent","_useDeepCompareEffect","_useErrorHandler","_useForm","_useI18n","_useList","_useLookup","_useModal","_useModelCatalog","_useModels","_useModelSelectors","_useModularUI","_useModularUIBasic","_useModularUIKey","_useModularUIModel","_useModularUIRequest","_useNotification","_usePanel","_usePreference","_useProgressIndicator","_useRouter","_useSearch"],"sources":["../../src/hooks/index.js"],"sourcesContent":["// @flow\nexport * from \"./useAllFormsOnModel\";\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useDeepCompareEffect\";\nexport * from \"./useErrorHandler\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useList\";\nexport * from \"./useLookup\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModelSelectors\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIKey\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePanel\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useSearch\";\n"],"mappings":";;;;;;AACA,IAAAA,mBAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,mBAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,mBAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,mBAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,kBAAA,GAAAT,OAAA;AAAAC,YAAA,CAAAQ,kBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,kBAAA,CAAAN,GA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A,OAAA,CAAAD,GAAA,MAAA2B,UAAA,CAAA3B,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAsB,UAAA,CAAA3B,GAAA;IAAA;EAAA;AAAA;AACA,IAAA4B,UAAA,GAAA/B,OAAA;AAAAC,YAAA,CAAA8B,UAAA,EAAA7B,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAA4B,UAAA,CAAA5B,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAuB,UAAA,CAAA5B,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
9
9
  var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
10
- var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
11
10
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
11
+ var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
13
13
  var _BaseModel = _interopRequireDefault(require("../base/BaseModel"));
14
14
  var _ChoiceAttributeOptionCollection = _interopRequireDefault(require("./ChoiceAttributeOptionCollection"));
@@ -149,13 +149,12 @@ class ChoiceAttributeOptionModel extends _BaseModel.default {
149
149
  return this.contributions.label;
150
150
  }
151
151
  if (this.attributeCollection.hasItems) {
152
+ var _context;
152
153
  const title = this.attributeCollection.getAttributeByLayoutHint(_LayoutHints.TITLE);
153
154
  if (title) {
154
155
  return title.readonlyvalue;
155
156
  }
156
- if (this.attributeCollection.first) {
157
- return this.attributeCollection.first.readonlyvalue;
158
- }
157
+ return (0, _map.default)(_context = this.attributeCollection.all).call(_context, attribute => attribute.readonlyvalue).join(" · ");
159
158
  }
160
159
  return "";
161
160
  }
@@ -167,11 +166,11 @@ class ChoiceAttributeOptionModel extends _BaseModel.default {
167
166
  getContentConfiguredLabel(contentConfiguration) {
168
167
  const configuredLabelProperties = contentConfiguration?.labelConfig?.[0]?.types ?? [];
169
168
  if (!this.hasContentFromData && this.concept && configuredLabelProperties.length > 0) {
170
- var _context;
171
- const configuredLabels = (0, _filter.default)(_context = this.concept.getLabelElementByIds(configuredLabelProperties)).call(_context, configuredLabel => configuredLabel.value && configuredLabel.value !== "");
169
+ var _context2;
170
+ const configuredLabels = (0, _filter.default)(_context2 = this.concept.getLabelElementByIds(configuredLabelProperties)).call(_context2, configuredLabel => configuredLabel.value && configuredLabel.value !== "");
172
171
  if (configuredLabels.length > 0) {
173
- var _context2;
174
- return (0, _map.default)(_context2 = (0, _filter.default)(configuredLabelProperties).call(configuredLabelProperties, configuredLabelProperty => configuredLabels.some(configuredLabel => configuredLabel._id === configuredLabelProperty))).call(_context2, configuredLabelProperty => (0, _find.default)(configuredLabels).call(configuredLabels, configuredLabel => configuredLabel._id === configuredLabelProperty))[0].value;
172
+ var _context3;
173
+ return (0, _map.default)(_context3 = (0, _filter.default)(configuredLabelProperties).call(configuredLabelProperties, configuredLabelProperty => configuredLabels.some(configuredLabel => configuredLabel._id === configuredLabelProperty))).call(_context3, configuredLabelProperty => (0, _find.default)(configuredLabels).call(configuredLabels, configuredLabel => configuredLabel._id === configuredLabelProperty))[0].value;
175
174
  }
176
175
  }
177
176
  return this.label;
@@ -1 +1 @@
1
- {"version":3,"file":"ChoiceAttributeOptionModel.js","names":["_BaseModel","_interopRequireDefault","require","_ChoiceAttributeOptionCollection","_objects","_Constants","_LayoutHints","_Settings","_LinkCollection","_AttributeCollection","_ConceptDetailModel","_AttributeContent","ChoiceAttributeOptionModel","BaseModel","constructor","selectedValues","option","modelOptions","_defineProperty2","default","code","contributions","key","_isSelected","_includes","call","_referenceDate","referenceDate","Date","toISOString","split","_level","_attributeCollection","createAttributeCollection","_children","addChildren","_links","LinkCollection","origin","contextPath","_content","AttributeContent","content","_isUser","optionType","createFromListItemModel","listitem","id","toString","attributeCollection","clone","links","isChoiceAttributeOptionModel","getInitialChildModelLinks","initialLinks","hasContentFromData","conceptLink","push","children","setChildModels","models","errors","conceptHref","href","concept","_find","model","selfhref","equalsWithParameters","_code","equals","getContribution","has","data","AttributeCollection","isReadonly","label","hasItems","title","getAttributeByLayoutHint","TITLE","readonlyvalue","first","getContentConfiguredLabel","contentConfiguration","configuredLabelProperties","labelConfig","types","length","_context","configuredLabels","_filter","getLabelElementByIds","configuredLabel","value","_context2","_map","configuredLabelProperty","some","_id","selected","count","ChoiceAttributeOptionCollection","create","options","date","getLinkByKey","addParameter","TIMEVERSION_FILTER_NAME","isCacheable","avatarLink","_concept","ConceptDetailModel","level","isBooleanType","hasAlternativeLabel","mergeOption","withOption","mergeOptions","hasAllContentInData","isUser","_default","exports"],"sources":["../../../src/models/attributes/ChoiceAttributeOptionModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport ChoiceAttributeOptionCollection from \"./ChoiceAttributeOptionCollection\";\n\nimport { has } from \"../../utils/helpers/objects\";\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport { TITLE } from \"../../constants/LayoutHints\";\nimport { hasAllContentInData } from \"../../constants/Settings\";\n\nimport LinkCollection from \"../links/LinkCollection\";\nimport AttributeCollection from \"./AttributeCollection\";\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\nimport AttributeContent from \"./AttributeContent\";\n\nimport type {\n IModelWithChildModels,\n ModelOptions,\n ModularUIModel,\n} from \"../types\";\nimport type ListItemModel from \"../list/ListItemModel\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\nexport type ChoiceAttributeOptionModelOptions = {\n ...ModelOptions,\n referenceDate: ISO_DATE,\n};\n\n/**\n */\nclass ChoiceAttributeOptionModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _code: string;\n _isSelected: boolean;\n _referenceDate: ISO_DATE;\n _level: number;\n _children: ChoiceAttributeOptionCollection;\n _concept: ?ConceptDetailModel;\n _links: LinkCollection;\n _attributeCollection: AttributeCollection;\n _content: AttributeContent;\n _isUser: boolean = false;\n\n /**\n */\n constructor(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ) {\n super({}, option);\n\n this.code = this.contributions.code ?? this.contributions.key ?? \"\";\n\n this._isSelected = selectedValues.includes(this.code);\n\n this._referenceDate =\n modelOptions?.referenceDate || new Date().toISOString().split(\"T\")[0];\n\n this._level = 0;\n\n this._attributeCollection = this.createAttributeCollection(modelOptions);\n this._children = this.addChildren(selectedValues, option, modelOptions);\n\n this._links = new LinkCollection(\n this.contributions._links,\n {},\n { origin: modelOptions?.origin, contextPath: modelOptions?.contextPath },\n );\n\n this._content = new AttributeContent(option.content);\n\n this._isUser = option.optionType === \"user\";\n }\n\n /**\n */\n static createFromListItemModel(\n listitem: ListItemModel,\n ): ChoiceAttributeOptionModel {\n const option = new ChoiceAttributeOptionModel();\n\n option.code = listitem.id.toString();\n option.attributeCollection = listitem.attributeCollection.clone();\n option.links = listitem.links.clone();\n\n return option;\n }\n\n /**\n * Indicates that this a choice attribute option model, used when adding options to a choice attribute\n * @returns {boolean}\n */\n get isChoiceAttributeOptionModel(): boolean {\n return true;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const initialLinks = [];\n\n if (!this.hasContentFromData && this.conceptLink !== null) {\n initialLinks.push(this.conceptLink);\n }\n\n if (this.children) {\n initialLinks.push(...this.children.getInitialChildModelLinks());\n }\n\n return initialLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n if (this.conceptLink !== null) {\n const conceptHref = this.conceptLink.href;\n\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref),\n );\n }\n\n if (this.children) {\n this.children.setChildModels(models, errors);\n }\n }\n\n /**\n * Get code of option\n */\n get code(): string {\n return this._code;\n }\n\n /**\n */\n set code(code: string) {\n this._code = code;\n }\n\n /**\n */\n equals(model: ChoiceAttributeOptionModel): boolean {\n return this.code.toString() === model.code.toString();\n }\n\n /**\n * Retrieve attributes for Composite codemaps (e.g. table and case list codemaps)\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n set attributeCollection(attributeCollection: AttributeCollection) {\n this._attributeCollection = attributeCollection;\n }\n\n /**\n */\n createAttributeCollection(\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): AttributeCollection {\n const contributions = this.getContribution(\"elementsContributions\", []);\n\n if (has(this.contributions, \"elements\")) {\n const data = this.getContribution(\"elements\", {});\n return new AttributeCollection(data, contributions, {\n origin: modelOptions?.origin,\n contextPath: modelOptions?.contextPath,\n isReadonly: true,\n });\n }\n\n return new AttributeCollection();\n }\n\n /**\n * Get label of option for simple codemaps (e.g. static codemap)\n */\n get label(): string {\n if (this.contributions.label) {\n return this.contributions.label;\n }\n\n if (this.attributeCollection.hasItems) {\n const title = this.attributeCollection.getAttributeByLayoutHint(TITLE);\n\n if (title) {\n return title.readonlyvalue;\n }\n\n if (this.attributeCollection.first) {\n return this.attributeCollection.first.readonlyvalue;\n }\n }\n\n return \"\";\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(contentConfiguration: Object): string {\n const configuredLabelProperties =\n contentConfiguration?.labelConfig?.[0]?.types ?? [];\n\n if (\n !this.hasContentFromData &&\n this.concept &&\n configuredLabelProperties.length > 0\n ) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\",\n );\n\n if (configuredLabels.length > 0) {\n return configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )[0].value;\n }\n }\n\n return this.label;\n }\n\n /**\n * Indicates if option is selected\n */\n get selected(): boolean {\n return this._isSelected;\n }\n\n /**\n * Set selected property of option\n */\n set selected(selected: boolean) {\n this._isSelected = selected;\n }\n\n /**\n * Retrieve count of filter for option\n */\n get count(): number | null {\n return this.getContribution(\"count\");\n }\n\n /**\n */\n addChildren(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): ChoiceAttributeOptionCollection {\n // When contributions contain elements this is a list not nested options\n if (has(option, \"elements\")) {\n return new ChoiceAttributeOptionCollection(modelOptions);\n }\n\n return ChoiceAttributeOptionCollection.create(\n {\n value: selectedValues,\n },\n { options: option?.children ?? [] },\n modelOptions,\n );\n }\n\n /**\n * get children of option\n */\n get children(): ChoiceAttributeOptionCollection {\n return this._children;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n return this._links;\n }\n\n /**\n */\n set links(links: LinkCollection) {\n this._links = links;\n }\n\n /**\n * referenceDate received from attribute\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate,\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n *\n */\n get avatarLink(): LinkModel | null {\n return this.links.getLinkByKey(\"avatar\");\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept || null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Get level of option, used in tree view choice attributes (taxonomy)\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Set level of option\n */\n set level(level: number) {\n this._level = level;\n }\n\n /**\n */\n get isBooleanType(): boolean {\n return this.getContribution(\"isBooleanType\", false);\n }\n\n /**\n */\n get hasAlternativeLabel(): boolean {\n return this.getContribution(\"hasAlternativeLabel\", false);\n }\n\n /**\n */\n mergeOption(withOption: ChoiceAttributeOptionModel) {\n this.concept = withOption.concept;\n\n if (this.children != null && withOption.children != null) {\n this.children.mergeOptions(withOption.children);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return this._content;\n }\n\n /**\n */\n get isUser(): boolean {\n return this._isUser;\n }\n}\n\nexport default ChoiceAttributeOptionModel;\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,mBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,iBAAA,GAAAV,sBAAA,CAAAC,OAAA;AAgBA;AACA;AACA,MAAMU,0BAA0B,SACtBC,kBAA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A;AACF;AACA;EACE,IAAIkF,KAAKA,CAACA,KAAa,EAAE;IACvB,IAAI,CAAClF,MAAM,GAAGkF,KAAK;EACrB;;EAEA;AACF;EACE,IAAIC,aAAaA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAAC3C,eAAe,CAAC,eAAe,EAAE,KAAK,CAAC;EACrD;;EAEA;AACF;EACE,IAAI4C,mBAAmBA,CAAA,EAAY;IACjC,OAAO,IAAI,CAAC5C,eAAe,CAAC,qBAAqB,EAAE,KAAK,CAAC;EAC3D;;EAEA;AACF;EACE6C,WAAWA,CAACC,UAAsC,EAAE;IAClD,IAAI,CAACrD,OAAO,GAAGqD,UAAU,CAACrD,OAAO;IAEjC,IAAI,IAAI,CAACN,QAAQ,IAAI,IAAI,IAAI2D,UAAU,CAAC3D,QAAQ,IAAI,IAAI,EAAE;MACxD,IAAI,CAACA,QAAQ,CAAC4D,YAAY,CAACD,UAAU,CAAC3D,QAAQ,CAAC;IACjD;EACF;;EAEA;AACF;AACA;EACE,IAAIH,kBAAkBA,CAAA,EAAY;IAChC,OAAO,IAAAgE,6BAAmB,EAAC,CAAC;EAC9B;;EAEA;AACF;EACE,IAAI7E,OAAOA,CAAA,EAAqB;IAC9B,OAAO,IAAI,CAACF,QAAQ;EACtB;;EAEA;AACF;EACE,IAAIgF,MAAMA,CAAA,EAAY;IACpB,OAAO,IAAI,CAAC7E,OAAO;EACrB;AACF;AAAC,IAAA8E,QAAA,GAAAC,OAAA,CAAAvG,OAAA,GAEcP,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"ChoiceAttributeOptionModel.js","names":["_BaseModel","_interopRequireDefault","require","_ChoiceAttributeOptionCollection","_objects","_Constants","_LayoutHints","_Settings","_LinkCollection","_AttributeCollection","_ConceptDetailModel","_AttributeContent","ChoiceAttributeOptionModel","BaseModel","constructor","selectedValues","option","modelOptions","_defineProperty2","default","code","contributions","key","_isSelected","_includes","call","_referenceDate","referenceDate","Date","toISOString","split","_level","_attributeCollection","createAttributeCollection","_children","addChildren","_links","LinkCollection","origin","contextPath","_content","AttributeContent","content","_isUser","optionType","createFromListItemModel","listitem","id","toString","attributeCollection","clone","links","isChoiceAttributeOptionModel","getInitialChildModelLinks","initialLinks","hasContentFromData","conceptLink","push","children","setChildModels","models","errors","conceptHref","href","concept","_find","model","selfhref","equalsWithParameters","_code","equals","getContribution","has","data","AttributeCollection","isReadonly","label","hasItems","_context","title","getAttributeByLayoutHint","TITLE","readonlyvalue","_map","all","attribute","join","getContentConfiguredLabel","contentConfiguration","configuredLabelProperties","labelConfig","types","length","_context2","configuredLabels","_filter","getLabelElementByIds","configuredLabel","value","_context3","configuredLabelProperty","some","_id","selected","count","ChoiceAttributeOptionCollection","create","options","date","getLinkByKey","addParameter","TIMEVERSION_FILTER_NAME","isCacheable","avatarLink","_concept","ConceptDetailModel","level","isBooleanType","hasAlternativeLabel","mergeOption","withOption","mergeOptions","hasAllContentInData","isUser","_default","exports"],"sources":["../../../src/models/attributes/ChoiceAttributeOptionModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport ChoiceAttributeOptionCollection from \"./ChoiceAttributeOptionCollection\";\n\nimport { has } from \"../../utils/helpers/objects\";\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport { TITLE } from \"../../constants/LayoutHints\";\nimport { hasAllContentInData } from \"../../constants/Settings\";\n\nimport LinkCollection from \"../links/LinkCollection\";\nimport AttributeCollection from \"./AttributeCollection\";\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\nimport AttributeContent from \"./AttributeContent\";\n\nimport type {\n IModelWithChildModels,\n ModelOptions,\n ModularUIModel,\n} from \"../types\";\nimport type ListItemModel from \"../list/ListItemModel\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\nexport type ChoiceAttributeOptionModelOptions = {\n ...ModelOptions,\n referenceDate: ISO_DATE,\n};\n\n/**\n */\nclass ChoiceAttributeOptionModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _code: string;\n _isSelected: boolean;\n _referenceDate: ISO_DATE;\n _level: number;\n _children: ChoiceAttributeOptionCollection;\n _concept: ?ConceptDetailModel;\n _links: LinkCollection;\n _attributeCollection: AttributeCollection;\n _content: AttributeContent;\n _isUser: boolean = false;\n\n /**\n */\n constructor(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ) {\n super({}, option);\n\n this.code = this.contributions.code ?? this.contributions.key ?? \"\";\n\n this._isSelected = selectedValues.includes(this.code);\n\n this._referenceDate =\n modelOptions?.referenceDate || new Date().toISOString().split(\"T\")[0];\n\n this._level = 0;\n\n this._attributeCollection = this.createAttributeCollection(modelOptions);\n this._children = this.addChildren(selectedValues, option, modelOptions);\n\n this._links = new LinkCollection(\n this.contributions._links,\n {},\n { origin: modelOptions?.origin, contextPath: modelOptions?.contextPath },\n );\n\n this._content = new AttributeContent(option.content);\n\n this._isUser = option.optionType === \"user\";\n }\n\n /**\n */\n static createFromListItemModel(\n listitem: ListItemModel,\n ): ChoiceAttributeOptionModel {\n const option = new ChoiceAttributeOptionModel();\n\n option.code = listitem.id.toString();\n option.attributeCollection = listitem.attributeCollection.clone();\n option.links = listitem.links.clone();\n\n return option;\n }\n\n /**\n * Indicates that this a choice attribute option model, used when adding options to a choice attribute\n * @returns {boolean}\n */\n get isChoiceAttributeOptionModel(): boolean {\n return true;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const initialLinks = [];\n\n if (!this.hasContentFromData && this.conceptLink !== null) {\n initialLinks.push(this.conceptLink);\n }\n\n if (this.children) {\n initialLinks.push(...this.children.getInitialChildModelLinks());\n }\n\n return initialLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n if (this.conceptLink !== null) {\n const conceptHref = this.conceptLink.href;\n\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref),\n );\n }\n\n if (this.children) {\n this.children.setChildModels(models, errors);\n }\n }\n\n /**\n * Get code of option\n */\n get code(): string {\n return this._code;\n }\n\n /**\n */\n set code(code: string) {\n this._code = code;\n }\n\n /**\n */\n equals(model: ChoiceAttributeOptionModel): boolean {\n return this.code.toString() === model.code.toString();\n }\n\n /**\n * Retrieve attributes for Composite codemaps (e.g. table and case list codemaps)\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n set attributeCollection(attributeCollection: AttributeCollection) {\n this._attributeCollection = attributeCollection;\n }\n\n /**\n */\n createAttributeCollection(\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): AttributeCollection {\n const contributions = this.getContribution(\"elementsContributions\", []);\n\n if (has(this.contributions, \"elements\")) {\n const data = this.getContribution(\"elements\", {});\n return new AttributeCollection(data, contributions, {\n origin: modelOptions?.origin,\n contextPath: modelOptions?.contextPath,\n isReadonly: true,\n });\n }\n\n return new AttributeCollection();\n }\n\n /**\n * Get label of option for simple codemaps (e.g. static codemap)\n */\n get label(): string {\n if (this.contributions.label) {\n return this.contributions.label;\n }\n\n if (this.attributeCollection.hasItems) {\n const title = this.attributeCollection.getAttributeByLayoutHint(TITLE);\n\n if (title) {\n return title.readonlyvalue;\n }\n\n return this.attributeCollection.all\n .map((attribute) => attribute.readonlyvalue)\n .join(\" · \");\n }\n\n return \"\";\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(contentConfiguration: Object): string {\n const configuredLabelProperties =\n contentConfiguration?.labelConfig?.[0]?.types ?? [];\n\n if (\n !this.hasContentFromData &&\n this.concept &&\n configuredLabelProperties.length > 0\n ) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\",\n );\n\n if (configuredLabels.length > 0) {\n return configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty,\n ),\n )[0].value;\n }\n }\n\n return this.label;\n }\n\n /**\n * Indicates if option is selected\n */\n get selected(): boolean {\n return this._isSelected;\n }\n\n /**\n * Set selected property of option\n */\n set selected(selected: boolean) {\n this._isSelected = selected;\n }\n\n /**\n * Retrieve count of filter for option\n */\n get count(): number | null {\n return this.getContribution(\"count\");\n }\n\n /**\n */\n addChildren(\n selectedValues: Array<string> = [],\n option: Object = {},\n modelOptions?: ChoiceAttributeOptionModelOptions,\n ): ChoiceAttributeOptionCollection {\n // When contributions contain elements this is a list not nested options\n if (has(option, \"elements\")) {\n return new ChoiceAttributeOptionCollection(modelOptions);\n }\n\n return ChoiceAttributeOptionCollection.create(\n {\n value: selectedValues,\n },\n { options: option?.children ?? [] },\n modelOptions,\n );\n }\n\n /**\n * get children of option\n */\n get children(): ChoiceAttributeOptionCollection {\n return this._children;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n return this._links;\n }\n\n /**\n */\n set links(links: LinkCollection) {\n this._links = links;\n }\n\n /**\n * referenceDate received from attribute\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate,\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n *\n */\n get avatarLink(): LinkModel | null {\n return this.links.getLinkByKey(\"avatar\");\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept || null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Get level of option, used in tree view choice attributes (taxonomy)\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Set level of option\n */\n set level(level: number) {\n this._level = level;\n }\n\n /**\n */\n get isBooleanType(): boolean {\n return this.getContribution(\"isBooleanType\", false);\n }\n\n /**\n */\n get hasAlternativeLabel(): boolean {\n return this.getContribution(\"hasAlternativeLabel\", false);\n }\n\n /**\n */\n mergeOption(withOption: ChoiceAttributeOptionModel) {\n this.concept = withOption.concept;\n\n if (this.children != null && withOption.children != null) {\n this.children.mergeOptions(withOption.children);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return this._content;\n }\n\n /**\n */\n get isUser(): boolean {\n return this._isUser;\n }\n}\n\nexport default ChoiceAttributeOptionModel;\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,mBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,iBAAA,GAAAV,sBAAA,CAAAC,OAAA;AAgBA;AACA;AACA,MAAMU,0BAA0B,SACtBC,kBAAS,CAEnB;EAYE;AACF;EACEC,WAAWA,CACTC,cAA6B,GAAG,EAAE,EAClCC,MAAc,GAAG,CAAC,CAAC,EACnBC,YAAgD,EAChD;IACA,KAAK,CAAC,CAAC,CAAC,EAAED,MAAM,CAAC;IAAC,IA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MAAM,GAAGqF,KAAK;EACrB;;EAEA;AACF;EACE,IAAIC,aAAaA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAAC9C,eAAe,CAAC,eAAe,EAAE,KAAK,CAAC;EACrD;;EAEA;AACF;EACE,IAAI+C,mBAAmBA,CAAA,EAAY;IACjC,OAAO,IAAI,CAAC/C,eAAe,CAAC,qBAAqB,EAAE,KAAK,CAAC;EAC3D;;EAEA;AACF;EACEgD,WAAWA,CAACC,UAAsC,EAAE;IAClD,IAAI,CAACxD,OAAO,GAAGwD,UAAU,CAACxD,OAAO;IAEjC,IAAI,IAAI,CAACN,QAAQ,IAAI,IAAI,IAAI8D,UAAU,CAAC9D,QAAQ,IAAI,IAAI,EAAE;MACxD,IAAI,CAACA,QAAQ,CAAC+D,YAAY,CAACD,UAAU,CAAC9D,QAAQ,CAAC;IACjD;EACF;;EAEA;AACF;AACA;EACE,IAAIH,kBAAkBA,CAAA,EAAY;IAChC,OAAO,IAAAmE,6BAAmB,EAAC,CAAC;EAC9B;;EAEA;AACF;EACE,IAAIhF,OAAOA,CAAA,EAAqB;IAC9B,OAAO,IAAI,CAACF,QAAQ;EACtB;;EAEA;AACF;EACE,IAAImF,MAAMA,CAAA,EAAY;IACpB,OAAO,IAAI,CAAChF,OAAO;EACrB;AACF;AAAC,IAAAiF,QAAA,GAAAC,OAAA,CAAA1G,OAAA,GAEcP,0BAA0B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beinformed/ui",
3
- "version": "1.67.1",
3
+ "version": "1.67.3",
4
4
  "description": "Toolbox for be informed javascript layouts",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "bugs": "https://support.beinformed.com",
@@ -70,7 +70,7 @@
70
70
  "dependencies": {
71
71
  "@babel/runtime-corejs3": "^7.29.0",
72
72
  "@date-fns/tz": "^1.4.1",
73
- "baseline-browser-mapping": "^2.9.19",
73
+ "baseline-browser-mapping": "^2.10.0",
74
74
  "big.js": "^7.0.1",
75
75
  "date-fns": "^4.1.0",
76
76
  "deepmerge": "^4.3.1",
@@ -98,8 +98,8 @@
98
98
  "@babel/preset-env": "^7.29.0",
99
99
  "@babel/preset-flow": "^7.27.1",
100
100
  "@babel/preset-react": "^7.28.5",
101
- "@commitlint/cli": "^20.4.1",
102
- "@commitlint/config-conventional": "^20.4.1",
101
+ "@commitlint/cli": "^20.4.2",
102
+ "@commitlint/config-conventional": "^20.4.2",
103
103
  "@testing-library/dom": "^10.4.1",
104
104
  "@testing-library/react": "^16.3.2",
105
105
  "auditjs": "^4.2.0",
@@ -113,8 +113,8 @@
113
113
  "eslint-config-prettier": "^10.1.8",
114
114
  "eslint-plugin-babel": "^5.3.1",
115
115
  "eslint-plugin-ft-flow": "^3.0.11",
116
- "eslint-plugin-jest": "^29.14.0",
117
- "eslint-plugin-jsdoc": "^62.5.4",
116
+ "eslint-plugin-jest": "^29.15.0",
117
+ "eslint-plugin-jsdoc": "^62.7.1",
118
118
  "eslint-plugin-react": "^7.37.5",
119
119
  "eslint-plugin-react-hooks": "^5.2.0",
120
120
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0",
@@ -129,7 +129,7 @@
129
129
  "jest-junit": "^16.0.0",
130
130
  "jest-sonar-reporter": "^2.0.0",
131
131
  "jscodeshift": "^17.3.0",
132
- "lint-staged": "^16.2.7",
132
+ "lint-staged": "^16.3.1",
133
133
  "polished": "^4.3.1",
134
134
  "prettier": "^3.8.1",
135
135
  "react": "^19.2.4",
@@ -141,7 +141,7 @@
141
141
  "redux": "^4.2.1",
142
142
  "redux-mock-store": "^1.5.5",
143
143
  "redux-thunk": "^2.4.2",
144
- "rimraf": "^6.1.2",
144
+ "rimraf": "^6.1.3",
145
145
  "styled-components": "^5.3.11",
146
146
  "typescript": "^5.9.3",
147
147
  "xhr-mock": "^2.5.1"