@zohodesk/library-platform 1.2.2-exp.2 → 1.2.2-exp.6
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/css/Form.module.css +13 -13
- 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/field/css/FieldItem.module.css +2 -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/section/frameworks/ui/css/Section.module.css +3 -3
- 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/css/TableList.module.css +25 -25
- 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/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -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/date/frameworks/ui/css/DateView.module.css +1 -1
- 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/label/frameworks/ui/css/Label.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +21 -8
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +7 -7
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/RadioDropdownView.js +3 -1
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/css/RadioDropdown.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +18 -8
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/css/Select.module.css +2 -2
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/css/TableColumnChooserView.module.css +1 -1
- 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/radio-dropdown-field/frameworks/ui/css/RadioDropdownField.module.css +1 -1
- 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/text-area/frameworks/ui/css/TextAreaView.module.css +3 -3
- 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/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/{row-actions-renderer/frameworks/ui/MoreActions → client-actions-renderer/frameworks/ui/more-actions-renderer}/MoreActionsRenderer.js +3 -4
- package/es/platform/client-actions/components/{row-actions-renderer/frameworks/ui/MoreActions → client-actions-renderer/frameworks/ui/more-actions-renderer}/MoreActionsRendererView.js +32 -30
- 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/.DS_Store +0 -0
- package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +0 -1
- package/es/platform/.DS_Store +0 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer.js +0 -12
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRendererView.js +0 -42
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.js +0 -12
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +0 -23
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRendererView.js +0 -37
- /package/es/platform/client-actions/components/{row-actions-renderer/domain/entities/interfaces/IState.js → client-actions-renderer/domain/entities/ClientActionsRendererDatatype.js} +0 -0
|
@@ -4,7 +4,8 @@ import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
|
4
4
|
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import style from "./css/Label.module.css";
|
|
7
|
-
import
|
|
7
|
+
import ClientActionsRenderer from "../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
8
|
+
import { Layout } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
8
9
|
|
|
9
10
|
function LabelView(_ref, ref) {
|
|
10
11
|
let {
|
|
@@ -15,7 +16,8 @@ function LabelView(_ref, ref) {
|
|
|
15
16
|
for: htmlFor,
|
|
16
17
|
isMandatory,
|
|
17
18
|
actions,
|
|
18
|
-
clientScripts
|
|
19
|
+
clientScripts,
|
|
20
|
+
context
|
|
19
21
|
} = state.properties;
|
|
20
22
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
21
23
|
ref: ref,
|
|
@@ -27,10 +29,14 @@ function LabelView(_ref, ref) {
|
|
|
27
29
|
htmlFor: htmlFor,
|
|
28
30
|
palette: isMandatory ? 'mandatory' : 'default',
|
|
29
31
|
customClass: `${style.label} ${isMandatory ? style.mandatory : ''}`
|
|
30
|
-
}), actions.length ? /*#__PURE__*/React.createElement(
|
|
32
|
+
}), actions.length ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
31
33
|
actions: actions,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
clientScripts: clientScripts,
|
|
35
|
+
context: context,
|
|
36
|
+
viewMeta: {
|
|
37
|
+
layout: Layout.HORIZONTAL,
|
|
38
|
+
gap: ActionViewGap.XMEDIUM
|
|
39
|
+
}
|
|
34
40
|
}) : null);
|
|
35
41
|
}
|
|
36
42
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.label {
|
|
2
2
|
--label_cursor: inherit
|
|
3
3
|
}[dir=ltr] .label {
|
|
4
|
-
padding-right:
|
|
4
|
+
padding-right: 6px
|
|
5
5
|
}[dir=rtl] .label {
|
|
6
|
-
padding-left:
|
|
6
|
+
padding-left: 6px
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.mandatory::after {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
[dir=ltr] .mandatory::after {
|
|
14
|
-
padding-left:
|
|
14
|
+
padding-left: 2px
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
[dir=rtl] .mandatory::after {
|
|
18
|
-
padding-right:
|
|
18
|
+
padding-right: 2px
|
|
19
19
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import MultiSelect from "@zohodesk/components/es/MultiSelect/MultiSelect";
|
|
3
3
|
import { MultiSelectConstants } from "../../../../../../cc/multi-select";
|
|
4
|
-
import RowActionsRenderer from "../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
5
4
|
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
6
5
|
|
|
7
6
|
import style from "./css/MultiSelectView.module.css";
|
|
7
|
+
import ClientActionsRenderer from "../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
8
|
+
import { Layout } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
8
9
|
|
|
9
10
|
function MultiSelectView(_ref, ref) {
|
|
10
11
|
let {
|
|
@@ -24,18 +25,26 @@ function MultiSelectView(_ref, ref) {
|
|
|
24
25
|
disabled,
|
|
25
26
|
readonly,
|
|
26
27
|
actions,
|
|
27
|
-
clientScripts
|
|
28
|
+
clientScripts,
|
|
29
|
+
context
|
|
28
30
|
} = state.properties;
|
|
29
31
|
const transformedOptions = options.map(option => {
|
|
32
|
+
const {
|
|
33
|
+
context
|
|
34
|
+
} = option;
|
|
30
35
|
const baseOption = option;
|
|
31
36
|
|
|
32
37
|
if (option.optionActions && option.optionActions.length !== 0) {
|
|
33
38
|
return { ...option,
|
|
34
39
|
listItemCustomProps: {
|
|
35
|
-
renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement(
|
|
40
|
+
renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
36
41
|
actions: option.optionActions,
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
clientScripts: clientScripts,
|
|
43
|
+
context: context,
|
|
44
|
+
viewMeta: {
|
|
45
|
+
layout: Layout.HORIZONTAL,
|
|
46
|
+
gap: ActionViewGap.SMALL
|
|
47
|
+
}
|
|
39
48
|
}),
|
|
40
49
|
customClass: {
|
|
41
50
|
customValueRightPlaceholder: style.optionActionsContainer
|
|
@@ -51,10 +60,14 @@ function MultiSelectView(_ref, ref) {
|
|
|
51
60
|
if (!actions?.length) return null;
|
|
52
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
53
62
|
className: style.fieldActionsContainer
|
|
54
|
-
}, /*#__PURE__*/React.createElement(
|
|
63
|
+
}, /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
55
64
|
actions: actions,
|
|
56
|
-
|
|
57
|
-
|
|
65
|
+
clientScripts: clientScripts,
|
|
66
|
+
context: context,
|
|
67
|
+
viewMeta: {
|
|
68
|
+
layout: Layout.HORIZONTAL,
|
|
69
|
+
gap: ActionViewGap.SMALL
|
|
70
|
+
}
|
|
58
71
|
}));
|
|
59
72
|
};
|
|
60
73
|
|
package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
.fieldActionsContainer {
|
|
2
|
-
margin-top:
|
|
2
|
+
margin-top: 4px;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
[dir=ltr] .optionActionsContainer {
|
|
6
|
-
margin-left:
|
|
6
|
+
margin-left: 4px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
[dir=rtl] .optionActionsContainer {
|
|
10
|
-
margin-right:
|
|
10
|
+
margin-right: 4px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.custmInputWrapper {
|
|
14
14
|
position: absolute;
|
|
15
|
-
top: 0
|
|
16
|
-
width: 100
|
|
15
|
+
top: 0;
|
|
16
|
+
width: 100%;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
[dir=ltr] .custmInputWrapper {
|
|
20
|
-
left: 0
|
|
20
|
+
left: 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
[dir=rtl] .custmInputWrapper {
|
|
24
|
-
right: 0
|
|
24
|
+
right: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.clearIconContainer {
|
package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/css/RadioDropdown.module.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
.wrapper {
|
|
3
|
-
max-width: 100%
|
|
3
|
+
max-width: 100%
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.disabled {
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
.downIcon {
|
|
12
12
|
flex-shrink: 0;
|
|
13
13
|
opacity: 0.4;
|
|
14
|
-
margin-top:
|
|
14
|
+
margin-top: 2px
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
[dir=ltr] .downIcon {
|
|
18
|
-
margin-left:
|
|
18
|
+
margin-left: 4px
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
[dir=rtl] .downIcon {
|
|
22
|
-
margin-right:
|
|
22
|
+
margin-right: 4px
|
|
23
23
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Select from '@zohodesk/components/es/Select/Select';
|
|
3
3
|
import SelectConstants from "../../../../../../cc/select/Constants";
|
|
4
|
-
import RowActionsRenderer from "../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
5
4
|
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
6
5
|
|
|
7
6
|
import style from "./css/Select.module.css";
|
|
7
|
+
import ClientActionsRenderer from "../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
8
|
+
import { Layout } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
8
9
|
|
|
9
10
|
function SelectView(_ref, ref) {
|
|
10
11
|
let {
|
|
@@ -23,7 +24,8 @@ function SelectView(_ref, ref) {
|
|
|
23
24
|
disabled,
|
|
24
25
|
readonly,
|
|
25
26
|
actions,
|
|
26
|
-
clientScripts
|
|
27
|
+
clientScripts,
|
|
28
|
+
context
|
|
27
29
|
} = state.properties;
|
|
28
30
|
const transformedOptions = options.map(option => {
|
|
29
31
|
const baseOption = {
|
|
@@ -34,10 +36,14 @@ function SelectView(_ref, ref) {
|
|
|
34
36
|
if (option.optionActions && option.optionActions.length !== 0) {
|
|
35
37
|
return { ...baseOption,
|
|
36
38
|
listItemCustomProps: {
|
|
37
|
-
renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement(
|
|
39
|
+
renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
38
40
|
actions: option.optionActions,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
clientScripts: clientScripts,
|
|
42
|
+
context: context,
|
|
43
|
+
viewMeta: {
|
|
44
|
+
layout: Layout.HORIZONTAL,
|
|
45
|
+
gap: ActionViewGap.SMALL
|
|
46
|
+
}
|
|
41
47
|
}),
|
|
42
48
|
customClass: {
|
|
43
49
|
customValueRightPlaceholder: style.optionActionsContainer
|
|
@@ -50,10 +56,14 @@ function SelectView(_ref, ref) {
|
|
|
50
56
|
});
|
|
51
57
|
|
|
52
58
|
const renderRightFieldActions = () => {
|
|
53
|
-
return actions?.length ? /*#__PURE__*/React.createElement(
|
|
59
|
+
return actions?.length ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
54
60
|
actions: actions,
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
clientScripts: clientScripts,
|
|
62
|
+
context: context,
|
|
63
|
+
viewMeta: {
|
|
64
|
+
layout: Layout.HORIZONTAL,
|
|
65
|
+
gap: ActionViewGap.SMALL
|
|
66
|
+
}
|
|
57
67
|
}) : null;
|
|
58
68
|
};
|
|
59
69
|
|
package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/EventHandlersFactory.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TableColumnFilterConstants from "../../../../../../cc/table-column-filter/Constants";
|
|
2
|
+
import { SEARCH_REQUESTED } from "../../../../../../bc/search/Constants";
|
|
3
|
+
export default class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const searchHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
dispatch,
|
|
8
|
+
action
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
searchText
|
|
12
|
+
} = action.payload;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: SEARCH_REQUESTED,
|
|
15
|
+
payload: {
|
|
16
|
+
searchString: searchText
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[TableColumnFilterConstants.FILTER_SEARCHED]: searchHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilter.js
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import { createCustomComponent } from "../../../../../custom-component";
|
|
2
2
|
import TableColumnFilterProperties from "../../../../../../cc/table-column-filter/Properties";
|
|
3
3
|
import TableColumnFilterEvents from "../../../../../../cc/table-column-filter/Events";
|
|
4
|
+
import SearchTranslator from "../../../../../behaviours/search/adapters/presenter/SearchTranslator";
|
|
5
|
+
import SearchBehaviourFactory from "../../../../../behaviours/search/frameworks/ui/SearchStringStoreBehaviourFactory";
|
|
6
|
+
import EventHandlersFactory from "./EventHandlersFactory";
|
|
4
7
|
import TableColumnFilterView from "./TableColumnFilterView";
|
|
8
|
+
|
|
9
|
+
function transformState(state) {
|
|
10
|
+
const {
|
|
11
|
+
searchString
|
|
12
|
+
} = state.behaviours.search;
|
|
13
|
+
return { ...state,
|
|
14
|
+
viewModel: { ...state.properties,
|
|
15
|
+
...state.viewModel,
|
|
16
|
+
options: SearchTranslator(searchString, 'value', state.properties.options)
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
5
21
|
const TableColumnFilter = createCustomComponent({
|
|
6
22
|
name: 'TableColumnFilter',
|
|
7
23
|
View: TableColumnFilterView,
|
|
24
|
+
transformState,
|
|
8
25
|
properties: TableColumnFilterProperties,
|
|
26
|
+
behaviours: [SearchBehaviourFactory.create()],
|
|
9
27
|
events: TableColumnFilterEvents,
|
|
10
|
-
eventHandlers:
|
|
28
|
+
eventHandlers: EventHandlersFactory.create()
|
|
11
29
|
});
|
|
12
30
|
export default TableColumnFilter;
|
package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js
CHANGED
|
@@ -22,11 +22,12 @@ function TableColumnFilterView(_ref, ref) {
|
|
|
22
22
|
heading,
|
|
23
23
|
hasSearch,
|
|
24
24
|
searchPlaceholder,
|
|
25
|
+
emptyStateMessage,
|
|
25
26
|
hasClearButton,
|
|
26
27
|
clearFilterLabel,
|
|
27
28
|
optionTagLabel,
|
|
28
29
|
taggedOption
|
|
29
|
-
} = state.
|
|
30
|
+
} = state.viewModel;
|
|
30
31
|
|
|
31
32
|
const handleFilter = (_ref2, e) => {
|
|
32
33
|
let {
|
|
@@ -87,6 +88,7 @@ function TableColumnFilterView(_ref, ref) {
|
|
|
87
88
|
options,
|
|
88
89
|
hasSearch,
|
|
89
90
|
searchPlaceholder,
|
|
91
|
+
emptyStateTitle: emptyStateMessage,
|
|
90
92
|
hasClearButton,
|
|
91
93
|
isClearButtonDisabled: !isFiltered,
|
|
92
94
|
clearFilterLabel,
|
|
@@ -10,7 +10,10 @@ export default function HighlightedValueFieldView(_ref, ref) {
|
|
|
10
10
|
tooltip,
|
|
11
11
|
weight,
|
|
12
12
|
isDotted,
|
|
13
|
-
cursor
|
|
13
|
+
cursor,
|
|
14
|
+
iconName,
|
|
15
|
+
iconSize,
|
|
16
|
+
iconPosition
|
|
14
17
|
} = state.properties;
|
|
15
18
|
return /*#__PURE__*/React.createElement(HighlightedValue, {
|
|
16
19
|
getRef: ref,
|
|
@@ -19,6 +22,9 @@ export default function HighlightedValueFieldView(_ref, ref) {
|
|
|
19
22
|
tooltip: tooltip,
|
|
20
23
|
cursor: cursor,
|
|
21
24
|
weight: weight,
|
|
22
|
-
isDotted: isDotted
|
|
25
|
+
isDotted: isDotted,
|
|
26
|
+
iconName: iconName,
|
|
27
|
+
iconSize: iconSize,
|
|
28
|
+
iconPosition: iconPosition
|
|
23
29
|
});
|
|
24
30
|
}
|
|
@@ -15,13 +15,15 @@ export class EventHandlersFactory {
|
|
|
15
15
|
fieldType
|
|
16
16
|
} = state.properties;
|
|
17
17
|
const {
|
|
18
|
-
id
|
|
18
|
+
id,
|
|
19
|
+
previousId
|
|
19
20
|
} = action.payload;
|
|
20
21
|
dispatch({
|
|
21
22
|
type: FieldConstants.FIELD_CHANGED,
|
|
22
23
|
payload: {
|
|
23
24
|
fieldName,
|
|
24
|
-
value: fieldType === 'Boolean' ? id === 'true' : id
|
|
25
|
+
value: fieldType === 'Boolean' ? id === 'true' : id,
|
|
26
|
+
previousValue: fieldType === 'Boolean' ? previousId === 'true' : previousId
|
|
25
27
|
}
|
|
26
28
|
});
|
|
27
29
|
};
|
|
@@ -3,8 +3,9 @@ import Textarea from '@zohodesk/components/es/Textarea/Textarea';
|
|
|
3
3
|
import TextAreaConstants from "../../../../../../cc/textarea/Constants"; // @ts-ignore
|
|
4
4
|
|
|
5
5
|
import style from "./css/TextAreaView.module.css";
|
|
6
|
-
import RowActionsRenderer from "../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
7
6
|
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
7
|
+
import ClientActionsRenderer from "../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
8
|
+
import { Layout } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
8
9
|
|
|
9
10
|
function TextAreaView(_ref, ref) {
|
|
10
11
|
let {
|
|
@@ -23,7 +24,8 @@ function TextAreaView(_ref, ref) {
|
|
|
23
24
|
disabled,
|
|
24
25
|
readonly,
|
|
25
26
|
actions,
|
|
26
|
-
clientScripts
|
|
27
|
+
clientScripts,
|
|
28
|
+
context
|
|
27
29
|
} = state.properties;
|
|
28
30
|
const textAreaRenderer = /*#__PURE__*/React.createElement(Textarea, {
|
|
29
31
|
getRef: ref,
|
|
@@ -64,10 +66,14 @@ function TextAreaView(_ref, ref) {
|
|
|
64
66
|
className: style.hasChildren
|
|
65
67
|
}, textAreaRenderer, /*#__PURE__*/React.createElement("div", {
|
|
66
68
|
className: style.rightPlaceholder
|
|
67
|
-
}, /*#__PURE__*/React.createElement(
|
|
69
|
+
}, /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
68
70
|
actions: actions,
|
|
69
71
|
clientScripts: clientScripts,
|
|
70
|
-
|
|
72
|
+
context: context,
|
|
73
|
+
viewMeta: {
|
|
74
|
+
layout: Layout.HORIZONTAL,
|
|
75
|
+
gap: ActionViewGap.SMALL
|
|
76
|
+
}
|
|
71
77
|
})));
|
|
72
78
|
}
|
|
73
79
|
|
package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
.rightPlaceholder {
|
|
6
6
|
position: absolute;
|
|
7
|
-
bottom:
|
|
7
|
+
bottom: 4px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
[dir=ltr] .rightPlaceholder {
|
|
11
|
-
right:
|
|
11
|
+
right: 12px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
[dir=rtl] .rightPlaceholder {
|
|
15
|
-
left:
|
|
15
|
+
left: 12px;
|
|
16
16
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import TextBox from "@zohodesk/components/es/TextBoxIcon/TextBoxIcon";
|
|
3
3
|
import TextBoxConstants from "../../../../../../cc/textbox/Constants";
|
|
4
|
-
|
|
5
|
-
import { ActionViewGap } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
4
|
+
// eslint-disable-next-line @zohodesk/architecturerules/import-contract
|
|
5
|
+
import { ActionViewGap, Layout } from "../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
6
|
+
import ClientActionsRenderer from "../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
6
7
|
|
|
7
8
|
function TextBoxView(_ref, ref) {
|
|
8
9
|
let {
|
|
@@ -23,14 +24,19 @@ function TextBoxView(_ref, ref) {
|
|
|
23
24
|
disabled,
|
|
24
25
|
readonly,
|
|
25
26
|
actions,
|
|
26
|
-
clientScripts
|
|
27
|
+
clientScripts,
|
|
28
|
+
context
|
|
27
29
|
} = state.properties;
|
|
28
30
|
|
|
29
31
|
const renderRightFieldActions = () => {
|
|
30
|
-
return actions?.length ? /*#__PURE__*/React.createElement(
|
|
32
|
+
return actions?.length ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
31
33
|
actions: actions,
|
|
32
34
|
clientScripts: clientScripts,
|
|
33
|
-
|
|
35
|
+
context: context,
|
|
36
|
+
viewMeta: {
|
|
37
|
+
layout: Layout.HORIZONTAL,
|
|
38
|
+
gap: ActionViewGap.SMALL
|
|
39
|
+
}
|
|
34
40
|
}) : null;
|
|
35
41
|
};
|
|
36
42
|
|