@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
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
7
|
+
const utils = require('./utils-e99921c1.js');
|
|
8
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
9
|
|
|
10
10
|
const navbarClass = 'nav-bar';
|
|
@@ -31,7 +31,7 @@ var KupNavBarStyling;
|
|
|
31
31
|
|
|
32
32
|
const kupNavBarCss = ":host{--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_padding:var(--kup-navbar-padding, 8px 12px);--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup-navbar-background-color);box-shadow:var(--kup_navbar_box_shadow);box-sizing:border-box;color:var(--kup-navbar-color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-primary-color:var(--kup-navbar-color);--kup-textfield-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}";
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
const KupNavBar = class {
|
|
35
35
|
constructor(hostRef) {
|
|
36
36
|
index.registerInstance(this, hostRef);
|
|
37
37
|
this.kupNavbarReady = index.createEvent(this, "kup-navbar-ready", 6);
|
|
@@ -114,8 +114,8 @@ let KupNavBar = class {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
return [
|
|
117
|
-
index.h("section", { class: `${navbarClass}__section ${navbarClass}__section--align-start` }, leftSlots),
|
|
118
|
-
index.h("section", { class: `${navbarClass}__section ${navbarClass}__section--align-end`, role: "toolbar" }, rightSlots),
|
|
117
|
+
leftSlots.length ? (index.h("section", { class: `${navbarClass}__section ${navbarClass}__section--align-start` }, leftSlots)) : null,
|
|
118
|
+
rightSlots.length ? (index.h("section", { class: `${navbarClass}__section ${navbarClass}__section--align-end`, role: "toolbar" }, rightSlots)) : null,
|
|
119
119
|
];
|
|
120
120
|
}
|
|
121
121
|
/*-------------------------------------------------*/
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
7
|
+
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
8
|
+
const fTextField = require('./f-text-field-e7c35b5b.js');
|
|
9
|
+
const fTextFieldMdc = require('./f-text-field-mdc-a67f5dfe.js');
|
|
10
|
+
require('./tslib.es6-0ee02c67.js');
|
|
11
|
+
require('./component-d1496215.js');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Props of the kup-numeric-picker component.
|
|
15
|
+
* Used to export every prop in an object.
|
|
16
|
+
*/
|
|
17
|
+
var KupNumericPickerProps;
|
|
18
|
+
(function (KupNumericPickerProps) {
|
|
19
|
+
KupNumericPickerProps["customStyle"] = "Custom style of the component.";
|
|
20
|
+
KupNumericPickerProps["data"] = "Props of the sub-components.";
|
|
21
|
+
KupNumericPickerProps["decimals"] = "Defaults at false. When set to true, the component has decimals.";
|
|
22
|
+
KupNumericPickerProps["disabled"] = "Defaults at false. When set to true, the component is disabled.";
|
|
23
|
+
KupNumericPickerProps["initialValue"] = "Sets the initial value of the component";
|
|
24
|
+
KupNumericPickerProps["maxDecimals"] = "when set, the component allows you to enter decimals with a maximum of characters.";
|
|
25
|
+
KupNumericPickerProps["maxIntegers"] = "When set, the component allows you to enter integer numbers with a maximum of characters.";
|
|
26
|
+
KupNumericPickerProps["maxLength"] = "When set, the component allows you to enter numbers with a maximum of characters, including decimals.";
|
|
27
|
+
KupNumericPickerProps["negative"] = "Defaults at false. When set to true, the component has negative number.";
|
|
28
|
+
})(KupNumericPickerProps || (KupNumericPickerProps = {}));
|
|
29
|
+
|
|
30
|
+
const kupNumericPickerCss = ":host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
31
|
+
|
|
32
|
+
const KupNumericPicker = class {
|
|
33
|
+
constructor(hostRef) {
|
|
34
|
+
index.registerInstance(this, hostRef);
|
|
35
|
+
this.kupBlur = index.createEvent(this, "kup-numericpicker-blur", 6);
|
|
36
|
+
this.kupChange = index.createEvent(this, "kup-numericpicker-change", 6);
|
|
37
|
+
this.kupClick = index.createEvent(this, "kup-numericpicker-click", 6);
|
|
38
|
+
this.kupFocus = index.createEvent(this, "kup-numericpicker-focus", 6);
|
|
39
|
+
this.kupInput = index.createEvent(this, "kup-numericpicker-input", 6);
|
|
40
|
+
this.kupIconClick = index.createEvent(this, "kup-numericpicker-iconclick", 6);
|
|
41
|
+
this.kupItemClick = index.createEvent(this, "kup-numericpicker-itemclick", 6);
|
|
42
|
+
this.kupTextFieldSubmit = index.createEvent(this, "kup-numericpicker-textfieldsubmit", 6);
|
|
43
|
+
this.kupClearIconClick = index.createEvent(this, "kup-numericpicker-cleariconclick", 6);
|
|
44
|
+
/*-------------------------------------------------*/
|
|
45
|
+
/* S t a t e s */
|
|
46
|
+
/*-------------------------------------------------*/
|
|
47
|
+
this.stateSwitcher = false;
|
|
48
|
+
this.value = '';
|
|
49
|
+
/*-------------------------------------------------*/
|
|
50
|
+
/* P r o p s */
|
|
51
|
+
/*-------------------------------------------------*/
|
|
52
|
+
/**
|
|
53
|
+
* Custom style of the component.
|
|
54
|
+
* @default ""
|
|
55
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
56
|
+
*/
|
|
57
|
+
this.customStyle = '';
|
|
58
|
+
/**
|
|
59
|
+
* Props of the sub-components.
|
|
60
|
+
* @default null
|
|
61
|
+
*/
|
|
62
|
+
this.data = null;
|
|
63
|
+
/**
|
|
64
|
+
* Defaults at false. When set to true, the component has decimals.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
this.decimals = false;
|
|
68
|
+
/**
|
|
69
|
+
* Defaults at false. When set to true, the component is disabled.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
this.disabled = false;
|
|
73
|
+
/**
|
|
74
|
+
* Sets the initial value of the component
|
|
75
|
+
* @default ""
|
|
76
|
+
*/
|
|
77
|
+
this.initialValue = '';
|
|
78
|
+
/**
|
|
79
|
+
* when set, the component allows you to enter decimals with a maximum of characters.
|
|
80
|
+
* @default null
|
|
81
|
+
*/
|
|
82
|
+
this.maxDecimals = null;
|
|
83
|
+
/**
|
|
84
|
+
* When set, the component allows you to enter integer numbers with a maximum of characters.
|
|
85
|
+
* @default null
|
|
86
|
+
*/
|
|
87
|
+
this.maxIntegers = null;
|
|
88
|
+
/**
|
|
89
|
+
* When set, the component allows you to enter numbers with a maximum of characters, including decimals.
|
|
90
|
+
* @default null
|
|
91
|
+
*/
|
|
92
|
+
this.maxLength = null;
|
|
93
|
+
/**
|
|
94
|
+
* Defaults at false. When set to true, the component has negative number.
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
this.negative = false;
|
|
98
|
+
/*-------------------------------------------------*/
|
|
99
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
100
|
+
/*-------------------------------------------------*/
|
|
101
|
+
/**
|
|
102
|
+
* Instance of the KupManager class.
|
|
103
|
+
*/
|
|
104
|
+
this.kupManager = kupManager.kupManagerInstance();
|
|
105
|
+
this.textfieldEl = null;
|
|
106
|
+
this.pickerContainerEl = null;
|
|
107
|
+
this.pickerEl = {
|
|
108
|
+
value: new Date().toISOString(),
|
|
109
|
+
date: new Date(),
|
|
110
|
+
};
|
|
111
|
+
this.clickCb = null;
|
|
112
|
+
}
|
|
113
|
+
onKupPickerItemClick(value) {
|
|
114
|
+
this.setPickerValueSelected(value);
|
|
115
|
+
this.kupChange.emit({
|
|
116
|
+
comp: this,
|
|
117
|
+
id: this.rootElement.id,
|
|
118
|
+
value: this.value,
|
|
119
|
+
});
|
|
120
|
+
this.kupItemClick.emit({
|
|
121
|
+
comp: this,
|
|
122
|
+
id: this.rootElement.id,
|
|
123
|
+
value: this.value,
|
|
124
|
+
});
|
|
125
|
+
this.setFocus();
|
|
126
|
+
}
|
|
127
|
+
onKupClearIconClick() {
|
|
128
|
+
this.setPickerValueSelected('');
|
|
129
|
+
this.kupChange.emit({
|
|
130
|
+
comp: this,
|
|
131
|
+
id: this.rootElement.id,
|
|
132
|
+
value: this.value,
|
|
133
|
+
});
|
|
134
|
+
this.kupClearIconClick.emit({
|
|
135
|
+
comp: this,
|
|
136
|
+
id: this.rootElement.id,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
onKupBlur() {
|
|
140
|
+
this.kupBlur.emit({
|
|
141
|
+
id: this.rootElement.id,
|
|
142
|
+
value: this.value,
|
|
143
|
+
comp: this,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
onKupChange(e) {
|
|
147
|
+
this.refreshPickerValue(e.target.value, this.kupChange);
|
|
148
|
+
}
|
|
149
|
+
onKupClick() {
|
|
150
|
+
this.kupClick.emit({
|
|
151
|
+
comp: this,
|
|
152
|
+
id: this.rootElement.id,
|
|
153
|
+
value: this.value,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
onKupFocus() {
|
|
157
|
+
this.kupFocus.emit({
|
|
158
|
+
comp: this,
|
|
159
|
+
id: this.rootElement.id,
|
|
160
|
+
value: this.value,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
onKupInput(e) {
|
|
164
|
+
this.refreshPickerValue(e.target.value, this.kupInput, true);
|
|
165
|
+
}
|
|
166
|
+
onkupTextFieldSubmit(e) {
|
|
167
|
+
if (e.key === 'Enter') {
|
|
168
|
+
this.refreshPickerValue(e.target.value, this.kupTextFieldSubmit);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
onKupIconClick() {
|
|
172
|
+
if (this.isPickerOpened()) {
|
|
173
|
+
this.closePicker();
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.openPicker();
|
|
177
|
+
}
|
|
178
|
+
this.kupIconClick.emit({
|
|
179
|
+
comp: this,
|
|
180
|
+
id: this.rootElement.id,
|
|
181
|
+
value: this.value,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/*-------------------------------------------------*/
|
|
185
|
+
/* L i s t e n e r s */
|
|
186
|
+
/*-------------------------------------------------*/
|
|
187
|
+
listenKeyup(e) {
|
|
188
|
+
if (this.isPickerOpened()) {
|
|
189
|
+
if (e.key === 'Escape') {
|
|
190
|
+
this.closePicker();
|
|
191
|
+
}
|
|
192
|
+
if (e.key === 'Enter') {
|
|
193
|
+
this.setPickerValueSelected();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/*-------------------------------------------------*/
|
|
198
|
+
/* P u b l i c M e t h o d s */
|
|
199
|
+
/*-------------------------------------------------*/
|
|
200
|
+
/**
|
|
201
|
+
* Retrieves the component's value.
|
|
202
|
+
* @returns {string} Value of the component.
|
|
203
|
+
*/
|
|
204
|
+
async getValue() {
|
|
205
|
+
return this.value;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Used to retrieve component's props values.
|
|
209
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
210
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
211
|
+
*/
|
|
212
|
+
async getProps(descriptions) {
|
|
213
|
+
let props = {};
|
|
214
|
+
if (descriptions) {
|
|
215
|
+
props = KupNumericPickerProps;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
for (const key in KupNumericPickerProps) {
|
|
219
|
+
if (Object.prototype.hasOwnProperty.call(KupNumericPickerProps, key)) {
|
|
220
|
+
props[key] = this[key];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return props;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* This method is used to trigger a new render of the component.
|
|
228
|
+
*/
|
|
229
|
+
async refresh() {
|
|
230
|
+
index.forceUpdate(this);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Sets the focus to the component.
|
|
234
|
+
*/
|
|
235
|
+
async setFocus() {
|
|
236
|
+
if (this.textfieldEl != null) {
|
|
237
|
+
this.textfieldEl.focus();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Sets the component's value.
|
|
242
|
+
* @param {string} value - Value to be set.
|
|
243
|
+
*/
|
|
244
|
+
async setValue(value) {
|
|
245
|
+
this.value = value;
|
|
246
|
+
}
|
|
247
|
+
/*-------------------------------------------------*/
|
|
248
|
+
/* P r i v a t e M e t h o d s */
|
|
249
|
+
/*-------------------------------------------------*/
|
|
250
|
+
refreshPickerValue(eventDetailValue, eventToRaise, isOnInputEvent) {
|
|
251
|
+
let newValue = this.kupManager.math.numberify(eventDetailValue, true);
|
|
252
|
+
if (newValue) {
|
|
253
|
+
let str = newValue.toString();
|
|
254
|
+
// here we check the input digits and fix with numeric picker rules.
|
|
255
|
+
const idx = str.indexOf('.');
|
|
256
|
+
let int = idx > -1 ? str.substring(0, idx) : str;
|
|
257
|
+
let dec = idx > -1 ? str.substring(idx + 1) : '';
|
|
258
|
+
if (this.maxIntegers && int.length > this.maxIntegers)
|
|
259
|
+
int = int.substring(int.length - this.maxIntegers);
|
|
260
|
+
if (this.maxDecimals && dec.length > this.maxDecimals)
|
|
261
|
+
dec = dec.substring(0, this.maxDecimals);
|
|
262
|
+
while (this.maxLength && int.length + dec.length > this.maxLength) {
|
|
263
|
+
if (dec.length > 1)
|
|
264
|
+
dec = dec.substring(0, dec.length - 1);
|
|
265
|
+
else if (int.length > 1)
|
|
266
|
+
int = int.substring(1);
|
|
267
|
+
}
|
|
268
|
+
str = idx > -1 ? `${int}.${dec}` : int;
|
|
269
|
+
if (isOnInputEvent != true) {
|
|
270
|
+
this.setValue(str);
|
|
271
|
+
}
|
|
272
|
+
if (eventToRaise != null) {
|
|
273
|
+
eventToRaise.emit({
|
|
274
|
+
id: this.rootElement.id,
|
|
275
|
+
value: str,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
setPickerValueSelected(newValue) {
|
|
281
|
+
if (this.disabled == true) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (newValue == null) {
|
|
285
|
+
newValue = this.getPickerValueSelected();
|
|
286
|
+
}
|
|
287
|
+
this.closePicker();
|
|
288
|
+
if (newValue == null) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
this.setValue(newValue);
|
|
292
|
+
}
|
|
293
|
+
getPickerValueSelected() {
|
|
294
|
+
return this.pickerEl.value;
|
|
295
|
+
}
|
|
296
|
+
getValueForPickerComponent() {
|
|
297
|
+
return this.value;
|
|
298
|
+
}
|
|
299
|
+
openPicker() {
|
|
300
|
+
const textfieldEl = this.textfieldEl;
|
|
301
|
+
this.pickerContainerEl.menuVisible = true;
|
|
302
|
+
const elStyle = this.pickerContainerEl.style;
|
|
303
|
+
elStyle.height = 'auto';
|
|
304
|
+
elStyle.minWidth = this.textfieldEl.parentElement.clientWidth + 'px';
|
|
305
|
+
if (textfieldEl != null) {
|
|
306
|
+
textfieldEl.classList.add('toggled');
|
|
307
|
+
}
|
|
308
|
+
if (this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)) {
|
|
309
|
+
this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl, this.textfieldEl.parentElement);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
this.kupManager.dynamicPosition.register(this.pickerContainerEl, this.textfieldEl.parentElement, 0, kupManager.KupDynamicPositionPlacement.AUTO, true);
|
|
313
|
+
}
|
|
314
|
+
this.kupManager.dynamicPosition.start(this.pickerContainerEl);
|
|
315
|
+
if (!this.clickCb) {
|
|
316
|
+
this.clickCb = {
|
|
317
|
+
cb: () => {
|
|
318
|
+
this.closePicker();
|
|
319
|
+
},
|
|
320
|
+
el: this.pickerContainerEl,
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
this.kupManager.addClickCallback(this.clickCb, true);
|
|
324
|
+
}
|
|
325
|
+
closePicker() {
|
|
326
|
+
this.kupManager.removeClickCallback(this.clickCb);
|
|
327
|
+
if (!this.isPickerOpened()) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
let textfieldEl = this.textfieldEl;
|
|
331
|
+
if (textfieldEl != null) {
|
|
332
|
+
textfieldEl.classList.remove('toggled');
|
|
333
|
+
}
|
|
334
|
+
this.pickerContainerEl.menuVisible = false;
|
|
335
|
+
this.kupManager.dynamicPosition.stop(this.pickerContainerEl);
|
|
336
|
+
}
|
|
337
|
+
isPickerOpened() {
|
|
338
|
+
return this.pickerContainerEl.menuVisible == true;
|
|
339
|
+
}
|
|
340
|
+
getTextFieldId() {
|
|
341
|
+
return this.textfieldEl.id;
|
|
342
|
+
}
|
|
343
|
+
prepTextfield() {
|
|
344
|
+
if (!this.decimals && !this.maxIntegers)
|
|
345
|
+
this.maxIntegers = 17;
|
|
346
|
+
if (this.decimals && !this.maxIntegers && !this.maxDecimals) {
|
|
347
|
+
this.maxIntegers = 15;
|
|
348
|
+
this.maxDecimals = 2;
|
|
349
|
+
}
|
|
350
|
+
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
351
|
+
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
352
|
+
const textfieldData = Object.assign({}, this.data['kup-text-field']);
|
|
353
|
+
if (!textfieldData.icon) {
|
|
354
|
+
textfieldData.icon = 'calculator';
|
|
355
|
+
}
|
|
356
|
+
if (textfieldData.icon) {
|
|
357
|
+
textfieldData.trailingIcon = true;
|
|
358
|
+
}
|
|
359
|
+
return (index.h(fTextField.FTextField, Object.assign({}, textfieldData, { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, id: this.rootElement.id + '_text-field', value: this.kupManager.math.numbers.toLocaleString(this.value), onBlur: () => this.onKupBlur(), onChange: (e) => this.onKupChange(e), onClearIconClick: () => this.onKupClearIconClick(), onClick: () => this.onKupClick(), onFocus: () => this.onKupFocus(), onIconClick: () => this.onKupIconClick(), onKeyDown: (e) => this.onkupTextFieldSubmit(e), onInput: (e) => this.onKupInput(e) }), this.prepPicker()));
|
|
360
|
+
}
|
|
361
|
+
prepPicker() {
|
|
362
|
+
const data = {
|
|
363
|
+
options: {
|
|
364
|
+
decimals: this.decimals,
|
|
365
|
+
initialValue: this.value,
|
|
366
|
+
maxDecimals: this.maxDecimals,
|
|
367
|
+
maxIntegers: this.maxIntegers,
|
|
368
|
+
maxLength: this.maxLength,
|
|
369
|
+
negative: this.negative,
|
|
370
|
+
resetStatus: true,
|
|
371
|
+
},
|
|
372
|
+
};
|
|
373
|
+
return (index.h("kup-card", { ref: (el) => (this.pickerContainerEl = el), data: data, layoutFamily: kupManager.KupCardFamily.BUILT_IN, layoutNumber: 5, sizeX: "300px", sizeY: "auto", isMenu: true, "onkup-card-click": (ev) => {
|
|
374
|
+
if (ev.detail.value != null)
|
|
375
|
+
this.onKupPickerItemClick(ev.detail.value);
|
|
376
|
+
} }));
|
|
377
|
+
}
|
|
378
|
+
/*-------------------------------------------------*/
|
|
379
|
+
/* L i f e c y c l e H o o k s */
|
|
380
|
+
/*-------------------------------------------------*/
|
|
381
|
+
componentWillLoad() {
|
|
382
|
+
this.kupManager.dates.register(this);
|
|
383
|
+
this.kupManager.debug.logLoad(this, false);
|
|
384
|
+
this.kupManager.theme.register(this);
|
|
385
|
+
this.value = this.initialValue;
|
|
386
|
+
if (!this.data) {
|
|
387
|
+
this.data = {
|
|
388
|
+
'kup-text-field': {},
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
componentDidLoad() {
|
|
393
|
+
this.kupManager.debug.logLoad(this, true);
|
|
394
|
+
}
|
|
395
|
+
componentWillRender() {
|
|
396
|
+
this.kupManager.debug.logRender(this, false);
|
|
397
|
+
}
|
|
398
|
+
componentDidRender() {
|
|
399
|
+
const root = this.rootElement.shadowRoot;
|
|
400
|
+
if (root) {
|
|
401
|
+
const f = root.querySelector('.f-text-field');
|
|
402
|
+
if (f) {
|
|
403
|
+
this.textfieldEl = f.querySelector('input');
|
|
404
|
+
fTextFieldMdc.FTextFieldMDC(f);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
this.kupManager.debug.logRender(this, true);
|
|
408
|
+
}
|
|
409
|
+
render() {
|
|
410
|
+
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, this.prepTextfield())));
|
|
411
|
+
}
|
|
412
|
+
disconnectedCallback() {
|
|
413
|
+
this.kupManager.dates.unregister(this);
|
|
414
|
+
this.kupManager.theme.unregister(this);
|
|
415
|
+
if (this.pickerContainerEl) {
|
|
416
|
+
this.pickerContainerEl.remove();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
get rootElement() { return index.getElement(this); }
|
|
420
|
+
};
|
|
421
|
+
KupNumericPicker.style = kupNumericPickerCss;
|
|
422
|
+
|
|
423
|
+
exports.kup_numeric_picker = KupNumericPicker;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
7
|
+
const utils = require('./utils-e99921c1.js');
|
|
8
|
+
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Props of the kup-photo-frame component.
|
|
12
|
+
* Used to export every prop in an object.
|
|
13
|
+
*/
|
|
14
|
+
var KupPhotoFrameProps;
|
|
15
|
+
(function (KupPhotoFrameProps) {
|
|
16
|
+
KupPhotoFrameProps["customStyle"] = "Custom style of the component.";
|
|
17
|
+
KupPhotoFrameProps["placeholderAttrs"] = "Html attributes of the picture before the component enters the viewport.";
|
|
18
|
+
KupPhotoFrameProps["resourceAttrs"] = "Html attributes of the picture after the component enters the viewport.";
|
|
19
|
+
})(KupPhotoFrameProps || (KupPhotoFrameProps = {}));
|
|
20
|
+
|
|
21
|
+
const kupPhotoFrameCss = ":host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-color)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";
|
|
22
|
+
|
|
23
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
24
|
+
if (kind === "a" && !f)
|
|
25
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
26
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
27
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
28
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
29
|
+
};
|
|
30
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
31
|
+
if (kind === "m")
|
|
32
|
+
throw new TypeError("Private method is not writable");
|
|
33
|
+
if (kind === "a" && !f)
|
|
34
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
35
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
36
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
37
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
38
|
+
};
|
|
39
|
+
var _KupPhotoFrame_intObserver, _KupPhotoFrame_kupManager, _KupPhotoFrame_placeholderEl, _KupPhotoFrame_resourceEl, _KupPhotoFrame_renderResource, _KupPhotoFrame_wrapperEl;
|
|
40
|
+
const KupPhotoFrame = class {
|
|
41
|
+
constructor(hostRef) {
|
|
42
|
+
index.registerInstance(this, hostRef);
|
|
43
|
+
this.kupPhotoFramePlaceholderLoad = index.createEvent(this, "kup-photoframe-placeholderload", 6);
|
|
44
|
+
this.kupPhotoFrameResourceLoad = index.createEvent(this, "kup-photoframe-resourceload", 6);
|
|
45
|
+
/*-------------------------------------------------*/
|
|
46
|
+
/* S t a t e s */
|
|
47
|
+
/*-------------------------------------------------*/
|
|
48
|
+
this.isInViewport = false;
|
|
49
|
+
/*-------------------------------------------------*/
|
|
50
|
+
/* P r o p s */
|
|
51
|
+
/*-------------------------------------------------*/
|
|
52
|
+
/**
|
|
53
|
+
* Custom style of the component.
|
|
54
|
+
* @default ""
|
|
55
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
56
|
+
*/
|
|
57
|
+
this.customStyle = '';
|
|
58
|
+
/**
|
|
59
|
+
* Html attributes of the picture before the component enters the viewport.
|
|
60
|
+
* @default {}
|
|
61
|
+
*/
|
|
62
|
+
this.placeholderAttrs = {};
|
|
63
|
+
/**
|
|
64
|
+
* Html attributes of the picture after the component enters the viewport.
|
|
65
|
+
* @default {}
|
|
66
|
+
*/
|
|
67
|
+
this.resourceAttrs = {};
|
|
68
|
+
/**
|
|
69
|
+
* Percentage of the component dimensions entering the viewport (0.1 => 1).
|
|
70
|
+
* @default 0.25
|
|
71
|
+
*/
|
|
72
|
+
this.threshold = 0.25;
|
|
73
|
+
/*-------------------------------------------------*/
|
|
74
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
75
|
+
/*-------------------------------------------------*/
|
|
76
|
+
_KupPhotoFrame_intObserver.set(this, null);
|
|
77
|
+
_KupPhotoFrame_kupManager.set(this, kupManager.kupManagerInstance());
|
|
78
|
+
_KupPhotoFrame_placeholderEl.set(this, null);
|
|
79
|
+
_KupPhotoFrame_resourceEl.set(this, null);
|
|
80
|
+
_KupPhotoFrame_renderResource.set(this, false);
|
|
81
|
+
_KupPhotoFrame_wrapperEl.set(this, null);
|
|
82
|
+
}
|
|
83
|
+
/*-------------------------------------------------*/
|
|
84
|
+
/* P u b l i c M e t h o d s */
|
|
85
|
+
/*-------------------------------------------------*/
|
|
86
|
+
/**
|
|
87
|
+
* Used to retrieve component's props values.
|
|
88
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
89
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
90
|
+
*/
|
|
91
|
+
async getProps(descriptions) {
|
|
92
|
+
return utils.getProps(this, KupPhotoFrameProps, descriptions);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* This method is used to trigger a new render of the component.
|
|
96
|
+
*/
|
|
97
|
+
async refresh() {
|
|
98
|
+
index.forceUpdate(this);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Sets the props to the component.
|
|
102
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
103
|
+
*/
|
|
104
|
+
async setProps(props) {
|
|
105
|
+
utils.setProps(this, KupPhotoFrameProps, props);
|
|
106
|
+
}
|
|
107
|
+
/*-------------------------------------------------*/
|
|
108
|
+
/* P r i v a t e M e t h o d s */
|
|
109
|
+
/*-------------------------------------------------*/
|
|
110
|
+
setObserver() {
|
|
111
|
+
let callback = (entries) => {
|
|
112
|
+
entries.forEach((entry) => {
|
|
113
|
+
if (entry.isIntersecting) {
|
|
114
|
+
this.isInViewport = true;
|
|
115
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_intObserver, "f").unobserve(this.rootElement);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
let options = {
|
|
120
|
+
threshold: this.threshold,
|
|
121
|
+
};
|
|
122
|
+
__classPrivateFieldSet(this, _KupPhotoFrame_intObserver, new IntersectionObserver(callback, options), "f");
|
|
123
|
+
}
|
|
124
|
+
/*-------------------------------------------------*/
|
|
125
|
+
/* L i f e c y c l e H o o k s */
|
|
126
|
+
/*-------------------------------------------------*/
|
|
127
|
+
componentWillLoad() {
|
|
128
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logLoad(this, false);
|
|
129
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.register(this);
|
|
130
|
+
this.setObserver();
|
|
131
|
+
}
|
|
132
|
+
componentDidLoad() {
|
|
133
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logLoad(this, true);
|
|
134
|
+
}
|
|
135
|
+
componentWillRender() {
|
|
136
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logRender(this, false);
|
|
137
|
+
}
|
|
138
|
+
componentDidRender() {
|
|
139
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").debug.logRender(this, true);
|
|
140
|
+
}
|
|
141
|
+
render() {
|
|
142
|
+
if (this.isInViewport && !__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f")) {
|
|
143
|
+
__classPrivateFieldSet(this, _KupPhotoFrame_renderResource, true, "f");
|
|
144
|
+
}
|
|
145
|
+
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, ref: (el) => {
|
|
146
|
+
__classPrivateFieldSet(this, _KupPhotoFrame_wrapperEl, el, "f");
|
|
147
|
+
} }, index.h("img", Object.assign({}, this.placeholderAttrs, { class: "placeholder", ref: (el) => (__classPrivateFieldSet(this, _KupPhotoFrame_placeholderEl, el, "f")), onLoad: () => {
|
|
148
|
+
if (__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").naturalWidth >
|
|
149
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").naturalHeight) {
|
|
150
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_wrapperEl, "f").classList.add('horizontal');
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_wrapperEl, "f").classList.add('vertical');
|
|
154
|
+
}
|
|
155
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_intObserver, "f").observe(this.rootElement);
|
|
156
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").classList.add('placeholder--loaded');
|
|
157
|
+
this.kupPhotoFramePlaceholderLoad.emit({
|
|
158
|
+
comp: this,
|
|
159
|
+
id: this.rootElement.id,
|
|
160
|
+
});
|
|
161
|
+
} })), __classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f") ? (index.h("img", Object.assign({}, this.resourceAttrs, { class: "resource", ref: (el) => (__classPrivateFieldSet(this, _KupPhotoFrame_resourceEl, el, "f")), onLoad: () => {
|
|
162
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").classList.add('placeholder--fade-out');
|
|
163
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_resourceEl, "f").classList.add('resource--fade-in');
|
|
164
|
+
this.kupPhotoFrameResourceLoad.emit({
|
|
165
|
+
comp: this,
|
|
166
|
+
id: this.rootElement.id,
|
|
167
|
+
});
|
|
168
|
+
} }))) : null)));
|
|
169
|
+
}
|
|
170
|
+
disconnectedCallback() {
|
|
171
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.unregister(this);
|
|
172
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_intObserver, "f").unobserve(this.rootElement);
|
|
173
|
+
}
|
|
174
|
+
get rootElement() { return index.getElement(this); }
|
|
175
|
+
};
|
|
176
|
+
_KupPhotoFrame_intObserver = new WeakMap(), _KupPhotoFrame_kupManager = new WeakMap(), _KupPhotoFrame_placeholderEl = new WeakMap(), _KupPhotoFrame_resourceEl = new WeakMap(), _KupPhotoFrame_renderResource = new WeakMap(), _KupPhotoFrame_wrapperEl = new WeakMap();
|
|
177
|
+
KupPhotoFrame.style = kupPhotoFrameCss;
|
|
178
|
+
|
|
179
|
+
exports.kup_photo_frame = KupPhotoFrame;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
7
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const KupProbe = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
/*-------------------------------------------------*/
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
5
|
+
const index = require('./index-eb556444.js');
|
|
6
|
+
const kupManager = require('./kup-manager-5c03da64.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
|
|
|
10
|
-
|
|
10
|
+
const KupQlik = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
/**
|