@zohodesk/library-platform 1.1.8-exp.2 → 1.1.9

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.
Files changed (51) hide show
  1. package/es/bc/zform/Symbol.js +0 -1
  2. package/es/cc/fields/field/FormDefaultUIType.js +1 -1
  3. package/es/cc/fields/text/Properties.js +0 -9
  4. package/es/cc/textarea/Properties.js +0 -11
  5. package/es/index.js +1 -2
  6. package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +1 -2
  7. package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +3 -0
  8. package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +3 -1
  9. package/es/library/dot/components/form-fields/index.js +1 -2
  10. package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +2 -4
  11. package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +3 -8
  12. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +7 -5
  13. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +5 -3
  14. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelAction.js +9 -0
  15. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelActionView.js +38 -0
  16. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/css/LabelAction.module.css +4 -0
  17. package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +3 -13
  18. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +4 -22
  19. package/es/platform/client-actions/behaviour/zclient-actions/frameworks/sdk/ClientActionsSDKFactory.js +2 -2
  20. package/es/platform/client-actions/components/interfaces/ActionViewModel.js +0 -1
  21. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +1 -5
  22. package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +2 -2
  23. package/es/platform/components/form-connected/frameworks/FormSdkFactory.js +2 -2
  24. package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +2 -2
  25. package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +2 -2
  26. package/es/platform/data-source/index.js +1 -3
  27. package/es/platform/data-source/utils/validation-rules/TransFormValidationRules.js +1 -6
  28. package/es/platform/sdk/adapters/gateways/Service.js +0 -4
  29. package/es/platform/sdk/domain/entities/ResourceManager.js +11 -21
  30. package/es/platform/sdk/frameworks/Sdk.js +2 -13
  31. package/es/platform/sdk/frameworks/SdkRegistry.js +0 -9
  32. package/es/platform/zform/adapters/gateway/Service.js +0 -4
  33. package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +1 -1
  34. package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +1 -2
  35. package/es/platform/zform/adapters/presenter/utils/DefaultClientActions.js +65 -66
  36. package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +1 -35
  37. package/es/platform/zform/domain/ZField.js +8 -14
  38. package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +3 -6
  39. package/package.json +2 -1
  40. package/es/library/dot/components/form-fields/lookup/frameworks/ui/EventHandlerFactory.js +0 -70
  41. package/es/library/dot/components/form-fields/lookup/frameworks/ui/Lookup.js +0 -13
  42. package/es/library/dot/components/form-fields/lookup/frameworks/ui/LookupView.js +0 -51
  43. package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +0 -3
  44. package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +0 -37
  45. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +0 -40
  46. package/es/platform/components/app/adapters/resources/AppResource.js +0 -13
  47. package/es/platform/data-source/http-template/fetchLookupFields.js +0 -24
  48. package/es/platform/sdk/application/usecases/GetResourcesUseCase.js +0 -12
  49. package/es/platform/zform/adapters/controllers/LookupFieldController.js +0 -23
  50. package/es/platform/zform/applications/interfaces/input/LookUpFieldSuccessUseCaseInputModel.js +0 -1
  51. package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +0 -40
@@ -35,15 +35,6 @@ export class SdkManager {
35
35
  createResourceInstanceUseCase.execute(input);
36
36
  }
37
37
 
38
- getResources() {
39
- const {
40
- getResourcesUseCase
41
- } = this.service;
42
- getResourcesUseCase.updateDependencies(this.state, this.setPresentedData);
43
- getResourcesUseCase.execute(null);
44
- return this.presentedData;
45
- }
46
-
47
38
  destructResourceInstance(input) {
48
39
  const {
49
40
  destructResourceInstanceUseCase
@@ -16,7 +16,6 @@ import FieldBlurUseCase from "../../applications/usecases/FieldBlurUseCase";
16
16
  import SubmitValidationCompletedUseCase from "../../applications/usecases/SubmitValidationCompletedUseCase";
17
17
  import ValidationRulesExecutionResultUseCase from "../../applications/usecases/ValidationRulesExecutionResultUseCase";
18
18
  import ValidateFieldUseCase from "../../applications/usecases/ValidateFieldUseCase";
19
- import LookupFieldSuccessUseCase from "../../applications/usecases/LookupFieldSuccessUseCase";
20
19
 
21
20
  class Service {
22
21
  constructor(dependencies) {
@@ -54,8 +53,6 @@ class Service {
54
53
 
55
54
  _defineProperty(this, "submitValidationCompletedUseCase", void 0);
56
55
 
57
- _defineProperty(this, "lookupFieldSuccessUseCase", void 0);
58
-
59
56
  this.formSubmitUseCase = new FormSubmitUseCase(dependencies);
60
57
  this.initializeUseCase = new InitializeUseCase(dependencies);
61
58
  this.myLayoutSuccessUseCase = new MyLayoutSuccessUseCase(dependencies);
@@ -72,7 +69,6 @@ class Service {
72
69
  this.validateFieldUseCase = new ValidateFieldUseCase(dependencies);
73
70
  this.validationRulesExecutionResultUseCase = new ValidationRulesExecutionResultUseCase(dependencies);
74
71
  this.submitValidationCompletedUseCase = new SubmitValidationCompletedUseCase(dependencies);
75
- this.lookupFieldSuccessUseCase = new LookupFieldSuccessUseCase(dependencies);
76
72
  }
77
73
 
78
74
  }
@@ -72,7 +72,7 @@ function SectionTranslator(_ref) {
72
72
 
73
73
  fieldPreModified['labelActions'] = labelActions; // Final fieldActions to fieldPreModified
74
74
 
75
- if (field.type !== "Boolean") {
75
+ if (field.type !== "Boolean" && field.type !== "Textarea") {
76
76
  fieldPreModified['actions'] = transformedActions.fieldActions;
77
77
  } // Placeholder check
78
78
 
@@ -18,8 +18,7 @@ const LookUpFieldTranslator = _ref => {
18
18
  readonly: field.isReadOnly,
19
19
  // visibility: field.isVisible,
20
20
  isVisible: field.isVisible,
21
- errorMessage: field.errorMessage || '',
22
- lookup: field.lookup
21
+ errorMessage: field.errorMessage || ''
23
22
  };
24
23
  return fieldModified;
25
24
  };
@@ -1,4 +1,3 @@
1
- import { i18NProviderUtils } from '@zohodesk/i18n';
2
1
  export default function DefaultFormClientActions(props) {
3
2
  const {
4
3
  submitConfig,
@@ -9,14 +8,14 @@ export default function DefaultFormClientActions(props) {
9
8
 
10
9
  if (submitConfig !== null && submitConfig !== void 0 && submitConfig.isEnabled) {
11
10
  finalClientActions.push(getDefaultFormAction({
12
- type: 'submit',
11
+ type: "submit",
13
12
  ...submitConfig
14
13
  }));
15
14
  }
16
15
 
17
16
  if (cancelConfig !== null && cancelConfig !== void 0 && cancelConfig.isEnabled) {
18
17
  finalClientActions.push(getDefaultFormAction({
19
- type: 'cancel',
18
+ type: "cancel",
20
19
  ...cancelConfig
21
20
  }));
22
21
  }
@@ -32,99 +31,99 @@ function getDefaultFormAction(_ref) {
32
31
  text,
33
32
  isEnabled
34
33
  } = _ref;
35
- const isSubmit = type === 'submit';
34
+ const isSubmit = type === "submit";
36
35
  return {
37
- id: isSubmit ? '4000000080010' : '4000000080013',
38
- name: 'FORM ACTION',
39
- component: 'form',
40
- location: 'footer_left_actions',
36
+ id: isSubmit ? "4000000080010" : "4000000080013",
37
+ name: "FORM ACTION",
38
+ component: "form",
39
+ location: "footer_left_actions",
41
40
  uiComponentMapping: {
42
- id: isSubmit ? '4000000080011' : '4000000080014',
43
- name: isSubmit ? 'Submit Button' : 'Cancel Button',
44
- component: 'Button',
41
+ id: isSubmit ? "4000000080011" : "4000000080014",
42
+ name: isSubmit ? "Submit Button" : "Cancel Button",
43
+ component: "Button",
45
44
  propertiesValueMapping: {
46
- text: isSubmit ? i18NProviderUtils.getI18NValue('crm.button.submit') : i18NProviderUtils.getI18NValue('support.label.cancel'),
47
- palette: isSubmit ? 'primaryFilled' : 'secondary'
45
+ text: text || (isSubmit ? "Submit" : "Cancel"),
46
+ palette: isSubmit ? "primaryFilled" : "secondary"
48
47
  },
49
48
  eventMappings: [{
50
- id: isSubmit ? '4000000080012' : '4000000080015',
51
- sourceEvent: 'BUTTON#CLICKED',
52
- targetEvent: isSubmit ? 'SMART_FORM#SUBMIT_CLICKED' : 'SMART_FORM#CANCEL_CLICKED',
49
+ id: isSubmit ? "4000000080012" : "4000000080015",
50
+ sourceEvent: "BUTTON#CLICKED",
51
+ targetEvent: isSubmit ? "SMART_FORM#SUBMIT_CLICKED" : "SMART_FORM#CANCEL_CLICKED",
53
52
  payloadValueMapping: {}
54
53
  }]
55
54
  },
56
- modules: ['static_module'],
55
+ modules: ["static_module"],
57
56
  conditions: {
58
57
  fields: [],
59
- pattern: ''
58
+ pattern: ""
60
59
  }
61
60
  };
62
61
  }
63
62
 
64
63
  function getDefaultFieldInfoAction() {
65
64
  return {
66
- uiComponentMapping: {
67
- component: 'ActionIcon',
68
- name: 'Info Icon',
69
- id: '4000000081003',
70
- propertiesValueMapping: {
71
- hoverVariant: 'primary',
72
- icon: 'ZD-information',
73
- label: 'Default Info Icon'
65
+ "uiComponentMapping": {
66
+ "component": "ActionIcon",
67
+ "name": "Info Icon",
68
+ "id": "4000000081003",
69
+ "propertiesValueMapping": {
70
+ "hoverVariant": "primary",
71
+ "icon": "ZD-information",
72
+ "label": "Default Info Icon"
74
73
  },
75
- eventMappings: [{
76
- payloadValueMapping: {},
77
- id: '4000000081005'
74
+ "eventMappings": [{
75
+ "payloadValueMapping": {},
76
+ "id": "4000000081005"
78
77
  }]
79
78
  },
80
- conditions: {
81
- fields: [{
82
- fieldName: '{{@context.apiName}}',
83
- condition: 'in',
84
- value: ['gadget_name', 'gadget_description', 'cf_total_qa_issues', 'cf_is_pm_reviewed_1', 'cf_related_gadget', 'priority', 'cf_tested_by', 'cf_security_dri', 'cf_git_merge_request_url', 'release_deadline', 'cf_tentative_eta', 'cf_mutation_coverage', 'cf_support_phone', 'cf_test_coverage_score', 'cf_budget_allocation', 'cf_brand_owner', 'cf_brand_launch_date', 'cf_marketing_channel']
79
+ "conditions": {
80
+ "fields": [{
81
+ "fieldName": "{{@context.apiName}}",
82
+ "condition": "in",
83
+ "value": ["gadget_name", "gadget_description", "cf_total_qa_issues", "cf_is_pm_reviewed_1", "cf_related_gadget", "priority", "cf_tested_by", "cf_security_dri", "cf_git_merge_request_url", "release_deadline", "cf_tentative_eta", "cf_mutation_coverage", "cf_support_phone", "cf_test_coverage_score", "cf_budget_allocation", "cf_brand_owner", "cf_brand_launch_date", "cf_marketing_channel"]
85
84
  }],
86
- pattern: '1'
85
+ "pattern": "1"
87
86
  },
88
- modifiedTime: '2024-11-21T06:11:59.000Z',
89
- component: 'form',
90
- name: 'FORM ACTION',
91
- createdTime: '2024-11-21T06:11:59.000Z',
92
- location: 'field_label_actions',
93
- id: '4000000081009',
94
- modules: ['static_module']
87
+ "modifiedTime": "2024-11-21T06:11:59.000Z",
88
+ "component": "form",
89
+ "name": "FORM ACTION",
90
+ "createdTime": "2024-11-21T06:11:59.000Z",
91
+ "location": "field_label_actions",
92
+ "id": "4000000081009",
93
+ "modules": ["static_module"]
95
94
  };
96
95
  }
97
96
 
98
97
  function getDefaultFieldEphiAction() {
99
98
  return {
100
- uiComponentMapping: {
101
- component: 'HighlightedValue',
102
- name: 'EPHI Tag',
103
- id: '4000000082003',
104
- propertiesValueMapping: {
105
- text: 'ePHI',
106
- color: 'green',
107
- tooltip: 'ePHI is individually identifiable protected health information sent or stored electronically.'
99
+ "uiComponentMapping": {
100
+ "component": "HighlightedValue",
101
+ "name": "EPHI Tag",
102
+ "id": "4000000082003",
103
+ "propertiesValueMapping": {
104
+ "text": "ePHI",
105
+ "color": "green",
106
+ "tooltip": "ePHI is individually identifiable protected health information sent or stored electronically."
108
107
  },
109
- eventMappings: [{
110
- payloadValueMapping: {},
111
- id: '4000000082005'
108
+ "eventMappings": [{
109
+ "payloadValueMapping": {},
110
+ "id": "4000000082005"
112
111
  }]
113
112
  },
114
- conditions: {
115
- fields: [{
116
- fieldName: '{{@context.apiName}}',
117
- condition: 'in',
118
- value: ['gadget_name', 'cf_total_qa_issues', 'cf_security_dri', 'cf_git_merge_request_url', 'cf_mutation_coverage', 'cf_support_phone', 'cf_test_coverage_score', 'cf_brand_owner']
113
+ "conditions": {
114
+ "fields": [{
115
+ "fieldName": "{{@context.apiName}}",
116
+ "condition": "in",
117
+ "value": ["gadget_name", "cf_total_qa_issues", "cf_security_dri", "cf_git_merge_request_url", "cf_mutation_coverage", "cf_support_phone", "cf_test_coverage_score", "cf_brand_owner"]
119
118
  }],
120
- pattern: '1'
119
+ "pattern": "1"
121
120
  },
122
- modifiedTime: '2024-11-21T06:11:59.000Z',
123
- component: 'form',
124
- name: 'FORM ACTION',
125
- createdTime: '2024-11-21T06:11:59.000Z',
126
- location: 'field_label_actions',
127
- id: '4000000082009',
128
- modules: ['static_module']
121
+ "modifiedTime": "2024-11-21T06:11:59.000Z",
122
+ "component": "form",
123
+ "name": "FORM ACTION",
124
+ "createdTime": "2024-11-21T06:11:59.000Z",
125
+ "location": "field_label_actions",
126
+ "id": "4000000082009",
127
+ "modules": ["static_module"]
129
128
  };
130
129
  }
@@ -3,7 +3,7 @@ import ZSection from "../../domain/ZSection";
3
3
  import ZField from "../../domain/ZField";
4
4
  import { DATA_SOURCE_EXECUTE } from "../../../../bc/zdata-source/Constants";
5
5
  import { DATA_SOURCE_SUCCESS, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_FAILURE } from "../../../../bc/zdata-source/Symbols";
6
- import { ZFORM_VALIDATION_RULES_FAILURE, ZFORM_VALIDATION_RULES_SUCCESS, ZFORM_LOOKUP_FIELD_SUCCESS } from "../../../../bc/zform/Symbol";
6
+ import { ZFORM_VALIDATION_RULES_FAILURE, ZFORM_VALIDATION_RULES_SUCCESS } from "../../../../bc/zform/Symbol";
7
7
 
8
8
  class MyFormSuccessUseCase extends AbstractUseCase {
9
9
  execute(input) {
@@ -24,7 +24,6 @@ class MyFormSuccessUseCase extends AbstractUseCase {
24
24
  const context = { ...zFormEntity.getContext(),
25
25
  layoutId: zFormEntity.getLayoutId()
26
26
  };
27
- const lookupFields = sections.flatMap(section => section.fields.filter(field => field.type === 'LookUp'));
28
27
  const sectionEntities = sections.map(section => {
29
28
  const fields = section.fields.map(field => {
30
29
  const entity = new ZField(field);
@@ -58,39 +57,6 @@ class MyFormSuccessUseCase extends AbstractUseCase {
58
57
  });
59
58
  });
60
59
 
61
- if (lookupFields.length > 0) {
62
- dispatch({
63
- type: DATA_SOURCE_EXECUTE,
64
- payload: {
65
- actionName: 'fetchLookupFields',
66
- props: { ...context
67
- }
68
- },
69
- metaData: {
70
- actionName: 'fetchLookupFields',
71
- //hack
72
- [DATA_SOURCE_NO_CONTENT]: {
73
- type: ZFORM_LOOKUP_FIELD_SUCCESS,
74
- metaData: {
75
- actionName: 'fetchLookupFields'
76
- }
77
- },
78
- // [DATA_SOURCE_FAILURE]: {
79
- // type: ZFORM_LOOKUP_FIELD_SUCCESS,
80
- // metaData: {
81
- // actionName: 'fetchValidationRules'
82
- // }
83
- // },
84
- [DATA_SOURCE_SUCCESS]: {
85
- type: ZFORM_LOOKUP_FIELD_SUCCESS,
86
- metaData: {
87
- actionName: 'fetchLookupFields'
88
- }
89
- }
90
- }
91
- });
92
- }
93
-
94
60
  if (!disableValidationRule) {
95
61
  presenter.updateFormResponse(zFormEntity.toObject());
96
62
  dispatch({
@@ -25,8 +25,7 @@ export default class ZField {
25
25
  toolTipType,
26
26
  defaultValue,
27
27
  isPHI,
28
- subType,
29
- lookup
28
+ subType
30
29
  } = _ref;
31
30
 
32
31
  _defineProperty(this, "displayLabel", void 0);
@@ -77,8 +76,6 @@ export default class ZField {
77
76
 
78
77
  _defineProperty(this, "isPHI", void 0);
79
78
 
80
- _defineProperty(this, "lookup", void 0);
81
-
82
79
  this.displayLabel = displayLabel;
83
80
  this.apiName = apiName;
84
81
  this.isCustomField = isCustomField;
@@ -102,8 +99,7 @@ export default class ZField {
102
99
  this.toolTip = toolTip;
103
100
  this.toolTipType = toolTipType;
104
101
  this.defaultValue = defaultValue;
105
- this.isPHI = isPHI;
106
- this.lookup = lookup; // if(value===undefined){
102
+ this.isPHI = isPHI; // if(value===undefined){
107
103
  // this.setDefaultValue()
108
104
  // }
109
105
  }
@@ -113,8 +109,8 @@ export default class ZField {
113
109
  return false;
114
110
  }
115
111
 
116
- if (typeof defaultValue === 'string') {
117
- return defaultValue === 'true' ? true : false;
112
+ if (typeof defaultValue === "string") {
113
+ return defaultValue === "true" ? true : false;
118
114
  }
119
115
 
120
116
  return defaultValue;
@@ -125,8 +121,8 @@ export default class ZField {
125
121
  return [];
126
122
  }
127
123
 
128
- if (typeof defaultValue === 'string') {
129
- return defaultValue.split(';');
124
+ if (typeof defaultValue === "string") {
125
+ return defaultValue.split(";");
130
126
  }
131
127
 
132
128
  return defaultValue;
@@ -161,7 +157,7 @@ export default class ZField {
161
157
 
162
158
  setValue(value) {
163
159
  if (this.value !== value) {
164
- this.errorMessage = ''; // Reset error message when value changes
160
+ this.errorMessage = ""; // Reset error message when value changes
165
161
  }
166
162
 
167
163
  this.value = value;
@@ -192,7 +188,6 @@ export default class ZField {
192
188
  this.defaultPickListValues = fieldProperties.defaultPickListValues !== undefined ? fieldProperties.defaultPickListValues : this.defaultPickListValues;
193
189
  this.toolTip = fieldProperties.toolTip !== undefined ? fieldProperties.toolTip : this.toolTip;
194
190
  this.decimalPlaces = fieldProperties.decimalPlaces !== undefined ? fieldProperties.decimalPlaces : this.decimalPlaces;
195
- this.lookup = fieldProperties.lookup !== undefined ? fieldProperties.lookup : this.lookup;
196
191
  }
197
192
 
198
193
  setErrorMessage(errorMessage) {
@@ -246,8 +241,7 @@ export default class ZField {
246
241
  toolTipType: this.toolTipType,
247
242
  defaultValue: this.defaultValue,
248
243
  isPHI: this.isPHI,
249
- subType: this.subType,
250
- lookup: this.lookup
244
+ subType: this.subType
251
245
  };
252
246
  }
253
247
 
@@ -5,8 +5,7 @@ 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, ZFORM_LOOKUP_FIELD_SUCCESS } from "../../../../bc/zform/Symbol";
9
- import LookupFieldController from "../../adapters/controllers/LookupFieldController";
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";
10
9
  import MyLayoutSuccessController from "../../adapters/controllers/MyLayoutSuccessController";
11
10
  import MyFormSuccessController from "../../adapters/controllers/MyFromSuccessController";
12
11
  import DependenciesController from "../../adapters/controllers/DependenciesController";
@@ -51,7 +50,6 @@ class EventHandlersFactory {
51
50
  const layoutRulesSuccessController = new LayoutRulesSuccessController(service);
52
51
  const validationRulesRequestController = new ValidationRulesRequestController(service);
53
52
  const validationRulesSuccessController = new ValidationRulesSuccessController(service);
54
- const lookupFieldController = new LookupFieldController(service);
55
53
  const fieldValueChangeController = new FieldValueChangeController(service);
56
54
  const validateFieldRequestController = new ValidateFieldRequestController(service);
57
55
  const formSubmitController = new FormSubmitController(service);
@@ -78,7 +76,7 @@ class EventHandlersFactory {
78
76
  dispatch
79
77
  } = _ref2;
80
78
  dispatch({
81
- type: 'SMART_FORM#SUBMIT_FAILED',
79
+ type: "SMART_FORM#SUBMIT_FAILED",
82
80
  payload: action.payload
83
81
  });
84
82
  },
@@ -126,8 +124,7 @@ class EventHandlersFactory {
126
124
  },
127
125
  metaData: {}
128
126
  });
129
- },
130
- [ZFORM_LOOKUP_FIELD_SUCCESS]: lookupFieldController.handle
127
+ }
131
128
  };
132
129
  }
133
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/library-platform",
3
- "version": "1.1.8-exp.2",
3
+ "version": "1.1.9",
4
4
  "description": "",
5
5
  "main": "es/index.js",
6
6
  "files": [
@@ -73,6 +73,7 @@
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",
76
77
  "ts-jest": "29.2.6",
77
78
  "typescript": "4.9.5"
78
79
  },
@@ -1,70 +0,0 @@
1
- import { TextBoxConstants } from "../../../../../../../cc/textbox";
2
- import FieldConstants from "../../../../../../../cc/fields/field/Constants";
3
-
4
- class EventHandlersFactory {
5
- static create() {
6
- return {
7
- [TextBoxConstants.TEXTBOX_FOCUSED]: this.handleTextBoxFocused,
8
- [TextBoxConstants.TEXTBOX_BLURED]: this.handleTextBoxBlurred,
9
- [TextBoxConstants.TEXTBOX_CHANGED]: this.handleTextBoxChanged
10
- };
11
- }
12
-
13
- static handleTextBoxFocused(_ref) {
14
- let {
15
- state,
16
- dispatch
17
- } = _ref;
18
- const {
19
- name
20
- } = state.properties;
21
- dispatch({
22
- type: FieldConstants.FIELD_FOCUSED,
23
- payload: {
24
- fieldName: name
25
- },
26
- metaData: {}
27
- });
28
- }
29
-
30
- static handleTextBoxBlurred(_ref2) {
31
- let {
32
- state,
33
- dispatch
34
- } = _ref2;
35
- const {
36
- name
37
- } = state.properties;
38
- dispatch({
39
- type: FieldConstants.FIELD_BLURRED,
40
- payload: {
41
- fieldName: name
42
- }
43
- });
44
- }
45
-
46
- static handleTextBoxChanged(_ref3) {
47
- let {
48
- state,
49
- dispatch,
50
- action
51
- } = _ref3;
52
- const {
53
- value
54
- } = action.payload;
55
- const {
56
- name
57
- } = state.properties;
58
- dispatch({
59
- type: FieldConstants.FIELD_CHANGED,
60
- payload: {
61
- fieldName: name,
62
- value
63
- },
64
- metaData: {}
65
- });
66
- }
67
-
68
- }
69
-
70
- export default EventHandlersFactory;
@@ -1,13 +0,0 @@
1
- import { createCustomComponent } from "../../../../../../custom-component";
2
- import LookupFieldProperties from "../../../../../../../cc/fields/text/Properties";
3
- import FocusFieldBehaviourFactory from "../../../../../../behaviours/field-focus/frameworks/ui/FocusFieldBehaviourFactory";
4
- import LookupView from "./LookupView";
5
- import EventHandlersFactory from "./EventHandlerFactory";
6
- let Lookup = createCustomComponent({
7
- name: 'FormLookUpField',
8
- View: LookupView,
9
- properties: LookupFieldProperties,
10
- eventHandlers: EventHandlersFactory.create(),
11
- behaviours: [FocusFieldBehaviourFactory.create()]
12
- });
13
- export default Lookup;
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import TextBox from "../../../../../legacy-to-new-arch/textbox/frameworks/ui/TextBox";
3
- import FieldItem from "../../../field/FieldItem"; // @ts-ignore
4
-
5
- import style from "../../../../form/frameworks/ui/css/Form.module.css";
6
-
7
- function TextBoxView(_ref, ref) {
8
- let {
9
- state
10
- } = _ref;
11
- const {
12
- id,
13
- label,
14
- value,
15
- placeholder,
16
- errorMessage,
17
- disabled,
18
- readonly,
19
- required,
20
- uiConfig,
21
- labelActions,
22
- actions
23
- } = state.properties;
24
- const {
25
- size,
26
- breakRow
27
- } = uiConfig;
28
- return /*#__PURE__*/React.createElement(FieldItem, {
29
- ref: ref,
30
- id: id,
31
- label: label,
32
- labelActions: labelActions,
33
- required: required,
34
- errorMessage: errorMessage,
35
- testId: 'smart_form_field_lookup',
36
- size: size,
37
- breakRow: breakRow
38
- }, /*#__PURE__*/React.createElement("div", {
39
- className: style.field
40
- }, /*#__PURE__*/React.createElement(TextBox, {
41
- id: id,
42
- placeholder: placeholder,
43
- value: value,
44
- required: required,
45
- disabled: disabled,
46
- readonly: readonly,
47
- actions: actions
48
- })));
49
- }
50
-
51
- export default TextBoxView;
@@ -1,3 +0,0 @@
1
- .actionContainer {
2
- margin-top: var(--zd_size2) ;
3
- }
@@ -1,37 +0,0 @@
1
- .actionContainer {
2
- margin-top: var(--zd_size4) ;
3
- }
4
-
5
- .custmInputWrapper {
6
- position: absolute;
7
- top: 0 ;
8
- width: 100% ;
9
- }
10
-
11
- [dir=ltr] .custmInputWrapper {
12
- left: 0 ;
13
- }
14
-
15
- [dir=rtl] .custmInputWrapper {
16
- right: 0 ;
17
- }
18
-
19
- .clearIconContainer {
20
- --textboxicon_icon_margin: 0;
21
- }
22
-
23
- [dir=ltr] .paddingRight64 {
24
- padding-right: var(--zd_size64) ;
25
- }
26
-
27
- [dir=rtl] .paddingRight64 {
28
- padding-left: var(--zd_size64) ;
29
- }
30
-
31
- [dir=ltr] .paddingRight96 {
32
- padding-right: var(--zd_size96) ;
33
- }
34
-
35
- [dir=rtl] .paddingRight96 {
36
- padding-left: var(--zd_size96) ;
37
- }
@@ -1,40 +0,0 @@
1
- .hasChildren {
2
- position: relative;
3
- }
4
-
5
- .rightPlaceholder {
6
- position: absolute;
7
- bottom: var(--zd_size4) ;
8
- }
9
-
10
- [dir=ltr] .rightPlaceholder {
11
- right: var(--zd_size12) ;
12
- }
13
-
14
- [dir=rtl] .rightPlaceholder {
15
- left: var(--zd_size12) ;
16
- }
17
-
18
- [dir=ltr] .paddingRight32 {
19
- padding-right: var(--zd_size32) ;
20
- }
21
-
22
- [dir=rtl] .paddingRight32 {
23
- padding-left: var(--zd_size32) ;
24
- }
25
-
26
- [dir=ltr] .paddingRight64 {
27
- padding-right: var(--zd_size64) ;
28
- }
29
-
30
- [dir=rtl] .paddingRight64 {
31
- padding-left: var(--zd_size64) ;
32
- }
33
-
34
- [dir=ltr] .paddingRight96 {
35
- padding-right: var(--zd_size96) ;
36
- }
37
-
38
- [dir=rtl] .paddingRight96 {
39
- padding-left: var(--zd_size96) ;
40
- }