@zohodesk/library-platform 1.2.0-exp.2 → 1.2.0-exp.4
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/cc/date/Properties.js +15 -0
- package/es/cc/fields/field/Properties.js +8 -1
- package/es/cc/form/Properties.js +8 -0
- package/es/cc/label/Properties.js +12 -5
- package/es/cc/multi-select/Properties.js +8 -1
- package/es/cc/section/Properties.js +8 -1
- package/es/cc/select/Properties.js +8 -1
- package/es/cc/textarea/Properties.js +15 -0
- package/es/cc/textbox/Properties.js +8 -1
- package/es/index.js +4 -6
- package/es/library/dot/components/form/adapters/presenter/TransformState.js +3 -1
- package/es/library/dot/components/form/frameworks/ui/FormView.js +6 -3
- package/es/library/dot/components/form/frameworks/ui/sub-components/Footer.js +16 -6
- package/es/library/dot/components/form/frameworks/ui/sub-components/Header.js +16 -6
- package/es/library/dot/components/form/frameworks/ui/sub-components/Sections.js +4 -2
- package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +6 -3
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +6 -3
- package/es/library/dot/components/form-fields/date/frameworks/ui/DateView.js +6 -3
- package/es/library/dot/components/form-fields/datetime/frameworks/ui/DateTimeView.js +6 -3
- package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +6 -3
- package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +6 -3
- package/es/library/dot/components/form-fields/field/FieldItem.js +4 -2
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/LookupView.js +6 -3
- package/es/library/dot/components/form-fields/multi-select/frameworks/ui/MultiSelectView.js +7 -4
- package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +6 -3
- package/es/library/dot/components/form-fields/percentage/frameworks/ui/PercentageView.js +7 -4
- package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +6 -3
- package/es/library/dot/components/form-fields/pick-list/frameworks/ui/PickListView.js +7 -4
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +6 -3
- package/es/library/dot/components/form-fields/textbox/frameworks/ui/TextBoxView.js +6 -3
- package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +6 -3
- package/es/library/dot/components/section/frameworks/ui/RenderField.js +3 -1
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +14 -8
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +8 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +11 -5
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +11 -5
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +8 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +12 -5
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +12 -4
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +10 -4
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +11 -5
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +21 -8
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +18 -8
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +10 -4
- package/es/library/dot/legacy-to-new-arch/textbox/frameworks/ui/TextBoxView.js +10 -4
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/resources/__test__/ClientActionsFetchSDK.test.js +183 -0
- package/es/platform/client-actions/cc/action-event-mediator/Properties.js +0 -43
- package/es/platform/client-actions/cc/client-actions-renderer/Properties.js +58 -0
- package/es/platform/client-actions/cc/client-actions-renderer/ViewMetaSchema.js +17 -0
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter.js +1 -2
- package/es/platform/client-actions/components/client-actions-renderer/adapters/presenters/ClientActionsRendererTranslator.js +24 -0
- package/es/platform/client-actions/components/client-actions-renderer/domain/entities/ClientActionsRendererDatatype.js +1 -0
- package/es/platform/client-actions/components/client-actions-renderer/domain/entities/ClientActionsRendererViewProps.js +1 -0
- package/es/platform/client-actions/components/client-actions-renderer/domain/entities/Context.js +1 -0
- package/es/platform/client-actions/components/client-actions-renderer/domain/entities/State.js +8 -0
- package/es/platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer.js +11 -0
- package/es/platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer.module.css +23 -0
- package/es/platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRendererView.js +25 -0
- package/es/platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/views/DefaultActionsRendererView.js +66 -0
- package/es/platform/client-actions/components/client-actions-renderer/frameworks/ui/more-actions-renderer/MoreActionsRenderer.js +9 -0
- package/es/platform/client-actions/components/client-actions-renderer/frameworks/ui/more-actions-renderer/MoreActionsRendererView.js +81 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/resources/__test__/ClientScriptsFetchSDK.test.js +163 -0
- package/es/platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema.js +4 -1
- package/es/platform/components/form-connected/frameworks/FormConnectedView.js +2 -0
- package/es/platform/components/smart-action-band/adapters/presenters/ActionBandTranslator.js +7 -10
- package/es/platform/components/smart-action-band/frameworks/SmartActionBandView.js +18 -5
- package/es/platform/zform/adapters/presenter/FormTranslator.js +8 -12
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +10 -14
- package/es/platform/zform/adapters/presenter/translators/fields/BooleanFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +2 -1
- package/es/platform/zform/adapters/presenter/translators/fields/DateFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/DateTimeFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/DecimalFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/EmailFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/MultiselectFieldTranslator.js +13 -8
- package/es/platform/zform/adapters/presenter/translators/fields/NumberFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/PercentageFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/PhoneFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/PicklistFieldTranslator.js +11 -12
- package/es/platform/zform/adapters/presenter/translators/fields/TextAreaFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/TextFieldTranslator.js +4 -2
- package/es/platform/zform/adapters/presenter/translators/fields/URLFieldTranslator.js +4 -2
- package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +2 -4
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +6 -1
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/Header.js +7 -6
- package/es/platform/zlist/adapters/presenters/translators/Row.js +6 -5
- package/es/platform/zlist/adapters/presenters/translators/fields/DateFieldTranslator.js +7 -3
- package/es/platform/zlist/adapters/presenters/translators/fields/DateTimeFieldTranslator.js +7 -3
- package/package.json +2 -2
- package/es/.DS_Store +0 -0
- package/es/platform/.DS_Store +0 -0
package/es/cc/date/Properties.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
id: {
|
|
3
4
|
defaultValue: '',
|
|
@@ -79,5 +80,19 @@ export default {
|
|
|
79
80
|
type: 'array'
|
|
80
81
|
}
|
|
81
82
|
}
|
|
83
|
+
},
|
|
84
|
+
clientScripts: {
|
|
85
|
+
required: false,
|
|
86
|
+
typeMetadata: {
|
|
87
|
+
schema: clientScriptsSchema
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
context: {
|
|
91
|
+
required: false,
|
|
92
|
+
typeMetadata: {
|
|
93
|
+
schema: {
|
|
94
|
+
type: 'object'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
82
97
|
}
|
|
83
98
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
type: {
|
|
3
4
|
required: false,
|
|
@@ -193,10 +194,16 @@ export default {
|
|
|
193
194
|
}
|
|
194
195
|
},
|
|
195
196
|
clientScripts: {
|
|
197
|
+
required: false,
|
|
198
|
+
typeMetadata: {
|
|
199
|
+
schema: clientScriptsSchema
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
context: {
|
|
196
203
|
required: false,
|
|
197
204
|
typeMetadata: {
|
|
198
205
|
schema: {
|
|
199
|
-
type: '
|
|
206
|
+
type: 'object'
|
|
200
207
|
}
|
|
201
208
|
}
|
|
202
209
|
}
|
package/es/cc/form/Properties.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
label: {
|
|
3
4
|
required: false,
|
|
4
5
|
typeMetadata: {
|
|
5
6
|
schema: {
|
|
6
|
-
type:
|
|
7
|
+
type: 'string'
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
},
|
|
@@ -11,7 +12,7 @@ export default {
|
|
|
11
12
|
required: false,
|
|
12
13
|
typeMetadata: {
|
|
13
14
|
schema: {
|
|
14
|
-
type:
|
|
15
|
+
type: 'string'
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
},
|
|
@@ -20,7 +21,7 @@ export default {
|
|
|
20
21
|
defaultValue: [],
|
|
21
22
|
typeMetadata: {
|
|
22
23
|
schema: {
|
|
23
|
-
type:
|
|
24
|
+
type: 'array'
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
},
|
|
@@ -29,15 +30,21 @@ export default {
|
|
|
29
30
|
defaultValue: false,
|
|
30
31
|
typeMetadata: {
|
|
31
32
|
schema: {
|
|
32
|
-
type:
|
|
33
|
+
type: 'boolean'
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
37
|
clientScripts: {
|
|
38
|
+
required: false,
|
|
39
|
+
typeMetadata: {
|
|
40
|
+
schema: clientScriptsSchema
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
context: {
|
|
37
44
|
required: false,
|
|
38
45
|
typeMetadata: {
|
|
39
46
|
schema: {
|
|
40
|
-
type: '
|
|
47
|
+
type: 'object'
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
50
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
id: {
|
|
3
4
|
defaultValue: '',
|
|
@@ -92,10 +93,16 @@ export default {
|
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
clientScripts: {
|
|
96
|
+
required: false,
|
|
97
|
+
typeMetadata: {
|
|
98
|
+
schema: clientScriptsSchema
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
context: {
|
|
95
102
|
required: false,
|
|
96
103
|
typeMetadata: {
|
|
97
104
|
schema: {
|
|
98
|
-
type: '
|
|
105
|
+
type: 'object'
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
}
|
|
@@ -14,6 +14,7 @@ import PercentProperties from "../fields/percent/Properties";
|
|
|
14
14
|
import PhoneProperties from "../fields/phone/Properties";
|
|
15
15
|
import PickListProperties from "../fields/pick-list/Properties";
|
|
16
16
|
import UrlProperties from "../fields/url/Properties";
|
|
17
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
17
18
|
export default {
|
|
18
19
|
id: {
|
|
19
20
|
required: false,
|
|
@@ -108,10 +109,16 @@ export default {
|
|
|
108
109
|
}
|
|
109
110
|
},
|
|
110
111
|
clientScripts: {
|
|
112
|
+
required: false,
|
|
113
|
+
typeMetadata: {
|
|
114
|
+
schema: clientScriptsSchema
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
context: {
|
|
111
118
|
required: false,
|
|
112
119
|
typeMetadata: {
|
|
113
120
|
schema: {
|
|
114
|
-
type: '
|
|
121
|
+
type: 'object'
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
id: {
|
|
3
4
|
defaultValue: '',
|
|
@@ -84,10 +85,16 @@ export default {
|
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
87
|
clientScripts: {
|
|
88
|
+
required: false,
|
|
89
|
+
typeMetadata: {
|
|
90
|
+
schema: clientScriptsSchema
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
context: {
|
|
87
94
|
required: false,
|
|
88
95
|
typeMetadata: {
|
|
89
96
|
schema: {
|
|
90
|
-
type: '
|
|
97
|
+
type: 'object'
|
|
91
98
|
}
|
|
92
99
|
}
|
|
93
100
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
id: {
|
|
3
4
|
required: false,
|
|
@@ -75,5 +76,19 @@ export default {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
79
|
+
},
|
|
80
|
+
clientScripts: {
|
|
81
|
+
required: false,
|
|
82
|
+
typeMetadata: {
|
|
83
|
+
schema: clientScriptsSchema
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
context: {
|
|
87
|
+
required: false,
|
|
88
|
+
typeMetadata: {
|
|
89
|
+
schema: {
|
|
90
|
+
type: 'object'
|
|
91
|
+
}
|
|
92
|
+
}
|
|
78
93
|
}
|
|
79
94
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientScriptsSchema } from "../../platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema";
|
|
1
2
|
export default {
|
|
2
3
|
id: {
|
|
3
4
|
defaultValue: '',
|
|
@@ -92,10 +93,16 @@ export default {
|
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
clientScripts: {
|
|
96
|
+
required: false,
|
|
97
|
+
typeMetadata: {
|
|
98
|
+
schema: clientScriptsSchema
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
context: {
|
|
95
102
|
required: false,
|
|
96
103
|
typeMetadata: {
|
|
97
104
|
schema: {
|
|
98
|
-
type: '
|
|
105
|
+
type: 'object'
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
}
|
package/es/index.js
CHANGED
|
@@ -3,11 +3,10 @@ import * as CCNamespace from "./cc"; // Import only the ExternalConstants
|
|
|
3
3
|
|
|
4
4
|
import ExternalConstants from "./cc/table-connected/constants/ExternalConstants";
|
|
5
5
|
import ActionEventMediator from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
6
|
-
import RowActionsRenderer from "./platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
7
|
-
import AdaptiveRowActionsRenderer from "./platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer";
|
|
8
6
|
import ClientActionReordererRegistry from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionReordererRegistry";
|
|
9
7
|
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";
|
|
8
|
+
import ClientScriptsFetchSDK from "./platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/resources/ClientScriptsFetchSDK";
|
|
9
|
+
import ClientActionsRenderer from "./platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer"; // Rebuild SmartTableConstants without Events
|
|
11
10
|
|
|
12
11
|
const SmartTableConstants = {
|
|
13
12
|
ExternalConstants
|
|
@@ -31,9 +30,7 @@ export { fetchClientActions } from "./platform/client-actions/components/action-
|
|
|
31
30
|
export { ZFormApiActionName } from "./bc/zform/Constants";
|
|
32
31
|
export { RecordApiActionName } from "./bc/zrecord/Constants";
|
|
33
32
|
export { transFormValidationRules } from "./platform/data-source/utils/validation-rules/TransFormValidationRules";
|
|
34
|
-
export { AdaptiveRowActionsRenderer };
|
|
35
33
|
export { ActionEventMediator };
|
|
36
|
-
export { RowActionsRenderer };
|
|
37
34
|
export { renderField } from "./library/dot/components/section/frameworks/ui/RenderField";
|
|
38
35
|
export { default as ResourceNamesEnum } from "./bc/sdk/ResourceNamesEnum";
|
|
39
36
|
import { FieldSectionEventMappingBehaviourFactory } from "./library/dot/components/section/frameworks/ui/Section";
|
|
@@ -44,4 +41,5 @@ export const Behaviours = {
|
|
|
44
41
|
export * from "./library/analytics";
|
|
45
42
|
export { ClientActionReordererRegistry };
|
|
46
43
|
export { ClientActionsFetchSDK };
|
|
47
|
-
export { ClientScriptsFetchSDK };
|
|
44
|
+
export { ClientScriptsFetchSDK };
|
|
45
|
+
export { ClientActionsRenderer };
|
|
@@ -47,7 +47,8 @@ export function TransformState(state) {
|
|
|
47
47
|
footerLeftActions,
|
|
48
48
|
footerRightActions,
|
|
49
49
|
rightPanel,
|
|
50
|
-
clientScripts
|
|
50
|
+
clientScripts,
|
|
51
|
+
context
|
|
51
52
|
} = state.properties; // const { values, errorMessages } = state.behaviours.form;
|
|
52
53
|
|
|
53
54
|
const updatedSections = updateFieldValues({
|
|
@@ -67,6 +68,7 @@ export function TransformState(state) {
|
|
|
67
68
|
footerLeftActions,
|
|
68
69
|
footerRightActions,
|
|
69
70
|
clientScripts,
|
|
71
|
+
context,
|
|
70
72
|
rightPanel
|
|
71
73
|
}
|
|
72
74
|
};
|
|
@@ -18,7 +18,8 @@ function FormView(_ref, ref) {
|
|
|
18
18
|
footerRightActions,
|
|
19
19
|
isHeaderEnabled,
|
|
20
20
|
isFooterEnabled,
|
|
21
|
-
clientScripts
|
|
21
|
+
clientScripts,
|
|
22
|
+
context
|
|
22
23
|
} = state.viewModel;
|
|
23
24
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
24
25
|
$ui_displayMode: "flex",
|
|
@@ -32,7 +33,8 @@ function FormView(_ref, ref) {
|
|
|
32
33
|
hasHeader: isHeaderEnabled,
|
|
33
34
|
headerLeftActions: headerLeftActions,
|
|
34
35
|
headerRightActions: headerRightActions,
|
|
35
|
-
clientScripts: clientScripts
|
|
36
|
+
clientScripts: clientScripts,
|
|
37
|
+
context: context
|
|
36
38
|
}), /*#__PURE__*/React.createElement(MiddleSection, {
|
|
37
39
|
sections: sections,
|
|
38
40
|
isLoading: isLoading,
|
|
@@ -42,7 +44,8 @@ function FormView(_ref, ref) {
|
|
|
42
44
|
hasFooter: isFooterEnabled,
|
|
43
45
|
footerLeftActions: footerLeftActions,
|
|
44
46
|
footerRightActions: footerRightActions,
|
|
45
|
-
clientScripts: clientScripts
|
|
47
|
+
clientScripts: clientScripts,
|
|
48
|
+
context: context
|
|
46
49
|
}));
|
|
47
50
|
}
|
|
48
51
|
|
|
@@ -3,28 +3,38 @@ import FormAction, { LeftSide, RightSide } from '@zohodesk/dot/es/FormAction/For
|
|
|
3
3
|
import { ActionViewGap } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
4
4
|
|
|
5
5
|
import style from "../css/Form.module.css";
|
|
6
|
-
import
|
|
6
|
+
import ClientActionsRenderer from "../../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
7
|
+
import { Layout } from "../../../../../../../platform/client-actions/components/client-actions-renderer/domain/entities/State";
|
|
7
8
|
export default function Footer(_ref) {
|
|
8
9
|
let {
|
|
9
10
|
hasFooter,
|
|
10
11
|
footerLeftActions,
|
|
11
12
|
footerRightActions,
|
|
12
|
-
clientScripts
|
|
13
|
+
clientScripts,
|
|
14
|
+
context
|
|
13
15
|
} = _ref;
|
|
14
16
|
if (!hasFooter) return null;
|
|
15
17
|
return /*#__PURE__*/React.createElement(FormAction, {
|
|
16
18
|
size: "small",
|
|
17
19
|
paddingLeftSize: "xmedium",
|
|
18
20
|
paddingRightClass: style.footer
|
|
19
|
-
}, /*#__PURE__*/React.createElement(LeftSide, null, footerLeftActions.length > 0 && /*#__PURE__*/React.createElement(
|
|
21
|
+
}, /*#__PURE__*/React.createElement(LeftSide, null, footerLeftActions.length > 0 && /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
20
22
|
testId: "formFooter_leftActions",
|
|
21
23
|
actions: footerLeftActions,
|
|
22
24
|
clientScripts: clientScripts,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
context: context,
|
|
26
|
+
viewMeta: {
|
|
27
|
+
layout: Layout.HORIZONTAL,
|
|
28
|
+
gap: ActionViewGap.LARGE
|
|
29
|
+
}
|
|
30
|
+
})), /*#__PURE__*/React.createElement(RightSide, null, footerRightActions.length > 0 && /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
25
31
|
testId: "formFooter_rightActions",
|
|
26
32
|
actions: footerRightActions,
|
|
27
33
|
clientScripts: clientScripts,
|
|
28
|
-
|
|
34
|
+
context: context,
|
|
35
|
+
viewMeta: {
|
|
36
|
+
layout: Layout.HORIZONTAL,
|
|
37
|
+
gap: ActionViewGap.LARGE
|
|
38
|
+
}
|
|
29
39
|
})));
|
|
30
40
|
}
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FormHeader from '@zohodesk-private/desk-components/es/setup/SetupHeader/SetupHeader';
|
|
3
3
|
import { ActionViewGap } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
4
|
-
import
|
|
4
|
+
import ClientActionsRenderer from "../../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
5
|
+
import { Layout } from "../../../../../../../platform/client-actions/components/client-actions-renderer/domain/entities/State";
|
|
5
6
|
export default function Header(_ref) {
|
|
6
7
|
let {
|
|
7
8
|
hasHeader,
|
|
8
9
|
headerLeftActions,
|
|
9
10
|
headerRightActions,
|
|
10
|
-
clientScripts
|
|
11
|
+
clientScripts,
|
|
12
|
+
context
|
|
11
13
|
} = _ref;
|
|
12
14
|
if (!hasHeader) return null;
|
|
13
15
|
return /*#__PURE__*/React.createElement(FormHeader, {
|
|
14
16
|
customId: "formHeader",
|
|
15
17
|
testId: "formHeader",
|
|
16
|
-
$render_leftElement: headerLeftActions.length > 0 ? /*#__PURE__*/React.createElement(
|
|
18
|
+
$render_leftElement: headerLeftActions.length > 0 ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
17
19
|
actions: headerLeftActions,
|
|
18
20
|
clientScripts: clientScripts,
|
|
19
|
-
|
|
21
|
+
context: context,
|
|
22
|
+
viewMeta: {
|
|
23
|
+
layout: Layout.HORIZONTAL,
|
|
24
|
+
gap: ActionViewGap.LARGE
|
|
25
|
+
}
|
|
20
26
|
}) : null,
|
|
21
|
-
$render_rightElement: headerRightActions.length > 0 ? /*#__PURE__*/React.createElement(
|
|
27
|
+
$render_rightElement: headerRightActions.length > 0 ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
22
28
|
actions: headerRightActions,
|
|
23
29
|
clientScripts: clientScripts,
|
|
24
|
-
|
|
30
|
+
context: context,
|
|
31
|
+
viewMeta: {
|
|
32
|
+
layout: Layout.HORIZONTAL,
|
|
33
|
+
gap: ActionViewGap.MEDIUM
|
|
34
|
+
}
|
|
25
35
|
}) : null
|
|
26
36
|
});
|
|
27
37
|
}
|
|
@@ -22,7 +22,8 @@ export default function Sections(_ref) {
|
|
|
22
22
|
type,
|
|
23
23
|
titleActions,
|
|
24
24
|
headerActions,
|
|
25
|
-
additionalDetails
|
|
25
|
+
additionalDetails,
|
|
26
|
+
context
|
|
26
27
|
} = section;
|
|
27
28
|
const Section = ComponentRegistry.get(type);
|
|
28
29
|
if (isVisible === false) return null;
|
|
@@ -37,7 +38,8 @@ export default function Sections(_ref) {
|
|
|
37
38
|
titleActions: titleActions,
|
|
38
39
|
headerActions: headerActions,
|
|
39
40
|
additionalDetails: additionalDetails,
|
|
40
|
-
clientScripts: clientScripts
|
|
41
|
+
clientScripts: clientScripts,
|
|
42
|
+
context: context
|
|
41
43
|
});
|
|
42
44
|
}));
|
|
43
45
|
}
|
|
@@ -35,7 +35,8 @@ function CheckboxView(_ref2, ref) {
|
|
|
35
35
|
readonly,
|
|
36
36
|
required,
|
|
37
37
|
labelActions,
|
|
38
|
-
clientScripts
|
|
38
|
+
clientScripts,
|
|
39
|
+
context
|
|
39
40
|
} = state.properties;
|
|
40
41
|
const {
|
|
41
42
|
size,
|
|
@@ -48,7 +49,8 @@ function CheckboxView(_ref2, ref) {
|
|
|
48
49
|
errorMessage: errorMessage,
|
|
49
50
|
testId: "smart_form_field_checkbox",
|
|
50
51
|
size: size,
|
|
51
|
-
breakRow: breakRow
|
|
52
|
+
breakRow: breakRow,
|
|
53
|
+
context: context
|
|
52
54
|
}, /*#__PURE__*/React.createElement(FieldController, {
|
|
53
55
|
$ui_className: `${style.checkboxField} ${cursorStyle({
|
|
54
56
|
disabled,
|
|
@@ -76,7 +78,8 @@ function CheckboxView(_ref2, ref) {
|
|
|
76
78
|
label: label,
|
|
77
79
|
actions: labelActions,
|
|
78
80
|
isMandatory: required,
|
|
79
|
-
clientScripts: clientScripts
|
|
81
|
+
clientScripts: clientScripts,
|
|
82
|
+
context: context
|
|
80
83
|
})));
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -28,7 +28,8 @@ function CurrencyView(_ref, ref) {
|
|
|
28
28
|
labelActions,
|
|
29
29
|
actions,
|
|
30
30
|
uiConfig,
|
|
31
|
-
clientScripts
|
|
31
|
+
clientScripts,
|
|
32
|
+
context
|
|
32
33
|
} = properties;
|
|
33
34
|
const {
|
|
34
35
|
size,
|
|
@@ -48,7 +49,8 @@ function CurrencyView(_ref, ref) {
|
|
|
48
49
|
errorMessage: errorMessage,
|
|
49
50
|
testId: "smart_form_field_currency",
|
|
50
51
|
size: size,
|
|
51
|
-
breakRow: breakRow
|
|
52
|
+
breakRow: breakRow,
|
|
53
|
+
context: context
|
|
52
54
|
}, /*#__PURE__*/React.createElement("div", {
|
|
53
55
|
className: style.field
|
|
54
56
|
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
@@ -60,7 +62,8 @@ function CurrencyView(_ref, ref) {
|
|
|
60
62
|
readonly: readonly,
|
|
61
63
|
required: required,
|
|
62
64
|
actions: actions,
|
|
63
|
-
clientScripts: clientScripts
|
|
65
|
+
clientScripts: clientScripts,
|
|
66
|
+
context: context
|
|
64
67
|
})));
|
|
65
68
|
}
|
|
66
69
|
|
|
@@ -19,7 +19,8 @@ function DateView(_ref, ref) {
|
|
|
19
19
|
uiConfig,
|
|
20
20
|
labelActions,
|
|
21
21
|
actions,
|
|
22
|
-
clientScripts
|
|
22
|
+
clientScripts,
|
|
23
|
+
context
|
|
23
24
|
} = state.properties;
|
|
24
25
|
const {
|
|
25
26
|
size,
|
|
@@ -34,7 +35,8 @@ function DateView(_ref, ref) {
|
|
|
34
35
|
size: size,
|
|
35
36
|
breakRow: breakRow,
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
|
-
testId:
|
|
38
|
+
testId: 'smart_form_field_date',
|
|
39
|
+
context: context
|
|
38
40
|
}, /*#__PURE__*/React.createElement("div", {
|
|
39
41
|
className: style.field
|
|
40
42
|
}, /*#__PURE__*/React.createElement(Date, {
|
|
@@ -44,7 +46,8 @@ function DateView(_ref, ref) {
|
|
|
44
46
|
readonly: readonly,
|
|
45
47
|
required: required,
|
|
46
48
|
actions: actions,
|
|
47
|
-
clientScripts: clientScripts
|
|
49
|
+
clientScripts: clientScripts,
|
|
50
|
+
context: context
|
|
48
51
|
})));
|
|
49
52
|
}
|
|
50
53
|
|
|
@@ -19,7 +19,8 @@ function DateView(_ref, ref) {
|
|
|
19
19
|
uiConfig,
|
|
20
20
|
labelActions,
|
|
21
21
|
actions,
|
|
22
|
-
clientScripts
|
|
22
|
+
clientScripts,
|
|
23
|
+
context
|
|
23
24
|
} = state.properties;
|
|
24
25
|
const {
|
|
25
26
|
size,
|
|
@@ -34,7 +35,8 @@ function DateView(_ref, ref) {
|
|
|
34
35
|
size: size,
|
|
35
36
|
breakRow: breakRow,
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
|
-
testId:
|
|
38
|
+
testId: 'smart_form_field_datetime',
|
|
39
|
+
context: context
|
|
38
40
|
}, /*#__PURE__*/React.createElement("div", {
|
|
39
41
|
className: style.field
|
|
40
42
|
}, /*#__PURE__*/React.createElement(Date, {
|
|
@@ -45,7 +47,8 @@ function DateView(_ref, ref) {
|
|
|
45
47
|
readonly: readonly,
|
|
46
48
|
actions: actions,
|
|
47
49
|
isTimeIncluded: true,
|
|
48
|
-
clientScripts: clientScripts
|
|
50
|
+
clientScripts: clientScripts,
|
|
51
|
+
context: context
|
|
49
52
|
})));
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -21,7 +21,8 @@ function DecimalView(_ref, ref) {
|
|
|
21
21
|
uiConfig,
|
|
22
22
|
labelActions,
|
|
23
23
|
actions,
|
|
24
|
-
clientScripts
|
|
24
|
+
clientScripts,
|
|
25
|
+
context
|
|
25
26
|
} = state.properties;
|
|
26
27
|
const {
|
|
27
28
|
size,
|
|
@@ -36,7 +37,8 @@ function DecimalView(_ref, ref) {
|
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
38
|
testId: "smart_form_field_decimal",
|
|
38
39
|
size: size,
|
|
39
|
-
breakRow: breakRow
|
|
40
|
+
breakRow: breakRow,
|
|
41
|
+
context: context
|
|
40
42
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41
43
|
className: style.field
|
|
42
44
|
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
@@ -48,7 +50,8 @@ function DecimalView(_ref, ref) {
|
|
|
48
50
|
disabled: disabled,
|
|
49
51
|
readonly: readonly,
|
|
50
52
|
actions: actions,
|
|
51
|
-
clientScripts: clientScripts
|
|
53
|
+
clientScripts: clientScripts,
|
|
54
|
+
context: context
|
|
52
55
|
})));
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -21,7 +21,8 @@ function EmailView(_ref, ref) {
|
|
|
21
21
|
uiConfig,
|
|
22
22
|
labelActions,
|
|
23
23
|
actions,
|
|
24
|
-
clientScripts
|
|
24
|
+
clientScripts,
|
|
25
|
+
context
|
|
25
26
|
} = state.properties;
|
|
26
27
|
const {
|
|
27
28
|
size,
|
|
@@ -36,7 +37,8 @@ function EmailView(_ref, ref) {
|
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
38
|
testId: "smart_form_field_email",
|
|
38
39
|
size: size,
|
|
39
|
-
breakRow: breakRow
|
|
40
|
+
breakRow: breakRow,
|
|
41
|
+
context: context
|
|
40
42
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41
43
|
className: style.field
|
|
42
44
|
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
@@ -48,7 +50,8 @@ function EmailView(_ref, ref) {
|
|
|
48
50
|
readonly: readonly,
|
|
49
51
|
required: required,
|
|
50
52
|
actions: actions,
|
|
51
|
-
clientScripts: clientScripts
|
|
53
|
+
clientScripts: clientScripts,
|
|
54
|
+
context: context
|
|
52
55
|
})));
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -13,7 +13,8 @@ const FieldItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13
13
|
breakRow,
|
|
14
14
|
errorMessage,
|
|
15
15
|
testId,
|
|
16
|
-
children
|
|
16
|
+
children,
|
|
17
|
+
context
|
|
17
18
|
} = props;
|
|
18
19
|
const isLargeSize = size === 'large';
|
|
19
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -24,7 +25,8 @@ const FieldItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24
25
|
for: id,
|
|
25
26
|
label: label,
|
|
26
27
|
actions: labelActions,
|
|
27
|
-
isMandatory: required
|
|
28
|
+
isMandatory: required,
|
|
29
|
+
context: context
|
|
28
30
|
}), !isLargeSize && breakRow ? /*#__PURE__*/React.createElement("div", {
|
|
29
31
|
className: style.breakRow
|
|
30
32
|
}, children) : children, errorMessage ? /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
@@ -20,7 +20,8 @@ function TextBoxView(_ref, ref) {
|
|
|
20
20
|
uiConfig,
|
|
21
21
|
labelActions,
|
|
22
22
|
actions,
|
|
23
|
-
clientScripts
|
|
23
|
+
clientScripts,
|
|
24
|
+
context
|
|
24
25
|
} = state.properties;
|
|
25
26
|
const {
|
|
26
27
|
size,
|
|
@@ -35,7 +36,8 @@ function TextBoxView(_ref, ref) {
|
|
|
35
36
|
errorMessage: errorMessage,
|
|
36
37
|
testId: 'smart_form_field_lookup',
|
|
37
38
|
size: size,
|
|
38
|
-
breakRow: breakRow
|
|
39
|
+
breakRow: breakRow,
|
|
40
|
+
context: context
|
|
39
41
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: style.field
|
|
41
43
|
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
@@ -46,7 +48,8 @@ function TextBoxView(_ref, ref) {
|
|
|
46
48
|
disabled: disabled,
|
|
47
49
|
readonly: readonly,
|
|
48
50
|
actions: actions,
|
|
49
|
-
clientScripts: clientScripts
|
|
51
|
+
clientScripts: clientScripts,
|
|
52
|
+
context: context
|
|
50
53
|
})));
|
|
51
54
|
}
|
|
52
55
|
|