@beinformed/ui 1.31.0 → 1.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js +8 -2
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/client.js +1 -0
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterActions.js.map +1 -1
- package/esm/redux/_router/RouterConnectors.js.map +1 -1
- package/esm/redux/_router/RouterReducer.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/__tests__/mergeLayoutHintConfigurations.spec.js.flow +4 -4
- package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/LayoutHints.js.flow +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.flow +2 -2
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/FetchException.js.flow +2 -2
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.flow +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.flow +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +9 -9
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useForm.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +7 -7
- package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +2 -2
- package/lib/hooks/__tests__/usePreference.spec.js.flow +1 -1
- package/lib/hooks/useAllFormsOnModel.js.flow +2 -2
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.flow +2 -2
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.flow +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.flow +4 -4
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.flow +3 -3
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.flow +2 -2
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.flow +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModularUI.js.flow +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.flow +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.flow +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.flow +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.flow +2 -2
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js +8 -2
- package/lib/hooks/usePreference.js.flow +17 -7
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/i18n/Locale.js.flow +4 -4
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.flow +8 -8
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.flow +2 -2
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/__tests__/Locale.spec.js.flow +3 -3
- package/lib/i18n/__tests__/Locales.spec.js.flow +15 -13
- package/lib/i18n/withMessage.js.flow +4 -4
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.flow +4 -4
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.flow +4 -4
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/actions/__tests__/ActionCollection.spec.js.flow +3 -3
- package/lib/models/actions/__tests__/ActionModel.spec.js.flow +1 -1
- package/lib/models/application/ApplicationModel.js.flow +3 -3
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.flow +7 -7
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.flow +9 -9
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.flow +9 -9
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.flow +24 -24
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.flow +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.flow +4 -4
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.flow +7 -7
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +15 -15
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +19 -11
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +10 -10
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.flow +7 -7
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.flow +6 -6
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.flow +9 -9
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.flow +8 -8
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.flow +3 -3
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.flow +5 -5
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +7 -7
- package/lib/models/attributes/__tests__/AttributeModel.spec.js.flow +5 -5
- package/lib/models/attributes/__tests__/AttributeSetModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/BooleanAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/ChoiceAttributeModel.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/DateAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/DatetimeAttributeModel.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/MemoAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/MoneyAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/NumberAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/PasswordAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/StringAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/TimeAttributeModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/TimestampModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/UploadAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/_createAttribute.spec.js.flow +6 -6
- package/lib/models/attributes/__tests__/createAttributeComposite.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/createAttributeDynamicSchema.spec.js.flow +3 -3
- package/lib/models/attributes/_createAttribute.js.flow +5 -5
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.flow +5 -5
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.flow +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.flow +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js.flow +5 -5
- package/lib/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js.flow +3 -3
- package/lib/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +15 -15
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js.flow +22 -22
- package/lib/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js.flow +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js.flow +4 -4
- package/lib/models/base/BaseCollection.js.flow +6 -6
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.flow +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js.flow +5 -5
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/base/__tests__/ResourceCollection.spec.js.flow +1 -1
- package/lib/models/caseview/CaseViewModel.js.flow +4 -4
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +3 -3
- package/lib/models/concepts/BusinessScenarioModel.js.flow +9 -9
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.flow +17 -17
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.flow +2 -2
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.flow +6 -4
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.flow +5 -5
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/concepts/__tests__/ConceptDetailModel.spec.js.flow +1 -1
- package/lib/models/content/ContentIndexModel.js.flow +3 -3
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.flow +11 -9
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.flow +2 -2
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.flow +4 -4
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.flow +4 -4
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.flow +2 -2
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/content/__tests__/ContentModel.spec.js.flow +16 -16
- package/lib/models/contentconfiguration/ContentConfiguration.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.flow +5 -5
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.flow +2 -2
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js.flow +12 -12
- package/lib/models/detail/DetailModel.js.flow +5 -5
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.flow +4 -4
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.flow +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/__tests__/ErrorModel.spec.js.flow +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.flow +3 -3
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.flow +3 -3
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.flow +5 -5
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/__tests__/AssignmentFilterModel.spec.js.flow +4 -4
- package/lib/models/filters/__tests__/FilterCollection.spec.js.flow +11 -11
- package/lib/models/filters/__tests__/FilterModel.spec.js.flow +1 -1
- package/lib/models/filters/__tests__/RangeFilterModel.spec.js.flow +1 -1
- package/lib/models/form/FormModel.js.flow +39 -39
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.flow +16 -16
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.instrument.spec.js.flow +7 -7
- package/lib/models/form/__tests__/FormModel.repeating.spec.js.flow +2 -2
- package/lib/models/form/__tests__/FormModel.selfhref.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormModel.spec.js.flow +6 -6
- package/lib/models/form/__tests__/FormResultData.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormWithContent.spec.js.flow +3 -3
- package/lib/models/grouping/GroupingModel.js.flow +7 -7
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/grouping/__tests__/GroupingModel.spec.js.flow +2 -2
- package/lib/models/href/Href.js.flow +6 -6
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/__tests__/Href.spec.js.flow +18 -16
- package/lib/models/layouthint/LayoutHintCollection.js.flow +3 -3
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.flow +4 -4
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.flow +3 -3
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/__tests__/LinkModel.spec.js.flow +4 -4
- package/lib/models/links/normalizeLinkJSON.js.flow +6 -6
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.flow +7 -7
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.flow +2 -2
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.flow +2 -2
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js.flow +6 -6
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +4 -4
- package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +3 -3
- package/lib/models/list/__tests__/ListResultDetail.spec.js.flow +3 -3
- package/lib/models/lookup/LookupOptionCollection.js.flow +1 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.flow +4 -4
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/lookup/__tests__/LookupOptionsModel.spec.js.flow +3 -3
- package/lib/models/modelcatalog/ModelCatalogModel.js.flow +2 -2
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.flow +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/paging/__tests__/PagingModel.spec.js.flow +2 -2
- package/lib/models/panels/GroupingPanelModel.js.flow +5 -5
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +8 -8
- package/lib/models/parameter/__tests__/Parameter.spec.js.flow +5 -5
- package/lib/models/process/ProcessStatusSettingsModel.js.flow +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +1 -1
- package/lib/models/resolveModel.js.flow +4 -4
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.flow +4 -4
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/sorting/__tests__/SortingModel.spec.js.flow +3 -3
- package/lib/models/tab/TabModel.js.flow +3 -3
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/tab/__tests__/TabModel.spec.js.flow +5 -5
- package/lib/models/taskgroup/TaskGroupModel.js.flow +2 -2
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.flow +1 -1
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.flow +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/__tests__/UserModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserProfileModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserServicesModel.spec.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.flow +26 -26
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/UploadRequest.js.flow +6 -6
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/modularui/__tests__/ModularUIError.spec.js.flow +1 -1
- package/lib/modularui/__tests__/ModularUIRequest.spec.js.flow +9 -9
- package/lib/react/utils.js.flow +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/client.js +1 -0
- package/lib/react-client/client.js.flow +11 -10
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.flow +2 -2
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/rehydrate.js.flow +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +2 -2
- package/lib/react-server/createSSRComplete.js.flow +3 -3
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.flow +4 -4
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.flow +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.flow +2 -2
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverUtil.js.flow +8 -8
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/__tests__/createTheme.spec.js.flow +4 -4
- package/lib/react-theme/createTheme.js.flow +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/utils/__tests__/background.spec.js.flow +2 -2
- package/lib/react-theme/utils/__tests__/contrast.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/corners.spec.js.flow +3 -3
- package/lib/react-theme/utils/__tests__/spacers.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/themeProps.spec.js.flow +9 -9
- package/lib/react-theme/utils/colors.js.flow +3 -3
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.flow +6 -6
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.flow +2 -2
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.flow +2 -2
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.flow +8 -8
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/I18nActions.js.flow +1 -1
- package/lib/redux/_i18n/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js.flow +2 -2
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/_modularui/ModularUIActions.js.flow +8 -8
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js.flow +4 -4
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.flow +6 -6
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js.flow +5 -5
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js.flow +11 -11
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.flow +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
- package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +13 -13
- package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +3 -3
- package/lib/redux/_modularui/types.js.flow +4 -4
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.flow +3 -3
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterActions.js.flow +3 -3
- package/lib/redux/_router/RouterActions.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js.flow +5 -5
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js.flow +1 -1
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/_router/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/actions/Application.js.flow +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.flow +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.flow +3 -3
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.flow +2 -2
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +3 -3
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.flow +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.flow +3 -3
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.flow +4 -4
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js.flow +11 -11
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.flow +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.flow +3 -3
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/__tests__/Authorization.spec.js.flow +2 -2
- package/lib/redux/actions/__tests__/Error-server.spec.js.flow +13 -13
- package/lib/redux/actions/__tests__/Error.spec.js.flow +6 -6
- package/lib/redux/actions/__tests__/Notification.spec.js.flow +1 -1
- package/lib/redux/actions/__tests__/Preferences.spec.js.flow +2 -2
- package/lib/redux/connectors/Application.js.flow +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.flow +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.flow +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.flow +2 -2
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.flow +5 -5
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.flow +6 -6
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.flow +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.flow +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.flow +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.flow +2 -2
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.flow +3 -3
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.flow +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.flow +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.flow +2 -2
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js.flow +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.flow +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.flow +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.flow +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.flow +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.flow +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.flow +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.flow +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/AuthReducer.spec.js.flow +10 -10
- package/lib/redux/reducers/__tests__/ErrorReducer.spec.js.flow +1 -1
- package/lib/redux/reducers/__tests__/ModalsReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/NotificationReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +2 -2
- package/lib/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js.flow +8 -8
- package/lib/redux/store/beforeRenderHooks.js.flow +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.flow +3 -3
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cookies.js.flow +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/browser/__tests__/Cookies.spec.js.flow +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.flow +15 -15
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/datetime/__tests__/DateTime.spec.js.flow +84 -81
- package/lib/utils/fetch/__tests__/xhr.spec.js.flow +2 -2
- package/lib/utils/fetch/universalFetch.js.flow +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.flow +6 -6
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/__tests__/sanitizeHTML.spec.js.flow +8 -8
- package/lib/utils/helpers/sanitizeHtml.js.flow +3 -3
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.flow +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.flow +2 -2
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/__tests__/formatValue.spec.js.flow +1 -1
- package/lib/utils/number/formatValue.js.flow +2 -2
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.flow +7 -7
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +20 -20
- package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +4 -4
- package/src/builder/mergeLayoutHintConfigurations.js +3 -3
- package/src/constants/LayoutHints.js +1 -1
- package/src/constants/Settings.js +2 -2
- package/src/exceptions/FetchException.js +2 -2
- package/src/exceptions/NetworkException.js +1 -1
- package/src/exceptions/UnauthorizedException.js +1 -1
- package/src/hooks/__tests__/UseModularUIModel.spec.js +9 -9
- package/src/hooks/__tests__/useAuthentication.spec.js +2 -2
- package/src/hooks/__tests__/useForm.spec.js +2 -2
- package/src/hooks/__tests__/useModelCatalog.spec.js +7 -7
- package/src/hooks/__tests__/useModularUIBasic.spec.js +2 -2
- package/src/hooks/__tests__/usePreference.spec.js +1 -1
- package/src/hooks/useAllFormsOnModel.js +2 -2
- package/src/hooks/useAuthentication.js +2 -2
- package/src/hooks/useContent.js +1 -1
- package/src/hooks/useDeepCompareEffect.js +1 -1
- package/src/hooks/useForm.js +4 -4
- package/src/hooks/useI18n.js +3 -3
- package/src/hooks/useModal.js +2 -2
- package/src/hooks/useModelCatalog.js +1 -1
- package/src/hooks/useModularUI.js +1 -1
- package/src/hooks/useModularUIBasic.js +1 -1
- package/src/hooks/useModularUIModel.js +1 -1
- package/src/hooks/useModularUIRequest.js +1 -1
- package/src/hooks/useNotification.js +2 -2
- package/src/hooks/usePreference.js +17 -7
- package/src/i18n/Locale.js +4 -4
- package/src/i18n/Locales.js +8 -8
- package/src/i18n/Message.js +2 -2
- package/src/i18n/__tests__/Locale.spec.js +3 -3
- package/src/i18n/__tests__/Locales.spec.js +15 -13
- package/src/i18n/withMessage.js +4 -4
- package/src/models/actions/ActionCollection.js +4 -4
- package/src/models/actions/ActionModel.js +4 -4
- package/src/models/actions/__tests__/ActionCollection.spec.js +3 -3
- package/src/models/actions/__tests__/ActionModel.spec.js +1 -1
- package/src/models/application/ApplicationModel.js +3 -3
- package/src/models/attributes/AttributeCollection.js +7 -7
- package/src/models/attributes/AttributeContent.js +9 -9
- package/src/models/attributes/AttributeDataHelper.js +9 -9
- package/src/models/attributes/AttributeModel.js +24 -24
- package/src/models/attributes/AttributeSetModel.js +1 -1
- package/src/models/attributes/BooleanAttributeModel.js +4 -4
- package/src/models/attributes/ChoiceAttributeModel.js +7 -7
- package/src/models/attributes/ChoiceAttributeOptionCollection.js +15 -15
- package/src/models/attributes/ChoiceAttributeOptionModel.js +19 -11
- package/src/models/attributes/CompositeAttributeChildCollection.js +10 -10
- package/src/models/attributes/CompositeAttributeModel.js +7 -7
- package/src/models/attributes/DatetimeAttributeModel.js +6 -6
- package/src/models/attributes/NumberAttributeModel.js +9 -9
- package/src/models/attributes/PasswordAttributeModel.js +8 -8
- package/src/models/attributes/StringAttributeModel.js +3 -3
- package/src/models/attributes/UploadAttributeModel.js +5 -5
- package/src/models/attributes/__tests__/AttributeCollection.spec.js +11 -11
- package/src/models/attributes/__tests__/AttributeContent.spec.js +7 -7
- package/src/models/attributes/__tests__/AttributeModel.spec.js +5 -5
- package/src/models/attributes/__tests__/AttributeSetModel.spec.js +2 -2
- package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/ChoiceAttributeModel.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js +1 -1
- package/src/models/attributes/__tests__/DateAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/DatetimeAttributeModel.spec.js +11 -11
- package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +3 -3
- package/src/models/attributes/__tests__/MemoAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/MoneyAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/NumberAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/PasswordAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/StringAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/TimeAttributeModel.spec.js +2 -2
- package/src/models/attributes/__tests__/TimestampModel.spec.js +2 -2
- package/src/models/attributes/__tests__/UploadAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/_createAttribute.spec.js +6 -6
- package/src/models/attributes/__tests__/createAttributeComposite.spec.js +3 -3
- package/src/models/attributes/__tests__/createAttributeDynamicSchema.spec.js +3 -3
- package/src/models/attributes/_createAttribute.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintCollection.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintModel.js +1 -1
- package/src/models/attributes/input-constraints/DateBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/MandatoryConstraint.js +1 -1
- package/src/models/attributes/input-constraints/NumberBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/NumberFormatConstraint.js +2 -2
- package/src/models/attributes/input-constraints/NumberGroupingConstraint.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js +5 -5
- package/src/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js +3 -3
- package/src/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js +4 -4
- package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +4 -4
- package/src/models/attributes/layouthint-rules/DependentAttribute.js +15 -15
- package/src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +2 -2
- package/src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +2 -2
- package/src/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js +22 -22
- package/src/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js +1 -1
- package/src/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js +4 -4
- package/src/models/base/BaseCollection.js +6 -6
- package/src/models/base/BaseModel.js +1 -1
- package/src/models/base/ResourceModel.js +5 -5
- package/src/models/base/__tests__/ResourceCollection.spec.js +1 -1
- package/src/models/caseview/CaseViewModel.js +4 -4
- package/src/models/caseview/__tests__/CaseViewModel.spec.js +3 -3
- package/src/models/concepts/BusinessScenarioModel.js +9 -9
- package/src/models/concepts/ConceptDetailModel.js +17 -17
- package/src/models/concepts/ConceptIndexModel.js +2 -2
- package/src/models/concepts/ConceptLinkModel.js +6 -4
- package/src/models/concepts/ConceptRelationCollection.js +5 -5
- package/src/models/concepts/SourceReferenceCollection.js +2 -2
- package/src/models/concepts/SourceReferenceModel.js +2 -2
- package/src/models/concepts/__tests__/ConceptDetailModel.spec.js +1 -1
- package/src/models/content/ContentIndexModel.js +3 -3
- package/src/models/content/ContentLinkModel.js +11 -9
- package/src/models/content/ContentModel.js +2 -2
- package/src/models/content/ContentTOCModel.js +4 -4
- package/src/models/content/SectionModel.js +4 -4
- package/src/models/content/SubSectionModel.js +2 -2
- package/src/models/content/__tests__/ContentModel.spec.js +16 -16
- package/src/models/contentconfiguration/ContentConfiguration.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationElements.js +5 -5
- package/src/models/contentconfiguration/ContentConfigurationEndResults.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationQuestions.js +2 -2
- package/src/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js +12 -12
- package/src/models/detail/DetailModel.js +5 -5
- package/src/models/error/ErrorCollection.js +4 -4
- package/src/models/error/ErrorModel.js +1 -1
- package/src/models/error/__tests__/ErrorModel.spec.js +1 -1
- package/src/models/filters/AssignmentFilterModel.js +3 -3
- package/src/models/filters/BaseFilterModel.js +3 -3
- package/src/models/filters/FilterCollection.js +5 -5
- package/src/models/filters/__tests__/AssignmentFilterModel.spec.js +4 -4
- package/src/models/filters/__tests__/FilterCollection.spec.js +11 -11
- package/src/models/filters/__tests__/FilterModel.spec.js +1 -1
- package/src/models/filters/__tests__/RangeFilterModel.spec.js +1 -1
- package/src/models/form/FormModel.js +39 -39
- package/src/models/form/FormObjectModel.js +16 -16
- package/src/models/form/__tests__/FormModel.instrument.spec.js +7 -7
- package/src/models/form/__tests__/FormModel.repeating.spec.js +2 -2
- package/src/models/form/__tests__/FormModel.selfhref.spec.js +1 -1
- package/src/models/form/__tests__/FormModel.spec.js +6 -6
- package/src/models/form/__tests__/FormResultData.spec.js +1 -1
- package/src/models/form/__tests__/FormWithContent.spec.js +3 -3
- package/src/models/grouping/GroupingModel.js +7 -7
- package/src/models/grouping/__tests__/GroupingModel.spec.js +2 -2
- package/src/models/href/Href.js +6 -6
- package/src/models/href/__tests__/Href.spec.js +18 -16
- package/src/models/layouthint/LayoutHintCollection.js +3 -3
- package/src/models/links/LinkCollection.js +4 -4
- package/src/models/links/LinkModel.js +3 -3
- package/src/models/links/__tests__/LinkModel.spec.js +4 -4
- package/src/models/links/normalizeLinkJSON.js +6 -6
- package/src/models/list/ListDetailModel.js +7 -7
- package/src/models/list/ListItemCollection.js +2 -2
- package/src/models/list/ListItemModel.js +2 -2
- package/src/models/list/ListModel.js +6 -6
- package/src/models/list/__tests__/ListDetailModel.spec.js +4 -4
- package/src/models/list/__tests__/ListItemCollection.spec.js +1 -1
- package/src/models/list/__tests__/ListModel.spec.js +3 -3
- package/src/models/list/__tests__/ListResultDetail.spec.js +3 -3
- package/src/models/lookup/LookupOptionCollection.js +1 -1
- package/src/models/lookup/LookupOptionsModel.js +4 -4
- package/src/models/lookup/__tests__/LookupOptionsModel.spec.js +3 -3
- package/src/models/modelcatalog/ModelCatalogModel.js +2 -2
- package/src/models/paging/PagingModel.js +1 -1
- package/src/models/paging/__tests__/PagingModel.spec.js +2 -2
- package/src/models/panels/GroupingPanelModel.js +5 -5
- package/src/models/panels/__tests__/GroupingPanelModel.spec.js +8 -8
- package/src/models/parameter/__tests__/Parameter.spec.js +5 -5
- package/src/models/process/ProcessStatusSettingsModel.js +1 -1
- package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +1 -1
- package/src/models/resolveModel.js +4 -4
- package/src/models/sorting/SortingModel.js +4 -4
- package/src/models/sorting/__tests__/SortingModel.spec.js +3 -3
- package/src/models/tab/TabModel.js +3 -3
- package/src/models/tab/__tests__/TabModel.spec.js +5 -5
- package/src/models/taskgroup/TaskGroupModel.js +2 -2
- package/src/models/types.js +1 -1
- package/src/models/user/UserProfileModel.js +1 -1
- package/src/models/user/__tests__/UserModel.spec.js +2 -2
- package/src/models/user/__tests__/UserProfileModel.spec.js +2 -2
- package/src/models/user/__tests__/UserServicesModel.spec.js +1 -1
- package/src/modularui/CaptchaRequest.js +1 -1
- package/src/modularui/ModularUIRequest.js +26 -26
- package/src/modularui/UploadRequest.js +6 -6
- package/src/modularui/__tests__/ModularUIError.spec.js +1 -1
- package/src/modularui/__tests__/ModularUIRequest.spec.js +9 -9
- package/src/react/utils.js +1 -1
- package/src/react-client/client.js +11 -10
- package/src/react-client/contextPath.js +2 -2
- package/src/react-client/rehydrate.js +1 -1
- package/src/react-server/__tests__/serverUtil.spec.js +2 -2
- package/src/react-server/createSSRComplete.js +3 -3
- package/src/react-server/renderSSRComplete.js +4 -4
- package/src/react-server/renderSSRMinimal.js +1 -1
- package/src/react-server/requestInformation.js +2 -2
- package/src/react-server/serverUtil.js +8 -8
- package/src/react-theme/__tests__/createTheme.spec.js +4 -4
- package/src/react-theme/createTheme.js +1 -1
- package/src/react-theme/utils/__tests__/background.spec.js +2 -2
- package/src/react-theme/utils/__tests__/contrast.spec.js +1 -1
- package/src/react-theme/utils/__tests__/corners.spec.js +3 -3
- package/src/react-theme/utils/__tests__/spacers.spec.js +1 -1
- package/src/react-theme/utils/__tests__/themeProps.spec.js +9 -9
- package/src/react-theme/utils/colors.js +3 -3
- package/src/react-theme/utils/contrast.js +6 -6
- package/src/react-theme/utils/corners.js +2 -2
- package/src/react-theme/utils/spacers.js +2 -2
- package/src/react-theme/utils/themeProps.js +8 -8
- package/src/redux/_i18n/I18nActions.js +1 -1
- package/src/redux/_i18n/I18nReducer.js +2 -2
- package/src/redux/_i18n/__tests__/reducer.spec.js +2 -2
- package/src/redux/_modularui/ModularUIActions.js +8 -8
- package/src/redux/_modularui/ModularUIConnector.js +4 -4
- package/src/redux/_modularui/ModularUIMiddleware.js +6 -6
- package/src/redux/_modularui/ModularUIReducer.js +5 -5
- package/src/redux/_modularui/ModularUISelectors.js +11 -11
- package/src/redux/_modularui/ModularUIUtils.js +1 -1
- package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
- package/src/redux/_modularui/__tests__/reducer.spec.js +13 -13
- package/src/redux/_modularui/__tests__/selectors.spec.js +3 -3
- package/src/redux/_modularui/types.js +4 -4
- package/src/redux/_modularui/withModularUI.js +3 -3
- package/src/redux/_router/RouterActions.js +3 -3
- package/src/redux/_router/RouterConnectors.js +5 -5
- package/src/redux/_router/RouterReducer.js +1 -1
- package/src/redux/_router/__tests__/reducer.spec.js +2 -2
- package/src/redux/actions/Application.js +1 -1
- package/src/redux/actions/Authorization.js +1 -1
- package/src/redux/actions/Error.js +3 -3
- package/src/redux/actions/FormAttributeSet.js +2 -2
- package/src/redux/actions/FormAttributeSetRepeatable.js +3 -3
- package/src/redux/actions/FormAutosave.js +1 -1
- package/src/redux/actions/FormAutosubmit.js +1 -1
- package/src/redux/actions/FormValidations.js +3 -3
- package/src/redux/actions/Notification.js +4 -4
- package/src/redux/actions/Preferences.js +11 -11
- package/src/redux/actions/ProgressIndicator.js +1 -1
- package/src/redux/actions/SignIn.js +3 -3
- package/src/redux/actions/__tests__/Authorization.spec.js +2 -2
- package/src/redux/actions/__tests__/Error-server.spec.js +13 -13
- package/src/redux/actions/__tests__/Error.spec.js +6 -6
- package/src/redux/actions/__tests__/Notification.spec.js +1 -1
- package/src/redux/actions/__tests__/Preferences.spec.js +2 -2
- package/src/redux/connectors/Application.js +1 -1
- package/src/redux/connectors/Breadcrumb.js +1 -1
- package/src/redux/connectors/CaseView.js +1 -1
- package/src/redux/connectors/ConceptDetail.js +1 -1
- package/src/redux/connectors/ContentBrowser.js +1 -1
- package/src/redux/connectors/ContentDetail.js +1 -1
- package/src/redux/connectors/ContentDetailSection.js +2 -2
- package/src/redux/connectors/Form.js +5 -5
- package/src/redux/connectors/FormAttributeSet.js +6 -6
- package/src/redux/connectors/ListDetail.js +1 -1
- package/src/redux/connectors/Modal.js +1 -1
- package/src/redux/connectors/ModelCatalog.js +1 -1
- package/src/redux/connectors/Notification.js +1 -1
- package/src/redux/connectors/PanelRenderer.js +2 -2
- package/src/redux/connectors/Preferences.js +3 -3
- package/src/redux/connectors/Progress.js +1 -1
- package/src/redux/connectors/ProgressIndicator.js +1 -1
- package/src/redux/connectors/QuickSearch.js +2 -2
- package/src/redux/connectors/SignIn.js +1 -1
- package/src/redux/connectors/SignOut.js +1 -1
- package/src/redux/connectors/Tab.js +1 -1
- package/src/redux/reducers/AuthReducer.js +1 -1
- package/src/redux/reducers/ErrorReducer.js +1 -1
- package/src/redux/reducers/ModalsReducer.js +1 -1
- package/src/redux/reducers/NotificationReducer.js +1 -1
- package/src/redux/reducers/PreferencesReducer.js +1 -1
- package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
- package/src/redux/reducers/__tests__/AuthReducer.spec.js +10 -10
- package/src/redux/reducers/__tests__/ErrorReducer.spec.js +1 -1
- package/src/redux/reducers/__tests__/ModalsReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/NotificationReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +2 -2
- package/src/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js +8 -8
- package/src/redux/store/beforeRenderHooks.js +1 -1
- package/src/redux/store/configureStore.js +3 -3
- package/src/utils/browser/Cookies.js +1 -1
- package/src/utils/browser/__tests__/Cookies.spec.js +1 -1
- package/src/utils/datetime/DateTimeUtil.js +15 -15
- package/src/utils/datetime/__tests__/DateTime.spec.js +84 -81
- package/src/utils/fetch/__tests__/xhr.spec.js +2 -2
- package/src/utils/fetch/universalFetch.js +1 -1
- package/src/utils/fetch/xhr.js +6 -6
- package/src/utils/helpers/__tests__/sanitizeHTML.spec.js +8 -8
- package/src/utils/helpers/sanitizeHtml.js +3 -3
- package/src/utils/helpers/text.js +1 -1
- package/src/utils/number/DecimalFormat.js +2 -2
- package/src/utils/number/__tests__/formatValue.spec.js +1 -1
- package/src/utils/number/formatValue.js +2 -2
- package/src/utils/number/parseNumbers.js +7 -7
|
@@ -32,7 +32,7 @@ describe("regexConstraint", () => {
|
|
|
32
32
|
defaultMessage: "Must be a valid e-mail address",
|
|
33
33
|
regex: new RegExp(
|
|
34
34
|
'^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$',
|
|
35
|
-
"gi"
|
|
35
|
+
"gi",
|
|
36
36
|
),
|
|
37
37
|
});
|
|
38
38
|
|
package/lib/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js.flow
CHANGED
|
@@ -11,7 +11,7 @@ describe("stringLengthConstraint", () => {
|
|
|
11
11
|
expect(constraint.validate("abcde")).toBeTruthy();
|
|
12
12
|
expect(constraint.validate("abcdef")).toBeTruthy();
|
|
13
13
|
expect(constraint.defaultMessage).toBe(
|
|
14
|
-
"The length of the value must be larger than ${min-length}"
|
|
14
|
+
"The length of the value must be larger than ${min-length}",
|
|
15
15
|
);
|
|
16
16
|
expect(constraint.parameters).toStrictEqual({ "min-length": 5 });
|
|
17
17
|
|
|
@@ -36,7 +36,7 @@ describe("stringLengthConstraint", () => {
|
|
|
36
36
|
expect(constraint.validate("abcde")).toBeTruthy();
|
|
37
37
|
expect(constraint.validate("abcdef")).toBeFalsy();
|
|
38
38
|
expect(constraint.defaultMessage).toBe(
|
|
39
|
-
"The length of the value must be smaller than ${max-length}"
|
|
39
|
+
"The length of the value must be smaller than ${max-length}",
|
|
40
40
|
);
|
|
41
41
|
expect(constraint.parameters).toStrictEqual({ "max-length": 5 });
|
|
42
42
|
|
|
@@ -59,7 +59,7 @@ describe("stringLengthConstraint", () => {
|
|
|
59
59
|
expect(constraint.validate("abcde")).toBeTruthy();
|
|
60
60
|
expect(constraint.validate("abcdef")).toBeFalsy();
|
|
61
61
|
expect(constraint.defaultMessage).toBe(
|
|
62
|
-
"Length must be precisely ${length} characters"
|
|
62
|
+
"Length must be precisely ${length} characters",
|
|
63
63
|
);
|
|
64
64
|
expect(constraint.parameters).toStrictEqual({
|
|
65
65
|
length: 5,
|
|
@@ -84,7 +84,7 @@ describe("stringLengthConstraint", () => {
|
|
|
84
84
|
expect(constraint.validate("abcde")).toBeTruthy();
|
|
85
85
|
expect(constraint.validate("abcdefg")).toBeFalsy();
|
|
86
86
|
expect(constraint.defaultMessage).toBe(
|
|
87
|
-
"Length must be between ${min-length} and ${max-length} characters"
|
|
87
|
+
"Length must be between ${min-length} and ${max-length} characters",
|
|
88
88
|
);
|
|
89
89
|
expect(constraint.parameters).toStrictEqual({
|
|
90
90
|
"min-length": 4,
|
|
@@ -33,7 +33,7 @@ class BaseLayoutHintRule implements ILayoutHintRule {
|
|
|
33
33
|
*/
|
|
34
34
|
static isApplicableForHint(hint: string): boolean {
|
|
35
35
|
throw new IllegalStateException(
|
|
36
|
-
`Missing isApplicableForHint implementation on layout hint rule
|
|
36
|
+
`Missing isApplicableForHint implementation on layout hint rule`,
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ class BaseLayoutHintRule implements ILayoutHintRule {
|
|
|
43
43
|
*/
|
|
44
44
|
static initAttribute(attribute: AttributeType): ILayoutHintRule {
|
|
45
45
|
throw new IllegalStateException(
|
|
46
|
-
`Missing initAttribute implementation on layout hint rule
|
|
46
|
+
`Missing initAttribute implementation on layout hint rule`,
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -55,7 +55,7 @@ class BaseLayoutHintRule implements ILayoutHintRule {
|
|
|
55
55
|
*/
|
|
56
56
|
static initHint(hint: string): ILayoutHintRule {
|
|
57
57
|
throw new IllegalStateException(
|
|
58
|
-
`Missing initHint implementation on layout hint rule
|
|
58
|
+
`Missing initHint implementation on layout hint rule`,
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -66,7 +66,7 @@ class BaseLayoutHintRule implements ILayoutHintRule {
|
|
|
66
66
|
*/
|
|
67
67
|
process(attribute: AttributeModel, attributes: AttributeCollection): void {
|
|
68
68
|
throw new IllegalStateException(
|
|
69
|
-
`Missing process implementation on layout hint rule
|
|
69
|
+
`Missing process implementation on layout hint rule`,
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLayoutHintRule.js","names":["_exceptions","require","BaseLayoutHintRule","isApplicableForAttribute","attribute","isApplicableForHint","hint","IllegalStateException","initAttribute","initHint","process","attributes","_defineProperty2","default","_default","exports"],"sources":["../../../../src/models/attributes/layouthint-rules/BaseLayoutHintRule.js"],"sourcesContent":["// @flow\n/* eslint-disable no-unused-vars */\n\nimport { IllegalStateException } from \"../../../exceptions\";\n\nimport type { ILayoutHintRule, AttributeType } from \"../../types\";\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Abstract class for layout hint rules\n * @abstract\n */\nclass BaseLayoutHintRule implements ILayoutHintRule {\n /**\n * Indicates if the rule implements the isApplicableForHint method\n * @type {boolean}\n * @default false\n */\n static checkHintApplicability: boolean = false;\n\n /**\n * Indicates if the rule instance is applicable for a specific attribute<br>\n */\n static isApplicableForAttribute(attribute: AttributeType): boolean {\n return true;\n }\n\n /**\n * Indicates if the rule instance is applicable for a specific hint<br>\n * Is required when checkHintApplicability is true\n * @abstract\n */\n static isApplicableForHint(hint: string): boolean {\n throw new IllegalStateException(\n `Missing isApplicableForHint implementation on layout hint rule
|
|
1
|
+
{"version":3,"file":"BaseLayoutHintRule.js","names":["_exceptions","require","BaseLayoutHintRule","isApplicableForAttribute","attribute","isApplicableForHint","hint","IllegalStateException","initAttribute","initHint","process","attributes","_defineProperty2","default","_default","exports"],"sources":["../../../../src/models/attributes/layouthint-rules/BaseLayoutHintRule.js"],"sourcesContent":["// @flow\n/* eslint-disable no-unused-vars */\n\nimport { IllegalStateException } from \"../../../exceptions\";\n\nimport type { ILayoutHintRule, AttributeType } from \"../../types\";\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Abstract class for layout hint rules\n * @abstract\n */\nclass BaseLayoutHintRule implements ILayoutHintRule {\n /**\n * Indicates if the rule implements the isApplicableForHint method\n * @type {boolean}\n * @default false\n */\n static checkHintApplicability: boolean = false;\n\n /**\n * Indicates if the rule instance is applicable for a specific attribute<br>\n */\n static isApplicableForAttribute(attribute: AttributeType): boolean {\n return true;\n }\n\n /**\n * Indicates if the rule instance is applicable for a specific hint<br>\n * Is required when checkHintApplicability is true\n * @abstract\n */\n static isApplicableForHint(hint: string): boolean {\n throw new IllegalStateException(\n `Missing isApplicableForHint implementation on layout hint rule`,\n );\n }\n\n /**\n * Initialize the rule when isApplicableForAttribute is true and checkHintApplicability is false\n * @abstract\n */\n static initAttribute(attribute: AttributeType): ILayoutHintRule {\n throw new IllegalStateException(\n `Missing initAttribute implementation on layout hint rule`,\n );\n }\n\n /**\n * Initialize the rule when isApplicableForAttribute and isApplicableForHint are both true,\n * it receives the hint. Allows a rule to be instantiated multiple times for an attribute,\n * but once for each hint entry\n * @abstract\n */\n static initHint(hint: string): ILayoutHintRule {\n throw new IllegalStateException(\n `Missing initHint implementation on layout hint rule`,\n );\n }\n\n /**\n * Abstract method, implements process of layout hint rule,\n * use this to enhance the applicable attribute or the attribute collection\n * @abstract\n */\n process(attribute: AttributeModel, attributes: AttributeCollection): void {\n throw new IllegalStateException(\n `Missing process implementation on layout hint rule`,\n );\n }\n}\n\nexport default BaseLayoutHintRule;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAFA;AAQA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAA4B;EAQlD;AACF;AACA;EACE,OAAOC,wBAAwBA,CAACC,SAAwB,EAAW;IACjE,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOC,mBAAmBA,CAACC,IAAY,EAAW;IAChD,MAAM,IAAIC,iCAAqB,CAC5B,gEACH,CAAC;EACH;;EAEA;AACF;AACA;AACA;EACE,OAAOC,aAAaA,CAACJ,SAAwB,EAAmB;IAC9D,MAAM,IAAIG,iCAAqB,CAC5B,0DACH,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOE,QAAQA,CAACH,IAAY,EAAmB;IAC7C,MAAM,IAAIC,iCAAqB,CAC5B,qDACH,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;EACEG,OAAOA,CAACN,SAAyB,EAAEO,UAA+B,EAAQ;IACxE,MAAM,IAAIJ,iCAAqB,CAC5B,oDACH,CAAC;EACH;AACF;AAzDE;AACF;AACA;AACA;AACA;AAJE,IAAAK,gBAAA,CAAAC,OAAA,EADIX,kBAAkB,4BAMmB,KAAK;AAAA,IAAAY,QAAA,GAsDjCZ,kBAAkB;AAAAa,OAAA,CAAAF,OAAA,GAAAC,QAAA"}
|
|
@@ -42,7 +42,7 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
42
42
|
static isApplicableForHint(hint: string): boolean {
|
|
43
43
|
const regex = new RegExp(
|
|
44
44
|
`^${DEPENDENT_ATTRIBUTE}\\s?(${SHOW}|${HIDE})`,
|
|
45
|
-
"i"
|
|
45
|
+
"i",
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
return regex.test(hint);
|
|
@@ -63,11 +63,11 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
63
63
|
const OPERATORS = `${EQUALS}|${INCLUDES}|${NOT_EQUALS}|${NOT_INCLUDES}|${NOT_IS_EMPTY}|${IS_EMPTY}`;
|
|
64
64
|
const regex = new RegExp(
|
|
65
65
|
`${DEPENDENT_ATTRIBUTE}\\s?(\\S*)\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\s?(.*?)\\s*(${OPERATORS})\\s(.*)`,
|
|
66
|
-
"i"
|
|
66
|
+
"i",
|
|
67
67
|
);
|
|
68
68
|
const isEmpyNotIsEmptRegex = new RegExp(
|
|
69
69
|
`${DEPENDENT_ATTRIBUTE}\\s?(\\S*)\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\s?(.*?)\\s*(${OPERATORS})`,
|
|
70
|
-
"i"
|
|
70
|
+
"i",
|
|
71
71
|
);
|
|
72
72
|
|
|
73
73
|
const result = hint.match(regex)
|
|
@@ -81,7 +81,7 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
81
81
|
rule.options = !result[4] ? "" : result[4];
|
|
82
82
|
} else {
|
|
83
83
|
throw new ConfigurationException(
|
|
84
|
-
`No dependent information found on layout hint: ${hint}
|
|
84
|
+
`No dependent information found on layout hint: ${hint}`,
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -139,42 +139,42 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
139
139
|
/**
|
|
140
140
|
*/
|
|
141
141
|
processEqualsOptions(
|
|
142
|
-
controlAttribute: ChoiceAttributeModel | BooleanAttributeModel
|
|
142
|
+
controlAttribute: ChoiceAttributeModel | BooleanAttributeModel,
|
|
143
143
|
): boolean {
|
|
144
144
|
if (
|
|
145
145
|
controlAttribute instanceof ChoiceAttributeModel ||
|
|
146
146
|
controlAttribute instanceof BooleanAttributeModel
|
|
147
147
|
) {
|
|
148
148
|
return this.options.every((option) =>
|
|
149
|
-
controlAttribute.selected.includes(option)
|
|
149
|
+
controlAttribute.selected.includes(option),
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
throw new ConfigurationException(
|
|
154
|
-
"Dependent control in combination with equals operator must be a choice, string or number attribute"
|
|
154
|
+
"Dependent control in combination with equals operator must be a choice, string or number attribute",
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
*/
|
|
160
160
|
processIncludesOptions(
|
|
161
|
-
controlAttribute: ChoiceAttributeModel | BooleanAttributeModel
|
|
161
|
+
controlAttribute: ChoiceAttributeModel | BooleanAttributeModel,
|
|
162
162
|
): boolean {
|
|
163
163
|
if (controlAttribute instanceof ChoiceAttributeModel) {
|
|
164
164
|
return this.options.some((option) =>
|
|
165
|
-
controlAttribute.selected.includes(option)
|
|
165
|
+
controlAttribute.selected.includes(option),
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
throw new ConfigurationException(
|
|
170
|
-
"Dependent control in combination with includes operator must be a choice attribute"
|
|
170
|
+
"Dependent control in combination with includes operator must be a choice attribute",
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
175
|
*/
|
|
176
176
|
handleOperator(
|
|
177
|
-
controlAttribute: ChoiceAttributeModel | BooleanAttributeModel
|
|
177
|
+
controlAttribute: ChoiceAttributeModel | BooleanAttributeModel,
|
|
178
178
|
): boolean {
|
|
179
179
|
switch (this.operator) {
|
|
180
180
|
case EQUALS:
|
|
@@ -191,7 +191,7 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
191
191
|
return controlAttribute?.selected.length === 0;
|
|
192
192
|
default:
|
|
193
193
|
throw new ConfigurationException(
|
|
194
|
-
`Unsupported operator for dependent question: ${this.operator}
|
|
194
|
+
`Unsupported operator for dependent question: ${this.operator}`,
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
@@ -199,11 +199,11 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
199
199
|
/**
|
|
200
200
|
*/
|
|
201
201
|
getControlAttribute(
|
|
202
|
-
attributes: AttributeCollection
|
|
202
|
+
attributes: AttributeCollection,
|
|
203
203
|
): ChoiceAttributeModel | BooleanAttributeModel | null {
|
|
204
204
|
const attribute = attributes.getAttributeByLayoutHint(
|
|
205
205
|
`${DEPENDENT_ATTRIBUTE_CONTROL}:${this.control}`,
|
|
206
|
-
`${DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}
|
|
206
|
+
`${DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}`,
|
|
207
207
|
);
|
|
208
208
|
|
|
209
209
|
if (
|
|
@@ -237,7 +237,7 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
237
237
|
attribute.isHidden = result;
|
|
238
238
|
} else {
|
|
239
239
|
throw new ConfigurationException(
|
|
240
|
-
`Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}
|
|
240
|
+
`Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}`,
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependentAttribute.js","names":["_BaseLayoutHintRule","_interopRequireDefault","require","_constants","_ChoiceAttributeModel","_BooleanAttributeModel","_exceptions","EQUALS","INCLUDES","NOT_EQUALS","NOT_INCLUDES","NOT_IS_EMPTY","IS_EMPTY","SHOW","HIDE","DependentAttribute","BaseLayoutHintRule","constructor","arguments","_defineProperty2","default","isApplicableForHint","hint","regex","RegExp","DEPENDENT_ATTRIBUTE","test","getRuleInstance","initHint","rule","OPERATORS","DEPENDENT_ATTRIBUTE_CONTROL","isEmpyNotIsEmptRegex","result","match","action","control","operator","options","ConfigurationException","_action","_control","_operator","_options","_context","_map","split","call","option","_trim","processEqualsOptions","controlAttribute","ChoiceAttributeModel","BooleanAttributeModel","every","_context2","_includes","selected","processIncludesOptions","some","_context3","handleOperator","length","getControlAttribute","attributes","attribute","getAttributeByLayoutHint","process","processLayoutHintRules","isHidden","hide","label","_default","exports"],"sources":["../../../../src/models/attributes/layouthint-rules/DependentAttribute.js"],"sourcesContent":["// @flow\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport {\n DEPENDENT_ATTRIBUTE_CONTROL,\n DEPENDENT_ATTRIBUTE,\n} from \"../../../constants\";\n\nimport ChoiceAttributeModel from \"../ChoiceAttributeModel\";\nimport BooleanAttributeModel from \"../BooleanAttributeModel\";\n\nimport { ConfigurationException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\nconst EQUALS = \"equals\";\nconst INCLUDES = \"includes\";\nconst NOT_EQUALS = \"notEquals\";\nconst NOT_INCLUDES = \"notIncludes\";\nconst NOT_IS_EMPTY = \"notIsEmpty\";\nconst IS_EMPTY = \"isEmpty\";\n\nconst SHOW = \"show\";\nconst HIDE = \"hide\";\n\n/**\n * Depending attributes hint logic\n */\nclass DependentAttribute extends BaseLayoutHintRule {\n _action: string;\n _control: string;\n _operator: string;\n _options: Array<string>;\n\n /**\n */\n static checkHintApplicability: boolean = true;\n\n /**\n */\n static isApplicableForHint(hint: string): boolean {\n const regex = new RegExp(\n `^${DEPENDENT_ATTRIBUTE}\\\\s?(${SHOW}|${HIDE})`,\n \"i\"\n );\n\n return regex.test(hint);\n }\n\n /**\n * Used on initHint to create an instance of this rule\n */\n static getRuleInstance(): DependentAttribute {\n return new DependentAttribute();\n }\n\n /**\n */\n static initHint(hint: string): any {\n const rule = this.getRuleInstance();\n\n const OPERATORS = `${EQUALS}|${INCLUDES}|${NOT_EQUALS}|${NOT_INCLUDES}|${NOT_IS_EMPTY}|${IS_EMPTY}`;\n const regex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})\\\\s(.*)`,\n \"i\"\n );\n const isEmpyNotIsEmptRegex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})`,\n \"i\"\n );\n\n const result = hint.match(regex)\n ? hint.match(regex)\n : hint.match(isEmpyNotIsEmptRegex);\n\n if (result) {\n rule.action = result[1];\n rule.control = result[2];\n rule.operator = result[3];\n rule.options = !result[4] ? \"\" : result[4];\n } else {\n throw new ConfigurationException(\n `No dependent information found on layout hint: ${hint}`\n );\n }\n\n return rule;\n }\n\n /**\n */\n get action(): string {\n return this._action;\n }\n\n /**\n */\n set action(action: string) {\n this._action = action;\n }\n\n /**\n */\n get control(): string {\n return this._control;\n }\n\n /**\n */\n set control(control: string) {\n this._control = control;\n }\n\n /**\n */\n get operator(): string {\n return this._operator;\n }\n\n /**\n */\n set operator(operator: string) {\n this._operator = operator;\n }\n\n /**\n */\n get options(): Array<string> {\n return this._options;\n }\n\n /**\n */\n set options(options: string): void {\n this._options = options.split(\"|\").map((option) => option.trim());\n }\n\n /**\n */\n processEqualsOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n if (\n controlAttribute instanceof ChoiceAttributeModel ||\n controlAttribute instanceof BooleanAttributeModel\n ) {\n return this.options.every((option) =>\n controlAttribute.selected.includes(option)\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with equals operator must be a choice, string or number attribute\"\n );\n }\n\n /**\n */\n processIncludesOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n if (controlAttribute instanceof ChoiceAttributeModel) {\n return this.options.some((option) =>\n controlAttribute.selected.includes(option)\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with includes operator must be a choice attribute\"\n );\n }\n\n /**\n */\n handleOperator(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n switch (this.operator) {\n case EQUALS:\n return this.processEqualsOptions(controlAttribute);\n case INCLUDES:\n return this.processIncludesOptions(controlAttribute);\n case NOT_EQUALS:\n return !this.processEqualsOptions(controlAttribute);\n case NOT_INCLUDES:\n return !this.processIncludesOptions(controlAttribute);\n case NOT_IS_EMPTY:\n return controlAttribute?.selected.length !== 0;\n case IS_EMPTY:\n return controlAttribute?.selected.length === 0;\n default:\n throw new ConfigurationException(\n `Unsupported operator for dependent question: ${this.operator}`\n );\n }\n }\n\n /**\n */\n getControlAttribute(\n attributes: AttributeCollection\n ): ChoiceAttributeModel | BooleanAttributeModel | null {\n const attribute = attributes.getAttributeByLayoutHint(\n `${DEPENDENT_ATTRIBUTE_CONTROL}:${this.control}`,\n `${DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}`\n );\n\n if (\n attribute instanceof ChoiceAttributeModel ||\n attribute instanceof BooleanAttributeModel\n ) {\n return attribute;\n }\n\n return null;\n }\n\n /**\n */\n process(attribute: AttributeModel, attributes: AttributeCollection): void {\n const controlAttribute = this.getControlAttribute(attributes);\n if (!controlAttribute) {\n return;\n }\n\n controlAttribute.processLayoutHintRules(attributes);\n if (controlAttribute.isHidden) {\n attribute.hide();\n return;\n }\n\n const result = this.handleOperator(controlAttribute);\n if (this.action === SHOW) {\n attribute.isHidden = !result;\n } else if (this.action === HIDE) {\n attribute.isHidden = result;\n } else {\n throw new ConfigurationException(\n `Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}`\n );\n }\n }\n}\n\nexport default DependentAttribute;\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAKA,IAAAE,qBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,sBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,MAAMK,MAAM,GAAG,QAAQ;AACvB,MAAMC,QAAQ,GAAG,UAAU;AAC3B,MAAMC,UAAU,GAAG,WAAW;AAC9B,MAAMC,YAAY,GAAG,aAAa;AAClC,MAAMC,YAAY,GAAG,YAAY;AACjC,MAAMC,QAAQ,GAAG,SAAS;AAE1B,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,IAAI,GAAG,MAAM;;AAEnB;AACA;AACA;AACA,MAAMC,kBAAkB,SAASC,2BAAkB,CAAC;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAUlD;AACF;EACE,OAAOC,mBAAmBA,CAACC,IAAY,EAAW;IAChD,MAAMC,KAAK,GAAG,IAAIC,MAAM,CACrB,IAAGC,8BAAoB,QAAOZ,IAAK,IAAGC,IAAK,GAAE,EAC9C,GACF,CAAC;IAED,OAAOS,KAAK,CAACG,IAAI,CAACJ,IAAI,CAAC;EACzB;;EAEA;AACF;AACA;EACE,OAAOK,eAAeA,CAAA,EAAuB;IAC3C,OAAO,IAAIZ,k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IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACEE,OAAOA,CAACF,SAAyB,EAAED,UAA+B,EAAQ;IACxE,MAAMb,gBAAgB,GAAG,IAAI,CAACY,mBAAmB,CAACC,UAAU,CAAC;IAC7D,IAAI,CAACb,gBAAgB,EAAE;MACrB;IACF;IAEAA,gBAAgB,CAACiB,sBAAsB,CAACJ,UAAU,CAAC;IACnD,IAAIb,gBAAgB,CAACkB,QAAQ,EAAE;MAC7BJ,SAAS,CAACK,IAAI,CAAC,CAAC;MAChB;IACF;IAEA,MAAMrC,MAAM,GAAG,IAAI,CAAC4B,cAAc,CAACV,gBAAgB,CAAC;IACpD,IAAI,IAAI,CAAChB,MAAM,KAAKtB,IAAI,EAAE;MACxBoD,SAAS,CAACI,QAAQ,GAAG,CAACpC,MAAM;IAC9B,CAAC,MAAM,IAAI,IAAI,CAACE,MAAM,KAAKrB,IAAI,EAAE;MAC/BmD,SAAS,CAACI,QAAQ,GAAGpC,MAAM;IAC7B,CAAC,MAAM;MACL,MAAM,IAAIM,kCAAsB,CAC7B,sBAAqB,IAAI,CAACJ,MAAO,yCAAwC8B,SAAS,CAACM,KAAM,EAC5F,CAAC;IACH;EACF;AACF;AAhNE;AACF;AADE,IAAApD,gBAAA,CAAAC,OAAA,EANIL,kBAAkB,4BAQmB,IAAI;AAAA,IAAAyD,QAAA,GAgNhCzD,kBAAkB;AAAA0D,OAAA,CAAArD,OAAA,GAAAoD,QAAA"}
|
|
1
|
+
{"version":3,"file":"DependentAttribute.js","names":["_BaseLayoutHintRule","_interopRequireDefault","require","_constants","_ChoiceAttributeModel","_BooleanAttributeModel","_exceptions","EQUALS","INCLUDES","NOT_EQUALS","NOT_INCLUDES","NOT_IS_EMPTY","IS_EMPTY","SHOW","HIDE","DependentAttribute","BaseLayoutHintRule","constructor","arguments","_defineProperty2","default","isApplicableForHint","hint","regex","RegExp","DEPENDENT_ATTRIBUTE","test","getRuleInstance","initHint","rule","OPERATORS","DEPENDENT_ATTRIBUTE_CONTROL","isEmpyNotIsEmptRegex","result","match","action","control","operator","options","ConfigurationException","_action","_control","_operator","_options","_context","_map","split","call","option","_trim","processEqualsOptions","controlAttribute","ChoiceAttributeModel","BooleanAttributeModel","every","_context2","_includes","selected","processIncludesOptions","some","_context3","handleOperator","length","getControlAttribute","attributes","attribute","getAttributeByLayoutHint","process","processLayoutHintRules","isHidden","hide","label","_default","exports"],"sources":["../../../../src/models/attributes/layouthint-rules/DependentAttribute.js"],"sourcesContent":["// @flow\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport {\n DEPENDENT_ATTRIBUTE_CONTROL,\n DEPENDENT_ATTRIBUTE,\n} from \"../../../constants\";\n\nimport ChoiceAttributeModel from \"../ChoiceAttributeModel\";\nimport BooleanAttributeModel from \"../BooleanAttributeModel\";\n\nimport { ConfigurationException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\nconst EQUALS = \"equals\";\nconst INCLUDES = \"includes\";\nconst NOT_EQUALS = \"notEquals\";\nconst NOT_INCLUDES = \"notIncludes\";\nconst NOT_IS_EMPTY = \"notIsEmpty\";\nconst IS_EMPTY = \"isEmpty\";\n\nconst SHOW = \"show\";\nconst HIDE = \"hide\";\n\n/**\n * Depending attributes hint logic\n */\nclass DependentAttribute extends BaseLayoutHintRule {\n _action: string;\n _control: string;\n _operator: string;\n _options: Array<string>;\n\n /**\n */\n static checkHintApplicability: boolean = true;\n\n /**\n */\n static isApplicableForHint(hint: string): boolean {\n const regex = new RegExp(\n `^${DEPENDENT_ATTRIBUTE}\\\\s?(${SHOW}|${HIDE})`,\n \"i\",\n );\n\n return regex.test(hint);\n }\n\n /**\n * Used on initHint to create an instance of this rule\n */\n static getRuleInstance(): DependentAttribute {\n return new DependentAttribute();\n }\n\n /**\n */\n static initHint(hint: string): any {\n const rule = this.getRuleInstance();\n\n const OPERATORS = `${EQUALS}|${INCLUDES}|${NOT_EQUALS}|${NOT_INCLUDES}|${NOT_IS_EMPTY}|${IS_EMPTY}`;\n const regex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})\\\\s(.*)`,\n \"i\",\n );\n const isEmpyNotIsEmptRegex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})`,\n \"i\",\n );\n\n const result = hint.match(regex)\n ? hint.match(regex)\n : hint.match(isEmpyNotIsEmptRegex);\n\n if (result) {\n rule.action = result[1];\n rule.control = result[2];\n rule.operator = result[3];\n rule.options = !result[4] ? \"\" : result[4];\n } else {\n throw new ConfigurationException(\n `No dependent information found on layout hint: ${hint}`,\n );\n }\n\n return rule;\n }\n\n /**\n */\n get action(): string {\n return this._action;\n }\n\n /**\n */\n set action(action: string) {\n this._action = action;\n }\n\n /**\n */\n get control(): string {\n return this._control;\n }\n\n /**\n */\n set control(control: string) {\n this._control = control;\n }\n\n /**\n */\n get operator(): string {\n return this._operator;\n }\n\n /**\n */\n set operator(operator: string) {\n this._operator = operator;\n }\n\n /**\n */\n get options(): Array<string> {\n return this._options;\n }\n\n /**\n */\n set options(options: string): void {\n this._options = options.split(\"|\").map((option) => option.trim());\n }\n\n /**\n */\n processEqualsOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel,\n ): boolean {\n if (\n controlAttribute instanceof ChoiceAttributeModel ||\n controlAttribute instanceof BooleanAttributeModel\n ) {\n return this.options.every((option) =>\n controlAttribute.selected.includes(option),\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with equals operator must be a choice, string or number attribute\",\n );\n }\n\n /**\n */\n processIncludesOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel,\n ): boolean {\n if (controlAttribute instanceof ChoiceAttributeModel) {\n return this.options.some((option) =>\n controlAttribute.selected.includes(option),\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with includes operator must be a choice attribute\",\n );\n }\n\n /**\n */\n handleOperator(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel,\n ): boolean {\n switch (this.operator) {\n case EQUALS:\n return this.processEqualsOptions(controlAttribute);\n case INCLUDES:\n return this.processIncludesOptions(controlAttribute);\n case NOT_EQUALS:\n return !this.processEqualsOptions(controlAttribute);\n case NOT_INCLUDES:\n return !this.processIncludesOptions(controlAttribute);\n case NOT_IS_EMPTY:\n return controlAttribute?.selected.length !== 0;\n case IS_EMPTY:\n return controlAttribute?.selected.length === 0;\n default:\n throw new ConfigurationException(\n `Unsupported operator for dependent question: ${this.operator}`,\n );\n }\n }\n\n /**\n */\n getControlAttribute(\n attributes: AttributeCollection,\n ): ChoiceAttributeModel | BooleanAttributeModel | null {\n const attribute = attributes.getAttributeByLayoutHint(\n `${DEPENDENT_ATTRIBUTE_CONTROL}:${this.control}`,\n `${DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}`,\n );\n\n if (\n attribute instanceof ChoiceAttributeModel ||\n attribute instanceof BooleanAttributeModel\n ) {\n return attribute;\n }\n\n return null;\n }\n\n /**\n */\n process(attribute: AttributeModel, attributes: AttributeCollection): void {\n const controlAttribute = this.getControlAttribute(attributes);\n if (!controlAttribute) {\n return;\n }\n\n controlAttribute.processLayoutHintRules(attributes);\n if (controlAttribute.isHidden) {\n attribute.hide();\n return;\n }\n\n const result = this.handleOperator(controlAttribute);\n if (this.action === SHOW) {\n attribute.isHidden = !result;\n } else if (this.action === HIDE) {\n attribute.isHidden = result;\n } else {\n throw new ConfigurationException(\n `Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}`,\n );\n }\n }\n}\n\nexport default DependentAttribute;\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAKA,I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B;IACF;IAEA,MAAMrC,MAAM,GAAG,IAAI,CAAC4B,cAAc,CAACV,gBAAgB,CAAC;IACpD,IAAI,IAAI,CAAChB,MAAM,KAAKtB,IAAI,EAAE;MACxBoD,SAAS,CAACI,QAAQ,GAAG,CAACpC,MAAM;IAC9B,CAAC,MAAM,IAAI,IAAI,CAACE,MAAM,KAAKrB,IAAI,EAAE;MAC/BmD,SAAS,CAACI,QAAQ,GAAGpC,MAAM;IAC7B,CAAC,MAAM;MACL,MAAM,IAAIM,kCAAsB,CAC7B,sBAAqB,IAAI,CAACJ,MAAO,yCAAwC8B,SAAS,CAACM,KAAM,EAC5F,CAAC;IACH;EACF;AACF;AAhNE;AACF;AADE,IAAApD,gBAAA,CAAAC,OAAA,EANIL,kBAAkB,4BAQmB,IAAI;AAAA,IAAAyD,QAAA,GAgNhCzD,kBAAkB;AAAA0D,OAAA,CAAArD,OAAA,GAAAoD,QAAA"}
|
|
@@ -29,7 +29,7 @@ export const addLayoutHintRule = (rule: Class<BaseLayoutHintRule>) => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
type LayoutHintRulesUpdater = (
|
|
32
|
-
rules: Array<Class<BaseLayoutHintRule
|
|
32
|
+
rules: Array<Class<BaseLayoutHintRule>>,
|
|
33
33
|
) => Array<Class<BaseLayoutHintRule>>;
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -47,7 +47,7 @@ export const updateLayoutHintRules = (updater: LayoutHintRulesUpdater) => {
|
|
|
47
47
|
layoutHintRules = newRules;
|
|
48
48
|
} else {
|
|
49
49
|
throw new IllegalReturnException(
|
|
50
|
-
"Result of updater of updateLayoutHintRules is not an array"
|
|
50
|
+
"Result of updater of updateLayoutHintRules is not an array",
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutHintRuleCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_BaseLayoutHintRule","_DependentAttribute","_RemainingTotalUploadSize","_exceptions","layoutHintRules","DependentAttribute","RemainingTotalUploadSize","addLayoutHintRule","rule","push","exports","updateLayoutHintRules","updater","newRules","Array","isArray","IllegalReturnException","LayoutHintRuleCollection","BaseCollection","allRules","setLayoutHintRules","attribute","rules","forEach","isApplicableForAttribute","checkHintApplicability","layouthint","hint","isApplicableForHint","add","initHint","initAttribute","process","attributes","all","_default","default"],"sources":["../../../../src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../../base/BaseCollection\";\n\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport DependentAttribute from \"./DependentAttribute\";\nimport RemainingTotalUploadSize from \"./RemainingTotalUploadSize\";\n\nimport { IllegalReturnException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type { AttributeType, ILayoutHintRule } from \"../../types\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Array of available layout hint rules\n * @private\n */\nlet layoutHintRules: Array<Class<BaseLayoutHintRule>> = [\n DependentAttribute,\n RemainingTotalUploadSize,\n];\n\n/**\n * Add custom layout hint rules\n */\nexport const addLayoutHintRule = (rule: Class<BaseLayoutHintRule>) => {\n layoutHintRules.push(rule);\n};\n\ntype LayoutHintRulesUpdater = (\n rules: Array<Class<BaseLayoutHintRule
|
|
1
|
+
{"version":3,"file":"LayoutHintRuleCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_BaseLayoutHintRule","_DependentAttribute","_RemainingTotalUploadSize","_exceptions","layoutHintRules","DependentAttribute","RemainingTotalUploadSize","addLayoutHintRule","rule","push","exports","updateLayoutHintRules","updater","newRules","Array","isArray","IllegalReturnException","LayoutHintRuleCollection","BaseCollection","allRules","setLayoutHintRules","attribute","rules","forEach","isApplicableForAttribute","checkHintApplicability","layouthint","hint","isApplicableForHint","add","initHint","initAttribute","process","attributes","all","_default","default"],"sources":["../../../../src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../../base/BaseCollection\";\n\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport DependentAttribute from \"./DependentAttribute\";\nimport RemainingTotalUploadSize from \"./RemainingTotalUploadSize\";\n\nimport { IllegalReturnException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type { AttributeType, ILayoutHintRule } from \"../../types\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Array of available layout hint rules\n * @private\n */\nlet layoutHintRules: Array<Class<BaseLayoutHintRule>> = [\n DependentAttribute,\n RemainingTotalUploadSize,\n];\n\n/**\n * Add custom layout hint rules\n */\nexport const addLayoutHintRule = (rule: Class<BaseLayoutHintRule>) => {\n layoutHintRules.push(rule);\n};\n\ntype LayoutHintRulesUpdater = (\n rules: Array<Class<BaseLayoutHintRule>>,\n) => Array<Class<BaseLayoutHintRule>>;\n\n/**\n * Update existing array of layout hint rules, use this to update or remove standard rules\n *\n * @example\n * // remove RemainingTotalUploadSize rule\n * updateLayoutHintRules((rules) => {\n * return rules.filter(rule => rule !== RemainingTotalUploadSize));\n * });\n */\nexport const updateLayoutHintRules = (updater: LayoutHintRulesUpdater) => {\n const newRules = updater(layoutHintRules);\n if (Array.isArray(newRules)) {\n layoutHintRules = newRules;\n } else {\n throw new IllegalReturnException(\n \"Result of updater of updateLayoutHintRules is not an array\",\n );\n }\n};\n\n/**\n * Collection of layout hint rules\n */\nclass LayoutHintRuleCollection extends BaseCollection<ILayoutHintRule> {\n /**\n * Retrieve all rules available in the collection\n */\n get allRules(): Array<Class<BaseLayoutHintRule>> {\n return layoutHintRules;\n }\n\n /**\n * Set layout hint rules on the applicable attributes\n */\n static setLayoutHintRules<T: AttributeType>(attribute: T): T {\n const rules = new LayoutHintRuleCollection();\n\n layoutHintRules.forEach((rule) => {\n if (rule.isApplicableForAttribute(attribute)) {\n if (rule.checkHintApplicability) {\n attribute.layouthint.forEach((hint) => {\n if (rule.isApplicableForHint(hint)) {\n rules.add(rule.initHint(hint));\n }\n });\n } else {\n rules.add(rule.initAttribute(attribute));\n }\n }\n });\n\n attribute.layoutHintRules = rules;\n\n return attribute;\n }\n\n /**\n * Process layout hint rules in the collection\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n this.all.forEach((rule) => {\n rule.process(attribute, attributes);\n });\n }\n}\n\nexport default LayoutHintRuleCollection;\n"],"mappings":";;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,mBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,yBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AAMA;AACA;AACA;AACA;AACA,IAAIK,eAAiD,GAAG,CACtDC,2BAAkB,EAClBC,iCAAwB,CACzB;;AAED;AACA;AACA;AACO,MAAMC,iBAAiB,GAAIC,IAA+B,IAAK;EACpEJ,eAAe,CAACK,IAAI,CAACD,IAAI,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAH,iBAAA,GAAAA,iBAAA;AAMF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMI,qBAAqB,GAAIC,OAA+B,IAAK;EACxE,MAAMC,QAAQ,GAAGD,OAAO,CAACR,eAAe,CAAC;EACzC,IAAIU,KAAK,CAACC,OAAO,CAACF,QAAQ,CAAC,EAAE;IAC3BT,eAAe,GAAGS,QAAQ;EAC5B,CAAC,MAAM;IACL,MAAM,IAAIG,kCAAsB,CAC9B,4DACF,CAAC;EACH;AACF,CAAC;;AAED;AACA;AACA;AAFAN,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAGA,MAAMM,wBAAwB,SAASC,uBAAc,CAAkB;EACrE;AACF;AACA;EACE,IAAIC,QAAQA,CAAA,EAAqC;IAC/C,OAAOf,eAAe;EACxB;;EAEA;AACF;AACA;EACE,OAAOgB,kBAAkBA,CAAmBC,SAAY,EAAK;IAC3D,MAAMC,KAAK,GAAG,IAAIL,wBAAwB,CAAC,CAAC;IAE5Cb,eAAe,CAACmB,OAAO,CAAEf,IAAI,IAAK;MAChC,IAAIA,IAAI,CAACgB,wBAAwB,CAACH,SAAS,CAAC,EAAE;QAC5C,IAAIb,IAAI,CAACiB,sBAAsB,EAAE;UAC/BJ,SAAS,CAACK,UAAU,CAACH,OAAO,CAAEI,IAAI,IAAK;YACrC,IAAInB,IAAI,CAACoB,mBAAmB,CAACD,IAAI,CAAC,EAAE;cAClCL,KAAK,CAACO,GAAG,CAACrB,IAAI,CAACsB,QAAQ,CAACH,IAAI,CAAC,CAAC;YAChC;UACF,CAAC,CAAC;QACJ,CAAC,MAAM;UACLL,KAAK,CAACO,GAAG,CAACrB,IAAI,CAACuB,aAAa,CAACV,SAAS,CAAC,CAAC;QAC1C;MACF;IACF,CAAC,CAAC;IAEFA,SAAS,CAACjB,eAAe,GAAGkB,KAAK;IAEjC,OAAOD,SAAS;EAClB;;EAEA;AACF;AACA;EACEW,OAAOA,CAACX,SAAyB,EAAEY,UAA+B,EAAE;IAClE,IAAI,CAACC,GAAG,CAACX,OAAO,CAAEf,IAAI,IAAK;MACzBA,IAAI,CAACwB,OAAO,CAACX,SAAS,EAAEY,UAAU,CAAC;IACrC,CAAC,CAAC;EACJ;AACF;AAAC,IAAAE,QAAA,GAEclB,wBAAwB;AAAAP,OAAA,CAAA0B,OAAA,GAAAD,QAAA"}
|
|
@@ -30,11 +30,11 @@ class RemainingTotalUploadSize extends BaseLayoutHintRule {
|
|
|
30
30
|
*/
|
|
31
31
|
processUploadInformation(
|
|
32
32
|
attribute: UploadAttributeModel,
|
|
33
|
-
attributes: AttributeCollection
|
|
33
|
+
attributes: AttributeCollection,
|
|
34
34
|
) {
|
|
35
35
|
const uploadInformationAttributes = attributes.getAttributesByLayoutHint(
|
|
36
36
|
INITIAL_TOTAL_FILESIZE,
|
|
37
|
-
MAX_TOTAL_FILESIZE
|
|
37
|
+
MAX_TOTAL_FILESIZE,
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
if (uploadInformationAttributes.length === 2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemainingTotalUploadSize.js","names":["_BaseLayoutHintRule","_interopRequireDefault","require","_UploadAttributeModel","_constants","RemainingTotalUploadSize","BaseLayoutHintRule","isApplicableForAttribute","attribute","UploadAttributeModel","initAttribute","processUploadInformation","attributes","uploadInformationAttributes","getAttributesByLayoutHint","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","length","firstHasInitialTotalFileSize","layouthint","has","initialTotalFileSize","value","maxTotalFileSize","process","_default","exports","default"],"sources":["../../../../src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js"],"sourcesContent":["// @flow\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport UploadAttributeModel from \"../UploadAttributeModel\";\n\nimport { INITIAL_TOTAL_FILESIZE, MAX_TOTAL_FILESIZE } from \"../../../constants\";\n\nimport type { AttributeType, ILayoutHintRule } from \"../../types\";\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * This pattern enables showing the upload file size remaining when uploading resources<br>\n * The rule depends on other attributes with the INITIAL_TOTAL_FILESIZE and MAX_TOTAL_FILESIZE layout hints\n */\nclass RemainingTotalUploadSize extends BaseLayoutHintRule {\n /**\n */\n static isApplicableForAttribute(attribute: AttributeType): boolean {\n return attribute instanceof UploadAttributeModel;\n }\n\n /**\n */\n static initAttribute(): ILayoutHintRule {\n return new RemainingTotalUploadSize();\n }\n\n /**\n */\n processUploadInformation(\n attribute: UploadAttributeModel,\n attributes: AttributeCollection
|
|
1
|
+
{"version":3,"file":"RemainingTotalUploadSize.js","names":["_BaseLayoutHintRule","_interopRequireDefault","require","_UploadAttributeModel","_constants","RemainingTotalUploadSize","BaseLayoutHintRule","isApplicableForAttribute","attribute","UploadAttributeModel","initAttribute","processUploadInformation","attributes","uploadInformationAttributes","getAttributesByLayoutHint","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","length","firstHasInitialTotalFileSize","layouthint","has","initialTotalFileSize","value","maxTotalFileSize","process","_default","exports","default"],"sources":["../../../../src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js"],"sourcesContent":["// @flow\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport UploadAttributeModel from \"../UploadAttributeModel\";\n\nimport { INITIAL_TOTAL_FILESIZE, MAX_TOTAL_FILESIZE } from \"../../../constants\";\n\nimport type { AttributeType, ILayoutHintRule } from \"../../types\";\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * This pattern enables showing the upload file size remaining when uploading resources<br>\n * The rule depends on other attributes with the INITIAL_TOTAL_FILESIZE and MAX_TOTAL_FILESIZE layout hints\n */\nclass RemainingTotalUploadSize extends BaseLayoutHintRule {\n /**\n */\n static isApplicableForAttribute(attribute: AttributeType): boolean {\n return attribute instanceof UploadAttributeModel;\n }\n\n /**\n */\n static initAttribute(): ILayoutHintRule {\n return new RemainingTotalUploadSize();\n }\n\n /**\n */\n processUploadInformation(\n attribute: UploadAttributeModel,\n attributes: AttributeCollection,\n ) {\n const uploadInformationAttributes = attributes.getAttributesByLayoutHint(\n INITIAL_TOTAL_FILESIZE,\n MAX_TOTAL_FILESIZE,\n );\n\n if (uploadInformationAttributes.length === 2) {\n const firstHasInitialTotalFileSize =\n uploadInformationAttributes[0].layouthint.has(INITIAL_TOTAL_FILESIZE);\n\n const initialTotalFileSize = firstHasInitialTotalFileSize\n ? uploadInformationAttributes[0].value\n : uploadInformationAttributes[1].value;\n\n const maxTotalFileSize = firstHasInitialTotalFileSize\n ? uploadInformationAttributes[1].value\n : uploadInformationAttributes[0].value;\n\n attribute.initialTotalFileSize = initialTotalFileSize;\n attribute.maxTotalFileSize = maxTotalFileSize;\n }\n }\n\n /**\n * Sets tresholds for initial and maximum upload file size\n */\n process(attribute: AttributeModel, attributes: AttributeCollection): void {\n if (attribute instanceof UploadAttributeModel) {\n this.processUploadInformation(attribute, attributes);\n }\n }\n}\n\nexport default RemainingTotalUploadSize;\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAMA;AACA;AACA;AACA;AACA,MAAMG,wBAAwB,SAASC,2BAAkB,CAAC;EACxD;AACF;EACE,OAAOC,wBAAwBA,CAACC,SAAwB,EAAW;IACjE,OAAOA,SAAS,YAAYC,6BAAoB;EAClD;;EAEA;AACF;EACE,OAAOC,aAAaA,CAAA,EAAoB;IACtC,OAAO,IAAIL,wBAAwB,CAAC,CAAC;EACvC;;EAEA;AACF;EACEM,wBAAwBA,CACtBH,SAA+B,EAC/BI,UAA+B,EAC/B;IACA,MAAMC,2BAA2B,GAAGD,UAAU,CAACE,yBAAyB,CACtEC,iCAAsB,EACtBC,6BACF,CAAC;IAED,IAAIH,2BAA2B,CAACI,MAAM,KAAK,CAAC,EAAE;MAC5C,MAAMC,4BAA4B,GAChCL,2BAA2B,CAAC,CAAC,CAAC,CAACM,UAAU,CAACC,GAAG,CAACL,iCAAsB,CAAC;MAEvE,MAAMM,oBAAoB,GAAGH,4BAA4B,GACrDL,2BAA2B,CAAC,CAAC,CAAC,CAACS,KAAK,GACpCT,2BAA2B,CAAC,CAAC,CAAC,CAACS,KAAK;MAExC,MAAMC,gBAAgB,GAAGL,4BAA4B,GACjDL,2BAA2B,CAAC,CAAC,CAAC,CAACS,KAAK,GACpCT,2BAA2B,CAAC,CAAC,CAAC,CAACS,KAAK;MAExCd,SAAS,CAACa,oBAAoB,GAAGA,oBAAoB;MACrDb,SAAS,CAACe,gBAAgB,GAAGA,gBAAgB;IAC/C;EACF;;EAEA;AACF;AACA;EACEC,OAAOA,CAAChB,SAAyB,EAAEI,UAA+B,EAAQ;IACxE,IAAIJ,SAAS,YAAYC,6BAAoB,EAAE;MAC7C,IAAI,CAACE,wBAAwB,CAACH,SAAS,EAAEI,UAAU,CAAC;IACtD;EACF;AACF;AAAC,IAAAa,QAAA,GAEcpB,wBAAwB;AAAAqB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -11,26 +11,26 @@ describe("depending attribute - visibility", () => {
|
|
|
11
11
|
|
|
12
12
|
it("is applicable for every attribute", () => {
|
|
13
13
|
expect(
|
|
14
|
-
DependentAttribute.isApplicableForAttribute(new StringAttributeModel())
|
|
14
|
+
DependentAttribute.isApplicableForAttribute(new StringAttributeModel()),
|
|
15
15
|
).toBe(true);
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
it("checks applicability for hint", () => {
|
|
19
19
|
expect(DependentAttribute.isApplicableForHint("bla")).toBe(false);
|
|
20
20
|
expect(DependentAttribute.isApplicableForHint("dependent-attribute")).toBe(
|
|
21
|
-
false
|
|
21
|
+
false,
|
|
22
22
|
);
|
|
23
23
|
expect(
|
|
24
|
-
DependentAttribute.isApplicableForHint("dependent-attribute:show sss")
|
|
24
|
+
DependentAttribute.isApplicableForHint("dependent-attribute:show sss"),
|
|
25
25
|
).toBe(true);
|
|
26
26
|
expect(
|
|
27
|
-
DependentAttribute.isApplicableForHint("dependent-attribute: show sss")
|
|
27
|
+
DependentAttribute.isApplicableForHint("dependent-attribute: show sss"),
|
|
28
28
|
).toBe(true);
|
|
29
29
|
expect(
|
|
30
|
-
DependentAttribute.isApplicableForHint("dependent-attribute:hide sss")
|
|
30
|
+
DependentAttribute.isApplicableForHint("dependent-attribute:hide sss"),
|
|
31
31
|
).toBe(true);
|
|
32
32
|
expect(
|
|
33
|
-
DependentAttribute.isApplicableForHint("dependent-attribute:enable sss")
|
|
33
|
+
DependentAttribute.isApplicableForHint("dependent-attribute:enable sss"),
|
|
34
34
|
).toBe(false);
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -42,7 +42,7 @@ describe("depending attribute - visibility", () => {
|
|
|
42
42
|
|
|
43
43
|
it("parse layout hint on init", () => {
|
|
44
44
|
const showEquals = DependentAttribute.initHint(
|
|
45
|
-
"dependent-attribute:show when dependent-control:controlA equals code1"
|
|
45
|
+
"dependent-attribute:show when dependent-control:controlA equals code1",
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
expect(showEquals).toBeInstanceOf(DependentAttribute);
|
|
@@ -52,7 +52,7 @@ describe("depending attribute - visibility", () => {
|
|
|
52
52
|
expect(showEquals.options).toStrictEqual(["code1"]);
|
|
53
53
|
|
|
54
54
|
const showEqualsExtraSpaces = DependentAttribute.initHint(
|
|
55
|
-
"dependent-attribute: show when dependent-control: controlA equals code1"
|
|
55
|
+
"dependent-attribute: show when dependent-control: controlA equals code1",
|
|
56
56
|
);
|
|
57
57
|
|
|
58
58
|
expect(showEqualsExtraSpaces).toBeInstanceOf(DependentAttribute);
|
|
@@ -62,7 +62,7 @@ describe("depending attribute - visibility", () => {
|
|
|
62
62
|
expect(showEqualsExtraSpaces.options).toStrictEqual(["code1"]);
|
|
63
63
|
|
|
64
64
|
const hideTwoOptions = DependentAttribute.initHint(
|
|
65
|
-
"dependent-attribute:hide when dependent-control:controlA includes code1|code2"
|
|
65
|
+
"dependent-attribute:hide when dependent-control:controlA includes code1|code2",
|
|
66
66
|
);
|
|
67
67
|
|
|
68
68
|
expect(hideTwoOptions).toBeInstanceOf(DependentAttribute);
|
|
@@ -72,7 +72,7 @@ describe("depending attribute - visibility", () => {
|
|
|
72
72
|
expect(hideTwoOptions.options).toStrictEqual(["code1", "code2"]);
|
|
73
73
|
|
|
74
74
|
const hideTwoOptionsSpaces = DependentAttribute.initHint(
|
|
75
|
-
"dependent-attribute:hide when dependent-control:controlA includes code1 | code2"
|
|
75
|
+
"dependent-attribute:hide when dependent-control:controlA includes code1 | code2",
|
|
76
76
|
);
|
|
77
77
|
|
|
78
78
|
expect(hideTwoOptionsSpaces).toBeInstanceOf(DependentAttribute);
|
|
@@ -99,7 +99,7 @@ describe("depending attribute - visibility", () => {
|
|
|
99
99
|
"attributeControl",
|
|
100
100
|
["code1", "code2", "code3", "code4", "code5", "code6"],
|
|
101
101
|
["code2", "code4", "code6"],
|
|
102
|
-
["dependent-control: Control A"]
|
|
102
|
+
["dependent-control: Control A"],
|
|
103
103
|
);
|
|
104
104
|
mockedCollectionFactory.addDependentAttribute("attributeUnknownHint", [
|
|
105
105
|
"unknown-hint",
|
|
@@ -108,7 +108,7 @@ describe("depending attribute - visibility", () => {
|
|
|
108
108
|
"attributeHasNonExistingControl",
|
|
109
109
|
[
|
|
110
110
|
"dependent-attribute: show when dependent-control: Control B equals code2",
|
|
111
|
-
]
|
|
111
|
+
],
|
|
112
112
|
);
|
|
113
113
|
|
|
114
114
|
const mockedCollection = mockedCollectionFactory.createCollection();
|
|
@@ -124,7 +124,7 @@ describe("depending attribute - visibility", () => {
|
|
|
124
124
|
"attributeControl",
|
|
125
125
|
["code1", "code2"],
|
|
126
126
|
["code2"],
|
|
127
|
-
["dependent-control: Control A"]
|
|
127
|
+
["dependent-control: Control A"],
|
|
128
128
|
);
|
|
129
129
|
mockedCollectionFactory.addDependentAttribute("showEqualsSelected", [
|
|
130
130
|
"dependent-attribute:show when dependent-control: Control A equals code2",
|
|
@@ -152,7 +152,7 @@ describe("depending attribute - visibility", () => {
|
|
|
152
152
|
"hideNotIncludesNotSelected",
|
|
153
153
|
[
|
|
154
154
|
"dependent-attribute: hide when dependent-control: Control A notIncludes code2",
|
|
155
|
-
]
|
|
155
|
+
],
|
|
156
156
|
);
|
|
157
157
|
|
|
158
158
|
const mockedCollection = mockedCollectionFactory.createCollection();
|
|
@@ -174,7 +174,7 @@ describe("depending attribute - visibility", () => {
|
|
|
174
174
|
"attributeControl",
|
|
175
175
|
["code1", "code2"],
|
|
176
176
|
["code2"],
|
|
177
|
-
["dependent-control: Control A"]
|
|
177
|
+
["dependent-control: Control A"],
|
|
178
178
|
);
|
|
179
179
|
mockedCollectionFactory.addDependentAttribute("showEqualsNotSelected", [
|
|
180
180
|
"dependent-attribute:show when dependent-control: Control A equals code1",
|
|
@@ -204,7 +204,7 @@ describe("depending attribute - visibility", () => {
|
|
|
204
204
|
"attributeControlA",
|
|
205
205
|
["code1", "code2"],
|
|
206
206
|
["code2"],
|
|
207
|
-
["dependent-control: Control A"]
|
|
207
|
+
["dependent-control: Control A"],
|
|
208
208
|
);
|
|
209
209
|
mockedCollectionFactory.addControlAttribute(
|
|
210
210
|
"attributeControlB",
|
|
@@ -213,7 +213,7 @@ describe("depending attribute - visibility", () => {
|
|
|
213
213
|
[
|
|
214
214
|
"dependent-control: Control B",
|
|
215
215
|
"dependent-attribute:show when dependent-control: Control A equals code2",
|
|
216
|
-
]
|
|
216
|
+
],
|
|
217
217
|
);
|
|
218
218
|
mockedCollectionFactory.addControlAttribute(
|
|
219
219
|
"attributeControlC",
|
|
@@ -222,7 +222,7 @@ describe("depending attribute - visibility", () => {
|
|
|
222
222
|
[
|
|
223
223
|
"dependent-control: Control C",
|
|
224
224
|
"dependent-attribute:show when dependent-control: Control B equals code2",
|
|
225
|
-
]
|
|
225
|
+
],
|
|
226
226
|
);
|
|
227
227
|
mockedCollectionFactory.addControlAttribute(
|
|
228
228
|
"attributeControlD",
|
|
@@ -231,7 +231,7 @@ describe("depending attribute - visibility", () => {
|
|
|
231
231
|
[
|
|
232
232
|
"dependent-control: Control D",
|
|
233
233
|
"dependent-attribute:show when dependent-control: Control C equals code1",
|
|
234
|
-
]
|
|
234
|
+
],
|
|
235
235
|
);
|
|
236
236
|
mockedCollectionFactory.addControlAttribute(
|
|
237
237
|
"attributeControlE",
|
|
@@ -240,7 +240,7 @@ describe("depending attribute - visibility", () => {
|
|
|
240
240
|
[
|
|
241
241
|
"dependent-control: Control E",
|
|
242
242
|
"dependent-attribute:show when dependent-control: Control D equals code2",
|
|
243
|
-
]
|
|
243
|
+
],
|
|
244
244
|
);
|
|
245
245
|
|
|
246
246
|
mockedCollectionFactory.addDependentAttribute("show1", [
|
|
@@ -278,14 +278,14 @@ describe("depending attribute - visibility", () => {
|
|
|
278
278
|
"attributeControlA",
|
|
279
279
|
["code1", "code2"],
|
|
280
280
|
[],
|
|
281
|
-
["dependent-control: Control A"]
|
|
281
|
+
["dependent-control: Control A"],
|
|
282
282
|
);
|
|
283
283
|
|
|
284
284
|
mockedCollectionFactory.addControlAttribute(
|
|
285
285
|
"attributeControlB",
|
|
286
286
|
["code1", "code2"],
|
|
287
287
|
[],
|
|
288
|
-
["dependent-control: Control B"]
|
|
288
|
+
["dependent-control: Control B"],
|
|
289
289
|
);
|
|
290
290
|
|
|
291
291
|
mockedCollectionFactory.addDependentAttribute("depending", [
|
package/lib/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js.flow
CHANGED
|
@@ -16,7 +16,7 @@ describe("layout hint rule collection", () => {
|
|
|
16
16
|
expect(attrWithoutRules.layoutHintRules.size).toBe(0);
|
|
17
17
|
|
|
18
18
|
attribute.layouthint.add(
|
|
19
|
-
"dependent-attribute:show when dependent-control:bla equals one"
|
|
19
|
+
"dependent-attribute:show when dependent-control:bla equals one",
|
|
20
20
|
);
|
|
21
21
|
const attrWithRules =
|
|
22
22
|
LayoutHintRuleCollection.setLayoutHintRules(attribute);
|
package/lib/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js.flow
CHANGED
|
@@ -11,14 +11,14 @@ describe("remaining total upload size", () => {
|
|
|
11
11
|
it("needs to check hint applicability", () => {
|
|
12
12
|
expect(
|
|
13
13
|
RemainingTotalUploadSize.isApplicableForAttribute(
|
|
14
|
-
new StringAttributeModel()
|
|
15
|
-
)
|
|
14
|
+
new StringAttributeModel(),
|
|
15
|
+
),
|
|
16
16
|
).toBe(false);
|
|
17
17
|
|
|
18
18
|
expect(
|
|
19
19
|
RemainingTotalUploadSize.isApplicableForAttribute(
|
|
20
|
-
new UploadAttributeModel()
|
|
21
|
-
)
|
|
20
|
+
new UploadAttributeModel(),
|
|
21
|
+
),
|
|
22
22
|
).toBe(true);
|
|
23
23
|
});
|
|
24
24
|
});
|
|
@@ -115,7 +115,7 @@ class BaseCollection<T> {
|
|
|
115
115
|
*/
|
|
116
116
|
find(
|
|
117
117
|
callbackfn: (value: T, index: number, array: Array<T>) => any,
|
|
118
|
-
thisArg?: any
|
|
118
|
+
thisArg?: any,
|
|
119
119
|
): T | null {
|
|
120
120
|
return this.collection.find(callbackfn, thisArg) ?? null;
|
|
121
121
|
}
|
|
@@ -125,7 +125,7 @@ class BaseCollection<T> {
|
|
|
125
125
|
*/
|
|
126
126
|
filter(
|
|
127
127
|
callbackfn: (value: T, index: number, array: Array<T>) => any,
|
|
128
|
-
thisArg?: any
|
|
128
|
+
thisArg?: any,
|
|
129
129
|
): Array<T> {
|
|
130
130
|
return this.collection.filter(callbackfn, thisArg);
|
|
131
131
|
}
|
|
@@ -135,7 +135,7 @@ class BaseCollection<T> {
|
|
|
135
135
|
*/
|
|
136
136
|
some(
|
|
137
137
|
callbackfn: (value: T, index: number, array: Array<T>) => any,
|
|
138
|
-
thisArg?: any
|
|
138
|
+
thisArg?: any,
|
|
139
139
|
): boolean {
|
|
140
140
|
return this.collection.some(callbackfn, thisArg);
|
|
141
141
|
}
|
|
@@ -144,7 +144,7 @@ class BaseCollection<T> {
|
|
|
144
144
|
*/
|
|
145
145
|
every(
|
|
146
146
|
callbackfn: (value: T, index: number, array: Array<T>) => any,
|
|
147
|
-
thisArg?: any
|
|
147
|
+
thisArg?: any,
|
|
148
148
|
): boolean {
|
|
149
149
|
return this.collection.every(callbackfn, thisArg);
|
|
150
150
|
}
|
|
@@ -153,7 +153,7 @@ class BaseCollection<T> {
|
|
|
153
153
|
*/
|
|
154
154
|
map<U>(
|
|
155
155
|
callbackfn: (value: T, index: number, array: Array<T>) => U,
|
|
156
|
-
thisArg?: T
|
|
156
|
+
thisArg?: T,
|
|
157
157
|
): Array<U> {
|
|
158
158
|
return this.collection.map<U, ?T>(callbackfn, thisArg);
|
|
159
159
|
}
|
|
@@ -162,7 +162,7 @@ class BaseCollection<T> {
|
|
|
162
162
|
*/
|
|
163
163
|
forEach(
|
|
164
164
|
callbackfn: (value: T, index: number, array: Array<T>) => any,
|
|
165
|
-
thisArg?: any
|
|
165
|
+
thisArg?: any,
|
|
166
166
|
) {
|
|
167
167
|
this.collection.forEach(callbackfn, thisArg);
|
|
168
168
|
}
|