@sme.up/ketchup 5.0.0 → 5.2.1-SNAPSHOT

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 (224) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{cell-utils-720be0c8.js → cell-utils-d96b2993.js} +4 -4
  3. package/dist/cjs/{f-button-dbf3cd3a.js → f-button-2b9b99b1.js} +2 -2
  4. package/dist/cjs/{f-cell-93d984ad.js → f-cell-8351cb84.js} +8 -96
  5. package/dist/cjs/{f-chip-438213eb.js → f-chip-df59e1b0.js} +3 -3
  6. package/dist/cjs/{f-image-21865ab7.js → f-image-12bab3b5.js} +2 -2
  7. package/dist/cjs/f-text-field-e7c35b5b.js +94 -0
  8. package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
  9. package/dist/cjs/{index-ab119fad.js → index-eb556444.js} +6 -1
  10. package/dist/cjs/ketchup.cjs.js +3 -3
  11. package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
  12. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +641 -3331
  13. package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
  14. package/dist/cjs/kup-cell.cjs.entry.js +9 -8
  15. package/dist/cjs/kup-dash-list.cjs.entry.js +5 -5
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +5 -5
  17. package/dist/cjs/kup-drawer.cjs.entry.js +8 -5
  18. package/dist/cjs/kup-echart.cjs.entry.js +210 -60
  19. package/dist/cjs/kup-field.cjs.entry.js +3 -3
  20. package/dist/cjs/kup-iframe.cjs.entry.js +4 -4
  21. package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
  22. package/dist/cjs/kup-magic-box.cjs.entry.js +7 -7
  23. package/dist/cjs/{kup-manager-09c0c1fc.js → kup-manager-5c03da64.js} +3061 -2642
  24. package/dist/cjs/kup-nav-bar.cjs.entry.js +6 -6
  25. package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
  26. package/dist/cjs/kup-photo-frame.cjs.entry.js +179 -0
  27. package/dist/cjs/kup-probe.cjs.entry.js +3 -3
  28. package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
  29. package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
  30. package/dist/cjs/loader.cjs.js +3 -3
  31. package/dist/cjs/{utils-a60ab5fa.js → utils-e99921c1.js} +4 -38
  32. package/dist/collection/assets/card.js +30 -30
  33. package/dist/collection/assets/data-table.js +24 -74
  34. package/dist/collection/assets/echart.js +481 -0
  35. package/dist/collection/assets/index.js +87 -79
  36. package/dist/collection/assets/kupdata.js +29 -41
  37. package/dist/collection/assets/kuptooltip.js +608 -0
  38. package/dist/collection/assets/list.js +6 -6
  39. package/dist/collection/assets/nav-bar.js +4 -4
  40. package/dist/collection/assets/probe.js +18 -18
  41. package/dist/collection/collection-manifest.json +3 -1
  42. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +4 -4
  43. package/dist/collection/components/kup-box/kup-box.js +9 -9
  44. package/dist/collection/components/kup-button-list/kup-button-list.js +4 -4
  45. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
  46. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +20 -20
  47. package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
  48. package/dist/collection/components/kup-card/kup-card.css +35 -0
  49. package/dist/collection/components/kup-card/kup-card.js +1 -0
  50. package/dist/collection/components/kup-chip/kup-chip.js +4 -4
  51. package/dist/collection/components/kup-combobox/kup-combobox.js +5 -5
  52. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +0 -2
  53. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +31 -32
  54. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  55. package/dist/collection/components/kup-data-table/kup-data-table.js +112 -159
  56. package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
  57. package/dist/collection/components/kup-drawer/kup-drawer.js +4 -1
  58. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +3 -3
  59. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +14 -14
  60. package/dist/collection/components/kup-echart/kup-echart-declarations.js +3 -0
  61. package/dist/collection/components/kup-echart/kup-echart.js +246 -58
  62. package/dist/collection/components/kup-image/assets/svg/instagram.svg +1 -0
  63. package/dist/collection/components/kup-image/assets/svg/pinterest.svg +1 -0
  64. package/dist/collection/components/kup-image/assets/svg/reddit.svg +1 -0
  65. package/dist/collection/components/kup-list/kup-list-helper.js +26 -26
  66. package/dist/collection/components/kup-list/kup-list.css +35 -3
  67. package/dist/collection/components/kup-list/kup-list.js +52 -44
  68. package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
  69. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +2 -2
  70. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
  71. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
  72. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
  73. package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -0
  74. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +70 -0
  75. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +382 -0
  76. package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +1 -1
  77. package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -8
  78. package/dist/collection/components/kup-tree/kup-tree.js +25 -38
  79. package/dist/collection/f-components/f-paginator/f-paginator.js +6 -6
  80. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +2 -2
  81. package/dist/collection/managers/kup-data/kup-data-column-helper.js +27 -3
  82. package/dist/collection/managers/kup-data/kup-data-declarations.js +2 -1
  83. package/dist/collection/managers/kup-data/kup-data-node-helper.js +1 -1
  84. package/dist/collection/managers/kup-data/kup-data-row-helper.js +2 -2
  85. package/dist/collection/managers/kup-data/kup-data.js +337 -155
  86. package/dist/collection/managers/kup-dates/kup-dates.js +2 -2
  87. package/dist/collection/managers/kup-debug/kup-debug.js +7 -6
  88. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
  89. package/dist/collection/managers/kup-language/kup-language.js +2 -2
  90. package/dist/collection/managers/kup-manager/kup-manager.js +25 -1
  91. package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
  92. package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
  93. package/dist/collection/managers/kup-math/kup-math.js +161 -0
  94. package/dist/collection/managers/kup-objects/kup-objects.js +48 -1
  95. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
  96. package/dist/collection/managers/kup-theme/kup-theme.js +2 -2
  97. package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
  98. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
  99. package/dist/collection/types/GenericTypes.js +1 -0
  100. package/dist/collection/utils/cell-utils.js +2 -3
  101. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
  102. package/dist/collection/utils/utils.js +3 -74
  103. package/dist/esm/{cell-utils-b80ccb8c.js → cell-utils-f4bdbbc8.js} +4 -4
  104. package/dist/esm/{f-button-9e835467.js → f-button-54a49fd8.js} +2 -2
  105. package/dist/esm/{f-cell-f8bb2e04.js → f-cell-d5dac50b.js} +8 -95
  106. package/dist/esm/{f-chip-953c6915.js → f-chip-a3035b4b.js} +3 -3
  107. package/dist/esm/{f-image-78c5265e.js → f-image-d32465e3.js} +2 -2
  108. package/dist/esm/f-text-field-c25cc63f.js +92 -0
  109. package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
  110. package/dist/esm/{index-78f3699d.js → index-baeab1ac.js} +6 -2
  111. package/dist/esm/ketchup.js +3 -3
  112. package/dist/esm/kup-accordion.entry.js +5 -5
  113. package/dist/esm/kup-autocomplete_27.entry.js +625 -3315
  114. package/dist/esm/kup-calendar.entry.js +8 -8
  115. package/dist/esm/kup-cell.entry.js +9 -8
  116. package/dist/esm/kup-dash-list.entry.js +5 -5
  117. package/dist/esm/kup-dash_2.entry.js +5 -5
  118. package/dist/esm/kup-drawer.entry.js +8 -5
  119. package/dist/esm/kup-echart.entry.js +210 -60
  120. package/dist/esm/kup-field.entry.js +3 -3
  121. package/dist/esm/kup-iframe.entry.js +4 -4
  122. package/dist/esm/kup-lazy.entry.js +4 -4
  123. package/dist/esm/kup-magic-box.entry.js +7 -7
  124. package/dist/esm/{kup-manager-bba62291.js → kup-manager-9316a184.js} +3062 -2642
  125. package/dist/esm/kup-nav-bar.entry.js +6 -6
  126. package/dist/esm/kup-numeric-picker.entry.js +419 -0
  127. package/dist/esm/kup-photo-frame.entry.js +175 -0
  128. package/dist/esm/kup-probe.entry.js +3 -3
  129. package/dist/esm/kup-qlik.entry.js +3 -3
  130. package/dist/esm/kup-snackbar.entry.js +6 -6
  131. package/dist/esm/loader.js +3 -3
  132. package/dist/esm/{utils-d1569956.js → utils-f24319a0.js} +5 -37
  133. package/dist/ketchup/assets/svg/instagram.svg +1 -0
  134. package/dist/ketchup/assets/svg/pinterest.svg +1 -0
  135. package/dist/ketchup/assets/svg/reddit.svg +1 -0
  136. package/dist/ketchup/ketchup.esm.js +1 -1
  137. package/dist/ketchup/p-09d708c4.entry.js +1 -0
  138. package/dist/ketchup/p-11e72a8c.entry.js +1 -0
  139. package/dist/ketchup/p-12773ca8.js +9 -0
  140. package/dist/ketchup/p-203d6295.entry.js +1 -0
  141. package/dist/ketchup/p-34748c91.js +1 -0
  142. package/dist/ketchup/p-34b74425.js +1 -0
  143. package/dist/ketchup/p-40f97429.js +1 -0
  144. package/dist/ketchup/p-4173422f.entry.js +1 -0
  145. package/dist/ketchup/p-41741c28.entry.js +1 -0
  146. package/dist/ketchup/p-44192f30.entry.js +1 -0
  147. package/dist/ketchup/{p-ebf4cf56.js → p-44f8da2a.js} +1 -1
  148. package/dist/ketchup/{p-fa540f82.js → p-4f56932b.js} +1 -1
  149. package/dist/ketchup/p-669bde31.js +1 -0
  150. package/dist/ketchup/p-67842f1e.entry.js +1 -0
  151. package/dist/ketchup/{p-f993f813.js → p-7a74ad17.js} +1 -1
  152. package/dist/ketchup/p-7ba8fa4a.entry.js +39 -0
  153. package/dist/ketchup/p-7de0d7e1.js +1 -0
  154. package/dist/ketchup/p-8418e8fa.entry.js +1 -0
  155. package/dist/ketchup/p-96bf19aa.entry.js +1 -0
  156. package/dist/ketchup/p-9a61d8dc.entry.js +1 -0
  157. package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
  158. package/dist/ketchup/{p-aa27f9f7.entry.js → p-b6c21223.entry.js} +2 -2
  159. package/dist/ketchup/p-bb8844bf.entry.js +1 -0
  160. package/dist/ketchup/p-c58a2a81.entry.js +1 -0
  161. package/dist/ketchup/p-ca3d585b.entry.js +1 -0
  162. package/dist/ketchup/p-e6709c26.entry.js +1 -0
  163. package/dist/ketchup/p-e8e3c9da.entry.js +1 -0
  164. package/dist/ketchup/p-ecb7069b.js +135 -0
  165. package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +2 -1
  166. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
  167. package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
  168. package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
  169. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -2
  170. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  171. package/dist/types/components/kup-data-table/kup-data-table.d.ts +7 -15
  172. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
  173. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +3 -0
  174. package/dist/types/components/kup-echart/kup-echart.d.ts +12 -1
  175. package/dist/types/components/kup-list/kup-list-declarations.d.ts +3 -7
  176. package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
  177. package/dist/types/components/kup-list/kup-list.d.ts +2 -2
  178. package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
  179. package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
  180. package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -0
  181. package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -0
  182. package/dist/types/components.d.ts +249 -28
  183. package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +9 -1
  184. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +4 -25
  185. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +1 -1
  186. package/dist/types/managers/kup-data/kup-data.d.ts +63 -27
  187. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +21 -0
  188. package/dist/types/managers/kup-manager/kup-manager.d.ts +4 -0
  189. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +27 -0
  190. package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
  191. package/dist/types/managers/kup-math/kup-math.d.ts +61 -0
  192. package/dist/types/managers/kup-objects/kup-objects.d.ts +22 -0
  193. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
  194. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
  195. package/dist/types/types/GenericTypes.d.ts +1 -0
  196. package/dist/types/utils/utils.d.ts +0 -18
  197. package/package.json +3 -3
  198. package/CHANGELOG.md +0 -5
  199. package/dist/collection/managers/kup-data/kup-data-dataset-helper.js +0 -262
  200. package/dist/collection/managers/kup-data/kup-data-helper.js +0 -61
  201. package/dist/collection/utils/state-utils.js +0 -9
  202. package/dist/ketchup/p-0032a782.entry.js +0 -1
  203. package/dist/ketchup/p-18c4d083.entry.js +0 -1
  204. package/dist/ketchup/p-199c972e.entry.js +0 -1
  205. package/dist/ketchup/p-29800a2e.js +0 -1
  206. package/dist/ketchup/p-34aa8d8a.entry.js +0 -1
  207. package/dist/ketchup/p-542279e9.entry.js +0 -1
  208. package/dist/ketchup/p-5b26a7a8.entry.js +0 -39
  209. package/dist/ketchup/p-5c97e7ab.js +0 -1
  210. package/dist/ketchup/p-6817ca85.entry.js +0 -1
  211. package/dist/ketchup/p-76e674ca.entry.js +0 -1
  212. package/dist/ketchup/p-78aa6f1b.js +0 -1
  213. package/dist/ketchup/p-842b66aa.entry.js +0 -1
  214. package/dist/ketchup/p-894981c0.entry.js +0 -143
  215. package/dist/ketchup/p-8ac2fa75.entry.js +0 -1
  216. package/dist/ketchup/p-907c9e11.entry.js +0 -1
  217. package/dist/ketchup/p-9ae9149b.entry.js +0 -1
  218. package/dist/ketchup/p-b0d1bdd8.js +0 -9
  219. package/dist/ketchup/p-e1e4c951.entry.js +0 -1
  220. package/dist/ketchup/p-eba369d9.entry.js +0 -1
  221. package/dist/ketchup/p-ed0b8666.js +0 -1
  222. package/dist/types/managers/kup-data/kup-data-dataset-helper.d.ts +0 -42
  223. package/dist/types/managers/kup-data/kup-data-helper.d.ts +0 -11
  224. package/dist/types/utils/state-utils.d.ts +0 -1
@@ -342,7 +342,7 @@ export class KupColumnMenu {
342
342
  let props = [];
343
343
  if (comp.showFilters) {
344
344
  if (this.filtersColumnMenuInstance.isColumnFiltrableByInterval(column)) {
345
- props.concat(this.prepIntervalTextfield(comp, column));
345
+ props = props.concat(this.prepIntervalTextfield(comp, column));
346
346
  }
347
347
  else if (dom.ketchup.objects.isStringObject(column.obj)) {
348
348
  let filterInitialValue = this.filtersColumnMenuInstance.getTextFilterValue(comp.filters, column.name);
@@ -1,4 +1,3 @@
1
- import numeral from 'numeral';
2
1
  import { KupDatesFormats, KupDatesNormalize, } from '../managers/kup-dates/kup-dates-declarations';
3
2
  const dom = document.documentElement;
4
3
  export var DateTimeFormatOptionsMonth;
@@ -16,26 +15,6 @@ export function identify(array) {
16
15
  }
17
16
  }
18
17
  }
19
- export function format(first, middle, last) {
20
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
21
- }
22
- export function generateUniqueId(field = 'def') {
23
- return new Date().getTime() + field.trim().replace(/\s/g, '_');
24
- }
25
- export function generateUuidv4() {
26
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
27
- var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
28
- return v.toString(16);
29
- });
30
- }
31
- export function eventFromElement(element, eventSource) {
32
- while (eventSource) {
33
- if (eventSource === element)
34
- return true;
35
- eventSource = eventSource.parentElement;
36
- }
37
- return false;
38
- }
39
18
  function getSeparator(locale, separatorType) {
40
19
  const numberWithGroupAndDecimalSeparator = 1000.1;
41
20
  return Intl.NumberFormat(locale)
@@ -86,34 +65,6 @@ function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
86
65
  .join('');
87
66
  return timeFormat;
88
67
  }
89
- /**
90
- * Convert argument to boolean. Everything is false unless: true, "true", 1, "1", "on", "yes"
91
- * @param value the value to convert
92
- * @returns the boolean value of passed argument
93
- */
94
- export function getBoolean(value) {
95
- switch (value) {
96
- case true:
97
- case 'true':
98
- case 1:
99
- case '1':
100
- case 'on':
101
- case 'yes':
102
- return true;
103
- default:
104
- return false;
105
- }
106
- }
107
- /**
108
- * Check if an object is undefined, null or empty
109
- * @param obj the object to check
110
- * @returns true or false
111
- */
112
- export function isEmpty(obj) {
113
- return (!obj ||
114
- obj === null ||
115
- (Object.keys(obj).length === 0 && obj.constructor === Object));
116
- }
117
68
  /**
118
69
  * @param value number as string, formatted by actual browser locale
119
70
  * @param type - type of number for calculate suffix
@@ -141,7 +92,7 @@ export function stringToNumber(input) {
141
92
  if (!input || input == null || input.trim() == '') {
142
93
  input = '0';
143
94
  }
144
- return numeral(input).value();
95
+ return dom.ketchup.math.numberify(input);
145
96
  }
146
97
  /**
147
98
  * @param input number
@@ -234,7 +185,8 @@ function numberStringToNumberString(input, type, decFmt) {
234
185
  if (decFmt != '.') {
235
186
  input = input.replace(/,/g, '.');
236
187
  }
237
- if (numeral(input).value() == null || isNaN(numeral(input).value())) {
188
+ if (dom.ketchup.math.numberify(input) == null ||
189
+ isNaN(dom.ketchup.math.numberify(input))) {
238
190
  return originalInputValue;
239
191
  }
240
192
  let unf = stringToNumber(input);
@@ -513,29 +465,6 @@ export function fillString(stringIn, stringForFill, finalLen, addBefore) {
513
465
  return stringIn + stringOut;
514
466
  }
515
467
  }
516
- export function deepEqual(object1, object2) {
517
- if (!(isObject(object1) && isObject(object2))) {
518
- return object1 === object2;
519
- }
520
- const keys1 = Object.keys(object1);
521
- const keys2 = Object.keys(object2);
522
- if (keys1.length !== keys2.length) {
523
- return false;
524
- }
525
- for (const key of keys1) {
526
- const val1 = object1[key];
527
- const val2 = object2[key];
528
- const areObjects = isObject(val1) && isObject(val2);
529
- if ((areObjects && !deepEqual(val1, val2)) ||
530
- (!areObjects && val1 !== val2)) {
531
- return false;
532
- }
533
- }
534
- return true;
535
- }
536
- export function isObject(object) {
537
- return object != null && typeof object === 'object';
538
- }
539
468
  /**
540
469
  * Used to retrieve component's props values.
541
470
  * @param {any} comp - Component calling this function.
@@ -1,5 +1,5 @@
1
- import { d as KupDatesFormats, n as numeral } from './kup-manager-bba62291.js';
2
- import { m as unformattedStringToFormattedStringNumber, p as unformattedStringToFormattedStringTime, q as unformattedStringToFormattedStringTimestamp, d as stringToNumber } from './utils-d1569956.js';
1
+ import { k as unformattedStringToFormattedStringNumber, m as unformattedStringToFormattedStringTime, o as unformattedStringToFormattedStringTimestamp, d as stringToNumber } from './utils-f24319a0.js';
2
+ import { d as KupDatesFormats } from './kup-manager-9316a184.js';
3
3
 
4
4
  const dom = document.documentElement;
5
5
  // -------------
@@ -28,9 +28,9 @@ function getValueForDisplay2(values, column) {
28
28
  }
29
29
  function formatToNumber(cell) {
30
30
  if (cell.obj) {
31
- return numeral(cell.obj.k).value();
31
+ return dom.ketchup.math.numberify(cell.obj.k);
32
32
  }
33
- return numeral(cell.value).value();
33
+ return dom.ketchup.math.numberify(cell.value);
34
34
  }
35
35
  function _getCellValueForDisplay(value, column, cell) {
36
36
  let obj = column != null ? column.obj : null;
@@ -1,6 +1,6 @@
1
- import { h } from './index-78f3699d.js';
1
+ import { h } from './index-baeab1ac.js';
2
2
  import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
3
- import { F as FImage } from './f-image-78c5265e.js';
3
+ import { F as FImage } from './f-image-d32465e3.js';
4
4
 
5
5
  /*-------------------------------------------------*/
6
6
  /* C o m p o n e n t */
@@ -1,97 +1,10 @@
1
- import { a as KupThemeIconValues, c as KupTagNames, b as KupThemeColorValues } from './kup-manager-bba62291.js';
2
- import { h, a as getAssetPath } from './index-78f3699d.js';
3
- import { b as getCellValueForDisplay } from './cell-utils-b80ccb8c.js';
4
- import { d as stringToNumber } from './utils-d1569956.js';
5
- import { F as FImage } from './f-image-78c5265e.js';
6
- import { F as FChip } from './f-chip-953c6915.js';
7
-
8
- /*-------------------------------------------------*/
9
- /* C o m p o n e n t */
10
- /*-------------------------------------------------*/
11
- const FTextField = (props, children) => {
12
- return (h("div", Object.assign({ class: `f-text-field ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
13
- props.leadingLabel || props.trailingLabel ? (h("div", { class: `mdc-form-field ${props.leadingLabel ? 'mdc-form-field--align-end' : ''}` }, [
14
- setContent(props),
15
- setHelper(props),
16
- h("label", null, props.label),
17
- ])) : ([setContent(props), setHelper(props)]),
18
- children));
19
- };
20
- /*-------------------------------------------------*/
21
- /* M e t h o d s */
22
- /*-------------------------------------------------*/
23
- function setContent(props) {
24
- const isOutlined = props.textArea || props.outlined;
25
- let labelEl;
26
- let iconEl;
27
- if (props.label && !props.leadingLabel && !props.trailingLabel) {
28
- labelEl = (h("label", { class: "mdc-floating-label", htmlFor: "kup-input" }, props.label));
29
- }
30
- if (props.icon) {
31
- let iconStyle;
32
- let iconClass = '';
33
- if (Object.values(KupThemeIconValues).indexOf(props.icon) > -1) {
34
- iconClass = props.icon.replace('--', '');
35
- }
36
- else {
37
- let svg = `url('${getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
38
- iconStyle = {
39
- mask: svg,
40
- webkitMask: svg,
41
- };
42
- }
43
- iconEl = (h("span", { style: iconStyle, onClick: props.onIconClick, class: `mdc-text-field__icon kup-icon action ${iconClass}` }));
44
- }
45
- const classObj = {
46
- 'is-clearable': props.isClearable,
47
- 'mdc-text-field': true,
48
- 'mdc-text-field--disabled': props.disabled,
49
- 'mdc-text-field--filled': !props.fullWidth && !isOutlined,
50
- 'mdc-text-field--no-label': !props.label,
51
- 'mdc-text-field--fullwidth': props.fullWidth,
52
- 'mdc-text-field--outlined': isOutlined,
53
- 'mdc-text-field--textarea': props.textArea,
54
- 'mdc-text-field--with-leading-icon': props.icon && !props.trailingIcon,
55
- 'mdc-text-field--with-trailing-icon': props.icon && props.trailingIcon,
56
- };
57
- return (h("div", { class: classObj },
58
- props.textArea && props.maxLength ? (h("div", { class: "mdc-text-field-character-counter" },
59
- "'0 / ' + ",
60
- props.maxLength)) : undefined,
61
- !props.trailingIcon ? iconEl : undefined,
62
- props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
63
- h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
64
- props.isClearable ? (h("span", { class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
65
- props.trailingIcon ? iconEl : undefined,
66
- !props.fullWidth && !isOutlined ? labelEl : undefined,
67
- isOutlined ? (h("div", { class: "mdc-notched-outline" },
68
- h("div", { class: "mdc-notched-outline__leading" }),
69
- h("div", { class: "mdc-notched-outline__notch" }, labelEl),
70
- h("div", { class: "mdc-notched-outline__trailing" }))) : (h("span", { class: "mdc-line-ripple" }))));
71
- }
72
- function setHelper(props) {
73
- if (props.helperEnabled !== false) {
74
- if (props.helper) {
75
- const classObj = {
76
- 'mdc-text-field-helper-text': true,
77
- 'mdc-text-field-helper-text--persistent': !props.helperWhenFocused,
78
- };
79
- return (h("div", { class: "mdc-text-field-helper-line" },
80
- h("div", { class: classObj }, props.helper),
81
- props.maxLength && !props.textArea ? (h("div", { class: "mdc-text-field-character-counter" },
82
- "'0 / ' + ",
83
- props.maxLength.toString())) : undefined));
84
- }
85
- else {
86
- if (props.maxLength && !props.textArea) {
87
- return (h("div", { class: "mdc-text-field-helper-line" },
88
- h("div", { class: "mdc-text-field-character-counter" },
89
- "'0 / ' + ",
90
- props.maxLength)));
91
- }
92
- }
93
- }
94
- }
1
+ import { c as KupTagNames, b as KupThemeColorValues } from './kup-manager-9316a184.js';
2
+ import { h } from './index-baeab1ac.js';
3
+ import { b as getCellValueForDisplay } from './cell-utils-f4bdbbc8.js';
4
+ import { F as FTextField } from './f-text-field-c25cc63f.js';
5
+ import { d as stringToNumber } from './utils-f24319a0.js';
6
+ import { F as FImage } from './f-image-d32465e3.js';
7
+ import { F as FChip } from './f-chip-a3035b4b.js';
95
8
 
96
9
  const autoAlignComps = [KupTagNames.DATA_TABLE, KupTagNames.TREE];
97
10
  /**
@@ -734,4 +647,4 @@ function cellEvent(e, props, cellType, cellEventName) {
734
647
  }
735
648
  }
736
649
 
737
- export { FTextField as F, FCell as a, FCheckbox as b, FCellPadding as c };
650
+ export { FCell as F, FCheckbox as a, FCellPadding as b };
@@ -1,6 +1,6 @@
1
- import { h } from './index-78f3699d.js';
2
- import { F as FImage } from './f-image-78c5265e.js';
3
- import { a as KupThemeIconValues, i as KupLanguageGeneric, b as KupThemeColorValues } from './kup-manager-bba62291.js';
1
+ import { h } from './index-baeab1ac.js';
2
+ import { F as FImage } from './f-image-d32465e3.js';
3
+ import { a as KupThemeIconValues, i as KupLanguageGeneric, b as KupThemeColorValues } from './kup-manager-9316a184.js';
4
4
 
5
5
  /**
6
6
  * Types of the f-chip component.
@@ -1,5 +1,5 @@
1
- import { h, a as getAssetPath } from './index-78f3699d.js';
2
- import { b as KupThemeColorValues } from './kup-manager-bba62291.js';
1
+ import { h, a as getAssetPath } from './index-baeab1ac.js';
2
+ import { b as KupThemeColorValues } from './kup-manager-9316a184.js';
3
3
 
4
4
  /**
5
5
  * The type of a CSS step in CSS-drawing mode.
@@ -0,0 +1,92 @@
1
+ import { h, a as getAssetPath } from './index-baeab1ac.js';
2
+ import { a as KupThemeIconValues } from './kup-manager-9316a184.js';
3
+
4
+ /*-------------------------------------------------*/
5
+ /* C o m p o n e n t */
6
+ /*-------------------------------------------------*/
7
+ const FTextField = (props, children) => {
8
+ return (h("div", Object.assign({ class: `f-text-field ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
9
+ props.leadingLabel || props.trailingLabel ? (h("div", { class: `mdc-form-field ${props.leadingLabel ? 'mdc-form-field--align-end' : ''}` }, [
10
+ setContent(props),
11
+ setHelper(props),
12
+ h("label", null, props.label),
13
+ ])) : ([setContent(props), setHelper(props)]),
14
+ children));
15
+ };
16
+ /*-------------------------------------------------*/
17
+ /* M e t h o d s */
18
+ /*-------------------------------------------------*/
19
+ function setContent(props) {
20
+ const isOutlined = props.textArea || props.outlined;
21
+ let labelEl;
22
+ let iconEl;
23
+ if (props.label && !props.leadingLabel && !props.trailingLabel) {
24
+ labelEl = (h("label", { class: "mdc-floating-label", htmlFor: "kup-input" }, props.label));
25
+ }
26
+ if (props.icon) {
27
+ let iconStyle;
28
+ let iconClass = '';
29
+ if (Object.values(KupThemeIconValues).indexOf(props.icon) > -1) {
30
+ iconClass = props.icon.replace('--', '');
31
+ }
32
+ else {
33
+ let svg = `url('${getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
34
+ iconStyle = {
35
+ mask: svg,
36
+ webkitMask: svg,
37
+ };
38
+ }
39
+ iconEl = (h("span", { style: iconStyle, onClick: props.onIconClick, class: `mdc-text-field__icon kup-icon action ${iconClass}` }));
40
+ }
41
+ const classObj = {
42
+ 'is-clearable': props.isClearable,
43
+ 'mdc-text-field': true,
44
+ 'mdc-text-field--disabled': props.disabled,
45
+ 'mdc-text-field--filled': !props.fullWidth && !isOutlined,
46
+ 'mdc-text-field--no-label': !props.label,
47
+ 'mdc-text-field--fullwidth': props.fullWidth,
48
+ 'mdc-text-field--outlined': isOutlined,
49
+ 'mdc-text-field--textarea': props.textArea,
50
+ 'mdc-text-field--with-leading-icon': props.icon && !props.trailingIcon,
51
+ 'mdc-text-field--with-trailing-icon': props.icon && props.trailingIcon,
52
+ };
53
+ return (h("div", { class: classObj },
54
+ props.textArea && props.maxLength ? (h("div", { class: "mdc-text-field-character-counter" },
55
+ "'0 / ' + ",
56
+ props.maxLength)) : undefined,
57
+ !props.trailingIcon ? iconEl : undefined,
58
+ props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
59
+ h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
60
+ props.isClearable ? (h("span", { class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
61
+ props.trailingIcon ? iconEl : undefined,
62
+ !props.fullWidth && !isOutlined ? labelEl : undefined,
63
+ isOutlined ? (h("div", { class: "mdc-notched-outline" },
64
+ h("div", { class: "mdc-notched-outline__leading" }),
65
+ h("div", { class: "mdc-notched-outline__notch" }, labelEl),
66
+ h("div", { class: "mdc-notched-outline__trailing" }))) : (h("span", { class: "mdc-line-ripple" }))));
67
+ }
68
+ function setHelper(props) {
69
+ if (props.helperEnabled !== false) {
70
+ if (props.helper) {
71
+ const classObj = {
72
+ 'mdc-text-field-helper-text': true,
73
+ 'mdc-text-field-helper-text--persistent': !props.helperWhenFocused,
74
+ };
75
+ return (h("div", { class: "mdc-text-field-helper-line" },
76
+ h("div", { class: classObj }, props.helper),
77
+ props.maxLength && !props.textArea ? (h("div", { class: "mdc-text-field-character-counter" },
78
+ "'0 / ' + ",
79
+ props.maxLength.toString())) : undefined));
80
+ }
81
+ else {
82
+ if (props.maxLength && !props.textArea) {
83
+ return (h("div", { class: "mdc-text-field-helper-line" },
84
+ h("div", { class: "mdc-text-field-character-counter" },
85
+ "'0 / ' + ",
86
+ props.maxLength)));
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ export { FTextField as F };