@sme.up/ketchup 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/cjs/{f-button-94cb5f35.js → f-button-826a470e.js} +3 -3
  2. package/dist/cjs/{f-cell-76830a0d.js → f-cell-2d5bcf0c.js} +5 -5
  3. package/dist/cjs/{f-chip-68d45fd3.js → f-chip-2fd3363e.js} +2 -2
  4. package/dist/cjs/{f-image-0e71df7e.js → f-image-0f17d599.js} +1 -1
  5. package/dist/cjs/{f-paginator-utils-46689c0a.js → f-paginator-utils-946b579d.js} +3 -3
  6. package/dist/cjs/{f-text-field-b4229cef.js → f-text-field-d243e4d8.js} +4 -2
  7. package/dist/cjs/ketchup.cjs.js +1 -1
  8. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  9. package/dist/cjs/kup-autocomplete_25.cjs.entry.js +21 -12
  10. package/dist/cjs/kup-box.cjs.entry.js +12 -10
  11. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  12. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  13. package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
  15. package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
  16. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-echart.cjs.entry.js +28 -18
  18. package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
  19. package/dist/cjs/kup-form.cjs.entry.js +16 -8
  20. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
  22. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  23. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  24. package/dist/cjs/{kup-manager-7c514a30.js → kup-manager-a8eecc60.js} +28 -15
  25. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  30. package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
  31. package/dist/cjs/loader.cjs.js +1 -1
  32. package/dist/collection/assets/form.js +41 -0
  33. package/dist/collection/components/kup-box/kup-box.js +5 -3
  34. package/dist/collection/components/kup-button/kup-button-declarations.js +1 -0
  35. package/dist/collection/components/kup-button/kup-button.js +27 -0
  36. package/dist/collection/components/kup-data-table/kup-data-table.js +3 -1
  37. package/dist/collection/components/kup-echart/kup-echart.js +27 -17
  38. package/dist/collection/components/kup-form/kup-form-declarations.js +1 -0
  39. package/dist/collection/components/kup-form/kup-form.css +8 -0
  40. package/dist/collection/components/kup-form/kup-form.js +31 -2
  41. package/dist/collection/components/kup-image/assets/svg/azure.svg +1 -0
  42. package/dist/collection/components/kup-lazy/kup-lazy.css +8 -2
  43. package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -0
  44. package/dist/collection/f-components/f-button/f-button.js +2 -2
  45. package/dist/collection/f-components/f-cell/f-cell.js +1 -1
  46. package/dist/collection/f-components/f-text-field/f-text-field.js +3 -1
  47. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +7 -6
  48. package/dist/collection/managers/kup-data/kup-data.js +7 -9
  49. package/dist/collection/managers/kup-dates/kup-dates.js +14 -0
  50. package/dist/collection/utils/filters/filters-rows.js +1 -1
  51. package/dist/collection/utils/filters/filters-tree-items.js +3 -3
  52. package/dist/esm/{f-button-cd948e50.js → f-button-2d0a5f21.js} +3 -3
  53. package/dist/esm/{f-cell-474dd282.js → f-cell-ee7d7b5c.js} +5 -5
  54. package/dist/esm/{f-chip-d6f2eb94.js → f-chip-0d29f91f.js} +2 -2
  55. package/dist/esm/{f-image-914a03ef.js → f-image-ab131d59.js} +1 -1
  56. package/dist/esm/{f-paginator-utils-a4a52732.js → f-paginator-utils-aa52af0f.js} +3 -3
  57. package/dist/esm/{f-text-field-76341fe3.js → f-text-field-0729b19f.js} +4 -2
  58. package/dist/esm/ketchup.js +1 -1
  59. package/dist/esm/kup-accordion.entry.js +2 -2
  60. package/dist/esm/kup-autocomplete_25.entry.js +21 -12
  61. package/dist/esm/kup-box.entry.js +12 -10
  62. package/dist/esm/kup-calendar.entry.js +4 -4
  63. package/dist/esm/kup-cell.entry.js +5 -5
  64. package/dist/esm/kup-dash-list.entry.js +1 -1
  65. package/dist/esm/kup-dash_2.entry.js +1 -1
  66. package/dist/esm/kup-dashboard.entry.js +4 -4
  67. package/dist/esm/kup-drawer.entry.js +1 -1
  68. package/dist/esm/kup-echart.entry.js +28 -18
  69. package/dist/esm/kup-family-tree.entry.js +3 -3
  70. package/dist/esm/kup-form.entry.js +16 -8
  71. package/dist/esm/kup-iframe.entry.js +1 -1
  72. package/dist/esm/kup-image-list.entry.js +6 -6
  73. package/dist/esm/kup-lazy.entry.js +2 -2
  74. package/dist/esm/kup-magic-box.entry.js +2 -2
  75. package/dist/esm/{kup-manager-86f440c7.js → kup-manager-13b4f989.js} +28 -15
  76. package/dist/esm/kup-nav-bar.entry.js +1 -1
  77. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  78. package/dist/esm/kup-photo-frame.entry.js +1 -1
  79. package/dist/esm/kup-probe.entry.js +1 -1
  80. package/dist/esm/kup-qlik.entry.js +1 -1
  81. package/dist/esm/kup-snackbar.entry.js +3 -3
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/ketchup/assets/svg/azure.svg +1 -0
  84. package/dist/ketchup/ketchup.esm.js +1 -1
  85. package/dist/ketchup/p-0986ad5d.js +1 -0
  86. package/dist/ketchup/{p-389fd0bf.js → p-0cf10db0.js} +1 -1
  87. package/dist/ketchup/{p-151f7c17.entry.js → p-13666119.entry.js} +1 -1
  88. package/dist/ketchup/{p-066f344a.entry.js → p-18b68e86.entry.js} +1 -1
  89. package/dist/ketchup/{p-2f4e6c50.entry.js → p-28d514d0.entry.js} +1 -1
  90. package/dist/ketchup/{p-8b55b786.entry.js → p-2ffdbee1.entry.js} +1 -1
  91. package/dist/ketchup/{p-853a5178.entry.js → p-3dcfffbe.entry.js} +1 -1
  92. package/dist/ketchup/{p-cee76b14.entry.js → p-3fe35411.entry.js} +1 -1
  93. package/dist/ketchup/{p-cfaea29b.entry.js → p-5f51009b.entry.js} +1 -1
  94. package/dist/ketchup/{p-77aff9c1.entry.js → p-816f0938.entry.js} +1 -1
  95. package/dist/ketchup/{p-bc306a53.entry.js → p-83c214d7.entry.js} +1 -1
  96. package/dist/ketchup/{p-df8e6a4d.entry.js → p-84957bbf.entry.js} +1 -1
  97. package/dist/ketchup/{p-359fd90d.entry.js → p-86795579.entry.js} +1 -1
  98. package/dist/ketchup/{p-00e1133d.entry.js → p-8f85b8bb.entry.js} +2 -2
  99. package/dist/ketchup/{p-0c6e0647.entry.js → p-982d3e3a.entry.js} +1 -1
  100. package/dist/ketchup/{p-7cfdf53c.entry.js → p-adcfcd4f.entry.js} +2 -2
  101. package/dist/ketchup/{p-cd4fc3fb.js → p-b705be3b.js} +1 -1
  102. package/dist/ketchup/{p-21ea11cb.js → p-b8c921ee.js} +1 -1
  103. package/dist/ketchup/{p-8673bd4e.js → p-bfe88b03.js} +1 -1
  104. package/dist/ketchup/{p-d2f51e7b.entry.js → p-d7091875.entry.js} +1 -1
  105. package/dist/ketchup/{p-95f5834b.entry.js → p-d8656956.entry.js} +1 -1
  106. package/dist/ketchup/p-dc69549c.entry.js +1 -0
  107. package/dist/ketchup/{p-e9a1ba04.entry.js → p-e01fa411.entry.js} +1 -1
  108. package/dist/ketchup/{p-b3b65a61.entry.js → p-e0f659c9.entry.js} +1 -1
  109. package/dist/ketchup/{p-e60a1170.entry.js → p-e1d82570.entry.js} +1 -1
  110. package/dist/ketchup/p-e21c744a.js +1 -0
  111. package/dist/ketchup/{p-1e9c03b0.entry.js → p-e5a9d60a.entry.js} +1 -1
  112. package/dist/ketchup/p-f50cbed9.js +1 -0
  113. package/dist/ketchup/{p-c3783b77.entry.js → p-fa9f161a.entry.js} +1 -1
  114. package/dist/types/components/kup-box/kup-box-declarations.d.ts +1 -0
  115. package/dist/types/components/kup-button/kup-button-declarations.d.ts +1 -0
  116. package/dist/types/components/kup-button/kup-button.d.ts +5 -0
  117. package/dist/types/components/kup-form/kup-form-declarations.d.ts +1 -0
  118. package/dist/types/components/kup-form/kup-form.d.ts +5 -0
  119. package/dist/types/components.d.ts +20 -0
  120. package/dist/types/f-components/f-button/f-button-declarations.d.ts +1 -0
  121. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +2 -2
  122. package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
  123. package/dist/types/utils/filters/filters-tree-items.d.ts +1 -1
  124. package/package.json +1 -1
  125. package/dist/ketchup/p-3586f59c.js +0 -1
  126. package/dist/ketchup/p-a2c595c4.js +0 -1
  127. package/dist/ketchup/p-ae91f27e.entry.js +0 -1
  128. package/dist/ketchup/p-af664379.js +0 -1
@@ -19,6 +19,11 @@ export class KupButton {
19
19
  /*-------------------------------------------------*/
20
20
  /* P r o p s */
21
21
  /*-------------------------------------------------*/
22
+ /**
23
+ * Sets the type of the button.
24
+ * @default null
25
+ */
26
+ this.buttonType = null;
22
27
  /**
23
28
  * When set to true, the icon button state will be on.
24
29
  * @default false
@@ -165,6 +170,7 @@ export class KupButton {
165
170
  }
166
171
  render() {
167
172
  const props = {
173
+ buttonType: this.buttonType,
168
174
  checked: this.checked,
169
175
  danger: this.rootElement.classList.contains('kup-danger')
170
176
  ? true
@@ -233,6 +239,27 @@ export class KupButton {
233
239
  "$": ["kup-button.css"]
234
240
  }; }
235
241
  static get properties() { return {
242
+ "buttonType": {
243
+ "type": "string",
244
+ "mutable": false,
245
+ "complexType": {
246
+ "original": "string",
247
+ "resolved": "string",
248
+ "references": {}
249
+ },
250
+ "required": false,
251
+ "optional": false,
252
+ "docs": {
253
+ "tags": [{
254
+ "name": "default",
255
+ "text": "null"
256
+ }],
257
+ "text": "Sets the type of the button."
258
+ },
259
+ "attribute": "button-type",
260
+ "reflect": false,
261
+ "defaultValue": "null"
262
+ },
236
263
  "checked": {
237
264
  "type": "boolean",
238
265
  "mutable": true,
@@ -3350,7 +3350,9 @@ export class KupDataTable {
3350
3350
  });
3351
3351
  }
3352
3352
  else {
3353
- this.kupManager.debug.logMessage(this, "Grouped for a non-existent column! (" + group.column + ")", KupDebugCategory.WARNING);
3353
+ this.kupManager.debug.logMessage(this, 'Grouped for a non-existent column! (' +
3354
+ group.column +
3355
+ ')', KupDebugCategory.WARNING);
3354
3356
  }
3355
3357
  }
3356
3358
  if (chipsData.length > 0) {
@@ -881,19 +881,21 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
881
881
  }
882
882
  const y = {};
883
883
  let objKey;
884
- for (const row of this.data.rows) {
885
- objKey = row.cells[this.axis].value;
886
- y[objKey] = [];
887
- for (const key of Object.keys(row.cells)) {
888
- const cell = row.cells[key];
889
- const value = cell.value;
890
- if (!this.axis.includes(key)) {
891
- if (this.series &&
892
- this.series.length > 0 &&
893
- !this.series.includes(key)) {
894
- continue;
884
+ if (this.axis) {
885
+ for (const row of this.data.rows) {
886
+ objKey = row.cells[this.axis].value;
887
+ y[objKey] = [];
888
+ for (const key of Object.keys(row.cells)) {
889
+ const cell = row.cells[key];
890
+ const value = cell.value;
891
+ if (!this.axis.includes(key)) {
892
+ if (this.series &&
893
+ this.series.length > 0 &&
894
+ !this.series.includes(key)) {
895
+ continue;
896
+ }
897
+ y[objKey].push(value);
895
898
  }
896
- y[objKey].push(value);
897
899
  }
898
900
  }
899
901
  }
@@ -957,6 +959,12 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
957
959
  '</div>');
958
960
  }
959
961
  };
962
+ let axisColumn = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
963
+ name: this.axis,
964
+ });
965
+ let serieTitle = axisColumn && axisColumn.length > 0
966
+ ? axisColumn[0].title
967
+ : 'No title';
960
968
  const echartOption = Object.assign({ emphasis: {
961
969
  label: {
962
970
  show: true,
@@ -989,9 +997,7 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
989
997
  padding: 4,
990
998
  },
991
999
  map: this.rootElement.id ? this.rootElement.id : '',
992
- name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
993
- name: this.axis,
994
- })[0].title,
1000
+ name: serieTitle,
995
1001
  roam: true,
996
1002
  select: {
997
1003
  itemStyle: {
@@ -1063,11 +1069,15 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
1063
1069
  if (type == KupEchartTypes.GAUSSIAN) {
1064
1070
  if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
1065
1071
  const newDataset = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.distinct(this.data, [column.name]);
1066
- values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(newDataset, column);
1072
+ values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getUnivocalValue(newDataset, column);
1067
1073
  __classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column.name] = newDataset;
1068
1074
  }
1069
1075
  else {
1070
- values = [{ value: y[key] }];
1076
+ values = [];
1077
+ for (let index = 0; index < y[key].length; index++) {
1078
+ const element = y[key][index];
1079
+ values.push({ value: element });
1080
+ }
1071
1081
  }
1072
1082
  }
1073
1083
  else {
@@ -6,6 +6,7 @@ export var KupFormProps;
6
6
  (function (KupFormProps) {
7
7
  KupFormProps["customStyle"] = "Custom style of the component.";
8
8
  KupFormProps["data"] = "Actual data of the form.";
9
+ KupFormProps["hiddenSubmitButton"] = "Creates a hidden submit button in order to submit the form with enter.";
9
10
  KupFormProps["layout"] = "How the form will arrange its content.";
10
11
  })(KupFormProps || (KupFormProps = {}));
11
12
  export var KupFormLabelAlignment;
@@ -27,6 +27,7 @@
27
27
  display: flex;
28
28
  flex-grow: 1;
29
29
  overflow: auto;
30
+ padding: 1em 0;
30
31
  position: relative;
31
32
  }
32
33
  .form--column {
@@ -94,6 +95,13 @@
94
95
  .form__field img {
95
96
  height: auto;
96
97
  }
98
+ .form__submit {
99
+ height: 0;
100
+ opacity: 0;
101
+ overflow: hidden;
102
+ position: absolute;
103
+ width: 0;
104
+ }
97
105
  .form .f-cell.c-right-aligned:not(.c-centered) .f-cell__content {
98
106
  justify-content: flex-start;
99
107
  }
@@ -7,6 +7,7 @@ import { componentWrapperId } from '../../variables/GenericVariables';
7
7
  import { FCell } from '../../f-components/f-cell/f-cell';
8
8
  import { FCellTypes, } from '../../f-components/f-cell/f-cell-declarations';
9
9
  import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
10
+ import { FButton } from '../../f-components/f-button/f-button';
10
11
  const dom = document.documentElement;
11
12
  export class KupForm {
12
13
  constructor() {
@@ -24,6 +25,11 @@ export class KupForm {
24
25
  * @default null
25
26
  */
26
27
  this.data = null;
28
+ /**
29
+ * Creates a hidden submit button in order to submit the form with enter.
30
+ * @default false
31
+ */
32
+ this.hiddenSubmitButton = false;
27
33
  /**
28
34
  * How the form will arrange its content.
29
35
  * @default null
@@ -167,7 +173,9 @@ export class KupForm {
167
173
  form: true,
168
174
  'form--column': !horizontal,
169
175
  };
170
- return h("form", { class: classObj }, formContent);
176
+ return (h("form", { class: classObj, name: this.rootElement.id },
177
+ formContent,
178
+ this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: "submit", wrapperClass: "form__submit" })) : null));
171
179
  }
172
180
  renderSection(section, parent, row, visibleColumns) {
173
181
  var _a;
@@ -281,7 +289,7 @@ export class KupForm {
281
289
  return null;
282
290
  }
283
291
  const cellProps = {
284
- cell: formField.data ? Object.assign(Object.assign({}, cell), { data: formField.data }) : cell,
292
+ cell: cell,
285
293
  column: column,
286
294
  component: this,
287
295
  editable: true,
@@ -498,6 +506,27 @@ export class KupForm {
498
506
  },
499
507
  "defaultValue": "null"
500
508
  },
509
+ "hiddenSubmitButton": {
510
+ "type": "boolean",
511
+ "mutable": false,
512
+ "complexType": {
513
+ "original": "boolean",
514
+ "resolved": "boolean",
515
+ "references": {}
516
+ },
517
+ "required": false,
518
+ "optional": false,
519
+ "docs": {
520
+ "tags": [{
521
+ "name": "default",
522
+ "text": "false"
523
+ }],
524
+ "text": "Creates a hidden submit button in order to submit the form with enter."
525
+ },
526
+ "attribute": "hidden-submit-button",
527
+ "reflect": false,
528
+ "defaultValue": "false"
529
+ },
501
530
  "layout": {
502
531
  "type": "unknown",
503
532
  "mutable": false,
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.05,4.24L6.56,18.05L2,18L7.09,9.24L13.05,4.24M13.75,5.33L22,19.76H6.74L16.04,18.1L11.17,12.31L13.75,5.33Z" /></svg>
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * @prop --kup-lazy-animation-time: Sets the duration of the animation.
3
+ * @prop --kup-lazy-height: Sets the height of the component and subcomponent.
3
4
  * @prop --kup-lazy-hor-alignment: Sets the horizontal alignment of the subcomponent.
4
5
  * @prop --kup-lazy-placeholder-color: Sets color of the placeholder icon.
5
6
  * @prop --kup-lazy-ver-alignment: Sets the vertical alignment of the subcomponent.
@@ -12,10 +13,11 @@
12
13
  --kup-lazy-placeholder-color,
13
14
  var(--kup-icon-color)
14
15
  );
16
+ --kup_lazy_height: var(--kup-lazy-height, 100%);
15
17
  --kup_lazy_ver_alignment: var(--kup-lazy-ver-alignment, center);
16
18
  --kup_lazy_width: var(--kup-lazy-width, 100%);
17
19
  display: block;
18
- height: 100%;
20
+ height: var(--kup_lazy_height);
19
21
  width: var(--kup_lazy_width);
20
22
  position: relative;
21
23
  }
@@ -24,15 +26,19 @@
24
26
  align-items: var(--kup_lazy_ver_alignment);
25
27
  display: flex;
26
28
  justify-content: var(--kup_lazy_hor_alignment);
27
- height: 100%;
29
+ height: var(--kup_lazy_height);
28
30
  width: var(--kup_lazy_width);
29
31
  }
32
+ #kup-component > * {
33
+ height: var(--kup_lazy_height);
34
+ }
30
35
  #kup-component kup-data-table {
31
36
  min-width: 100%;
32
37
  }
33
38
 
34
39
  .kup-loaded,
35
40
  .kup-to-be-loaded {
41
+ height: var(--kup_lazy_height);
36
42
  width: var(--kup_lazy_width);
37
43
  }
38
44
 
@@ -95,6 +95,7 @@
95
95
  :host([is-radial]) {
96
96
  box-sizing: border-box;
97
97
  margin: auto;
98
+ padding: 1.25em 0px;
98
99
  }
99
100
  :host([is-radial]) #kup-component {
100
101
  display: flex;
@@ -58,7 +58,7 @@ function renderButton(props) {
58
58
  const styleSpinnerContainer = {
59
59
  '--kup_button_spinner_height': propsFImage.sizeY,
60
60
  };
61
- return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title, type: "button" },
61
+ return (h("button", { type: props.buttonType ? props.buttonType : 'button', class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title },
62
62
  props.trailingIcon
63
63
  ? [
64
64
  h("span", { class: classLabelObj }, props.label),
@@ -93,7 +93,7 @@ function renderIconButton(props) {
93
93
  const iconOff = props.iconOff
94
94
  ? props.iconOff
95
95
  : props.icon + '_border';
96
- return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, type: "button", value: props.checked ? 'on' : 'off', "aria-label": props.title },
96
+ return (h("button", { type: props.buttonType ? props.buttonType : 'button', class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, value: props.checked ? 'on' : 'off', "aria-label": props.title },
97
97
  !props.showSpinner || props.disabled ? (h(FImage, Object.assign({}, propsFImage, { resource: props.toggable && !props.checked ? iconOff : props.icon, wrapperClass: `icon-button__icon kup-icon` }))) : null,
98
98
  props.toggable && !props.showSpinner ? (h(FImage, Object.assign({}, propsFImage, { resource: props.icon, wrapperClass: `icon-button__icon icon-button__icon--on kup-icon` }))) : null,
99
99
  props.showSpinner && !props.disabled ? (h("div", { class: "icon-button__spinner-container" },
@@ -223,7 +223,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
223
223
  case FCellTypes.NUMBER:
224
224
  classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
225
225
  case FCellTypes.STRING:
226
- return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: isFullWidth(props) ? true : false, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
226
+ 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
227
227
  ? stringToNumber(cell.value).toString()
228
228
  : 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) })));
229
229
  }
@@ -55,7 +55,9 @@ function setContent(props) {
55
55
  props.maxLength)) : undefined,
56
56
  !props.trailingIcon ? iconEl : undefined,
57
57
  props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
58
- h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onChange: (e) => {
58
+ h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth && !props.outlined
59
+ ? props.label
60
+ : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onChange: (e) => {
59
61
  if (props.decimals !== null &&
60
62
  props.inputType === 'number') {
61
63
  e.target.value = parseFloat(e.target.value).toFixed(props.decimals);
@@ -21,14 +21,14 @@ export function findCell(dataset, filters) {
21
21
  * @param {KupDataColumn} column - Column included in the search. When missing, returns empty array.
22
22
  * @returns {ValueDisplayedValue[]} Values of the cells, sorted.
23
23
  */
24
- export function getCellValue(dataset, column, sorted) {
24
+ export function getCellValue(dataset, column, sorted, univocal) {
25
25
  const rows = dataset.rows;
26
26
  const values = new Array();
27
27
  const result = new Array();
28
28
  if (!rows || rows.length == 0 || !column) {
29
29
  return result;
30
30
  }
31
- extractColumnValues(rows, column, values);
31
+ extractColumnValues(rows, column, values, univocal);
32
32
  if (sorted == true) {
33
33
  values.sort((n1, n2) => {
34
34
  return compareValues(null, kupObjects.isDate(n1.obj)
@@ -44,19 +44,20 @@ export function getCellValue(dataset, column, sorted) {
44
44
  }
45
45
  return result;
46
46
  }
47
- function extractColumnValues(rows, column, values) {
47
+ function extractColumnValues(rows, column, values, univocal) {
48
48
  /** il valore delle righe attualmente filtrate, formattato */
49
- rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name]));
49
+ rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name], univocal));
50
50
  return values;
51
51
  }
52
- export function addColumnValueFromRow(values, column, cell) {
52
+ export function addColumnValueFromRow(values, column, cell, univocal) {
53
53
  if (cell) {
54
54
  let item = {
55
55
  value: cell.value,
56
56
  displayedValue: getCellValueForDisplay(column, cell),
57
57
  obj: cell.obj ? cell.obj : column.obj,
58
58
  };
59
- if (!Filters.valuesArrayContainsValue(values, cell.value)) {
59
+ if (univocal != true ||
60
+ !Filters.valuesArrayContainsValue(values, cell.value)) {
60
61
  values.push(item);
61
62
  }
62
63
  }
@@ -18,7 +18,10 @@ export class KupData {
18
18
  return findCell(dataset, filters);
19
19
  },
20
20
  getValue(dataset, column, sorted) {
21
- return getCellValue(dataset, column, sorted);
21
+ return getCellValue(dataset, column, sorted, false);
22
+ },
23
+ getUnivocalValue(dataset, column, sorted) {
24
+ return getCellValue(dataset, column, sorted, true);
22
25
  },
23
26
  replace(dataset, cell, columns) {
24
27
  return replaceCell(dataset, cell, columns);
@@ -373,22 +376,17 @@ export class KupData {
373
376
  columns: JSON.parse(JSON.stringify(dataset.columns)),
374
377
  rows: [],
375
378
  };
376
- const length = dataset.rows.length;
377
379
  // sort all columns values by descending
378
- let values = getCellValue(dataset, this.column.find(dataset, { name: headerColumn })[0]);
379
- values.sort(function (a, b) {
380
- return Number(a.value) - Number(b.value);
381
- });
380
+ let values = getCellValue(dataset, this.column.find(dataset, { name: headerColumn })[0], true, true);
382
381
  values.reverse();
383
- // excluding duplicates values.
384
- values = [...new Set(values)];
382
+ const length = dataset.rows.length;
385
383
  // calculating middle index
386
384
  const idx = Math.floor(length / 2);
387
385
  let lastIdx = idx - 1;
388
386
  let leftIdx = idx - 1;
389
387
  let rightIdx = idx + 1;
390
388
  // sort the rows like a "mountain", the greatest is in the middle and the other ones are splitted left and right
391
- for (let i = 0; i < length; i++) {
389
+ for (let i = 0; i < values.length; i++) {
392
390
  const value = values[i].value;
393
391
  // looping the rows because we have many rows with same value.
394
392
  this.finder(dataset, {
@@ -45,6 +45,20 @@ export class KupDates {
45
45
  this.locale = navLangs[0]
46
46
  .split('-')[0]
47
47
  .toLowerCase();
48
+ let found = false;
49
+ for (const key in KupDatesLocales) {
50
+ if (Object.prototype.hasOwnProperty.call(KupDatesLocales, key)) {
51
+ const localeItem = KupDatesLocales[key];
52
+ if (localeItem == this.locale) {
53
+ found = true;
54
+ break;
55
+ }
56
+ }
57
+ }
58
+ if (!found) {
59
+ console.log('set forced locale: en');
60
+ this.locale = KupDatesLocales.ENGLISH;
61
+ }
48
62
  }
49
63
  dayjs.locale(this.locale);
50
64
  this.managedComponents.forEach(function (comp) {
@@ -232,6 +232,6 @@ export class FiltersRows extends Filters {
232
232
  for (let i = 0; i < checkboxes.length; i++) {
233
233
  values.push(checkboxes[i]);
234
234
  }
235
- return kupData.cell.getValue({ rows: tmpRows }, column, true);
235
+ return kupData.cell.getUnivocalValue({ rows: tmpRows }, column, true);
236
236
  }
237
237
  }
@@ -71,7 +71,7 @@ export class FiltersTreeItems extends FiltersRows {
71
71
  });
72
72
  }
73
73
  }
74
- extractColumnValues(rows, column, values) {
74
+ extractColumnValues(rows, column, values, univocal) {
75
75
  if (rows == null || rows.length == 0) {
76
76
  return;
77
77
  }
@@ -83,8 +83,8 @@ export class FiltersTreeItems extends FiltersRows {
83
83
  value: node.value,
84
84
  };
85
85
  if (node.visible) {
86
- addColumnValueFromRow(values, column, cellsHolder[column.name]);
87
- this.extractColumnValues(node.children, column, values);
86
+ addColumnValueFromRow(values, column, cellsHolder[column.name], univocal);
87
+ this.extractColumnValues(node.children, column, values, univocal);
88
88
  }
89
89
  });
90
90
  return values;
@@ -1,6 +1,6 @@
1
1
  import { h } from './index-e41330a5.js';
2
2
  import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
3
- import { F as FImage } from './f-image-914a03ef.js';
3
+ import { F as FImage } from './f-image-ab131d59.js';
4
4
 
5
5
  /*-------------------------------------------------*/
6
6
  /* C o m p o n e n t */
@@ -58,7 +58,7 @@ function renderButton(props) {
58
58
  const styleSpinnerContainer = {
59
59
  '--kup_button_spinner_height': propsFImage.sizeY,
60
60
  };
61
- return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title, type: "button" },
61
+ return (h("button", { type: props.buttonType ? props.buttonType : 'button', class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title },
62
62
  props.trailingIcon
63
63
  ? [
64
64
  h("span", { class: classLabelObj }, props.label),
@@ -93,7 +93,7 @@ function renderIconButton(props) {
93
93
  const iconOff = props.iconOff
94
94
  ? props.iconOff
95
95
  : props.icon + '_border';
96
- return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, type: "button", value: props.checked ? 'on' : 'off', "aria-label": props.title },
96
+ return (h("button", { type: props.buttonType ? props.buttonType : 'button', class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, value: props.checked ? 'on' : 'off', "aria-label": props.title },
97
97
  !props.showSpinner || props.disabled ? (h(FImage, Object.assign({}, propsFImage, { resource: props.toggable && !props.checked ? iconOff : props.icon, wrapperClass: `icon-button__icon kup-icon` }))) : null,
98
98
  props.toggable && !props.showSpinner ? (h(FImage, Object.assign({}, propsFImage, { resource: props.icon, wrapperClass: `icon-button__icon icon-button__icon--on kup-icon` }))) : null,
99
99
  props.showSpinner && !props.disabled ? (h("div", { class: "icon-button__spinner-container" },
@@ -1,9 +1,9 @@
1
- import { aj as editableTypes, ak as kupTypes, b as KupThemeColorValues, al as FCellTypes, am as KupTagNames, an as fullWidthFieldsComps, ag as stringToNumber, ao as FCellClasses, ap as autoCenterComps, ad as getCellValueForDisplay, aq as FCellEvents } from './kup-manager-86f440c7.js';
1
+ import { aj as editableTypes, ak as kupTypes, b as KupThemeColorValues, al as FCellTypes, am as KupTagNames, an as fullWidthFieldsComps, ag as stringToNumber, ao as FCellClasses, ap as autoCenterComps, ad as getCellValueForDisplay, aq as FCellEvents } from './kup-manager-13b4f989.js';
2
2
  import { h } from './index-e41330a5.js';
3
3
  import { F as FCheckbox } from './f-checkbox-e06cf07b.js';
4
- import { F as FTextField } from './f-text-field-76341fe3.js';
5
- import { F as FImage } from './f-image-914a03ef.js';
6
- import { a as FChip } from './f-chip-d6f2eb94.js';
4
+ import { F as FTextField } from './f-text-field-0729b19f.js';
5
+ import { F as FImage } from './f-image-ab131d59.js';
6
+ import { a as FChip } from './f-chip-0d29f91f.js';
7
7
 
8
8
  /*-------------------------------------------------*/
9
9
  /* C o m p o n e n t */
@@ -233,7 +233,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
233
233
  case FCellTypes.NUMBER:
234
234
  classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
235
235
  case FCellTypes.STRING:
236
- return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: isFullWidth(props) ? true : false, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
236
+ 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
237
237
  ? stringToNumber(cell.value).toString()
238
238
  : 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) })));
239
239
  }
@@ -1,6 +1,6 @@
1
1
  import { h } from './index-e41330a5.js';
2
- import { F as FImage } from './f-image-914a03ef.js';
3
- import { K as KupThemeIconValues, j as KupLanguageGeneric, b as KupThemeColorValues } from './kup-manager-86f440c7.js';
2
+ import { F as FImage } from './f-image-ab131d59.js';
3
+ import { K as KupThemeIconValues, j as KupLanguageGeneric, b as KupThemeColorValues } from './kup-manager-13b4f989.js';
4
4
 
5
5
  /**
6
6
  * Types of the f-chip component.
@@ -1,5 +1,5 @@
1
1
  import { h, a as getAssetPath } from './index-e41330a5.js';
2
- import { b as KupThemeColorValues } from './kup-manager-86f440c7.js';
2
+ import { b as KupThemeColorValues } from './kup-manager-13b4f989.js';
3
3
 
4
4
  /**
5
5
  * The type of a CSS step in CSS-drawing mode.
@@ -1,6 +1,6 @@
1
- import { F as Filters, H as FilterInterval, C as getValueForDisplay, B as getValueForDisplay2, ad as getCellValueForDisplay, t as getColumnByName, x as KupObjects, ae as KupData, af as compareCell, T as TotalMode, ag as stringToNumber, e as KupDatesFormats, ah as isNumber, _ as SortMode, ai as KupLanguagePage, p as KupLanguageRow, j as KupLanguageGeneric } from './kup-manager-86f440c7.js';
1
+ import { F as Filters, H as FilterInterval, C as getValueForDisplay, B as getValueForDisplay2, ad as getCellValueForDisplay, t as getColumnByName, x as KupObjects, ae as KupData, af as compareCell, T as TotalMode, ag as stringToNumber, e as KupDatesFormats, ah as isNumber, _ as SortMode, ai as KupLanguagePage, p as KupLanguageRow, j as KupLanguageGeneric } from './kup-manager-13b4f989.js';
2
2
  import { h } from './index-e41330a5.js';
3
- import { F as FButton } from './f-button-cd948e50.js';
3
+ import { F as FButton } from './f-button-2d0a5f21.js';
4
4
  import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
5
5
 
6
6
  /**
@@ -635,7 +635,7 @@ class FiltersRows extends Filters {
635
635
  for (let i = 0; i < checkboxes.length; i++) {
636
636
  values.push(checkboxes[i]);
637
637
  }
638
- return kupData.cell.getValue({ rows: tmpRows }, column, true);
638
+ return kupData.cell.getUnivocalValue({ rows: tmpRows }, column, true);
639
639
  }
640
640
  }
641
641
 
@@ -1,5 +1,5 @@
1
1
  import { h, a as getAssetPath } from './index-e41330a5.js';
2
- import { K as KupThemeIconValues } from './kup-manager-86f440c7.js';
2
+ import { K as KupThemeIconValues } from './kup-manager-13b4f989.js';
3
3
 
4
4
  /*-------------------------------------------------*/
5
5
  /* C o m p o n e n t */
@@ -56,7 +56,9 @@ function setContent(props) {
56
56
  props.maxLength)) : undefined,
57
57
  !props.trailingIcon ? iconEl : undefined,
58
58
  props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
59
- h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onChange: (e) => {
59
+ h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth && !props.outlined
60
+ ? props.label
61
+ : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onChange: (e) => {
60
62
  if (props.decimals !== null &&
61
63
  props.inputType === 'number') {
62
64
  e.target.value = parseFloat(e.target.value).toFixed(props.decimals);