@beinformed/ui 1.12.0 → 1.13.1
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 +32 -2
- package/esm/builder/mergeLayoutHintConfigurations.js +3 -3
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/exceptions/ConfigurationException.js +2 -1
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js +4 -3
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js +2 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js +2 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js +2 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js +2 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js +2 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js +2 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js +2 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js +2 -1
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js +2 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js +2 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js +2 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js +2 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js +2 -1
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/hooks/useContent.js +2 -2
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js +2 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useModal.js +2 -2
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModularUI.js +0 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js +2 -2
- package/esm/i18n/Locale.js +11 -4
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js +2 -2
- package/esm/i18n/Message.js +2 -2
- package/esm/i18n/languages.js +2 -1
- package/esm/i18n/languages.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js +2 -2
- package/esm/models/attributes/AttributeContent.js +58 -30
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js +3 -3
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js +2 -2
- package/esm/models/attributes/ChoiceAttributeModel.js +2 -2
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js +2 -2
- package/esm/models/attributes/CompositeAttributeChildCollection.js +2 -2
- package/esm/models/attributes/HelptextAttributeModel.js +24 -9
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js +2 -2
- package/esm/models/base/ResourceModel.js +2 -2
- package/esm/models/caseview/CaseViewModel.js +4 -5
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +2 -2
- package/esm/models/concepts/SourceReferenceModel.js +2 -2
- package/esm/models/content/ContentTOCModel.js +2 -2
- package/esm/models/filters/AssignmentFilterModel.js +2 -2
- package/esm/models/filters/BaseFilterModel.js +2 -2
- package/esm/models/filters/ConceptIndexFilterModel.js +2 -1
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js +2 -2
- package/esm/models/filters/FilterModel.js +2 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js +28 -4
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +5 -7
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js +2 -2
- package/esm/models/links/normalizeLinkJSON.js +2 -2
- package/esm/models/list/ListDetailModel.js +4 -6
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js +38 -0
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js +14 -2
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js +19 -74
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js +2 -2
- package/esm/models/panels/GroupingPanelModel.js +2 -4
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/modularui/ModularUIError.js +2 -1
- package/esm/modularui/ModularUIError.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +71 -49
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/react-server/serverUtil.js +2 -2
- package/esm/react-theme/createTheme.js +2 -2
- package/esm/redux/_i18n/reducer.js +2 -2
- package/esm/redux/_modularui/actions.js +2 -2
- package/esm/redux/_modularui/connector.js +2 -2
- package/esm/redux/_modularui/reducer.js +2 -2
- package/esm/redux/_modularui/selectors.js +2 -2
- package/esm/redux/reducers/AuthReducer.js +2 -2
- package/esm/redux/reducers/ModalsReducer.js +2 -2
- package/esm/redux/reducers/NotificationReducer.js +2 -2
- package/esm/redux/reducers/PreferencesReducer.js +2 -2
- package/esm/redux/reducers/ProgressIndicatorReducer.js +2 -2
- package/esm/redux/store/configureStore.js +2 -2
- package/esm/utils/browser/Cookies.js +18 -32
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/fetch/xhr.js +4 -3
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js +3 -3
- package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js +3 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js +5 -3
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js +3 -1
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js +3 -1
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js +3 -1
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js +3 -1
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js +3 -1
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js +3 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js +3 -1
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js +3 -1
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js +3 -1
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js +3 -1
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js +3 -1
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js +3 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js +3 -1
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/hooks/useContent.js +2 -2
- package/lib/hooks/useContent.js.flow +2 -2
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js +2 -1
- package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.flow +1 -2
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useModal.js +2 -2
- package/lib/hooks/useModal.js.flow +1 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModularUI.js +0 -1
- package/lib/hooks/useModularUI.js.flow +0 -2
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js +2 -2
- package/lib/i18n/Locale.js +11 -5
- package/lib/i18n/Locale.js.flow +7 -0
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js +2 -2
- package/lib/i18n/Message.js +2 -2
- package/lib/i18n/__tests__/Locale.spec.js.flow +14 -0
- package/lib/i18n/languages.js +2 -1
- package/lib/i18n/languages.js.flow +1 -0
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/types.js.flow +1 -0
- package/lib/models/attributes/AttributeCollection.js +2 -2
- package/lib/models/attributes/AttributeContent.js +59 -31
- package/lib/models/attributes/AttributeContent.js.flow +63 -16
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +3 -3
- package/lib/models/attributes/AttributeDataHelper.js.flow +1 -0
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js +2 -2
- package/lib/models/attributes/ChoiceAttributeModel.js +2 -2
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +2 -2
- package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -2
- package/lib/models/attributes/HelptextAttributeModel.js +24 -9
- package/lib/models/attributes/HelptextAttributeModel.js.flow +18 -5
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +13 -19
- package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +18 -10
- package/lib/models/attributes/_createAttribute.js +2 -2
- package/lib/models/base/ResourceModel.js +2 -2
- package/lib/models/caseview/CaseViewModel.js +5 -5
- package/lib/models/caseview/CaseViewModel.js.flow +5 -3
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +43 -4
- package/lib/models/concepts/ConceptDetailModel.js +2 -2
- package/lib/models/concepts/SourceReferenceModel.js +2 -2
- package/lib/models/content/ContentTOCModel.js +2 -2
- package/lib/models/filters/AssignmentFilterModel.js +2 -2
- package/lib/models/filters/BaseFilterModel.js +2 -2
- package/lib/models/filters/ConceptIndexFilterModel.js +3 -1
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js +2 -2
- package/lib/models/filters/FilterModel.js +3 -1
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +28 -4
- package/lib/models/form/FormModel.js.flow +18 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +5 -7
- package/lib/models/form/FormObjectModel.js.flow +2 -4
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.getters.spec.js.flow +15 -0
- package/lib/models/form/__tests__/FormObjectModel.spec.js.flow +29 -3
- package/lib/models/grouping/GroupingModel.js +2 -2
- package/lib/models/links/normalizeLinkJSON.js +2 -2
- package/lib/models/list/ListDetailModel.js +4 -6
- package/lib/models/list/ListDetailModel.js.flow +2 -2
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js +40 -0
- package/lib/models/list/ListItemCollection.js.flow +38 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js +14 -2
- package/lib/models/list/ListItemModel.js.flow +15 -0
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js +18 -75
- package/lib/models/list/ListModel.js.flow +3 -47
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +5 -3
- package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +22 -0
- package/lib/models/list/__tests__/ListModel.spec.js.flow +5 -5
- package/lib/models/lookup/LookupOptionCollection.js +2 -2
- package/lib/models/panels/GroupingPanelModel.js +2 -4
- package/lib/models/panels/GroupingPanelModel.js.flow +2 -2
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +43 -24
- package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +11 -0
- package/lib/models/types.js.flow +3 -3
- package/lib/modularui/ModularUIError.js +3 -1
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +69 -49
- package/lib/modularui/ModularUIRequest.js.flow +38 -22
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/react-server/serverUtil.js +2 -2
- package/lib/react-theme/createTheme.js +2 -2
- package/lib/redux/_i18n/reducer.js +2 -2
- package/lib/redux/_modularui/actions.js +2 -2
- package/lib/redux/_modularui/connector.js +2 -2
- package/lib/redux/_modularui/reducer.js +2 -2
- package/lib/redux/_modularui/selectors.js +2 -2
- package/lib/redux/reducers/AuthReducer.js +2 -2
- package/lib/redux/reducers/ModalsReducer.js +2 -2
- package/lib/redux/reducers/NotificationReducer.js +2 -2
- package/lib/redux/reducers/PreferencesReducer.js +2 -2
- package/lib/redux/reducers/ProgressIndicatorReducer.js +2 -2
- package/lib/redux/store/configureStore.js +2 -2
- package/lib/utils/browser/Cookies.js +18 -31
- package/lib/utils/browser/Cookies.js.flow +22 -28
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/browser/__tests__/Cookies.spec.js.flow +51 -0
- package/lib/utils/fetch/xhr.js +4 -3
- package/lib/utils/fetch/xhr.js.flow +3 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/package.json +36 -34
- package/src/builder/mergeLayoutHintConfigurations.js +3 -3
- package/src/hooks/useContent.js +2 -2
- package/src/hooks/useDeepCompareEffect.js +1 -1
- package/src/hooks/useForm.js +1 -2
- package/src/hooks/useModal.js +1 -1
- package/src/hooks/useModularUI.js +0 -2
- package/src/i18n/Locale.js +7 -0
- package/src/i18n/__tests__/Locale.spec.js +14 -0
- package/src/i18n/languages.js +1 -0
- package/src/i18n/types.js +1 -0
- package/src/models/attributes/AttributeContent.js +63 -16
- package/src/models/attributes/AttributeDataHelper.js +1 -0
- package/src/models/attributes/HelptextAttributeModel.js +18 -5
- package/src/models/attributes/__mock__/_FormCollectionContribution.json +9 -0
- package/src/models/attributes/__mock__/_FormCollectionData.json +12 -3
- package/src/models/attributes/__tests__/AttributeCollection.spec.js +4 -4
- package/src/models/attributes/__tests__/AttributeContent.spec.js +13 -19
- package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +18 -10
- package/src/models/caseview/CaseViewModel.js +5 -3
- package/src/models/caseview/__tests__/CaseViewModel.spec.js +43 -4
- package/src/models/caseview/__tests__/caseview.json +14 -3
- package/src/models/caseview/__tests__/caseviewContributions.json +48 -77
- package/src/models/caseview/__tests__/caseview_local_taskgroup.json +57 -0
- package/src/models/form/FormModel.js +18 -1
- package/src/models/form/FormObjectModel.js +2 -4
- package/src/models/form/__tests__/FormModel.getters.spec.js +15 -0
- package/src/models/form/__tests__/FormObjectModel.spec.js +29 -3
- package/src/models/list/ListDetailModel.js +2 -2
- package/src/models/list/ListItemCollection.js +38 -1
- package/src/models/list/ListItemModel.js +15 -0
- package/src/models/list/ListModel.js +3 -47
- package/src/models/list/__tests__/ListDetailModel.spec.js +5 -3
- package/src/models/list/__tests__/ListItemCollection.spec.js +22 -0
- package/src/models/list/__tests__/ListModel.spec.js +5 -5
- package/src/models/panels/GroupingPanelModel.js +2 -2
- package/src/models/panels/__tests__/GroupingPanelModel.spec.js +43 -24
- package/src/models/panels/__tests__/groupingPanel.json +20 -1
- package/src/models/panels/__tests__/groupingPanelContributions.json +14 -1
- package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +11 -0
- package/src/models/types.js +3 -3
- package/src/modularui/ModularUIRequest.js +38 -22
- package/src/utils/browser/Cookies.js +22 -28
- package/src/utils/browser/__tests__/Cookies.spec.js +51 -0
- package/src/utils/fetch/xhr.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### [1.13.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.13.0...v1.13.1) (2021-12-23)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **caseview:** throw correct exception when no selflink available ([af2d753](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/af2d7530a6aded1b9ab7026d281425d899a0a70b))
|
|
10
|
+
- **cookies:** improve creation of list items in a list ([2e2e9f5](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/2e2e9f5998bf4093edb160dd3d91ce6b4d60b9cd))
|
|
11
|
+
- **cookies:** use js-cookies library for cookie management ([291a036](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/291a036d9ab1856ae0d5bbb7b8c791d944c9a68e))
|
|
12
|
+
|
|
13
|
+
## [1.13.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.12.2...v1.13.0) (2021-12-16)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- **form-tokens:** add helper methods for removal and retreival of tokens on forms ([d65435c](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/d65435c8b10c150084fb89174ee58f29a344523d))
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
6
20
|
|
|
21
|
+
- **language:** add papiamento to language list ([b572350](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/b572350e5036b0a611a95169c4209437c3c2b4dc))
|
|
22
|
+
- **language:** make it possible to add a native name to a locale ([59fd933](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/59fd933c7f22751cbcdf0b5a1b67a9b49ae435d7))
|
|
23
|
+
|
|
24
|
+
### [1.12.2](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.12.1...v1.12.2) (2021-10-29)
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- **attribute-content:** add methods for retrieval of specific content elements ([ba65403](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/ba65403258b685ddd1e690834cb7458ae724653f))
|
|
29
|
+
|
|
30
|
+
### [1.12.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.12.0...v1.12.1) (2021-10-26)
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
- **text:** handle new text property in data services ([711312e](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/711312e94d5b3ee0d08c01d8700a4606fc731af4))
|
|
35
|
+
|
|
36
|
+
## [1.12.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.11.0...v1.12.0) (2021-10-26)
|
|
7
37
|
|
|
8
38
|
### Features
|
|
9
39
|
|
|
10
|
-
|
|
40
|
+
- **form-buttons:** getting button label values return default value of null instead of empty string ([b523cb7](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/b523cb7befe644560d95310d2930f3ec842673f4))
|
|
11
41
|
|
|
12
42
|
## [1.11.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.10.3...v1.11.0) (2021-10-25)
|
|
13
43
|
|
|
@@ -57,9 +57,9 @@ exports.mergeLayoutHintConfigurations = /*#__PURE__*/function () {
|
|
|
57
57
|
|
|
58
58
|
var newConfig = _Object$assign.apply(Object, _concatInstanceProperty(_context = [LayoutHintConfiguration]).call(_context, _toConsumableArray(jsons)));
|
|
59
59
|
|
|
60
|
-
fs.writeFile(path.join(outputFolder, "LayoutHintConfig.json"), _JSON$stringify(newConfig), function (
|
|
61
|
-
if (
|
|
62
|
-
return reject(
|
|
60
|
+
fs.writeFile(path.join(outputFolder, "LayoutHintConfig.json"), _JSON$stringify(newConfig), function (writeErr) {
|
|
61
|
+
if (writeErr) {
|
|
62
|
+
return reject(writeErr);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
return resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/builder/mergeLayoutHintConfigurations.js"],"names":["glob","require","fs","path","LayoutHintConfiguration","readFiles","files","filePromises","file","resolve","reject","readFile","err","data","JSON","parse","all","exports","mergeLayoutHintConfigurations","srcFolder","outputFolder","escapedSrcFolder","replace","then","jsons","newConfig","Object","writeFile","join"],"mappings":";;;;;;;;;AACA,IAAMA,IAAI,GAAGC,OAAO,CAAC,MAAD,CAApB;;AACA,IAAMC,EAAE,GAAGD,OAAO,CAAC,IAAD,CAAlB;;AACA,IAAME,IAAI,GAAGF,OAAO,CAAC,MAAD,CAApB;;AAEA,eAAoCA,OAAO,CAAC,+BAAD,CAA3C;AAAA,IAAQG,uBAAR,YAAQA,uBAAR;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD,EAAW;AAC3B,MAAMC,YAAY,GAAG,qBAAAD,KAAK,MAAL,CAAAA,KAAK,EACxB,UAACE,IAAD;AAAA,WACE,aAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AAC/BR,MAAAA,EAAE,CAACS,QAAH,CAAYH,IAAZ,EAAkB,OAAlB,EAA2B,UAACI,GAAD,EAAMC,IAAN,EAAe;AACxC,YAAID,GAAJ,EAAS;AACP,iBAAOF,MAAM,CAACE,GAAD,CAAb;AACD,SAFD,MAEO;AACL,iBAAOH,OAAO,CAACK,IAAI,CAACC,KAAL,CAAWF,IAAX,CAAD,CAAd;AACD;AACF,OAND;AAOD,KARD,CADF;AAAA,GADwB,CAA1B;;AAaA,SAAO,SAAQG,GAAR,CAAYT,YAAZ,CAAP;AACD,CAfD;AAiBA;AACA;AACA;AACA;AACA;;;AACAU,OAAO,CAACC,6BAAR;AAAA,sEAAwC,iBACtCC,SADsC,EAEtCC,YAFsC;AAAA;AAAA;AAAA;AAAA;AAAA;AAIhCC,YAAAA,gBAJgC,GAIbF,SAAS,CAACG,OAAV,CAAkB,KAAlB,EAAyB,GAAzB,CAJa;AAAA,8CAK/B,aAAY,UAACb,OAAD,EAAUC,MAAV,EAAqB;AACtCV,cAAAA,IAAI,CAACqB,gBAAgB,GAAG,2BAApB,EAAiD,EAAjD,EAAqD,UAACT,GAAD,EAAMN,KAAN,EAAgB;AACvE,oBAAIM,GAAJ,EAAS;AACP,yBAAOF,MAAM,CAACE,GAAD,CAAb;AACD;;AAEDP,gBAAAA,SAAS,CAACC,KAAD,CAAT,CAAiBiB,IAAjB,CAAsB,UAACC,KAAD,EAAW;AAAA;;AAC/B,sBAAMC,SAAS,GAAG,qBAAAC,MAAM,sCAAQtB,uBAAR,qCAAoCoB,KAApC,GAAxB;;AACAtB,kBAAAA,EAAE,CAACyB,SAAH,CACExB,IAAI,CAACyB,IAAL,CAAUR,YAAV,EAAwB,uBAAxB,CADF,EAEE,gBAAeK,SAAf,CAFF,EAIE,
|
|
1
|
+
{"version":3,"sources":["../../src/builder/mergeLayoutHintConfigurations.js"],"names":["glob","require","fs","path","LayoutHintConfiguration","readFiles","files","filePromises","file","resolve","reject","readFile","err","data","JSON","parse","all","exports","mergeLayoutHintConfigurations","srcFolder","outputFolder","escapedSrcFolder","replace","then","jsons","newConfig","Object","writeFile","join","writeErr"],"mappings":";;;;;;;;;AACA,IAAMA,IAAI,GAAGC,OAAO,CAAC,MAAD,CAApB;;AACA,IAAMC,EAAE,GAAGD,OAAO,CAAC,IAAD,CAAlB;;AACA,IAAME,IAAI,GAAGF,OAAO,CA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,KAApC,GAAxB;;AACAtB,kBAAAA,EAAE,CAACyB,SAAH,CACExB,IAAI,CAACyB,IAAL,CAAUR,YAAV,EAAwB,uBAAxB,CADF,EAEE,gBAAeK,SAAf,CAFF,EAIE,UAACI,QAAD,EAAc;AACZ,wBAAIA,QAAJ,EAAc;AACZ,6BAAOnB,MAAM,CAACmB,QAAD,CAAb;AACD;;AAED,2BAAOpB,OAAO,EAAd;AACD,mBAVH;AAYD,iBAdD;AAeD,eApBG,CAAJ;AAqBD,aAtBM,CAL+B;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAxC;;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// @flow\nconst glob = require(\"glob\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst { LayoutHintConfiguration } = require(\"../constants/LayoutHintConfig\");\n\nconst readFiles = (files) => {\n const filePromises = files.map(\n (file) =>\n new Promise((resolve, reject) => {\n fs.readFile(file, \"utf-8\", (err, data) => {\n if (err) {\n return reject(err);\n } else {\n return resolve(JSON.parse(data));\n }\n });\n })\n );\n\n return Promise.all(filePromises);\n};\n\n/**\n * Merge all LayoutHintConfig.json files from this library and in the srcFolder\n * together into one config file, and copies it to the outputFolder.<br/>\n * This file is consumed by Be Informed studio to give layout hint information\n */\nexports.mergeLayoutHintConfigurations = async (\n srcFolder: string,\n outputFolder: string\n): Promise<void> => {\n const escapedSrcFolder = srcFolder.replace(/\\\\/g, \"/\");\n return new Promise((resolve, reject) => {\n glob(escapedSrcFolder + \"/**/LayoutHintConfig.json\", {}, (err, files) => {\n if (err) {\n return reject(err);\n }\n\n readFiles(files).then((jsons) => {\n const newConfig = Object.assign(LayoutHintConfiguration, ...jsons);\n fs.writeFile(\n path.join(outputFolder, \"LayoutHintConfig.json\"),\n JSON.stringify(newConfig),\n\n (writeErr) => {\n if (writeErr) {\n return reject(writeErr);\n }\n\n return resolve();\n }\n );\n });\n });\n });\n};\n"],"file":"mergeLayoutHintConfigurations.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var ConfigurationException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return ConfigurationException;
|
|
31
|
+
return _createClass(ConfigurationException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default ConfigurationException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/ConfigurationException.js"],"names":["ConfigurationException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/ConfigurationException.js"],"names":["ConfigurationException","message","name","Error"],"mappings":";;;;;;;;;;;;AAEA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;iCAJkCC,K;;AAOrC,eAAeH,sBAAf","sourcesContent":["// @flow\n\n/**\n * ConfigurationException\n */\nclass ConfigurationException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ConfigurationException\";\n }\n}\n\nexport default ConfigurationException;\n"],"file":"ConfigurationException.js"}
|
|
@@ -3,6 +3,7 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
|
3
3
|
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
4
4
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
5
5
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
6
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
6
7
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
7
8
|
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/esm/assertThisInitialized";
|
|
8
9
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
@@ -16,9 +17,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
16
17
|
|
|
17
18
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
19
|
|
|
19
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys3(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys3(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
21
|
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
23
|
|
|
23
24
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
24
25
|
import _Object$keys3 from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
@@ -107,7 +108,7 @@ var FetchException = /*#__PURE__*/function (_Error) {
|
|
|
107
108
|
return _this;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
return FetchException;
|
|
111
|
+
return _createClass(FetchException);
|
|
111
112
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
112
113
|
|
|
113
114
|
export { FetchException as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/FetchException.js"],"names":["has","HTTP_METHODS","CLIENT_ERROR_CODE","getErrorInfo","errorResponse","requestOptions","defaultErrorInfo","id","defaultMessage","url","method","GET","properties","param","error","key","errors","FetchException","failedRequest","errorInfo","name","request","status","response","parameters","Error","captureStackTrace"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/FetchException.js"],"names":["has","HTTP_METHODS","CLIENT_ERROR_CODE","getErrorInfo","errorResponse","requestOptions","defaultErrorInfo","id","defaultMessage","url","method","GET","properties","param","error","key","errors","FetchException","failedRequest","errorInfo","name","request","status","response","parameters","Error","captureStackTrace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAASA,GAAT,QAAoB,0BAApB;AAEA,SAASC,YAAT,QAA6B,wBAA7B;AAkBA,IAAMC,iBAAiB,GAAG,GAA1B;AAEA;AACA;AACA;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBC,aADmB,EAEnBC,cAFmB,EAGhB;AAAA;;AACH,MAAMC,gBAAgB,GAAG;AACvBC,IAAAA,EAAE,EAAE,6BADmB;AAEvBC,IAAAA,cAAc,8FACZH,cADY,aACZA,cADY,uBACZA,cAAc,CAAEI,GADJ,qEACW,EADX,4DAEEJ,cAFF,aAEEA,cAF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QAAIY,KAAK,CAACC,iBAAV,EAA6B;AAC3BD,MAAAA,KAAK,CAACC,iBAAN,gCAA8BT,cAA9B;AACD;;AApBD;AAqBD;;;iCAlCyCQ,K;;SAAvBR,c","sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport type { MessageParameters } from \"../i18n/types\";\nimport type { RequestOptions } from \"../utils/fetch/types\";\n\nexport type ModularUIErrorResponse = {\n error: {\n id: string,\n properties: {\n [propertyName: string]: string | number,\n ...\n },\n },\n};\n\ntype RequestResult = { status: number };\ntype RequestParameters = { [key: string]: any };\n\nconst CLIENT_ERROR_CODE = 400;\n\n/**\n * @private\n */\nconst getErrorInfo = (\n errorResponse: ?ModularUIErrorResponse,\n requestOptions: ?RequestOptions\n) => {\n const defaultErrorInfo = {\n id: \"Error.CannotRequestResource\",\n defaultMessage: `Cannot request resource ${\n requestOptions?.url ?? \"\"\n } with method ${requestOptions?.method ?? HTTP_METHODS.GET}`,\n properties: {},\n param: null,\n };\n\n if (!errorResponse) {\n return defaultErrorInfo;\n }\n\n if (has(errorResponse, \"error\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse.error,\n };\n }\n\n const [key] = Object.keys(errorResponse);\n if (has(errorResponse[key], \"errors\")) {\n return {\n ...defaultErrorInfo,\n // $FlowFixMe[prop-missing] - not sure in what case this could happen\n ...errorResponse[key].errors,\n };\n }\n\n return defaultErrorInfo;\n};\n\n/**\n * FetchException\n */\nexport default class FetchException extends Error {\n request: ?RequestResult | XMLHttpRequest;\n status: number;\n response: ?ModularUIErrorResponse;\n parameters: ?RequestParameters;\n properties: MessageParameters;\n requestOptions: ?RequestOptions;\n id: string;\n\n constructor(\n errorResponse: ?ModularUIErrorResponse,\n failedRequest?: ?RequestResult | XMLHttpRequest,\n requestOptions?: RequestOptions\n ) {\n const errorInfo = getErrorInfo(errorResponse, requestOptions);\n super(errorInfo.id);\n\n this.name = errorInfo.id;\n this.id = errorInfo.id;\n this.request = failedRequest;\n this.requestOptions = requestOptions;\n\n this.status =\n failedRequest && failedRequest.status\n ? failedRequest.status\n : CLIENT_ERROR_CODE;\n\n this.response = errorResponse;\n this.properties = errorInfo.properties ?? {};\n this.parameters = errorInfo.param ?? null;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FetchException);\n }\n }\n}\n"],"file":"FetchException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var IllegalArgumentException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return IllegalArgumentException;
|
|
31
|
+
return _createClass(IllegalArgumentException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default IllegalArgumentException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/IllegalArgumentException.js"],"names":["IllegalArgumentException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/IllegalArgumentException.js"],"names":["IllegalArgumentException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,wB;;;;;AACJ,oCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,0BAAZ;AAF2B;AAG5B;;;iCAJoCC,K;;AAOvC,eAAeH,wBAAf","sourcesContent":["// @flow\n/**\n * IllegalArgumentException\n */\nclass IllegalArgumentException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalArgumentException\";\n }\n}\n\nexport default IllegalArgumentException;\n"],"file":"IllegalArgumentException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -26,7 +27,7 @@ var IllegalReturnException = /*#__PURE__*/function (_Error) {
|
|
|
26
27
|
return _this;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
return IllegalReturnException;
|
|
30
|
+
return _createClass(IllegalReturnException);
|
|
30
31
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
31
32
|
|
|
32
33
|
export default IllegalReturnException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/IllegalReturnException.js"],"names":["IllegalReturnException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/IllegalReturnException.js"],"names":["IllegalReturnException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;iCAJkCC,K;;AAOrC,eAAeH,sBAAf","sourcesContent":["// @flow\n/**\n */\nclass IllegalReturnException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalReturnException\";\n }\n}\n\nexport default IllegalReturnException;\n"],"file":"IllegalReturnException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var IllegalStateException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return IllegalStateException;
|
|
31
|
+
return _createClass(IllegalStateException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default IllegalStateException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/IllegalStateException.js"],"names":["IllegalStateException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/IllegalStateException.js"],"names":["IllegalStateException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,qB;;;;;AACJ,iCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,uBAAZ;AAF2B;AAG5B;;;iCAJiCC,K;;AAOpC,eAAeH,qBAAf","sourcesContent":["// @flow\n/**\n * IllegalStateException\n */\nclass IllegalStateException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalStateException\";\n }\n}\n\nexport default IllegalStateException;\n"],"file":"IllegalStateException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var JsonParseException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return JsonParseException;
|
|
31
|
+
return _createClass(JsonParseException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default JsonParseException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/JsonParseException.js"],"names":["JsonParseException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/JsonParseException.js"],"names":["JsonParseException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,kB;;;;;AACJ,8BAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,oBAAZ;AAF2B;AAG5B;;;iCAJ8BC,K;;AAOjC,eAAeH,kBAAf","sourcesContent":["// @flow\n/**\n * JsonParseException\n */\nclass JsonParseException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"JsonParseException\";\n }\n}\n\nexport default JsonParseException;\n"],"file":"JsonParseException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var MissingPropertyException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return MissingPropertyException;
|
|
31
|
+
return _createClass(MissingPropertyException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default MissingPropertyException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/MissingPropertyException.js"],"names":["MissingPropertyException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/MissingPropertyException.js"],"names":["MissingPropertyException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,wB;;;;;AACJ,oCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AAEA,UAAKC,IAAL,GAAY,0BAAZ;AAH2B;AAI5B;;;iCALoCC,K;;AAQvC,eAAeH,wBAAf","sourcesContent":["// @flow\n/**\n * MissingPropertyException\n */\nclass MissingPropertyException extends Error {\n constructor(message: string) {\n super(message);\n\n this.name = \"MissingPropertyException\";\n }\n}\n\nexport default MissingPropertyException;\n"],"file":"MissingPropertyException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/esm/assertThisInitialized";
|
|
4
5
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
@@ -39,7 +40,7 @@ var NetworkException = /*#__PURE__*/function (_Error) {
|
|
|
39
40
|
return _this;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
return NetworkException;
|
|
43
|
+
return _createClass(NetworkException);
|
|
43
44
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
44
45
|
|
|
45
46
|
export default NetworkException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/NetworkException.js"],"names":["NetworkException","url","method","name","id","status","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/NetworkException.js"],"names":["NetworkException","url","method","name","id","status","Error"],"mappings":";;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,gB;;;;;AAIJ,4BAAYC,GAAZ,EAAyBC,MAAzB,EAAyC;AAAA;;AAAA;;AAAA;;AACvC,yIACmED,GADnE,mCACsFC,MADtF;;AADuC;;AAAA;;AAKvC,UAAKC,IAAL,GAAY,kBAAZ;AACA,UAAKC,EAAL,GAAU,kBAAV;AACA,UAAKC,MAAL,GAAc,CAAd;AAPuC;AAQxC;;;iCAZ4BC,K;;AAe/B,eAAeN,gBAAf","sourcesContent":["// @flow\n/**\n * NetworkException\n */\nclass NetworkException extends Error {\n status: number;\n id: string;\n\n constructor(url: string, method: string) {\n super(\n `An unexpected network error occurred, cannot request resource ${url} with method ${method}`\n );\n\n this.name = \"NetworkException\";\n this.id = \"NetworkException\";\n this.status = 0;\n }\n}\n\nexport default NetworkException;\n"],"file":"NetworkException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var NotAllowedUriException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return NotAllowedUriException;
|
|
31
|
+
return _createClass(NotAllowedUriException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default NotAllowedUriException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/NotAllowedUriException.js"],"names":["NotAllowedUriException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/NotAllowedUriException.js"],"names":["NotAllowedUriException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;iCAJkCC,K;;AAOrC,eAAeH,sBAAf","sourcesContent":["// @flow\n/**\n * NotAllowedUriException\n */\nclass NotAllowedUriException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"NotAllowedUriException\";\n }\n}\n\nexport default NotAllowedUriException;\n"],"file":"NotAllowedUriException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/esm/assertThisInitialized";
|
|
4
5
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
@@ -44,7 +45,7 @@ var NotFoundException = /*#__PURE__*/function (_Error) {
|
|
|
44
45
|
return _this;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
return NotFoundException;
|
|
48
|
+
return _createClass(NotFoundException);
|
|
48
49
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
49
50
|
|
|
50
51
|
export default NotFoundException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/NotFoundException.js"],"names":["NotFoundException","url","method","isReload","name","id","status","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/NotFoundException.js"],"names":["NotFoundException","url","method","isReload","name","id","status","Error"],"mappings":";;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,iB;;;;;AAKJ,6BAAYC,GAAZ,EAAyBC,MAAzB,EAAoE;AAAA;;AAAA;;AAAA,QAA3BC,QAA2B,uEAAP,KAAO;;AAAA;;AAClE,oFAAkBF,GAAlB,mCAAqCC,MAArC;;AADkE;;AAAA;;AAAA;;AAGlE,UAAKE,IAAL,GAAY,mBAAZ;AACA,UAAKC,EAAL,GAAU,mBAAV;AACA,UAAKC,MAAL,GAAc,GAAd;AACA,UAAKH,QAAL,GAAgBA,QAAhB;AANkE;AAOnE;;;iCAZ6BI,K;;AAehC,eAAeP,iBAAf","sourcesContent":["// @flow\n/**\n * NotFoundException\n */\nclass NotFoundException extends Error {\n status: number;\n isReload: boolean;\n id: string;\n\n constructor(url: string, method: string, isReload: boolean = false) {\n super(`Resource ${url} with method ${method} not found`);\n\n this.name = \"NotFoundException\";\n this.id = \"NotFoundException\";\n this.status = 404;\n this.isReload = isReload;\n }\n}\n\nexport default NotFoundException;\n"],"file":"NotFoundException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var ServerRequestException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return ServerRequestException;
|
|
31
|
+
return _createClass(ServerRequestException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default ServerRequestException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/ServerRequestException.js"],"names":["ServerRequestException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/ServerRequestException.js"],"names":["ServerRequestException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;iCAJkCC,K;;AAOrC,eAAeH,sBAAf","sourcesContent":["// @flow\n/**\n * ServerRequestException\n */\nclass ServerRequestException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ServerRequestException\";\n }\n}\n\nexport default ServerRequestException;\n"],"file":"ServerRequestException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var ThemePropertyException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return ThemePropertyException;
|
|
31
|
+
return _createClass(ThemePropertyException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default ThemePropertyException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/ThemePropertyException.js"],"names":["ThemePropertyException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/ThemePropertyException.js"],"names":["ThemePropertyException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;iCAJkCC,K;;AAOrC,eAAeH,sBAAf","sourcesContent":["// @flow\n/**\n * ThemePropertyException\n */\nclass ThemePropertyException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ThemePropertyException\";\n }\n}\n\nexport default ThemePropertyException;\n"],"file":"ThemePropertyException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -30,7 +31,7 @@ var TimeoutException = /*#__PURE__*/function (_Error) {
|
|
|
30
31
|
return _this;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
return TimeoutException;
|
|
34
|
+
return _createClass(TimeoutException);
|
|
34
35
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
35
36
|
|
|
36
37
|
export default TimeoutException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/TimeoutException.js"],"names":["TimeoutException","url","method","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/TimeoutException.js"],"names":["TimeoutException","url","method","name","Error"],"mappings":";;;;;;;;;;;;;AACA;AACA;AACA;IACMA,gB;;;;;AACJ,4BAAYC,GAAZ,EAAyBC,MAAzB,EAAyC;AAAA;;AAAA;;AAAA;;AACvC,6GAA2CD,GAA3C,mCAA8DC,MAA9D;AAEA,UAAKC,IAAL,GAAY,kBAAZ;AAHuC;AAIxC;;;iCAL4BC,K;;AAQ/B,eAAeJ,gBAAf","sourcesContent":["// @flow\n/**\n * TimeoutException\n */\nclass TimeoutException extends Error {\n constructor(url: string, method: string) {\n super(`Timeout occurred in connection to ${url} with method ${method}.`);\n\n this.name = \"TimeoutException\";\n }\n}\n\nexport default TimeoutException;\n"],"file":"TimeoutException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/esm/assertThisInitialized";
|
|
4
5
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
@@ -42,7 +43,7 @@ var UnauthorizedException = /*#__PURE__*/function (_Error) {
|
|
|
42
43
|
return _this;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
return UnauthorizedException;
|
|
46
|
+
return _createClass(UnauthorizedException);
|
|
46
47
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
47
48
|
|
|
48
49
|
export default UnauthorizedException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/UnauthorizedException.js"],"names":["UnauthorizedException","url","method","errorResponse","name","id","status","response","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/UnauthorizedException.js"],"names":["UnauthorizedException","url","method","errorResponse","name","id","status","response","Error"],"mappings":";;;;;;;;;;;;;;;AAGA;AACA;AACA;IACMA,qB;;;;;AAKJ,iCACEC,GADF,EAEEC,MAFF,EAGEC,aAHF,EAIE;AAAA;;AAAA;;AAAA;;AACA,mGAAiCF,GAAjC,mCAAoDC,MAApD;;AADA;;AAAA;;AAAA;;AAGA,UAAKE,IAAL,GAAY,uBAAZ;AACA,UAAKC,EAAL,GAAU,uBAAV;AACA,UAAKC,MAAL,GAAc,GAAd;AACA,UAAKC,QAAL,GAAgBJ,aAAhB;AANA;AAOD;;;iCAhBiCK,K;;AAmBpC,eAAeR,qBAAf","sourcesContent":["// @flow\nimport type { ModularUIErrorResponse } from \"./FetchException\";\n\n/**\n * UnauthorizedException\n */\nclass UnauthorizedException extends Error {\n status: number;\n id: string;\n response: ?ModularUIErrorResponse;\n\n constructor(\n url: string,\n method: string,\n errorResponse: ?ModularUIErrorResponse\n ) {\n super(`Cannot request resource ${url} with method ${method}`);\n\n this.name = \"UnauthorizedException\";\n this.id = \"UnauthorizedException\";\n this.status = 401;\n this.response = errorResponse;\n }\n}\n\nexport default UnauthorizedException;\n"],"file":"UnauthorizedException.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
|
|
2
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
|
|
3
4
|
import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
|
|
4
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
|
|
@@ -27,7 +28,7 @@ var UnsupportedOperationException = /*#__PURE__*/function (_Error) {
|
|
|
27
28
|
return _this;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return UnsupportedOperationException;
|
|
31
|
+
return _createClass(UnsupportedOperationException);
|
|
31
32
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
33
|
|
|
33
34
|
export default UnsupportedOperationException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exceptions/UnsupportedOperationException.js"],"names":["UnsupportedOperationException","message","name","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/exceptions/UnsupportedOperationException.js"],"names":["UnsupportedOperationException","message","name","Error"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;IACMA,6B;;;;;AACJ,yCAAYC,OAAZ,EAA6B;AAAA;;AAAA;;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,+BAAZ;AAF2B;AAG5B;;;iCAJyCC,K;;AAO5C,eAAeH,6BAAf","sourcesContent":["// @flow\n/**\n * UnsupportedOperationException\n */\nclass UnsupportedOperationException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UnsupportedOperationException\";\n }\n}\n\nexport default UnsupportedOperationException;\n"],"file":"UnsupportedOperationException.js"}
|
package/esm/hooks/useContent.js
CHANGED
|
@@ -51,8 +51,8 @@ export var useContentFromSourceReferences = function useContentFromSourceReferen
|
|
|
51
51
|
|
|
52
52
|
start();
|
|
53
53
|
|
|
54
|
-
_Promise.all(requests).then(function (
|
|
55
|
-
setContent(
|
|
54
|
+
_Promise.all(requests).then(function (responseContent) {
|
|
55
|
+
setContent(responseContent);
|
|
56
56
|
finish();
|
|
57
57
|
}); // start and finish don't change
|
|
58
58
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useContent.js"],"names":["useState","useEffect","useSelector","SourceReferenceCollection","ModularUIRequest","useProgressIndicator","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","state","i18n","locale","start","finish","hrefs","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","requests","JSON","parse","modularuiRequest","fetchContent","all","then"],"mappings":";;;;;AACA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,OAApC;AACA,SAASC,WAAT,QAA4B,aAA5B;AAEA,OAAOC,yBAAP,MAAsC,8CAAtC;AACA,OAAOC,gBAAP,MAA6B,+BAA7B;AAEA,S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;;AACL,aAAQiB,GAAR,CAAYL,QAAZ,EAAsBM,IAAtB,CAA2B,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useContent.js"],"names":["useState","useEffect","useSelector","SourceReferenceCollection","ModularUIRequest","useProgressIndicator","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","state","i18n","locale","start","finish","hrefs","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","requests","JSON","parse","modularuiRequest","fetchContent","all","then","responseContent"],"mappings":";;;;;AACA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,OAApC;AACA,SAASC,WAAT,QAA4B,aAA5B;AAEA,OAAOC,yBAAP,MAAsC,8CAAtC;AACA,OAAOC,gBAAP,MAA6B,+BAA7B;AAEA,SAASC,oBAAT,QAAqC,+BAArC;;AAIA;AACA;AACA;AACA,OAAO,IAAMC,8BAA8B,GAAG,SAAjCA,8BAAiC,CAC5CC,gBAD4C,EAE5CC,mBAF4C,EAGpB;AAAA;;AACxB,kBAA8BR,QAAQ,CAAC,EAAD,CAAtC;AAAA;AAAA,MAAOS,OAAP;AAAA,MAAgBC,UAAhB;;AACA,MAAMC,UAAU,GAAGT,WAAW,CAAC,UAACU,KAAD;AAAA;;AAAA,iCAAWA,KAAK,CAACC,IAAN,CAAWC,MAAtB,mEAAgC,IAAhC;AAAA,GAAD,CAA9B;;AAEA,8BAA0BT,oBAAoB,EAA9C;AAAA,MAAQU,KAAR,yBAAQA,KAAR;AAAA,MAAeC,MAAf,yBAAeA,MAAf;;AAEA,MAAMC,KAAK,GAAG,yFAAAV,gBAAgB,MAAhB,CAAAA,gBAAgB,EACvB,UAACW,eAAD;AAAA,WAAqBA,eAAe,CAACC,IAAhB,CAAqBC,QAArB,CAA8BC,IAAnD;AAAA,GADuB,CAAhB,kBAEJ,UAACA,IAAD,EAAOC,KAAP,EAAcC,IAAd;AAAA,WAAuBA,IAAI,CAACC,OAAL,CAAaH,IAAb,MAAuBC,KAA9C;AAAA,GAFI,kBAGP,UAACD,IAAD;AAAA,WAAUA,IAAI,CAACI,QAAL,EAAV;AAAA,GAHO,CAAd;;AAKA,MAAMC,QAAQ,GAAG,gBAAeT,KAAf,CAAjB;;AACAhB,EAAAA,SAAS,CAAC,YAAM;AAAA;;AACd,QAAM0B,QAAQ,GAAG,iCAAAC,IAAI,CAACC,KAAL,CAAWH,QAAX,mBAAyB,UAACL,IAAD,EAAU;AAClD,UAAMS,gBAAgB,GAAG,IAAI1B,gBAAJ,CAAqBiB,IAArB,CAAzB;AACAS,MAAAA,gBAAgB,CAAChB,MAAjB,GAA0BH,UAA1B;AACA,aAAOmB,gBAAgB,CAACC,YAAjB,CAA8BvB,mBAA9B,CAAP;AACD,KAJgB,CAAjB;;AAMAO,IAAAA,KAAK;;AACL,aAAQiB,GAAR,CAAYL,QAAZ,EAAsBM,IAAtB,CAA2B,UAACC,eAAD,EAAqB;AAC9CxB,MAAAA,UAAU,CAACwB,eAAD,CAAV;AACAlB,MAAAA,MAAM;AACP,KAHD,EARc,CAad;AACA;;AACD,GAfQ,EAeN,CAACU,QAAD,EAAWf,UAAX,EAAuBH,mBAAvB,CAfM,CAAT;AAiBA,SAAOC,OAAP;AACD,CAjCM","sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\nimport { useSelector } from \"react-redux\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type ContentModel from \"../models/content/ContentModel\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean\n): Array<ContentModel> => {\n const [content, setContent] = useState([]);\n const localeCode = useSelector((state) => state.i18n.locale ?? \"en\");\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allHrefs, localeCode, renderChildSections]);\n\n return content;\n};\n"],"file":"useContent.js"}
|
|
@@ -6,7 +6,8 @@ import { dequal as deepEqual } from "dequal/lite";
|
|
|
6
6
|
* Need to copy this, because the dependency on dequal breaks in ie11
|
|
7
7
|
*/
|
|
8
8
|
var useDeepCompareMemoize = function useDeepCompareMemoize(value) {
|
|
9
|
-
var ref = React.useRef(null);
|
|
9
|
+
var ref = React.useRef(null); // NOSONAR
|
|
10
|
+
|
|
10
11
|
var signalRef = React.useRef(0);
|
|
11
12
|
|
|
12
13
|
if (!deepEqual(value, ref.current)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useDeepCompareEffect.js"],"names":["React","dequal","deepEqual","useDeepCompareMemoize","value","ref","useRef","signalRef","current","useDeepCompareEffect","callback","dependencies","useEffect"],"mappings":"AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAM,IAAIC,SAAnB,QAAoC,aAApC;;AAKA;AACA;AACA;AACA;AACA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA2B;AACvD,MAAMC,GAAG,GAAGL,KAAK,CAACM,MAAN,CAAoC,IAApC,CAAZ
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useDeepCompareEffect.js"],"names":["React","dequal","deepEqual","useDeepCompareMemoize","value","ref","useRef","signalRef","current","useDeepCompareEffect","callback","dependencies","useEffect"],"mappings":"AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAM,IAAIC,SAAnB,QAAoC,aAApC;;AAKA;AACA;AACA;AACA;AACA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA2B;AACvD,MAAMC,GAAG,GAAGL,KAAK,CAACM,MAAN,CAAoC,IAApC,CAAZ,CADuD,CACA;;AACvD,MAAMC,SAAS,GAAGP,KAAK,CAACM,MAAN,CAAqB,CAArB,CAAlB;;AAEA,MAAI,CAACJ,SAAS,CAACE,KAAD,EAAQC,GAAG,CAACG,OAAZ,CAAd,EAAoC;AAClCH,IAAAA,GAAG,CAACG,OAAJ,GAAcJ,KAAd;AACAG,IAAAA,SAAS,CAACC,OAAV,IAAqB,CAArB;AACD;;AAED,SAAO,CAACD,SAAS,CAACC,OAAX,CAAP;AACD,CAVD;AAYA;AACA;;;AACA,OAAO,SAASC,oBAAT,CACLC,QADK,EAELC,YAFK,EAGC;AACN;AACA,SAAOX,KAAK,CAACY,SAAN,CAAgBF,QAAhB,EAA0BP,qBAAqB,CAACQ,YAAD,CAA/C,CAAP;AACD;AAED,eAAeF,oBAAf","sourcesContent":["// @flow\nimport * as React from \"react\";\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = Array<mixed>;\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = React.useRef<DependencyList | null>(null); // NOSONAR\n const signalRef = React.useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\n/**\n */\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList\n): void {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\nexport default useDeepCompareEffect;\n"],"file":"useDeepCompareEffect.js"}
|
package/esm/hooks/useForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useForm.js"],"names":["useDispatch","Href","getSetting","HTTP_METHODS","loadModularUI","removeModelByKey","useModularUI","addRepeatableAttributeSet","cancelForm","cancelRepeatableAttributeSet","previousObject","removeRepeatableAttributeSet","showFormNotification","updateFormAttribute","FormModel","useForm","href","formHref","addParameter","form","method","POST","targetModel","removeOnUnmount","model","useFormNavigation","dispatch","previous","cancel","submit","connectKey","selfhref","data","formdata","updateModel","remove","showFormNotificationAction","useAttributeUpdate","object","attribute","value","options","useAttributeSet","save"],"mappings":"AACA,SAASA,WAAT,QAA4B,aAA5B;AAEA,OAAOC,IAAP,MAAiB,qBAAjB;AAEA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,cAAzC;AAEA,SAASC,aAAT,EAAwBC,gBAAxB,QAAgD,qBAAhD;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA,SACEC,yBADF,EAEEC,UAFF,EAGEC,4BAHF,EAIEC,cAJF,EAKEC,4BALF,EAMEC,oBANF,EAOEC,mBAPF,QAQO,kBARP;AAUA,OAAOC,SAAP,MAAsB,0BAAtB;;
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useForm.js"],"names":["useDispatch","Href","getSetting","HTTP_METHODS","loadModularUI","removeModelByKey","useModularUI","addRepeatableAttributeSet","cancelForm","cancelRepeatableAttributeSet","previousObject","removeRepeatableAttributeSet","showFormNotification","updateFormAttribute","FormModel","useForm","href","formHref","addParameter","form","method","POST","targetModel","removeOnUnmount","model","useFormNavigation","dispatch","previous","cancel","submit","connectKey","selfhref","data","formdata","updateModel","remove","showFormNotificationAction","useAttributeUpdate","object","attribute","value","options","useAttributeSet","save"],"mappings":"AACA,SAASA,WAAT,QAA4B,aAA5B;AAEA,OAAOC,IAAP,MAAiB,qBAAjB;AAEA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,cAAzC;AAEA,SAASC,aAAT,EAAwBC,gBAAxB,QAAgD,qBAA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BAAyB,CAACY,IAAD,CAA1B,CAAd;AAAA,KADD;AAELS,IAAAA,MAAM,EAAE,gBAACU,MAAD;AAAA,aACNZ,QAAQ,CAACjB,4BAA4B,CAACU,IAAD,EAAOmB,MAAP,CAA7B,CADF;AAAA,KAFH;AAILH,IAAAA,MAAM,EAAE,gBAACG,MAAD;AAAA,aACNZ,QAAQ,CAACf,4BAA4B,CAACQ,IAAD,EAAOmB,MAAP,CAA7B,CADF;AAAA;AAJH,GAAP;AAOD,CAVM","sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport Href from \"../models/href/Href\";\n\nimport { getSetting, HTTP_METHODS } from \"../constants\";\n\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui\";\nimport { useModularUI } from \"./useModularUI\";\n\nimport {\n addRepeatableAttributeSet,\n cancelForm,\n cancelRepeatableAttributeSet,\n previousObject,\n removeRepeatableAttributeSet,\n showFormNotification,\n updateFormAttribute,\n} from \"../redux/actions\";\n\nimport FormModel from \"../models/form/FormModel\";\n\nimport type { FormObjectModel, AttributeType } from \"../models\";\nimport type { UpdateFormOptions } from \"../redux/types\";\nimport type {\n RemoveModelByKeyAction,\n UpdateModelAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateModelAction,\n cancel: (form: FormModel) => void,\n submit: (form: FormModel) => void,\n showFormNotification: (form: FormModel) => void,\n remove: (form: FormModel) => RemoveModelByKeyAction,\n};\n\ntype AttributeSetHook = {\n save: () => UpdateModelAction,\n cancel: (object: FormObjectModel) => UpdateModelAction,\n remove: (object: FormObjectModel) => UpdateModelAction,\n};\n\ntype AttributeUpdateHook = (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n) => void;\n\n/**\n * Load a form by href\n */\nexport const useForm = (href: string | Href): ?FormModel => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n });\n\n if (form?.model) {\n return form.model;\n }\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = (): FormNavigationHook => {\n const dispatch = useDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n targetModel: FormModel,\n })\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Update attributes of a form\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n object: FormObjectModel\n): AttributeUpdateHook => {\n const dispatch = useDispatch();\n\n return (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => dispatch(updateFormAttribute(form, object, attribute, value, options));\n};\n\n/**\n * Attributeset actions\n */\nexport const useAttributeSet = (form: FormModel): AttributeSetHook => {\n const dispatch = useDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n"],"file":"useForm.js"}
|
package/esm/hooks/useModal.js
CHANGED
|
@@ -17,8 +17,8 @@ export var useModal = function useModal(modalId) {
|
|
|
17
17
|
var _context;
|
|
18
18
|
|
|
19
19
|
var modals = _ref.modals;
|
|
20
|
-
return _findInstanceProperty(_context = modals.modals).call(_context, function (
|
|
21
|
-
return
|
|
20
|
+
return _findInstanceProperty(_context = modals.modals).call(_context, function (m) {
|
|
21
|
+
return m.key === modalId;
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
var show = useCallback(function () {
|