@sme.up/ketchup 6.0.0 → 6.2.0

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 (198) hide show
  1. package/dist/cjs/{cell-utils-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
  2. package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
  3. package/dist/cjs/f-cell-3a740c48.js +418 -0
  4. package/dist/cjs/f-checkbox-57443ca3.js +29 -0
  5. package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
  6. package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
  7. package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
  8. package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
  9. package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
  10. package/dist/cjs/ketchup.cjs.js +3 -3
  11. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  12. package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
  13. package/dist/cjs/kup-box.cjs.entry.js +1306 -0
  14. package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
  15. package/dist/cjs/kup-cell.cjs.entry.js +10 -9
  16. package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
  17. package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
  18. package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
  19. package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
  20. package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
  22. package/dist/cjs/kup-form.cjs.entry.js +480 -0
  23. package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
  24. package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
  25. package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
  26. package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
  27. package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
  28. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  29. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  30. package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
  31. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  34. package/dist/cjs/loader.cjs.js +3 -3
  35. package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
  36. package/dist/collection/assets/dashboard.js +113 -0
  37. package/dist/collection/assets/data-table.js +15 -0
  38. package/dist/collection/assets/family-tree.js +2437 -0
  39. package/dist/collection/assets/form.js +433 -0
  40. package/dist/collection/assets/grid.js +17 -0
  41. package/dist/collection/assets/index.js +14 -6
  42. package/dist/collection/collection-manifest.json +4 -3
  43. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
  44. package/dist/collection/components/kup-box/kup-box.js +13 -2
  45. package/dist/collection/components/kup-button/kup-button.js +1 -0
  46. package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
  47. package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
  48. package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
  49. package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
  50. package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
  51. package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
  52. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
  53. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
  54. package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
  55. package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
  56. package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
  57. package/dist/collection/components/kup-form/kup-form.css +99 -0
  58. package/dist/collection/components/kup-form/kup-form.js +647 -0
  59. package/dist/collection/components/kup-grid/kup-grid.js +1 -4
  60. package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
  61. package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
  62. package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
  63. package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
  64. package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
  65. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
  66. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
  67. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
  68. package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
  69. package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
  70. package/dist/collection/components/kup-tree/kup-tree.js +10 -4
  71. package/dist/collection/f-components/f-button/f-button.js +2 -2
  72. package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
  73. package/dist/collection/f-components/f-cell/f-cell.js +34 -114
  74. package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
  75. package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
  76. package/dist/collection/managers/kup-data/kup-data.js +109 -1
  77. package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
  78. package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
  79. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
  80. package/dist/collection/types/GenericTypes.js +3 -2
  81. package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
  82. package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
  83. package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
  84. package/dist/esm/f-checkbox-c51c4a75.js +27 -0
  85. package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
  86. package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
  87. package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
  88. package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
  89. package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
  90. package/dist/esm/ketchup.js +3 -3
  91. package/dist/esm/kup-accordion.entry.js +4 -4
  92. package/dist/esm/kup-autocomplete_25.entry.js +199 -183
  93. package/dist/esm/kup-box.entry.js +1302 -0
  94. package/dist/esm/kup-calendar.entry.js +7 -7
  95. package/dist/esm/kup-cell.entry.js +9 -8
  96. package/dist/esm/kup-dash-list.entry.js +4 -4
  97. package/dist/esm/kup-dash_2.entry.js +4 -7
  98. package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
  99. package/dist/esm/kup-drawer.entry.js +4 -4
  100. package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
  101. package/dist/esm/kup-family-tree.entry.js +406 -0
  102. package/dist/esm/kup-form.entry.js +476 -0
  103. package/dist/esm/kup-iframe.entry.js +3 -3
  104. package/dist/esm/kup-image-list.entry.js +72 -10
  105. package/dist/esm/kup-lazy.entry.js +4 -4
  106. package/dist/esm/kup-magic-box.entry.js +4 -4
  107. package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
  108. package/dist/esm/kup-nav-bar.entry.js +3 -3
  109. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  110. package/dist/esm/kup-photo-frame.entry.js +5 -5
  111. package/dist/esm/kup-probe.entry.js +2 -2
  112. package/dist/esm/kup-qlik.entry.js +2 -2
  113. package/dist/esm/kup-snackbar.entry.js +5 -5
  114. package/dist/esm/loader.js +3 -3
  115. package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
  116. package/dist/ketchup/ketchup.esm.js +1 -1
  117. package/dist/ketchup/p-06c6cc68.js +1 -0
  118. package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
  119. package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
  120. package/dist/ketchup/p-1c44dc62.entry.js +1 -0
  121. package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
  122. package/dist/ketchup/p-38d7584e.js +1 -0
  123. package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
  124. package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
  125. package/dist/ketchup/p-578583db.entry.js +1 -0
  126. package/dist/ketchup/p-5866d507.entry.js +1 -0
  127. package/dist/ketchup/p-61059e9d.entry.js +9 -0
  128. package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
  129. package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
  130. package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
  131. package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
  132. package/dist/ketchup/p-7230ab97.entry.js +1 -0
  133. package/dist/ketchup/p-752b4cef.entry.js +1 -0
  134. package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
  135. package/dist/ketchup/p-928c5c36.js +1 -0
  136. package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
  137. package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
  138. package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
  139. package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
  140. package/dist/ketchup/p-cd5cfa7c.js +1 -0
  141. package/dist/ketchup/p-d154b3a0.entry.js +1 -0
  142. package/dist/ketchup/p-d2affb6f.entry.js +27 -0
  143. package/dist/ketchup/p-d3b542b3.js +2 -0
  144. package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
  145. package/dist/ketchup/p-da0eab60.entry.js +1 -0
  146. package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
  147. package/dist/ketchup/p-e9366aaf.entry.js +39 -0
  148. package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
  149. package/dist/ketchup/p-fc2b1229.js +30 -0
  150. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
  151. package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
  152. package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
  153. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
  154. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
  155. package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
  156. package/dist/types/components/kup-form/kup-form.d.ts +63 -0
  157. package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
  158. package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
  159. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
  160. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  161. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
  162. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
  163. package/dist/types/components.d.ts +460 -241
  164. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
  165. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  166. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
  167. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
  168. package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
  169. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
  170. package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
  171. package/dist/types/types/GenericTypes.d.ts +3 -2
  172. package/package.json +2 -2
  173. package/dist/cjs/f-cell-69294bca.js +0 -653
  174. package/dist/cjs/kup-field.cjs.entry.js +0 -241
  175. package/dist/collection/assets/form-editor.js +0 -338
  176. package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
  177. package/dist/collection/components/kup-field/kup-field.css +0 -48
  178. package/dist/collection/components/kup-field/kup-field.js +0 -514
  179. package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
  180. package/dist/esm/kup-field.entry.js +0 -237
  181. package/dist/ketchup/p-1ae66cc5.js +0 -1
  182. package/dist/ketchup/p-34b74425.js +0 -1
  183. package/dist/ketchup/p-4ffbc3ff.js +0 -1
  184. package/dist/ketchup/p-5264a3e6.entry.js +0 -1
  185. package/dist/ketchup/p-65974e48.entry.js +0 -1
  186. package/dist/ketchup/p-65b46587.entry.js +0 -40
  187. package/dist/ketchup/p-80968627.entry.js +0 -1
  188. package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
  189. package/dist/ketchup/p-aca0e54b.js +0 -30
  190. package/dist/ketchup/p-b8939a8b.entry.js +0 -1
  191. package/dist/ketchup/p-bfc3bac7.js +0 -1
  192. package/dist/ketchup/p-c5ce8951.entry.js +0 -1
  193. package/dist/ketchup/p-cad1e097.entry.js +0 -9
  194. package/dist/ketchup/p-db71436b.entry.js +0 -27
  195. package/dist/ketchup/p-e1039cf2.entry.js +0 -1
  196. package/dist/ketchup/p-ea10176c.entry.js +0 -1
  197. package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
  198. package/dist/types/components/kup-field/kup-field.d.ts +0 -90
@@ -1,241 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-eb556444.js');
6
- const kupManager = require('./kup-manager-7a941909.js');
7
- const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
-
9
- /**
10
- * Props of the kup-field component.
11
- * Used to export every prop in an object.
12
- */
13
- var KupFieldProps;
14
- (function (KupFieldProps) {
15
- KupFieldProps["customStyle"] = "Custom style of the component.";
16
- KupFieldProps["data"] = "Effective data to pass to the component.";
17
- KupFieldProps["label"] = "The text of the label. If set to empty or has only white space chars, the label will be removed.";
18
- KupFieldProps["labelPos"] = "Sets the label's position, left right or top.";
19
- KupFieldProps["showSubmit"] = "Sets whether the submit button must be displayed or not.";
20
- KupFieldProps["submitLabel"] = "Sets the submit button's label.";
21
- KupFieldProps["submitPos"] = "Sets the submit button's position, top right bottom or left.";
22
- KupFieldProps["type"] = "The type of the FLD";
23
- })(KupFieldProps || (KupFieldProps = {}));
24
-
25
- const kupFieldCss = ":host{display:block;font-size:var(--kup-font-size)}label{color:var(--kup-text-color);font-family:var(--kup-font-family);font-size:1em}.kup-field__component{display:inline-block}.label-top.submit-top label{float:left;margin:auto auto 1em auto}.label-top.submit-top kup-button{float:right;margin:auto auto 1em auto}.label-right label{display:inline-block;margin:auto auto auto 1em}.submit-right kup-button{display:inline-block;margin:auto auto auto 1em}.label-left label{display:inline-block;margin:auto 1em auto auto}.submit-left kup-button{display:inline-block;margin:auto 1em auto auto}.submit-bottom kup-button{display:block;margin:1em auto auto auto}";
26
-
27
- const KupField = class {
28
- constructor(hostRef) {
29
- index.registerInstance(this, hostRef);
30
- this.kupChange = index.createEvent(this, "kup-field-change", 6);
31
- this.kupSubmit = index.createEvent(this, "kup-field-submit", 6);
32
- /*-------------------------------------------------*/
33
- /* P r o p s */
34
- /*-------------------------------------------------*/
35
- /**
36
- * Custom style of the component.
37
- * @default ""
38
- * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
39
- */
40
- this.customStyle = '';
41
- /**
42
- * Effective data to pass to the component.
43
- * @default {}
44
- */
45
- this.data = {};
46
- /**
47
- * The text of the label. If set to empty or has only white space chars, the label will be removed.
48
- * @default ""
49
- */
50
- this.label = '';
51
- /**
52
- * Sets the label's position, left right or top.
53
- * @default "left"
54
- */
55
- this.labelPos = 'left';
56
- /**
57
- * Sets whether the submit button must be displayed or not.
58
- * @default false
59
- */
60
- this.showSubmit = false;
61
- /**
62
- * Sets the submit button's label.
63
- * @default ""
64
- */
65
- this.submitLabel = '';
66
- /**
67
- * Sets the submit button's position, top right bottom or left.
68
- * @default "right"
69
- */
70
- this.submitPos = 'right';
71
- /**
72
- * The type of the FLD
73
- * @default undefined
74
- */
75
- this.type = undefined;
76
- /*-------------------------------------------------*/
77
- /* I n t e r n a l V a r i a b l e s */
78
- /*-------------------------------------------------*/
79
- /**
80
- * Instance of the KupManager class.
81
- */
82
- this.kupManager = kupManager.kupManagerInstance();
83
- this.currentValue = null;
84
- this.previousValue = null;
85
- // Generates an instance of the event handler while binding the current component as its this value
86
- // This is done once per component to improve performance speed
87
- this.onChangeInstance = this.onChange.bind(this);
88
- this.onSubmitInstance = this.onSubmit.bind(this);
89
- }
90
- // When a change or update event must be launched as if it's coming from the FLD itself
91
- onChange(event) {
92
- const { value, info } = event.detail;
93
- this.kupChange.emit({
94
- originalEvent: event,
95
- oldValue: this.currentValue,
96
- value,
97
- info,
98
- });
99
- this.previousValue = this.currentValue;
100
- this.currentValue = value;
101
- }
102
- // When a submit event must be launched as if it's coming from the FLD itself
103
- onSubmit(event) {
104
- this.kupSubmit.emit({
105
- originalEvent: event,
106
- oldValue: this.previousValue,
107
- value: this.currentValue,
108
- info: {
109
- obj: event.detail.info && event.detail.info.obj
110
- ? event.detail.info.obj
111
- : undefined,
112
- },
113
- });
114
- }
115
- /*-------------------------------------------------*/
116
- /* P u b l i c M e t h o d s */
117
- /*-------------------------------------------------*/
118
- /**
119
- * Provides an interface to get the current value programmatically
120
- * @method getCurrentValue
121
- * @returns {any}
122
- */
123
- async getCurrentValue() {
124
- return this.currentValue;
125
- }
126
- /**
127
- * Used to retrieve component's props values.
128
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
129
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
130
- */
131
- async getProps(descriptions) {
132
- let props = {};
133
- if (descriptions) {
134
- props = KupFieldProps;
135
- }
136
- else {
137
- for (const key in KupFieldProps) {
138
- if (Object.prototype.hasOwnProperty.call(KupFieldProps, key)) {
139
- props[key] = this[key];
140
- }
141
- }
142
- }
143
- return props;
144
- }
145
- /**
146
- * This method is used to trigger a new render of the component.
147
- */
148
- async refresh() {
149
- index.forceUpdate(this);
150
- }
151
- /*-------------------------------------------------*/
152
- /* L i f e c y c l e H o o k s */
153
- /*-------------------------------------------------*/
154
- componentWillLoad() {
155
- this.kupManager.debug.logLoad(this, false);
156
- this.kupManager.theme.register(this);
157
- }
158
- componentDidLoad() {
159
- this.kupManager.debug.logLoad(this, true);
160
- }
161
- componentWillRender() {
162
- this.kupManager.debug.logRender(this, false);
163
- }
164
- componentDidRender() {
165
- this.kupManager.debug.logRender(this, true);
166
- }
167
- render() {
168
- let toRender = [];
169
- const baseClass = 'kup-field';
170
- let label = null;
171
- let submit = null;
172
- let wrapperClass = '';
173
- let propList = Object.assign({}, this.data);
174
- if (this.label.trim().length) {
175
- wrapperClass += ' label-' + this.labelPos;
176
- label = (index.h("label", { class: baseClass +
177
- '__label' +
178
- ' ' +
179
- baseClass +
180
- '--' +
181
- this.labelPos }, this.label));
182
- }
183
- if (this.showSubmit) {
184
- wrapperClass += ' submit-' + this.submitPos;
185
- submit = (index.h("kup-button", { class: baseClass + '__submit', label: this.submitLabel, "onkup-button-click": this.onSubmitInstance }));
186
- }
187
- //-- If a component must be positioned on top of the dynamic one --
188
- const labelIsTop = this.labelPos === 'top';
189
- const labelIsLeft = this.labelPos === 'left';
190
- const labelIsRight = this.labelPos === 'right';
191
- const submitIsTop = this.submitPos === 'top';
192
- const submitIsLeft = this.submitPos === 'left';
193
- const submitIsRight = this.submitPos === 'right';
194
- const submitIsBottom = this.submitPos === 'bottom';
195
- if (labelIsTop || submitIsTop) {
196
- toRender.push(index.h("div", { class: baseClass + '__top-container' }, labelIsTop && label ? label : null, submitIsTop && submit ? submit : null));
197
- }
198
- if (labelIsLeft && label) {
199
- toRender.push(label);
200
- }
201
- if (submitIsLeft && submit) {
202
- toRender.push(submit);
203
- }
204
- let comp = undefined;
205
- if (this.type === undefined) {
206
- this.kupManager.debug.logMessage(this, 'Type (state) is undefined!', kupManager.KupDebugCategory.WARNING);
207
- }
208
- else {
209
- switch (this.type.toLowerCase()) {
210
- case 'cmb':
211
- comp = 'kup-combobox';
212
- propList.onKupComboboxChange = this.onChangeInstance;
213
- break;
214
- case 'itx':
215
- comp = 'kup-text-field';
216
- propList.onkupTextFieldChange = this.onChangeInstance;
217
- break;
218
- case 'rad':
219
- comp = 'kup-radio';
220
- propList.onkupRadioChange = this.onChangeInstance;
221
- break;
222
- }
223
- }
224
- const $DynamicComponent = comp; // TODO check if there is a better typing
225
- toRender.push(index.h($DynamicComponent, Object.assign({ class: baseClass + '__component' }, propList)));
226
- if (labelIsRight && label) {
227
- toRender.push(label);
228
- }
229
- if ((submitIsRight || submitIsBottom) && submit) {
230
- toRender.push(submit);
231
- }
232
- return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, class: wrapperClass }, toRender)));
233
- }
234
- disconnectedCallback() {
235
- this.kupManager.theme.unregister(this);
236
- }
237
- get rootElement() { return index.getElement(this); }
238
- };
239
- KupField.style = kupFieldCss;
240
-
241
- exports.kup_field = KupField;
@@ -1,338 +0,0 @@
1
- const editor1 = document.getElementById('form-editor1');
2
- const button1 = document.getElementById('button1');
3
- const button2 = document.getElementById('button2');
4
-
5
- editor1.addEventListener('kup-formeditor-save', function (ev) {
6
- console.log(ev);
7
- alert('Saved!');
8
- });
9
-
10
- button1.addEventListener('kup-button-click', function () {
11
- editor1.data = data1;
12
- });
13
-
14
- button2.addEventListener('kup-button-click', function () {
15
- editor1.data = data2;
16
- });
17
-
18
- const data1 = {
19
- layout: 'column',
20
- sections: [
21
- {
22
- components: [
23
- {
24
- data: [
25
- {
26
- disabled: false,
27
- expandable: false,
28
- isExpanded: false,
29
- options: false,
30
- value: 'Ambiente di sviluppo',
31
- },
32
- ],
33
- title: '*NONE',
34
- type: 'LAB',
35
- id: '{F1694E68-D1C9-4A72-9EEF-B2DD72BDDDE2}',
36
- loaded: true,
37
- },
38
- ],
39
- layout: 'column',
40
- sections: [],
41
- id: 'SB',
42
- loaded: true,
43
- dim: '10%',
44
- },
45
- {
46
- components: [
47
- {
48
- dynamisms: [
49
- {
50
- event: 'Click',
51
- fun: 'F(EXD;*SCO;) 2([T1];[P1];[K1])',
52
- },
53
- ],
54
- data: [
55
- {
56
- disabled: false,
57
- expandable: false,
58
- isExpanded: false,
59
- options: false,
60
- obj: {
61
- t: 'MB',
62
- p: 'SCP_SCH',
63
- k: 'MU_X21_06',
64
- },
65
- value: 'Main',
66
- },
67
- ],
68
- title: '*NONE',
69
- type: 'BTN',
70
- id: '{65DF546F-536C-48A9-BCAD-4DB8B114DC0E}',
71
- loaded: true,
72
- },
73
- ],
74
- layout: 'column',
75
- sections: [],
76
- id: 'SC',
77
- loaded: true,
78
- dim: '10%',
79
- },
80
- {
81
- components: [
82
- {
83
- dynamisms: [
84
- {
85
- event: 'Click',
86
- fun: 'F(EXD;*SCO;) 2([T1];[P1];[K1]) G(NFIR)',
87
- },
88
- ],
89
- data: [
90
- {
91
- disabled: false,
92
- expandable: false,
93
- isExpanded: false,
94
- options: false,
95
- obj: {
96
- t: 'MB',
97
- p: 'SCP_SCH',
98
- k: 'MU_X21_06',
99
- },
100
- value: 'Main Popup',
101
- },
102
- ],
103
- title: '*NONE',
104
- type: 'BTN',
105
- id: '{ADC998D4-C884-4E78-9557-9DD8F271F1E6}',
106
- loaded: true,
107
- },
108
- ],
109
- layout: 'column',
110
- sections: [],
111
- id: 'SD',
112
- loaded: true,
113
- },
114
- {
115
- components: [
116
- {
117
- options: {
118
- url: '/Ln/f?n=test4.vue',
119
- type: 'vue',
120
- },
121
- fun: 'F(MAT;Plain.Poc.WebupJS.Api.Repositories.UtilsRepository;FromCsv) 1(FILE;;users)',
122
- title: '*NONE',
123
- type: 'MAT',
124
- id: '{C6BB07DF-FC62-453B-8AF3-79CB1EE050C3}',
125
- loaded: true,
126
- },
127
- ],
128
- layout: 'column',
129
- sections: [],
130
- id: 'SE',
131
- loaded: true,
132
- },
133
- ],
134
- fun: 'F(EXD;*SCO;) 2(MB;SCP_SCH;MU_X21_01)',
135
- type: 'SCH',
136
- loaded: true,
137
- };
138
-
139
- const data2 = {
140
- layout: 'column',
141
- sections: [
142
- {
143
- layout: 'row',
144
- sections: [
145
- {
146
- components: [
147
- {
148
- data: [
149
- {
150
- disabled: false,
151
- expandable: false,
152
- isExpanded: false,
153
- options: false,
154
- value: 'Etichetta 1',
155
- },
156
- ],
157
- title: '*NONE',
158
- type: 'LAB',
159
- id: '{FC2E04CE-DD30-4959-A8AA-B95A97C7BDAD}',
160
- loaded: true,
161
- },
162
- ],
163
- layout: 'column',
164
- sections: [],
165
- id: 'SA1',
166
- loaded: true,
167
- },
168
- {
169
- components: [
170
- {
171
- data: [
172
- {
173
- disabled: false,
174
- expandable: false,
175
- isExpanded: false,
176
- options: false,
177
- value: 'Etichetta 2',
178
- },
179
- ],
180
- title: '*NONE',
181
- type: 'LAB',
182
- id: '{59F0053D-C32C-4971-BACC-1113BA0D7753}',
183
- loaded: true,
184
- },
185
- ],
186
- layout: 'column',
187
- sections: [],
188
- id: 'SA2',
189
- loaded: true,
190
- },
191
- ],
192
- id: 'SA',
193
- loaded: true,
194
- },
195
- {
196
- components: [
197
- {
198
- data: [
199
- {
200
- disabled: false,
201
- expandable: false,
202
- isExpanded: false,
203
- options: false,
204
- value: 'Etichetta 3',
205
- },
206
- ],
207
- title: '*NONE',
208
- type: 'LAB',
209
- id: '{A35B7D1B-3B97-42E6-A926-9D84034796E3}',
210
- loaded: true,
211
- },
212
- ],
213
- layout: 'column',
214
- sections: [],
215
- id: 'SB',
216
- loaded: true,
217
- },
218
- {
219
- components: [
220
- {
221
- dynamisms: [
222
- {
223
- event: 'Click',
224
- fun: 'F(EXD;*SCO;) 2([T1];[P1];[K1])',
225
- },
226
- ],
227
- data: [
228
- {
229
- disabled: false,
230
- expandable: false,
231
- isExpanded: false,
232
- options: false,
233
- obj: {
234
- t: 'MB',
235
- p: 'SCP_SCH',
236
- k: 'PL_X21_01',
237
- },
238
- value: 'Prove varie',
239
- },
240
- {
241
- disabled: false,
242
- expandable: false,
243
- isExpanded: false,
244
- options: false,
245
- obj: {
246
- t: 'MB',
247
- p: 'SCP_SCH',
248
- k: 'PL_X21_02',
249
- },
250
- value: 'Utente corrente',
251
- },
252
- {
253
- disabled: false,
254
- expandable: false,
255
- isExpanded: false,
256
- options: false,
257
- obj: {
258
- t: 'MB',
259
- p: 'SCP_SCH',
260
- k: 'PL_X21_03',
261
- },
262
- value: 'Naviga documenti',
263
- },
264
- ],
265
- title: '*NONE',
266
- type: 'BTN',
267
- id: '{6D279D65-2694-4FE5-9455-50A7998FF859}',
268
- loaded: true,
269
- },
270
- ],
271
- layout: 'column',
272
- sections: [],
273
- id: 'SC',
274
- loaded: true,
275
- },
276
- {
277
- components: [
278
- {
279
- dynamisms: [
280
- {
281
- event: 'Click',
282
- fun: 'F(EXD;*SCO;) 2([T1];[P1];[K1])',
283
- },
284
- ],
285
- data: [
286
- {
287
- disabled: false,
288
- expandable: false,
289
- isExpanded: false,
290
- options: false,
291
- obj: {
292
- t: 'MB',
293
- p: 'SCP_SCH',
294
- k: 'PL_X21_04',
295
- },
296
- value: 'Cerca documenti',
297
- },
298
- {
299
- disabled: false,
300
- expandable: false,
301
- isExpanded: false,
302
- options: false,
303
- obj: {
304
- t: 'MB',
305
- p: 'SCP_SCH',
306
- k: 'PL_X21_05',
307
- },
308
- value: 'Test prototipazione',
309
- },
310
- {
311
- disabled: false,
312
- expandable: false,
313
- isExpanded: false,
314
- options: false,
315
- obj: {
316
- t: 'MB',
317
- p: 'SCP_SCH',
318
- k: 'PL_X21_06',
319
- },
320
- value: 'Estrai tabella',
321
- },
322
- ],
323
- title: '*NONE',
324
- type: 'BTN',
325
- id: '{F651FA0B-348E-4CE1-A3EA-4C9B95578E9E}',
326
- loaded: true,
327
- },
328
- ],
329
- layout: 'column',
330
- sections: [],
331
- id: 'SD',
332
- loaded: true,
333
- },
334
- ],
335
- fun: 'F(EXD;*SCO;) 2(MB;SCP_SCH;MU_X21_06)',
336
- type: 'SCH',
337
- loaded: true,
338
- };
@@ -1,15 +0,0 @@
1
- /**
2
- * Props of the kup-field component.
3
- * Used to export every prop in an object.
4
- */
5
- export var KupFieldProps;
6
- (function (KupFieldProps) {
7
- KupFieldProps["customStyle"] = "Custom style of the component.";
8
- KupFieldProps["data"] = "Effective data to pass to the component.";
9
- KupFieldProps["label"] = "The text of the label. If set to empty or has only white space chars, the label will be removed.";
10
- KupFieldProps["labelPos"] = "Sets the label's position, left right or top.";
11
- KupFieldProps["showSubmit"] = "Sets whether the submit button must be displayed or not.";
12
- KupFieldProps["submitLabel"] = "Sets the submit button's label.";
13
- KupFieldProps["submitPos"] = "Sets the submit button's position, top right bottom or left.";
14
- KupFieldProps["type"] = "The type of the FLD";
15
- })(KupFieldProps || (KupFieldProps = {}));
@@ -1,48 +0,0 @@
1
- :host {
2
- display: block;
3
- font-size: var(--kup-font-size);
4
- }
5
-
6
- label {
7
- color: var(--kup-text-color);
8
- font-family: var(--kup-font-family);
9
- font-size: 1em;
10
- }
11
-
12
- .kup-field__component {
13
- display: inline-block;
14
- }
15
-
16
- .label-top.submit-top label {
17
- float: left;
18
- margin: auto auto 1em auto;
19
- }
20
- .label-top.submit-top kup-button {
21
- float: right;
22
- margin: auto auto 1em auto;
23
- }
24
-
25
- .label-right label {
26
- display: inline-block;
27
- margin: auto auto auto 1em;
28
- }
29
-
30
- .submit-right kup-button {
31
- display: inline-block;
32
- margin: auto auto auto 1em;
33
- }
34
-
35
- .label-left label {
36
- display: inline-block;
37
- margin: auto 1em auto auto;
38
- }
39
-
40
- .submit-left kup-button {
41
- display: inline-block;
42
- margin: auto 1em auto auto;
43
- }
44
-
45
- .submit-bottom kup-button {
46
- display: block;
47
- margin: 1em auto auto auto;
48
- }