@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
|
@@ -19,6 +19,8 @@ import ReOrderUseCase from "../../../../zlist/applications/usecases/ReOrderUseCa
|
|
|
19
19
|
import { SdkContracts } from "../../../../../cc/table-connected/SdkContract";
|
|
20
20
|
import SortUseCase from "../../../../zlist/applications/usecases/SortUseCase";
|
|
21
21
|
import { Analytics } from "../../../../../library/analytics";
|
|
22
|
+
import MarkAsReadUseCase from "../../../../zrecord/applications/usecases/MarkAsReadUseCase";
|
|
23
|
+
import MarkAsUnReadUseCase from "../../../../zrecord/applications/usecases/MarkAsUnReadUseCase";
|
|
22
24
|
export class SmartTableResource extends AbstractResource {
|
|
23
25
|
initialize() {}
|
|
24
26
|
|
|
@@ -319,4 +321,34 @@ export class SmartTableResource extends AbstractResource {
|
|
|
319
321
|
});
|
|
320
322
|
}
|
|
321
323
|
|
|
324
|
+
markAsRead(recordId) {
|
|
325
|
+
this.validateInput('markAsRead', {
|
|
326
|
+
recordId
|
|
327
|
+
}, SdkContracts.markAsReadInputMeta);
|
|
328
|
+
const {
|
|
329
|
+
dispatch
|
|
330
|
+
} = this.dependencies;
|
|
331
|
+
const dependencies = this.getRecordDependencies();
|
|
332
|
+
const usecase = this.createUseCase(dependencies, MarkAsReadUseCase);
|
|
333
|
+
usecase.execute({
|
|
334
|
+
recordId,
|
|
335
|
+
dispatch
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
markAsUnRead(recordId) {
|
|
340
|
+
this.validateInput('markAsUnRead', {
|
|
341
|
+
recordId
|
|
342
|
+
}, SdkContracts.markAsUnReadInputMeta);
|
|
343
|
+
const {
|
|
344
|
+
dispatch
|
|
345
|
+
} = this.dependencies;
|
|
346
|
+
const dependencies = this.getRecordDependencies();
|
|
347
|
+
const usecase = this.createUseCase(dependencies, MarkAsUnReadUseCase);
|
|
348
|
+
usecase.execute({
|
|
349
|
+
recordId,
|
|
350
|
+
dispatch
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
|
|
322
354
|
}
|
|
@@ -15,16 +15,21 @@ import ScrollController from "../adapters/controllers/ScrollController";
|
|
|
15
15
|
import ColumnChooserUpdateController from "../adapters/controllers/ColumnChooserUpdateController";
|
|
16
16
|
import ColumnChooserOpenedController from "../adapters/controllers/ColumnChooserOpenedController";
|
|
17
17
|
import { platformSDK_old } from "../../../sdk/frameworks/Sdk";
|
|
18
|
-
import { SET_RECORDS_SUCCESS } from "../../../../bc/zrecord/Constants";
|
|
18
|
+
import { RECORD_MARK_AS_READ, RECORD_MARK_AS_UNREAD, SET_RECORDS_SUCCESS } from "../../../../bc/zrecord/Constants";
|
|
19
19
|
import ErrorEventHandlersFactory from "./ErrorEventHandlersFactory";
|
|
20
20
|
import LifeCycleEvents from "../../../../cc/component/LifeCycleEventsEnum";
|
|
21
21
|
import { Analytics } from "../../../../library/analytics";
|
|
22
|
+
import { TableListConstants } from "../../../../cc/table-list";
|
|
23
|
+
import ResolutionBasedLimitController from "../adapters/controllers/ResolutionBasedLimitController";
|
|
24
|
+
import { TableTextOverflowConstants } from "../../../../cc/table-text-overflow";
|
|
25
|
+
import { TEXT_OVERFLOW_BEHAVIOUR_UPDATE_REQUESTED } from "../../../../bc/clip-wrap/Constants";
|
|
22
26
|
const {
|
|
23
27
|
TABLE_LIST_RESIZE_START_REQUESTED,
|
|
24
28
|
TABLE_LIST_RESIZE_MOVE_REQUESTED,
|
|
25
29
|
TABLE_LIST_RESIZE_END_REQUESTED,
|
|
26
30
|
TABLE_LIST_SCROLLED,
|
|
27
|
-
TABLE_LIST_ROW_DRAG_END
|
|
31
|
+
TABLE_LIST_ROW_DRAG_END,
|
|
32
|
+
TABLE_LIST_NAME_FIELD_CLICKED
|
|
28
33
|
} = TableListEventConstants;
|
|
29
34
|
|
|
30
35
|
function createHandlerWithSdk(handler) {
|
|
@@ -53,7 +58,6 @@ export default class EventHandlersFactory {
|
|
|
53
58
|
const wrapped = EventHandlersFactory.getSdkWrappedEventHandler(eventHandlers); // Generic addMetrics handler
|
|
54
59
|
|
|
55
60
|
const addMetrics = args => {
|
|
56
|
-
// console.log({ ...args }, "Arguments update Here");
|
|
57
61
|
const {
|
|
58
62
|
action
|
|
59
63
|
} = args;
|
|
@@ -256,14 +260,72 @@ export default class EventHandlersFactory {
|
|
|
256
260
|
|
|
257
261
|
const metrics = [smartTableRendered, smartTableFeatures, smartTableCustomComponents, smartTableSortApplied, ...smartTableColumnResized, smartTableRowsSelected, ...smartTableColumnVisibilityToggled, ...smartTableColumnReordered];
|
|
258
262
|
metrics.forEach(metric => {
|
|
259
|
-
// console.log("Pushing metric:", metric);
|
|
260
263
|
Analytics.push(metric);
|
|
261
264
|
});
|
|
262
265
|
};
|
|
263
266
|
|
|
267
|
+
const navigationHandler = args => {
|
|
268
|
+
const {
|
|
269
|
+
action,
|
|
270
|
+
dispatch
|
|
271
|
+
} = args;
|
|
272
|
+
dispatch({
|
|
273
|
+
type: SmartTableConstants.ExternalConstants.SMART_TABLE_NAME_FIELD_CLICKED,
|
|
274
|
+
payload: action.payload
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
const textOverFlowUpdate = args => {
|
|
279
|
+
const {
|
|
280
|
+
action,
|
|
281
|
+
dispatch
|
|
282
|
+
} = args;
|
|
283
|
+
dispatch({
|
|
284
|
+
type: TEXT_OVERFLOW_BEHAVIOUR_UPDATE_REQUESTED,
|
|
285
|
+
payload: action.payload
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
const markAsReadHandler = args => {
|
|
290
|
+
const {
|
|
291
|
+
action,
|
|
292
|
+
dispatch
|
|
293
|
+
} = args;
|
|
294
|
+
const {
|
|
295
|
+
payload,
|
|
296
|
+
metaData
|
|
297
|
+
} = action;
|
|
298
|
+
dispatch({
|
|
299
|
+
type: RECORD_MARK_AS_READ,
|
|
300
|
+
payload,
|
|
301
|
+
metaData
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
const markAsUnReadHandler = args => {
|
|
306
|
+
const {
|
|
307
|
+
action,
|
|
308
|
+
dispatch
|
|
309
|
+
} = args;
|
|
310
|
+
const {
|
|
311
|
+
payload,
|
|
312
|
+
metaData
|
|
313
|
+
} = action;
|
|
314
|
+
dispatch({
|
|
315
|
+
type: RECORD_MARK_AS_UNREAD,
|
|
316
|
+
payload,
|
|
317
|
+
metaData
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
|
|
264
321
|
const defaultEventHandlers = {
|
|
265
322
|
NAVIGATION: NavigationHandler,
|
|
323
|
+
[TableTextOverflowConstants.TEXT_OVERFLOW_UPDATED]: textOverFlowUpdate,
|
|
266
324
|
// [`${name}#${LifeCycleEvents.MOUNT}`]: smartTableRenderedMetrics,
|
|
325
|
+
[TableListConstants.TABLE_LIST_RESOLUTION_BASED_COUNT_CALCULATED]: new ResolutionBasedLimitController().handle,
|
|
326
|
+
[SmartTableConstants.ExternalConstants.SMART_TABLE_MARK_AS_READ_REQUESTED]: markAsReadHandler,
|
|
327
|
+
[SmartTableConstants.ExternalConstants.SMART_TABLE_MARK_AS_UNREAD_REQUESTED]: markAsUnReadHandler,
|
|
328
|
+
[TABLE_LIST_NAME_FIELD_CLICKED]: navigationHandler,
|
|
267
329
|
[`${name}#${LifeCycleEvents.STATE_UPDATED}`]: addMetrics,
|
|
268
330
|
[RESIZE_FINISHED]: new ResizeFinishController().handle,
|
|
269
331
|
[TABLE_LIST_RESIZE_START_REQUESTED]: new ResizeStartController().handle,
|
|
@@ -17,7 +17,9 @@ export default class ListSdkFactory {
|
|
|
17
17
|
return smartTable.updateRecords(recordsMap, shouldFetch);
|
|
18
18
|
},
|
|
19
19
|
reOrderRecord: (fromIndex, toIndex) => smartTable.reOrderRecord(fromIndex, toIndex),
|
|
20
|
-
sortRecords: sortBy => smartTable.sortRecords(sortBy)
|
|
20
|
+
sortRecords: sortBy => smartTable.sortRecords(sortBy),
|
|
21
|
+
markAsRead: recordId => smartTable.markAsRead(recordId),
|
|
22
|
+
markAsUnRead: recordId => smartTable.markAsUnRead(recordId)
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -51,7 +53,9 @@ export default class ListSdkFactory {
|
|
|
51
53
|
selectAllRecords: selectionSdks.selectAllRecords,
|
|
52
54
|
deselectAllRecords: selectionSdks.deselectAllRecords,
|
|
53
55
|
reOrderRecord: recordSdks.reOrderRecord,
|
|
54
|
-
sortRecords: recordSdks.sortRecords
|
|
56
|
+
sortRecords: recordSdks.sortRecords,
|
|
57
|
+
markAsRead: recordSdks.markAsRead,
|
|
58
|
+
markAsUnRead: recordSdks.markAsUnRead
|
|
55
59
|
}
|
|
56
60
|
};
|
|
57
61
|
}
|
|
@@ -41,6 +41,7 @@ function combineDataSourceWithDefault(dataSource) {
|
|
|
41
41
|
import { SmartTableEventsContracts } from "../../../../cc/table-connected";
|
|
42
42
|
import ClientScriptsBehaviourFactory from "../../../client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsBehaviourFactory";
|
|
43
43
|
import AppContextBehaviourFactory from "../../../app-context-behaviour/frameworks/AppContextBehaviourFactory";
|
|
44
|
+
import ClipWrapBehaviourFactory from "../../../../library/behaviours/clip-wrap/frameworks/ui/ClipWrapBehaviourFactory";
|
|
44
45
|
export default class TableConnectedFactory {
|
|
45
46
|
static create(_ref) {
|
|
46
47
|
let {
|
|
@@ -52,7 +53,7 @@ export default class TableConnectedFactory {
|
|
|
52
53
|
} = _ref;
|
|
53
54
|
|
|
54
55
|
if (dataBroker) {
|
|
55
|
-
console.warn('Desk Platform Warning: dataBroker is deprecated, use dataSource instead');
|
|
56
|
+
__DEVELOPMENT__ && console.warn('Desk Platform Warning: dataBroker is deprecated, use dataSource instead');
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
const _dataSource = combineDataSourceWithDefault(dataBroker ? dataBroker : dataSource);
|
|
@@ -69,7 +70,7 @@ export default class TableConnectedFactory {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
static getBehaviours(_dataSource) {
|
|
72
|
-
return [SdkBehaviourFactory.create([ResourceNamesEnum.SMART_TABLE, ResourceNamesEnum.CLIENT_ACTION]), TableColumnResizerBehaviorFactory.create(), KeyboardControlBehaviourFactory.create(), LocalStorageBehaviourFactory.create(), ZHttpBehaviourFactory.create(), DataSourceBehaviourFactory.create(), ...TableConnectedFactory.getPlatformBehaviours(_dataSource), ColumnChooserBehaviourFactory.create(), ListItemSelectionBehaviourFactory.create()];
|
|
73
|
+
return [SdkBehaviourFactory.create([ResourceNamesEnum.SMART_TABLE, ResourceNamesEnum.CLIENT_ACTION]), TableColumnResizerBehaviorFactory.create(), KeyboardControlBehaviourFactory.create(), ClipWrapBehaviourFactory.create(), LocalStorageBehaviourFactory.create(), ZHttpBehaviourFactory.create(), DataSourceBehaviourFactory.create(), ...TableConnectedFactory.getPlatformBehaviours(_dataSource), ColumnChooserBehaviourFactory.create(), ListItemSelectionBehaviourFactory.create()];
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
static getPlatformBehaviours(_dataSource) {
|
|
@@ -17,6 +17,7 @@ function View(_ref, ref) {
|
|
|
17
17
|
emptyStateUiType,
|
|
18
18
|
focussedRow,
|
|
19
19
|
keyboardControlsConfig,
|
|
20
|
+
textOverflowConfig,
|
|
20
21
|
reOrderConfig
|
|
21
22
|
} = state.viewModel;
|
|
22
23
|
const {
|
|
@@ -46,6 +47,7 @@ function View(_ref, ref) {
|
|
|
46
47
|
selection: selection,
|
|
47
48
|
selectionConfig: selectionConfig,
|
|
48
49
|
keyboardControlsConfig: keyboardControlsConfig,
|
|
50
|
+
textOverflowConfig: textOverflowConfig,
|
|
49
51
|
focussedRow: focussedRow
|
|
50
52
|
});
|
|
51
53
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const markAsRead = {
|
|
2
|
+
name: 'markAsRead',
|
|
3
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/{{moduleName}}/{{recordId}}/markAsRead',
|
|
4
|
+
parameters: `{}`,
|
|
5
|
+
type: 'POST',
|
|
6
|
+
transformer: data => data,
|
|
7
|
+
requestBody: '',
|
|
8
|
+
properties: {
|
|
9
|
+
moduleName: {
|
|
10
|
+
required: true,
|
|
11
|
+
typeMetadata: {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
recordId: {
|
|
18
|
+
required: true,
|
|
19
|
+
typeMetadata: {
|
|
20
|
+
schema: {
|
|
21
|
+
type: 'string'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export default markAsRead;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const markAsUnRead = {
|
|
2
|
+
name: 'markAsUnRead',
|
|
3
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/{{moduleName}}/{{recordId}}/markAsUnRead',
|
|
4
|
+
parameters: `{}`,
|
|
5
|
+
type: 'POST',
|
|
6
|
+
transformer: data => data,
|
|
7
|
+
requestBody: '',
|
|
8
|
+
properties: {
|
|
9
|
+
moduleName: {
|
|
10
|
+
required: true,
|
|
11
|
+
typeMetadata: {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
recordId: {
|
|
18
|
+
required: true,
|
|
19
|
+
typeMetadata: {
|
|
20
|
+
schema: {
|
|
21
|
+
type: 'string'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export default markAsUnRead;
|
|
@@ -19,6 +19,8 @@ import updateSelectedFields from "./http-template/updateSelectedFields";
|
|
|
19
19
|
import { ZFormApiActionName } from "../../bc/zform/Constants";
|
|
20
20
|
import fetchLookupFields from "./http-template/fetchLookupFields";
|
|
21
21
|
import getClientScripts from "./http-template/getClientScripts";
|
|
22
|
+
import markAsRead from "./http-template/markAsRead";
|
|
23
|
+
import markAsUnRead from "./http-template/markAsUnRead";
|
|
22
24
|
let dataSource = {
|
|
23
25
|
httpTemplates: {
|
|
24
26
|
[RecordApiActionName.GET_RECORDS]: getRecords,
|
|
@@ -26,6 +28,8 @@ let dataSource = {
|
|
|
26
28
|
[RecordApiActionName.MOVE_TO_TRASH]: moveToTrash,
|
|
27
29
|
[RecordApiActionName.DELETE_RECORDS]: deleteRecords,
|
|
28
30
|
[RecordApiActionName.DELETE_RECORD]: deleteRecord,
|
|
31
|
+
[RecordApiActionName.MARK_AS_READ]: markAsRead,
|
|
32
|
+
[RecordApiActionName.MARK_AS_UNREAD]: markAsUnRead,
|
|
29
33
|
[RecordApiActionName.CREATE_RECORD]: createRecord,
|
|
30
34
|
[RecordApiActionName.GET_CLIENTACTIONS]: getClientActions,
|
|
31
35
|
[RecordApiActionName.GET_CLIENTSCRIPTS]: getClientScripts,
|
|
@@ -30,7 +30,7 @@ export class ResourceManager {
|
|
|
30
30
|
const ResourceClass = resources[resourceName];
|
|
31
31
|
|
|
32
32
|
if (!ResourceClass) {
|
|
33
|
-
console.warn(`Resource class not found for: ${resourceName}`);
|
|
33
|
+
__DEVELOPMENT__ && console.warn(`Resource class not found for: ${resourceName}`);
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -54,7 +54,7 @@ export class ResourceManager {
|
|
|
54
54
|
instance.destroy();
|
|
55
55
|
delete resourceInstances[resourceName][instanceName];
|
|
56
56
|
} else {
|
|
57
|
-
console.warn(`No resource instance found for: ${resourceName} - ${instanceName}`);
|
|
57
|
+
__DEVELOPMENT__ && console.warn(`No resource instance found for: ${resourceName} - ${instanceName}`);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ export class ResourceManager {
|
|
|
64
64
|
} = this;
|
|
65
65
|
|
|
66
66
|
if (resources[resourceName]) {
|
|
67
|
-
console.warn(`Resource with name "${resourceName}" already exists. Overwriting.`);
|
|
67
|
+
__DEVELOPMENT__ && console.warn(`Resource with name "${resourceName}" already exists. Overwriting.`);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
resources[resourceName] = resource;
|
|
@@ -69,8 +69,16 @@ export default class FormTranslator {
|
|
|
69
69
|
} = transformedClientActions;
|
|
70
70
|
const {
|
|
71
71
|
fieldLabelActions,
|
|
72
|
-
fieldActions
|
|
72
|
+
fieldActions,
|
|
73
|
+
sectionHeaderRightActions,
|
|
74
|
+
sectionTitleRightActions,
|
|
75
|
+
fieldOptionRightActions
|
|
73
76
|
} = mappedClientActions;
|
|
77
|
+
const sectionFieldOptionActions = {
|
|
78
|
+
sectionHeaderRightActions,
|
|
79
|
+
sectionTitleRightActions,
|
|
80
|
+
fieldOptionRightActions
|
|
81
|
+
};
|
|
74
82
|
const fieldLevelActions = {
|
|
75
83
|
fieldLabelActions,
|
|
76
84
|
fieldActions
|
|
@@ -114,7 +122,8 @@ export default class FormTranslator {
|
|
|
114
122
|
moduleName,
|
|
115
123
|
context,
|
|
116
124
|
focusedFieldName: zform.focusedFieldName,
|
|
117
|
-
preferences
|
|
125
|
+
preferences,
|
|
126
|
+
sectionFieldOptionActions
|
|
118
127
|
});
|
|
119
128
|
return sectionViewModel;
|
|
120
129
|
}),
|
|
@@ -140,5 +149,11 @@ const mapper = clientAction => ({
|
|
|
140
149
|
footerLeftActions: clientAction.filter(action => action.location === 'footer_left_actions'),
|
|
141
150
|
footerRightActions: clientAction.filter(action => action.location === 'footer_right_actions'),
|
|
142
151
|
fieldLabelActions: clientAction.filter(action => action.location === 'field_label_actions'),
|
|
143
|
-
fieldActions: clientAction.filter(action => action.location === 'field_actions')
|
|
152
|
+
fieldActions: clientAction.filter(action => action.location === 'field_actions'),
|
|
153
|
+
sectionHeaderLeftActions: clientAction.filter(action => action.location === 'section_header_left_actions'),
|
|
154
|
+
sectionHeaderRightActions: clientAction.filter(action => action.location === 'section_header_right_actions'),
|
|
155
|
+
sectionTitleLeftActions: clientAction.filter(action => action.location === 'section_title_left_actions'),
|
|
156
|
+
sectionTitleRightActions: clientAction.filter(action => action.location === 'section_title_right_actions'),
|
|
157
|
+
fieldOptionLeftActions: clientAction.filter(action => action.location === 'field_options_left_actions'),
|
|
158
|
+
fieldOptionRightActions: clientAction.filter(action => action.location === 'field_options_right_actions')
|
|
144
159
|
});
|
|
@@ -12,6 +12,7 @@ function SectionTranslator(_ref) {
|
|
|
12
12
|
context,
|
|
13
13
|
focusedFieldName,
|
|
14
14
|
preferences,
|
|
15
|
+
sectionFieldOptionActions,
|
|
15
16
|
instanceName,
|
|
16
17
|
moduleName
|
|
17
18
|
} = _ref;
|
|
@@ -22,6 +23,18 @@ function SectionTranslator(_ref) {
|
|
|
22
23
|
return !allFieldHidden;
|
|
23
24
|
};
|
|
24
25
|
|
|
26
|
+
const fieldOptionActions = {
|
|
27
|
+
// fieldOptionLeftActions: sectionFieldOptionActions.fieldOptionLeftActions,
|
|
28
|
+
fieldOptionRightActions: sectionFieldOptionActions.fieldOptionRightActions
|
|
29
|
+
};
|
|
30
|
+
const transformedClientActions = {};
|
|
31
|
+
Object.entries(sectionFieldOptionActions).forEach(_ref2 => {
|
|
32
|
+
let [key, value] = _ref2;
|
|
33
|
+
let headerActions = ClientActionsTranslator.transform(value, instanceName, moduleName, { ...context,
|
|
34
|
+
...section
|
|
35
|
+
});
|
|
36
|
+
transformedClientActions[key] = headerActions;
|
|
37
|
+
});
|
|
25
38
|
const defaultViewModel = {
|
|
26
39
|
type: mapping?.UIComponentName ? mapping.UIComponentName : DefaultFormSectionUIType,
|
|
27
40
|
id: section.id + '',
|
|
@@ -30,6 +43,12 @@ function SectionTranslator(_ref) {
|
|
|
30
43
|
description: sanitizeHtmlString({
|
|
31
44
|
htmlString: section.description
|
|
32
45
|
}),
|
|
46
|
+
headerActions: transformedClientActions.sectionHeaderRightActions,
|
|
47
|
+
titleActions: transformedClientActions.sectionTitleRightActions,
|
|
48
|
+
// headerLeftActions: sectionFieldOptionActions.sectionHeaderLeftActions,
|
|
49
|
+
// headerRightActions: sectionFieldOptionActions.sectionHeaderRightActions,
|
|
50
|
+
// titleLeftActions: sectionFieldOptionActions.sectionTitleLeftActions,
|
|
51
|
+
// titleRightActions: sectionFieldOptionActions.sectionTitleRightActions,
|
|
33
52
|
isCollapsed: section.isCollapsed,
|
|
34
53
|
isVisible: section.isVisible && sectionVisibility(section),
|
|
35
54
|
fields: section.fields.map(field => {
|
|
@@ -58,8 +77,7 @@ function SectionTranslator(_ref) {
|
|
|
58
77
|
label: field.toolTip,
|
|
59
78
|
fieldName: field.apiName
|
|
60
79
|
}));
|
|
61
|
-
}
|
|
62
|
-
|
|
80
|
+
}
|
|
63
81
|
|
|
64
82
|
if (field.isPHI === true && ephiFields.includes(field.type)) {
|
|
65
83
|
defaultActions.fieldLabelActions.push(getDefaultFieldEphiActionTemplate({
|
|
@@ -69,8 +87,8 @@ function SectionTranslator(_ref) {
|
|
|
69
87
|
|
|
70
88
|
|
|
71
89
|
const transformedDefaultActions = createEmptyActions();
|
|
72
|
-
Object.entries(defaultActions).forEach(
|
|
73
|
-
let [key, value] =
|
|
90
|
+
Object.entries(defaultActions).forEach(_ref3 => {
|
|
91
|
+
let [key, value] = _ref3;
|
|
74
92
|
let transformedDefaultAction = ClientActionsTranslator.transform(value, instanceName, moduleName, { ...context,
|
|
75
93
|
...field
|
|
76
94
|
});
|
|
@@ -78,8 +96,8 @@ function SectionTranslator(_ref) {
|
|
|
78
96
|
}); // Transform client actions
|
|
79
97
|
|
|
80
98
|
const transformedActions = createEmptyActions();
|
|
81
|
-
Object.entries(fieldLevelActions).forEach(
|
|
82
|
-
let [key, value] =
|
|
99
|
+
Object.entries(fieldLevelActions).forEach(_ref4 => {
|
|
100
|
+
let [key, value] = _ref4;
|
|
83
101
|
let transformedAction = ClientActionsTranslator.transform(value, instanceName, moduleName, { ...context,
|
|
84
102
|
...field
|
|
85
103
|
});
|
|
@@ -93,7 +111,12 @@ function SectionTranslator(_ref) {
|
|
|
93
111
|
|
|
94
112
|
if (field.toolTip && field.toolTipType === "placeholder" && !noPlaceHolderSupport.includes(field.type)) {
|
|
95
113
|
fieldPreModified["placeholder"] = field.toolTip;
|
|
96
|
-
}
|
|
114
|
+
} // const optionActionAvailArray = ['Picklist', 'Multiselect'];
|
|
115
|
+
// // Option Actions check
|
|
116
|
+
// if (optionActionAvailArray.includes(field.type)) {
|
|
117
|
+
// fieldPreModified["optionActions"] = [fieldOptionActions.fieldOptionLeftActions, fieldOptionActions.fieldOptionRightActions]
|
|
118
|
+
// }
|
|
119
|
+
|
|
97
120
|
|
|
98
121
|
const viewModel = fieldTranslator({
|
|
99
122
|
field,
|
|
@@ -101,7 +124,10 @@ function SectionTranslator(_ref) {
|
|
|
101
124
|
fieldPreModified,
|
|
102
125
|
uiConfig,
|
|
103
126
|
context,
|
|
104
|
-
preferences
|
|
127
|
+
preferences,
|
|
128
|
+
fieldOptionActions,
|
|
129
|
+
instanceName,
|
|
130
|
+
moduleName
|
|
105
131
|
});
|
|
106
132
|
viewModel.isFocused = focusedFieldName === field.apiName;
|
|
107
133
|
return translator ? translator({
|
package/es/platform/zform/adapters/presenter/translators/fields/MultiselectFieldTranslator.js
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
+
import ClientActionsTranslator from "../../../../../client-actions/translators/client-actions-translator";
|
|
2
|
+
|
|
1
3
|
const MultiSelectFieldTranslator = _ref => {
|
|
2
4
|
let {
|
|
3
5
|
field,
|
|
4
6
|
type,
|
|
5
7
|
uiConfig,
|
|
6
|
-
fieldPreModified
|
|
8
|
+
fieldPreModified,
|
|
9
|
+
fieldOptionActions,
|
|
10
|
+
instanceName,
|
|
11
|
+
moduleName
|
|
7
12
|
} = _ref;
|
|
8
13
|
const fieldModified = { ...fieldPreModified,
|
|
9
14
|
id: field.id,
|
|
10
15
|
label: field.i18NLabel,
|
|
11
16
|
options: field.pickListValues ? field.pickListValues.map(picklistValue => {
|
|
17
|
+
const optionActions = {};
|
|
18
|
+
Object.entries(fieldOptionActions).forEach(_ref2 => {
|
|
19
|
+
let [key, value] = _ref2;
|
|
20
|
+
const {
|
|
21
|
+
value: _omit,
|
|
22
|
+
...fieldWithoutValue
|
|
23
|
+
} = field;
|
|
24
|
+
optionActions[key] = ClientActionsTranslator.transform(value, instanceName, moduleName, { ...picklistValue,
|
|
25
|
+
...fieldWithoutValue
|
|
26
|
+
});
|
|
27
|
+
});
|
|
12
28
|
return {
|
|
29
|
+
optionActions: optionActions.fieldOptionRightActions,
|
|
13
30
|
value: picklistValue.value,
|
|
14
31
|
label: picklistValue.value
|
|
15
32
|
};
|
|
@@ -1,15 +1,32 @@
|
|
|
1
|
+
import ClientActionsTranslator from "../../../../../client-actions/translators/client-actions-translator";
|
|
2
|
+
|
|
1
3
|
const PickListFieldTranslator = _ref => {
|
|
2
4
|
let {
|
|
3
5
|
field,
|
|
4
6
|
type,
|
|
5
7
|
uiConfig,
|
|
6
|
-
fieldPreModified
|
|
8
|
+
fieldPreModified,
|
|
9
|
+
fieldOptionActions,
|
|
10
|
+
instanceName,
|
|
11
|
+
moduleName
|
|
7
12
|
} = _ref;
|
|
8
13
|
const fieldModified = { ...fieldPreModified,
|
|
9
14
|
id: field.id,
|
|
10
15
|
label: field.i18NLabel,
|
|
11
16
|
options: field.pickListValues.map(picklistValue => {
|
|
17
|
+
const optionActions = {};
|
|
18
|
+
Object.entries(fieldOptionActions).forEach(_ref2 => {
|
|
19
|
+
let [key, value] = _ref2;
|
|
20
|
+
const {
|
|
21
|
+
value: _omit,
|
|
22
|
+
...fieldWithoutValue
|
|
23
|
+
} = field;
|
|
24
|
+
optionActions[key] = ClientActionsTranslator.transform(value, instanceName, moduleName, { ...picklistValue,
|
|
25
|
+
...fieldWithoutValue
|
|
26
|
+
});
|
|
27
|
+
});
|
|
12
28
|
return {
|
|
29
|
+
optionActions: optionActions.fieldOptionRightActions,
|
|
13
30
|
value: picklistValue.value,
|
|
14
31
|
label: picklistValue.value
|
|
15
32
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -170,8 +170,6 @@ export default class ZForm {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
constructApiErrorEvent(error, actionName, isBreaking) {
|
|
173
|
-
console.log('Error in action: ', actionName, error);
|
|
174
|
-
|
|
175
173
|
if (error.code === ZHttpErrorCode.ApiError) {
|
|
176
174
|
return {
|
|
177
175
|
code: ErrorCodes.API_FAILED,
|
|
@@ -413,8 +411,6 @@ export default class ZForm {
|
|
|
413
411
|
formData: this.getFormData()
|
|
414
412
|
});
|
|
415
413
|
this.applyLayoutRulesResult(sectionResult, fieldResult);
|
|
416
|
-
} else {
|
|
417
|
-
console.log('Layout rules are fetching or my form is fetching');
|
|
418
414
|
}
|
|
419
415
|
}
|
|
420
416
|
|
|
@@ -436,7 +432,7 @@ export default class ZForm {
|
|
|
436
432
|
let visited = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Set();
|
|
437
433
|
|
|
438
434
|
if (visited.has(parentId)) {
|
|
439
|
-
console.warn(`Loop detected at field ${parentId}, skipping...`);
|
|
435
|
+
__DEVELOPMENT__ && console.warn(`Loop detected at field ${parentId}, skipping...`);
|
|
440
436
|
return;
|
|
441
437
|
}
|
|
442
438
|
|
|
@@ -448,7 +444,7 @@ export default class ZForm {
|
|
|
448
444
|
let childField = fields.find(f => f.getId() === childId || f.getApiName() === childId);
|
|
449
445
|
|
|
450
446
|
if (!childField) {
|
|
451
|
-
console.warn(`Child field not found for id/apiName: ${childId}`);
|
|
447
|
+
__DEVELOPMENT__ && console.warn(`Child field not found for id/apiName: ${childId}`);
|
|
452
448
|
return;
|
|
453
449
|
}
|
|
454
450
|
|
|
@@ -57,7 +57,7 @@ export default class Validator {
|
|
|
57
57
|
};
|
|
58
58
|
return script(arg).then(handleResult).catch(handleResult);
|
|
59
59
|
} else {
|
|
60
|
-
console.warn(`Custom validator "${scriptId}" not found in customValidators`, customValidators);
|
|
60
|
+
__DEVELOPMENT__ && console.warn(`Custom validator "${scriptId}" not found in customValidators`, customValidators);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
return null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import AbstractController from "./AbstractController";
|
|
2
|
+
|
|
3
|
+
class ResolutionBasedLimitController extends AbstractController {
|
|
4
|
+
handle(event) {
|
|
5
|
+
const {
|
|
6
|
+
state,
|
|
7
|
+
updateState,
|
|
8
|
+
dispatch,
|
|
9
|
+
action
|
|
10
|
+
} = event;
|
|
11
|
+
const {
|
|
12
|
+
resolutionBasedLimit
|
|
13
|
+
} = action.payload;
|
|
14
|
+
const {
|
|
15
|
+
resolutionBasedLimitUseCase
|
|
16
|
+
} = this.service;
|
|
17
|
+
resolutionBasedLimitUseCase.updateDependency(state, updateState);
|
|
18
|
+
resolutionBasedLimitUseCase.execute({
|
|
19
|
+
dispatch,
|
|
20
|
+
resolutionBasedLimit
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default ResolutionBasedLimitController;
|
|
@@ -20,7 +20,8 @@ class Repository {
|
|
|
20
20
|
const {
|
|
21
21
|
sortBy,
|
|
22
22
|
errorState,
|
|
23
|
-
isReOrderLoading
|
|
23
|
+
isReOrderLoading,
|
|
24
|
+
limit
|
|
24
25
|
} = this.getZListState();
|
|
25
26
|
const list = ListFactory.createList({
|
|
26
27
|
context,
|
|
@@ -31,7 +32,7 @@ class Repository {
|
|
|
31
32
|
...query
|
|
32
33
|
},
|
|
33
34
|
sortBy: new SortBy(sortBy.id, sortBy.name, sortBy.order),
|
|
34
|
-
limit:
|
|
35
|
+
limit: limit,
|
|
35
36
|
isReOrderLoading,
|
|
36
37
|
errorState: new ListErrorState(errorState)
|
|
37
38
|
});
|
|
@@ -13,11 +13,13 @@ import DeleteSuccessUseCase from "../../applications/usecases/DeleteSuccessUseCa
|
|
|
13
13
|
import RecordSuccessCallbackUsecase from "../../applications/usecases/RecordSuccessCallbackUsecase";
|
|
14
14
|
import ReOrderUseCase from "../../applications/usecases/ReOrderUseCase";
|
|
15
15
|
import ReOrderFailedUseCase from "../../applications/usecases/ReOrderFailedUseCase";
|
|
16
|
+
import ResolutionBasedLimitUseCase from "../../applications/usecases/ResolutionBasedLimitUseCase";
|
|
16
17
|
|
|
17
18
|
class Service {
|
|
18
19
|
constructor(dependencies) {
|
|
19
20
|
this.dependencies = dependencies;
|
|
20
21
|
this.initializeUseCase = new InitializeUseCase(this.dependencies);
|
|
22
|
+
this.resolutionBasedLimitUseCase = new ResolutionBasedLimitUseCase(this.dependencies);
|
|
21
23
|
this.propertiesChangeUseCase = new PropertiesChangeUseCase(this.dependencies);
|
|
22
24
|
this.fetchMoreUseCase = new FetchMoreUseCase(this.dependencies);
|
|
23
25
|
this.fieldChangeUseCase = new FieldChangeUseCase(this.dependencies);
|