@beinformed/ui 1.57.5 → 1.58.0

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/esm/hooks/useModelCatalog.js +36 -5
  3. package/esm/hooks/useModelCatalog.js.map +1 -1
  4. package/esm/models/concepts/ConceptDetailModel.js +1 -1
  5. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  6. package/esm/models/concepts/ConceptIndexModel.js +1 -1
  7. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  8. package/esm/models/content/ContentModel.js +1 -1
  9. package/esm/models/content/ContentModel.js.map +1 -1
  10. package/esm/models/content/ContentTOCModel.js +1 -1
  11. package/esm/models/content/ContentTOCModel.js.map +1 -1
  12. package/esm/redux/actions/EntryDate.js +8 -0
  13. package/esm/redux/actions/EntryDate.js.map +1 -0
  14. package/esm/redux/actions/index.js +1 -0
  15. package/esm/redux/actions/index.js.map +1 -1
  16. package/esm/redux/reducers/ModelCatalogReducer.js +36 -0
  17. package/esm/redux/reducers/ModelCatalogReducer.js.map +1 -0
  18. package/esm/redux/reducers/createReducer.js +2 -0
  19. package/esm/redux/reducers/createReducer.js.map +1 -1
  20. package/esm/redux/reducers/index.js +1 -0
  21. package/esm/redux/reducers/index.js.map +1 -1
  22. package/esm/redux/selectors/index.js +1 -0
  23. package/esm/redux/selectors/index.js.map +1 -1
  24. package/esm/redux/selectors/modelcatalog.js +8 -0
  25. package/esm/redux/selectors/modelcatalog.js.map +1 -0
  26. package/esm/redux/types.js.map +1 -1
  27. package/esm/utils/helpers/createHref.js +10 -7
  28. package/esm/utils/helpers/createHref.js.map +1 -1
  29. package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +7 -6
  30. package/lib/hooks/useModelCatalog.js +38 -6
  31. package/lib/hooks/useModelCatalog.js.flow +39 -5
  32. package/lib/hooks/useModelCatalog.js.map +1 -1
  33. package/lib/models/concepts/ConceptDetailModel.js +1 -1
  34. package/lib/models/concepts/ConceptDetailModel.js.flow +1 -1
  35. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  36. package/lib/models/concepts/ConceptIndexModel.js +1 -1
  37. package/lib/models/concepts/ConceptIndexModel.js.flow +1 -1
  38. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  39. package/lib/models/content/ContentModel.js +1 -1
  40. package/lib/models/content/ContentModel.js.flow +1 -1
  41. package/lib/models/content/ContentModel.js.map +1 -1
  42. package/lib/models/content/ContentTOCModel.js +1 -1
  43. package/lib/models/content/ContentTOCModel.js.flow +1 -1
  44. package/lib/models/content/ContentTOCModel.js.map +1 -1
  45. package/lib/redux/actions/EntryDate.js +15 -0
  46. package/lib/redux/actions/EntryDate.js.flow +12 -0
  47. package/lib/redux/actions/EntryDate.js.map +1 -0
  48. package/lib/redux/actions/index.js +11 -0
  49. package/lib/redux/actions/index.js.flow +1 -0
  50. package/lib/redux/actions/index.js.map +1 -1
  51. package/lib/redux/reducers/ModelCatalogReducer.js +43 -0
  52. package/lib/redux/reducers/ModelCatalogReducer.js.flow +46 -0
  53. package/lib/redux/reducers/ModelCatalogReducer.js.map +1 -0
  54. package/lib/redux/reducers/createReducer.js +2 -0
  55. package/lib/redux/reducers/createReducer.js.flow +4 -0
  56. package/lib/redux/reducers/createReducer.js.map +1 -1
  57. package/lib/redux/reducers/index.js +8 -0
  58. package/lib/redux/reducers/index.js.flow +1 -0
  59. package/lib/redux/reducers/index.js.map +1 -1
  60. package/lib/redux/selectors/index.js +11 -0
  61. package/lib/redux/selectors/index.js.flow +1 -0
  62. package/lib/redux/selectors/index.js.map +1 -1
  63. package/lib/redux/selectors/modelcatalog.js +15 -0
  64. package/lib/redux/selectors/modelcatalog.js.flow +11 -0
  65. package/lib/redux/selectors/modelcatalog.js.map +1 -0
  66. package/lib/redux/types.js.flow +11 -0
  67. package/lib/redux/types.js.map +1 -1
  68. package/lib/utils/helpers/__tests__/createHref.spec.js.flow +13 -9
  69. package/lib/utils/helpers/createHref.js +10 -7
  70. package/lib/utils/helpers/createHref.js.flow +17 -9
  71. package/lib/utils/helpers/createHref.js.map +1 -1
  72. package/package.json +8 -8
  73. package/src/hooks/__tests__/useModelCatalog.spec.js +7 -6
  74. package/src/hooks/useModelCatalog.js +39 -5
  75. package/src/models/concepts/ConceptDetailModel.js +1 -1
  76. package/src/models/concepts/ConceptIndexModel.js +1 -1
  77. package/src/models/content/ContentModel.js +1 -1
  78. package/src/models/content/ContentTOCModel.js +1 -1
  79. package/src/redux/actions/EntryDate.js +12 -0
  80. package/src/redux/actions/index.js +1 -0
  81. package/src/redux/reducers/ModelCatalogReducer.js +46 -0
  82. package/src/redux/reducers/createReducer.js +4 -0
  83. package/src/redux/reducers/index.js +1 -0
  84. package/src/redux/selectors/index.js +1 -0
  85. package/src/redux/selectors/modelcatalog.js +11 -0
  86. package/src/redux/types.js +11 -0
  87. package/src/utils/helpers/__tests__/createHref.spec.js +13 -9
  88. package/src/utils/helpers/createHref.js +17 -9
  89. package/types/models/concepts/ConceptDetailModel.d.ts +1 -1
  90. package/types/models/concepts/ConceptIndexModel.d.ts +1 -1
  91. package/types/models/content/ContentModel.d.ts +1 -1
  92. package/types/models/content/ContentTOCModel.d.ts +1 -1
@@ -89,7 +89,7 @@ class ContentModel extends _ResourceModel.default {
89
89
  }
90
90
 
91
91
  /**
92
- * Retrieve entrydate of content toc
92
+ * Retrieve modelcatalog.js of content toc
93
93
  */
94
94
  get entryDate() {
95
95
  const entryDateFilter = this.filterCollection?.getFilterByAttributeKey(_Constants.TIMEVERSION_FILTER_NAME);
@@ -104,7 +104,7 @@ export default class ContentModel extends ResourceModel {
104
104
  }
105
105
 
106
106
  /**
107
- * Retrieve entrydate of content toc
107
+ * Retrieve modelcatalog.js of content toc
108
108
  */
109
109
  get entryDate(): ISO_DATE | null {
110
110
  const entryDateFilter = this.filterCollection?.getFilterByAttributeKey(
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_ResourceModel","_FilterCollection","_ContentLinkModel","_SubSectionModel","_ContentTypeModel","_Constants","_SectionModel","ContentModel","ResourceModel","constructor","response","_defineProperty2","default","_section","SectionModel","data","entryDate","modelOptions","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_find","call","model","section","id","_id","filterCollection","_filterCollection","_filter","FilterCollection","filter","entryDateFilter","getFilterByAttributeKey","TIMEVERSION_FILTER_NAME","attribute","value","_contentType","ContentTypeModel","label","number","body","childSectionLinks","selfContentLink","childSections","sections","subSections","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","subSection","relatedConceptsLink","href","addParameter","setReferenceHash","referenceHash","exports"],"sources":["../../../src/models/content/ContentModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport SubSectionModel from \"./SubSectionModel\";\n\nimport ContentTypeModel from \"./ContentTypeModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport SectionModel from \"./SectionModel\";\n\n/**\n * Content detail model\n */\nexport default class ContentModel extends ResourceModel {\n _section: SectionModel;\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n constructor(response: ModularUIResponse) {\n super(response);\n\n this._section = new SectionModel(\n this.data,\n this.entryDate,\n this.modelOptions,\n );\n }\n\n /**\n */\n get type(): string {\n return \"Content\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n */\n get section(): SectionModel {\n return this._section;\n }\n\n /**\n */\n get id(): string {\n return this.data._id;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection && this.data.filter?.entryDate) {\n this._filterCollection = new FilterCollection(\n {\n entryDate: this.data.filter.entryDate,\n },\n {\n filter: this.contributions.filter,\n },\n this.modelOptions,\n );\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): ISO_DATE | null {\n const entryDateFilter = this.filterCollection?.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n if (entryDateFilter && entryDateFilter.attribute) {\n return entryDateFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * Get conceptType of concept\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n * Set concept type\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.section.label;\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.section.number;\n }\n\n /**\n * Get content body\n */\n get body(): ?string {\n return this.section.body;\n }\n\n /**\n * Retrieve child section links\n */\n get childSectionLinks(): Array<ContentLinkModel> {\n return this.section.childSectionLinks;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return this.section.selfContentLink;\n }\n\n /**\n * Get tree of child sections\n */\n get childSections(): Array<SectionModel> {\n return this.section.childSections;\n }\n\n /**\n * set resolved child sections\n */\n set childSections(sections: Array<SectionModel>) {\n this.section.childSections = sections || [];\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.section.subSections;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n const { href } = relatedConceptsLink;\n href.addParameter(\"entryDate\", this.entryDate);\n href.setReferenceHash(this.referenceHash);\n return href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n return this.section.referenceHash;\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,gBAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,iBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,UAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACe,MAAMQ,YAAY,SAASC,sBAAa,CAAC;EAKtDC,WAAWA,CAACC,QAA2B,EAAE;IACvC,KAAK,CAACA,QAAQ,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA,wBAJsB,IAAI;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAM1C,IAAI,CAACC,QAAQ,GAAG,IAAIC,qBAAY,CAC9B,IAAI,CAACC,IAAI,EACT,IAAI,CAACC,SAAS,EACd,IAAI,CAACC,YACP,CAAC;EACH;;EAEA;AACF;EACE,IAA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C,IAAI,CAACrB,OAAO,CAACoB,aAAa,GAAGC,QAAQ,IAAI,EAAE;EAC7C;;EAEA;AACF;AACA;EACE,IAAIC,WAAWA,CAAA,EAA2B;IACxC,OAAO,IAAI,CAACtB,OAAO,CAACsB,WAAW;EACjC;;EAEA;AACF;EACE,IAAIC,oBAAoBA,CAAA,EAAgB;IACtC,MAAMC,KAAK,GAAG,EAAE;IAChB,IAAI,IAAI,CAACC,mBAAmB,EAAE;MAC5BD,KAAK,CAACE,IAAI,CAAC,IAAI,CAACD,mBAAmB,CAAC;IACtC;IAEA,IAAI,CAACH,WAAW,CAACK,OAAO,CAAEC,UAAU,IAAK;MACvCJ,KAAK,CAACE,IAAI,CAAC,GAAGE,UAAU,CAACL,oBAAoB,CAAC;IAChD,CAAC,CAAC;IAEF,OAAOC,KAAK;EACd;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAgB;IACrC,MAAMI,mBAAmB,GAAG,IAAI,CAACrC,KAAK,CAACC,YAAY,CAAC,iBAAiB,CAAC;IAEtE,IAAIoC,mBAAmB,EAAE;MACvB,MAAM;QAAEC;MAAK,CAAC,GAAGD,mBAAmB;MACpCC,IAAI,CAACC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAChD,SAAS,CAAC;MAC9C+C,IAAI,CAACE,gBAAgB,CAAC,IAAI,CAACC,aAAa,CAAC;MACzC,OAAOH,IAAI;IACb;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIG,aAAaA,CAAA,EAAW;IAC1B,OAAO,IAAI,CAACjC,OAAO,CAACiC,aAAa;EACnC;AACF;AAACC,OAAA,CAAAvD,OAAA,GAAAL,YAAA","ignoreList":[]}
1
+ {"version":3,"file":"ContentModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_ResourceModel","_FilterCollection","_ContentLinkModel","_SubSectionModel","_ContentTypeModel","_Constants","_SectionModel","ContentModel","ResourceModel","constructor","response","_defineProperty2","default","_section","SectionModel","data","entryDate","modelOptions","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_find","call","model","section","id","_id","filterCollection","_filterCollection","_filter","FilterCollection","filter","entryDateFilter","getFilterByAttributeKey","TIMEVERSION_FILTER_NAME","attribute","value","_contentType","ContentTypeModel","label","number","body","childSectionLinks","selfContentLink","childSections","sections","subSections","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","subSection","relatedConceptsLink","href","addParameter","setReferenceHash","referenceHash","exports"],"sources":["../../../src/models/content/ContentModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport SubSectionModel from \"./SubSectionModel\";\n\nimport ContentTypeModel from \"./ContentTypeModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport SectionModel from \"./SectionModel\";\n\n/**\n * Content detail model\n */\nexport default class ContentModel extends ResourceModel {\n _section: SectionModel;\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n constructor(response: ModularUIResponse) {\n super(response);\n\n this._section = new SectionModel(\n this.data,\n this.entryDate,\n this.modelOptions,\n );\n }\n\n /**\n */\n get type(): string {\n return \"Content\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n */\n get section(): SectionModel {\n return this._section;\n }\n\n /**\n */\n get id(): string {\n return this.data._id;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection && this.data.filter?.entryDate) {\n this._filterCollection = new FilterCollection(\n {\n entryDate: this.data.filter.entryDate,\n },\n {\n filter: this.contributions.filter,\n },\n this.modelOptions,\n );\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve modelcatalog.js of content toc\n */\n get entryDate(): ISO_DATE | null {\n const entryDateFilter = this.filterCollection?.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n if (entryDateFilter && entryDateFilter.attribute) {\n return entryDateFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * Get conceptType of concept\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n * Set concept type\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.section.label;\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.section.number;\n }\n\n /**\n * Get content body\n */\n get body(): ?string {\n return this.section.body;\n }\n\n /**\n * Retrieve child section links\n */\n get childSectionLinks(): Array<ContentLinkModel> {\n return this.section.childSectionLinks;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return this.section.selfContentLink;\n }\n\n /**\n * Get tree of child sections\n */\n get childSections(): Array<SectionModel> {\n return this.section.childSections;\n }\n\n /**\n * set resolved child sections\n */\n set childSections(sections: Array<SectionModel>) {\n this.section.childSections = sections || [];\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.section.subSections;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n const { href } = relatedConceptsLink;\n href.addParameter(\"entryDate\", this.entryDate);\n href.setReferenceHash(this.referenceHash);\n return href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n return this.section.referenceHash;\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,gBAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,iBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,UAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACe,MAAMQ,YAAY,SAASC,sBAAa,CAAC;EAKtDC,WAAWA,CAACC,QAA2B,EAAE;IACvC,KAAK,CAACA,QAAQ,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA,wBAJsB,IAAI;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAM1C,IAAI,CAACC,QAAQ,GAAG,IAAIC,qBAAY,CAC9B,IAAI,CAACC,IAAI,EACT,IAAI,CAACC,SAAS,EACd,IAAI,CAACC,YACP,CAAC;EACH;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,SAAS;EAClB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,OAAOC,iBAAiB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AO,CAACsB,WAAW;EACjC;;EAEA;AACF;EACE,IAAIC,oBAAoBA,CAAA,EAAgB;IACtC,MAAMC,KAAK,GAAG,EAAE;IAChB,IAAI,IAAI,CAACC,mBAAmB,EAAE;MAC5BD,KAAK,CAACE,IAAI,CAAC,IAAI,CAACD,mBAAmB,CAAC;IACtC;IAEA,IAAI,CAACH,WAAW,CAACK,OAAO,CAAEC,UAAU,IAAK;MACvCJ,KAAK,CAACE,IAAI,CAAC,GAAGE,UAAU,CAACL,oBAAoB,CAAC;IAChD,CAAC,CAAC;IAEF,OAAOC,KAAK;EACd;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAgB;IACrC,MAAMI,mBAAmB,GAAG,IAAI,CAACrC,KAAK,CAACC,YAAY,CAAC,iBAAiB,CAAC;IAEtE,IAAIoC,mBAAmB,EAAE;MACvB,MAAM;QAAEC;MAAK,CAAC,GAAGD,mBAAmB;MACpCC,IAAI,CAACC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAChD,SAAS,CAAC;MAC9C+C,IAAI,CAACE,gBAAgB,CAAC,IAAI,CAACC,aAAa,CAAC;MACzC,OAAOH,IAAI;IACb;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIG,aAAaA,CAAA,EAAW;IAC1B,OAAO,IAAI,CAACjC,OAAO,CAACiC,aAAa;EACnC;AACF;AAACC,OAAA,CAAAvD,OAAA,GAAAL,YAAA","ignoreList":[]}
@@ -152,7 +152,7 @@ class ContentTOCModel extends _ResourceModel.default {
152
152
  }
153
153
 
154
154
  /**
155
- * Retrieve entrydate of content toc
155
+ * Retrieve modelcatalog.js of content toc
156
156
  */
157
157
  get entryDate() {
158
158
  const timeversionFilter = this.filterCollection.getFilterByAttributeKey(_Constants.TIMEVERSION_FILTER_NAME);
@@ -173,7 +173,7 @@ export default class ContentTOCModel extends ResourceModel {
173
173
  }
174
174
 
175
175
  /**
176
- * Retrieve entrydate of content toc
176
+ * Retrieve modelcatalog.js of content toc
177
177
  */
178
178
  get entryDate(): ISO_DATE | null {
179
179
  const timeversionFilter = this.filterCollection.getFilterByAttributeKey(
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTOCModel.js","names":["_objects","require","_ResourceModel","_interopRequireDefault","_FilterCollection","_ContentLinkModel","_ContentTypeModel","_Href","_Constants","getItems","items","entryDate","modelOptions","_map","default","call","item","link","ContentLinkModel","section","_id","ContentTOCModel","ResourceModel","constructor","arguments","_defineProperty2","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_find","model","label","getData","selfhref","href","Href","selflink","filterCollection","forEach","filter","params","param","value","setParameter","name","removeParameter","selfContentLink","categories","_context","category","_contentType","ContentTypeModel","_filterCollection","_context2","FilterCollection","_filter","key","_keys","has","timeversionFilter","getFilterByAttributeKey","TIMEVERSION_FILTER_NAME","attribute","exports"],"sources":["../../../src/models/content/ContentTOCModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport ContentTypeModel from \"./ContentTypeModel\";\nimport Href from \"../href/Href\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModelOptions, ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Get content items recursively\n */\nconst getItems = (\n items: Array<Object>,\n entryDate: ISO_DATE | null,\n modelOptions?: ModelOptions,\n): Array<ContentLinkModel> =>\n items.map((item) => {\n const link = new ContentLinkModel(\n {\n ...item,\n section: item._id,\n },\n entryDate,\n modelOptions,\n );\n\n if (item.items) {\n link.items = getItems(item.items, entryDate, modelOptions);\n }\n\n return link;\n });\n\n/**\n * Content detail model\n */\nexport default class ContentTOCModel extends ResourceModel {\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n /**\n */\n get type(): string {\n return \"ContentTOC\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentTOCModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentTOC\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const href = new Href(this.selflink.href);\n\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n\n return href;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return new ContentLinkModel(this.data, this.entryDate, this.modelOptions);\n }\n\n /**\n * Get sub items of toc\n */\n get items(): Array<ContentLinkModel> {\n return this.data.items\n ? getItems(this.data.items, this.entryDate, this.modelOptions)\n : [];\n }\n\n /**\n * get categories of content\n */\n get categories(): Array<ContentLinkModel> {\n if (this.data.categories) {\n return this.data.categories.map(\n (category) => new ContentLinkModel(category, null, this.modelOptions),\n );\n }\n\n return [];\n }\n\n /**\n * Retrieve content type model\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection) {\n this._filterCollection = new FilterCollection(\n this.data.filter,\n {\n filter: this.contributions.filter.filter((filter) => {\n const [key] = Object.keys(filter);\n return has(this.data?.filter, key);\n }),\n },\n this.modelOptions,\n );\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): ISO_DATE | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n\n return timeversionFilter?.attribute?.value ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,UAAA,GAAAP,OAAA;AAMA;AACA;AACA;AACA,MAAMQ,QAAQ,GAAGA,CACfC,KAAoB,EACpBC,SAA0B,EAC1BC,YAA2B,KAE3B,IAAAC,IAAA,CAAAC,OAAA,EAAAJ,KAAK,EAAAK,IAAA,CAALL,KAAK,EAAMM,IAAI,IAAK;EAClB,MAAMC,IAAI,GAAG,IAAIC,yBAAgB,CAC/B;IACE,GAAGF,IAAI;IACPG,OAAO,EAAEH,IAAI,CAACI;EAChB,CAAC,EACDT,SAAS,EACTC,YACF,CAAC;EAED,IAAII,IAAI,CAACN,KAAK,EAAE;IACdO,IAAI,CAACP,KAAK,GAAGD,QAAQ,CAACO,IAAI,CAACN,KAAK,EAAEC,SAAS,EAAEC,YAAY,CAAC;EAC5D;EAEA,OAAOK,IAAI;AACb,CAAC,CAAC;;AAEJ;AACA;AACA;AACe,MAAMI,eAAe,SAASC,sBAAa,CAAC;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA,IAAAC,gBAAA,CAAAX,OAAA,wBACjB,IAAI;IAAA,IAAAW,gBAAA,CAAAX,OAAA;EAAA;EAG5C;AACF;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AnD,OAAA,EAC3C,IAAI,CAACe,IAAI,GACT;QACEoB,MAAM,EAAE,IAAAgB,OAAA,CAAAnD,OAAA,EAAAiD,SAAA,OAAAE,OAAA,CAAAnD,OAAA,MAAI,CAACgB,aAAa,GAAAf,IAAA,CAAAgD,SAAA,EAAgBd,MAAM,IAAK;UACnD,MAAM,CAACiB,GAAG,CAAC,GAAG,IAAAC,KAAA,CAAArD,OAAA,EAAYmC,MAAM,CAAC;UACjC,OAAO,IAAAmB,YAAG,EAAC,IAAI,CAACvC,IAAI,EAAEoB,MAAM,EAAEiB,GAAG,CAAC;QACpC,CAAC;MACH,CAAC,EACD,IAAI,CAACtD,YACP,CAAC;IACH;IAEA,OAAO,IAAI,CAACkD,iBAAiB;EAC/B;;EAEA;AACF;AACA;EACE,IAAInD,SAASA,CAAA,EAAoB;IAC/B,MAAM0D,iBAAiB,GAAG,IAAI,CAACtB,gBAAgB,CAACuB,uBAAuB,CACrEC,kCACF,CAAC;IAED,OAAOF,iBAAiB,EAAEG,SAAS,EAAEpB,KAAK,IAAI,IAAI;EACpD;AACF;AAACqB,OAAA,CAAA3D,OAAA,GAAAO,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"ContentTOCModel.js","names":["_objects","require","_ResourceModel","_interopRequireDefault","_FilterCollection","_ContentLinkModel","_ContentTypeModel","_Href","_Constants","getItems","items","entryDate","modelOptions","_map","default","call","item","link","ContentLinkModel","section","_id","ContentTOCModel","ResourceModel","constructor","arguments","_defineProperty2","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_find","model","label","getData","selfhref","href","Href","selflink","filterCollection","forEach","filter","params","param","value","setParameter","name","removeParameter","selfContentLink","categories","_context","category","_contentType","ContentTypeModel","_filterCollection","_context2","FilterCollection","_filter","key","_keys","has","timeversionFilter","getFilterByAttributeKey","TIMEVERSION_FILTER_NAME","attribute","exports"],"sources":["../../../src/models/content/ContentTOCModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport ContentTypeModel from \"./ContentTypeModel\";\nimport Href from \"../href/Href\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModelOptions, ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Get content items recursively\n */\nconst getItems = (\n items: Array<Object>,\n entryDate: ISO_DATE | null,\n modelOptions?: ModelOptions,\n): Array<ContentLinkModel> =>\n items.map((item) => {\n const link = new ContentLinkModel(\n {\n ...item,\n section: item._id,\n },\n entryDate,\n modelOptions,\n );\n\n if (item.items) {\n link.items = getItems(item.items, entryDate, modelOptions);\n }\n\n return link;\n });\n\n/**\n * Content detail model\n */\nexport default class ContentTOCModel extends ResourceModel {\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n /**\n */\n get type(): string {\n return \"ContentTOC\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentTOCModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentTOC\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const href = new Href(this.selflink.href);\n\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n\n return href;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return new ContentLinkModel(this.data, this.entryDate, this.modelOptions);\n }\n\n /**\n * Get sub items of toc\n */\n get items(): Array<ContentLinkModel> {\n return this.data.items\n ? getItems(this.data.items, this.entryDate, this.modelOptions)\n : [];\n }\n\n /**\n * get categories of content\n */\n get categories(): Array<ContentLinkModel> {\n if (this.data.categories) {\n return this.data.categories.map(\n (category) => new ContentLinkModel(category, null, this.modelOptions),\n );\n }\n\n return [];\n }\n\n /**\n * Retrieve content type model\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection) {\n this._filterCollection = new FilterCollection(\n this.data.filter,\n {\n filter: this.contributions.filter.filter((filter) => {\n const [key] = Object.keys(filter);\n return has(this.data?.filter, key);\n }),\n },\n this.modelOptions,\n );\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve modelcatalog.js of content toc\n */\n get entryDate(): ISO_DATE | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n\n return timeversionFilter?.attribute?.value ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,UAAA,GAAAP,OAAA;AAMA;AACA;AACA;AACA,MAAMQ,QAAQ,GAAGA,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AC;IAED,OAAOF,iBAAiB,EAAEG,SAAS,EAAEpB,KAAK,IAAI,IAAI;EACpD;AACF;AAACqB,OAAA,CAAA3D,OAAA,GAAAO,eAAA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.updateEntryDate = void 0;
7
+ /**
8
+ * Update the entry date being used in the modelcatalog
9
+ */
10
+ const updateEntryDate = entryDate => ({
11
+ type: "UPDATE_ENTRYDATE",
12
+ payload: entryDate
13
+ });
14
+ exports.updateEntryDate = updateEntryDate;
15
+ //# sourceMappingURL=EntryDate.js.map
@@ -0,0 +1,12 @@
1
+ // @flow
2
+ import type { UpdateEntryDateAction } from "../types";
3
+
4
+ /**
5
+ * Update the entry date being used in the modelcatalog
6
+ */
7
+ export const updateEntryDate = (
8
+ entryDate: ISO_DATE,
9
+ ): UpdateEntryDateAction => ({
10
+ type: "UPDATE_ENTRYDATE",
11
+ payload: entryDate,
12
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntryDate.js","names":["updateEntryDate","entryDate","type","payload","exports"],"sources":["../../../src/redux/actions/EntryDate.js"],"sourcesContent":["// @flow\nimport type { UpdateEntryDateAction } from \"../types\";\n\n/**\n * Update the entry date being used in the modelcatalog\n */\nexport const updateEntryDate = (\n entryDate: ISO_DATE,\n): UpdateEntryDateAction => ({\n type: \"UPDATE_ENTRYDATE\",\n payload: entryDate,\n});\n"],"mappings":";;;;;;AAGA;AACA;AACA;AACO,MAAMA,eAAe,GAC1BC,SAAmB,KACQ;EAC3BC,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAEF;AACX,CAAC,CAAC;AAACG,OAAA,CAAAJ,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -26,6 +26,17 @@ _Object$keys(_Authorization).forEach(function (key) {
26
26
  }
27
27
  });
28
28
  });
29
+ var _EntryDate = require("./EntryDate");
30
+ _Object$keys(_EntryDate).forEach(function (key) {
31
+ if (key === "default" || key === "__esModule") return;
32
+ if (key in exports && exports[key] === _EntryDate[key]) return;
33
+ Object.defineProperty(exports, key, {
34
+ enumerable: true,
35
+ get: function () {
36
+ return _EntryDate[key];
37
+ }
38
+ });
39
+ });
29
40
  var _Error = require("./Error");
30
41
  _Object$keys(_Error).forEach(function (key) {
31
42
  if (key === "default" || key === "__esModule") return;
@@ -1,6 +1,7 @@
1
1
  // @flow
2
2
  export * from "./Application";
3
3
  export * from "./Authorization";
4
+ export * from "./EntryDate";
4
5
  export * from "./Error";
5
6
  export * from "./Form";
6
7
  export * from "./FormAttributeSet";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Application","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_Authorization","_Error","_Form","_FormAttributeSet","_FormAttributeSetRepeatable","_FormAutosave","_FormAutosubmit","_FormValidations","_Modals","_Notification","_Preferences","_ProgressIndicator","_SignIn","_SignOut"],"sources":["../../../src/redux/actions/index.js"],"sourcesContent":["// @flow\nexport * from \"./Application\";\nexport * from \"./Authorization\";\nexport * from \"./Error\";\nexport * from \"./Form\";\nexport * from \"./FormAttributeSet\";\nexport * from \"./FormAttributeSetRepeatable\";\nexport * from \"./FormAutosave\";\nexport * from \"./FormAutosubmit\";\nexport * from \"./FormValidations\";\nexport * from \"./Modals\";\nexport * from \"./Notification\";\nexport * from \"./Preferences\";\nexport * from \"./ProgressIndicator\";\nexport * from \"./SignIn\";\nexport * from \"./SignOut\";\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,YAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,YAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,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OAAAc,QAAA,CAAAnB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Application","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_Authorization","_EntryDate","_Error","_Form","_FormAttributeSet","_FormAttributeSetRepeatable","_FormAutosave","_FormAutosubmit","_FormValidations","_Modals","_Notification","_Preferences","_ProgressIndicator","_SignIn","_SignOut"],"sources":["../../../src/redux/actions/index.js"],"sourcesContent":["// @flow\nexport * from \"./Application\";\nexport * from \"./Authorization\";\nexport * from \"./EntryDate\";\nexport * from \"./Error\";\nexport * from \"./Form\";\nexport * from \"./FormAttributeSet\";\nexport * from \"./FormAttributeSetRepeatable\";\nexport * from \"./FormAutosave\";\nexport * from \"./FormAutosubmit\";\nexport * from \"./FormValidations\";\nexport * from \"./Modals\";\nexport * from \"./Notification\";\nexport * from \"./Preferences\";\nexport * from \"./ProgressIndicator\";\nexport * from \"./SignIn\";\nexport * from \"./SignOut\";\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,YAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,YAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,cAAA,GAAAT,OAAA;AAAAC,YAAA,CAAAQ,cAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,cAAA,CAAAN,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAA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I,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAe,QAAA,CAAApB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _urlSearchParams = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/url-search-params"));
9
+ var _utils = require("../../utils");
10
+ var _Cache = _interopRequireDefault(require("../../utils/browser/Cache"));
11
+ const getQueryParam = paramName => {
12
+ if (typeof window !== "undefined") {
13
+ const urlParams = new _urlSearchParams.default(window.location?.search);
14
+ return urlParams.get(paramName);
15
+ }
16
+ return null;
17
+ };
18
+ const initialState = {
19
+ entryDate: getQueryParam("entryDate") || _Cache.default.getItem("ModelCatalogEntryDate") || _utils.DateUtil.now()
20
+ };
21
+
22
+ /**
23
+ * Keep track of the entry date for the modelcatalog
24
+ */
25
+ const ModelCatalogReducer = function () {
26
+ let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
27
+ let action = arguments.length > 1 ? arguments[1] : undefined;
28
+ if (!action) {
29
+ return state;
30
+ }
31
+ switch (action.type) {
32
+ case "UPDATE_ENTRYDATE":
33
+ _Cache.default.addItem("ModelCatalogEntryDate", action.payload);
34
+ return {
35
+ ...state,
36
+ entryDate: action.payload
37
+ };
38
+ default:
39
+ return state;
40
+ }
41
+ };
42
+ var _default = exports.default = ModelCatalogReducer;
43
+ //# sourceMappingURL=ModelCatalogReducer.js.map
@@ -0,0 +1,46 @@
1
+ // @flow
2
+ import { DateUtil } from "../../utils";
3
+ import Cache from "../../utils/browser/Cache";
4
+
5
+ import type { Reducer } from "redux";
6
+ import type { ReduxAction, ModelCatalogState } from "../types";
7
+
8
+ const getQueryParam = (paramName: string): ?string => {
9
+ if (typeof window !== "undefined") {
10
+ const urlParams = new URLSearchParams(window.location?.search);
11
+ return urlParams.get(paramName);
12
+ }
13
+ return null;
14
+ };
15
+
16
+ const initialState: ModelCatalogState = {
17
+ entryDate:
18
+ getQueryParam("entryDate") ||
19
+ Cache.getItem("ModelCatalogEntryDate") ||
20
+ DateUtil.now(),
21
+ };
22
+
23
+ /**
24
+ * Keep track of the entry date for the modelcatalog
25
+ */
26
+ const ModelCatalogReducer: Reducer<ModelCatalogState, ReduxAction> = (
27
+ state = initialState,
28
+ action,
29
+ ) => {
30
+ if (!action) {
31
+ return state;
32
+ }
33
+
34
+ switch (action.type) {
35
+ case "UPDATE_ENTRYDATE":
36
+ Cache.addItem("ModelCatalogEntryDate", action.payload);
37
+ return {
38
+ ...state,
39
+ entryDate: action.payload,
40
+ };
41
+ default:
42
+ return state;
43
+ }
44
+ };
45
+
46
+ export default ModelCatalogReducer;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelCatalogReducer.js","names":["_utils","require","_Cache","_interopRequireDefault","getQueryParam","paramName","window","urlParams","_urlSearchParams","default","location","search","get","initialState","entryDate","Cache","getItem","DateUtil","now","ModelCatalogReducer","state","arguments","length","undefined","action","type","addItem","payload","_default","exports"],"sources":["../../../src/redux/reducers/ModelCatalogReducer.js"],"sourcesContent":["// @flow\nimport { DateUtil } from \"../../utils\";\nimport Cache from \"../../utils/browser/Cache\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ModelCatalogState } from \"../types\";\n\nconst getQueryParam = (paramName: string): ?string => {\n if (typeof window !== \"undefined\") {\n const urlParams = new URLSearchParams(window.location?.search);\n return urlParams.get(paramName);\n }\n return null;\n};\n\nconst initialState: ModelCatalogState = {\n entryDate:\n getQueryParam(\"entryDate\") ||\n Cache.getItem(\"ModelCatalogEntryDate\") ||\n DateUtil.now(),\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nconst ModelCatalogReducer: Reducer<ModelCatalogState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_ENTRYDATE\":\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n return {\n ...state,\n entryDate: action.payload,\n };\n default:\n return state;\n }\n};\n\nexport default ModelCatalogReducer;\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,MAAMG,aAAa,GAAIC,SAAiB,IAAc;EACpD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMC,SAAS,GAAG,IAAAC,gBAAA,CAAAC,OAAA,CAAoBH,MAAM,CAACI,QAAQ,EAAEC,MAAM,CAAC;IAC9D,OAAOJ,SAAS,CAACK,GAAG,CAACP,SAAS,CAAC;EACjC;EACA,OAAO,IAAI;AACb,CAAC;AAED,MAAMQ,YAA+B,GAAG;EACtCC,SAAS,EACPV,aAAa,CAAC,WAAW,CAAC,IAC1BW,cAAK,CAACC,OAAO,CAAC,uBAAuB,CAAC,IACtCC,eAAQ,CAACC,GAAG,CAAC;AACjB,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAG,SAAAA,CAAA,EAGhE;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGR,YAAY;EAAA,IACpBW,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOJ,KAAK;EACd;EAEA,QAAQI,MAAM,CAACC,IAAI;IACjB,KAAK,kBAAkB;MACrBV,cAAK,CAACW,OAAO,CAAC,uBAAuB,EAAEF,MAAM,CAACG,OAAO,CAAC;MACtD,OAAO;QACL,GAAGP,KAAK;QACRN,SAAS,EAAEU,MAAM,CAACG;MACpB,CAAC;IACH;MACE,OAAOP,KAAK;EAChB;AACF,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAEaU,mBAAmB","ignoreList":[]}
@@ -11,6 +11,7 @@ var _I18nReducer = require("../_i18n/I18nReducer");
11
11
  var _ModalsReducer = _interopRequireDefault(require("./ModalsReducer"));
12
12
  var _AuthReducer = _interopRequireDefault(require("./AuthReducer"));
13
13
  var _ErrorReducer = _interopRequireDefault(require("./ErrorReducer"));
14
+ var _ModelCatalogReducer = _interopRequireDefault(require("./ModelCatalogReducer"));
14
15
  var _NotificationReducer = _interopRequireDefault(require("./NotificationReducer"));
15
16
  var _ProgressIndicatorReducer = _interopRequireDefault(require("./ProgressIndicatorReducer"));
16
17
  var _PreferencesReducer = _interopRequireDefault(require("./PreferencesReducer"));
@@ -23,6 +24,7 @@ const createReducer = () => ({
23
24
  auth: _AuthReducer.default,
24
25
  error: _ErrorReducer.default,
25
26
  modals: _ModalsReducer.default,
27
+ modelcatalog: _ModelCatalogReducer.default,
26
28
  notification: _NotificationReducer.default,
27
29
  progressindicator: _ProgressIndicatorReducer.default,
28
30
  preferences: _PreferencesReducer.default
@@ -6,6 +6,7 @@ import { I18nReducer } from "../_i18n/I18nReducer";
6
6
  import ModalsReducer from "./ModalsReducer";
7
7
  import AuthReducer from "./AuthReducer";
8
8
  import ErrorReducer from "./ErrorReducer";
9
+ import ModelCatalogReducer from "./ModelCatalogReducer";
9
10
  import NotificationReducer from "./NotificationReducer";
10
11
  import ProgressIndicatorReducer from "./ProgressIndicatorReducer";
11
12
  import PreferencesReducer from "./PreferencesReducer";
@@ -19,6 +20,7 @@ import type {
19
20
  ModalsState,
20
21
  ErrorState,
21
22
  AuthState,
23
+ ModelCatalogState,
22
24
  } from "../types";
23
25
  import type { RouterState } from "../_router/types";
24
26
  import type { ModularUIState } from "../_modularui/types";
@@ -29,6 +31,7 @@ type Reducers = {
29
31
  error: Reducer<ErrorState, ReduxAction>,
30
32
  i18n: Reducer<I18nState, ReduxAction>,
31
33
  modals: Reducer<ModalsState, ReduxAction>,
34
+ modelcatalog: Reducer<ModelCatalogState, ReduxAction>,
32
35
  modularui: Reducer<ModularUIState, ReduxAction>,
33
36
  notification: Reducer<NotificationState, ReduxAction>,
34
37
  preferences: Reducer<PreferencesState, ReduxAction>,
@@ -45,6 +48,7 @@ export const createReducer = (): Reducers => ({
45
48
  auth: AuthReducer,
46
49
  error: ErrorReducer,
47
50
  modals: ModalsReducer,
51
+ modelcatalog: ModelCatalogReducer,
48
52
  notification: NotificationReducer,
49
53
  progressindicator: ProgressIndicatorReducer,
50
54
  preferences: PreferencesReducer,
@@ -1 +1 @@
1
- {"version":3,"file":"createReducer.js","names":["_RouterReducer","require","_ModularUIReducer","_I18nReducer","_ModalsReducer","_interopRequireDefault","_AuthReducer","_ErrorReducer","_NotificationReducer","_ProgressIndicatorReducer","_PreferencesReducer","createReducer","router","RouterReducer","modularui","ModularUIReducer","i18n","I18nReducer","auth","AuthReducer","error","ErrorReducer","modals","ModalsReducer","notification","NotificationReducer","progressindicator","ProgressIndicatorReducer","preferences","PreferencesReducer","exports"],"sources":["../../../src/redux/reducers/createReducer.js"],"sourcesContent":["// @flow\nimport { RouterReducer } from \"../_router/RouterReducer\";\nimport { ModularUIReducer } from \"../_modularui/ModularUIReducer\";\nimport { I18nReducer } from \"../_i18n/I18nReducer\";\n\nimport ModalsReducer from \"./ModalsReducer\";\nimport AuthReducer from \"./AuthReducer\";\nimport ErrorReducer from \"./ErrorReducer\";\nimport NotificationReducer from \"./NotificationReducer\";\nimport ProgressIndicatorReducer from \"./ProgressIndicatorReducer\";\nimport PreferencesReducer from \"./PreferencesReducer\";\n\nimport type { Reducer } from \"redux\";\nimport type {\n ReduxAction,\n ProgressIndicatorState,\n PreferencesState,\n NotificationState,\n ModalsState,\n ErrorState,\n AuthState,\n} from \"../types\";\nimport type { RouterState } from \"../_router/types\";\nimport type { ModularUIState } from \"../_modularui/types\";\nimport type { I18nState } from \"../_i18n/types\";\n\ntype Reducers = {\n auth: Reducer<AuthState, ReduxAction>,\n error: Reducer<ErrorState, ReduxAction>,\n i18n: Reducer<I18nState, ReduxAction>,\n modals: Reducer<ModalsState, ReduxAction>,\n modularui: Reducer<ModularUIState, ReduxAction>,\n notification: Reducer<NotificationState, ReduxAction>,\n preferences: Reducer<PreferencesState, ReduxAction>,\n progressindicator: Reducer<ProgressIndicatorState, ReduxAction>,\n router: Reducer<RouterState, ReduxAction>,\n};\n\n/**\n */\nexport const createReducer = (): Reducers => ({\n router: RouterReducer,\n modularui: ModularUIReducer,\n i18n: I18nReducer,\n auth: AuthReducer,\n error: ErrorReducer,\n modals: ModalsReducer,\n notification: NotificationReducer,\n progressindicator: ProgressIndicatorReducer,\n preferences: PreferencesReducer,\n});\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,oBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,yBAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,mBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AA4BA;AACA;AACO,MAAMU,aAAa,GAAGA,CAAA,MAAiB;EAC5CC,MAAM,EAAEC,4BAAa;EACrBC,SAAS,EAAEC,kCAAgB;EAC3BC,IAAI,EAAEC,wBAAW;EACjBC,IAAI,EAAEC,oBAAW;EACjBC,KAAK,EAAEC,qBAAY;EACnBC,MAAM,EAAEC,sBAAa;EACrBC,YAAY,EAAEC,4BAAmB;EACjCC,iBAAiB,EAAEC,iCAAwB;EAC3CC,WAAW,EAAEC;AACf,CAAC,CAAC;AAACC,OAAA,CAAAnB,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"createReducer.js","names":["_RouterReducer","require","_ModularUIReducer","_I18nReducer","_ModalsReducer","_interopRequireDefault","_AuthReducer","_ErrorReducer","_ModelCatalogReducer","_NotificationReducer","_ProgressIndicatorReducer","_PreferencesReducer","createReducer","router","RouterReducer","modularui","ModularUIReducer","i18n","I18nReducer","auth","AuthReducer","error","ErrorReducer","modals","ModalsReducer","modelcatalog","ModelCatalogReducer","notification","NotificationReducer","progressindicator","ProgressIndicatorReducer","preferences","PreferencesReducer","exports"],"sources":["../../../src/redux/reducers/createReducer.js"],"sourcesContent":["// @flow\nimport { RouterReducer } from \"../_router/RouterReducer\";\nimport { ModularUIReducer } from \"../_modularui/ModularUIReducer\";\nimport { I18nReducer } from \"../_i18n/I18nReducer\";\n\nimport ModalsReducer from \"./ModalsReducer\";\nimport AuthReducer from \"./AuthReducer\";\nimport ErrorReducer from \"./ErrorReducer\";\nimport ModelCatalogReducer from \"./ModelCatalogReducer\";\nimport NotificationReducer from \"./NotificationReducer\";\nimport ProgressIndicatorReducer from \"./ProgressIndicatorReducer\";\nimport PreferencesReducer from \"./PreferencesReducer\";\n\nimport type { Reducer } from \"redux\";\nimport type {\n ReduxAction,\n ProgressIndicatorState,\n PreferencesState,\n NotificationState,\n ModalsState,\n ErrorState,\n AuthState,\n ModelCatalogState,\n} from \"../types\";\nimport type { RouterState } from \"../_router/types\";\nimport type { ModularUIState } from \"../_modularui/types\";\nimport type { I18nState } from \"../_i18n/types\";\n\ntype Reducers = {\n auth: Reducer<AuthState, ReduxAction>,\n error: Reducer<ErrorState, ReduxAction>,\n i18n: Reducer<I18nState, ReduxAction>,\n modals: Reducer<ModalsState, ReduxAction>,\n modelcatalog: Reducer<ModelCatalogState, ReduxAction>,\n modularui: Reducer<ModularUIState, ReduxAction>,\n notification: Reducer<NotificationState, ReduxAction>,\n preferences: Reducer<PreferencesState, ReduxAction>,\n progressindicator: Reducer<ProgressIndicatorState, ReduxAction>,\n router: Reducer<RouterState, ReduxAction>,\n};\n\n/**\n */\nexport const createReducer = (): Reducers => ({\n router: RouterReducer,\n modularui: ModularUIReducer,\n i18n: I18nReducer,\n auth: AuthReducer,\n error: ErrorReducer,\n modals: ModalsReducer,\n modelcatalog: ModelCatalogReducer,\n notification: NotificationReducer,\n progressindicator: ProgressIndicatorReducer,\n preferences: PreferencesReducer,\n});\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,oBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,oBAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,yBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AACA,IAAAU,mBAAA,GAAAN,sBAAA,CAAAJ,OAAA;AA8BA;AACA;AACO,MAAMW,aAAa,GAAGA,CAAA,MAAiB;EAC5CC,MAAM,EAAEC,4BAAa;EACrBC,SAAS,EAAEC,kCAAgB;EAC3BC,IAAI,EAAEC,wBAAW;EACjBC,IAAI,EAAEC,oBAAW;EACjBC,KAAK,EAAEC,qBAAY;EACnBC,MAAM,EAAEC,sBAAa;EACrBC,YAAY,EAAEC,4BAAmB;EACjCC,YAAY,EAAEC,4BAAmB;EACjCC,iBAAiB,EAAEC,iCAAwB;EAC3CC,WAAW,EAAEC;AACf,CAAC,CAAC;AAACC,OAAA,CAAArB,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  var _exportNames = {
9
9
  AuthReducer: true,
10
+ ModelCatalogReducer: true,
10
11
  ErrorReducer: true,
11
12
  ModalsReducer: true,
12
13
  NotificationReducer: true,
@@ -31,6 +32,12 @@ Object.defineProperty(exports, "ModalsReducer", {
31
32
  return _ModalsReducer.default;
32
33
  }
33
34
  });
35
+ Object.defineProperty(exports, "ModelCatalogReducer", {
36
+ enumerable: true,
37
+ get: function () {
38
+ return _ModelCatalogReducer.default;
39
+ }
40
+ });
34
41
  Object.defineProperty(exports, "NotificationReducer", {
35
42
  enumerable: true,
36
43
  get: function () {
@@ -62,6 +69,7 @@ _Object$keys(_createReducer).forEach(function (key) {
62
69
  });
63
70
  });
64
71
  var _AuthReducer = _interopRequireDefault(require("./AuthReducer"));
72
+ var _ModelCatalogReducer = _interopRequireDefault(require("./ModelCatalogReducer"));
65
73
  var _ErrorReducer = _interopRequireDefault(require("./ErrorReducer"));
66
74
  var _ModalsReducer = _interopRequireDefault(require("./ModalsReducer"));
67
75
  var _NotificationReducer = _interopRequireDefault(require("./NotificationReducer"));
@@ -2,6 +2,7 @@
2
2
  export * from "./createReducer";
3
3
 
4
4
  export { default as AuthReducer } from "./AuthReducer";
5
+ export { default as ModelCatalogReducer } from "./ModelCatalogReducer";
5
6
  export { default as ErrorReducer } from "./ErrorReducer";
6
7
  export { default as ModalsReducer } from "./ModalsReducer";
7
8
  export { default as NotificationReducer } from "./NotificationReducer";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_createReducer","require","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_AuthReducer","_interopRequireDefault","_ErrorReducer","_ModalsReducer","_NotificationReducer","_PreferencesReducer","_ProgressIndicatorReducer"],"sources":["../../../src/redux/reducers/index.js"],"sourcesContent":["// @flow\nexport * from \"./createReducer\";\n\nexport { default as AuthReducer } from \"./AuthReducer\";\nexport { default as ErrorReducer } from \"./ErrorReducer\";\nexport { default as ModalsReducer } from \"./ModalsReducer\";\nexport { default as NotificationReducer } from \"./NotificationReducer\";\nexport { default as PreferencesReducer } from \"./PreferencesReducer\";\nexport { default as ProgressIndicatorReducer } from \"./ProgressIndicatorReducer\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,cAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAJ,cAAA,CAAAI,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,cAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAU,YAAA,GAAAC,sBAAA,CAAAd,OAAA;AACA,IAAAe,aAAA,GAAAD,sBAAA,CAAAd,OAAA;AACA,IAAAgB,cAAA,GAAAF,sBAAA,CAAAd,OAAA;AACA,IAAAiB,oBAAA,GAAAH,sBAAA,CAAAd,OAAA;AACA,IAAAkB,mBAAA,GAAAJ,sBAAA,CAAAd,OAAA;AACA,IAAAmB,yBAAA,GAAAL,sBAAA,CAAAd,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_createReducer","require","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_AuthReducer","_interopRequireDefault","_ModelCatalogReducer","_ErrorReducer","_ModalsReducer","_NotificationReducer","_PreferencesReducer","_ProgressIndicatorReducer"],"sources":["../../../src/redux/reducers/index.js"],"sourcesContent":["// @flow\nexport * from \"./createReducer\";\n\nexport { default as AuthReducer } from \"./AuthReducer\";\nexport { default as ModelCatalogReducer } from \"./ModelCatalogReducer\";\nexport { default as ErrorReducer } from \"./ErrorReducer\";\nexport { default as ModalsReducer } from \"./ModalsReducer\";\nexport { default as NotificationReducer } from \"./NotificationReducer\";\nexport { default as PreferencesReducer } from \"./PreferencesReducer\";\nexport { default as ProgressIndicatorReducer } from \"./ProgressIndicatorReducer\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,cAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAJ,cAAA,CAAAI,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,cAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAU,YAAA,GAAAC,sBAAA,CAAAd,OAAA;AACA,IAAAe,oBAAA,GAAAD,sBAAA,CAAAd,OAAA;AACA,IAAAgB,aAAA,GAAAF,sBAAA,CAAAd,OAAA;AACA,IAAAiB,cAAA,GAAAH,sBAAA,CAAAd,OAAA;AACA,IAAAkB,oBAAA,GAAAJ,sBAAA,CAAAd,OAAA;AACA,IAAAmB,mBAAA,GAAAL,sBAAA,CAAAd,OAAA;AACA,IAAAoB,yBAAA,GAAAN,sBAAA,CAAAd,OAAA","ignoreList":[]}
@@ -15,4 +15,15 @@ _Object$keys(_i18n).forEach(function (key) {
15
15
  }
16
16
  });
17
17
  });
18
+ var _modelcatalog = require("./modelcatalog");
19
+ _Object$keys(_modelcatalog).forEach(function (key) {
20
+ if (key === "default" || key === "__esModule") return;
21
+ if (key in exports && exports[key] === _modelcatalog[key]) return;
22
+ Object.defineProperty(exports, key, {
23
+ enumerable: true,
24
+ get: function () {
25
+ return _modelcatalog[key];
26
+ }
27
+ });
28
+ });
18
29
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,3 @@
1
1
  // @flow
2
2
  export * from "./i18n";
3
+ export * from "./modelcatalog";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_i18n","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get"],"sources":["../../../src/redux/selectors/index.js"],"sourcesContent":["// @flow\nexport * from \"./i18n\";\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_i18n","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_modelcatalog"],"sources":["../../../src/redux/selectors/index.js"],"sourcesContent":["// @flow\nexport * from \"./i18n\";\nexport * from \"./modelcatalog\";\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,aAAA,GAAAT,OAAA;AAAAC,YAAA,CAAAQ,aAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,aAAA,CAAAN,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getEntryDate = void 0;
7
+ var _utils = require("../../utils");
8
+ /**
9
+ * Retrieve entrydate for the model catalog
10
+ */
11
+ const getEntryDate = state => {
12
+ return state.modelcatalog?.entryDate ?? _utils.DateUtil.now();
13
+ };
14
+ exports.getEntryDate = getEntryDate;
15
+ //# sourceMappingURL=modelcatalog.js.map
@@ -0,0 +1,11 @@
1
+ // @flow
2
+ import { DateUtil } from "../../utils";
3
+
4
+ import type { ReduxState } from "../types";
5
+
6
+ /**
7
+ * Retrieve entrydate for the model catalog
8
+ */
9
+ export const getEntryDate = (state: ReduxState): ISO_DATE => {
10
+ return state.modelcatalog?.entryDate ?? DateUtil.now();
11
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelcatalog.js","names":["_utils","require","getEntryDate","state","modelcatalog","entryDate","DateUtil","now","exports"],"sources":["../../../src/redux/selectors/modelcatalog.js"],"sourcesContent":["// @flow\nimport { DateUtil } from \"../../utils\";\n\nimport type { ReduxState } from \"../types\";\n\n/**\n * Retrieve entrydate for the model catalog\n */\nexport const getEntryDate = (state: ReduxState): ISO_DATE => {\n return state.modelcatalog?.entryDate ?? DateUtil.now();\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,YAAY,GAAIC,KAAiB,IAAe;EAC3D,OAAOA,KAAK,CAACC,YAAY,EAAEC,SAAS,IAAIC,eAAQ,CAACC,GAAG,CAAC,CAAC;AACxD,CAAC;AAACC,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -135,6 +135,11 @@ export type UpdateAutosaveAction = {
135
135
  },
136
136
  };
137
137
 
138
+ export type UpdateEntryDateAction = {
139
+ type: "UPDATE_ENTRYDATE",
140
+ payload: ISO_DATE,
141
+ };
142
+
138
143
  export type ReduxAction =
139
144
  | UpdateStatusAction
140
145
  | SetModelAction
@@ -162,6 +167,7 @@ export type ReduxAction =
162
167
  | ChangePasswordAction
163
168
  | LogoutSuccessAction
164
169
  | UpdateAutosaveAction
170
+ | UpdateEntryDateAction
165
171
  | LocationChangeAction
166
172
  | PushAction
167
173
  | ReplaceAction
@@ -206,11 +212,16 @@ export type ProgressIndicatorState = {
206
212
  +percentComplete: number,
207
213
  };
208
214
 
215
+ export type ModelCatalogState = {
216
+ entryDate: ISO_DATE,
217
+ };
218
+
209
219
  export type ReduxState = {
210
220
  +router: RouterState,
211
221
  +modularui: ModularUIState,
212
222
  +i18n: I18nState,
213
223
  +auth: AuthState,
224
+ +modelcatalog: ModelCatalogState,
214
225
  +error: ErrorState,
215
226
  +modals: ModalsState,
216
227
  +notification: NotificationState,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/redux/types.js"],"sourcesContent":["// @flow\nimport type { Store, DispatchAPI } from \"redux\";\n\nimport type ErrorResponse from \"../models/error/ErrorResponse\";\n\nimport type FormModel from \"../models/form/FormModel\";\nimport typeof {\n NOTIFICATION_TYPES,\n AUTOSAVE_STATUS,\n} from \"../constants/Constants\";\n\nimport type { MessageObject } from \"../i18n/types\";\nimport type {\n I18nState,\n UpdateLocaleAction,\n SetLocalesAction,\n} from \"./_i18n/types\";\nimport type {\n ModularUIState,\n ModularUIAction,\n UpdateStatusAction,\n SetModelAction,\n UpdateModelAction,\n UpdateFormAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n InitModelAction,\n} from \"./_modularui/types\";\nimport type {\n RouterState,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./_router/types\";\n\nexport type PreferenceValue =\n | null\n | string\n | boolean\n | { [key: string]: any }\n | Array<PreferenceValue>;\n\nexport type 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\nexport type NoAction = {\n type: \"NO_ACTION\",\n};\n\nexport type SaveErrorAction = {\n type: \"SAVE_ERROR\",\n payload: ErrorResponse,\n};\n\nexport type ShowModalAction = {\n type: \"SHOW_MODAL\",\n payload: string,\n};\n\nexport type CloseModalAction = {\n type: \"CLOSE_MODAL\",\n payload: string,\n};\n\nexport type DismissNotificationAction = {\n type: \"DISMISS_NOTIFICATION\",\n};\nexport type ShowNotificationAction = {\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type: $Keys<NOTIFICATION_TYPES>,\n message: MessageObject,\n error: ?ErrorResponse,\n },\n};\n\nexport type SetPreferenceAction = {\n type: \"SET_PREFERENCE\",\n payload: { [name: string]: PreferenceValue },\n};\nexport type SetPreferencesAction = {\n type: \"SET_PREFERENCES\",\n payload: { [name: string]: PreferenceValue },\n};\n\nexport type StartProgressAction = {\n type: \"START_PROGRESS\",\n};\nexport type FinishProgressAction = {\n type: \"FINISH_PROGRESS\",\n};\nexport type ResetProgressAction = {\n type: \"RESET_PROGRESS\",\n};\nexport type UpdateProgressAction = {\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete: number },\n};\n\nexport type SendAuthenticationErrorAction = {\n type: \"AUTHENTICATION_ERROR\",\n payload: string,\n};\n\nexport type ResetAuthErrorsAction = {\n type: \"AUTHENTICATION_RESET_ERRORS\",\n};\n\nexport type LoginSuccessAction = {\n type: \"AUTHENTICATION_SUCCESS\",\n};\n\nexport type ChangePasswordAction = {\n type: \"CHANGE_PASSWORD\",\n};\n\nexport type LogoutSuccessAction = {\n type: \"AUTHENTICATION_LOGOUT\",\n};\n\nexport type UpdateAutosaveAction = {\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status: $Keys<AUTOSAVE_STATUS>,\n model: FormModel,\n },\n};\n\nexport type ReduxAction =\n | UpdateStatusAction\n | SetModelAction\n | InitModelAction\n | UpdateModelAction\n | UpdateFormAction\n | RemoveModelByKeyAction\n | ResetModularUIAction\n | SaveErrorAction\n | UpdateLocaleAction\n | SetLocalesAction\n | ShowModalAction\n | CloseModalAction\n | DismissNotificationAction\n | ShowNotificationAction\n | SetPreferenceAction\n | SetPreferencesAction\n | StartProgressAction\n | FinishProgressAction\n | ResetProgressAction\n | UpdateProgressAction\n | ResetAuthErrorsAction\n | SendAuthenticationErrorAction\n | LoginSuccessAction\n | ChangePasswordAction\n | LogoutSuccessAction\n | UpdateAutosaveAction\n | LocationChangeAction\n | PushAction\n | ReplaceAction\n | GoAction\n | GoBackAction\n | GoForwardAction\n | ModularUIAction\n | NoAction;\n\n// Redux state\nexport type AuthState = {\n +mustChangePassword: boolean,\n +error: ?string,\n};\n\nexport type ErrorState = null | ErrorResponse;\n\nexport type ModalState = {\n +key: string,\n +visible: boolean,\n +size?: string,\n};\n\nexport type ModalsState = {\n +modals: Array<ModalState>,\n};\n\nexport type NotificationState = {\n +render: boolean,\n +messageType: string | null,\n +message: MessageObject | null,\n +error: ?ErrorResponse | null,\n};\n\nexport type PreferencesState = {\n +[name: string]: PreferenceValue,\n};\n\nexport type ProgressIndicatorState = {\n +count: number,\n +timestamp: number,\n +percentComplete: number,\n};\n\nexport type ReduxState = {\n +router: RouterState,\n +modularui: ModularUIState,\n +i18n: I18nState,\n +auth: AuthState,\n +error: ErrorState,\n +modals: ModalsState,\n +notification: NotificationState,\n +progressindicator: ProgressIndicatorState,\n +preferences: PreferencesState,\n ...\n};\n\nexport type GetState = () => ReduxState;\nexport type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;\nexport type PromiseAction = Promise<PossibleAction>;\nexport type Dispatch = DispatchAPI<PossibleAction>;\nexport type ReduxStore = Store<ReduxState, ReduxAction, Dispatch>;\n\nexport type PossibleAction = ReduxAction | ThunkAction | PromiseAction;\n\nexport type CustomReducers = { [reducerKey: string]: any };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/redux/types.js"],"sourcesContent":["// @flow\nimport type { Store, DispatchAPI } from \"redux\";\n\nimport type ErrorResponse from \"../models/error/ErrorResponse\";\n\nimport type FormModel from \"../models/form/FormModel\";\nimport typeof {\n NOTIFICATION_TYPES,\n AUTOSAVE_STATUS,\n} from \"../constants/Constants\";\n\nimport type { MessageObject } from \"../i18n/types\";\nimport type {\n I18nState,\n UpdateLocaleAction,\n SetLocalesAction,\n} from \"./_i18n/types\";\nimport type {\n ModularUIState,\n ModularUIAction,\n UpdateStatusAction,\n SetModelAction,\n UpdateModelAction,\n UpdateFormAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n InitModelAction,\n} from \"./_modularui/types\";\nimport type {\n RouterState,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./_router/types\";\n\nexport type PreferenceValue =\n | null\n | string\n | boolean\n | { [key: string]: any }\n | Array<PreferenceValue>;\n\nexport type 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\nexport type NoAction = {\n type: \"NO_ACTION\",\n};\n\nexport type SaveErrorAction = {\n type: \"SAVE_ERROR\",\n payload: ErrorResponse,\n};\n\nexport type ShowModalAction = {\n type: \"SHOW_MODAL\",\n payload: string,\n};\n\nexport type CloseModalAction = {\n type: \"CLOSE_MODAL\",\n payload: string,\n};\n\nexport type DismissNotificationAction = {\n type: \"DISMISS_NOTIFICATION\",\n};\nexport type ShowNotificationAction = {\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type: $Keys<NOTIFICATION_TYPES>,\n message: MessageObject,\n error: ?ErrorResponse,\n },\n};\n\nexport type SetPreferenceAction = {\n type: \"SET_PREFERENCE\",\n payload: { [name: string]: PreferenceValue },\n};\nexport type SetPreferencesAction = {\n type: \"SET_PREFERENCES\",\n payload: { [name: string]: PreferenceValue },\n};\n\nexport type StartProgressAction = {\n type: \"START_PROGRESS\",\n};\nexport type FinishProgressAction = {\n type: \"FINISH_PROGRESS\",\n};\nexport type ResetProgressAction = {\n type: \"RESET_PROGRESS\",\n};\nexport type UpdateProgressAction = {\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete: number },\n};\n\nexport type SendAuthenticationErrorAction = {\n type: \"AUTHENTICATION_ERROR\",\n payload: string,\n};\n\nexport type ResetAuthErrorsAction = {\n type: \"AUTHENTICATION_RESET_ERRORS\",\n};\n\nexport type LoginSuccessAction = {\n type: \"AUTHENTICATION_SUCCESS\",\n};\n\nexport type ChangePasswordAction = {\n type: \"CHANGE_PASSWORD\",\n};\n\nexport type LogoutSuccessAction = {\n type: \"AUTHENTICATION_LOGOUT\",\n};\n\nexport type UpdateAutosaveAction = {\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status: $Keys<AUTOSAVE_STATUS>,\n model: FormModel,\n },\n};\n\nexport type UpdateEntryDateAction = {\n type: \"UPDATE_ENTRYDATE\",\n payload: ISO_DATE,\n};\n\nexport type ReduxAction =\n | UpdateStatusAction\n | SetModelAction\n | InitModelAction\n | UpdateModelAction\n | UpdateFormAction\n | RemoveModelByKeyAction\n | ResetModularUIAction\n | SaveErrorAction\n | UpdateLocaleAction\n | SetLocalesAction\n | ShowModalAction\n | CloseModalAction\n | DismissNotificationAction\n | ShowNotificationAction\n | SetPreferenceAction\n | SetPreferencesAction\n | StartProgressAction\n | FinishProgressAction\n | ResetProgressAction\n | UpdateProgressAction\n | ResetAuthErrorsAction\n | SendAuthenticationErrorAction\n | LoginSuccessAction\n | ChangePasswordAction\n | LogoutSuccessAction\n | UpdateAutosaveAction\n | UpdateEntryDateAction\n | LocationChangeAction\n | PushAction\n | ReplaceAction\n | GoAction\n | GoBackAction\n | GoForwardAction\n | ModularUIAction\n | NoAction;\n\n// Redux state\nexport type AuthState = {\n +mustChangePassword: boolean,\n +error: ?string,\n};\n\nexport type ErrorState = null | ErrorResponse;\n\nexport type ModalState = {\n +key: string,\n +visible: boolean,\n +size?: string,\n};\n\nexport type ModalsState = {\n +modals: Array<ModalState>,\n};\n\nexport type NotificationState = {\n +render: boolean,\n +messageType: string | null,\n +message: MessageObject | null,\n +error: ?ErrorResponse | null,\n};\n\nexport type PreferencesState = {\n +[name: string]: PreferenceValue,\n};\n\nexport type ProgressIndicatorState = {\n +count: number,\n +timestamp: number,\n +percentComplete: number,\n};\n\nexport type ModelCatalogState = {\n entryDate: ISO_DATE,\n};\n\nexport type ReduxState = {\n +router: RouterState,\n +modularui: ModularUIState,\n +i18n: I18nState,\n +auth: AuthState,\n +modelcatalog: ModelCatalogState,\n +error: ErrorState,\n +modals: ModalsState,\n +notification: NotificationState,\n +progressindicator: ProgressIndicatorState,\n +preferences: PreferencesState,\n ...\n};\n\nexport type GetState = () => ReduxState;\nexport type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;\nexport type PromiseAction = Promise<PossibleAction>;\nexport type Dispatch = DispatchAPI<PossibleAction>;\nexport type ReduxStore = Store<ReduxState, ReduxAction, Dispatch>;\n\nexport type PossibleAction = ReduxAction | ThunkAction | PromiseAction;\n\nexport type CustomReducers = { [reducerKey: string]: any };\n"],"mappings":"","ignoreList":[]}