@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
|
@@ -5,10 +5,15 @@ export function DateFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
text: value
|
|
14
|
+
text: value,
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
13
18
|
});
|
|
14
19
|
}
|
|
@@ -5,10 +5,15 @@ export function DateTimeFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
text: value
|
|
14
|
+
text: value,
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
13
18
|
});
|
|
14
19
|
}
|
|
@@ -5,10 +5,15 @@ export function DecimalFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
text: value
|
|
14
|
+
text: value,
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
13
18
|
});
|
|
14
19
|
}
|
|
@@ -5,10 +5,14 @@ export function EmailFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Email, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
email: value
|
|
14
|
+
email: value,
|
|
15
|
+
isDotted: textOverflowMode === 'clip',
|
|
16
|
+
weight: isRead ? undefined : 'bold'
|
|
13
17
|
});
|
|
14
18
|
}
|
|
@@ -4,14 +4,21 @@ export function LookupFieldView(_ref, ref) {
|
|
|
4
4
|
let {
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
textOverflowMode,
|
|
9
|
+
value,
|
|
10
|
+
isRead
|
|
11
|
+
} = state.properties;
|
|
7
12
|
const {
|
|
8
13
|
name,
|
|
9
14
|
url
|
|
10
|
-
} =
|
|
15
|
+
} = value;
|
|
11
16
|
return /*#__PURE__*/React.createElement(Link, {
|
|
12
17
|
getRef: ref,
|
|
13
18
|
label: name,
|
|
14
19
|
variant: "secondary",
|
|
15
|
-
href: url
|
|
20
|
+
href: url,
|
|
21
|
+
isDotted: textOverflowMode === 'clip',
|
|
22
|
+
weight: isRead ? undefined : 'bold'
|
|
16
23
|
});
|
|
17
24
|
}
|
|
@@ -5,7 +5,8 @@ export function MultiSelectFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode
|
|
9
10
|
} = state.properties;
|
|
10
11
|
const selectedOptions = value.map(item => ({
|
|
11
12
|
id: item,
|
|
@@ -13,6 +14,7 @@ export function MultiSelectFieldView(_ref, ref) {
|
|
|
13
14
|
}));
|
|
14
15
|
return /*#__PURE__*/React.createElement(Tags, {
|
|
15
16
|
getRef: ref,
|
|
16
|
-
tags: selectedOptions
|
|
17
|
+
tags: selectedOptions,
|
|
18
|
+
isWrapped: textOverflowMode === 'wrap'
|
|
17
19
|
});
|
|
18
20
|
}
|
|
@@ -5,10 +5,15 @@ export function NumberFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
text: value
|
|
14
|
+
text: value,
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
13
18
|
});
|
|
14
19
|
}
|
|
@@ -5,10 +5,15 @@ export function PercentageFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
text: value
|
|
14
|
+
text: value,
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
13
18
|
});
|
|
14
19
|
}
|
|
@@ -6,7 +6,9 @@ function PhoneFieldView(_ref, ref) {
|
|
|
6
6
|
state
|
|
7
7
|
} = _ref;
|
|
8
8
|
const {
|
|
9
|
-
value
|
|
9
|
+
value,
|
|
10
|
+
textOverflowMode,
|
|
11
|
+
isRead
|
|
10
12
|
} = state.properties;
|
|
11
13
|
const href = `tel:${value}`;
|
|
12
14
|
return /*#__PURE__*/React.createElement(Link, {
|
|
@@ -14,7 +16,9 @@ function PhoneFieldView(_ref, ref) {
|
|
|
14
16
|
label: value,
|
|
15
17
|
href: href,
|
|
16
18
|
variant: "secondary",
|
|
17
|
-
|
|
19
|
+
weight: isRead ? undefined : 'bold',
|
|
20
|
+
opensNewTab: true,
|
|
21
|
+
isDotted: textOverflowMode === 'clip'
|
|
18
22
|
});
|
|
19
23
|
}
|
|
20
24
|
|
|
@@ -5,10 +5,15 @@ export function PickListFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
|
-
text: value
|
|
14
|
+
text: value,
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
13
18
|
});
|
|
14
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableLink from "@zohodesk-private/desk-components/es/table/TableLink/TableLink";
|
|
3
|
-
import
|
|
3
|
+
import { TableListConstants } from "../../../../../../../cc/table-list";
|
|
4
4
|
export default function PrimaryFieldView(_ref, ref) {
|
|
5
5
|
let {
|
|
6
6
|
state,
|
|
@@ -11,28 +11,40 @@ export default function PrimaryFieldView(_ref, ref) {
|
|
|
11
11
|
} = helpers;
|
|
12
12
|
let {
|
|
13
13
|
value: propValue,
|
|
14
|
-
name: fieldName
|
|
14
|
+
name: fieldName,
|
|
15
|
+
textOverflowMode,
|
|
16
|
+
isRead
|
|
15
17
|
} = state.properties;
|
|
16
18
|
let {
|
|
17
19
|
value,
|
|
18
|
-
url
|
|
20
|
+
url,
|
|
21
|
+
isPreventDefault
|
|
19
22
|
} = propValue;
|
|
23
|
+
|
|
24
|
+
function handleClick(event) {
|
|
25
|
+
if (isPreventDefault) {
|
|
26
|
+
event && event.preventDefault();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
dispatch({
|
|
30
|
+
type: TableListConstants.TABLE_LIST_NAME_FIELD_CLICKED,
|
|
31
|
+
payload: {
|
|
32
|
+
fieldName,
|
|
33
|
+
url
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
return /*#__PURE__*/React.createElement(TableLink, {
|
|
21
39
|
$customProps_link: {
|
|
22
|
-
ref
|
|
40
|
+
ref,
|
|
41
|
+
onClick: handleClick
|
|
23
42
|
},
|
|
24
43
|
$data_text: value,
|
|
25
44
|
$data_url: url,
|
|
26
45
|
$data_target: "_self",
|
|
46
|
+
$flag_wrapText: textOverflowMode === 'wrap',
|
|
27
47
|
$flag_hoverableFromList: true,
|
|
28
|
-
$
|
|
29
|
-
dispatch({
|
|
30
|
-
type: FieldConstants.FIELD_CLICKED,
|
|
31
|
-
payload: {
|
|
32
|
-
fieldName,
|
|
33
|
-
url
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
48
|
+
$ui_weight: isRead ? undefined : 'bold'
|
|
37
49
|
});
|
|
38
50
|
}
|
|
@@ -5,11 +5,15 @@ export function SingleLineFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Text, {
|
|
11
13
|
getRef: ref,
|
|
12
14
|
text: value,
|
|
13
|
-
tooltip:
|
|
15
|
+
tooltip: value,
|
|
16
|
+
isDotted: textOverflowMode === 'clip',
|
|
17
|
+
weight: isRead ? undefined : 'bold'
|
|
14
18
|
});
|
|
15
19
|
}
|
|
@@ -5,13 +5,17 @@ export function UrlFieldView(_ref, ref) {
|
|
|
5
5
|
state
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
|
-
value
|
|
8
|
+
value,
|
|
9
|
+
textOverflowMode,
|
|
10
|
+
isRead
|
|
9
11
|
} = state.properties;
|
|
10
12
|
return /*#__PURE__*/React.createElement(Link, {
|
|
11
13
|
getRef: ref,
|
|
12
14
|
label: value,
|
|
13
15
|
href: value,
|
|
14
16
|
variant: "secondary",
|
|
15
|
-
|
|
17
|
+
weight: isRead ? undefined : 'bold',
|
|
18
|
+
opensNewTab: true,
|
|
19
|
+
isDotted: textOverflowMode === 'clip'
|
|
16
20
|
});
|
|
17
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TagList from '@zohodesk-private/desk-components/es/TagsList/TagsList';
|
|
3
3
|
import TagContractAdapter from "./TagContractAdapter";
|
|
4
|
-
import
|
|
4
|
+
import TagsConstants from "../../../../../../cc/tags/Constants";
|
|
5
5
|
|
|
6
6
|
function TagView(_ref, ref) {
|
|
7
7
|
let {
|
|
@@ -13,13 +13,15 @@ function TagView(_ref, ref) {
|
|
|
13
13
|
} = helpers;
|
|
14
14
|
let {
|
|
15
15
|
title,
|
|
16
|
-
tags
|
|
16
|
+
tags,
|
|
17
|
+
isWrapped
|
|
17
18
|
} = state.properties;
|
|
18
19
|
let tagsList = tags.map(TagContractAdapter);
|
|
19
20
|
return /*#__PURE__*/React.createElement(TagList, {
|
|
20
21
|
$method_getRef: ref,
|
|
21
22
|
$data_list: tagsList,
|
|
22
23
|
$i18n_moreheading: title,
|
|
24
|
+
$flag_isWrapped: isWrapped,
|
|
23
25
|
$flag_showAllTagsInsideMore: false,
|
|
24
26
|
$event_onTagClick: id => {
|
|
25
27
|
dispatch({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Typography from "@zohodesk/components/es/Typography/Typography";
|
|
3
|
-
import
|
|
3
|
+
import TextConstants from "../../../../../../cc/text/Constants";
|
|
4
4
|
|
|
5
5
|
function TextView(_ref, ref) {
|
|
6
6
|
let {
|
|
@@ -13,7 +13,8 @@ function TextView(_ref, ref) {
|
|
|
13
13
|
let {
|
|
14
14
|
text,
|
|
15
15
|
weight,
|
|
16
|
-
tooltip
|
|
16
|
+
tooltip,
|
|
17
|
+
isDotted
|
|
17
18
|
} = state.properties;
|
|
18
19
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
19
20
|
$tagAttributes_text: {
|
|
@@ -27,7 +28,7 @@ function TextView(_ref, ref) {
|
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
$ui_size: "14",
|
|
30
|
-
$flag_dotted:
|
|
31
|
+
$flag_dotted: isDotted,
|
|
31
32
|
$ui_weight: weight,
|
|
32
33
|
$i18n_dataTitle: tooltip || text
|
|
33
34
|
}, text);
|
|
@@ -4,6 +4,7 @@ import TextAreaConstants from "../../../../../../cc/textarea/Constants"; // @ts-
|
|
|
4
4
|
|
|
5
5
|
import style from "./css/TextAreaView.module.css";
|
|
6
6
|
import RowActionsRenderer from "../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
7
|
+
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
7
8
|
|
|
8
9
|
function TextAreaView(_ref, ref) {
|
|
9
10
|
let {
|
|
@@ -21,7 +22,8 @@ function TextAreaView(_ref, ref) {
|
|
|
21
22
|
required,
|
|
22
23
|
disabled,
|
|
23
24
|
readonly,
|
|
24
|
-
actions
|
|
25
|
+
actions,
|
|
26
|
+
clientScripts
|
|
25
27
|
} = state.properties;
|
|
26
28
|
const textAreaRenderer = /*#__PURE__*/React.createElement(Textarea, {
|
|
27
29
|
getRef: ref,
|
|
@@ -63,7 +65,9 @@ function TextAreaView(_ref, ref) {
|
|
|
63
65
|
}, textAreaRenderer, /*#__PURE__*/React.createElement("div", {
|
|
64
66
|
className: style.rightPlaceholder
|
|
65
67
|
}, /*#__PURE__*/React.createElement(RowActionsRenderer, {
|
|
66
|
-
actions: actions
|
|
68
|
+
actions: actions,
|
|
69
|
+
clientScripts: clientScripts,
|
|
70
|
+
gap: ActionViewGap.SMALL
|
|
67
71
|
})));
|
|
68
72
|
}
|
|
69
73
|
|
package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css
CHANGED
|
@@ -4,37 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
.rightPlaceholder {
|
|
6
6
|
position: absolute;
|
|
7
|
-
bottom:
|
|
7
|
+
bottom: 4px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
[dir=ltr] .rightPlaceholder {
|
|
11
|
-
right:
|
|
11
|
+
right: 12px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
[dir=rtl] .rightPlaceholder {
|
|
15
|
-
left:
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[dir=ltr] .paddingRight32 {
|
|
19
|
-
padding-right: var(--zd_size32) ;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
[dir=rtl] .paddingRight32 {
|
|
23
|
-
padding-left: var(--zd_size32) ;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[dir=ltr] .paddingRight64 {
|
|
27
|
-
padding-right: var(--zd_size64) ;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
[dir=rtl] .paddingRight64 {
|
|
31
|
-
padding-left: var(--zd_size64) ;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[dir=ltr] .paddingRight96 {
|
|
35
|
-
padding-right: var(--zd_size96) ;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
[dir=rtl] .paddingRight96 {
|
|
39
|
-
padding-left: var(--zd_size96) ;
|
|
15
|
+
left: 12px;
|
|
40
16
|
}
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import TextBox from "@zohodesk/components/es/TextBoxIcon/TextBoxIcon";
|
|
3
3
|
import TextBoxConstants from "../../../../../../cc/textbox/Constants";
|
|
4
4
|
import RowActionsRenderer from "../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
5
|
+
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
5
6
|
|
|
6
7
|
function TextBoxView(_ref, ref) {
|
|
7
8
|
let {
|
|
@@ -21,12 +22,15 @@ function TextBoxView(_ref, ref) {
|
|
|
21
22
|
required,
|
|
22
23
|
disabled,
|
|
23
24
|
readonly,
|
|
24
|
-
actions
|
|
25
|
+
actions,
|
|
26
|
+
clientScripts
|
|
25
27
|
} = state.properties;
|
|
26
28
|
|
|
27
29
|
const renderRightFieldActions = () => {
|
|
28
30
|
return actions?.length ? /*#__PURE__*/React.createElement(RowActionsRenderer, {
|
|
29
|
-
actions: actions
|
|
31
|
+
actions: actions,
|
|
32
|
+
clientScripts: clientScripts,
|
|
33
|
+
gap: ActionViewGap.SMALL
|
|
30
34
|
}) : null;
|
|
31
35
|
};
|
|
32
36
|
|
|
@@ -14,8 +14,8 @@ class AppContextBehaviourFactory {
|
|
|
14
14
|
} = _ref;
|
|
15
15
|
const appResource = platformSDK[ResourceNamesEnum.APP];
|
|
16
16
|
return {
|
|
17
|
-
headers: appResource.getApiHeader(),
|
|
18
|
-
context: { ...appResource.getContext(),
|
|
17
|
+
headers: appResource && appResource.getApiHeader(),
|
|
18
|
+
context: { ...(appResource && appResource.getContext()),
|
|
19
19
|
...context
|
|
20
20
|
}
|
|
21
21
|
};
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
class ClientActionReordererRegistry {
|
|
2
|
+
static isLoggingEnabled = __DEVELOPMENT__;
|
|
3
|
+
reorderers = new Map();
|
|
4
|
+
|
|
5
|
+
constructor() {}
|
|
6
|
+
|
|
7
|
+
static getInstance() {
|
|
8
|
+
if (!ClientActionReordererRegistry.instance) {
|
|
9
|
+
ClientActionReordererRegistry.instance = new ClientActionReordererRegistry();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return ClientActionReordererRegistry.instance;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
register(name, reordererFn) {
|
|
16
|
+
const reordererFnNameRegex = /^[A-Za-z0-9_-]+#[A-Z][a-zA-Z]*ActionsReorderer$/;
|
|
17
|
+
const isValidReordererFnName = reordererFnNameRegex.test(name);
|
|
18
|
+
|
|
19
|
+
if (!isValidReordererFnName && ClientActionReordererRegistry.isLoggingEnabled) {
|
|
20
|
+
console.warn(`${name} is not a valid client action reorderer function name.Reorderer function name should be of the format \"<instanceName>#<location>ActionsReorderer\"`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (this.reorderers.has(name) && ClientActionReordererRegistry.isLoggingEnabled) {
|
|
24
|
+
console.warn(`Client action reorderer function with name "${name}" is already registered. Overwriting the existing function.`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (this.reorderers.has(name) && this.get(name) !== reordererFn && ClientActionReordererRegistry.isLoggingEnabled) {
|
|
28
|
+
console.warn(`Client action reorderer function with name "${name}" is already registered with a different instance. Overwriting the existing function.`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
this.reorderers.set(name, reordererFn);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get(name) {
|
|
35
|
+
return this.reorderers.get(name);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default ClientActionReordererRegistry.getInstance();
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
.wrapper {
|
|
2
|
-
max-width: 100%
|
|
2
|
+
max-width: 100%
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.gap_small {
|
|
6
|
-
gap:
|
|
6
|
+
gap: 4px
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.gap_xmedium {
|
|
10
|
-
gap:
|
|
10
|
+
gap: 6px
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.gap_medium {
|
|
14
|
-
gap:
|
|
14
|
+
gap: 8px
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.gap_large {
|
|
18
|
-
gap:
|
|
18
|
+
gap: 10px
|
|
19
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActionContextResolver } from "../context-resolver";
|
|
2
2
|
import { ConditionResolver } from "../condition-resolver";
|
|
3
|
+
import ClientActionReordererRegistry from "../../components/action-event-mediator/frameworks/ui/ClientActionReordererRegistry";
|
|
3
4
|
export default class ClientActionsTranslator {
|
|
4
5
|
constructor() {}
|
|
5
6
|
|
|
@@ -21,6 +22,30 @@ export default class ClientActionsTranslator {
|
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
static getReordererFnName(instanceName, location) {
|
|
26
|
+
if (!instanceName || !location) return null;
|
|
27
|
+
const locationIdentifier = location.split('_')[0];
|
|
28
|
+
let formattedLocationName = locationIdentifier ? locationIdentifier : null;
|
|
29
|
+
if (!formattedLocationName) return null;
|
|
30
|
+
formattedLocationName = formattedLocationName.charAt(0).toUpperCase() + formattedLocationName.slice(1);
|
|
31
|
+
return `${instanceName}#${formattedLocationName}ActionsReorderer`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static reorderActions(actions) {
|
|
35
|
+
const instanceName = actions && actions.length > 0 ? actions[0].instanceName : null;
|
|
36
|
+
if (!location || !actions || !instanceName || actions.length < 1) return actions;
|
|
37
|
+
const reordererFnName = ClientActionsTranslator.getReordererFnName(instanceName, actions[0].location);
|
|
38
|
+
const reordererFn = ClientActionReordererRegistry.get(reordererFnName);
|
|
39
|
+
|
|
40
|
+
if (reordererFn) {
|
|
41
|
+
const reorderedActions = reordererFn(actions);
|
|
42
|
+
const reorderedClientActionIds = reorderedActions.map(clientAction => clientAction.id);
|
|
43
|
+
return reorderedClientActionIds && reorderedClientActionIds.length === actions.length ? reorderedClientActionIds.map(clientActionId => actions.find(action => action.id === clientActionId)) : actions;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return actions;
|
|
47
|
+
}
|
|
48
|
+
|
|
24
49
|
static appendComponentMetaToActions(actions, instanceName, moduleName) {
|
|
25
50
|
return actions.map(action => {
|
|
26
51
|
return { ...action,
|
|
@@ -37,7 +62,8 @@ export default class ClientActionsTranslator {
|
|
|
37
62
|
const actionsWithInstanceName = ClientActionsTranslator.appendComponentMetaToActions(actions, instanceName, moduleName);
|
|
38
63
|
const resolvedActions = ActionContextResolver.resolveActions(actionsWithInstanceName, replacementContext);
|
|
39
64
|
const evaluatedActions = resolvedActions.filter(action => ConditionResolver.evaluateCondition(action.conditions, replacementContext, action.id));
|
|
40
|
-
const
|
|
65
|
+
const reorderedActions = ClientActionsTranslator.reorderActions(evaluatedActions);
|
|
66
|
+
const finalTransformedActions = reorderedActions.map(action => this.transformToActionViewModel(action));
|
|
41
67
|
return finalTransformedActions;
|
|
42
68
|
}
|
|
43
69
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import AbstractController from "./AbstractController";
|
|
2
|
+
import { ZLIST_INITIALIZE } from "../../../../../bc/zlist/Constants";
|
|
3
|
+
export default class ResolutionBasedLimitController extends AbstractController {
|
|
4
|
+
handle(event) {
|
|
5
|
+
const {
|
|
6
|
+
dispatch,
|
|
7
|
+
action
|
|
8
|
+
} = event;
|
|
9
|
+
const {
|
|
10
|
+
count
|
|
11
|
+
} = action.payload;
|
|
12
|
+
const newLimit = Math.ceil(count / 25) * 25;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: ZLIST_INITIALIZE,
|
|
15
|
+
payload: {
|
|
16
|
+
resolutionBasedLimit: newLimit
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
export default class ErrorPrinter {
|
|
2
2
|
static printError(error) {
|
|
3
|
-
console.error('Error occurred:', error);
|
|
3
|
+
__DEVELOPMENT__ && console.error('Error occurred:', error);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
static displaySchemaErrors(title, errors) {
|
|
7
7
|
let dataName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '(root)';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
|
|
9
|
+
if (__DEVELOPMENT__) {
|
|
10
|
+
console.group(title.msg, ...title.styles);
|
|
11
|
+
errors.forEach((_ref, i) => {
|
|
12
|
+
let {
|
|
13
|
+
dataPath,
|
|
14
|
+
keyword,
|
|
15
|
+
message
|
|
16
|
+
} = _ref;
|
|
17
|
+
console.error(`%c${i + 1}. %c${dataName + dataPath}%c → ${keyword} ${message}`, 'color: initial;', 'color: #FF6F61; font-weight: bold;', 'color: #FFA500;');
|
|
18
|
+
});
|
|
19
|
+
console.groupEnd();
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
}
|