@sme.up/ketchup 4.0.0 → 4.2.0
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 +3 -3
- package/dist/cjs/cell-utils-dc0884a3.js +168 -0
- package/dist/cjs/f-button-2ba74fb5.js +105 -0
- package/dist/cjs/f-cell-fe60a08d.js +731 -0
- package/dist/cjs/f-chip-90d95d22.js +141 -0
- package/dist/cjs/{f-image-5f4f29ca.js → f-image-d3bd4e08.js} +4 -5
- package/dist/cjs/{index-3c471303.js → index-0416afab.js} +73 -64
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +6 -8
- package/dist/cjs/{kup-autocomplete_29.cjs.entry.js → kup-autocomplete_28.cjs.entry.js} +2580 -3060
- package/dist/cjs/kup-calendar.cjs.entry.js +30 -30
- package/dist/cjs/kup-cell.cjs.entry.js +201 -0
- package/dist/cjs/kup-dash-list.cjs.entry.js +15 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +104 -62
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -6
- package/dist/cjs/kup-field.cjs.entry.js +3 -5
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +21 -31
- package/dist/cjs/kup-manager-1a2688ca.js +5813 -0
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -6
- package/dist/cjs/kup-probe.cjs.entry.js +3 -4
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +152 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-2af73538.js → utils-0cc466b9.js} +17 -83
- package/dist/collection/assets/cell.js +51 -0
- package/dist/collection/assets/data-table.js +518 -1
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/snackbar.js +32 -0
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/kup-accordion/kup-accordion.css +0 -213
- package/dist/collection/components/kup-accordion/kup-accordion.js +15 -16
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.css +5 -2381
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +83 -111
- package/dist/collection/components/kup-badge/kup-badge.css +1 -35
- package/dist/collection/components/kup-badge/kup-badge.js +13 -14
- package/dist/collection/components/kup-box/kup-box.css +47 -780
- package/dist/collection/components/kup-box/kup-box.js +240 -366
- package/dist/collection/components/kup-button/kup-button.css +0 -333
- package/dist/collection/components/kup-button/kup-button.js +27 -28
- package/dist/collection/components/kup-button-list/kup-button-list.css +0 -332
- package/dist/collection/components/kup-button-list/kup-button-list.js +19 -20
- package/dist/collection/components/kup-calendar/kup-calendar.css +0 -517
- package/dist/collection/components/kup-calendar/kup-calendar.js +47 -45
- package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +20 -0
- package/dist/collection/components/kup-card/builtin/kup-card-calendar.js +458 -0
- package/dist/collection/components/kup-card/builtin/kup-card-clock.js +321 -0
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +18 -0
- package/dist/collection/components/kup-card/free/kup-card-free.js +13 -0
- package/dist/collection/components/kup-card/kup-card-declarations.js +19 -0
- package/dist/collection/components/kup-card/kup-card-helper.js +19 -1
- package/dist/collection/components/kup-card/kup-card.css +615 -185
- package/dist/collection/components/kup-card/kup-card.js +94 -34
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +75 -0
- package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -0
- package/dist/collection/components/kup-cell/kup-cell.css +20 -0
- package/dist/collection/components/kup-cell/kup-cell.js +413 -0
- package/dist/collection/components/kup-chart/kup-chart.js +41 -42
- package/dist/collection/components/kup-checkbox/kup-checkbox.css +0 -214
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +19 -20
- package/dist/collection/components/kup-chip/kup-chip.css +0 -217
- package/dist/collection/components/kup-chip/kup-chip.js +15 -16
- package/dist/collection/components/kup-color-picker/kup-color-picker.css +7 -2380
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +41 -41
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.css +5 -2381
- package/dist/collection/components/kup-combobox/kup-combobox.js +68 -28
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +13 -4
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +2 -0
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +61 -102
- package/dist/collection/components/kup-data-table/kup-data-table.css +118 -3232
- package/dist/collection/components/kup-data-table/kup-data-table.js +589 -1089
- package/dist/collection/components/kup-date-picker/kup-date-picker.css +1 -85
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +92 -395
- package/dist/collection/components/kup-drawer/kup-drawer.js +9 -10
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +12 -340
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +56 -45
- package/dist/collection/components/kup-field/kup-field.js +21 -22
- package/dist/collection/components/kup-gauge/kup-gauge.js +17 -18
- package/dist/collection/components/kup-grid/kup-grid.css +2 -1
- package/dist/collection/components/kup-grid/kup-grid.js +13 -14
- package/dist/collection/components/kup-iframe/kup-iframe.js +4 -4
- package/dist/collection/components/kup-image/assets/svg/ketchup.svg +74 -0
- package/dist/collection/components/kup-image/assets/svg/smeup.svg +59 -0
- package/dist/collection/components/kup-image/kup-image.css +0 -32
- package/dist/collection/components/kup-image/kup-image.js +25 -26
- package/dist/collection/components/kup-lazy/kup-lazy.js +17 -18
- package/dist/collection/components/kup-list/kup-list-declarations.js +1 -1
- package/dist/collection/components/kup-list/kup-list.css +4 -260
- package/dist/collection/components/kup-list/kup-list.js +39 -49
- package/dist/collection/components/kup-magic-box/kup-magic-box.css +13 -39
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +29 -38
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +11 -12
- package/dist/collection/components/kup-paginator/kup-paginator.css +0 -332
- package/dist/collection/components/kup-paginator/kup-paginator.js +44 -12
- package/dist/collection/components/kup-probe/kup-probe.js +9 -9
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +21 -22
- package/dist/collection/components/kup-radio/kup-radio.js +17 -18
- package/dist/collection/components/kup-rating/kup-rating.js +15 -16
- package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +75 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +390 -0
- package/dist/collection/components/kup-spinner/kup-spinner.js +23 -24
- package/dist/collection/components/kup-switch/kup-switch.css +0 -156
- package/dist/collection/components/kup-switch/kup-switch.js +17 -18
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +0 -199
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +13 -14
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
- package/dist/collection/components/kup-text-field/kup-text-field.css +4 -2371
- package/dist/collection/components/kup-text-field/kup-text-field.js +77 -51
- package/dist/collection/components/kup-time-picker/kup-time-picker.css +7 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +97 -317
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +24 -14
- package/dist/collection/components/kup-tree/kup-tree.css +27 -371
- package/dist/collection/components/kup-tree/kup-tree.js +163 -383
- package/dist/collection/f-components/f-button/f-button.js +4 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +143 -0
- package/dist/collection/f-components/f-cell/f-cell.js +471 -0
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -1
- package/dist/collection/f-components/f-chip/f-chip.js +2 -2
- package/dist/collection/f-components/f-image/f-image.js +2 -3
- package/dist/collection/f-components/f-switch/f-switch.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js +25 -21
- package/dist/collection/utils/cell-utils.js +18 -222
- package/dist/collection/utils/filters/filters.js +31 -37
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +15 -3
- package/dist/collection/utils/kup-dates/kup-dates.js +14 -2
- package/dist/collection/utils/kup-debug/kup-debug-browser-utils.js +3 -3
- package/dist/collection/utils/kup-debug/kup-debug.js +57 -29
- package/dist/collection/utils/kup-dynamic-position/kup-dynamic-position.js +5 -7
- package/dist/collection/utils/kup-interact/kup-interact-declarations.js +48 -0
- package/dist/collection/utils/kup-interact/kup-interact.js +379 -0
- package/dist/collection/utils/kup-language/kup-language-declarations.js +2 -0
- package/dist/collection/utils/kup-language/kup-language.js +1 -1
- package/dist/collection/utils/kup-manager/kup-manager.js +47 -10
- package/dist/collection/utils/kup-objects/kup-objects.js +9 -33
- package/dist/collection/utils/kup-scroll-on-hover/kup-scroll-on-hover.js +60 -62
- package/dist/collection/utils/kup-search/kup-search-declarations.js +1 -0
- package/dist/collection/utils/kup-search/kup-search.js +75 -0
- package/dist/collection/utils/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/utils/kup-theme/kup-theme.js +4 -3
- package/dist/collection/utils/kup-toolbar/kup-toolbar.js +16 -18
- package/dist/collection/utils/utils.js +15 -23
- package/dist/esm/cell-utils-8f512ea9.js +160 -0
- package/dist/esm/f-button-30dbcaa9.js +103 -0
- package/dist/esm/f-cell-95c186c6.js +727 -0
- package/dist/esm/f-chip-c0e9c0ff.js +139 -0
- package/dist/esm/{f-image-68b34fab.js → f-image-3bc8b24f.js} +4 -5
- package/dist/esm/{index-bf2824a6.js → index-e0e67c23.js} +74 -65
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +6 -8
- package/dist/esm/{kup-autocomplete_29.entry.js → kup-autocomplete_28.entry.js} +2379 -2858
- package/dist/esm/kup-calendar.entry.js +10 -10
- package/dist/esm/kup-cell.entry.js +197 -0
- package/dist/esm/kup-dash-list.entry.js +15 -7
- package/dist/esm/kup-dash_2.entry.js +104 -62
- package/dist/esm/kup-drawer.entry.js +4 -6
- package/dist/esm/kup-field.entry.js +3 -5
- package/dist/esm/kup-iframe.entry.js +3 -4
- package/dist/esm/kup-lazy.entry.js +4 -6
- package/dist/esm/kup-magic-box.entry.js +21 -31
- package/dist/esm/kup-manager-7fc234da.js +5800 -0
- package/dist/esm/kup-nav-bar.entry.js +4 -6
- package/dist/esm/kup-probe.entry.js +3 -4
- package/dist/esm/kup-qlik.entry.js +2 -3
- package/dist/esm/kup-snackbar.entry.js +148 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-13dd007a.js → utils-6c73709d.js} +15 -78
- package/dist/ketchup/assets/svg/ketchup.svg +74 -0
- package/dist/ketchup/assets/svg/smeup.svg +59 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-15321eae.js +1 -0
- package/dist/ketchup/p-1baf1205.entry.js +1 -0
- package/dist/ketchup/p-1c6178e4.entry.js +1 -0
- package/dist/ketchup/p-44375e49.js +1 -0
- package/dist/ketchup/p-4dcdbd31.entry.js +45 -0
- package/dist/ketchup/p-5a5f2a53.js +1 -0
- package/dist/ketchup/{p-c7ee1fbc.js → p-61faaa38.js} +2 -2
- package/dist/ketchup/p-62816d0b.entry.js +1 -0
- package/dist/ketchup/p-65adc15b.entry.js +1 -0
- package/dist/ketchup/p-7e23ea7c.entry.js +1 -0
- package/dist/ketchup/p-a378ba56.entry.js +1 -0
- package/dist/ketchup/p-a878016f.entry.js +1 -0
- package/dist/ketchup/p-a96e6e32.entry.js +1 -0
- package/dist/ketchup/p-ad32821e.entry.js +1 -0
- package/dist/ketchup/p-af4a6191.entry.js +1 -0
- package/dist/ketchup/p-c18c7bb0.entry.js +27 -0
- package/dist/ketchup/p-ca0ca27f.entry.js +1 -0
- package/dist/ketchup/p-cb5f4994.js +1 -0
- package/dist/ketchup/p-ccda584a.entry.js +1 -0
- package/dist/ketchup/p-d4aa4922.js +1 -0
- package/dist/ketchup/p-dbb6998b.entry.js +1 -0
- package/dist/ketchup/p-de83f2f6.js +1 -0
- package/dist/ketchup/p-ec3a3db9.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -6
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +7 -13
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +13 -4
- package/dist/types/components/kup-box/kup-box.d.ts +13 -6
- package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +14 -0
- package/dist/types/components/kup-card/builtin/kup-card-calendar.d.ts +2 -0
- package/dist/types/components/kup-card/builtin/kup-card-clock.d.ts +2 -0
- package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +6 -0
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +8 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +74 -0
- package/dist/types/components/kup-card/kup-card.d.ts +12 -3
- package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +6 -0
- package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -0
- package/dist/types/components/kup-cell/kup-cell.d.ts +67 -0
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +1 -1
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +3 -2
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +4 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +20 -36
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +1 -15
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +33 -83
- package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +11 -23
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -4
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +1 -1
- package/dist/types/components/kup-list/kup-list.d.ts +2 -3
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +1 -0
- package/dist/types/components/kup-paginator/kup-paginator.d.ts +6 -0
- package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -0
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +79 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +2 -1
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +10 -20
- package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +1 -0
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +4 -4
- package/dist/types/components/kup-tree/kup-tree.d.ts +12 -23
- package/dist/types/components.d.ts +348 -176
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +153 -0
- package/dist/types/f-components/f-cell/f-cell.d.ts +3 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +1 -1
- package/dist/types/utils/cell-utils.d.ts +0 -19
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +2 -0
- package/dist/types/utils/kup-dates/kup-dates.d.ts +9 -4
- package/dist/types/utils/kup-debug/kup-debug.d.ts +1 -1
- package/dist/types/utils/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -1
- package/dist/types/utils/kup-dynamic-position/kup-dynamic-position.d.ts +2 -2
- package/dist/types/utils/kup-interact/kup-interact-declarations.d.ts +127 -0
- package/dist/types/utils/kup-interact/kup-interact.d.ts +93 -0
- package/dist/types/utils/kup-language/kup-language-declarations.d.ts +2 -0
- package/dist/types/utils/kup-language/kup-language.d.ts +1 -1
- package/dist/types/utils/kup-manager/kup-manager-declarations.d.ts +28 -8
- package/dist/types/utils/kup-manager/kup-manager.d.ts +18 -5
- package/dist/types/utils/kup-objects/kup-objects.d.ts +1 -7
- package/dist/types/utils/kup-search/kup-search-declarations.d.ts +7 -0
- package/dist/types/utils/kup-search/kup-search.d.ts +20 -0
- package/dist/types/utils/kup-theme/kup-theme-declarations.d.ts +2 -0
- package/dist/types/utils/kup-theme/kup-theme.d.ts +2 -2
- package/dist/types/utils/utils.d.ts +0 -1
- package/package.json +4 -6
- package/dist/cjs/cell-utils-1f89a299.js +0 -1527
- package/dist/cjs/drag-and-drop-4787ff6f.js +0 -281
- package/dist/cjs/f-chip-2d58c8f7.js +0 -239
- package/dist/cjs/kup-grid.cjs.entry.js +0 -130
- package/dist/cjs/kup-manager-59ad8bdc.js +0 -4845
- package/dist/cjs/kup-objects-59ea949c.js +0 -717
- package/dist/collection/assets/images/drag-multiple.js +0 -1
- package/dist/collection/components/kup-editor/kup-editor.css +0 -5
- package/dist/collection/components/kup-editor/kup-editor.js +0 -59
- package/dist/collection/components/kup-layout/kup-layout.css +0 -53
- package/dist/collection/components/kup-layout/kup-layout.js +0 -156
- package/dist/collection/utils/drag-and-drop.js +0 -109
- package/dist/collection/utils/kup-dialog/kup-dialog-declarations.js +0 -36
- package/dist/collection/utils/kup-dialog/kup-dialog.js +0 -310
- package/dist/esm/cell-utils-cb612463.js +0 -1510
- package/dist/esm/drag-and-drop-321cb4ca.js +0 -265
- package/dist/esm/f-chip-125d5dd6.js +0 -236
- package/dist/esm/kup-grid.entry.js +0 -126
- package/dist/esm/kup-manager-e7d7b353.js +0 -4842
- package/dist/esm/kup-objects-d38d2fa2.js +0 -711
- package/dist/ketchup/p-00fe1e3e.js +0 -1
- package/dist/ketchup/p-0320e24e.entry.js +0 -1
- package/dist/ketchup/p-08c7a092.js +0 -1
- package/dist/ketchup/p-1165f4ea.entry.js +0 -1
- package/dist/ketchup/p-170d3cba.js +0 -1
- package/dist/ketchup/p-18cb3ba3.js +0 -1
- package/dist/ketchup/p-23541a97.entry.js +0 -45
- package/dist/ketchup/p-64ea7e37.entry.js +0 -1
- package/dist/ketchup/p-7896031c.entry.js +0 -1
- package/dist/ketchup/p-876da4c2.entry.js +0 -1
- package/dist/ketchup/p-8fb9d9b2.entry.js +0 -1
- package/dist/ketchup/p-940ab57a.entry.js +0 -1
- package/dist/ketchup/p-9c858a38.entry.js +0 -1
- package/dist/ketchup/p-a12a5690.entry.js +0 -1
- package/dist/ketchup/p-a5424073.js +0 -1
- package/dist/ketchup/p-b0724035.entry.js +0 -1
- package/dist/ketchup/p-b14e77f0.js +0 -1
- package/dist/ketchup/p-d24cfdea.entry.js +0 -1
- package/dist/ketchup/p-ee89966f.entry.js +0 -27
- package/dist/ketchup/p-fcd2fd8f.js +0 -1
- package/dist/ketchup/p-fce3b9d8.entry.js +0 -1
- package/dist/types/assets/images/drag-multiple.d.ts +0 -1
- package/dist/types/components/kup-editor/kup-editor.d.ts +0 -16
- package/dist/types/components/kup-layout/kup-layout.d.ts +0 -25
- package/dist/types/utils/drag-and-drop.d.ts +0 -53
- package/dist/types/utils/kup-dialog/kup-dialog-declarations.d.ts +0 -43
- package/dist/types/utils/kup-dialog/kup-dialog.d.ts +0 -50
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Component, Element, Event, forceUpdate, h, Host, Method, Prop, } from '@stencil/core';
|
|
2
2
|
import { MDCRipple } from '@material/ripple';
|
|
3
|
+
import * as builtinLayouts from './builtin/kup-card-builtin';
|
|
3
4
|
import * as collapsibleLayouts from './collapsible/kup-card-collapsible';
|
|
4
5
|
import * as dialogLayouts from './dialog/kup-card-dialog';
|
|
6
|
+
import * as freeLayouts from './free/kup-card-free';
|
|
5
7
|
import * as scalableLayouts from './scalable/kup-card-scalable';
|
|
6
8
|
import * as standardLayouts from './standard/kup-card-standard';
|
|
7
9
|
import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
|
|
@@ -79,12 +81,20 @@ export class KupCard {
|
|
|
79
81
|
*/
|
|
80
82
|
this.scalingActive = false;
|
|
81
83
|
}
|
|
82
|
-
onKupClick(id) {
|
|
84
|
+
onKupClick(id, value) {
|
|
83
85
|
this.kupClick.emit({
|
|
84
86
|
comp: this,
|
|
85
87
|
id: id,
|
|
88
|
+
value: value,
|
|
86
89
|
});
|
|
87
90
|
}
|
|
91
|
+
onKupClose(id) {
|
|
92
|
+
this.kupClose.emit({
|
|
93
|
+
comp: this,
|
|
94
|
+
id: id,
|
|
95
|
+
});
|
|
96
|
+
this.rootElement.remove();
|
|
97
|
+
}
|
|
88
98
|
onKupEvent(e) {
|
|
89
99
|
layoutSpecificEvents(this, e);
|
|
90
100
|
this.kupEvent.emit({
|
|
@@ -138,7 +148,7 @@ export class KupCard {
|
|
|
138
148
|
// The dialog "X" button.
|
|
139
149
|
const dialogClose = root.querySelector('#' + KupCardIds.DIALOG_CLOSE);
|
|
140
150
|
if (dialogClose) {
|
|
141
|
-
dialogClose.onclick = () => this.
|
|
151
|
+
dialogClose.onclick = () => this.onKupClose(KupCardIds.DIALOG_CLOSE);
|
|
142
152
|
}
|
|
143
153
|
// When an element can be clicked. Ideally anchors/links.
|
|
144
154
|
const links = root.querySelectorAll('.' + KupCardCSSClasses.CLICKABLE_LINK);
|
|
@@ -146,7 +156,7 @@ export class KupCard {
|
|
|
146
156
|
const link = links[index];
|
|
147
157
|
link.onclick = (e) => {
|
|
148
158
|
e.stopPropagation();
|
|
149
|
-
this.onKupClick(link.id);
|
|
159
|
+
this.onKupClick(link.id, null);
|
|
150
160
|
};
|
|
151
161
|
}
|
|
152
162
|
}
|
|
@@ -182,12 +192,18 @@ export class KupCard {
|
|
|
182
192
|
const method = 'create' + this.layoutNumber;
|
|
183
193
|
try {
|
|
184
194
|
switch (family) {
|
|
195
|
+
case KupCardFamily.BUILTIN: {
|
|
196
|
+
return builtinLayouts[method](this);
|
|
197
|
+
}
|
|
185
198
|
case KupCardFamily.COLLAPSIBLE: {
|
|
186
199
|
return collapsibleLayouts[method](this);
|
|
187
200
|
}
|
|
188
201
|
case KupCardFamily.DIALOG: {
|
|
189
202
|
return dialogLayouts[method](this);
|
|
190
203
|
}
|
|
204
|
+
case KupCardFamily.FREE: {
|
|
205
|
+
return freeLayouts[method](this);
|
|
206
|
+
}
|
|
191
207
|
case KupCardFamily.SCALABLE: {
|
|
192
208
|
return scalableLayouts[method](this);
|
|
193
209
|
}
|
|
@@ -216,8 +232,8 @@ export class KupCard {
|
|
|
216
232
|
const card = this.rootElement;
|
|
217
233
|
const dragHandle = root.querySelector('#' + KupCardIds.DRAG_HANDLE);
|
|
218
234
|
const unresizable = !!root.querySelector('.' + KupCardCSSClasses.DIALOG_UNRESIZABLE);
|
|
219
|
-
if (!this.kupManager.
|
|
220
|
-
this.kupManager.
|
|
235
|
+
if (!this.kupManager.interact.isRegistered(card)) {
|
|
236
|
+
this.kupManager.interact.dialogify(card, dragHandle ? dragHandle : null, unresizable);
|
|
221
237
|
}
|
|
222
238
|
}
|
|
223
239
|
}
|
|
@@ -267,6 +283,7 @@ export class KupCard {
|
|
|
267
283
|
root.addEventListener('kup-chip-iconclick', this.cardEvent);
|
|
268
284
|
root.addEventListener('kup-combobox-itemclick', this.cardEvent);
|
|
269
285
|
root.addEventListener('kup-datatable-cellupdate', this.cardEvent);
|
|
286
|
+
root.addEventListener('kup-datatable-rowselected', this.cardEvent);
|
|
270
287
|
root.addEventListener('kup-datepicker-cleariconclick', this.cardEvent);
|
|
271
288
|
root.addEventListener('kup-datepicker-input', this.cardEvent);
|
|
272
289
|
root.addEventListener('kup-datepicker-itemclick', this.cardEvent);
|
|
@@ -358,6 +375,10 @@ export class KupCard {
|
|
|
358
375
|
MDCRipple.attachTo(rippleEl);
|
|
359
376
|
}
|
|
360
377
|
this.kupManager.resize.observe(this.rootElement);
|
|
378
|
+
this.kupReady.emit({
|
|
379
|
+
comp: this,
|
|
380
|
+
id: this.rootElement.id,
|
|
381
|
+
});
|
|
361
382
|
this.kupManager.debug.logLoad(this, true);
|
|
362
383
|
}
|
|
363
384
|
componentWillRender() {
|
|
@@ -377,23 +398,22 @@ export class KupCard {
|
|
|
377
398
|
this.kupManager.debug.logRender(this, true);
|
|
378
399
|
}
|
|
379
400
|
render() {
|
|
380
|
-
if (!this.data) {
|
|
401
|
+
if (!this.data && this.rootElement.children.length < 1) {
|
|
381
402
|
return;
|
|
382
403
|
}
|
|
383
404
|
const style = {
|
|
384
405
|
'--kup_card_height': this.sizeY ? this.sizeY : '100%',
|
|
385
406
|
'--kup_card_width': this.sizeX ? this.sizeX : '100%',
|
|
386
407
|
};
|
|
387
|
-
const customStyle = this.kupManager.theme.setCustomStyle(this.rootElement);
|
|
388
408
|
return (h(Host, { style: style },
|
|
389
|
-
|
|
390
|
-
h("div", { id: componentWrapperId, onClick: () => this.onKupClick(null) }, this.getLayout())));
|
|
409
|
+
h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
|
|
410
|
+
h("div", { id: componentWrapperId, onClick: () => this.onKupClick(null, null) }, this.getLayout())));
|
|
391
411
|
}
|
|
392
412
|
disconnectedCallback() {
|
|
413
|
+
this.kupManager.interact.unregister([this.rootElement]);
|
|
393
414
|
this.kupManager.language.unregister(this);
|
|
394
|
-
this.kupManager.theme.unregister(this);
|
|
395
|
-
this.kupManager.dialog.unregister([this.rootElement]);
|
|
396
415
|
this.kupManager.resize.unobserve(this.rootElement);
|
|
416
|
+
this.kupManager.theme.unregister(this);
|
|
397
417
|
}
|
|
398
418
|
static get is() { return "kup-card"; }
|
|
399
419
|
static get encapsulation() { return "shadow"; }
|
|
@@ -416,11 +436,11 @@ export class KupCard {
|
|
|
416
436
|
"optional": false,
|
|
417
437
|
"docs": {
|
|
418
438
|
"tags": [{
|
|
419
|
-
"
|
|
420
|
-
"
|
|
439
|
+
"name": "default",
|
|
440
|
+
"text": "\"\""
|
|
421
441
|
}, {
|
|
422
|
-
"
|
|
423
|
-
"
|
|
442
|
+
"name": "see",
|
|
443
|
+
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
424
444
|
}],
|
|
425
445
|
"text": "Custom style of the component."
|
|
426
446
|
},
|
|
@@ -445,8 +465,8 @@ export class KupCard {
|
|
|
445
465
|
"optional": false,
|
|
446
466
|
"docs": {
|
|
447
467
|
"tags": [{
|
|
448
|
-
"
|
|
449
|
-
"
|
|
468
|
+
"name": "default",
|
|
469
|
+
"text": "null"
|
|
450
470
|
}],
|
|
451
471
|
"text": "The actual data of the card."
|
|
452
472
|
},
|
|
@@ -464,8 +484,8 @@ export class KupCard {
|
|
|
464
484
|
"optional": false,
|
|
465
485
|
"docs": {
|
|
466
486
|
"tags": [{
|
|
467
|
-
"
|
|
468
|
-
"
|
|
487
|
+
"name": "default",
|
|
488
|
+
"text": "false"
|
|
469
489
|
}],
|
|
470
490
|
"text": "Defines whether the card is a menu or not.\nWorks together with menuVisible."
|
|
471
491
|
},
|
|
@@ -478,7 +498,7 @@ export class KupCard {
|
|
|
478
498
|
"mutable": false,
|
|
479
499
|
"complexType": {
|
|
480
500
|
"original": "KupCardFamily",
|
|
481
|
-
"resolved": "KupCardFamily.COLLAPSIBLE | KupCardFamily.DIALOG | KupCardFamily.SCALABLE | KupCardFamily.STANDARD",
|
|
501
|
+
"resolved": "KupCardFamily.BUILTIN | KupCardFamily.COLLAPSIBLE | KupCardFamily.DIALOG | KupCardFamily.FREE | KupCardFamily.SCALABLE | KupCardFamily.STANDARD",
|
|
482
502
|
"references": {
|
|
483
503
|
"KupCardFamily": {
|
|
484
504
|
"location": "import",
|
|
@@ -490,8 +510,8 @@ export class KupCard {
|
|
|
490
510
|
"optional": false,
|
|
491
511
|
"docs": {
|
|
492
512
|
"tags": [{
|
|
493
|
-
"
|
|
494
|
-
"
|
|
513
|
+
"name": "default",
|
|
514
|
+
"text": "KupCardFamily.STANDARD"
|
|
495
515
|
}],
|
|
496
516
|
"text": "Sets the type of the card."
|
|
497
517
|
},
|
|
@@ -511,8 +531,8 @@ export class KupCard {
|
|
|
511
531
|
"optional": false,
|
|
512
532
|
"docs": {
|
|
513
533
|
"tags": [{
|
|
514
|
-
"
|
|
515
|
-
"
|
|
534
|
+
"name": "default",
|
|
535
|
+
"text": "1"
|
|
516
536
|
}],
|
|
517
537
|
"text": "Sets the number of the layout."
|
|
518
538
|
},
|
|
@@ -532,8 +552,8 @@ export class KupCard {
|
|
|
532
552
|
"optional": false,
|
|
533
553
|
"docs": {
|
|
534
554
|
"tags": [{
|
|
535
|
-
"
|
|
536
|
-
"
|
|
555
|
+
"name": "default",
|
|
556
|
+
"text": "false"
|
|
537
557
|
}],
|
|
538
558
|
"text": "Sets the status of the card as menu, when false it's hidden otherwise it's visible.\nWorks together with isMenu."
|
|
539
559
|
},
|
|
@@ -553,8 +573,8 @@ export class KupCard {
|
|
|
553
573
|
"optional": false,
|
|
554
574
|
"docs": {
|
|
555
575
|
"tags": [{
|
|
556
|
-
"
|
|
557
|
-
"
|
|
576
|
+
"name": "default",
|
|
577
|
+
"text": "\"100%\""
|
|
558
578
|
}],
|
|
559
579
|
"text": "The width of the card, defaults to 100%. Accepts any valid CSS format (px, %, vw, etc.)."
|
|
560
580
|
},
|
|
@@ -574,8 +594,8 @@ export class KupCard {
|
|
|
574
594
|
"optional": false,
|
|
575
595
|
"docs": {
|
|
576
596
|
"tags": [{
|
|
577
|
-
"
|
|
578
|
-
"
|
|
597
|
+
"name": "default",
|
|
598
|
+
"text": "\"100%\""
|
|
579
599
|
}],
|
|
580
600
|
"text": "The height of the card, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.)."
|
|
581
601
|
},
|
|
@@ -594,6 +614,26 @@ export class KupCard {
|
|
|
594
614
|
"tags": [],
|
|
595
615
|
"text": "Triggered when the card is clicked."
|
|
596
616
|
},
|
|
617
|
+
"complexType": {
|
|
618
|
+
"original": "KupCardClickPayload",
|
|
619
|
+
"resolved": "KupCardClickPayload",
|
|
620
|
+
"references": {
|
|
621
|
+
"KupCardClickPayload": {
|
|
622
|
+
"location": "import",
|
|
623
|
+
"path": "./kup-card-declarations"
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}, {
|
|
628
|
+
"method": "kupClose",
|
|
629
|
+
"name": "kup-card-close",
|
|
630
|
+
"bubbles": true,
|
|
631
|
+
"cancelable": false,
|
|
632
|
+
"composed": true,
|
|
633
|
+
"docs": {
|
|
634
|
+
"tags": [],
|
|
635
|
+
"text": "Triggered when a dialog card is closed with the \"X\"."
|
|
636
|
+
},
|
|
597
637
|
"complexType": {
|
|
598
638
|
"original": "KupEventPayload",
|
|
599
639
|
"resolved": "KupEventPayload",
|
|
@@ -624,6 +664,26 @@ export class KupCard {
|
|
|
624
664
|
}
|
|
625
665
|
}
|
|
626
666
|
}
|
|
667
|
+
}, {
|
|
668
|
+
"method": "kupReady",
|
|
669
|
+
"name": "kup-card-ready",
|
|
670
|
+
"bubbles": true,
|
|
671
|
+
"cancelable": false,
|
|
672
|
+
"composed": true,
|
|
673
|
+
"docs": {
|
|
674
|
+
"tags": [],
|
|
675
|
+
"text": "Triggered when the component is ready."
|
|
676
|
+
},
|
|
677
|
+
"complexType": {
|
|
678
|
+
"original": "KupEventPayload",
|
|
679
|
+
"resolved": "KupEventPayload",
|
|
680
|
+
"references": {
|
|
681
|
+
"KupEventPayload": {
|
|
682
|
+
"location": "import",
|
|
683
|
+
"path": "../../types/GenericTypes"
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
627
687
|
}]; }
|
|
628
688
|
static get methods() { return {
|
|
629
689
|
"getProps": {
|
|
@@ -631,8 +691,8 @@ export class KupCard {
|
|
|
631
691
|
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
632
692
|
"parameters": [{
|
|
633
693
|
"tags": [{
|
|
634
|
-
"
|
|
635
|
-
"
|
|
694
|
+
"name": "param",
|
|
695
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
636
696
|
}],
|
|
637
697
|
"text": "- When provided and true, the result will be the list of props with their description."
|
|
638
698
|
}],
|
|
@@ -695,8 +755,8 @@ export class KupCard {
|
|
|
695
755
|
"signature": "(props: GenericObject) => Promise<void>",
|
|
696
756
|
"parameters": [{
|
|
697
757
|
"tags": [{
|
|
698
|
-
"
|
|
699
|
-
"
|
|
758
|
+
"name": "param",
|
|
759
|
+
"text": "props - Object containing props that will be set to the component."
|
|
700
760
|
}],
|
|
701
761
|
"text": "- Object containing props that will be set to the component."
|
|
702
762
|
}],
|
|
@@ -675,3 +675,78 @@ export function create14(component) {
|
|
|
675
675
|
: null),
|
|
676
676
|
h("div", { class: "sub-switch" }, switchesIds.includes(KupColumnMenuIds.SWITCH_KEY) ? (h("kup-switch", Object.assign({}, switchArray.find((x) => x.id === KupColumnMenuIds.SWITCH_KEY)))) : null))) : null)));
|
|
677
677
|
}
|
|
678
|
+
/**
|
|
679
|
+
* 15th standard card layout, it can be used as a tooltip.
|
|
680
|
+
* @param {KupCard} component - Card component.
|
|
681
|
+
* @returns {VNode} 15th standard layout virtual node.
|
|
682
|
+
*/
|
|
683
|
+
export function create15(component) {
|
|
684
|
+
const buttonArray = component.data['button']
|
|
685
|
+
? component.data['button']
|
|
686
|
+
: [];
|
|
687
|
+
const imageArray = component.data['image']
|
|
688
|
+
? component.data['image']
|
|
689
|
+
: [];
|
|
690
|
+
const textArray = component.data['text']
|
|
691
|
+
? component.data['text']
|
|
692
|
+
: [];
|
|
693
|
+
const treeArray = component.data['tree']
|
|
694
|
+
? component.data['tree']
|
|
695
|
+
: [];
|
|
696
|
+
// Setting up currently visible view.
|
|
697
|
+
const viewIndex = 1;
|
|
698
|
+
const sectionOneArray = textArray.slice(0, 5);
|
|
699
|
+
// Setting up section 2
|
|
700
|
+
const sectionTwoArray = textArray.slice(5);
|
|
701
|
+
const sectionTwoDetails = [];
|
|
702
|
+
const labels = [];
|
|
703
|
+
const values = [];
|
|
704
|
+
for (let index = 0; index < sectionTwoArray.length; index++) {
|
|
705
|
+
if (index % 2 === 0) {
|
|
706
|
+
labels.push(sectionTwoArray[index]);
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
values.push(sectionTwoArray[index]);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
for (let index = 0; index < labels.length; index++) {
|
|
713
|
+
sectionTwoDetails.push(h("div", { class: "detail-row" },
|
|
714
|
+
h("div", { class: "detail-row__label ellipsis" }, labels[index]),
|
|
715
|
+
h("div", { class: "detail-row__value ellipsis" }, values[index])));
|
|
716
|
+
}
|
|
717
|
+
// Setting up buttons.
|
|
718
|
+
const buttonsIds = [];
|
|
719
|
+
for (let index = 0; index < buttonArray.length; index++) {
|
|
720
|
+
const button = buttonArray[index];
|
|
721
|
+
if (button['id']) {
|
|
722
|
+
buttonsIds.push(button['id']);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
return (h("div", { class: `standard-layout-${component.layoutNumber}` },
|
|
726
|
+
h("div", { class: "section-1" },
|
|
727
|
+
imageArray[0] ? (h(FImage, Object.assign({ id: "image1" }, imageArray[0], { sizeX: "84px", sizeY: "84px" }))) : (h("div", { class: "sub-spinner" },
|
|
728
|
+
h("kup-spinner", { active: true, dimensions: "7px", layout: 14 }))),
|
|
729
|
+
h("div", { class: "sub-1" },
|
|
730
|
+
textArray[0] ? (h("div", { class: "title" },
|
|
731
|
+
h("span", { class: `label ${KupCardCSSClasses.CLICKABLE_LINK}`, id: "title-link" }, textArray[0]),
|
|
732
|
+
buttonsIds.includes(KupColumnMenuIds.BUTTON_OPEN_IN_NEW) ? (h("kup-button", Object.assign({}, buttonArray.find((x) => x.id ===
|
|
733
|
+
KupColumnMenuIds.BUTTON_OPEN_IN_NEW)))) : null,
|
|
734
|
+
buttonsIds.includes(KupColumnMenuIds.BUTTON_SEARCH) ? (h("kup-button", Object.assign({}, buttonArray.find((x) => x.id ===
|
|
735
|
+
KupColumnMenuIds.BUTTON_SEARCH)))) : null)) : null,
|
|
736
|
+
sectionOneArray[1] && sectionOneArray[2] ? (h("div", { class: "info" },
|
|
737
|
+
h("span", { class: "label" }, sectionOneArray[1]),
|
|
738
|
+
h("span", { class: "value" }, sectionOneArray[2]))) : null,
|
|
739
|
+
sectionOneArray[3] && sectionOneArray[4] ? (h("div", { class: "info" },
|
|
740
|
+
h("span", { class: "label" }, sectionOneArray[3]),
|
|
741
|
+
h("span", { class: "value" }, sectionOneArray[4]))) : null)),
|
|
742
|
+
h("div", { class: "section-2" },
|
|
743
|
+
h("div", { class: `${KupCardCSSClasses.CARD_VIEW} ${KupCardCSSClasses.VIEW_PREFIX}${viewIndex} ${KupCardCSSClasses.VISIBLE}` },
|
|
744
|
+
h("div", { class: "info" }, sectionTwoDetails.length > 0
|
|
745
|
+
? sectionTwoDetails
|
|
746
|
+
: null)),
|
|
747
|
+
h("div", { class: `${KupCardCSSClasses.CARD_VIEW} ${KupCardCSSClasses.VIEW_PREFIX}${viewIndex + 1}` },
|
|
748
|
+
h("kup-tree", Object.assign({ class: "kup-full-width" }, treeArray[0])))),
|
|
749
|
+
buttonArray.length > 0 ? (h("div", { class: "section-3" },
|
|
750
|
+
compList(buttonArray.slice(0, 4), 'button'),
|
|
751
|
+
h("kup-button", { id: "view-selector", icon: "menu" }))) : null));
|
|
752
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props of the kup-cell component.
|
|
3
|
+
* Used to export every prop in an object.
|
|
4
|
+
*/
|
|
5
|
+
export var KupCellProps;
|
|
6
|
+
(function (KupCellProps) {
|
|
7
|
+
KupCellProps["customStyle"] = "Custom style of the component.";
|
|
8
|
+
KupCellProps["data"] = "The data of the cell.";
|
|
9
|
+
KupCellProps["density"] = "The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.";
|
|
10
|
+
KupCellProps["dragEnabled"] = "When set to true, the component is draggable.";
|
|
11
|
+
})(KupCellProps || (KupCellProps = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --kup-cell-background: Sets the background of the cell.
|
|
3
|
+
* @prop --kup-cell-font-family: Sets the font family of the cell.
|
|
4
|
+
* @prop --kup-cell-font-family-monospace: Sets the monospace font family of the cell (for numbers).
|
|
5
|
+
* @prop --kup-cell-font-size: Sets the font size of the cell.
|
|
6
|
+
* @prop --kup-cell-text-color: Sets the text color of the cell.
|
|
7
|
+
*
|
|
8
|
+
* NOTE: These variables are defined in the "kup-theme.css" file, because they must work even without the kup component (it's a functional component)
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#kup-component {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|