@sme.up/ketchup 4.3.0-SNAPSHOT → 5.1.0-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 +107 -3
- package/dist/cjs/{cell-utils-dc0884a3.js → cell-utils-9b1d6563.js} +4 -4
- package/dist/cjs/{component-8fbc31a2.js → component-d1496215.js} +203 -174
- package/dist/cjs/{f-button-2ba74fb5.js → f-button-02a7cde4.js} +2 -2
- package/dist/cjs/{f-cell-fe60a08d.js → f-cell-4d1450a8.js} +38 -28
- package/dist/cjs/f-chip-a50b9f00.js +130 -0
- package/dist/cjs/{f-image-d3bd4e08.js → f-image-db55ac49.js} +3 -3
- package/dist/cjs/{index-0416afab.js → index-ab119fad.js} +23 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +7 -7
- package/dist/cjs/{kup-autocomplete_28.cjs.entry.js → kup-autocomplete_27.cjs.entry.js} +4636 -4073
- package/dist/cjs/kup-calendar.cjs.entry.js +626 -359
- package/dist/cjs/kup-cell.cjs.entry.js +15 -13
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +8 -7
- package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
- package/dist/cjs/kup-echart.cjs.entry.js +93039 -0
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +22 -5
- package/dist/cjs/kup-magic-box.cjs.entry.js +95 -42
- package/dist/cjs/{kup-manager-1a2688ca.js → kup-manager-5877b2ee.js} +3392 -753
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tslib.es6-4360c099.js → tslib.es6-0ee02c67.js} +13 -0
- package/dist/cjs/utils-1b5c8c70.js +482 -0
- package/dist/collection/assets/calendar.js +46 -1
- package/dist/collection/assets/card.js +15 -15
- package/dist/collection/assets/data-table.js +18 -6
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/kupdata.js +937 -0
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/kup-accordion/kup-accordion.css +0 -1
- package/dist/collection/components/kup-accordion/kup-accordion.js +2 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +148 -52
- package/dist/collection/components/kup-badge/kup-badge.js +2 -2
- package/dist/collection/components/kup-box/kup-box.js +31 -17
- package/dist/collection/components/kup-button/kup-button.js +2 -2
- package/dist/collection/components/kup-button-list/kup-button-list.js +26 -8
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +14 -8
- package/dist/collection/components/kup-calendar/kup-calendar.css +2 -2
- package/dist/collection/components/kup-calendar/kup-calendar.js +185 -315
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +38 -0
- package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-calendar.js +1 -1
- package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-clock.js +32 -32
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +167 -0
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +1 -1
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +2 -2
- package/dist/collection/components/kup-card/free/kup-card-free.js +11 -2
- package/dist/collection/components/kup-card/kup-card-declarations.js +14 -14
- package/dist/collection/components/kup-card/kup-card-helper.js +3 -3
- package/dist/collection/components/kup-card/kup-card.css +423 -137
- package/dist/collection/components/kup-card/kup-card.js +62 -11
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +1 -1
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +18 -5
- package/dist/collection/components/kup-cell/kup-cell.js +15 -13
- package/dist/collection/components/kup-chart/kup-chart-builder.js +3 -4
- package/dist/collection/components/kup-chart/kup-chart.js +7 -7
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
- package/dist/collection/components/kup-chip/kup-chip.css +1 -0
- package/dist/collection/components/kup-chip/kup-chip.js +51 -92
- package/dist/collection/components/kup-color-picker/kup-color-picker.css +1 -265
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +93 -48
- package/dist/collection/components/kup-combobox/kup-combobox.js +148 -115
- package/dist/collection/components/kup-dash/kup-dash.js +1 -1
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +5 -5
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +28 -56
- package/dist/collection/components/kup-data-table/kup-data-table.css +4 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +345 -158
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +8 -5
- package/dist/collection/components/kup-drawer/kup-drawer.js +1 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +2 -2
- package/dist/collection/components/kup-echart/assets/maps/africa.json +6116 -0
- package/dist/collection/components/kup-echart/assets/maps/america.json +5416 -0
- package/dist/collection/components/kup-echart/assets/maps/asia.json +6053 -0
- package/dist/collection/components/kup-echart/assets/maps/europe.json +5051 -0
- package/dist/collection/components/kup-echart/assets/maps/italy.json +3562 -0
- package/dist/collection/components/kup-echart/assets/maps/oceania.json +1069 -0
- package/dist/collection/components/kup-echart/assets/maps/world.json +23685 -0
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +45 -0
- package/dist/collection/components/kup-echart/kup-echart.css +13 -0
- package/dist/collection/components/kup-echart/kup-echart.js +1165 -0
- package/dist/collection/components/kup-field/kup-field.js +2 -2
- package/dist/collection/components/kup-gauge/kup-gauge.js +3 -3
- package/dist/collection/components/kup-grid/kup-grid.css +2 -2
- package/dist/collection/components/kup-grid/kup-grid.js +6 -5
- package/dist/collection/components/kup-iframe/kup-iframe.js +2 -2
- package/dist/collection/components/kup-image/assets/svg/science.svg +1 -0
- package/dist/collection/components/kup-image/kup-image.js +3 -3
- package/dist/collection/components/kup-lazy/kup-lazy.css +21 -11
- package/dist/collection/components/kup-lazy/kup-lazy.js +62 -3
- package/dist/collection/components/kup-list/kup-list-helper.js +7 -1
- package/dist/collection/components/kup-list/kup-list.css +3 -0
- package/dist/collection/components/kup-list/kup-list.js +219 -288
- package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +11 -7
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +90 -41
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-radio/kup-radio.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +1 -1
- package/dist/collection/components/kup-state/mock-store.js +1 -1
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +3 -3
- package/dist/collection/components/kup-text-field/kup-text-field.css +2 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +2 -2
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -5
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +3 -3
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -5
- package/dist/collection/components/kup-tree/kup-tree-faker.js +2 -3
- package/dist/collection/components/kup-tree/kup-tree.css +2 -0
- package/dist/collection/components/kup-tree/kup-tree.js +145 -70
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +3 -1
- package/dist/collection/f-components/f-cell/f-cell.js +29 -19
- package/dist/collection/f-components/f-chip/f-chip.js +76 -87
- package/dist/collection/f-components/f-image/f-image.js +2 -2
- package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -0
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -0
- package/dist/collection/f-components/f-paginator/f-paginator.js +91 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +4 -4
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +52 -0
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +272 -0
- package/dist/collection/managers/kup-data/kup-data-declarations.js +9 -0
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +72 -0
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -0
- package/dist/collection/managers/kup-data/kup-data.js +382 -0
- package/dist/collection/{utils → managers}/kup-dates/kup-dates-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-dates/kup-dates.js +53 -19
- package/dist/collection/{utils → managers}/kup-debug/kup-debug-browser-utils.js +1 -1
- package/dist/collection/{utils → managers}/kup-debug/kup-debug-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-debug/kup-debug.js +79 -124
- package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position.js +10 -1
- package/dist/collection/{utils → managers}/kup-interact/kup-interact-declarations.js +1 -0
- package/dist/collection/{utils → managers}/kup-interact/kup-interact.js +22 -13
- package/dist/collection/{utils → managers}/kup-language/kup-language-declarations.js +10 -0
- package/dist/collection/{utils → managers}/kup-language/kup-language.js +5 -5
- package/dist/collection/{utils → managers}/kup-manager/kup-manager-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-manager/kup-manager.js +45 -4
- 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 +151 -0
- package/dist/collection/{utils → managers}/kup-objects/kup-objects-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-objects/kup-objects.js +15 -0
- package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.js +0 -0
- package/dist/collection/{utils → managers}/kup-search/kup-search-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-search/kup-search.js +0 -0
- package/dist/collection/{utils → managers}/kup-theme/kup-theme-declarations.js +99 -0
- package/dist/collection/{utils → managers}/kup-theme/kup-theme.js +117 -68
- package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar.js +0 -0
- package/dist/collection/types/GenericTypes.js +48 -1
- package/dist/collection/utils/cell-utils.js +3 -4
- package/dist/collection/utils/filters/filters-column-menu.js +7 -7
- package/dist/collection/utils/filters/filters-rows.js +2 -2
- package/dist/collection/utils/filters/filters-tree-items.js +12 -12
- package/dist/collection/utils/filters/filters.js +3 -2
- package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +1 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +100 -68
- package/dist/collection/utils/utils.js +4 -4
- package/dist/esm/{cell-utils-8f512ea9.js → cell-utils-571978d6.js} +4 -4
- package/dist/esm/{component-d2803feb.js → component-c4eb6153.js} +204 -170
- package/dist/esm/{f-button-30dbcaa9.js → f-button-b3011cc2.js} +2 -2
- package/dist/esm/{f-cell-95c186c6.js → f-cell-b88b2731.js} +38 -28
- package/dist/esm/f-chip-a52489ec.js +128 -0
- package/dist/esm/{f-image-3bc8b24f.js → f-image-5e5ed7e2.js} +3 -3
- package/dist/esm/{index-e0e67c23.js → index-78f3699d.js} +23 -0
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +7 -7
- package/dist/esm/{kup-autocomplete_28.entry.js → kup-autocomplete_27.entry.js} +4420 -3856
- package/dist/esm/kup-calendar.entry.js +626 -359
- package/dist/esm/kup-cell.entry.js +15 -13
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +8 -7
- package/dist/esm/kup-drawer.entry.js +3 -3
- package/dist/esm/kup-echart.entry.js +93035 -0
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +22 -5
- package/dist/esm/kup-magic-box.entry.js +95 -42
- package/dist/esm/{kup-manager-7fc234da.js → kup-manager-1f76a3ef.js} +3388 -753
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{tslib.es6-e6137777.js → tslib.es6-8f2d44b6.js} +13 -1
- package/dist/esm/utils-93ae800f.js +461 -0
- package/dist/ketchup/assets/maps/africa.json +6116 -0
- package/dist/ketchup/assets/maps/america.json +5416 -0
- package/dist/ketchup/assets/maps/asia.json +6053 -0
- package/dist/ketchup/assets/maps/europe.json +5051 -0
- package/dist/ketchup/assets/maps/italy.json +3562 -0
- package/dist/ketchup/assets/maps/oceania.json +1069 -0
- package/dist/ketchup/assets/maps/world.json +23685 -0
- package/dist/ketchup/assets/svg/science.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-a878016f.entry.js → p-088a886c.entry.js} +1 -1
- package/dist/ketchup/p-135cabdc.entry.js +1 -0
- package/dist/ketchup/{p-1c6178e4.entry.js → p-1c1e830f.entry.js} +1 -1
- package/dist/ketchup/{p-62816d0b.entry.js → p-29208220.entry.js} +1 -1
- package/dist/ketchup/{p-ca0ca27f.entry.js → p-2b9f2019.entry.js} +1 -1
- package/dist/ketchup/p-52d0582a.js +1 -0
- package/dist/ketchup/p-554bd5f0.entry.js +39 -0
- package/dist/ketchup/{p-de83f2f6.js → p-5f52e313.js} +1 -1
- package/dist/ketchup/{p-ccda584a.entry.js → p-65449480.entry.js} +1 -1
- package/dist/ketchup/p-79cf3874.entry.js +1 -0
- package/dist/ketchup/p-7a85cda4.js +1 -0
- package/dist/ketchup/p-84cce555.entry.js +27 -0
- package/dist/ketchup/p-8c44c3b9.js +135 -0
- package/dist/ketchup/{p-65adc15b.entry.js → p-9d49cdb2.entry.js} +1 -1
- package/dist/ketchup/{p-5a4a5fdc.js → p-a0b1d769.js} +1 -1
- package/dist/ketchup/{p-dbb6998b.entry.js → p-a2b6672e.entry.js} +1 -1
- package/dist/ketchup/{p-a378ba56.entry.js → p-a4be630b.entry.js} +1 -1
- package/dist/ketchup/p-c072b270.js +1 -0
- package/dist/ketchup/{p-1baf1205.entry.js → p-c648972c.entry.js} +1 -1
- package/dist/ketchup/{p-af4a6191.entry.js → p-d67d39c0.entry.js} +1 -1
- package/dist/ketchup/p-d6e2f2b0.entry.js +1 -0
- package/dist/ketchup/{p-44375e49.js → p-da387e0e.js} +1 -1
- package/dist/ketchup/p-e5c9ec9e.js +1 -0
- package/dist/ketchup/{p-cb5f4994.js → p-ed0b8666.js} +0 -0
- package/dist/ketchup/p-ef539eda.js +9 -0
- package/dist/ketchup/p-f316234c.entry.js +143 -0
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +2 -2
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +6 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +29 -22
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +7 -11
- package/dist/types/components/kup-box/kup-box.d.ts +4 -4
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +6 -1
- package/dist/types/components/kup-button-list/kup-button-list.d.ts +4 -3
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +28 -10
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +19 -47
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +27 -0
- package/dist/types/components/kup-card/{builtin → built-in}/kup-card-calendar.d.ts +0 -0
- package/dist/types/components/kup-card/{builtin → built-in}/kup-card-clock.d.ts +0 -0
- package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -0
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +7 -1
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +46 -21
- package/dist/types/components/kup-card/kup-card.d.ts +9 -2
- package/dist/types/components/kup-cell/kup-cell.d.ts +3 -3
- package/dist/types/components/kup-chart/kup-chart-builder.d.ts +5 -5
- package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +3 -3
- package/dist/types/components/kup-chart/kup-chart.d.ts +2 -2
- package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +6 -3
- package/dist/types/components/kup-chip/kup-chip.d.ts +9 -13
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +7 -3
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +4 -0
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +11 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +2 -2
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +45 -104
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +8 -11
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +49 -27
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +55 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +100 -0
- package/dist/types/components/kup-lazy/kup-lazy.d.ts +13 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +2 -1
- package/dist/types/components/kup-list/kup-list.d.ts +4 -35
- package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +6 -10
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +7 -11
- package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +11 -13
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +14 -35
- package/dist/types/components/kup-tree/kup-tree-faker.d.ts +10 -10
- package/dist/types/components/kup-tree/kup-tree.d.ts +45 -35
- package/dist/types/components.d.ts +305 -186
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +11 -10
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +7 -22
- package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -0
- package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -0
- package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +24 -0
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +31 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +160 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +23 -0
- package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +77 -0
- package/dist/types/{utils → managers}/kup-dates/kup-dates-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-dates/kup-dates.d.ts +24 -2
- package/dist/types/{utils → managers}/kup-debug/kup-debug-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-debug/kup-debug.d.ts +6 -13
- package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -0
- package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-interact/kup-interact-declarations.d.ts +9 -8
- package/dist/types/{utils → managers}/kup-interact/kup-interact.d.ts +7 -6
- package/dist/types/{utils → managers}/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/{utils → managers}/kup-language/kup-language.d.ts +3 -3
- package/dist/types/{utils → managers}/kup-manager/kup-manager-declarations.d.ts +21 -2
- package/dist/types/{utils → managers}/kup-manager/kup-manager.d.ts +4 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +21 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +60 -0
- package/dist/types/{utils → managers}/kup-objects/kup-objects-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-search/kup-search-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-search/kup-search.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-theme/kup-theme-declarations.d.ts +37 -1
- package/dist/types/{utils → managers}/kup-theme/kup-theme.d.ts +19 -19
- package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar.d.ts +0 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/types/GenericTypes.d.ts +53 -6
- package/dist/types/utils/cell-utils.d.ts +7 -6
- package/dist/types/utils/filters/filters-column-menu.d.ts +16 -16
- package/dist/types/utils/filters/filters-rows.d.ts +10 -10
- package/dist/types/utils/filters/filters-tree-items.d.ts +7 -7
- package/dist/types/utils/helpers.d.ts +2 -2
- package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +1 -0
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +27 -33
- package/dist/types/utils/utils.d.ts +4 -2
- package/package.json +31 -26
- package/dist/cjs/f-chip-90d95d22.js +0 -141
- package/dist/cjs/utils-0cc466b9.js +0 -1492
- package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +0 -20
- package/dist/collection/components/kup-paginator/kup-paginator-declarations.js +0 -5
- package/dist/collection/components/kup-paginator/kup-paginator.css +0 -46
- package/dist/collection/components/kup-paginator/kup-paginator.js +0 -408
- package/dist/esm/f-chip-c0e9c0ff.js +0 -139
- package/dist/esm/utils-6c73709d.js +0 -1470
- package/dist/ketchup/p-15321eae.js +0 -1
- package/dist/ketchup/p-5a5f2a53.js +0 -1
- package/dist/ketchup/p-61faaa38.js +0 -8
- package/dist/ketchup/p-7e23ea7c.entry.js +0 -1
- package/dist/ketchup/p-9d02a676.js +0 -134
- package/dist/ketchup/p-a96e6e32.entry.js +0 -1
- package/dist/ketchup/p-ad32821e.entry.js +0 -1
- package/dist/ketchup/p-c18c7bb0.entry.js +0 -27
- package/dist/ketchup/p-d4aa4922.js +0 -1
- package/dist/ketchup/p-ec3a3db9.js +0 -1
- package/dist/ketchup/p-ecccb3a4.entry.js +0 -45
- package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +0 -14
- package/dist/types/components/kup-paginator/kup-paginator-declarations.d.ts +0 -11
- package/dist/types/components/kup-paginator/kup-paginator.d.ts +0 -48
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
|
|
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 _KupList_instances, _KupList_kupManager, _KupList_radios, _KupList_listItems, _KupList_setUnselected, _KupList_sendInfoToSubComponent, _KupList_handleSelection, _KupList_renderListItem, _KupList_getIconTag, _KupList_isMultiSelection, _KupList_isCheckBoxRule, _KupList_isRadioButtonRule, _KupList_isListBoxRule, _KupList_checkRoleType, _KupList_itemCompliant;
|
|
13
|
+
import { Component, Element, Event, forceUpdate, h, Host, Listen, Method, Prop, State, } from '@stencil/core';
|
|
2
14
|
import { KupListProps, KupListRole, } from './kup-list-declarations';
|
|
3
15
|
import { ItemsDisplayMode } from './kup-list-declarations';
|
|
4
16
|
import { getValueOfItemByDisplayMode } from './kup-list-helper';
|
|
5
|
-
import { kupManagerInstance, } from '../../
|
|
17
|
+
import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
|
|
6
18
|
import { FImage } from '../../f-components/f-image/f-image';
|
|
7
|
-
import { KupThemeColorValues } from '../../
|
|
19
|
+
import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations';
|
|
8
20
|
import { getProps, setProps } from '../../utils/utils';
|
|
9
21
|
import { FCheckbox } from '../../f-components/f-checkbox/f-checkbox';
|
|
10
22
|
export class KupList {
|
|
11
23
|
constructor() {
|
|
24
|
+
_KupList_instances.add(this);
|
|
12
25
|
/*-------------------------------------------------*/
|
|
13
26
|
/* S t a t e s */
|
|
14
27
|
/*-------------------------------------------------*/
|
|
@@ -89,28 +102,27 @@ export class KupList {
|
|
|
89
102
|
/*-------------------------------------------------*/
|
|
90
103
|
/* I n t e r n a l V a r i a b l e s */
|
|
91
104
|
/*-------------------------------------------------*/
|
|
92
|
-
this.filteredItems = [];
|
|
93
105
|
/**
|
|
94
106
|
* Instance of the KupManager class.
|
|
95
107
|
*/
|
|
96
|
-
this
|
|
97
|
-
this
|
|
98
|
-
this
|
|
108
|
+
_KupList_kupManager.set(this, kupManagerInstance());
|
|
109
|
+
_KupList_radios.set(this, []);
|
|
110
|
+
_KupList_listItems.set(this, []);
|
|
99
111
|
}
|
|
100
|
-
onKupBlur(
|
|
112
|
+
onKupBlur() {
|
|
101
113
|
this.kupBlur.emit({
|
|
102
114
|
comp: this,
|
|
103
115
|
id: this.rootElement.id,
|
|
104
116
|
});
|
|
105
117
|
}
|
|
106
|
-
onKupFocus(
|
|
118
|
+
onKupFocus() {
|
|
107
119
|
this.kupFocus.emit({
|
|
108
120
|
comp: this,
|
|
109
121
|
id: this.rootElement.id,
|
|
110
122
|
});
|
|
111
123
|
}
|
|
112
124
|
onKupClick(index) {
|
|
113
|
-
this.
|
|
125
|
+
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
114
126
|
}
|
|
115
127
|
/*-------------------------------------------------*/
|
|
116
128
|
/* L i s t e n e r s */
|
|
@@ -131,7 +143,7 @@ export class KupList {
|
|
|
131
143
|
case 'Enter':
|
|
132
144
|
e.preventDefault();
|
|
133
145
|
e.stopPropagation();
|
|
134
|
-
this.
|
|
146
|
+
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, this.focused);
|
|
135
147
|
break;
|
|
136
148
|
}
|
|
137
149
|
}
|
|
@@ -139,14 +151,6 @@ export class KupList {
|
|
|
139
151
|
/*-------------------------------------------------*/
|
|
140
152
|
/* W a t c h e r s */
|
|
141
153
|
/*-------------------------------------------------*/
|
|
142
|
-
watchFilter() {
|
|
143
|
-
this.filteredItems = [];
|
|
144
|
-
let index = 0;
|
|
145
|
-
this.data.map((item) => {
|
|
146
|
-
this.setUnselected(item, index++);
|
|
147
|
-
});
|
|
148
|
-
this.data = [...this.data];
|
|
149
|
-
}
|
|
150
154
|
/*-------------------------------------------------*/
|
|
151
155
|
/* P u b l i c M e t h o d s */
|
|
152
156
|
/*-------------------------------------------------*/
|
|
@@ -168,10 +172,10 @@ export class KupList {
|
|
|
168
172
|
else {
|
|
169
173
|
this.focused++;
|
|
170
174
|
}
|
|
171
|
-
if (this.focused > this.
|
|
175
|
+
if (this.focused > __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1) {
|
|
172
176
|
this.focused = 0;
|
|
173
177
|
}
|
|
174
|
-
this
|
|
178
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
175
179
|
}
|
|
176
180
|
/**
|
|
177
181
|
* Focuses the previous element of the list.
|
|
@@ -192,9 +196,9 @@ export class KupList {
|
|
|
192
196
|
this.focused--;
|
|
193
197
|
}
|
|
194
198
|
if (this.focused < 0) {
|
|
195
|
-
this.focused = this.
|
|
199
|
+
this.focused = __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1;
|
|
196
200
|
}
|
|
197
|
-
this
|
|
201
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
198
202
|
}
|
|
199
203
|
/**
|
|
200
204
|
* Used to retrieve component's props values.
|
|
@@ -210,13 +214,6 @@ export class KupList {
|
|
|
210
214
|
async refresh() {
|
|
211
215
|
forceUpdate(this);
|
|
212
216
|
}
|
|
213
|
-
/**
|
|
214
|
-
* Resets filter.
|
|
215
|
-
* @todo FOSLUC to PASCAR: why isn't it enough to change only the prop?
|
|
216
|
-
*/
|
|
217
|
-
async resetFilter(newFilter) {
|
|
218
|
-
this.filter = newFilter;
|
|
219
|
-
}
|
|
220
217
|
/**
|
|
221
218
|
* Calls handleSelection internal method to select the given item.
|
|
222
219
|
* @param {number} index - Based zero index of the item that must be selected, when not provided the list will attempt to select the focused element.
|
|
@@ -225,7 +222,7 @@ export class KupList {
|
|
|
225
222
|
if (index === undefined) {
|
|
226
223
|
index = this.focused;
|
|
227
224
|
}
|
|
228
|
-
this.
|
|
225
|
+
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_handleSelection).call(this, index);
|
|
229
226
|
}
|
|
230
227
|
/**
|
|
231
228
|
* Sets the props to the component.
|
|
@@ -235,227 +232,11 @@ export class KupList {
|
|
|
235
232
|
setProps(this, KupListProps, props);
|
|
236
233
|
}
|
|
237
234
|
/*-------------------------------------------------*/
|
|
238
|
-
/* P r i v a t e M e t h o d s */
|
|
239
|
-
/*-------------------------------------------------*/
|
|
240
|
-
/**
|
|
241
|
-
* Selects the specified item.
|
|
242
|
-
* @param {number} index - Based zero index of the item that must be selected, when not provided the list will attempt to select the focused element.
|
|
243
|
-
*/
|
|
244
|
-
handleSelection(index) {
|
|
245
|
-
if (index !== null && index !== undefined && !isNaN(index)) {
|
|
246
|
-
const value = this.data[index].value;
|
|
247
|
-
switch (this.roleType) {
|
|
248
|
-
case KupListRole.GROUP:
|
|
249
|
-
if (this.selected.includes(value)) {
|
|
250
|
-
this.selected.splice(this.selected.indexOf(value), 1);
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
this.selected.push(value);
|
|
254
|
-
}
|
|
255
|
-
this.selected = new Array(...this.selected);
|
|
256
|
-
break;
|
|
257
|
-
default:
|
|
258
|
-
this.selected = new Array(value);
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
for (let index = 0; index < this.data.length; index++) {
|
|
262
|
-
const item = this.data[index];
|
|
263
|
-
if (this.selected.includes(item.value)) {
|
|
264
|
-
item.selected = true;
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
item.selected = false;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
this.kupClick.emit({
|
|
271
|
-
comp: this,
|
|
272
|
-
id: this.rootElement.id,
|
|
273
|
-
selected: this.data[index],
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
renderSeparator() {
|
|
278
|
-
return h("li", { role: "separator", class: "list-divider" });
|
|
279
|
-
}
|
|
280
|
-
renderListItem(item, index) {
|
|
281
|
-
this.filteredItems[index] = item;
|
|
282
|
-
if (item.selected != true) {
|
|
283
|
-
item.selected = false;
|
|
284
|
-
}
|
|
285
|
-
let imageTag = undefined;
|
|
286
|
-
if (this.showIcons == true &&
|
|
287
|
-
item.icon != null &&
|
|
288
|
-
item.icon.trim() != '') {
|
|
289
|
-
imageTag = this.getIconTag(item.icon);
|
|
290
|
-
}
|
|
291
|
-
let primaryTextTag = [
|
|
292
|
-
getValueOfItemByDisplayMode(item, this.displayMode, ' - '),
|
|
293
|
-
];
|
|
294
|
-
let secTextTag = [];
|
|
295
|
-
if (this.twoLine && item.secondaryText && item.secondaryText != '') {
|
|
296
|
-
primaryTextTag = [
|
|
297
|
-
h("span", { class: "list-item__primary-text" }, item.text),
|
|
298
|
-
];
|
|
299
|
-
secTextTag = [
|
|
300
|
-
h("span", { class: "list-item__secondary-text" }, item.secondaryText),
|
|
301
|
-
];
|
|
302
|
-
}
|
|
303
|
-
let classAttr = 'list-item';
|
|
304
|
-
let tabIndexAttr = item.selected == true ? '0' : '-1';
|
|
305
|
-
if (item.selected == true && this.isListBoxRule()) {
|
|
306
|
-
classAttr += ' list-item--selected';
|
|
307
|
-
}
|
|
308
|
-
if (this.focused === index) {
|
|
309
|
-
classAttr += ' list-item--focused';
|
|
310
|
-
}
|
|
311
|
-
let roleAttr = 'option';
|
|
312
|
-
let ariaCheckedAttr = null;
|
|
313
|
-
let ariaSelectedAttr = item.selected == true ? 'true' : 'false';
|
|
314
|
-
if (this.selectable != true) {
|
|
315
|
-
ariaSelectedAttr = null;
|
|
316
|
-
}
|
|
317
|
-
let innerSpanTag = [
|
|
318
|
-
imageTag,
|
|
319
|
-
h("span", { class: "list-item__text" },
|
|
320
|
-
primaryTextTag,
|
|
321
|
-
secTextTag),
|
|
322
|
-
];
|
|
323
|
-
if (this.isRadioButtonRule()) {
|
|
324
|
-
roleAttr = 'radio';
|
|
325
|
-
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
326
|
-
let dataTmp = [
|
|
327
|
-
{
|
|
328
|
-
value: item.value,
|
|
329
|
-
label: '',
|
|
330
|
-
checked: item.selected == true ? true : false,
|
|
331
|
-
},
|
|
332
|
-
];
|
|
333
|
-
let trickForMDC = {
|
|
334
|
-
display: 'none',
|
|
335
|
-
};
|
|
336
|
-
innerSpanTag = [
|
|
337
|
-
h("span", { class: "list-item__graphic" },
|
|
338
|
-
h("input", { type: "radio", style: trickForMDC }),
|
|
339
|
-
h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index, ref: (el) => (this.radios[index] = el) })),
|
|
340
|
-
imageTag,
|
|
341
|
-
h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index },
|
|
342
|
-
primaryTextTag,
|
|
343
|
-
secTextTag),
|
|
344
|
-
];
|
|
345
|
-
}
|
|
346
|
-
else if (this.isCheckBoxRule()) {
|
|
347
|
-
roleAttr = 'checkbox';
|
|
348
|
-
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
349
|
-
let checkedAttr = item.selected == true ? true : false;
|
|
350
|
-
let trickForMDC = {
|
|
351
|
-
display: 'none',
|
|
352
|
-
};
|
|
353
|
-
innerSpanTag = [
|
|
354
|
-
h("span", { class: "list-item__graphic" },
|
|
355
|
-
h("input", { type: "checkbox", style: trickForMDC }),
|
|
356
|
-
h(FCheckbox, { checked: checkedAttr })),
|
|
357
|
-
imageTag,
|
|
358
|
-
h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index },
|
|
359
|
-
primaryTextTag,
|
|
360
|
-
secTextTag),
|
|
361
|
-
];
|
|
362
|
-
}
|
|
363
|
-
const vNodes = [];
|
|
364
|
-
if (item.separator) {
|
|
365
|
-
vNodes.push(h("li", { role: "separator", class: "list-divider" }));
|
|
366
|
-
}
|
|
367
|
-
vNodes.push(h("li", { ref: (el) => {
|
|
368
|
-
this.listItems.push(el);
|
|
369
|
-
}, class: classAttr, role: roleAttr, tabindex: tabIndexAttr, "data-value": item.value, "aria-selected": ariaSelectedAttr, "aria-checked": ariaCheckedAttr, onBlur: !this.selectable
|
|
370
|
-
? (e) => e.stopPropagation()
|
|
371
|
-
: () => this.onKupBlur(index), onFocus: !this.selectable
|
|
372
|
-
? (e) => e.stopPropagation()
|
|
373
|
-
: () => this.onKupFocus(index), onClick: !this.selectable
|
|
374
|
-
? (e) => e.stopPropagation()
|
|
375
|
-
: () => this.onKupClick(index) }, innerSpanTag));
|
|
376
|
-
return vNodes;
|
|
377
|
-
}
|
|
378
|
-
getIconTag(icon) {
|
|
379
|
-
const large = this.rootElement.classList.contains('kup-large');
|
|
380
|
-
const propsFImage = {
|
|
381
|
-
color: `var(${KupThemeColorValues.PRIMARY})`,
|
|
382
|
-
sizeX: large ? '32px' : '24px',
|
|
383
|
-
sizeY: large ? '32px' : '24px',
|
|
384
|
-
};
|
|
385
|
-
return (h(FImage, Object.assign({}, propsFImage, { resource: icon, wrapperClass: `icon-button__icon kup-icon` })));
|
|
386
|
-
}
|
|
387
|
-
setUnselected(item, index) {
|
|
388
|
-
item.selected = false;
|
|
389
|
-
this.sendInfoToSubComponent(index, item);
|
|
390
|
-
}
|
|
391
|
-
setSelected(item, index) {
|
|
392
|
-
item.selected = true;
|
|
393
|
-
this.sendInfoToSubComponent(index, item);
|
|
394
|
-
}
|
|
395
|
-
sendInfoToSubComponent(index, item) {
|
|
396
|
-
if (this.isRadioButtonRule()) {
|
|
397
|
-
if (this.radios[index]) {
|
|
398
|
-
let dataTmp = [
|
|
399
|
-
{
|
|
400
|
-
value: item.value,
|
|
401
|
-
label: '',
|
|
402
|
-
checked: item.selected == true ? true : false,
|
|
403
|
-
},
|
|
404
|
-
];
|
|
405
|
-
this.radios[index].data = dataTmp;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
getLiIndexElementForValue(key) {
|
|
410
|
-
let index = -1;
|
|
411
|
-
let i = 0;
|
|
412
|
-
this.filteredItems.forEach((item) => {
|
|
413
|
-
if (item.value == key) {
|
|
414
|
-
index = i;
|
|
415
|
-
}
|
|
416
|
-
i++;
|
|
417
|
-
});
|
|
418
|
-
return index;
|
|
419
|
-
}
|
|
420
|
-
isSingleSelection() {
|
|
421
|
-
return this.isRadioButtonRule() || this.isListBoxRule();
|
|
422
|
-
}
|
|
423
|
-
isMultiSelection() {
|
|
424
|
-
return this.isCheckBoxRule();
|
|
425
|
-
}
|
|
426
|
-
isCheckBoxRule() {
|
|
427
|
-
return this.roleType == KupListRole.GROUP;
|
|
428
|
-
}
|
|
429
|
-
isRadioButtonRule() {
|
|
430
|
-
return this.roleType == KupListRole.RADIOGROUP;
|
|
431
|
-
}
|
|
432
|
-
isListBoxRule() {
|
|
433
|
-
return this.roleType == KupListRole.LISTBOX;
|
|
434
|
-
}
|
|
435
|
-
checkRoleType() {
|
|
436
|
-
if (!this.isCheckBoxRule() && !this.isRadioButtonRule()) {
|
|
437
|
-
this.roleType = KupListRole.LISTBOX;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
itemCompliant(item) {
|
|
441
|
-
if (!this.filter) {
|
|
442
|
-
return true;
|
|
443
|
-
}
|
|
444
|
-
if (this.displayMode == ItemsDisplayMode.CODE) {
|
|
445
|
-
return (item.value.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0);
|
|
446
|
-
}
|
|
447
|
-
if (this.displayMode == ItemsDisplayMode.DESCRIPTION) {
|
|
448
|
-
return (item.text.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0);
|
|
449
|
-
}
|
|
450
|
-
return (item.value.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0 ||
|
|
451
|
-
item.text.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0);
|
|
452
|
-
}
|
|
453
|
-
/*-------------------------------------------------*/
|
|
454
235
|
/* L i f e c y c l e H o o k s */
|
|
455
236
|
/*-------------------------------------------------*/
|
|
456
237
|
componentWillLoad() {
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
238
|
+
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logLoad(this, false);
|
|
239
|
+
__classPrivateFieldGet(this, _KupList_kupManager, "f").theme.register(this);
|
|
459
240
|
for (let index = 0; index < this.data.length; index++) {
|
|
460
241
|
const el = this.data[index];
|
|
461
242
|
if (el.selected) {
|
|
@@ -464,10 +245,10 @@ export class KupList {
|
|
|
464
245
|
}
|
|
465
246
|
}
|
|
466
247
|
componentDidLoad() {
|
|
467
|
-
this.
|
|
248
|
+
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logLoad(this, true);
|
|
468
249
|
}
|
|
469
250
|
componentWillRender() {
|
|
470
|
-
this.
|
|
251
|
+
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logRender(this, false);
|
|
471
252
|
}
|
|
472
253
|
componentDidRender() {
|
|
473
254
|
if (this.isMenu &&
|
|
@@ -478,10 +259,10 @@ export class KupList {
|
|
|
478
259
|
this.rootElement.focus();
|
|
479
260
|
}, 0);
|
|
480
261
|
}
|
|
481
|
-
this.
|
|
262
|
+
__classPrivateFieldGet(this, _KupList_kupManager, "f").debug.logRender(this, true);
|
|
482
263
|
}
|
|
483
264
|
render() {
|
|
484
|
-
this
|
|
265
|
+
__classPrivateFieldSet(this, _KupList_listItems, [], "f");
|
|
485
266
|
let componentClass = 'list';
|
|
486
267
|
let wrapperClass = undefined;
|
|
487
268
|
if (this.isMenu) {
|
|
@@ -490,7 +271,7 @@ export class KupList {
|
|
|
490
271
|
wrapperClass += ' visible';
|
|
491
272
|
}
|
|
492
273
|
}
|
|
493
|
-
this.
|
|
274
|
+
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_checkRoleType).call(this);
|
|
494
275
|
if (this.selectable != true) {
|
|
495
276
|
componentClass += ' list--non-interactive';
|
|
496
277
|
}
|
|
@@ -500,23 +281,25 @@ export class KupList {
|
|
|
500
281
|
if (this.hideText) {
|
|
501
282
|
componentClass += ' text-hidden';
|
|
502
283
|
}
|
|
284
|
+
if (!this.data || this.data.length === 0) {
|
|
285
|
+
componentClass += ' list--empty';
|
|
286
|
+
}
|
|
503
287
|
let roleAttr = this.roleType;
|
|
504
288
|
let ariaMultiSelectable = 'false';
|
|
505
|
-
if (this.
|
|
289
|
+
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isMultiSelection).call(this)) {
|
|
506
290
|
ariaMultiSelectable = 'true';
|
|
507
291
|
}
|
|
508
|
-
this
|
|
509
|
-
this.radios = [];
|
|
292
|
+
__classPrivateFieldSet(this, _KupList_radios, [], "f");
|
|
510
293
|
let index = 0;
|
|
511
294
|
return (h(Host, null,
|
|
512
|
-
h("style", null, this.
|
|
295
|
+
h("style", null, __classPrivateFieldGet(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)),
|
|
513
296
|
h("div", { id: "kup-component", class: wrapperClass },
|
|
514
|
-
h("ul", { class: componentClass, role: roleAttr,
|
|
515
|
-
.filter((item) => this.
|
|
516
|
-
.map((item) => this.
|
|
297
|
+
h("ul", { class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
298
|
+
.filter((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
299
|
+
.map((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index++))))));
|
|
517
300
|
}
|
|
518
301
|
disconnectedCallback() {
|
|
519
|
-
this.
|
|
302
|
+
__classPrivateFieldGet(this, _KupList_kupManager, "f").theme.unregister(this);
|
|
520
303
|
}
|
|
521
304
|
static get is() { return "kup-list"; }
|
|
522
305
|
static get encapsulation() { return "shadow"; }
|
|
@@ -950,28 +733,6 @@ export class KupList {
|
|
|
950
733
|
"tags": []
|
|
951
734
|
}
|
|
952
735
|
},
|
|
953
|
-
"resetFilter": {
|
|
954
|
-
"complexType": {
|
|
955
|
-
"signature": "(newFilter: string) => Promise<void>",
|
|
956
|
-
"parameters": [{
|
|
957
|
-
"tags": [],
|
|
958
|
-
"text": ""
|
|
959
|
-
}],
|
|
960
|
-
"references": {
|
|
961
|
-
"Promise": {
|
|
962
|
-
"location": "global"
|
|
963
|
-
}
|
|
964
|
-
},
|
|
965
|
-
"return": "Promise<void>"
|
|
966
|
-
},
|
|
967
|
-
"docs": {
|
|
968
|
-
"text": "Resets filter.",
|
|
969
|
-
"tags": [{
|
|
970
|
-
"name": "todo",
|
|
971
|
-
"text": "FOSLUC to PASCAR: why isn't it enough to change only the prop?"
|
|
972
|
-
}]
|
|
973
|
-
}
|
|
974
|
-
},
|
|
975
736
|
"select": {
|
|
976
737
|
"complexType": {
|
|
977
738
|
"signature": "(index?: number) => Promise<void>",
|
|
@@ -1028,10 +789,6 @@ export class KupList {
|
|
|
1028
789
|
}
|
|
1029
790
|
}; }
|
|
1030
791
|
static get elementRef() { return "rootElement"; }
|
|
1031
|
-
static get watchers() { return [{
|
|
1032
|
-
"propName": "filter",
|
|
1033
|
-
"methodName": "watchFilter"
|
|
1034
|
-
}]; }
|
|
1035
792
|
static get listeners() { return [{
|
|
1036
793
|
"name": "keydown",
|
|
1037
794
|
"method": "listenKeydown",
|
|
@@ -1040,3 +797,177 @@ export class KupList {
|
|
|
1040
797
|
"passive": false
|
|
1041
798
|
}]; }
|
|
1042
799
|
}
|
|
800
|
+
_KupList_kupManager = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_listItems = new WeakMap(), _KupList_instances = new WeakSet(), _KupList_setUnselected = function _KupList_setUnselected(item, index) {
|
|
801
|
+
item.selected = false;
|
|
802
|
+
__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_sendInfoToSubComponent).call(this, index, item);
|
|
803
|
+
}, _KupList_sendInfoToSubComponent = function _KupList_sendInfoToSubComponent(index, item) {
|
|
804
|
+
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
805
|
+
if (__classPrivateFieldGet(this, _KupList_radios, "f")[index]) {
|
|
806
|
+
let dataTmp = [
|
|
807
|
+
{
|
|
808
|
+
value: item.value,
|
|
809
|
+
label: '',
|
|
810
|
+
checked: item.selected == true ? true : false,
|
|
811
|
+
},
|
|
812
|
+
];
|
|
813
|
+
__classPrivateFieldGet(this, _KupList_radios, "f")[index].data = dataTmp;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}, _KupList_handleSelection = function _KupList_handleSelection(index) {
|
|
817
|
+
if (index !== null && index !== undefined && !isNaN(index)) {
|
|
818
|
+
const listItems = this.rootElement.shadowRoot.querySelectorAll('.list-item');
|
|
819
|
+
const value = listItems[index].dataset.value;
|
|
820
|
+
const dataEl = this.data.find((x) => x.value === value);
|
|
821
|
+
switch (this.roleType) {
|
|
822
|
+
case KupListRole.GROUP:
|
|
823
|
+
if (this.selected.includes(value)) {
|
|
824
|
+
this.selected.splice(this.selected.indexOf(value), 1);
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
this.selected.push(value);
|
|
828
|
+
}
|
|
829
|
+
this.selected = new Array(...this.selected);
|
|
830
|
+
break;
|
|
831
|
+
default:
|
|
832
|
+
this.selected = new Array(value);
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
for (let index = 0; index < this.data.length; index++) {
|
|
836
|
+
const item = this.data[index];
|
|
837
|
+
item.selected = this.selected.includes(item.value);
|
|
838
|
+
}
|
|
839
|
+
this.kupClick.emit({
|
|
840
|
+
comp: this,
|
|
841
|
+
id: this.rootElement.id,
|
|
842
|
+
selected: dataEl,
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
}, _KupList_renderListItem = function _KupList_renderListItem(item, index) {
|
|
846
|
+
if (item.selected != true) {
|
|
847
|
+
item.selected = false;
|
|
848
|
+
}
|
|
849
|
+
let imageTag = undefined;
|
|
850
|
+
if (this.showIcons == true &&
|
|
851
|
+
item.icon != null &&
|
|
852
|
+
item.icon.trim() != '') {
|
|
853
|
+
imageTag = __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_getIconTag).call(this, item.icon);
|
|
854
|
+
}
|
|
855
|
+
let primaryTextTag = [
|
|
856
|
+
getValueOfItemByDisplayMode(item, this.displayMode, ' - '),
|
|
857
|
+
];
|
|
858
|
+
let secTextTag = [];
|
|
859
|
+
if (this.twoLine && item.secondaryText && item.secondaryText != '') {
|
|
860
|
+
primaryTextTag = [
|
|
861
|
+
h("span", { class: "list-item__primary-text" }, item.text),
|
|
862
|
+
];
|
|
863
|
+
secTextTag = [
|
|
864
|
+
h("span", { class: "list-item__secondary-text" }, item.secondaryText),
|
|
865
|
+
];
|
|
866
|
+
}
|
|
867
|
+
let classAttr = 'list-item';
|
|
868
|
+
let tabIndexAttr = item.selected == true ? '0' : '-1';
|
|
869
|
+
if (item.selected == true && __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isListBoxRule).call(this)) {
|
|
870
|
+
classAttr += ' list-item--selected';
|
|
871
|
+
}
|
|
872
|
+
if (this.focused === index) {
|
|
873
|
+
classAttr += ' list-item--focused';
|
|
874
|
+
}
|
|
875
|
+
let roleAttr = 'option';
|
|
876
|
+
let ariaCheckedAttr = null;
|
|
877
|
+
let ariaSelectedAttr = item.selected == true ? 'true' : 'false';
|
|
878
|
+
if (this.selectable != true) {
|
|
879
|
+
ariaSelectedAttr = null;
|
|
880
|
+
}
|
|
881
|
+
let innerSpanTag = [
|
|
882
|
+
imageTag,
|
|
883
|
+
h("span", { class: "list-item__text" },
|
|
884
|
+
primaryTextTag,
|
|
885
|
+
secTextTag),
|
|
886
|
+
];
|
|
887
|
+
if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
888
|
+
roleAttr = 'radio';
|
|
889
|
+
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
890
|
+
let dataTmp = [
|
|
891
|
+
{
|
|
892
|
+
value: item.value,
|
|
893
|
+
label: '',
|
|
894
|
+
checked: item.selected == true ? true : false,
|
|
895
|
+
},
|
|
896
|
+
];
|
|
897
|
+
let trickForMDC = {
|
|
898
|
+
display: 'none',
|
|
899
|
+
};
|
|
900
|
+
innerSpanTag = [
|
|
901
|
+
h("span", { class: "list-item__graphic" },
|
|
902
|
+
h("input", { type: "radio", style: trickForMDC }),
|
|
903
|
+
h("kup-radio", { data: dataTmp, id: this.rootElement.id + '_' + index, ref: (el) => (__classPrivateFieldGet(this, _KupList_radios, "f")[index] = el) })),
|
|
904
|
+
imageTag,
|
|
905
|
+
h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index },
|
|
906
|
+
primaryTextTag,
|
|
907
|
+
secTextTag),
|
|
908
|
+
];
|
|
909
|
+
}
|
|
910
|
+
else if (__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this)) {
|
|
911
|
+
roleAttr = 'checkbox';
|
|
912
|
+
ariaCheckedAttr = item.selected == true ? 'true' : 'false';
|
|
913
|
+
let checkedAttr = item.selected == true ? true : false;
|
|
914
|
+
let trickForMDC = {
|
|
915
|
+
display: 'none',
|
|
916
|
+
};
|
|
917
|
+
innerSpanTag = [
|
|
918
|
+
h("span", { class: "list-item__graphic" },
|
|
919
|
+
h("input", { type: "checkbox", style: trickForMDC }),
|
|
920
|
+
h(FCheckbox, { checked: checkedAttr })),
|
|
921
|
+
imageTag,
|
|
922
|
+
h("label", { class: "list-item__text", htmlFor: this.rootElement.id + '_' + index },
|
|
923
|
+
primaryTextTag,
|
|
924
|
+
secTextTag),
|
|
925
|
+
];
|
|
926
|
+
}
|
|
927
|
+
const vNodes = [];
|
|
928
|
+
if (item.separator) {
|
|
929
|
+
vNodes.push(h("li", { role: "separator", class: "list-divider" }));
|
|
930
|
+
}
|
|
931
|
+
vNodes.push(h("li", { ref: (el) => {
|
|
932
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f").push(el);
|
|
933
|
+
}, class: classAttr, role: roleAttr, tabindex: tabIndexAttr, "data-value": item.value, "aria-selected": ariaSelectedAttr, "aria-checked": ariaCheckedAttr, onBlur: !this.selectable
|
|
934
|
+
? (e) => e.stopPropagation()
|
|
935
|
+
: () => this.onKupBlur(), onFocus: !this.selectable
|
|
936
|
+
? (e) => e.stopPropagation()
|
|
937
|
+
: () => this.onKupFocus(), onClick: !this.selectable
|
|
938
|
+
? (e) => e.stopPropagation()
|
|
939
|
+
: () => this.onKupClick(index) }, innerSpanTag));
|
|
940
|
+
return vNodes;
|
|
941
|
+
}, _KupList_getIconTag = function _KupList_getIconTag(icon) {
|
|
942
|
+
const large = this.rootElement.classList.contains('kup-large');
|
|
943
|
+
const propsFImage = {
|
|
944
|
+
color: `var(${KupThemeColorValues.PRIMARY})`,
|
|
945
|
+
sizeX: large ? '32px' : '24px',
|
|
946
|
+
sizeY: large ? '32px' : '24px',
|
|
947
|
+
};
|
|
948
|
+
return (h(FImage, Object.assign({}, propsFImage, { resource: icon, wrapperClass: `icon-button__icon kup-icon` })));
|
|
949
|
+
}, _KupList_isMultiSelection = function _KupList_isMultiSelection() {
|
|
950
|
+
return __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this);
|
|
951
|
+
}, _KupList_isCheckBoxRule = function _KupList_isCheckBoxRule() {
|
|
952
|
+
return this.roleType == KupListRole.GROUP;
|
|
953
|
+
}, _KupList_isRadioButtonRule = function _KupList_isRadioButtonRule() {
|
|
954
|
+
return this.roleType == KupListRole.RADIOGROUP;
|
|
955
|
+
}, _KupList_isListBoxRule = function _KupList_isListBoxRule() {
|
|
956
|
+
return this.roleType == KupListRole.LISTBOX;
|
|
957
|
+
}, _KupList_checkRoleType = function _KupList_checkRoleType() {
|
|
958
|
+
if (!__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isCheckBoxRule).call(this) && !__classPrivateFieldGet(this, _KupList_instances, "m", _KupList_isRadioButtonRule).call(this)) {
|
|
959
|
+
this.roleType = KupListRole.LISTBOX;
|
|
960
|
+
}
|
|
961
|
+
}, _KupList_itemCompliant = function _KupList_itemCompliant(item) {
|
|
962
|
+
if (!this.filter) {
|
|
963
|
+
return true;
|
|
964
|
+
}
|
|
965
|
+
if (this.displayMode == ItemsDisplayMode.CODE) {
|
|
966
|
+
return (item.value.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0);
|
|
967
|
+
}
|
|
968
|
+
if (this.displayMode == ItemsDisplayMode.DESCRIPTION) {
|
|
969
|
+
return (item.text.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0);
|
|
970
|
+
}
|
|
971
|
+
return (item.value.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0 ||
|
|
972
|
+
item.text.toLowerCase().indexOf(this.filter.toLowerCase()) >= 0);
|
|
973
|
+
};
|
|
@@ -10,10 +10,14 @@ export var KupMagicBoxProps;
|
|
|
10
10
|
/**
|
|
11
11
|
* Viable display modes selectable in kup-magic-box.
|
|
12
12
|
*/
|
|
13
|
-
export var
|
|
14
|
-
(function (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
export var KupMagicBoxDisplay;
|
|
14
|
+
(function (KupMagicBoxDisplay) {
|
|
15
|
+
KupMagicBoxDisplay["BOX"] = "Box";
|
|
16
|
+
KupMagicBoxDisplay["BUTTON_LIST"] = "Button List";
|
|
17
|
+
KupMagicBoxDisplay["CHART"] = "Chart";
|
|
18
|
+
KupMagicBoxDisplay["CHIP"] = "Chip";
|
|
19
|
+
KupMagicBoxDisplay["ECHART"] = "Echart";
|
|
20
|
+
KupMagicBoxDisplay["DATATABLE"] = "Datatable";
|
|
21
|
+
KupMagicBoxDisplay["JSON"] = "JSON";
|
|
22
|
+
KupMagicBoxDisplay["TREE"] = "Tree";
|
|
23
|
+
})(KupMagicBoxDisplay || (KupMagicBoxDisplay = {}));
|