@zohodesk/library-platform 1.1.3 → 1.1.6-temp-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/es/bc/sdk/EventHandlers.js +1 -0
- package/es/bc/sdk/Properties.js +10 -0
- package/es/bc/sdk/ResourceNamesEnum.js +6 -0
- package/es/bc/zform/Properties.js +3 -26
- package/es/bc/zform/Symbol.js +1 -0
- package/es/bc/zhttp/Errors.js +14 -0
- package/es/bc/zhttp/index.js +3 -1
- package/es/bc/zlist/Constants.js +8 -1
- package/es/bc/zlist/Events.js +140 -0
- package/es/bc/zlist/index.js +2 -1
- package/es/bc/zrecord/Constants.js +3 -1
- package/es/cc/action-icon/Properties.js +19 -1
- package/es/cc/action-location/Constants.js +5 -3
- package/es/cc/architecture/LifeCycleActionEnum.js +2 -8
- package/es/cc/button/Constants.js +7 -0
- package/es/cc/button/Events.js +5 -0
- package/es/cc/button/Properties.js +77 -0
- package/es/cc/button/index.js +3 -0
- package/es/cc/component/FallbackView.js +1 -0
- package/es/cc/component/LifeCycleEventsEnum.js +9 -0
- package/es/cc/fields/currency/Model.js +2 -0
- package/es/cc/fields/field/FormDefaultUIType.js +37 -0
- package/es/cc/fields/field/Properties.js +1 -1
- package/es/cc/fields/formula/Model.js +5 -0
- package/es/cc/form/Constants.js +2 -0
- package/es/cc/form/Events.js +20 -0
- package/es/cc/form-connected/Constants.js +13 -0
- package/es/cc/form-connected/Properties.js +43 -1
- package/es/cc/index.js +4 -0
- package/es/cc/link/Properties.js +0 -1
- package/es/cc/list-item/Constants.js +7 -0
- package/es/cc/list-item/Events.js +14 -0
- package/es/cc/list-item/Properties.js +131 -0
- package/es/cc/list-item/index.js +3 -0
- package/es/cc/more-dropdown/Constants.js +7 -0
- package/es/cc/more-dropdown/Events.js +14 -0
- package/es/cc/more-dropdown/Properties.js +66 -0
- package/es/cc/more-dropdown/index.js +3 -0
- package/es/cc/section/Constants.js +2 -0
- package/es/cc/section/Events.js +20 -0
- package/es/cc/section/Properties.js +16 -0
- package/es/cc/switch/Properties.js +2 -2
- package/es/cc/table-connected/ErrorEventType.js +32 -0
- package/es/cc/table-connected/Events.js +96 -0
- package/es/cc/table-connected/Properties.js +16 -0
- package/es/cc/table-connected/SdkContract.js +132 -0
- package/es/cc/table-connected/constants/Events.js +2 -0
- package/es/cc/table-connected/index.js +3 -1
- package/es/cc/table-list/Constants.js +4 -0
- package/es/cc/table-list/Properties.js +25 -0
- package/es/cc/table-list/row/Properties.js +44 -0
- package/es/index.js +11 -2
- package/es/library/behaviours/keyboard-controls/applications/usecases/DestructUsecase.js +5 -2
- package/es/library/behaviours/list-selection/frameworks/ActionHandlerFactory.js +4 -3
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +116 -4
- package/es/library/custom-component/applications/entities-factory/BehavioursFactory.js +18 -16
- package/es/library/custom-component/applications/interfaces/gateways/ISchemaValidator.js +1 -0
- package/es/library/custom-component/applications/usecases/InitializeUseCase.js +3 -2
- package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +6 -2
- package/es/library/custom-component/applications/usecases/UpdateStateUseCase.js +5 -1
- package/es/library/custom-component/domain/entities/Component.js +20 -3
- package/es/library/custom-component/domain/entities/LifeCycleAction.js +14 -3
- package/es/library/custom-component/domain/entities/Properties.js +19 -1
- package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +36 -1
- package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +23 -11
- package/es/library/custom-component/frameworks/ui/DependencyFactory.js +4 -3
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +6 -0
- package/es/library/dot/components/action-location/frameworks/ui/EventHandlersFactory.js +1 -1
- package/es/library/dot/components/form/adapters/presenter/TransformState.js +25 -1
- package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +28 -0
- package/es/library/dot/components/form/frameworks/ui/EventHandlerFactory.js +23 -3
- package/es/library/dot/components/form/frameworks/ui/Form.js +2 -0
- package/es/library/dot/components/form/frameworks/ui/FormView.js +44 -26
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +8 -0
- package/es/library/dot/components/form/frameworks/ui/sub-components/Sections.js +7 -9
- package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +1 -0
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +1 -0
- package/es/library/dot/components/form-fields/date/frameworks/ui/DateView.js +1 -0
- package/es/library/dot/components/form-fields/datetime/frameworks/ui/DateTimeView.js +1 -0
- package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +1 -0
- package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +1 -0
- package/es/library/dot/components/form-fields/multi-select/frameworks/ui/MultiSelectView.js +1 -0
- package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +1 -0
- package/es/library/dot/components/form-fields/percentage/frameworks/ui/PercentageView.js +1 -0
- package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +1 -0
- package/es/library/dot/components/form-fields/pick-list/frameworks/ui/PickListView.js +1 -0
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +1 -0
- package/es/library/dot/components/form-fields/textbox/frameworks/ui/TextBoxView.js +1 -0
- package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +1 -0
- package/es/library/dot/components/section/frameworks/ui/EventHandlerFactory.js +26 -3
- package/es/library/dot/components/section/frameworks/ui/RenderField.js +19 -0
- package/es/library/dot/components/section/frameworks/ui/Section.js +13 -4
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +7 -26
- package/es/library/dot/components/table-list/frameworks/hooks/useDropIndicator.js +8 -0
- package/es/library/dot/components/table-list/frameworks/hooks/useRowData.js +15 -0
- package/es/library/dot/components/table-list/frameworks/hooks/useTableRowReorder.js +105 -0
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +85 -15
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +240 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +32 -14
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +25 -9
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +11 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +50 -8
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +7 -1
- package/es/library/dot/components/table-list/frameworks/utils/getHeaderClasses.js +37 -0
- package/es/library/dot/components/table-list/frameworks/utils/getTableListClassName.js +37 -0
- package/es/library/dot/components/table-list/frameworks/utils/reOrder.js +90 -0
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +10 -1
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/css/ActionIconView.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/Button.js +12 -0
- package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/ButtonView.js +41 -0
- package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItem.js +12 -0
- package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItemView.js +122 -0
- package/es/library/dot/legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdown.js +12 -0
- package/es/library/dot/legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdownView.js +43 -0
- package/es/library/dot/legacy-to-new-arch/switch/frameworks/ui/SwitchView.js +5 -5
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +8 -4
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchFieldView.js +0 -1
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +1 -1
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter.js +96 -0
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +12 -3
- package/es/platform/client-actions/template-resolver/index.js +1 -0
- package/es/platform/client-actions/translators/client-actions-translator/index.js +5 -2
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/GetResolvedContextFieldValue.js +3 -2
- package/es/platform/client-actions/translators/context-resolver/index.js +7 -10
- package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +91 -0
- package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +33 -0
- package/es/{desk-frameworks → platform/components}/form-connected/frameworks/FormConnectedView.js +1 -1
- package/es/{desk-frameworks → platform/components}/form-connected/frameworks/FormSdkFactory.js +3 -14
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserOpenedController.js +28 -0
- package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ColumnChooserUpdateController.js +5 -5
- package/es/platform/components/table-connected/adapters/controllers/ReOrderFinishController.js +21 -0
- package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeByMouseController.js +1 -1
- package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeEndController.js +1 -1
- package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeFinishController.js +1 -1
- package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeStartController.js +2 -2
- package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ScrollController.js +1 -1
- package/es/platform/components/table-connected/adapters/resources/ErrorPrinter.js +20 -0
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +326 -0
- package/es/platform/components/table-connected/application/interfaces/ISmartTableResource.js +1 -0
- package/es/platform/components/table-connected/frameworks/ErrorEventHandlersFactory.js +126 -0
- package/es/{desk-frameworks → platform/components}/table-connected/frameworks/EventHandlersFactory.js +58 -17
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +57 -0
- package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +78 -0
- package/es/{desk-frameworks → platform/components}/table-connected/frameworks/TableConnectedView.js +10 -4
- package/es/platform/data-source/http-template/reOrderRecord.js +44 -0
- package/es/platform/data-source/index.js +2 -0
- package/es/platform/sdk/adapters/gateways/Repository.js +31 -0
- package/es/platform/sdk/adapters/gateways/Service.js +27 -0
- package/es/platform/sdk/adapters/presenters/Presenter.js +16 -0
- package/es/platform/sdk/application/interfaces/UsecaseDependencies.js +1 -0
- package/es/platform/sdk/application/interfaces/gateways/AbstractResource.js +13 -0
- package/es/platform/sdk/application/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/sdk/application/interfaces/gateways/ISdkManager.js +1 -0
- package/es/platform/sdk/application/interfaces/gateways/IService.js +1 -0
- package/es/platform/sdk/application/interfaces/input/CreateResourceInstanceUseCaseInputModel.js +1 -0
- package/es/platform/sdk/application/interfaces/input/DestructResourceInstanceUseCaseInputModel.js +1 -0
- package/es/platform/sdk/application/interfaces/input/GetResourceInstanceUseCaseInputModel.js +1 -0
- package/es/platform/sdk/application/interfaces/input/RegisterResourceInputModel.js +1 -0
- package/es/platform/sdk/application/interfaces/input/SyncStateWithResourceInputModel.js +1 -0
- package/es/platform/sdk/application/interfaces/output/ISdkPresenter.js +3 -0
- package/es/platform/sdk/application/usecases/AbstractUseCase.js +16 -0
- package/es/platform/sdk/application/usecases/CreateResourceInstanceUseCase.js +16 -0
- package/es/platform/sdk/application/usecases/DestructResourceInstanceUseCase.js +16 -0
- package/es/platform/sdk/application/usecases/GetResourceInstanceUseCase.js +17 -0
- package/es/platform/sdk/application/usecases/RegisterResourceUseCase.js +16 -0
- package/es/platform/sdk/application/usecases/SyncStateWithResourceUseCase.js +25 -0
- package/es/platform/sdk/domain/entities/ResourceManager.js +95 -0
- package/es/platform/sdk/domain/entities/interfaces/IResourceManager.js +1 -0
- package/es/platform/sdk/domain/entities/interfaces/ResourceManagerRestoreModel.js +1 -0
- package/es/platform/sdk/domain/entities/interfaces/SdkResource.js +1 -0
- package/es/platform/sdk/domain/entities/interfaces/SdkResourceDependencies.js +1 -0
- package/es/platform/sdk/domain/entities/interfaces/StateInterface.js +1 -0
- package/es/platform/sdk/frameworks/Sdk.js +11 -0
- package/es/platform/sdk/frameworks/SdkRegistry.js +72 -0
- package/es/platform/sdk-behaviour/adapters/controllers/AbstractController.js +11 -0
- package/es/platform/sdk-behaviour/adapters/controllers/DestructController.js +19 -0
- package/es/platform/sdk-behaviour/adapters/controllers/InitializeController.js +19 -0
- package/es/platform/sdk-behaviour/adapters/controllers/SyncStateWithResourceController.js +24 -0
- package/es/platform/sdk-behaviour/adapters/gateways/Repository.js +25 -0
- package/es/platform/sdk-behaviour/adapters/gateways/ResourceManagerGateWay.js +43 -0
- package/es/platform/sdk-behaviour/adapters/gateways/Service.js +19 -0
- package/es/platform/sdk-behaviour/applications/AbstractUseCase.js +6 -0
- package/es/platform/sdk-behaviour/applications/interfaces/UsecaseDependencies.js +1 -0
- package/es/platform/sdk-behaviour/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/sdk-behaviour/applications/interfaces/gateways/IResourceManagerGateWay.js +3 -0
- package/es/platform/sdk-behaviour/applications/interfaces/gateways/IService.js +1 -0
- package/es/platform/sdk-behaviour/applications/interfaces/input/CreateResourceInstanceUseCaseInputModel.js +1 -0
- package/es/platform/sdk-behaviour/applications/interfaces/input/DestructResourceInstanceUseCaseInputModel.js +1 -0
- package/es/platform/sdk-behaviour/applications/interfaces/input/SyncStateWithResourceUseCaseInputModel.js +1 -0
- package/es/platform/sdk-behaviour/applications/usecases/CreateResourceInstanceUseCase.js +14 -0
- package/es/platform/sdk-behaviour/applications/usecases/DestructResourceInstanceUseCase.js +14 -0
- package/es/platform/sdk-behaviour/applications/usecases/SyncStateWithResourceUseCase.js +22 -0
- package/es/platform/sdk-behaviour/domain/entities/BehaviourResourceConnector.js +49 -0
- package/es/platform/sdk-behaviour/domain/entities/interfaces/IBehaviourResourceConnector.js +1 -0
- package/es/platform/sdk-behaviour/domain/entities/interfaces/IResourceManagerProxy.js +2 -0
- package/es/platform/sdk-behaviour/frameworks/EventHandlerFactory.js +29 -0
- package/es/platform/sdk-behaviour/frameworks/SdkBehaviourFactory.js +16 -0
- package/es/platform/zdata-source/domain/entities/DataSource.js +18 -12
- package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +7 -1
- package/es/platform/zform/adapters/controllers/FieldValueChangeController.js +10 -3
- package/es/platform/zform/adapters/presenter/FormTranslator.js +33 -167
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +41 -0
- package/es/platform/zform/adapters/presenter/translators/fields/BooleanFieldTranslator.js +20 -0
- package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +29 -0
- package/es/platform/zform/adapters/presenter/translators/fields/DateFieldTranslator.js +20 -0
- package/es/platform/zform/adapters/presenter/translators/fields/DateTimeFieldTranslator.js +21 -0
- package/es/platform/zform/adapters/presenter/translators/fields/DecimalFieldTranslator.js +29 -0
- package/es/platform/zform/adapters/presenter/translators/fields/EmailFieldTranslator.js +30 -0
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +30 -0
- package/es/platform/zform/adapters/presenter/translators/fields/MultiselectFieldTranslator.js +29 -0
- package/es/platform/zform/adapters/presenter/translators/fields/NumberFieldTranslator.js +30 -0
- package/es/platform/zform/adapters/presenter/translators/fields/PercentageFieldTranslator.js +30 -0
- package/es/platform/zform/adapters/presenter/translators/fields/PhoneFieldTranslator.js +29 -0
- package/es/platform/zform/adapters/presenter/translators/fields/PicklistFieldTranslator.js +29 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextAreaFieldTranslator.js +30 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextFieldTranslator.js +27 -0
- package/es/platform/zform/adapters/presenter/translators/fields/URLFieldTranslator.js +30 -0
- package/es/platform/zform/adapters/presenter/translators/fields/index.js +15 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/ComponentMapping.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/FieldContract.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/FormTranslatorState.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/SectionContract.js +1 -0
- package/es/platform/zform/applications/usecases/FieldValueChangeRequestUseCase.js +13 -1
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +3 -1
- package/es/platform/zform/domain/ZField.js +61 -16
- package/es/platform/zform/domain/ZSection.js +26 -7
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +10 -4
- package/es/platform/zhttp/applications/usecases/FetchUseCase.js +111 -66
- package/es/platform/zlist/adapters/controllers/FieldExecuteFailedController.js +25 -0
- package/es/platform/zlist/adapters/controllers/ReOrderController.js +25 -0
- package/es/platform/zlist/adapters/controllers/ReOrderFailedController.js +26 -0
- package/es/platform/zlist/adapters/gateways/Repository.js +12 -2
- package/es/platform/zlist/adapters/gateways/Service.js +8 -0
- package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +3 -1
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +19 -5
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +11 -12
- package/es/platform/zlist/adapters/presenters/translators/EmptyViewModel.js +2 -1
- package/es/platform/zlist/adapters/presenters/translators/Header.js +8 -4
- package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +3 -2
- package/es/platform/zlist/adapters/presenters/translators/ResizerStateTranslator.js +7 -3
- package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +1 -0
- package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +3 -0
- package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +1 -1
- package/es/platform/zlist/applications/entities-factory/ListFactory.js +3 -2
- package/es/platform/zlist/applications/interfaces/input/GetContextUseCaseInput.js +1 -0
- package/es/platform/zlist/applications/interfaces/input/ReOrderRecordUseCaseInput.js +1 -0
- package/es/platform/zlist/applications/interfaces/input/UpdateMultipleRecordUseCaseInput.js +1 -0
- package/es/platform/zlist/applications/usecases/DeleteMultipleRecordUseCase.js +23 -2
- package/es/platform/zlist/applications/usecases/DeleteSingleRecordUseCase.js +9 -0
- package/es/platform/zlist/applications/usecases/FetchMoreUseCase.js +1 -1
- package/es/platform/zlist/applications/usecases/GetContextUseCase.js +18 -0
- package/es/platform/zlist/applications/usecases/ReOrderFailedUseCase.js +22 -0
- package/es/platform/zlist/applications/usecases/ReOrderUseCase.js +25 -0
- package/es/platform/zlist/applications/usecases/RecordExecuteFailedUseCase.js +3 -2
- package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +24 -3
- package/es/platform/zlist/applications/usecases/RecordUpdateUseCase.js +9 -0
- package/es/platform/zlist/applications/usecases/UpdateMultipleRecordUseCase.js +34 -0
- package/es/platform/zlist/domain/entities/List.js +73 -48
- package/es/platform/zlist/domain/entities/ListErrorState.js +167 -0
- package/es/platform/zlist/frameworks/EventHandlersFactory.js +16 -6
- package/es/platform/zlist/frameworks/ZListBehaviourFactory.js +6 -0
- package/es/platform/zrecord/applications/interfaces/input/GetMultipleRecordUsecaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/GetSingleRecordUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/usecases/GetMultipleRecordUseCase.js +16 -0
- package/es/platform/zrecord/applications/usecases/GetSingleRecordUseCase.js +17 -0
- package/es/platform/zrecord/domain/entities/GetReOrderRecordsStrategy.js +40 -0
- package/es/platform/zrecord/domain/entities/Records.js +9 -4
- package/es/platform/zrecord/domain/entities/RecordsManager.js +11 -1
- package/package.json +22 -18
- package/es/desk-frameworks/form-connected/frameworks/EventHandlersFactory.js +0 -24
- package/es/desk-frameworks/form-connected/frameworks/FormConnectedFactory.js +0 -33
- package/es/desk-frameworks/table-connected/adapters/controllers/ColumnChooserOpenedController.js +0 -36
- package/es/desk-frameworks/table-connected/frameworks/ListSdkFactory.js +0 -172
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +0 -56
- package/es/library/dot/components/section/adapters/presenter/TransFormState.js +0 -26
- /package/es/{desk-frameworks → platform/components}/form-connected/frameworks/FormConnected.js +0 -0
- /package/es/{desk-frameworks → platform/components}/index.js +0 -0
- /package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/AbstractController.js +0 -0
- /package/es/{desk-frameworks → platform/components}/table-connected/frameworks/TableConnected.js +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const BooleanFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type
|
|
5
|
+
} = _ref;
|
|
6
|
+
return {
|
|
7
|
+
id: field.id,
|
|
8
|
+
label: field.i18NLabel,
|
|
9
|
+
type,
|
|
10
|
+
value: field.value,
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
// placeholder: field.i18NLabel,//field.placeholder,
|
|
13
|
+
required: field.isMandatory,
|
|
14
|
+
readonly: field.isReadOnly,
|
|
15
|
+
// visibility: field.isVisible
|
|
16
|
+
isVisible: field.isVisible
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default BooleanFieldTranslator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const CurrencyFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
isVisible: field.isVisible,
|
|
21
|
+
errorMessage: field.errorMessage || ''
|
|
22
|
+
}; // if (ePHIFields[field.type]) {
|
|
23
|
+
// fieldModified.ePHI = true;
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
return fieldModified;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default CurrencyFieldTranslator;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const DateFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type
|
|
5
|
+
} = _ref;
|
|
6
|
+
return {
|
|
7
|
+
id: field.id,
|
|
8
|
+
label: field.i18NLabel,
|
|
9
|
+
type,
|
|
10
|
+
value: field.value || '',
|
|
11
|
+
//state.behaviours.zform.values[field.apiName],
|
|
12
|
+
name: field.apiName,
|
|
13
|
+
// placeholder: field.i18NLabel,//field.placeholder,
|
|
14
|
+
required: field.isMandatory,
|
|
15
|
+
readonly: field.isReadOnly,
|
|
16
|
+
isVisible: field.isVisible
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default DateFieldTranslator;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const DateTimeFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type
|
|
5
|
+
} = _ref;
|
|
6
|
+
return {
|
|
7
|
+
id: field.id,
|
|
8
|
+
label: field.i18NLabel,
|
|
9
|
+
type,
|
|
10
|
+
value: field.value || '',
|
|
11
|
+
//state.behaviours.zform.values[field.apiName],
|
|
12
|
+
name: field.apiName,
|
|
13
|
+
// placeholder: field.i18NLabel,//field.placeholder,
|
|
14
|
+
required: field.isMandatory,
|
|
15
|
+
readonly: field.isReadOnly,
|
|
16
|
+
// visibility: field.isVisible
|
|
17
|
+
isVisible: field.isVisible
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default DateTimeFieldTranslator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const DecimalFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
isVisible: field.isVisible,
|
|
21
|
+
errorMessage: field.errorMessage || ''
|
|
22
|
+
}; // if (ePHIFields[field.type]) {
|
|
23
|
+
// fieldModified.ePHI = true;
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
return fieldModified;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default DecimalFieldTranslator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const EmailFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
// visibility: field.isVisible,
|
|
21
|
+
isVisible: field.isVisible,
|
|
22
|
+
errorMessage: field.errorMessage || ''
|
|
23
|
+
}; // if (ePHIFields[field.type]) {
|
|
24
|
+
// fieldModified.ePHI = true;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
return fieldModified;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default EmailFieldTranslator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const LookUpFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
tooltip: '',
|
|
15
|
+
//field.tooltip,
|
|
16
|
+
placeholder: field.i18NLabel,
|
|
17
|
+
//field.placeholder,
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
// visibility: field.isVisible,
|
|
21
|
+
isVisible: field.isVisible,
|
|
22
|
+
errorMessage: field.errorMessage || ''
|
|
23
|
+
}; // if (ePHIFields[field.type]) {
|
|
24
|
+
// fieldModified.ePHI = true;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
return fieldModified;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default LookUpFieldTranslator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const MultiSelectFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type
|
|
5
|
+
} = _ref;
|
|
6
|
+
return {
|
|
7
|
+
id: field.id,
|
|
8
|
+
label: field.i18NLabel,
|
|
9
|
+
options: field.pickListValues ? field.pickListValues.map(picklistValue => {
|
|
10
|
+
return {
|
|
11
|
+
value: picklistValue.value,
|
|
12
|
+
label: picklistValue.value
|
|
13
|
+
};
|
|
14
|
+
}) : [],
|
|
15
|
+
type,
|
|
16
|
+
subType: field.subType,
|
|
17
|
+
value: field.value,
|
|
18
|
+
//state.behaviours.zform.values[field.apiName],
|
|
19
|
+
name: field.apiName,
|
|
20
|
+
// placeholder: field.i18NLabel,//field.placeholder,
|
|
21
|
+
required: field.isMandatory,
|
|
22
|
+
readonly: field.isReadOnly,
|
|
23
|
+
// visibility: field.isVisible,
|
|
24
|
+
isVisible: field.isVisible,
|
|
25
|
+
errorMessage: field.errorMessage || ''
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default MultiSelectFieldTranslator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const NumberFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
// visibility: field.isVisible,
|
|
21
|
+
isVisible: field.isVisible,
|
|
22
|
+
errorMessage: field.errorMessage || ''
|
|
23
|
+
}; // if (ePHIFields[field.type]) {
|
|
24
|
+
// fieldModified.ePHI = true;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
return fieldModified;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default NumberFieldTranslator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const PercentageFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
// visibility: field.isVisible,
|
|
21
|
+
isVisible: field.isVisible,
|
|
22
|
+
errorMessage: field.errorMessage || ''
|
|
23
|
+
}; // if (ePHIFields[field.type]) {
|
|
24
|
+
// fieldModified.ePHI = true;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
return fieldModified;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default PercentageFieldTranslator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const PhoneFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
isVisible: field.isVisible,
|
|
21
|
+
errorMessage: field.errorMessage || ''
|
|
22
|
+
}; // if (ePHIFields[field.type]) {
|
|
23
|
+
// fieldModified.ePHI = true;
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
return fieldModified;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default PhoneFieldTranslator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const PickListFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type
|
|
5
|
+
} = _ref;
|
|
6
|
+
return {
|
|
7
|
+
id: field.id,
|
|
8
|
+
label: field.i18NLabel,
|
|
9
|
+
options: field.pickListValues.map(picklistValue => {
|
|
10
|
+
return {
|
|
11
|
+
value: picklistValue.value,
|
|
12
|
+
label: picklistValue.value
|
|
13
|
+
};
|
|
14
|
+
}),
|
|
15
|
+
type,
|
|
16
|
+
subType: field.subType.toLowerCase(),
|
|
17
|
+
value: field.value,
|
|
18
|
+
//state.behaviours.zform.values[field.apiName],
|
|
19
|
+
name: field.apiName,
|
|
20
|
+
// placeholder: field.i18NLabel,//field.placeholder,
|
|
21
|
+
required: field.isMandatory,
|
|
22
|
+
readonly: field.isReadOnly,
|
|
23
|
+
// visibility: field.isVisible,
|
|
24
|
+
isVisible: field.isVisible,
|
|
25
|
+
errorMessage: field.errorMessage || ''
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default PickListFieldTranslator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const TextAreaFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
// visibility: field.isVisible,
|
|
21
|
+
isVisible: field.isVisible,
|
|
22
|
+
errorMessage: field.errorMessage || ''
|
|
23
|
+
}; // if (ePHIFields[field.type]) {
|
|
24
|
+
// fieldModified.ePHI = true;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
return fieldModified;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default TextAreaFieldTranslator;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const TextFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
type,
|
|
4
|
+
field
|
|
5
|
+
} = _ref;
|
|
6
|
+
return {
|
|
7
|
+
type,
|
|
8
|
+
value: field.value || '',
|
|
9
|
+
//state.behaviours.zform.values[field.apiName],
|
|
10
|
+
name: field.apiName,
|
|
11
|
+
id: field.id,
|
|
12
|
+
label: field.i18NLabel,
|
|
13
|
+
// toolTip: field.tooltip || '',
|
|
14
|
+
// toolTipType: field.toolTipType || '',
|
|
15
|
+
// placeholder: field.toolTip || '',
|
|
16
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
17
|
+
ePHI: false,
|
|
18
|
+
//field.ePHI,
|
|
19
|
+
required: field.isMandatory,
|
|
20
|
+
readonly: field.isReadOnly,
|
|
21
|
+
// visibility: field.isVisible,
|
|
22
|
+
isVisible: field.isVisible,
|
|
23
|
+
errorMessage: field.errorMessage || ''
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default TextFieldTranslator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const URLFieldTranslator = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
field,
|
|
4
|
+
type,
|
|
5
|
+
ePHIFields
|
|
6
|
+
} = _ref;
|
|
7
|
+
const fieldModified = {
|
|
8
|
+
type,
|
|
9
|
+
value: field.value || '',
|
|
10
|
+
//state.behaviours.zform.values[field.apiName],
|
|
11
|
+
name: field.apiName,
|
|
12
|
+
id: field.id,
|
|
13
|
+
label: field.i18NLabel,
|
|
14
|
+
// toolTip: field.tooltip || '',
|
|
15
|
+
// toolTipType: field.toolTipType || '',
|
|
16
|
+
// placeholder: field.toolTip || '',
|
|
17
|
+
placeholder: field.toolTipType === "placeholder" ? field.toolTip : "",
|
|
18
|
+
required: field.isMandatory,
|
|
19
|
+
readonly: field.isReadOnly,
|
|
20
|
+
// visibility: field.isVisible,
|
|
21
|
+
isVisible: field.isVisible,
|
|
22
|
+
errorMessage: field.errorMessage || ''
|
|
23
|
+
}; // if (ePHIFields[field.type]) {
|
|
24
|
+
// fieldModified.ePHI = true;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
return fieldModified;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default URLFieldTranslator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as Date } from "./DateFieldTranslator";
|
|
2
|
+
export { default as DateTime } from "./DateTimeFieldTranslator";
|
|
3
|
+
export { default as Multiselect } from "./MultiselectFieldTranslator";
|
|
4
|
+
export { default as Text } from "./TextFieldTranslator";
|
|
5
|
+
export { default as Picklist } from "./PicklistFieldTranslator";
|
|
6
|
+
export { default as Boolean } from "./BooleanFieldTranslator";
|
|
7
|
+
export { default as Email } from "./EmailFieldTranslator";
|
|
8
|
+
export { default as Phone } from "./PhoneFieldTranslator";
|
|
9
|
+
export { default as Decimal } from "./DecimalFieldTranslator";
|
|
10
|
+
export { default as Number } from "./NumberFieldTranslator";
|
|
11
|
+
export { default as Currency } from "./CurrencyFieldTranslator";
|
|
12
|
+
export { default as Percent } from "./PercentageFieldTranslator";
|
|
13
|
+
export { default as URL } from "./URLFieldTranslator";
|
|
14
|
+
export { default as Textarea } from "./TextAreaFieldTranslator";
|
|
15
|
+
export { default as LookUp } from "./LookUpFieldTranslator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
import { ZFORM_FIELD_VALUE_CHANGED } from "../../../../bc/zform/Symbol";
|
|
2
3
|
|
|
3
4
|
class FieldValueChangeRequestUseCase extends AbstractUseCase {
|
|
4
5
|
execute(input) {
|
|
5
6
|
let {
|
|
7
|
+
sectionId,
|
|
6
8
|
fieldName,
|
|
7
|
-
newValue
|
|
9
|
+
newValue,
|
|
10
|
+
dispatch
|
|
8
11
|
} = input;
|
|
9
12
|
let {
|
|
10
13
|
layoutRuleApplier
|
|
@@ -29,6 +32,15 @@ class FieldValueChangeRequestUseCase extends AbstractUseCase {
|
|
|
29
32
|
// zform=zformEntitiy.toObject();
|
|
30
33
|
|
|
31
34
|
this.dependencies.presenter.updateFormResponse(zform);
|
|
35
|
+
dispatch({
|
|
36
|
+
type: ZFORM_FIELD_VALUE_CHANGED,
|
|
37
|
+
payload: {
|
|
38
|
+
sectionId,
|
|
39
|
+
fieldName,
|
|
40
|
+
value: newValue
|
|
41
|
+
},
|
|
42
|
+
metaData: {}
|
|
43
|
+
});
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
}
|
|
@@ -15,7 +15,9 @@ class MyFormSuccessUseCase extends AbstractUseCase {
|
|
|
15
15
|
let layoutRuleApplier = this.dependencies.layoutRuleApplier;
|
|
16
16
|
let sectionEntities = sections.map(section => {
|
|
17
17
|
let fields = section.fields.map(field => {
|
|
18
|
-
|
|
18
|
+
const entity = new ZField(field);
|
|
19
|
+
entity.decideDefaultValue();
|
|
20
|
+
return entity;
|
|
19
21
|
});
|
|
20
22
|
let sectionWithFields = { ...section,
|
|
21
23
|
fields
|
|
@@ -18,8 +18,11 @@ export default class ZField {
|
|
|
18
18
|
isMandatory,
|
|
19
19
|
value,
|
|
20
20
|
errorMessage,
|
|
21
|
-
|
|
21
|
+
isVisible = true,
|
|
22
22
|
pickListValues,
|
|
23
|
+
toolTip,
|
|
24
|
+
toolTipType,
|
|
25
|
+
defaultValue,
|
|
23
26
|
subType
|
|
24
27
|
} = _ref;
|
|
25
28
|
|
|
@@ -53,7 +56,7 @@ export default class ZField {
|
|
|
53
56
|
|
|
54
57
|
_defineProperty(this, "errorMessage", void 0);
|
|
55
58
|
|
|
56
|
-
_defineProperty(this, "
|
|
59
|
+
_defineProperty(this, "isVisible", void 0);
|
|
57
60
|
|
|
58
61
|
_defineProperty(this, "pickListValues", void 0);
|
|
59
62
|
|
|
@@ -61,6 +64,12 @@ export default class ZField {
|
|
|
61
64
|
|
|
62
65
|
_defineProperty(this, "subType", void 0);
|
|
63
66
|
|
|
67
|
+
_defineProperty(this, "toolTip", void 0);
|
|
68
|
+
|
|
69
|
+
_defineProperty(this, "toolTipType", void 0);
|
|
70
|
+
|
|
71
|
+
_defineProperty(this, "defaultValue", void 0);
|
|
72
|
+
|
|
64
73
|
this.displayLabel = displayLabel;
|
|
65
74
|
this.apiName = apiName;
|
|
66
75
|
this.isCustomField = isCustomField;
|
|
@@ -76,23 +85,53 @@ export default class ZField {
|
|
|
76
85
|
this.isMandatory = isMandatory;
|
|
77
86
|
this.value = value;
|
|
78
87
|
this.errorMessage = errorMessage;
|
|
79
|
-
this.
|
|
88
|
+
this.isVisible = isVisible;
|
|
80
89
|
this.defaultPickListValues = pickListValues;
|
|
81
90
|
this.pickListValues = pickListValues;
|
|
82
91
|
this.subType = subType;
|
|
92
|
+
this.toolTip = toolTip;
|
|
93
|
+
this.toolTipType = toolTipType;
|
|
94
|
+
this.defaultValue = defaultValue; // if(value===undefined){
|
|
95
|
+
// this.setDefaultValue()
|
|
96
|
+
// }
|
|
97
|
+
}
|
|
83
98
|
|
|
84
|
-
|
|
85
|
-
|
|
99
|
+
decideValueForBoolean(defaultValue) {
|
|
100
|
+
if (defaultValue === undefined || defaultValue === null) {
|
|
101
|
+
return false;
|
|
86
102
|
}
|
|
103
|
+
|
|
104
|
+
if (typeof defaultValue === "string") {
|
|
105
|
+
return defaultValue === "true" ? true : false;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return defaultValue;
|
|
87
109
|
}
|
|
88
110
|
|
|
89
|
-
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
decideValueForMultiselect(defaultValue) {
|
|
112
|
+
if (defaultValue === undefined || defaultValue === null) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (typeof defaultValue === "string") {
|
|
117
|
+
return defaultValue.split(";");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return defaultValue;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
decideDefaultValue() {
|
|
124
|
+
switch (this.type) {
|
|
125
|
+
case 'Boolean':
|
|
126
|
+
this.value = this.decideValueForBoolean(this.defaultValue);
|
|
127
|
+
break;
|
|
128
|
+
|
|
129
|
+
case 'Multiselect':
|
|
130
|
+
this.value = this.decideValueForMultiselect(this.defaultValue);
|
|
131
|
+
break;
|
|
132
|
+
|
|
133
|
+
default:
|
|
134
|
+
this.value = this.defaultValue === undefined ? '' : this.defaultValue;
|
|
96
135
|
}
|
|
97
136
|
}
|
|
98
137
|
|
|
@@ -125,15 +164,16 @@ export default class ZField {
|
|
|
125
164
|
}
|
|
126
165
|
|
|
127
166
|
toggleVisibility() {
|
|
128
|
-
this.
|
|
167
|
+
this.isVisible = !this.isVisible;
|
|
129
168
|
}
|
|
130
169
|
|
|
131
170
|
setVisibility(visibility) {
|
|
132
|
-
this.
|
|
171
|
+
this.isVisible = visibility;
|
|
133
172
|
}
|
|
134
173
|
|
|
135
174
|
isVisibile() {
|
|
136
|
-
return this.visibility;
|
|
175
|
+
// return this.visibility;
|
|
176
|
+
return this.isVisible;
|
|
137
177
|
}
|
|
138
178
|
|
|
139
179
|
setMandatory(isMandatory) {
|
|
@@ -161,8 +201,13 @@ export default class ZField {
|
|
|
161
201
|
isMandatory: this.isMandatory,
|
|
162
202
|
value: this.value,
|
|
163
203
|
errorMessage: this.errorMessage,
|
|
164
|
-
|
|
204
|
+
// NOTE: visibility is now isVisible, visibility is deprecated, only for backward compatibility of layout rules
|
|
205
|
+
visibility: this.isVisible,
|
|
206
|
+
isVisible: this.isVisible,
|
|
165
207
|
pickListValues: this.pickListValues,
|
|
208
|
+
toolTip: this.toolTip,
|
|
209
|
+
toolTipType: this.toolTipType,
|
|
210
|
+
defaultValue: this.defaultValue,
|
|
166
211
|
subType: this.subType
|
|
167
212
|
};
|
|
168
213
|
}
|