@zohodesk/library-platform 1.1.13 → 1.2.0-exp.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/bc/column-chooser/EventHandlers.js +1 -2
- package/es/bc/sdk/ResourceNamesEnum.js +1 -0
- package/es/bc/zform/Properties.js +20 -0
- package/es/bc/zform/Symbol.js +3 -0
- package/es/bc/zrecord/Constants.js +2 -0
- package/es/cc/action-band/Properties.js +37 -0
- package/es/cc/action-band/constants/ExternalConstants.js +3 -1
- package/es/cc/component/Dispatch.js +1 -0
- package/es/cc/component/LifeCycleEventsEnum.js +1 -0
- package/es/cc/component/index.js +3 -0
- package/es/cc/fields/currency/Properties.js +9 -0
- package/es/cc/fields/decimal/Properties.js +9 -0
- package/es/cc/fields/email/Properties.js +9 -0
- package/es/cc/fields/lookup/Properties.js +10 -26
- package/es/cc/fields/multi-line/Properties.js +1 -0
- package/es/cc/fields/number/Properties.js +10 -1
- package/es/cc/fields/phone/Properties.js +9 -0
- package/es/cc/fields/text/Properties.js +2 -2
- package/es/cc/fields/url/Properties.js +9 -0
- package/es/cc/one-unification/Constants.js +24 -0
- package/es/cc/one-unification/unified-navigation/ActionTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/CommonTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/ConfigTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/HandlerTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/Types.js +1 -0
- package/es/cc/one-unification/unified-navigation/UnifiedNavigation.d.js +0 -0
- package/es/cc/one-unification/unified-navigation/index.js +1 -0
- package/es/cc/smart-navigation/Constants.js +8 -0
- package/es/cc/smart-navigation/Events.js +107 -0
- package/es/cc/smart-navigation/Properties.js +87 -0
- package/es/cc/smart-navigation/index.js +4 -0
- package/es/cc/table-column-chooser/Constants.js +2 -1
- package/es/cc/table-connected/SdkContract.js +22 -0
- package/es/cc/text/Properties.js +100 -0
- package/es/cc/textbox/Properties.js +1 -1
- package/es/index.js +8 -3
- package/es/library/behaviours/clip-wrap/applications/usecases/ClipWrapUpdateUseCase.js +19 -0
- package/es/library/behaviours/library-loader/adapters/controllers/LibraryLoaderController.js +17 -0
- package/es/library/behaviours/library-loader/adapters/gateways/LibraryLoaderAdapter.js +29 -0
- package/es/library/behaviours/library-loader/applications/usecases/LoadLibraryUseCase.js +42 -0
- package/es/library/behaviours/library-loader/domain/entities/interfaces/ILibraryLoader.js +1 -0
- package/es/library/behaviours/library-loader/frameworks/LibraryLoaderBehaviour.js +26 -0
- package/es/library/behaviours/search/adapters/controllers/UpdatePropertiesController.js +9 -4
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +4 -3
- package/es/library/custom-component/applications/usecases/DispatchUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/InitializeUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/MountUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/SetRefUseCase.js +7 -0
- package/es/library/custom-component/applications/usecases/UnmountUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +1 -0
- package/es/library/custom-component/domain/entities/Component.js +1 -0
- package/es/library/custom-component/domain/entities/Logger.js +4 -9
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +2 -0
- package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +2 -0
- package/es/library/dot/components/form-fields/email/frameworks/ui/Email.js +1 -1
- package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +2 -0
- package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +2 -0
- package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +2 -0
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextArea.js +1 -1
- 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 +2 -0
- package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +2 -0
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +1 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/TextFieldView.js +20 -0
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/Text.js +2 -2
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +22 -1
- package/es/platform/app-context-behaviour/adapters/controllers/AbstractController.js +9 -0
- package/es/platform/app-context-behaviour/adapters/controllers/UpdatePropertiesController.js +32 -0
- package/es/platform/app-context-behaviour/adapters/gateway/Repository.js +22 -0
- package/es/platform/app-context-behaviour/adapters/gateway/Service.js +10 -0
- package/es/platform/app-context-behaviour/adapters/presenter/Presenter.js +16 -0
- package/es/platform/app-context-behaviour/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/gateways/IService.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/input/UpdatePropertiesInputModel.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/output/BehaviourOutputModel.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/app-context-behaviour/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/app-context-behaviour/applications/usecases/UpdatePropertiesUsecase.js +25 -0
- package/es/platform/app-context-behaviour/domain/entities/AppContext.js +44 -0
- package/es/platform/app-context-behaviour/domain/entities/interfaces/IAppContext.js +1 -0
- package/es/platform/app-context-behaviour/frameworks/AppContextBehaviourFactory.js +2 -2
- package/es/platform/app-context-behaviour/frameworks/EventHandlerFactory.js +22 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/FilterUtils.js +11 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/resources/ClientActionsFetchSDK.js +76 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionsAPIGatewayParams.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionsFetchSDKParams.js +10 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/IClientActionsFetchSDK.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/resources/ClientScriptsFetchSDK.js +43 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/ClientScriptsAPIGatewayParams.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/ClientScriptsSDKFetchParams.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/IClientScriptsFetchSDK.js +0 -0
- package/es/platform/column-chooser/adapters/controllers/ColumnChooserOpenController.js +14 -6
- package/es/platform/column-chooser/adapters/controllers/ColumnChooserUpdateController.js +22 -0
- package/es/platform/column-chooser/adapters/gateways/Repository.js +12 -1
- package/es/platform/column-chooser/adapters/gateways/Service.js +2 -0
- package/es/platform/column-chooser/applications/interfaces/input/ColumnChooserUpdateInput.js +1 -0
- package/es/platform/column-chooser/applications/usecases/ColumnChooserSaveUseCase.js +8 -1
- package/es/platform/column-chooser/applications/usecases/ColumnChooserUpdateUseCase.js +35 -0
- package/es/platform/column-chooser/domain/entities/ColumnChooserImp.js +6 -0
- package/es/platform/column-chooser/frameworks/EventHandlersFactory.js +6 -4
- package/es/platform/components/index.js +1 -0
- package/es/platform/components/smart-action-band/adapters/presenters/ActionBandTranslator.js +70 -8
- package/es/platform/components/smart-action-band/adapters/presenters/utils/DefaultClientActions.js +32 -0
- package/es/platform/components/smart-action-band/frameworks/EventHandlersFactory.js +42 -1
- package/es/platform/components/smart-action-band/frameworks/SmartActionBandFactory.js +4 -1
- package/es/platform/components/smart-navigation/adapters/controllers/LoadScriptController.js +0 -0
- package/es/platform/components/smart-navigation/adapters/controllers/UiModelInitializeController.js +0 -0
- package/es/platform/components/smart-navigation/adapters/presenters/OneUnifiedNavigationTranslator.js +248 -0
- package/es/platform/components/smart-navigation/adapters/presenters/Present.js +77 -0
- package/es/platform/components/smart-navigation/adapters/presenters/SampleModel.js +356 -0
- package/es/platform/components/smart-navigation/adapters/resources/SmartNavigationResource.js +96 -0
- package/es/platform/components/smart-navigation/applications/usecases/NavigateModuleUseCase.js +0 -0
- package/es/platform/components/smart-navigation/frameworks/CustomElementRenderer.js +22 -0
- package/es/platform/components/smart-navigation/frameworks/SmartNavigation.js +12 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/OneUnificationEventHandlers.js +156 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigation.js +83 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigation.module.css +3 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigationEventHandlers.js +173 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigation.js +48 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigationActions.js +144 -0
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +52 -0
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +1 -7
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +4 -2
- package/es/platform/data-source/http-template/fetchLookupFields.js +0 -6
- package/es/platform/data-source/http-template/getPageClientActions.js +23 -0
- package/es/platform/data-source/http-template/getSingleRecord.js +51 -0
- package/es/platform/data-source/index.js +2 -0
- package/es/platform/data-source/utils/validation-rules/FieldConditions.js +1 -1
- package/es/platform/sdk-behaviour/adapters/controllers/InitializeController.js +7 -2
- package/es/platform/sdk-behaviour/applications/usecases/CreateResourceInstanceUseCase.js +10 -1
- package/es/platform/zform/adapters/controllers/GetInitialRecordSuccessController.js +31 -0
- package/es/platform/zform/adapters/gateway/FormRepository.js +10 -2
- package/es/platform/zform/adapters/gateway/Service.js +2 -0
- package/es/platform/zform/adapters/presenter/FormTranslator.js +27 -15
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +1 -1
- package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/DecimalFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/EmailFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +11 -7
- package/es/platform/zform/adapters/presenter/translators/fields/NumberFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/PhoneFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextAreaFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/URLFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/utils/sanitizeHtmlString.js +2 -2
- package/es/platform/zform/applications/interfaces/input/GetInitialRecordSuccessUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/usecases/GetInitialRecordSuccessUseCase.js +132 -0
- package/es/platform/zform/applications/usecases/InitializeUseCase.js +54 -30
- package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +5 -0
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +12 -11
- package/es/platform/zform/applications/usecases/SubmitValidationCompletedUseCase.js +21 -8
- package/es/platform/zform/domain/ZField.js +7 -5
- package/es/platform/zform/domain/ZForm.js +97 -20
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +23 -5
- package/es/platform/zform/frameworks/ui/ZFormBehaviourFactory.js +2 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +5 -4
- package/es/platform/zrecord/adapters/controllers/UpdateRecordController.js +30 -0
- package/es/platform/zrecord/adapters/gateways/Service.js +2 -0
- package/es/platform/zrecord/applications/interfaces/input/UpdateRecordInputModel.js +0 -0
- package/es/platform/zrecord/applications/usecases/UpdateRecordUseCase.js +30 -0
- package/es/platform/zrecord/frameworks/ActionsHandlersFactory.js +4 -1
- package/package.json +9 -11
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserOpenedController.js +0 -28
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserUpdateController.js +0 -31
package/es/cc/text/Properties.js
CHANGED
|
@@ -7,6 +7,106 @@ export default {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
|
+
size: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: "14",
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: "string",
|
|
16
|
+
enum: ["7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "24", "25", "26", "28", "29", "30", "32", "34", "35", "36", "40", "50", "inherit"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
textAlign: {
|
|
21
|
+
required: false,
|
|
22
|
+
typeMetadata: {
|
|
23
|
+
schema: {
|
|
24
|
+
type: "string",
|
|
25
|
+
enum: ["left", "right", "center", "justify"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
wordBreak: {
|
|
30
|
+
required: false,
|
|
31
|
+
typeMetadata: {
|
|
32
|
+
schema: {
|
|
33
|
+
type: "string",
|
|
34
|
+
enum: ["breakAll", "keepAll", "breakWord"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
lineClamp: {
|
|
39
|
+
required: false,
|
|
40
|
+
typeMetadata: {
|
|
41
|
+
schema: {
|
|
42
|
+
type: "string",
|
|
43
|
+
enum: ["1", "2", "3", "4", "5"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
lineHeight: {
|
|
48
|
+
required: false,
|
|
49
|
+
typeMetadata: {
|
|
50
|
+
schema: {
|
|
51
|
+
type: "string",
|
|
52
|
+
enum: ["0", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "2", "normal", "initial", "inherit"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
letterSpacing: {
|
|
57
|
+
required: false,
|
|
58
|
+
typeMetadata: {
|
|
59
|
+
schema: {
|
|
60
|
+
type: "string",
|
|
61
|
+
enum: ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "2", "inherit"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
display: {
|
|
66
|
+
required: false,
|
|
67
|
+
typeMetadata: {
|
|
68
|
+
schema: {
|
|
69
|
+
type: "string",
|
|
70
|
+
enum: ["block", "inlineBlock", "inline", "initial"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
decoration: {
|
|
75
|
+
required: false,
|
|
76
|
+
typeMetadata: {
|
|
77
|
+
schema: {
|
|
78
|
+
type: "string",
|
|
79
|
+
enum: ["default", "underline", "strike", "overline"]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
whiteSpace: {
|
|
84
|
+
required: false,
|
|
85
|
+
typeMetadata: {
|
|
86
|
+
schema: {
|
|
87
|
+
type: "string",
|
|
88
|
+
enum: ["normal", "noWrap", "pre", "preLine", "preWrap"]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
wordWrap: {
|
|
93
|
+
required: false,
|
|
94
|
+
typeMetadata: {
|
|
95
|
+
schema: {
|
|
96
|
+
type: "string",
|
|
97
|
+
enum: ["normal", "break"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
transform: {
|
|
102
|
+
required: false,
|
|
103
|
+
typeMetadata: {
|
|
104
|
+
schema: {
|
|
105
|
+
type: "string",
|
|
106
|
+
enum: ["default", "upper", "lower", "capital"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
10
110
|
weight: {
|
|
11
111
|
required: false,
|
|
12
112
|
typeMetadata: {
|
package/es/index.js
CHANGED
|
@@ -5,7 +5,9 @@ import ExternalConstants from "./cc/table-connected/constants/ExternalConstants"
|
|
|
5
5
|
import ActionEventMediator from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
6
6
|
import RowActionsRenderer from "./platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
7
7
|
import AdaptiveRowActionsRenderer from "./platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer";
|
|
8
|
-
import ClientActionReordererRegistry from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionReordererRegistry";
|
|
8
|
+
import ClientActionReordererRegistry from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionReordererRegistry";
|
|
9
|
+
import ClientActionsFetchSDK from "./platform/client-actions/behaviour/zclient-actions/adapters/resources/ClientActionsFetchSDK";
|
|
10
|
+
import ClientScriptsFetchSDK from "./platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/resources/ClientScriptsFetchSDK"; // Rebuild SmartTableConstants without Events
|
|
9
11
|
|
|
10
12
|
const SmartTableConstants = {
|
|
11
13
|
ExternalConstants
|
|
@@ -17,7 +19,7 @@ export const CC = { ...CCNamespace,
|
|
|
17
19
|
import * as _BC from "./bc";
|
|
18
20
|
export { _BC as BC };
|
|
19
21
|
export * from "./library/analytics";
|
|
20
|
-
export { TableConnectedFactory, FormConnectedFactory, SmartActionBandFactory } from "./platform/components";
|
|
22
|
+
export { TableConnectedFactory, FormConnectedFactory, SmartNavigation, createSmartNavigation, SmartActionBandFactory } from "./platform/components";
|
|
21
23
|
export { ComponentRegistry, createCustomComponent } from "./library";
|
|
22
24
|
export { default as TableFieldComponents } from "./library/dot/legacy-to-new-arch/table-field-components";
|
|
23
25
|
import * as _Components from "./library/dot/legacy-to-new-arch";
|
|
@@ -27,6 +29,7 @@ export { sdkRegistry } from "./platform/sdk/frameworks/SdkRegistry";
|
|
|
27
29
|
export { AppResource } from "./platform/components/app/adapters/resources/AppResource";
|
|
28
30
|
export { fetchClientActions } from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter";
|
|
29
31
|
export { ZFormApiActionName } from "./bc/zform/Constants";
|
|
32
|
+
export { RecordApiActionName } from "./bc/zrecord/Constants";
|
|
30
33
|
export { transFormValidationRules } from "./platform/data-source/utils/validation-rules/TransFormValidationRules";
|
|
31
34
|
export { AdaptiveRowActionsRenderer };
|
|
32
35
|
export { ActionEventMediator };
|
|
@@ -39,4 +42,6 @@ export const Behaviours = {
|
|
|
39
42
|
FieldSectionEventMappingBehaviourFactory
|
|
40
43
|
};
|
|
41
44
|
export * from "./library/analytics";
|
|
42
|
-
export { ClientActionReordererRegistry };
|
|
45
|
+
export { ClientActionReordererRegistry };
|
|
46
|
+
export { ClientActionsFetchSDK };
|
|
47
|
+
export { ClientScriptsFetchSDK };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
|
|
3
|
+
class ClipWrapUpdateUseCase extends AbstractUseCase {
|
|
4
|
+
execute(input) {
|
|
5
|
+
const {
|
|
6
|
+
repository,
|
|
7
|
+
presenter
|
|
8
|
+
} = this.dependencies;
|
|
9
|
+
const {
|
|
10
|
+
mode
|
|
11
|
+
} = input;
|
|
12
|
+
const clipWrap = repository.getClipWrapEntity();
|
|
13
|
+
clipWrap.setValue(mode);
|
|
14
|
+
presenter.updateClipWrap(clipWrap.toObject());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default ClipWrapUpdateUseCase;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class LibraryLoaderController {
|
|
2
|
+
constructor(loadLibraryUseCase, scriptId) {
|
|
3
|
+
this.loadLibraryUseCase = loadLibraryUseCase;
|
|
4
|
+
this.scriptId = scriptId;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
handleMount(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
dispatch
|
|
10
|
+
} = _ref;
|
|
11
|
+
this.loadLibraryUseCase.execute({
|
|
12
|
+
dispatch,
|
|
13
|
+
scriptId: this.scriptId
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class LibraryLoaderAdapter {
|
|
2
|
+
constructor(url) {
|
|
3
|
+
this.url = url;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
isScriptLoaded() {
|
|
7
|
+
return Array.from(document.querySelectorAll('script[data-library-loader-script="true"]')).some(script => script.src === this.url);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
loadScript() {
|
|
11
|
+
if (this.isScriptLoaded()) {
|
|
12
|
+
return Promise.resolve();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
const script = document.createElement('script');
|
|
17
|
+
script.src = this.url;
|
|
18
|
+
script.async = true;
|
|
19
|
+
script.setAttribute('data-library-loader-script', 'true');
|
|
20
|
+
|
|
21
|
+
script.onload = () => resolve();
|
|
22
|
+
|
|
23
|
+
script.onerror = () => reject(new Error(`Failed to load script: ${this.url}`));
|
|
24
|
+
|
|
25
|
+
document.head.appendChild(script);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export class LoadLibraryUseCase {
|
|
2
|
+
constructor(loader) {
|
|
3
|
+
this.loader = loader;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async execute(_ref) {
|
|
7
|
+
let {
|
|
8
|
+
dispatch,
|
|
9
|
+
scriptId
|
|
10
|
+
} = _ref;
|
|
11
|
+
|
|
12
|
+
// If the loader has isScriptLoaded, use it
|
|
13
|
+
if (typeof this.loader.isScriptLoaded === 'function' && this.loader.isScriptLoaded()) {
|
|
14
|
+
dispatch({
|
|
15
|
+
type: 'LIBRARY_LOADER#ALREADY_LOADED',
|
|
16
|
+
payload: {
|
|
17
|
+
scriptId: scriptId
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
await this.loader.loadScript();
|
|
25
|
+
dispatch({
|
|
26
|
+
type: 'LIBRARY_LOADER#SUCCESS',
|
|
27
|
+
payload: {
|
|
28
|
+
scriptId: scriptId
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
} catch (error) {
|
|
32
|
+
dispatch({
|
|
33
|
+
type: 'LIBRARY_LOADER#FAILURE',
|
|
34
|
+
payload: {
|
|
35
|
+
scriptId: scriptId,
|
|
36
|
+
error: error.message
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LibraryLoaderAdapter } from "../adapters/gateways/LibraryLoaderAdapter";
|
|
2
|
+
import { LoadLibraryUseCase } from "../applications/usecases/LoadLibraryUseCase";
|
|
3
|
+
import { LibraryLoaderController } from "../adapters/controllers/LibraryLoaderController";
|
|
4
|
+
export function LibraryLoaderBehaviour(scriptId, url) {
|
|
5
|
+
const loader = new LibraryLoaderAdapter(url);
|
|
6
|
+
const loadLibraryUseCase = new LoadLibraryUseCase(loader);
|
|
7
|
+
const controller = new LibraryLoaderController(loadLibraryUseCase, scriptId);
|
|
8
|
+
return {
|
|
9
|
+
name: 'LibraryLoaderBehaviour',
|
|
10
|
+
setInitialState: () => ({}),
|
|
11
|
+
eventHandlers: {
|
|
12
|
+
MOUNT: controller.handleMount.bind(controller)
|
|
13
|
+
},
|
|
14
|
+
properties: {
|
|
15
|
+
url: {
|
|
16
|
+
required: true,
|
|
17
|
+
defaultValue: url,
|
|
18
|
+
typeMetadata: {
|
|
19
|
+
schema: {
|
|
20
|
+
type: 'string'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -9,12 +9,17 @@ class UpdatePropertiesController extends AbstractController {
|
|
|
9
9
|
state,
|
|
10
10
|
updateState,
|
|
11
11
|
action
|
|
12
|
-
} = event;
|
|
13
|
-
|
|
12
|
+
} = event;
|
|
14
13
|
const {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
currentProperties,
|
|
15
|
+
previousProperties
|
|
17
16
|
} = action.payload;
|
|
17
|
+
const {
|
|
18
|
+
searchString: previousSearchString
|
|
19
|
+
} = previousProperties;
|
|
20
|
+
const {
|
|
21
|
+
searchString
|
|
22
|
+
} = currentProperties;
|
|
18
23
|
updatePropertiesUsecase.updateDependencies(state, updateState);
|
|
19
24
|
updatePropertiesUsecase.execute({
|
|
20
25
|
searchString,
|
|
@@ -43,11 +43,11 @@ class EventManager {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
unSubscribe(events) {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
if (this._element) {
|
|
47
|
+
events.forEach((eventHandler, key) => {
|
|
48
48
|
this._element.removeEventListener(key, eventHandler);
|
|
49
49
|
});
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
dispatch(event) {
|
|
@@ -92,6 +92,7 @@ class EventManager {
|
|
|
92
92
|
code: ErrorCode.InvalidSchema,
|
|
93
93
|
error: e
|
|
94
94
|
};
|
|
95
|
+
__DEVELOPMENT__ && console.error('Schema Validation Error: ', e);
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
return error;
|
|
@@ -15,6 +15,7 @@ class InitializeUseCase extends AbstractUseCase {
|
|
|
15
15
|
let state = component.getState();
|
|
16
16
|
presenter.render(state);
|
|
17
17
|
} catch (e) {
|
|
18
|
+
__DEVELOPMENT__ && console.error('ACA InitializeUseCase Error: ', e);
|
|
18
19
|
const error = component.getClassifiedErrorStructure(e);
|
|
19
20
|
component.setError(error);
|
|
20
21
|
presenter.setError(error);
|
|
@@ -11,6 +11,12 @@ class SetRefUseCase extends AbstractUseCase {
|
|
|
11
11
|
eventManager
|
|
12
12
|
} = this.dependencies;
|
|
13
13
|
const component = repository.getComponent();
|
|
14
|
+
|
|
15
|
+
if (!component) {
|
|
16
|
+
// NOTE: need to check why component is null
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
const eventHandlers = component.getEventHandlersWrapper();
|
|
15
21
|
|
|
16
22
|
try {
|
|
@@ -20,6 +26,7 @@ class SetRefUseCase extends AbstractUseCase {
|
|
|
20
26
|
eventManager.subscribe(eventHandlers);
|
|
21
27
|
}
|
|
22
28
|
} catch (e) {
|
|
29
|
+
__DEVELOPMENT__ && console.error('ACA SetRefUseCase Error: ', e);
|
|
23
30
|
const error = component.getClassifiedErrorStructure(e);
|
|
24
31
|
component.setError(error);
|
|
25
32
|
presenter.setError(error);
|
|
@@ -16,6 +16,7 @@ class UnmountUsecase extends AbstractUseCase {
|
|
|
16
16
|
eventManager.unSubscribe(eventHanlders);
|
|
17
17
|
repository.clear();
|
|
18
18
|
} catch (e) {
|
|
19
|
+
__DEVELOPMENT__ && console.error('ACA UnmountUsecase Error: ', e);
|
|
19
20
|
component.setError(null);
|
|
20
21
|
presenter.setError(null);
|
|
21
22
|
}
|
|
@@ -210,6 +210,7 @@ export default class Component {
|
|
|
210
210
|
...helpers
|
|
211
211
|
});
|
|
212
212
|
} catch (e) {
|
|
213
|
+
__DEVELOPMENT__ && console.error(`ACA ${key} Event Handler Error: `, e);
|
|
213
214
|
const error = {
|
|
214
215
|
code: ErrorCodes.EVENT_HANDLER_FAILED,
|
|
215
216
|
message: 'Error occurred in event handler for event ' + key,
|
|
@@ -12,7 +12,7 @@ export default class Logger {
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
logPropertiesValidation(validationResults) {
|
|
15
|
-
if (__DEVELOPMENT__) {
|
|
15
|
+
if (__DEVELOPMENT__ && validationResults) {
|
|
16
16
|
console.group(`%cProperties Validation: %c${this.componentName}`, ERROR_PRIMARY, ERROR_SECONDARY, validationResults);
|
|
17
17
|
validationResults.forEach(_ref => {
|
|
18
18
|
let {
|
|
@@ -44,14 +44,9 @@ export default class Logger {
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
console.group(`%cError Occurred: %c${this.componentName}`,
|
|
48
|
-
console.error(`%cError Code: %c${error.code}`,
|
|
49
|
-
console.error(`%cError Message: %c${error.message}`,
|
|
50
|
-
|
|
51
|
-
if (error.errorDetails?.originalError) {
|
|
52
|
-
console.error(error.errorDetails.originalError);
|
|
53
|
-
}
|
|
54
|
-
|
|
47
|
+
console.group(`%cError Occurred: %c${this.componentName}`, ERROR_SECONDARY, ERROR_PRIMARY, error);
|
|
48
|
+
console.error(`%cError Code: %c${error.code}`, ERROR_SECONDARY, ERROR_PRIMARY);
|
|
49
|
+
console.error(`%cError Message: %c${error.message}`, ERROR_SECONDARY, ERROR_PRIMARY);
|
|
55
50
|
console.groupEnd();
|
|
56
51
|
}
|
|
57
52
|
}
|
|
@@ -18,6 +18,7 @@ function CurrencyView(_ref, ref) {
|
|
|
18
18
|
label,
|
|
19
19
|
value,
|
|
20
20
|
placeholder,
|
|
21
|
+
maxLength,
|
|
21
22
|
errorMessage,
|
|
22
23
|
disabled,
|
|
23
24
|
readonly,
|
|
@@ -54,6 +55,7 @@ function CurrencyView(_ref, ref) {
|
|
|
54
55
|
id: id,
|
|
55
56
|
value: formattedValue,
|
|
56
57
|
placeholder: placeholder,
|
|
58
|
+
maxLength: maxLength,
|
|
57
59
|
disabled: disabled,
|
|
58
60
|
readonly: readonly,
|
|
59
61
|
required: required,
|
|
@@ -13,6 +13,7 @@ function DecimalView(_ref, ref) {
|
|
|
13
13
|
label,
|
|
14
14
|
value,
|
|
15
15
|
placeholder,
|
|
16
|
+
maxLength,
|
|
16
17
|
errorMessage,
|
|
17
18
|
disabled,
|
|
18
19
|
readonly,
|
|
@@ -42,6 +43,7 @@ function DecimalView(_ref, ref) {
|
|
|
42
43
|
id: id,
|
|
43
44
|
placeholder: placeholder,
|
|
44
45
|
value: value,
|
|
46
|
+
maxLength: maxLength,
|
|
45
47
|
required: required,
|
|
46
48
|
disabled: disabled,
|
|
47
49
|
readonly: readonly,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
-
import EmailProperties from "../../../../../../../cc/fields/
|
|
2
|
+
import EmailProperties from "../../../../../../../cc/fields/email/Properties";
|
|
3
3
|
import EmailView from "./EmailView";
|
|
4
4
|
import EventHandlersFactory from "./EventHandlerFactory";
|
|
5
5
|
import FocusFieldBehaviourFactory from "../../../../../../behaviours/field-focus/frameworks/ui/FocusFieldBehaviourFactory";
|
|
@@ -13,6 +13,7 @@ function EmailView(_ref, ref) {
|
|
|
13
13
|
label,
|
|
14
14
|
value,
|
|
15
15
|
placeholder,
|
|
16
|
+
maxLength,
|
|
16
17
|
disabled,
|
|
17
18
|
readonly,
|
|
18
19
|
errorMessage,
|
|
@@ -42,6 +43,7 @@ function EmailView(_ref, ref) {
|
|
|
42
43
|
id: id,
|
|
43
44
|
placeholder: placeholder,
|
|
44
45
|
value: value,
|
|
46
|
+
maxLength: maxLength,
|
|
45
47
|
disabled: disabled,
|
|
46
48
|
readonly: readonly,
|
|
47
49
|
required: required,
|
|
@@ -13,6 +13,7 @@ function NumberView(_ref, ref) {
|
|
|
13
13
|
label,
|
|
14
14
|
value,
|
|
15
15
|
placeholder,
|
|
16
|
+
maxLength,
|
|
16
17
|
errorMessage,
|
|
17
18
|
disabled,
|
|
18
19
|
readonly,
|
|
@@ -42,6 +43,7 @@ function NumberView(_ref, ref) {
|
|
|
42
43
|
id: id,
|
|
43
44
|
placeholder: placeholder,
|
|
44
45
|
value: value,
|
|
46
|
+
maxLength: maxLength,
|
|
45
47
|
disabled: disabled,
|
|
46
48
|
readonly: readonly,
|
|
47
49
|
required: required,
|
|
@@ -13,6 +13,7 @@ function PhoneView(_ref, ref) {
|
|
|
13
13
|
label,
|
|
14
14
|
value,
|
|
15
15
|
placeholder,
|
|
16
|
+
maxLength,
|
|
16
17
|
errorMessage,
|
|
17
18
|
disabled,
|
|
18
19
|
readonly,
|
|
@@ -42,6 +43,7 @@ function PhoneView(_ref, ref) {
|
|
|
42
43
|
id: id,
|
|
43
44
|
placeholder: placeholder,
|
|
44
45
|
value: value,
|
|
46
|
+
maxLength: maxLength,
|
|
45
47
|
disabled: disabled,
|
|
46
48
|
readonly: readonly,
|
|
47
49
|
required: required,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
-
import TextAreaProperties from "../../../../../../../cc/fields/
|
|
2
|
+
import TextAreaProperties from "../../../../../../../cc/fields/multi-line/Properties";
|
|
3
3
|
import TextAreaView from "./TextAreaView";
|
|
4
4
|
import EventHandlerFactory from "./EventHandlerFactory";
|
|
5
5
|
import FocusFieldBehaviourFactory from "../../../../../../behaviours/field-focus/frameworks/ui/FocusFieldBehaviourFactory";
|
|
@@ -20,7 +20,8 @@ function TextAreaView(_ref, ref) {
|
|
|
20
20
|
uiConfig,
|
|
21
21
|
labelActions,
|
|
22
22
|
actions,
|
|
23
|
-
clientScripts
|
|
23
|
+
clientScripts,
|
|
24
|
+
maxLength
|
|
24
25
|
} = state.properties;
|
|
25
26
|
const {
|
|
26
27
|
size,
|
|
@@ -46,7 +47,8 @@ function TextAreaView(_ref, ref) {
|
|
|
46
47
|
disabled: disabled,
|
|
47
48
|
readonly: readonly,
|
|
48
49
|
actions: actions,
|
|
49
|
-
clientScripts: clientScripts
|
|
50
|
+
clientScripts: clientScripts,
|
|
51
|
+
maxLength: maxLength
|
|
50
52
|
})));
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -13,6 +13,7 @@ function TextBoxView(_ref, ref) {
|
|
|
13
13
|
label,
|
|
14
14
|
value,
|
|
15
15
|
placeholder,
|
|
16
|
+
maxLength,
|
|
16
17
|
errorMessage,
|
|
17
18
|
disabled,
|
|
18
19
|
readonly,
|
|
@@ -42,6 +43,7 @@ function TextBoxView(_ref, ref) {
|
|
|
42
43
|
id: id,
|
|
43
44
|
placeholder: placeholder,
|
|
44
45
|
value: value,
|
|
46
|
+
maxLength: maxLength,
|
|
45
47
|
required: required,
|
|
46
48
|
disabled: disabled,
|
|
47
49
|
readonly: readonly,
|
|
@@ -13,6 +13,7 @@ function UrlView(_ref, ref) {
|
|
|
13
13
|
label,
|
|
14
14
|
value,
|
|
15
15
|
placeholder,
|
|
16
|
+
maxLength,
|
|
16
17
|
uiConfig,
|
|
17
18
|
errorMessage,
|
|
18
19
|
disabled,
|
|
@@ -42,6 +43,7 @@ function UrlView(_ref, ref) {
|
|
|
42
43
|
id: id,
|
|
43
44
|
placeholder: placeholder,
|
|
44
45
|
value: value,
|
|
46
|
+
maxLength: maxLength,
|
|
45
47
|
disabled: disabled,
|
|
46
48
|
readonly: readonly,
|
|
47
49
|
required: required,
|
package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js
CHANGED
|
@@ -41,7 +41,7 @@ function HeaderData(_ref) {
|
|
|
41
41
|
},
|
|
42
42
|
$customProps_container: hasActions ? {
|
|
43
43
|
$ui_displayMode: 'flex',
|
|
44
|
-
$ui_alignItems: 'center',
|
|
44
|
+
$ui_alignItems: isMultiline ? 'baseline' : 'center',
|
|
45
45
|
$ui_justifyContent: AlignmentOfFlex[alignment]
|
|
46
46
|
} : null,
|
|
47
47
|
customStyle: hasActions ? {
|
|
@@ -6,6 +6,16 @@ export default function TextFieldView(_ref, ref) {
|
|
|
6
6
|
} = _ref;
|
|
7
7
|
const {
|
|
8
8
|
text,
|
|
9
|
+
size,
|
|
10
|
+
display,
|
|
11
|
+
decoration,
|
|
12
|
+
textAlign,
|
|
13
|
+
lineClamp,
|
|
14
|
+
lineHeight,
|
|
15
|
+
transform,
|
|
16
|
+
whiteSpace,
|
|
17
|
+
wordWrap,
|
|
18
|
+
wordBreak,
|
|
9
19
|
weight,
|
|
10
20
|
isDotted,
|
|
11
21
|
tooltip
|
|
@@ -13,6 +23,16 @@ export default function TextFieldView(_ref, ref) {
|
|
|
13
23
|
return /*#__PURE__*/React.createElement(Text, {
|
|
14
24
|
getRef: ref,
|
|
15
25
|
text: text,
|
|
26
|
+
size: size,
|
|
27
|
+
display: display,
|
|
28
|
+
decoration: decoration,
|
|
29
|
+
textAlign: textAlign,
|
|
30
|
+
lineClamp: lineClamp,
|
|
31
|
+
lineHeight: lineHeight,
|
|
32
|
+
transform: transform,
|
|
33
|
+
whiteSpace: whiteSpace,
|
|
34
|
+
wordWrap: wordWrap,
|
|
35
|
+
wordBreak: isDotted ? wordBreak : 'breakWord',
|
|
16
36
|
tooltip: tooltip,
|
|
17
37
|
weight: weight,
|
|
18
38
|
isDotted: isDotted
|