@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
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import numeral from 'numeral';
|
|
2
|
+
import 'numeral/locales/chs';
|
|
3
|
+
import 'numeral/locales/es';
|
|
4
|
+
import 'numeral/locales/fr';
|
|
5
|
+
import 'numeral/locales/it';
|
|
6
|
+
import 'numeral/locales/pl';
|
|
7
|
+
import 'numeral/locales/ru';
|
|
8
|
+
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
9
|
+
import { KupMathLocales } from './kup-math-declarations';
|
|
10
|
+
import { customFormula, normalDistributionFormula } from './kup-math-helper';
|
|
11
|
+
const dom = document.documentElement;
|
|
12
|
+
/**
|
|
13
|
+
* Handles mathematical operations and number formatting/conversion.
|
|
14
|
+
* @module KupMath
|
|
15
|
+
*/
|
|
16
|
+
export class KupMath {
|
|
17
|
+
/**
|
|
18
|
+
* Initializes KupMath.
|
|
19
|
+
*/
|
|
20
|
+
constructor(locale) {
|
|
21
|
+
this.formulas = {
|
|
22
|
+
custom(formula, row) {
|
|
23
|
+
return customFormula(formula, row);
|
|
24
|
+
},
|
|
25
|
+
normalDistribution(average, variance, x) {
|
|
26
|
+
return normalDistributionFormula(average, variance, x);
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
this.locale = locale ? locale : KupMathLocales.en;
|
|
30
|
+
this.managedComponents = new Set();
|
|
31
|
+
this.numeral = numeral;
|
|
32
|
+
this.numeral.locale(this.locale);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sets the locale of the numeral instance.
|
|
36
|
+
* @param {KupMathLocales} locale - Numeraljs locale string.
|
|
37
|
+
*/
|
|
38
|
+
setLocale(locale) {
|
|
39
|
+
if (!KupMathLocales[locale]) {
|
|
40
|
+
locale = KupMathLocales.en;
|
|
41
|
+
dom.ketchup.debug.logMessage('kup-math', 'Invalid locale (' + locale + ')! Defaulting to english.', KupDebugCategory.WARNING);
|
|
42
|
+
}
|
|
43
|
+
this.locale = locale;
|
|
44
|
+
this.numeral.locale(locale);
|
|
45
|
+
this.managedComponents.forEach(function (comp) {
|
|
46
|
+
if (comp.isConnected) {
|
|
47
|
+
comp.refresh();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
document.dispatchEvent(new CustomEvent('kup-math-localechange'));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Calculates the normal distribution on a set of values.
|
|
54
|
+
* @param {string[] | number[] | String[]} values - Array of values.
|
|
55
|
+
* @param {number} precision - Number of iterations to run (points). When not specified, defaults to 201.
|
|
56
|
+
* @returns {number[][]} Returns an array of arrays containing numbers, which are the representation of the calculated normal distribution.
|
|
57
|
+
*/
|
|
58
|
+
normalDistribution(values, precision) {
|
|
59
|
+
if (!precision) {
|
|
60
|
+
precision = 201;
|
|
61
|
+
}
|
|
62
|
+
const data = [];
|
|
63
|
+
let max = Math.max.apply(Math, values);
|
|
64
|
+
let min = Math.min.apply(Math, values);
|
|
65
|
+
let average = 0;
|
|
66
|
+
let variance = 0;
|
|
67
|
+
for (let index = 0; index < values.length; index++) {
|
|
68
|
+
const value = values[index];
|
|
69
|
+
average += this.numberify(value);
|
|
70
|
+
}
|
|
71
|
+
average = average / values.length;
|
|
72
|
+
for (let index = 0; index < values.length; index++) {
|
|
73
|
+
const value = values[index];
|
|
74
|
+
variance += Math.pow(this.numberify(value) - average, 2);
|
|
75
|
+
}
|
|
76
|
+
variance = variance / values.length;
|
|
77
|
+
if (!variance) {
|
|
78
|
+
variance = 0.001;
|
|
79
|
+
}
|
|
80
|
+
max = max + ((average / 100) * 50 + (variance / average) * 3);
|
|
81
|
+
min = min - ((average / 100) * 50 + (variance / average) * 3);
|
|
82
|
+
for (let i = 0; i < precision; i++) {
|
|
83
|
+
const x = ((max - min) * i) / precision + min;
|
|
84
|
+
data.push([
|
|
85
|
+
x,
|
|
86
|
+
this.formulas.normalDistribution(average, variance, x),
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Formats the input number with the specified format of the currently set locale.
|
|
93
|
+
* @param {string | String | number} input - Input number which will be automatically "numberified".
|
|
94
|
+
* @param {string} format - Desired format. Defaults to '0,0.0' (i.e.: 2,000,000.51).
|
|
95
|
+
* @returns {string} Formatted number.
|
|
96
|
+
*/
|
|
97
|
+
format(input, format) {
|
|
98
|
+
const n = this.numberify(input);
|
|
99
|
+
if (!format) {
|
|
100
|
+
const positiveN = Math.abs(n);
|
|
101
|
+
const decimals = positiveN - Math.floor(positiveN);
|
|
102
|
+
if (decimals) {
|
|
103
|
+
format = '0,0.0';
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
format = '0,0';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const formatted = this.numeral(n).format(format);
|
|
110
|
+
return formatted;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Returns a number from a non-specified input type between string, number, or String.
|
|
114
|
+
* @param {string | String | number} input - Input value to numberify.
|
|
115
|
+
* @param {boolean} inputIsLocalized - Numberifies assuming the input string is in the current KupMath locale's format.
|
|
116
|
+
* @returns {number} Resulting number or NaN (when not a number).
|
|
117
|
+
*/
|
|
118
|
+
numberify(input, inputIsLocalized) {
|
|
119
|
+
let n = NaN;
|
|
120
|
+
if (inputIsLocalized) {
|
|
121
|
+
n = this.numeral(input).value();
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
const locale = this.numeral.locale();
|
|
125
|
+
this.numeral.locale(KupMathLocales.en);
|
|
126
|
+
n = this.numeral(input).value();
|
|
127
|
+
this.numeral.locale(locale);
|
|
128
|
+
}
|
|
129
|
+
if (n === null) {
|
|
130
|
+
return NaN;
|
|
131
|
+
}
|
|
132
|
+
return n;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Registers a KupComponent in KupMath, in order to be properly handled whenever the locale changes.
|
|
136
|
+
* @param {any} component - The Ketchup component to be registered.
|
|
137
|
+
*/
|
|
138
|
+
register(component) {
|
|
139
|
+
this.managedComponents.add(component.rootElement);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Unregisters a KupComponent, so it won't be refreshed when the locale changes.
|
|
143
|
+
*
|
|
144
|
+
* @param {any} component - The component calling this function.
|
|
145
|
+
*/
|
|
146
|
+
unregister(component) {
|
|
147
|
+
if (this.managedComponents) {
|
|
148
|
+
this.managedComponents.delete(component.rootElement);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
File without changes
|
|
@@ -291,6 +291,21 @@ export class KupObjects {
|
|
|
291
291
|
(!obj.p || obj.p.trim() == '') &&
|
|
292
292
|
(!obj.k || obj.k.trim() == ''));
|
|
293
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* Checks whether the arguments have the same object or not.
|
|
296
|
+
* @param {KupObj[]} objs - Array of KupObj.
|
|
297
|
+
* @returns {boolean} True when it's the same object.
|
|
298
|
+
*/
|
|
299
|
+
isSameKupObj(objs) {
|
|
300
|
+
return objs.every((obj, _, array) => {
|
|
301
|
+
if (!this.isEmptyKupObj(obj)) {
|
|
302
|
+
return obj.t == array[0].t && obj.p == array[0].p;
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
294
309
|
/**
|
|
295
310
|
* Parses a date depending on the object's type.
|
|
296
311
|
* @param {KupObj} obj - Object to check.
|
package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,106 @@
|
|
|
1
|
+
import { KupTagNames } from '../../types/GenericTypes';
|
|
1
2
|
/**
|
|
2
3
|
* Variable used to fetch the MASTER customStyle (used in every component).
|
|
3
4
|
*/
|
|
4
5
|
export const masterCustomStyle = 'MASTER';
|
|
6
|
+
/**
|
|
7
|
+
* Components using the FButton functional component.
|
|
8
|
+
*/
|
|
9
|
+
export const fButtonUsers = [
|
|
10
|
+
KupTagNames.BUTTON,
|
|
11
|
+
KupTagNames.BUTTON_LIST,
|
|
12
|
+
KupTagNames.BOX,
|
|
13
|
+
KupTagNames.CALENDAR,
|
|
14
|
+
KupTagNames.CARD,
|
|
15
|
+
KupTagNames.DATA_TABLE,
|
|
16
|
+
KupTagNames.DROPDOWN_BUTTON,
|
|
17
|
+
KupTagNames.SNACKBAR,
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Components using the FCell functional component.
|
|
21
|
+
*/
|
|
22
|
+
export const fCellUsers = [
|
|
23
|
+
KupTagNames.BOX,
|
|
24
|
+
KupTagNames.CELL,
|
|
25
|
+
KupTagNames.DATA_TABLE,
|
|
26
|
+
KupTagNames.TREE,
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* Components using the FCheckbox functional component.
|
|
30
|
+
*/
|
|
31
|
+
export const fCheckboxUsers = [
|
|
32
|
+
KupTagNames.BOX,
|
|
33
|
+
KupTagNames.CELL,
|
|
34
|
+
KupTagNames.CHECKBOX,
|
|
35
|
+
KupTagNames.DATA_TABLE,
|
|
36
|
+
KupTagNames.LIST,
|
|
37
|
+
KupTagNames.TREE,
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* Components using the FChip functional component.
|
|
41
|
+
*/
|
|
42
|
+
export const fChipUsers = [
|
|
43
|
+
KupTagNames.BOX,
|
|
44
|
+
KupTagNames.CALENDAR,
|
|
45
|
+
KupTagNames.CELL,
|
|
46
|
+
KupTagNames.CHIP,
|
|
47
|
+
KupTagNames.DATA_TABLE,
|
|
48
|
+
KupTagNames.TREE,
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* Components using the FImage functional component.
|
|
52
|
+
*/
|
|
53
|
+
export const fImageUsers = [
|
|
54
|
+
KupTagNames.ACCORDION,
|
|
55
|
+
KupTagNames.BADGE,
|
|
56
|
+
KupTagNames.BOX,
|
|
57
|
+
KupTagNames.BUTTON,
|
|
58
|
+
KupTagNames.BUTTON_LIST,
|
|
59
|
+
KupTagNames.CALENDAR,
|
|
60
|
+
KupTagNames.CARD,
|
|
61
|
+
KupTagNames.CELL,
|
|
62
|
+
KupTagNames.CHIP,
|
|
63
|
+
KupTagNames.DATA_TABLE,
|
|
64
|
+
KupTagNames.DROPDOWN_BUTTON,
|
|
65
|
+
KupTagNames.IMAGE,
|
|
66
|
+
KupTagNames.LIST,
|
|
67
|
+
KupTagNames.MAGIC_BOX,
|
|
68
|
+
KupTagNames.SNACKBAR,
|
|
69
|
+
KupTagNames.TAB_BAR,
|
|
70
|
+
KupTagNames.TREE,
|
|
71
|
+
];
|
|
72
|
+
/**
|
|
73
|
+
* Components using the FPaginator functional component.
|
|
74
|
+
*/
|
|
75
|
+
export const fPaginatorUsers = [KupTagNames.BOX, KupTagNames.DATA_TABLE];
|
|
76
|
+
/**
|
|
77
|
+
* Components using the FSwitch functional component.
|
|
78
|
+
*/
|
|
79
|
+
export const fSwitchUsers = [KupTagNames.SWITCH];
|
|
80
|
+
/**
|
|
81
|
+
* Components using the FTextField functional component.
|
|
82
|
+
*/
|
|
83
|
+
export const fTextFieldUsers = [
|
|
84
|
+
KupTagNames.AUTOCOMPLETE,
|
|
85
|
+
KupTagNames.BOX,
|
|
86
|
+
KupTagNames.CELL,
|
|
87
|
+
KupTagNames.COLOR_PICKER,
|
|
88
|
+
KupTagNames.COMBOBOX,
|
|
89
|
+
KupTagNames.DATA_TABLE,
|
|
90
|
+
KupTagNames.DATE_PICKER,
|
|
91
|
+
KupTagNames.TEXT_FIELD,
|
|
92
|
+
KupTagNames.TIME_PICKER,
|
|
93
|
+
KupTagNames.TREE,
|
|
94
|
+
];
|
|
95
|
+
/**
|
|
96
|
+
* Components using the MDC ripple effect.
|
|
97
|
+
*/
|
|
98
|
+
export const rippleUsers = [
|
|
99
|
+
KupTagNames.ACCORDION,
|
|
100
|
+
KupTagNames.CARD,
|
|
101
|
+
KupTagNames.TAB_BAR,
|
|
102
|
+
KupTagNames.TREE,
|
|
103
|
+
];
|
|
5
104
|
/**
|
|
6
105
|
* List of all colors.
|
|
7
106
|
*/
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { getAssetPath } from '@stencil/core';
|
|
2
2
|
import * as themesJson from './themes.json';
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
3
|
+
import * as applicationCSS from './kup-theme-application.css';
|
|
4
|
+
import * as componentCSS from './kup-theme-component.css';
|
|
5
|
+
import * as fButtonCSS from '../../f-components/f-button/f-button.css';
|
|
6
|
+
import * as fCellCSS from '../../f-components/f-cell/f-cell.css';
|
|
7
|
+
import * as fCheckboxCSS from '../../f-components/f-checkbox/f-checkbox.css';
|
|
8
|
+
import * as fChipCSS from '../../f-components/f-chip/f-chip.css';
|
|
9
|
+
import * as fImageCSS from '../../f-components/f-image/f-image.css';
|
|
10
|
+
import * as fPaginatorCSS from '../../f-components/f-paginator/f-paginator.css';
|
|
11
|
+
import * as fSwitchCSS from '../../f-components/f-switch/f-switch.css';
|
|
12
|
+
import * as fTextFieldCSS from '../../f-components/f-text-field/f-text-field.css';
|
|
13
|
+
import * as rippleCSS from './mdc-ripple.css';
|
|
14
|
+
import { fButtonUsers, fCellUsers, fCheckboxUsers, fChipUsers, fImageUsers, fPaginatorUsers, fSwitchUsers, fTextFieldUsers, masterCustomStyle, rippleUsers, } from './kup-theme-declarations';
|
|
6
15
|
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
7
16
|
const dom = document.documentElement;
|
|
8
17
|
/**
|
|
@@ -22,51 +31,6 @@ export class KupTheme {
|
|
|
22
31
|
.querySelector('head')
|
|
23
32
|
.appendChild(document.createElement('style'));
|
|
24
33
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Sets the theme using this.name or the function's argument.
|
|
27
|
-
* @param {string} name - When present, this theme will be set.
|
|
28
|
-
*/
|
|
29
|
-
set(name, list) {
|
|
30
|
-
if (name) {
|
|
31
|
-
this.name = name;
|
|
32
|
-
}
|
|
33
|
-
if (list) {
|
|
34
|
-
this.list = list;
|
|
35
|
-
}
|
|
36
|
-
dom.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
37
|
-
if (!this.list[this.name]) {
|
|
38
|
-
dom.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
39
|
-
this.name = 'ketchup';
|
|
40
|
-
}
|
|
41
|
-
this.cssVars = {};
|
|
42
|
-
this.styleTag.innerText =
|
|
43
|
-
this.imports() +
|
|
44
|
-
' :root[kup-theme="' +
|
|
45
|
-
this.name +
|
|
46
|
-
'"]{' +
|
|
47
|
-
this.cssVariables() +
|
|
48
|
-
this.icons() +
|
|
49
|
-
'}' +
|
|
50
|
-
themeCSS['default'];
|
|
51
|
-
this.customStyle();
|
|
52
|
-
document.documentElement.setAttribute('kup-theme', this.name);
|
|
53
|
-
document.dispatchEvent(new CustomEvent('kup-theme-change'));
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Gets the name of available themes (filters out themes named "test").
|
|
57
|
-
* @returns {Array<string>} Array of themes' names.
|
|
58
|
-
*/
|
|
59
|
-
getThemes() {
|
|
60
|
-
const themes = [];
|
|
61
|
-
for (var key in this.list) {
|
|
62
|
-
if (this.list.hasOwnProperty(key)) {
|
|
63
|
-
if (key !== 'test') {
|
|
64
|
-
themes.push(key);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return themes;
|
|
69
|
-
}
|
|
70
34
|
/**
|
|
71
35
|
* Sets the CSS variables of the theme.
|
|
72
36
|
*/
|
|
@@ -139,6 +103,49 @@ export class KupTheme {
|
|
|
139
103
|
}
|
|
140
104
|
});
|
|
141
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Sets the theme using this.name or the function's argument.
|
|
108
|
+
* @param {string} name - When present, this theme will be set.
|
|
109
|
+
*/
|
|
110
|
+
set(name, list) {
|
|
111
|
+
if (name) {
|
|
112
|
+
this.name = name;
|
|
113
|
+
}
|
|
114
|
+
if (list) {
|
|
115
|
+
this.list = list;
|
|
116
|
+
}
|
|
117
|
+
dom.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
118
|
+
if (!this.list[this.name]) {
|
|
119
|
+
dom.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
120
|
+
this.name = 'ketchup';
|
|
121
|
+
}
|
|
122
|
+
this.cssVars = {};
|
|
123
|
+
this.styleTag.innerText =
|
|
124
|
+
this.imports() +
|
|
125
|
+
' :root[kup-theme="' +
|
|
126
|
+
this.name +
|
|
127
|
+
'"]{' +
|
|
128
|
+
this.cssVariables() +
|
|
129
|
+
this.icons() +
|
|
130
|
+
'}' +
|
|
131
|
+
applicationCSS['default'];
|
|
132
|
+
this.customStyle();
|
|
133
|
+
document.documentElement.setAttribute('kup-theme', this.name);
|
|
134
|
+
document.dispatchEvent(new CustomEvent('kup-theme-change'));
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Gets the name of available themes.
|
|
138
|
+
* @returns {Array<string>} Array of themes' names.
|
|
139
|
+
*/
|
|
140
|
+
getThemes() {
|
|
141
|
+
const themes = [];
|
|
142
|
+
for (var key in this.list) {
|
|
143
|
+
if (this.list.hasOwnProperty(key)) {
|
|
144
|
+
themes.push(key);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return themes;
|
|
148
|
+
}
|
|
142
149
|
/**
|
|
143
150
|
* This method will just refresh the current theme.
|
|
144
151
|
*/
|
|
@@ -160,14 +167,14 @@ export class KupTheme {
|
|
|
160
167
|
}
|
|
161
168
|
}
|
|
162
169
|
/**
|
|
163
|
-
* Registers a KupComponent in KupTheme, in order to be properly
|
|
170
|
+
* Registers a KupComponent in KupTheme, in order to be properly refreshed whenever the theme changes.
|
|
164
171
|
* @param {any} comp - The component calling this function.
|
|
165
172
|
*/
|
|
166
173
|
register(comp) {
|
|
167
174
|
this.managedComponents.add(comp.rootElement);
|
|
168
175
|
}
|
|
169
176
|
/**
|
|
170
|
-
* Unregisters a KupComponent, so it won't be
|
|
177
|
+
* Unregisters a KupComponent, so it won't be refreshed when the theme changes.
|
|
171
178
|
* @param {any} comp - The component calling this function.
|
|
172
179
|
*/
|
|
173
180
|
unregister(comp) {
|
|
@@ -182,7 +189,8 @@ export class KupTheme {
|
|
|
182
189
|
*/
|
|
183
190
|
setKupStyle(comp) {
|
|
184
191
|
const styles = this.list[this.name].customStyles;
|
|
185
|
-
|
|
192
|
+
const tagName = comp.tagName;
|
|
193
|
+
let completeStyle = componentCSS['default'];
|
|
186
194
|
if (styles && styles[masterCustomStyle]) {
|
|
187
195
|
completeStyle += styles[masterCustomStyle];
|
|
188
196
|
}
|
|
@@ -192,6 +200,35 @@ export class KupTheme {
|
|
|
192
200
|
if (comp.customStyle) {
|
|
193
201
|
completeStyle += ' ' + comp.customStyle;
|
|
194
202
|
}
|
|
203
|
+
if (tagName) {
|
|
204
|
+
if (fButtonUsers.includes(tagName)) {
|
|
205
|
+
completeStyle += fButtonCSS['default'];
|
|
206
|
+
}
|
|
207
|
+
if (fCellUsers.includes(tagName)) {
|
|
208
|
+
completeStyle += fCellCSS['default'];
|
|
209
|
+
}
|
|
210
|
+
if (fCheckboxUsers.includes(tagName)) {
|
|
211
|
+
completeStyle += fCheckboxCSS['default'];
|
|
212
|
+
}
|
|
213
|
+
if (fChipUsers.includes(tagName)) {
|
|
214
|
+
completeStyle += fChipCSS['default'];
|
|
215
|
+
}
|
|
216
|
+
if (fImageUsers.includes(tagName)) {
|
|
217
|
+
completeStyle += fImageCSS['default'];
|
|
218
|
+
}
|
|
219
|
+
if (fPaginatorUsers.includes(tagName)) {
|
|
220
|
+
completeStyle += fPaginatorCSS['default'];
|
|
221
|
+
}
|
|
222
|
+
if (fSwitchUsers.includes(tagName)) {
|
|
223
|
+
completeStyle += fSwitchCSS['default'];
|
|
224
|
+
}
|
|
225
|
+
if (fTextFieldUsers.includes(tagName)) {
|
|
226
|
+
completeStyle += fTextFieldCSS['default'];
|
|
227
|
+
}
|
|
228
|
+
if (rippleUsers.includes(tagName)) {
|
|
229
|
+
completeStyle += rippleCSS['default'];
|
|
230
|
+
}
|
|
231
|
+
}
|
|
195
232
|
return completeStyle ? completeStyle : null;
|
|
196
233
|
}
|
|
197
234
|
/**
|
|
@@ -226,7 +263,7 @@ export class KupTheme {
|
|
|
226
263
|
randomChannel(brightness));
|
|
227
264
|
}
|
|
228
265
|
/**
|
|
229
|
-
* Sets a random theme between those specified in this.list (excludes "print" and "test").
|
|
266
|
+
* Sets a random theme between those specified in this.list (excludes "print" and "test") and different from the currently used one.
|
|
230
267
|
*/
|
|
231
268
|
randomTheme() {
|
|
232
269
|
let themes = [];
|
|
@@ -238,15 +275,19 @@ export class KupTheme {
|
|
|
238
275
|
}
|
|
239
276
|
}
|
|
240
277
|
if (themes.length > 0) {
|
|
241
|
-
|
|
278
|
+
let index = null;
|
|
279
|
+
while (index === null || themes[index] === this.name) {
|
|
280
|
+
index = Math.floor(Math.random() * Math.floor(themes.length));
|
|
281
|
+
}
|
|
282
|
+
this.set(themes[index]);
|
|
242
283
|
}
|
|
243
284
|
else {
|
|
244
285
|
dom.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", KupDebugCategory.WARNING);
|
|
245
286
|
}
|
|
246
287
|
}
|
|
247
288
|
/**
|
|
248
|
-
* Returns HEX, RGB and RGB values from a given color.
|
|
249
|
-
* @param {string} color -
|
|
289
|
+
* Returns HEX, RGB, HSL, HSL values and RGB values from a given color.
|
|
290
|
+
* @param {string} color - Input color.
|
|
250
291
|
* @returns {KupThemeColor} Object of color values: hexColor ("#ffffff"), hslColor ("hsl(255,100%,100%)"), hslValues ("255,100%,100%"), rgbColor ("rgb(255,255,255)") and rgbValues ("255,255,255").
|
|
251
292
|
*/
|
|
252
293
|
colorCheck(color) {
|
|
@@ -257,14 +298,20 @@ export class KupTheme {
|
|
|
257
298
|
color +
|
|
258
299
|
' (theme background).');
|
|
259
300
|
}
|
|
260
|
-
|
|
261
|
-
const
|
|
262
|
-
|
|
301
|
+
const altRgbRe = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
302
|
+
const altRgb = altRgbRe.test(color);
|
|
303
|
+
if (altRgb) {
|
|
304
|
+
const parts = color.match(altRgbRe);
|
|
305
|
+
color = 'rgb(' + parts[1] + ',' + parts[2] + ',' + parts[3] + ')';
|
|
306
|
+
}
|
|
307
|
+
let isHex = color.substring(0, 1) === '#';
|
|
308
|
+
const isHsl = color.substring(0, 3).toLowerCase() === 'hsl';
|
|
309
|
+
const isRgb = color.substring(0, 3).toLowerCase() === 'rgb';
|
|
263
310
|
//If true, supposedly it's a code word
|
|
264
311
|
if (!isHex && !isHsl && !isRgb) {
|
|
265
312
|
const oldColor = color;
|
|
266
313
|
color = this.codeToHex(color);
|
|
267
|
-
isHex = color.
|
|
314
|
+
isHex = color.substring(0, 1) === '#' ? true : false;
|
|
268
315
|
dom.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
|
|
269
316
|
oldColor +
|
|
270
317
|
', converted to ' +
|
|
@@ -273,6 +320,7 @@ export class KupTheme {
|
|
|
273
320
|
}
|
|
274
321
|
//Testing whether the color is "hex" value or "hsl"
|
|
275
322
|
let hexColor = null;
|
|
323
|
+
let rgbColor = null;
|
|
276
324
|
let hslColor = null;
|
|
277
325
|
let hslValues = null;
|
|
278
326
|
let hue = null;
|
|
@@ -280,10 +328,10 @@ export class KupTheme {
|
|
|
280
328
|
let saturation = null;
|
|
281
329
|
if (isHex || isHsl) {
|
|
282
330
|
const oldColor = color;
|
|
283
|
-
let
|
|
331
|
+
let rgbColorObj = null;
|
|
284
332
|
if (isHex) {
|
|
285
333
|
hexColor = color;
|
|
286
|
-
|
|
334
|
+
rgbColorObj = this.hexToRgb(color);
|
|
287
335
|
}
|
|
288
336
|
else {
|
|
289
337
|
hslColor = color;
|
|
@@ -296,19 +344,19 @@ export class KupTheme {
|
|
|
296
344
|
const h = parseInt(hue.replace('deg', ''));
|
|
297
345
|
const s = parseInt(saturation.replace('%', '')) / 100;
|
|
298
346
|
const l = parseInt(lightness.replace('%', '')) / 100;
|
|
299
|
-
|
|
347
|
+
rgbColorObj = this.hslToRgb(h, s, l);
|
|
300
348
|
}
|
|
301
349
|
try {
|
|
302
350
|
color =
|
|
303
351
|
'rgb(' +
|
|
304
|
-
|
|
352
|
+
rgbColorObj.r +
|
|
305
353
|
',' +
|
|
306
|
-
|
|
354
|
+
rgbColorObj.g +
|
|
307
355
|
',' +
|
|
308
|
-
|
|
356
|
+
rgbColorObj.b +
|
|
309
357
|
')';
|
|
310
358
|
if (isHex) {
|
|
311
|
-
const hsl = this.rgbToHsl(
|
|
359
|
+
const hsl = this.rgbToHsl(rgbColorObj.r, rgbColorObj.g, rgbColorObj.b);
|
|
312
360
|
hue = hsl.h.toString();
|
|
313
361
|
saturation = hsl.s.toString() + '%';
|
|
314
362
|
lightness = hsl.l.toString() + '%';
|
|
@@ -316,7 +364,7 @@ export class KupTheme {
|
|
|
316
364
|
hslColor = 'hsl(' + hslValues + ')';
|
|
317
365
|
}
|
|
318
366
|
else {
|
|
319
|
-
hexColor = this.rgbToHex(
|
|
367
|
+
hexColor = this.rgbToHex(rgbColorObj.r, rgbColorObj.g, rgbColorObj.b);
|
|
320
368
|
}
|
|
321
369
|
dom.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
|
|
322
370
|
oldColor +
|
|
@@ -332,6 +380,7 @@ export class KupTheme {
|
|
|
332
380
|
const values = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
|
|
333
381
|
try {
|
|
334
382
|
rgbValues = values[1] + ',' + values[2] + ',' + values[3];
|
|
383
|
+
rgbColor = color;
|
|
335
384
|
}
|
|
336
385
|
catch (error) {
|
|
337
386
|
dom.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
|
|
@@ -364,7 +413,7 @@ export class KupTheme {
|
|
|
364
413
|
hue: hue,
|
|
365
414
|
lightness: lightness,
|
|
366
415
|
saturation: saturation,
|
|
367
|
-
rgbColor:
|
|
416
|
+
rgbColor: rgbColor,
|
|
368
417
|
rgbValues: rgbValues,
|
|
369
418
|
};
|
|
370
419
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Ketchup elements tag names.
|
|
3
|
+
*/
|
|
4
|
+
export var KupTagNames;
|
|
5
|
+
(function (KupTagNames) {
|
|
6
|
+
KupTagNames["ACCORDION"] = "KUP-ACCORDION";
|
|
7
|
+
KupTagNames["AUTOCOMPLETE"] = "KUP-AUTOCOMPLETE";
|
|
8
|
+
KupTagNames["BADGE"] = "KUP-BADGE";
|
|
9
|
+
KupTagNames["BOX"] = "KUP-BOX";
|
|
10
|
+
KupTagNames["BUTTON"] = "KUP-BUTTON";
|
|
11
|
+
KupTagNames["BUTTON_LIST"] = "KUP-BUTTON-LIST";
|
|
12
|
+
KupTagNames["CALENDAR"] = "KUP-CALENDAR";
|
|
13
|
+
KupTagNames["CARD"] = "KUP-CARD";
|
|
14
|
+
KupTagNames["CELL"] = "KUP-CELL";
|
|
15
|
+
KupTagNames["CHART"] = "KUP-CHART";
|
|
16
|
+
KupTagNames["CHECKBOX"] = "KUP-CHECKBOX";
|
|
17
|
+
KupTagNames["CHIP"] = "KUP-CHIP";
|
|
18
|
+
KupTagNames["COLOR_PICKER"] = "KUP-COLOR-PICKER";
|
|
19
|
+
KupTagNames["COMBOBOX"] = "KUP-COMBOBOX";
|
|
20
|
+
KupTagNames["DASH"] = "KUP-DASH";
|
|
21
|
+
KupTagNames["DASH_LIST"] = "KUP-DASH-LIST";
|
|
22
|
+
KupTagNames["DATA_TABLE"] = "KUP-DATA-TABLE";
|
|
23
|
+
KupTagNames["DATE_PICKER"] = "KUP-DATE-PICKER";
|
|
24
|
+
KupTagNames["DRAWER"] = "KUP-DRAWER";
|
|
25
|
+
KupTagNames["DROPDOWN_BUTTON"] = "KUP-DROPDOWN-BUTTON";
|
|
26
|
+
KupTagNames["FIELD"] = "KUP-FIELD";
|
|
27
|
+
KupTagNames["GAUGE"] = "KUP-GAUGE";
|
|
28
|
+
KupTagNames["GRID"] = "KUP-GRID";
|
|
29
|
+
KupTagNames["IFRAME"] = "KUP-IFRAME";
|
|
30
|
+
KupTagNames["IMAGE"] = "KUP-IMAGE";
|
|
31
|
+
KupTagNames["LAZY"] = "KUP-LAZY";
|
|
32
|
+
KupTagNames["LIST"] = "KUP-LIST";
|
|
33
|
+
KupTagNames["MAGIC_BOX"] = "KUP-MAGIC-BOX";
|
|
34
|
+
KupTagNames["NAV_BAR"] = "KUP-NAV-BAR";
|
|
35
|
+
KupTagNames["PROBE"] = "KUP-PROBE";
|
|
36
|
+
KupTagNames["PROGRESS_BAR"] = "KUP-PROGRESS-BAR";
|
|
37
|
+
KupTagNames["QLIK"] = "KUP-QLIK";
|
|
38
|
+
KupTagNames["RADIO"] = "KUP-RADIO";
|
|
39
|
+
KupTagNames["RATING"] = "KUP-RATING";
|
|
40
|
+
KupTagNames["SNACKBAR"] = "KUP-SNACKBAR";
|
|
41
|
+
KupTagNames["SPINNER"] = "KUP-SPINNER";
|
|
42
|
+
KupTagNames["SWITCH"] = "KUP-SWITCH";
|
|
43
|
+
KupTagNames["TAB_BAR"] = "KUP-TAB-BAR";
|
|
44
|
+
KupTagNames["TEXT_FIELD"] = "KUP-TEXT-FIELD";
|
|
45
|
+
KupTagNames["TIME_PICKER"] = "KUP-TIME-PICKER";
|
|
46
|
+
KupTagNames["TOOLTIP"] = "KUP-TOOLTIP";
|
|
47
|
+
KupTagNames["TREE"] = "KUP-TREE";
|
|
48
|
+
})(KupTagNames || (KupTagNames = {}));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import numeral from 'numeral';
|
|
2
1
|
import { stringToNumber, unformattedStringToFormattedStringNumber, unformattedStringToFormattedStringTime, unformattedStringToFormattedStringTimestamp, } from './utils';
|
|
3
|
-
import { KupDatesFormats } from '
|
|
2
|
+
import { KupDatesFormats } from '../managers/kup-dates/kup-dates-declarations';
|
|
4
3
|
const dom = document.documentElement;
|
|
5
4
|
// -------------
|
|
6
5
|
// COMMONS
|
|
@@ -28,9 +27,9 @@ export function getValueForDisplay2(values, column) {
|
|
|
28
27
|
}
|
|
29
28
|
export function formatToNumber(cell) {
|
|
30
29
|
if (cell.obj) {
|
|
31
|
-
return
|
|
30
|
+
return dom.ketchup.math.numberify(cell.obj.k);
|
|
32
31
|
}
|
|
33
|
-
return
|
|
32
|
+
return dom.ketchup.math.numberify(cell.value);
|
|
34
33
|
}
|
|
35
34
|
function _getCellValueForDisplay(value, column, cell) {
|
|
36
35
|
let obj = column != null ? column.obj : null;
|