@sme.up/ketchup 5.2.0-SNAPSHOT → 6.0.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.
- package/dist/cjs/{cell-utils-5b16c180.js → cell-utils-a78d6fac.js} +2 -2
- package/dist/cjs/{component-d1496215.js → component-72a5b626.js} +30 -0
- package/dist/cjs/{f-button-3b9f32af.js → f-button-ac179257.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-69294bca.js} +33 -121
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-b00897d7.js} +5 -4
- package/dist/cjs/{f-image-08a3d340.js → f-image-89f25556.js} +2 -2
- package/dist/cjs/f-paginator-utils-8fa501b3.js +1898 -0
- package/dist/cjs/f-text-field-e1e45ade.js +94 -0
- package/dist/cjs/f-text-field-mdc-85997738.js +2570 -0
- package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
- package/dist/cjs/{kup-autocomplete_27.cjs.entry.js → kup-autocomplete_25.cjs.entry.js} +1788 -8378
- package/dist/cjs/{kup-echart.cjs.entry.js → kup-box_2.cjs.entry.js} +17102 -14788
- package/dist/cjs/kup-calendar.cjs.entry.js +42 -34
- package/dist/cjs/kup-cell.cjs.entry.js +8 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
- package/dist/cjs/kup-drawer.cjs.entry.js +12 -5
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +228 -0
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/kup-manager-7a941909.js +16703 -0
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-b9df398c.js → utils-6287d878.js} +1 -1
- package/dist/collection/assets/card.js +4 -5
- package/dist/collection/assets/data-table.js +44 -79
- package/dist/collection/assets/form-editor.js +338 -0
- package/dist/collection/assets/image-list.js +624 -0
- package/dist/collection/assets/index.js +16 -0
- package/dist/collection/assets/kupdata.js +0 -3
- package/dist/collection/assets/kuptooltip.js +654 -0
- package/dist/collection/assets/tree.js +0 -128
- package/dist/collection/collection-manifest.json +8 -6
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
- package/dist/collection/components/kup-box/kup-box-declarations.js +0 -4
- package/dist/collection/components/kup-box/kup-box.js +7 -135
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +61 -8
- package/dist/collection/components/kup-card/kup-card.js +2 -2
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +14 -6
- package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -3
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +50 -138
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
- package/dist/collection/components/kup-drawer/kup-drawer.js +8 -1
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
- package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +166 -0
- package/dist/collection/components/kup-image-list/kup-image-list.js +432 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +3 -13
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +18 -19
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +2 -2
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -4
- package/dist/collection/components/kup-tree/kup-tree.css +10 -3
- package/dist/collection/components/kup-tree/kup-tree.js +81 -145
- package/dist/collection/f-components/f-cell/f-cell.js +7 -7
- package/dist/collection/f-components/f-chip/f-chip.js +2 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +24 -0
- package/dist/collection/managers/kup-data/kup-data.js +4 -1
- package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +4 -2
- package/dist/collection/managers/kup-interact/kup-interact.js +1 -22
- package/dist/collection/managers/kup-language/kup-language-declarations.js +2 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +31 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +6 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +224 -0
- package/dist/collection/types/GenericTypes.js +3 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +8 -12
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-964da6b5.js} +3 -3
- package/dist/esm/{component-c4eb6153.js → component-b1bedf1d.js} +27 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-871a544b.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-521ef17a.js} +33 -120
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-1dda722f.js} +6 -5
- package/dist/esm/{f-image-de331954.js → f-image-c468d8ae.js} +2 -2
- package/dist/esm/f-paginator-utils-7dff8ff0.js +1884 -0
- package/dist/esm/f-text-field-d6c61c73.js +92 -0
- package/dist/esm/f-text-field-mdc-d42d3f9e.js +2568 -0
- package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +6 -6
- package/dist/esm/{kup-autocomplete_27.entry.js → kup-autocomplete_25.entry.js} +1724 -8312
- package/dist/esm/{kup-echart.entry.js → kup-box_2.entry.js} +17102 -14789
- package/dist/esm/kup-calendar.entry.js +43 -35
- package/dist/esm/kup-cell.entry.js +8 -7
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +3 -3
- package/dist/esm/kup-drawer.entry.js +12 -5
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form-editor.entry.js +400 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +224 -0
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/kup-manager-58b075b4.js +16686 -0
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +5 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{tslib.es6-8f2d44b6.js → tslib.es6-3eea2234.js} +1 -1
- package/dist/esm/{utils-35c7a90d.js → utils-d7e4b3c2.js} +2 -2
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-5d190cf5.js → p-1ae66cc5.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-3c11e615.entry.js} +1 -1
- package/dist/ketchup/p-44ec4f03.js +1 -0
- package/dist/ketchup/p-4ffbc3ff.js +1 -0
- package/dist/ketchup/p-5264a3e6.entry.js +1 -0
- package/dist/ketchup/{p-d7af8156.entry.js → p-65974e48.entry.js} +1 -1
- package/dist/ketchup/p-65b46587.entry.js +40 -0
- package/dist/ketchup/{p-3813281b.entry.js → p-6dff70f8.entry.js} +1 -1
- package/dist/ketchup/{p-33073f4a.js → p-7454cb92.js} +1 -1
- package/dist/ketchup/{p-a0b1d769.js → p-79b0730b.js} +1 -1
- package/dist/ketchup/p-7eff4eee.js +1 -0
- package/dist/ketchup/p-80968627.entry.js +1 -0
- package/dist/ketchup/{p-8c44c3b9.js → p-81605f08.js} +4 -5
- package/dist/ketchup/p-8cdf61a4.js +1 -0
- package/dist/ketchup/{p-f9c41e20.entry.js → p-954cc340.entry.js} +1 -1
- package/dist/ketchup/p-99e0d768.entry.js +1 -0
- package/dist/ketchup/{p-8f735633.entry.js → p-a0f6e25c.entry.js} +1 -1
- package/dist/ketchup/p-a203f78b.js +45 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-a615a92b.entry.js} +1 -1
- package/dist/ketchup/p-aca0e54b.js +30 -0
- package/dist/ketchup/p-b8939a8b.entry.js +1 -0
- package/dist/ketchup/p-bfc3bac7.js +1 -0
- package/dist/ketchup/{p-67c64257.entry.js → p-c5ce8951.entry.js} +1 -1
- package/dist/ketchup/p-cad1e097.entry.js +9 -0
- package/dist/ketchup/{p-68fc1428.entry.js → p-d2ee56dd.entry.js} +1 -1
- package/dist/ketchup/p-db71436b.entry.js +27 -0
- package/dist/ketchup/{p-10c8d755.js → p-e0035c58.js} +1 -1
- package/dist/ketchup/p-e1039cf2.entry.js +1 -0
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-ea10176c.entry.js} +1 -1
- package/dist/ketchup/p-f09f2f98.entry.js +1 -0
- package/dist/ketchup/{p-0751aaf6.entry.js → p-f71a1675.entry.js} +1 -1
- package/dist/ketchup/{p-4081f5f7.entry.js → p-fac1a08b.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +3 -5
- package/dist/types/components/kup-box/kup-box.d.ts +0 -22
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +4 -4
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +5 -19
- package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
- package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
- package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +56 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +3 -9
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +6 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -5
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -25
- package/dist/types/components.d.ts +265 -232
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +7 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +2 -0
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +14 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +14 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -0
- package/dist/types/types/GenericTypes.d.ts +3 -0
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +1 -3
- package/package.json +16 -15
- package/dist/cjs/kup-manager-4227f0a2.js +0 -8582
- package/dist/collection/assets/tooltip.js +0 -73
- package/dist/collection/components/kup-tooltip/kup-tooltip-declarations.js +0 -20
- package/dist/collection/components/kup-tooltip/kup-tooltip.css +0 -149
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +0 -1205
- package/dist/collection/utils/helpers.js +0 -38
- package/dist/esm/kup-manager-0ab94726.js +0 -8565
- package/dist/ketchup/p-24df4f29.entry.js +0 -27
- package/dist/ketchup/p-2d4f19f4.js +0 -1
- package/dist/ketchup/p-3445be1e.entry.js +0 -1
- package/dist/ketchup/p-3aab1f0d.entry.js +0 -1
- package/dist/ketchup/p-47b57d97.js +0 -1
- package/dist/ketchup/p-5186885c.entry.js +0 -1
- package/dist/ketchup/p-78223dc0.entry.js +0 -143
- package/dist/ketchup/p-96101f09.entry.js +0 -39
- package/dist/ketchup/p-c314b1e6.js +0 -1
- package/dist/ketchup/p-ee33cbe9.js +0 -9
- package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +0 -93
- package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +0 -142
- package/dist/types/utils/helpers.d.ts +0 -4
|
@@ -70,3 +70,27 @@ export function toStreamNode(nodes) {
|
|
|
70
70
|
}
|
|
71
71
|
return streamlined;
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns the parent of the given node.
|
|
75
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
76
|
+
* @param {KupDataNode} child - Child node.
|
|
77
|
+
* @returns {KupDataNode} Parent node.
|
|
78
|
+
*/
|
|
79
|
+
export function getParentNode(nodes, child) {
|
|
80
|
+
let parent = null;
|
|
81
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
82
|
+
const node = nodes[index];
|
|
83
|
+
recursive(node);
|
|
84
|
+
function recursive(node) {
|
|
85
|
+
const hasChildren = !!node.children;
|
|
86
|
+
if (hasChildren && node.children.includes(child)) {
|
|
87
|
+
parent = node;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
for (let index = 0; !parent && hasChildren && index < node.children.length; index++) {
|
|
91
|
+
recursive(node.children[index]);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return parent;
|
|
96
|
+
}
|
|
@@ -2,7 +2,7 @@ import { KupDataNewColumnTypes, } from './kup-data-declarations';
|
|
|
2
2
|
import { findCell, getCellValue, replaceCell } from './kup-data-cell-helper';
|
|
3
3
|
import { findColumns, hideColumns, newColumn } from './kup-data-column-helper';
|
|
4
4
|
import { findRow, toNode } from './kup-data-row-helper';
|
|
5
|
-
import { removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
|
|
5
|
+
import { getParentNode, removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
|
|
6
6
|
import { fieldColumn } from '../../components/kup-data-table/kup-data-table-declarations';
|
|
7
7
|
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
8
8
|
const dom = document.documentElement;
|
|
@@ -35,6 +35,9 @@ export class KupData {
|
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
37
|
this.node = {
|
|
38
|
+
getParent(nodes, child) {
|
|
39
|
+
return getParentNode(nodes, child);
|
|
40
|
+
},
|
|
38
41
|
remove(nodes, node2remove) {
|
|
39
42
|
return removeNode(nodes, node2remove);
|
|
40
43
|
},
|
|
@@ -279,6 +279,7 @@ export class KupDebug {
|
|
|
279
279
|
break;
|
|
280
280
|
case 'kup-debug-locale-changer':
|
|
281
281
|
dom.ketchup.dates.setLocale(compEvent.detail.value);
|
|
282
|
+
dom.ketchup.math.setLocale(compEvent.detail.value);
|
|
282
283
|
break;
|
|
283
284
|
case 'kup-debug-theme-changer':
|
|
284
285
|
dom.ketchup.theme.set(compEvent.detail.value);
|
|
@@ -188,7 +188,8 @@ export class KupDynamicPosition {
|
|
|
188
188
|
el.style.top = `${bottom + el.kupDynamicPosition.margin}px`;
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
|
-
if (
|
|
191
|
+
if (offsetH < rect.top &&
|
|
192
|
+
window.innerHeight - rect.bottom < offsetH) {
|
|
192
193
|
el.style.bottom = `${window.innerHeight - top + el.kupDynamicPosition.margin}px`;
|
|
193
194
|
}
|
|
194
195
|
else {
|
|
@@ -217,7 +218,8 @@ export class KupDynamicPosition {
|
|
|
217
218
|
el.style.right = `${window.innerWidth - scrollbarWidth - right}px`;
|
|
218
219
|
}
|
|
219
220
|
else {
|
|
220
|
-
if (
|
|
221
|
+
if (offsetW < rect.right &&
|
|
222
|
+
window.innerWidth - rect.left < offsetW) {
|
|
221
223
|
let scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
222
224
|
if (scrollbarWidth > 30) {
|
|
223
225
|
scrollbarWidth = 0;
|
|
@@ -106,7 +106,6 @@ export class KupInteract {
|
|
|
106
106
|
break;
|
|
107
107
|
case KupDragEffect.CLONE:
|
|
108
108
|
ghostImage = draggable.cloneNode(true);
|
|
109
|
-
setComputedStyle(draggable, ghostImage);
|
|
110
109
|
ghostImage.style.cursor = 'grabbing';
|
|
111
110
|
ghostImage.style.height = draggable.clientHeight + 'px';
|
|
112
111
|
ghostImage.style.left =
|
|
@@ -120,7 +119,7 @@ export class KupInteract {
|
|
|
120
119
|
ghostImage.style.width = draggable.clientWidth + 'px';
|
|
121
120
|
ghostImage.style.zIndex =
|
|
122
121
|
'calc(var(--kup-navbar-zindex) + 1)';
|
|
123
|
-
|
|
122
|
+
draggable.parentElement.appendChild(ghostImage);
|
|
124
123
|
draggable.kupDragDrop.ghostImage = ghostImage;
|
|
125
124
|
break;
|
|
126
125
|
}
|
|
@@ -145,26 +144,6 @@ export class KupInteract {
|
|
|
145
144
|
};
|
|
146
145
|
interact(el).draggable(options);
|
|
147
146
|
this.managedElements.add(el);
|
|
148
|
-
function setComputedStyle(draggable, ghostImage) {
|
|
149
|
-
recursive(draggable, ghostImage);
|
|
150
|
-
function recursive(source, target) {
|
|
151
|
-
const styles = getComputedStyle(source);
|
|
152
|
-
for (const key in styles) {
|
|
153
|
-
if (Object.prototype.hasOwnProperty.call(styles, key)) {
|
|
154
|
-
const s = styles[key];
|
|
155
|
-
try {
|
|
156
|
-
target.style[s] = styles[s];
|
|
157
|
-
}
|
|
158
|
-
catch (error) { }
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
for (let index = 0; index < source.children.length; index++) {
|
|
162
|
-
const sourceChild = source.children[index];
|
|
163
|
-
const targetChild = target.children[index];
|
|
164
|
-
recursive(sourceChild, targetChild);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
147
|
}
|
|
169
148
|
/**
|
|
170
149
|
* Sets up a new dropzone.
|
|
@@ -82,6 +82,7 @@ export var KupLanguageGeneric;
|
|
|
82
82
|
(function (KupLanguageGeneric) {
|
|
83
83
|
KupLanguageGeneric["ADD_NEW"] = "genericAddNew";
|
|
84
84
|
KupLanguageGeneric["APPLY"] = "genericApply";
|
|
85
|
+
KupLanguageGeneric["BACK"] = "genericBack";
|
|
85
86
|
KupLanguageGeneric["COLLAPSE"] = "genericCollapse";
|
|
86
87
|
KupLanguageGeneric["DAY"] = "genericDay";
|
|
87
88
|
KupLanguageGeneric["DRAG_AND_DROP"] = "genericDragAndDrop";
|
|
@@ -116,6 +117,7 @@ export var KupLanguageGeneric;
|
|
|
116
117
|
KupLanguageGeneric["SWAP"] = "genericSwap";
|
|
117
118
|
KupLanguageGeneric["TOGGLE"] = "genericToggle";
|
|
118
119
|
KupLanguageGeneric["TODAY"] = "genericToday";
|
|
120
|
+
KupLanguageGeneric["TOP"] = "genericTop";
|
|
119
121
|
KupLanguageGeneric["TOTALS_TABLE"] = "genericTotalsTable";
|
|
120
122
|
KupLanguageGeneric["TRANSPOSE_DATA"] = "genericTransposeData";
|
|
121
123
|
KupLanguageGeneric["VIEW_AS"] = "genericViewAs";
|
|
@@ -15,6 +15,9 @@ import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
|
15
15
|
import { KupSearch } from '../kup-search/kup-search';
|
|
16
16
|
import { KupMathLocales } from '../kup-math/kup-math-declarations';
|
|
17
17
|
import { KupMath } from '../kup-math/kup-math';
|
|
18
|
+
import { KupTooltip } from '../kup-tooltip/kup-tooltip';
|
|
19
|
+
import { setAssetPath } from '@stencil/core';
|
|
20
|
+
import html2canvas from 'html2canvas';
|
|
18
21
|
const dom = document.documentElement;
|
|
19
22
|
/**
|
|
20
23
|
* This class controls every other Ketchup utility suite.
|
|
@@ -25,8 +28,9 @@ export class KupManager {
|
|
|
25
28
|
* Initializes KupManager.
|
|
26
29
|
*/
|
|
27
30
|
constructor(overrides) {
|
|
28
|
-
let datesLocale = null, debugActive = null, debugAutoprint = null, debugLogLimit = null, dialogRestrictContainer = null, dialogZIndex = null, languageList = null, languageName = null, objectsList = null, scrollOnHoverDelay = null, scrollOnHoverStep = null, themeList = null, themeName = null;
|
|
31
|
+
let datesLocale = null, debugActive = null, debugAutoprint = null, debugLogLimit = null, dialogRestrictContainer = null, dialogZIndex = null, languageList = null, languageName = null, objectsList = null, scrollOnHoverDelay = null, scrollOnHoverStep = null, themeList = null, themeName = null, tooltipDelay = null, tooltipFCellCallbacks = null;
|
|
29
32
|
if (overrides) {
|
|
33
|
+
const assetsPath = overrides.assetsPath;
|
|
30
34
|
const dates = overrides.dates;
|
|
31
35
|
const debug = overrides.debug;
|
|
32
36
|
const interact = overrides.interact;
|
|
@@ -34,6 +38,10 @@ export class KupManager {
|
|
|
34
38
|
const objects = overrides.objects;
|
|
35
39
|
const scrollOnHover = overrides.scrollOnHover;
|
|
36
40
|
const theme = overrides.theme;
|
|
41
|
+
const tooltip = overrides.tooltip;
|
|
42
|
+
if (assetsPath) {
|
|
43
|
+
setAssetPath(assetsPath);
|
|
44
|
+
}
|
|
37
45
|
if (dates) {
|
|
38
46
|
datesLocale = dates.locale ? dates.locale : null;
|
|
39
47
|
}
|
|
@@ -67,6 +75,12 @@ export class KupManager {
|
|
|
67
75
|
themeList = theme.list ? theme.list : null;
|
|
68
76
|
themeName = theme.name ? theme.name : null;
|
|
69
77
|
}
|
|
78
|
+
if (tooltip) {
|
|
79
|
+
tooltipDelay = tooltip.delay ? tooltip.delay : null;
|
|
80
|
+
tooltipFCellCallbacks = tooltip.fCellCallbacks
|
|
81
|
+
? tooltip.fCellCallbacks
|
|
82
|
+
: null;
|
|
83
|
+
}
|
|
70
84
|
}
|
|
71
85
|
this.data = new KupData();
|
|
72
86
|
this.dates = new KupDates(datesLocale);
|
|
@@ -102,6 +116,7 @@ export class KupManager {
|
|
|
102
116
|
};
|
|
103
117
|
this.theme = new KupTheme(themeList, themeName);
|
|
104
118
|
this.toolbar = new KupToolbar();
|
|
119
|
+
this.tooltip = new KupTooltip(tooltipDelay, tooltipFCellCallbacks);
|
|
105
120
|
document.addEventListener('pointerdown', (e) => {
|
|
106
121
|
const paths = e.composedPath();
|
|
107
122
|
const lastString = paths[0].innerText || paths[0].value;
|
|
@@ -218,6 +233,21 @@ export class KupManager {
|
|
|
218
233
|
this.utilities.clickCallbacks.add(cb);
|
|
219
234
|
}
|
|
220
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* Rasterizes an HTMLElement, transforming into a canvas.
|
|
238
|
+
* @param {HTMLElement} el - Element to rasterize.
|
|
239
|
+
* @returns {HTMLCanvasElement} - Canvas created from the HTMLElement.
|
|
240
|
+
*
|
|
241
|
+
* CSS Mask is not supported:
|
|
242
|
+
* @see https://github.com/niklasvh/html2canvas/issues/2814
|
|
243
|
+
* Warning in console about sourcemap, claimed to be solved here but...:
|
|
244
|
+
* @see https://github.com/niklasvh/html2canvas/pull/2787/files
|
|
245
|
+
*/
|
|
246
|
+
async rasterize(el, options) {
|
|
247
|
+
return html2canvas(el, options).then((canvas) => {
|
|
248
|
+
return canvas;
|
|
249
|
+
});
|
|
250
|
+
}
|
|
221
251
|
/**
|
|
222
252
|
* Removes the given click callback.
|
|
223
253
|
* @param {KupManagerClickCb} cb - The callback to remove.
|
|
@@ -6,7 +6,7 @@ import 'numeral/locales/it';
|
|
|
6
6
|
import 'numeral/locales/pl';
|
|
7
7
|
import 'numeral/locales/ru';
|
|
8
8
|
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
9
|
-
import { KupMathLocales } from './kup-math-declarations';
|
|
9
|
+
import { KupMathLocales, } from './kup-math-declarations';
|
|
10
10
|
import { customFormula, normalDistributionFormula } from './kup-math-helper';
|
|
11
11
|
const dom = document.documentElement;
|
|
12
12
|
/**
|
|
@@ -26,6 +26,16 @@ export class KupMath {
|
|
|
26
26
|
return normalDistributionFormula(average, variance, x);
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
|
+
this.numbers = {
|
|
30
|
+
toLocaleString(value) {
|
|
31
|
+
const maximumFractionDigits = 14;
|
|
32
|
+
if (value == null || value == '')
|
|
33
|
+
return value;
|
|
34
|
+
return Number(value).toLocaleString(dom.ketchup.math.locale, {
|
|
35
|
+
maximumFractionDigits: maximumFractionDigits,
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
};
|
|
29
39
|
this.locale = locale ? locale : KupMathLocales.en;
|
|
30
40
|
this.managedComponents = new Set();
|
|
31
41
|
this.numeral = numeral;
|
|
@@ -14,6 +14,8 @@ export const fButtonUsers = [
|
|
|
14
14
|
KupTagNames.CARD,
|
|
15
15
|
KupTagNames.DATA_TABLE,
|
|
16
16
|
KupTagNames.DROPDOWN_BUTTON,
|
|
17
|
+
KupTagNames.FORM_EDITOR,
|
|
18
|
+
KupTagNames.IMAGE_LIST,
|
|
17
19
|
KupTagNames.SNACKBAR,
|
|
18
20
|
];
|
|
19
21
|
/**
|
|
@@ -62,7 +64,9 @@ export const fImageUsers = [
|
|
|
62
64
|
KupTagNames.CHIP,
|
|
63
65
|
KupTagNames.DATA_TABLE,
|
|
64
66
|
KupTagNames.DROPDOWN_BUTTON,
|
|
67
|
+
KupTagNames.FORM_EDITOR,
|
|
65
68
|
KupTagNames.IMAGE,
|
|
69
|
+
KupTagNames.IMAGE_LIST,
|
|
66
70
|
KupTagNames.LIST,
|
|
67
71
|
KupTagNames.MAGIC_BOX,
|
|
68
72
|
KupTagNames.SNACKBAR,
|
|
@@ -88,6 +92,7 @@ export const fTextFieldUsers = [
|
|
|
88
92
|
KupTagNames.COMBOBOX,
|
|
89
93
|
KupTagNames.DATA_TABLE,
|
|
90
94
|
KupTagNames.DATE_PICKER,
|
|
95
|
+
KupTagNames.NUMERIC_PICKER,
|
|
91
96
|
KupTagNames.TEXT_FIELD,
|
|
92
97
|
KupTagNames.TIME_PICKER,
|
|
93
98
|
KupTagNames.TREE,
|
|
@@ -98,6 +103,7 @@ export const fTextFieldUsers = [
|
|
|
98
103
|
export const rippleUsers = [
|
|
99
104
|
KupTagNames.ACCORDION,
|
|
100
105
|
KupTagNames.CARD,
|
|
106
|
+
KupTagNames.IMAGE_LIST,
|
|
101
107
|
KupTagNames.TAB_BAR,
|
|
102
108
|
KupTagNames.TREE,
|
|
103
109
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
|
+
};
|
|
12
|
+
var _KupTooltip_instances, _KupTooltip_clickCb, _KupTooltip_dynPos, _KupTooltip_create, _KupTooltip_setOptions;
|
|
13
|
+
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
14
|
+
const dom = document.documentElement;
|
|
15
|
+
/**
|
|
16
|
+
* Handles application-wide tooltip using card component.
|
|
17
|
+
* @module KupTooltip
|
|
18
|
+
*/
|
|
19
|
+
export class KupTooltip {
|
|
20
|
+
/**
|
|
21
|
+
* Initializes KupTooltip.
|
|
22
|
+
*/
|
|
23
|
+
constructor(delay, fCellCallbacks) {
|
|
24
|
+
_KupTooltip_instances.add(this);
|
|
25
|
+
this.currentAnchor = null;
|
|
26
|
+
this.delay = null;
|
|
27
|
+
this.element = null;
|
|
28
|
+
this.fCellCallbacks = null;
|
|
29
|
+
this.managedElements = null;
|
|
30
|
+
this.timeout = null;
|
|
31
|
+
_KupTooltip_clickCb.set(this, null);
|
|
32
|
+
this.delay = delay ? delay : 125;
|
|
33
|
+
this.fCellCallbacks = fCellCallbacks ? fCellCallbacks : null;
|
|
34
|
+
this.managedElements = new Set();
|
|
35
|
+
document.addEventListener('pointermove', (e) => {
|
|
36
|
+
const paths = e.composedPath();
|
|
37
|
+
// Leaving the function when hovering on the tooltip itself
|
|
38
|
+
if (paths.includes(this.element)) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const enterHandler = (anchor) => {
|
|
42
|
+
this.timeout = null;
|
|
43
|
+
const callbacks = anchor.classList.contains('f-cell')
|
|
44
|
+
? this.fCellCallbacks
|
|
45
|
+
: anchor.kupTooltip;
|
|
46
|
+
requestAnimationFrame(callbacks.enter.bind(callbacks.enter, e, anchor));
|
|
47
|
+
};
|
|
48
|
+
const overHandler = (anchor) => {
|
|
49
|
+
const callbacks = anchor.classList.contains('f-cell')
|
|
50
|
+
? this.fCellCallbacks
|
|
51
|
+
: anchor.kupTooltip;
|
|
52
|
+
requestAnimationFrame(callbacks.over.bind(callbacks.over, e, anchor));
|
|
53
|
+
};
|
|
54
|
+
const leaveHandler = (anchor) => {
|
|
55
|
+
const callbacks = this.currentAnchor.classList.contains('f-cell')
|
|
56
|
+
? this.fCellCallbacks
|
|
57
|
+
: this.currentAnchor.kupTooltip;
|
|
58
|
+
requestAnimationFrame(callbacks.leave.bind(callbacks.leave, e, anchor));
|
|
59
|
+
};
|
|
60
|
+
// If the current anchor exists and is not included in the event path,
|
|
61
|
+
// the leaving callback is fired.
|
|
62
|
+
if (this.currentAnchor && !paths.includes(this.currentAnchor)) {
|
|
63
|
+
if (this.timeout) {
|
|
64
|
+
clearTimeout(this.timeout);
|
|
65
|
+
this.timeout = null;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const callbacks = this.currentAnchor.kupTooltip
|
|
69
|
+
? this.currentAnchor.kupTooltip
|
|
70
|
+
: this.fCellCallbacks;
|
|
71
|
+
if (callbacks.leave) {
|
|
72
|
+
leaveHandler(this.currentAnchor);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
this.currentAnchor = null;
|
|
76
|
+
}
|
|
77
|
+
else if (!this.timeout) {
|
|
78
|
+
for (let index = 0; index < paths.length; index++) {
|
|
79
|
+
const element = paths[index];
|
|
80
|
+
if (element &&
|
|
81
|
+
(this.managedElements.has(element) ||
|
|
82
|
+
(this.fCellCallbacks &&
|
|
83
|
+
element.classList &&
|
|
84
|
+
element.classList.contains('f-cell')))) {
|
|
85
|
+
const callbacks = element.kupTooltip
|
|
86
|
+
? element.kupTooltip
|
|
87
|
+
: this.fCellCallbacks;
|
|
88
|
+
// If the current anchor is the same as the registered element found
|
|
89
|
+
// in the path, the mouse over function is invoked
|
|
90
|
+
if (this.currentAnchor === element) {
|
|
91
|
+
if (callbacks.over) {
|
|
92
|
+
overHandler(element);
|
|
93
|
+
}
|
|
94
|
+
// Otherwise, the mouse enter callback will be invoked
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.currentAnchor = element;
|
|
98
|
+
if (callbacks.enter) {
|
|
99
|
+
if (this.delay) {
|
|
100
|
+
this.timeout = setTimeout(enterHandler.bind(enterHandler, element), this.delay);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
enterHandler(element);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Destroys the tooltip.
|
|
114
|
+
*/
|
|
115
|
+
destroy() {
|
|
116
|
+
if (this.element) {
|
|
117
|
+
this.element.remove();
|
|
118
|
+
this.element = null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Hides the tooltip.
|
|
123
|
+
*/
|
|
124
|
+
hide() {
|
|
125
|
+
if (this.element) {
|
|
126
|
+
this.element.menuVisible = false;
|
|
127
|
+
dom.ketchup.dynamicPosition.stop(this.element);
|
|
128
|
+
dom.ketchup.removeClickCallback(__classPrivateFieldGet(this, _KupTooltip_clickCb, "f"));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Displays the tooltip.
|
|
133
|
+
* @param {KupDynamicPositionAnchor} anchor - Anchor point of the tooltip: HTML element or x/y coordinates.
|
|
134
|
+
* @param {Partial<HTMLKupCardElement>} options - Props/attributes of the tooltip.
|
|
135
|
+
*/
|
|
136
|
+
show(anchor, options) {
|
|
137
|
+
// Creates the card or updates it with new options
|
|
138
|
+
if (!this.element) {
|
|
139
|
+
__classPrivateFieldGet(this, _KupTooltip_instances, "m", _KupTooltip_create).call(this, options);
|
|
140
|
+
}
|
|
141
|
+
else if (options) {
|
|
142
|
+
__classPrivateFieldGet(this, _KupTooltip_instances, "m", _KupTooltip_setOptions).call(this, options);
|
|
143
|
+
}
|
|
144
|
+
// If an anchor was provided, initializes or updates dynamic positioning
|
|
145
|
+
if (anchor) {
|
|
146
|
+
__classPrivateFieldGet(this, _KupTooltip_instances, "m", _KupTooltip_dynPos).call(this, anchor);
|
|
147
|
+
}
|
|
148
|
+
// If the tooltip is already visible, it's pointless to go on
|
|
149
|
+
if (this.element.menuVisible) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
// If the dynamic positioning is still to be registered, a warning is thrown
|
|
153
|
+
if (!dom.ketchup.dynamicPosition.isRegistered(this.element)) {
|
|
154
|
+
dom.ketchup.debug.logMessage('kup-tooltip', 'Unable to display KupTooltip without specifying a valid anchor point.', KupDebugCategory.WARNING);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.element.menuVisible = true;
|
|
158
|
+
dom.ketchup.addClickCallback(__classPrivateFieldGet(this, _KupTooltip_clickCb, "f"), true);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Returns whether an element was previously registered or not.
|
|
162
|
+
* @param {KupTooltipAnchor} element - Element to test.
|
|
163
|
+
* @returns {boolean} True if the element was registered.
|
|
164
|
+
*/
|
|
165
|
+
isRegistered(element) {
|
|
166
|
+
return !this.managedElements
|
|
167
|
+
? false
|
|
168
|
+
: this.managedElements.has(element);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Registers an HTMLElement as KupTooltipAnchor, triggering callback invocation on mouse over.
|
|
172
|
+
* @param {KupTooltipAnchor} element - The HTML element to be registered.
|
|
173
|
+
* @param {KupTooltipCallbacks} options - Optional callbacks.
|
|
174
|
+
*/
|
|
175
|
+
register(element, options) {
|
|
176
|
+
this.managedElements.add(element);
|
|
177
|
+
if (options !== null && options) {
|
|
178
|
+
element.kupTooltip = options;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Unregisters an HTMLElement, preventing its attached callback from being invoked.
|
|
183
|
+
*
|
|
184
|
+
* @param {KupTooltipAnchor} element - - The HTML element to be unregistered.
|
|
185
|
+
*/
|
|
186
|
+
unregister(element) {
|
|
187
|
+
if (this.managedElements) {
|
|
188
|
+
this.managedElements.delete(element);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
_KupTooltip_clickCb = new WeakMap(), _KupTooltip_instances = new WeakSet(), _KupTooltip_dynPos = function _KupTooltip_dynPos(anchor) {
|
|
193
|
+
if (dom.ketchup.dynamicPosition.isRegistered(this.element)) {
|
|
194
|
+
dom.ketchup.dynamicPosition.changeAnchor(this.element, anchor);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
dom.ketchup.dynamicPosition.register(this.element, anchor, null, null, true);
|
|
198
|
+
}
|
|
199
|
+
dom.ketchup.dynamicPosition.start(this.element);
|
|
200
|
+
}, _KupTooltip_create = function _KupTooltip_create(options) {
|
|
201
|
+
this.element = document.createElement('kup-card');
|
|
202
|
+
this.element.id = 'kup-tooltip';
|
|
203
|
+
this.element.isMenu = true;
|
|
204
|
+
this.element.layoutNumber = 15;
|
|
205
|
+
this.element.sizeX = 'auto';
|
|
206
|
+
this.element.sizeY = 'auto';
|
|
207
|
+
if (options) {
|
|
208
|
+
__classPrivateFieldGet(this, _KupTooltip_instances, "m", _KupTooltip_setOptions).call(this, options);
|
|
209
|
+
}
|
|
210
|
+
document.body.appendChild(this.element);
|
|
211
|
+
__classPrivateFieldSet(this, _KupTooltip_clickCb, {
|
|
212
|
+
cb: () => {
|
|
213
|
+
this.hide();
|
|
214
|
+
},
|
|
215
|
+
el: this.element,
|
|
216
|
+
}, "f");
|
|
217
|
+
}, _KupTooltip_setOptions = function _KupTooltip_setOptions(options) {
|
|
218
|
+
for (const key in options) {
|
|
219
|
+
if (Object.prototype.hasOwnProperty.call(options, key)) {
|
|
220
|
+
const prop = options[key];
|
|
221
|
+
this.element[key] = prop;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
};
|
|
@@ -24,14 +24,17 @@ export var KupTagNames;
|
|
|
24
24
|
KupTagNames["DRAWER"] = "KUP-DRAWER";
|
|
25
25
|
KupTagNames["DROPDOWN_BUTTON"] = "KUP-DROPDOWN-BUTTON";
|
|
26
26
|
KupTagNames["FIELD"] = "KUP-FIELD";
|
|
27
|
+
KupTagNames["FORM_EDITOR"] = "KUP-FORM-EDITOR";
|
|
27
28
|
KupTagNames["GAUGE"] = "KUP-GAUGE";
|
|
28
29
|
KupTagNames["GRID"] = "KUP-GRID";
|
|
29
30
|
KupTagNames["IFRAME"] = "KUP-IFRAME";
|
|
30
31
|
KupTagNames["IMAGE"] = "KUP-IMAGE";
|
|
32
|
+
KupTagNames["IMAGE_LIST"] = "KUP-IMAGE-LIST";
|
|
31
33
|
KupTagNames["LAZY"] = "KUP-LAZY";
|
|
32
34
|
KupTagNames["LIST"] = "KUP-LIST";
|
|
33
35
|
KupTagNames["MAGIC_BOX"] = "KUP-MAGIC-BOX";
|
|
34
36
|
KupTagNames["NAV_BAR"] = "KUP-NAV-BAR";
|
|
37
|
+
KupTagNames["NUMERIC_PICKER"] = "KUP-NUMERIC-PICKER";
|
|
35
38
|
KupTagNames["PROBE"] = "KUP-PROBE";
|
|
36
39
|
KupTagNames["PROGRESS_BAR"] = "KUP-PROGRESS-BAR";
|
|
37
40
|
KupTagNames["QLIK"] = "KUP-QLIK";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { KupDynamicPositionPlacement, } from '../../managers/kup-dynamic-position/kup-dynamic-position-declarations';
|
|
2
|
-
import { unsetTooltip } from '../helpers';
|
|
3
2
|
import { FiltersColumnMenu } from '../filters/filters-column-menu';
|
|
4
3
|
import { FilterInterval, } from '../filters/filters-declarations';
|
|
5
4
|
import { getValueForDisplay, getValueForDisplay2 } from '../cell-utils';
|
|
@@ -26,12 +25,8 @@ export class KupColumnMenu {
|
|
|
26
25
|
* Function called by the component when the column menu must be opened.
|
|
27
26
|
* @param {KupDataTable | KupTree} comp - Component using the column menu.
|
|
28
27
|
* @param {string} column - Name of the column.
|
|
29
|
-
* @param {KupTooltip} tooltip - Tooltip of the component, when present.
|
|
30
28
|
*/
|
|
31
|
-
open(comp, column
|
|
32
|
-
if (tooltip) {
|
|
33
|
-
unsetTooltip(tooltip);
|
|
34
|
-
}
|
|
29
|
+
open(comp, column) {
|
|
35
30
|
this.filtersColumnMenuInstance.resetTextualFilters(comp.filters, column);
|
|
36
31
|
}
|
|
37
32
|
/**
|
|
@@ -308,8 +303,8 @@ export class KupColumnMenu {
|
|
|
308
303
|
const data = props[0].data;
|
|
309
304
|
if (comp.showFilters) {
|
|
310
305
|
data.push({
|
|
311
|
-
|
|
312
|
-
value: KupLanguageGeneric.FILTERS,
|
|
306
|
+
id: KupLanguageGeneric.FILTERS,
|
|
307
|
+
value: dom.ketchup.language.translate(KupLanguageGeneric.FILTERS),
|
|
313
308
|
});
|
|
314
309
|
}
|
|
315
310
|
if ((comp.enableExtraColumns &&
|
|
@@ -317,14 +312,15 @@ export class KupColumnMenu {
|
|
|
317
312
|
dom.ketchup.objects.canObjsHaveExtraColumns(column.objs))) ||
|
|
318
313
|
comp.removableColumns) {
|
|
319
314
|
data.push({
|
|
320
|
-
|
|
321
|
-
value: KupLanguageColumn.COLUMNS,
|
|
315
|
+
id: KupLanguageColumn.COLUMNS,
|
|
316
|
+
value: dom.ketchup.language.translate(KupLanguageColumn.COLUMNS),
|
|
322
317
|
});
|
|
323
318
|
}
|
|
324
319
|
if (!FiltersColumnMenu.isTree(comp)) {
|
|
325
320
|
data.push({
|
|
326
321
|
icon: 'settings',
|
|
327
|
-
|
|
322
|
+
id: KupLanguageGeneric.SETTINGS,
|
|
323
|
+
value: '',
|
|
328
324
|
});
|
|
329
325
|
}
|
|
330
326
|
if (data.length > 0) {
|
|
@@ -342,7 +338,7 @@ export class KupColumnMenu {
|
|
|
342
338
|
let props = [];
|
|
343
339
|
if (comp.showFilters) {
|
|
344
340
|
if (this.filtersColumnMenuInstance.isColumnFiltrableByInterval(column)) {
|
|
345
|
-
props.concat(this.prepIntervalTextfield(comp, column));
|
|
341
|
+
props = props.concat(this.prepIntervalTextfield(comp, column));
|
|
346
342
|
}
|
|
347
343
|
else if (dom.ketchup.objects.isStringObject(column.obj)) {
|
|
348
344
|
let filterInitialValue = this.filtersColumnMenuInstance.getTextFilterValue(comp.filters, column.name);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as KupDatesFormats } from './kup-manager-
|
|
1
|
+
import { u as unformattedStringToFormattedStringNumber, d as unformattedStringToFormattedStringTime, e as unformattedStringToFormattedStringTimestamp, h as stringToNumber } from './utils-d7e4b3c2.js';
|
|
2
|
+
import { d as KupDatesFormats } from './kup-manager-58b075b4.js';
|
|
3
3
|
|
|
4
4
|
const dom = document.documentElement;
|
|
5
5
|
// -------------
|
|
@@ -157,4 +157,4 @@ function localCompareAsInJava(t1, t2) {
|
|
|
157
157
|
return t1Length - t2Length;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
export { getValueForDisplay2 as a,
|
|
160
|
+
export { getValueForDisplay2 as a, getValueForDisplay as b, getCellValueForDisplay as c, compareValues as d, compareCell as e, formatToNumber as f, getColumnByName as g };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as __spreadArray, d as __read, _ as __extends, a as __assign, b as __values } from './tslib.es6-3eea2234.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -256,6 +256,31 @@ function matches(element, selector) {
|
|
|
256
256
|
|| element.msMatchesSelector;
|
|
257
257
|
return nativeMatches.call(element, selector);
|
|
258
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Used to compute the estimated scroll width of elements. When an element is
|
|
261
|
+
* hidden due to display: none; being applied to a parent element, the width is
|
|
262
|
+
* returned as 0. However, the element will have a true width once no longer
|
|
263
|
+
* inside a display: none context. This method computes an estimated width when
|
|
264
|
+
* the element is hidden or returns the true width when the element is visble.
|
|
265
|
+
* @param {Element} element the element whose width to estimate
|
|
266
|
+
*/
|
|
267
|
+
function estimateScrollWidth(element) {
|
|
268
|
+
// Check the offsetParent. If the element inherits display: none from any
|
|
269
|
+
// parent, the offsetParent property will be null (see
|
|
270
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).
|
|
271
|
+
// This check ensures we only clone the node when necessary.
|
|
272
|
+
var htmlEl = element;
|
|
273
|
+
if (htmlEl.offsetParent !== null) {
|
|
274
|
+
return htmlEl.scrollWidth;
|
|
275
|
+
}
|
|
276
|
+
var clone = htmlEl.cloneNode(true);
|
|
277
|
+
clone.style.setProperty('position', 'absolute');
|
|
278
|
+
clone.style.setProperty('transform', 'translate(-9999px, -9999px)');
|
|
279
|
+
document.documentElement.appendChild(clone);
|
|
280
|
+
var scrollWidth = clone.scrollWidth;
|
|
281
|
+
document.documentElement.removeChild(clone);
|
|
282
|
+
return scrollWidth;
|
|
283
|
+
}
|
|
259
284
|
|
|
260
285
|
/**
|
|
261
286
|
* @license
|
|
@@ -990,4 +1015,4 @@ var MDCRipple = /** @class */ (function (_super) {
|
|
|
990
1015
|
return MDCRipple;
|
|
991
1016
|
}(MDCComponent));
|
|
992
1017
|
|
|
993
|
-
export { MDCRipple as M,
|
|
1018
|
+
export { MDCRipple as M, MDCFoundation as a, MDCComponent as b, applyPassive as c, MDCRippleFoundation as d, estimateScrollWidth as e, matches as m };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from './index-
|
|
1
|
+
import { h } from './index-baeab1ac.js';
|
|
2
2
|
import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
|
|
3
|
-
import { F as FImage } from './f-image-
|
|
3
|
+
import { F as FImage } from './f-image-c468d8ae.js';
|
|
4
4
|
|
|
5
5
|
/*-------------------------------------------------*/
|
|
6
6
|
/* C o m p o n e n t */
|