@zohodesk/library-platform 1.0.0-exp.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/.eslintrc.js +31 -0
- package/.prettierignore +1 -0
- package/.prettierrc +12 -0
- package/README.md +21 -0
- package/arch-rules/README.md +23 -0
- package/arch-rules/index.js +16 -0
- package/arch-rules/rules-config/IndependentFolder.js +13 -0
- package/arch-rules/rules-config/NoOuterLayerUsedInnerLayer.js +60 -0
- package/arch-rules/rules-config/RuleConfig.js +13 -0
- package/examples/desk-app/mockapi/apiMappings.js +5 -0
- package/examples/desk-app/mockapi/fileResponseStrategy.js +9 -0
- package/examples/desk-app/mockapi/getAbsoluteFilePath.js +6 -0
- package/examples/desk-app/mockapi/getFilePath.js +11 -0
- package/examples/desk-app/mockapi/index.js +14 -0
- package/examples/desk-app/mockapi/initialSetup.js +21 -0
- package/examples/desk-app/mockapi/jsonResponseStrategy.js +6 -0
- package/examples/desk-app/mockapi/list/support-email-address/apis.js +27 -0
- package/examples/desk-app/mockapi/list/support-email-address/availableFields.json +94 -0
- package/examples/desk-app/mockapi/list/support-email-address/selectedFields.json +3 -0
- package/examples/desk-app/mockapi/responseMapper.js +13 -0
- package/examples/desk-app/package.json +37 -0
- package/examples/desk-app/react-cli.config.js +18 -0
- package/examples/desk-app/src/AppContainer.js +102 -0
- package/examples/desk-app/src/DeleteRecordIcon.js +39 -0
- package/examples/desk-app/src/actions/CustomDeleteAction.js +19 -0
- package/examples/desk-app/src/actions/DeleteAction.js +20 -0
- package/examples/desk-app/src/actions/EditAction.js +19 -0
- package/examples/desk-app/src/actions/GoSignalAction.js +18 -0
- package/examples/desk-app/src/actions/RowActions.js +7 -0
- package/examples/desk-app/src/actions/StopSignalAction.js +19 -0
- package/examples/desk-app/src/actions/WaitSignalAction.js +18 -0
- package/examples/desk-app/src/apiHeaders.js +12 -0
- package/examples/desk-app/src/common/UIProvider.js +153 -0
- package/examples/desk-app/src/common/docstyle.module.css +40 -0
- package/examples/desk-app/src/hooks/useDepartments.js +18 -0
- package/examples/desk-app/src/hooks/useModules.js +38 -0
- package/examples/desk-app/src/hooks/useViews.js +64 -0
- package/examples/desk-app/src/index.html +11 -0
- package/examples/desk-app/src/index.js +24 -0
- package/examples/desk-app/src/module/ModuleListContainer.js +52 -0
- package/examples/desk-app/src/module/TableConnected.js +25 -0
- package/examples/desk-app/src/non-module/support-email-address/SupportEmailAddress.js +58 -0
- package/examples/desk-app/src/non-module/support-email-address/constants.js +1 -0
- package/examples/desk-app/src/non-module/support-email-address/data-broker/http-template/getAvailableFields.js +22 -0
- package/examples/desk-app/src/non-module/support-email-address/data-broker/http-template/getRecords.js +64 -0
- package/examples/desk-app/src/non-module/support-email-address/data-broker/http-template/getSelectedFields.js +27 -0
- package/examples/desk-app/src/non-module/support-email-address/data-broker/index.js +13 -0
- package/examples/desk-app/src/non-module/support-email-address/empty-state/EmptyStateView.js +15 -0
- package/examples/desk-app/src/non-module/support-email-address/empty-state/SupportEmailAddressEmptyState.js +13 -0
- package/examples/desk-app/src/style.module.css +38 -0
- package/examples/library/package.json +52 -0
- package/examples/library/public/favicon.ico +0 -0
- package/examples/library/react-cli.config.js +13 -0
- package/examples/library/src/common/AppContainer.js +62 -0
- package/examples/library/src/common/AppContainer.module.css +50 -0
- package/examples/library/src/common/Pages.js +28 -0
- package/examples/library/src/common/UIProvider.js +155 -0
- package/examples/library/src/common/docstyle.module.css +40 -0
- package/examples/library/src/index.html +17 -0
- package/examples/library/src/index.js +11 -0
- package/examples/library/src/table-list/AllFieldsList.js +20 -0
- package/examples/library/src/table-list/EmptyList.js +20 -0
- package/examples/library/src/table-list/FlexibleList.js +21 -0
- package/examples/library/src/table-list/InitialLoadingList.js +22 -0
- package/examples/library/src/table-list/ItemsInitialLoadingList.js +20 -0
- package/examples/library/src/table-list/ListWithoutActions.js +20 -0
- package/examples/library/src/table-list/MassSelectionList.js +24 -0
- package/examples/library/src/table-list/MoreLoadingList.js +20 -0
- package/examples/library/src/table-list/ResizerList.js +40 -0
- package/examples/library/src/table-list/SimpleList.js +20 -0
- package/examples/library/src/table-list/SortableList.js +20 -0
- package/examples/library/src/table-list/data/all_fields.js +192 -0
- package/examples/library/src/table-list/data/all_fields_without_actions.js +109 -0
- package/examples/library/src/table-list/data/all_sortable_fields.js +142 -0
- package/examples/library/src/table-list/data/empty_data.js +47 -0
- package/examples/library/src/table-list/data/resizer_data.js +62 -0
- package/examples/library/src/table-list/data/simple_data.js +63 -0
- package/jsconfig.json +13 -0
- package/lint.config.js +29 -0
- package/old-tsconfig.json +23 -0
- package/package.json +67 -0
- package/post_publish.js +13 -0
- package/prettify.js +90 -0
- package/react-cli.config.js +15 -0
- package/src/bc/list-selection/ActionHandlers.ts +10 -0
- package/src/bc/list-selection/Actions.ts +45 -0
- package/src/bc/list-selection/Constants.ts +3 -0
- package/src/bc/list-selection/Properties.ts +17 -0
- package/src/bc/local-storage/ActionHandlers.ts +7 -0
- package/src/bc/local-storage/Constants.ts +1 -0
- package/src/bc/local-storage/Properties.ts +10 -0
- package/src/bc/sort-by/ActionHandlers.ts +8 -0
- package/src/bc/sort-by/Constants.ts +2 -0
- package/src/bc/sort-by/Properties.ts +22 -0
- package/src/bc/sort-by/SortOrderEnum.ts +7 -0
- package/src/bc/table-column-resizer/ActionHandlers.ts +12 -0
- package/src/bc/table-column-resizer/Constants.ts +9 -0
- package/src/bc/table-column-resizer/Properties.ts +18 -0
- package/src/bc/zfield/ActionHandlers.ts +13 -0
- package/src/bc/zfield/Actions.ts +36 -0
- package/src/bc/zfield/Constants.ts +6 -0
- package/src/bc/zfield/Properties.ts +5 -0
- package/src/bc/zhttp/ActionHandlers.ts +6 -0
- package/src/bc/zhttp/Actions.ts +88 -0
- package/src/bc/zhttp/Constants.ts +6 -0
- package/src/bc/zhttp/Properties.ts +1 -0
- package/src/bc/zlist/Actions.ts +6 -0
- package/src/bc/zlist/Constants.ts +4 -0
- package/src/bc/zlist/EventHandlers.ts +6 -0
- package/src/bc/zlist/Properties.ts +55 -0
- package/src/bc/zrecord/Actions.ts +149 -0
- package/src/bc/zrecord/Constants.ts +13 -0
- package/src/bc/zrecord/EventHandlers.ts +14 -0
- package/src/bc/zrecord/Properties.ts +1 -0
- package/src/bc/zrecord/Symbols.ts +4 -0
- package/src/cc/action-icon/Constants.ts +5 -0
- package/src/cc/action-icon/Model.ts +20 -0
- package/src/cc/action-icon/Properties.ts +31 -0
- package/src/cc/action-icon/index.ts +3 -0
- package/src/cc/action-location/Constants.ts +7 -0
- package/src/cc/action-location/Properties.ts +10 -0
- package/src/cc/architecture/IController.ts +5 -0
- package/src/cc/architecture/IUseCase.ts +4 -0
- package/src/cc/architecture/LifeCycleActionEnum.ts +7 -0
- package/src/cc/avatar/ActionHandlers.ts +1 -0
- package/src/cc/avatar/Actions.ts +7 -0
- package/src/cc/avatar/Constants.ts +5 -0
- package/src/cc/avatar/Data.ts +17 -0
- package/src/cc/avatar/Model.ts +16 -0
- package/src/cc/avatar/Properties.ts +50 -0
- package/src/cc/avatar/index.ts +5 -0
- package/src/cc/checkbox/ActionHandlers.ts +1 -0
- package/src/cc/checkbox/Actions.ts +7 -0
- package/src/cc/checkbox/Constants.ts +5 -0
- package/src/cc/checkbox/Data.ts +9 -0
- package/src/cc/checkbox/Model.ts +16 -0
- package/src/cc/checkbox/Properties.ts +44 -0
- package/src/cc/checkbox/index.ts +5 -0
- package/src/cc/component/Action.ts +3 -0
- package/src/cc/component/ActionHandlers.ts +6 -0
- package/src/cc/component/Behaviour.ts +14 -0
- package/src/cc/component/DeclarativeAction.ts +14 -0
- package/src/cc/component/Event.ts +10 -0
- package/src/cc/component/EventHandlers.ts +12 -0
- package/src/cc/component/Helpers.ts +9 -0
- package/src/cc/component/LifeCycleAction.ts +20 -0
- package/src/cc/component/Payload.ts +13 -0
- package/src/cc/component/Styles.ts +13 -0
- package/src/cc/component/View.ts +8 -0
- package/src/cc/component/component.ts +29 -0
- package/src/cc/component/properties/AppendToActionPayloadProperty.ts +44 -0
- package/src/cc/component/properties/Property.ts +11 -0
- package/src/cc/component/properties/Schema.ts +4 -0
- package/src/cc/component/properties/appendToActionPayload.ts +37 -0
- package/src/cc/component/properties/index.ts +8 -0
- package/src/cc/component/setInitialState.ts +2 -0
- package/src/cc/component/transferState.ts +2 -0
- package/src/cc/email/ActionHandlers.ts +1 -0
- package/src/cc/email/Actions.ts +7 -0
- package/src/cc/email/Constants.ts +5 -0
- package/src/cc/email/Data.ts +5 -0
- package/src/cc/email/Model.ts +6 -0
- package/src/cc/email/Properties.ts +10 -0
- package/src/cc/email/index.ts +5 -0
- package/src/cc/empty-state/Properties.ts +1 -0
- package/src/cc/fields/boolean/Events.ts +6 -0
- package/src/cc/fields/boolean/Model.ts +13 -0
- package/src/cc/fields/boolean/Properties.ts +14 -0
- package/src/cc/fields/currency/Events.ts +6 -0
- package/src/cc/fields/currency/Model.ts +13 -0
- package/src/cc/fields/currency/Properties.ts +13 -0
- package/src/cc/fields/date/Events.ts +6 -0
- package/src/cc/fields/date/Model.ts +13 -0
- package/src/cc/fields/date/Properties.ts +13 -0
- package/src/cc/fields/datetime/Events.ts +6 -0
- package/src/cc/fields/datetime/Model.ts +13 -0
- package/src/cc/fields/datetime/Properties.ts +13 -0
- package/src/cc/fields/decimal/Events.ts +6 -0
- package/src/cc/fields/decimal/Model.ts +13 -0
- package/src/cc/fields/decimal/Properties.ts +13 -0
- package/src/cc/fields/email/Events.ts +6 -0
- package/src/cc/fields/email/Model.ts +13 -0
- package/src/cc/fields/email/Properties.ts +13 -0
- package/src/cc/fields/field/Constants.ts +6 -0
- package/src/cc/fields/field/Events.ts +41 -0
- package/src/cc/fields/field/Properties.ts +29 -0
- package/src/cc/fields/lookup/Events.ts +6 -0
- package/src/cc/fields/lookup/Model.ts +13 -0
- package/src/cc/fields/lookup/Properties.ts +13 -0
- package/src/cc/fields/multi-line/Events.ts +6 -0
- package/src/cc/fields/multi-line/Model.ts +13 -0
- package/src/cc/fields/multi-line/Properties.ts +42 -0
- package/src/cc/fields/multi-select/Events.ts +6 -0
- package/src/cc/fields/multi-select/Model.ts +17 -0
- package/src/cc/fields/multi-select/Properties.ts +42 -0
- package/src/cc/fields/number/Events.ts +6 -0
- package/src/cc/fields/number/Model.ts +13 -0
- package/src/cc/fields/number/Properties.ts +13 -0
- package/src/cc/fields/percent/Events.ts +6 -0
- package/src/cc/fields/percent/Model.ts +13 -0
- package/src/cc/fields/percent/Properties.ts +13 -0
- package/src/cc/fields/phone/Events.ts +6 -0
- package/src/cc/fields/phone/Model.ts +13 -0
- package/src/cc/fields/phone/Properties.ts +13 -0
- package/src/cc/fields/pick-list/Events.ts +6 -0
- package/src/cc/fields/pick-list/Model.ts +17 -0
- package/src/cc/fields/pick-list/Properties.ts +42 -0
- package/src/cc/fields/text/Events.ts +6 -0
- package/src/cc/fields/text/Model.ts +13 -0
- package/src/cc/fields/text/Properties.ts +12 -0
- package/src/cc/fields/url/Events.ts +6 -0
- package/src/cc/fields/url/Model.ts +13 -0
- package/src/cc/fields/url/Properties.ts +14 -0
- package/src/cc/highlighted-value/ActionHandlers.ts +1 -0
- package/src/cc/highlighted-value/Actions.ts +7 -0
- package/src/cc/highlighted-value/Constants.ts +5 -0
- package/src/cc/highlighted-value/Data.ts +15 -0
- package/src/cc/highlighted-value/Model.ts +8 -0
- package/src/cc/highlighted-value/Properties.ts +34 -0
- package/src/cc/highlighted-value/index.ts +5 -0
- package/src/cc/index.ts +10 -0
- package/src/cc/link/ActionHandlers.ts +1 -0
- package/src/cc/link/Actions.ts +7 -0
- package/src/cc/link/Constants.ts +5 -0
- package/src/cc/link/Data.ts +13 -0
- package/src/cc/link/Model.ts +9 -0
- package/src/cc/link/Properties.ts +41 -0
- package/src/cc/link/index.ts +5 -0
- package/src/cc/switch/ActionHandlers.ts +1 -0
- package/src/cc/switch/Actions.ts +20 -0
- package/src/cc/switch/Constants.ts +5 -0
- package/src/cc/switch/Data.ts +13 -0
- package/src/cc/switch/Model.ts +9 -0
- package/src/cc/switch/Properties.ts +41 -0
- package/src/cc/switch/index.ts +5 -0
- package/src/cc/table-connected/Properties.ts +82 -0
- package/src/cc/table-list/ActionHandlers.ts +6 -0
- package/src/cc/table-list/Actions.ts +19 -0
- package/src/cc/table-list/Constants.ts +11 -0
- package/src/cc/table-list/Data.ts +17 -0
- package/src/cc/table-list/Events.ts +69 -0
- package/src/cc/table-list/Properties.ts +430 -0
- package/src/cc/table-list/behaviour-properties/ResizerConfig.ts +18 -0
- package/src/cc/table-list/behaviour-properties/SelectionConfig.ts +17 -0
- package/src/cc/table-list/behaviour-properties/SortByConfig.ts +15 -0
- package/src/cc/table-list/behaviour-properties/index.ts +3 -0
- package/src/cc/table-list/data-types/Column.ts +7 -0
- package/src/cc/table-list/data-types/Data.ts +9 -0
- package/src/cc/table-list/data-types/Header.ts +32 -0
- package/src/cc/table-list/data-types/ResizerConfig.ts +7 -0
- package/src/cc/table-list/data-types/Row.ts +10 -0
- package/src/cc/table-list/data-types/RowSelection.ts +7 -0
- package/src/cc/table-list/data-types/SelectionConfig.ts +7 -0
- package/src/cc/table-list/data-types/fields/AvatarField.ts +7 -0
- package/src/cc/table-list/data-types/fields/CheckboxField.ts +7 -0
- package/src/cc/table-list/data-types/fields/EmailField.ts +7 -0
- package/src/cc/table-list/data-types/fields/HighlightedValueField.ts +7 -0
- package/src/cc/table-list/data-types/fields/LinkField.ts +7 -0
- package/src/cc/table-list/data-types/fields/SwitchField.ts +7 -0
- package/src/cc/table-list/data-types/fields/TagsField.ts +7 -0
- package/src/cc/table-list/data-types/fields/TextField.ts +7 -0
- package/src/cc/table-list/data-types/fields/index.ts +8 -0
- package/src/cc/table-list/index.ts +5 -0
- package/src/cc/table-list/model/HeaderModel.ts +15 -0
- package/src/cc/table-list/model/RowModel.ts +13 -0
- package/src/cc/table-list/model/TableModel.ts +28 -0
- package/src/cc/table-list/model/index.ts +9 -0
- package/src/cc/table-list/row/Constants.ts +7 -0
- package/src/cc/table-list/row/Properties.ts +104 -0
- package/src/cc/tags/ActionHandlers.ts +1 -0
- package/src/cc/tags/Actions.ts +7 -0
- package/src/cc/tags/Constants.ts +5 -0
- package/src/cc/tags/Data.ts +23 -0
- package/src/cc/tags/Properties.ts +69 -0
- package/src/cc/tags/index.ts +5 -0
- package/src/cc/tags/model/TagModel.ts +14 -0
- package/src/cc/tags/model/TagsDataModel.ts +10 -0
- package/src/cc/tags/model/index.ts +7 -0
- package/src/cc/text/ActionHandlers.ts +1 -0
- package/src/cc/text/Actions.ts +7 -0
- package/src/cc/text/Constants.ts +5 -0
- package/src/cc/text/Data.ts +14 -0
- package/src/cc/text/Model.ts +8 -0
- package/src/cc/text/Properties.ts +32 -0
- package/src/cc/text/index.ts +5 -0
- package/src/desk-frameworks/index.ts +1 -0
- package/src/desk-frameworks/table-connected/frameworks/EventHandlersFactory.ts +30 -0
- package/src/desk-frameworks/table-connected/frameworks/ListSdkFactory.ts +32 -0
- package/src/desk-frameworks/table-connected/frameworks/TableConnected.ts +5 -0
- package/src/desk-frameworks/table-connected/frameworks/TableConnectedFactory.ts +31 -0
- package/src/desk-frameworks/table-connected/frameworks/TableConnectedView.tsx +23 -0
- package/src/library/behaviours/list-selection/adapters/controllers/AbstractController.ts +11 -0
- package/src/library/behaviours/list-selection/adapters/controllers/AllSelectionController.ts +13 -0
- package/src/library/behaviours/list-selection/adapters/controllers/DestructController.ts +14 -0
- package/src/library/behaviours/list-selection/adapters/controllers/InitializeController.ts +14 -0
- package/src/library/behaviours/list-selection/adapters/controllers/RangeSelectionController.ts +14 -0
- package/src/library/behaviours/list-selection/adapters/controllers/SelectionController.ts +14 -0
- package/src/library/behaviours/list-selection/adapters/controllers/UpdateController.ts +14 -0
- package/src/library/behaviours/list-selection/adapters/gateways/Repository.ts +23 -0
- package/src/library/behaviours/list-selection/adapters/gateways/Service.ts +25 -0
- package/src/library/behaviours/list-selection/adapters/presenters/Presenter.ts +24 -0
- package/src/library/behaviours/list-selection/entities/ListItemSelection.ts +95 -0
- package/src/library/behaviours/list-selection/entities/interfaces/IListItemSelection.ts +10 -0
- package/src/library/behaviours/list-selection/entities/interfaces/ListSelectionModel.ts +6 -0
- package/src/library/behaviours/list-selection/frameworks/ActionHandlerFactory.ts +39 -0
- package/src/library/behaviours/list-selection/frameworks/ListItemSelectionBehaviourFactory.ts +25 -0
- package/src/library/behaviours/list-selection/usecases/interactors/AbstractUseCase.ts +17 -0
- package/src/library/behaviours/list-selection/usecases/interactors/AllItemSelection.ts +14 -0
- package/src/library/behaviours/list-selection/usecases/interactors/Destruct.ts +8 -0
- package/src/library/behaviours/list-selection/usecases/interactors/Initialize.ts +13 -0
- package/src/library/behaviours/list-selection/usecases/interactors/ItemsSelection.ts +16 -0
- package/src/library/behaviours/list-selection/usecases/interactors/RangeSelection.ts +15 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/UseCase.ts +5 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/UseCaseDependencies.ts +9 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/gateways/IRepository.ts +8 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/gateways/IService.ts +15 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/input/AllSelectionInputModel.ts +3 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/input/DestructInputModel.ts +3 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/input/InitializeInputModel.ts +5 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/input/RangeSelectionInputModel.ts +5 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/input/SelectionInputModel.ts +5 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/output/BehaviourStateModel.ts +6 -0
- package/src/library/behaviours/list-selection/usecases/interfaces/output/IPresenter.ts +8 -0
- package/src/library/behaviours/local-storage/adapters/controllers/handlers/Mount.ts +0 -0
- package/src/library/behaviours/local-storage/adapters/controllers/handlers/SetData.ts +0 -0
- package/src/library/behaviours/local-storage/adapters/controllers/handlers/UnMount.ts +0 -0
- package/src/library/behaviours/local-storage/entities/Storage.ts +16 -0
- package/src/library/behaviours/local-storage/entities/interfaces/ILocalStorage.ts +6 -0
- package/src/library/behaviours/local-storage/entities/interfaces/IStorage.ts +6 -0
- package/src/library/behaviours/local-storage/usecases/interactors/AbstractUseCase.ts +8 -0
- package/src/library/behaviours/local-storage/usecases/interactors/DeleteData.ts +13 -0
- package/src/library/behaviours/local-storage/usecases/interactors/GetData.ts +13 -0
- package/src/library/behaviours/local-storage/usecases/interactors/SetData.ts +13 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/InputDependencies.ts +8 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/UseCase.ts +4 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/gateways/IRepository.ts +7 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/input/DeleteDataInput.ts +4 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/input/GetDataInput.ts +4 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/input/SetDataInput.ts +5 -0
- package/src/library/behaviours/local-storage/usecases/interfaces/output/IPresenter.ts +4 -0
- package/src/library/behaviours/mouse-resizable/adapters/controllers/handlers/MountHandler.ts +7 -0
- package/src/library/behaviours/mouse-resizable/adapters/controllers/handlers/StartResize.ts +11 -0
- package/src/library/behaviours/mouse-resizable/adapters/controllers/handlers/UnMountHandler.ts +0 -0
- package/src/library/behaviours/mouse-resizable/frameworks/MouseResizableFactory.ts +28 -0
- package/src/library/behaviours/sort-by/adapters/controllers/AbstractController.ts +11 -0
- package/src/library/behaviours/sort-by/adapters/controllers/Initialize.ts +11 -0
- package/src/library/behaviours/sort-by/adapters/controllers/SortBy.ts +14 -0
- package/src/library/behaviours/sort-by/adapters/gateway/Repository.ts +16 -0
- package/src/library/behaviours/sort-by/adapters/gateway/Service.ts +15 -0
- package/src/library/behaviours/sort-by/adapters/presenter/Presenter.ts +23 -0
- package/src/library/behaviours/sort-by/entities/SortBy.ts +38 -0
- package/src/library/behaviours/sort-by/entities/interfaces/ISortBy.ts +8 -0
- package/src/library/behaviours/sort-by/frameworks/ui/ActionsHandlerFactory.ts +21 -0
- package/src/library/behaviours/sort-by/frameworks/ui/DemoBehaviour.ts +19 -0
- package/src/library/behaviours/sort-by/frameworks/ui/SortByBehaviourFactory.ts +19 -0
- package/src/library/behaviours/sort-by/usecases/interactors/AbstractUseCase.ts +17 -0
- package/src/library/behaviours/sort-by/usecases/interactors/SortBy.ts +22 -0
- package/src/library/behaviours/sort-by/usecases/interfaces/UseCaseDependencies.ts +10 -0
- package/src/library/behaviours/sort-by/usecases/interfaces/gateways/IRepository.ts +8 -0
- package/src/library/behaviours/sort-by/usecases/interfaces/gateways/IService.ts +8 -0
- package/src/library/behaviours/sort-by/usecases/interfaces/input/SortByInputModel.ts +6 -0
- package/src/library/behaviours/sort-by/usecases/interfaces/output/IPresenter.ts +6 -0
- package/src/library/behaviours/sort-by/usecases/interfaces/output/SortByOutputModel.ts +9 -0
- package/src/library/behaviours/table-column-resizer/adapters/controllers/handlers/HandleDragStart.ts +0 -0
- package/src/library/custom-component/adapters/controllers/Controller.ts +24 -0
- package/src/library/custom-component/adapters/controllers/interface/IController.ts +20 -0
- package/src/library/custom-component/adapters/gateways/event-manager/EventManager.ts +67 -0
- package/src/library/custom-component/adapters/gateways/repository/Repository.ts +17 -0
- package/src/library/custom-component/adapters/gateways/service/Service.ts +29 -0
- package/src/library/custom-component/adapters/gateways/validator/jsonValidator.ts +9 -0
- package/src/library/custom-component/adapters/presenters/Presenter.ts +22 -0
- package/src/library/custom-component/entities/Behaviour.ts +40 -0
- package/src/library/custom-component/entities/Component.ts +170 -0
- package/src/library/custom-component/entities/EventHandler.ts +13 -0
- package/src/library/custom-component/entities/EventHandlers.ts +9 -0
- package/src/library/custom-component/entities/Events.ts +18 -0
- package/src/library/custom-component/entities/LifeCycleAction.ts +31 -0
- package/src/library/custom-component/entities/Payload.ts +17 -0
- package/src/library/custom-component/entities/Properties.ts +120 -0
- package/src/library/custom-component/entities/Property.ts +42 -0
- package/src/library/custom-component/entities/Schema.ts +10 -0
- package/src/library/custom-component/entities/State.ts +15 -0
- package/src/library/custom-component/entities/Style.ts +25 -0
- package/src/library/custom-component/entities/__tests__/Action.spec.ts +22 -0
- package/src/library/custom-component/entities/__tests__/ActionHandlers.spec.ts +19 -0
- package/src/library/custom-component/entities/__tests__/Behaviour.spec.ts +56 -0
- package/src/library/custom-component/entities/__tests__/Component.spec.ts +105 -0
- package/src/library/custom-component/entities/defaultAppendToActionPayload.ts +10 -0
- package/src/library/custom-component/entities/interfaces/IBehaviour.ts +11 -0
- package/src/library/custom-component/entities/interfaces/IComponent.ts +37 -0
- package/src/library/custom-component/entities/interfaces/IEvent.ts +7 -0
- package/src/library/custom-component/entities/interfaces/IEventHandler.ts +5 -0
- package/src/library/custom-component/entities/interfaces/IEventHandlerHelpers.ts +7 -0
- package/src/library/custom-component/entities/interfaces/IEventHandlers.ts +4 -0
- package/src/library/custom-component/entities/interfaces/IEventWrapper.ts +5 -0
- package/src/library/custom-component/entities/interfaces/ILifeCycleAction.ts +19 -0
- package/src/library/custom-component/entities/interfaces/IPayload.ts +5 -0
- package/src/library/custom-component/entities/interfaces/IProperties.ts +12 -0
- package/src/library/custom-component/entities/interfaces/IProperty.ts +9 -0
- package/src/library/custom-component/entities/interfaces/ISchema.ts +4 -0
- package/src/library/custom-component/entities/interfaces/IState.ts +5 -0
- package/src/library/custom-component/entities/interfaces/IStyle.ts +8 -0
- package/src/library/custom-component/entities/interfaces/IUpdateHelper.ts +0 -0
- package/src/library/custom-component/entities/interfaces/IValidator.ts +8 -0
- package/src/library/custom-component/frameworks/json-schema-validator/validator.ts +5 -0
- package/src/library/custom-component/frameworks/object-path-immutable/ImmutableHelper.ts +3 -0
- package/src/library/custom-component/frameworks/ui/Compare.ts +41 -0
- package/src/library/custom-component/frameworks/ui/ComponentRegistry.ts +26 -0
- package/src/library/custom-component/frameworks/ui/createCustomComponent.tsx +97 -0
- package/src/library/custom-component/frameworks/ui/dependencyFactory.ts +25 -0
- package/src/library/custom-component/index.ts +1 -0
- package/src/library/custom-component/usecases/entities-factory/BehavioursFactory.ts +37 -0
- package/src/library/custom-component/usecases/entities-factory/ComponentFactory.ts +42 -0
- package/src/library/custom-component/usecases/entities-factory/EventHandlersFactory.ts +10 -0
- package/src/library/custom-component/usecases/entities-factory/PropertiesFactory.ts +13 -0
- package/src/library/custom-component/usecases/interactors/AbstractUseCase.ts +8 -0
- package/src/library/custom-component/usecases/interactors/DispatchUseCase.ts +18 -0
- package/src/library/custom-component/usecases/interactors/InitializeUseCase.ts +23 -0
- package/src/library/custom-component/usecases/interactors/MountUseCase.ts +18 -0
- package/src/library/custom-component/usecases/interactors/UnmountUseCase.ts +18 -0
- package/src/library/custom-component/usecases/interactors/UpdatePropertyUseCase.ts +24 -0
- package/src/library/custom-component/usecases/interactors/UpdateStateUseCase.ts +13 -0
- package/src/library/custom-component/usecases/interfaces/InputDependencies.ts +13 -0
- package/src/library/custom-component/usecases/interfaces/OutputDependencies.ts +5 -0
- package/src/library/custom-component/usecases/interfaces/UseCase.ts +4 -0
- package/src/library/custom-component/usecases/interfaces/gateways/IEventManager.ts +12 -0
- package/src/library/custom-component/usecases/interfaces/gateways/IJSONValidator.ts +8 -0
- package/src/library/custom-component/usecases/interfaces/gateways/IRepository.ts +9 -0
- package/src/library/custom-component/usecases/interfaces/gateways/IService.ts +15 -0
- package/src/library/custom-component/usecases/interfaces/input/DispatchInputModel.ts +4 -0
- package/src/library/custom-component/usecases/interfaces/input/InitailizeInputModel.ts +5 -0
- package/src/library/custom-component/usecases/interfaces/input/UpdatePropertiesInputModel.ts +2 -0
- package/src/library/custom-component/usecases/interfaces/input/UpdateStateInputModel.ts +2 -0
- package/src/library/custom-component/usecases/interfaces/output/OutputBoundary.ts +6 -0
- package/src/library/dot/components/action-location/adapters/controllers/MountController.ts +15 -0
- package/src/library/dot/components/action-location/adapters/controllers/PropertiesChangeController.ts +20 -0
- package/src/library/dot/components/action-location/adapters/controllers/UnmountController.ts +15 -0
- package/src/library/dot/components/action-location/adapters/gateway/Repository.ts +26 -0
- package/src/library/dot/components/action-location/adapters/presenters/Presenter.ts +19 -0
- package/src/library/dot/components/action-location/entities/ActionLocationEntity.ts +98 -0
- package/src/library/dot/components/action-location/entities/interfaces/ActionViewModel.ts +9 -0
- package/src/library/dot/components/action-location/entities/interfaces/EventMappingViewModel.ts +10 -0
- package/src/library/dot/components/action-location/entities/interfaces/IActionLocation.ts +8 -0
- package/src/library/dot/components/action-location/frameworks/ui/ActionLocation.tsx +13 -0
- package/src/library/dot/components/action-location/frameworks/ui/ActionLocationView.tsx +23 -0
- package/src/library/dot/components/action-location/frameworks/ui/EventHandlersFactory.ts +35 -0
- package/src/library/dot/components/action-location/usecases/interactors/AbstractUseCase.ts +13 -0
- package/src/library/dot/components/action-location/usecases/interactors/DestroyUseCase.ts +12 -0
- package/src/library/dot/components/action-location/usecases/interactors/InitializeUseCase.ts +12 -0
- package/src/library/dot/components/action-location/usecases/interactors/PropertiesChangeUseCase.ts +14 -0
- package/src/library/dot/components/action-location/usecases/interfaces/UseCaseDependencies.ts +4 -0
- package/src/library/dot/components/action-location/usecases/interfaces/gateways/IRepository.ts +6 -0
- package/src/library/dot/components/action-location/usecases/interfaces/input/PropertiesChangeUseCaseInputModel.ts +8 -0
- package/src/library/dot/components/action-location/usecases/interfaces/output/IPresenter.ts +4 -0
- package/src/library/dot/components/table-list/adapters/controllers/AbstractController.ts +9 -0
- package/src/library/dot/components/table-list/adapters/controllers/FieldChangeController.ts +22 -0
- package/src/library/dot/components/table-list/adapters/controllers/FieldClickController.ts +21 -0
- package/src/library/dot/components/table-list/adapters/controllers/RowClickController.ts +18 -0
- package/src/library/dot/components/table-list/adapters/controllers/ScrollController.ts +24 -0
- package/src/library/dot/components/table-list/adapters/controllers/SelectAllController.ts +14 -0
- package/src/library/dot/components/table-list/adapters/controllers/SelectItemController.ts +23 -0
- package/src/library/dot/components/table-list/adapters/controllers/SortByController.ts +16 -0
- package/src/library/dot/components/table-list/adapters/controllers/SortedController.ts +15 -0
- package/src/library/dot/components/table-list/adapters/controllers/index.ts +7 -0
- package/src/library/dot/components/table-list/adapters/presenters/TableTranslator.ts +35 -0
- package/src/library/dot/components/table-list/frameworks/ui/EventHandlersFactory.ts +31 -0
- package/src/library/dot/components/table-list/frameworks/ui/TableList.tsx +36 -0
- package/src/library/dot/components/table-list/frameworks/ui/TableListView.tsx +71 -0
- package/src/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +25 -0
- package/src/library/dot/components/table-list/frameworks/ui/handlers/HandleAllSelect.ts +7 -0
- package/src/library/dot/components/table-list/frameworks/ui/handlers/HandleRowSelect.ts +8 -0
- package/src/library/dot/components/table-list/frameworks/ui/handlers/HandleScroll.ts +10 -0
- package/src/library/dot/components/table-list/frameworks/ui/handlers/HandleSortClick.ts +8 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/Body.tsx +15 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/ColumnResizingLine.tsx +20 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/Header.tsx +42 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/Loading.tsx +19 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/NoData.tsx +24 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/Rows.tsx +36 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/field/FieldComponent.tsx +17 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/ActionColumn.tsx +9 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/ColumnResizer.tsx +12 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.tsx +25 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderText.tsx +23 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.tsx +26 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/ResizerExtraSpace.tsx +19 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/header/SelectAll.tsx +24 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/row/Columns.tsx +22 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.tsx +45 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.tsx +14 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.tsx +24 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/row/RowEventHandlersFactory.ts +19 -0
- package/src/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.tsx +26 -0
- package/src/library/dot/legacy-to-new-arch/action-icon/ActionIcon.ts +13 -0
- package/src/library/dot/legacy-to-new-arch/action-icon/ActionIconView.tsx +24 -0
- package/src/library/dot/legacy-to-new-arch/avatar/frameworks/ui/Avatar.contract.md +17 -0
- package/src/library/dot/legacy-to-new-arch/avatar/frameworks/ui/Avatar.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/avatar/frameworks/ui/AvatarView.tsx +49 -0
- package/src/library/dot/legacy-to-new-arch/checkbox/frameworks/ui/Checkbox.contract.md +21 -0
- package/src/library/dot/legacy-to-new-arch/checkbox/frameworks/ui/Checkbox.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/checkbox/frameworks/ui/CheckboxView.tsx +25 -0
- package/src/library/dot/legacy-to-new-arch/common-empty-state/CommonEmptyState.ts +13 -0
- package/src/library/dot/legacy-to-new-arch/common-empty-state/CommonEmptyStateView.tsx +11 -0
- package/src/library/dot/legacy-to-new-arch/email/frameworks/ui/Email.contract.md +7 -0
- package/src/library/dot/legacy-to-new-arch/email/frameworks/ui/Email.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/email/frameworks/ui/EmailView.tsx +25 -0
- package/src/library/dot/legacy-to-new-arch/field-components/checkbox-field/frameworks/ui/CheckboxField.tsx +15 -0
- package/src/library/dot/legacy-to-new-arch/field-components/checkbox-field/frameworks/ui/CheckboxFieldView.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/field-components/checkbox-field/frameworks/ui/EventHandlersFactory.ts +24 -0
- package/src/library/dot/legacy-to-new-arch/field-components/email-field/frameworks/ui/EmailField.tsx +13 -0
- package/src/library/dot/legacy-to-new-arch/field-components/email-field/frameworks/ui/EmailFieldView.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/field-components/index.ts +16 -0
- package/src/library/dot/legacy-to-new-arch/field-components/lookup-field/frameworks/ui/LookupField.tsx +13 -0
- package/src/library/dot/legacy-to-new-arch/field-components/lookup-field/frameworks/ui/LookupFieldView.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/field-components/multiselect-field/frameworks/ui/MultiSelectField.tsx +13 -0
- package/src/library/dot/legacy-to-new-arch/field-components/multiselect-field/frameworks/ui/MultiSelectFieldView.tsx +15 -0
- package/src/library/dot/legacy-to-new-arch/field-components/phone-field/frameworks/ui/PhoneField.tsx +13 -0
- package/src/library/dot/legacy-to-new-arch/field-components/phone-field/frameworks/ui/PhoneFieldView.tsx +15 -0
- package/src/library/dot/legacy-to-new-arch/field-components/picklist-field/frameworks/ui/PickListField.tsx +13 -0
- package/src/library/dot/legacy-to-new-arch/field-components/picklist-field/frameworks/ui/PickListFieldView.tsx +14 -0
- package/src/library/dot/legacy-to-new-arch/field-components/switch-field/frameworks/ui/EventHandlersFactory.ts +25 -0
- package/src/library/dot/legacy-to-new-arch/field-components/switch-field/frameworks/ui/SwitchField.tsx +15 -0
- package/src/library/dot/legacy-to-new-arch/field-components/switch-field/frameworks/ui/SwitchFieldView.tsx +8 -0
- package/src/library/dot/legacy-to-new-arch/field-components/text-field/frameworks/ui/EventHandlersFactory.ts +23 -0
- package/src/library/dot/legacy-to-new-arch/field-components/text-field/frameworks/ui/TextField.tsx +15 -0
- package/src/library/dot/legacy-to-new-arch/field-components/text-field/frameworks/ui/TextFieldView.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/field-components/url-field/frameworks/ui/EventHandlersFactory.ts +23 -0
- package/src/library/dot/legacy-to-new-arch/field-components/url-field/frameworks/ui/UrlField.tsx +15 -0
- package/src/library/dot/legacy-to-new-arch/field-components/url-field/frameworks/ui/UrlFieldView.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValue.contract.md +12 -0
- package/src/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValue.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValueView.tsx +24 -0
- package/src/library/dot/legacy-to-new-arch/index.ts +8 -0
- package/src/library/dot/legacy-to-new-arch/link/frameworks/ui/Link.contract.md +13 -0
- package/src/library/dot/legacy-to-new-arch/link/frameworks/ui/Link.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/link/frameworks/ui/LinkView.tsx +27 -0
- package/src/library/dot/legacy-to-new-arch/switch/frameworks/ui/Switch.contract.md +15 -0
- package/src/library/dot/legacy-to-new-arch/switch/frameworks/ui/Switch.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/switch/frameworks/ui/SwitchView.tsx +33 -0
- package/src/library/dot/legacy-to-new-arch/tags/frameworks/ui/TagContractAdapter.ts +16 -0
- package/src/library/dot/legacy-to-new-arch/tags/frameworks/ui/Tags.contract.md +8 -0
- package/src/library/dot/legacy-to-new-arch/tags/frameworks/ui/Tags.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/tags/frameworks/ui/TagsView.tsx +29 -0
- package/src/library/dot/legacy-to-new-arch/text/frameworks/ui/Text.contract.md +12 -0
- package/src/library/dot/legacy-to-new-arch/text/frameworks/ui/Text.tsx +12 -0
- package/src/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.tsx +27 -0
- package/src/library/index.ts +3 -0
- package/src/platform/data-broker/dbc/index.ts +77 -0
- package/src/platform/data-broker/http-template/deleteRecords.ts +31 -0
- package/src/platform/data-broker/http-template/getAvailableFields.ts +34 -0
- package/src/platform/data-broker/http-template/getRecords.ts +52 -0
- package/src/platform/data-broker/http-template/getSelectedFields.ts +48 -0
- package/src/platform/data-broker/http-template/getUIActions.ts +26 -0
- package/src/platform/data-broker/http-template/updateRecord.ts +37 -0
- package/src/platform/data-broker/index.ts +23 -0
- package/src/platform/data-broker/utils/transformer/createCf.ts +11 -0
- package/src/platform/data-broker/utils/transformer/transformer.ts +19 -0
- package/src/platform/index.js +1 -0
- package/src/platform/zfield/adapters/controllers/AbstractController.ts +12 -0
- package/src/platform/zfield/adapters/controllers/ExeucteActionController.ts +24 -0
- package/src/platform/zfield/adapters/controllers/FetchFailureController.ts +16 -0
- package/src/platform/zfield/adapters/controllers/FetchNoContentController.ts +16 -0
- package/src/platform/zfield/adapters/controllers/FetchSuccessController.ts +16 -0
- package/src/platform/zfield/adapters/controllers/InitializeController.ts +20 -0
- package/src/platform/zfield/adapters/controllers/RefetchController.ts +16 -0
- package/src/platform/zfield/adapters/gateways/Repository.ts +32 -0
- package/src/platform/zfield/adapters/gateways/Service.ts +28 -0
- package/src/platform/zfield/adapters/gateways/TemplateHelpers.ts +37 -0
- package/src/platform/zfield/adapters/presenters/Presenter.ts +32 -0
- package/src/platform/zfield/entities/BooleanField.ts +4 -0
- package/src/platform/zfield/entities/CurrencyField.ts +4 -0
- package/src/platform/zfield/entities/DateField.ts +4 -0
- package/src/platform/zfield/entities/DateTimeField.ts +4 -0
- package/src/platform/zfield/entities/EmailField.ts +6 -0
- package/src/platform/zfield/entities/Field.ts +45 -0
- package/src/platform/zfield/entities/LookupField.ts +12 -0
- package/src/platform/zfield/entities/MultiLineField.ts +4 -0
- package/src/platform/zfield/entities/MultiSelectField.ts +4 -0
- package/src/platform/zfield/entities/PercentageField.ts +4 -0
- package/src/platform/zfield/entities/PhoneField.ts +4 -0
- package/src/platform/zfield/entities/PickListField.ts +4 -0
- package/src/platform/zfield/entities/SingleLineField.ts +4 -0
- package/src/platform/zfield/entities/URLField.ts +4 -0
- package/src/platform/zfield/entities/api-template/APITemplate.ts +72 -0
- package/src/platform/zfield/entities/api-template/APITemplates.ts +22 -0
- package/src/platform/zfield/entities/fields-manager/AvailableFieldsManager.ts +86 -0
- package/src/platform/zfield/entities/fields-manager/FieldsManager.ts +117 -0
- package/src/platform/zfield/entities/fields-manager/SelectedFieldsManager.ts +87 -0
- package/src/platform/zfield/entities/index.ts +15 -0
- package/src/platform/zfield/entities/interfaces/ActionModel.ts +7 -0
- package/src/platform/zfield/entities/interfaces/BehaviourState.ts +16 -0
- package/src/platform/zfield/entities/interfaces/FieldModel.ts +18 -0
- package/src/platform/zfield/entities/interfaces/FieldTypes.ts +18 -0
- package/src/platform/zfield/entities/interfaces/IField.ts +6 -0
- package/src/platform/zfield/entities/interfaces/IFieldManger.ts +28 -0
- package/src/platform/zfield/entities/interfaces/MetaData.ts +20 -0
- package/src/platform/zfield/entities/interfaces/api-template/APIModels.ts +12 -0
- package/src/platform/zfield/entities/interfaces/api-template/IAPITemplate.ts +9 -0
- package/src/platform/zfield/entities/interfaces/api-template/IAPITemplates.ts +10 -0
- package/src/platform/zfield/entities/interfaces/api-template/ITemplateHelpers.ts +5 -0
- package/src/platform/zfield/frameworks/ActionHandlerFactory.ts +43 -0
- package/src/platform/zfield/frameworks/ZFieldBehaviourFactory.ts +17 -0
- package/src/platform/zfield/usecases/entity-factory/FieldBuilder.ts +106 -0
- package/src/platform/zfield/usecases/entity-factory/FieldFactory.ts +40 -0
- package/src/platform/zfield/usecases/entity-factory/FieldsManagerBuilder.ts +48 -0
- package/src/platform/zfield/usecases/interactors/AbstractUseCase.ts +16 -0
- package/src/platform/zfield/usecases/interactors/ExecuteActionUseCase.ts +16 -0
- package/src/platform/zfield/usecases/interactors/FetchFailureUseCase.ts +22 -0
- package/src/platform/zfield/usecases/interactors/FetchNoContentUseCase.ts +21 -0
- package/src/platform/zfield/usecases/interactors/FetchSuccessUseCase.ts +23 -0
- package/src/platform/zfield/usecases/interactors/InitializeUseCase.ts +13 -0
- package/src/platform/zfield/usecases/interactors/RefetchUseCase.ts +19 -0
- package/src/platform/zfield/usecases/interfaces/UsecaseDependencies.ts +10 -0
- package/src/platform/zfield/usecases/interfaces/gateways/IRepository.ts +8 -0
- package/src/platform/zfield/usecases/interfaces/gateways/IRestApi.ts +7 -0
- package/src/platform/zfield/usecases/interfaces/gateways/IService.ts +17 -0
- package/src/platform/zfield/usecases/interfaces/gateways/ITemplateHelpers.ts +1 -0
- package/src/platform/zfield/usecases/interfaces/input/ExecuteActionInputModel.ts +12 -0
- package/src/platform/zfield/usecases/interfaces/input/FetchInputModel.ts +18 -0
- package/src/platform/zfield/usecases/interfaces/input/InitialInputModel.ts +5 -0
- package/src/platform/zfield/usecases/interfaces/input/InputModel.ts +17 -0
- package/src/platform/zfield/usecases/interfaces/input/RefetchInputModel.ts +12 -0
- package/src/platform/zfield/usecases/interfaces/input/SetValueInputModel.ts +6 -0
- package/src/platform/zfield/usecases/interfaces/output/IPresenter.ts +9 -0
- package/src/platform/zhttp/adapters/controllers/FetchController.ts +18 -0
- package/src/platform/zhttp/adapters/gateway/FetchGateWay.ts +15 -0
- package/src/platform/zhttp/frameworks/ActionsHandlerFactory.ts +19 -0
- package/src/platform/zhttp/frameworks/ZHttpBehaviourFactory.ts +15 -0
- package/src/platform/zhttp/usecases/interactors/AbstractUseCase.ts +8 -0
- package/src/platform/zhttp/usecases/interactors/FetchUseCase.ts +44 -0
- package/src/platform/zhttp/usecases/interfaces/InputDependencies.ts +6 -0
- package/src/platform/zhttp/usecases/interfaces/UseCase.ts +4 -0
- package/src/platform/zhttp/usecases/interfaces/gateway/IFetchGateWay.ts +15 -0
- package/src/platform/zhttp/usecases/interfaces/input/FetchInputModel.ts +8 -0
- package/src/platform/zlist/adapters/controllers/AbstractController.ts +12 -0
- package/src/platform/zlist/adapters/controllers/DeleteMultipleRecordController.ts +12 -0
- package/src/platform/zlist/adapters/controllers/FetchMoreController.ts +11 -0
- package/src/platform/zlist/adapters/controllers/FieldChangeController.ts +12 -0
- package/src/platform/zlist/adapters/controllers/MountController.ts +12 -0
- package/src/platform/zlist/adapters/controllers/PropertiesChangeController.ts +14 -0
- package/src/platform/zlist/adapters/controllers/RecordUpdateController.ts +12 -0
- package/src/platform/zlist/adapters/controllers/SortController.ts +14 -0
- package/src/platform/zlist/adapters/gateways/Repository.ts +30 -0
- package/src/platform/zlist/adapters/gateways/Service.ts +31 -0
- package/src/platform/zlist/adapters/gateways/SortBy.ts +27 -0
- package/src/platform/zlist/adapters/presenters/TableTranslator.ts +43 -0
- package/src/platform/zlist/adapters/presenters/translators/ColumnTranslator.ts +29 -0
- package/src/platform/zlist/adapters/presenters/translators/EmptyViewModel.ts +10 -0
- package/src/platform/zlist/adapters/presenters/translators/Header.ts +16 -0
- package/src/platform/zlist/adapters/presenters/translators/HeadersTranslator.ts +27 -0
- package/src/platform/zlist/adapters/presenters/translators/Row.ts +23 -0
- package/src/platform/zlist/adapters/presenters/translators/RowActionTranslator.ts +34 -0
- package/src/platform/zlist/adapters/presenters/translators/RowsTranslator.ts +38 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/BooleanFieldTranslator.ts +20 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.ts +15 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/DateFieldTranslator.ts +14 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/DateTimeFieldTranslator.ts +14 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/DecimalFieldTranslator.ts +15 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/EmailFieldTranslator.ts +14 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/LookUpFieldTranslator.ts +16 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.ts +15 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.ts +20 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/NumberFieldTranslator.ts +15 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.ts +14 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/PhoneFieldTranslator.ts +14 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/PickListFieldTranslator.ts +14 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/SingleLineFieldTranslator.ts +15 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/URLFieldTranslator.ts +15 -0
- package/src/platform/zlist/adapters/presenters/translators/fields/index.ts +27 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/FieldModel.ts +19 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/FieldTranslator.ts +6 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/FieldUiMapping.ts +10 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/PageContext.ts +6 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/RowActionModel.ts +18 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/SelectedField.ts +2 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/State.ts +17 -0
- package/src/platform/zlist/adapters/presenters/translators/interfaces/ZFieldsBehaviourState.ts +9 -0
- package/src/platform/zlist/adapters/presenters/utils/pipeline.ts +16 -0
- package/src/platform/zlist/adapters/presenters/utils/replacer.ts +8 -0
- package/src/platform/zlist/adapters/presenters/utils/selectn.ts +6 -0
- package/src/platform/zlist/entities/List.ts +237 -0
- package/src/platform/zlist/entities/interfaces/ActionModel.ts +13 -0
- package/src/platform/zlist/entities/interfaces/ApiPropsModel.ts +10 -0
- package/src/platform/zlist/entities/interfaces/IList.ts +13 -0
- package/src/platform/zlist/entities/interfaces/Properties.ts +18 -0
- package/src/platform/zlist/frameworks/EventHandlersFactory.ts +44 -0
- package/src/platform/zlist/frameworks/ZListBehaviourFactory.ts +14 -0
- package/src/platform/zlist/usecases/entities-factory/ListFactory.ts +11 -0
- package/src/platform/zlist/usecases/interactors/AbstractUseCase.ts +18 -0
- package/src/platform/zlist/usecases/interactors/DeleteMultipleRecordUseCase.ts +14 -0
- package/src/platform/zlist/usecases/interactors/FetchMoreUseCase.ts +13 -0
- package/src/platform/zlist/usecases/interactors/FieldChangeUseCase.ts +14 -0
- package/src/platform/zlist/usecases/interactors/InitializeUseCase.ts +13 -0
- package/src/platform/zlist/usecases/interactors/PropertiesChangeUseCase.ts +14 -0
- package/src/platform/zlist/usecases/interactors/RecordUpdateUseCase.ts +14 -0
- package/src/platform/zlist/usecases/interactors/SortUseCase.ts +15 -0
- package/src/platform/zlist/usecases/interfaces/State.ts +5 -0
- package/src/platform/zlist/usecases/interfaces/UseCaseDependencies.ts +9 -0
- package/src/platform/zlist/usecases/interfaces/gateways/IRepository.ts +9 -0
- package/src/platform/zlist/usecases/interfaces/gateways/IService.ts +19 -0
- package/src/platform/zlist/usecases/interfaces/gateways/ISortBy.ts +9 -0
- package/src/platform/zlist/usecases/interfaces/gateways/ITransformState.ts +0 -0
- package/src/platform/zlist/usecases/interfaces/input/DeleteMultipleRecordUseCaseInput.ts +6 -0
- package/src/platform/zlist/usecases/interfaces/input/FetchMoreInput.ts +5 -0
- package/src/platform/zlist/usecases/interfaces/input/FieldChangeUseCaseInput.ts +8 -0
- package/src/platform/zlist/usecases/interfaces/input/InitializeInput.ts +4 -0
- package/src/platform/zlist/usecases/interfaces/input/PropertiesChangeUseCaseInput.ts +8 -0
- package/src/platform/zlist/usecases/interfaces/input/RecordUpdateUseCaseInput.ts +6 -0
- package/src/platform/zlist/usecases/interfaces/input/SortingInputModel.ts +12 -0
- package/src/platform/zrecord/adapters/controllers/AbstractController.ts +11 -0
- package/src/platform/zrecord/adapters/controllers/ActionExecutorController.ts +20 -0
- package/src/platform/zrecord/adapters/controllers/AppendRecordsController.ts +16 -0
- package/src/platform/zrecord/adapters/controllers/DeleteMultipleRecordLocalController.ts +16 -0
- package/src/platform/zrecord/adapters/controllers/FailureController.ts +23 -0
- package/src/platform/zrecord/adapters/controllers/FetchMoreController.ts +14 -0
- package/src/platform/zrecord/adapters/controllers/FieldChangeController.ts +12 -0
- package/src/platform/zrecord/adapters/controllers/MountController.ts +17 -0
- package/src/platform/zrecord/adapters/controllers/NoContentController.ts +20 -0
- package/src/platform/zrecord/adapters/controllers/RecordUpdateLocalController.ts +14 -0
- package/src/platform/zrecord/adapters/controllers/RefetchController.ts +24 -0
- package/src/platform/zrecord/adapters/controllers/SuccessController.ts +21 -0
- package/src/platform/zrecord/adapters/gateways/Repository.ts +23 -0
- package/src/platform/zrecord/adapters/gateways/Service.ts +42 -0
- package/src/platform/zrecord/adapters/gateways/TemplateHelpers.ts +37 -0
- package/src/platform/zrecord/adapters/presenters/Presenter.ts +23 -0
- package/src/platform/zrecord/entities/APITemplate.ts +68 -0
- package/src/platform/zrecord/entities/APITemplates.ts +22 -0
- package/src/platform/zrecord/entities/CustomFieldValues.ts +30 -0
- package/src/platform/zrecord/entities/Property.ts +26 -0
- package/src/platform/zrecord/entities/Record.ts +62 -0
- package/src/platform/zrecord/entities/Records.ts +83 -0
- package/src/platform/zrecord/entities/RecordsManager.ts +196 -0
- package/src/platform/zrecord/entities/interfaces/APIDetailsModel.ts +8 -0
- package/src/platform/zrecord/entities/interfaces/APITemplateModel.ts +3 -0
- package/src/platform/zrecord/entities/interfaces/APITemplatesModel.ts +3 -0
- package/src/platform/zrecord/entities/interfaces/ActionModel.ts +8 -0
- package/src/platform/zrecord/entities/interfaces/BehaviourState.ts +9 -0
- package/src/platform/zrecord/entities/interfaces/IAPITemplate.ts +10 -0
- package/src/platform/zrecord/entities/interfaces/IAPITemplates.ts +10 -0
- package/src/platform/zrecord/entities/interfaces/ICustomFieldValues.ts +9 -0
- package/src/platform/zrecord/entities/interfaces/IProperties.ts +7 -0
- package/src/platform/zrecord/entities/interfaces/IRecord.ts +6 -0
- package/src/platform/zrecord/entities/interfaces/IRecordName.ts +5 -0
- package/src/platform/zrecord/entities/interfaces/IRecords.ts +20 -0
- package/src/platform/zrecord/entities/interfaces/IRecordsManager.ts +33 -0
- package/src/platform/zrecord/entities/interfaces/ITemplateHelpers.ts +5 -0
- package/src/platform/zrecord/entities/interfaces/MetaData.ts +17 -0
- package/src/platform/zrecord/entities/interfaces/RecordModel.ts +22 -0
- package/src/platform/zrecord/entities/interfaces/RecordsModel.ts +7 -0
- package/src/platform/zrecord/entities/interfaces/apiEnum.ts +1 -0
- package/src/platform/zrecord/frameworks/ActionsHandlersFactory.ts +64 -0
- package/src/platform/zrecord/frameworks/RecordBehaviourFactory.ts +14 -0
- package/src/platform/zrecord/usecases/entities-factory/APITemplatesFactory.ts +27 -0
- package/src/platform/zrecord/usecases/entities-factory/RecordFactory.ts +12 -0
- package/src/platform/zrecord/usecases/entities-factory/RecordsManagerFactory.ts +15 -0
- package/src/platform/zrecord/usecases/interactors/AbstractUseCase.ts +14 -0
- package/src/platform/zrecord/usecases/interactors/AppendRecordsUseCase.ts +18 -0
- package/src/platform/zrecord/usecases/interactors/DeleteMultipleRecordUseCase.ts +16 -0
- package/src/platform/zrecord/usecases/interactors/ExecuteActionUseCase.ts +23 -0
- package/src/platform/zrecord/usecases/interactors/FailureUseCase.ts +20 -0
- package/src/platform/zrecord/usecases/interactors/FetchMoreUseCase.ts +24 -0
- package/src/platform/zrecord/usecases/interactors/FieldChangeUseCase.ts +16 -0
- package/src/platform/zrecord/usecases/interactors/InitializeUseCase.ts +10 -0
- package/src/platform/zrecord/usecases/interactors/NoContentUseCase.ts +22 -0
- package/src/platform/zrecord/usecases/interactors/RecordUpdateLocalUseCase.ts +16 -0
- package/src/platform/zrecord/usecases/interactors/RefetchUseCase.ts +23 -0
- package/src/platform/zrecord/usecases/interactors/SuccessUseCase.ts +25 -0
- package/src/platform/zrecord/usecases/interfaces/InputDependencies.ts +11 -0
- package/src/platform/zrecord/usecases/interfaces/gateways/IRepository.ts +10 -0
- package/src/platform/zrecord/usecases/interfaces/gateways/IService.ts +25 -0
- package/src/platform/zrecord/usecases/interfaces/gateways/ITemplateHelpers.ts +1 -0
- package/src/platform/zrecord/usecases/interfaces/gateways/State.ts +7 -0
- package/src/platform/zrecord/usecases/interfaces/input/AppendRecordsInputModel.ts +7 -0
- package/src/platform/zrecord/usecases/interfaces/input/DeleteMultipleRecordInputModel.ts +6 -0
- package/src/platform/zrecord/usecases/interfaces/input/ExecuteActionInputModel.ts +10 -0
- package/src/platform/zrecord/usecases/interfaces/input/FailureInputModel.ts +8 -0
- package/src/platform/zrecord/usecases/interfaces/input/FetchMoreInputModel.ts +10 -0
- package/src/platform/zrecord/usecases/interfaces/input/FieldChangeUseCaseInput.ts +6 -0
- package/src/platform/zrecord/usecases/interfaces/input/InitializeInputModel.ts +4 -0
- package/src/platform/zrecord/usecases/interfaces/input/NoContentInputModel.ts +7 -0
- package/src/platform/zrecord/usecases/interfaces/input/RecordUpdateLocalUseCaseInputModel.ts +7 -0
- package/src/platform/zrecord/usecases/interfaces/input/RefetchInputModel.ts +10 -0
- package/src/platform/zrecord/usecases/interfaces/input/SuccessInputModel.ts +8 -0
- package/src/platform/zrecord/usecases/interfaces/output/IPresenter.ts +7 -0
- package/tsconfig.json +114 -0
package/src/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValueView.tsx
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import StatusBox from "@zohodesk-private/desk-components/es/table/StatusBox/StatusBox";
|
|
3
|
+
import { HighlightedValueConstants } from "../../../../../../cc";
|
|
4
|
+
|
|
5
|
+
function HighlightedValueView({ state, helpers }, ref) {
|
|
6
|
+
let { dispatch } = helpers;
|
|
7
|
+
let { text, color, tooltip } = state.properties;
|
|
8
|
+
return (
|
|
9
|
+
<StatusBox
|
|
10
|
+
$customProps_container={{
|
|
11
|
+
ref
|
|
12
|
+
}}
|
|
13
|
+
$ui_color={color}
|
|
14
|
+
$i18n_text={text}
|
|
15
|
+
$i18n_tooltip={tooltip}
|
|
16
|
+
$event_onClick={() => {
|
|
17
|
+
dispatch({
|
|
18
|
+
type: HighlightedValueConstants.HIGHLIGHTED_VALUE_CLICKED
|
|
19
|
+
});
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export default HighlightedValueView;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Avatar } from "./avatar/frameworks/ui/Avatar";
|
|
2
|
+
export { default as Checkbox } from "./checkbox/frameworks/ui/Checkbox";
|
|
3
|
+
export { default as Email } from "./email/frameworks/ui/Email";
|
|
4
|
+
export { default as HighlightedValue } from "./highlighted-value/frameworks/ui/HighlightedValue";
|
|
5
|
+
export { default as Link } from "./link/frameworks/ui/Link";
|
|
6
|
+
export { default as Switch } from "./switch/frameworks/ui/Switch";
|
|
7
|
+
export { default as Tags } from "./tags/frameworks/ui/Tags";
|
|
8
|
+
export { default as Text } from "./text/frameworks/ui/Text";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Link Contract
|
|
2
|
+
|
|
3
|
+
Link - TextLink
|
|
4
|
+
|
|
5
|
+
| List V2 | External Reference | Available in Component | Description |
|
|
6
|
+
| ----------- | ------------------ | ---------------------- | --------------------------- |
|
|
7
|
+
| label | label | Yes | Text that show |
|
|
8
|
+
| variant | variant | Yes | Color & hover |
|
|
9
|
+
| href | href | Yes | Link url |
|
|
10
|
+
| opensNewTab | opensWindow | Yes | Open url in self or new tab |
|
|
11
|
+
| - | underlined | No | Underline need |
|
|
12
|
+
| - | download | Partially Supported | Download & File name |
|
|
13
|
+
| - | configAria | Yes | Aria properties |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../custom-component";
|
|
2
|
+
import { LinkProperties, LinkActions } from "../../../../../../cc";
|
|
3
|
+
import LinkView from "./LinkView";
|
|
4
|
+
|
|
5
|
+
let Link = createCustomComponent({
|
|
6
|
+
name: "Link",
|
|
7
|
+
View: LinkView,
|
|
8
|
+
properties: LinkProperties,
|
|
9
|
+
actions: LinkActions,
|
|
10
|
+
actionHandlers: {}
|
|
11
|
+
});
|
|
12
|
+
export default Link;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TableLink from "@zohodesk-private/desk-components/es/table/TableLink/TableLink";
|
|
3
|
+
import { LinkConstants } from "../../../../../../cc";
|
|
4
|
+
|
|
5
|
+
function LinkView({ state, helpers }, ref) {
|
|
6
|
+
let { dispatch } = helpers;
|
|
7
|
+
let { label, variant, href, opensNewTab } = state.properties;
|
|
8
|
+
let target = opensNewTab ? '_blank' : '_self'; // Will be adopted with properties
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<TableLink
|
|
12
|
+
$customProps_link={{
|
|
13
|
+
ref
|
|
14
|
+
}}
|
|
15
|
+
$data_text={label}
|
|
16
|
+
$data_url={href}
|
|
17
|
+
$data_target={target}
|
|
18
|
+
$ui_variant={variant}
|
|
19
|
+
$event_onClick={() => {
|
|
20
|
+
dispatch({
|
|
21
|
+
type: LinkConstants.LINK_CLICKED
|
|
22
|
+
});
|
|
23
|
+
}}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export default LinkView;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Switch Contract
|
|
2
|
+
|
|
3
|
+
Switch - Toggle
|
|
4
|
+
|
|
5
|
+
| List V2 | External Reference | Available in Component | Description |
|
|
6
|
+
| -------- | ------------------ | ---------------------- | ------------------------ |
|
|
7
|
+
| checked | checked | Yes | Turned on or off |
|
|
8
|
+
| disabled | disabled | Yes | Disabled state |
|
|
9
|
+
| size | size | Yes | Switch size |
|
|
10
|
+
| tooltip | - | Yes | Switch tooltip |
|
|
11
|
+
| - | manageChecked | No | Local state need |
|
|
12
|
+
| - | label | Yes | Label text |
|
|
13
|
+
| - | labelPosition | No | Label position - 4 sides |
|
|
14
|
+
| - | fullWidth | No | Block the link |
|
|
15
|
+
| - | configAria | Yes | Aria properties |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../custom-component";
|
|
2
|
+
import { SwitchProperties, SwitchActions } from "../../../../../../cc";
|
|
3
|
+
import SwitchView from "./SwitchView";
|
|
4
|
+
|
|
5
|
+
let Switch = createCustomComponent({
|
|
6
|
+
name: "Switch",
|
|
7
|
+
View: SwitchView,
|
|
8
|
+
properties: SwitchProperties,
|
|
9
|
+
actions: SwitchActions,
|
|
10
|
+
actionHandlers: {}
|
|
11
|
+
});
|
|
12
|
+
export default Switch;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Switch from '@zohodesk/components/es/Switch/Switch';
|
|
3
|
+
import { useUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
|
|
4
|
+
import { SwitchConstants } from '../../../../../../cc';
|
|
5
|
+
|
|
6
|
+
function SwitchView({ state, helpers }, ref) {
|
|
7
|
+
let { dispatch } = helpers;
|
|
8
|
+
let { checked, disabled, size, tooltip } = state.properties;
|
|
9
|
+
|
|
10
|
+
let getId = useUniqueId();
|
|
11
|
+
let id = getId();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Switch
|
|
15
|
+
customProps={{
|
|
16
|
+
SwitchProps: {
|
|
17
|
+
eleRef: ref
|
|
18
|
+
}
|
|
19
|
+
}}
|
|
20
|
+
id={id}
|
|
21
|
+
size={size}
|
|
22
|
+
checked={checked}
|
|
23
|
+
disabled={disabled}
|
|
24
|
+
title={tooltip}
|
|
25
|
+
onChange={() => {
|
|
26
|
+
dispatch({
|
|
27
|
+
type: SwitchConstants.SWITCH_TOGGLED
|
|
28
|
+
});
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export default SwitchView;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default function TagContractAdapter(tag) {
|
|
2
|
+
const { id, label, color, imageSrc, imageAltText, iconName, disabled, size, tooltip } = tag;
|
|
3
|
+
return {
|
|
4
|
+
id,
|
|
5
|
+
text: label,
|
|
6
|
+
imageUrl: imageSrc,
|
|
7
|
+
name: imageAltText,
|
|
8
|
+
iconName,
|
|
9
|
+
color,
|
|
10
|
+
customProps: {
|
|
11
|
+
disabled,
|
|
12
|
+
size,
|
|
13
|
+
tooltip
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Tags Contract
|
|
2
|
+
|
|
3
|
+
Tags - Pill list
|
|
4
|
+
|
|
5
|
+
| List V2 | External Reference | Available in Component | Description |
|
|
6
|
+
| ------- | ------------------ | ---------------------- | -------------------------- |
|
|
7
|
+
| title | title | Yes | Title of the tags list |
|
|
8
|
+
| tags | pills | Yes | Array of object - Tag data |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCustomComponent } from "@library/custom-component";
|
|
2
|
+
import { TagsProperties, TagsActions } from "@cc/tags";
|
|
3
|
+
import TagsView from "./TagsView";
|
|
4
|
+
|
|
5
|
+
let Tags = createCustomComponent({
|
|
6
|
+
name: "Tags",
|
|
7
|
+
View: TagsView,
|
|
8
|
+
properties: TagsProperties,
|
|
9
|
+
actions: TagsActions,
|
|
10
|
+
actionHandlers: {}
|
|
11
|
+
});
|
|
12
|
+
export default Tags;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TagList from '@zohodesk-private/desk-components/es/TagsList/TagsList';
|
|
3
|
+
import TagContractAdapter from './TagContractAdapter';
|
|
4
|
+
import { TagsConstants } from '@cc/tags';
|
|
5
|
+
|
|
6
|
+
function TagView({ state, helpers }, ref) {
|
|
7
|
+
let { dispatch } = helpers;
|
|
8
|
+
let { title, tags } = state.properties;
|
|
9
|
+
|
|
10
|
+
let tagsList = tags.map(TagContractAdapter);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<TagList
|
|
14
|
+
$method_getRef={ref}
|
|
15
|
+
$data_list={tagsList}
|
|
16
|
+
$i18n_moreheading={title}
|
|
17
|
+
$flag_showAllTagsInsideMore={false}
|
|
18
|
+
$event_onTagClick={id => {
|
|
19
|
+
dispatch({
|
|
20
|
+
type: TagsConstants.TAG_CLICKED,
|
|
21
|
+
payload: {
|
|
22
|
+
id
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export default TagView;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Text Contract
|
|
2
|
+
|
|
3
|
+
Text - Stylized text
|
|
4
|
+
|
|
5
|
+
| List V2 | External Reference | Available in Component | Description |
|
|
6
|
+
| ------- | ------------------ | ---------------------- | -------------------- |
|
|
7
|
+
| text | text | Yes | Text that shows |
|
|
8
|
+
| weight | - | Yes | Text font weight |
|
|
9
|
+
| tooltip | - | Yes | Tooltip text |
|
|
10
|
+
| - | css | Yes | Css inline style |
|
|
11
|
+
| - | tag | Yes | html tag => h1, span |
|
|
12
|
+
| - | configAria | Yes | Aria properties |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../custom-component";
|
|
2
|
+
import { TextProperties, TextActions } from "../../../../../../cc";
|
|
3
|
+
import TextView from "./TextView";
|
|
4
|
+
|
|
5
|
+
let WrapText = createCustomComponent({
|
|
6
|
+
name: "TableText",
|
|
7
|
+
View: TextView,
|
|
8
|
+
properties: TextProperties,
|
|
9
|
+
actions: TextActions,
|
|
10
|
+
actionHandlers: {}
|
|
11
|
+
});
|
|
12
|
+
export default WrapText;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Typography from "@zohodesk/components/es/v1/Typography/Typography";
|
|
3
|
+
import { TextConstants } from "../../../../../../cc";
|
|
4
|
+
|
|
5
|
+
function TextView({ state, helpers }, ref) {
|
|
6
|
+
let { dispatch } = helpers;
|
|
7
|
+
let { text, weight, tooltip } = state.properties;
|
|
8
|
+
return (
|
|
9
|
+
<Typography
|
|
10
|
+
$tagAttributes_text={{
|
|
11
|
+
ref: (ele) => {
|
|
12
|
+
ref(ele);
|
|
13
|
+
},
|
|
14
|
+
onClick: () => {
|
|
15
|
+
dispatch({
|
|
16
|
+
type: TextConstants.TEXT_CLICKED
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}}
|
|
20
|
+
$ui_size='14'
|
|
21
|
+
$flag_dotted
|
|
22
|
+
$ui_weight={weight}
|
|
23
|
+
$i18n_dataTitle={tooltip || text}
|
|
24
|
+
>{text}</Typography>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export default TextView;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as ComponentRegistry } from './custom-component/frameworks/ui/ComponentRegistry';
|
|
2
|
+
export { default as createCustomComponent } from './custom-component/frameworks/ui/createCustomComponent';
|
|
3
|
+
export { default as TableList } from './dot/components/table-list/frameworks/ui/TableList';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import IField from '@platform/zfield/entities/interfaces/IField';
|
|
2
|
+
import IRecord from '../../zrecord/entities/interfaces/IRecord';
|
|
3
|
+
|
|
4
|
+
type Property = {
|
|
5
|
+
required: boolean;
|
|
6
|
+
defaultValue?: any;
|
|
7
|
+
label?: string;
|
|
8
|
+
typeMetadata: {
|
|
9
|
+
schema: Schema;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type Properties = {
|
|
13
|
+
[propertyKey: string]: Property;
|
|
14
|
+
};
|
|
15
|
+
type Schema = {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
type PayloadProperties = {
|
|
19
|
+
name: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
typeMetadata: {
|
|
22
|
+
schema: Schema;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type Payload = {
|
|
26
|
+
[key: string]: PayloadProperties;
|
|
27
|
+
};
|
|
28
|
+
type Event = {
|
|
29
|
+
type: string;
|
|
30
|
+
payload: Payload;
|
|
31
|
+
label?: string;
|
|
32
|
+
};
|
|
33
|
+
interface ActionHandler {}
|
|
34
|
+
type ActionHandlers = {
|
|
35
|
+
[key: string]: ActionHandler;
|
|
36
|
+
};
|
|
37
|
+
type Params = {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
type Body = {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
export type GetTemplate = {
|
|
44
|
+
name: string;
|
|
45
|
+
properties: Properties;
|
|
46
|
+
type: 'GET';
|
|
47
|
+
api: string;
|
|
48
|
+
requestBody?: null;
|
|
49
|
+
parameters: string;
|
|
50
|
+
transformer: (res: any) => IField[];
|
|
51
|
+
};
|
|
52
|
+
export type PostTemplate = {
|
|
53
|
+
name: string;
|
|
54
|
+
properties: Properties;
|
|
55
|
+
type: 'POST';
|
|
56
|
+
api: string;
|
|
57
|
+
parameters: string;
|
|
58
|
+
requestBody: string;
|
|
59
|
+
transformer: (res: any) => IField[];
|
|
60
|
+
};
|
|
61
|
+
export type PatchTemplate = {
|
|
62
|
+
name: string;
|
|
63
|
+
properties: Properties;
|
|
64
|
+
type: 'PATCH';
|
|
65
|
+
api: string;
|
|
66
|
+
parameters: string;
|
|
67
|
+
requestBody: string;
|
|
68
|
+
transformer: (res: any) => IField[];
|
|
69
|
+
};
|
|
70
|
+
export type HttpTemplates = {
|
|
71
|
+
[name: string]: GetTemplate | PostTemplate | PatchTemplate;
|
|
72
|
+
};
|
|
73
|
+
type DataBroker = {
|
|
74
|
+
httpTemplates: HttpTemplates;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export default DataBroker;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PostTemplate } from '../dbc';
|
|
2
|
+
|
|
3
|
+
const deleteRecords: PostTemplate = {
|
|
4
|
+
name: 'records',
|
|
5
|
+
api: '/api/v1/{{moduleName}}/moveToTrash',
|
|
6
|
+
parameters: `{}`,
|
|
7
|
+
type: 'POST',
|
|
8
|
+
transformer: data => data,
|
|
9
|
+
requestBody: '{ "entityIds": {{recordIds}} }',
|
|
10
|
+
// TODO: need to discuss with Records team about delete
|
|
11
|
+
// requestBody: '{ "recordIds": {{recordIds}} }',
|
|
12
|
+
properties: {
|
|
13
|
+
moduleName: {
|
|
14
|
+
required: true,
|
|
15
|
+
typeMetadata: {
|
|
16
|
+
schema: {
|
|
17
|
+
type: 'string'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
recordIds: {
|
|
22
|
+
required: true,
|
|
23
|
+
typeMetadata: {
|
|
24
|
+
schema: {
|
|
25
|
+
type: 'array'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default deleteRecords;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GetTemplate } from "../dbc";
|
|
2
|
+
import transformer from "../utils/transformer/transformer";
|
|
3
|
+
|
|
4
|
+
let getAvailableFields: GetTemplate = {
|
|
5
|
+
name: "availableFields",
|
|
6
|
+
// api: "/api/v1/organizationFields",
|
|
7
|
+
api: "/api/v1/views/availableFields",
|
|
8
|
+
parameters: `{
|
|
9
|
+
"departmentId":"{{departmentId}}",
|
|
10
|
+
"module":"{{moduleName}}"
|
|
11
|
+
}`,
|
|
12
|
+
type: "GET",
|
|
13
|
+
// transformer: (res) => transformer(res, "name"),
|
|
14
|
+
transformer: (res) => res.fields,
|
|
15
|
+
properties: {
|
|
16
|
+
moduleName: {
|
|
17
|
+
required: true,
|
|
18
|
+
typeMetadata: {
|
|
19
|
+
schema: {
|
|
20
|
+
type: "string"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
departmentId: {
|
|
25
|
+
required: true,
|
|
26
|
+
typeMetadata: {
|
|
27
|
+
schema: {
|
|
28
|
+
type: "string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export default getAvailableFields;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { GetTemplate } from '../dbc';
|
|
2
|
+
import transformer from '../utils/transformer/transformer';
|
|
3
|
+
|
|
4
|
+
let getRecords: GetTemplate = {
|
|
5
|
+
name: 'records',
|
|
6
|
+
api: '/api/v1/{{moduleName}}',
|
|
7
|
+
parameters: `{
|
|
8
|
+
"viewId":"{{viewId}}",
|
|
9
|
+
"from":{{from}},
|
|
10
|
+
"limit":{{limit}},
|
|
11
|
+
"sortBy":"{{sortBy}}"
|
|
12
|
+
}`,
|
|
13
|
+
type: 'GET',
|
|
14
|
+
transformer: data => data.data, //transformer(data, "subject"),
|
|
15
|
+
properties: {
|
|
16
|
+
moduleName: {
|
|
17
|
+
required: true,
|
|
18
|
+
typeMetadata: {
|
|
19
|
+
schema: {
|
|
20
|
+
type: 'string'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
viewId: {
|
|
25
|
+
required: true,
|
|
26
|
+
typeMetadata: {
|
|
27
|
+
schema: {
|
|
28
|
+
type: 'string'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
from: {
|
|
33
|
+
required: false,
|
|
34
|
+
defaultValue: 1,
|
|
35
|
+
typeMetadata: {
|
|
36
|
+
schema: {
|
|
37
|
+
type: 'number'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
limit: {
|
|
42
|
+
required: false,
|
|
43
|
+
defaultValue: 20,
|
|
44
|
+
typeMetadata: {
|
|
45
|
+
schema: {
|
|
46
|
+
type: 'number'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export default getRecords;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GetTemplate } from "../dbc";
|
|
2
|
+
import transformer from "../utils/transformer/transformer";
|
|
3
|
+
|
|
4
|
+
let getSelectedFields: GetTemplate = {
|
|
5
|
+
name: "selectedFields",
|
|
6
|
+
api: "/api/v1/views/{{viewId}}/selectedFields",
|
|
7
|
+
parameters: `{
|
|
8
|
+
"departmentId":"{{departmentId}}"
|
|
9
|
+
}`,
|
|
10
|
+
type: "GET",
|
|
11
|
+
transformer: (res) => res.fields,
|
|
12
|
+
// transformer: (res) => {
|
|
13
|
+
// return transformer(
|
|
14
|
+
// {
|
|
15
|
+
// data: res.fields.map((field) => ({ id: field, name: field }))
|
|
16
|
+
// },
|
|
17
|
+
// "name"
|
|
18
|
+
// );
|
|
19
|
+
// },
|
|
20
|
+
properties: {
|
|
21
|
+
// module: {
|
|
22
|
+
// required: true,
|
|
23
|
+
// typeMetadata: {
|
|
24
|
+
// schema: {
|
|
25
|
+
// type: "string"
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
28
|
+
// },
|
|
29
|
+
viewId: {
|
|
30
|
+
required: true,
|
|
31
|
+
typeMetadata: {
|
|
32
|
+
schema: {
|
|
33
|
+
type: "string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
departmentId: {
|
|
38
|
+
required: true,
|
|
39
|
+
defaultValue: 1,
|
|
40
|
+
typeMetadata: {
|
|
41
|
+
schema: {
|
|
42
|
+
type: "number"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export default getSelectedFields;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GetTemplate } from "../dbc";
|
|
2
|
+
import transformer from "../utils/transformer/transformer";
|
|
3
|
+
|
|
4
|
+
let getUIActions: GetTemplate = {
|
|
5
|
+
name: "uiActions",
|
|
6
|
+
api: "https://vimal-19789.tsi.zohocorpin.com:9090/api/v2/records",
|
|
7
|
+
parameters: `{
|
|
8
|
+
"cf_model_name":"{{modelName}}",
|
|
9
|
+
"module":"{{modelName}}"
|
|
10
|
+
}`,
|
|
11
|
+
type: "GET",
|
|
12
|
+
transformer: (data) => transformer(data, "UIActionName"),
|
|
13
|
+
properties: {
|
|
14
|
+
modelName: {
|
|
15
|
+
required: true,
|
|
16
|
+
typeMetadata: {
|
|
17
|
+
schema: {
|
|
18
|
+
type: "string",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export default getUIActions;
|
|
25
|
+
|
|
26
|
+
// https://vimal-19789.tsi.zohocorpin.com:9090/api/v2/records?cf_model_name=list&module=dcactions
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PatchTemplate } from '../dbc';
|
|
2
|
+
|
|
3
|
+
const updateRecord: PatchTemplate = {
|
|
4
|
+
name: 'records',
|
|
5
|
+
api: '/api/v1/{{moduleName}}/{{recordId}}',
|
|
6
|
+
parameters: `{}`,
|
|
7
|
+
type: 'PATCH',
|
|
8
|
+
transformer: data => data,
|
|
9
|
+
requestBody: '{{record}}',
|
|
10
|
+
properties: {
|
|
11
|
+
moduleName: {
|
|
12
|
+
required: true,
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
recordId: {
|
|
20
|
+
required: true,
|
|
21
|
+
typeMetadata: {
|
|
22
|
+
schema: {
|
|
23
|
+
type: 'string'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
record: {
|
|
28
|
+
required: true,
|
|
29
|
+
typeMetadata: {
|
|
30
|
+
schema: {
|
|
31
|
+
type: 'object'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export default updateRecord;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import DataBroker from "./dbc";
|
|
2
|
+
// import createRecord from "../../record/frameworks/createRecord";
|
|
3
|
+
import getRecords from "./http-template/getRecords";
|
|
4
|
+
import updateRecord from "./http-template/updateRecord";
|
|
5
|
+
import deleteRecords from "./http-template/deleteRecords";
|
|
6
|
+
import getAvailableFields from "./http-template/getAvailableFields";
|
|
7
|
+
import getSelectedFields from "./http-template/getSelectedFields";
|
|
8
|
+
import getUIActions from "./http-template/getUIActions";
|
|
9
|
+
import { RecordApiActionName } from "@bc/zrecord/Constants";
|
|
10
|
+
|
|
11
|
+
let record: DataBroker = {
|
|
12
|
+
httpTemplates: {
|
|
13
|
+
[RecordApiActionName.GET_RECORDS]: getRecords,
|
|
14
|
+
[RecordApiActionName.UPDATE_RECORD]: updateRecord,
|
|
15
|
+
[RecordApiActionName.DELETE_RECORDS]: deleteRecords,
|
|
16
|
+
getAvailableFields,
|
|
17
|
+
getSelectedFields,
|
|
18
|
+
getUIActions
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export default record;
|
|
22
|
+
// let ticketsRecordSerice = createRecord(tickets, () => {});
|
|
23
|
+
// export default ticketsRecordSerice;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import createCf from "./createCf";
|
|
2
|
+
|
|
3
|
+
function transformer({ data }, key) {
|
|
4
|
+
let records = data.map((item) => {
|
|
5
|
+
let { id, createdTime } = item;
|
|
6
|
+
return {
|
|
7
|
+
id,
|
|
8
|
+
recordName: {
|
|
9
|
+
key: key,
|
|
10
|
+
value: item[key]
|
|
11
|
+
},
|
|
12
|
+
createdTime,
|
|
13
|
+
cf: item.cf ? item.cf : createCf(item, key)
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
return records;
|
|
18
|
+
}
|
|
19
|
+
export default transformer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createListWidget } from "./widgets/list/frameworks/index";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import IService from "../../usecases/interfaces/gateways/IService";
|
|
2
|
+
|
|
3
|
+
abstract class AbstractController {
|
|
4
|
+
constructor(protected service: IService) {
|
|
5
|
+
this.handle = this.handle.bind(this);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// TODO: Add event type
|
|
9
|
+
abstract handle(event): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default AbstractController;
|