@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,8 +1,8 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import { FChipType
|
|
2
|
+
import { FChipType } from '../f-chip/f-chip-declarations';
|
|
3
3
|
import { FImage } from '../f-image/f-image';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { KupThemeColorValues, KupThemeIconValues, } from '../../managers/kup-theme/kup-theme-declarations';
|
|
5
|
+
import { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';
|
|
6
6
|
const dom = document.documentElement;
|
|
7
7
|
/*-------------------------------------------------*/
|
|
8
8
|
/* C o m p o n e n t */
|
|
@@ -28,95 +28,84 @@ export const FChip = (props) => {
|
|
|
28
28
|
/*-------------------------------------------------*/
|
|
29
29
|
function createChipList(props, isChoice, isFilter, isInput) {
|
|
30
30
|
const chipList = [];
|
|
31
|
-
let chipEl;
|
|
32
|
-
if (props.dataNew && props.dataNew.length > 0) {
|
|
33
|
-
props.data = treeNode2Data(props.dataNew);
|
|
34
|
-
}
|
|
35
31
|
for (let i = 0; props.data && i < props.data.length; i++) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
const chipGroup = [];
|
|
33
|
+
recursive(props.data[i], 0);
|
|
34
|
+
chipList.push(h("div", { class: "chip-set__item" }, ...chipGroup));
|
|
35
|
+
function recursive(chip, indent) {
|
|
36
|
+
const hasChildren = !!(chip.children && chip.children.length > 0);
|
|
37
|
+
const showChildren = !!(hasChildren && chip.isExpanded);
|
|
38
|
+
const indentStyle = {
|
|
39
|
+
['--kup_chip_indent_offset']: indent.toString(),
|
|
40
|
+
};
|
|
41
|
+
chipGroup.push(h("div", { class: `chip-set__wrapper ${hasChildren && !showChildren
|
|
42
|
+
? 'chip-set__wrapper--hidden-children'
|
|
43
|
+
: ''}` },
|
|
44
|
+
h("div", { class: "chip-set__indent", style: indentStyle }),
|
|
45
|
+
hasChildren ? (h(FImage, { onClick: props.onExpansionClick &&
|
|
46
|
+
props.onExpansionClick[i]
|
|
47
|
+
? props.onExpansionClick[i].bind(props.onExpansionClick[i], chip)
|
|
48
|
+
: null, resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "18px", sizeY: "18px", title: dom.ketchup.language.translate(KupLanguageGeneric.EXPAND) +
|
|
49
|
+
'/' +
|
|
50
|
+
dom.ketchup.language.translate(KupLanguageGeneric.COLLAPSE) +
|
|
51
|
+
' (CTRL + Click)', wrapperClass: "dropdown-icon" })) : indent ? (h(FImage, { resource: "blank", sizeX: "18px", sizeY: "18px", wrapperClass: "dropdown-icon" })) : null,
|
|
52
|
+
createChip(chip)));
|
|
53
|
+
if (showChildren) {
|
|
54
|
+
for (let index = 0; index < chip.children.length; index++) {
|
|
55
|
+
if (chip.children[index]) {
|
|
56
|
+
recursive(chip.children[index], indent + 1);
|
|
57
|
+
}
|
|
48
58
|
}
|
|
49
59
|
}
|
|
50
60
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
if (isFilter) {
|
|
64
|
-
iconEl.push(h("span", { class: "chip__checkmark" },
|
|
65
|
-
h("svg", { class: "chip__checkmark-svg", viewBox: "-2 -3 30 30" },
|
|
66
|
-
h("path", { class: "chip__checkmark-path", fill: "none", stroke: "black", d: "M1.73,12.91 8.1,19.28 22.79,4.59" }))));
|
|
67
|
-
}
|
|
68
|
-
chipEl = (h("div", { class: componentClass, "data-value": props.data[i].value, onClick: props.onClick && props.onClick[i] ? props.onClick[i] : null, role: "row" },
|
|
69
|
-
iconEl,
|
|
70
|
-
h("span", { role: "gridcell" },
|
|
71
|
-
h("span", { role: "button", tabindex: i, class: "chip__primary-action",
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
value: props.data[i].value, checked: props.data[i].checked, onBlur: props.onBlur && props.onBlur[i]
|
|
74
|
-
? props.onBlur[i]
|
|
75
|
-
: null, onFocus: props.onFocus && props.onFocus[i]
|
|
76
|
-
? props.onFocus[i]
|
|
77
|
-
: null },
|
|
78
|
-
h("span", { class: "chip__text" }, props.data[i].label))),
|
|
79
|
-
isInput ? (h("span", { role: "gridcell" },
|
|
80
|
-
h("span", { tabindex: "-1", class: `kup-icon chip__icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onIconClick && props.onIconClick[i]
|
|
81
|
-
? props.onIconClick[i]
|
|
82
|
-
: null }))) : undefined));
|
|
83
|
-
chipList.push(chipEl);
|
|
84
|
-
}
|
|
85
|
-
return chipList;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* This function converts TreeNode[] to FChipData[]. This is valid until FChipData is removed.
|
|
89
|
-
*
|
|
90
|
-
* @return {FChipData} Array of FChipData.
|
|
91
|
-
*/
|
|
92
|
-
function treeNode2Data(dataNew) {
|
|
93
|
-
function children(TreeNode) {
|
|
94
|
-
for (let index = 0; index < TreeNode.children.length; index++) {
|
|
95
|
-
const node = TreeNode.children[index];
|
|
96
|
-
data.push({
|
|
97
|
-
icon: TreeNode.children[index].icon,
|
|
98
|
-
label: TreeNode.children[index].value,
|
|
99
|
-
obj: TreeNode.children[index].obj,
|
|
100
|
-
value: TreeNode.children[index].id,
|
|
101
|
-
});
|
|
102
|
-
if (node.children) {
|
|
103
|
-
children(node);
|
|
61
|
+
function createChip(chip) {
|
|
62
|
+
let componentClass = `chip `;
|
|
63
|
+
let iconEl = [];
|
|
64
|
+
let iconClass = 'chip__icon chip__icon--leading';
|
|
65
|
+
if (isFilter || isChoice) {
|
|
66
|
+
if (chip.checked) {
|
|
67
|
+
componentClass += ' chip--selected';
|
|
68
|
+
if (isFilter) {
|
|
69
|
+
iconClass += ' chip__icon--leading-hidden';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
104
72
|
}
|
|
73
|
+
if (chip.icon) {
|
|
74
|
+
const p = {
|
|
75
|
+
color: isChoice && chip.checked
|
|
76
|
+
? `var(${KupThemeColorValues.PRIMARY})`
|
|
77
|
+
: `var(${KupThemeColorValues.TEXT})`,
|
|
78
|
+
resource: chip.icon,
|
|
79
|
+
sizeX: '18px',
|
|
80
|
+
sizeY: '18px',
|
|
81
|
+
wrapperClass: iconClass,
|
|
82
|
+
};
|
|
83
|
+
iconEl.push(h(FImage, Object.assign({}, p)));
|
|
84
|
+
}
|
|
85
|
+
if (isFilter) {
|
|
86
|
+
iconEl.push(h("span", { class: "chip__checkmark" },
|
|
87
|
+
h("svg", { class: "chip__checkmark-svg", viewBox: "-2 -3 30 30" },
|
|
88
|
+
h("path", { class: "chip__checkmark-path", fill: "none", stroke: "black", d: "M1.73,12.91 8.1,19.28 22.79,4.59" }))));
|
|
89
|
+
}
|
|
90
|
+
return (h("div", { class: componentClass, "data-value": chip.id, onClick: props.onClick && props.onClick[i]
|
|
91
|
+
? props.onClick[i].bind(props.onClick[i], chip)
|
|
92
|
+
: null, role: "row", title: chip.title ? chip.title : '' },
|
|
93
|
+
h("span", { class: "chip-set__indent" }),
|
|
94
|
+
iconEl,
|
|
95
|
+
h("span", { role: "gridcell" },
|
|
96
|
+
h("span", { role: "button", tabindex: i, class: "chip__primary-action",
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
value: chip.id, checked: chip.checked, onBlur: props.onBlur && props.onBlur[i]
|
|
99
|
+
? props.onBlur[i].bind(props.onBlur[i], chip)
|
|
100
|
+
: null, onFocus: props.onFocus && props.onFocus[i]
|
|
101
|
+
? props.onFocus[i].bind(props.onFocus[i], chip)
|
|
102
|
+
: null },
|
|
103
|
+
h("span", { class: "chip__text" }, chip.value))),
|
|
104
|
+
isInput ? (h("span", { role: "gridcell" },
|
|
105
|
+
h("span", { tabindex: "-1", class: `kup-icon chip__icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onIconClick && props.onIconClick[i]
|
|
106
|
+
? props.onIconClick[i].bind(props.onIconClick[i], chip)
|
|
107
|
+
: null }))) : null));
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
|
-
|
|
108
|
-
for (let index = 0; index < dataNew.length; index++) {
|
|
109
|
-
const node = dataNew[index];
|
|
110
|
-
data.push({
|
|
111
|
-
icon: node.icon,
|
|
112
|
-
label: node.value,
|
|
113
|
-
obj: node.obj,
|
|
114
|
-
value: node.id,
|
|
115
|
-
});
|
|
116
|
-
if (node.children) {
|
|
117
|
-
children(dataNew[index]);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
dom.ketchup.debug.logMessage('f-chip', 'Chip data was deducted from a TreeNode[] structure (experimental feature).', KupDebugCategory.WARNING);
|
|
121
|
-
return data;
|
|
110
|
+
return chipList;
|
|
122
111
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FImageShape } from './f-image-declarations';
|
|
2
2
|
import { getAssetPath, h } from '@stencil/core';
|
|
3
|
-
import { KupThemeColorValues } from '../../
|
|
3
|
+
import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations';
|
|
4
4
|
/*-------------------------------------------------*/
|
|
5
5
|
/* C o m p o n e n t */
|
|
6
6
|
/*-------------------------------------------------*/
|
|
@@ -40,7 +40,7 @@ export const FImage = (props) => {
|
|
|
40
40
|
}
|
|
41
41
|
return (h("div", Object.assign({ class: `f-image ${props.wrapperClass ? props.wrapperClass : ''} ${props.fit ? 'kup-fit' : ''}` }, props.dataSet, { id: props.id, style: style, title: props.title, onClick: props.onClick }),
|
|
42
42
|
el,
|
|
43
|
-
badgeCollection));
|
|
43
|
+
...badgeCollection));
|
|
44
44
|
};
|
|
45
45
|
/*-------------------------------------------------*/
|
|
46
46
|
/* M e t h o d s */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { isNumber } from '../../utils/utils';
|
|
2
|
+
export function pageChange(pageNumber, max, perPage) {
|
|
3
|
+
if (isNumber(pageNumber)) {
|
|
4
|
+
const numberOfPages = Math.ceil(max / perPage);
|
|
5
|
+
let tmpNewPage = pageNumber;
|
|
6
|
+
if (tmpNewPage > numberOfPages) {
|
|
7
|
+
tmpNewPage = numberOfPages;
|
|
8
|
+
}
|
|
9
|
+
if (tmpNewPage < 1) {
|
|
10
|
+
tmpNewPage = 1;
|
|
11
|
+
}
|
|
12
|
+
return tmpNewPage;
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
export function rowsPerPageChange(rowsNumber, max) {
|
|
17
|
+
if (isNumber(rowsNumber)) {
|
|
18
|
+
let tmpRowsPerPage = rowsNumber;
|
|
19
|
+
if (tmpRowsPerPage > max) {
|
|
20
|
+
tmpRowsPerPage = max;
|
|
21
|
+
}
|
|
22
|
+
if (tmpRowsPerPage < 1) {
|
|
23
|
+
tmpRowsPerPage = 1;
|
|
24
|
+
}
|
|
25
|
+
return tmpRowsPerPage;
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { KupLanguageGeneric, KupLanguagePage, KupLanguageRow, } from '../../managers/kup-language/kup-language-declarations';
|
|
3
|
+
import { FButton } from '../f-button/f-button';
|
|
4
|
+
import { FButtonStyling } from '../f-button/f-button-declarations';
|
|
5
|
+
import { FPaginatorMode } from './f-paginator-declarations';
|
|
6
|
+
const dom = document.documentElement;
|
|
7
|
+
/*-------------------------------------------------*/
|
|
8
|
+
/* C o m p o n e n t */
|
|
9
|
+
/*-------------------------------------------------*/
|
|
10
|
+
export const FPaginator = (props) => {
|
|
11
|
+
const maxNumberOfPage = Math.ceil(props.max / props.perPage);
|
|
12
|
+
const pageItems = getPageItems(props, maxNumberOfPage);
|
|
13
|
+
const rowsPerPageItems = getRowsItems(props);
|
|
14
|
+
const dataPageSelector = {
|
|
15
|
+
'kup-list': {
|
|
16
|
+
data: pageItems,
|
|
17
|
+
},
|
|
18
|
+
'kup-text-field': {
|
|
19
|
+
label: dom.ketchup.language.translate(KupLanguagePage.PAGE),
|
|
20
|
+
helper: dom.ketchup.language.translate(KupLanguagePage.TOTAL) +
|
|
21
|
+
`: ${maxNumberOfPage}`,
|
|
22
|
+
helperWhenFocused: true,
|
|
23
|
+
inputType: 'number',
|
|
24
|
+
max: maxNumberOfPage,
|
|
25
|
+
min: 1,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const dataRowsSelector = {
|
|
29
|
+
'kup-list': {
|
|
30
|
+
data: rowsPerPageItems,
|
|
31
|
+
},
|
|
32
|
+
'kup-text-field': {
|
|
33
|
+
label: dom.ketchup.language.translate(KupLanguageRow.ROWS) +
|
|
34
|
+
' / ' +
|
|
35
|
+
dom.ketchup.language.translate(KupLanguagePage.PAGE),
|
|
36
|
+
helper: dom.ketchup.language.translate(KupLanguageRow.TOTAL) +
|
|
37
|
+
`: ${props.max}`,
|
|
38
|
+
helperWhenFocused: true,
|
|
39
|
+
inputType: 'number',
|
|
40
|
+
max: props.max,
|
|
41
|
+
min: 1,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
return (h("div", Object.assign({ class: `f-paginator ${props.mode ? props.mode : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
|
|
45
|
+
props.mode !== FPaginatorMode.SIMPLE ? (h(FButton, { icon: "chevron_left", disabled: isPrevPageDisabled(props), onClick: props.onPrevPage, wrapperClass: "prev-page" })) : null,
|
|
46
|
+
h("kup-combobox", { class: "page-selector", data: dataPageSelector, initialValue: props.currentPage.toString(), "onkup-combobox-change": props.onPageChange }),
|
|
47
|
+
props.mode !== FPaginatorMode.SIMPLE ? (h(FButton, { icon: "chevron_right", disabled: isNextPageDisabled(props), onClick: props.onNextPage, wrapperClass: "next-page" })) : null,
|
|
48
|
+
h("kup-combobox", { class: "rows-selector", data: dataRowsSelector, initialValue: props.perPage.toString(), "onkup-combobox-change": props.onRowsChange }),
|
|
49
|
+
props.onLoadMore ? (h(FButton, { icon: "plus", onClick: props.onLoadMore, label: dom.ketchup.language.translate(KupLanguageGeneric.LOAD_MORE), styling: FButtonStyling.FLAT, wrapperClass: "load-more-button" })) : null));
|
|
50
|
+
};
|
|
51
|
+
function getPageItems(props, maxNumberOfPage) {
|
|
52
|
+
const pageItems = [];
|
|
53
|
+
for (let i = 1; i <= maxNumberOfPage; i++) {
|
|
54
|
+
const selected = i == props.currentPage;
|
|
55
|
+
pageItems.push({
|
|
56
|
+
text: i.toString(),
|
|
57
|
+
value: i.toString(),
|
|
58
|
+
selected: selected,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return pageItems;
|
|
62
|
+
}
|
|
63
|
+
function getRowsItems(props) {
|
|
64
|
+
const rowsPerPageItems = [];
|
|
65
|
+
let i = props.perPage;
|
|
66
|
+
if (i === 0) {
|
|
67
|
+
return rowsPerPageItems;
|
|
68
|
+
}
|
|
69
|
+
while (i < props.max) {
|
|
70
|
+
const selected = i == props.perPage;
|
|
71
|
+
rowsPerPageItems.push({
|
|
72
|
+
text: i.toString(),
|
|
73
|
+
value: i.toString(),
|
|
74
|
+
selected: selected,
|
|
75
|
+
});
|
|
76
|
+
i = i * 2;
|
|
77
|
+
}
|
|
78
|
+
const selected = props.max == props.perPage;
|
|
79
|
+
rowsPerPageItems.push({
|
|
80
|
+
text: props.max.toString(),
|
|
81
|
+
value: props.max.toString(),
|
|
82
|
+
selected: selected,
|
|
83
|
+
});
|
|
84
|
+
return rowsPerPageItems;
|
|
85
|
+
}
|
|
86
|
+
function isNextPageDisabled(props) {
|
|
87
|
+
return props.currentPage * props.perPage >= props.max;
|
|
88
|
+
}
|
|
89
|
+
function isPrevPageDisabled(props) {
|
|
90
|
+
return props.currentPage == 1;
|
|
91
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getAssetPath, h } from '@stencil/core';
|
|
2
|
-
import { KupThemeIconValues } from '../../
|
|
2
|
+
import { KupThemeIconValues } from '../../managers/kup-theme/kup-theme-declarations';
|
|
3
3
|
/*-------------------------------------------------*/
|
|
4
4
|
/* C o m p o n e n t */
|
|
5
5
|
/*-------------------------------------------------*/
|
|
@@ -35,7 +35,7 @@ function setContent(props) {
|
|
|
35
35
|
webkitMask: svg,
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
iconEl = (h("span", {
|
|
38
|
+
iconEl = (h("span", { style: iconStyle, onClick: props.onIconClick, class: `mdc-text-field__icon kup-icon action ${iconClass}` }));
|
|
39
39
|
}
|
|
40
40
|
const classObj = {
|
|
41
41
|
'is-clearable': props.isClearable,
|
|
@@ -56,7 +56,7 @@ function setContent(props) {
|
|
|
56
56
|
!props.trailingIcon ? iconEl : undefined,
|
|
57
57
|
props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
|
|
58
58
|
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
|
|
59
|
-
props.isClearable ? (h("span", {
|
|
59
|
+
props.isClearable ? (h("span", { class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
|
|
60
60
|
props.trailingIcon ? iconEl : undefined,
|
|
61
61
|
!props.fullWidth && !isOutlined ? labelEl : undefined,
|
|
62
62
|
isOutlined ? (h("div", { class: "mdc-notched-outline" },
|
|
@@ -65,7 +65,7 @@ function setContent(props) {
|
|
|
65
65
|
h("div", { class: "mdc-notched-outline__trailing" }))) : (h("span", { class: "mdc-line-ripple" }))));
|
|
66
66
|
}
|
|
67
67
|
function setHelper(props) {
|
|
68
|
-
if (props.helperEnabled) {
|
|
68
|
+
if (props.helperEnabled !== false) {
|
|
69
69
|
if (props.helper) {
|
|
70
70
|
const classObj = {
|
|
71
71
|
'mdc-text-field-helper-text': true,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const dom = document.documentElement;
|
|
2
|
+
/**
|
|
3
|
+
* Finds all the cells matching the filters criteria in the input dataset.
|
|
4
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
5
|
+
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
6
|
+
* @returns {KupDataCell[]} Array of cells fetched after applying the filters.
|
|
7
|
+
*/
|
|
8
|
+
export function findCell(dataset, filters) {
|
|
9
|
+
return dom.ketchup.data.finder(dataset, filters).cells;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Returns all the cells values of the specified columns.
|
|
13
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
14
|
+
* @param {string[]} columns - Columns included in the search. When missing, searches all columns.
|
|
15
|
+
* @returns {string[]} Values of the cells.
|
|
16
|
+
*/
|
|
17
|
+
export function getCellValue(dataset, columns) {
|
|
18
|
+
const result = [];
|
|
19
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
20
|
+
const row = dataset.rows[index];
|
|
21
|
+
const cells = row.cells;
|
|
22
|
+
for (const key in cells) {
|
|
23
|
+
const cell = cells[key];
|
|
24
|
+
if (!columns || !columns.length || columns.includes(key)) {
|
|
25
|
+
result.push(cell.value);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Overrides the given cell attributes for the specified columns.
|
|
33
|
+
* If no columns are provided, the value will be applied to every column of the dataset.
|
|
34
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
35
|
+
* @param {KupDataCell} cell - New cell.
|
|
36
|
+
* @param {string[]} columns - Columns to be handled.
|
|
37
|
+
* @returns {KupDataCell[]} Replaced cells.
|
|
38
|
+
*/
|
|
39
|
+
export function replaceCell(dataset, cell, columns) {
|
|
40
|
+
const replaced = [];
|
|
41
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
42
|
+
const row = dataset.rows[index];
|
|
43
|
+
const cells = row.cells;
|
|
44
|
+
for (const key in cells) {
|
|
45
|
+
if (!columns || !columns.length || columns.includes(key)) {
|
|
46
|
+
cells[key] = Object.assign({}, cell);
|
|
47
|
+
replaced.push(cells[key]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return replaced;
|
|
52
|
+
}
|