@zohodesk/library-platform 1.2.2-exp.2 → 1.2.2-exp.5
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/action-status/Constants.js +5 -0
- package/es/cc/action-status/Events.js +6 -0
- package/es/cc/action-status/Properties.js +29 -0
- package/es/cc/action-status/index.js +3 -0
- package/es/cc/button/Properties.js +28 -0
- package/es/cc/date/Properties.js +15 -0
- package/es/cc/fields/field/Events.js +8 -0
- package/es/cc/fields/field/Properties.js +8 -1
- package/es/cc/form/Properties.js +8 -0
- package/es/cc/highlighted-value/Properties.js +28 -0
- package/es/cc/index.js +1 -0
- package/es/cc/label/Properties.js +12 -5
- package/es/cc/multi-select/Properties.js +8 -1
- package/es/cc/radio-dropdown/Events.js +16 -0
- package/es/cc/section/Properties.js +8 -1
- package/es/cc/select/Properties.js +8 -1
- package/es/cc/table-column-filter/Properties.js +9 -0
- package/es/cc/table-list/Events.js +8 -0
- 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/action-location/frameworks/ui/ActionComponentMapping.js +3 -1
- package/es/library/dot/components/action-status/frameworks/ui/ActionStatus.js +12 -0
- package/es/library/dot/components/action-status/frameworks/ui/ActionStatusView.js +57 -0
- package/es/library/dot/components/action-status/frameworks/ui/css/ActionStatus.module.css +61 -0
- 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 -7
- package/es/library/dot/components/form/frameworks/ui/sub-components/Header.js +16 -7
- 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 +11 -6
- package/es/library/dot/components/table-list/adapters/controllers/FieldChangeController.js +4 -2
- 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 -6
- 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/button/frameworks/ui/ButtonView.js +17 -2
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +10 -4
- package/es/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValueView.js +13 -2
- package/es/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/css/HighlightedValue.module.css +4 -0
- 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/radio-dropdown/frameworks/ui/RadioDropdownView.js +3 -1
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +18 -8
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilter.js +19 -1
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +3 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/checkbox-field/frameworks/ui/EventHandlersFactory.js +2 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/HighlightedValueFieldView.js +8 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/EventHandlersFactory.js +4 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/EventHandlersFactory.js +2 -1
- 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 +11 -5
- 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 +1 -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-actions/components/interfaces/ActionViewModel.js +7 -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 +17 -5
- package/es/platform/data-source/http-template/getAvailableFields.js +4 -2
- 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 +15 -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/zform/domain/interfaces/IZForm.js +2 -5
- package/es/platform/zform/domain/interfaces/ValidationEvents.js +4 -0
- 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 +19 -6
- package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +0 -1
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FormAction, { LeftSide, RightSide } from '@zohodesk/dot/es/FormAction/FormAction';
|
|
3
|
-
import { ActionViewGap } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
3
|
+
import { ActionViewGap, Layout } 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
7
|
export default function Footer(_ref) {
|
|
8
8
|
let {
|
|
9
9
|
hasFooter,
|
|
10
10
|
footerLeftActions,
|
|
11
11
|
footerRightActions,
|
|
12
|
-
clientScripts
|
|
12
|
+
clientScripts,
|
|
13
|
+
context
|
|
13
14
|
} = _ref;
|
|
14
15
|
if (!hasFooter) return null;
|
|
15
16
|
return /*#__PURE__*/React.createElement(FormAction, {
|
|
16
17
|
size: "small",
|
|
17
18
|
paddingLeftSize: "xmedium",
|
|
18
19
|
paddingRightClass: style.footer
|
|
19
|
-
}, /*#__PURE__*/React.createElement(LeftSide, null, footerLeftActions.length > 0 && /*#__PURE__*/React.createElement(
|
|
20
|
+
}, /*#__PURE__*/React.createElement(LeftSide, null, footerLeftActions.length > 0 && /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
20
21
|
testId: "formFooter_leftActions",
|
|
21
22
|
actions: footerLeftActions,
|
|
22
23
|
clientScripts: clientScripts,
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
context: context,
|
|
25
|
+
viewMeta: {
|
|
26
|
+
layout: Layout.HORIZONTAL,
|
|
27
|
+
gap: ActionViewGap.LARGE
|
|
28
|
+
}
|
|
29
|
+
})), /*#__PURE__*/React.createElement(RightSide, null, footerRightActions.length > 0 && /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
25
30
|
testId: "formFooter_rightActions",
|
|
26
31
|
actions: footerRightActions,
|
|
27
32
|
clientScripts: clientScripts,
|
|
28
|
-
|
|
33
|
+
context: context,
|
|
34
|
+
viewMeta: {
|
|
35
|
+
layout: Layout.HORIZONTAL,
|
|
36
|
+
gap: ActionViewGap.LARGE
|
|
37
|
+
}
|
|
29
38
|
})));
|
|
30
39
|
}
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FormHeader from '@zohodesk-private/desk-components/es/setup/SetupHeader/SetupHeader';
|
|
3
|
-
import { ActionViewGap } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
4
|
-
import
|
|
3
|
+
import { ActionViewGap, Layout } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
4
|
+
import ClientActionsRenderer from "../../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
5
5
|
export default function Header(_ref) {
|
|
6
6
|
let {
|
|
7
7
|
hasHeader,
|
|
8
8
|
headerLeftActions,
|
|
9
9
|
headerRightActions,
|
|
10
|
-
clientScripts
|
|
10
|
+
clientScripts,
|
|
11
|
+
context
|
|
11
12
|
} = _ref;
|
|
12
13
|
if (!hasHeader) return null;
|
|
13
14
|
return /*#__PURE__*/React.createElement(FormHeader, {
|
|
14
15
|
customId: "formHeader",
|
|
15
16
|
testId: "formHeader",
|
|
16
|
-
$render_leftElement: headerLeftActions.length > 0 ? /*#__PURE__*/React.createElement(
|
|
17
|
+
$render_leftElement: headerLeftActions.length > 0 ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
17
18
|
actions: headerLeftActions,
|
|
18
19
|
clientScripts: clientScripts,
|
|
19
|
-
|
|
20
|
+
context: context,
|
|
21
|
+
viewMeta: {
|
|
22
|
+
layout: Layout.HORIZONTAL,
|
|
23
|
+
gap: ActionViewGap.MEDIUM
|
|
24
|
+
}
|
|
20
25
|
}) : null,
|
|
21
|
-
$render_rightElement: headerRightActions.length > 0 ? /*#__PURE__*/React.createElement(
|
|
26
|
+
$render_rightElement: headerRightActions.length > 0 ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
22
27
|
actions: headerRightActions,
|
|
23
28
|
clientScripts: clientScripts,
|
|
24
|
-
|
|
29
|
+
context: context,
|
|
30
|
+
viewMeta: {
|
|
31
|
+
layout: Layout.HORIZONTAL,
|
|
32
|
+
gap: ActionViewGap.MEDIUM
|
|
33
|
+
}
|
|
25
34
|
}) : null
|
|
26
35
|
});
|
|
27
36
|
}
|
|
@@ -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
|
|
|
@@ -26,7 +26,8 @@ function MultiSelectView(_ref, ref) {
|
|
|
26
26
|
labelActions,
|
|
27
27
|
actions,
|
|
28
28
|
uiConfig,
|
|
29
|
-
clientScripts
|
|
29
|
+
clientScripts,
|
|
30
|
+
context
|
|
30
31
|
} = state.properties;
|
|
31
32
|
const {
|
|
32
33
|
size,
|
|
@@ -39,9 +40,10 @@ function MultiSelectView(_ref, ref) {
|
|
|
39
40
|
labelActions: labelActions,
|
|
40
41
|
required: required,
|
|
41
42
|
errorMessage: errorMessage,
|
|
42
|
-
testId:
|
|
43
|
+
testId: 'smart_form_field_multiselect',
|
|
43
44
|
size: size,
|
|
44
|
-
breakRow: breakRow
|
|
45
|
+
breakRow: breakRow,
|
|
46
|
+
context: context
|
|
45
47
|
}, /*#__PURE__*/React.createElement(FieldController, {
|
|
46
48
|
$ui_className: style.multiSelectField,
|
|
47
49
|
$event_onFocus: () => dispatch({
|
|
@@ -58,7 +60,8 @@ function MultiSelectView(_ref, ref) {
|
|
|
58
60
|
disabled: disabled,
|
|
59
61
|
readonly: readonly,
|
|
60
62
|
actions: actions,
|
|
61
|
-
clientScripts: clientScripts
|
|
63
|
+
clientScripts: clientScripts,
|
|
64
|
+
context: context
|
|
62
65
|
})));
|
|
63
66
|
}
|
|
64
67
|
|
|
@@ -21,7 +21,8 @@ function NumberView(_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 NumberView(_ref, ref) {
|
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
38
|
testId: "smart_form_field_number",
|
|
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 NumberView(_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
|
|
|
@@ -20,7 +20,8 @@ function PercentageView(_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,
|
|
@@ -33,9 +34,10 @@ function PercentageView(_ref, ref) {
|
|
|
33
34
|
labelActions: labelActions,
|
|
34
35
|
required: required,
|
|
35
36
|
errorMessage: errorMessage,
|
|
36
|
-
testId:
|
|
37
|
+
testId: 'smart_form_field_percentage',
|
|
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 PercentageView(_ref, ref) {
|
|
|
46
48
|
readonly: readonly,
|
|
47
49
|
required: required,
|
|
48
50
|
actions: actions,
|
|
49
|
-
clientScripts: clientScripts
|
|
51
|
+
clientScripts: clientScripts,
|
|
52
|
+
context: context
|
|
50
53
|
})));
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -21,7 +21,8 @@ function PhoneView(_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 PhoneView(_ref, ref) {
|
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
38
|
testId: "smart_form_field_phone",
|
|
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 PhoneView(_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
|
|
|
@@ -26,7 +26,8 @@ function PickListView(_ref, ref) {
|
|
|
26
26
|
labelActions,
|
|
27
27
|
actions,
|
|
28
28
|
uiConfig,
|
|
29
|
-
clientScripts
|
|
29
|
+
clientScripts,
|
|
30
|
+
context
|
|
30
31
|
} = state.properties;
|
|
31
32
|
const {
|
|
32
33
|
size,
|
|
@@ -39,9 +40,10 @@ function PickListView(_ref, ref) {
|
|
|
39
40
|
labelActions: labelActions,
|
|
40
41
|
required: required,
|
|
41
42
|
errorMessage: errorMessage,
|
|
42
|
-
testId:
|
|
43
|
+
testId: 'smart_form_field_picklist',
|
|
43
44
|
size: size,
|
|
44
|
-
breakRow: breakRow
|
|
45
|
+
breakRow: breakRow,
|
|
46
|
+
context: context
|
|
45
47
|
}, /*#__PURE__*/React.createElement(FieldController, {
|
|
46
48
|
$ui_className: style.field,
|
|
47
49
|
$event_onFocus: () => dispatch({
|
|
@@ -58,7 +60,8 @@ function PickListView(_ref, ref) {
|
|
|
58
60
|
disabled: disabled,
|
|
59
61
|
readonly: readonly,
|
|
60
62
|
actions: actions,
|
|
61
|
-
clientScripts: clientScripts
|
|
63
|
+
clientScripts: clientScripts,
|
|
64
|
+
context: context
|
|
62
65
|
})));
|
|
63
66
|
}
|
|
64
67
|
|
|
@@ -21,7 +21,8 @@ function TextAreaView(_ref, ref) {
|
|
|
21
21
|
labelActions,
|
|
22
22
|
actions,
|
|
23
23
|
clientScripts,
|
|
24
|
-
maxLength
|
|
24
|
+
maxLength,
|
|
25
|
+
context
|
|
25
26
|
} = state.properties;
|
|
26
27
|
const {
|
|
27
28
|
size,
|
|
@@ -36,7 +37,8 @@ function TextAreaView(_ref, ref) {
|
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
38
|
testId: "smart_form_field_textarea",
|
|
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(TextArea, {
|
|
@@ -48,7 +50,8 @@ function TextAreaView(_ref, ref) {
|
|
|
48
50
|
readonly: readonly,
|
|
49
51
|
actions: actions,
|
|
50
52
|
clientScripts: clientScripts,
|
|
51
|
-
maxLength: maxLength
|
|
53
|
+
maxLength: maxLength,
|
|
54
|
+
context: context
|
|
52
55
|
})));
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -21,7 +21,8 @@ function TextBoxView(_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 TextBoxView(_ref, ref) {
|
|
|
36
37
|
errorMessage: errorMessage,
|
|
37
38
|
testId: "smart_form_field_textbox",
|
|
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 TextBoxView(_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 UrlView(_ref, ref) {
|
|
|
21
21
|
required,
|
|
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 UrlView(_ref, ref) {
|
|
|
36
37
|
size: size,
|
|
37
38
|
breakRow: breakRow,
|
|
38
39
|
errorMessage: errorMessage,
|
|
39
|
-
testId: "smart_form_field_url"
|
|
40
|
+
testId: "smart_form_field_url",
|
|
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 UrlView(_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
|
|
|
@@ -5,6 +5,7 @@ import ComponentRegistry from "../../../../../custom-component/frameworks/ui/Com
|
|
|
5
5
|
export function renderField(field, key, clientScripts) {
|
|
6
6
|
const {
|
|
7
7
|
type,
|
|
8
|
+
context,
|
|
8
9
|
...properties
|
|
9
10
|
} = field;
|
|
10
11
|
const Component = ComponentRegistry.get(type);
|
|
@@ -17,6 +18,7 @@ export function renderField(field, key, clientScripts) {
|
|
|
17
18
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
18
19
|
key: key
|
|
19
20
|
}, properties, {
|
|
20
|
-
clientScripts: clientScripts
|
|
21
|
+
clientScripts: clientScripts,
|
|
22
|
+
context: context
|
|
21
23
|
}));
|
|
22
24
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import RowActionsRenderer from "../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
3
2
|
import VelocityAnimationGroup from '@zohodesk/components/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup';
|
|
4
3
|
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
5
4
|
import Section from '@zohodesk-private/desk-components/es/setup/SetupFormBox/SetupFormBox';
|
|
6
5
|
import FieldsLayout from '@zohodesk-private/desk-components/es/form/FieldsLayout/FieldsLayout';
|
|
7
6
|
import { renderField } from "./RenderField";
|
|
8
|
-
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
7
|
+
import { ActionViewGap, Layout } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
9
8
|
|
|
10
9
|
import style from "./css/Section.module.css";
|
|
10
|
+
import ClientActionsRenderer from "../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
11
11
|
|
|
12
12
|
function SectionView(_ref, ref) {
|
|
13
13
|
let {
|
|
@@ -21,7 +21,8 @@ function SectionView(_ref, ref) {
|
|
|
21
21
|
fields,
|
|
22
22
|
titleActions,
|
|
23
23
|
headerActions,
|
|
24
|
-
clientScripts
|
|
24
|
+
clientScripts,
|
|
25
|
+
context
|
|
25
26
|
} = state.properties;
|
|
26
27
|
|
|
27
28
|
const renderActions = actions => {
|
|
@@ -30,10 +31,14 @@ function SectionView(_ref, ref) {
|
|
|
30
31
|
$ui_displayMode: "flex",
|
|
31
32
|
$ui_alignItems: "center",
|
|
32
33
|
$ui_className: style.actionContainer
|
|
33
|
-
}, /*#__PURE__*/React.createElement(
|
|
34
|
+
}, /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
34
35
|
actions: actions,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
clientScripts: clientScripts,
|
|
37
|
+
context: context,
|
|
38
|
+
viewMeta: {
|
|
39
|
+
layout: Layout.HORIZONTAL,
|
|
40
|
+
gap: ActionViewGap.LARGE
|
|
41
|
+
}
|
|
37
42
|
}));
|
|
38
43
|
};
|
|
39
44
|
|
|
@@ -13,7 +13,8 @@ class FieldChangeController extends AbstractController {
|
|
|
13
13
|
} = state;
|
|
14
14
|
const {
|
|
15
15
|
fieldName,
|
|
16
|
-
value
|
|
16
|
+
value,
|
|
17
|
+
previousValue
|
|
17
18
|
} = action.payload;
|
|
18
19
|
const {
|
|
19
20
|
id
|
|
@@ -23,7 +24,8 @@ class FieldChangeController extends AbstractController {
|
|
|
23
24
|
payload: {
|
|
24
25
|
rowId: id,
|
|
25
26
|
fieldName,
|
|
26
|
-
value
|
|
27
|
+
value,
|
|
28
|
+
previousValue
|
|
27
29
|
}
|
|
28
30
|
});
|
|
29
31
|
}
|