@zohodesk/library-platform 1.1.10-exp.1 → 1.1.10-exp.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/.DS_Store +0 -0
- package/es/bc/app-context/Properties.js +12 -2
- package/es/bc/sdk/ResourceNamesEnum.js +1 -0
- package/es/bc/zform/Constants.js +11 -1
- package/es/bc/zform/Properties.js +29 -33
- package/es/bc/zform/Symbol.js +1 -3
- package/es/bc/zlist/Properties.js +0 -51
- package/es/bc/zrecord/Constants.js +1 -0
- package/es/cc/fields/currency/Properties.js +2 -1
- package/es/cc/fields/field/Properties.js +14 -8
- package/es/cc/fields/lookup/Properties.js +34 -1
- package/es/cc/fields/text/Properties.js +0 -9
- package/es/cc/form/Properties.js +8 -0
- package/es/cc/form-connected/ExternalConstants.js +3 -0
- package/es/cc/form-connected/Properties.js +19 -11
- package/es/cc/table-connected/SdkContract.js +14 -0
- package/es/cc/table-connected/constants/Events.js +2 -1
- package/es/cc/table-list/row/Properties.js +8 -0
- package/es/index.js +13 -3
- package/es/library/analytics/Analytics.js +36 -0
- package/es/library/analytics/AnalyticsContract.js +13 -0
- package/es/library/analytics/index.js +2 -0
- package/es/library/custom-component/adapters/controllers/Controller.js +9 -0
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +4 -0
- package/es/library/custom-component/adapters/gateways/service/Service.js +2 -0
- package/es/library/custom-component/applications/entities-factory/ComponentFactory.js +12 -9
- package/es/library/custom-component/applications/usecases/DispatchUseCase.js +28 -5
- package/es/library/custom-component/applications/usecases/InitializeUseCase.js +5 -4
- package/es/library/custom-component/applications/usecases/MountUseCase.js +10 -6
- package/es/library/custom-component/applications/usecases/UnmountUseCase.js +6 -5
- package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +23 -18
- package/es/library/custom-component/applications/usecases/UpdateStateUseCase.js +4 -3
- package/es/library/custom-component/domain/entities/Behaviour.js +4 -0
- package/es/library/custom-component/domain/entities/Component.js +89 -83
- package/es/library/custom-component/domain/entities/Properties.js +10 -137
- package/es/library/custom-component/domain/entities/Property.js +29 -0
- package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +65 -28
- package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +26 -13
- package/es/library/custom-component/frameworks/ui/DependencyFactory.js +1 -2
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +2 -1
- package/es/library/dot/components/form/adapters/presenter/TransformState.js +3 -1
- package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +10 -2
- package/es/library/dot/components/form/frameworks/ui/Form.js +2 -0
- package/es/library/dot/components/form/frameworks/ui/FormView.js +8 -4
- package/es/library/dot/components/form/frameworks/ui/sub-components/Footer.js +7 -4
- package/es/library/dot/components/form/frameworks/ui/sub-components/Header.js +7 -4
- package/es/library/dot/components/form-fields/currency/frameworks/ui/Currency.js +3 -3
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/Lookup.js +1 -1
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +12 -4
- package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +3 -0
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +14 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/ErrorState.js +4 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +9 -6
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +4 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Columns.js +4 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +14 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +5 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +5 -3
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +32 -7
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/sub-components/BreadcrumbItem.js +1 -1
- package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/ButtonView.js +2 -2
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +4 -4
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +2 -2
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +2 -2
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +2 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +1 -0
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +1 -1
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +2 -2
- package/es/library/dot/legacy-to-new-arch/textbox/frameworks/ui/TextBoxView.js +2 -2
- package/es/platform/.DS_Store +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SetClientActionsUseCase.js +6 -1
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActionManager.js +58 -19
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActions.js +8 -8
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionFetchResponse.js +0 -0
- package/es/platform/client-actions/cc/action-event-mediator/Properties.js +75 -3
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/MountController.js +1 -1
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/PropertiesChangeController.js +2 -2
- package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +2 -2
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/InitializeUseCase.js +15 -1
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/PropertiesChangeUseCase.js +3 -3
- package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +41 -24
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator.js +3 -1
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +31 -14
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter.js +2 -48
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +3 -11
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer.js +12 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRendererView.js +42 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/MoreActions/MoreActionsRenderer.js +10 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/MoreActions/MoreActionsRendererView.js +79 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.js +12 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +19 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRendererView.js +37 -0
- package/es/platform/client-actions/translators/client-actions-translator/index.js +14 -2
- package/es/platform/client-actions/translators/condition-resolver/index.js +6 -1
- package/es/platform/client-scripts/bc/zclient-scripts-execution/Constants.js +11 -0
- package/es/platform/client-scripts/bc/zclient-scripts-execution/EventHandlers.js +1 -0
- package/es/platform/client-scripts/bc/zclient-scripts-fetch/Constants.js +11 -0
- package/es/platform/client-scripts/bc/zclient-scripts-fetch/EventHandlers.js +1 -0
- package/es/platform/{app-context-behaviour → client-scripts/behaviour/zclient-scripts-execution}/adapters/controllers/AbstractController.js +2 -1
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/ClientScriptExecutionController.js +10 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/SetClientScriptsMappingController.js +10 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/gateways/Repository.js +24 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/gateways/Service.js +9 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/presenters/Presenter.js +21 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/AbstractUseCase.js +15 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/ExecuteClientScriptsUseCase.js +23 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/SetClientScriptsMappingUseCase.js +16 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/ClientScriptExecutor.js +142 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/types/ClientScriptExectionTypeDefintions.js +7 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsExecutionBehaviourFactory.js +12 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsExecutionHandlersFactory.js +30 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsUtils.js +25 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/AbstractController.js +8 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsController.js +27 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsFailureController.js +28 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsNoContentController.js +23 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsStopController.js +21 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsSuccessController.js +28 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/MountController.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/SetClientScriptsController.js +24 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/gateways/Repository.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/gateways/Service.js +19 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/presenters/Presenter.js +16 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/entities-factory/ClientScriptsFactory.js +11 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/entities-factory/ClientScriptsManagerFactory.js +10 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptUseCase.js +33 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsFailureUseCase.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsNoContentUseCase.js +27 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsStopUseCase.js +25 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsSuccessUseCase.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/InitializeUseCase.js +17 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/SetClientScriptsUseCase.js +21 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/ClientScript.js +24 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/ClientScripts.js +41 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/GetClientScriptsStrategy.js +44 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/State.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptEventMappingState.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptModel.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptsModel.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IClientScript.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IClientScripts.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IEvent.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsBehaviourFactory.js +12 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsHandlersFactory.js +47 -0
- package/es/platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema.js +15 -0
- package/es/platform/components/app/adapters/resources/AppResource.js +13 -3
- package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +7 -1
- package/es/platform/components/form-connected/frameworks/FormConnectedView.js +4 -2
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserUpdateController.js +7 -1
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +50 -0
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +216 -2
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +4 -2
- package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +6 -2
- package/es/platform/data-source/http-template/getClientScripts.js +23 -0
- package/es/platform/data-source/http-template/updateSelectedFields.js +1 -1
- package/es/platform/data-source/index.js +14 -11
- package/es/platform/data-source/utils/validation-rules/TransFormValidationRules.js +1 -0
- package/es/platform/sdk/frameworks/Sdk.js +1 -1
- package/es/platform/zdata-source/domain/entities/APITemplate.js +2 -1
- package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +6 -1
- package/es/platform/zform/adapters/controllers/IntializeController.js +4 -2
- package/es/platform/zform/adapters/controllers/MyLayoutSuccessController.js +4 -2
- package/es/platform/zform/adapters/controllers/SubmitValidationCompletedController.js +5 -1
- package/es/platform/zform/adapters/gateway/FormRepository.js +4 -2
- package/es/platform/zform/adapters/gateway/Service.js +2 -0
- package/es/platform/zform/adapters/presenter/FormTranslator.js +21 -15
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +5 -3
- package/es/platform/zform/applications/usecases/InitializeUseCase.js +54 -26
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +7 -7
- package/es/platform/zform/applications/usecases/MyLayoutSuccessUseCase.js +60 -36
- package/es/platform/zform/applications/usecases/SubmitValidationCompletedUseCase.js +12 -8
- package/es/platform/zform/domain/ZForm.js +65 -0
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +11 -2
- package/es/platform/zhttp/adapters/controllers/FetchController.js +5 -1
- package/es/platform/zlist/adapters/gateways/Repository.js +4 -2
- package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +6 -3
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +15 -6
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +30 -19
- package/es/platform/zlist/adapters/presenters/translators/Header.js +5 -6
- package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +4 -2
- package/es/platform/zlist/adapters/presenters/translators/Row.js +5 -3
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +1 -1
- package/es/platform/zlist/domain/entities/List.js +17 -2
- package/package.json +3 -3
- package/es/library/custom-component/applications/usecases/MountUseCase copy.js +0 -28
- package/es/platform/app-context-behaviour/adapters/controllers/InitializeController.js +0 -19
- package/es/platform/app-context-behaviour/adapters/gateways/Service.js +0 -7
- package/es/platform/app-context-behaviour/adapters/presenters/Presenter.js +0 -18
- package/es/platform/app-context-behaviour/adapters/resources/AppResource.js +0 -25
- package/es/platform/app-context-behaviour/applications/AbstractUseCase.js +0 -6
- package/es/platform/app-context-behaviour/applications/usecases/InitializeUseCase.js +0 -15
- package/es/platform/app-context-behaviour/frameworks/EventHandlerFactory.js +0 -25
- package/es/platform/components/form-connected/frameworks/FallbackView.js +0 -23
- package/es/platform/components/form-connected/frameworks/FormFallbackView.js +0 -23
- /package/es/platform/{app-context-behaviour/applications/interfaces/UsecaseDependencies.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionResponse.js} +0 -0
- /package/es/platform/{app-context-behaviour/applications/interfaces/gateways/IService.js → client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/InputDependencies.js} +0 -0
- /package/es/platform/{app-context-behaviour/applications/interfaces/input/InitializeUseCaseInputModel.js → client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/gateways/IRepository.js} +0 -0
- /package/es/platform/{app-context-behaviour → client-scripts/behaviour/zclient-scripts-execution}/applications/interfaces/output/IPresenter.js +0 -0
- /package/es/platform/{app-context-behaviour/applications/interfaces/output/BehaviourState.js → client-scripts/behaviour/zclient-scripts-execution/domain/entities/State.js} +0 -0
- /package/es/platform/{app-context-behaviour/applications/interfaces/resources/ApiHeaderContract.js → client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/InputDependencies.js} +0 -0
- /package/es/platform/{app-context-behaviour/applications/interfaces/resources/ContextContract.js → client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/gateways/IRepository.js} +0 -0
- /package/es/platform/{app-context-behaviour/applications/interfaces/resources/IAppResource.js → client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/output/IPresenter.js} +0 -0
|
@@ -17,7 +17,7 @@ function getLookupUrlConstructions(_ref) {
|
|
|
17
17
|
return `/agent/${orgName}/${departmentName}/${lookupModuleName}/details/${value.id}`;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences) {
|
|
20
|
+
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName) {
|
|
21
21
|
const {
|
|
22
22
|
isCustomField,
|
|
23
23
|
name,
|
|
@@ -32,7 +32,7 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
32
32
|
|
|
33
33
|
let tempValue = undefined;
|
|
34
34
|
let value = isCustomField ? record.cf?.[name] : record[name];
|
|
35
|
-
const actions = ClientActionsTranslator.transform(fieldActions, {
|
|
35
|
+
const actions = ClientActionsTranslator.transform(fieldActions, instanceName, moduleName, {
|
|
36
36
|
field,
|
|
37
37
|
record
|
|
38
38
|
});
|
|
@@ -71,28 +71,39 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
71
71
|
finalValue = fieldToUiValue;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
actions,
|
|
77
|
-
...fieldTranslator(field, tempValue ? tempValue : finalValue, {
|
|
78
|
-
recordId: record.id
|
|
79
|
-
}, context, preferences)
|
|
80
|
-
};
|
|
81
|
-
data.value = fieldEntry.fieldToUIComponentTranslator({
|
|
82
|
-
field,
|
|
83
|
-
record,
|
|
84
|
-
context
|
|
85
|
-
});
|
|
86
|
-
data.type = fieldEntry.UIComponentName;
|
|
87
|
-
return data;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return {
|
|
74
|
+
finalValue = tempValue ? tempValue : finalValue;
|
|
75
|
+
const viewModel = {
|
|
91
76
|
actions,
|
|
92
77
|
...fieldTranslator(field, finalValue, {
|
|
93
78
|
recordId: record.id
|
|
94
79
|
}, context, preferences)
|
|
95
80
|
};
|
|
81
|
+
|
|
82
|
+
if (fieldEntry && typeof fieldEntry === 'object') {
|
|
83
|
+
viewModel.type = fieldEntry.UIComponentName;
|
|
84
|
+
|
|
85
|
+
if (fieldEntry.fieldToUIComponentTranslator) {
|
|
86
|
+
viewModel.value = fieldEntry.fieldToUIComponentTranslator({
|
|
87
|
+
field,
|
|
88
|
+
record,
|
|
89
|
+
context
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (fieldEntry.translator) {
|
|
94
|
+
const newViewModel = fieldEntry.translator({
|
|
95
|
+
viewModel,
|
|
96
|
+
field,
|
|
97
|
+
context
|
|
98
|
+
});
|
|
99
|
+
newViewModel.type = fieldEntry.UIComponentName;
|
|
100
|
+
return newViewModel;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return viewModel;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return viewModel;
|
|
96
107
|
}
|
|
97
108
|
|
|
98
109
|
export default ColumnTranslator;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Alignment } from "../../../../../cc/table-list/data-types/Header";
|
|
2
2
|
import ClientActionsTranslator from "../../../../client-actions/translators/client-actions-translator";
|
|
3
3
|
import { SortOrder } from "../../../../zlist/domain/entities/interfaces/Properties";
|
|
4
4
|
import { i18NProviderUtils } from '@zohodesk/i18n';
|
|
5
5
|
|
|
6
|
-
function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, records) {
|
|
6
|
+
function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, records, instanceName, moduleName) {
|
|
7
7
|
const {
|
|
8
8
|
id,
|
|
9
9
|
name,
|
|
10
10
|
displayLabel,
|
|
11
|
-
isSortable
|
|
12
|
-
type
|
|
11
|
+
isSortable
|
|
13
12
|
} = field;
|
|
14
13
|
const newField = { ...field,
|
|
15
14
|
sort: translateSortBy(field.id, sortBy)
|
|
16
15
|
};
|
|
17
|
-
const transformedActions = ClientActionsTranslator.transform(actions, { ...context,
|
|
16
|
+
const transformedActions = ClientActionsTranslator.transform(actions, instanceName, moduleName, { ...context,
|
|
18
17
|
field: newField,
|
|
19
18
|
recordsLength: records.length.toString()
|
|
20
19
|
});
|
|
@@ -24,7 +23,7 @@ function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, recor
|
|
|
24
23
|
name: name,
|
|
25
24
|
text: displayLabel,
|
|
26
25
|
sortable: isSortable,
|
|
27
|
-
alignment:
|
|
26
|
+
alignment: Alignment.Left,
|
|
28
27
|
width,
|
|
29
28
|
actions: transformedActions
|
|
30
29
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import HeaderTranslator from "./Header";
|
|
2
2
|
export default class HeadersTranslator {
|
|
3
|
-
constructor(fields, actions, context, modifiedWidths, sortBy, records) {
|
|
3
|
+
constructor(fields, actions, context, modifiedWidths, sortBy, records, instanceName, moduleName) {
|
|
4
4
|
this.fields = fields;
|
|
5
5
|
this.actions = actions;
|
|
6
6
|
this.context = context;
|
|
7
7
|
this.modifiedWidths = modifiedWidths;
|
|
8
8
|
this.sortBy = sortBy;
|
|
9
9
|
this.records = records;
|
|
10
|
+
this.instanceName = instanceName;
|
|
11
|
+
this.moduleName = moduleName;
|
|
10
12
|
this.pipe = this.pipe.bind(this);
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -15,7 +17,7 @@ export default class HeadersTranslator {
|
|
|
15
17
|
return [];
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
return this.fields.map(field => HeaderTranslator(field, this.actions, this.context, this.modifiedWidths, this.sortBy, this.records));
|
|
20
|
+
return this.fields.map(field => HeaderTranslator(field, this.actions, this.context, this.modifiedWidths, this.sortBy, this.records, this.instanceName, this.moduleName));
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
pipe(viewModel) {
|
|
@@ -9,14 +9,16 @@ export default function RowTranslator(_ref) {
|
|
|
9
9
|
rowActions,
|
|
10
10
|
fieldActions,
|
|
11
11
|
context,
|
|
12
|
-
preferences
|
|
12
|
+
preferences,
|
|
13
|
+
instanceName,
|
|
14
|
+
moduleName
|
|
13
15
|
} = _ref;
|
|
14
|
-
const actions = ClientActionsTranslator.transform(rowActions, { ...context,
|
|
16
|
+
const actions = ClientActionsTranslator.transform(rowActions, instanceName, moduleName, { ...context,
|
|
15
17
|
record
|
|
16
18
|
});
|
|
17
19
|
return {
|
|
18
20
|
id: record.id,
|
|
19
|
-
columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences)),
|
|
21
|
+
columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName)),
|
|
20
22
|
rowActionLocation: {
|
|
21
23
|
type: rowActionsUiType,
|
|
22
24
|
actions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RowTranslator from "./Row";
|
|
2
2
|
export default class RowsTranslator {
|
|
3
|
-
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions) {
|
|
3
|
+
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName) {
|
|
4
4
|
this.records = records;
|
|
5
5
|
this.fields = fields;
|
|
6
6
|
this.rowActions = rowActions;
|
|
@@ -9,6 +9,8 @@ export default class RowsTranslator {
|
|
|
9
9
|
this.fieldComponentMapping = fieldComponentMapping;
|
|
10
10
|
this.rowActionsUiType = rowActionsUiType;
|
|
11
11
|
this.fieldActions = fieldActions;
|
|
12
|
+
this.instanceName = instanceName;
|
|
13
|
+
this.moduleName = moduleName;
|
|
12
14
|
this.pipe = this.pipe.bind(this);
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -25,7 +27,9 @@ export default class RowsTranslator {
|
|
|
25
27
|
rowActions: this.rowActions,
|
|
26
28
|
fieldActions: this.fieldActions,
|
|
27
29
|
context: this.context,
|
|
28
|
-
preferences: this.preferences
|
|
30
|
+
preferences: this.preferences,
|
|
31
|
+
instanceName: this.instanceName,
|
|
32
|
+
moduleName: this.moduleName
|
|
29
33
|
}));
|
|
30
34
|
}
|
|
31
35
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines-per-function */
|
|
2
|
-
import ClientAction from "../../../../client-actions/behaviour/zclient-actions/domain/entities/ClientAction";
|
|
3
2
|
import { TableListConstants } from "../../../../../cc/table-list";
|
|
4
3
|
import { CheckboxConstants } from "../../../../../cc/checkbox";
|
|
4
|
+
import ClientAction from "../../../../client-actions/behaviour/zclient-actions/domain/entities/ClientAction";
|
|
5
5
|
const CHECKBOX_TOGGLED = CheckboxConstants.CHECKBOX_TOGGLED;
|
|
6
6
|
const TABLE_LIST_TOGGLE_ALL_SELECTION = TableListConstants.TABLE_LIST_TOGGLE_ALL_SELECTION;
|
|
7
7
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RECORD_EXECUTE, RECORD_FETCH_MORE, RECORD_REFETCH, RecordApiActionName } from "../../../../bc/zrecord/Constants";
|
|
2
2
|
import { FIELD_EXECUTE, FIELD_REFETCH } from "../../../../bc/zfield/Constants";
|
|
3
|
-
import { CLIENT_ACTION_TABLE_LIST_COMPONENT_NAME, ZLIST_RECORD_DELETE_SUCCEEDED, ZLIST_RECORD_UPDATE_SUCCEEDED } from "../../../../bc/zlist/Constants";
|
|
4
3
|
import { CLIENTACTION_BEHAVIOUR_EXECUTE } from "../../../client-actions/bc/zclient-actions/Constants";
|
|
4
|
+
import { CLIENT_ACTION_TABLE_LIST_COMPONENT_NAME, ZLIST_RECORD_DELETE_SUCCEEDED, ZLIST_RECORD_UPDATE_SUCCEEDED } from "../../../../bc/zlist/Constants";
|
|
5
5
|
import { SmartTableConstants } from "../../../../cc/table-connected";
|
|
6
6
|
import SortBy from "./SortBy";
|
|
7
|
+
import { CLIENTSCRIPT_FETCH } from "../../../client-scripts/bc/zclient-scripts-fetch/Constants";
|
|
7
8
|
|
|
8
9
|
class List {
|
|
9
10
|
constructor(limit, sortBy, query, context, isReOrderLoading, errorState) {
|
|
@@ -75,7 +76,7 @@ class List {
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
getInitialMountFetchActions() {
|
|
78
|
-
return [this.createRecordsFetchAction(), this.createAvailableFieldsFetchAction(), this.createSelectedFieldsFetchAction(), this.createClientActionsFetchAction()];
|
|
79
|
+
return [this.createRecordsFetchAction(), this.createAvailableFieldsFetchAction(), this.createSelectedFieldsFetchAction(), this.createClientActionsFetchAction(), this.createClientScriptsFetchAction()];
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
shallowDiff(obj1, obj2) {
|
|
@@ -333,6 +334,20 @@ class List {
|
|
|
333
334
|
};
|
|
334
335
|
}
|
|
335
336
|
|
|
337
|
+
createClientScriptsFetchAction() {
|
|
338
|
+
const props = this.createApiProps();
|
|
339
|
+
props.components = 'TableList';
|
|
340
|
+
props.modules = props.moduleName;
|
|
341
|
+
return {
|
|
342
|
+
type: CLIENTSCRIPT_FETCH,
|
|
343
|
+
payload: {
|
|
344
|
+
actionName: 'getClientScripts',
|
|
345
|
+
props,
|
|
346
|
+
apiName: 'clientScripts'
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
|
|
336
351
|
createRecordsRefetchAction(triggerer) {
|
|
337
352
|
const props = this.createApiProps();
|
|
338
353
|
const metaData = triggerer === 'sortBy' && {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/library-platform",
|
|
3
|
-
"version": "1.1.10-exp.
|
|
3
|
+
"version": "1.1.10-exp.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"files": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@typescript-eslint/parser": "^7.11.0",
|
|
43
43
|
"@zoho/SecurityJS": "7.2.4",
|
|
44
44
|
"@zohodesk-private/css-variable-migrator": "^1.0.8",
|
|
45
|
-
"@zohodesk-private/desk-components": "1.
|
|
45
|
+
"@zohodesk-private/desk-components": "1.3.13",
|
|
46
46
|
"@zohodesk-private/dot-registry": "0.0.2",
|
|
47
47
|
"@zohodesk-private/node-plugins": "1.1.9",
|
|
48
48
|
"@zohodesk/a11y": "2.3.6",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"typescript": "4.9.5"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@zohodesk-private/desk-components": "1.
|
|
80
|
+
"@zohodesk-private/desk-components": "1.3.13",
|
|
81
81
|
"@zohodesk-private/dot-registry": "0.0.2",
|
|
82
82
|
"@zohodesk/a11y": "2.3.6",
|
|
83
83
|
"@zohodesk/components": "1.4.5",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
-
|
|
3
|
-
class MountUsecase extends AbstractUseCase {
|
|
4
|
-
execute() {
|
|
5
|
-
const {
|
|
6
|
-
repository,
|
|
7
|
-
presenter,
|
|
8
|
-
eventManager
|
|
9
|
-
} = this.dependencies;
|
|
10
|
-
const component = repository.getComponent();
|
|
11
|
-
const mountAction = component.getMountAction();
|
|
12
|
-
const eventHandlers = component.getEventHandlersWrapper();
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
|
-
eventManager.subscribe(eventHandlers);
|
|
16
|
-
|
|
17
|
-
if (!component.hasBreakingError()) {
|
|
18
|
-
eventManager.dispatch(mountAction);
|
|
19
|
-
}
|
|
20
|
-
} catch (e) {
|
|
21
|
-
component.setError(e);
|
|
22
|
-
presenter.setError(e);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default MountUsecase;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AbstractController } from "./AbstractController";
|
|
2
|
-
export class InitializeController extends AbstractController {
|
|
3
|
-
handle(_ref) {
|
|
4
|
-
let {
|
|
5
|
-
state
|
|
6
|
-
} = _ref;
|
|
7
|
-
const {
|
|
8
|
-
service
|
|
9
|
-
} = this;
|
|
10
|
-
const context = state.properties.context;
|
|
11
|
-
const {
|
|
12
|
-
initializeUseCase
|
|
13
|
-
} = service;
|
|
14
|
-
initializeUseCase.execute({
|
|
15
|
-
context
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// import { State } from '../gateways/State';
|
|
2
|
-
class Presenter {
|
|
3
|
-
updateDependencies(state, updateState) {
|
|
4
|
-
this.state = state;
|
|
5
|
-
this.updateState = updateState;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
updateView(view) {
|
|
9
|
-
this.updateState({ ...this.state,
|
|
10
|
-
behaviours: { ...this.state.behaviours,
|
|
11
|
-
appContext: view
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default Presenter;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AbstractResource } from "../../../sdk/application/interfaces/gateways/AbstractResource";
|
|
2
|
-
|
|
3
|
-
/** Sample Implementation of AppResource */
|
|
4
|
-
export class AppResource extends AbstractResource {
|
|
5
|
-
initialize() {}
|
|
6
|
-
|
|
7
|
-
destroy() {}
|
|
8
|
-
|
|
9
|
-
initializeContext(context) {
|
|
10
|
-
this.context = context;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
initializeApiHeader(headers) {
|
|
14
|
-
this.headers = headers;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getContext() {
|
|
18
|
-
return this.context;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getApiHeader() {
|
|
22
|
-
return this.headers;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AbstractUseCase from "../AbstractUseCase";
|
|
2
|
-
export class InitializeUseCase extends AbstractUseCase {
|
|
3
|
-
execute(_ref) {
|
|
4
|
-
let {
|
|
5
|
-
instanceName
|
|
6
|
-
} = _ref;
|
|
7
|
-
const {
|
|
8
|
-
appResource,
|
|
9
|
-
presenter
|
|
10
|
-
} = this.dependencies;
|
|
11
|
-
const context = appResource.getContext();
|
|
12
|
-
presenter.updateView(context);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import LifeCycleEvents from "../../../cc/component/LifeCycleEventsEnum";
|
|
2
|
-
import ResourceNamesEnum from "../../../bc/sdk/ResourceNamesEnum";
|
|
3
|
-
import { Service } from "../adapters/gateways/Service";
|
|
4
|
-
import { InitializeController } from "../adapters/controllers/InitializeController";
|
|
5
|
-
import { platformSDK } from "../../sdk/frameworks/Sdk";
|
|
6
|
-
import Presenter from "../adapters/presenters/Presenter";
|
|
7
|
-
|
|
8
|
-
class EventHandlerFactory {
|
|
9
|
-
static create() {
|
|
10
|
-
const appResource = platformSDK[ResourceNamesEnum.APP]; // NOTE: here 'app' should match the resource name in the sdk registry
|
|
11
|
-
|
|
12
|
-
const presenter = new Presenter();
|
|
13
|
-
const dependencies = {
|
|
14
|
-
appResource,
|
|
15
|
-
presenter
|
|
16
|
-
};
|
|
17
|
-
const service = new Service(dependencies);
|
|
18
|
-
return {
|
|
19
|
-
[LifeCycleEvents.MOUNT]: new InitializeController(service).handle
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default EventHandlerFactory;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ErrorState from "../../../../library/dot/legacy-to-new-arch/error-state/frameworks/ui/ErrorState";
|
|
3
|
-
import { ErrorCodes } from "../../../../cc/component/ErrorStructure";
|
|
4
|
-
import ErrorTypes from "../../../../cc/error-state/ErrorTypes";
|
|
5
|
-
|
|
6
|
-
function FallbackView(_ref, ref) {
|
|
7
|
-
let {
|
|
8
|
-
error
|
|
9
|
-
} = _ref;
|
|
10
|
-
const map = {
|
|
11
|
-
[ErrorCodes.API_FAILED]: ErrorTypes.UrlNotFound,
|
|
12
|
-
[ErrorCodes.PROPERTY_VALIDATION_FAILED]: ErrorTypes.OopsSomethingMiss,
|
|
13
|
-
[ErrorCodes.EVENT_HANDLER_FAILED]: ErrorTypes.Inconvenience,
|
|
14
|
-
[ErrorCodes.UNKNOWN_ERROR]: ErrorTypes.Inconvenience
|
|
15
|
-
};
|
|
16
|
-
const errorType = map[error.code] === undefined ? ErrorTypes.Inconvenience : map[error.code];
|
|
17
|
-
return /*#__PURE__*/React.createElement(ErrorState, {
|
|
18
|
-
type: errorType,
|
|
19
|
-
getRef: ref
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default /*#__PURE__*/React.forwardRef(FallbackView);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ErrorState from "../../../../library/dot/legacy-to-new-arch/error-state/frameworks/ui/ErrorState";
|
|
3
|
-
import { ErrorCodes } from "../../../../cc/component/ErrorStructure";
|
|
4
|
-
import ErrorTypes from "../../../../cc/error-state/ErrorTypes";
|
|
5
|
-
|
|
6
|
-
function FormFallbackView(_ref, ref) {
|
|
7
|
-
let {
|
|
8
|
-
error
|
|
9
|
-
} = _ref;
|
|
10
|
-
const map = {
|
|
11
|
-
[ErrorCodes.API_FAILED]: ErrorTypes.UrlNotFound,
|
|
12
|
-
[ErrorCodes.PROPERTY_VALIDATION_FAILED]: ErrorTypes.OopsSomethingMiss,
|
|
13
|
-
[ErrorCodes.EVENT_HANDLER_FAILED]: ErrorTypes.Inconvenience,
|
|
14
|
-
[ErrorCodes.UNKNOWN_ERROR]: ErrorTypes.Inconvenience
|
|
15
|
-
};
|
|
16
|
-
const errorType = map[error.code] === undefined ? ErrorTypes.Inconvenience : map[error.code];
|
|
17
|
-
return /*#__PURE__*/React.createElement(ErrorState, {
|
|
18
|
-
type: errorType,
|
|
19
|
-
getRef: ref
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default /*#__PURE__*/React.forwardRef(FormFallbackView);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|