@beinformed/ui 1.25.1 → 1.25.4
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 +18 -0
- package/esm/constants/Constants.js +5 -0
- package/esm/constants/Constants.js.map +1 -1
- package/esm/hooks/useAuthentication.js +5 -5
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +3 -0
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js +7 -0
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js +5 -7
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +9 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/base/BaseModel.js +11 -2
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceModel.js +8 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js +6 -0
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js +6 -0
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +6 -0
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js +6 -0
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js +6 -0
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js +6 -0
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentModel.js +6 -0
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js +6 -0
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/ContentTypeModel.js +6 -0
- package/esm/models/content/ContentTypeModel.js.map +1 -1
- package/esm/models/detail/DetailModel.js +6 -0
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/form/FormModel.js +6 -0
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +45 -16
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/list/ListDetailModel.js +6 -0
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListModel.js +6 -0
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js +6 -0
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js +6 -0
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js +6 -0
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/resolveModel.js +4 -4
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js +6 -0
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/tab/TabModel.js +6 -0
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js +6 -0
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserModel.js +6 -0
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js +6 -0
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js +6 -0
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +38 -11
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/types.js +2 -0
- package/esm/modularui/types.js.map +1 -0
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/utils/fetch/types.js.map +1 -1
- package/lib/constants/Constants.js +7 -1
- package/lib/constants/Constants.js.flow +6 -0
- package/lib/constants/Constants.js.map +1 -1
- package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +1 -1
- package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +1 -1
- package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +2 -2
- package/lib/hooks/useAuthentication.js +4 -4
- package/lib/hooks/useAuthentication.js.flow +17 -5
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useModularUI.js.flow +2 -2
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +3 -0
- package/lib/hooks/useModularUIBasic.js.flow +6 -3
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js +9 -1
- package/lib/hooks/useModularUIModel.js.flow +18 -10
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js +5 -7
- package/lib/hooks/useModularUIRequest.js.flow +12 -11
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +8 -1
- package/lib/models/application/ApplicationModel.js.flow +10 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/base/BaseModel.js +11 -2
- package/lib/models/base/BaseModel.js.flow +12 -3
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js +8 -1
- package/lib/models/base/ResourceModel.js.flow +8 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js +6 -0
- package/lib/models/caseview/CaseViewModel.js.flow +6 -0
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js +6 -0
- package/lib/models/concepts/BusinessScenarioModel.js.flow +6 -0
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js +6 -0
- package/lib/models/concepts/ConceptDetailModel.js.flow +6 -0
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js +6 -0
- package/lib/models/concepts/ConceptIndexModel.js.flow +6 -0
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js +6 -0
- package/lib/models/concepts/ConceptTypeDetailModel.js.flow +6 -0
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js +6 -0
- package/lib/models/content/ContentIndexModel.js.flow +6 -0
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentModel.js +6 -0
- package/lib/models/content/ContentModel.js.flow +6 -0
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js +6 -0
- package/lib/models/content/ContentTOCModel.js.flow +6 -0
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/ContentTypeModel.js +6 -0
- package/lib/models/content/ContentTypeModel.js.flow +6 -0
- package/lib/models/content/ContentTypeModel.js.map +1 -1
- package/lib/models/detail/DetailModel.js +6 -0
- package/lib/models/detail/DetailModel.js.flow +6 -0
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/form/FormModel.js +6 -0
- package/lib/models/form/FormModel.js.flow +6 -0
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +45 -16
- package/lib/models/form/FormObjectModel.js.flow +71 -24
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.repeating.spec.js.flow +4 -0
- package/lib/models/list/ListDetailModel.js +6 -0
- package/lib/models/list/ListDetailModel.js.flow +6 -0
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListModel.js +6 -0
- package/lib/models/list/ListModel.js.flow +6 -0
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js +6 -0
- package/lib/models/lookup/LookupOptionsModel.js.flow +6 -0
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js +6 -0
- package/lib/models/modelcatalog/ModelCatalogModel.js.flow +6 -0
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js +6 -0
- package/lib/models/panels/GroupingPanelModel.js.flow +6 -0
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/resolveModel.js +4 -3
- package/lib/models/resolveModel.js.flow +6 -4
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/search/CaseSearchModel.js +6 -0
- package/lib/models/search/CaseSearchModel.js.flow +6 -0
- package/lib/models/search/CaseSearchModel.js.map +1 -1
- package/lib/models/tab/TabModel.js +6 -0
- package/lib/models/tab/TabModel.js.flow +6 -0
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js +6 -0
- package/lib/models/taskgroup/TaskGroupModel.js.flow +6 -0
- 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/UserModel.js +6 -0
- package/lib/models/user/UserModel.js.flow +6 -0
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js +6 -0
- package/lib/models/user/UserProfileModel.js.flow +6 -0
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js +6 -0
- package/lib/models/user/UserServicesModel.js.flow +6 -0
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +38 -11
- package/lib/modularui/ModularUIRequest.js.flow +65 -17
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/__tests__/ModularUIRequest.spec.js.flow +4 -9
- package/lib/modularui/types.js +2 -0
- package/lib/modularui/types.js.flow +4 -0
- package/lib/modularui/types.js.map +1 -0
- package/lib/redux/_modularui/ModularUIActions.js.flow +4 -4
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.flow +3 -2
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/types.js.flow +4 -3
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.flow +2 -2
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/utils/fetch/types.js.flow +12 -4
- package/lib/utils/fetch/types.js.map +1 -1
- package/package.json +7 -7
- package/src/constants/Constants.js +6 -0
- package/src/hooks/__tests__/UseModularUIModel.spec.js +1 -1
- package/src/hooks/__tests__/useModelCatalog.spec.js +1 -1
- package/src/hooks/__tests__/useModularUIBasic.spec.js +2 -2
- package/src/hooks/useAuthentication.js +17 -5
- package/src/hooks/useModularUI.js +2 -2
- package/src/hooks/useModularUIBasic.js +6 -3
- package/src/hooks/useModularUIModel.js +18 -10
- package/src/hooks/useModularUIRequest.js +12 -11
- package/src/models/application/ApplicationModel.js +10 -1
- package/src/models/base/BaseModel.js +12 -3
- package/src/models/base/ResourceModel.js +8 -1
- package/src/models/caseview/CaseViewModel.js +6 -0
- package/src/models/concepts/BusinessScenarioModel.js +6 -0
- package/src/models/concepts/ConceptDetailModel.js +6 -0
- package/src/models/concepts/ConceptIndexModel.js +6 -0
- package/src/models/concepts/ConceptTypeDetailModel.js +6 -0
- package/src/models/content/ContentIndexModel.js +6 -0
- package/src/models/content/ContentModel.js +6 -0
- package/src/models/content/ContentTOCModel.js +6 -0
- package/src/models/content/ContentTypeModel.js +6 -0
- package/src/models/detail/DetailModel.js +6 -0
- package/src/models/form/FormModel.js +6 -0
- package/src/models/form/FormObjectModel.js +71 -24
- package/src/models/form/__tests__/FormModel.repeating.spec.js +4 -0
- package/src/models/list/ListDetailModel.js +6 -0
- package/src/models/list/ListModel.js +6 -0
- package/src/models/lookup/LookupOptionsModel.js +6 -0
- package/src/models/modelcatalog/ModelCatalogModel.js +6 -0
- package/src/models/panels/GroupingPanelModel.js +6 -0
- package/src/models/resolveModel.js +6 -4
- package/src/models/search/CaseSearchModel.js +6 -0
- package/src/models/tab/TabModel.js +6 -0
- package/src/models/taskgroup/TaskGroupModel.js +6 -0
- package/src/models/types.js +1 -1
- package/src/models/user/UserModel.js +6 -0
- package/src/models/user/UserProfileModel.js +6 -0
- package/src/models/user/UserServicesModel.js +6 -0
- package/src/modularui/ModularUIRequest.js +65 -17
- package/src/modularui/__tests__/ModularUIRequest.spec.js +4 -9
- package/src/modularui/types.js +4 -0
- package/src/redux/_modularui/ModularUIActions.js +4 -4
- package/src/redux/_modularui/ModularUIMiddleware.js +3 -2
- package/src/redux/_modularui/types.js +4 -3
- package/src/redux/_modularui/withModularUI.js +2 -2
- package/src/utils/fetch/types.js +12 -4
- package/types/constants/Constants.d.ts +5 -0
- package/types/models/base/BaseModel.d.ts +12 -3
- package/types/models/base/ResourceModel.d.ts +5 -1
- package/types/models/form/FormObjectModel.d.ts +28 -0
- package/types/models/resolveModel.d.ts +1 -1
- package/types/models/types.d.ts +1 -1
- package/types/modularui/ModularUIRequest.d.ts +15 -7
- package/types/modularui/types.d.ts +2 -0
- package/types/redux/_modularui/types.d.ts +2 -2
- package/types/utils/fetch/types.d.ts +8 -5
|
@@ -51,6 +51,12 @@ export default class TaskGroupModel extends ResourceModel {
|
|
|
51
51
|
return "TaskGroup";
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
*/
|
|
56
|
+
static get modelName(): string {
|
|
57
|
+
return "TaskGroupModel";
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
/**
|
|
55
61
|
*/
|
|
56
62
|
static isApplicableModel(data: ModularUIResponse): boolean {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskGroupModel.js","names":["TaskGroupModel","ResourceModel","constructor","modularuiResponse","_actionCollection","ActionCollection","data","actions","contributions","selfHref","links","getLinkByKey","selflink","href","_key","substring","lastIndexOf","name","create","key","taskgroup","ModularUIResponse","type","isApplicableModel","resourcetype","label","actionCollection"],"sources":["../../../src/models/taskgroup/TaskGroupModel.js"],"sourcesContent":["// @flow\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * TaskGroupModel\n */\nexport default class TaskGroupModel extends ResourceModel {\n _key: string;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n\n const selfHref = this.links.getLinkByKey(\"self\")\n ? this.selflink.href.href\n : null;\n\n this._key = selfHref\n ? selfHref.substring(selfHref.lastIndexOf(\"/\") + 1)\n : this.data.name;\n }\n\n /**\n */\n static create(\n key: string,\n data: Object,\n contributions: Object\n ): TaskGroupModel {\n const taskgroup = new ModularUIResponse();\n taskgroup.key = key;\n taskgroup.data = data;\n taskgroup.contributions = contributions;\n\n return new TaskGroupModel(taskgroup);\n }\n\n /**\n */\n get type(): string {\n return \"TaskGroup\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"TaskGroup\"\n );\n }\n\n /**\n * Get the key of the TaskGroup\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get the label of the TaskGroup\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Retrieve actions of taskgroup\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n}\n"],"mappings":";;;;;;;;AACA;AACA;AAEA;AAEA;AACA;AACA;AACe,MAAMA,cAAc,SAASC,sBAAa,CAAC;EAIxD;AACF;EACEC,WAAW,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC;IAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,CAC3C,IAAI,CAACC,IAAI,CAACC,OAAO,EACjB,IAAI,CAACC,aAAa,CAACD,OAAO,CAC3B;IAED,MAAME,QAAQ,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,MAAM,CAAC,GAC5C,IAAI,CAACC,QAAQ,CAACC,IAAI,CAACA,IAAI,GACvB,IAAI;IAER,IAAI,CAACC,IAAI,GAAGL,QAAQ,GAChBA,QAAQ,CAACM,SAAS,CAACN,QAAQ,CAACO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GACjD,IAAI,CAACV,IAAI,CAACW,IAAI;EACpB;;EAEA;AACF;EACE,OAAOC,MAAM,CACXC,GAAW,EACXb,IAAY,EACZE,aAAqB,EACL;IAChB,MAAMY,SAAS,GAAG,IAAIC,0BAAiB,EAAE;IACzCD,SAAS,CAACD,GAAG,GAAGA,GAAG;IACnBC,SAAS,CAACd,IAAI,GAAGA,IAAI;IACrBc,SAAS,CAACZ,aAAa,GAAGA,aAAa;IAEvC,OAAO,IAAIR,cAAc,CAACoB,SAAS,CAAC;EACtC;;EAEA;AACF;EACE,IAAIE,IAAI,GAAW;IACjB,OAAO,WAAW;EACpB;;EAEA;AACF;EACE,OAAOC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"TaskGroupModel.js","names":["TaskGroupModel","ResourceModel","constructor","modularuiResponse","_actionCollection","ActionCollection","data","actions","contributions","selfHref","links","getLinkByKey","selflink","href","_key","substring","lastIndexOf","name","create","key","taskgroup","ModularUIResponse","type","modelName","isApplicableModel","resourcetype","label","actionCollection"],"sources":["../../../src/models/taskgroup/TaskGroupModel.js"],"sourcesContent":["// @flow\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * TaskGroupModel\n */\nexport default class TaskGroupModel extends ResourceModel {\n _key: string;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n\n const selfHref = this.links.getLinkByKey(\"self\")\n ? this.selflink.href.href\n : null;\n\n this._key = selfHref\n ? selfHref.substring(selfHref.lastIndexOf(\"/\") + 1)\n : this.data.name;\n }\n\n /**\n */\n static create(\n key: string,\n data: Object,\n contributions: Object\n ): TaskGroupModel {\n const taskgroup = new ModularUIResponse();\n taskgroup.key = key;\n taskgroup.data = data;\n taskgroup.contributions = contributions;\n\n return new TaskGroupModel(taskgroup);\n }\n\n /**\n */\n get type(): string {\n return \"TaskGroup\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TaskGroupModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"TaskGroup\"\n );\n }\n\n /**\n * Get the key of the TaskGroup\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get the label of the TaskGroup\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Retrieve actions of taskgroup\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n}\n"],"mappings":";;;;;;;;AACA;AACA;AAEA;AAEA;AACA;AACA;AACe,MAAMA,cAAc,SAASC,sBAAa,CAAC;EAIxD;AACF;EACEC,WAAW,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC;IAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,CAC3C,IAAI,CAACC,IAAI,CAACC,OAAO,EACjB,IAAI,CAACC,aAAa,CAACD,OAAO,CAC3B;IAED,MAAME,QAAQ,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,MAAM,CAAC,GAC5C,IAAI,CAACC,QAAQ,CAACC,IAAI,CAACA,IAAI,GACvB,IAAI;IAER,IAAI,CAACC,IAAI,GAAGL,QAAQ,GAChBA,QAAQ,CAACM,SAAS,CAACN,QAAQ,CAACO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GACjD,IAAI,CAACV,IAAI,CAACW,IAAI;EACpB;;EAEA;AACF;EACE,OAAOC,MAAM,CACXC,GAAW,EACXb,IAAY,EACZE,aAAqB,EACL;IAChB,MAAMY,SAAS,GAAG,IAAIC,0BAAiB,EAAE;IACzCD,SAAS,CAACD,GAAG,GAAGA,GAAG;IACnBC,SAAS,CAACd,IAAI,GAAGA,IAAI;IACrBc,SAAS,CAACZ,aAAa,GAAGA,aAAa;IAEvC,OAAO,IAAIR,cAAc,CAACoB,SAAS,CAAC;EACtC;;EAEA;AACF;EACE,IAAIE,IAAI,GAAW;IACjB,OAAO,WAAW;EACpB;;EAEA;AACF;EACE,WAAWC,SAAS,GAAW;IAC7B,OAAO,gBAAgB;EACzB;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAAClB,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACE,aAAa,CAACiB,YAAY,IAC/BnB,IAAI,CAACE,aAAa,CAACiB,YAAY,KAAK,WAAW;EAEnD;;EAEA;AACF;AACA;EACE,IAAIN,GAAG,GAAW;IAChB,OAAO,IAAI,CAACL,IAAI;EAClB;;EAEA;AACF;AACA;EACE,IAAIY,KAAK,GAAW;IAClB,OAAO,IAAI,CAAClB,aAAa,CAACkB,KAAK;EACjC;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgB,GAAqB;IACvC,OAAO,IAAI,CAACvB,iBAAiB;EAC/B;AACF;AAAC"}
|
package/lib/models/types.js.flow
CHANGED
package/lib/models/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/models/types.js"],"sourcesContent":["// @flow\nimport type ApplicationModel from \"./application/ApplicationModel\";\nimport type BooleanAttributeModel from \"./attributes/BooleanAttributeModel\";\nimport type CaptchaAttributeModel from \"./attributes/CaptchaAttributeModel\";\nimport type ChoiceAttributeModel from \"./attributes/ChoiceAttributeModel\";\nimport type CompositeAttributeModel from \"./attributes/CompositeAttributeModel\";\nimport type DatetimeAttributeModel from \"./attributes/DatetimeAttributeModel\";\nimport type HelptextAttributeModel from \"./attributes/HelptextAttributeModel\";\nimport type LabelAttributeModel from \"./attributes/LabelAttributeModel\";\nimport type MemoAttributeModel from \"./attributes/MemoAttributeModel\";\nimport type MoneyAttributeModel from \"./attributes/MoneyAttributeModel\";\nimport type NumberAttributeModel from \"./attributes/NumberAttributeModel\";\nimport type PasswordAttributeModel from \"./attributes/PasswordAttributeModel\";\nimport type StringAttributeModel from \"./attributes/StringAttributeModel\";\nimport type UploadAttributeModel from \"./attributes/UploadAttributeModel\";\nimport type XMLAttributeModel from \"./attributes/XMLAttributeModel\";\nimport type CaseViewModel from \"./caseview/CaseViewModel\";\nimport type BusinessScenarioModel from \"./concepts/BusinessScenarioModel\";\nimport type ConceptDetailModel from \"./concepts/ConceptDetailModel\";\nimport type ConceptIndexModel from \"./concepts/ConceptIndexModel\";\nimport type ConceptTypeDetailModel from \"./concepts/ConceptTypeDetailModel\";\nimport type ContentIndexModel from \"./content/ContentIndexModel\";\nimport type ContentModel from \"./content/ContentModel\";\nimport type SectionModel from \"./content/SectionModel\";\nimport type ContentTOCModel from \"./content/ContentTOCModel\";\nimport type ContentTypeModel from \"./content/ContentTypeModel\";\nimport type DetailModel from \"./detail/DetailModel\";\nimport type AssignmentFilterModel from \"./filters/AssignmentFilterModel\";\nimport type FilterModel from \"./filters/FilterModel\";\nimport type RangeFilterModel from \"./filters/RangeFilterModel\";\nimport type ConceptIndexFilterModel from \"./filters/ConceptIndexFilterModel\";\nimport type FormModel from \"./form/FormModel\";\nimport type ListDetailModel from \"./list/ListDetailModel\";\nimport type ListModel from \"./list/ListModel\";\nimport type ModelCatalogModel from \"./modelcatalog/ModelCatalogModel\";\nimport type GroupingPanelModel from \"./panels/GroupingPanelModel\";\nimport type CaseSearchModel from \"./search/CaseSearchModel\";\nimport type TabModel from \"./tab/TabModel\";\nimport type TaskGroupModel from \"./taskgroup/TaskGroupModel\";\nimport type UserModel from \"./user/UserModel\";\nimport type UserServicesModel from \"./user/UserServicesModel\";\nimport type LinkModel from \"./links/LinkModel\";\nimport type LookupOptionsModel from \"./lookup/LookupOptionsModel\";\nimport type BaseFilterModel from \"./filters/BaseFilterModel\";\nimport type AttributeCollection from \"./attributes/AttributeCollection\";\nimport type AttributeModel from \"./attributes/AttributeModel\";\nimport type LayoutHintCollection from \"./layouthint/LayoutHintCollection\";\n\nexport type ModularUIModel =\n | ApplicationModel\n | CaseSearchModel\n | CaseViewModel\n | ListDetailModel\n | DetailModel\n | FormModel\n | GroupingPanelModel\n | ListModel\n | TabModel\n | TaskGroupModel\n | UserModel\n | UserServicesModel\n | ModelCatalogModel\n | ConceptIndexModel\n | ConceptDetailModel\n | BusinessScenarioModel\n | ConceptTypeDetailModel\n | ContentIndexModel\n | ContentTOCModel\n | ContentModel\n | ContentTypeModel\n | LookupOptionsModel;\n\nexport type AttributeType =\n | BooleanAttributeModel\n | CaptchaAttributeModel\n | ChoiceAttributeModel\n | DatetimeAttributeModel\n | HelptextAttributeModel\n | LabelAttributeModel\n | MemoAttributeModel\n | MoneyAttributeModel\n | NumberAttributeModel\n | PasswordAttributeModel\n | CompositeAttributeModel\n | StringAttributeModel\n | UploadAttributeModel\n | XMLAttributeModel;\n\nexport type RangeChildAttributeType =\n | NumberAttributeModel\n | DatetimeAttributeModel;\n\nexport type FilterType =\n | BaseFilterModel\n | FilterModel\n | AssignmentFilterModel\n | RangeFilterModel\n | ConceptIndexFilterModel;\n\nexport type FormErrorAnchor = {\n id: string,\n properties?: {\n [propertyName: string]: string | number,\n },\n anchor?: {\n objectid: string,\n elementid?: string,\n _links?: Object,\n index?: number,\n \"index-identifier\"?: string,\n },\n layouthint: LayoutHintCollection,\n message: string,\n param?: {\n name: string,\n },\n};\n\nexport type labelsJSON = {\n _id: string,\n label: string,\n value: string,\n};\n\nexport type propertyJSON = {\n _id: string,\n type: string,\n mandatory: string,\n label: string,\n value: string,\n};\n\nexport type textfragmentJSON = {\n label: string,\n text: string,\n type: string,\n};\n\nexport interface IConstraintModel {\n +id: string;\n +defaultMessage: string;\n +parameters: Object;\n +isMandatoryConstraint: boolean;\n validate(value: any): boolean;\n hasValidation(): boolean;\n}\n\nexport interface ILayoutHintRule {\n process(attribute: AttributeModel, attributes: AttributeCollection): void;\n}\n\nexport interface IModelWithChildModels {\n getInitialChildModelLinks(): Array<LinkModel>;\n setChildModels(models: Array<ModularUIModel>): void;\n}\n\nexport type AuthenticationType = {\n name: string,\n authentication: string,\n redirectUri
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/models/types.js"],"sourcesContent":["// @flow\nimport type ApplicationModel from \"./application/ApplicationModel\";\nimport type BooleanAttributeModel from \"./attributes/BooleanAttributeModel\";\nimport type CaptchaAttributeModel from \"./attributes/CaptchaAttributeModel\";\nimport type ChoiceAttributeModel from \"./attributes/ChoiceAttributeModel\";\nimport type CompositeAttributeModel from \"./attributes/CompositeAttributeModel\";\nimport type DatetimeAttributeModel from \"./attributes/DatetimeAttributeModel\";\nimport type HelptextAttributeModel from \"./attributes/HelptextAttributeModel\";\nimport type LabelAttributeModel from \"./attributes/LabelAttributeModel\";\nimport type MemoAttributeModel from \"./attributes/MemoAttributeModel\";\nimport type MoneyAttributeModel from \"./attributes/MoneyAttributeModel\";\nimport type NumberAttributeModel from \"./attributes/NumberAttributeModel\";\nimport type PasswordAttributeModel from \"./attributes/PasswordAttributeModel\";\nimport type StringAttributeModel from \"./attributes/StringAttributeModel\";\nimport type UploadAttributeModel from \"./attributes/UploadAttributeModel\";\nimport type XMLAttributeModel from \"./attributes/XMLAttributeModel\";\nimport type CaseViewModel from \"./caseview/CaseViewModel\";\nimport type BusinessScenarioModel from \"./concepts/BusinessScenarioModel\";\nimport type ConceptDetailModel from \"./concepts/ConceptDetailModel\";\nimport type ConceptIndexModel from \"./concepts/ConceptIndexModel\";\nimport type ConceptTypeDetailModel from \"./concepts/ConceptTypeDetailModel\";\nimport type ContentIndexModel from \"./content/ContentIndexModel\";\nimport type ContentModel from \"./content/ContentModel\";\nimport type SectionModel from \"./content/SectionModel\";\nimport type ContentTOCModel from \"./content/ContentTOCModel\";\nimport type ContentTypeModel from \"./content/ContentTypeModel\";\nimport type DetailModel from \"./detail/DetailModel\";\nimport type AssignmentFilterModel from \"./filters/AssignmentFilterModel\";\nimport type FilterModel from \"./filters/FilterModel\";\nimport type RangeFilterModel from \"./filters/RangeFilterModel\";\nimport type ConceptIndexFilterModel from \"./filters/ConceptIndexFilterModel\";\nimport type FormModel from \"./form/FormModel\";\nimport type ListDetailModel from \"./list/ListDetailModel\";\nimport type ListModel from \"./list/ListModel\";\nimport type ModelCatalogModel from \"./modelcatalog/ModelCatalogModel\";\nimport type GroupingPanelModel from \"./panels/GroupingPanelModel\";\nimport type CaseSearchModel from \"./search/CaseSearchModel\";\nimport type TabModel from \"./tab/TabModel\";\nimport type TaskGroupModel from \"./taskgroup/TaskGroupModel\";\nimport type UserModel from \"./user/UserModel\";\nimport type UserServicesModel from \"./user/UserServicesModel\";\nimport type LinkModel from \"./links/LinkModel\";\nimport type LookupOptionsModel from \"./lookup/LookupOptionsModel\";\nimport type BaseFilterModel from \"./filters/BaseFilterModel\";\nimport type AttributeCollection from \"./attributes/AttributeCollection\";\nimport type AttributeModel from \"./attributes/AttributeModel\";\nimport type LayoutHintCollection from \"./layouthint/LayoutHintCollection\";\n\nexport type ModularUIModel =\n | ApplicationModel\n | CaseSearchModel\n | CaseViewModel\n | ListDetailModel\n | DetailModel\n | FormModel\n | GroupingPanelModel\n | ListModel\n | TabModel\n | TaskGroupModel\n | UserModel\n | UserServicesModel\n | ModelCatalogModel\n | ConceptIndexModel\n | ConceptDetailModel\n | BusinessScenarioModel\n | ConceptTypeDetailModel\n | ContentIndexModel\n | ContentTOCModel\n | ContentModel\n | ContentTypeModel\n | LookupOptionsModel;\n\nexport type AttributeType =\n | BooleanAttributeModel\n | CaptchaAttributeModel\n | ChoiceAttributeModel\n | DatetimeAttributeModel\n | HelptextAttributeModel\n | LabelAttributeModel\n | MemoAttributeModel\n | MoneyAttributeModel\n | NumberAttributeModel\n | PasswordAttributeModel\n | CompositeAttributeModel\n | StringAttributeModel\n | UploadAttributeModel\n | XMLAttributeModel;\n\nexport type RangeChildAttributeType =\n | NumberAttributeModel\n | DatetimeAttributeModel;\n\nexport type FilterType =\n | BaseFilterModel\n | FilterModel\n | AssignmentFilterModel\n | RangeFilterModel\n | ConceptIndexFilterModel;\n\nexport type FormErrorAnchor = {\n id: string,\n properties?: {\n [propertyName: string]: string | number,\n },\n anchor?: {\n objectid: string,\n elementid?: string,\n _links?: Object,\n index?: number,\n \"index-identifier\"?: string,\n },\n layouthint: LayoutHintCollection,\n message: string,\n param?: {\n name: string,\n },\n};\n\nexport type labelsJSON = {\n _id: string,\n label: string,\n value: string,\n};\n\nexport type propertyJSON = {\n _id: string,\n type: string,\n mandatory: string,\n label: string,\n value: string,\n};\n\nexport type textfragmentJSON = {\n label: string,\n text: string,\n type: string,\n};\n\nexport interface IConstraintModel {\n +id: string;\n +defaultMessage: string;\n +parameters: Object;\n +isMandatoryConstraint: boolean;\n validate(value: any): boolean;\n hasValidation(): boolean;\n}\n\nexport interface ILayoutHintRule {\n process(attribute: AttributeModel, attributes: AttributeCollection): void;\n}\n\nexport interface IModelWithChildModels {\n getInitialChildModelLinks(): Array<LinkModel>;\n setChildModels(models: Array<ModularUIModel>): void;\n}\n\nexport type AuthenticationType = {\n name: string,\n authentication: string,\n redirectUri?: string,\n isPrimary: boolean,\n};\n\nexport type FileEntryType = {\n name: string,\n size?: number,\n progress: number,\n error?: string,\n token?: string,\n};\n\nexport type FilesType = {\n [filename: string]: FileEntryType,\n};\n\nexport type FiletypeConstraintsType = Array<{|\n extensions: Array<string>,\n mimeTypes: Array<string>,\n|}>;\n\nexport type FilesizeConstraintsType = {\n fileSize: ?number,\n maxTotalFileSize: ?number,\n isMaxTotal: boolean,\n};\n\nexport type PropertyData = { type: string, label: string, value: string };\nexport type TextFragmentData = {\n type: string,\n label: string,\n text: string | { id?: string, message: string, properties?: Object },\n};\nexport type SectionData = {\n id: string,\n type: string,\n label?: string,\n number?: string,\n body: string | { id?: string, message: string, properties?: Object },\n _links: { self: { href: string } },\n childSections: Array<SectionData>,\n subSections: Array<SectionData>,\n};\n\nexport type PropertyElement = {\n propertyElement: {\n label: string,\n layouthint: Array<string>,\n properties: Array<PropertyData>,\n },\n};\nexport type TextFragmentElement = {\n textFragmentElement: {\n label: string,\n layouthint: Array<string>,\n textfragments: Array<TextFragmentData>,\n },\n};\nexport type ContentElement = {\n contentElement: {\n label: string,\n layouthint: Array<string>,\n sections: Array<SectionData>,\n },\n};\n\nexport type PropertyElementMapped = {\n propertyElement: {\n label: string,\n layouthint: LayoutHintCollection,\n properties: Array<PropertyData>,\n },\n};\nexport type TextFragmentElementMapped = {\n textFragmentElement: {\n label: string,\n layouthint: LayoutHintCollection,\n textfragments: Array<TextFragmentData>,\n },\n};\nexport type ContentElementMapped = {\n contentElement: {\n label: string,\n layouthint: LayoutHintCollection,\n sections: Array<SectionModel>,\n },\n};\n\nexport type ContentAll = Array<\n PropertyElementMapped | TextFragmentElementMapped | ContentElementMapped\n>;\n\nexport type ContentData = {\n header: {\n label?: string,\n description?: { id?: string, message: string, properties?: Object },\n },\n label?: string,\n elements: Array<PropertyElement | TextFragmentElement | ContentElement>,\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserModel.js","names":["UserModel","ResourceModel","type","isApplicableModel","data","contributions","resourcetype","username","Username","fullname","Fullname","label"],"sources":["../../../src/models/user/UserModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"User\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"userdata\"\n );\n }\n\n /**\n * Retrieve username of user\n */\n get username(): string {\n return this.data.Username || \"Guest\";\n }\n\n /**\n * retrieve the fullname of the user\n */\n get fullname(): string {\n return this.data.Fullname || \"Guest\";\n }\n\n /**\n */\n get label(): string {\n return this.contributions.label;\n }\n}\n"],"mappings":";;;;;;;AACA;AAIA;AACA;AACA;AACe,MAAMA,SAAS,SAASC,sBAAa,CAAC;EACnD;AACF;EACE,IAAIC,IAAI,GAAW;IACjB,OAAO,MAAM;EACf;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,UAAU;EAElD;;EAEA;AACF;AACA;EACE,IAAIC,QAAQ,GAAW;IACrB,OAAO,IAAI,CAACH,IAAI,CAACI,QAAQ,IAAI,OAAO;EACtC;;EAEA;AACF;AACA;EACE,IAAIC,QAAQ,GAAW;IACrB,OAAO,IAAI,CAACL,IAAI,CAACM,QAAQ,IAAI,OAAO;EACtC;;EAEA;AACF;EACE,IAAIC,KAAK,GAAW;IAClB,OAAO,IAAI,CAACN,aAAa,CAACM,KAAK;EACjC;AACF;AAAC"}
|
|
1
|
+
{"version":3,"file":"UserModel.js","names":["UserModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","username","Username","fullname","Fullname","label"],"sources":["../../../src/models/user/UserModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"User\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"userdata\"\n );\n }\n\n /**\n * Retrieve username of user\n */\n get username(): string {\n return this.data.Username || \"Guest\";\n }\n\n /**\n * retrieve the fullname of the user\n */\n get fullname(): string {\n return this.data.Fullname || \"Guest\";\n }\n\n /**\n */\n get label(): string {\n return this.contributions.label;\n }\n}\n"],"mappings":";;;;;;;AACA;AAIA;AACA;AACA;AACe,MAAMA,SAAS,SAASC,sBAAa,CAAC;EACnD;AACF;EACE,IAAIC,IAAI,GAAW;IACjB,OAAO,MAAM;EACf;;EAEA;AACF;EACE,WAAWC,SAAS,GAAW;IAC7B,OAAO,WAAW;EACpB;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,UAAU;EAElD;;EAEA;AACF;AACA;EACE,IAAIC,QAAQ,GAAW;IACrB,OAAO,IAAI,CAACH,IAAI,CAACI,QAAQ,IAAI,OAAO;EACtC;;EAEA;AACF;AACA;EACE,IAAIC,QAAQ,GAAW;IACrB,OAAO,IAAI,CAACL,IAAI,CAACM,QAAQ,IAAI,OAAO;EACtC;;EAEA;AACF;EACE,IAAIC,KAAK,GAAW;IAClB,OAAO,IAAI,CAACN,aAAa,CAACM,KAAK;EACjC;AACF;AAAC"}
|
|
@@ -41,6 +41,12 @@ class UserProfileModel extends _UserModel.default {
|
|
|
41
41
|
get attributeCollection() {
|
|
42
42
|
return this._attributeCollection;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*/
|
|
47
|
+
static get modelName() {
|
|
48
|
+
return "UserProfileModel";
|
|
49
|
+
}
|
|
44
50
|
}
|
|
45
51
|
exports.default = UserProfileModel;
|
|
46
52
|
//# sourceMappingURL=UserProfileModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileModel.js","names":["UserProfileModel","UserModel","constructor","modularuiResponse","attributeContributions","contributions","attributes","contribution","key","has","data","_attributeCollection","AttributeCollection","type","attributeCollection"],"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;AACe,MAAMA,gBAAgB,SAASC,kBAAS,CAAC;EAGtD;AACF;AACA;EACEC,WAAW,CAACC,iBAAoC,EAAE;IAAA;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC;IAEzB,MAAMC,sBAAsB,GAAG,IAAI,CAACC,aAAa,CAACC,UAAU,GACxD,oCAAI,CAACD,aAAa,CAACC,UAAU,iBAASC,YAAY,IAAK;MACrD,MAAM,CAACC,GAAG,CAAC,GAAG,mBAAYD,YAAY,CAAC;MACvC,OAAOC,GAAG,KAAK,aAAa,IAAI,IAAAC,YAAG,EAAC,IAAI,CAACC,IAAI,EAAEF,GAAG,CAAC;IACrD,CAAC,CAAC,GACF,EAAE;IAEN,IAAI,CAACG,oBAAoB,GAAG,IAAIC,4BAAmB,CACjD,IAAI,CAACF,IAAI,EACTN,sBAAsB,CACvB;EACH;;EAEA;AACF;EACE,IAAIS,IAAI,GAAW;IACjB,OAAO,aAAa;EACtB;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmB,GAAwB;IAC7C,OAAO,IAAI,CAACH,oBAAoB;EAClC;AACF;AAAC"}
|
|
1
|
+
{"version":3,"file":"UserProfileModel.js","names":["UserProfileModel","UserModel","constructor","modularuiResponse","attributeContributions","contributions","attributes","contribution","key","has","data","_attributeCollection","AttributeCollection","type","attributeCollection","modelName"],"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 /**\n */\n static get modelName(): string {\n return \"UserProfileModel\";\n }\n}\n"],"mappings":";;;;;;;;;;AACA;AAEA;AAEA;AAIA;AACA;AACA;AACe,MAAMA,gBAAgB,SAASC,kBAAS,CAAC;EAGtD;AACF;AACA;EACEC,WAAW,CAACC,iBAAoC,EAAE;IAAA;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC;IAEzB,MAAMC,sBAAsB,GAAG,IAAI,CAACC,aAAa,CAACC,UAAU,GACxD,oCAAI,CAACD,aAAa,CAACC,UAAU,iBAASC,YAAY,IAAK;MACrD,MAAM,CAACC,GAAG,CAAC,GAAG,mBAAYD,YAAY,CAAC;MACvC,OAAOC,GAAG,KAAK,aAAa,IAAI,IAAAC,YAAG,EAAC,IAAI,CAACC,IAAI,EAAEF,GAAG,CAAC;IACrD,CAAC,CAAC,GACF,EAAE;IAEN,IAAI,CAACG,oBAAoB,GAAG,IAAIC,4BAAmB,CACjD,IAAI,CAACF,IAAI,EACTN,sBAAsB,CACvB;EACH;;EAEA;AACF;EACE,IAAIS,IAAI,GAAW;IACjB,OAAO,aAAa;EACtB;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmB,GAAwB;IAC7C,OAAO,IAAI,CAACH,oBAAoB;EAClC;;EAEA;AACF;EACE,WAAWI,SAAS,GAAW;IAC7B,OAAO,kBAAkB;EAC3B;AACF;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserServicesModel.js","names":["UserServicesModel","ResourceModel","type","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","userData","userLink","setChildModels","models","user","model","links","getLinkByKey","_user","UserModel","label","getContribution","changePassword","changePasswordLink","href","isLoggedIn","hasUser","UNSECURE_LINK_COUNT","length"],"sources":["../../../src/models/user/UserServicesModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport UserModel from \"../user/UserModel\";\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 this.links.length > UNSECURE_LINK_COUNT || hasUser;\n }\n}\n\nexport default UserServicesModel;\n"],"mappings":";;;;;;;;;AACA;AACA;AAOA;AACA;AACA;AACA,MAAMA,iBAAiB,SAASC,sBAAa,CAAC;EAAA;IAAA;IAAA;EAAA;EAG5C;AACF;EACE,IAAIC,IAAI,GAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,eAAe;EAEvD;;EAEA;AACF;EACEC,yBAAyB,GAAqB;IAC5C,MAAMC,QAAQ,GAAG,IAAI,CAACC,QAAQ;IAC9B,OAAOD,QAAQ,GAAG,CAACA,QAAQ,CAAC,GAAG,EAAE;EACnC;;EAEA;AACF;EACEE,cAAc,CAACC,MAA6B,EAAE;IAC5C,IAAI,CAACC,IAAI,GAAG,mBAAAD,MAAM,OAANA,MAAM,EAAOE,KAAK,IAAKA,KAAK,
|
|
1
|
+
{"version":3,"file":"UserServicesModel.js","names":["UserServicesModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","userData","userLink","setChildModels","models","user","model","links","getLinkByKey","_user","UserModel","label","getContribution","changePassword","changePasswordLink","href","isLoggedIn","hasUser","UNSECURE_LINK_COUNT","length"],"sources":["../../../src/models/user/UserServicesModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport UserModel from \"../user/UserModel\";\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 get modelName(): string {\n return \"UserServicesModel\";\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 this.links.length > UNSECURE_LINK_COUNT || hasUser;\n }\n}\n\nexport default UserServicesModel;\n"],"mappings":";;;;;;;;;AACA;AACA;AAOA;AACA;AACA;AACA,MAAMA,iBAAiB,SAASC,sBAAa,CAAC;EAAA;IAAA;IAAA;EAAA;EAG5C;AACF;EACE,IAAIC,IAAI,GAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,WAAWC,SAAS,GAAW;IAC7B,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,eAAe;EAEvD;;EAEA;AACF;EACEC,yBAAyB,GAAqB;IAC5C,MAAMC,QAAQ,GAAG,IAAI,CAACC,QAAQ;IAC9B,OAAOD,QAAQ,GAAG,CAACA,QAAQ,CAAC,GAAG,EAAE;EACnC;;EAEA;AACF;EACEE,cAAc,CAACC,MAA6B,EAAE;IAC5C,IAAI,CAACC,IAAI,GAAG,mBAAAD,MAAM,OAANA,MAAM,EAAOE,KAAK,IAAKA,KAAK,CAACZ,IAAI,KAAK,MAAM,CAAC;EAC3D;;EAEA;AACF;EACE,IAAIQ,QAAQ,GAAqB;IAC/B,OAAO,IAAI,CAACK,KAAK,CAACC,YAAY,CAAC,UAAU,CAAC;EAC5C;;EAEA;AACF;AACA;EACE,IAAIH,IAAI,GAAqB;IAC3B,OAAO,IAAI,CAACI,KAAK,IAAI,IAAI;EAC3B;;EAEA;AACF;AACA;EACE,IAAIJ,IAAI,CAACC,KAAsB,EAAE;IAC/B,IAAI,CAACG,KAAK,GAAGH,KAAK,YAAYI,kBAAS,GAAGJ,KAAK,GAAG,IAAI;EACxD;;EAEA;AACF;AACA;EACE,IAAIK,KAAK,GAAW;IAClB,OAAO,IAAI,CAACC,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;EAC1C;;EAEA;AACF;EACE,IAAIC,cAAc,GAAgB;IAChC,MAAMC,kBAAkB,GAAG,IAAI,CAACP,KAAK,CAACC,YAAY,CAAC,gBAAgB,CAAC;IAEpE,IAAIM,kBAAkB,EAAE;MACtB,OAAOA,kBAAkB,CAACC,IAAI;IAChC;IAEA,OAAO,IAAI;EACb;;EAEA;EACA;EACA;EACA;AACF;EACE,IAAIC,UAAU,GAAY;IACxB,MAAMC,OAAO,GAAG,IAAI,CAACZ,IAAI,YAAYK,kBAAS;IAE9C,MAAMQ,mBAAmB,GAAG,CAAC;IAC7B,OAAO,IAAI,CAACX,KAAK,CAACY,MAAM,GAAGD,mBAAmB,IAAID,OAAO;EAC3D;AACF;AAAC,eAEczB,iBAAiB;AAAA"}
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
8
9
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
9
10
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
10
11
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
11
12
|
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
12
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
13
13
|
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
14
14
|
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
@@ -129,6 +129,22 @@ class ModularUIRequest {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
*/
|
|
134
|
+
get requestOptions() {
|
|
135
|
+
/* eslint-disable no-unused-vars */
|
|
136
|
+
const {
|
|
137
|
+
targetModel,
|
|
138
|
+
updateModel,
|
|
139
|
+
childmodels,
|
|
140
|
+
isValidationRequest,
|
|
141
|
+
removeOnUnmount,
|
|
142
|
+
...requestOptions
|
|
143
|
+
} = this.options;
|
|
144
|
+
/* eslint-enable no-unused-vars */
|
|
145
|
+
return requestOptions;
|
|
146
|
+
}
|
|
147
|
+
|
|
132
148
|
/**
|
|
133
149
|
*/
|
|
134
150
|
set options(options) {
|
|
@@ -155,14 +171,26 @@ class ModularUIRequest {
|
|
|
155
171
|
|
|
156
172
|
/**
|
|
157
173
|
*/
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
174
|
+
resolveModel() {
|
|
175
|
+
let availableModels;
|
|
176
|
+
if (this.targetModel) {
|
|
177
|
+
availableModels = Array.isArray(this.targetModel) ? [...this.targetModel] : [this.targetModel];
|
|
178
|
+
}
|
|
179
|
+
const Model = (0, _resolveModel.default)(this.response, availableModels);
|
|
162
180
|
if (Model && Model.isApplicableModel) {
|
|
163
|
-
return
|
|
181
|
+
return Model;
|
|
164
182
|
}
|
|
165
|
-
|
|
183
|
+
if (availableModels) {
|
|
184
|
+
throw new _exceptions.IllegalStateException(`data is not applicable for model(s): ${(0, _map.default)(availableModels).call(availableModels, m => m.modelName).join(", ")}`);
|
|
185
|
+
}
|
|
186
|
+
throw new _exceptions.IllegalStateException(`no javascript model is applicable for received response: ${(0, _stringify.default)(this.response)}`);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
*/
|
|
191
|
+
createModel() {
|
|
192
|
+
const Model = this.resolveModel();
|
|
193
|
+
return new Model(this.response);
|
|
166
194
|
}
|
|
167
195
|
|
|
168
196
|
/**
|
|
@@ -246,7 +274,7 @@ class ModularUIRequest {
|
|
|
246
274
|
*/
|
|
247
275
|
fetchDataService() {
|
|
248
276
|
return (0, _universalFetch.default)({
|
|
249
|
-
...this.
|
|
277
|
+
...this.requestOptions,
|
|
250
278
|
url: `${_Constants.BASE}${this.href.path}`,
|
|
251
279
|
params: this.href.getQuerystringForModularUI(),
|
|
252
280
|
locale: this.options.locale,
|
|
@@ -381,7 +409,7 @@ class ModularUIRequest {
|
|
|
381
409
|
isHiddenList(name, href) {
|
|
382
410
|
const HIDE_WHEN_EMPTY_IGNORE_TASKS = (0, _Settings.getSetting)("HIDE_WHEN_EMPTY_IGNORE_TASKS", false);
|
|
383
411
|
return (0, _universalFetch.default)({
|
|
384
|
-
...this.
|
|
412
|
+
...this.requestOptions,
|
|
385
413
|
url: `${_Constants.BASE}${href}`
|
|
386
414
|
}).then(response => {
|
|
387
415
|
if ((0, _objects.isPlainObject)(response)) {
|
|
@@ -437,10 +465,9 @@ class ModularUIRequest {
|
|
|
437
465
|
if (!this.options.isValidationRequest && (0, _Settings.getSetting)("USE_INSTANT_SERVER_VALIDATION") && model instanceof _FormModel.default && model.currentFormObject && model.currentFormObject.hasDynamicValidations) {
|
|
438
466
|
const validationHref = this.href.setParameter("commit", "false");
|
|
439
467
|
return (0, _universalFetch.default)({
|
|
440
|
-
...this.
|
|
468
|
+
...this.requestOptions,
|
|
441
469
|
url: `${_Constants.BASE}${this.href.path}`,
|
|
442
470
|
params: validationHref.getQuerystringForModularUI(),
|
|
443
|
-
childmodels: false,
|
|
444
471
|
data: this.getDynamicValidationData(model)
|
|
445
472
|
}).then(data => {
|
|
446
473
|
if (data == null || typeof data !== "object") {
|
|
@@ -25,7 +25,11 @@ import { IllegalArgumentException, IllegalStateException } from "../exceptions";
|
|
|
25
25
|
|
|
26
26
|
import { isPlainObject } from "../utils/helpers/objects";
|
|
27
27
|
|
|
28
|
-
import type {
|
|
28
|
+
import type { TargetModel } from "./types";
|
|
29
|
+
import type {
|
|
30
|
+
RequestBaseOptions,
|
|
31
|
+
RequestModularUIOptions,
|
|
32
|
+
} from "../utils/fetch/types";
|
|
29
33
|
import type { ModularUIModel } from "../models/types";
|
|
30
34
|
|
|
31
35
|
/**
|
|
@@ -36,8 +40,8 @@ class ModularUIRequest {
|
|
|
36
40
|
_response: ModularUIResponse;
|
|
37
41
|
|
|
38
42
|
_href: Href;
|
|
39
|
-
_options:
|
|
40
|
-
_targetModel: ?
|
|
43
|
+
_options: RequestModularUIOptions;
|
|
44
|
+
_targetModel: ?TargetModel;
|
|
41
45
|
_contributionsHref: string;
|
|
42
46
|
_locale: string;
|
|
43
47
|
_method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;
|
|
@@ -46,7 +50,10 @@ class ModularUIRequest {
|
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
*/
|
|
49
|
-
constructor(
|
|
53
|
+
constructor(
|
|
54
|
+
href: Href | string,
|
|
55
|
+
options: $Shape<RequestModularUIOptions> = {}
|
|
56
|
+
) {
|
|
50
57
|
if (!href) {
|
|
51
58
|
throw new IllegalArgumentException(
|
|
52
59
|
"You must pass a href to the resource that is requested"
|
|
@@ -132,7 +139,7 @@ class ModularUIRequest {
|
|
|
132
139
|
|
|
133
140
|
/**
|
|
134
141
|
*/
|
|
135
|
-
get options():
|
|
142
|
+
get options(): RequestModularUIOptions {
|
|
136
143
|
return {
|
|
137
144
|
...this._options,
|
|
138
145
|
locale: this.locale,
|
|
@@ -142,7 +149,23 @@ class ModularUIRequest {
|
|
|
142
149
|
|
|
143
150
|
/**
|
|
144
151
|
*/
|
|
145
|
-
|
|
152
|
+
get requestOptions(): RequestBaseOptions {
|
|
153
|
+
/* eslint-disable no-unused-vars */
|
|
154
|
+
const {
|
|
155
|
+
targetModel,
|
|
156
|
+
updateModel,
|
|
157
|
+
childmodels,
|
|
158
|
+
isValidationRequest,
|
|
159
|
+
removeOnUnmount,
|
|
160
|
+
...requestOptions
|
|
161
|
+
} = this.options;
|
|
162
|
+
/* eslint-enable no-unused-vars */
|
|
163
|
+
return requestOptions;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
*/
|
|
168
|
+
set options(options: RequestModularUIOptions) {
|
|
146
169
|
this._options = options;
|
|
147
170
|
}
|
|
148
171
|
|
|
@@ -156,31 +179,57 @@ class ModularUIRequest {
|
|
|
156
179
|
|
|
157
180
|
/**
|
|
158
181
|
*/
|
|
159
|
-
set targetModel(targetModel:
|
|
182
|
+
set targetModel(targetModel: TargetModel) {
|
|
160
183
|
this._targetModel = targetModel;
|
|
161
184
|
}
|
|
162
185
|
|
|
163
186
|
/**
|
|
164
187
|
*/
|
|
165
|
-
get targetModel(): ?
|
|
188
|
+
get targetModel(): ?TargetModel {
|
|
166
189
|
return this._targetModel;
|
|
167
190
|
}
|
|
168
191
|
|
|
169
192
|
/**
|
|
170
193
|
*/
|
|
171
|
-
|
|
172
|
-
|
|
194
|
+
resolveModel(): Class<ModularUIModel> {
|
|
195
|
+
let availableModels;
|
|
196
|
+
if (this.targetModel) {
|
|
197
|
+
availableModels = Array.isArray(this.targetModel)
|
|
198
|
+
? [...this.targetModel]
|
|
199
|
+
: [this.targetModel];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const Model: Class<ModularUIModel> | null = resolveModel(
|
|
203
|
+
this.response,
|
|
204
|
+
availableModels
|
|
205
|
+
);
|
|
173
206
|
|
|
174
|
-
// check for ResourceModel
|
|
175
207
|
if (Model && Model.isApplicableModel) {
|
|
176
|
-
return
|
|
208
|
+
return Model;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (availableModels) {
|
|
212
|
+
throw new IllegalStateException(
|
|
213
|
+
`data is not applicable for model(s): ${availableModels
|
|
214
|
+
.map((m) => m.modelName)
|
|
215
|
+
.join(", ")}`
|
|
216
|
+
);
|
|
177
217
|
}
|
|
178
218
|
|
|
179
219
|
throw new IllegalStateException(
|
|
180
|
-
`
|
|
220
|
+
`no javascript model is applicable for received response: ${JSON.stringify(
|
|
221
|
+
this.response
|
|
222
|
+
)}`
|
|
181
223
|
);
|
|
182
224
|
}
|
|
183
225
|
|
|
226
|
+
/**
|
|
227
|
+
*/
|
|
228
|
+
createModel(): ModularUIModel {
|
|
229
|
+
const Model = this.resolveModel();
|
|
230
|
+
return new Model(this.response);
|
|
231
|
+
}
|
|
232
|
+
|
|
184
233
|
/**
|
|
185
234
|
*/
|
|
186
235
|
processContributionsService(contributionsData: Object): void {
|
|
@@ -274,7 +323,7 @@ class ModularUIRequest {
|
|
|
274
323
|
*/
|
|
275
324
|
fetchDataService(): Promise<any> {
|
|
276
325
|
return universalFetch({
|
|
277
|
-
...this.
|
|
326
|
+
...this.requestOptions,
|
|
278
327
|
url: `${BASE}${this.href.path}`,
|
|
279
328
|
params: this.href.getQuerystringForModularUI(),
|
|
280
329
|
locale: this.options.locale,
|
|
@@ -451,7 +500,7 @@ class ModularUIRequest {
|
|
|
451
500
|
);
|
|
452
501
|
|
|
453
502
|
return universalFetch({
|
|
454
|
-
...this.
|
|
503
|
+
...this.requestOptions,
|
|
455
504
|
url: `${BASE}${href}`,
|
|
456
505
|
})
|
|
457
506
|
.then((response: Object) => {
|
|
@@ -519,10 +568,9 @@ class ModularUIRequest {
|
|
|
519
568
|
) {
|
|
520
569
|
const validationHref = this.href.setParameter("commit", "false");
|
|
521
570
|
return universalFetch({
|
|
522
|
-
...this.
|
|
571
|
+
...this.requestOptions,
|
|
523
572
|
url: `${BASE}${this.href.path}`,
|
|
524
573
|
params: validationHref.getQuerystringForModularUI(),
|
|
525
|
-
childmodels: false,
|
|
526
574
|
data: this.getDynamicValidationData(model),
|
|
527
575
|
}).then((data) => {
|
|
528
576
|
if (data == null || typeof data !== "object") {
|