@zohodesk/library-platform 1.1.10-exp.2 → 1.1.10-temp-1

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.
Files changed (63) hide show
  1. package/es/cc/fields/field/Types.js +1 -0
  2. package/es/cc/fields/name/Constants.js +5 -0
  3. package/es/cc/fields/name/Events.js +3 -0
  4. package/es/cc/fields/name/Model.js +14 -0
  5. package/es/cc/fields/name/Properties.js +24 -0
  6. package/es/cc/table-connected/Properties.js +12 -0
  7. package/es/cc/table-list/Properties.js +2 -1
  8. package/es/cc/table-primary-field/Constants.js +5 -0
  9. package/es/cc/table-primary-field/Events.js +4 -0
  10. package/es/cc/table-primary-field/Properties.js +29 -0
  11. package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +13 -13
  12. package/es/library/dot/components/form-fields/field/css/FieldItem.module.css +2 -2
  13. package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +1 -1
  14. package/es/library/dot/components/table-list/.DS_Store +0 -0
  15. package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +15 -15
  16. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -4
  17. package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +1 -1
  18. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +4 -4
  19. package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +9 -9
  20. package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/TableColumnChooserView.module.css +3 -0
  21. package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/css/TableColumnChooserView.module.css +3 -0
  22. package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +2 -0
  23. package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/EventHandlersFactory.js +28 -0
  24. package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/PrimaryField.js +12 -0
  25. package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/PrimaryFieldView.js +38 -0
  26. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +9 -9
  27. package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +51 -0
  28. package/es/platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js +1 -0
  29. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +9 -0
  30. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +38 -0
  31. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +5 -5
  32. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +12 -0
  33. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +19 -0
  34. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +33 -0
  35. package/es/platform/data-source/http-template/fetchDependencyMappings.js +18 -0
  36. package/es/platform/data-source/http-template/fetchLayoutRules.js +29 -0
  37. package/es/platform/data-source/http-template/fetchMyForm.js +19 -0
  38. package/es/platform/data-source/http-template/fetchMyFormLayout.js +43 -0
  39. package/es/platform/data-source/http-template/fetchValidationRules.js +30 -0
  40. package/es/platform/zlist/adapters/presenters/TableTranslator.js +6 -2
  41. package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +11 -0
  42. package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +20 -13
  43. package/es/platform/zlist/adapters/presenters/translators/Row.js +3 -2
  44. package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +4 -2
  45. package/es/platform/zlist/adapters/presenters/translators/fields/BooleanFieldTranslator.js +7 -1
  46. package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +8 -1
  47. package/es/platform/zlist/adapters/presenters/translators/fields/DateFieldTranslator.js +7 -1
  48. package/es/platform/zlist/adapters/presenters/translators/fields/DateTimeFieldTranslator.js +7 -1
  49. package/es/platform/zlist/adapters/presenters/translators/fields/DecimalFieldTranslator.js +7 -1
  50. package/es/platform/zlist/adapters/presenters/translators/fields/EmailFieldTranslator.js +6 -1
  51. package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +8 -1
  52. package/es/platform/zlist/adapters/presenters/translators/fields/LookUpFieldTranslator.js +6 -1
  53. package/es/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.js +7 -1
  54. package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js +7 -1
  55. package/es/platform/zlist/adapters/presenters/translators/fields/NameFieldTranslator.js +52 -0
  56. package/es/platform/zlist/adapters/presenters/translators/fields/NumberFieldTranslator.js +7 -1
  57. package/es/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.js +7 -1
  58. package/es/platform/zlist/adapters/presenters/translators/fields/PhoneFieldTranslator.js +7 -1
  59. package/es/platform/zlist/adapters/presenters/translators/fields/PickListFieldTranslator.js +7 -1
  60. package/es/platform/zlist/adapters/presenters/translators/fields/SingleLineFieldTranslator.js +7 -1
  61. package/es/platform/zlist/adapters/presenters/translators/fields/URLFieldTranslator.js +7 -1
  62. package/es/platform/zlist/adapters/presenters/translators/fields/index.js +3 -1
  63. package/package.json +2 -1
@@ -1,4 +1,5 @@
1
1
  var Types = /*#__PURE__*/function (Types) {
2
+ Types["PrimaryField"] = "Primary";
2
3
  Types["CheckboxField"] = "Checkbox";
3
4
  Types["SwitchField"] = "Switch";
4
5
  Types["SingleLineField"] = "SingleLine";
@@ -0,0 +1,5 @@
1
+ class Constants {
2
+ static NAME_FIELD_CLICKED = "NAME_FIELD#CLICKED";
3
+ }
4
+
5
+ export default Constants;
@@ -0,0 +1,3 @@
1
+ import FieldEvents from "../field/Events";
2
+ const Events = FieldEvents;
3
+ export default Events;
@@ -0,0 +1,14 @@
1
+ export default function NameFieldModel(_ref) {
2
+ let {
3
+ name,
4
+ value,
5
+ uiType,
6
+ appendToActionPayload
7
+ } = _ref;
8
+ return {
9
+ name,
10
+ appendToActionPayload,
11
+ type: uiType,
12
+ value
13
+ };
14
+ }
@@ -0,0 +1,24 @@
1
+ import FieldProperties from "../field/Properties";
2
+ export default { ...FieldProperties,
3
+ value: {
4
+ required: true,
5
+ defaultValue: {},
6
+ typeMetadata: {
7
+ schema: {
8
+ type: 'object',
9
+ properties: {
10
+ id: {
11
+ type: 'string'
12
+ },
13
+ value: {
14
+ type: 'string'
15
+ },
16
+ url: {
17
+ type: 'string'
18
+ }
19
+ },
20
+ required: ['value', 'url']
21
+ }
22
+ }
23
+ }
24
+ };
@@ -59,6 +59,18 @@ export default {
59
59
  }
60
60
  }
61
61
  },
62
+ nameFieldsConfig: {
63
+ required: false,
64
+ defaultValue: {
65
+ isEnabled: true,
66
+ constructUrl: null
67
+ },
68
+ typeMetadata: {
69
+ schema: {
70
+ type: 'object'
71
+ }
72
+ }
73
+ },
62
74
  reOrderConfig: {
63
75
  required: false,
64
76
  defaultValue: {
@@ -17,6 +17,7 @@ import PhoneProperties from "../fields/phone/Properties";
17
17
  import PickListProperties from "../fields/pick-list/Properties";
18
18
  import TextProperties from "../fields/text/Properties";
19
19
  import UrlProperties from "../fields/url/Properties";
20
+ import NameFieldProperties from "../fields/name/Properties";
20
21
  const TableListProperties = {
21
22
  isReOrderLoading: {
22
23
  required: false,
@@ -203,7 +204,7 @@ const TableListProperties = {
203
204
  required: ['id', 'name', 'text']
204
205
  },
205
206
  Column: {
206
- anyOf: [PropertiesConverter.toJsonSchema(BooleanProperties), PropertiesConverter.toJsonSchema(CurrencyProperties), PropertiesConverter.toJsonSchema(DateProperties), PropertiesConverter.toJsonSchema(DatetimeProperties), PropertiesConverter.toJsonSchema(DecimalProperties), PropertiesConverter.toJsonSchema(EmailProperties), PropertiesConverter.toJsonSchema(LookupProperties), PropertiesConverter.toJsonSchema(MultiSelectProperties), PropertiesConverter.toJsonSchema(NumberProperties), PropertiesConverter.toJsonSchema(PercentProperties), PropertiesConverter.toJsonSchema(PhoneProperties), PropertiesConverter.toJsonSchema(PickListProperties), PropertiesConverter.toJsonSchema(TextProperties), PropertiesConverter.toJsonSchema(UrlProperties), // Below field is for the empty cell
207
+ anyOf: [PropertiesConverter.toJsonSchema(BooleanProperties), PropertiesConverter.toJsonSchema(CurrencyProperties), PropertiesConverter.toJsonSchema(DateProperties), PropertiesConverter.toJsonSchema(DatetimeProperties), PropertiesConverter.toJsonSchema(DecimalProperties), PropertiesConverter.toJsonSchema(EmailProperties), PropertiesConverter.toJsonSchema(LookupProperties), PropertiesConverter.toJsonSchema(MultiSelectProperties), PropertiesConverter.toJsonSchema(NumberProperties), PropertiesConverter.toJsonSchema(PercentProperties), PropertiesConverter.toJsonSchema(PhoneProperties), PropertiesConverter.toJsonSchema(PickListProperties), PropertiesConverter.toJsonSchema(TextProperties), PropertiesConverter.toJsonSchema(UrlProperties), PropertiesConverter.toJsonSchema(NameFieldProperties), // Below field is for the empty cell
207
208
  {
208
209
  type: 'object',
209
210
  properties: {
@@ -0,0 +1,5 @@
1
+ class Constants {
2
+ static PRIMARY_FIELD_CLICKED = "PRIMARY_FIELD#CLICKED";
3
+ }
4
+
5
+ export default Constants;
@@ -0,0 +1,4 @@
1
+ import Constants from "./Constants";
2
+ export default [{
3
+ type: Constants.PRIMARY_FIELD_CLICKED
4
+ }];
@@ -0,0 +1,29 @@
1
+ export default {
2
+ id: {
3
+ required: false,
4
+ defaultValue: false,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string'
8
+ }
9
+ }
10
+ },
11
+ value: {
12
+ required: false,
13
+ defaultValue: false,
14
+ typeMetadata: {
15
+ schema: {
16
+ type: 'string'
17
+ }
18
+ }
19
+ },
20
+ url: {
21
+ required: false,
22
+ defaultValue: false,
23
+ typeMetadata: {
24
+ schema: {
25
+ type: 'string'
26
+ }
27
+ }
28
+ }
29
+ };
@@ -3,17 +3,17 @@
3
3
  }
4
4
 
5
5
  .field {
6
- margin-top: 5px;
6
+ margin-top: var(--zd_size5) ;
7
7
  }
8
8
 
9
9
  .multiSelectField {
10
- margin-top: 2px
10
+ margin-top: var(--zd_size2)
11
11
  }
12
12
 
13
13
  .checkboxField {
14
14
  composes: dInflex alignFstart from '~@zohodesk/components/es/common/common.module.css';
15
- max-width: 100%;
16
- gap: 8px
15
+ max-width: 100% ;
16
+ gap: var(--zd_size8)
17
17
  }
18
18
 
19
19
  .cursor_pointer {
@@ -27,36 +27,36 @@
27
27
  }
28
28
 
29
29
  [dir=ltr] .footer {
30
- padding-right: 32px
30
+ padding-right: var(--zd_size32)
31
31
  }
32
32
 
33
33
  [dir=rtl] .footer {
34
- padding-left: 32px
34
+ padding-left: var(--zd_size32)
35
35
  }
36
36
 
37
37
  /* Sections layout */
38
38
 
39
39
  .sectionsWrapper {
40
- padding-bottom: 8px
40
+ padding-bottom: var(--zd_size8)
41
41
  }
42
42
 
43
43
  .sectionsLayout, .sectionsTwoLayout {
44
- margin: 0 auto
44
+ margin: 0 auto
45
45
  }
46
46
 
47
47
  .sectionsLayout {
48
- max-width: var(--local-form-layout-max-width, 1080px)
48
+ max-width: var(--local-form-layout-max-width, var(--zd_size1080))
49
49
  }
50
50
 
51
51
  .sectionsTwoLayout {
52
- column-gap: 8px;
53
- max-width: var(--local-form-layout-max-width, 1210px)
52
+ column-gap: var(--zd_size8) ;
53
+ max-width: var(--local-form-layout-max-width, var(--zd_size1210))
54
54
  }
55
55
 
56
56
  .rightPanel {
57
57
  height: var(--local-form-right-panel-height, 100%);
58
58
  position: -webkit-sticky;
59
59
  position: sticky;
60
- top: 0;
61
- padding: 8px 0
60
+ top: 0 ;
61
+ padding: var(--zd_size8) 0
62
62
  }
@@ -1,7 +1,7 @@
1
1
  .fieldItem {
2
2
  position: relative;
3
- min-width: 0;
4
- min-height: 0
3
+ min-width: 0 ;
4
+ min-height: 0
5
5
  }
6
6
 
7
7
  .largeSize {
@@ -1,3 +1,3 @@
1
1
  .fieldsContainer {
2
- padding-top: 1px
2
+ padding-top: var(--zd_size1)
3
3
  }
@@ -137,18 +137,18 @@
137
137
  }
138
138
 
139
139
  .loader {
140
- padding: 40px 0
140
+ padding: var(--zd_size40) 0
141
141
  }
142
142
 
143
143
  .wrapper {
144
- height: 100%;
145
- width: 100%;
144
+ height: 100% ;
145
+ width: 100% ;
146
146
  z-index: 1;
147
147
  position: relative
148
148
  }
149
149
 
150
150
  .resizerSpace {
151
- width: calc(var(--local_table_resizer_extra_space, 0) * 1px);
151
+ width: calc(var(--local_table_resizer_extra_space, 0) * var(--zd_size1));
152
152
  flex-shrink: 0
153
153
  }
154
154
 
@@ -157,32 +157,32 @@
157
157
  }
158
158
 
159
159
  [dir=ltr] .contentWrapper {
160
- left: 0;
160
+ left: 0 ;
161
161
  }
162
162
 
163
163
  [dir=rtl] .contentWrapper {
164
- right: 0;
164
+ right: 0 ;
165
165
  }
166
166
 
167
167
  .initialLoading {
168
- height: calc(100% - 100px)
168
+ height: calc(100% - (var(--zd_size100)))
169
169
  }
170
170
 
171
171
  .emptyContent {
172
- padding: 160px 0 60px
172
+ padding: var(--zd_size160) 0 var(--zd_size60)
173
173
  }
174
174
 
175
175
  .errorContent {
176
- padding: 60px 0
176
+ padding: var(--zd_size60) 0
177
177
  }
178
178
 
179
179
  .headerWithActions,
180
180
  .fieldWithActions {
181
- gap: 6px
181
+ gap: var(--zd_size6)
182
182
  }
183
183
 
184
184
  .actions {
185
- gap: 8px
185
+ gap: var(--zd_size8)
186
186
  }
187
187
 
188
188
  .rowCursor_default {
@@ -250,8 +250,8 @@
250
250
  }
251
251
 
252
252
  .rowDropIndicator {
253
- width: 100%;
254
- height: 2px;
253
+ width: 100% ;
254
+ height: var(--zd_size2) ;
255
255
  /* css:theme-validation:ignore */
256
256
  position: absolute;
257
257
  z-index: 2;
@@ -259,11 +259,11 @@
259
259
  }
260
260
 
261
261
  .dropIndicatorTop {
262
- top: 0;
262
+ top: 0 ;
263
263
  }
264
264
 
265
265
  .dropIndicatorBottom {
266
- bottom: -3px;
266
+ bottom: calc( var(--zd_size3) * -1 ) ;
267
267
  }
268
268
 
269
269
  .row {
@@ -1,19 +1,19 @@
1
1
  .wrapper, .itemContainer {
2
- max-width: 100%
2
+ max-width: 100%
3
3
  }
4
4
 
5
5
  .itemContainer {
6
- column-gap: 4px;
6
+ column-gap: var(--zd_size4) ;
7
7
  }
8
8
 
9
9
  .separator {
10
10
  --separator_fontSize: 14px;
11
- margin: 0 10px;
11
+ margin: 0 var(--zd_size10) ;
12
12
  }
13
13
 
14
14
  .buttonStyle {
15
15
  --button_font_size: 14px;
16
16
  --button_padding: 0px;
17
17
  --button_letter_spacing: 0px;
18
- max-width: 100%;
18
+ max-width: 100% ;
19
19
  }
@@ -1,3 +1,3 @@
1
1
  .actionContainer {
2
- margin-top: 2px;
2
+ margin-top: var(--zd_size2) ;
3
3
  }
@@ -1,9 +1,9 @@
1
1
  .label {
2
2
  --label_cursor: inherit
3
3
  }[dir=ltr] .label {
4
- padding-right: 6px
4
+ padding-right: var(--zd_size6)
5
5
  }[dir=rtl] .label {
6
- padding-left: 6px
6
+ padding-left: var(--zd_size6)
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: 2px
14
+ padding-left: var(--zd_size2)
15
15
  }
16
16
 
17
17
  [dir=rtl] .mandatory::after {
18
- padding-right: 2px
18
+ padding-right: var(--zd_size2)
19
19
  }
@@ -1,19 +1,19 @@
1
1
  .actionContainer {
2
- margin-top: 4px;
2
+ margin-top: var(--zd_size4) ;
3
3
  }
4
4
 
5
5
  .custmInputWrapper {
6
6
  position: absolute;
7
- top: 0;
8
- width: 100%;
7
+ top: 0 ;
8
+ width: 100% ;
9
9
  }
10
10
 
11
11
  [dir=ltr] .custmInputWrapper {
12
- left: 0;
12
+ left: 0 ;
13
13
  }
14
14
 
15
15
  [dir=rtl] .custmInputWrapper {
16
- right: 0;
16
+ right: 0 ;
17
17
  }
18
18
 
19
19
  .clearIconContainer {
@@ -21,17 +21,17 @@
21
21
  }
22
22
 
23
23
  [dir=ltr] .paddingRight64 {
24
- padding-right: 64px;
24
+ padding-right: var(--zd_size64) ;
25
25
  }
26
26
 
27
27
  [dir=rtl] .paddingRight64 {
28
- padding-left: 64px;
28
+ padding-left: var(--zd_size64) ;
29
29
  }
30
30
 
31
31
  [dir=ltr] .paddingRight96 {
32
- padding-right: 96px;
32
+ padding-right: var(--zd_size96) ;
33
33
  }
34
34
 
35
35
  [dir=rtl] .paddingRight96 {
36
- padding-left: 96px;
36
+ padding-left: var(--zd_size96) ;
37
37
  }
@@ -0,0 +1,3 @@
1
+ .textFlowOptions {
2
+ margin-top: var(--zd_size10)
3
+ }
@@ -1,4 +1,5 @@
1
1
  import FieldTypes from "../../../../cc/fields/field/Types";
2
+ import PrimaryField from "./primary-field/frameworks/ui/PrimaryField";
2
3
  import CheckboxField from "./checkbox-field/frameworks/ui/CheckboxField";
3
4
  import SwitchField from "./switch-field/frameworks/ui/SwitchField";
4
5
  import SingleLineField from "./singleline-field/frameworks/ui/SingleLineField";
@@ -17,6 +18,7 @@ import NumberField from "./number-field/frameworks/ui/NumberField";
17
18
  import DecimalField from "./decimal-field/frameworks/ui/DecimalField";
18
19
  import MultiSelectField from "./multiselect-field/frameworks/ui/MultiSelectField";
19
20
  const FieldComponents = {
21
+ [FieldTypes.PrimaryField]: PrimaryField,
20
22
  [FieldTypes.CheckboxField]: CheckboxField,
21
23
  [FieldTypes.SwitchField]: SwitchField,
22
24
  // TODO: Need to register SwitchField
@@ -0,0 +1,28 @@
1
+ import NameFieldConstants from "../../../../../../../cc/fields/name/Constants";
2
+ import FieldConstants from "../../../../../../../cc/fields/field/Constants";
3
+ export class EventHandlersFactory {
4
+ static create() {
5
+ const clickHandler = input => {
6
+ const {
7
+ state,
8
+ dispatch
9
+ } = input;
10
+ const {
11
+ name: fieldName,
12
+ url
13
+ } = state.properties;
14
+ dispatch({
15
+ type: FieldConstants.FIELD_CLICKED,
16
+ payload: {
17
+ fieldName,
18
+ url
19
+ }
20
+ });
21
+ };
22
+
23
+ return {
24
+ [NameFieldConstants.NAME_FIELD_CLICKED]: clickHandler
25
+ };
26
+ }
27
+
28
+ }
@@ -0,0 +1,12 @@
1
+ import { createCustomComponent } from "../../../../../../custom-component";
2
+ import NameFieldProperties from "../../../../../../../cc/fields/name/Properties";
3
+ import NameFieldEvents from "../../../../../../../cc/fields/name/Events";
4
+ import PrimaryFieldView from "./PrimaryFieldView";
5
+ const PrimaryField = createCustomComponent({
6
+ name: 'PrimaryField',
7
+ View: PrimaryFieldView,
8
+ properties: NameFieldProperties,
9
+ events: NameFieldEvents,
10
+ eventHandlers: {}
11
+ });
12
+ export default PrimaryField;
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import TableLink from "@zohodesk-private/desk-components/es/table/TableLink/TableLink";
3
+ import FieldConstants from "../../../../../../../cc/fields/field/Constants";
4
+ export default function PrimaryFieldView(_ref, ref) {
5
+ let {
6
+ state,
7
+ helpers
8
+ } = _ref;
9
+ let {
10
+ dispatch
11
+ } = helpers;
12
+ let {
13
+ value: propValue,
14
+ name: fieldName
15
+ } = state.properties;
16
+ let {
17
+ value,
18
+ url
19
+ } = propValue;
20
+ return /*#__PURE__*/React.createElement(TableLink, {
21
+ $customProps_link: {
22
+ ref
23
+ },
24
+ $data_text: value,
25
+ $data_url: url,
26
+ $data_target: "_self",
27
+ $flag_hoverableFromList: true,
28
+ $event_onClick: () => {
29
+ dispatch({
30
+ type: FieldConstants.FIELD_CLICKED,
31
+ payload: {
32
+ fieldName,
33
+ url
34
+ }
35
+ });
36
+ }
37
+ });
38
+ }
@@ -4,37 +4,37 @@
4
4
 
5
5
  .rightPlaceholder {
6
6
  position: absolute;
7
- bottom: 4px;
7
+ bottom: var(--zd_size4) ;
8
8
  }
9
9
 
10
10
  [dir=ltr] .rightPlaceholder {
11
- right: 12px;
11
+ right: var(--zd_size12) ;
12
12
  }
13
13
 
14
14
  [dir=rtl] .rightPlaceholder {
15
- left: 12px;
15
+ left: var(--zd_size12) ;
16
16
  }
17
17
 
18
18
  [dir=ltr] .paddingRight32 {
19
- padding-right: 32px;
19
+ padding-right: var(--zd_size32) ;
20
20
  }
21
21
 
22
22
  [dir=rtl] .paddingRight32 {
23
- padding-left: 32px;
23
+ padding-left: var(--zd_size32) ;
24
24
  }
25
25
 
26
26
  [dir=ltr] .paddingRight64 {
27
- padding-right: 64px;
27
+ padding-right: var(--zd_size64) ;
28
28
  }
29
29
 
30
30
  [dir=rtl] .paddingRight64 {
31
- padding-left: 64px;
31
+ padding-left: var(--zd_size64) ;
32
32
  }
33
33
 
34
34
  [dir=ltr] .paddingRight96 {
35
- padding-right: 96px;
35
+ padding-right: var(--zd_size96) ;
36
36
  }
37
37
 
38
38
  [dir=rtl] .paddingRight96 {
39
- padding-left: 96px;
39
+ padding-left: var(--zd_size96) ;
40
40
  }
@@ -0,0 +1,51 @@
1
+ export const actionSchema = {
2
+ type: 'object',
3
+ properties: {
4
+ component: {
5
+ type: 'string'
6
+ },
7
+ id: {
8
+ type: 'string'
9
+ },
10
+ properties: {
11
+ type: 'object'
12
+ },
13
+ eventMappings: {
14
+ type: 'array',
15
+ minItems: 0,
16
+ items: {
17
+ type: 'object',
18
+ properties: {
19
+ action: {
20
+ type: 'object',
21
+ properties: {
22
+ event: {
23
+ type: 'string'
24
+ },
25
+ payload: {
26
+ type: 'object'
27
+ }
28
+ },
29
+ required: ['event', 'payload']
30
+ },
31
+ id: {
32
+ type: 'string'
33
+ },
34
+ sourceEvent: {
35
+ type: 'string'
36
+ }
37
+ },
38
+ required: ['id']
39
+ }
40
+ }
41
+ },
42
+ required: ['component', 'properties']
43
+ };
44
+ export default {
45
+ action: {
46
+ required: true,
47
+ typeMetadata: {
48
+ schema: actionSchema
49
+ }
50
+ }
51
+ };
@@ -0,0 +1,9 @@
1
+ import { createCustomComponent } from "../../../../../../library/custom-component";
2
+ import DynamicActionComponentProperties from "../../../../cc/dynamic-action-component/Properties";
3
+ import DynamicActionComponentView from "./DynamicActionComponentView";
4
+ export default createCustomComponent({
5
+ name: 'DynamicActionComponent',
6
+ properties: DynamicActionComponentProperties,
7
+ eventHandlers: {},
8
+ View: DynamicActionComponentView
9
+ });
@@ -0,0 +1,38 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import ComponentRegistry from "../../../../../../library/custom-component/frameworks/ui/ComponentRegistry";
5
+ import ActionComponentMapping from "../../../../../../library/dot/components/action-location/frameworks/ui/ActionComponentMapping";
6
+
7
+ function DynamicComponentView(_ref, ref) {
8
+ let {
9
+ state
10
+ } = _ref;
11
+ const {
12
+ action
13
+ } = state.properties;
14
+ const {
15
+ component,
16
+ properties,
17
+ eventMappings,
18
+ id: actionId
19
+ } = action;
20
+ const Component = ComponentRegistry.get(component) || ActionComponentMapping[component];
21
+
22
+ if (!Component) {
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ ref: ref
25
+ }, "Error");
26
+ }
27
+
28
+ return /*#__PURE__*/React.createElement(Component, _extends({
29
+ getRef: ref
30
+ }, properties, {
31
+ appendToActionPayload: {
32
+ eventMappings,
33
+ actionId
34
+ }
35
+ }));
36
+ }
37
+
38
+ export default DynamicComponentView;