@zohodesk/library-platform 1.1.6-temp-1 → 1.1.7
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/sdk/ResourceNamesEnum.js +1 -0
- package/es/bc/zform/Symbol.js +1 -0
- package/es/cc/breadcrumb/Constants.js +7 -0
- package/es/cc/breadcrumb/Events.js +14 -0
- package/es/cc/breadcrumb/Properties.js +35 -0
- package/es/cc/breadcrumb/index.js +3 -0
- package/es/cc/fields/index.js +2 -1
- package/es/cc/form-connected/SdkContract.js +159 -0
- package/es/cc/icon-button/Constants.js +7 -0
- package/es/cc/icon-button/Events.js +5 -0
- package/es/cc/icon-button/Properties.js +86 -0
- package/es/cc/icon-button/index.js +3 -0
- package/es/cc/section/Properties.js +9 -0
- package/es/cc/switch/Properties.js +2 -2
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +5 -1
- package/es/library/dot/components/form/adapters/presenter/TransformState.js +32 -2
- package/es/library/dot/components/form/frameworks/ui/sub-components/Sections.js +4 -2
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +3 -5
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +72 -40
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +1 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +2 -2
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/Breadcrumb.js +12 -0
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/BreadcrumbView.js +47 -0
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +19 -0
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/sub-components/BreadcrumbItem.js +58 -0
- package/es/library/dot/legacy-to-new-arch/icon-button/frameworks/ui/IconButton.js +12 -0
- package/es/library/dot/legacy-to-new-arch/icon-button/frameworks/ui/IconButtonView.js +43 -0
- package/es/library/dot/legacy-to-new-arch/switch/frameworks/ui/SwitchView.js +5 -5
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchFieldView.js +1 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +4 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +1 -1
- package/es/platform/components/form-connected/adapters/resources/SmartFormResources.js +210 -0
- package/es/platform/components/form-connected/application/interfaces/ISmartFormResources.js +1 -0
- package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +13 -6
- package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +27 -4
- package/es/platform/components/form-connected/frameworks/FormSdkFactory.js +33 -13
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +0 -52
- package/es/platform/sdk/application/interfaces/gateways/AbstractResource.js +52 -1
- package/es/platform/sdk/frameworks/Sdk.js +7 -0
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +13 -3
- package/es/platform/zform/applications/interfaces/input/DeleteFieldUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/GetFieldValueUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/HideFieldUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/HideSectionUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/InsertFieldUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/SetFieldValueUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/SetFieldsValuesUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/ShowFieldUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/ShowSectionUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/SubmitUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/UpdateFieldUseCaseInput.js +1 -0
- package/es/platform/zform/applications/usecases/DeleteFieldUseCase.js +22 -0
- package/es/platform/zform/applications/usecases/GetFieldValueUseCase.js +23 -0
- package/es/platform/zform/applications/usecases/HideFieldUseCase.js +19 -0
- package/es/platform/zform/applications/usecases/HideSectionUseCase.js +19 -0
- package/es/platform/zform/applications/usecases/InsertFieldUseCase.js +28 -0
- package/es/platform/zform/applications/usecases/SetFieldValueUseCase.js +44 -0
- package/es/platform/zform/applications/usecases/SetFieldsValuesUseCase.js +51 -0
- package/es/platform/zform/applications/usecases/ShowFieldUseCase.js +19 -0
- package/es/platform/zform/applications/usecases/ShowSectionUseCase.js +19 -0
- package/es/platform/zform/applications/usecases/SubmitUseCase.js +29 -0
- package/es/platform/zform/applications/usecases/UpdateFieldUseCase.js +22 -0
- package/es/platform/zform/domain/ZField.js +14 -0
- package/es/platform/zform/domain/ZForm.js +85 -3
- package/es/platform/zrecord/adapters/controllers/CreateRecordController.js +5 -1
- package/es/platform/zrecord/applications/usecases/CreateRecordUseCase.js +5 -3
- package/package.json +18 -19
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
import ZField from "../../domain/ZField";
|
|
3
|
+
|
|
4
|
+
class InsertFieldUseCase extends AbstractUseCase {
|
|
5
|
+
execute(input) {
|
|
6
|
+
const {
|
|
7
|
+
sectionName,
|
|
8
|
+
fieldsObj,
|
|
9
|
+
fieldIndex,
|
|
10
|
+
dispatch
|
|
11
|
+
} = input;
|
|
12
|
+
const {
|
|
13
|
+
repository,
|
|
14
|
+
presenter
|
|
15
|
+
} = this.dependencies;
|
|
16
|
+
const zformEntitiy = repository.getFormEntity();
|
|
17
|
+
let sectionId = zformEntitiy.getSectionId({
|
|
18
|
+
sectionName
|
|
19
|
+
});
|
|
20
|
+
let entity = new ZField(fieldsObj);
|
|
21
|
+
zformEntitiy.insertFieldAtPositionInSection(sectionId, entity, fieldIndex);
|
|
22
|
+
let zform = zformEntitiy.toObject();
|
|
23
|
+
presenter.updateFormResponse(zform);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default InsertFieldUseCase;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
import { ZFORM_FIELD_VALUE_CHANGE_REQUEST } from "../../../../bc/zform/Symbol";
|
|
3
|
+
|
|
4
|
+
class SetFieldValueUseCase extends AbstractUseCase {
|
|
5
|
+
execute(input) {
|
|
6
|
+
let {
|
|
7
|
+
fieldName,
|
|
8
|
+
newValue,
|
|
9
|
+
dispatch
|
|
10
|
+
} = input; // let { layoutRuleApplier } = this.dependencies
|
|
11
|
+
|
|
12
|
+
let zformEntitiy = this.dependencies.repository.getFormEntity(); // zformEntitiy.setFieldValue(fieldName, newValue, ({ layoutRules, formData }) => {
|
|
13
|
+
// return layoutRuleApplier.applyRules({
|
|
14
|
+
// layoutRules,
|
|
15
|
+
// formData,
|
|
16
|
+
// myForm: zformEntitiy.toObject()
|
|
17
|
+
// })
|
|
18
|
+
// });
|
|
19
|
+
// let zform = zformEntitiy.toObject();
|
|
20
|
+
// // let { fieldResult, sectionResult } = this.dependencies.layoutRuleApplier.applyRules({
|
|
21
|
+
// // layoutRules,
|
|
22
|
+
// // formData: zformEntitiy.getFormData(),
|
|
23
|
+
// // myForm: zform
|
|
24
|
+
// // });
|
|
25
|
+
// // zformEntitiy.applyLayoutRulesResult(sectionResult, fieldResult)
|
|
26
|
+
// // zform = zformEntitiy.toObject();
|
|
27
|
+
// this.dependencies.presenter.updateFormResponse(zform);
|
|
28
|
+
|
|
29
|
+
dispatch({
|
|
30
|
+
type: ZFORM_FIELD_VALUE_CHANGE_REQUEST,
|
|
31
|
+
payload: {
|
|
32
|
+
sectionId: zformEntitiy.getSectionId({
|
|
33
|
+
fieldName
|
|
34
|
+
}),
|
|
35
|
+
fieldName,
|
|
36
|
+
value: newValue
|
|
37
|
+
},
|
|
38
|
+
metaData: {}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default SetFieldValueUseCase;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
import { ZFORM_FIELD_VALUE_CHANGE_REQUEST } from "../../../../bc/zform/Symbol";
|
|
3
|
+
|
|
4
|
+
class SetFieldsValuesUseCase extends AbstractUseCase {
|
|
5
|
+
execute(input) {
|
|
6
|
+
let {
|
|
7
|
+
fieldsValuesObj,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input; // let { layoutRuleApplier } = this.dependencies
|
|
10
|
+
|
|
11
|
+
let zformEntitiy = this.dependencies.repository.getFormEntity(); // zformEntitiy.setFieldValue(fieldName, newValue, ({ layoutRules, formData }) => {
|
|
12
|
+
// return layoutRuleApplier.applyRules({
|
|
13
|
+
// layoutRules,
|
|
14
|
+
// formData,
|
|
15
|
+
// myForm: zformEntitiy.toObject()
|
|
16
|
+
// })
|
|
17
|
+
// });
|
|
18
|
+
// let zform = zformEntitiy.toObject();
|
|
19
|
+
// // let { fieldResult, sectionResult } = this.dependencies.layoutRuleApplier.applyRules({
|
|
20
|
+
// // layoutRules,
|
|
21
|
+
// // formData: zformEntitiy.getFormData(),
|
|
22
|
+
// // myForm: zform
|
|
23
|
+
// // });
|
|
24
|
+
// // zformEntitiy.applyLayoutRulesResult(sectionResult, fieldResult)
|
|
25
|
+
// // zform = zformEntitiy.toObject();
|
|
26
|
+
// this.dependencies.presenter.updateFormResponse(zform);
|
|
27
|
+
// dispatch({
|
|
28
|
+
// type: ZFORM_FIELD_VALUE_CHANGE_REQUEST,
|
|
29
|
+
// payload: { sectionId: zformEntitiy.getSectionId(sectionName), fieldName: '', value: "" },
|
|
30
|
+
// metaData: {}
|
|
31
|
+
// });
|
|
32
|
+
|
|
33
|
+
Object.entries(fieldsValuesObj).forEach(_ref => {
|
|
34
|
+
let [fieldName, value] = _ref;
|
|
35
|
+
dispatch({
|
|
36
|
+
type: ZFORM_FIELD_VALUE_CHANGE_REQUEST,
|
|
37
|
+
payload: {
|
|
38
|
+
sectionId: zformEntitiy.getSectionId({
|
|
39
|
+
fieldName
|
|
40
|
+
}),
|
|
41
|
+
fieldName,
|
|
42
|
+
value
|
|
43
|
+
},
|
|
44
|
+
metaData: {}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default SetFieldsValuesUseCase;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
|
|
3
|
+
class ShowFieldUseCase extends AbstractUseCase {
|
|
4
|
+
execute(input) {
|
|
5
|
+
const {
|
|
6
|
+
fieldName
|
|
7
|
+
} = input;
|
|
8
|
+
const {
|
|
9
|
+
repository,
|
|
10
|
+
presenter
|
|
11
|
+
} = this.dependencies;
|
|
12
|
+
const form = repository.getFormEntity();
|
|
13
|
+
form.setFieldVisibility(fieldName, true);
|
|
14
|
+
presenter.updateFormResponse(form.toObject());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default ShowFieldUseCase;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
|
|
3
|
+
class ShowSectionUseCase extends AbstractUseCase {
|
|
4
|
+
execute(input) {
|
|
5
|
+
const {
|
|
6
|
+
sectionName
|
|
7
|
+
} = input;
|
|
8
|
+
const {
|
|
9
|
+
repository,
|
|
10
|
+
presenter
|
|
11
|
+
} = this.dependencies;
|
|
12
|
+
const form = repository.getFormEntity();
|
|
13
|
+
form.setSectionVisibility(sectionName, true);
|
|
14
|
+
presenter.updateFormResponse(form.toObject());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default ShowSectionUseCase;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ZFORM_SUBMIT } from "../../../../bc/zform/Symbol";
|
|
2
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
3
|
+
|
|
4
|
+
class SubmitUseCase extends AbstractUseCase {
|
|
5
|
+
execute(input) {
|
|
6
|
+
const {
|
|
7
|
+
dispatch
|
|
8
|
+
} = input;
|
|
9
|
+
const {
|
|
10
|
+
repository,
|
|
11
|
+
presenter
|
|
12
|
+
} = this.dependencies;
|
|
13
|
+
const zformEntity = repository.getFormEntity(); // let zform = zformEntitiy.toObject();
|
|
14
|
+
// presenter.updateFormResponse(zform);
|
|
15
|
+
|
|
16
|
+
const context = { ...zformEntity.getContext()
|
|
17
|
+
};
|
|
18
|
+
dispatch({
|
|
19
|
+
type: ZFORM_SUBMIT,
|
|
20
|
+
payload: {
|
|
21
|
+
props: context
|
|
22
|
+
},
|
|
23
|
+
metaData: {}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default SubmitUseCase;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
|
|
3
|
+
class UpdateFieldUseCase extends AbstractUseCase {
|
|
4
|
+
execute(input) {
|
|
5
|
+
const {
|
|
6
|
+
fieldName,
|
|
7
|
+
fieldProperties,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
repository,
|
|
12
|
+
presenter
|
|
13
|
+
} = this.dependencies;
|
|
14
|
+
const zformEntitiy = repository.getFormEntity();
|
|
15
|
+
zformEntitiy.updateFieldProperties(fieldName, fieldProperties);
|
|
16
|
+
let zform = zformEntitiy.toObject();
|
|
17
|
+
presenter.updateFormResponse(zform);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default UpdateFieldUseCase;
|
|
@@ -159,6 +159,20 @@ export default class ZField {
|
|
|
159
159
|
return this.errorMessage;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
setProperties(fieldProperties) {
|
|
163
|
+
this.displayLabel = fieldProperties.displayLabel !== undefined ? fieldProperties.displayLabel : this.displayLabel;
|
|
164
|
+
this.i18NLabel = fieldProperties.i18NLabel !== undefined ? fieldProperties.i18NLabel : this.i18NLabel;
|
|
165
|
+
this.isMandatory = fieldProperties.isMandatory !== undefined ? fieldProperties.isMandatory : this.isMandatory;
|
|
166
|
+
this.isReadOnly = fieldProperties.isReadOnly !== undefined ? fieldProperties.isReadOnly : this.isReadOnly;
|
|
167
|
+
this.maxLength = fieldProperties.maxLength !== undefined ? fieldProperties.maxLength : this.maxLength;
|
|
168
|
+
this.isVisible = fieldProperties.isVisible !== undefined ? fieldProperties.isVisible : this.isVisible;
|
|
169
|
+
this.value = fieldProperties.value !== undefined ? fieldProperties.value : this.value;
|
|
170
|
+
this.errorMessage = fieldProperties.errorMessage !== undefined ? fieldProperties.errorMessage : this.errorMessage;
|
|
171
|
+
this.pickListValues = fieldProperties.pickListValues !== undefined ? fieldProperties.pickListValues : this.pickListValues;
|
|
172
|
+
this.defaultPickListValues = fieldProperties.defaultPickListValues !== undefined ? fieldProperties.defaultPickListValues : this.defaultPickListValues;
|
|
173
|
+
this.toolTip = fieldProperties.toolTip !== undefined ? fieldProperties.toolTip : this.toolTip;
|
|
174
|
+
}
|
|
175
|
+
|
|
162
176
|
setErrorMessage(errorMessage) {
|
|
163
177
|
this.errorMessage = errorMessage;
|
|
164
178
|
}
|
|
@@ -146,6 +146,29 @@ export default class ZForm {
|
|
|
146
146
|
this.isValidationRulesFetching = isValidationRulesFetching;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
getSectionId(_ref2) {
|
|
150
|
+
let {
|
|
151
|
+
fieldName,
|
|
152
|
+
sectionName
|
|
153
|
+
} = _ref2;
|
|
154
|
+
|
|
155
|
+
if (sectionName) {
|
|
156
|
+
for (let section of this.sections) {
|
|
157
|
+
if (section.getName() === sectionName) {
|
|
158
|
+
return section.getId();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
for (let section of this.sections) {
|
|
164
|
+
for (let field of section.getFields()) {
|
|
165
|
+
if (field.getApiName() === fieldName) {
|
|
166
|
+
return section.getId();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
149
172
|
setSections(sections) {
|
|
150
173
|
this.sections = sections;
|
|
151
174
|
}
|
|
@@ -164,6 +187,42 @@ export default class ZForm {
|
|
|
164
187
|
});
|
|
165
188
|
}
|
|
166
189
|
|
|
190
|
+
getFieldValue(fieldName) {
|
|
191
|
+
let sectionId = this.getSectionId({
|
|
192
|
+
fieldName
|
|
193
|
+
});
|
|
194
|
+
let fieldValue = null;
|
|
195
|
+
this.sections.forEach(s => {
|
|
196
|
+
if (s.getId() === sectionId) {
|
|
197
|
+
s.getFields().forEach(f => {
|
|
198
|
+
if (f.getApiName() === fieldName) {
|
|
199
|
+
fieldValue = f.getValue();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
return fieldValue;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
updateFieldProperties(fieldName, fieldProperties) {
|
|
208
|
+
let sectionId = this.getSectionId({
|
|
209
|
+
fieldName
|
|
210
|
+
});
|
|
211
|
+
this.sections = this.sections.map(s => {
|
|
212
|
+
if (s.getId() === sectionId) {
|
|
213
|
+
s.getFields().map(f => {
|
|
214
|
+
if (f.getApiName() === fieldName) {
|
|
215
|
+
f.setProperties(fieldProperties);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return f;
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return s;
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
167
226
|
insertSectionAtPosition(section, position) {
|
|
168
227
|
this.sections = [...this.sections.slice(0, position), section, ...this.sections.slice(position)];
|
|
169
228
|
}
|
|
@@ -174,16 +233,29 @@ export default class ZForm {
|
|
|
174
233
|
});
|
|
175
234
|
}
|
|
176
235
|
|
|
177
|
-
|
|
236
|
+
setSectionVisibility(sectionName, isVisible) {
|
|
178
237
|
this.sections = this.sections.map(s => {
|
|
179
|
-
if (s.
|
|
180
|
-
s.
|
|
238
|
+
if (s.getName() === sectionName) {
|
|
239
|
+
s.setVisibility(isVisible);
|
|
181
240
|
}
|
|
182
241
|
|
|
183
242
|
return s;
|
|
184
243
|
});
|
|
185
244
|
}
|
|
186
245
|
|
|
246
|
+
setFieldVisibility(fieldName, isVisible) {
|
|
247
|
+
this.sections = this.sections.map(s => {
|
|
248
|
+
s.getFields().map(f => {
|
|
249
|
+
if (f.getApiName() === fieldName) {
|
|
250
|
+
f.setVisibility(isVisible);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return f;
|
|
254
|
+
});
|
|
255
|
+
return s;
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
187
259
|
appendFieldInSection(sectionId, field) {
|
|
188
260
|
this.sections = this.sections.map(s => {
|
|
189
261
|
if (s.getId() === sectionId) {
|
|
@@ -204,6 +276,16 @@ export default class ZForm {
|
|
|
204
276
|
});
|
|
205
277
|
}
|
|
206
278
|
|
|
279
|
+
getFieldId(fieldName) {
|
|
280
|
+
for (let section of this.sections) {
|
|
281
|
+
for (let field of section.getFields()) {
|
|
282
|
+
if (field.getApiName() === fieldName) {
|
|
283
|
+
return field.getId();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
207
289
|
deleteFields(fieldIds) {
|
|
208
290
|
this.sections = this.sections.map(s => {
|
|
209
291
|
s.deleteFields(fieldIds);
|
|
@@ -7,6 +7,9 @@ export default class CreateRecordController extends AbstractController {
|
|
|
7
7
|
action,
|
|
8
8
|
dispatch
|
|
9
9
|
} = event;
|
|
10
|
+
const {
|
|
11
|
+
properties
|
|
12
|
+
} = state;
|
|
10
13
|
const {
|
|
11
14
|
payload
|
|
12
15
|
} = action;
|
|
@@ -21,7 +24,8 @@ export default class CreateRecordController extends AbstractController {
|
|
|
21
24
|
createRecordUseCase.execute({
|
|
22
25
|
record,
|
|
23
26
|
moduleName,
|
|
24
|
-
dispatch
|
|
27
|
+
dispatch,
|
|
28
|
+
context: properties.context
|
|
25
29
|
});
|
|
26
30
|
}
|
|
27
31
|
|
|
@@ -11,14 +11,16 @@ class CreateRecordUseCase extends AbstractUseCase {
|
|
|
11
11
|
const {
|
|
12
12
|
record,
|
|
13
13
|
dispatch,
|
|
14
|
-
moduleName
|
|
14
|
+
moduleName,
|
|
15
|
+
context
|
|
15
16
|
} = input;
|
|
16
17
|
const recordManager = repository.getRecordsManagerEntity();
|
|
17
18
|
const recordEntity = RecordFactory.createSingleRecord(record);
|
|
18
19
|
let meta = recordManager.createRecordMeta(recordEntity);
|
|
19
|
-
dispatch(recordManager.
|
|
20
|
+
dispatch(recordManager.createDataSourceExecuteEvent({
|
|
20
21
|
record: recordEntity.toObject(),
|
|
21
|
-
moduleName
|
|
22
|
+
moduleName,
|
|
23
|
+
...context
|
|
22
24
|
}, RecordApiActionName.CREATE_RECORD, meta));
|
|
23
25
|
presenter.updateRecord(recordManager.toObject());
|
|
24
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/library-platform",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"files": [
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"cssVariableConvert": "react-cli variableConverter ./es ./es",
|
|
17
17
|
"clean": "react-cli clean ./es",
|
|
18
18
|
"build": "npm run clean && react-cli build:library:es",
|
|
19
|
+
"build:css": "npm run build && npm run rtl && npm run cssVariableConvert",
|
|
19
20
|
"build:watch": "npm run clean && npm run build -- -w",
|
|
20
21
|
"test": "jest",
|
|
21
|
-
"prepare": "npm run clean && npm run build
|
|
22
|
+
"prepare": "npm run clean && npm run build:css",
|
|
22
23
|
"publish:alpha": "npm publish --tag alpha",
|
|
23
24
|
"publish:beta": "npm publish --tag beta",
|
|
24
25
|
"publish:exp": "npm publish --tag experimental",
|
|
@@ -43,21 +44,20 @@
|
|
|
43
44
|
"@types/react": "18.2.55",
|
|
44
45
|
"@typescript-eslint/parser": "^7.11.0",
|
|
45
46
|
"@zoho/SecurityJS": "5.0.2",
|
|
46
|
-
"@zohodesk-private/css-variable-migrator": "^1.0.
|
|
47
|
-
"@zohodesk-private/desk-components": "1.3
|
|
48
|
-
"@zohodesk-private/dot-registry": "0.0.1",
|
|
47
|
+
"@zohodesk-private/css-variable-migrator": "^1.0.8",
|
|
48
|
+
"@zohodesk-private/desk-components": "1.0.0-temp-53.3",
|
|
49
49
|
"@zohodesk-private/node-plugins": "1.1.9",
|
|
50
|
-
"@zohodesk/a11y": "2.
|
|
50
|
+
"@zohodesk/a11y": "2.2.6",
|
|
51
51
|
"@zohodesk/codestandard-analytics": "0.0.2",
|
|
52
52
|
"@zohodesk/codestandard-validator": "0.0.4",
|
|
53
|
-
"@zohodesk/components": "1.
|
|
54
|
-
"@zohodesk/dot": "1.7.
|
|
55
|
-
"@zohodesk/eslint-plugin-architecturerules": "0.0.6-exp-
|
|
56
|
-
"@zohodesk/eslint-plugin-no-hardcoding": "
|
|
53
|
+
"@zohodesk/components": "1.2.62",
|
|
54
|
+
"@zohodesk/dot": "1.7.8",
|
|
55
|
+
"@zohodesk/eslint-plugin-architecturerules": "0.0.6-exp-4",
|
|
56
|
+
"@zohodesk/eslint-plugin-no-hardcoding": "1.0.6-platform-1",
|
|
57
57
|
"@zohodesk/hooks": "2.0.5",
|
|
58
|
-
"@zohodesk/icons": "1.0.
|
|
58
|
+
"@zohodesk/icons": "1.0.72",
|
|
59
59
|
"@zohodesk/layout": "3.1.0",
|
|
60
|
-
"@zohodesk/svg": "1.1.
|
|
60
|
+
"@zohodesk/svg": "1.1.27",
|
|
61
61
|
"@zohodesk/utils": "1.3.14",
|
|
62
62
|
"@zohodesk/variables": "1.0.0",
|
|
63
63
|
"@zohodesk/virtualizer": "1.0.13",
|
|
@@ -77,16 +77,15 @@
|
|
|
77
77
|
"typescript": "4.9.5"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@zohodesk-private/desk-components": "1.3
|
|
81
|
-
"@zohodesk
|
|
82
|
-
"@zohodesk/
|
|
83
|
-
"@zohodesk/
|
|
84
|
-
"@zohodesk/dot": "1.7.16",
|
|
80
|
+
"@zohodesk-private/desk-components": "1.0.0-temp-53.3",
|
|
81
|
+
"@zohodesk/a11y": "2.2.6",
|
|
82
|
+
"@zohodesk/components": "1.2.62",
|
|
83
|
+
"@zohodesk/dot": "1.7.8",
|
|
85
84
|
"@zohodesk/hooks": "2.0.5",
|
|
86
85
|
"@zohodesk/i18n": "1.0.0-beta.31",
|
|
87
|
-
"@zohodesk/icons": "1.0.
|
|
86
|
+
"@zohodesk/icons": "1.0.72",
|
|
88
87
|
"@zohodesk/layout": "3.1.0",
|
|
89
|
-
"@zohodesk/svg": "1.1.
|
|
88
|
+
"@zohodesk/svg": "1.1.27",
|
|
90
89
|
"@zohodesk/utils": "1.3.14",
|
|
91
90
|
"color": "4.2.3",
|
|
92
91
|
"react-sortable-hoc": "1.11.0"
|