@sme.up/ketchup 5.0.0 → 5.2.1-SNAPSHOT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/{cell-utils-720be0c8.js → cell-utils-d96b2993.js} +4 -4
- package/dist/cjs/{f-button-dbf3cd3a.js → f-button-2b9b99b1.js} +2 -2
- package/dist/cjs/{f-cell-93d984ad.js → f-cell-8351cb84.js} +8 -96
- package/dist/cjs/{f-chip-438213eb.js → f-chip-df59e1b0.js} +3 -3
- package/dist/cjs/{f-image-21865ab7.js → f-image-12bab3b5.js} +2 -2
- package/dist/cjs/f-text-field-e7c35b5b.js +94 -0
- package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
- package/dist/cjs/{index-ab119fad.js → index-eb556444.js} +6 -1
- 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 +641 -3331
- package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
- package/dist/cjs/kup-cell.cjs.entry.js +9 -8
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -5
- package/dist/cjs/kup-drawer.cjs.entry.js +8 -5
- package/dist/cjs/kup-echart.cjs.entry.js +210 -60
- package/dist/cjs/kup-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +7 -7
- package/dist/cjs/{kup-manager-09c0c1fc.js → kup-manager-5c03da64.js} +3061 -2642
- package/dist/cjs/kup-nav-bar.cjs.entry.js +6 -6
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +179 -0
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-a60ab5fa.js → utils-e99921c1.js} +4 -38
- package/dist/collection/assets/card.js +30 -30
- package/dist/collection/assets/data-table.js +24 -74
- package/dist/collection/assets/echart.js +481 -0
- package/dist/collection/assets/index.js +87 -79
- package/dist/collection/assets/kupdata.js +29 -41
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/assets/list.js +6 -6
- package/dist/collection/assets/nav-bar.js +4 -4
- package/dist/collection/assets/probe.js +18 -18
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +4 -4
- package/dist/collection/components/kup-box/kup-box.js +9 -9
- package/dist/collection/components/kup-button-list/kup-button-list.js +4 -4
- 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-column-drop-menu.js +20 -20
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +1 -0
- package/dist/collection/components/kup-chip/kup-chip.js +4 -4
- package/dist/collection/components/kup-combobox/kup-combobox.js +5 -5
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +0 -2
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +31 -32
- 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 +112 -159
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.js +4 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +3 -3
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +14 -14
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +3 -0
- package/dist/collection/components/kup-echart/kup-echart.js +246 -58
- package/dist/collection/components/kup-image/assets/svg/instagram.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/pinterest.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/reddit.svg +1 -0
- package/dist/collection/components/kup-list/kup-list-helper.js +26 -26
- package/dist/collection/components/kup-list/kup-list.css +35 -3
- package/dist/collection/components/kup-list/kup-list.js +52 -44
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +2 -2
- 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-declarations.js +10 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +70 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +382 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -8
- package/dist/collection/components/kup-tree/kup-tree.js +25 -38
- package/dist/collection/f-components/f-paginator/f-paginator.js +6 -6
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +27 -3
- package/dist/collection/managers/kup-data/kup-data-declarations.js +2 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data.js +337 -155
- package/dist/collection/managers/kup-dates/kup-dates.js +2 -2
- package/dist/collection/managers/kup-debug/kup-debug.js +7 -6
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
- package/dist/collection/managers/kup-language/kup-language.js +2 -2
- package/dist/collection/managers/kup-manager/kup-manager.js +25 -1
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
- package/dist/collection/managers/kup-math/kup-math.js +161 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +48 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +2 -2
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/collection/utils/cell-utils.js +2 -3
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/collection/utils/utils.js +3 -74
- package/dist/esm/{cell-utils-b80ccb8c.js → cell-utils-f4bdbbc8.js} +4 -4
- package/dist/esm/{f-button-9e835467.js → f-button-54a49fd8.js} +2 -2
- package/dist/esm/{f-cell-f8bb2e04.js → f-cell-d5dac50b.js} +8 -95
- package/dist/esm/{f-chip-953c6915.js → f-chip-a3035b4b.js} +3 -3
- package/dist/esm/{f-image-78c5265e.js → f-image-d32465e3.js} +2 -2
- package/dist/esm/f-text-field-c25cc63f.js +92 -0
- package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
- package/dist/esm/{index-78f3699d.js → index-baeab1ac.js} +6 -2
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +5 -5
- package/dist/esm/kup-autocomplete_27.entry.js +625 -3315
- package/dist/esm/kup-calendar.entry.js +8 -8
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +5 -5
- package/dist/esm/kup-dash_2.entry.js +5 -5
- package/dist/esm/kup-drawer.entry.js +8 -5
- package/dist/esm/kup-echart.entry.js +210 -60
- package/dist/esm/kup-field.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +7 -7
- package/dist/esm/{kup-manager-bba62291.js → kup-manager-9316a184.js} +3062 -2642
- package/dist/esm/kup-nav-bar.entry.js +6 -6
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +175 -0
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +3 -3
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d1569956.js → utils-f24319a0.js} +5 -37
- package/dist/ketchup/assets/svg/instagram.svg +1 -0
- package/dist/ketchup/assets/svg/pinterest.svg +1 -0
- package/dist/ketchup/assets/svg/reddit.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-09d708c4.entry.js +1 -0
- package/dist/ketchup/p-11e72a8c.entry.js +1 -0
- package/dist/ketchup/p-12773ca8.js +9 -0
- package/dist/ketchup/p-203d6295.entry.js +1 -0
- package/dist/ketchup/p-34748c91.js +1 -0
- package/dist/ketchup/p-34b74425.js +1 -0
- package/dist/ketchup/p-40f97429.js +1 -0
- package/dist/ketchup/p-4173422f.entry.js +1 -0
- package/dist/ketchup/p-41741c28.entry.js +1 -0
- package/dist/ketchup/p-44192f30.entry.js +1 -0
- package/dist/ketchup/{p-ebf4cf56.js → p-44f8da2a.js} +1 -1
- package/dist/ketchup/{p-fa540f82.js → p-4f56932b.js} +1 -1
- package/dist/ketchup/p-669bde31.js +1 -0
- package/dist/ketchup/p-67842f1e.entry.js +1 -0
- package/dist/ketchup/{p-f993f813.js → p-7a74ad17.js} +1 -1
- package/dist/ketchup/p-7ba8fa4a.entry.js +39 -0
- package/dist/ketchup/p-7de0d7e1.js +1 -0
- package/dist/ketchup/p-8418e8fa.entry.js +1 -0
- package/dist/ketchup/p-96bf19aa.entry.js +1 -0
- package/dist/ketchup/p-9a61d8dc.entry.js +1 -0
- package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
- package/dist/ketchup/{p-aa27f9f7.entry.js → p-b6c21223.entry.js} +2 -2
- package/dist/ketchup/p-bb8844bf.entry.js +1 -0
- package/dist/ketchup/p-c58a2a81.entry.js +1 -0
- package/dist/ketchup/p-ca3d585b.entry.js +1 -0
- package/dist/ketchup/p-e6709c26.entry.js +1 -0
- package/dist/ketchup/p-e8e3c9da.entry.js +1 -0
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +2 -1
- 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 +2 -2
- 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 +7 -15
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +3 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +12 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +3 -7
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +2 -2
- 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-photo-frame/kup-photo-frame-declarations.d.ts +9 -0
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -0
- package/dist/types/components.d.ts +249 -28
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +9 -1
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +4 -25
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +1 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +63 -27
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +21 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +4 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +27 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +61 -0
- package/dist/types/managers/kup-objects/kup-objects.d.ts +22 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +0 -18
- package/package.json +3 -3
- package/CHANGELOG.md +0 -5
- package/dist/collection/managers/kup-data/kup-data-dataset-helper.js +0 -262
- package/dist/collection/managers/kup-data/kup-data-helper.js +0 -61
- package/dist/collection/utils/state-utils.js +0 -9
- package/dist/ketchup/p-0032a782.entry.js +0 -1
- package/dist/ketchup/p-18c4d083.entry.js +0 -1
- package/dist/ketchup/p-199c972e.entry.js +0 -1
- package/dist/ketchup/p-29800a2e.js +0 -1
- package/dist/ketchup/p-34aa8d8a.entry.js +0 -1
- package/dist/ketchup/p-542279e9.entry.js +0 -1
- package/dist/ketchup/p-5b26a7a8.entry.js +0 -39
- package/dist/ketchup/p-5c97e7ab.js +0 -1
- package/dist/ketchup/p-6817ca85.entry.js +0 -1
- package/dist/ketchup/p-76e674ca.entry.js +0 -1
- package/dist/ketchup/p-78aa6f1b.js +0 -1
- package/dist/ketchup/p-842b66aa.entry.js +0 -1
- package/dist/ketchup/p-894981c0.entry.js +0 -143
- package/dist/ketchup/p-8ac2fa75.entry.js +0 -1
- package/dist/ketchup/p-907c9e11.entry.js +0 -1
- package/dist/ketchup/p-9ae9149b.entry.js +0 -1
- package/dist/ketchup/p-b0d1bdd8.js +0 -9
- package/dist/ketchup/p-e1e4c951.entry.js +0 -1
- package/dist/ketchup/p-eba369d9.entry.js +0 -1
- package/dist/ketchup/p-ed0b8666.js +0 -1
- package/dist/types/managers/kup-data/kup-data-dataset-helper.d.ts +0 -42
- package/dist/types/managers/kup-data/kup-data-helper.d.ts +0 -11
- package/dist/types/utils/state-utils.d.ts +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props of the kup-photo-frame component.
|
|
3
|
+
* Used to export every prop in an object.
|
|
4
|
+
*/
|
|
5
|
+
export var KupPhotoFrameProps;
|
|
6
|
+
(function (KupPhotoFrameProps) {
|
|
7
|
+
KupPhotoFrameProps["customStyle"] = "Custom style of the component.";
|
|
8
|
+
KupPhotoFrameProps["placeholderAttrs"] = "Html attributes of the picture before the component enters the viewport.";
|
|
9
|
+
KupPhotoFrameProps["resourceAttrs"] = "Html attributes of the picture after the component enters the viewport.";
|
|
10
|
+
})(KupPhotoFrameProps || (KupPhotoFrameProps = {}));
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --kup-photoframe-border: Sets the border of the component.
|
|
3
|
+
* @prop --kup-photoframe-fade-out-time: Sets the time of the plcaeholder's fade out transition.
|
|
4
|
+
*/
|
|
5
|
+
:host {
|
|
6
|
+
--kup_photoframe_border: var(
|
|
7
|
+
--kup-photoframe-border,
|
|
8
|
+
1px inset var(--kup-border-color)
|
|
9
|
+
);
|
|
10
|
+
--kup_photoframe_fade_out_time: var(--kup-photoframe-fade-out-time, 2000ms);
|
|
11
|
+
border: var(--kup_photoframe_border);
|
|
12
|
+
display: block;
|
|
13
|
+
height: 100%;
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#kup-component {
|
|
19
|
+
position: relative;
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
img {
|
|
25
|
+
max-height: 100%;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.horizontal img {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.vertical img {
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.placeholder {
|
|
38
|
+
display: none;
|
|
39
|
+
transition: opacity var(--kup_photoframe_fade_out_time) ease-out;
|
|
40
|
+
will-change: opacity;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
.placeholder--loaded {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
.placeholder--fade-out {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.resource {
|
|
52
|
+
display: none;
|
|
53
|
+
left: 0;
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 0;
|
|
56
|
+
z-index: 0;
|
|
57
|
+
}
|
|
58
|
+
.resource--fade-in {
|
|
59
|
+
display: block;
|
|
60
|
+
position: relative;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*-------------------------------------------------*/
|
|
64
|
+
/* C o m p o n e n t C l a s s e s */
|
|
65
|
+
/*-------------------------------------------------*/
|
|
66
|
+
:host(.kup-fit) img {
|
|
67
|
+
height: 100%;
|
|
68
|
+
object-fit: cover;
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
@@ -0,0 +1,382 @@
|
|
|
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 _KupPhotoFrame_intObserver, _KupPhotoFrame_kupManager, _KupPhotoFrame_placeholderEl, _KupPhotoFrame_resourceEl, _KupPhotoFrame_renderResource, _KupPhotoFrame_wrapperEl;
|
|
13
|
+
import { Component, Element, Event, forceUpdate, h, Host, Prop, State, } from '@stencil/core';
|
|
14
|
+
import { Method } from '@stencil/core/internal';
|
|
15
|
+
import { kupManagerInstance } from '../../managers/kup-manager/kup-manager';
|
|
16
|
+
import { getProps, setProps } from '../../utils/utils';
|
|
17
|
+
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
18
|
+
import { KupPhotoFrameProps } from './kup-photo-frame-declarations';
|
|
19
|
+
export class KupPhotoFrame {
|
|
20
|
+
constructor() {
|
|
21
|
+
/*-------------------------------------------------*/
|
|
22
|
+
/* S t a t e s */
|
|
23
|
+
/*-------------------------------------------------*/
|
|
24
|
+
this.isInViewport = false;
|
|
25
|
+
/*-------------------------------------------------*/
|
|
26
|
+
/* P r o p s */
|
|
27
|
+
/*-------------------------------------------------*/
|
|
28
|
+
/**
|
|
29
|
+
* Custom style of the component.
|
|
30
|
+
* @default ""
|
|
31
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
32
|
+
*/
|
|
33
|
+
this.customStyle = '';
|
|
34
|
+
/**
|
|
35
|
+
* Html attributes of the picture before the component enters the viewport.
|
|
36
|
+
* @default {}
|
|
37
|
+
*/
|
|
38
|
+
this.placeholderAttrs = {};
|
|
39
|
+
/**
|
|
40
|
+
* Html attributes of the picture after the component enters the viewport.
|
|
41
|
+
* @default {}
|
|
42
|
+
*/
|
|
43
|
+
this.resourceAttrs = {};
|
|
44
|
+
/**
|
|
45
|
+
* Percentage of the component dimensions entering the viewport (0.1 => 1).
|
|
46
|
+
* @default 0.25
|
|
47
|
+
*/
|
|
48
|
+
this.threshold = 0.25;
|
|
49
|
+
/*-------------------------------------------------*/
|
|
50
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
51
|
+
/*-------------------------------------------------*/
|
|
52
|
+
_KupPhotoFrame_intObserver.set(this, null);
|
|
53
|
+
_KupPhotoFrame_kupManager.set(this, kupManagerInstance());
|
|
54
|
+
_KupPhotoFrame_placeholderEl.set(this, null);
|
|
55
|
+
_KupPhotoFrame_resourceEl.set(this, null);
|
|
56
|
+
_KupPhotoFrame_renderResource.set(this, false);
|
|
57
|
+
_KupPhotoFrame_wrapperEl.set(this, null);
|
|
58
|
+
}
|
|
59
|
+
/*-------------------------------------------------*/
|
|
60
|
+
/* P u b l i c M e t h o d s */
|
|
61
|
+
/*-------------------------------------------------*/
|
|
62
|
+
/**
|
|
63
|
+
* Used to retrieve component's props values.
|
|
64
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
65
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
66
|
+
*/
|
|
67
|
+
async getProps(descriptions) {
|
|
68
|
+
return getProps(this, KupPhotoFrameProps, descriptions);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* This method is used to trigger a new render of the component.
|
|
72
|
+
*/
|
|
73
|
+
async refresh() {
|
|
74
|
+
forceUpdate(this);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Sets the props to the component.
|
|
78
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
79
|
+
*/
|
|
80
|
+
async setProps(props) {
|
|
81
|
+
setProps(this, KupPhotoFrameProps, props);
|
|
82
|
+
}
|
|
83
|
+
/*-------------------------------------------------*/
|
|
84
|
+
/* P r i v a t e M e t h o d s */
|
|
85
|
+
/*-------------------------------------------------*/
|
|
86
|
+
setObserver() {
|
|
87
|
+
let callback = (entries) => {
|
|
88
|
+
entries.forEach((entry) => {
|
|
89
|
+
if (entry.isIntersecting) {
|
|
90
|
+
this.isInViewport = true;
|
|
91
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_intObserver, "f").unobserve(this.rootElement);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
let options = {
|
|
96
|
+
threshold: this.threshold,
|
|
97
|
+
};
|
|
98
|
+
__classPrivateFieldSet(this, _KupPhotoFrame_intObserver, new IntersectionObserver(callback, options), "f");
|
|
99
|
+
}
|
|
100
|
+
/*-------------------------------------------------*/
|
|
101
|
+
/* L i f e c y c l e H o o k s */
|
|
102
|
+
/*-------------------------------------------------*/
|
|
103
|
+
componentWillLoad() {
|
|
104
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logLoad(this, false);
|
|
105
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.register(this);
|
|
106
|
+
this.setObserver();
|
|
107
|
+
}
|
|
108
|
+
componentDidLoad() {
|
|
109
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logLoad(this, true);
|
|
110
|
+
}
|
|
111
|
+
componentWillRender() {
|
|
112
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logRender(this, false);
|
|
113
|
+
}
|
|
114
|
+
componentDidRender() {
|
|
115
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logRender(this, true);
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
if (this.isInViewport && !__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f")) {
|
|
119
|
+
__classPrivateFieldSet(this, _KupPhotoFrame_renderResource, true, "f");
|
|
120
|
+
}
|
|
121
|
+
return (h(Host, null,
|
|
122
|
+
h("style", null, __classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.setKupStyle(this.rootElement)),
|
|
123
|
+
h("div", { id: componentWrapperId, ref: (el) => {
|
|
124
|
+
__classPrivateFieldSet(this, _KupPhotoFrame_wrapperEl, el, "f");
|
|
125
|
+
} },
|
|
126
|
+
h("img", Object.assign({}, this.placeholderAttrs, { class: "placeholder", ref: (el) => (__classPrivateFieldSet(this, _KupPhotoFrame_placeholderEl, el, "f")), onLoad: () => {
|
|
127
|
+
if (__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").naturalWidth >
|
|
128
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").naturalHeight) {
|
|
129
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_wrapperEl, "f").classList.add('horizontal');
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_wrapperEl, "f").classList.add('vertical');
|
|
133
|
+
}
|
|
134
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_intObserver, "f").observe(this.rootElement);
|
|
135
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").classList.add('placeholder--loaded');
|
|
136
|
+
this.kupPhotoFramePlaceholderLoad.emit({
|
|
137
|
+
comp: this,
|
|
138
|
+
id: this.rootElement.id,
|
|
139
|
+
});
|
|
140
|
+
} })),
|
|
141
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f") ? (h("img", Object.assign({}, this.resourceAttrs, { class: "resource", ref: (el) => (__classPrivateFieldSet(this, _KupPhotoFrame_resourceEl, el, "f")), onLoad: () => {
|
|
142
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").classList.add('placeholder--fade-out');
|
|
143
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_resourceEl, "f").classList.add('resource--fade-in');
|
|
144
|
+
this.kupPhotoFrameResourceLoad.emit({
|
|
145
|
+
comp: this,
|
|
146
|
+
id: this.rootElement.id,
|
|
147
|
+
});
|
|
148
|
+
} }))) : null)));
|
|
149
|
+
}
|
|
150
|
+
disconnectedCallback() {
|
|
151
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.unregister(this);
|
|
152
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_intObserver, "f").unobserve(this.rootElement);
|
|
153
|
+
}
|
|
154
|
+
static get is() { return "kup-photo-frame"; }
|
|
155
|
+
static get encapsulation() { return "shadow"; }
|
|
156
|
+
static get originalStyleUrls() { return {
|
|
157
|
+
"$": ["kup-photo-frame.scss"]
|
|
158
|
+
}; }
|
|
159
|
+
static get styleUrls() { return {
|
|
160
|
+
"$": ["kup-photo-frame.css"]
|
|
161
|
+
}; }
|
|
162
|
+
static get properties() { return {
|
|
163
|
+
"customStyle": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"mutable": false,
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "string",
|
|
168
|
+
"resolved": "string",
|
|
169
|
+
"references": {}
|
|
170
|
+
},
|
|
171
|
+
"required": false,
|
|
172
|
+
"optional": false,
|
|
173
|
+
"docs": {
|
|
174
|
+
"tags": [{
|
|
175
|
+
"name": "default",
|
|
176
|
+
"text": "\"\""
|
|
177
|
+
}, {
|
|
178
|
+
"name": "see",
|
|
179
|
+
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
180
|
+
}],
|
|
181
|
+
"text": "Custom style of the component."
|
|
182
|
+
},
|
|
183
|
+
"attribute": "custom-style",
|
|
184
|
+
"reflect": false,
|
|
185
|
+
"defaultValue": "''"
|
|
186
|
+
},
|
|
187
|
+
"placeholderAttrs": {
|
|
188
|
+
"type": "unknown",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "GenericObject",
|
|
192
|
+
"resolved": "GenericObject",
|
|
193
|
+
"references": {
|
|
194
|
+
"GenericObject": {
|
|
195
|
+
"location": "import",
|
|
196
|
+
"path": "../../types/GenericTypes"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": false,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [{
|
|
204
|
+
"name": "default",
|
|
205
|
+
"text": "{}"
|
|
206
|
+
}],
|
|
207
|
+
"text": "Html attributes of the picture before the component enters the viewport."
|
|
208
|
+
},
|
|
209
|
+
"defaultValue": "{}"
|
|
210
|
+
},
|
|
211
|
+
"resourceAttrs": {
|
|
212
|
+
"type": "unknown",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "GenericObject",
|
|
216
|
+
"resolved": "GenericObject",
|
|
217
|
+
"references": {
|
|
218
|
+
"GenericObject": {
|
|
219
|
+
"location": "import",
|
|
220
|
+
"path": "../../types/GenericTypes"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"required": false,
|
|
225
|
+
"optional": false,
|
|
226
|
+
"docs": {
|
|
227
|
+
"tags": [{
|
|
228
|
+
"name": "default",
|
|
229
|
+
"text": "{}"
|
|
230
|
+
}],
|
|
231
|
+
"text": "Html attributes of the picture after the component enters the viewport."
|
|
232
|
+
},
|
|
233
|
+
"defaultValue": "{}"
|
|
234
|
+
},
|
|
235
|
+
"threshold": {
|
|
236
|
+
"type": "number",
|
|
237
|
+
"mutable": false,
|
|
238
|
+
"complexType": {
|
|
239
|
+
"original": "number",
|
|
240
|
+
"resolved": "number",
|
|
241
|
+
"references": {}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [{
|
|
247
|
+
"name": "default",
|
|
248
|
+
"text": "0.25"
|
|
249
|
+
}],
|
|
250
|
+
"text": "Percentage of the component dimensions entering the viewport (0.1 => 1)."
|
|
251
|
+
},
|
|
252
|
+
"attribute": "threshold",
|
|
253
|
+
"reflect": false,
|
|
254
|
+
"defaultValue": "0.25"
|
|
255
|
+
}
|
|
256
|
+
}; }
|
|
257
|
+
static get states() { return {
|
|
258
|
+
"isInViewport": {}
|
|
259
|
+
}; }
|
|
260
|
+
static get events() { return [{
|
|
261
|
+
"method": "kupPhotoFramePlaceholderLoad",
|
|
262
|
+
"name": "kup-photoframe-placeholderload",
|
|
263
|
+
"bubbles": true,
|
|
264
|
+
"cancelable": false,
|
|
265
|
+
"composed": true,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": "Triggered when the placeholder is loaded."
|
|
269
|
+
},
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "KupEventPayload",
|
|
272
|
+
"resolved": "KupEventPayload",
|
|
273
|
+
"references": {
|
|
274
|
+
"KupEventPayload": {
|
|
275
|
+
"location": "import",
|
|
276
|
+
"path": "../../types/GenericTypes"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}, {
|
|
281
|
+
"method": "kupPhotoFrameResourceLoad",
|
|
282
|
+
"name": "kup-photoframe-resourceload",
|
|
283
|
+
"bubbles": true,
|
|
284
|
+
"cancelable": false,
|
|
285
|
+
"composed": true,
|
|
286
|
+
"docs": {
|
|
287
|
+
"tags": [],
|
|
288
|
+
"text": "Triggered when the resource is loaded."
|
|
289
|
+
},
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "KupEventPayload",
|
|
292
|
+
"resolved": "KupEventPayload",
|
|
293
|
+
"references": {
|
|
294
|
+
"KupEventPayload": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "../../types/GenericTypes"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}]; }
|
|
301
|
+
static get methods() { return {
|
|
302
|
+
"getProps": {
|
|
303
|
+
"complexType": {
|
|
304
|
+
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
305
|
+
"parameters": [{
|
|
306
|
+
"tags": [{
|
|
307
|
+
"name": "param",
|
|
308
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
309
|
+
}],
|
|
310
|
+
"text": "- When provided and true, the result will be the list of props with their description."
|
|
311
|
+
}],
|
|
312
|
+
"references": {
|
|
313
|
+
"Promise": {
|
|
314
|
+
"location": "global"
|
|
315
|
+
},
|
|
316
|
+
"GenericObject": {
|
|
317
|
+
"location": "import",
|
|
318
|
+
"path": "../../types/GenericTypes"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"return": "Promise<GenericObject>"
|
|
322
|
+
},
|
|
323
|
+
"docs": {
|
|
324
|
+
"text": "Used to retrieve component's props values.",
|
|
325
|
+
"tags": [{
|
|
326
|
+
"name": "param",
|
|
327
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
328
|
+
}, {
|
|
329
|
+
"name": "returns",
|
|
330
|
+
"text": "List of props as object, each key will be a prop."
|
|
331
|
+
}]
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"refresh": {
|
|
335
|
+
"complexType": {
|
|
336
|
+
"signature": "() => Promise<void>",
|
|
337
|
+
"parameters": [],
|
|
338
|
+
"references": {
|
|
339
|
+
"Promise": {
|
|
340
|
+
"location": "global"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"return": "Promise<void>"
|
|
344
|
+
},
|
|
345
|
+
"docs": {
|
|
346
|
+
"text": "This method is used to trigger a new render of the component.",
|
|
347
|
+
"tags": []
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"setProps": {
|
|
351
|
+
"complexType": {
|
|
352
|
+
"signature": "(props: GenericObject) => Promise<void>",
|
|
353
|
+
"parameters": [{
|
|
354
|
+
"tags": [{
|
|
355
|
+
"name": "param",
|
|
356
|
+
"text": "props - Object containing props that will be set to the component."
|
|
357
|
+
}],
|
|
358
|
+
"text": "- Object containing props that will be set to the component."
|
|
359
|
+
}],
|
|
360
|
+
"references": {
|
|
361
|
+
"Promise": {
|
|
362
|
+
"location": "global"
|
|
363
|
+
},
|
|
364
|
+
"GenericObject": {
|
|
365
|
+
"location": "import",
|
|
366
|
+
"path": "../../types/GenericTypes"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"return": "Promise<void>"
|
|
370
|
+
},
|
|
371
|
+
"docs": {
|
|
372
|
+
"text": "Sets the props to the component.",
|
|
373
|
+
"tags": [{
|
|
374
|
+
"name": "param",
|
|
375
|
+
"text": "props - Object containing props that will be set to the component."
|
|
376
|
+
}]
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}; }
|
|
380
|
+
static get elementRef() { return "rootElement"; }
|
|
381
|
+
}
|
|
382
|
+
_KupPhotoFrame_intObserver = new WeakMap(), _KupPhotoFrame_kupManager = new WeakMap(), _KupPhotoFrame_placeholderEl = new WeakMap(), _KupPhotoFrame_resourceEl = new WeakMap(), _KupPhotoFrame_renderResource = new WeakMap(), _KupPhotoFrame_wrapperEl = new WeakMap();
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
);
|
|
26
26
|
--kup_tabbar_tab_padding: var(--kup-tabbar-tab-padding, 0 24px);
|
|
27
27
|
display: block;
|
|
28
|
-
font-family: var(--kup_tabbar_font_family);
|
|
29
28
|
font-size: var(--kup_tabbar_font_size);
|
|
30
29
|
}
|
|
31
30
|
|
|
@@ -67,6 +66,7 @@
|
|
|
67
66
|
appearance: none;
|
|
68
67
|
z-index: 1;
|
|
69
68
|
height: var(--kup_tabbar_height);
|
|
69
|
+
font-family: var(--kup_tabbar_font_family);
|
|
70
70
|
font-size: 0.875em;
|
|
71
71
|
font-weight: var(--kup_tabbar_font_weight);
|
|
72
72
|
letter-spacing: 0.0892857143em;
|
|
@@ -370,7 +370,10 @@ export class KupTimePicker {
|
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
createTimeListData(value) {
|
|
373
|
-
|
|
373
|
+
const date = new Date();
|
|
374
|
+
const listData = [];
|
|
375
|
+
const totalDayMinutes = 24 * 60;
|
|
376
|
+
const itemsCount = totalDayMinutes / this.timeMinutesStep;
|
|
374
377
|
let selectedTime;
|
|
375
378
|
if (value == null || value.trim() == '') {
|
|
376
379
|
selectedTime = new Date();
|
|
@@ -380,9 +383,6 @@ export class KupTimePicker {
|
|
|
380
383
|
? KupDatesFormats.ISO_TIME
|
|
381
384
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS);
|
|
382
385
|
}
|
|
383
|
-
let totalDayMinutes = 24 * 60;
|
|
384
|
-
let itemsCount = totalDayMinutes / this.timeMinutesStep;
|
|
385
|
-
let date = new Date();
|
|
386
386
|
date.setHours(0, 0, 0);
|
|
387
387
|
for (let i = 0; i < itemsCount; i++) {
|
|
388
388
|
let selected = false;
|
|
@@ -390,14 +390,14 @@ export class KupTimePicker {
|
|
|
390
390
|
date.getMinutes() == selectedTime.getMinutes()) {
|
|
391
391
|
selected = true;
|
|
392
392
|
}
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
const value = formatTime(date, this.manageSeconds);
|
|
394
|
+
const id = formattedStringToCustomUnformattedStringTime(value, this.manageSeconds
|
|
395
395
|
? KupDatesFormats.ISO_TIME
|
|
396
396
|
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS, this.manageSeconds);
|
|
397
397
|
let item = {
|
|
398
|
-
|
|
399
|
-
value: value,
|
|
398
|
+
id: id,
|
|
400
399
|
selected: selected,
|
|
400
|
+
value: value,
|
|
401
401
|
};
|
|
402
402
|
listData[listData.length] = item;
|
|
403
403
|
date.setMinutes(date.getMinutes() + this.timeMinutesStep);
|
|
@@ -7,7 +7,7 @@ import { calcTotals, normalizeRows, } from '../kup-data-table/kup-data-table-hel
|
|
|
7
7
|
import { KupTreeState } from './kup-tree-state';
|
|
8
8
|
import { setTooltip, unsetTooltip } from '../../utils/helpers';
|
|
9
9
|
import { getColumnByName } from '../../utils/cell-utils';
|
|
10
|
-
import {
|
|
10
|
+
import { getProps, numberToFormattedStringNumber, setProps, } from '../../utils/utils';
|
|
11
11
|
import { KupColumnMenu } from '../../utils/kup-column-menu/kup-column-menu';
|
|
12
12
|
import { FiltersColumnMenu } from '../../utils/filters/filters-column-menu';
|
|
13
13
|
import { KupGlobalFilterMode, } from '../../utils/filters/filters-declarations';
|
|
@@ -212,31 +212,31 @@ export class KupTree {
|
|
|
212
212
|
persistState() {
|
|
213
213
|
if (this.store && this.stateId) {
|
|
214
214
|
let somethingChanged = false;
|
|
215
|
-
if (!deepEqual(this.state.filters, this.filters)) {
|
|
215
|
+
if (!this.kupManager.objects.deepEqual(this.state.filters, this.filters)) {
|
|
216
216
|
this.state.filters = Object.assign({}, this.filters);
|
|
217
217
|
somethingChanged = true;
|
|
218
218
|
}
|
|
219
|
-
if (!deepEqual(this.state.density, this.density)) {
|
|
219
|
+
if (!this.kupManager.objects.deepEqual(this.state.density, this.density)) {
|
|
220
220
|
this.state.density = this.density;
|
|
221
221
|
somethingChanged = true;
|
|
222
222
|
}
|
|
223
|
-
if (!deepEqual(this.state.showFilters, this.showFilters)) {
|
|
223
|
+
if (!this.kupManager.objects.deepEqual(this.state.showFilters, this.showFilters)) {
|
|
224
224
|
this.state.showFilters = this.showFilters;
|
|
225
225
|
somethingChanged = true;
|
|
226
226
|
}
|
|
227
|
-
if (!deepEqual(this.state.showFooter, this.showFooter)) {
|
|
227
|
+
if (!this.kupManager.objects.deepEqual(this.state.showFooter, this.showFooter)) {
|
|
228
228
|
this.state.showFooter = this.showFooter;
|
|
229
229
|
somethingChanged = true;
|
|
230
230
|
}
|
|
231
|
-
if (!deepEqual(this.state.totals, this.totals)) {
|
|
231
|
+
if (!this.kupManager.objects.deepEqual(this.state.totals, this.totals)) {
|
|
232
232
|
this.state.totals = Object.assign({}, this.totals);
|
|
233
233
|
somethingChanged = true;
|
|
234
234
|
}
|
|
235
|
-
if (!deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
235
|
+
if (!this.kupManager.objects.deepEqual(this.state.globalFilter, this.globalFilter)) {
|
|
236
236
|
this.state.globalFilter = this.globalFilter;
|
|
237
237
|
somethingChanged = true;
|
|
238
238
|
}
|
|
239
|
-
if (!deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
239
|
+
if (!this.kupManager.objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
|
|
240
240
|
this.state.globalFilterValue = this.globalFilterValue;
|
|
241
241
|
somethingChanged = true;
|
|
242
242
|
}
|
|
@@ -348,9 +348,7 @@ export class KupTree {
|
|
|
348
348
|
* @param {KupDataColumn} column - Column to hide.
|
|
349
349
|
*/
|
|
350
350
|
async hideColumn(column) {
|
|
351
|
-
this.kupManager.data.
|
|
352
|
-
column.name,
|
|
353
|
-
]);
|
|
351
|
+
this.kupManager.data.column.hide(this.columns, [column.name]);
|
|
354
352
|
this.kupColumnRemove.emit({
|
|
355
353
|
comp: this,
|
|
356
354
|
id: this.rootElement.id,
|
|
@@ -804,8 +802,7 @@ export class KupTree {
|
|
|
804
802
|
this.kupManager.debug.logMessage(this, 'Detected KupDataDataset: setting up tree as grid.', KupDebugCategory.WARNING);
|
|
805
803
|
const data = this.data;
|
|
806
804
|
this.columns = data.columns;
|
|
807
|
-
this.data =
|
|
808
|
-
this.kupManager.data.datasetOperations.row.toNode(data);
|
|
805
|
+
this.data = this.kupManager.data.row.toNode(data);
|
|
809
806
|
this.showColumns = true;
|
|
810
807
|
this.showHeader = true;
|
|
811
808
|
}
|
|
@@ -1178,46 +1175,36 @@ export class KupTree {
|
|
|
1178
1175
|
if (this.isOpenedTotalMenuForColumn(column.name)) {
|
|
1179
1176
|
let listData = [
|
|
1180
1177
|
{
|
|
1181
|
-
|
|
1182
|
-
value:
|
|
1183
|
-
selected: false,
|
|
1178
|
+
id: TotalMode.COUNT,
|
|
1179
|
+
value: translation[TotalLabel.COUNT],
|
|
1184
1180
|
},
|
|
1185
1181
|
{
|
|
1186
|
-
|
|
1187
|
-
value:
|
|
1188
|
-
selected: false,
|
|
1182
|
+
id: TotalMode.DISTINCT,
|
|
1183
|
+
value: translation[TotalLabel.DISTINCT],
|
|
1189
1184
|
},
|
|
1190
1185
|
];
|
|
1191
1186
|
if (this.kupManager.objects.isNumber(column.obj)) {
|
|
1192
|
-
// TODO Move these objects in declarations
|
|
1193
1187
|
listData.push({
|
|
1194
|
-
|
|
1195
|
-
value:
|
|
1196
|
-
selected: false,
|
|
1188
|
+
id: TotalMode.SUM,
|
|
1189
|
+
value: translation[TotalLabel.SUM],
|
|
1197
1190
|
}, {
|
|
1198
|
-
|
|
1199
|
-
value:
|
|
1200
|
-
selected: false,
|
|
1191
|
+
id: TotalMode.AVERAGE,
|
|
1192
|
+
value: translation[TotalLabel.AVERAGE],
|
|
1201
1193
|
}, {
|
|
1202
|
-
|
|
1203
|
-
value:
|
|
1204
|
-
selected: false,
|
|
1194
|
+
id: TotalMode.MIN,
|
|
1195
|
+
value: translation[TotalLabel.MIN],
|
|
1205
1196
|
}, {
|
|
1206
|
-
|
|
1207
|
-
value:
|
|
1208
|
-
selected: false,
|
|
1197
|
+
id: TotalMode.MAX,
|
|
1198
|
+
value: translation[TotalLabel.MAX],
|
|
1209
1199
|
});
|
|
1210
1200
|
}
|
|
1211
|
-
|
|
1212
|
-
// Note that this is not supported in older IE
|
|
1213
|
-
let selectedItem = listData.find((item) => item.text === menuLabel);
|
|
1201
|
+
let selectedItem = listData.find((item) => item.value === menuLabel);
|
|
1214
1202
|
if (selectedItem) {
|
|
1215
1203
|
selectedItem.selected = true;
|
|
1216
1204
|
listData.push({
|
|
1217
|
-
|
|
1218
|
-
value: TotalLabel.CANC,
|
|
1219
|
-
selected: false,
|
|
1205
|
+
id: TotalLabel.CANC,
|
|
1220
1206
|
separator: true,
|
|
1207
|
+
value: translation[TotalLabel.CANC],
|
|
1221
1208
|
});
|
|
1222
1209
|
}
|
|
1223
1210
|
totalMenu = (h("kup-list", { class: `total-menu`, data: listData, id: "totals-menu", "is-menu": true, keyboardNavigation: true, "menu-visible": true, "onkup-list-click": (event) => this.onTotalsChange(event, column) }));
|
|
@@ -53,9 +53,9 @@ function getPageItems(props, maxNumberOfPage) {
|
|
|
53
53
|
for (let i = 1; i <= maxNumberOfPage; i++) {
|
|
54
54
|
const selected = i == props.currentPage;
|
|
55
55
|
pageItems.push({
|
|
56
|
-
|
|
57
|
-
value: i.toString(),
|
|
56
|
+
id: i.toString(),
|
|
58
57
|
selected: selected,
|
|
58
|
+
value: i.toString(),
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
return pageItems;
|
|
@@ -69,17 +69,17 @@ function getRowsItems(props) {
|
|
|
69
69
|
while (i < props.max) {
|
|
70
70
|
const selected = i == props.perPage;
|
|
71
71
|
rowsPerPageItems.push({
|
|
72
|
-
|
|
73
|
-
value: i.toString(),
|
|
72
|
+
id: i.toString(),
|
|
74
73
|
selected: selected,
|
|
74
|
+
value: i.toString(),
|
|
75
75
|
});
|
|
76
76
|
i = i * 2;
|
|
77
77
|
}
|
|
78
78
|
const selected = props.max == props.perPage;
|
|
79
79
|
rowsPerPageItems.push({
|
|
80
|
-
|
|
81
|
-
value: props.max.toString(),
|
|
80
|
+
id: props.max.toString(),
|
|
82
81
|
selected: selected,
|
|
82
|
+
value: props.max.toString(),
|
|
83
83
|
});
|
|
84
84
|
return rowsPerPageItems;
|
|
85
85
|
}
|