@zohodesk/library-platform 1.1.8-exp.1 → 1.1.8-exp.2
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/zform/Symbol.js +1 -0
- package/es/cc/fields/field/FormDefaultUIType.js +1 -1
- package/es/cc/fields/text/Properties.js +9 -0
- package/es/cc/textarea/Properties.js +11 -0
- package/es/index.js +2 -1
- package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +2 -1
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +0 -3
- package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +1 -3
- package/es/library/dot/components/form-fields/index.js +2 -1
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/EventHandlerFactory.js +70 -0
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/Lookup.js +13 -0
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/LookupView.js +51 -0
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +8 -3
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +5 -7
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +3 -5
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +13 -3
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +37 -0
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +22 -4
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +40 -0
- package/es/platform/client-actions/behaviour/zclient-actions/frameworks/sdk/ClientActionsSDKFactory.js +2 -2
- package/es/platform/client-actions/components/interfaces/ActionViewModel.js +1 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +5 -1
- package/es/platform/components/app/adapters/resources/AppResource.js +13 -0
- package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +2 -2
- package/es/platform/components/form-connected/frameworks/FormSdkFactory.js +2 -2
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +2 -2
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +2 -2
- package/es/platform/data-source/http-template/fetchLookupFields.js +24 -0
- package/es/platform/data-source/index.js +3 -1
- package/es/platform/data-source/utils/validation-rules/TransFormValidationRules.js +6 -1
- package/es/platform/sdk/adapters/gateways/Service.js +4 -0
- package/es/platform/sdk/application/usecases/GetResourcesUseCase.js +12 -0
- package/es/platform/sdk/domain/entities/ResourceManager.js +21 -11
- package/es/platform/sdk/frameworks/Sdk.js +13 -2
- package/es/platform/sdk/frameworks/SdkRegistry.js +9 -0
- package/es/platform/zform/adapters/controllers/LookupFieldController.js +23 -0
- package/es/platform/zform/adapters/gateway/Service.js +4 -0
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +1 -1
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +2 -1
- package/es/platform/zform/adapters/presenter/utils/DefaultClientActions.js +66 -65
- package/es/platform/zform/applications/interfaces/input/LookUpFieldSuccessUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +40 -0
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +35 -1
- package/es/platform/zform/domain/ZField.js +14 -8
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +6 -3
- package/package.json +1 -2
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelAction.js +0 -9
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelActionView.js +0 -38
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/css/LabelAction.module.css +0 -4
|
@@ -5,7 +5,8 @@ import FormPresenter from "../../adapters/presenter/FormPresenter";
|
|
|
5
5
|
import Service from "../../adapters/gateway/Service";
|
|
6
6
|
import LifeCycleEvents from "../../../../cc/component/LifeCycleEventsEnum";
|
|
7
7
|
import InitializeController from "../../adapters/controllers/IntializeController";
|
|
8
|
-
import { ZFORM_DEPENDENCY_MAPPINGS_REQUEST, ZFORM_DEPENDENCY_MAPPINGS_SUCCESS, ZFORM_FIELD_VALUE_CHANGE_REQUEST, ZFORM_MY_FORM_REQUEST, ZFORM_MY_FORM_SUCCESS, ZFORM_MY_LAYOUTS_SUCCESS, ZFORM_SET_FIELD_ERROR_MESSAGE, ZFORM_SUBMIT_SUCCESS, ZFORM_SUBMIT_VALIDATION_COMPLETED, ZFORM_VALIDATE_FIELD_REQUEST, ZFORM_VALIDATION_RULES_REQUEST, ZFORM_VALIDATION_RULES_SUCCESS, ZFORM_VALIDATION_RULES_EXECUTION_RESULT } from "../../../../bc/zform/Symbol";
|
|
8
|
+
import { ZFORM_DEPENDENCY_MAPPINGS_REQUEST, ZFORM_DEPENDENCY_MAPPINGS_SUCCESS, ZFORM_FIELD_VALUE_CHANGE_REQUEST, ZFORM_MY_FORM_REQUEST, ZFORM_MY_FORM_SUCCESS, ZFORM_MY_LAYOUTS_SUCCESS, ZFORM_SET_FIELD_ERROR_MESSAGE, ZFORM_SUBMIT_SUCCESS, ZFORM_SUBMIT_VALIDATION_COMPLETED, ZFORM_VALIDATE_FIELD_REQUEST, ZFORM_VALIDATION_RULES_REQUEST, ZFORM_VALIDATION_RULES_SUCCESS, ZFORM_VALIDATION_RULES_EXECUTION_RESULT, ZFORM_LOOKUP_FIELD_SUCCESS } from "../../../../bc/zform/Symbol";
|
|
9
|
+
import LookupFieldController from "../../adapters/controllers/LookupFieldController";
|
|
9
10
|
import MyLayoutSuccessController from "../../adapters/controllers/MyLayoutSuccessController";
|
|
10
11
|
import MyFormSuccessController from "../../adapters/controllers/MyFromSuccessController";
|
|
11
12
|
import DependenciesController from "../../adapters/controllers/DependenciesController";
|
|
@@ -50,6 +51,7 @@ class EventHandlersFactory {
|
|
|
50
51
|
const layoutRulesSuccessController = new LayoutRulesSuccessController(service);
|
|
51
52
|
const validationRulesRequestController = new ValidationRulesRequestController(service);
|
|
52
53
|
const validationRulesSuccessController = new ValidationRulesSuccessController(service);
|
|
54
|
+
const lookupFieldController = new LookupFieldController(service);
|
|
53
55
|
const fieldValueChangeController = new FieldValueChangeController(service);
|
|
54
56
|
const validateFieldRequestController = new ValidateFieldRequestController(service);
|
|
55
57
|
const formSubmitController = new FormSubmitController(service);
|
|
@@ -76,7 +78,7 @@ class EventHandlersFactory {
|
|
|
76
78
|
dispatch
|
|
77
79
|
} = _ref2;
|
|
78
80
|
dispatch({
|
|
79
|
-
type:
|
|
81
|
+
type: 'SMART_FORM#SUBMIT_FAILED',
|
|
80
82
|
payload: action.payload
|
|
81
83
|
});
|
|
82
84
|
},
|
|
@@ -124,7 +126,8 @@ class EventHandlersFactory {
|
|
|
124
126
|
},
|
|
125
127
|
metaData: {}
|
|
126
128
|
});
|
|
127
|
-
}
|
|
129
|
+
},
|
|
130
|
+
[ZFORM_LOOKUP_FIELD_SUCCESS]: lookupFieldController.handle
|
|
128
131
|
};
|
|
129
132
|
}
|
|
130
133
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/library-platform",
|
|
3
|
-
"version": "1.1.8-exp.
|
|
3
|
+
"version": "1.1.8-exp.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"files": [
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"jsep": "^0.3.5",
|
|
74
74
|
"prettier": "3.3.3",
|
|
75
75
|
"react-sortable-hoc": "1.11.0",
|
|
76
|
-
"stylelint-config-standard": "^38.0.0",
|
|
77
76
|
"ts-jest": "29.2.6",
|
|
78
77
|
"typescript": "4.9.5"
|
|
79
78
|
},
|
package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelAction.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createCustomComponent } from "../../../../../../../custom-component";
|
|
2
|
-
import ActionLocationProperties from "../../../../../../../../cc/action-location/Properties";
|
|
3
|
-
import LabelActionView from "./LabelActionView";
|
|
4
|
-
export default createCustomComponent({
|
|
5
|
-
name: 'LabelAction',
|
|
6
|
-
properties: ActionLocationProperties,
|
|
7
|
-
eventHandlers: {},
|
|
8
|
-
View: LabelActionView
|
|
9
|
-
});
|
package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelActionView.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
3
|
-
import ComponentRegistry from "../../../../../../../custom-component/frameworks/ui/ComponentRegistry";
|
|
4
|
-
import ActionComponentMapping from "../../../../../../components/action-location/frameworks/ui/ActionComponentMapping"; // @ts-ignore
|
|
5
|
-
|
|
6
|
-
import style from "./css/LabelAction.module.css";
|
|
7
|
-
|
|
8
|
-
function LabelActionView(_ref, ref) {
|
|
9
|
-
let {
|
|
10
|
-
state
|
|
11
|
-
} = _ref;
|
|
12
|
-
const {
|
|
13
|
-
actions
|
|
14
|
-
} = state.properties;
|
|
15
|
-
return /*#__PURE__*/React.createElement(Flex, {
|
|
16
|
-
ref: ref,
|
|
17
|
-
$ui_displayMode: "inline",
|
|
18
|
-
$ui_alignItems: "center",
|
|
19
|
-
$ui_className: style.container
|
|
20
|
-
}, actions.map((action, index) => {
|
|
21
|
-
const {
|
|
22
|
-
type,
|
|
23
|
-
properties,
|
|
24
|
-
eventMappings
|
|
25
|
-
} = action;
|
|
26
|
-
const ActionUiType = ActionComponentMapping[type] || ComponentRegistry.get(type);
|
|
27
|
-
return /*#__PURE__*/React.createElement(ActionUiType, {
|
|
28
|
-
key: index,
|
|
29
|
-
...properties,
|
|
30
|
-
appendToActionPayload: {
|
|
31
|
-
eventMappings
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
;
|
|
38
|
-
export default LabelActionView;
|