@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
|
@@ -44,7 +44,8 @@ function TableListView(_ref2, _ref) {
|
|
|
44
44
|
const {
|
|
45
45
|
headers,
|
|
46
46
|
rows,
|
|
47
|
-
clientScripts
|
|
47
|
+
clientScripts,
|
|
48
|
+
massActionsContext
|
|
48
49
|
} = data;
|
|
49
50
|
const {
|
|
50
51
|
hasActions: hasRowActions,
|
|
@@ -100,7 +101,8 @@ function TableListView(_ref2, _ref) {
|
|
|
100
101
|
hasRowActions,
|
|
101
102
|
rowActionsColumnWidth,
|
|
102
103
|
dispatch,
|
|
103
|
-
clientScripts
|
|
104
|
+
clientScripts,
|
|
105
|
+
massActionsContext
|
|
104
106
|
}), renderBody({
|
|
105
107
|
TableRef,
|
|
106
108
|
dispatch,
|
|
@@ -149,7 +151,8 @@ function renderHeader(_ref3) {
|
|
|
149
151
|
hasRowActions,
|
|
150
152
|
rowActionsColumnWidth,
|
|
151
153
|
dispatch,
|
|
152
|
-
clientScripts
|
|
154
|
+
clientScripts,
|
|
155
|
+
massActionsContext
|
|
153
156
|
} = _ref3;
|
|
154
157
|
return /*#__PURE__*/React.createElement(Header, {
|
|
155
158
|
isReorderEnabled: isReorderEnabled,
|
|
@@ -166,7 +169,8 @@ function renderHeader(_ref3) {
|
|
|
166
169
|
headers: headers,
|
|
167
170
|
isMultiline: isMultiline,
|
|
168
171
|
dispatch: dispatch,
|
|
169
|
-
clientScripts: clientScripts
|
|
172
|
+
clientScripts: clientScripts,
|
|
173
|
+
massActionsContext: massActionsContext
|
|
170
174
|
});
|
|
171
175
|
}
|
|
172
176
|
|
|
@@ -26,7 +26,8 @@ function Header(_ref) {
|
|
|
26
26
|
headers,
|
|
27
27
|
isMultiline,
|
|
28
28
|
dispatch,
|
|
29
|
-
clientScripts
|
|
29
|
+
clientScripts,
|
|
30
|
+
massActionsContext
|
|
30
31
|
} = _ref;
|
|
31
32
|
|
|
32
33
|
if (headers.length <= 0) {
|
|
@@ -48,15 +49,16 @@ function Header(_ref) {
|
|
|
48
49
|
}
|
|
49
50
|
}, /*#__PURE__*/React.createElement(TableHeaderRow, {
|
|
50
51
|
$flag_autoHeight: isMultiline
|
|
51
|
-
}, renderReOrderColumn(isReorderEnabled), rendermassAction(isSelectionEnabled, isMultiline, actions, clientScripts), renderHeaders(headers, isMultiline, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch, clientScripts), renderActionColumn(hasRowActions, rowActionsColumnWidth), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth)));
|
|
52
|
+
}, renderReOrderColumn(isReorderEnabled), rendermassAction(isSelectionEnabled, isMultiline, actions, clientScripts, massActionsContext), renderHeaders(headers, isMultiline, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch, clientScripts), renderActionColumn(hasRowActions, rowActionsColumnWidth), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth)));
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
function rendermassAction(isSelectionEnabled, isMultiline, actions, clientScripts) {
|
|
55
|
+
function rendermassAction(isSelectionEnabled, isMultiline, actions, clientScripts, massActionsContext) {
|
|
55
56
|
return /*#__PURE__*/React.createElement(MassAction, {
|
|
56
57
|
isSelectionEnabled: isSelectionEnabled,
|
|
57
58
|
isMultiline: isMultiline,
|
|
58
59
|
actions: actions,
|
|
59
|
-
clientScripts: clientScripts
|
|
60
|
+
clientScripts: clientScripts,
|
|
61
|
+
context: massActionsContext
|
|
60
62
|
});
|
|
61
63
|
}
|
|
62
64
|
|
package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js
CHANGED
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import TableHead from '@zohodesk-private/desk-components/es/table/TableHead/TableHead';
|
|
3
3
|
import TableHeading from '@zohodesk-private/desk-components/es/table/TableHeading/TableHeading';
|
|
4
4
|
import { AlignmentOfFlex } from "../../../../../../../../cc/table-list/data-types/Header";
|
|
5
|
-
import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
5
|
+
import { ActionViewGap, Layout } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
6
6
|
import ColumnResizer from "./ColumnResizer"; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
import style from "./../../css/TableList.module.css";
|
|
9
|
-
import
|
|
9
|
+
import ClientActionsRenderer from "../../../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
10
10
|
|
|
11
11
|
function HeaderData(_ref) {
|
|
12
12
|
let {
|
|
@@ -26,7 +26,8 @@ function HeaderData(_ref) {
|
|
|
26
26
|
sortable,
|
|
27
27
|
width,
|
|
28
28
|
alignment,
|
|
29
|
-
actions
|
|
29
|
+
actions,
|
|
30
|
+
context
|
|
30
31
|
} = header;
|
|
31
32
|
const hasActions = Boolean(actions?.length);
|
|
32
33
|
return (
|
|
@@ -50,10 +51,14 @@ function HeaderData(_ref) {
|
|
|
50
51
|
}, /*#__PURE__*/React.createElement(TableHeading, {
|
|
51
52
|
$i18n_text: text,
|
|
52
53
|
$flag_wrapText: isMultiline
|
|
53
|
-
}), hasActions ? /*#__PURE__*/React.createElement(
|
|
54
|
+
}), hasActions ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
54
55
|
actions: actions,
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
clientScripts: clientScripts,
|
|
57
|
+
context: context,
|
|
58
|
+
viewMeta: {
|
|
59
|
+
layout: Layout.HORIZONTAL,
|
|
60
|
+
gap: ActionViewGap.SMALL
|
|
61
|
+
}
|
|
57
62
|
}) : null, /*#__PURE__*/React.createElement(ColumnResizer, {
|
|
58
63
|
isResizerEnabled: isResizerEnabled,
|
|
59
64
|
isResizing: isResizing,
|
package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableHeadFirstNode from '@zohodesk-private/desk-components/es/table/TableHeadFirstNode/TableHeadFirstNode';
|
|
3
|
-
import TableHeading from '@zohodesk-private/desk-components/es/table/TableHeading/TableHeading';
|
|
4
|
-
import AdaptiveRowActionsRenderer from "../../../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer"; // @ts-ignore
|
|
3
|
+
import TableHeading from '@zohodesk-private/desk-components/es/table/TableHeading/TableHeading'; // @ts-ignore
|
|
5
4
|
|
|
6
5
|
import style from "./../../css/TableList.module.css";
|
|
6
|
+
import ClientActionsRenderer from "../../../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
7
|
+
import { Layout } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
7
8
|
|
|
8
9
|
function MassAction(_ref) {
|
|
9
10
|
let {
|
|
10
11
|
isSelectionEnabled,
|
|
11
12
|
isMultiline,
|
|
12
13
|
actions,
|
|
13
|
-
clientScripts
|
|
14
|
+
clientScripts,
|
|
15
|
+
context
|
|
14
16
|
} = _ref;
|
|
15
17
|
|
|
16
18
|
if (!isSelectionEnabled) {
|
|
@@ -36,9 +38,13 @@ function MassAction(_ref) {
|
|
|
36
38
|
customStyle: {
|
|
37
39
|
container: style.massActionHeader
|
|
38
40
|
}
|
|
39
|
-
}, /*#__PURE__*/React.createElement(
|
|
41
|
+
}, /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
40
42
|
actions: actions,
|
|
41
|
-
clientScripts: clientScripts
|
|
43
|
+
clientScripts: clientScripts,
|
|
44
|
+
context: context,
|
|
45
|
+
viewMeta: {
|
|
46
|
+
layout: Layout.HORIZONTAL
|
|
47
|
+
}
|
|
42
48
|
}));
|
|
43
49
|
}
|
|
44
50
|
|
|
@@ -47,7 +47,8 @@ function RowView(_ref, ref) {
|
|
|
47
47
|
} = state.properties;
|
|
48
48
|
const {
|
|
49
49
|
type,
|
|
50
|
-
actions
|
|
50
|
+
actions,
|
|
51
|
+
context
|
|
51
52
|
} = rowActionLocation;
|
|
52
53
|
return /*#__PURE__*/React.createElement(TableRow, {
|
|
53
54
|
key: id,
|
|
@@ -90,7 +91,8 @@ function RowView(_ref, ref) {
|
|
|
90
91
|
columnWidth: rowActionsColumnWidth,
|
|
91
92
|
type,
|
|
92
93
|
actions,
|
|
93
|
-
clientScripts
|
|
94
|
+
clientScripts,
|
|
95
|
+
context
|
|
94
96
|
}), isDroppable && /*#__PURE__*/React.createElement("div", {
|
|
95
97
|
className: `${style.rowDropIndicator} ${dropPosition === 'downward' && style.dropIndicatorTop} ${dropPosition === 'upward' && style.dropIndicatorBottom}`
|
|
96
98
|
}));
|
|
@@ -171,7 +173,8 @@ function renderRowActions(_ref6) {
|
|
|
171
173
|
columnWidth,
|
|
172
174
|
actions,
|
|
173
175
|
type,
|
|
174
|
-
clientScripts
|
|
176
|
+
clientScripts,
|
|
177
|
+
context
|
|
175
178
|
} = _ref6;
|
|
176
179
|
return /*#__PURE__*/React.createElement(RowActions, {
|
|
177
180
|
hasActions: hasActions,
|
|
@@ -179,7 +182,8 @@ function renderRowActions(_ref6) {
|
|
|
179
182
|
columnWidth: columnWidth,
|
|
180
183
|
type: type,
|
|
181
184
|
actions: actions,
|
|
182
|
-
clientScripts: clientScripts
|
|
185
|
+
clientScripts: clientScripts,
|
|
186
|
+
context: context
|
|
183
187
|
});
|
|
184
188
|
}
|
|
185
189
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableAction from '@zohodesk-private/desk-components/es/table/TableAction/TableAction';
|
|
3
|
-
import AdaptiveRowActionsRenderer from "../../../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer";
|
|
4
3
|
import { ActionViewGap } 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
|
+
import { Layout } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
5
6
|
export default function RowActions(_ref) {
|
|
6
7
|
let {
|
|
7
8
|
hasActions,
|
|
@@ -9,18 +10,24 @@ export default function RowActions(_ref) {
|
|
|
9
10
|
columnWidth,
|
|
10
11
|
type = '',
|
|
11
12
|
actions,
|
|
12
|
-
clientScripts
|
|
13
|
+
clientScripts,
|
|
14
|
+
context
|
|
13
15
|
} = _ref;
|
|
14
16
|
|
|
15
17
|
if (hasActions) {
|
|
16
18
|
return /*#__PURE__*/React.createElement(TableAction, {
|
|
17
19
|
$data_width: columnWidth,
|
|
18
20
|
$ui_alignItems: isMultiline ? 'start' : 'center'
|
|
19
|
-
}, /*#__PURE__*/React.createElement(
|
|
21
|
+
}, /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
20
22
|
actions: actions,
|
|
21
23
|
clientScripts: clientScripts,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
context: context,
|
|
25
|
+
viewMeta: {
|
|
26
|
+
layout: Layout.HORIZONTAL_WITH_MORE_ACTIONS,
|
|
27
|
+
gap: ActionViewGap.MEDIUM
|
|
28
|
+
},
|
|
29
|
+
instanceName: context.instanceName,
|
|
30
|
+
location: "row_actions"
|
|
24
31
|
}));
|
|
25
32
|
}
|
|
26
33
|
|
|
@@ -5,7 +5,9 @@ import { AlignmentOfFlex } from "../../../../../../../../cc/table-list/data-type
|
|
|
5
5
|
import FieldComponent from "../field/FieldComponent"; // @ts-ignore
|
|
6
6
|
|
|
7
7
|
import style from "./../../css/TableList.module.css";
|
|
8
|
-
import
|
|
8
|
+
import ClientActionsRenderer from "../../../../../../../../platform/client-actions/components/client-actions-renderer/frameworks/ui/client-actions-renderer/ClientActionsRenderer";
|
|
9
|
+
import ClientActionsTranslator from "../../../../../../../../platform/client-actions/translators/client-actions-translator";
|
|
10
|
+
import { Layout } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
9
11
|
export default function RowData(_ref) {
|
|
10
12
|
let {
|
|
11
13
|
field,
|
|
@@ -17,9 +19,11 @@ export default function RowData(_ref) {
|
|
|
17
19
|
let {
|
|
18
20
|
type,
|
|
19
21
|
actions,
|
|
22
|
+
context,
|
|
20
23
|
...props
|
|
21
24
|
} = field;
|
|
22
|
-
const
|
|
25
|
+
const resolvedActions = ClientActionsTranslator.transform(actions, context.instanceName, context.moduleName, context);
|
|
26
|
+
const hasActions = Boolean(resolvedActions?.length);
|
|
23
27
|
return /*#__PURE__*/React.createElement(TableData, {
|
|
24
28
|
$ui_align: hasActions ? null : alignment,
|
|
25
29
|
$data_width: width,
|
|
@@ -35,9 +39,13 @@ export default function RowData(_ref) {
|
|
|
35
39
|
}, /*#__PURE__*/React.createElement(FieldComponent, {
|
|
36
40
|
type: type,
|
|
37
41
|
fieldProps: props
|
|
38
|
-
}), hasActions ? /*#__PURE__*/React.createElement(
|
|
42
|
+
}), hasActions ? /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
39
43
|
actions: actions,
|
|
40
44
|
clientScripts: clientScripts,
|
|
41
|
-
|
|
45
|
+
context: context,
|
|
46
|
+
viewMeta: {
|
|
47
|
+
layout: Layout.HORIZONTAL,
|
|
48
|
+
gap: ActionViewGap.SMALL
|
|
49
|
+
}
|
|
42
50
|
}) : null);
|
|
43
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Button from '@zohodesk-private/dot-registry/es/Button/Button';
|
|
3
|
+
import Icon from "@zohodesk/icons/es/Icon";
|
|
3
4
|
import ButtonConstants from "../../../../../../cc/button/Constants";
|
|
4
5
|
|
|
5
6
|
function ButtonView(_ref, ref) {
|
|
@@ -18,11 +19,25 @@ function ButtonView(_ref, ref) {
|
|
|
18
19
|
isDisabled,
|
|
19
20
|
id,
|
|
20
21
|
status,
|
|
21
|
-
tooltip
|
|
22
|
+
tooltip,
|
|
23
|
+
iconName,
|
|
24
|
+
iconSize,
|
|
25
|
+
iconPosition
|
|
22
26
|
} = state.properties;
|
|
27
|
+
const iconElement = iconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
28
|
+
name: iconName,
|
|
29
|
+
size: iconSize
|
|
30
|
+
}) : null;
|
|
31
|
+
const buttonText = iconElement ? /*#__PURE__*/React.createElement("span", {
|
|
32
|
+
style: {
|
|
33
|
+
display: 'inline-flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
gap: '4px'
|
|
36
|
+
}
|
|
37
|
+
}, iconPosition === 'left' && iconElement, text, iconPosition !== 'left' && iconElement) : text;
|
|
23
38
|
return /*#__PURE__*/React.createElement(Button, {
|
|
24
39
|
getRef: ref,
|
|
25
|
-
text:
|
|
40
|
+
text: buttonText,
|
|
26
41
|
palette: palette,
|
|
27
42
|
size: size,
|
|
28
43
|
isRounded: isRounded,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import DateWidget from '@zohodesk/components/es/DateTime/DateWidget';
|
|
3
3
|
import DateConstants from "../../../../../../cc/date/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/DateView.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 DateView(_ref, ref) {
|
|
10
11
|
let {
|
|
@@ -24,17 +25,22 @@ function DateView(_ref, ref) {
|
|
|
24
25
|
isTimeIncluded,
|
|
25
26
|
timeZone,
|
|
26
27
|
actions,
|
|
27
|
-
clientScripts
|
|
28
|
+
clientScripts,
|
|
29
|
+
context
|
|
28
30
|
} = state.properties;
|
|
29
31
|
|
|
30
32
|
const renderRightFieldActions = () => {
|
|
31
33
|
if (!actions?.length) return null;
|
|
32
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
33
35
|
className: style.actionContainer
|
|
34
|
-
}, /*#__PURE__*/React.createElement(
|
|
36
|
+
}, /*#__PURE__*/React.createElement(ClientActionsRenderer, {
|
|
35
37
|
actions: actions,
|
|
36
38
|
clientScripts: clientScripts,
|
|
37
|
-
|
|
39
|
+
context: context,
|
|
40
|
+
viewMeta: {
|
|
41
|
+
layout: Layout.HORIZONTAL,
|
|
42
|
+
gap: ActionViewGap.SMALL
|
|
43
|
+
}
|
|
38
44
|
}));
|
|
39
45
|
};
|
|
40
46
|
|
package/es/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValueView.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import StatusBox from "@zohodesk-private/desk-components/es/table/StatusBox/StatusBox";
|
|
3
|
+
import Icon from "@zohodesk/icons/es/Icon";
|
|
3
4
|
import HighlightedValueConstants from "../../../../../../cc/highlighted-value/Constants"; // @ts-ignore
|
|
4
5
|
|
|
5
6
|
import style from "./css/HighlightedValue.module.css";
|
|
@@ -18,8 +19,15 @@ function HighlightedValueView(_ref, ref) {
|
|
|
18
19
|
tooltip,
|
|
19
20
|
weight,
|
|
20
21
|
isDotted,
|
|
21
|
-
cursor
|
|
22
|
+
cursor,
|
|
23
|
+
iconName,
|
|
24
|
+
iconSize,
|
|
25
|
+
iconPosition
|
|
22
26
|
} = state.properties;
|
|
27
|
+
const iconElement = iconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
28
|
+
name: iconName,
|
|
29
|
+
size: iconSize
|
|
30
|
+
}) : null;
|
|
23
31
|
return /*#__PURE__*/React.createElement(StatusBox, {
|
|
24
32
|
$customProps_container: {
|
|
25
33
|
ref
|
|
@@ -29,8 +37,11 @@ function HighlightedValueView(_ref, ref) {
|
|
|
29
37
|
$ui_weight: weight,
|
|
30
38
|
$flag_wrapText: !isDotted,
|
|
31
39
|
$i18n_tooltip: tooltip,
|
|
40
|
+
$render_leftChild: iconPosition === 'left' ? iconElement : null,
|
|
41
|
+
$render_rightChild: iconPosition !== 'left' ? iconElement : null,
|
|
32
42
|
customStyle: {
|
|
33
|
-
pointer: cursor === "default" && style.default
|
|
43
|
+
pointer: cursor === "default" && style.default,
|
|
44
|
+
container: iconName ? style.gap : undefined
|
|
34
45
|
},
|
|
35
46
|
$event_onClick: () => {
|
|
36
47
|
dispatch({
|
|
@@ -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,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
|
|
|
@@ -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,
|