@zohodesk/library-platform 1.2.2-exp.1 → 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-connected/SdkContract.js +3 -28
- package/es/cc/table-list/Events.js +8 -0
- package/es/cc/table-list/Properties.js +8 -9
- package/es/cc/table-list/row/Properties.js +6 -19
- 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/custom-component/frameworks/ui/DependencyFactory.js +1 -17
- 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/library/json-schema-validator/Validator.js +338 -0
- package/es/library/json-schema-validator/__tests__/Validator.test.js +753 -0
- package/es/library/json-schema-validator/index.js +1 -0
- 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 +1 -58
- 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/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/sdk/application/interfaces/gateways/AbstractResource.js +1 -1
- 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 -9
- package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +0 -177
- package/es/library/custom-component/frameworks/json-schema-validator/__generated__/registry.js +0 -92
- package/es/library/custom-component/frameworks/json-schema-validator/__generated__/validators.js +0 -1
- package/es/library/custom-component/frameworks/json-schema-validator/__tests__/Validator.test.js +0 -478
- /package/es/{library/custom-component/frameworks/json-schema-validator/__generated__/registry.d.js → platform/client-actions/components/client-actions-renderer/domain/entities/ClientActionsRendererDatatype.js} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
3
|
+
import ColoredTypography from '@zohodesk-private/desk-components/es/ColoredTypography/ColoredTypography';
|
|
4
|
+
import Button from '@zohodesk-private/dot-registry/es/Button/Button';
|
|
5
|
+
import { ActionStatusConstants } from "../../../../../../cc"; // @ts-ignore
|
|
6
|
+
|
|
7
|
+
import styles from "./css/ActionStatus.module.css";
|
|
8
|
+
|
|
9
|
+
function ActionStatusView(_ref, ref) {
|
|
10
|
+
let {
|
|
11
|
+
state,
|
|
12
|
+
helpers
|
|
13
|
+
} = _ref;
|
|
14
|
+
let {
|
|
15
|
+
dispatch
|
|
16
|
+
} = helpers;
|
|
17
|
+
let {
|
|
18
|
+
label,
|
|
19
|
+
actionLabel,
|
|
20
|
+
hasAction
|
|
21
|
+
} = state.properties;
|
|
22
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
23
|
+
ref: ref,
|
|
24
|
+
$ui_displayMode: "inline",
|
|
25
|
+
$ui_alignItems: "center",
|
|
26
|
+
$ui_direction: "row",
|
|
27
|
+
$ui_className: styles.container,
|
|
28
|
+
$a11yAttributes_container: {
|
|
29
|
+
'role': 'status',
|
|
30
|
+
'aria-live': 'polite',
|
|
31
|
+
'aria-busy': true
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
className: styles.spinner,
|
|
35
|
+
"aria-hidden": "true"
|
|
36
|
+
}), label && /*#__PURE__*/React.createElement(ColoredTypography, {
|
|
37
|
+
$ui_size: "15",
|
|
38
|
+
$ui_weight: "regular",
|
|
39
|
+
$ui_color: "grey",
|
|
40
|
+
$flag_dotted: true,
|
|
41
|
+
$ui_className: styles.label
|
|
42
|
+
}, label), hasAction && /*#__PURE__*/React.createElement(Button, {
|
|
43
|
+
palette: "plainPrimary",
|
|
44
|
+
needAppearance: true,
|
|
45
|
+
text: actionLabel,
|
|
46
|
+
onClick: () => {
|
|
47
|
+
dispatch({
|
|
48
|
+
type: ActionStatusConstants.ACTION_STATUS_ACTION_CLICKED
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
customClass: {
|
|
52
|
+
customButton: styles.actionButton
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default ActionStatusView;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@property --_fill {
|
|
2
|
+
syntax: '<angle>';
|
|
3
|
+
inherits: false;
|
|
4
|
+
initial-value: 0deg;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
gap: var(--zd_size8) ;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.spinner {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
width: var(--zd_size16) ;
|
|
14
|
+
height: var(--zd_size16) ;
|
|
15
|
+
/* COLOR VARIABLES TO BE UPDATED PROPERLY USING COMMON COLORS */
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
border: 1px solid transparent;
|
|
20
|
+
background:
|
|
21
|
+
conic-gradient(var(--zdt_coloredtypography_grey_text) var(--_fill, 0deg),
|
|
22
|
+
var(--zdt_filterdropdown_clearbutton_bg) var(--_fill, 0deg)) content-box,
|
|
23
|
+
conic-gradient(var(--zdt_coloredtypography_grey_text) 0deg var(--_fill, 0deg),
|
|
24
|
+
transparent var(--_fill, 0deg) 360deg) border-box,
|
|
25
|
+
conic-gradient(transparent 0deg 4deg,
|
|
26
|
+
var(--zdt_coloredtypography_grey_text) 4deg 86deg,
|
|
27
|
+
transparent 86deg 94deg,
|
|
28
|
+
var(--zdt_coloredtypography_grey_text) 94deg 176deg,
|
|
29
|
+
transparent 176deg 184deg,
|
|
30
|
+
var(--zdt_coloredtypography_grey_text) 184deg 266deg,
|
|
31
|
+
transparent 266deg 274deg,
|
|
32
|
+
var(--zdt_coloredtypography_grey_text) 274deg 356deg,
|
|
33
|
+
transparent 356deg 360deg) border-box;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[dir=ltr] .spinner {
|
|
37
|
+
animation: fill 9s linear infinite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[dir=rtl] .spinner {
|
|
41
|
+
animation: fill 9s linear infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes fill {
|
|
45
|
+
0% {
|
|
46
|
+
--_fill: 0deg;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
100% {
|
|
50
|
+
--_fill: 360deg;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.label {
|
|
55
|
+
line-height: 1.07;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.actionButton {
|
|
59
|
+
--button_font_size: 15px;
|
|
60
|
+
--button_text_transform: none;
|
|
61
|
+
}
|
|
@@ -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
|
|
|
@@ -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
|
|