@zohodesk/library-platform 1.1.10-temp-1 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/bc/clip-wrap/ActionHandlers.js +1 -0
- package/es/bc/clip-wrap/ClipWrapEnum.js +7 -0
- package/es/bc/clip-wrap/Constants.js +2 -0
- package/es/bc/clip-wrap/Properties.js +24 -0
- package/es/bc/clip-wrap/index.js +2 -0
- package/es/bc/column-chooser/Properties.js +12 -0
- package/es/bc/zlist/Constants.js +2 -1
- package/es/bc/zrecord/Constants.js +4 -0
- package/es/cc/checkbox/Properties.js +8 -0
- package/es/cc/date/Properties.js +1 -1
- package/es/cc/email/Properties.js +18 -0
- package/es/cc/fields/boolean/Model.js +6 -2
- package/es/cc/fields/coloured-multi-select/Model.js +6 -2
- package/es/cc/fields/coloured-pick-list/Model.js +6 -2
- package/es/cc/fields/currency/Model.js +6 -2
- package/es/cc/fields/date/Model.js +6 -2
- package/es/cc/fields/datetime/Model.js +6 -2
- package/es/cc/fields/decimal/Model.js +6 -2
- package/es/cc/fields/email/Model.js +6 -2
- package/es/cc/fields/field/Properties.js +27 -0
- package/es/cc/fields/formula/Model.js +6 -2
- package/es/cc/fields/lookup/Model.js +6 -2
- package/es/cc/fields/lookup/Properties.js +2 -1
- package/es/cc/fields/multi-line/Model.js +6 -2
- package/es/cc/fields/multi-select/Model.js +6 -2
- package/es/cc/fields/multi-select/Properties.js +6 -0
- package/es/cc/fields/name/Model.js +6 -2
- package/es/cc/fields/name/Properties.js +3 -0
- package/es/cc/fields/number/Model.js +6 -2
- package/es/cc/fields/percent/Model.js +6 -2
- package/es/cc/fields/phone/Model.js +6 -2
- package/es/cc/fields/pick-list/Model.js +6 -2
- package/es/cc/fields/pick-list/Properties.js +6 -0
- package/es/cc/fields/text/Model.js +6 -2
- package/es/cc/fields/url/Model.js +6 -2
- package/es/cc/label/Properties.js +8 -0
- package/es/cc/link/Properties.js +18 -0
- package/es/cc/multi-select/Properties.js +8 -0
- package/es/cc/section/Properties.js +32 -0
- package/es/cc/select/Properties.js +8 -0
- package/es/cc/table-column-chooser/Properties.js +21 -0
- package/es/cc/table-column-filter/Model.js +0 -4
- package/es/cc/table-column-filter/Properties.js +0 -18
- package/es/cc/table-connected/Properties.js +38 -0
- package/es/cc/table-connected/SdkContract.js +18 -0
- package/es/cc/table-connected/constants/ExternalConstants.js +4 -1
- package/es/cc/table-list/Constants.js +3 -0
- package/es/cc/table-list/Events.js +32 -0
- package/es/cc/table-list/Properties.js +21 -0
- package/es/cc/table-list/data-types/TextOverflowConfig.js +1 -0
- package/es/cc/table-list/row/Properties.js +9 -0
- package/es/cc/table-text-overflow/Constants.js +5 -0
- package/es/cc/table-text-overflow/Events.js +15 -0
- package/es/cc/table-text-overflow/Properties.js +23 -0
- package/es/cc/table-text-overflow/index.js +2 -0
- package/es/cc/tags/Properties.js +9 -0
- package/es/cc/text/Properties.js +9 -0
- package/es/cc/textbox/Properties.js +8 -0
- package/es/index.js +4 -2
- package/es/library/analytics/Analytics.js +1 -1
- package/es/library/behaviours/clip-wrap/adapters/controllers/AbstractController.js +9 -0
- package/es/library/behaviours/clip-wrap/adapters/controllers/ClipWrap.js +26 -0
- package/es/library/behaviours/clip-wrap/adapters/controllers/DestructController.js +18 -0
- package/es/library/behaviours/clip-wrap/adapters/controllers/InitializeController.js +18 -0
- package/es/library/behaviours/clip-wrap/adapters/gateway/Repository.js +30 -0
- package/es/library/behaviours/clip-wrap/adapters/gateway/Service.js +10 -0
- package/es/library/behaviours/clip-wrap/adapters/presenter/Presenter.js +16 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/gateways/IService.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/input/ClipWrapInputModel.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/input/DestructInputModel.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/input/InitializeInputModel.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/output/ClipWrapOutputModel.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/interfaces/output/IPresenter.js +1 -0
- package/es/library/behaviours/clip-wrap/applications/usecases/AbstractUseCase.js +17 -0
- package/es/library/behaviours/clip-wrap/applications/usecases/ClipWrap.js +25 -0
- package/es/library/behaviours/clip-wrap/applications/usecases/DestructUsecase.js +15 -0
- package/es/library/behaviours/clip-wrap/applications/usecases/InitializeUsecase.js +15 -0
- package/es/library/behaviours/clip-wrap/domain/entities/ClipWrap.js +22 -0
- package/es/library/behaviours/clip-wrap/domain/entities/interfaces/IClipWrap.js +1 -0
- package/es/library/behaviours/clip-wrap/frameworks/ui/ActionsHandlerFactory.js +28 -0
- package/es/library/behaviours/clip-wrap/frameworks/ui/ClipWrapBehaviourFactory.js +26 -0
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +23 -20
- package/es/library/custom-component/applications/usecases/UpdateStateUseCase.js +2 -4
- package/es/library/custom-component/domain/entities/ComponentProperties.js +0 -1
- package/es/library/custom-component/domain/entities/Logger.js +43 -37
- package/es/library/custom-component/frameworks/ui/ComponentRegistry.js +2 -2
- package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +1 -1
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +2 -0
- package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +3 -3
- package/es/library/dot/components/form/frameworks/ui/FormView.js +2 -2
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +13 -13
- package/es/library/dot/components/form/frameworks/ui/sub-components/MiddleSection.js +4 -2
- package/es/library/dot/components/form/frameworks/ui/sub-components/Sections.js +8 -2
- package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +4 -2
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +4 -2
- package/es/library/dot/components/form-fields/date/frameworks/ui/DateView.js +4 -2
- package/es/library/dot/components/form-fields/datetime/frameworks/ui/DateTimeView.js +4 -2
- package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +4 -2
- package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +4 -2
- package/es/library/dot/components/form-fields/field/css/FieldItem.module.css +2 -2
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/LookupView.js +4 -2
- package/es/library/dot/components/form-fields/multi-select/frameworks/ui/MultiSelectView.js +4 -2
- package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +4 -2
- package/es/library/dot/components/form-fields/percentage/frameworks/ui/PercentageView.js +4 -2
- package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +4 -2
- package/es/library/dot/components/form-fields/pick-list/frameworks/ui/PickListView.js +4 -2
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +4 -2
- package/es/library/dot/components/form-fields/textbox/frameworks/ui/TextBoxView.js +4 -2
- package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +4 -2
- package/es/library/dot/components/section/frameworks/ui/RenderField.js +5 -3
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +26 -4
- package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +9 -1
- package/es/library/dot/components/table-list/adapters/controllers/ClipWrapController.js +23 -0
- package/es/library/dot/components/table-list/adapters/controllers/ResolutionBasedCountController.js +24 -0
- package/es/library/dot/components/table-list/adapters/controllers/index.js +2 -1
- package/es/library/dot/components/table-list/frameworks/ui/EventHandlersFactory.js +2 -1
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +13 -1
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +33 -15
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +9 -3
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +4 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/field/FieldComponent.js +1 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +3 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +2 -0
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +7 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +21 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +3 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +3 -0
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +10 -6
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +1 -1
- package/es/library/dot/legacy-to-new-arch/email/frameworks/ui/EmailView.js +6 -2
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/link/frameworks/ui/LinkView.js +5 -1
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +30 -6
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +14 -22
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +31 -6
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/css/Select.module.css +5 -0
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/TableColumnChooserView.js +73 -4
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/css/TableColumnChooserView.module.css +7 -2
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +3 -5
- package/es/library/dot/legacy-to-new-arch/table-field-components/coloured-multiselect-field/frameworks/ui/ColouredMultiSelectFieldView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/currency-field/frameworks/ui/CurrencyFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/date-field/frameworks/ui/DateFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/datetime-field/frameworks/ui/DateTimeFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/decimal-field/frameworks/ui/DecimalFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/email-field/frameworks/ui/EmailFieldView.js +6 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/lookup-field/frameworks/ui/LookupFieldView.js +9 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/multiselect-field/frameworks/ui/MultiSelectFieldView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/number-field/frameworks/ui/NumberFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/percentage-field/frameworks/ui/PercentageFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/phone-field/frameworks/ui/PhoneFieldView.js +6 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/picklist-field/frameworks/ui/PickListFieldView.js +7 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/PrimaryFieldView.js +25 -13
- package/es/library/dot/legacy-to-new-arch/table-field-components/singleline-field/frameworks/ui/SingleLineFieldView.js +6 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/url-field/frameworks/ui/UrlFieldView.js +6 -2
- package/es/library/dot/legacy-to-new-arch/tags/frameworks/ui/TagsView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +4 -3
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +6 -2
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +3 -27
- package/es/library/dot/legacy-to-new-arch/textbox/frameworks/ui/TextBoxView.js +6 -2
- package/es/platform/app-context-behaviour/frameworks/AppContextBehaviourFactory.js +2 -2
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionReordererFunction.js +0 -0
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionReordererRegistry.js +40 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +5 -5
- package/es/platform/client-actions/translators/client-actions-translator/index.js +27 -1
- package/es/platform/components/table-connected/adapters/controllers/ResolutionBasedLimitController.js +21 -0
- package/es/platform/components/table-connected/adapters/resources/ErrorPrinter.js +14 -11
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +32 -0
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +66 -4
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +6 -2
- package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +3 -2
- package/es/platform/components/table-connected/frameworks/TableConnectedView.js +2 -0
- package/es/platform/data-source/http-template/markAsRead.js +27 -0
- package/es/platform/data-source/http-template/markAsUnRead.js +27 -0
- package/es/platform/data-source/index.js +4 -0
- package/es/platform/data-source/utils/validation-rules/TransFormValidationRules.js +0 -1
- package/es/platform/sdk/domain/entities/ResourceManager.js +3 -3
- package/es/platform/zform/adapters/presenter/FormTranslator.js +18 -3
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +34 -8
- package/es/platform/zform/adapters/presenter/translators/fields/MultiselectFieldTranslator.js +18 -1
- package/es/platform/zform/adapters/presenter/translators/fields/PicklistFieldTranslator.js +18 -1
- package/es/platform/zform/adapters/presenter/translators/interfaces/ClientActions.js +1 -0
- package/es/platform/zform/domain/ZForm.js +2 -6
- package/es/platform/zform/frameworks/validation-rules/Validator.js +1 -1
- package/es/platform/zlist/adapters/controllers/ResolutionBasedLimitController.js +26 -0
- package/es/platform/zlist/adapters/gateways/Repository.js +3 -2
- package/es/platform/zlist/adapters/gateways/Service.js +2 -0
- package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +19 -8
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +19 -5
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +24 -14
- package/es/platform/zlist/adapters/presenters/translators/Row.js +4 -2
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/BooleanFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/DateFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/DateTimeFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/DecimalFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/EmailFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/LookUpFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.js +7 -3
- package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js +11 -5
- package/es/platform/zlist/adapters/presenters/translators/fields/NameFieldTranslator.js +8 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/NumberFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/PhoneFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/PickListFieldTranslator.js +11 -5
- package/es/platform/zlist/adapters/presenters/translators/fields/SingleLineFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/URLFieldTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +74 -2
- package/es/platform/zlist/applications/interfaces/input/ResolutionBasedLimitInput.js +1 -0
- package/es/platform/zlist/applications/usecases/ResolutionBasedLimitUseCase.js +20 -0
- package/es/platform/zlist/domain/entities/List.js +5 -0
- package/es/platform/zlist/frameworks/EventHandlersFactory.js +3 -1
- package/es/platform/zrecord/adapters/controllers/MarkAsReadController.js +28 -0
- package/es/platform/zrecord/adapters/controllers/MarkAsUnReadController.js +28 -0
- package/es/platform/zrecord/adapters/gateways/Service.js +4 -0
- package/es/platform/zrecord/applications/interfaces/input/MarkAsReadInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/MarkAsUnReadInputModel.js +1 -0
- package/es/platform/zrecord/applications/usecases/MarkAsReadUseCase.js +32 -0
- package/es/platform/zrecord/applications/usecases/MarkAsUnReadUseCase.js +32 -0
- package/es/platform/zrecord/domain/entities/Record.js +6 -0
- package/es/platform/zrecord/domain/entities/Records.js +12 -0
- package/es/platform/zrecord/domain/entities/RecordsManager.js +8 -0
- package/es/platform/zrecord/frameworks/ActionsHandlersFactory.js +7 -1
- package/package.json +9 -10
- package/es/cc/fields/name/Constants.js +0 -5
- package/es/cc/table-primary-field/Constants.js +0 -5
- package/es/cc/table-primary-field/Events.js +0 -4
- package/es/cc/table-primary-field/Properties.js +0 -29
- package/es/library/custom-component/frameworks/ui/CustomComponentFactory.js +0 -56
- package/es/library/dot/components/table-list/.DS_Store +0 -0
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/TableColumnChooserView.module.css +0 -3
- package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/EventHandlersFactory.js +0 -28
- package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +0 -51
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +0 -9
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +0 -38
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +0 -12
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +0 -19
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +0 -33
- package/es/platform/data-source/http-template/fetchDependencyMappings.js +0 -18
- package/es/platform/data-source/http-template/fetchLayoutRules.js +0 -29
- package/es/platform/data-source/http-template/fetchMyForm.js +0 -19
- package/es/platform/data-source/http-template/fetchMyFormLayout.js +0 -43
- package/es/platform/data-source/http-template/fetchValidationRules.js +0 -30
- package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +0 -11
- /package/es/{platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js → bc/clip-wrap/types/ClipWrapBehaviourState.js} +0 -0
|
@@ -13,7 +13,8 @@ export default function SelectionTranslator(state) {
|
|
|
13
13
|
columnChooserConfig,
|
|
14
14
|
selectionConfig,
|
|
15
15
|
moduleName,
|
|
16
|
-
instanceName
|
|
16
|
+
instanceName,
|
|
17
|
+
textOverflowConfig
|
|
17
18
|
} = properties;
|
|
18
19
|
const {
|
|
19
20
|
context
|
|
@@ -21,15 +22,19 @@ export default function SelectionTranslator(state) {
|
|
|
21
22
|
const {
|
|
22
23
|
zfield,
|
|
23
24
|
selection,
|
|
24
|
-
columnChooser
|
|
25
|
+
columnChooser,
|
|
26
|
+
textOverflow
|
|
25
27
|
} = behaviours;
|
|
26
28
|
const {
|
|
27
29
|
selected,
|
|
28
30
|
hasAllSelected
|
|
29
31
|
} = selection;
|
|
30
32
|
const availableFields = zfield.fields;
|
|
31
|
-
const columnChooserProps = getColumnChooserProps(columnChooser, availableFields, context, moduleName);
|
|
32
|
-
const clientActions = generateClientActions(selectionConfig, columnChooserConfig, hasAllSelected, columnChooserProps
|
|
33
|
+
const columnChooserProps = getColumnChooserProps(columnChooser, availableFields, context, moduleName, columnChooserConfig);
|
|
34
|
+
const clientActions = generateClientActions(selectionConfig, columnChooserConfig, hasAllSelected, columnChooserProps, {
|
|
35
|
+
isEnabled: textOverflowConfig.isEnabled,
|
|
36
|
+
mode: textOverflow.mode
|
|
37
|
+
});
|
|
33
38
|
const contextAppliedActions = ClientActionsTranslator.transform(clientActions, instanceName, moduleName, context);
|
|
34
39
|
return {
|
|
35
40
|
selected,
|
|
@@ -38,12 +43,14 @@ export default function SelectionTranslator(state) {
|
|
|
38
43
|
};
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
function generateClientActions(selectionConfig, columnChooserConfig, hasAllSelected, columnChooserProps) {
|
|
46
|
+
function generateClientActions(selectionConfig, columnChooserConfig, hasAllSelected, columnChooserProps, textOverflowConfig) {
|
|
42
47
|
const clientActions = [];
|
|
43
48
|
|
|
44
49
|
if (selectionConfig.isEnabled) {
|
|
45
50
|
if (columnChooserConfig.isEnabled) {
|
|
46
|
-
const columnChooserAction = DefaultClientActions.createColumnChooserAction(columnChooserProps
|
|
51
|
+
const columnChooserAction = DefaultClientActions.createColumnChooserAction({ ...columnChooserProps,
|
|
52
|
+
textOverflowConfig
|
|
53
|
+
});
|
|
47
54
|
clientActions.push(columnChooserAction);
|
|
48
55
|
} else if (selectionConfig.isSelectAllEnabled) {
|
|
49
56
|
const selectAllColumnsAction = DefaultClientActions.createSelectAllAction(hasAllSelected);
|
|
@@ -58,6 +65,7 @@ function getColumnChooserProps(columnChooser) {
|
|
|
58
65
|
let availableFields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
59
66
|
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
60
67
|
let moduleName = arguments.length > 3 ? arguments[3] : undefined;
|
|
68
|
+
let columnChooserConfig = arguments.length > 4 ? arguments[4] : undefined;
|
|
61
69
|
const {
|
|
62
70
|
searchText: searchString,
|
|
63
71
|
fieldsOrder,
|
|
@@ -65,8 +73,11 @@ function getColumnChooserProps(columnChooser) {
|
|
|
65
73
|
isMaxSelectionReached
|
|
66
74
|
} = columnChooser;
|
|
67
75
|
const fieldMap = mapFieldsToObject(availableFields);
|
|
68
|
-
const
|
|
69
|
-
const
|
|
76
|
+
const moduleConfig = context.modules?.find(module => module.apiKey === moduleName);
|
|
77
|
+
const disabledFieldName = moduleConfig?.nameField;
|
|
78
|
+
const restrictedFields = columnChooserConfig?.fieldRestrictionConfig || [];
|
|
79
|
+
const hasRestrictions = Array.isArray(restrictedFields) && restrictedFields.length > 0;
|
|
80
|
+
const columnChooserOptions = fieldsOrder.map(fieldName => getOption(fieldMap[fieldName], restrictedFields.includes(fieldName) || !!selected[fieldName], restrictedFields.includes(fieldName) || !hasRestrictions && disabledFieldName === fieldName));
|
|
70
81
|
return {
|
|
71
82
|
options: columnChooserOptions,
|
|
72
83
|
searchString,
|
|
@@ -33,13 +33,16 @@ export default class TableTranslator {
|
|
|
33
33
|
const {
|
|
34
34
|
localStorage: localStorageBehaviour,
|
|
35
35
|
columnResizer,
|
|
36
|
-
keyboardControls
|
|
36
|
+
keyboardControls,
|
|
37
|
+
textOverflow
|
|
37
38
|
} = behaviours;
|
|
38
39
|
const {
|
|
39
40
|
resizeConfig,
|
|
40
41
|
preferences,
|
|
41
42
|
keyboardControlsConfig,
|
|
42
|
-
nameFieldsConfig
|
|
43
|
+
nameFieldsConfig,
|
|
44
|
+
textOverflowConfig,
|
|
45
|
+
recordReadStatusConfig
|
|
43
46
|
} = properties;
|
|
44
47
|
const {
|
|
45
48
|
modules
|
|
@@ -94,12 +97,18 @@ export default class TableTranslator {
|
|
|
94
97
|
const isLoading = !!(isRecordsFetching || isAvailableFieldsFetching || isSelectedFieldsFetching);
|
|
95
98
|
const fields = selectedFields?.map(selectedField => availableFields?.find(availableField => availableField.name === selectedField)).filter(f => f != undefined);
|
|
96
99
|
const newClientActions = DefaultClientActions.createSortActions(fields, clientActions || EMPTY_ARRAY);
|
|
100
|
+
const actionsToMap = [...newClientActions];
|
|
101
|
+
|
|
102
|
+
if (recordReadStatusConfig?.isEnabled) {
|
|
103
|
+
actionsToMap.push(DefaultClientActions.createMarkAsReadAction(), DefaultClientActions.createMarkAsUnReadAction());
|
|
104
|
+
}
|
|
105
|
+
|
|
97
106
|
const {
|
|
98
107
|
headerActions,
|
|
99
108
|
fieldActions,
|
|
100
109
|
rowActions,
|
|
101
110
|
noLocation
|
|
102
|
-
} = mapClientActions(
|
|
111
|
+
} = mapClientActions(actionsToMap);
|
|
103
112
|
const isRowClickable = noLocation.some(action => action.uiComponentMapping.eventMappings.some(mapping => mapping.sourceEvent === TableListConstants.TABLE_LIST_ROW_CLICKED));
|
|
104
113
|
const rowCursor = isRowClickable ? RowCursor.Pointer : RowCursor.Default;
|
|
105
114
|
const rowActionsWidth = preferences?.rowActions?.width;
|
|
@@ -111,8 +120,12 @@ export default class TableTranslator {
|
|
|
111
120
|
const localStorageFieldWidths = fallbackToDefault(localStorageBehaviour?.[moduleName]?.[viewId]?.modifiedWidths, EMPTY_OBJECT);
|
|
112
121
|
const modifiedWidths = calculateFieldWidths(fields, localStorageFieldWidths, preferences);
|
|
113
122
|
const recordsForDisplay = isRecordsShouldBeEmptied ? EMPTY_ARRAY : records;
|
|
123
|
+
const textOverflowData = {
|
|
124
|
+
isEnabled: textOverflowConfig.isEnabled,
|
|
125
|
+
mode: textOverflow.mode
|
|
126
|
+
};
|
|
114
127
|
const headersTranslator = new HeadersTranslator(fields, headerActions, context, modifiedWidths, sortBy, records, instanceName, moduleName);
|
|
115
|
-
const rowsTranslator = new RowsTranslator(recordsForDisplay, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName, nameFieldsConfig); // const actionTranslator = new ClientActionsTranslator(clientActions, records, fields, pageContext);
|
|
128
|
+
const rowsTranslator = new RowsTranslator(recordsForDisplay, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, textOverflowData, moduleName, nameFieldsConfig, recordReadStatusConfig); // const actionTranslator = new ClientActionsTranslator(clientActions, records, fields, pageContext);
|
|
116
129
|
// const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator(), actionTranslator.getTranslator()];
|
|
117
130
|
|
|
118
131
|
const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator()];
|
|
@@ -141,6 +154,7 @@ export default class TableTranslator {
|
|
|
141
154
|
columnWidth: typeof rowActionsWidth === 'number' ? rowActionsWidth : ColumnWidth.XSmall
|
|
142
155
|
},
|
|
143
156
|
keyboardControlsConfig,
|
|
157
|
+
textOverflowConfig: textOverflowData,
|
|
144
158
|
isLoading,
|
|
145
159
|
isReOrderLoading,
|
|
146
160
|
emptyStateUiType: componentMapping.emptyState || '',
|
|
@@ -158,7 +172,7 @@ function mapClientActions(clientActions) {
|
|
|
158
172
|
const allowedActingLocations = ['header_actions', 'field_actions', 'row_actions', null];
|
|
159
173
|
clientActions.forEach(action => {
|
|
160
174
|
if (!allowedActingLocations.includes(action.location)) {
|
|
161
|
-
console.warn('Client action without location:', action.location);
|
|
175
|
+
__DEVELOPMENT__ && console.warn('Client action without location:', action.location);
|
|
162
176
|
}
|
|
163
177
|
});
|
|
164
178
|
return {
|
|
@@ -17,7 +17,7 @@ function getLookupUrlConstructions(_ref) {
|
|
|
17
17
|
return `/agent/${orgName}/${departmentName}/${lookupModuleName}/details/${value.id}`;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName, nameFieldsConfig) {
|
|
20
|
+
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, textOverflowConfig, moduleName, nameFieldsConfig, recordReadStatusConfig) {
|
|
21
21
|
const {
|
|
22
22
|
isCustomField,
|
|
23
23
|
name,
|
|
@@ -29,7 +29,7 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
29
29
|
const fieldEntry = fieldComponentMapping[name];
|
|
30
30
|
|
|
31
31
|
if (typeof fieldEntry == 'string') {
|
|
32
|
-
console.warn(`The string format for componentMapping will soon be deprecated. Please update to the new JSON format. REF : ${JSON.stringify(fieldEntry)}`);
|
|
32
|
+
__DEVELOPMENT__ && console.warn(`The string format for componentMapping will soon be deprecated. Please update to the new JSON format. REF : ${JSON.stringify(fieldEntry)}`);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
let tempValue = undefined;
|
|
@@ -54,7 +54,7 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
54
54
|
const fieldTranslator = nameFieldsConfig.isEnabled && nameFieldTypes.includes(field.type) && moduleApiKeyCheck ? FieldTranslators['NameField'] : FieldTranslators[type];
|
|
55
55
|
|
|
56
56
|
if (!fieldTranslator) {
|
|
57
|
-
console.error(`Field type ${type} not supported`);
|
|
57
|
+
__DEVELOPMENT__ && console.error(`Field type ${type} not supported`);
|
|
58
58
|
return EmptyViewModel(name);
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -71,19 +71,29 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
const translatorArgs = {
|
|
75
|
+
field,
|
|
76
|
+
value: tempValue ? tempValue : value,
|
|
77
|
+
appendToActionPayload: {
|
|
78
|
+
recordId: record.id
|
|
79
|
+
},
|
|
80
|
+
context,
|
|
81
|
+
preferences,
|
|
82
|
+
moduleName,
|
|
83
|
+
constructUrl: nameFieldsConfig.constructUrl,
|
|
84
|
+
isPreventDefault: nameFieldsConfig.isPreventDefault || false,
|
|
85
|
+
textOverflowMode: textOverflowConfig.mode || 'clip'
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
if (recordReadStatusConfig?.isEnabled) {
|
|
89
|
+
translatorArgs.isRead = record.isRead;
|
|
90
|
+
} else {
|
|
91
|
+
translatorArgs.isRead = true;
|
|
92
|
+
}
|
|
93
|
+
|
|
74
94
|
const viewModel = {
|
|
75
95
|
actions,
|
|
76
|
-
...fieldTranslator(
|
|
77
|
-
field,
|
|
78
|
-
value: tempValue ? tempValue : value,
|
|
79
|
-
appendToActionPayload: {
|
|
80
|
-
recordId: record.id
|
|
81
|
-
},
|
|
82
|
-
context,
|
|
83
|
-
preferences,
|
|
84
|
-
moduleName,
|
|
85
|
-
constructUrl: nameFieldsConfig.constructUrl
|
|
86
|
-
})
|
|
96
|
+
...fieldTranslator(translatorArgs)
|
|
87
97
|
};
|
|
88
98
|
|
|
89
99
|
if (fieldEntry && typeof fieldEntry === 'object') {
|
|
@@ -11,15 +11,17 @@ export default function RowTranslator(_ref) {
|
|
|
11
11
|
context,
|
|
12
12
|
preferences,
|
|
13
13
|
instanceName,
|
|
14
|
+
textOverflowConfig,
|
|
14
15
|
moduleName,
|
|
15
|
-
nameFieldsConfig
|
|
16
|
+
nameFieldsConfig,
|
|
17
|
+
recordReadStatusConfig
|
|
16
18
|
} = _ref;
|
|
17
19
|
const actions = ClientActionsTranslator.transform(rowActions, instanceName, moduleName, { ...context,
|
|
18
20
|
record
|
|
19
21
|
});
|
|
20
22
|
return {
|
|
21
23
|
id: record.id,
|
|
22
|
-
columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName, nameFieldsConfig)),
|
|
24
|
+
columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, textOverflowConfig, moduleName, nameFieldsConfig, recordReadStatusConfig)),
|
|
23
25
|
rowActionLocation: {
|
|
24
26
|
type: rowActionsUiType,
|
|
25
27
|
actions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RowTranslator from "./Row";
|
|
2
2
|
export default class RowsTranslator {
|
|
3
|
-
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName, nameFieldsConfig) {
|
|
3
|
+
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, textOverflowConfig, moduleName, nameFieldsConfig, recordReadStatusConfig) {
|
|
4
4
|
this.records = records;
|
|
5
5
|
this.fields = fields;
|
|
6
6
|
this.rowActions = rowActions;
|
|
@@ -10,8 +10,10 @@ export default class RowsTranslator {
|
|
|
10
10
|
this.rowActionsUiType = rowActionsUiType;
|
|
11
11
|
this.fieldActions = fieldActions;
|
|
12
12
|
this.instanceName = instanceName;
|
|
13
|
+
this.textOverflowConfig = textOverflowConfig;
|
|
13
14
|
this.moduleName = moduleName;
|
|
14
15
|
this.nameFieldsConfig = nameFieldsConfig;
|
|
16
|
+
this.recordReadStatusConfig = recordReadStatusConfig;
|
|
15
17
|
this.pipe = this.pipe.bind(this);
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -30,8 +32,10 @@ export default class RowsTranslator {
|
|
|
30
32
|
context: this.context,
|
|
31
33
|
preferences: this.preferences,
|
|
32
34
|
instanceName: this.instanceName,
|
|
35
|
+
textOverflowConfig: this.textOverflowConfig,
|
|
33
36
|
moduleName: this.moduleName,
|
|
34
|
-
nameFieldsConfig: this.nameFieldsConfig
|
|
37
|
+
nameFieldsConfig: this.nameFieldsConfig,
|
|
38
|
+
recordReadStatusConfig: this.recordReadStatusConfig
|
|
35
39
|
}));
|
|
36
40
|
}
|
|
37
41
|
|
|
@@ -6,7 +6,9 @@ const BooleanFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -23,7 +25,9 @@ const BooleanFieldTranslator = _ref => {
|
|
|
23
25
|
uiType: uiType || FieldTypes.CheckboxField,
|
|
24
26
|
name,
|
|
25
27
|
appendToActionPayload,
|
|
26
|
-
|
|
28
|
+
isRead,
|
|
29
|
+
value,
|
|
30
|
+
textOverflowMode
|
|
27
31
|
});
|
|
28
32
|
};
|
|
29
33
|
|
|
@@ -7,7 +7,9 @@ const CurrencyFieldTranslator = _ref => {
|
|
|
7
7
|
value,
|
|
8
8
|
appendToActionPayload,
|
|
9
9
|
context,
|
|
10
|
-
preferences
|
|
10
|
+
preferences,
|
|
11
|
+
textOverflowMode,
|
|
12
|
+
isRead
|
|
11
13
|
} = _ref;
|
|
12
14
|
const {
|
|
13
15
|
uiType,
|
|
@@ -23,7 +25,9 @@ const CurrencyFieldTranslator = _ref => {
|
|
|
23
25
|
name,
|
|
24
26
|
currencyLocale: prefCurrencyLocale || contextCurrencyLocale,
|
|
25
27
|
currencySymbol: prefCurrencySymbol || contextCurrencySymbol,
|
|
26
|
-
|
|
28
|
+
isRead,
|
|
29
|
+
value,
|
|
30
|
+
textOverflowMode
|
|
27
31
|
});
|
|
28
32
|
};
|
|
29
33
|
|
|
@@ -6,7 +6,9 @@ const DateFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const DateFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.DateField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
|
@@ -6,7 +6,9 @@ const DateTimeFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const DateTimeFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.DateTimeField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
|
@@ -6,7 +6,9 @@ const DecimalFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const DecimalFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.DecimalField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
|
@@ -5,7 +5,9 @@ const EmailFieldTranslator = _ref => {
|
|
|
5
5
|
let {
|
|
6
6
|
field,
|
|
7
7
|
value,
|
|
8
|
-
appendToActionPayload
|
|
8
|
+
appendToActionPayload,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = _ref;
|
|
10
12
|
const {
|
|
11
13
|
uiType,
|
|
@@ -15,7 +17,9 @@ const EmailFieldTranslator = _ref => {
|
|
|
15
17
|
uiType: uiType || FieldTypes.EmailField,
|
|
16
18
|
appendToActionPayload,
|
|
17
19
|
name,
|
|
18
|
-
|
|
20
|
+
isRead,
|
|
21
|
+
value,
|
|
22
|
+
textOverflowMode
|
|
19
23
|
});
|
|
20
24
|
};
|
|
21
25
|
|
|
@@ -7,7 +7,9 @@ const FormulaFieldTranslator = _ref => {
|
|
|
7
7
|
value,
|
|
8
8
|
appendToActionPayload,
|
|
9
9
|
context,
|
|
10
|
-
preferences
|
|
10
|
+
preferences,
|
|
11
|
+
textOverflowMode,
|
|
12
|
+
isRead
|
|
11
13
|
} = _ref;
|
|
12
14
|
const {
|
|
13
15
|
uiType,
|
|
@@ -34,7 +36,9 @@ const FormulaFieldTranslator = _ref => {
|
|
|
34
36
|
currencyLocale: prefCurrencyLocale || contextCurrencyLocale,
|
|
35
37
|
currencySymbol: prefCurrencySymbol || contextCurrencySymbol
|
|
36
38
|
}),
|
|
37
|
-
|
|
39
|
+
isRead,
|
|
40
|
+
value,
|
|
41
|
+
textOverflowMode
|
|
38
42
|
});
|
|
39
43
|
};
|
|
40
44
|
|
|
@@ -5,7 +5,9 @@ const LookUpFieldTranslator = _ref => {
|
|
|
5
5
|
let {
|
|
6
6
|
field,
|
|
7
7
|
value,
|
|
8
|
-
appendToActionPayload
|
|
8
|
+
appendToActionPayload,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = _ref;
|
|
10
12
|
const {
|
|
11
13
|
uiType,
|
|
@@ -21,12 +23,14 @@ const LookUpFieldTranslator = _ref => {
|
|
|
21
23
|
uiType: uiType || FieldTypes.LookUpField,
|
|
22
24
|
appendToActionPayload,
|
|
23
25
|
name,
|
|
26
|
+
isRead,
|
|
24
27
|
value: {
|
|
25
28
|
id,
|
|
26
29
|
name: nameValue,
|
|
27
30
|
photoURL,
|
|
28
31
|
url
|
|
29
|
-
}
|
|
32
|
+
},
|
|
33
|
+
textOverflowMode
|
|
30
34
|
});
|
|
31
35
|
};
|
|
32
36
|
|
package/es/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
2
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
3
|
-
import MultiLineFieldModel from "../../../../../../cc/fields/multi-
|
|
3
|
+
import MultiLineFieldModel from "../../../../../../cc/fields/multi-line/Model";
|
|
4
4
|
|
|
5
5
|
const MultiLineFieldTranslator = _ref => {
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const MultiLineFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.MultiLineField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js
CHANGED
|
@@ -7,7 +7,9 @@ const MultiSelectFieldTranslator = _ref => {
|
|
|
7
7
|
let {
|
|
8
8
|
field,
|
|
9
9
|
value,
|
|
10
|
-
appendToActionPayload
|
|
10
|
+
appendToActionPayload,
|
|
11
|
+
textOverflowMode,
|
|
12
|
+
isRead
|
|
11
13
|
} = _ref;
|
|
12
14
|
const {
|
|
13
15
|
uiType,
|
|
@@ -18,7 +20,7 @@ const MultiSelectFieldTranslator = _ref => {
|
|
|
18
20
|
const updatedValue = value.split(';').map(item => item === '' ? '-None-' : item);
|
|
19
21
|
|
|
20
22
|
if (['colored', 'ColorCoded'].includes(subType)) {
|
|
21
|
-
return ColouredMultiSelectFieldTranslator(field, updatedValue, appendToActionPayload);
|
|
23
|
+
return ColouredMultiSelectFieldTranslator(field, updatedValue, appendToActionPayload, textOverflowMode, isRead);
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
return MultiListFieldModel({
|
|
@@ -26,13 +28,15 @@ const MultiSelectFieldTranslator = _ref => {
|
|
|
26
28
|
appendToActionPayload,
|
|
27
29
|
name,
|
|
28
30
|
options: pickListValues,
|
|
29
|
-
|
|
31
|
+
isRead,
|
|
32
|
+
value: updatedValue,
|
|
33
|
+
textOverflowMode
|
|
30
34
|
});
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
export default MultiSelectFieldTranslator;
|
|
34
38
|
|
|
35
|
-
const ColouredMultiSelectFieldTranslator = (field, value, appendToActionPayload) => {
|
|
39
|
+
const ColouredMultiSelectFieldTranslator = (field, value, appendToActionPayload, textOverflowMode, isRead) => {
|
|
36
40
|
const {
|
|
37
41
|
uiType,
|
|
38
42
|
name,
|
|
@@ -45,6 +49,8 @@ const ColouredMultiSelectFieldTranslator = (field, value, appendToActionPayload)
|
|
|
45
49
|
options: pickListValues.map(option => ({ ...option,
|
|
46
50
|
colorCode: option.colorCode || ''
|
|
47
51
|
})),
|
|
48
|
-
|
|
52
|
+
isRead,
|
|
53
|
+
value,
|
|
54
|
+
textOverflowMode
|
|
49
55
|
});
|
|
50
56
|
};
|
|
@@ -21,7 +21,10 @@ const NameFieldTranslator = _ref2 => {
|
|
|
21
21
|
appendToActionPayload,
|
|
22
22
|
context,
|
|
23
23
|
moduleName,
|
|
24
|
-
constructUrl
|
|
24
|
+
constructUrl,
|
|
25
|
+
isPreventDefault,
|
|
26
|
+
textOverflowMode,
|
|
27
|
+
isRead
|
|
25
28
|
} = _ref2;
|
|
26
29
|
const {
|
|
27
30
|
uiType,
|
|
@@ -30,6 +33,7 @@ const NameFieldTranslator = _ref2 => {
|
|
|
30
33
|
let nameFieldValue = undefined;
|
|
31
34
|
nameFieldValue = typeof value !== 'object' ? {
|
|
32
35
|
value,
|
|
36
|
+
isPreventDefault,
|
|
33
37
|
id: appendToActionPayload.recordId
|
|
34
38
|
} : value;
|
|
35
39
|
nameFieldValue.url = constructUrl ? constructUrl({
|
|
@@ -45,7 +49,9 @@ const NameFieldTranslator = _ref2 => {
|
|
|
45
49
|
uiType: FieldTypes.PrimaryField,
|
|
46
50
|
appendToActionPayload,
|
|
47
51
|
name,
|
|
48
|
-
|
|
52
|
+
isRead,
|
|
53
|
+
value: nameFieldValue,
|
|
54
|
+
textOverflowMode
|
|
49
55
|
});
|
|
50
56
|
};
|
|
51
57
|
|
|
@@ -6,7 +6,9 @@ const NumberLineFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const NumberLineFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.NumberField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
package/es/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.js
CHANGED
|
@@ -6,7 +6,9 @@ const PercentageFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const PercentageFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.PercentageField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
|
@@ -6,7 +6,9 @@ const PhoneFieldTranslator = _ref => {
|
|
|
6
6
|
let {
|
|
7
7
|
field,
|
|
8
8
|
value,
|
|
9
|
-
appendToActionPayload
|
|
9
|
+
appendToActionPayload,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = _ref;
|
|
11
13
|
const {
|
|
12
14
|
uiType,
|
|
@@ -16,7 +18,9 @@ const PhoneFieldTranslator = _ref => {
|
|
|
16
18
|
uiType: uiType || FieldTypes.PhoneField,
|
|
17
19
|
appendToActionPayload,
|
|
18
20
|
name,
|
|
19
|
-
|
|
21
|
+
isRead,
|
|
22
|
+
value,
|
|
23
|
+
textOverflowMode
|
|
20
24
|
});
|
|
21
25
|
};
|
|
22
26
|
|
|
@@ -7,7 +7,9 @@ const PickListFieldTranslator = _ref => {
|
|
|
7
7
|
let {
|
|
8
8
|
field,
|
|
9
9
|
value,
|
|
10
|
-
appendToActionPayload
|
|
10
|
+
appendToActionPayload,
|
|
11
|
+
textOverflowMode,
|
|
12
|
+
isRead
|
|
11
13
|
} = _ref;
|
|
12
14
|
const {
|
|
13
15
|
uiType,
|
|
@@ -17,7 +19,7 @@ const PickListFieldTranslator = _ref => {
|
|
|
17
19
|
} = field;
|
|
18
20
|
|
|
19
21
|
if (['colored', 'ColorCoded'].includes(subType)) {
|
|
20
|
-
return ColouredPickListFieldTranslator(field, value, appendToActionPayload);
|
|
22
|
+
return ColouredPickListFieldTranslator(field, value, appendToActionPayload, textOverflowMode, isRead);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
return PickListFieldModel({
|
|
@@ -25,13 +27,15 @@ const PickListFieldTranslator = _ref => {
|
|
|
25
27
|
appendToActionPayload,
|
|
26
28
|
options: pickListValues,
|
|
27
29
|
name,
|
|
28
|
-
|
|
30
|
+
isRead,
|
|
31
|
+
value,
|
|
32
|
+
textOverflowMode
|
|
29
33
|
});
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
export default PickListFieldTranslator;
|
|
33
37
|
|
|
34
|
-
const ColouredPickListFieldTranslator = (field, value, appendToActionPayload) => {
|
|
38
|
+
const ColouredPickListFieldTranslator = (field, value, appendToActionPayload, textOverflowMode, isRead) => {
|
|
35
39
|
const {
|
|
36
40
|
uiType,
|
|
37
41
|
name,
|
|
@@ -44,6 +48,8 @@ const ColouredPickListFieldTranslator = (field, value, appendToActionPayload) =>
|
|
|
44
48
|
colorCode: option.colorCode || ''
|
|
45
49
|
})),
|
|
46
50
|
name,
|
|
47
|
-
|
|
51
|
+
isRead,
|
|
52
|
+
value,
|
|
53
|
+
textOverflowMode
|
|
48
54
|
});
|
|
49
55
|
};
|