@beinformed/ui 1.18.2 → 1.18.5
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 +21 -0
- package/esm/constants/Constants.js +1 -0
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/Settings.js +10 -3
- package/esm/constants/Settings.js.map +1 -1
- package/esm/hooks/useAuthentication.js +7 -50
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/form/FormModel.js +3 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/list/ListModel.js +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/modularui/Authenticate.js +100 -21
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/redux/actions/Preferences.js +2 -2
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/SignOut.js +6 -2
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/connectors/SignIn.js +3 -2
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js +4 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js +0 -10
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/types.js.map +1 -1
- package/esm/utils/helpers/checkResource.js +2 -0
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/lib/constants/Constants.js +3 -1
- package/lib/constants/Constants.js.flow +1 -0
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js +13 -3
- package/lib/constants/Settings.js.flow +8 -3
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +15 -1
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js +7 -55
- package/lib/hooks/useAuthentication.js.flow +4 -37
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +3 -1
- package/lib/models/form/FormModel.js.flow +1 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListModel.js +1 -1
- package/lib/models/list/ListModel.js.flow +1 -1
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +13 -0
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +102 -21
- package/lib/modularui/Authenticate.js.flow +75 -20
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +6 -4
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/actions.js.map +1 -1
- package/lib/redux/_i18n/reducer.js.map +1 -1
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/_modularui/connector.js.map +1 -1
- package/lib/redux/_modularui/middleware.js.map +1 -1
- package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
- package/lib/redux/_modularui/reducer.js.map +1 -1
- package/lib/redux/_modularui/selectors.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/connectors.js.map +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +1 -1
- package/lib/redux/actions/Preferences.js.flow +7 -3
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js +6 -1
- package/lib/redux/actions/SignOut.js.flow +9 -5
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js +3 -5
- package/lib/redux/connectors/SignIn.js.flow +1 -6
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js +5 -1
- package/lib/redux/connectors/SignOut.js.flow +2 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js +0 -11
- package/lib/redux/reducers/AuthReducer.js.flow +0 -11
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/AuthReducer.spec.js.flow +0 -9
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/redux/types.js.flow +0 -1
- package/lib/redux/types.js.map +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js +2 -0
- package/lib/utils/helpers/checkResource.js.flow +3 -0
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +22 -22
- package/src/constants/Constants.js +1 -0
- package/src/constants/Settings.js +8 -3
- package/src/hooks/__tests__/useAuthentication.spec.js +15 -1
- package/src/hooks/useAuthentication.js +4 -37
- package/src/models/form/FormModel.js +1 -1
- package/src/models/list/ListModel.js +1 -1
- package/src/models/list/__tests__/ListModel.spec.js +13 -0
- package/src/models/list/__tests__/related-contributions.json +42 -0
- package/src/models/list/__tests__/related-data.json +32 -0
- package/src/modularui/Authenticate.js +75 -20
- package/src/react-server/__tests__/serverUtil.spec.js +6 -4
- package/src/redux/actions/Preferences.js +7 -3
- package/src/redux/actions/SignOut.js +9 -5
- package/src/redux/connectors/SignIn.js +1 -6
- package/src/redux/connectors/SignOut.js +2 -1
- package/src/redux/reducers/AuthReducer.js +0 -11
- package/src/redux/reducers/__tests__/AuthReducer.spec.js +0 -9
- package/src/redux/types.js +0 -1
- package/src/utils/helpers/checkResource.js +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.js","names":["Parameter","prefix","name","value","_prefix","_name","_value","withPrefix","PARAMETER_SEPARATOR","encodeURIComponent","_isModUIParameter","uiParameterSetting","DEFAULT_UI_PARAMETERS","parameter","namePart","substr","indexOf","decodeURIComponent"],"sources":["../../../src/models/parameter/Parameter.js"],"sourcesContent":["// @flow\nimport {\n PARAMETER_SEPARATOR,\n DEFAULT_UI_PARAMETERS,\n} from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\n/**\n * Querystring parameter\n */\nclass Parameter {\n _prefix: ?string;\n _name: string;\n _value: ?string;\n _isModUIParameter: boolean | null = null;\n\n /**\n */\n constructor(prefix: ?string, name: string, value: ?string) {\n this._prefix = prefix;\n this._name = name;\n this._value = value;\n }\n\n /**\n * Getting prefix\n */\n get prefix(): ?string {\n return this._prefix;\n }\n\n /**\n * Getting name\n */\n get name(): string {\n return this._name;\n }\n\n /**\n * Getting value\n */\n get value(): ?string {\n return this._value;\n }\n\n /**\n * Create parameter from string input\n */\n static fromString(parameter: string): null | Parameter {\n if (parameter == null || parameter === \"\" || !parameter.includes(\"=\")) {\n return null;\n }\n\n // parameter has the structure prefix~name=value\n const namePart = parameter.substr(0, parameter.indexOf(\"=\"));\n const value = parameter.substr(parameter.indexOf(\"=\") + 1);\n\n let prefix = void 0;\n let name = namePart;\n if (namePart.includes(PARAMETER_SEPARATOR)) {\n prefix = namePart.substr(0, namePart.indexOf(\"~\"));\n name = namePart.substr(namePart.indexOf(\"~\") + 1);\n }\n\n if (name === \"\") {\n return null;\n }\n\n return new Parameter(prefix, name, decodeURIComponent(value));\n }\n\n /**\n * Convert parameter to string\n */\n toString(withPrefix: boolean = true): string {\n if (!this.name) {\n return \"\";\n }\n\n const value = this.value == null ? \"\" : this.value;\n\n return withPrefix && this.prefix\n ? `${this.prefix}${PARAMETER_SEPARATOR}${this.name}=${value}`\n : `${this.name}=${value}`;\n }\n\n /**\n */\n toQuerystring(withPrefix: boolean = true): string {\n if (!this.name) {\n return \"\";\n }\n\n const value = this.value == null ? \"\" : encodeURIComponent(this.value);\n\n return withPrefix && this.prefix\n ? `${this.prefix}${PARAMETER_SEPARATOR}${this.name}=${value}`\n : `${this.name}=${value}`;\n }\n\n /**\n * Indicates if parameter can be send to the Be Informed modular UI\n */\n get isModUIParameter(): boolean {\n if (this._isModUIParameter == null) {\n const uiParameterSetting = getSetting(\"UI_PARAMETERS\", []);\n this._isModUIParameter = ![\n ...DEFAULT_UI_PARAMETERS,\n ...uiParameterSetting,\n ].includes(this.name);\n }\n\n return this._isModUIParameter;\n }\n}\n\nexport default Parameter;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AAIA;;AAEA;AACA;AACA;IACMA,S;EAMJ;AACF;EACE,mBAAYC,MAAZ,EAA6BC,IAA7B,EAA2CC,KAA3C,EAA2D;IAAA;IAAA;IAAA;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Parameter.js","names":["Parameter","prefix","name","value","_prefix","_name","_value","withPrefix","PARAMETER_SEPARATOR","encodeURIComponent","_isModUIParameter","uiParameterSetting","getSetting","DEFAULT_UI_PARAMETERS","parameter","namePart","substr","indexOf","decodeURIComponent"],"sources":["../../../src/models/parameter/Parameter.js"],"sourcesContent":["// @flow\nimport {\n PARAMETER_SEPARATOR,\n DEFAULT_UI_PARAMETERS,\n} from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\n/**\n * Querystring parameter\n */\nclass Parameter {\n _prefix: ?string;\n _name: string;\n _value: ?string;\n _isModUIParameter: boolean | null = null;\n\n /**\n */\n constructor(prefix: ?string, name: string, value: ?string) {\n this._prefix = prefix;\n this._name = name;\n this._value = value;\n }\n\n /**\n * Getting prefix\n */\n get prefix(): ?string {\n return this._prefix;\n }\n\n /**\n * Getting name\n */\n get name(): string {\n return this._name;\n }\n\n /**\n * Getting value\n */\n get value(): ?string {\n return this._value;\n }\n\n /**\n * Create parameter from string input\n */\n static fromString(parameter: string): null | Parameter {\n if (parameter == null || parameter === \"\" || !parameter.includes(\"=\")) {\n return null;\n }\n\n // parameter has the structure prefix~name=value\n const namePart = parameter.substr(0, parameter.indexOf(\"=\"));\n const value = parameter.substr(parameter.indexOf(\"=\") + 1);\n\n let prefix = void 0;\n let name = namePart;\n if (namePart.includes(PARAMETER_SEPARATOR)) {\n prefix = namePart.substr(0, namePart.indexOf(\"~\"));\n name = namePart.substr(namePart.indexOf(\"~\") + 1);\n }\n\n if (name === \"\") {\n return null;\n }\n\n return new Parameter(prefix, name, decodeURIComponent(value));\n }\n\n /**\n * Convert parameter to string\n */\n toString(withPrefix: boolean = true): string {\n if (!this.name) {\n return \"\";\n }\n\n const value = this.value == null ? \"\" : this.value;\n\n return withPrefix && this.prefix\n ? `${this.prefix}${PARAMETER_SEPARATOR}${this.name}=${value}`\n : `${this.name}=${value}`;\n }\n\n /**\n */\n toQuerystring(withPrefix: boolean = true): string {\n if (!this.name) {\n return \"\";\n }\n\n const value = this.value == null ? \"\" : encodeURIComponent(this.value);\n\n return withPrefix && this.prefix\n ? `${this.prefix}${PARAMETER_SEPARATOR}${this.name}=${value}`\n : `${this.name}=${value}`;\n }\n\n /**\n * Indicates if parameter can be send to the Be Informed modular UI\n */\n get isModUIParameter(): boolean {\n if (this._isModUIParameter == null) {\n const uiParameterSetting = getSetting(\"UI_PARAMETERS\", []);\n this._isModUIParameter = ![\n ...DEFAULT_UI_PARAMETERS,\n ...uiParameterSetting,\n ].includes(this.name);\n }\n\n return this._isModUIParameter;\n }\n}\n\nexport default Parameter;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AAIA;;AAEA;AACA;AACA;IACMA,S;EAMJ;AACF;EACE,mBAAYC,MAAZ,EAA6BC,IAA7B,EAA2CC,KAA3C,EAA2D;IAAA;IAAA;IAAA;IAAA;IAAA,yDAJvB,IAIuB;IACzD,KAAKC,OAAL,GAAeH,MAAf;IACA,KAAKI,KAAL,GAAaH,IAAb;IACA,KAAKI,MAAL,GAAcH,KAAd;EACD;EAED;AACF;AACA;;;;;SACE,eAAsB;MACpB,OAAO,KAAKC,OAAZ;IACD;IAED;AACF;AACA;;;;SACE,eAAmB;MACjB,OAAO,KAAKC,KAAZ;IACD;IAED;AACF;AACA;;;;SACE,eAAqB;MACnB,OAAO,KAAKC,MAAZ;IACD;IAED;AACF;AACA;;;;;IAwBE;AACF;AACA;IACE,oBAA6C;MAAA;;MAAA,IAApCC,UAAoC,uEAAd,IAAc;;MAC3C,IAAI,CAAC,KAAKL,IAAV,EAAgB;QACd,OAAO,EAAP;MACD;;MAED,IAAMC,KAAK,GAAG,KAAKA,KAAL,IAAc,IAAd,GAAqB,EAArB,GAA0B,KAAKA,KAA7C;MAEA,OAAOI,UAAU,IAAI,KAAKN,MAAnB,+GACA,KAAKA,MADL,mBACcO,8BADd,mBACoC,KAAKN,IADzC,uBACiDC,KADjD,+CAEA,KAAKD,IAFL,wBAEaC,KAFb,CAAP;I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UP,8BAAV,CAAZ,EAA4C;QAC1CP,MAAM,GAAGc,QAAQ,CAACC,MAAT,CAAgB,CAAhB,EAAmBD,QAAQ,CAACE,OAAT,CAAiB,GAAjB,CAAnB,CAAT;QACAf,IAAI,GAAGa,QAAQ,CAACC,MAAT,CAAgBD,QAAQ,CAACE,OAAT,CAAiB,GAAjB,IAAwB,CAAxC,CAAP;MACD;;MAED,IAAIf,IAAI,KAAK,EAAb,EAAiB;QACf,OAAO,IAAP;MACD;;MAED,OAAO,IAAIF,SAAJ,CAAcC,MAAd,EAAsBC,IAAtB,EAA4BgB,kBAAkB,CAACf,KAAD,CAA9C,CAAP;IACD;;;;;eA+CYH,S"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessStatusSettingsModel.js","names":["ProcessStatusSettingsModel","getContribution","toLowerCase","getData","needed","LinkCollection","contributions","_links","DateUtil","now","conceptLink","links","getLinkByKey","href","addParameter","TIMEVERSION_FILTER_NAME","referenceDate","isCacheable","BaseModel"],"sources":["../../../src/models/process/ProcessStatusSettingsModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\n\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n */\nexport default class ProcessStatusSettingsModel extends BaseModel {\n /**\n */\n get concequenceType(): string {\n return this.getContribution(\"consequenceType\", \"\").toLowerCase();\n }\n\n /**\n */\n get transition(): string {\n return this.getContribution(\"transition\", \"\").toLowerCase();\n }\n\n /**\n */\n get isApplicable(): boolean {\n return this.getData(\"applicable\", false);\n }\n\n /**\n */\n get isCompleted(): boolean {\n return this.getData(\"completed\", false);\n }\n\n /**\n */\n get isNeeded(): boolean | null {\n const needed = this.getData(\"needed\", \"unknown\");\n\n if (needed === \"unknown\") {\n return null;\n }\n\n return needed === \"true\";\n }\n\n /**\n */\n get state(): string | null {\n return this.getData(\"state\");\n }\n\n /**\n */\n get canComplete(): boolean | null {\n return this.getData(\"canComplete\");\n }\n\n /**\n */\n get links(): LinkCollection {\n return new LinkCollection(this.contributions._links);\n }\n\n /**\n */\n get referenceDate(): ISO_DATE {\n return DateUtil.now();\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;;;;;AAIA;AACA;IACqBA,0B;;;;;;;;;;;;;IACnB;AACF;IACE,eAA8B;MAC5B,OAAO,KAAKC,eAAL,CAAqB,iBAArB,EAAwC,EAAxC,EAA4CC,WAA5C,EAAP;IACD;IAED;AACF;;;;SACE,eAAyB;MACvB,OAAO,KAAKD,eAAL,CAAqB,YAArB,EAAmC,EAAnC,EAAuCC,WAAvC,EAAP;IACD;IAED;AACF;;;;SACE,eAA4B;MAC1B,OAAO,KAAKC,OAAL,CAAa,YAAb,EAA2B,KAA3B,CAAP;IACD;IAED;AACF;;;;SACE,eAA2B;MACzB,OAAO,KAAKA,OAAL,CAAa,WAAb,EAA0B,KAA1B,CAAP;IACD;IAED;AACF;;;;SACE,eAA+B;MAC7B,IAAMC,MAAM,GAAG,KAAKD,OAAL,CAAa,QAAb,EAAuB,SAAvB,CAAf;;MAEA,IAAIC,MAAM,KAAK,SAAf,EAA0B;QACxB,OAAO,IAAP;MACD;;MAED,OAAOA,MAAM,KAAK,MAAlB;IACD;IAED;AACF;;;;SACE,eAA2B;MACzB,OAAO,KAAKD,OAAL,CAAa,OAAb,CAAP;IACD;IAED;AACF;;;;SACE,eAAkC;MAChC,OAAO,KAAKA,OAAL,CAAa,aAAb,CAAP;IACD;IAED;AACF;;;;SACE,eAA4B;MAC1B,OAAO,IAAIE,uBAAJ,CAAmB,KAAKC,aAAL,CAAmBC,MAAtC,CAAP;IACD;IAED;AACF;;;;SACE,eAA8B;MAC5B,OAAOC,
|
|
1
|
+
{"version":3,"file":"ProcessStatusSettingsModel.js","names":["ProcessStatusSettingsModel","getContribution","toLowerCase","getData","needed","LinkCollection","contributions","_links","DateUtil","now","conceptLink","links","getLinkByKey","href","addParameter","TIMEVERSION_FILTER_NAME","referenceDate","isCacheable","BaseModel"],"sources":["../../../src/models/process/ProcessStatusSettingsModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\n\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n */\nexport default class ProcessStatusSettingsModel extends BaseModel {\n /**\n */\n get concequenceType(): string {\n return this.getContribution(\"consequenceType\", \"\").toLowerCase();\n }\n\n /**\n */\n get transition(): string {\n return this.getContribution(\"transition\", \"\").toLowerCase();\n }\n\n /**\n */\n get isApplicable(): boolean {\n return this.getData(\"applicable\", false);\n }\n\n /**\n */\n get isCompleted(): boolean {\n return this.getData(\"completed\", false);\n }\n\n /**\n */\n get isNeeded(): boolean | null {\n const needed = this.getData(\"needed\", \"unknown\");\n\n if (needed === \"unknown\") {\n return null;\n }\n\n return needed === \"true\";\n }\n\n /**\n */\n get state(): string | null {\n return this.getData(\"state\");\n }\n\n /**\n */\n get canComplete(): boolean | null {\n return this.getData(\"canComplete\");\n }\n\n /**\n */\n get links(): LinkCollection {\n return new LinkCollection(this.contributions._links);\n }\n\n /**\n */\n get referenceDate(): ISO_DATE {\n return DateUtil.now();\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;;;;;AAIA;AACA;IACqBA,0B;;;;;;;;;;;;;IACnB;AACF;IACE,eAA8B;MAC5B,OAAO,KAAKC,eAAL,CAAqB,iBAArB,EAAwC,EAAxC,EAA4CC,WAA5C,EAAP;IACD;IAED;AACF;;;;SACE,eAAyB;MACvB,OAAO,KAAKD,eAAL,CAAqB,YAArB,EAAmC,EAAnC,EAAuCC,WAAvC,EAAP;IACD;IAED;AACF;;;;SACE,eAA4B;MAC1B,OAAO,KAAKC,OAAL,CAAa,YAAb,EAA2B,KAA3B,CAAP;IACD;IAED;AACF;;;;SACE,eAA2B;MACzB,OAAO,KAAKA,OAAL,CAAa,WAAb,EAA0B,KAA1B,CAAP;IACD;IAED;AACF;;;;SACE,eAA+B;MAC7B,IAAMC,MAAM,GAAG,KAAKD,OAAL,CAAa,QAAb,EAAuB,SAAvB,CAAf;;MAEA,IAAIC,MAAM,KAAK,SAAf,EAA0B;QACxB,OAAO,IAAP;MACD;;MAED,OAAOA,MAAM,KAAK,MAAlB;IACD;IAED;AACF;;;;SACE,eAA2B;MACzB,OAAO,KAAKD,OAAL,CAAa,OAAb,CAAP;IACD;IAED;AACF;;;;SACE,eAAkC;MAChC,OAAO,KAAKA,OAAL,CAAa,aAAb,CAAP;IACD;IAED;AACF;;;;SACE,eAA4B;MAC1B,OAAO,IAAIE,uBAAJ,CAAmB,KAAKC,aAAL,CAAmBC,MAAtC,CAAP;IACD;IAED;AACF;;;;SACE,eAA8B;MAC5B,OAAOC,sBAAA,CAASC,GAAT,EAAP;IACD;IAED;AACF;AACA;;;;SACE,eAAoC;MAClC,IAAMC,WAAW,GAAG,KAAKC,KAAL,CAAWC,YAAX,CAAwB,SAAxB,CAApB;;MACA,IAAIF,WAAW,KAAK,IAApB,EAA0B;QACxBA,WAAW,CAACG,IAAZ,GAAmBH,WAAW,CAACG,IAAZ,CAAiBC,YAAjB,CACjBC,kCADiB,EAEjB,KAAKC,aAFY,CAAnB;QAKAN,WAAW,CAACO,WAAZ,GAA0B,IAA1B;MACD;;MAED,OAAOP,WAAP;IACD;;;EA5EqDQ,mB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveModel.js","names":["RESOURCE_MODELS","ApplicationModel","TabModel","ListDetailModel","ListModel","GroupingPanelModel","CaseSearchModel","CaseViewModel","DetailModel","TaskGroupModel","FormModel","UserModel","UserProfileModel","UserServicesModel","ModelCatalogModel","ConceptIndexModel","BusinessScenarioModel","ConceptDetailModel","ConceptTypeDetailModel","ContentIndexModel","ContentTOCModel","ContentModel","ContentTypeModel","LookupOptionsModel","resolveModel","data","IllegalArgumentException","contributions","resourceTypeModel","resourceModel","isApplicableModel"],"sources":["../../src/models/resolveModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport ApplicationModel from \"./application/ApplicationModel\";\nimport CaseSearchModel from \"./search/CaseSearchModel\";\nimport CaseViewModel from \"./caseview/CaseViewModel\";\nimport DetailModel from \"./detail/DetailModel\";\nimport FormModel from \"./form/FormModel\";\nimport GroupingPanelModel from \"./panels/GroupingPanelModel\";\nimport ListModel from \"./list/ListModel\";\nimport ListDetailModel from \"./list/ListDetailModel\";\nimport TabModel from \"./tab/TabModel\";\nimport TaskGroupModel from \"./taskgroup/TaskGroupModel\";\nimport UserModel from \"./user/UserModel\";\nimport UserProfileModel from \"./user/UserProfileModel\";\nimport UserServicesModel from \"./user/UserServicesModel\";\nimport ModelCatalogModel from \"./modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"./concepts/ConceptIndexModel\";\nimport BusinessScenarioModel from \"./concepts/BusinessScenarioModel\";\nimport ConceptDetailModel from \"./concepts/ConceptDetailModel\";\nimport ConceptTypeDetailModel from \"./concepts/ConceptTypeDetailModel\";\nimport ContentIndexModel from \"./content/ContentIndexModel\";\nimport ContentTOCModel from \"./content/ContentTOCModel\";\nimport ContentModel from \"./content/ContentModel\";\nimport ContentTypeModel from \"./content/ContentTypeModel\";\nimport LookupOptionsModel from \"./lookup/LookupOptionsModel\";\n\nimport type ModularUIResponse from \"../modularui/ModularUIResponse\";\nimport type { ModularUIModel } from \"./types\";\nimport { IllegalArgumentException } from \"../exceptions\";\n\n/**\n * Mapping of models and resourcetypes\n */\nconst RESOURCE_MODELS = [\n ApplicationModel,\n TabModel,\n ListDetailModel,\n ListModel,\n GroupingPanelModel,\n CaseSearchModel,\n CaseViewModel,\n DetailModel,\n TaskGroupModel,\n FormModel,\n UserModel,\n UserProfileModel,\n UserServicesModel,\n ModelCatalogModel,\n ConceptIndexModel,\n BusinessScenarioModel,\n ConceptDetailModel,\n ConceptTypeDetailModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentModel,\n ContentTypeModel,\n LookupOptionsModel,\n];\n\n/**\n * Resolve a model by resource\n */\nconst resolveModel = (\n data: ModularUIResponse\n): Class<ModularUIModel> | null => {\n if (!data) {\n throw new IllegalArgumentException(\n \"No data or contribution available, cannot resolve model\"\n );\n }\n\n if (!has(data.contributions, \"resourcetype\")) {\n throw new IllegalArgumentException(\n \"Data has wrong format, missing resourcetype in contributions, cannot resolve model\"\n );\n }\n\n const resourceTypeModel = RESOURCE_MODELS.find((resourceModel) =>\n resourceModel.isApplicableModel(data)\n );\n\n if (resourceTypeModel) {\n return resourceTypeModel;\n }\n\n return null;\n};\n\nexport default resolveModel;\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAEA;AACA;AACA;AACA,IAAMA,eAAe,GAAG,CACtBC,yBADsB,EAEtBC,iBAFsB,EAGtBC,wBAHsB,EAItBC,kBAJsB,EAKtBC,2BALsB,EAMtBC,wBANsB,EAOtBC,sBAPsB,EAQtBC,oBARsB,EAStBC,uBATsB,EAUtBC,kBAVsB,EAWtBC,kBAXsB,EAYtBC,yBAZsB,EAatBC,0BAbsB,EActBC,0BAdsB,EAetBC,0BAfsB,EAgBtBC,8BAhBsB,EAiBtBC,2BAjBsB,EAkBtBC,+BAlBsB,EAmBtBC,0BAnBsB,EAoBtBC,wBApBsB,EAqBtBC,qBArBsB,EAsBtBC,yBAtBsB,EAuBtBC,2BAvBsB,CAAxB;AA0BA;AACA;AACA;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBC,IADmB,EAEc;EACjC,IAAI,CAACA,IAAL,EAAW;IACT,MAAM,IAAIC,oCAAJ,CACJ,yDADI,CAAN;EAGD;;EAED,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"resolveModel.js","names":["RESOURCE_MODELS","ApplicationModel","TabModel","ListDetailModel","ListModel","GroupingPanelModel","CaseSearchModel","CaseViewModel","DetailModel","TaskGroupModel","FormModel","UserModel","UserProfileModel","UserServicesModel","ModelCatalogModel","ConceptIndexModel","BusinessScenarioModel","ConceptDetailModel","ConceptTypeDetailModel","ContentIndexModel","ContentTOCModel","ContentModel","ContentTypeModel","LookupOptionsModel","resolveModel","data","IllegalArgumentException","has","contributions","resourceTypeModel","resourceModel","isApplicableModel"],"sources":["../../src/models/resolveModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport ApplicationModel from \"./application/ApplicationModel\";\nimport CaseSearchModel from \"./search/CaseSearchModel\";\nimport CaseViewModel from \"./caseview/CaseViewModel\";\nimport DetailModel from \"./detail/DetailModel\";\nimport FormModel from \"./form/FormModel\";\nimport GroupingPanelModel from \"./panels/GroupingPanelModel\";\nimport ListModel from \"./list/ListModel\";\nimport ListDetailModel from \"./list/ListDetailModel\";\nimport TabModel from \"./tab/TabModel\";\nimport TaskGroupModel from \"./taskgroup/TaskGroupModel\";\nimport UserModel from \"./user/UserModel\";\nimport UserProfileModel from \"./user/UserProfileModel\";\nimport UserServicesModel from \"./user/UserServicesModel\";\nimport ModelCatalogModel from \"./modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"./concepts/ConceptIndexModel\";\nimport BusinessScenarioModel from \"./concepts/BusinessScenarioModel\";\nimport ConceptDetailModel from \"./concepts/ConceptDetailModel\";\nimport ConceptTypeDetailModel from \"./concepts/ConceptTypeDetailModel\";\nimport ContentIndexModel from \"./content/ContentIndexModel\";\nimport ContentTOCModel from \"./content/ContentTOCModel\";\nimport ContentModel from \"./content/ContentModel\";\nimport ContentTypeModel from \"./content/ContentTypeModel\";\nimport LookupOptionsModel from \"./lookup/LookupOptionsModel\";\n\nimport type ModularUIResponse from \"../modularui/ModularUIResponse\";\nimport type { ModularUIModel } from \"./types\";\nimport { IllegalArgumentException } from \"../exceptions\";\n\n/**\n * Mapping of models and resourcetypes\n */\nconst RESOURCE_MODELS = [\n ApplicationModel,\n TabModel,\n ListDetailModel,\n ListModel,\n GroupingPanelModel,\n CaseSearchModel,\n CaseViewModel,\n DetailModel,\n TaskGroupModel,\n FormModel,\n UserModel,\n UserProfileModel,\n UserServicesModel,\n ModelCatalogModel,\n ConceptIndexModel,\n BusinessScenarioModel,\n ConceptDetailModel,\n ConceptTypeDetailModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentModel,\n ContentTypeModel,\n LookupOptionsModel,\n];\n\n/**\n * Resolve a model by resource\n */\nconst resolveModel = (\n data: ModularUIResponse\n): Class<ModularUIModel> | null => {\n if (!data) {\n throw new IllegalArgumentException(\n \"No data or contribution available, cannot resolve model\"\n );\n }\n\n if (!has(data.contributions, \"resourcetype\")) {\n throw new IllegalArgumentException(\n \"Data has wrong format, missing resourcetype in contributions, cannot resolve model\"\n );\n }\n\n const resourceTypeModel = RESOURCE_MODELS.find((resourceModel) =>\n resourceModel.isApplicableModel(data)\n );\n\n if (resourceTypeModel) {\n return resourceTypeModel;\n }\n\n return null;\n};\n\nexport default resolveModel;\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAEA;AACA;AACA;AACA,IAAMA,eAAe,GAAG,CACtBC,yBADsB,EAEtBC,iBAFsB,EAGtBC,wBAHsB,EAItBC,kBAJsB,EAKtBC,2BALsB,EAMtBC,wBANsB,EAOtBC,sBAPsB,EAQtBC,oBARsB,EAStBC,uBATsB,EAUtBC,kBAVsB,EAWtBC,kBAXsB,EAYtBC,yBAZsB,EAatBC,0BAbsB,EActBC,0BAdsB,EAetBC,0BAfsB,EAgBtBC,8BAhBsB,EAiBtBC,2BAjBsB,EAkBtBC,+BAlBsB,EAmBtBC,0BAnBsB,EAoBtBC,wBApBsB,EAqBtBC,qBArBsB,EAsBtBC,yBAtBsB,EAuBtBC,2BAvBsB,CAAxB;AA0BA;AACA;AACA;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBC,IADmB,EAEc;EACjC,IAAI,CAACA,IAAL,EAAW;IACT,MAAM,IAAIC,oCAAJ,CACJ,yDADI,CAAN;EAGD;;EAED,IAAI,CAAC,IAAAC,YAAA,EAAIF,IAAI,CAACG,aAAT,EAAwB,cAAxB,CAAL,EAA8C;IAC5C,MAAM,IAAIF,oCAAJ,CACJ,oFADI,CAAN;EAGD;;EAED,IAAMG,iBAAiB,GAAG,mBAAA7B,eAAe,MAAf,CAAAA,eAAe,EAAM,UAAC8B,aAAD;IAAA,OAC7CA,aAAa,CAACC,iBAAd,CAAgCN,IAAhC,CAD6C;EAAA,CAAN,CAAzC;;EAIA,IAAII,iBAAJ,EAAuB;IACrB,OAAOA,iBAAP;EACD;;EAED,OAAO,IAAP;AACD,CAxBD;;eA0BeL,Y"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortingModel.js","names":["SortingModel","contributions","labels","grouping","currentSort","sorting","collection","attributes","attributeKey","label","group","getGroupByAttributeKey","SortOptionModel","setSelected","option","selected","value","join","split","forEach","sortItem","key","direction","sortorder","optionKey","IllegalArgumentException","oppositeValue","sortOption","getUpdateQuerystring","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort","getUpdateQuerystringBySortOption","BaseCollection"],"sources":["../../../src/models/sorting/SortingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport BaseCollection from \"../base/BaseCollection\";\nimport SortOptionModel from \"../sorting/SortOptionModel\";\nimport ListHref from \"../href/ListHref\";\n\nimport type GroupingModel from \"../grouping/GroupingModel\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\n\n/**\n */\nclass SortingModel extends BaseCollection<SortOptionModel> {\n /**\n */\n constructor(\n contributions: Object,\n labels: { [key: string]: string },\n grouping: GroupingModel,\n currentSort: string\n ) {\n super();\n\n if (has(contributions?.sorting, \"attributes\")) {\n this.collection = contributions.sorting.attributes.map((attributeKey) => {\n const label = labels[attributeKey];\n const group = grouping && grouping.getGroupByAttributeKey(attributeKey);\n\n return new SortOptionModel(attributeKey, label, group);\n });\n\n this.setSelected(currentSort);\n }\n }\n\n /**\n */\n get name(): string {\n return \"sort\";\n }\n\n /**\n */\n get value(): string {\n return this.filter((option) => option.selected)\n .map((option) => option.value)\n .join(\",\");\n }\n\n /**\n */\n get param(): string {\n return this.value;\n }\n\n /**\n */\n get options(): Array<SortOptionModel> {\n return this.collection;\n }\n\n /**\n */\n setSelected(currentSort: string = \"\") {\n currentSort.split(\",\").forEach((sortItem) => {\n const [key, direction] = sortItem.split(\" \");\n\n this.collection.forEach((option) => {\n if (option.key === key) {\n option.selected = true;\n if (direction === \"asc\") {\n option.sortorder = \"asc\";\n } else if (direction === \"desc\") {\n option.sortorder = \"desc\";\n }\n }\n });\n });\n }\n\n /**\n * Retrieve a sort option from the model that can be used in the querystring to set it in the opposite direction\n * For example a sort option in the model with key books and direction descending will be retrieved as 'Books asc'\n */\n getUpdateQuerystring(optionKey: string): string {\n if (!optionKey) {\n throw new IllegalArgumentException(\n \"Missing option key as input argument\"\n );\n }\n\n return this.filter((option) => option.key === optionKey)\n .map((option) =>\n option.key === optionKey ? option.oppositeValue : option.value\n )\n .join(\",\");\n }\n\n /**\n * @see {@link getUpdateQuerystring}\n */\n getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {\n if (!(sortOption instanceof SortOptionModel)) {\n throw new IllegalArgumentException(\n \"Missing SortOptionModel as input argument\"\n );\n }\n\n return this.getUpdateQuerystring(sortOption.key);\n }\n\n /**\n */\n createListHref(listHref: ListHref, sortOption: SortOptionModel): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.getUpdateQuerystringBySortOption(sortOption);\n\n return listhref;\n }\n}\n\nexport default SortingModel;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;AAGA;;;;;;AAEA;AACA;IACMA,Y;;;;;EACJ;AACF;EACE,sBACEC,aADF,EAEEC,MAFF,EAGEC,QAHF,EAIEC,WAJF,EAKE;IAAA;;IAAA;IACA;;IAEA,IAAI,
|
|
1
|
+
{"version":3,"file":"SortingModel.js","names":["SortingModel","contributions","labels","grouping","currentSort","has","sorting","collection","attributes","attributeKey","label","group","getGroupByAttributeKey","SortOptionModel","setSelected","option","selected","value","join","split","forEach","sortItem","key","direction","sortorder","optionKey","IllegalArgumentException","oppositeValue","sortOption","getUpdateQuerystring","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort","getUpdateQuerystringBySortOption","BaseCollection"],"sources":["../../../src/models/sorting/SortingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport BaseCollection from \"../base/BaseCollection\";\nimport SortOptionModel from \"../sorting/SortOptionModel\";\nimport ListHref from \"../href/ListHref\";\n\nimport type GroupingModel from \"../grouping/GroupingModel\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\n\n/**\n */\nclass SortingModel extends BaseCollection<SortOptionModel> {\n /**\n */\n constructor(\n contributions: Object,\n labels: { [key: string]: string },\n grouping: GroupingModel,\n currentSort: string\n ) {\n super();\n\n if (has(contributions?.sorting, \"attributes\")) {\n this.collection = contributions.sorting.attributes.map((attributeKey) => {\n const label = labels[attributeKey];\n const group = grouping && grouping.getGroupByAttributeKey(attributeKey);\n\n return new SortOptionModel(attributeKey, label, group);\n });\n\n this.setSelected(currentSort);\n }\n }\n\n /**\n */\n get name(): string {\n return \"sort\";\n }\n\n /**\n */\n get value(): string {\n return this.filter((option) => option.selected)\n .map((option) => option.value)\n .join(\",\");\n }\n\n /**\n */\n get param(): string {\n return this.value;\n }\n\n /**\n */\n get options(): Array<SortOptionModel> {\n return this.collection;\n }\n\n /**\n */\n setSelected(currentSort: string = \"\") {\n currentSort.split(\",\").forEach((sortItem) => {\n const [key, direction] = sortItem.split(\" \");\n\n this.collection.forEach((option) => {\n if (option.key === key) {\n option.selected = true;\n if (direction === \"asc\") {\n option.sortorder = \"asc\";\n } else if (direction === \"desc\") {\n option.sortorder = \"desc\";\n }\n }\n });\n });\n }\n\n /**\n * Retrieve a sort option from the model that can be used in the querystring to set it in the opposite direction\n * For example a sort option in the model with key books and direction descending will be retrieved as 'Books asc'\n */\n getUpdateQuerystring(optionKey: string): string {\n if (!optionKey) {\n throw new IllegalArgumentException(\n \"Missing option key as input argument\"\n );\n }\n\n return this.filter((option) => option.key === optionKey)\n .map((option) =>\n option.key === optionKey ? option.oppositeValue : option.value\n )\n .join(\",\");\n }\n\n /**\n * @see {@link getUpdateQuerystring}\n */\n getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {\n if (!(sortOption instanceof SortOptionModel)) {\n throw new IllegalArgumentException(\n \"Missing SortOptionModel as input argument\"\n );\n }\n\n return this.getUpdateQuerystring(sortOption.key);\n }\n\n /**\n */\n createListHref(listHref: ListHref, sortOption: SortOptionModel): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.getUpdateQuerystringBySortOption(sortOption);\n\n return listhref;\n }\n}\n\nexport default SortingModel;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;AAGA;;;;;;AAEA;AACA;IACMA,Y;;;;;EACJ;AACF;EACE,sBACEC,aADF,EAEEC,MAFF,EAGEC,QAHF,EAIEC,WAJF,EAKE;IAAA;;IAAA;IACA;;IAEA,IAAI,IAAAC,YAAA,EAAIJ,aAAJ,aAAIA,aAAJ,uBAAIA,aAAa,CAAEK,OAAnB,EAA4B,YAA5B,CAAJ,EAA+C;MAAA;;MAC7C,MAAKC,UAAL,GAAkB,6BAAAN,aAAa,CAACK,OAAd,CAAsBE,UAAtB,iBAAqC,UAACC,YAAD,EAAkB;QACvE,IAAMC,KAAK,GAAGR,MAAM,CAACO,YAAD,CAApB;QACA,IAAME,KAAK,GAAGR,QAAQ,IAAIA,QAAQ,CAACS,sBAAT,CAAgCH,YAAhC,CAA1B;QAEA,OAAO,IAAII,wBAAJ,CAAoBJ,YAApB,EAAkCC,KAAlC,EAAyCC,KAAzC,CAAP;MACD,CALiB,CAAlB;;MAOA,MAAKG,WAAL,CAAiBV,WAAjB;IACD;;IAZD;EAaD;EAED;AACF;;;;;SACE,eAAmB;MACjB,OAAO,MAAP;IACD;IAED;AACF;;;;SACE,eAAoB;MAAA;;MAClB,OAAO,qFAAY,UAACW,MAAD;QAAA,OAAYA,MAAM,CAACC,QAAnB;MAAA,CAAZ,mBACA,UAACD,MAAD;QAAA,OAAYA,MAAM,CAACE,KAA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,IAAI,EAAEA,UAAU,YAAYf,wBAAxB,CAAJ,EAA8C;QAC5C,MAAM,IAAIa,iCAAJ,CACJ,2CADI,CAAN;MAGD;;MAED,OAAO,KAAKG,oBAAL,CAA0BD,UAAU,CAACN,GAArC,CAAP;IACD;IAED;AACF;;;;WACE,wBAAeQ,QAAf,EAAmCF,UAAnC,EAA0E;MACxE,IAAMG,QAAQ,GAAG,IAAIC,iBAAJ,CAAaF,QAAb,CAAjB;MACA,IAAMG,OAAO,GAAGF,QAAQ,CAACG,MAAT,GACZH,QAAQ,CAACI,YAAT,CAAsB,MAAtB,EAA8BJ,QAAQ,CAACG,MAAvC,CADY,GAEZH,QAAQ,CAACI,YAAT,CAAsB,MAAtB,CAFJ;;MAGA,IAAIF,OAAJ,EAAa;QACXF,QAAQ,CAACK,IAAT,GAAgB,CAAhB;MACD;;MACDL,QAAQ,CAACM,IAAT,GAAgB,KAAKC,gCAAL,CAAsCV,UAAtC,CAAhB;MAEA,OAAOG,QAAP;IACD;;;EAhHwBQ,wB;;eAmHZvC,Y"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabModel.js","names":["TabModel","modularuiResponse","createTaskGroupCollection","_actionCollection","ActionCollection","data","actions","contributions","links","getLinksByGroup","all","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","first","taskgroups","taskgroup","taskgroupContributions","taskgroupContribution","name","create","_taskGroupCollection","TaskGroupCollection","getContribution","components","size","hasItems","actionCollection","resourcetype","ResourceModel"],"sources":["../../../src/models/tab/TabModel.js"],"sourcesContent":["// @flow\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Describes a TabModel\n */\nexport default class TabModel extends ResourceModel {\n _actionCollection: ActionCollection;\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get type(): string {\n return \"Tab\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n (data.contributions.resourcetype.endsWith(\"Tab\") ||\n data.contributions.resourcetype.endsWith(\"KnowledgeBank\"))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\", \"actions\").all;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n */\n get searchLink(): ?LinkModel {\n return this.links.getLinksByGroup(\"search\").first;\n }\n\n /**\n */\n createTaskGroupCollection() {\n this.taskGroupCollection = this.data.taskgroups\n ? this.data.taskgroups\n .map((taskgroup) => {\n const taskgroupContributions = this.contributions.taskgroups.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n if (taskgroupContributions) {\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n }\n\n return null;\n })\n .filter((taskgroup) => taskgroup != null)\n : [];\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the label of the tab\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the component links on the tab\n */\n get components(): LinkCollection {\n return this.links.getLinksByGroup(\"component\", \"search\");\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n * Has component links\n */\n hasComponents(): boolean {\n return this.components.size > 0;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection?.hasItems;\n }\n\n /**\n */\n hasActions(): boolean {\n return this.actionCollection && this.actionCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;;;;;AAOA;AACA;AACA;IACqBA,Q;;;;;EAInB;AACF;EACE,kBAAYC,iBAAZ,EAAkD;IAAA;;IAAA;IAChD,0BAAMA,iBAAN;IADgD;IAAA;;IAGhD,MAAKC,yBAAL;;IAEA,MAAKC,iBAAL,GAAyB,IAAIC,yBAAJ,CACvB,MAAKC,IAAL,CAAUC,OADa,EAEvB,MAAKC,aAAL,CAAmBD,OAFI,CAAzB;IALgD;EASjD;EAED;AACF;;;;;SACE,eAAmB;MACjB,OAAO,KAAP;IACD;IAED;AACF;;;;;IASE;AACF;IACE,qCAA8C;MAC5C,OAAO,KAAKE,KAAL,CAAWC,eAAX,CAA2B,WAA3B,EAAwC,SAAxC,EAAmDC,GAA1D;IACD;IAED;AACF;;;;WACE,wBAAeC,MAAf,EAA8C;MAC5C,IAAMC,UAAU,GAAG,EAAnB;;MAEA,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,MAAM,CAACG,MAA3B,EAAmCD,CAAC,EAApC,EAAwC;QACtC,IAAIF,MAAM,CAACE,CAAD,CAAN,YAAqBE,uBAAzB,EAAyC;UACvCH,UAAU,CAACI,IAAX,CAAgBL,MAAM,CAACE,CAAD,CAAtB;QACD;MACF;;MAED,KAAKI,mBAAL,CAAyBC,GAAzB,CAA6BN,UAA7B;IACD;IAED;AACF;;;;SACE,eAA6B;MAC3B,OAAO,KAAKJ,KAAL,CAAWC,eAAX,CAA2B,QAA3B,EAAqCU,KAA5C;IACD;IAED;AACF;;;;WACE,qCAA4B;MAAA;MAAA;MAAA;;MAC1B,KAAKF,mBAAL,GAA2B,KAAKZ,IAAL,CAAUe,UAAV,GACvB,mEAAKf,IAAL,CAAUe,UAAV,kBACO,UAACC,SAAD,EAAe;QAAA;;QAClB,IAAMC,sBAAsB,GAAG
|
|
1
|
+
{"version":3,"file":"TabModel.js","names":["TabModel","modularuiResponse","createTaskGroupCollection","_actionCollection","ActionCollection","data","actions","contributions","links","getLinksByGroup","all","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","first","taskgroups","taskgroup","taskgroupContributions","taskgroupContribution","name","create","_taskGroupCollection","TaskGroupCollection","getContribution","components","size","hasItems","actionCollection","resourcetype","ResourceModel"],"sources":["../../../src/models/tab/TabModel.js"],"sourcesContent":["// @flow\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Describes a TabModel\n */\nexport default class TabModel extends ResourceModel {\n _actionCollection: ActionCollection;\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get type(): string {\n return \"Tab\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n (data.contributions.resourcetype.endsWith(\"Tab\") ||\n data.contributions.resourcetype.endsWith(\"KnowledgeBank\"))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\", \"actions\").all;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n */\n get searchLink(): ?LinkModel {\n return this.links.getLinksByGroup(\"search\").first;\n }\n\n /**\n */\n createTaskGroupCollection() {\n this.taskGroupCollection = this.data.taskgroups\n ? this.data.taskgroups\n .map((taskgroup) => {\n const taskgroupContributions = this.contributions.taskgroups.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n if (taskgroupContributions) {\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n }\n\n return null;\n })\n .filter((taskgroup) => taskgroup != null)\n : [];\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the label of the tab\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the component links on the tab\n */\n get components(): LinkCollection {\n return this.links.getLinksByGroup(\"component\", \"search\");\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n * Has component links\n */\n hasComponents(): boolean {\n return this.components.size > 0;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection?.hasItems;\n }\n\n /**\n */\n hasActions(): boolean {\n return this.actionCollection && this.actionCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAACE,aAAL,CAAmB0B,YAAnB,kBAAyC,eAAzC,CAFF,CADF;IAKD;;;EA/BmCC,uB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileModel.js","names":["UserProfileModel","modularuiResponse","attributeContributions","contributions","attributes","contribution","key","data","_attributeCollection","AttributeCollection","UserModel"],"sources":["../../../src/models/user/UserProfileModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport AttributeCollection from \"../attributes/AttributeCollection\";\n\nimport UserModel from \"./UserModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserProfileModel extends UserModel {\n _attributeCollection: AttributeCollection;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return key !== \"sessiondata\" && has(this.data, key);\n })\n : [];\n\n this._attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions\n );\n }\n\n /**\n */\n get type(): string {\n return \"UserProfile\";\n }\n\n /**\n * returns all the attributes from the attribute collection\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA;;;;;;AAIA;AACA;AACA;IACqBA,gB;;;;;EAGnB;AACF;AACA;EACE,0BAAYC,iBAAZ,EAAkD;IAAA;;IAAA;;IAAA;IAChD,0BAAMA,iBAAN;IADgD;IAGhD,IAAMC,sBAAsB,GAAG,MAAKC,aAAL,CAAmBC,UAAnB,GAC3B,sCAAKD,aAAL,CAAmBC,UAAnB,iBAAqC,UAACC,YAAD,EAAkB;MACrD,mBAAc,mBAAYA,YAAZ,CAAd;MAAA;MAAA,IAAOC,GAAP;;MACA,OAAOA,GAAG,KAAK,aAAR,IAAyB,
|
|
1
|
+
{"version":3,"file":"UserProfileModel.js","names":["UserProfileModel","modularuiResponse","attributeContributions","contributions","attributes","contribution","key","has","data","_attributeCollection","AttributeCollection","UserModel"],"sources":["../../../src/models/user/UserProfileModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport AttributeCollection from \"../attributes/AttributeCollection\";\n\nimport UserModel from \"./UserModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserProfileModel extends UserModel {\n _attributeCollection: AttributeCollection;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return key !== \"sessiondata\" && has(this.data, key);\n })\n : [];\n\n this._attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions\n );\n }\n\n /**\n */\n get type(): string {\n return \"UserProfile\";\n }\n\n /**\n * returns all the attributes from the attribute collection\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA;;;;;;AAIA;AACA;AACA;IACqBA,gB;;;;;EAGnB;AACF;AACA;EACE,0BAAYC,iBAAZ,EAAkD;IAAA;;IAAA;;IAAA;IAChD,0BAAMA,iBAAN;IADgD;IAGhD,IAAMC,sBAAsB,GAAG,MAAKC,aAAL,CAAmBC,UAAnB,GAC3B,sCAAKD,aAAL,CAAmBC,UAAnB,iBAAqC,UAACC,YAAD,EAAkB;MACrD,mBAAc,mBAAYA,YAAZ,CAAd;MAAA;MAAA,IAAOC,GAAP;;MACA,OAAOA,GAAG,KAAK,aAAR,IAAyB,IAAAC,YAAA,EAAI,MAAKC,IAAT,EAAeF,GAAf,CAAhC;IACD,CAHD,CAD2B,GAK3B,EALJ;IAOA,MAAKG,oBAAL,GAA4B,IAAIC,4BAAJ,CAC1B,MAAKF,IADqB,EAE1BN,sBAF0B,CAA5B;IAVgD;EAcjD;EAED;AACF;;;;;SACE,eAAmB;MACjB,OAAO,aAAP;IACD;IAED;AACF;AACA;;;;SACE,eAA+C;MAC7C,OAAO,KAAKO,oBAAZ;IACD;;;EAjC2CE,mB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserServicesModel.js","names":["UserServicesModel","userData","userLink","models","user","model","type","links","getLinkByKey","_user","UserModel","getContribution","changePasswordLink","href","hasUser","UNSECURE_LINK_COUNT","length","Cache","hasItem","data","contributions","resourcetype","ResourceModel"],"sources":["../../../src/models/user/UserServicesModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport UserModel from \"../user/UserModel\";\n\nimport Cache from \"../../utils/browser/Cache\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\n\n/**\n * UserServicesModel model\n */\nclass UserServicesModel extends ResourceModel {\n _user: ?UserModel;\n\n /**\n */\n get type(): string {\n return \"UserServices\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"user_services\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const userData = this.userLink;\n return userData ? [userData] : [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.user = models.find((model) => model.type === \"User\");\n }\n\n /**\n */\n get userLink(): LinkModel | null {\n return this.links.getLinkByKey(\"Userdata\");\n }\n\n /**\n * return the user model for the current user\n */\n get user(): UserModel | null {\n return this._user || null;\n }\n\n /**\n * Set user data\n */\n set user(model: ?ModularUIModel) {\n this._user = model instanceof UserModel ? model : null;\n }\n\n /**\n * Getting the label of the application\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n */\n get changePassword(): Href | null {\n const changePasswordLink = this.links.getLinkByKey(\"ChangePassword\");\n\n if (changePasswordLink) {\n return changePasswordLink.href;\n }\n\n return null;\n }\n\n // when more than three unsecure links are present (always present: self, contributions and api-docs),\n // the userservice is permitted and thus we have an indication the user is probably\n // logged in\n /**\n */\n get isLoggedIn(): boolean {\n const hasUser = this.user instanceof UserModel;\n\n const UNSECURE_LINK_COUNT = 3;\n return (\n this.links.length > UNSECURE_LINK_COUNT ||\n Cache.hasItem(\"basic\") ||\n hasUser\n );\n }\n}\n\nexport default UserServicesModel;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;;;;;AAOA;AACA;AACA;IACMA,iB;;;;;;;;;;;;;;;;;;;;;;;;IAGJ;AACF;IACE,eAAmB;MACjB,OAAO,cAAP;IACD;IAED;AACF;;;;;IAQE;AACF;IACE,qCAA8C;MAC5C,IAAMC,QAAQ,GAAG,KAAKC,QAAtB;MACA,OAAOD,QAAQ,GAAG,CAACA,QAAD,CAAH,GAAgB,EAA/B;IACD;IAED;AACF;;;;WACE,wBAAeE,MAAf,EAA8C;MAC5C,KAAKC,IAAL,GAAY,mBAAAD,MAAM,MAAN,CAAAA,MAAM,EAAM,UAACE,KAAD;QAAA,OAAWA,KAAK,CAACC,IAAN,KAAe,MAA1B;MAAA,CAAN,CAAlB;IACD;IAED;AACF;;;;SACE,eAAiC;MAC/B,OAAO,KAAKC,KAAL,CAAWC,YAAX,CAAwB,UAAxB,CAAP;IACD;IAED;AACF;AACA;;;;SACE,eAA6B;MAC3B,OAAO,KAAKC,KAAL,IAAc,IAArB;IACD;IAED;AACF;AACA;;SACE,aAASJ,KAAT,EAAiC;MAC/B,KAAKI,KAAL,GAAaJ,KAAK,YAAYK,kBAAjB,GAA6BL,KAA7B,GAAqC,IAAlD;IACD;IAED;AACF;AACA;;;;SACE,eAAoB;MAClB,OAAO,KAAKM,eAAL,CAAqB,OAArB,EAA8B,EAA9B,CAAP;IACD;IAED;AACF;;;;SACE,eAAkC;MAChC,IAAMC,kBAAkB,GAAG,KAAKL,KAAL,CAAWC,YAAX,CAAwB,gBAAxB,CAA3B;;MAEA,IAAII,kBAAJ,EAAwB;QACtB,OAAOA,kBAAkB,CAACC,IAA1B;MACD;;MAED,OAAO,IAAP;IACD,C,CAED;IACA;IACA;;IACA;AACF;;;;SACE,eAA0B;MACxB,IAAMC,OAAO,GAAG,KAAKV,IAAL,YAAqBM,kBAArC;MAEA,IAAMK,mBAAmB,GAAG,CAA5B;MACA,OACE,KAAKR,KAAL,CAAWS,MAAX,GAAoBD,mBAApB,IACAE,
|
|
1
|
+
{"version":3,"file":"UserServicesModel.js","names":["UserServicesModel","userData","userLink","models","user","model","type","links","getLinkByKey","_user","UserModel","getContribution","changePasswordLink","href","hasUser","UNSECURE_LINK_COUNT","length","Cache","hasItem","data","contributions","resourcetype","ResourceModel"],"sources":["../../../src/models/user/UserServicesModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport UserModel from \"../user/UserModel\";\n\nimport Cache from \"../../utils/browser/Cache\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\n\n/**\n * UserServicesModel model\n */\nclass UserServicesModel extends ResourceModel {\n _user: ?UserModel;\n\n /**\n */\n get type(): string {\n return \"UserServices\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"user_services\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const userData = this.userLink;\n return userData ? [userData] : [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.user = models.find((model) => model.type === \"User\");\n }\n\n /**\n */\n get userLink(): LinkModel | null {\n return this.links.getLinkByKey(\"Userdata\");\n }\n\n /**\n * return the user model for the current user\n */\n get user(): UserModel | null {\n return this._user || null;\n }\n\n /**\n * Set user data\n */\n set user(model: ?ModularUIModel) {\n this._user = model instanceof UserModel ? model : null;\n }\n\n /**\n * Getting the label of the application\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n */\n get changePassword(): Href | null {\n const changePasswordLink = this.links.getLinkByKey(\"ChangePassword\");\n\n if (changePasswordLink) {\n return changePasswordLink.href;\n }\n\n return null;\n }\n\n // when more than three unsecure links are present (always present: self, contributions and api-docs),\n // the userservice is permitted and thus we have an indication the user is probably\n // logged in\n /**\n */\n get isLoggedIn(): boolean {\n const hasUser = this.user instanceof UserModel;\n\n const UNSECURE_LINK_COUNT = 3;\n return (\n this.links.length > UNSECURE_LINK_COUNT ||\n Cache.hasItem(\"basic\") ||\n hasUser\n );\n }\n}\n\nexport default UserServicesModel;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;;;;;AAOA;AACA;AACA;IACMA,iB;;;;;;;;;;;;;;;;;;;;;;;;IAGJ;AACF;IACE,eAAmB;MACjB,OAAO,cAAP;IACD;IAED;AACF;;;;;IAQE;AACF;IACE,qCAA8C;MAC5C,IAAMC,QAAQ,GAAG,KAAKC,QAAtB;MACA,OAAOD,QAAQ,GAAG,CAACA,QAAD,CAAH,GAAgB,EAA/B;IACD;IAED;AACF;;;;WACE,wBAAeE,MAAf,EAA8C;MAC5C,KAAKC,IAAL,GAAY,mBAAAD,MAAM,MAAN,CAAAA,MAAM,EAAM,UAACE,KAAD;QAAA,OAAWA,KAAK,CAACC,IAAN,KAAe,MAA1B;MAAA,CAAN,CAAlB;IACD;IAED;AACF;;;;SACE,eAAiC;MAC/B,OAAO,KAAKC,KAAL,CAAWC,YAAX,CAAwB,UAAxB,CAAP;IACD;IAED;AACF;AACA;;;;SACE,eAA6B;MAC3B,OAAO,KAAKC,KAAL,IAAc,IAArB;IACD;IAED;AACF;AACA;;SACE,aAASJ,KAAT,EAAiC;MAC/B,KAAKI,KAAL,GAAaJ,KAAK,YAAYK,kBAAjB,GAA6BL,KAA7B,GAAqC,IAAlD;IACD;IAED;AACF;AACA;;;;SACE,eAAoB;MAClB,OAAO,KAAKM,eAAL,CAAqB,OAArB,EAA8B,EAA9B,CAAP;IACD;IAED;AACF;;;;SACE,eAAkC;MAChC,IAAMC,kBAAkB,GAAG,KAAKL,KAAL,CAAWC,YAAX,CAAwB,gBAAxB,CAA3B;;MAEA,IAAII,kBAAJ,EAAwB;QACtB,OAAOA,kBAAkB,CAACC,IAA1B;MACD;;MAED,OAAO,IAAP;IACD,C,CAED;IACA;IACA;;IACA;AACF;;;;SACE,eAA0B;MACxB,IAAMC,OAAO,GAAG,KAAKV,IAAL,YAAqBM,kBAArC;MAEA,IAAMK,mBAAmB,GAAG,CAA5B;MACA,OACE,KAAKR,KAAL,CAAWS,MAAX,GAAoBD,mBAApB,IACAE,cAAA,CAAMC,OAAN,CAAc,OAAd,CADA,IAEAJ,OAHF;IAKD;;;WAzED,2BAAyBK,IAAzB,EAA2D;MACzD,OACEA,IAAI,CAACC,aAAL,CAAmBC,YAAnB,IACAF,IAAI,CAACC,aAAL,CAAmBC,YAAnB,KAAoC,eAFtC;IAID;;;EAhB6BC,uB;;eAuFjBtB,iB"}
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
11
|
+
|
|
10
12
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
11
13
|
|
|
12
14
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
@@ -42,9 +44,29 @@ var Authenticate = /*#__PURE__*/function () {
|
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
(0, _createClass2.default)(Authenticate, [{
|
|
47
|
+
key: "authenticationType",
|
|
48
|
+
get: function get() {
|
|
49
|
+
var type = (0, _constants.loginType)();
|
|
50
|
+
|
|
51
|
+
if (!type || type === "JAAS") {
|
|
52
|
+
return "JAAS";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if ((0, _includes.default)(type).call(type, "FormClient")) {
|
|
56
|
+
return "PAC4J_FORM";
|
|
57
|
+
} else if ((0, _includes.default)(type).call(type, "BasicClient")) {
|
|
58
|
+
return "PAC4J_BASIC";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
throw new Error("Unsupported login type found: ".concat(type));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
}, {
|
|
45
67
|
key: "isBasicAuthentication",
|
|
46
68
|
get: function get() {
|
|
47
|
-
return this._isBasic;
|
|
69
|
+
return this._isBasic || this.authenticationType === "PAC4J_BASIC";
|
|
48
70
|
}
|
|
49
71
|
/**
|
|
50
72
|
*/
|
|
@@ -86,43 +108,98 @@ var Authenticate = /*#__PURE__*/function () {
|
|
|
86
108
|
*/
|
|
87
109
|
|
|
88
110
|
}, {
|
|
89
|
-
key: "
|
|
90
|
-
value: function
|
|
91
|
-
|
|
111
|
+
key: "login",
|
|
112
|
+
value: function login(username, password) {
|
|
113
|
+
switch (this.authenticationType) {
|
|
114
|
+
case "PAC4J_FORM":
|
|
115
|
+
return this.doFormLogin(username, password);
|
|
116
|
+
|
|
117
|
+
case "PAC4J_BASIC":
|
|
118
|
+
return this.doBasicAuthentication(username, password);
|
|
119
|
+
|
|
120
|
+
default:
|
|
121
|
+
return this.doJaasAuthentication(username, password);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
}, {
|
|
128
|
+
key: "getFormLoginUrl",
|
|
129
|
+
value: function getFormLoginUrl() {
|
|
130
|
+
var _context;
|
|
131
|
+
|
|
132
|
+
switch (this.authenticationType) {
|
|
133
|
+
case "PAC4J_BASIC":
|
|
134
|
+
case "PAC4J_FORM":
|
|
135
|
+
return (0, _concat.default)(_context = "".concat(_Constants.BASE)).call(_context, (0, _constants.loginPath)());
|
|
136
|
+
|
|
137
|
+
default:
|
|
138
|
+
return "".concat(_Constants.BASE, "/j_security_check");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
}, {
|
|
145
|
+
key: "getFormLoginData",
|
|
146
|
+
value: function getFormLoginData(username, password) {
|
|
147
|
+
var _context2, _context3, _context4, _context5;
|
|
92
148
|
|
|
93
|
-
var LOGIN_PATH = (0, _constants.loginPath)();
|
|
94
|
-
var usernameField = (0, _constants.loginUsernameField)();
|
|
95
|
-
var passwordField = (0, _constants.loginPasswordField)();
|
|
96
149
|
var encodedUsername = encodeURIComponent(username);
|
|
97
150
|
var encodedPassword = encodeURIComponent(password);
|
|
98
|
-
|
|
99
|
-
|
|
151
|
+
|
|
152
|
+
switch (this.authenticationType) {
|
|
153
|
+
case "PAC4J_BASIC":
|
|
154
|
+
case "PAC4J_FORM":
|
|
155
|
+
return (0, _concat.default)(_context2 = (0, _concat.default)(_context3 = (0, _concat.default)(_context4 = "".concat((0, _constants.loginUsernameField)(), "=")).call(_context4, encodedUsername, "&")).call(_context3, (0, _constants.loginPasswordField)(), "=")).call(_context2, encodedPassword);
|
|
156
|
+
|
|
157
|
+
default:
|
|
158
|
+
return (0, _concat.default)(_context5 = "j_username=".concat(encodedUsername, "&j_password=")).call(_context5, encodedPassword);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
}, {
|
|
165
|
+
key: "doFormLogin",
|
|
166
|
+
value: function doFormLogin(username, password) {
|
|
167
|
+
return (0, _universalFetch.default)({
|
|
168
|
+
url: this.getFormLoginUrl(),
|
|
100
169
|
method: _Constants.HTTP_METHODS.POST,
|
|
101
170
|
headers: {
|
|
102
171
|
Accept: "application/json",
|
|
103
172
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
104
173
|
},
|
|
105
|
-
data:
|
|
106
|
-
};
|
|
174
|
+
data: this.getFormLoginData(username, password)
|
|
175
|
+
});
|
|
107
176
|
}
|
|
108
177
|
/**
|
|
109
178
|
*/
|
|
110
179
|
|
|
111
180
|
}, {
|
|
112
|
-
key: "
|
|
113
|
-
value: function
|
|
181
|
+
key: "doBasicAuthentication",
|
|
182
|
+
value: function doBasicAuthentication(username, password) {
|
|
183
|
+
var _context6;
|
|
184
|
+
|
|
185
|
+
_Cache.default.addItem("basic", btoa((0, _concat.default)(_context6 = "".concat(username, ":")).call(_context6, password)));
|
|
186
|
+
|
|
187
|
+
return _promise.default.resolve();
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
}, {
|
|
193
|
+
key: "doJaasAuthentication",
|
|
194
|
+
value: function doJaasAuthentication(username, password) {
|
|
114
195
|
var _this2 = this;
|
|
115
196
|
|
|
116
197
|
return this.initLogin(true).then(function () {
|
|
117
198
|
if (_this2.isBasicAuthentication) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
_Cache.default.addItem("basic", btoa((0, _concat.default)(_context4 = "".concat(username, ":")).call(_context4, password)));
|
|
121
|
-
|
|
122
|
-
return _promise.default.resolve();
|
|
199
|
+
return _this2.doBasicAuthentication(username, password);
|
|
123
200
|
}
|
|
124
201
|
|
|
125
|
-
return
|
|
202
|
+
return _this2.doFormLogin(username, password);
|
|
126
203
|
});
|
|
127
204
|
}
|
|
128
205
|
/**
|
|
@@ -131,11 +208,15 @@ var Authenticate = /*#__PURE__*/function () {
|
|
|
131
208
|
}, {
|
|
132
209
|
key: "logout",
|
|
133
210
|
value: function logout() {
|
|
211
|
+
var _context7;
|
|
212
|
+
|
|
134
213
|
return (0, _universalFetch.default)({
|
|
135
|
-
url: (0, _constants.logoutPath)()
|
|
136
|
-
}).then(function () {
|
|
214
|
+
url: (0, _concat.default)(_context7 = "".concat(_Constants.BASE)).call(_context7, (0, _constants.logoutPath)())
|
|
215
|
+
}).then(function (response) {
|
|
137
216
|
// clear cache because of cached contributions
|
|
138
217
|
_Cache.default.clear();
|
|
218
|
+
|
|
219
|
+
return response;
|
|
139
220
|
});
|
|
140
221
|
}
|
|
141
222
|
}]);
|
|
@@ -5,10 +5,10 @@ import universalFetch from "../utils/fetch/universalFetch";
|
|
|
5
5
|
import Cache from "../utils/browser/Cache";
|
|
6
6
|
|
|
7
7
|
import { UnauthorizedException } from "../exceptions";
|
|
8
|
-
import type { RequestOptions } from "../utils/fetch/types";
|
|
9
8
|
import {
|
|
10
|
-
|
|
9
|
+
loginType,
|
|
11
10
|
loginPath,
|
|
11
|
+
loginPasswordField,
|
|
12
12
|
loginUsernameField,
|
|
13
13
|
logoutPath,
|
|
14
14
|
} from "../constants";
|
|
@@ -24,10 +24,27 @@ class Authenticate {
|
|
|
24
24
|
this._isBasic = false;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
*/
|
|
29
|
+
get authenticationType(): "JAAS" | "PAC4J_FORM" | "PAC4J_BASIC" {
|
|
30
|
+
const type = loginType();
|
|
31
|
+
|
|
32
|
+
if (!type || type === "JAAS") {
|
|
33
|
+
return "JAAS";
|
|
34
|
+
}
|
|
35
|
+
if (type.includes("FormClient")) {
|
|
36
|
+
return "PAC4J_FORM";
|
|
37
|
+
} else if (type.includes("BasicClient")) {
|
|
38
|
+
return "PAC4J_BASIC";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
throw new Error(`Unsupported login type found: ${type}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
27
44
|
/**
|
|
28
45
|
*/
|
|
29
46
|
get isBasicAuthentication(): boolean {
|
|
30
|
-
return this._isBasic;
|
|
47
|
+
return this._isBasic || this.authenticationType === "PAC4J_BASIC";
|
|
31
48
|
}
|
|
32
49
|
|
|
33
50
|
/**
|
|
@@ -64,47 +81,85 @@ class Authenticate {
|
|
|
64
81
|
|
|
65
82
|
/**
|
|
66
83
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
login(username: string, password: string): Promise<any> {
|
|
85
|
+
switch (this.authenticationType) {
|
|
86
|
+
case "PAC4J_FORM":
|
|
87
|
+
return this.doFormLogin(username, password);
|
|
88
|
+
case "PAC4J_BASIC":
|
|
89
|
+
return this.doBasicAuthentication(username, password);
|
|
90
|
+
default:
|
|
91
|
+
return this.doJaasAuthentication(username, password);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
*/
|
|
97
|
+
getFormLoginUrl(): string {
|
|
98
|
+
switch (this.authenticationType) {
|
|
99
|
+
case "PAC4J_BASIC":
|
|
100
|
+
case "PAC4J_FORM":
|
|
101
|
+
return `${BASE}${loginPath()}`;
|
|
102
|
+
default:
|
|
103
|
+
return `${BASE}/j_security_check`;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
71
106
|
|
|
107
|
+
/**
|
|
108
|
+
*/
|
|
109
|
+
getFormLoginData(username: string, password: string): string {
|
|
72
110
|
const encodedUsername = encodeURIComponent(username);
|
|
73
111
|
const encodedPassword = encodeURIComponent(password);
|
|
74
112
|
|
|
75
|
-
|
|
76
|
-
|
|
113
|
+
switch (this.authenticationType) {
|
|
114
|
+
case "PAC4J_BASIC":
|
|
115
|
+
case "PAC4J_FORM":
|
|
116
|
+
return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;
|
|
117
|
+
default:
|
|
118
|
+
return `j_username=${encodedUsername}&j_password=${encodedPassword}`;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
*/
|
|
124
|
+
doFormLogin(username: string, password: string): Promise<any> {
|
|
125
|
+
return universalFetch({
|
|
126
|
+
url: this.getFormLoginUrl(),
|
|
77
127
|
method: HTTP_METHODS.POST,
|
|
78
128
|
headers: {
|
|
79
129
|
Accept: "application/json",
|
|
80
130
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
81
131
|
},
|
|
82
|
-
data:
|
|
83
|
-
};
|
|
132
|
+
data: this.getFormLoginData(username, password),
|
|
133
|
+
});
|
|
84
134
|
}
|
|
85
135
|
|
|
86
136
|
/**
|
|
87
137
|
*/
|
|
88
|
-
|
|
138
|
+
doBasicAuthentication(username: string, password: string): Promise<any> {
|
|
139
|
+
Cache.addItem("basic", btoa(`${username}:${password}`));
|
|
140
|
+
return Promise.resolve();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
*/
|
|
145
|
+
doJaasAuthentication(username: string, password: string): Promise<any> {
|
|
89
146
|
return this.initLogin(true).then(() => {
|
|
90
147
|
if (this.isBasicAuthentication) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return Promise.resolve();
|
|
148
|
+
return this.doBasicAuthentication(username, password);
|
|
94
149
|
}
|
|
95
|
-
|
|
96
|
-
return universalFetch(this.createLogin(username, password));
|
|
150
|
+
return this.doFormLogin(username, password);
|
|
97
151
|
});
|
|
98
152
|
}
|
|
99
153
|
|
|
100
154
|
/**
|
|
101
155
|
*/
|
|
102
|
-
logout(): Promise<
|
|
156
|
+
logout(): Promise<any> {
|
|
103
157
|
return universalFetch({
|
|
104
|
-
url: logoutPath()
|
|
105
|
-
}).then(() => {
|
|
158
|
+
url: `${BASE}${logoutPath()}`,
|
|
159
|
+
}).then((response) => {
|
|
106
160
|
// clear cache because of cached contributions
|
|
107
161
|
Cache.clear();
|
|
162
|
+
return response;
|
|
108
163
|
});
|
|
109
164
|
}
|
|
110
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authenticate.js","names":["Authenticate","_isBasic","isBasicAuthentication","initLogin","resolve","url","BASE","method","HTTP_METHODS","GET","headers","Accept","catch","error","UnauthorizedException","username","password","
|
|
1
|
+
{"version":3,"file":"Authenticate.js","names":["Authenticate","_isBasic","type","loginType","Error","authenticationType","isBasicAuthentication","initLogin","resolve","universalFetch","url","BASE","method","HTTP_METHODS","GET","headers","Accept","catch","error","UnauthorizedException","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","loginPath","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","getFormLoginUrl","POST","data","getFormLoginData","Cache","addItem","btoa","then","logoutPath","response","clear"],"sources":["../../src/modularui/Authenticate.js"],"sourcesContent":["// @flow\nimport { BASE, HTTP_METHODS } from \"../constants/Constants\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport Cache from \"../utils/browser/Cache\";\n\nimport { UnauthorizedException } from \"../exceptions\";\nimport {\n loginType,\n loginPath,\n loginPasswordField,\n loginUsernameField,\n logoutPath,\n} from \"../constants\";\n\n/**\n */\nclass Authenticate {\n _isBasic: boolean;\n\n /**\n */\n constructor() {\n this._isBasic = false;\n }\n\n /**\n */\n get authenticationType(): \"JAAS\" | \"PAC4J_FORM\" | \"PAC4J_BASIC\" {\n const type = loginType();\n\n if (!type || type === \"JAAS\") {\n return \"JAAS\";\n }\n if (type.includes(\"FormClient\")) {\n return \"PAC4J_FORM\";\n } else if (type.includes(\"BasicClient\")) {\n return \"PAC4J_BASIC\";\n }\n\n throw new Error(`Unsupported login type found: ${type}`);\n }\n\n /**\n */\n get isBasicAuthentication(): boolean {\n return this._isBasic || this.authenticationType === \"PAC4J_BASIC\";\n }\n\n /**\n */\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasic = isBasicAuthentication;\n }\n\n /**\n */\n initLogin(initLogin: boolean): Promise<any> {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return universalFetch({\n url: `${BASE}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n }).catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n /**\n */\n login(username: string, password: string): Promise<any> {\n switch (this.authenticationType) {\n case \"PAC4J_FORM\":\n return this.doFormLogin(username, password);\n case \"PAC4J_BASIC\":\n return this.doBasicAuthentication(username, password);\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n /**\n */\n getFormLoginUrl(): string {\n switch (this.authenticationType) {\n case \"PAC4J_BASIC\":\n case \"PAC4J_FORM\":\n return `${BASE}${loginPath()}`;\n default:\n return `${BASE}/j_security_check`;\n }\n }\n\n /**\n */\n getFormLoginData(username: string, password: string): string {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case \"PAC4J_BASIC\":\n case \"PAC4J_FORM\":\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n default:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n }\n }\n\n /**\n */\n doFormLogin(username: string, password: string): Promise<any> {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n /**\n */\n doBasicAuthentication(username: string, password: string): Promise<any> {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return Promise.resolve();\n }\n\n /**\n */\n doJaasAuthentication(username: string, password: string): Promise<any> {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n return this.doBasicAuthentication(username, password);\n }\n return this.doFormLogin(username, password);\n });\n }\n\n /**\n */\n logout(): Promise<any> {\n return universalFetch({\n url: `${BASE}${logoutPath()}`,\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n\nexport default Authenticate;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AAQA;AACA;IACMA,Y;EAGJ;AAC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