@sme.up/ketchup 8.0.1 → 8.0.2

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 (132) hide show
  1. package/dist/cjs/{f-button-c0ede055.js → f-button-9524bbf7.js} +1 -1
  2. package/dist/cjs/{f-cell-1c17dbac.js → f-cell-bcb75ade.js} +10 -8
  3. package/dist/cjs/{f-chip-bace36bb.js → f-chip-2249b386.js} +2 -2
  4. package/dist/cjs/{f-image-22174590.js → f-image-47d74999.js} +1 -1
  5. package/dist/cjs/{f-paginator-utils-e21e1f06.js → f-paginator-utils-b0a9ae5f.js} +63 -62
  6. package/dist/cjs/{f-text-field-503f2bb0.js → f-text-field-579c0fc0.js} +1 -1
  7. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +32 -87
  9. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  10. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  11. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  12. package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
  13. package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
  15. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  16. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
  18. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
  20. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  22. package/dist/cjs/{kup-manager-b994cf71.js → kup-manager-85b2a756.js} +679 -531
  23. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
  30. package/dist/collection/assets/data-table.js +0 -44
  31. package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +5 -61
  32. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
  33. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +7 -8
  34. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  35. package/dist/collection/components/kup-data-table/kup-data-table.js +5 -4
  36. package/dist/collection/components/kup-gauge/kup-gauge.js +4 -4
  37. package/dist/collection/components/kup-text-field/kup-text-field.js +4 -5
  38. package/dist/collection/components/kup-time-picker/kup-time-picker.js +7 -7
  39. package/dist/collection/components/kup-tree/kup-tree.js +2 -2
  40. package/dist/collection/f-components/f-cell/f-cell.js +6 -5
  41. package/dist/collection/f-components/f-paginator/f-paginator-utils.js +3 -3
  42. package/dist/collection/managers/kup-data/kup-data.js +3 -1
  43. package/dist/collection/managers/kup-dates/kup-dates-declarations.js +21 -10
  44. package/dist/collection/managers/kup-dates/kup-dates.js +312 -1
  45. package/dist/collection/managers/kup-math/kup-math.js +180 -9
  46. package/dist/collection/utils/cell-utils.js +5 -6
  47. package/dist/collection/utils/filters/filters.js +11 -13
  48. package/dist/collection/utils/utils.js +18 -435
  49. package/dist/components/kup-autocomplete2.js +915 -810
  50. package/dist/components/kup-box2.js +1 -1
  51. package/dist/components/kup-calendar.js +1 -1
  52. package/dist/components/kup-cell.js +1 -1
  53. package/dist/components/kup-dashboard.js +1 -1
  54. package/dist/components/kup-echart2.js +1 -1
  55. package/dist/components/kup-family-tree.js +1 -1
  56. package/dist/components/kup-grid2.js +1 -1
  57. package/dist/components/kup-iframe.js +1 -1
  58. package/dist/components/kup-image-list.js +1 -1
  59. package/dist/components/kup-magic-box.js +1 -1
  60. package/dist/components/kup-numeric-picker.js +1 -1
  61. package/dist/components/kup-planner.js +1 -1
  62. package/dist/esm/{f-button-c377973d.js → f-button-024f0cfe.js} +1 -1
  63. package/dist/esm/{f-cell-e5a98bc8.js → f-cell-90240a8c.js} +10 -8
  64. package/dist/esm/{f-chip-c8a18c48.js → f-chip-2238ad43.js} +2 -2
  65. package/dist/esm/{f-image-5cbdf39d.js → f-image-f2e9bf79.js} +1 -1
  66. package/dist/esm/{f-paginator-utils-a1dab059.js → f-paginator-utils-8cb3c023.js} +63 -62
  67. package/dist/esm/{f-text-field-dafb7c8b.js → f-text-field-d231982c.js} +1 -1
  68. package/dist/esm/kup-accordion.entry.js +2 -2
  69. package/dist/esm/kup-autocomplete_27.entry.js +26 -81
  70. package/dist/esm/kup-box.entry.js +7 -7
  71. package/dist/esm/kup-calendar.entry.js +4 -4
  72. package/dist/esm/kup-cell.entry.js +5 -5
  73. package/dist/esm/kup-dash-list.entry.js +1 -1
  74. package/dist/esm/kup-dash_2.entry.js +1 -1
  75. package/dist/esm/kup-dashboard.entry.js +4 -4
  76. package/dist/esm/kup-drawer.entry.js +1 -1
  77. package/dist/esm/kup-echart.entry.js +1 -1
  78. package/dist/esm/kup-family-tree.entry.js +3 -3
  79. package/dist/esm/kup-iframe.entry.js +1 -1
  80. package/dist/esm/kup-image-list.entry.js +6 -6
  81. package/dist/esm/kup-lazy.entry.js +1 -1
  82. package/dist/esm/kup-magic-box.entry.js +2 -2
  83. package/dist/esm/{kup-manager-3594cde8.js → kup-manager-d1da769e.js} +679 -522
  84. package/dist/esm/kup-nav-bar.entry.js +1 -1
  85. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  86. package/dist/esm/kup-photo-frame.entry.js +1 -1
  87. package/dist/esm/kup-planner.entry.js +2 -2
  88. package/dist/esm/kup-probe.entry.js +1 -1
  89. package/dist/esm/kup-qlik.entry.js +1 -1
  90. package/dist/esm/kup-snackbar.entry.js +3 -3
  91. package/dist/ketchup/ketchup.esm.js +1 -1
  92. package/dist/ketchup/{p-31abf4b6.entry.js → p-063d4c27.entry.js} +1 -1
  93. package/dist/ketchup/{p-9fc6a9a8.entry.js → p-0bcda0e2.entry.js} +1 -1
  94. package/dist/ketchup/{p-473d2bea.entry.js → p-0d7d59c7.entry.js} +1 -1
  95. package/dist/ketchup/{p-b718af72.entry.js → p-163b18b9.entry.js} +1 -1
  96. package/dist/ketchup/{p-37ada0f0.entry.js → p-1ad628fb.entry.js} +1 -1
  97. package/dist/ketchup/{p-5205286a.entry.js → p-33aff1ca.entry.js} +1 -1
  98. package/dist/ketchup/p-3432ebaf.entry.js +9 -0
  99. package/dist/ketchup/{p-80815edf.entry.js → p-35b29b22.entry.js} +1 -1
  100. package/dist/ketchup/{p-acaa171f.js → p-36dac88e.js} +3 -3
  101. package/dist/ketchup/{p-22e72f06.entry.js → p-37067ee6.entry.js} +1 -1
  102. package/dist/ketchup/p-39a55c47.js +1 -0
  103. package/dist/ketchup/{p-8b248655.js → p-3cf64473.js} +1 -1
  104. package/dist/ketchup/p-410c102a.js +1 -0
  105. package/dist/ketchup/{p-d76be079.entry.js → p-43b67de4.entry.js} +1 -1
  106. package/dist/ketchup/{p-ef0b4f19.entry.js → p-489d55ff.entry.js} +1 -1
  107. package/dist/ketchup/{p-2d32e3cd.js → p-5f3680f2.js} +1 -1
  108. package/dist/ketchup/{p-cf322853.entry.js → p-651d89c8.entry.js} +1 -1
  109. package/dist/ketchup/{p-4c56e199.entry.js → p-73c8d651.entry.js} +1 -1
  110. package/dist/ketchup/{p-d1164680.entry.js → p-83435e6c.entry.js} +1 -1
  111. package/dist/ketchup/{p-7f4f5f0f.entry.js → p-89743989.entry.js} +1 -1
  112. package/dist/ketchup/{p-6762d447.js → p-8b46e7ce.js} +1 -1
  113. package/dist/ketchup/p-a84f1d24.entry.js +1 -0
  114. package/dist/ketchup/{p-ed7e118e.entry.js → p-b2fd2dbf.entry.js} +1 -1
  115. package/dist/ketchup/{p-ce5b6ce7.entry.js → p-c42b80c1.entry.js} +1 -1
  116. package/dist/ketchup/p-d1b050d0.entry.js +27 -0
  117. package/dist/ketchup/{p-d4eb9a76.entry.js → p-d6ea709e.entry.js} +1 -1
  118. package/dist/ketchup/{p-7be5ef32.entry.js → p-e1f1e661.entry.js} +1 -1
  119. package/dist/ketchup/p-eda7f130.js +1 -0
  120. package/dist/ketchup/{p-afff7a6e.entry.js → p-f876125d.entry.js} +1 -1
  121. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  122. package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +19 -9
  123. package/dist/types/managers/kup-dates/kup-dates.d.ts +94 -1
  124. package/dist/types/managers/kup-math/kup-math.d.ts +68 -7
  125. package/dist/types/utils/utils.d.ts +13 -102
  126. package/package.json +1 -1
  127. package/dist/ketchup/p-017418e7.entry.js +0 -27
  128. package/dist/ketchup/p-38f16697.entry.js +0 -9
  129. package/dist/ketchup/p-4638fbff.js +0 -1
  130. package/dist/ketchup/p-61319cfa.js +0 -1
  131. package/dist/ketchup/p-6c726886.entry.js +0 -1
  132. package/dist/ketchup/p-bf4a881b.js +0 -1
@@ -7075,16 +7075,6 @@ var KupDatesNormalize;
7075
7075
  KupDatesNormalize["TIME"] = "time";
7076
7076
  KupDatesNormalize["TIMESTAMP"] = "timestamp";
7077
7077
  })(KupDatesNormalize || (KupDatesNormalize = {}));
7078
- /**
7079
- * Common use formats
7080
- */
7081
- var KupDatesFormats;
7082
- (function (KupDatesFormats) {
7083
- KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
7084
- KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
7085
- KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
7086
- KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
7087
- })(KupDatesFormats || (KupDatesFormats = {}));
7088
7078
  /**
7089
7079
  * Supported locales.
7090
7080
  */
@@ -7097,425 +7087,30 @@ var KupDatesLocales;
7097
7087
  KupDatesLocales["POLISH"] = "pl";
7098
7088
  KupDatesLocales["RUSSIAN"] = "ru";
7099
7089
  KupDatesLocales["SPANISH"] = "es";
7100
- })(KupDatesLocales || (KupDatesLocales = {}));
7101
-
7102
- const dom$q = document.documentElement;
7103
- var DateTimeFormatOptionsMonth;
7104
- (function (DateTimeFormatOptionsMonth) {
7105
- DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
7106
- DateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
7107
- DateTimeFormatOptionsMonth["LONG"] = "long";
7108
- DateTimeFormatOptionsMonth["SHORT"] = "short";
7109
- DateTimeFormatOptionsMonth["NARROW"] = "narrow";
7110
- })(DateTimeFormatOptionsMonth || (DateTimeFormatOptionsMonth = {}));
7111
- function identify(array) {
7112
- if (array) {
7113
- for (let i = 0; i < array.length; i++) {
7114
- array[i].id = i.toString();
7115
- }
7116
- }
7117
- }
7118
- function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
7119
- const options = {
7120
- hour: '2-digit',
7121
- minute: '2-digit',
7122
- hour12: false,
7123
- };
7124
- if (manageSeconds == true) {
7125
- options.second = '2-digit';
7126
- }
7127
- const formatObj = new Intl.DateTimeFormat(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
7128
- let timeFormat = formatObj
7129
- .map((obj) => {
7130
- switch (obj.type) {
7131
- case 'hour':
7132
- return 'HH';
7133
- case 'minute':
7134
- return 'mm';
7135
- case 'second':
7136
- return 'ss';
7137
- default:
7138
- return obj.value;
7139
- }
7140
- })
7141
- .join('');
7142
- return timeFormat;
7143
- }
7144
- /**
7145
- * @param value number as string, formatted by actual browser locale
7146
- * @param type - type of number for calculate suffix
7147
- * @returns true if number string in input is a valid number
7148
- */
7149
- function isValidFormattedStringNumber(value, type) {
7150
- if (value == null || value.trim() == '') {
7151
- return false;
7152
- }
7153
- let tmpStr = formattedStringToUnformattedStringNumber(value, type);
7154
- if (isNumber(tmpStr)) {
7155
- return true;
7156
- }
7157
- return false;
7158
- }
7159
- function isNumber(value) {
7160
- //return typeof value === 'number';
7161
- return !isNaN(value);
7162
- }
7163
- /**
7164
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
7165
- * @returns number
7166
- **/
7167
- function stringToNumber(input) {
7168
- if (!input || input == null || input.trim() == '') {
7169
- input = '0';
7170
- }
7171
- return dom$q.ketchup.math.numberify(input);
7172
- }
7090
+ })(KupDatesLocales || (KupDatesLocales = {}));
7173
7091
  /**
7174
- * @param input number
7175
- * @param decimals number of significant decimal digits for output
7176
- * @returns number as string, formatted by actual browser locale
7177
- **/
7178
- function numberToString(input, decimals) {
7179
- if (input == null) {
7180
- return '';
7181
- }
7182
- return _numberToString(input, decimals, dom$q.ketchup.dates.getLocale(), true);
7183
- }
7184
- /**
7185
- * @param type - type of number for calculate suffix
7186
- * @returns suffix for number, by type
7187
- **/
7188
- function getNumericValueSuffixByType(type) {
7189
- type = type.toUpperCase();
7190
- let nstr = '';
7191
- if (type == 'P') {
7192
- nstr = ' %';
7193
- }
7194
- else if (type == 'VE') {
7195
- nstr = ' €';
7196
- }
7197
- else if (type == 'VL') {
7198
- nstr = ' £';
7199
- }
7200
- else if (type == 'VV') {
7201
- nstr = ' $';
7202
- }
7203
- return nstr;
7204
- }
7205
- /**
7206
- * @param input number
7207
- * @param decimals number of significant decimal digits for output
7208
- * @param type - type of number for calculate suffix
7209
- * @returns number as string, formatted by actual browser locale, with suffix by type
7210
- **/
7211
- function numberToFormattedStringNumber(input, decimals, type) {
7212
- if (input == null || isNaN(input)) {
7213
- return '';
7214
- }
7215
- let nstr = numberToString(input, decimals);
7216
- nstr = nstr + getNumericValueSuffixByType(type);
7217
- return nstr;
7218
- }
7219
- /**
7220
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
7221
- * @param decimals number of significant decimal digits for output
7222
- * @param type - type of number for calculate suffix
7223
- * @returns number as string, formatted by actual browser locale, with suffix by type
7224
- **/
7225
- function unformattedStringToFormattedStringNumber(input, decimals, type) {
7226
- return numberToFormattedStringNumber(stringToNumber(input), decimals, type);
7227
- }
7228
- /**
7229
- * @param input number as string, formatted by actual browser locale
7230
- * @param type - type of number for calculate suffix
7231
- * @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
7232
- **/
7233
- function formattedStringToUnformattedStringNumber(input, type) {
7234
- return numberStringToNumberString(input, type, dom$q.ketchup.math.decimalSeparator());
7235
- }
7236
- /**
7237
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
7238
- * @param type - type of number for calculate suffix
7239
- * @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
7240
- **/
7241
- function unformattedStringNumberToNumber(input, type) {
7242
- return numberStringToNumberString(input, type, '.');
7243
- }
7244
- function numberStringToNumberString(input, type, decFmt) {
7245
- if (input == null || input.trim() == '') {
7246
- return '';
7247
- }
7248
- let originalInputValue = input;
7249
- let suffix = getNumericValueSuffixByType(type);
7250
- if (suffix != '') {
7251
- input = input.replace(suffix, '');
7252
- }
7253
- let regExpr = null;
7254
- if (decFmt == '.') {
7255
- regExpr = /,/g;
7256
- }
7257
- else {
7258
- regExpr = /\./g;
7259
- }
7260
- input = input.replace(regExpr, '');
7261
- if (decFmt != '.') {
7262
- input = input.replace(/,/g, '.');
7263
- }
7264
- if (dom$q.ketchup.math.numberify(input) == null ||
7265
- isNaN(dom$q.ketchup.math.numberify(input))) {
7266
- return originalInputValue;
7267
- }
7268
- let unf = stringToNumber(input);
7269
- return _numberToString(unf, -1, 'en-US', false);
7270
- }
7271
- function countDecimals(value) {
7272
- if (Math.floor(value) === value)
7273
- return 0;
7274
- let stringValue = value.toString().split('.')[1];
7275
- if (stringValue) {
7276
- return stringValue.length ? stringValue.length : 0;
7277
- }
7278
- else {
7279
- return 0;
7280
- }
7281
- }
7282
- function _numberToString(input, decimals, locale, useGrouping) {
7283
- if (input == null) {
7284
- input = 0;
7285
- }
7286
- if (decimals == null || decimals == -1) {
7287
- decimals = countDecimals(input);
7288
- }
7289
- let n = Number(input);
7290
- let f = decimals > -1
7291
- ? {
7292
- minimumFractionDigits: decimals,
7293
- maximumFractionDigits: decimals,
7294
- useGrouping: useGrouping,
7295
- }
7296
- : { useGrouping: useGrouping };
7297
- return n.toLocaleString(locale, f);
7298
- }
7299
- /**
7300
- * @param time time as Date object
7301
- * @param manageSeconds flag to set seconds managing
7302
- * @return time as string, formatted
7303
- **/
7304
- function formatTime(time, manageSeconds) {
7305
- const options = {
7306
- hour: '2-digit',
7307
- minute: '2-digit',
7308
- hour12: false,
7309
- };
7310
- if (manageSeconds == true) {
7311
- options.second = '2-digit';
7312
- }
7313
- return time.toLocaleTimeString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
7314
- }
7315
- /**
7316
- * @param value time string, formatted by actual browser locale
7317
- * @returns true if time string in input is a valid time
7318
- */
7319
- function isValidFormattedStringTime(value, manageSeconds) {
7320
- let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
7321
- return dom$q.ketchup.dates.isValid(value, format, true);
7322
- }
7323
- /**
7324
- * @param value date/time as string, formatted by actual browser locale
7325
- * @returns date/time as string, formatted ISO
7326
- **/
7327
- function formattedStringToDefaultUnformattedStringTimestamp(value) {
7328
- return formattedStringToCustomUnformattedStringTime(value, KupDatesFormats.ISO_DATE_TIME, true);
7329
- }
7330
- /**
7331
- * @param value time as string, formatted by actual browser locale
7332
- * @param outputFormat time format to return
7333
- * @param manageSeconds flag to set seconds managing
7334
- * @returns time as string, formatted
7335
- **/
7336
- function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
7337
- let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
7338
- if (dom$q.ketchup.dates.isValid(value, inputFormat)) {
7339
- return dom$q.ketchup.dates.format(dom$q.ketchup.dates.normalize(value, KupDatesNormalize.TIME), outputFormat);
7340
- }
7341
- else {
7342
- return '';
7343
- }
7344
- }
7345
- /**
7346
- * @param value time as string, formatted ISO
7347
- * @param manageSeconds flag to set seconds managing
7348
- * @param valueTimeFormat time format (default ISO)
7349
- * @param customedFormat time format from smeupObject
7350
- * @returns time as string, formatted by actual browser locale
7351
- **/
7352
- function unformattedStringToFormattedStringTime(value, manageSeconds, customedFormat) {
7353
- const options = {
7354
- hour: '2-digit',
7355
- minute: '2-digit',
7356
- hour12: false,
7357
- };
7358
- if (manageSeconds == true) {
7359
- options.second = '2-digit';
7360
- }
7361
- let date = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.normalize(value, KupDatesNormalize.TIME));
7362
- return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
7363
- }
7364
- function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
7365
- if (customedFormat == null) {
7366
- return date.toLocaleTimeString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
7367
- }
7368
- switch (customedFormat) {
7369
- case 'I13': {
7370
- //hh:mm
7371
- break;
7372
- }
7373
- case 'I12': {
7374
- //hh:mm:ss
7375
- break;
7376
- }
7377
- case 'I11': {
7378
- //???
7379
- //hh:dddd
7380
- //return moment(date).format('HH:DDDD');
7381
- return valueStr;
7382
- }
7383
- case 'I14': {
7384
- //???
7385
- //sssss
7386
- //return moment(date).format('SSSSS');
7387
- return valueStr;
7388
- }
7389
- case 'I1H': {
7390
- //???
7391
- //Ora,Cen/Min HH,xx
7392
- return valueStr;
7393
- }
7394
- case 'I1M': {
7395
- //???
7396
- //Min,Cen/Sec MMMM,xx
7397
- return valueStr;
7398
- }
7399
- case 'I21': {
7400
- //???
7401
- //Giorni,(4 decim)
7402
- return valueStr;
7403
- }
7404
- case 'I22': {
7405
- //???
7406
- //Ore,(4 decim)
7407
- return valueStr;
7408
- }
7409
- case 'I23': {
7410
- //???
7411
- //Minuti,(4 decim)
7412
- return valueStr;
7413
- }
7414
- case 'I24': {
7415
- //???
7416
- //Secondi
7417
- return valueStr;
7418
- }
7419
- case 'I2H': {
7420
- //???
7421
- //Ora,Cen/Min HHHH,xx
7422
- return valueStr;
7423
- }
7424
- case 'I2D': {
7425
- //???
7426
- //Ore Minuti Secondi HHMMS
7427
- return valueStr;
7428
- }
7429
- case 'I2M': {
7430
- //???
7431
- //Min,Cen/Sec MMMM,xx
7432
- return valueStr;
7433
- }
7434
- }
7435
- return date.toLocaleTimeString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
7436
- }
7437
- /**
7438
- * @param value date/time as string, formatted ISO
7439
- * @param valueDateFormat date/time format (default ISO)
7440
- * @returns date/time as string, formatted by actual browser locale
7441
- **/
7442
- function unformattedStringToFormattedStringTimestamp(value) {
7443
- const options = {
7444
- day: '2-digit',
7445
- month: '2-digit',
7446
- year: 'numeric',
7447
- hour: '2-digit',
7448
- minute: '2-digit',
7449
- second: '2-digit',
7450
- hour12: false,
7451
- };
7452
- let date = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.normalize(value, KupDatesNormalize.TIMESTAMP));
7453
- return date.toLocaleString(dom$q.ketchup.dates.getLocale() + '-u-hc-h23', options);
7454
- }
7455
- function getMonthAsStringByLocale(month, format) {
7456
- if (month == null) {
7457
- return '';
7458
- }
7459
- const dateTmp = new Date();
7460
- dateTmp.setDate(1);
7461
- dateTmp.setMonth(month - 1);
7462
- const options = {
7463
- month: format,
7464
- };
7465
- const dateTimeFormat = new Intl.DateTimeFormat(dom$q.ketchup.dates.getLocale(), options);
7466
- return dateTimeFormat.format(dateTmp);
7467
- }
7468
- function getMonthsAsStringByLocale(format) {
7469
- if (format == null || format.trim() == '') {
7470
- format = DateTimeFormatOptionsMonth.LONG;
7471
- }
7472
- var months = [];
7473
- for (var i = 0; i < 12; i++) {
7474
- months[i] = getMonthAsStringByLocale(i + 1, format);
7475
- }
7476
- return months;
7477
- }
7478
- /**
7479
- * Used to retrieve component's props values.
7480
- * @param {any} comp - Component calling this function.
7481
- * @param {GenericObject} list - Prop list, specific for each component.
7482
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
7483
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
7092
+ * Format Months
7484
7093
  */
7485
- function getProps(comp, list, descriptions) {
7486
- let props = {};
7487
- if (descriptions) {
7488
- props = list;
7489
- }
7490
- else {
7491
- for (const key in list) {
7492
- if (Object.prototype.hasOwnProperty.call(list, key)) {
7493
- props[key] = comp[key];
7494
- }
7495
- }
7496
- }
7497
- return props;
7498
- }
7094
+ var KupDateTimeFormatOptionsMonth;
7095
+ (function (KupDateTimeFormatOptionsMonth) {
7096
+ KupDateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
7097
+ KupDateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
7098
+ KupDateTimeFormatOptionsMonth["LONG"] = "long";
7099
+ KupDateTimeFormatOptionsMonth["SHORT"] = "short";
7100
+ KupDateTimeFormatOptionsMonth["NARROW"] = "narrow";
7101
+ })(KupDateTimeFormatOptionsMonth || (KupDateTimeFormatOptionsMonth = {}));
7499
7102
  /**
7500
- * Sets the props to the component.
7501
- * @param {any} comp - Component calling this function.
7502
- * @param {GenericObject} list - Prop list, specific for each component.
7503
- * @param {GenericObject} props - Prop to be set.
7103
+ * Common use formats
7504
7104
  */
7505
- function setProps(comp, list, props) {
7506
- for (const key in props) {
7507
- // If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
7508
- if (list[key]) {
7509
- comp[key] = props[key];
7510
- }
7511
- else {
7512
- // Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
7513
- comp.rootElement[key] = props[key];
7514
- }
7515
- }
7516
- }
7105
+ var KupDatesFormats;
7106
+ (function (KupDatesFormats) {
7107
+ KupDatesFormats["ISO_DATE"] = "YYYY-MM-DD";
7108
+ KupDatesFormats["ISO_DATE_TIME"] = "YYYY-MM-DD HH:mm:ss";
7109
+ KupDatesFormats["ISO_TIME"] = "HH:mm:ss";
7110
+ KupDatesFormats["ISO_TIME_WITHOUT_SECONDS"] = "HH:mm";
7111
+ })(KupDatesFormats || (KupDatesFormats = {}));
7517
7112
 
7518
- const dom$p = document.documentElement;
7113
+ const dom$q = document.documentElement;
7519
7114
  // -------------
7520
7115
  // COMMONS
7521
7116
  // -------------
@@ -7542,9 +7137,9 @@ function getValueForDisplay2(values, column) {
7542
7137
  }
7543
7138
  function formatToNumber(cell) {
7544
7139
  if (cell.obj) {
7545
- return dom$p.ketchup.math.numberify(cell.obj.k);
7140
+ return dom$q.ketchup.math.numberify(cell.obj.k);
7546
7141
  }
7547
- return dom$p.ketchup.math.numberify(cell.value);
7142
+ return dom$q.ketchup.math.numberify(cell.value);
7548
7143
  }
7549
7144
  function _getCellValueForDisplay(value, column, cell) {
7550
7145
  let obj = column != null ? column.obj : null;
@@ -7557,18 +7152,18 @@ function getValueForDisplay(value, obj, decimals) {
7557
7152
  if (value == null || value.trim() == '') {
7558
7153
  return value;
7559
7154
  }
7560
- if (dom$p.ketchup.objects.isNumber(obj)) {
7561
- return unformattedStringToFormattedStringNumber(value, decimals ? decimals : -1, obj ? obj.p : '');
7155
+ if (dom$q.ketchup.objects.isNumber(obj)) {
7156
+ return dom$q.ketchup.math.numberStringToFormattedString(value, decimals ? decimals : -1, obj ? obj.p : '');
7562
7157
  }
7563
- if (dom$p.ketchup.objects.isDate(obj) &&
7564
- dom$p.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
7565
- return dom$p.ketchup.dates.format(value);
7158
+ if (dom$q.ketchup.objects.isDate(obj) &&
7159
+ dom$q.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
7160
+ return dom$q.ketchup.dates.format(value);
7566
7161
  }
7567
- if (dom$p.ketchup.objects.isTime(obj)) {
7568
- return unformattedStringToFormattedStringTime(value, dom$p.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
7162
+ if (dom$q.ketchup.objects.isTime(obj)) {
7163
+ return dom$q.ketchup.dates.timeStringToFormattedString(value, dom$q.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
7569
7164
  }
7570
- if (dom$p.ketchup.objects.isTimestamp(obj)) {
7571
- return unformattedStringToFormattedStringTimestamp(value);
7165
+ if (dom$q.ketchup.objects.isTimestamp(obj)) {
7166
+ return dom$q.ketchup.dates.timestampStringToFormattedString(value);
7572
7167
  }
7573
7168
  return value;
7574
7169
  }
@@ -7612,26 +7207,26 @@ function compareValues(obj1, value1, obj2, value2, sortMode) {
7612
7207
  }
7613
7208
  let v1 = s1;
7614
7209
  let v2 = s2;
7615
- if (dom$p.ketchup.objects.isNumber(obj1)) {
7616
- v1 = stringToNumber(s1);
7617
- v2 = stringToNumber(s2);
7210
+ if (dom$q.ketchup.objects.isNumber(obj1)) {
7211
+ v1 = dom$q.ketchup.math.numberifySafe(s1);
7212
+ v2 = dom$q.ketchup.math.numberifySafe(s2);
7618
7213
  }
7619
- else if (dom$p.ketchup.objects.isDate(obj1)) {
7620
- v1 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE));
7621
- v2 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE));
7214
+ else if (dom$q.ketchup.objects.isDate(obj1)) {
7215
+ v1 = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE));
7216
+ v2 = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE));
7622
7217
  }
7623
- else if (dom$p.ketchup.objects.isTime(obj1)) {
7624
- let manageSeconds = dom$p.ketchup.objects.isTimeWithSeconds(obj1);
7625
- v1 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s1, manageSeconds
7218
+ else if (dom$q.ketchup.objects.isTime(obj1)) {
7219
+ let manageSeconds = dom$q.ketchup.objects.isTimeWithSeconds(obj1);
7220
+ v1 = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.format(s1, manageSeconds
7626
7221
  ? KupDatesFormats.ISO_TIME
7627
7222
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
7628
- v2 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s2, manageSeconds
7223
+ v2 = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.format(s2, manageSeconds
7629
7224
  ? KupDatesFormats.ISO_TIME
7630
7225
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
7631
7226
  }
7632
- else if (dom$p.ketchup.objects.isTimestamp(obj1)) {
7633
- v1 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE_TIME));
7634
- v2 = dom$p.ketchup.dates.toDate(dom$p.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE_TIME));
7227
+ else if (dom$q.ketchup.objects.isTimestamp(obj1)) {
7228
+ v1 = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE_TIME));
7229
+ v2 = dom$q.ketchup.dates.toDate(dom$q.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE_TIME));
7635
7230
  }
7636
7231
  if (v1 > v2) {
7637
7232
  return sm * 1;
@@ -7697,7 +7292,7 @@ var KupGlobalFilterMode;
7697
7292
  KupGlobalFilterMode["HIGHLIGHT"] = "highlight";
7698
7293
  })(KupGlobalFilterMode || (KupGlobalFilterMode = {}));
7699
7294
 
7700
- const dom$o = document.documentElement;
7295
+ const dom$p = document.documentElement;
7701
7296
  /**
7702
7297
  * Filtering algorithms.
7703
7298
  * @module Filters
@@ -7713,16 +7308,16 @@ class Filters {
7713
7308
  return comp.rootElement.tagName === KupTagNames.TREE;
7714
7309
  }
7715
7310
  isObjFiltrableByInterval(obj) {
7716
- if (dom$o.ketchup.objects.isDate(obj)) {
7311
+ if (dom$p.ketchup.objects.isDate(obj)) {
7717
7312
  return true;
7718
7313
  }
7719
- if (dom$o.ketchup.objects.isTime(obj)) {
7314
+ if (dom$p.ketchup.objects.isTime(obj)) {
7720
7315
  return true;
7721
7316
  }
7722
- if (dom$o.ketchup.objects.isTimestamp(obj)) {
7317
+ if (dom$p.ketchup.objects.isTimestamp(obj)) {
7723
7318
  return true;
7724
7319
  }
7725
- if (dom$o.ketchup.objects.isNumber(obj)) {
7320
+ if (dom$p.ketchup.objects.isNumber(obj)) {
7726
7321
  return true;
7727
7322
  }
7728
7323
  return false;
@@ -7732,38 +7327,38 @@ class Filters {
7732
7327
  if (newValue == null || newValue == '' || smeupObj == null) {
7733
7328
  return newValue;
7734
7329
  }
7735
- if (dom$o.ketchup.objects.isDate(smeupObj)) {
7736
- if (dom$o.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
7330
+ if (dom$p.ketchup.objects.isDate(smeupObj)) {
7331
+ if (dom$p.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
7737
7332
  return newValue;
7738
7333
  }
7739
- if (dom$o.ketchup.dates.isValid(value)) {
7740
- return dom$o.ketchup.dates.format(dom$o.ketchup.dates.normalize(value, KupDatesNormalize.DATE), KupDatesFormats.ISO_DATE);
7334
+ if (dom$p.ketchup.dates.isValid(value)) {
7335
+ return dom$p.ketchup.dates.format(dom$p.ketchup.dates.normalize(value, KupDatesNormalize.DATE), KupDatesFormats.ISO_DATE);
7741
7336
  }
7742
7337
  }
7743
- else if (dom$o.ketchup.objects.isTime(smeupObj)) {
7744
- let manageSeconds = dom$o.ketchup.objects.isTimeWithSeconds(smeupObj);
7745
- if (dom$o.ketchup.dates.isValid(value, manageSeconds
7338
+ else if (dom$p.ketchup.objects.isTime(smeupObj)) {
7339
+ let manageSeconds = dom$p.ketchup.objects.isTimeWithSeconds(smeupObj);
7340
+ if (dom$p.ketchup.dates.isValid(value, manageSeconds
7746
7341
  ? KupDatesFormats.ISO_TIME
7747
7342
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS)) {
7748
7343
  return newValue;
7749
7344
  }
7750
- if (isValidFormattedStringTime(value, manageSeconds)) {
7751
- return formattedStringToCustomUnformattedStringTime(value, manageSeconds
7345
+ if (dom$p.ketchup.dates.isValidFormattedStringTime(value, manageSeconds)) {
7346
+ return dom$p.ketchup.dates.formattedStringToCustomDateTime(value, manageSeconds
7752
7347
  ? KupDatesFormats.ISO_TIME
7753
7348
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, manageSeconds);
7754
7349
  }
7755
7350
  }
7756
- else if (dom$o.ketchup.objects.isTimestamp(smeupObj)) {
7757
- if (dom$o.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE_TIME)) {
7351
+ else if (dom$p.ketchup.objects.isTimestamp(smeupObj)) {
7352
+ if (dom$p.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE_TIME)) {
7758
7353
  return newValue;
7759
7354
  }
7760
- if (isValidFormattedStringTime(value, true)) {
7761
- return formattedStringToDefaultUnformattedStringTimestamp(value);
7355
+ if (dom$p.ketchup.dates.isValidFormattedStringTime(value, true)) {
7356
+ return dom$p.ketchup.dates.formattedStringToTimestampString(value);
7762
7357
  }
7763
7358
  }
7764
- else if (dom$o.ketchup.objects.isNumber(smeupObj)) {
7765
- if (isValidFormattedStringNumber(value, smeupObj ? smeupObj.p : '')) {
7766
- return formattedStringToUnformattedStringNumber(value, smeupObj ? smeupObj.p : '');
7359
+ else if (dom$p.ketchup.objects.isNumber(smeupObj)) {
7360
+ if (dom$p.ketchup.math.isStringNumber(value, smeupObj ? smeupObj.p : '')) {
7361
+ return dom$p.ketchup.math.formattedStringToNumberString(value, smeupObj ? smeupObj.p : '');
7767
7362
  }
7768
7363
  }
7769
7364
  return newValue;
@@ -7884,13 +7479,12 @@ class Filters {
7884
7479
  to = interval[FilterInterval.TO];
7885
7480
  }
7886
7481
  let checkByRegularExpression = true;
7887
- if (dom$o.ketchup.objects.isNumber(obj)) {
7888
- value = unformattedStringNumberToNumber(value, obj ? obj.p : '');
7889
- let valueNumber = stringToNumber(value);
7482
+ if (dom$p.ketchup.objects.isNumber(obj)) {
7483
+ let valueNumber = dom$p.ketchup.math.numberifySafe(value, obj ? obj.p : '');
7890
7484
  if (from != '') {
7891
- if (isNumber(from)) {
7485
+ if (dom$p.ketchup.math.isNumber(from)) {
7892
7486
  checkByRegularExpression = false;
7893
- let fromNumber = stringToNumber(from);
7487
+ let fromNumber = dom$p.ketchup.math.numberifySafe(from);
7894
7488
  if (valueNumber < fromNumber) {
7895
7489
  return false;
7896
7490
  }
@@ -7900,9 +7494,9 @@ class Filters {
7900
7494
  }
7901
7495
  }
7902
7496
  if (to != '') {
7903
- if (isNumber(to)) {
7497
+ if (dom$p.ketchup.math.isNumber(to)) {
7904
7498
  checkByRegularExpression = false;
7905
- let toNumber = stringToNumber(to);
7499
+ let toNumber = dom$p.ketchup.math.numberifySafe(to);
7906
7500
  if (valueNumber > toNumber) {
7907
7501
  return false;
7908
7502
  }
@@ -7912,30 +7506,30 @@ class Filters {
7912
7506
  }
7913
7507
  }
7914
7508
  }
7915
- if (dom$o.ketchup.objects.isDate(obj) ||
7916
- dom$o.ketchup.objects.isTime(obj) ||
7917
- dom$o.ketchup.objects.isTimestamp(obj)) {
7509
+ if (dom$p.ketchup.objects.isDate(obj) ||
7510
+ dom$p.ketchup.objects.isTime(obj) ||
7511
+ dom$p.ketchup.objects.isTimestamp(obj)) {
7918
7512
  let valueDate = null;
7919
7513
  let defaultFormat = KupDatesFormats.ISO_DATE;
7920
- if (dom$o.ketchup.objects.isDate(obj)) {
7514
+ if (dom$p.ketchup.objects.isDate(obj)) {
7921
7515
  defaultFormat = KupDatesFormats.ISO_DATE;
7922
7516
  }
7923
- else if (dom$o.ketchup.objects.isTime(obj)) {
7924
- defaultFormat = dom$o.ketchup.objects.isTimeWithSeconds(obj)
7517
+ else if (dom$p.ketchup.objects.isTime(obj)) {
7518
+ defaultFormat = dom$p.ketchup.objects.isTimeWithSeconds(obj)
7925
7519
  ? KupDatesFormats.ISO_TIME
7926
7520
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS;
7927
7521
  }
7928
- else if (dom$o.ketchup.objects.isTimestamp(obj)) {
7522
+ else if (dom$p.ketchup.objects.isTimestamp(obj)) {
7929
7523
  defaultFormat = KupDatesFormats.ISO_DATE_TIME;
7930
7524
  }
7931
- if (dom$o.ketchup.dates.isValid(value, defaultFormat, true)) {
7932
- valueDate = dom$o.ketchup.dates.toDate(value, defaultFormat);
7525
+ if (dom$p.ketchup.dates.isValid(value, defaultFormat, true)) {
7526
+ valueDate = dom$p.ketchup.dates.toDate(value, defaultFormat);
7933
7527
  }
7934
7528
  if (from != '') {
7935
7529
  if (valueDate != null &&
7936
- dom$o.ketchup.dates.isValid(from, defaultFormat, true)) {
7530
+ dom$p.ketchup.dates.isValid(from, defaultFormat, true)) {
7937
7531
  checkByRegularExpression = false;
7938
- let fromDate = dom$o.ketchup.dates.toDate(from, defaultFormat);
7532
+ let fromDate = dom$p.ketchup.dates.toDate(from, defaultFormat);
7939
7533
  if (valueDate < fromDate) {
7940
7534
  return false;
7941
7535
  }
@@ -7946,9 +7540,9 @@ class Filters {
7946
7540
  }
7947
7541
  if (to != '') {
7948
7542
  if (valueDate != null &&
7949
- dom$o.ketchup.dates.isValid(to, defaultFormat, true)) {
7543
+ dom$p.ketchup.dates.isValid(to, defaultFormat, true)) {
7950
7544
  checkByRegularExpression = false;
7951
- let toDate = dom$o.ketchup.dates.toDate(to, defaultFormat);
7545
+ let toDate = dom$p.ketchup.dates.toDate(to, defaultFormat);
7952
7546
  if (valueDate > toDate) {
7953
7547
  return false;
7954
7548
  }
@@ -7957,9 +7551,9 @@ class Filters {
7957
7551
  filterValue = to;
7958
7552
  }
7959
7553
  }
7960
- if (!dom$o.ketchup.dates.isValid(filterValue, defaultFormat) &&
7961
- !dom$o.ketchup.dates.isValid(filterValue)) {
7962
- value = dom$o.ketchup.dates.format(value);
7554
+ if (!dom$p.ketchup.dates.isValid(filterValue, defaultFormat) &&
7555
+ !dom$p.ketchup.dates.isValid(filterValue)) {
7556
+ value = dom$p.ketchup.dates.format(value);
7963
7557
  }
7964
7558
  }
7965
7559
  if (checkByRegularExpression) {
@@ -7983,9 +7577,9 @@ class Filters {
7983
7577
  }
7984
7578
  }
7985
7579
 
7986
- const dom$n = document.documentElement;
7987
- const kupObjects$1 = dom$n.ketchup
7988
- ? dom$n.ketchup.objects
7580
+ const dom$o = document.documentElement;
7581
+ const kupObjects$1 = dom$o.ketchup
7582
+ ? dom$o.ketchup.objects
7989
7583
  : new KupObjects();
7990
7584
  /**
7991
7585
  * Finds all the cells matching the filters criteria in the input dataset.
@@ -7994,7 +7588,7 @@ const kupObjects$1 = dom$n.ketchup
7994
7588
  * @returns {KupDataCell[]} Array of cells fetched after applying the filters.
7995
7589
  */
7996
7590
  function findCell(dataset, filters) {
7997
- return dom$n.ketchup.data.finder(dataset, filters).cells;
7591
+ return dom$o.ketchup.data.finder(dataset, filters).cells;
7998
7592
  }
7999
7593
  /**
8000
7594
  * Returns all the cells values of the specified column, sorted if required.
@@ -8066,7 +7660,7 @@ function replaceCell(dataset, cell, columns) {
8066
7660
  return replaced;
8067
7661
  }
8068
7662
 
8069
- const dom$m = document.documentElement;
7663
+ const dom$n = document.documentElement;
8070
7664
  /**
8071
7665
  * Finds the columns matching the criteria specified in the filters argument.
8072
7666
  * @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
@@ -8088,7 +7682,7 @@ function findColumns(dataset, filters) {
8088
7682
  if (column[key] === filter) {
8089
7683
  result.push(column);
8090
7684
  }
8091
- else if (dom$m.ketchup.objects.deepEqual(column[key], filter)) {
7685
+ else if (dom$n.ketchup.objects.deepEqual(column[key], filter)) {
8092
7686
  result.push(column);
8093
7687
  }
8094
7688
  }
@@ -8134,7 +7728,7 @@ function newColumn(dataset, type, options) {
8134
7728
  return newColumnFromMerge(dataset, options.columns, options.newColumn);
8135
7729
  default:
8136
7730
  const message = 'Wrong type used to invoke new column creation!(' + type + ')';
8137
- dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
7731
+ dom$n.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8138
7732
  return message;
8139
7733
  }
8140
7734
  }
@@ -8148,7 +7742,7 @@ function newColumn(dataset, type, options) {
8148
7742
  function newColumnFromConcatenate(dataset, columns, separator) {
8149
7743
  if (!columns || columns.length === 0) {
8150
7744
  const message = 'Invalid array, interrupting column merging!(' + columns + ')';
8151
- dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
7745
+ dom$n.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8152
7746
  return message;
8153
7747
  }
8154
7748
  let firstColumn = null;
@@ -8170,12 +7764,12 @@ function newColumnFromConcatenate(dataset, columns, separator) {
8170
7764
  columns.toString() +
8171
7765
  ')';
8172
7766
  col.visible = true;
8173
- dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
7767
+ dom$n.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8174
7768
  return message;
8175
7769
  }
8176
7770
  }
8177
7771
  const newName = columns.join('_');
8178
- const newObj = objs.length > 0 && dom$m.ketchup.objects.isSameKupObj(objs)
7772
+ const newObj = objs.length > 0 && dom$n.ketchup.objects.isSameKupObj(objs)
8179
7773
  ? objs[0]
8180
7774
  : null;
8181
7775
  const newTitle = titles.join(separator);
@@ -8242,7 +7836,7 @@ function newColumnFromMath(dataset, operation, columns) {
8242
7836
  }
8243
7837
  if (columns.length === 0) {
8244
7838
  const message = "Can't apply math formulas without columns!(" + columns + ')';
8245
- dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
7839
+ dom$n.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8246
7840
  return message;
8247
7841
  }
8248
7842
  const titles = [];
@@ -8269,11 +7863,11 @@ function newColumnFromMath(dataset, operation, columns) {
8269
7863
  const col = dataset.columns[index];
8270
7864
  if (columns.includes(col.name)) {
8271
7865
  titles[columns.indexOf(col.name)] = col.title;
8272
- if (!dom$m.ketchup.objects.isNumber(col.obj)) {
7866
+ if (!dom$n.ketchup.objects.isNumber(col.obj)) {
8273
7867
  const message = "Can't apply math formulas on non-numerical columns!(" +
8274
7868
  columns +
8275
7869
  ')';
8276
- dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
7870
+ dom$n.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8277
7871
  return message;
8278
7872
  }
8279
7873
  }
@@ -8284,7 +7878,7 @@ function newColumnFromMath(dataset, operation, columns) {
8284
7878
  const message = 'This mathematical operation on these columns was already performed!(' +
8285
7879
  formula +
8286
7880
  ')';
8287
- dom$m.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
7881
+ dom$n.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8288
7882
  return message;
8289
7883
  }
8290
7884
  }
@@ -8312,11 +7906,11 @@ function newColumnFromMath(dataset, operation, columns) {
8312
7906
  if (!base) {
8313
7907
  base = cell;
8314
7908
  }
8315
- formulaRow[column] = dom$m.ketchup.math.numberify(cell.value);
7909
+ formulaRow[column] = dom$n.ketchup.math.numberify(cell.value);
8316
7910
  }
8317
7911
  }
8318
7912
  }
8319
- const value = dom$m.ketchup.math.formulas
7913
+ const value = dom$n.ketchup.math.formulas
8320
7914
  .custom(formula, formulaRow)
8321
7915
  .toString();
8322
7916
  cells[newName] = Object.assign(Object.assign({}, base), { displayedValue: null, obj: Object.assign(Object.assign({}, newObj), { k: value }), value: value });
@@ -8364,7 +7958,7 @@ function newColumnFromMerge(dataset, columns2merge, newColumn) {
8364
7958
  return newColumn;
8365
7959
  }
8366
7960
 
8367
- const dom$l = document.documentElement;
7961
+ const dom$m = document.documentElement;
8368
7962
  /**
8369
7963
  * Finds all the rows containing cells matching the filters criteria in the input dataset.
8370
7964
  * @param {KupDataDataset} dataset - Input dataset.
@@ -8372,7 +7966,7 @@ const dom$l = document.documentElement;
8372
7966
  * @returns {KupDataRow[]} Array of rows fetched after applying the filters.
8373
7967
  */
8374
7968
  function findRow(dataset, filters) {
8375
- return dom$l.ketchup.data.finder(dataset, filters).rows;
7969
+ return dom$m.ketchup.data.finder(dataset, filters).rows;
8376
7970
  }
8377
7971
  /**
8378
7972
  * Converts the rows of the input dataset to tree nodes.
@@ -8714,7 +8308,7 @@ const kupTypes = [
8714
8308
  FCellTypes.RATING,
8715
8309
  ];
8716
8310
 
8717
- const dom$k = document.documentElement;
8311
+ const dom$l = document.documentElement;
8718
8312
  /**
8719
8313
  * Handles data operations.
8720
8314
  * @module KupData
@@ -8776,55 +8370,55 @@ class KupData {
8776
8370
  return FCellTypes.STRING;
8777
8371
  }
8778
8372
  }
8779
- if (dom$k.ketchup.objects.isBar(obj)) {
8373
+ if (dom$l.ketchup.objects.isBar(obj)) {
8780
8374
  return FCellTypes.BAR;
8781
8375
  }
8782
- else if (dom$k.ketchup.objects.isButton(obj)) {
8376
+ else if (dom$l.ketchup.objects.isButton(obj)) {
8783
8377
  return FCellTypes.BUTTON;
8784
8378
  }
8785
- else if (dom$k.ketchup.objects.isChart(obj)) {
8379
+ else if (dom$l.ketchup.objects.isChart(obj)) {
8786
8380
  return FCellTypes.CHART;
8787
8381
  }
8788
- else if (dom$k.ketchup.objects.isCheckbox(obj)) {
8382
+ else if (dom$l.ketchup.objects.isCheckbox(obj)) {
8789
8383
  return FCellTypes.CHECKBOX;
8790
8384
  }
8791
- else if (dom$k.ketchup.objects.isColor(obj)) {
8385
+ else if (dom$l.ketchup.objects.isColor(obj)) {
8792
8386
  return FCellTypes.COLOR_PICKER;
8793
8387
  }
8794
- else if (dom$k.ketchup.objects.isIcon(obj)) {
8388
+ else if (dom$l.ketchup.objects.isIcon(obj)) {
8795
8389
  return FCellTypes.ICON;
8796
8390
  }
8797
- else if (dom$k.ketchup.objects.isImage(obj)) {
8391
+ else if (dom$l.ketchup.objects.isImage(obj)) {
8798
8392
  return FCellTypes.IMAGE;
8799
8393
  }
8800
- else if (dom$k.ketchup.objects.isLink(obj)) {
8394
+ else if (dom$l.ketchup.objects.isLink(obj)) {
8801
8395
  return FCellTypes.LINK;
8802
8396
  }
8803
- else if (dom$k.ketchup.objects.isProgressBar(obj)) {
8397
+ else if (dom$l.ketchup.objects.isProgressBar(obj)) {
8804
8398
  return FCellTypes.PROGRESS_BAR;
8805
8399
  }
8806
- else if (dom$k.ketchup.objects.isRadio(obj)) {
8400
+ else if (dom$l.ketchup.objects.isRadio(obj)) {
8807
8401
  return FCellTypes.RADIO;
8808
8402
  }
8809
- else if (dom$k.ketchup.objects.isSwitch(obj)) {
8403
+ else if (dom$l.ketchup.objects.isSwitch(obj)) {
8810
8404
  return FCellTypes.SWITCH;
8811
8405
  }
8812
- else if (dom$k.ketchup.objects.isKupObjList(obj)) {
8406
+ else if (dom$l.ketchup.objects.isKupObjList(obj)) {
8813
8407
  return FCellTypes.CHIP;
8814
8408
  }
8815
- else if (dom$k.ketchup.objects.isNumber(obj)) {
8409
+ else if (dom$l.ketchup.objects.isNumber(obj)) {
8816
8410
  return FCellTypes.NUMBER;
8817
8411
  }
8818
- else if (dom$k.ketchup.objects.isDate(obj)) {
8412
+ else if (dom$l.ketchup.objects.isDate(obj)) {
8819
8413
  return FCellTypes.DATE;
8820
8414
  }
8821
- else if (dom$k.ketchup.objects.isTimestamp(obj)) {
8415
+ else if (dom$l.ketchup.objects.isTimestamp(obj)) {
8822
8416
  return FCellTypes.DATETIME;
8823
8417
  }
8824
- else if (dom$k.ketchup.objects.isTime(obj)) {
8418
+ else if (dom$l.ketchup.objects.isTime(obj)) {
8825
8419
  return FCellTypes.TIME;
8826
8420
  }
8827
- else if (dom$k.ketchup.objects.isVoCodver(obj)) {
8421
+ else if (dom$l.ketchup.objects.isVoCodver(obj)) {
8828
8422
  return FCellTypes.ICON;
8829
8423
  }
8830
8424
  else {
@@ -8904,10 +8498,10 @@ class KupData {
8904
8498
  if (!columns || !columns.length || columns.includes(key)) {
8905
8499
  if (min && max) {
8906
8500
  let d = null, s = '', n = 0;
8907
- if (dom$k.ketchup.objects.isDate(cell.obj)) {
8908
- d = dom$k.ketchup.dates.toDate(cell.value);
8909
- const dMax = dom$k.ketchup.dates.toDate(max instanceof String ? max.valueOf() : max);
8910
- const dMin = dom$k.ketchup.dates.toDate(min instanceof String ? min.valueOf() : min);
8501
+ if (dom$l.ketchup.objects.isDate(cell.obj)) {
8502
+ d = dom$l.ketchup.dates.toDate(cell.value);
8503
+ const dMax = dom$l.ketchup.dates.toDate(max instanceof String ? max.valueOf() : max);
8504
+ const dMin = dom$l.ketchup.dates.toDate(min instanceof String ? min.valueOf() : min);
8911
8505
  if (d === dMax ||
8912
8506
  d === dMin ||
8913
8507
  (d < dMax && d > dMin)) {
@@ -8926,10 +8520,12 @@ class KupData {
8926
8520
  }
8927
8521
  }
8928
8522
  else {
8929
- n = dom$k.ketchup.math.numberify(cell.value);
8523
+ n = dom$l.ketchup.math.numberify(cell.value);
8524
+ const nMax = dom$l.ketchup.math.numberify(max);
8525
+ const nMin = dom$l.ketchup.math.numberify(min);
8930
8526
  if (n === max ||
8931
8527
  n === min ||
8932
- (n < max && n > min)) {
8528
+ (n < nMax && n > nMin)) {
8933
8529
  result.cells.push(cell);
8934
8530
  result.rows.push(row);
8935
8531
  }
@@ -9083,7 +8679,7 @@ class KupData {
9083
8679
  sort(dataset, sortType, headerColumn) {
9084
8680
  if (sortType != 'normalDistribution') {
9085
8681
  const message = 'Wrong sort type! (' + sortType + ')';
9086
- dom$k.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
8682
+ dom$l.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
9087
8683
  return dataset;
9088
8684
  }
9089
8685
  const output = {
@@ -9319,6 +8915,59 @@ class KupDates {
9319
8915
  .filter((value) => typeof value === 'string');
9320
8916
  return items;
9321
8917
  }
8918
+ /**
8919
+ * Gets date format by browser locale
8920
+ * @returns {string} date format pattern, by browser locale
8921
+ */
8922
+ getDateFormat() {
8923
+ const formatObj = new Intl.DateTimeFormat(this.getLocale()).formatToParts(new Date());
8924
+ let dateFormat = formatObj
8925
+ .map((obj) => {
8926
+ switch (obj.type) {
8927
+ case 'day':
8928
+ return 'DD';
8929
+ case 'month':
8930
+ return 'MM';
8931
+ case 'year':
8932
+ return 'YYYY';
8933
+ default:
8934
+ return obj.value;
8935
+ }
8936
+ })
8937
+ .join('');
8938
+ return dateFormat;
8939
+ }
8940
+ /**
8941
+ * Gets time format by browser locale
8942
+ * @param {boolean} manageSeconds flag to set seconds managing
8943
+ * @returns {string} time format pattern, by browser locale
8944
+ */
8945
+ getTimeFormat(manageSeconds) {
8946
+ const options = {
8947
+ hour: '2-digit',
8948
+ minute: '2-digit',
8949
+ hour12: false,
8950
+ };
8951
+ if (manageSeconds == true) {
8952
+ options.second = '2-digit';
8953
+ }
8954
+ const formatObj = new Intl.DateTimeFormat(this.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
8955
+ let timeFormat = formatObj
8956
+ .map((obj) => {
8957
+ switch (obj.type) {
8958
+ case 'hour':
8959
+ return 'HH';
8960
+ case 'minute':
8961
+ return 'mm';
8962
+ case 'second':
8963
+ return 'ss';
8964
+ default:
8965
+ return obj.value;
8966
+ }
8967
+ })
8968
+ .join('');
8969
+ return timeFormat;
8970
+ }
9322
8971
  /**
9323
8972
  * Formats the given date.
9324
8973
  * @param {dayjs.ConfigType} input - Date to be formatted.
@@ -9331,6 +8980,23 @@ class KupDates {
9331
8980
  }
9332
8981
  return dayjs_min(input).format(format);
9333
8982
  }
8983
+ /**
8984
+ * Gets the time formatted
8985
+ * @param {Date} time time as Date object
8986
+ * @param {boolean} manageSeconds flag to set seconds managing
8987
+ * @return {string} time as string, formatted
8988
+ **/
8989
+ formatTime(time, manageSeconds) {
8990
+ const options = {
8991
+ hour: '2-digit',
8992
+ minute: '2-digit',
8993
+ hour12: false,
8994
+ };
8995
+ if (manageSeconds == true) {
8996
+ options.second = '2-digit';
8997
+ }
8998
+ return time.toLocaleTimeString(this.getLocale() + '-u-hc-h23', options);
8999
+ }
9334
9000
  /**
9335
9001
  * Validates the given date.
9336
9002
  * @param {dayjs.ConfigType} date - Date to be validated.
@@ -9346,6 +9012,16 @@ class KupDates {
9346
9012
  return dayjs_min(date, undefined, strict).isValid();
9347
9013
  }
9348
9014
  }
9015
+ /**
9016
+ * Validates the given date as string.
9017
+ * @param {string} value time string, formatted by actual browser locale
9018
+ * @param {boolean} manageSeconds if manage seconds
9019
+ * @returns {boolean} true if time string in input is a valid time
9020
+ */
9021
+ isValidFormattedStringTime(value, manageSeconds) {
9022
+ let format = this.getTimeFormat(manageSeconds);
9023
+ return this.isValid(value, format, true);
9024
+ }
9349
9025
  /**
9350
9026
  * Converts the input in a Date object.
9351
9027
  * @param {dayjs.ConfigType} input - Input date.
@@ -9554,6 +9230,237 @@ class KupDates {
9554
9230
  subtract(input, value, unit) {
9555
9231
  return dayjs_min(input).subtract(value, unit);
9556
9232
  }
9233
+ /**
9234
+ * Gets the month formatted
9235
+ * @param {number} month month id
9236
+ * @param {KupDateTimeFormatOptionsMonth} format format
9237
+ * @returns {string} the month formatted, by browser locale
9238
+ */
9239
+ getMonthAsString(month, format) {
9240
+ if (month == null) {
9241
+ return '';
9242
+ }
9243
+ const dateTmp = new Date();
9244
+ dateTmp.setDate(1);
9245
+ dateTmp.setMonth(month - 1);
9246
+ const options = {
9247
+ month: format,
9248
+ };
9249
+ const dateTimeFormat = new Intl.DateTimeFormat(this.getLocale(), options);
9250
+ return dateTimeFormat.format(dateTmp);
9251
+ }
9252
+ /**
9253
+ * Gets the year months formatted
9254
+ * @param {KupDateTimeFormatOptionsMonth} format format
9255
+ * @returns {string[]} the months formatted, by browser locale
9256
+ */
9257
+ getMonthsAsString(format) {
9258
+ if (format == null || format.trim() == '') {
9259
+ format = KupDateTimeFormatOptionsMonth.LONG;
9260
+ }
9261
+ var months = [];
9262
+ for (var i = 0; i < 12; i++) {
9263
+ months[i] = this.getMonthAsString(i + 1, format);
9264
+ }
9265
+ return months;
9266
+ }
9267
+ /**
9268
+ * Gets the day formatted
9269
+ * @param {Date} date date
9270
+ * @returns {string} the day formatted, by browser locale
9271
+ */
9272
+ getDayAsString(date) {
9273
+ if (date == null) {
9274
+ return '';
9275
+ }
9276
+ const options = {
9277
+ weekday: 'narrow',
9278
+ /** weekday: 'narrow' 'short' 'long' */
9279
+ };
9280
+ const dateTimeFormat = new Intl.DateTimeFormat(this.getLocale(), options);
9281
+ return dateTimeFormat.format(date);
9282
+ }
9283
+ /**
9284
+ * First day of current week
9285
+ * @param {number} firstDayIndex first day of week index
9286
+ * @returns {Date} the first day of current week
9287
+ */
9288
+ firstDayThisWeek(firstDayIndex) {
9289
+ var d = new Date();
9290
+ const day = d.getDay();
9291
+ // dayIndex0
9292
+ d.setDate(d.getDate() - day);
9293
+ // dayIndexX
9294
+ d.setDate(d.getDate() + firstDayIndex);
9295
+ return d;
9296
+ }
9297
+ /**
9298
+ * Dates of current week
9299
+ * @param {number} firstDayIndex first day of week index
9300
+ * @returns { startDate: Date; endDate: Date } the dates of current week
9301
+ */
9302
+ thisWeek(firstDayIndex) {
9303
+ const firstDay = this.firstDayThisWeek(firstDayIndex);
9304
+ return {
9305
+ startDate: firstDay,
9306
+ endDate: offsetDate(firstDay, 6),
9307
+ };
9308
+ function offsetDate(base, count) {
9309
+ const date = new Date(base);
9310
+ date.setDate(base.getDate() + count);
9311
+ return date;
9312
+ }
9313
+ }
9314
+ /**
9315
+ * Gets the days of current week as string
9316
+ * @param {number} firstDayIndex first day of week index
9317
+ * @returns {string[]} the days of current week as string
9318
+ */
9319
+ getDaysOfWeekAsString(firstDayIndex) {
9320
+ var thisWeekDays = this.thisWeek(firstDayIndex);
9321
+ var monday = thisWeekDays.startDate;
9322
+ var days = [];
9323
+ for (var i = 0; i < 7; i++) {
9324
+ var date = new Date(monday.toISOString());
9325
+ date.setDate(date.getDate() + i);
9326
+ days[i] = this.getDayAsString(date);
9327
+ }
9328
+ return days;
9329
+ }
9330
+ /**
9331
+ * Gets the timestamp formatted
9332
+ * @param {string} value date/time as string, formatted ISO
9333
+ * @returns {string} date/time as string, formatted by actual browser locale
9334
+ **/
9335
+ timestampStringToFormattedString(value) {
9336
+ const options = {
9337
+ day: '2-digit',
9338
+ month: '2-digit',
9339
+ year: 'numeric',
9340
+ hour: '2-digit',
9341
+ minute: '2-digit',
9342
+ second: '2-digit',
9343
+ hour12: false,
9344
+ };
9345
+ let date = this.toDate(this.normalize(value, KupDatesNormalize.TIMESTAMP));
9346
+ return date.toLocaleString(this.getLocale() + '-u-hc-h23', options);
9347
+ }
9348
+ /**
9349
+ * Gets ISO date/time from formatted string, as string
9350
+ * @param {string} value date/time as string, formatted by actual browser locale
9351
+ * @returns {string} date/time as string, formatted ISO
9352
+ **/
9353
+ formattedStringToTimestampString(value) {
9354
+ return this.formattedStringToCustomDateTime(value, KupDatesFormats.ISO_DATE_TIME, true);
9355
+ }
9356
+ /**
9357
+ * Gets formatted dateTime as customed ISO (see KupDatesFormats)
9358
+ * @param {string} value time as string, formatted by actual browser locale
9359
+ * @param {string} outputFormat time format to return (see KupDatesFormats)
9360
+ * @param {boolean} manageSeconds flag to set seconds managing
9361
+ * @returns {string} time as string, formatted
9362
+ **/
9363
+ formattedStringToCustomDateTime(value, outputFormat, manageSeconds) {
9364
+ let inputFormat = this.getTimeFormat(manageSeconds);
9365
+ if (this.isValid(value, inputFormat)) {
9366
+ return this.format(this.normalize(value, KupDatesNormalize.TIME), outputFormat);
9367
+ }
9368
+ else {
9369
+ return '';
9370
+ }
9371
+ }
9372
+ /**
9373
+ * Gets the time formatted
9374
+ * @param {string} value time as string, formatted ISO
9375
+ * @param {boolean} manageSeconds flag to set seconds managing
9376
+ * @param {string} customedFormat time format from smeupObject
9377
+ * @returns {string} time as string, formatted by actual browser locale
9378
+ **/
9379
+ timeStringToFormattedString(value, manageSeconds, customedFormat) {
9380
+ const options = {
9381
+ hour: '2-digit',
9382
+ minute: '2-digit',
9383
+ hour12: false,
9384
+ };
9385
+ if (manageSeconds == true) {
9386
+ options.second = '2-digit';
9387
+ }
9388
+ let date = this.toDate(this.normalize(value, KupDatesNormalize.TIME));
9389
+ return formatByCustomedOutputTimeFormat(value, date, options, customedFormat, this);
9390
+ function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat, kupDates) {
9391
+ if (customedFormat == null) {
9392
+ return date.toLocaleTimeString(kupDates.getLocale() + '-u-hc-h23', options);
9393
+ }
9394
+ switch (customedFormat) {
9395
+ case 'I13': {
9396
+ //hh:mm
9397
+ break;
9398
+ }
9399
+ case 'I12': {
9400
+ //hh:mm:ss
9401
+ break;
9402
+ }
9403
+ case 'I11': {
9404
+ //???
9405
+ //hh:dddd
9406
+ //return moment(date).format('HH:DDDD');
9407
+ return valueStr;
9408
+ }
9409
+ case 'I14': {
9410
+ //???
9411
+ //sssss
9412
+ //return moment(date).format('SSSSS');
9413
+ return valueStr;
9414
+ }
9415
+ case 'I1H': {
9416
+ //???
9417
+ //Ora,Cen/Min HH,xx
9418
+ return valueStr;
9419
+ }
9420
+ case 'I1M': {
9421
+ //???
9422
+ //Min,Cen/Sec MMMM,xx
9423
+ return valueStr;
9424
+ }
9425
+ case 'I21': {
9426
+ //???
9427
+ //Giorni,(4 decim)
9428
+ return valueStr;
9429
+ }
9430
+ case 'I22': {
9431
+ //???
9432
+ //Ore,(4 decim)
9433
+ return valueStr;
9434
+ }
9435
+ case 'I23': {
9436
+ //???
9437
+ //Minuti,(4 decim)
9438
+ return valueStr;
9439
+ }
9440
+ case 'I24': {
9441
+ //???
9442
+ //Secondi
9443
+ return valueStr;
9444
+ }
9445
+ case 'I2H': {
9446
+ //???
9447
+ //Ora,Cen/Min HHHH,xx
9448
+ return valueStr;
9449
+ }
9450
+ case 'I2D': {
9451
+ //???
9452
+ //Ore Minuti Secondi HHMMS
9453
+ return valueStr;
9454
+ }
9455
+ case 'I2M': {
9456
+ //???
9457
+ //Min,Cen/Sec MMMM,xx
9458
+ return valueStr;
9459
+ }
9460
+ }
9461
+ return date.toLocaleTimeString(kupDates.getLocale() + '-u-hc-h23', options);
9462
+ }
9463
+ }
9557
9464
  /**
9558
9465
  * Registers a KupComponent in KupDates, in order to be properly handled whenever the locale changes.
9559
9466
  * @param {any} component - The Ketchup component to be registered.
@@ -10879,7 +10786,7 @@ createCommonjsModule(function (module) {
10879
10786
  }));
10880
10787
  });
10881
10788
 
10882
- const dom$j = document.documentElement;
10789
+ const dom$k = document.documentElement;
10883
10790
  /**
10884
10791
  * Takes a mathematical formula as string in input, with column names between brackets, and returns the result as a number.
10885
10792
  * @param {string} formula - Mathematical operation (i.e.: ([COL1] - [COL2]) * 100 / [COL3]).
@@ -10902,7 +10809,7 @@ function customFormula(formula, row) {
10902
10809
  return result;
10903
10810
  }
10904
10811
  catch (e) {
10905
- dom$j.ketchup.debug.logMessage('kup-data', 'Error while evaluating the following formula!(' + formula + ')', KupDebugCategory.ERROR);
10812
+ dom$k.ketchup.debug.logMessage('kup-data', 'Error while evaluating the following formula!(' + formula + ')', KupDebugCategory.ERROR);
10906
10813
  return NaN;
10907
10814
  }
10908
10815
  }
@@ -10918,7 +10825,87 @@ function normalDistributionFormula(average, variance, x) {
10918
10825
  Math.exp(-Math.pow(x - average, 2) / (2 * variance)));
10919
10826
  }
10920
10827
 
10921
- const dom$i = document.documentElement;
10828
+ function identify(array) {
10829
+ if (array) {
10830
+ for (let i = 0; i < array.length; i++) {
10831
+ array[i].id = i.toString();
10832
+ }
10833
+ }
10834
+ }
10835
+ /**
10836
+ * Fills a string with another string, eventually before
10837
+ * @param {string} stringIn initial string
10838
+ * @param {string} stringForFill string used for fill
10839
+ * @param {number} finalLen final string length
10840
+ * @param {boolean} addBefore flag for fill on left
10841
+ * @returns the input string filled with stringForFill
10842
+ */
10843
+ function fillString(stringIn, stringForFill, finalLen, addBefore) {
10844
+ let initSize = stringIn.length;
10845
+ let stringOut = '';
10846
+ for (let i = initSize; i < finalLen; i += stringForFill.length) {
10847
+ stringOut += stringForFill;
10848
+ }
10849
+ if (addBefore) {
10850
+ return stringOut + stringIn;
10851
+ }
10852
+ else {
10853
+ return stringIn + stringOut;
10854
+ }
10855
+ }
10856
+ /**
10857
+ * Used to retrieve component's props values.
10858
+ * @param {any} comp - Component calling this function.
10859
+ * @param {GenericObject} list - Prop list, specific for each component.
10860
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
10861
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
10862
+ */
10863
+ function getProps(comp, list, descriptions) {
10864
+ let props = {};
10865
+ if (descriptions) {
10866
+ props = list;
10867
+ }
10868
+ else {
10869
+ for (const key in list) {
10870
+ if (Object.prototype.hasOwnProperty.call(list, key)) {
10871
+ props[key] = comp[key];
10872
+ }
10873
+ }
10874
+ }
10875
+ return props;
10876
+ }
10877
+ /**
10878
+ * Sets the props to the component.
10879
+ * @param {any} comp - Component calling this function.
10880
+ * @param {GenericObject} list - Prop list, specific for each component.
10881
+ * @param {GenericObject} props - Prop to be set.
10882
+ */
10883
+ function setProps(comp, list, props) {
10884
+ for (const key in props) {
10885
+ // If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
10886
+ if (list[key]) {
10887
+ comp[key] = props[key];
10888
+ }
10889
+ else {
10890
+ // Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
10891
+ comp.rootElement[key] = props[key];
10892
+ }
10893
+ }
10894
+ }
10895
+ /**
10896
+ * Creates a regular expression object, from a string un-escaped
10897
+ * @param s string to use for create regular expression (not escaped)
10898
+ * @param flags flags used for the regular expression
10899
+ * @returns the regular expression object
10900
+ */
10901
+ function getRegExpFromString(s, flags) {
10902
+ return new RegExp(escapeRegExp(s), flags);
10903
+ }
10904
+ function escapeRegExp(s) {
10905
+ return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
10906
+ }
10907
+
10908
+ const dom$j = document.documentElement;
10922
10909
  /**
10923
10910
  * Handles mathematical operations and number formatting/conversion.
10924
10911
  * @module KupMath
@@ -10941,7 +10928,7 @@ class KupMath {
10941
10928
  const maximumFractionDigits = 14;
10942
10929
  if (value == null || value == '')
10943
10930
  return value;
10944
- return Number(value).toLocaleString(dom$i.ketchup.math.locale, {
10931
+ return Number(value).toLocaleString(this.locale, {
10945
10932
  maximumFractionDigits: maximumFractionDigits,
10946
10933
  });
10947
10934
  },
@@ -10958,7 +10945,7 @@ class KupMath {
10958
10945
  setLocale(locale) {
10959
10946
  if (!Object.values(KupMathLocales).includes(locale)) {
10960
10947
  locale = KupMathLocales.en;
10961
- dom$i.ketchup.debug.logMessage('kup-math', 'Invalid locale (' + locale + ')! Defaulting to english.', KupDebugCategory.WARNING);
10948
+ dom$j.ketchup.debug.logMessage('kup-math', 'Invalid locale (' + locale + ')! Defaulting to english.', KupDebugCategory.WARNING);
10962
10949
  }
10963
10950
  this.locale = locale;
10964
10951
  this.numeral.locale(locale);
@@ -11030,14 +11017,15 @@ class KupMath {
11030
11017
  return this.numeral(n).format(format);
11031
11018
  }
11032
11019
  /**
11033
- * Created the string for format a number
11020
+ * Create the pattern string for format a number
11034
11021
  * @param {boolean} thousandPoint - show thousandPoint
11035
11022
  * @param {number} decimals - number of decimals
11023
+ * @returns {string} - formatter pattern
11036
11024
  */
11037
11025
  createFormatPattern(thousandPoint, decimals) {
11038
11026
  var format = '0';
11039
11027
  if (thousandPoint) {
11040
- format += ',000';
11028
+ format += ',0';
11041
11029
  }
11042
11030
  if (decimals && decimals > 0) {
11043
11031
  format += '.';
@@ -11049,7 +11037,7 @@ class KupMath {
11049
11037
  }
11050
11038
  /**
11051
11039
  * Returns the decimal separator of current browser
11052
- * @returns current decimal separator, by locale
11040
+ * @returns {string} current decimal separator, by locale
11053
11041
  */
11054
11042
  decimalSeparator() {
11055
11043
  const numberWithGroupAndDecimalSeparator = 1000.1;
@@ -11059,7 +11047,7 @@ class KupMath {
11059
11047
  }
11060
11048
  /**
11061
11049
  * Returns the group separator of current browser
11062
- * @returns current group separator, by locale
11050
+ * @returns {string} current group separator, by locale
11063
11051
  */
11064
11052
  groupSeparator() {
11065
11053
  const numberWithGroupAndDecimalSeparator = 1000.1;
@@ -11069,11 +11057,12 @@ class KupMath {
11069
11057
  }
11070
11058
  /**
11071
11059
  * Checks if an input string matches options, for desired formatted decimal number (integer digits, decimal digits)
11072
- * @param value the input value to check
11073
- * @param options options for customize the check
11074
- * @returns an object from applying the regular expression for check
11060
+ * @param {string} value the input value to check
11061
+ * @param {NumericFieldFormatOptions} options options for customize the check
11062
+ * @returns {RegExpMatchArray} an object from applying the regular expression for check
11075
11063
  */
11076
11064
  matchNumericValueWithOptions(value, options) {
11065
+ value = value.replace(getRegExpFromString(this.groupSeparator(), 'g'), '');
11077
11066
  // see https://github.com/24eme/jquery-input-number-format.git
11078
11067
  let found = undefined;
11079
11068
  let integerPartSuffix = '+';
@@ -11114,9 +11103,22 @@ class KupMath {
11114
11103
  * Returns a number from a non-specified input type between string, number, or String.
11115
11104
  * @param {string | String | number} input - Input value to numberify.
11116
11105
  * @param {boolean} inputIsLocalized - Numberifies assuming the input string is in the current KupMath locale's format.
11106
+ * @param {string} type - type of number for calculate suffix
11117
11107
  * @returns {number} Resulting number or NaN (when not a number).
11118
11108
  */
11119
- numberify(input, inputIsLocalized) {
11109
+ numberify(input, inputIsLocalized, type) {
11110
+ if (typeof input != 'number') {
11111
+ if (type) {
11112
+ let suffix = this.getNumericValueSuffix(type);
11113
+ if (suffix != '') {
11114
+ input = input.replace(getRegExpFromString(suffix, 'g'), '');
11115
+ }
11116
+ }
11117
+ const groupSeparator = inputIsLocalized
11118
+ ? this.groupSeparator()
11119
+ : ',';
11120
+ input = input.replace(getRegExpFromString(groupSeparator, 'g'), '');
11121
+ }
11120
11122
  let n = NaN;
11121
11123
  if (inputIsLocalized) {
11122
11124
  n = this.numeral(input).value();
@@ -11132,6 +11134,161 @@ class KupMath {
11132
11134
  }
11133
11135
  return n;
11134
11136
  }
11137
+ /**
11138
+ * Returns a number from a non-specified input type between string, number, or String.
11139
+ * If value in is null, undefined or blank, returns 0
11140
+ * @param {string} input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
11141
+ * @param {boolean} inputIsLocalized - Numberifies assuming the input string is in the current KupMath locale's format.
11142
+ * @param {string} type - type of number for calculate suffix
11143
+ * @returns {number} Resulting number
11144
+ **/
11145
+ numberifySafe(input, inputIsLocalized, type) {
11146
+ if (!input || input == null || input.trim() == '') {
11147
+ input = '0';
11148
+ }
11149
+ return this.numberify(input, inputIsLocalized, type);
11150
+ }
11151
+ /**
11152
+ * Checks if input is a valid number
11153
+ * @param {any} value input value to check
11154
+ * @returns {boolean} if input value is valid number
11155
+ */
11156
+ isNumber(value) {
11157
+ //return typeof value === 'number';
11158
+ return !isNaN(value);
11159
+ }
11160
+ /**
11161
+ * Checks if string in input is a valid formatted number
11162
+ * @param {string} value number as string, formatted by actual browser locale
11163
+ * @param {string} type - type of number for calculate suffix
11164
+ * @returns {boolean} true if number string in input is a valid number
11165
+ */
11166
+ isStringNumber(value, type) {
11167
+ if (value == null || value.trim() == '') {
11168
+ return false;
11169
+ }
11170
+ let tmpStr = this.formattedStringToNumberString(value, type);
11171
+ if (this.isNumber(tmpStr)) {
11172
+ return true;
11173
+ }
11174
+ return false;
11175
+ }
11176
+ /**
11177
+ * Gets number as string, formatted by locale US, decimal separator . (like java decimal numbers)
11178
+ * @param {string} input number as string, formatted by actual browser locale (maybe)
11179
+ * @param {string} type - type of number for calculate suffix
11180
+ * @param {string} decSeparator - decimal serparator of input string
11181
+ * @returns {string} number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
11182
+ **/
11183
+ formattedStringToNumberString(input, type, decSeparator) {
11184
+ return numberStringToNumberString(input, type, decSeparator !== null && decSeparator !== void 0 ? decSeparator : this.decimalSeparator(), this);
11185
+ function numberStringToNumberString(input, type, decFmt, kupMath) {
11186
+ if (!input || input == null || input.trim() == '') {
11187
+ return '';
11188
+ }
11189
+ let unf = kupMath.numberifySafe(input, decFmt != '.', type);
11190
+ if (unf == null || isNaN(unf)) {
11191
+ return input;
11192
+ }
11193
+ return numberToString(unf, -1, 'en-US', kupMath);
11194
+ }
11195
+ function numberToString(input, decimals, locale, kupMath) {
11196
+ if (input == null) {
11197
+ input = 0;
11198
+ }
11199
+ if (decimals == null || decimals == -1) {
11200
+ decimals = kupMath.countDecimals(input);
11201
+ }
11202
+ let n = Number(input);
11203
+ let f = decimals > -1
11204
+ ? {
11205
+ minimumFractionDigits: decimals,
11206
+ maximumFractionDigits: decimals,
11207
+ useGrouping: false,
11208
+ }
11209
+ : { useGrouping: false };
11210
+ return n.toLocaleString(locale, f);
11211
+ }
11212
+ }
11213
+ /**
11214
+ * Gets the number of decimals for current number
11215
+ * @param {number} value numer input
11216
+ * @returns {number} the number of decimals
11217
+ */
11218
+ countDecimals(value) {
11219
+ var _a;
11220
+ if (Math.floor(value) === value)
11221
+ return 0;
11222
+ let stringValue = value.toString().split('.')[1];
11223
+ if (stringValue) {
11224
+ return (_a = stringValue.length) !== null && _a !== void 0 ? _a : 0;
11225
+ }
11226
+ else {
11227
+ return 0;
11228
+ }
11229
+ }
11230
+ /**
11231
+ * Gets the suffix for number, by type
11232
+ * @param {string} type - type of number for calculate suffix
11233
+ * @returns {string} suffix for number, by type
11234
+ **/
11235
+ getNumericValueSuffix(type) {
11236
+ type = type.toUpperCase();
11237
+ let nstr = '';
11238
+ if (type == 'P') {
11239
+ nstr = ' %';
11240
+ }
11241
+ else if (type == 'VE') {
11242
+ nstr = ' €';
11243
+ }
11244
+ else if (type == 'VL') {
11245
+ nstr = ' £';
11246
+ }
11247
+ else if (type == 'VV') {
11248
+ nstr = ' $';
11249
+ }
11250
+ return nstr;
11251
+ }
11252
+ /**
11253
+ * Gets the number as string, formatted by actual browser locale, with suffix by type
11254
+ * @param {number} input number
11255
+ * @param {number} decimals number of significant decimal digits for output
11256
+ * @param {string} type - type of number for calculate suffix
11257
+ * @returns {string} number as string, formatted by actual browser locale, with suffix by type
11258
+ **/
11259
+ numberToFormattedString(input, decimals, type) {
11260
+ if (input == null || isNaN(input)) {
11261
+ return '';
11262
+ }
11263
+ if (decimals == null || decimals == -1) {
11264
+ decimals = this.countDecimals(input);
11265
+ }
11266
+ let nstr = this.format(input, this.createFormatPattern(true, decimals));
11267
+ nstr = nstr + this.getNumericValueSuffix(type);
11268
+ return nstr;
11269
+ }
11270
+ /**
11271
+ * Gets the number as string, formatted by actual browser locale, with suffix by type
11272
+ * @param {string} input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
11273
+ * @param {number} decimals number of significant decimal digits for output
11274
+ * @param {string} type - type of number for calculate suffix
11275
+ * @param {string} decSeparator decimal separator for outpu string
11276
+ * @returns {string} number as string, formatted by actual browser locale (or using decimal separator param), with suffix by type
11277
+ **/
11278
+ numberStringToFormattedString(input, decimals, type, decSeparator) {
11279
+ let value = this.numberToFormattedString(this.numberifySafe(input), decimals, type);
11280
+ if (!decSeparator) {
11281
+ return value;
11282
+ }
11283
+ const browserDecSeparator = this.decimalSeparator();
11284
+ if (browserDecSeparator == decSeparator) {
11285
+ return value;
11286
+ }
11287
+ const browserGroupSeparator = this.groupSeparator();
11288
+ value = value.replace(getRegExpFromString(browserGroupSeparator, 'g'), '');
11289
+ value = value.replace(getRegExpFromString(browserDecSeparator, 'g'), decSeparator);
11290
+ return value;
11291
+ }
11135
11292
  /**
11136
11293
  * Registers a KupComponent in KupMath, in order to be properly handled whenever the locale changes.
11137
11294
  * @param {any} component - The Ketchup component to be registered.
@@ -11163,7 +11320,7 @@ var __classPrivateFieldSet$5 = (undefined && undefined.__classPrivateFieldSet) |
11163
11320
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11164
11321
  };
11165
11322
  var _KupTooltip_instances, _KupTooltip_clickCb, _KupTooltip_dynPos, _KupTooltip_create, _KupTooltip_setOptions;
11166
- const dom$h = document.documentElement;
11323
+ const dom$i = document.documentElement;
11167
11324
  /**
11168
11325
  * Handles application-wide tooltip using card component.
11169
11326
  * @module KupTooltip
@@ -11276,8 +11433,8 @@ class KupTooltip {
11276
11433
  hide() {
11277
11434
  if (this.element) {
11278
11435
  this.element.menuVisible = false;
11279
- dom$h.ketchup.dynamicPosition.stop(this.element);
11280
- dom$h.ketchup.removeClickCallback(__classPrivateFieldGet$8(this, _KupTooltip_clickCb, "f"));
11436
+ dom$i.ketchup.dynamicPosition.stop(this.element);
11437
+ dom$i.ketchup.removeClickCallback(__classPrivateFieldGet$8(this, _KupTooltip_clickCb, "f"));
11281
11438
  }
11282
11439
  }
11283
11440
  /**
@@ -11302,12 +11459,12 @@ class KupTooltip {
11302
11459
  return;
11303
11460
  }
11304
11461
  // If the dynamic positioning is still to be registered, a warning is thrown
11305
- if (!dom$h.ketchup.dynamicPosition.isRegistered(this.element)) {
11306
- dom$h.ketchup.debug.logMessage('kup-tooltip', 'Unable to display KupTooltip without specifying a valid anchor point.', KupDebugCategory.WARNING);
11462
+ if (!dom$i.ketchup.dynamicPosition.isRegistered(this.element)) {
11463
+ dom$i.ketchup.debug.logMessage('kup-tooltip', 'Unable to display KupTooltip without specifying a valid anchor point.', KupDebugCategory.WARNING);
11307
11464
  return;
11308
11465
  }
11309
11466
  this.element.menuVisible = true;
11310
- dom$h.ketchup.addClickCallback(__classPrivateFieldGet$8(this, _KupTooltip_clickCb, "f"), true);
11467
+ dom$i.ketchup.addClickCallback(__classPrivateFieldGet$8(this, _KupTooltip_clickCb, "f"), true);
11311
11468
  }
11312
11469
  /**
11313
11470
  * Returns whether an element was previously registered or not.
@@ -11342,13 +11499,13 @@ class KupTooltip {
11342
11499
  }
11343
11500
  }
11344
11501
  _KupTooltip_clickCb = new WeakMap(), _KupTooltip_instances = new WeakSet(), _KupTooltip_dynPos = function _KupTooltip_dynPos(anchor) {
11345
- if (dom$h.ketchup.dynamicPosition.isRegistered(this.element)) {
11346
- dom$h.ketchup.dynamicPosition.changeAnchor(this.element, anchor);
11502
+ if (dom$i.ketchup.dynamicPosition.isRegistered(this.element)) {
11503
+ dom$i.ketchup.dynamicPosition.changeAnchor(this.element, anchor);
11347
11504
  }
11348
11505
  else {
11349
- dom$h.ketchup.dynamicPosition.register(this.element, anchor, null, null, true);
11506
+ dom$i.ketchup.dynamicPosition.register(this.element, anchor, null, null, true);
11350
11507
  }
11351
- dom$h.ketchup.dynamicPosition.start(this.element);
11508
+ dom$i.ketchup.dynamicPosition.start(this.element);
11352
11509
  }, _KupTooltip_create = function _KupTooltip_create(options) {
11353
11510
  this.element = document.createElement('kup-card');
11354
11511
  this.element.id = 'kup-tooltip';
@@ -19203,7 +19360,7 @@ var html2canvas = createCommonjsModule(function (module, exports) {
19203
19360
  //# sourceMappingURL=html2canvas.js.map
19204
19361
  });
19205
19362
 
19206
- const dom$g = document.documentElement;
19363
+ const dom$h = document.documentElement;
19207
19364
  /**
19208
19365
  * This class controls every other Ketchup utility suite.
19209
19366
  * @module KupManager
@@ -19465,26 +19622,26 @@ class KupManager {
19465
19622
  */
19466
19623
  function kupManagerInstance() {
19467
19624
  var _a;
19468
- if (!dom$g.ketchup) {
19469
- const overrides = (_a = dom$g.ketchupInit) !== null && _a !== void 0 ? _a : null;
19470
- dom$g.ketchup = new KupManager(overrides);
19471
- dom$g.ketchup.theme.set();
19472
- if (dom$g.ketchup.debug.active) {
19473
- dom$g.ketchup.debug.toggle(dom$g.ketchup.debug.active);
19474
- }
19475
- globalThis.kupManager = dom$g.ketchup;
19625
+ if (!dom$h.ketchup) {
19626
+ const overrides = (_a = dom$h.ketchupInit) !== null && _a !== void 0 ? _a : null;
19627
+ dom$h.ketchup = new KupManager(overrides);
19628
+ dom$h.ketchup.theme.set();
19629
+ if (dom$h.ketchup.debug.active) {
19630
+ dom$h.ketchup.debug.toggle(dom$h.ketchup.debug.active);
19631
+ }
19632
+ globalThis.kupManager = dom$h.ketchup;
19476
19633
  if (overrides === null || overrides === void 0 ? void 0 : overrides.autoSetLocalization) {
19477
- const locale = dom$g.ketchup.dates.locale;
19634
+ const locale = dom$h.ketchup.dates.locale;
19478
19635
  if (!overrides.language || !overrides.language.name) {
19479
- dom$g.ketchup.language.set(KupLanguageDefaults[locale]);
19636
+ dom$h.ketchup.language.set(KupLanguageDefaults[locale]);
19480
19637
  }
19481
19638
  if (!overrides.math || !overrides.math.locale) {
19482
- dom$g.ketchup.math.setLocale(KupMathLocales[locale]);
19639
+ dom$h.ketchup.math.setLocale(KupMathLocales[locale]);
19483
19640
  }
19484
19641
  }
19485
19642
  document.dispatchEvent(new CustomEvent('kup-manager-ready'));
19486
19643
  }
19487
- return dom$g.ketchup;
19644
+ return dom$h.ketchup;
19488
19645
  }
19489
19646
 
19490
19647
  /**
@@ -19601,7 +19758,7 @@ function createBar(data) {
19601
19758
  */
19602
19759
  const componentWrapperId = 'kup-component';
19603
19760
 
19604
- const dom$f = document.documentElement;
19761
+ const dom$g = document.documentElement;
19605
19762
  /*-------------------------------------------------*/
19606
19763
  /* C o m p o n e n t */
19607
19764
  /*-------------------------------------------------*/
@@ -19726,7 +19883,7 @@ function setContent(props) {
19726
19883
  let beginVal = value.substring(0, component.selectionStart);
19727
19884
  let endVal = value.substring(component.selectionEnd, component.selectionEnd + value.length - 1);
19728
19885
  let val = beginVal + e.key + endVal;
19729
- if (!dom$f.ketchup.math.matchNumericValueWithOptions(val, options)) {
19886
+ if (!dom$g.ketchup.math.matchNumericValueWithOptions(val, options)) {
19730
19887
  e.preventDefault();
19731
19888
  return;
19732
19889
  }
@@ -19770,7 +19927,7 @@ const formatValue = function (value, options, inputIsLocalized) {
19770
19927
  if (formatedValue == '-') {
19771
19928
  return '';
19772
19929
  }
19773
- return dom$f.ketchup.math.format(formatedValue, dom$f.ketchup.math.createFormatPattern(options.group, options.decimal), inputIsLocalized);
19930
+ return dom$g.ketchup.math.format(formatedValue, dom$g.ketchup.math.createFormatPattern(options.group, options.decimal), inputIsLocalized);
19774
19931
  };
19775
19932
 
19776
19933
  /**
@@ -22721,7 +22878,7 @@ var FChipType;
22721
22878
  FChipType["STANDARD"] = "standard";
22722
22879
  })(FChipType || (FChipType = {}));
22723
22880
 
22724
- const dom$e = document.documentElement;
22881
+ const dom$f = document.documentElement;
22725
22882
  /*-------------------------------------------------*/
22726
22883
  /* C o m p o n e n t */
22727
22884
  /*-------------------------------------------------*/
@@ -22763,9 +22920,9 @@ function createChipList(props, isChoice, isFilter, isInput) {
22763
22920
  hasChildren ? (h(FImage, { onClick: props.onExpansionClick &&
22764
22921
  props.onExpansionClick[i]
22765
22922
  ? props.onExpansionClick[i].bind(props.onExpansionClick[i], chip)
22766
- : null, resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "18px", sizeY: "18px", title: dom$e.ketchup.language.translate(KupLanguageGeneric.EXPAND) +
22923
+ : null, resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "18px", sizeY: "18px", title: dom$f.ketchup.language.translate(KupLanguageGeneric.EXPAND) +
22767
22924
  '/' +
22768
- dom$e.ketchup.language.translate(KupLanguageGeneric.COLLAPSE) +
22925
+ dom$f.ketchup.language.translate(KupLanguageGeneric.COLLAPSE) +
22769
22926
  ' (CTRL + Click)', wrapperClass: "dropdown-icon" })) : indent ? (h(FImage, { resource: "blank", sizeX: "18px", sizeY: "18px", wrapperClass: "dropdown-icon" })) : null,
22770
22927
  createChip(chip)));
22771
22928
  if (showChildren) {
@@ -22845,7 +23002,7 @@ const FSwitch = (props) => {
22845
23002
  h("label", { onClick: props.onChange }, props.label))));
22846
23003
  };
22847
23004
 
22848
- const dom$d = document.documentElement;
23005
+ const dom$e = document.documentElement;
22849
23006
  /*-------------------------------------------------*/
22850
23007
  /* C o m p o n e n t */
22851
23008
  /*-------------------------------------------------*/
@@ -22860,10 +23017,10 @@ const FCell = (props, children) => {
22860
23017
  : column.shape
22861
23018
  ? column.shape
22862
23019
  : null;
22863
- const hasObj = !dom$d.ketchup.objects.isEmptyKupObj(cell.obj);
23020
+ const hasObj = !dom$e.ketchup.objects.isEmptyKupObj(cell.obj);
22864
23021
  const isEditable = (cell.isEditable || column.isEditable) && props.editable ? true : false;
22865
23022
  const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
22866
- const cellType = dom$d.ketchup.data.cell.getType(cell, shape);
23023
+ const cellType = dom$e.ketchup.data.cell.getType(cell, shape);
22867
23024
  const subcomponentProps = Object.assign({}, cell.data);
22868
23025
  let cssClasses = cell.cssClass
22869
23026
  ? cell.cssClass
@@ -22912,7 +23069,7 @@ const FCell = (props, children) => {
22912
23069
  icon = h(FImage, Object.assign({}, fProps));
22913
23070
  }
22914
23071
  let cellTitle = null;
22915
- if (dom$d.ketchup.debug.isDebug() && hasObj) {
23072
+ if (dom$e.ketchup.debug.isDebug() && hasObj) {
22916
23073
  cellTitle = cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
22917
23074
  }
22918
23075
  else if (cell.title != null && cell.title.trim() != '') {
@@ -23070,7 +23227,9 @@ function setEditableCell(cellType, classObj, cell, column, props) {
23070
23227
  case FCellTypes.LINK:
23071
23228
  case FCellTypes.STRING:
23072
23229
  return (h(FTextField, Object.assign({ inputType: cellType === FCellTypes.NUMBER ? 'number' : null, fullWidth: isFullWidth(props) ? true : false }, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, value: cellType === FCellTypes.NUMBER
23073
- ? stringToNumber(cell.value).toString()
23230
+ ? dom$e.ketchup.math
23231
+ .numberifySafe(cell.value)
23232
+ .toString()
23074
23233
  : cell.value, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), onIconClick: (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
23075
23234
  }
23076
23235
  }
@@ -23108,7 +23267,7 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
23108
23267
  return (h("a", { href: content, target: "_blank" }, cell.value));
23109
23268
  case FCellTypes.NUMBER:
23110
23269
  if (content && content != '') {
23111
- const cellValueNumber = stringToNumber(cell.value);
23270
+ const cellValueNumber = dom$e.ketchup.math.numberifySafe(cell.value);
23112
23271
  const cellValue = getCellValueForDisplay(column, cell);
23113
23272
  if (cellValueNumber < 0) {
23114
23273
  classObj[FCellClasses.TEXT_DANGER] = true;
@@ -23168,7 +23327,7 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
23168
23327
  case FCellTypes.COLOR_PICKER:
23169
23328
  return (h("kup-color-picker", Object.assign({ key: column.name + props.row.id }, subcomponentProps, { class: isFullWidth(props) ? 'kup-full-width' : '', disabled: true })));
23170
23329
  case FCellTypes.GAUGE:
23171
- return (h("kup-gauge", Object.assign({ key: column.name + props.row.id, value: stringToNumber(cell.value), "width-component": "280px" }, subcomponentProps)));
23330
+ return (h("kup-gauge", Object.assign({ key: column.name + props.row.id, value: dom$e.ketchup.math.numberifySafe(cell.value), "width-component": "280px" }, subcomponentProps)));
23172
23331
  case FCellTypes.KNOB:
23173
23332
  case FCellTypes.PROGRESS_BAR:
23174
23333
  return (h("kup-progress-bar", Object.assign({ key: column.name + props.row.id }, subcomponentProps)));
@@ -23253,7 +23412,7 @@ function getValueFromEventTaget(e, cellType) {
23253
23412
  ? e.target.value
23254
23413
  : e.detail.value;
23255
23414
  if (cellType === FCellTypes.NUMBER && isInputEvent) {
23256
- value = formattedStringToUnformattedStringNumber(value, '');
23415
+ value = dom$e.ketchup.math.formattedStringToNumberString(value, '');
23257
23416
  }
23258
23417
  return value;
23259
23418
  }
@@ -23266,7 +23425,7 @@ function isFullWidth(props) {
23266
23425
  return fullWidthFieldsComps.includes((_a = props.component) === null || _a === void 0 ? void 0 : _a.rootElement.tagName);
23267
23426
  }
23268
23427
 
23269
- const dom$c = document.documentElement;
23428
+ const dom$d = document.documentElement;
23270
23429
  /**
23271
23430
  * 1st box card layout, it can be used as a key-value grid list.
23272
23431
  * @param {KupCard} component - Card component.
@@ -23361,8 +23520,8 @@ function create4$4(component) {
23361
23520
  let value = null;
23362
23521
  for (let index = 0; index < cells.length; index++) {
23363
23522
  const cell = cells[index];
23364
- const isImage = dom$c.ketchup.objects.isImage(cell.obj) ||
23365
- dom$c.ketchup.objects.isIcon(cell.obj) ||
23523
+ const isImage = dom$d.ketchup.objects.isImage(cell.obj) ||
23524
+ dom$d.ketchup.objects.isIcon(cell.obj) ||
23366
23525
  ((_a = cell.shape) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === FCellShapes.IMAGE;
23367
23526
  if (!image && isImage) {
23368
23527
  image = index;
@@ -23413,8 +23572,8 @@ function create5$4(component) {
23413
23572
  for (let index = 0; index < cells.length; index++) {
23414
23573
  const cell = cells[index];
23415
23574
  const column = component.data.columns[index];
23416
- const isImage = dom$c.ketchup.objects.isImage(cell.obj) ||
23417
- dom$c.ketchup.objects.isIcon(cell.obj) ||
23575
+ const isImage = dom$d.ketchup.objects.isImage(cell.obj) ||
23576
+ dom$d.ketchup.objects.isIcon(cell.obj) ||
23418
23577
  ((_a = cell.shape) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === FCellShapes.IMAGE;
23419
23578
  if (!imageProps && isImage) {
23420
23579
  imageProps = {
@@ -23466,8 +23625,8 @@ function create6$4(component) {
23466
23625
  for (let index = 0; index < cells.length; index++) {
23467
23626
  const cell = cells[index];
23468
23627
  const column = component.data.columns[index];
23469
- const isImage = dom$c.ketchup.objects.isImage(cell.obj) ||
23470
- dom$c.ketchup.objects.isIcon(cell.obj) ||
23628
+ const isImage = dom$d.ketchup.objects.isImage(cell.obj) ||
23629
+ dom$d.ketchup.objects.isIcon(cell.obj) ||
23471
23630
  ((_a = cell.shape) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === FCellShapes.IMAGE;
23472
23631
  if (!image && isImage) {
23473
23632
  image = index;
@@ -23555,7 +23714,7 @@ var SourceEvent;
23555
23714
  SourceEvent["YEAR"] = "year";
23556
23715
  })(SourceEvent || (SourceEvent = {}));
23557
23716
 
23558
- const dom$b = document.documentElement;
23717
+ const dom$c = document.documentElement;
23559
23718
  function prepareCalendar(component) {
23560
23719
  const el = component.rootElement;
23561
23720
  if (!el.kupData)
@@ -23580,7 +23739,7 @@ function prepareCalendar(component) {
23580
23739
  }
23581
23740
  if (!el.kupData.value)
23582
23741
  setValue$2(component, new Date());
23583
- const months = getMonthsAsStringByLocale();
23742
+ const months = dom$c.ketchup.dates.getMonthsAsString();
23584
23743
  const curYear = getYear(component);
23585
23744
  const curMonth = getMonth(component);
23586
23745
  const yearRange = getInitEndYear(curYear);
@@ -23707,7 +23866,7 @@ function createCalendar(component) {
23707
23866
  }
23708
23867
  }
23709
23868
  function createDaysCalendar(component) {
23710
- const days = getDaysOfWeekAsStringByLocale(getFirstDayIndex(component));
23869
+ const days = dom$c.ketchup.dates.getDaysOfWeekAsString(getFirstDayIndex(component));
23711
23870
  const selectedDate = getValue$1(component);
23712
23871
  const selectedDay = getDay(component);
23713
23872
  const selectedMonth = getMonth(component);
@@ -23773,7 +23932,7 @@ function createDaysCalendar(component) {
23773
23932
  h("tbody", null, tbody)));
23774
23933
  }
23775
23934
  function createMonthsCalendar(component) {
23776
- const months = getMonthsAsStringByLocale(DateTimeFormatOptionsMonth.SHORT);
23935
+ const months = dom$c.ketchup.dates.getMonthsAsString(KupDateTimeFormatOptionsMonth.SHORT);
23777
23936
  let selectedDay = getDay(component);
23778
23937
  const selectedMonth = getMonth(component);
23779
23938
  const selectedYear = getYear(component);
@@ -23848,62 +24007,6 @@ function createYearsCalendar(component) {
23848
24007
  return (h("table", { class: "calendar" },
23849
24008
  h("tbody", null, tbody)));
23850
24009
  }
23851
- function getDaysOfWeekAsStringByLocale(firstDayIndex) {
23852
- const thisWeekDays = thisWeek(firstDayIndex);
23853
- const monday = thisWeekDays.startDate;
23854
- const days = [];
23855
- for (var i = 0; i < 7; i++) {
23856
- var date = new Date(monday.toISOString());
23857
- date.setDate(date.getDate() + i);
23858
- days[i] = getDayAsStringByLocale(date);
23859
- }
23860
- return days;
23861
- }
23862
- function thisWeek(firstDayIndex) {
23863
- const firstDay = firstDayThisWeek(firstDayIndex);
23864
- return {
23865
- startDate: firstDay,
23866
- endDate: offsetDate(firstDay, 6),
23867
- };
23868
- }
23869
- function firstDayThisWeek(firstDayIndex) {
23870
- const d = new Date();
23871
- const day = d.getDay();
23872
- // dayIndex0
23873
- d.setDate(d.getDate() - day);
23874
- // dayIndexX
23875
- d.setDate(d.getDate() + firstDayIndex);
23876
- return d;
23877
- }
23878
- const offsetDate = (base, count) => {
23879
- const date = new Date(base);
23880
- date.setDate(base.getDate() + count);
23881
- return date;
23882
- };
23883
- function getDayAsStringByLocale(date) {
23884
- if (date == null) {
23885
- return '';
23886
- }
23887
- const options = {
23888
- weekday: 'narrow',
23889
- /** weekday: 'narrow' 'short' 'long' */
23890
- };
23891
- const dateTimeFormat = new Intl.DateTimeFormat(dom$b.ketchup.dates.getLocale(), options);
23892
- return dateTimeFormat.format(date);
23893
- }
23894
- function fillString(stringIn, stringForFill, finalLen, addBefore) {
23895
- const initSize = stringIn.length;
23896
- let stringOut = '';
23897
- for (let i = initSize; i < finalLen; i += stringForFill.length) {
23898
- stringOut += stringForFill;
23899
- }
23900
- if (addBefore) {
23901
- return stringOut + stringIn;
23902
- }
23903
- else {
23904
- return stringIn + stringOut;
23905
- }
23906
- }
23907
24010
  function prevPage(component) {
23908
24011
  let mm = getMonth(component);
23909
24012
  let yy = getYear(component);
@@ -23980,7 +24083,7 @@ function refresh(component) {
23980
24083
  }
23981
24084
  function onCalendarMonthYearItemClick(component, value) {
23982
24085
  let d;
23983
- if (dom$b.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
24086
+ if (dom$c.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
23984
24087
  d = new Date(value);
23985
24088
  }
23986
24089
  else {
@@ -24002,7 +24105,7 @@ function onCalendarMonthYearItemClick(component, value) {
24002
24105
  }
24003
24106
  function onCalendarItemClick(component, value) {
24004
24107
  let d;
24005
- if (dom$b.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
24108
+ if (dom$c.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
24006
24109
  d = new Date(value);
24007
24110
  }
24008
24111
  else {
@@ -24013,7 +24116,7 @@ function onCalendarItemClick(component, value) {
24013
24116
  refresh(component);
24014
24117
  }
24015
24118
 
24016
- const dom$a = document.documentElement;
24119
+ const dom$b = document.documentElement;
24017
24120
  function prepareClock(component) {
24018
24121
  const el = component.rootElement;
24019
24122
  el.kupData = {};
@@ -24128,7 +24231,7 @@ function onKupBlur(component) {
24128
24231
  function createClock(component) {
24129
24232
  let selectedTime;
24130
24233
  if (getValue(component)) {
24131
- selectedTime = dom$a.ketchup.dates.toDate(getValue(component), isManageSeconds(component)
24234
+ selectedTime = dom$b.ketchup.dates.toDate(getValue(component), isManageSeconds(component)
24132
24235
  ? KupDatesFormats.ISO_TIME
24133
24236
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS);
24134
24237
  }
@@ -24330,7 +24433,7 @@ function setClockTime(e, component) {
24330
24433
  e.target.classList.add('selected');
24331
24434
  }
24332
24435
 
24333
- const dom$9 = document.documentElement;
24436
+ const dom$a = document.documentElement;
24334
24437
  const premadeFormulas = [
24335
24438
  KupLanguageTotals.AVERAGE,
24336
24439
  KupLanguageTotals.DIFFERENCE,
@@ -24345,7 +24448,7 @@ function prepareColumnDropMenu(component) {
24345
24448
  const column = options.data.columns[index];
24346
24449
  if (column.visible !== false &&
24347
24450
  column.obj &&
24348
- dom$9.ketchup.objects.isNumber(column.obj)) {
24451
+ dom$a.ketchup.objects.isNumber(column.obj)) {
24349
24452
  chipData.push({
24350
24453
  obj: column.obj,
24351
24454
  value: column.name,
@@ -24361,7 +24464,7 @@ function prepareColumnDropMenu(component) {
24361
24464
  if (options.enableFormula) {
24362
24465
  combobox = prepareCombobox(options, numericalColumnsExist);
24363
24466
  if (numericalColumnsExist) {
24364
- button = (h("kup-button", { "onKup-button-click": () => applyFormula(component), label: dom$9.ketchup.language.translate(KupLanguageTotals.CALCULATE), styling: FButtonStyling.OUTLINED }));
24467
+ button = (h("kup-button", { "onKup-button-click": () => applyFormula(component), label: dom$a.ketchup.language.translate(KupLanguageTotals.CALCULATE), styling: FButtonStyling.OUTLINED }));
24365
24468
  chipSet = (h("div", { class: "sub-chip" },
24366
24469
  h("kup-chip", { data: chipData, "onKup-chip-click": (e) => typeColumn(e, component) })));
24367
24470
  }
@@ -24374,35 +24477,35 @@ function prepareList(options) {
24374
24477
  listData.push({
24375
24478
  icon: 'library_add',
24376
24479
  id: KupLanguageGeneric.MERGE,
24377
- value: dom$9.ketchup.language.translate(KupLanguageGeneric.MERGE),
24480
+ value: dom$a.ketchup.language.translate(KupLanguageGeneric.MERGE),
24378
24481
  });
24379
24482
  }
24380
24483
  if (options.enableMove) {
24381
24484
  listData.push({
24382
24485
  icon: 'swap_horiz',
24383
24486
  id: KupLanguageGeneric.MOVE,
24384
- value: dom$9.ketchup.language.translate(KupLanguageGeneric.MOVE),
24487
+ value: dom$a.ketchup.language.translate(KupLanguageGeneric.MOVE),
24385
24488
  });
24386
24489
  }
24387
24490
  return listData.length > 0 ? (h("kup-list", { data: listData, showIcons: true, "onkup-list-click": (e) => listClick(e, options) })) : null;
24388
24491
  }
24389
24492
  function prepareCombobox(options, numericalColumnsExist) {
24390
24493
  const comboListData = [];
24391
- const numeric = dom$9.ketchup.objects.isNumber(options.receivingColumn.obj) &&
24392
- dom$9.ketchup.objects.isNumber(options.starterColumn.obj);
24494
+ const numeric = dom$a.ketchup.objects.isNumber(options.receivingColumn.obj) &&
24495
+ dom$a.ketchup.objects.isNumber(options.starterColumn.obj);
24393
24496
  if (numeric) {
24394
24497
  comboListData.push({
24395
24498
  id: KupLanguageTotals.AVERAGE,
24396
- value: dom$9.ketchup.language.translate(KupLanguageTotals.AVERAGE),
24499
+ value: dom$a.ketchup.language.translate(KupLanguageTotals.AVERAGE),
24397
24500
  }, {
24398
24501
  id: KupLanguageTotals.DIFFERENCE,
24399
- value: dom$9.ketchup.language.translate(KupLanguageTotals.DIFFERENCE),
24502
+ value: dom$a.ketchup.language.translate(KupLanguageTotals.DIFFERENCE),
24400
24503
  }, {
24401
24504
  id: KupLanguageTotals.PRODUCT,
24402
- value: dom$9.ketchup.language.translate(KupLanguageTotals.PRODUCT),
24505
+ value: dom$a.ketchup.language.translate(KupLanguageTotals.PRODUCT),
24403
24506
  }, {
24404
24507
  id: KupLanguageTotals.SUM,
24405
- value: dom$9.ketchup.language.translate(KupLanguageTotals.SUM),
24508
+ value: dom$a.ketchup.language.translate(KupLanguageTotals.SUM),
24406
24509
  }, {
24407
24510
  id: `([${options.starterColumn.name}]/[${options.receivingColumn.name}])*100`,
24408
24511
  value: `[${options.starterColumn.name}] / [${options.receivingColumn.name}] * 100`,
@@ -24414,7 +24517,7 @@ function prepareCombobox(options, numericalColumnsExist) {
24414
24517
  else {
24415
24518
  comboListData.push({
24416
24519
  id: KupLanguageColumn.NO_FORMULA,
24417
- value: dom$9.ketchup.language.translate(KupLanguageColumn.NO_FORMULA),
24520
+ value: dom$a.ketchup.language.translate(KupLanguageColumn.NO_FORMULA),
24418
24521
  });
24419
24522
  }
24420
24523
  const comboData = {
@@ -24424,11 +24527,11 @@ function prepareCombobox(options, numericalColumnsExist) {
24424
24527
  },
24425
24528
  'kup-text-field': {
24426
24529
  helper: !numericalColumnsExist
24427
- ? dom$9.ketchup.language.translate(KupLanguageColumn.NON_NUMERICAL_IN_TABLE)
24530
+ ? dom$a.ketchup.language.translate(KupLanguageColumn.NON_NUMERICAL_IN_TABLE)
24428
24531
  : numeric
24429
24532
  ? `i.e.: [${options.receivingColumn.name}] - [${options.starterColumn.name}] + 1`
24430
- : dom$9.ketchup.language.translate(KupLanguageColumn.NON_NUMERICAL),
24431
- label: dom$9.ketchup.language.translate(KupLanguageTotals.FORMULA),
24533
+ : dom$a.ketchup.language.translate(KupLanguageColumn.NON_NUMERICAL),
24534
+ label: dom$a.ketchup.language.translate(KupLanguageTotals.FORMULA),
24432
24535
  outlined: true,
24433
24536
  },
24434
24537
  };
@@ -24466,7 +24569,7 @@ async function applyFormula(component) {
24466
24569
  if (combobox) {
24467
24570
  const value = (await combobox.getValue());
24468
24571
  if (premadeFormulas.includes(value)) {
24469
- dom$9.ketchup.data.column.new(options.data, KupDataNewColumnTypes.MATH, {
24572
+ dom$a.ketchup.data.column.new(options.data, KupDataNewColumnTypes.MATH, {
24470
24573
  columns: [
24471
24574
  options.receivingColumn.name,
24472
24575
  options.starterColumn.name,
@@ -24478,7 +24581,7 @@ async function applyFormula(component) {
24478
24581
  }
24479
24582
  }
24480
24583
  else {
24481
- const result = dom$9.ketchup.data.column.new(options.data, KupDataNewColumnTypes.MATH, {
24584
+ const result = dom$a.ketchup.data.column.new(options.data, KupDataNewColumnTypes.MATH, {
24482
24585
  operation: value,
24483
24586
  });
24484
24587
  if (typeof result === 'string' || result instanceof String) {
@@ -24493,18 +24596,18 @@ async function applyFormula(component) {
24493
24596
  }
24494
24597
  }
24495
24598
 
24496
- const dom$8 = document.documentElement;
24599
+ const dom$9 = document.documentElement;
24497
24600
  function prepareMessageBox(component) {
24498
24601
  const options = component.data.options;
24499
24602
  const buttonsExist = !!(options.cancelCb || options.confirmCb);
24500
24603
  return (h("div", { class: "message-box" },
24501
24604
  options.text ? h("div", { class: "text" }, options.text) : null,
24502
24605
  buttonsExist ? (h("div", { class: "button-wrapper" },
24503
- options.cancelCb ? (h(FButton, { icon: "clear", label: dom$8.ketchup.language.translate(KupLanguageGeneric.ABORT), onClick: options.cancelCb, styling: FButtonStyling.FLAT })) : null,
24504
- options.confirmCb ? (h(FButton, { icon: "check", label: dom$8.ketchup.language.translate(KupLanguageGeneric.CONFIRM), onClick: options.confirmCb })) : null)) : null));
24606
+ options.cancelCb ? (h(FButton, { icon: "clear", label: dom$9.ketchup.language.translate(KupLanguageGeneric.ABORT), onClick: options.cancelCb, styling: FButtonStyling.FLAT })) : null,
24607
+ options.confirmCb ? (h(FButton, { icon: "check", label: dom$9.ketchup.language.translate(KupLanguageGeneric.CONFIRM), onClick: options.confirmCb })) : null)) : null));
24505
24608
  }
24506
24609
 
24507
- const dom$7 = document.documentElement;
24610
+ const dom$8 = document.documentElement;
24508
24611
  function prepareNumeric(component) {
24509
24612
  const el = component.rootElement;
24510
24613
  if (!el.kupData)
@@ -24526,7 +24629,7 @@ function prepareNumeric(component) {
24526
24629
  el.kupData.value = obj.k;
24527
24630
  else
24528
24631
  el.kupData.value = options.initialValue.toString();
24529
- el.kupData.localeValue = dom$7.ketchup.math.numbers.toLocaleString(el.kupData.value);
24632
+ el.kupData.localeValue = dom$8.ketchup.math.numbers.toLocaleString(el.kupData.value);
24530
24633
  }
24531
24634
  options.resetStatus = false;
24532
24635
  }
@@ -24601,7 +24704,7 @@ function setSign(component) {
24601
24704
  return;
24602
24705
  strVal = '-' + strVal;
24603
24706
  el.kupData.value = strVal;
24604
- el.kupData.localeValue = dom$7.ketchup.math.numbers.toLocaleString(strVal);
24707
+ el.kupData.localeValue = dom$8.ketchup.math.numbers.toLocaleString(strVal);
24605
24708
  component.refresh();
24606
24709
  }
24607
24710
  function setValue(component, value) {
@@ -24638,7 +24741,7 @@ function setValue(component, value) {
24638
24741
  return;
24639
24742
  strVal += value;
24640
24743
  el.kupData.value = strVal;
24641
- el.kupData.localeValue = dom$7.ketchup.math.numbers.toLocaleString(strVal);
24744
+ el.kupData.localeValue = dom$8.ketchup.math.numbers.toLocaleString(strVal);
24642
24745
  component.refresh();
24643
24746
  }
24644
24747
  function clearValue(component) {
@@ -24648,7 +24751,7 @@ function clearValue(component) {
24648
24751
  component.refresh();
24649
24752
  }
24650
24753
  function getDecimalChar() {
24651
- return (0.1).toLocaleString(dom$7.ketchup.math.locale).substring(1, 2);
24754
+ return (0.1).toLocaleString(dom$8.ketchup.math.locale).substring(1, 2);
24652
24755
  }
24653
24756
  function saveValue(component) {
24654
24757
  const el = component.rootElement;
@@ -25017,7 +25120,7 @@ const collapsibleLayouts = /*#__PURE__*/Object.freeze({
25017
25120
  create2: create2$4
25018
25121
  });
25019
25122
 
25020
- const dom$6 = document.documentElement;
25123
+ const dom$7 = document.documentElement;
25021
25124
  /**
25022
25125
  * 1st dialog card layout, used to display information in string format.
25023
25126
  * @param {KupCard} component - Card component.
@@ -25111,8 +25214,8 @@ function create4$2(component) {
25111
25214
  return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` },
25112
25215
  textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''),
25113
25216
  datatableArray[0] && buttonArray[0] && buttonArray[1] ? (h("div", { class: "section-1" },
25114
- h("kup-button", Object.assign({}, buttonArray[0], { id: KupCardIds.PREVIOUS_ROW, "onkup-button-click": () => prevButton(component), title: dom$6.ketchup.language.translate(KupLanguageRow.PREVIOUS) })),
25115
- h("kup-button", Object.assign({}, buttonArray[1], { id: KupCardIds.NEXT_ROW, "onkup-button-click": () => nextButton(component), title: dom$6.ketchup.language.translate(KupLanguageRow.NEXT) })))) : null,
25217
+ h("kup-button", Object.assign({}, buttonArray[0], { id: KupCardIds.PREVIOUS_ROW, "onkup-button-click": () => prevButton(component), title: dom$7.ketchup.language.translate(KupLanguageRow.PREVIOUS) })),
25218
+ h("kup-button", Object.assign({}, buttonArray[1], { id: KupCardIds.NEXT_ROW, "onkup-button-click": () => nextButton(component), title: dom$7.ketchup.language.translate(KupLanguageRow.NEXT) })))) : null,
25116
25219
  datatableArray[0] ? (h("div", { class: "section-2" },
25117
25220
  h("kup-data-table", Object.assign({ id: "datatable1" }, datatableArray[0])))) : null));
25118
25221
  }
@@ -25625,7 +25728,7 @@ const scalableLayouts = /*#__PURE__*/Object.freeze({
25625
25728
  create9: create9$1
25626
25729
  });
25627
25730
 
25628
- const dom$5 = document.documentElement;
25731
+ const dom$6 = document.documentElement;
25629
25732
  /**
25630
25733
  * 1st standard card layout, inspired by Material Design.
25631
25734
  * @param {KupCard} component - Card component.
@@ -26375,7 +26478,7 @@ function create15(component) {
26375
26478
  const button = genericButtons[index];
26376
26479
  props.data['kup-list'].data.push(Object.assign(Object.assign({}, button), { value: button.title }));
26377
26480
  }
26378
- return (h("kup-dropdown-button", Object.assign({}, props, { title: dom$5.ketchup.language.translate(KupLanguageGeneric.OPTIONS) })));
26481
+ return (h("kup-dropdown-button", Object.assign({}, props, { title: dom$6.ketchup.language.translate(KupLanguageGeneric.OPTIONS) })));
26379
26482
  };
26380
26483
  return (h("div", { class: `standard-layout-${component.layoutNumber}` },
26381
26484
  h("div", { class: "section-1" },
@@ -26403,7 +26506,7 @@ function create15(component) {
26403
26506
  genericButtons.length > 0 ? (h("div", { class: "section-3" },
26404
26507
  compList(genericButtons.slice(0, 5), 'button'),
26405
26508
  genericButtons.length > 5 ? createDropdown() : null,
26406
- treeArray[0] ? (h("kup-button", { title: dom$5.ketchup.language.translate(KupLanguageGeneric.SHOW_ROW_OPTIONS), id: "view-selector", icon: "menu" })) : null)) : null));
26509
+ treeArray[0] ? (h("kup-button", { title: dom$6.ketchup.language.translate(KupLanguageGeneric.SHOW_ROW_OPTIONS), id: "view-selector", icon: "menu" })) : null)) : null));
26407
26510
  }
26408
26511
 
26409
26512
  const standardLayouts = /*#__PURE__*/Object.freeze({
@@ -28022,11 +28125,11 @@ var KupTreeExpansionMode;
28022
28125
  KupTreeExpansionMode["NODE"] = "node";
28023
28126
  })(KupTreeExpansionMode || (KupTreeExpansionMode = {}));
28024
28127
 
28025
- const dom$4 = document.documentElement;
28026
- const kupObjects = dom$4.ketchup
28027
- ? dom$4.ketchup.objects
28128
+ const dom$5 = document.documentElement;
28129
+ const kupObjects = dom$5.ketchup
28130
+ ? dom$5.ketchup.objects
28028
28131
  : new KupObjects();
28029
- const kupData = dom$4.ketchup ? dom$4.ketchup.data : new KupData();
28132
+ const kupData = dom$5.ketchup ? dom$5.ketchup.data : new KupData();
28030
28133
  /**
28031
28134
  * Filtering algorithms related to data-table rows.
28032
28135
  * @module FiltersRows
@@ -28255,7 +28358,7 @@ class FiltersRows extends Filters {
28255
28358
  }
28256
28359
  }
28257
28360
 
28258
- const dom$3 = document.documentElement;
28361
+ const dom$4 = document.documentElement;
28259
28362
  function sortRows(rows = [], sort = []) {
28260
28363
  if (!rows || rows.length === 0) {
28261
28364
  return [];
@@ -28486,10 +28589,10 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28486
28589
  return;
28487
28590
  }
28488
28591
  keys.forEach((key) => {
28489
- const currentTotalValue = dom$3.ketchup.math.numberify(groupRow.group.totals[key] || 0);
28592
+ const currentTotalValue = dom$4.ketchup.math.numberify(groupRow.group.totals[key] || 0);
28490
28593
  const cell = addedRow.cells[key];
28491
28594
  if (cell) {
28492
- let _isNumber = dom$3.ketchup.objects.isNumber(cell.obj);
28595
+ let _isNumber = dom$4.ketchup.objects.isNumber(cell.obj);
28493
28596
  const totalMode = totals[key];
28494
28597
  switch (totalMode) {
28495
28598
  case TotalMode.COUNT:
@@ -28505,7 +28608,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28505
28608
  case TotalMode.DISTINCT:
28506
28609
  let cellValue;
28507
28610
  if (_isNumber) {
28508
- cellValue = dom$3.ketchup.math.numberify(stringToNumber(cell.value));
28611
+ cellValue = dom$4.ketchup.math.numberify(dom$4.ketchup.math.numberifySafe(cell.value));
28509
28612
  }
28510
28613
  else {
28511
28614
  cellValue = cell.value;
@@ -28557,13 +28660,13 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28557
28660
  case TotalMode.SUM:
28558
28661
  case TotalMode.AVERAGE:
28559
28662
  if (_isNumber) {
28560
- const cellValue = dom$3.ketchup.math.numberify(stringToNumber(cell.value));
28663
+ const cellValue = dom$4.ketchup.math.numberify(dom$4.ketchup.math.numberifySafe(cell.value));
28561
28664
  groupRow.group.totals[key] =
28562
28665
  cellValue + currentTotalValue;
28563
28666
  // updating parents
28564
28667
  let parent = groupRow.group.parent;
28565
28668
  while (parent != null) {
28566
- const currentParentSum = dom$3.ketchup.math.numberify(parent.group.totals[key] || 0);
28669
+ const currentParentSum = dom$4.ketchup.math.numberify(parent.group.totals[key] || 0);
28567
28670
  parent.group.totals[key] =
28568
28671
  cellValue + currentParentSum;
28569
28672
  parent = parent.group.parent;
@@ -28574,7 +28677,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28574
28677
  case TotalMode.MIN:
28575
28678
  if (_isNumber) {
28576
28679
  const currentTotalValue = groupRow.group.totals[key];
28577
- const cellValue = dom$3.ketchup.math.numberify(stringToNumber(cell.value));
28680
+ const cellValue = dom$4.ketchup.math.numberify(dom$4.ketchup.math.numberifySafe(cell.value));
28578
28681
  if (currentTotalValue) {
28579
28682
  groupRow.group.totals[key] = Math.min(currentTotalValue, cellValue);
28580
28683
  }
@@ -28596,19 +28699,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28596
28699
  parent = parent.group.parent;
28597
28700
  }
28598
28701
  }
28599
- else if (dom$3.ketchup.objects.isDate(cell.obj)) {
28702
+ else if (dom$4.ketchup.objects.isDate(cell.obj)) {
28600
28703
  const momentValue = cell.obj
28601
- ? dom$3.ketchup.objects.parseDate(cell.obj)
28602
- : dom$3.ketchup.dates.toDayjs(cell.value);
28603
- if (dom$3.ketchup.dates.isValid(momentValue)) {
28604
- const cellValue = dom$3.ketchup.dates.toDate(momentValue);
28704
+ ? dom$4.ketchup.objects.parseDate(cell.obj)
28705
+ : dom$4.ketchup.dates.toDayjs(cell.value);
28706
+ if (dom$4.ketchup.dates.isValid(momentValue)) {
28707
+ const cellValue = dom$4.ketchup.dates.toDate(momentValue);
28605
28708
  const currentTotalValue = groupRow.group.totals[key];
28606
28709
  if (currentTotalValue) {
28607
28710
  let moments = [];
28608
28711
  moments.push(cellValue);
28609
- moments.push(dom$3.ketchup.dates.format(currentTotalValue));
28712
+ moments.push(dom$4.ketchup.dates.format(currentTotalValue));
28610
28713
  groupRow.group.totals[key] =
28611
- dom$3.ketchup.dates.format(dom$3.ketchup.dates.min(moments));
28714
+ dom$4.ketchup.dates.format(dom$4.ketchup.dates.min(moments));
28612
28715
  }
28613
28716
  else {
28614
28717
  groupRow.group.totals[key] = cellValue;
@@ -28620,9 +28723,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28620
28723
  if (currentParentMin) {
28621
28724
  let moments = [];
28622
28725
  moments.push(cellValue);
28623
- moments.push(dom$3.ketchup.dates.format(currentParentMin));
28726
+ moments.push(dom$4.ketchup.dates.format(currentParentMin));
28624
28727
  parent.group.totals[key] =
28625
- dom$3.ketchup.dates.format(dom$3.ketchup.dates.min(moments));
28728
+ dom$4.ketchup.dates.format(dom$4.ketchup.dates.min(moments));
28626
28729
  }
28627
28730
  else {
28628
28731
  // first round
@@ -28637,7 +28740,7 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28637
28740
  case TotalMode.MAX:
28638
28741
  if (_isNumber) {
28639
28742
  const currentTotalValue = groupRow.group.totals[key];
28640
- const cellValue = dom$3.ketchup.math.numberify(stringToNumber(cell.value));
28743
+ const cellValue = dom$4.ketchup.math.numberify(dom$4.ketchup.math.numberifySafe(cell.value));
28641
28744
  if (currentTotalValue) {
28642
28745
  groupRow.group.totals[key] = Math.max(currentTotalValue, cellValue);
28643
28746
  }
@@ -28659,19 +28762,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28659
28762
  parent = parent.group.parent;
28660
28763
  }
28661
28764
  }
28662
- else if (dom$3.ketchup.objects.isDate(cell.obj)) {
28765
+ else if (dom$4.ketchup.objects.isDate(cell.obj)) {
28663
28766
  const momentValue = cell.obj
28664
- ? dom$3.ketchup.objects.parseDate(cell.obj)
28665
- : dom$3.ketchup.dates.toDayjs(cell.value);
28666
- if (dom$3.ketchup.dates.isValid(momentValue)) {
28667
- const cellValue = dom$3.ketchup.dates.toDate(momentValue);
28767
+ ? dom$4.ketchup.objects.parseDate(cell.obj)
28768
+ : dom$4.ketchup.dates.toDayjs(cell.value);
28769
+ if (dom$4.ketchup.dates.isValid(momentValue)) {
28770
+ const cellValue = dom$4.ketchup.dates.toDate(momentValue);
28668
28771
  const currentTotalValue = groupRow.group.totals[key];
28669
28772
  if (currentTotalValue) {
28670
28773
  let moments = [];
28671
28774
  moments.push(cellValue);
28672
- moments.push(dom$3.ketchup.dates.format(currentTotalValue));
28775
+ moments.push(dom$4.ketchup.dates.format(currentTotalValue));
28673
28776
  groupRow.group.totals[key] =
28674
- dom$3.ketchup.dates.format(dom$3.ketchup.dates.max(moments));
28777
+ dom$4.ketchup.dates.format(dom$4.ketchup.dates.max(moments));
28675
28778
  }
28676
28779
  else {
28677
28780
  groupRow.group.totals[key] = cellValue;
@@ -28683,9 +28786,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
28683
28786
  if (currentParentMin) {
28684
28787
  let moments = [];
28685
28788
  moments.push(cellValue);
28686
- moments.push(dom$3.ketchup.dates.format(currentParentMin));
28789
+ moments.push(dom$4.ketchup.dates.format(currentParentMin));
28687
28790
  parent.group.totals[key] =
28688
- dom$3.ketchup.dates.format(dom$3.ketchup.dates.max(moments));
28791
+ dom$4.ketchup.dates.format(dom$4.ketchup.dates.max(moments));
28689
28792
  }
28690
28793
  else {
28691
28794
  // first round
@@ -28779,12 +28882,12 @@ function adjustGroupAverageOrFormula(row, type, toAdjustKeys, totals) {
28779
28882
  toAdjustKeys.forEach((key) => {
28780
28883
  if (type == TotalMode.AVERAGE) {
28781
28884
  row.group.totals[key] =
28782
- dom$3.ketchup.math.numberify(row.group.totals[key]) /
28885
+ dom$4.ketchup.math.numberify(row.group.totals[key]) /
28783
28886
  numberOfLeaf;
28784
28887
  }
28785
28888
  if (type == TotalMode.MATH) {
28786
28889
  let formula = totals[key].substring(TotalMode.MATH.length);
28787
- row.group.totals[key] = dom$3.ketchup.math.formulas.custom(formula, row.group.totals);
28890
+ row.group.totals[key] = dom$4.ketchup.math.formulas.custom(formula, row.group.totals);
28788
28891
  }
28789
28892
  });
28790
28893
  return numberOfLeaf;
@@ -28814,8 +28917,8 @@ function normalizeRows(columns, rows) {
28814
28917
  }
28815
28918
  }
28816
28919
  function calcTotals(rows = [], totals = {}) {
28817
- if (dom$3.ketchup.objects.isEmptyJsObject(rows) ||
28818
- dom$3.ketchup.objects.isEmptyJsObject(totals)) {
28920
+ if (dom$4.ketchup.objects.isEmptyJsObject(rows) ||
28921
+ dom$4.ketchup.objects.isEmptyJsObject(totals)) {
28819
28922
  return {};
28820
28923
  }
28821
28924
  const keys = Object.keys(totals);
@@ -28837,8 +28940,8 @@ function calcTotals(rows = [], totals = {}) {
28837
28940
  if (cell) {
28838
28941
  if (totals[key] === TotalMode.DISTINCT) {
28839
28942
  let cellValue;
28840
- if (dom$3.ketchup.objects.isNumber(cell.obj)) {
28841
- cellValue = dom$3.ketchup.math.numberify(stringToNumber(cell.value));
28943
+ if (dom$4.ketchup.objects.isNumber(cell.obj)) {
28944
+ cellValue = dom$4.ketchup.math.numberify(dom$4.ketchup.math.numberifySafe(cell.value));
28842
28945
  }
28843
28946
  else {
28844
28947
  cellValue = cell.value;
@@ -28854,8 +28957,8 @@ function calcTotals(rows = [], totals = {}) {
28854
28957
  distinctList.push(cellValue);
28855
28958
  }
28856
28959
  }
28857
- else if (dom$3.ketchup.objects.isNumber(cell.obj)) {
28858
- const cellValue = dom$3.ketchup.math.numberify(stringToNumber(cell.value));
28960
+ else if (dom$4.ketchup.objects.isNumber(cell.obj)) {
28961
+ const cellValue = dom$4.ketchup.math.numberify(dom$4.ketchup.math.numberifySafe(cell.value));
28859
28962
  let currentFooterValue = footerRow[key];
28860
28963
  switch (true) {
28861
28964
  // TODO DRY the MIN and MAX functions
@@ -28880,19 +28983,19 @@ function calcTotals(rows = [], totals = {}) {
28880
28983
  currentFooterValue = footerRow[key] || 0;
28881
28984
  footerRow[key] =
28882
28985
  cellValue +
28883
- dom$3.ketchup.math.numberify(currentFooterValue);
28986
+ dom$4.ketchup.math.numberify(currentFooterValue);
28884
28987
  }
28885
28988
  // TODO DRY the MIN and MAX functions
28886
28989
  }
28887
- else if (dom$3.ketchup.objects.isDate(cell.obj)) {
28990
+ else if (dom$4.ketchup.objects.isDate(cell.obj)) {
28888
28991
  if (dateColumns.indexOf(key) == -1) {
28889
28992
  dateColumns.push(key);
28890
28993
  }
28891
- const momentValue = dom$3.ketchup.dates.toDayjs(cell.value);
28892
- if (dom$3.ketchup.dates.isValid(momentValue)) {
28893
- const cellValue = dom$3.ketchup.dates.toDate(momentValue);
28994
+ const momentValue = dom$4.ketchup.dates.toDayjs(cell.value);
28995
+ if (dom$4.ketchup.dates.isValid(momentValue)) {
28996
+ const cellValue = dom$4.ketchup.dates.toDate(momentValue);
28894
28997
  const currentFooterValue = footerRow[key]
28895
- ? dom$3.ketchup.dates.toDate(dom$3.ketchup.dates.toDayjs(footerRow[key]))
28998
+ ? dom$4.ketchup.dates.toDate(dom$4.ketchup.dates.toDayjs(footerRow[key]))
28896
28999
  : null;
28897
29000
  switch (true) {
28898
29001
  case totals[key] === TotalMode.MIN:
@@ -28901,11 +29004,11 @@ function calcTotals(rows = [], totals = {}) {
28901
29004
  moments.push(cellValue);
28902
29005
  moments.push(currentFooterValue);
28903
29006
  footerRow[key] =
28904
- dom$3.ketchup.dates.format(dom$3.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
29007
+ dom$4.ketchup.dates.format(dom$4.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
28905
29008
  }
28906
29009
  else {
28907
29010
  footerRow[key] =
28908
- dom$3.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
29011
+ dom$4.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
28909
29012
  }
28910
29013
  break;
28911
29014
  case totals[key] === TotalMode.MAX:
@@ -28914,11 +29017,11 @@ function calcTotals(rows = [], totals = {}) {
28914
29017
  moments.push(cellValue);
28915
29018
  moments.push(currentFooterValue);
28916
29019
  footerRow[key] =
28917
- dom$3.ketchup.dates.format(dom$3.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
29020
+ dom$4.ketchup.dates.format(dom$4.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
28918
29021
  }
28919
29022
  else {
28920
29023
  footerRow[key] =
28921
- dom$3.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
29024
+ dom$4.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
28922
29025
  }
28923
29026
  break;
28924
29027
  }
@@ -28947,14 +29050,14 @@ function calcTotals(rows = [], totals = {}) {
28947
29050
  footerRow[key] = rows.length;
28948
29051
  break;
28949
29052
  case totals[key].indexOf(TotalMode.MATH) == 0:
28950
- footerRow[key] = dom$3.ketchup.math.formulas.custom(totals[key].substring(TotalMode.MATH.length), footerRow);
29053
+ footerRow[key] = dom$4.ketchup.math.formulas.custom(totals[key].substring(TotalMode.MATH.length), footerRow);
28951
29054
  break;
28952
29055
  }
28953
29056
  if (footerRow[key]) {
28954
29057
  if (dateColumns.indexOf(key) != -1) {
28955
- footerRow[key] = dom$3.ketchup.dates.format(footerRow[key]);
29058
+ footerRow[key] = dom$4.ketchup.dates.format(footerRow[key]);
28956
29059
  }
28957
- else if (isNumber(footerRow[key])) {
29060
+ else if (dom$4.ketchup.math.isNumber(footerRow[key])) {
28958
29061
  footerRow[key] = +footerRow[key].toFixed(2);
28959
29062
  }
28960
29063
  }
@@ -29062,8 +29165,8 @@ class KupDataTableState {
29062
29165
  this.expandGroups = false;
29063
29166
  this.groupLabelDisplay = GroupLabelDisplayMode.BOTH;
29064
29167
  this.density = 'small';
29065
- this.enableExtraColumns = true;
29066
29168
  this.enableSortableColumns = false;
29169
+ this.enableExtraColumns = true;
29067
29170
  this.forceOneLine = false;
29068
29171
  this.globalFilter = false;
29069
29172
  this.globalFilterValue = '';
@@ -29092,7 +29195,7 @@ class KupDataTableState {
29092
29195
  }
29093
29196
  }
29094
29197
 
29095
- const dom$2 = document.documentElement;
29198
+ const dom$3 = document.documentElement;
29096
29199
  /**
29097
29200
  * Definition and events of the column menu card.
29098
29201
  * @module KupColumnMenu
@@ -29117,8 +29220,8 @@ class KupColumnMenu {
29117
29220
  */
29118
29221
  close(card) {
29119
29222
  card.menuVisible = false;
29120
- dom$2.ketchup.removeClickCallback(this.clickCb);
29121
- dom$2.ketchup.dynamicPosition.stop(card);
29223
+ dom$3.ketchup.removeClickCallback(this.clickCb);
29224
+ dom$3.ketchup.dynamicPosition.stop(card);
29122
29225
  }
29123
29226
  /**
29124
29227
  * Function called to reposition the column menu card to the appropriate column.
@@ -29130,11 +29233,11 @@ class KupColumnMenu {
29130
29233
  if (card) {
29131
29234
  const column = card.dataset.column;
29132
29235
  const wrapper = root.querySelector('th[data-column="' + column + '"]');
29133
- if (dom$2.ketchup.dynamicPosition.isRegistered(card)) {
29134
- dom$2.ketchup.dynamicPosition.changeAnchor(card, wrapper);
29236
+ if (dom$3.ketchup.dynamicPosition.isRegistered(card)) {
29237
+ dom$3.ketchup.dynamicPosition.changeAnchor(card, wrapper);
29135
29238
  }
29136
29239
  else {
29137
- dom$2.ketchup.dynamicPosition.register(card, wrapper, 0, KupDynamicPositionPlacement.BOTTOM, true);
29240
+ dom$3.ketchup.dynamicPosition.register(card, wrapper, 0, KupDynamicPositionPlacement.BOTTOM, true);
29138
29241
  }
29139
29242
  if (!this.clickCb) {
29140
29243
  this.clickCb = {
@@ -29144,8 +29247,8 @@ class KupColumnMenu {
29144
29247
  el: card,
29145
29248
  };
29146
29249
  }
29147
- dom$2.ketchup.addClickCallback(this.clickCb, true);
29148
- dom$2.ketchup.dynamicPosition.start(card);
29250
+ dom$3.ketchup.addClickCallback(this.clickCb, true);
29251
+ dom$3.ketchup.dynamicPosition.start(card);
29149
29252
  card.menuVisible = true;
29150
29253
  }
29151
29254
  }
@@ -29195,8 +29298,8 @@ class KupColumnMenu {
29195
29298
  icon: 'book',
29196
29299
  id: KupColumnMenuIds.BUTTON_GROUP,
29197
29300
  title: comp.getGroupByName(column.name) != null
29198
- ? dom$2.ketchup.language.translate(KupLanguageGrouping.DISABLE)
29199
- : dom$2.ketchup.language.translate(KupLanguageGrouping.ENABLE),
29301
+ ? dom$3.ketchup.language.translate(KupLanguageGrouping.DISABLE)
29302
+ : dom$3.ketchup.language.translate(KupLanguageGrouping.ENABLE),
29200
29303
  });
29201
29304
  }
29202
29305
  if (comp.removableColumns) {
@@ -29207,12 +29310,12 @@ class KupColumnMenu {
29207
29310
  },
29208
29311
  icon: 'table-column-remove',
29209
29312
  id: KupColumnMenuIds.BUTTON_REMOVE,
29210
- title: dom$2.ketchup.language.translate(KupLanguageColumn.HIDE),
29313
+ title: dom$3.ketchup.language.translate(KupLanguageColumn.HIDE),
29211
29314
  });
29212
29315
  }
29213
29316
  if (comp.enableExtraColumns &&
29214
- (dom$2.ketchup.objects.canObjHaveExtraColumns(column.obj) ||
29215
- dom$2.ketchup.objects.canObjsHaveExtraColumns(column.objs))) {
29317
+ (dom$3.ketchup.objects.canObjHaveExtraColumns(column.obj) ||
29318
+ dom$3.ketchup.objects.canObjsHaveExtraColumns(column.objs))) {
29216
29319
  props.push({
29217
29320
  className: 'printable',
29218
29321
  'data-storage': {
@@ -29220,14 +29323,14 @@ class KupColumnMenu {
29220
29323
  },
29221
29324
  icon: 'table-column-plus-after',
29222
29325
  id: KupColumnMenuIds.BUTTON_ADD_COLUMNS,
29223
- title: dom$2.ketchup.language.translate(KupLanguageColumn.ADD),
29326
+ title: dom$3.ketchup.language.translate(KupLanguageColumn.ADD),
29224
29327
  });
29225
29328
  props.push({
29226
29329
  className: 'printable',
29227
- label: dom$2.ketchup.language.translate(KupLanguageGeneric.APPLY),
29330
+ label: dom$3.ketchup.language.translate(KupLanguageGeneric.APPLY),
29228
29331
  id: KupColumnMenuIds.BUTTON_APPLY,
29229
29332
  styling: FButtonStyling.OUTLINED,
29230
- title: dom$2.ketchup.language.translate(KupLanguageGeneric.APPLY),
29333
+ title: dom$3.ketchup.language.translate(KupLanguageGeneric.APPLY),
29231
29334
  });
29232
29335
  }
29233
29336
  return props;
@@ -29241,8 +29344,8 @@ class KupColumnMenu {
29241
29344
  prepCheckbox(comp, column) {
29242
29345
  const props = [];
29243
29346
  if (comp.showFilters &&
29244
- (dom$2.ketchup.objects.isStringObject(column.obj) ||
29245
- dom$2.ketchup.objects.isCheckbox(column.obj))) {
29347
+ (dom$3.ketchup.objects.isStringObject(column.obj) ||
29348
+ dom$3.ketchup.objects.isCheckbox(column.obj))) {
29246
29349
  const checkBoxesFilter = this.filtersColumnMenuInstance.getCheckBoxFilterValues(comp.filters, column.name);
29247
29350
  const columnValues = comp.getColumnValues(column);
29248
29351
  if (columnValues.length > 0) {
@@ -29253,17 +29356,17 @@ class KupColumnMenu {
29253
29356
  value: null,
29254
29357
  },
29255
29358
  id: KupColumnMenuIds.CHECKBOX_GLOBAL,
29256
- label: dom$2.ketchup.language.translate(KupLanguageCheckbox.ALL),
29359
+ label: dom$3.ketchup.language.translate(KupLanguageCheckbox.ALL),
29257
29360
  });
29258
29361
  }
29259
29362
  for (let index = 0; index < columnValues.length; index++) {
29260
29363
  let label = getValueForDisplay2(columnValues[index], column);
29261
- if (dom$2.ketchup.objects.isCheckbox(column.obj)) {
29364
+ if (dom$3.ketchup.objects.isCheckbox(column.obj)) {
29262
29365
  if (columnValues[index].value == '1') {
29263
- label = dom$2.ketchup.language.translate(KupLanguageCheckbox.CHECKED);
29366
+ label = dom$3.ketchup.language.translate(KupLanguageCheckbox.CHECKED);
29264
29367
  }
29265
29368
  else {
29266
- label = dom$2.ketchup.language.translate(KupLanguageCheckbox.UNCHECKED);
29369
+ label = dom$3.ketchup.language.translate(KupLanguageCheckbox.UNCHECKED);
29267
29370
  }
29268
29371
  }
29269
29372
  props.push({
@@ -29302,7 +29405,7 @@ class KupColumnMenu {
29302
29405
  }
29303
29406
  }
29304
29407
  catch (error) {
29305
- dom$2.ketchup.debug.logMessage(this, 'Child column not found (' + child.name + ')!' + error, KupDebugCategory.ERROR);
29408
+ dom$3.ketchup.debug.logMessage(this, 'Child column not found (' + child.name + ')!' + error, KupDebugCategory.ERROR);
29306
29409
  }
29307
29410
  chipData.push({
29308
29411
  icon: child.icon ? child.icon : null,
@@ -29330,14 +29433,14 @@ class KupColumnMenu {
29330
29433
  if (!FiltersColumnMenu.isTree(comp)) {
29331
29434
  if (objs &&
29332
29435
  objs.length > 0 &&
29333
- !dom$2.ketchup.objects.isEmptyKupObj(objs[0])) {
29436
+ !dom$3.ketchup.objects.isEmptyKupObj(objs[0])) {
29334
29437
  props.push({
29335
29438
  'data-storage': {
29336
29439
  columnName: column.name,
29337
29440
  },
29338
29441
  checked: column.isKey ? true : false,
29339
29442
  id: KupColumnMenuIds.SWITCH_KEY,
29340
- label: dom$2.ketchup.language.translate(KupLanguageRow.KEY),
29443
+ label: dom$3.ketchup.language.translate(KupLanguageRow.KEY),
29341
29444
  leadingLabel: true,
29342
29445
  });
29343
29446
  }
@@ -29349,7 +29452,7 @@ class KupColumnMenu {
29349
29452
  },
29350
29453
  checked: isGroupActive ? true : false,
29351
29454
  id: KupColumnMenuIds.SWITCH_GROUP,
29352
- label: dom$2.ketchup.language.translate(KupLanguageGrouping.GROUPS),
29455
+ label: dom$3.ketchup.language.translate(KupLanguageGrouping.GROUPS),
29353
29456
  leadingLabel: true,
29354
29457
  });
29355
29458
  }
@@ -29367,16 +29470,16 @@ class KupColumnMenu {
29367
29470
  if (comp.showFilters) {
29368
29471
  data.push({
29369
29472
  id: KupLanguageGeneric.FILTERS,
29370
- value: dom$2.ketchup.language.translate(KupLanguageGeneric.FILTERS),
29473
+ value: dom$3.ketchup.language.translate(KupLanguageGeneric.FILTERS),
29371
29474
  });
29372
29475
  }
29373
29476
  if ((comp.enableExtraColumns &&
29374
- (dom$2.ketchup.objects.canObjHaveExtraColumns(column.obj) ||
29375
- dom$2.ketchup.objects.canObjsHaveExtraColumns(column.objs))) ||
29477
+ (dom$3.ketchup.objects.canObjHaveExtraColumns(column.obj) ||
29478
+ dom$3.ketchup.objects.canObjsHaveExtraColumns(column.objs))) ||
29376
29479
  comp.removableColumns) {
29377
29480
  data.push({
29378
29481
  id: KupLanguageColumn.COLUMNS,
29379
- value: dom$2.ketchup.language.translate(KupLanguageColumn.COLUMNS),
29482
+ value: dom$3.ketchup.language.translate(KupLanguageColumn.COLUMNS),
29380
29483
  });
29381
29484
  }
29382
29485
  if (!FiltersColumnMenu.isTree(comp)) {
@@ -29403,7 +29506,7 @@ class KupColumnMenu {
29403
29506
  if (this.filtersColumnMenuInstance.isColumnFiltrableByInterval(column)) {
29404
29507
  props = props.concat(this.prepIntervalTextfield(comp, column));
29405
29508
  }
29406
- else if (dom$2.ketchup.objects.isStringObject(column.obj)) {
29509
+ else if (dom$3.ketchup.objects.isStringObject(column.obj)) {
29407
29510
  let filterInitialValue = this.filtersColumnMenuInstance.getTextFilterValue(comp.filters, column.name);
29408
29511
  filterInitialValue = getValueForDisplay(filterInitialValue, column.obj, column.decimals);
29409
29512
  props.push({
@@ -29415,20 +29518,20 @@ class KupColumnMenu {
29415
29518
  id: KupColumnMenuIds.TEXTFIELD_FILTER,
29416
29519
  initialValue: filterInitialValue,
29417
29520
  isClearable: true,
29418
- label: dom$2.ketchup.language.translate(KupLanguageSearch.SEARCH),
29521
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.SEARCH),
29419
29522
  trailingIcon: true,
29420
29523
  });
29421
29524
  }
29422
29525
  }
29423
29526
  if (!FiltersColumnMenu.isTree(comp)) {
29424
- if (dom$2.ketchup.objects.isNumber(column.obj) &&
29527
+ if (dom$3.ketchup.objects.isNumber(column.obj) &&
29425
29528
  comp.enableColumnsFormula) {
29426
29529
  props.push({
29427
29530
  fullWidth: true,
29428
29531
  icon: 'functions',
29429
29532
  id: KupColumnMenuIds.TEXTFIELD_FORMULA,
29430
29533
  helper: `i.e.: [${column.name}] * 2`,
29431
- label: dom$2.ketchup.language.translate(KupLanguageTotals.FORMULA),
29534
+ label: dom$3.ketchup.language.translate(KupLanguageTotals.FORMULA),
29432
29535
  trailingIcon: true,
29433
29536
  });
29434
29537
  }
@@ -29446,7 +29549,7 @@ class KupColumnMenu {
29446
29549
  if (!comp.showFilters) {
29447
29550
  return props;
29448
29551
  }
29449
- if (!dom$2.ketchup.objects.isNumber(column.obj)) {
29552
+ if (!dom$3.ketchup.objects.isNumber(column.obj)) {
29450
29553
  return props;
29451
29554
  }
29452
29555
  let interval = this.filtersColumnMenuInstance.getIntervalTextFieldFilterValues(comp.filters, column);
@@ -29463,7 +29566,7 @@ class KupColumnMenu {
29463
29566
  id: KupColumnMenuIds.TEXTFIELD_FROM,
29464
29567
  initialValue: initialValueFrom,
29465
29568
  isClearable: true,
29466
- label: dom$2.ketchup.language.translate(KupLanguageSearch.FROM),
29569
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.FROM),
29467
29570
  icon: 'magnify',
29468
29571
  trailingIcon: true,
29469
29572
  });
@@ -29478,7 +29581,7 @@ class KupColumnMenu {
29478
29581
  id: KupColumnMenuIds.TEXTFIELD_TO,
29479
29582
  initialValue: initialValueTo,
29480
29583
  isClearable: true,
29481
- label: dom$2.ketchup.language.translate(KupLanguageSearch.TO),
29584
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.TO),
29482
29585
  icon: 'magnify',
29483
29586
  trailingIcon: true,
29484
29587
  });
@@ -29495,7 +29598,7 @@ class KupColumnMenu {
29495
29598
  if (!comp.showFilters) {
29496
29599
  return props;
29497
29600
  }
29498
- if (!dom$2.ketchup.objects.isTime(column.obj)) {
29601
+ if (!dom$3.ketchup.objects.isTime(column.obj)) {
29499
29602
  return props;
29500
29603
  }
29501
29604
  let interval = this.filtersColumnMenuInstance.getIntervalTextFieldFilterValues(comp.filters, column);
@@ -29513,11 +29616,11 @@ class KupColumnMenu {
29513
29616
  helperWhenFocused: true,
29514
29617
  id: KupColumnMenuIds.TEXTFIELD_FROM,
29515
29618
  isClearable: true,
29516
- label: dom$2.ketchup.language.translate(KupLanguageSearch.FROM),
29619
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.FROM),
29517
29620
  },
29518
29621
  },
29519
29622
  initialValue: initialValueFrom,
29520
- manageSeconds: dom$2.ketchup.objects.isTimeWithSeconds(column.obj),
29623
+ manageSeconds: dom$3.ketchup.objects.isTimeWithSeconds(column.obj),
29521
29624
  });
29522
29625
  props.push({
29523
29626
  'data-storage': {
@@ -29531,11 +29634,11 @@ class KupColumnMenu {
29531
29634
  helperWhenFocused: true,
29532
29635
  id: KupColumnMenuIds.TEXTFIELD_TO,
29533
29636
  isClearable: true,
29534
- label: dom$2.ketchup.language.translate(KupLanguageSearch.TO),
29637
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.TO),
29535
29638
  },
29536
29639
  },
29537
29640
  initialValue: initialValueTo,
29538
- manageSeconds: dom$2.ketchup.objects.isTimeWithSeconds(column.obj),
29641
+ manageSeconds: dom$3.ketchup.objects.isTimeWithSeconds(column.obj),
29539
29642
  });
29540
29643
  return props;
29541
29644
  }
@@ -29550,8 +29653,8 @@ class KupColumnMenu {
29550
29653
  if (!comp.showFilters) {
29551
29654
  return props;
29552
29655
  }
29553
- if (!dom$2.ketchup.objects.isDate(column.obj) &&
29554
- !dom$2.ketchup.objects.isTimestamp(column.obj)) {
29656
+ if (!dom$3.ketchup.objects.isDate(column.obj) &&
29657
+ !dom$3.ketchup.objects.isTimestamp(column.obj)) {
29555
29658
  return props;
29556
29659
  }
29557
29660
  let interval = this.filtersColumnMenuInstance.getIntervalTextFieldFilterValues(comp.filters, column);
@@ -29559,7 +29662,7 @@ class KupColumnMenu {
29559
29662
  let initialValueTo = interval[FilterInterval.TO];
29560
29663
  let suffixFrom = null;
29561
29664
  let suffixTo = null;
29562
- if (dom$2.ketchup.objects.isTimestamp(column.obj)) {
29665
+ if (dom$3.ketchup.objects.isTimestamp(column.obj)) {
29563
29666
  suffixFrom = ' 00:00:00';
29564
29667
  suffixTo = ' 23:59:59';
29565
29668
  if (initialValueFrom && initialValueFrom.length >= 10) {
@@ -29588,7 +29691,7 @@ class KupColumnMenu {
29588
29691
  helperWhenFocused: true,
29589
29692
  id: KupColumnMenuIds.TEXTFIELD_FROM,
29590
29693
  isClearable: true,
29591
- label: dom$2.ketchup.language.translate(KupLanguageSearch.FROM),
29694
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.FROM),
29592
29695
  },
29593
29696
  },
29594
29697
  initialValue: initialValueFrom,
@@ -29606,7 +29709,7 @@ class KupColumnMenu {
29606
29709
  helperWhenFocused: true,
29607
29710
  id: KupColumnMenuIds.TEXTFIELD_TO,
29608
29711
  isClearable: true,
29609
- label: dom$2.ketchup.language.translate(KupLanguageSearch.TO),
29712
+ label: dom$3.ketchup.language.translate(KupLanguageSearch.TO),
29610
29713
  },
29611
29714
  },
29612
29715
  initialValue: initialValueTo,
@@ -29837,7 +29940,7 @@ var FPaginatorMode;
29837
29940
  FPaginatorMode["FULL"] = "full";
29838
29941
  })(FPaginatorMode || (FPaginatorMode = {}));
29839
29942
 
29840
- const dom$1 = document.documentElement;
29943
+ const dom$2 = document.documentElement;
29841
29944
  /*-------------------------------------------------*/
29842
29945
  /* C o m p o n e n t */
29843
29946
  /*-------------------------------------------------*/
@@ -29850,8 +29953,8 @@ const FPaginator = (props) => {
29850
29953
  data: pageItems,
29851
29954
  },
29852
29955
  'kup-text-field': {
29853
- label: dom$1.ketchup.language.translate(KupLanguagePage.PAGE),
29854
- helper: dom$1.ketchup.language.translate(KupLanguagePage.TOTAL) +
29956
+ label: dom$2.ketchup.language.translate(KupLanguagePage.PAGE),
29957
+ helper: dom$2.ketchup.language.translate(KupLanguagePage.TOTAL) +
29855
29958
  `: ${maxNumberOfPage}`,
29856
29959
  helperWhenFocused: true,
29857
29960
  inputType: 'number',
@@ -29864,10 +29967,10 @@ const FPaginator = (props) => {
29864
29967
  data: rowsPerPageItems,
29865
29968
  },
29866
29969
  'kup-text-field': {
29867
- label: dom$1.ketchup.language.translate(KupLanguageRow.ROWS) +
29970
+ label: dom$2.ketchup.language.translate(KupLanguageRow.ROWS) +
29868
29971
  ' / ' +
29869
- dom$1.ketchup.language.translate(KupLanguagePage.PAGE),
29870
- helper: dom$1.ketchup.language.translate(KupLanguageRow.TOTAL) +
29972
+ dom$2.ketchup.language.translate(KupLanguagePage.PAGE),
29973
+ helper: dom$2.ketchup.language.translate(KupLanguageRow.TOTAL) +
29871
29974
  `: ${props.max}`,
29872
29975
  helperWhenFocused: true,
29873
29976
  inputType: 'number',
@@ -29880,7 +29983,7 @@ const FPaginator = (props) => {
29880
29983
  h("kup-combobox", { class: "page-selector", data: dataPageSelector, initialValue: props.currentPage.toString(), "onkup-combobox-change": props.onPageChange }),
29881
29984
  props.mode !== FPaginatorMode.SIMPLE ? (h(FButton, { icon: "chevron_right", disabled: isNextPageDisabled(props), onClick: props.onNextPage, wrapperClass: "next-page" })) : null,
29882
29985
  h("kup-combobox", { class: "rows-selector", data: dataRowsSelector, initialValue: props.perPage.toString(), "onkup-combobox-change": props.onRowsChange }),
29883
- props.onLoadMore ? (h(FButton, { icon: "plus", onClick: props.onLoadMore, label: dom$1.ketchup.language.translate(KupLanguageGeneric.LOAD_MORE), styling: FButtonStyling.FLAT, wrapperClass: "load-more-button" })) : null));
29986
+ props.onLoadMore ? (h(FButton, { icon: "plus", onClick: props.onLoadMore, label: dom$2.ketchup.language.translate(KupLanguageGeneric.LOAD_MORE), styling: FButtonStyling.FLAT, wrapperClass: "load-more-button" })) : null));
29884
29987
  };
29885
29988
  function getPageItems(props, maxNumberOfPage) {
29886
29989
  const pageItems = [];
@@ -29924,8 +30027,9 @@ function isPrevPageDisabled(props) {
29924
30027
  return props.currentPage == 1;
29925
30028
  }
29926
30029
 
30030
+ const dom$1 = document.documentElement;
29927
30031
  function pageChange(pageNumber, max, perPage) {
29928
- if (isNumber(pageNumber)) {
30032
+ if (dom$1.ketchup.math.isNumber(pageNumber)) {
29929
30033
  const numberOfPages = Math.ceil(max / perPage);
29930
30034
  let tmpNewPage = pageNumber;
29931
30035
  if (tmpNewPage > numberOfPages) {
@@ -29939,7 +30043,7 @@ function pageChange(pageNumber, max, perPage) {
29939
30043
  return null;
29940
30044
  }
29941
30045
  function rowsPerPageChange(rowsNumber, max) {
29942
- if (isNumber(rowsNumber)) {
30046
+ if (dom$1.ketchup.math.isNumber(rowsNumber)) {
29943
30047
  let tmpRowsPerPage = rowsNumber;
29944
30048
  if (tmpRowsPerPage > max) {
29945
30049
  tmpRowsPerPage = max;
@@ -32250,7 +32354,7 @@ const KupTree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
32250
32354
  value = this.footer[column.name];
32251
32355
  }
32252
32356
  else {
32253
- value = numberToFormattedStringNumber(this.footer[column.name], column.decimals, column.obj ? column.obj.p : '');
32357
+ value = __classPrivateFieldGet$7(this, _KupTree_kupManager, "f").math.numberToFormattedString(this.footer[column.name], column.decimals, column.obj ? column.obj.p : '');
32254
32358
  }
32255
32359
  return (h("td", { "data-column": column.name }, totalMenu, h("span", { class: "totals-value", title: translation[menuLabel] }, value)));
32256
32360
  });
@@ -32858,13 +32962,13 @@ const KupTimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
32858
32962
  /* P r i v a t e M e t h o d s */
32859
32963
  /*-------------------------------------------------*/
32860
32964
  getFormattedValue(value) {
32861
- return formattedStringToCustomUnformattedStringTime(value, this.manageSeconds
32965
+ return this.kupManager.dates.formattedStringToCustomDateTime(value, this.manageSeconds
32862
32966
  ? KupDatesFormats.ISO_TIME
32863
32967
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, this.manageSeconds);
32864
32968
  }
32865
32969
  refreshPickerValue(eventDetailValue, eventToRaise) {
32866
32970
  let newValue = null;
32867
- if (isValidFormattedStringTime(eventDetailValue, this.manageSeconds)) {
32971
+ if (this.kupManager.dates.isValidFormattedStringTime(eventDetailValue, this.manageSeconds)) {
32868
32972
  this.value = eventDetailValue;
32869
32973
  newValue = this.value;
32870
32974
  }
@@ -33014,8 +33118,8 @@ const KupTimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
33014
33118
  date.getMinutes() == selectedTime.getMinutes()) {
33015
33119
  selected = true;
33016
33120
  }
33017
- const value = formatTime(date, this.manageSeconds);
33018
- const id = formattedStringToCustomUnformattedStringTime(value, this.manageSeconds
33121
+ const value = this.kupManager.dates.formatTime(date, this.manageSeconds);
33122
+ const id = this.kupManager.dates.formattedStringToCustomDateTime(value, this.manageSeconds
33019
33123
  ? KupDatesFormats.ISO_TIME
33020
33124
  : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, this.manageSeconds);
33021
33125
  let item = {
@@ -33032,7 +33136,7 @@ const KupTimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
33032
33136
  if (this.value == null || this.value.trim() == '') {
33033
33137
  return '';
33034
33138
  }
33035
- let v1 = unformattedStringToFormattedStringTime(this.value, this.manageSeconds);
33139
+ let v1 = this.kupManager.dates.timeStringToFormattedString(this.value, this.manageSeconds);
33036
33140
  return v1;
33037
33141
  }
33038
33142
  /*-------------------------------------------------*/
@@ -33384,7 +33488,7 @@ const KupTextField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
33384
33488
  */
33385
33489
  async getValue() {
33386
33490
  if (this.inputType == 'number') {
33387
- return formattedStringToUnformattedStringNumber(this.value, '');
33491
+ return this.kupManager.math.formattedStringToNumberString(this.value, '');
33388
33492
  }
33389
33493
  return this.value;
33390
33494
  }
@@ -33553,11 +33657,11 @@ _KupTextField_instances = new WeakSet(), _KupTextField_getValueForOutput = funct
33553
33657
  if (this.value == null || this.value.trim() == '') {
33554
33658
  return '';
33555
33659
  }
33556
- let v1 = unformattedStringToFormattedStringNumber(this.value, this.decimals, '');
33660
+ let v1 = this.kupManager.math.numberStringToFormattedString(this.value, this.decimals, '');
33557
33661
  return v1;
33558
33662
  }, _KupTextField_setValueFromEventTaget = function _KupTextField_setValueFromEventTaget(target) {
33559
33663
  if (this.inputType == 'number') {
33560
- this.value = formattedStringToUnformattedStringNumber(target.value, '');
33664
+ this.value = this.kupManager.math.formattedStringToNumberString(target.value, '');
33561
33665
  }
33562
33666
  else {
33563
33667
  this.value = target.value;
@@ -36650,7 +36754,7 @@ const KupGauge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
36650
36754
  let retValue = '';
36651
36755
  if (thresholdPercentage > 0 && thresholdPercentage < 1) {
36652
36756
  if (this.showLabels && !this.onlyValue) {
36653
- retValue = (h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, unformattedStringToFormattedStringNumber(String(threshold), -1, '')));
36757
+ retValue = (h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, this.kupManager.math.numberStringToFormattedString(String(threshold), -1, '')));
36654
36758
  }
36655
36759
  }
36656
36760
  else {
@@ -36663,7 +36767,7 @@ const KupGauge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
36663
36767
  topX = this.size - this.arcThickness;
36664
36768
  topY = halvedSize + this.labelDistance;
36665
36769
  }
36666
- retValue = (h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, unformattedStringToFormattedStringNumber(String(threshold), -1, '')));
36770
+ retValue = (h("text", { class: "gauge__label-text", "text-anchor": textPosition, x: topX, y: topY }, this.kupManager.math.numberStringToFormattedString(String(threshold), -1, '')));
36667
36771
  }
36668
36772
  }
36669
36773
  return retValue;
@@ -36672,7 +36776,7 @@ const KupGauge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
36672
36776
  const style = { fontSize: this.calculateValueFontSize() };
36673
36777
  let valueText = undefined;
36674
36778
  if (this.showValue) {
36675
- valueText = (h("text", { class: "gauge__label-text value", "text-anchor": "middle", x: halvedSize, y: valueLabelYPosition, style: style }, unformattedStringToFormattedStringNumber(String(tempValue), -1, '') +
36779
+ valueText = (h("text", { class: "gauge__label-text value", "text-anchor": "middle", x: halvedSize, y: valueLabelYPosition, style: style }, this.kupManager.math.numberStringToFormattedString(String(tempValue), -1, '') +
36676
36780
  ' ' +
36677
36781
  this.measurementUnit));
36678
36782
  }
@@ -39798,7 +39902,7 @@ const KupDataTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$
39798
39902
  }
39799
39903
  }
39800
39904
  else {
39801
- value = numberToFormattedStringNumber(footerValue, column.decimals, column.obj ? column.obj.p : '');
39905
+ value = __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").math.numberToFormattedString(footerValue, column.decimals, column.obj ? column.obj.p : '');
39802
39906
  }
39803
39907
  return (h("td", { "data-column": column.name, class: fixedCellStyle && fixedCellStyle.fixedCellClasses
39804
39908
  ? fixedCellStyle.fixedCellClasses
@@ -41917,7 +42021,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
41917
42021
  }
41918
42022
  }
41919
42023
  else {
41920
- value = numberToFormattedStringNumber(totalValue, column.decimals, column.obj ? column.obj.p : '');
42024
+ value =
42025
+ __classPrivateFieldGet$3(this, _KupDataTable_kupManager, "f").math.numberToFormattedString(totalValue, column.decimals, column.obj ? column.obj.p : '');
41921
42026
  }
41922
42027
  }
41923
42028
  cells.push(h("td", { class: totalClass }, value));
@@ -46791,4 +46896,4 @@ function defineCustomElement() {
46791
46896
  } });
46792
46897
  }
46793
46898
 
46794
- export { FPaginatorMode as $, defineCustomElement$5 as A, defineCustomElement$4 as B, defineCustomElement$3 as C, defineCustomElement$2 as D, defineCustomElement$1 as E, FImage as F, defineCustomElement as G, KupAutocomplete as H, KupBadge as I, identify as J, KupThemeColorValues as K, filterRows as L, MDCRipple as M, paginateRows as N, sortRows as O, getColumnByName as P, KupLanguageGeneric as Q, FCell as R, KupDebugCategory as S, FChip as T, KupPointerEventTypes as U, KupDragEffect as V, kupDraggableCellAttr as W, KupDropEventTypes as X, FTextFieldMDC as Y, KupLanguageSearch as Z, FPaginator as _, KupThemeIconValues as a, pageChange as a0, rowsPerPageChange as a1, SortMode as a2, KupButton as a3, KupButtonList as a4, __extends as a5, __assign as a6, __spreadArray as a7, createCommonjsModule as a8, getDefaultExportFromCjs as a9, kupDraggableRowAttr as aA, KupDynamicPositionPlacement as aB, KupCardFamily as aC, commonjsGlobal as aD, KupDatesFormats as aE, KupProgressBar as aF, KupRadio as aG, KupRating as aH, KupSpinner as aI, KupSwitch as aJ, KupTabBar as aK, KupTextField as aL, KupTimePicker as aM, KupTree as aN, KupDatesLocales as aa, FButton as ab, FChipType as ac, KupCard as ad, FCellPadding as ae, KupChart as af, KupCheckbox as ag, KupChip as ah, KupColorPicker as ai, KupCombobox as aj, getCellValueForDisplay as ak, KupLanguageDashboard as al, FTextField as am, FCheckbox as an, KupDataTable as ao, KupDatePicker as ap, KupDialog as aq, KupDropdownButton as ar, KupDataNewColumnTypes as as, FButtonStyling as at, KupForm as au, KupGauge as av, KupImage as aw, KupList as ax, kupDropEvent as ay, kupDraggableColumnAttr as az, defineCustomElement$p as b, componentWrapperId as c, defineCustomElement$q as d, defineCustomElement$o as e, defineCustomElement$n as f, getProps as g, defineCustomElement$m as h, defineCustomElement$l as i, defineCustomElement$k as j, kupManagerInstance as k, defineCustomElement$j as l, defineCustomElement$i as m, defineCustomElement$h as n, defineCustomElement$g as o, defineCustomElement$f as p, defineCustomElement$b as q, defineCustomElement$e as r, setProps as s, defineCustomElement$c as t, defineCustomElement$d as u, defineCustomElement$a as v, defineCustomElement$9 as w, defineCustomElement$8 as x, defineCustomElement$7 as y, defineCustomElement$6 as z };
46899
+ export { KupLanguageSearch as $, defineCustomElement$5 as A, defineCustomElement$4 as B, defineCustomElement$3 as C, defineCustomElement$2 as D, defineCustomElement$1 as E, FImage as F, defineCustomElement as G, KupAutocomplete as H, KupBadge as I, identify as J, KupThemeColorValues as K, filterRows as L, MDCRipple as M, paginateRows as N, sortRows as O, getColumnByName as P, pageChange as Q, rowsPerPageChange as R, KupLanguageGeneric as S, FCell as T, KupDebugCategory as U, FChip as V, KupPointerEventTypes as W, KupDragEffect as X, kupDraggableCellAttr as Y, KupDropEventTypes as Z, FTextFieldMDC as _, KupThemeIconValues as a, FPaginator as a0, FPaginatorMode as a1, SortMode as a2, KupButton as a3, KupButtonList as a4, __extends as a5, __assign as a6, __spreadArray as a7, createCommonjsModule as a8, getDefaultExportFromCjs as a9, kupDraggableRowAttr as aA, KupDynamicPositionPlacement as aB, KupCardFamily as aC, commonjsGlobal as aD, KupDatesFormats as aE, KupProgressBar as aF, KupRadio as aG, KupRating as aH, KupSpinner as aI, KupSwitch as aJ, KupTabBar as aK, KupTextField as aL, KupTimePicker as aM, KupTree as aN, KupDatesLocales as aa, FButton as ab, FChipType as ac, KupCard as ad, FCellPadding as ae, KupChart as af, KupCheckbox as ag, KupChip as ah, KupColorPicker as ai, KupCombobox as aj, getCellValueForDisplay as ak, KupLanguageDashboard as al, FTextField as am, FCheckbox as an, KupDataTable as ao, KupDatePicker as ap, KupDialog as aq, KupDropdownButton as ar, KupDataNewColumnTypes as as, FButtonStyling as at, KupForm as au, KupGauge as av, KupImage as aw, KupList as ax, kupDropEvent as ay, kupDraggableColumnAttr as az, defineCustomElement$p as b, componentWrapperId as c, defineCustomElement$q as d, defineCustomElement$o as e, defineCustomElement$n as f, getProps as g, defineCustomElement$m as h, defineCustomElement$l as i, defineCustomElement$k as j, kupManagerInstance as k, defineCustomElement$j as l, defineCustomElement$i as m, defineCustomElement$h as n, defineCustomElement$g as o, defineCustomElement$f as p, defineCustomElement$b as q, defineCustomElement$e as r, setProps as s, defineCustomElement$c as t, defineCustomElement$d as u, defineCustomElement$a as v, defineCustomElement$9 as w, defineCustomElement$8 as x, defineCustomElement$7 as y, defineCustomElement$6 as z };