@sme.up/ketchup 7.0.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/cjs/{f-button-293afb08.js → f-button-40953600.js} +1 -1
  2. package/dist/cjs/{f-cell-06b323ca.js → f-cell-e603ae4f.js} +4 -4
  3. package/dist/cjs/{f-chip-1c944c07.js → f-chip-01efabde.js} +2 -2
  4. package/dist/cjs/{f-image-bfb4e4c9.js → f-image-f741cb4c.js} +1 -1
  5. package/dist/cjs/{f-paginator-utils-c9560cfd.js → f-paginator-utils-35a6a848.js} +15 -12
  6. package/dist/cjs/{f-text-field-e99c5a26.js → f-text-field-60a2f24c.js} +1 -1
  7. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/kup-autocomplete_26.cjs.entry.js +88 -26
  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 +6 -4
  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-1e882e61.js → kup-manager-6f05ebe1.js} +4 -1
  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-probe.cjs.entry.js +1 -1
  27. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
  29. package/dist/collection/assets/data-table.js +0 -44
  30. package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +7 -2
  31. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -0
  32. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +11 -9
  33. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  34. package/dist/collection/components/kup-data-table/kup-data-table.css +2 -1
  35. package/dist/collection/components/kup-data-table/kup-data-table.js +84 -11
  36. package/dist/collection/components/kup-echart/kup-echart.js +5 -3
  37. package/dist/collection/components/kup-form/kup-form.js +1 -1
  38. package/dist/collection/f-components/f-button/f-button.js +0 -1
  39. package/dist/collection/managers/kup-data/kup-data.js +3 -1
  40. package/dist/collection/utils/filters/filters-rows.js +2 -1
  41. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +6 -3
  42. package/dist/components/kup-autocomplete2.js +98 -30
  43. package/dist/components/kup-echart2.js +5 -3
  44. package/dist/esm/{f-button-4aad092d.js → f-button-9aec1bc5.js} +1 -1
  45. package/dist/esm/{f-cell-43ca8ab5.js → f-cell-556937d0.js} +4 -4
  46. package/dist/esm/{f-chip-94851217.js → f-chip-677db32a.js} +2 -2
  47. package/dist/esm/{f-image-48a4b032.js → f-image-52bb5950.js} +1 -1
  48. package/dist/esm/{f-paginator-utils-fe00f75c.js → f-paginator-utils-d472e336.js} +15 -12
  49. package/dist/esm/{f-text-field-b6f9ce84.js → f-text-field-88f92118.js} +1 -1
  50. package/dist/esm/kup-accordion.entry.js +2 -2
  51. package/dist/esm/kup-autocomplete_26.entry.js +88 -26
  52. package/dist/esm/kup-box.entry.js +7 -7
  53. package/dist/esm/kup-calendar.entry.js +4 -4
  54. package/dist/esm/kup-cell.entry.js +5 -5
  55. package/dist/esm/kup-dash-list.entry.js +1 -1
  56. package/dist/esm/kup-dash_2.entry.js +1 -1
  57. package/dist/esm/kup-dashboard.entry.js +4 -4
  58. package/dist/esm/kup-drawer.entry.js +1 -1
  59. package/dist/esm/kup-echart.entry.js +6 -4
  60. package/dist/esm/kup-family-tree.entry.js +3 -3
  61. package/dist/esm/kup-iframe.entry.js +1 -1
  62. package/dist/esm/kup-image-list.entry.js +6 -6
  63. package/dist/esm/kup-lazy.entry.js +1 -1
  64. package/dist/esm/kup-magic-box.entry.js +2 -2
  65. package/dist/esm/{kup-manager-07c9ba13.js → kup-manager-12e99c22.js} +4 -1
  66. package/dist/esm/kup-nav-bar.entry.js +1 -1
  67. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  68. package/dist/esm/kup-photo-frame.entry.js +1 -1
  69. package/dist/esm/kup-probe.entry.js +1 -1
  70. package/dist/esm/kup-qlik.entry.js +1 -1
  71. package/dist/esm/kup-snackbar.entry.js +3 -3
  72. package/dist/ketchup/ketchup.esm.js +1 -1
  73. package/dist/ketchup/{p-33429412.entry.js → p-053824eb.entry.js} +1 -1
  74. package/dist/ketchup/{p-122f51a0.entry.js → p-1c371df3.entry.js} +2 -2
  75. package/dist/ketchup/{p-c1a5ed6b.js → p-25617855.js} +1 -1
  76. package/dist/ketchup/{p-e8666a6d.js → p-278188bf.js} +1 -1
  77. package/dist/ketchup/{p-5f7da18e.entry.js → p-3a7a05a7.entry.js} +1 -1
  78. package/dist/ketchup/{p-2935f22d.entry.js → p-4021d751.entry.js} +1 -1
  79. package/dist/ketchup/{p-94e3b109.entry.js → p-485883cb.entry.js} +1 -1
  80. package/dist/ketchup/{p-200c76a8.js → p-4f7302a9.js} +1 -1
  81. package/dist/ketchup/{p-79936744.entry.js → p-52f19c4f.entry.js} +1 -1
  82. package/dist/ketchup/{p-5781af8a.js → p-5483f20e.js} +1 -1
  83. package/dist/ketchup/{p-4c92f0a4.entry.js → p-584369be.entry.js} +1 -1
  84. package/dist/ketchup/{p-69a9af60.entry.js → p-60609877.entry.js} +1 -1
  85. package/dist/ketchup/{p-eab86c09.entry.js → p-6a6c3e69.entry.js} +1 -1
  86. package/dist/ketchup/p-751b5708.js +1 -0
  87. package/dist/ketchup/{p-23f50851.entry.js → p-775e0d34.entry.js} +1 -1
  88. package/dist/ketchup/{p-772f4bb7.entry.js → p-7e013c24.entry.js} +1 -1
  89. package/dist/ketchup/p-85c7a3a4.js +1 -0
  90. package/dist/ketchup/{p-14aec9c8.entry.js → p-88adddcf.entry.js} +1 -1
  91. package/dist/ketchup/{p-02be3dd2.entry.js → p-94290b09.entry.js} +1 -1
  92. package/dist/ketchup/{p-86e4bfad.js → p-9570ebfa.js} +1 -1
  93. package/dist/ketchup/p-a3c849ae.entry.js +9 -0
  94. package/dist/ketchup/{p-ec2d1c8c.entry.js → p-ac33139e.entry.js} +1 -1
  95. package/dist/ketchup/{p-7134b172.entry.js → p-ad3e7b2b.entry.js} +1 -1
  96. package/dist/ketchup/{p-be7748e6.entry.js → p-c59e6bc7.entry.js} +1 -1
  97. package/dist/ketchup/{p-9f759d8d.entry.js → p-ce1da4a8.entry.js} +1 -1
  98. package/dist/ketchup/{p-3a55568c.entry.js → p-e0135ce0.entry.js} +1 -1
  99. package/dist/ketchup/{p-ab6c66f7.entry.js → p-e094ebb8.entry.js} +1 -1
  100. package/dist/ketchup/{p-10281712.entry.js → p-f44aba79.entry.js} +1 -1
  101. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +3 -1
  102. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  103. package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
  104. package/dist/types/components.d.ts +4 -0
  105. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +3 -1
  106. package/package.json +1 -1
  107. package/dist/ketchup/p-8f8b5a08.entry.js +0 -9
  108. package/dist/ketchup/p-984a05ff.js +0 -1
  109. package/dist/ketchup/p-e3b85cae.js +0 -1
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
- const fImage = require('./f-image-bfb4e4c9.js');
9
- const fButton = require('./f-button-293afb08.js');
8
+ const fImage = require('./f-image-f741cb4c.js');
9
+ const fButton = require('./f-button-40953600.js');
10
10
  const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
11
- const fCell = require('./f-cell-06b323ca.js');
11
+ const fCell = require('./f-cell-e603ae4f.js');
12
12
  const component = require('./component-72a5b626.js');
13
13
  require('./f-checkbox-1097ca5d.js');
14
- require('./f-text-field-e99c5a26.js');
15
- require('./f-chip-1c944c07.js');
14
+ require('./f-text-field-60a2f24c.js');
15
+ require('./f-chip-01efabde.js');
16
16
  require('./tslib.es6-0ee02c67.js');
17
17
 
18
18
  /**
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
8
 
9
9
  /**
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
8
- const fImage = require('./f-image-bfb4e4c9.js');
8
+ const fImage = require('./f-image-f741cb4c.js');
9
9
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
10
10
 
11
11
  /**
@@ -5772,6 +5772,7 @@ exports.KupDataTableProps = void 0;
5772
5772
  KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
5773
5773
  KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
5774
5774
  KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
5775
+ KupDataTableProps["selection"] = "Set the type of the rows selection.";
5775
5776
  KupDataTableProps["showDeleteButton"] = "Enables the delete row button.";
5776
5777
  KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
5777
5778
  KupDataTableProps["showFooter"] = "When set to true shows the footer.";
@@ -7744,7 +7745,9 @@ class KupData {
7744
7745
  }
7745
7746
  }
7746
7747
  }
7747
- else if (value === cell.value) {
7748
+ else if (value &&
7749
+ cell.value &&
7750
+ value.trim() === cell.value.trim()) {
7748
7751
  result.cells.push(cell);
7749
7752
  result.rows.push(row);
7750
7753
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
8
 
9
9
  const navbarClass = 'nav-bar';
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
- const fTextField = require('./f-text-field-e99c5a26.js');
8
+ const fTextField = require('./f-text-field-60a2f24c.js');
9
9
  const fTextFieldMdc = require('./f-text-field-mdc-85997738.js');
10
10
  require('./tslib.es6-0ee02c67.js');
11
11
  require('./component-72a5b626.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
8
 
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
8
 
9
9
  const KupProbe = class {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
 
8
8
  const kupQlikCss = ".kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height)/2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height)/3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height)*2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height)*3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-color, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";
9
9
 
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ffdb46f6.js');
6
- const kupManager = require('./kup-manager-1e882e61.js');
6
+ const kupManager = require('./kup-manager-6f05ebe1.js');
7
7
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
8
- const fButton = require('./f-button-293afb08.js');
8
+ const fButton = require('./f-button-40953600.js');
9
9
  require('./f-button-declarations-b611587f.js');
10
- require('./f-image-bfb4e4c9.js');
10
+ require('./f-image-f741cb4c.js');
11
11
 
12
12
  const snackbarClass = 'snackbar';
13
13
  /**
@@ -952,50 +952,6 @@ const mockedRows = [
952
952
  },
953
953
  },
954
954
  },
955
- {
956
- cells: {
957
- FLD1: {
958
- obj: {
959
- t: 'CN',
960
- p: 'COL',
961
- k: 'CASFRA',
962
- },
963
- value: 'CASFRA',
964
- },
965
- FLD2: {
966
- obj: {
967
- t: 'NR',
968
- p: '',
969
- k: '10',
970
- },
971
- value: '10',
972
- },
973
- FLD3: {
974
- obj: {
975
- t: 'NR',
976
- p: '',
977
- k: '100000.60',
978
- },
979
- value: '100,000.60',
980
- },
981
- FLD4: {
982
- obj: {
983
- t: 'D8',
984
- p: '*YYMD',
985
- k: '20181101',
986
- },
987
- value: '2018-11-01',
988
- },
989
- FLD5: {
990
- obj: {
991
- t: 'NR',
992
- p: 'P',
993
- k: '0',
994
- },
995
- value: '0.00',
996
- },
997
- },
998
- },
999
955
  {
1000
956
  cells: {
1001
957
  FLD1: {
@@ -15,10 +15,12 @@ export function prepareCalendar(component) {
15
15
  el.kupData = {};
16
16
  const obj = opts.initialValue;
17
17
  if (opts.initialValue) {
18
- if (obj && obj.k)
18
+ if (obj && obj.k) {
19
19
  setValue(component, new Date(obj.k));
20
- else
20
+ }
21
+ else {
21
22
  setValue(component, new Date(opts.initialValue));
23
+ }
22
24
  }
23
25
  if (opts.firstDayIndex)
24
26
  el.kupData.firstDayIndex = opts.firstDayIndex;
@@ -73,6 +75,9 @@ export function prepareCalendar(component) {
73
75
  return (h("div", { id: component.rootElement.id + '_calendar' }, h("div", { class: "section-1" }, h("div", { class: "sub-1 nav" }, prevButtonComp, h(FButton, Object.assign({}, changeViewButtonProp)), nextButtonComp)), h("div", { class: "section-2" }, createCalendar(component))));
74
76
  }
75
77
  function setValue(component, value) {
78
+ if (!!(value instanceof Date)) {
79
+ value = new Date();
80
+ }
76
81
  const el = component.rootElement;
77
82
  el.kupData.value = value;
78
83
  el.kupData.day = el.kupData.value.getDate();
@@ -42,6 +42,7 @@ export var KupDataTableProps;
42
42
  KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
43
43
  KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
44
44
  KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
45
+ KupDataTableProps["selection"] = "Set the type of the rows selection.";
45
46
  KupDataTableProps["showDeleteButton"] = "Enables the delete row button.";
46
47
  KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
47
48
  KupDataTableProps["showFooter"] = "When set to true shows the footer.";
@@ -768,15 +768,17 @@ function cloneRow(row) {
768
768
  if (row == null) {
769
769
  return null;
770
770
  }
771
- let cloned = {
772
- id: row.id,
773
- cells: Object.assign({}, row.cells),
774
- actions: row.actions ? [...row.actions] : null,
775
- group: cloneRowGroup(row.group),
776
- readOnly: row.readOnly,
777
- cssClass: row.cssClass,
778
- };
779
- return cloned;
771
+ else {
772
+ return {
773
+ id: row.id,
774
+ cells: Object.assign({}, row.cells),
775
+ actions: row.actions ? [...row.actions] : null,
776
+ group: cloneRowGroup(row.group),
777
+ clonedFrom: row,
778
+ readOnly: row.readOnly,
779
+ cssClass: row.cssClass,
780
+ };
781
+ }
780
782
  }
781
783
  function cloneRows(rows) {
782
784
  if (rows == null) {
@@ -5,8 +5,8 @@ export class KupDataTableState {
5
5
  this.expandGroups = false;
6
6
  this.groupLabelDisplay = GroupLabelDisplayMode.BOTH;
7
7
  this.density = 'small';
8
- this.enableExtraColumns = true;
9
8
  this.enableSortableColumns = false;
9
+ this.enableExtraColumns = true;
10
10
  this.forceOneLine = false;
11
11
  this.globalFilter = false;
12
12
  this.globalFilterValue = '';
@@ -420,7 +420,8 @@ th.obj:hover span:not(.overlay-action) {
420
420
  }
421
421
 
422
422
  .insert-button,
423
- .delete-button {
423
+ .delete-button,
424
+ .save-button {
424
425
  padding: 1em 0.5em;
425
426
  }
426
427
 
@@ -480,7 +480,11 @@ export class KupDataTable {
480
480
  for (let index = 0; index < currentRows.length; index++) {
481
481
  const row = currentRows[index];
482
482
  if (ids.includes(row.id)) {
483
- deletedRows.push(row);
483
+ const r = row.clonedFrom ? row.clonedFrom : row;
484
+ deletedRows.push(r);
485
+ if (this.selectedRows.includes(row)) {
486
+ this.selectedRows.splice(this.selectedRows.indexOf(row), 1);
487
+ }
484
488
  }
485
489
  else {
486
490
  newRows.push(row);
@@ -569,7 +573,16 @@ export class KupDataTable {
569
573
  * This method will get the selected rows of the component.
570
574
  */
571
575
  async getSelectedRows() {
572
- return this.selectedRows;
576
+ const selRows = [];
577
+ this.selectedRows.forEach((row) => {
578
+ if (row.clonedFrom) {
579
+ selRows.push(row.clonedFrom);
580
+ }
581
+ else {
582
+ selRows.push(row);
583
+ }
584
+ });
585
+ return selRows;
573
586
  }
574
587
  /**
575
588
  * Hides the given column.
@@ -647,7 +660,7 @@ export class KupDataTable {
647
660
  */
648
661
  async refresh(recalcRows) {
649
662
  if (recalcRows) {
650
- this.recalculateRowsAndUndoSelections();
663
+ __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
651
664
  }
652
665
  forceUpdate(this);
653
666
  }
@@ -1192,7 +1205,24 @@ export class KupDataTable {
1192
1205
  if (this.tableHeight !== undefined || this.tableWidth !== undefined) {
1193
1206
  belowClass += ' custom-size';
1194
1207
  }
1195
- const compCreated = (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: "above-wrapper" }, this.globalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
1208
+ const autoselectOnAction = (e) => {
1209
+ if (e && e.detail && e.detail.row) {
1210
+ const row = e.detail.row;
1211
+ if (!this.selectedRows.includes(row)) {
1212
+ if (this.selection === SelectionMode.MULTIPLE_CHECKBOX ||
1213
+ this.selection === SelectionMode.MULTIPLE) {
1214
+ this.selectedRows.push(row);
1215
+ }
1216
+ else {
1217
+ this.selectedRows = [row];
1218
+ }
1219
+ }
1220
+ if (e.type === 'kup-cell-input') {
1221
+ this.refresh();
1222
+ }
1223
+ }
1224
+ };
1225
+ const compCreated = (h(Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, h("style", null, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: "above-wrapper" }, this.globalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
1196
1226
  const t = event.target;
1197
1227
  window.clearTimeout(__classPrivateFieldGet(this, _KupDataTable_globalFilterTimeout, "f"));
1198
1228
  __classPrivateFieldSet(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
@@ -1214,14 +1244,22 @@ export class KupDataTable {
1214
1244
  value: '',
1215
1245
  };
1216
1246
  }
1217
- this.data.rows.unshift({
1247
+ const row = {
1218
1248
  cells,
1219
1249
  id: __classPrivateFieldGet(this, _KupDataTable_INSERT_PREFIX, "f") +
1220
1250
  __classPrivateFieldGet(this, _KupDataTable_insertCount, "f"),
1221
- });
1251
+ };
1252
+ this.data.rows.unshift(row);
1222
1253
  await this.refresh(true);
1223
1254
  }
1224
- }, styling: FButtonStyling.OUTLINED, title: "Insert row", wrapperClass: "insert-button" })) : null, this.showDeleteButton &&
1255
+ }, styling: FButtonStyling.OUTLINED, title: "Insert row", wrapperClass: "insert-button" })) : null, this.insertMode !== '' &&
1256
+ this.selectedRows.length > 0 ? (h(FButton, { icon: "save", onClick: () => {
1257
+ this.kupSave.emit({
1258
+ comp: this,
1259
+ id: this.rootElement.id,
1260
+ selectedRows: this.selectedRows,
1261
+ });
1262
+ }, styling: FButtonStyling.OUTLINED, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
1225
1263
  this.selectedRows.length > 0 ? (h(FButton, { icon: "delete", onClick: () => {
1226
1264
  __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_rowsDelete).call(this);
1227
1265
  }, styling: FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
@@ -2627,6 +2665,26 @@ export class KupDataTable {
2627
2665
  }
2628
2666
  }
2629
2667
  }
2668
+ }, {
2669
+ "method": "kupSave",
2670
+ "name": "kup-datatable-save",
2671
+ "bubbles": true,
2672
+ "cancelable": false,
2673
+ "composed": true,
2674
+ "docs": {
2675
+ "tags": [],
2676
+ "text": "Event fired when the save button is pressed."
2677
+ },
2678
+ "complexType": {
2679
+ "original": "KupDatatableInsertRowEventPayload",
2680
+ "resolved": "KupDatatableInsertRowEventPayload",
2681
+ "references": {
2682
+ "KupDatatableInsertRowEventPayload": {
2683
+ "location": "import",
2684
+ "path": "./kup-data-table-declarations"
2685
+ }
2686
+ }
2687
+ }
2630
2688
  }, {
2631
2689
  "method": "kupInsertRow",
2632
2690
  "name": "kup-datatable-insert-row",
@@ -3325,12 +3383,27 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
3325
3383
  __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
3326
3384
  }
3327
3385
  }, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
3328
- if (typeof id === 'number') {
3329
- return this.data.rows[id];
3386
+ let row = null;
3387
+ const search = (rows) => {
3388
+ if (rows && rows.length > 0 && !row) {
3389
+ test(rows);
3390
+ }
3391
+ };
3392
+ const test = (rows) => {
3393
+ if (typeof id === 'number') {
3394
+ row = rows[id];
3395
+ }
3396
+ else {
3397
+ row = rows.find((row) => row.id === id);
3398
+ }
3399
+ };
3400
+ if (__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
3401
+ __classPrivateFieldGet(this, _KupDataTable_paginatedRows, "f").forEach((row) => search(row.group.children));
3330
3402
  }
3331
3403
  else {
3332
- return this.data.rows.find((row) => row.id === id);
3404
+ test(__classPrivateFieldGet(this, _KupDataTable_rows, "f"));
3333
3405
  }
3406
+ return row;
3334
3407
  }, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
3335
3408
  if (column) {
3336
3409
  this.filters = {};
@@ -4078,7 +4151,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
4078
4151
  this.kupInsertRow.emit({
4079
4152
  comp: this,
4080
4153
  id: this.rootElement.id,
4081
- row: row,
4154
+ selectedRows: [row],
4082
4155
  });
4083
4156
  });
4084
4157
  buttonWrapper.append(cancel);
@@ -835,11 +835,13 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
835
835
  let objKey;
836
836
  if (this.axis) {
837
837
  for (const row of this.data.rows) {
838
- objKey = row.cells[this.axis].value;
839
- y[objKey] = [];
838
+ objKey = row.cells[this.axis].value.trim();
839
+ if (!y[objKey]) {
840
+ y[objKey] = [];
841
+ }
840
842
  for (const key of Object.keys(row.cells)) {
841
843
  const cell = row.cells[key];
842
- const value = cell.value;
844
+ const value = cell.value.trim();
843
845
  if (!this.axis.includes(key)) {
844
846
  if (this.series &&
845
847
  this.series.length > 0 &&
@@ -222,7 +222,7 @@ export class KupForm {
222
222
  if (isGrid) {
223
223
  sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
224
224
  }
225
- return (h("div", { class: sectionClass, style: sectionStyle }, section.title ? h("h3", null, section.title) : null, h("table", null, h("tbody", null, section.horizontal ? (h("tr", null, sectionContent)) : (sectionContent)))));
225
+ return (h("div", { class: sectionClass, style: sectionStyle }, section.title ? h("h3", null, section.title) : null, section.horizontal ? (sectionContent) : (h("table", null, h("tbody", null, sectionContent)))));
226
226
  }
227
227
  renderFormField({ formField, row, visibleColumns, }, section) {
228
228
  var _a;
@@ -1,7 +1,6 @@
1
1
  import { h } from '@stencil/core';
2
2
  import { FButtonStyling } from './f-button-declarations';
3
3
  import { FImage } from '../f-image/f-image';
4
- const dom = document.documentElement;
5
4
  /*-------------------------------------------------*/
6
5
  /* C o m p o n e n t */
7
6
  /*-------------------------------------------------*/
@@ -223,7 +223,9 @@ export class KupData {
223
223
  }
224
224
  }
225
225
  }
226
- else if (value === cell.value) {
226
+ else if (value &&
227
+ cell.value &&
228
+ value.trim() === cell.value.trim()) {
227
229
  result.cells.push(cell);
228
230
  result.rows.push(row);
229
231
  }
@@ -185,7 +185,8 @@ export class FiltersRows extends Filters {
185
185
  isUsingGlobalFilter) {
186
186
  for (let i = 0; i < rows.length; i++) {
187
187
  let r = rows[i];
188
- if (this.isRowCompliant(r, filters, globalFilter, isUsingGlobalFilter, columns, columnFilters)) {
188
+ if ((r.id && r.id.indexOf('insert_') > -1) ||
189
+ this.isRowCompliant(r, filters, globalFilter, isUsingGlobalFilter, columns, columnFilters)) {
189
190
  filteredRows[filteredRows.length] = r;
190
191
  }
191
192
  }
@@ -86,7 +86,7 @@ export class KupColumnMenu {
86
86
  : column.obj
87
87
  ? [column.obj]
88
88
  : null;
89
- data.switch = this.prepSwitch(comp, column);
89
+ data.switch = this.prepSwitch(comp, column, data.object);
90
90
  if (!currentData) {
91
91
  data.tabbar = this.prepTabBar(comp, column);
92
92
  data.text = [column.title];
@@ -241,12 +241,15 @@ export class KupColumnMenu {
241
241
  * Handles the column menu's switch prop.
242
242
  * @param {KupDataTable | KupTree} comp - Component using the column menu.
243
243
  * @param {KupDataColumn} column - Column of the menu.
244
+ * @param {KupObj[]} objs - Column's objs.
244
245
  * @returns {GenericObject[]} Switches props.
245
246
  */
246
- prepSwitch(comp, column) {
247
+ prepSwitch(comp, column, objs) {
247
248
  const props = [];
248
249
  if (!FiltersColumnMenu.isTree(comp)) {
249
- if (!dom.ketchup.objects.isEmptyKupObj(column.obj)) {
250
+ if (objs &&
251
+ objs.length > 0 &&
252
+ !dom.ketchup.objects.isEmptyKupObj(objs[0])) {
250
253
  props.push({
251
254
  'data-storage': {
252
255
  columnName: column.name,