@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,12 +1,13 @@
|
|
|
1
1
|
import { Component, Element, Event, forceUpdate, h, Host, Listen, Method, Prop, State, Watch, } from '@stencil/core';
|
|
2
2
|
import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
|
|
3
3
|
import { isValidFormattedStringTime, formattedStringToCustomUnformattedStringTime, unformattedStringToFormattedStringTime, formatTime, getProps, setProps, } from '../../utils/utils';
|
|
4
|
-
import { FButtonStyling } from '../../f-components/f-button/f-button-declarations';
|
|
5
|
-
import { kupDynamicPositionAttribute, } from '../../utils/kup-dynamic-position/kup-dynamic-position-declarations';
|
|
6
4
|
import { KupTimePickerProps, } from './kup-time-picker-declarations';
|
|
7
5
|
import { KupDebugCategory } from '../../utils/kup-debug/kup-debug-declarations';
|
|
8
6
|
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
9
7
|
import { KupDatesFormats } from '../../utils/kup-dates/kup-dates-declarations';
|
|
8
|
+
import { FTextField } from '../../f-components/f-text-field/f-text-field';
|
|
9
|
+
import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
|
|
10
|
+
import { KupDynamicPositionPlacement } from '../../utils/kup-dynamic-position/kup-dynamic-position-declarations';
|
|
10
11
|
export class KupTimePicker {
|
|
11
12
|
constructor() {
|
|
12
13
|
/*-------------------------------------------------*/
|
|
@@ -68,14 +69,13 @@ export class KupTimePicker {
|
|
|
68
69
|
this.hoursActive = true;
|
|
69
70
|
this.minutesActive = false;
|
|
70
71
|
this.secondsActive = false;
|
|
72
|
+
this.textFieldContainerEl = undefined;
|
|
71
73
|
this.textfieldEl = undefined;
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.pickerOpened = false;
|
|
74
|
+
this.pickerKupEl = undefined;
|
|
75
|
+
this.clickCb = null;
|
|
75
76
|
}
|
|
76
77
|
onKupTimePickerItemClick(e, value) {
|
|
77
78
|
if (e != null) {
|
|
78
|
-
e.stopPropagation();
|
|
79
79
|
if (value == null) {
|
|
80
80
|
value = e.detail.selected.value;
|
|
81
81
|
}
|
|
@@ -91,9 +91,9 @@ export class KupTimePicker {
|
|
|
91
91
|
id: this.rootElement.id,
|
|
92
92
|
value: this.value,
|
|
93
93
|
});
|
|
94
|
+
this.setFocus();
|
|
94
95
|
}
|
|
95
|
-
onKupClearIconClick(
|
|
96
|
-
e.stopPropagation();
|
|
96
|
+
onKupClearIconClick() {
|
|
97
97
|
this.setPickerValueSelected('');
|
|
98
98
|
this.kupChange.emit({
|
|
99
99
|
comp: this,
|
|
@@ -113,29 +113,17 @@ export class KupTimePicker {
|
|
|
113
113
|
value: this.value,
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
onKupTextFieldBlur(e) {
|
|
117
|
-
const eventValue = e.detail.value;
|
|
118
|
-
if (eventValue) {
|
|
119
|
-
const newValue = this.getFormattedValue(eventValue);
|
|
120
|
-
if (newValue) {
|
|
121
|
-
this.setValue(newValue);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
116
|
onKupChange(e) {
|
|
126
|
-
e.
|
|
127
|
-
this.refreshPickerValue(e.detail.value, this.kupChange);
|
|
117
|
+
this.refreshPickerValue(e.target.value, this.kupChange);
|
|
128
118
|
}
|
|
129
|
-
onKupClick(
|
|
130
|
-
e.stopPropagation();
|
|
119
|
+
onKupClick() {
|
|
131
120
|
this.kupClick.emit({
|
|
132
121
|
comp: this,
|
|
133
122
|
id: this.rootElement.id,
|
|
134
123
|
value: this.value,
|
|
135
124
|
});
|
|
136
125
|
}
|
|
137
|
-
onKupFocus(
|
|
138
|
-
e.stopPropagation();
|
|
126
|
+
onKupFocus() {
|
|
139
127
|
this.kupFocus.emit({
|
|
140
128
|
comp: this,
|
|
141
129
|
id: this.rootElement.id,
|
|
@@ -143,15 +131,12 @@ export class KupTimePicker {
|
|
|
143
131
|
});
|
|
144
132
|
}
|
|
145
133
|
onKupInput(e) {
|
|
146
|
-
e.
|
|
147
|
-
this.refreshPickerValue(e.detail.value, this.kupInput);
|
|
134
|
+
this.refreshPickerValue(e.target.value, this.kupInput);
|
|
148
135
|
}
|
|
149
136
|
onKupTextFieldSubmit(e) {
|
|
150
|
-
e.
|
|
151
|
-
this.refreshPickerValue(e.detail.value, this.kupTextFieldSubmit);
|
|
137
|
+
this.refreshPickerValue(e.target.value, this.kupTextFieldSubmit);
|
|
152
138
|
}
|
|
153
|
-
onKupIconClick(
|
|
154
|
-
e.stopPropagation();
|
|
139
|
+
onKupIconClick() {
|
|
155
140
|
if (this.isPickerOpened()) {
|
|
156
141
|
this.closePicker();
|
|
157
142
|
}
|
|
@@ -173,7 +158,6 @@ export class KupTimePicker {
|
|
|
173
158
|
this.closePicker();
|
|
174
159
|
}
|
|
175
160
|
if (e.key === 'Enter') {
|
|
176
|
-
e.stopPropagation();
|
|
177
161
|
this.onKupTimePickerItemClick(null);
|
|
178
162
|
}
|
|
179
163
|
}
|
|
@@ -229,7 +213,7 @@ export class KupTimePicker {
|
|
|
229
213
|
*/
|
|
230
214
|
async setFocus() {
|
|
231
215
|
if (this.textfieldEl != null) {
|
|
232
|
-
this.textfieldEl.
|
|
216
|
+
this.textfieldEl.focus();
|
|
233
217
|
}
|
|
234
218
|
}
|
|
235
219
|
/**
|
|
@@ -244,7 +228,6 @@ export class KupTimePicker {
|
|
|
244
228
|
*/
|
|
245
229
|
async setValue(value) {
|
|
246
230
|
this.value = value;
|
|
247
|
-
this.setTextFieldInitalValue(this.getTimeForOutput());
|
|
248
231
|
}
|
|
249
232
|
/*-------------------------------------------------*/
|
|
250
233
|
/* P r i v a t e M e t h o d s */
|
|
@@ -259,7 +242,6 @@ export class KupTimePicker {
|
|
|
259
242
|
if (isValidFormattedStringTime(eventDetailValue, this.manageSeconds)) {
|
|
260
243
|
this.value = eventDetailValue;
|
|
261
244
|
newValue = this.value;
|
|
262
|
-
this.setTextFieldInitalValue(this.getTimeForOutput());
|
|
263
245
|
}
|
|
264
246
|
if (newValue != null) {
|
|
265
247
|
eventToRaise.emit({
|
|
@@ -284,76 +266,69 @@ export class KupTimePicker {
|
|
|
284
266
|
return;
|
|
285
267
|
}
|
|
286
268
|
this.value = newValue;
|
|
287
|
-
this.setTextFieldInitalValue(this.getTimeForOutput());
|
|
288
269
|
}
|
|
289
270
|
getPickerValueSelected() {
|
|
290
271
|
return this.value;
|
|
291
272
|
}
|
|
292
|
-
setTextFieldInitalValue(value) {
|
|
293
|
-
if (this.textfieldEl !== undefined) {
|
|
294
|
-
this.textfieldEl.setValue(value);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
273
|
getValueForPickerComponent() {
|
|
298
274
|
return this.value;
|
|
299
275
|
}
|
|
300
276
|
openPicker() {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
this.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
textFieldWidth =
|
|
308
|
-
textfieldEl.shadowRoot.querySelector('.mdc-text-field').clientWidth;
|
|
309
|
-
textfieldEl.classList.add('toggled');
|
|
310
|
-
textfieldEl.emitSubmitEventOnEnter = false;
|
|
277
|
+
const elStyle = this.pickerKupEl.style;
|
|
278
|
+
elStyle.height = 'auto';
|
|
279
|
+
elStyle.minWidth = this.textFieldContainerEl.clientWidth + 'px';
|
|
280
|
+
this.pickerKupEl.menuVisible = true;
|
|
281
|
+
if (this.textfieldEl != null) {
|
|
282
|
+
this.textfieldEl.classList.add('toggled');
|
|
311
283
|
}
|
|
312
|
-
if (
|
|
313
|
-
this.kupManager.dynamicPosition.
|
|
314
|
-
containerEl.classList.add('visible');
|
|
315
|
-
let elStyle = containerEl.style;
|
|
316
|
-
elStyle.height = 'auto';
|
|
317
|
-
if (textFieldWidth != null) {
|
|
318
|
-
elStyle.minWidth = textFieldWidth + 'px';
|
|
319
|
-
}
|
|
284
|
+
if (this.kupManager.dynamicPosition.isRegistered(this.pickerKupEl)) {
|
|
285
|
+
this.kupManager.dynamicPosition.changeAnchor(this.pickerKupEl, this.textFieldContainerEl);
|
|
320
286
|
}
|
|
321
|
-
|
|
287
|
+
else {
|
|
288
|
+
this.kupManager.dynamicPosition.register(this.pickerKupEl, this.textFieldContainerEl, 0, KupDynamicPositionPlacement.AUTO, true);
|
|
289
|
+
}
|
|
290
|
+
this.kupManager.dynamicPosition.start(this.pickerKupEl);
|
|
291
|
+
if (!this.clickCb) {
|
|
292
|
+
this.clickCb = {
|
|
293
|
+
cb: () => {
|
|
294
|
+
this.closePicker();
|
|
295
|
+
},
|
|
296
|
+
el: this.pickerKupEl,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
this.kupManager.addClickCallback(this.clickCb, true);
|
|
322
300
|
}
|
|
323
301
|
closePicker() {
|
|
302
|
+
this.pickerKupEl.menuVisible = false;
|
|
303
|
+
this.kupManager.removeClickCallback(this.clickCb);
|
|
324
304
|
let textfieldEl = this.textfieldEl;
|
|
325
|
-
let containerEl = this.pickerContainerEl;
|
|
326
|
-
this.pickerOpened = false;
|
|
327
305
|
if (textfieldEl != null) {
|
|
328
306
|
textfieldEl.classList.remove('toggled');
|
|
329
|
-
textfieldEl.emitSubmitEventOnEnter = true;
|
|
330
|
-
}
|
|
331
|
-
if (containerEl != null) {
|
|
332
|
-
this.kupManager.dynamicPosition.stop(containerEl);
|
|
333
|
-
containerEl.classList.remove('visible');
|
|
334
307
|
}
|
|
308
|
+
this.pickerKupEl.menuVisible = false;
|
|
309
|
+
this.kupManager.dynamicPosition.stop(this.pickerKupEl);
|
|
310
|
+
this.kupManager.removeClickCallback(this.clickCb);
|
|
335
311
|
}
|
|
336
312
|
isPickerOpened() {
|
|
337
|
-
return this.
|
|
313
|
+
return this.pickerKupEl.menuVisible == true;
|
|
338
314
|
}
|
|
339
315
|
getTextFieldId() {
|
|
340
316
|
return this.textfieldEl.id;
|
|
341
317
|
}
|
|
342
318
|
getPickerElId() {
|
|
343
|
-
return this.
|
|
344
|
-
}
|
|
345
|
-
prepTimeTextfield() {
|
|
346
|
-
return this.prepTextfield(this.getTimeForOutput());
|
|
319
|
+
return this.pickerKupEl.id;
|
|
347
320
|
}
|
|
348
321
|
prepTextfield(initialValue) {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
322
|
+
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
323
|
+
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
324
|
+
const textfieldData = Object.assign({}, this.data['kup-text-field']);
|
|
325
|
+
if (!textfieldData.icon) {
|
|
326
|
+
textfieldData.icon = 'access_time';
|
|
352
327
|
}
|
|
353
|
-
if (textfieldData
|
|
354
|
-
textfieldData
|
|
328
|
+
if (textfieldData.icon) {
|
|
329
|
+
textfieldData.trailingIcon = true;
|
|
355
330
|
}
|
|
356
|
-
let comp = (h(
|
|
331
|
+
let comp = (h(FTextField, Object.assign({}, textfieldData, { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, id: this.rootElement.id + '_text-field', value: initialValue, onChange: (e) => this.onKupChange(e), onClick: () => this.onKupClick(), onFocus: () => this.onKupFocus(), onInput: (e) => this.onKupInput(e), onIconClick: () => this.onKupIconClick(), onKeyDown: (e) => this.onKupTextFieldSubmit(e), onClearIconClick: () => this.onKupClearIconClick() }), this.prepTimePicker()));
|
|
357
332
|
return comp;
|
|
358
333
|
}
|
|
359
334
|
isRelatedTargetInThisComponent(e) {
|
|
@@ -373,196 +348,25 @@ export class KupTimePicker {
|
|
|
373
348
|
let idConc = '#time-picker-div#confirm#';
|
|
374
349
|
return idConc.indexOf('#' + id + '#') >= 0;
|
|
375
350
|
}
|
|
376
|
-
setTimeFromClock(e) {
|
|
377
|
-
let text = this.hoursEl.innerText + ':' + this.minutesEl.innerText;
|
|
378
|
-
if (this.manageSeconds) {
|
|
379
|
-
text += ':' + this.secondsEl.innerText;
|
|
380
|
-
}
|
|
381
|
-
this.onKupTimePickerItemClick(e, text);
|
|
382
|
-
}
|
|
383
|
-
createClock() {
|
|
384
|
-
let selectedTime;
|
|
385
|
-
if (this.value) {
|
|
386
|
-
selectedTime = this.kupManager.dates.toDate(this.value, this.manageSeconds
|
|
387
|
-
? KupDatesFormats.ISO_TIME
|
|
388
|
-
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS);
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
selectedTime = new Date();
|
|
392
|
-
}
|
|
393
|
-
let hh = selectedTime.getHours().toString();
|
|
394
|
-
let mm = selectedTime.getMinutes().toString();
|
|
395
|
-
if (hh.length === 1) {
|
|
396
|
-
hh = '0' + hh;
|
|
397
|
-
}
|
|
398
|
-
if (mm.length === 1) {
|
|
399
|
-
mm = '0' + mm;
|
|
400
|
-
}
|
|
401
|
-
let ss = '';
|
|
402
|
-
if (this.manageSeconds) {
|
|
403
|
-
ss = selectedTime.getSeconds().toString();
|
|
404
|
-
if (ss.length === 1) {
|
|
405
|
-
ss = '0' + ss;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
let seconds;
|
|
409
|
-
let time = [
|
|
410
|
-
h("span", { class: "h", ref: (el) => (this.hoursEl = el), onClick: () => {
|
|
411
|
-
this.setClockViewActive(true, false, false);
|
|
412
|
-
this.switchView(this.hoursEl, this.hoursCircleEl);
|
|
413
|
-
}, innerHTML: hh }),
|
|
414
|
-
':',
|
|
415
|
-
h("span", { class: "m", ref: (el) => (this.minutesEl = el), onClick: () => {
|
|
416
|
-
this.setClockViewActive(false, true, false);
|
|
417
|
-
this.switchView(this.minutesEl, this.minutesCircleEl);
|
|
418
|
-
}, innerHTML: mm }),
|
|
419
|
-
];
|
|
420
|
-
if (this.manageSeconds) {
|
|
421
|
-
seconds = (h("div", { class: "circle seconds", ref: (el) => (this.secondsCircleEl = el) },
|
|
422
|
-
this.buildClock(60, 101, 115, 115, 'sec unit', 0, 5, ss),
|
|
423
|
-
h("div", { class: "mid" })));
|
|
424
|
-
time.push(':', h("span", { class: "s", ref: (el) => (this.secondsEl = el), onClick: () => {
|
|
425
|
-
this.setClockViewActive(false, false, true);
|
|
426
|
-
this.switchView(this.secondsEl, this.secondsCircleEl);
|
|
427
|
-
}, innerHTML: ss }));
|
|
428
|
-
}
|
|
429
|
-
return (h("div", { class: "clock", id: this.rootElement.id + '_clock', ref: (el) => (this.pickerEl = el) },
|
|
430
|
-
h("div", { class: "top" }, time),
|
|
431
|
-
h("div", { class: "circle hours", ref: (el) => (this.hoursCircleEl = el) },
|
|
432
|
-
this.buildClock(12, 101, 105, 105, 'hour', 0, 1, hh),
|
|
433
|
-
this.buildClock(12, 64, 110, 110, 'hour2', 12, 1, hh),
|
|
434
|
-
h("div", { class: "mid" })),
|
|
435
|
-
h("div", { class: "circle minutes", ref: (el) => (this.minutesCircleEl = el) },
|
|
436
|
-
this.buildClock(60, 101, 115, 115, 'min unit', 0, 5, mm),
|
|
437
|
-
h("div", { class: "mid" })),
|
|
438
|
-
seconds,
|
|
439
|
-
h("div", { class: "actions" },
|
|
440
|
-
h("kup-button", { "onkup-button-click": (e) => {
|
|
441
|
-
this.setTimeFromClock(e);
|
|
442
|
-
}, id: "confirm", styling: FButtonStyling.FLAT, label: "Ok" }))));
|
|
443
|
-
}
|
|
444
|
-
switchView(el, elCircle) {
|
|
445
|
-
this.hoursEl.classList.remove('active');
|
|
446
|
-
this.hoursCircleEl.classList.remove('active');
|
|
447
|
-
this.minutesEl.classList.remove('active');
|
|
448
|
-
this.minutesCircleEl.classList.remove('active');
|
|
449
|
-
if (this.secondsEl) {
|
|
450
|
-
this.secondsEl.classList.remove('active');
|
|
451
|
-
this.secondsCircleEl.classList.remove('active');
|
|
452
|
-
}
|
|
453
|
-
el.classList.add('active');
|
|
454
|
-
elCircle.classList.add('active');
|
|
455
|
-
}
|
|
456
|
-
setClockViewActive(hoursActive, minutesActive, secondsActive) {
|
|
457
|
-
this.hoursActive = hoursActive;
|
|
458
|
-
this.minutesActive = minutesActive;
|
|
459
|
-
this.secondsActive = secondsActive;
|
|
460
|
-
}
|
|
461
|
-
buildClock(num, radius, offsetX, offsetY, className, add, separator, selectedValue) {
|
|
462
|
-
let x, y;
|
|
463
|
-
let divsArray = [];
|
|
464
|
-
for (var n = 0; n < num; n++) {
|
|
465
|
-
x = radius * Math.cos((n / num) * 2 * Math.PI);
|
|
466
|
-
y = radius * Math.sin((n / num) * 2 * Math.PI);
|
|
467
|
-
let text;
|
|
468
|
-
let dataValue = {};
|
|
469
|
-
let style = {};
|
|
470
|
-
if (separator == 1) {
|
|
471
|
-
if (n + 3 > 12) {
|
|
472
|
-
text = n + 3 - 12 + add + '';
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
let calc = n + 3 + add;
|
|
476
|
-
if (calc !== 24) {
|
|
477
|
-
text = n + 3 + add + '';
|
|
478
|
-
}
|
|
479
|
-
else {
|
|
480
|
-
text = '00';
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
dataValue['data-value'] = text;
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
if (n % separator == 0) {
|
|
487
|
-
if (n + 15 >= 60) {
|
|
488
|
-
dataValue['data-value'] = n + 15 - 60 + '';
|
|
489
|
-
text = n + 15 - 60 + add + '';
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
dataValue['data-value'] = n + 15 + '';
|
|
493
|
-
text = n + 15 + add + '';
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
if (n + 15 >= 60) {
|
|
498
|
-
dataValue['data-value'] = n + 15 - 60 + '';
|
|
499
|
-
text = '⋅';
|
|
500
|
-
}
|
|
501
|
-
else {
|
|
502
|
-
dataValue['data-value'] = n + 15 + '';
|
|
503
|
-
text = '\u00B7';
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
style['left'] = x + offsetX + 'px';
|
|
508
|
-
style['top'] = y + offsetY + 'px';
|
|
509
|
-
if (dataValue['data-value'].length === 1) {
|
|
510
|
-
dataValue['data-value'] = '0' + dataValue['data-value'];
|
|
511
|
-
}
|
|
512
|
-
let elClass = className;
|
|
513
|
-
if (dataValue['data-value'] === selectedValue) {
|
|
514
|
-
elClass += ' selected';
|
|
515
|
-
}
|
|
516
|
-
let div = (h("div", Object.assign({ class: elClass, style: style }, dataValue, { onClick: (e) => this.setClockTime(e) }), text));
|
|
517
|
-
divsArray.push(div);
|
|
518
|
-
}
|
|
519
|
-
return divsArray;
|
|
520
|
-
}
|
|
521
|
-
setClockTime(e) {
|
|
522
|
-
let time = e.target.getAttribute('data-value');
|
|
523
|
-
if (this.hoursActive) {
|
|
524
|
-
this.hoursEl.innerText = time;
|
|
525
|
-
this.hoursCircleEl
|
|
526
|
-
.querySelector('.selected')
|
|
527
|
-
.classList.remove('selected');
|
|
528
|
-
this.setClockViewActive(false, true, false);
|
|
529
|
-
this.switchView(this.minutesEl, this.minutesCircleEl);
|
|
530
|
-
}
|
|
531
|
-
else if (this.minutesActive) {
|
|
532
|
-
this.minutesEl.innerText = time;
|
|
533
|
-
this.minutesCircleEl
|
|
534
|
-
.querySelector('.selected')
|
|
535
|
-
.classList.remove('selected');
|
|
536
|
-
if (this.manageSeconds) {
|
|
537
|
-
this.setClockViewActive(false, false, true);
|
|
538
|
-
this.switchView(this.secondsEl, this.secondsCircleEl);
|
|
539
|
-
}
|
|
540
|
-
else {
|
|
541
|
-
this.setTimeFromClock(e);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
else {
|
|
545
|
-
this.secondsEl.innerText = time;
|
|
546
|
-
this.secondsCircleEl
|
|
547
|
-
.querySelector('.selected')
|
|
548
|
-
.classList.remove('selected');
|
|
549
|
-
this.setTimeFromClock(e);
|
|
550
|
-
}
|
|
551
|
-
e.target.classList.add('selected');
|
|
552
|
-
}
|
|
553
351
|
prepTimePicker() {
|
|
554
|
-
let widget = undefined;
|
|
555
352
|
if (this.clockVariant) {
|
|
556
|
-
|
|
353
|
+
const data = {
|
|
354
|
+
options: {
|
|
355
|
+
initialValue: this.value,
|
|
356
|
+
manageSeconds: this.manageSeconds,
|
|
357
|
+
hoursActive: this.hoursActive,
|
|
358
|
+
minutesActive: this.minutesActive,
|
|
359
|
+
secondsActive: this.secondsActive,
|
|
360
|
+
},
|
|
361
|
+
};
|
|
362
|
+
return (h("kup-card", { ref: (el) => (this.pickerKupEl = el), data: data, "layout-family": "builtin", "layout-number": "2", "size-x": "300px", "size-y": "450px", "is-menu": true, "onkup-card-click": (ev) => {
|
|
363
|
+
if (ev.detail.value != null && ev.detail.value != '')
|
|
364
|
+
this.onKupTimePickerItemClick(ev, ev.detail.value);
|
|
365
|
+
} }));
|
|
557
366
|
}
|
|
558
367
|
else {
|
|
559
|
-
|
|
368
|
+
return (h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.value), id: this.rootElement.id + '_list' }));
|
|
560
369
|
}
|
|
561
|
-
return (h("div", { tabindex: "-1", id: "time-picker-div", ref: (el) => (this.pickerContainerEl = el), onBlur: (e) => {
|
|
562
|
-
if (!this.isRelatedTargetInThisComponent(e)) {
|
|
563
|
-
this.onKupBlur();
|
|
564
|
-
}
|
|
565
|
-
} }, widget));
|
|
566
370
|
}
|
|
567
371
|
createTimeListData(value) {
|
|
568
372
|
let listData = [];
|
|
@@ -606,11 +410,6 @@ export class KupTimePicker {
|
|
|
606
410
|
let v1 = unformattedStringToFormattedStringTime(this.value, this.manageSeconds);
|
|
607
411
|
return v1;
|
|
608
412
|
}
|
|
609
|
-
recalcPosition() {
|
|
610
|
-
if (this.pickerContainerEl != null && this.textfieldEl != null) {
|
|
611
|
-
this.kupManager.dynamicPosition.register(this.pickerContainerEl, this.textfieldEl);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
413
|
/*-------------------------------------------------*/
|
|
615
414
|
/* L i f e c y c l e H o o k s */
|
|
616
415
|
/*-------------------------------------------------*/
|
|
@@ -633,45 +432,26 @@ export class KupTimePicker {
|
|
|
633
432
|
this.kupManager.debug.logRender(this, false);
|
|
634
433
|
}
|
|
635
434
|
componentDidRender() {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
this.
|
|
642
|
-
|
|
643
|
-
else if (this.secondsActive) {
|
|
644
|
-
this.switchView(this.secondsEl, this.secondsCircleEl);
|
|
435
|
+
const root = this.rootElement.shadowRoot;
|
|
436
|
+
if (root) {
|
|
437
|
+
const f = root.querySelector('.f-text-field');
|
|
438
|
+
if (f) {
|
|
439
|
+
this.textFieldContainerEl = f;
|
|
440
|
+
this.textfieldEl = f.querySelector('input');
|
|
441
|
+
FTextFieldMDC(f);
|
|
645
442
|
}
|
|
646
443
|
}
|
|
647
|
-
this.recalcPosition();
|
|
648
444
|
this.kupManager.debug.logRender(this, true);
|
|
649
445
|
}
|
|
650
446
|
render() {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
this.
|
|
654
|
-
this.data['kup-text-field']['className'] &&
|
|
655
|
-
this.data['kup-text-field']['className'].indexOf('kup-full-height') > -1) {
|
|
656
|
-
hostClass['kup-full-height'] = true;
|
|
657
|
-
}
|
|
658
|
-
if (this.data &&
|
|
659
|
-
this.data['kup-text-field'] &&
|
|
660
|
-
this.data['kup-text-field']['fullWidth']) {
|
|
661
|
-
hostClass['kup-full-width'] = true;
|
|
662
|
-
}
|
|
663
|
-
const customStyle = this.kupManager.theme.setCustomStyle(this.rootElement);
|
|
664
|
-
return (h(Host, { class: hostClass, onBlur: () => this.onKupBlur() },
|
|
665
|
-
customStyle ? h("style", null, customStyle) : null,
|
|
666
|
-
h("div", { id: componentWrapperId },
|
|
667
|
-
this.prepTimeTextfield(),
|
|
668
|
-
this.prepTimePicker())));
|
|
447
|
+
return (h(Host, null,
|
|
448
|
+
h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
|
|
449
|
+
h("div", { id: componentWrapperId }, this.prepTextfield(this.getTimeForOutput()))));
|
|
669
450
|
}
|
|
670
451
|
disconnectedCallback() {
|
|
671
452
|
this.kupManager.theme.unregister(this);
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
this.kupManager.dynamicPosition.unregister(Array.prototype.slice.call(dynamicPositionElements));
|
|
453
|
+
if (this.pickerKupEl) {
|
|
454
|
+
this.pickerKupEl.remove();
|
|
675
455
|
}
|
|
676
456
|
}
|
|
677
457
|
static get is() { return "kup-time-picker"; }
|
|
@@ -695,8 +475,8 @@ export class KupTimePicker {
|
|
|
695
475
|
"optional": false,
|
|
696
476
|
"docs": {
|
|
697
477
|
"tags": [{
|
|
698
|
-
"
|
|
699
|
-
"
|
|
478
|
+
"name": "default",
|
|
479
|
+
"text": "true"
|
|
700
480
|
}],
|
|
701
481
|
"text": "When set to true, the drop down menu will display a clock."
|
|
702
482
|
},
|
|
@@ -716,11 +496,11 @@ export class KupTimePicker {
|
|
|
716
496
|
"optional": false,
|
|
717
497
|
"docs": {
|
|
718
498
|
"tags": [{
|
|
719
|
-
"
|
|
720
|
-
"
|
|
499
|
+
"name": "default",
|
|
500
|
+
"text": "\"\""
|
|
721
501
|
}, {
|
|
722
|
-
"
|
|
723
|
-
"
|
|
502
|
+
"name": "see",
|
|
503
|
+
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
724
504
|
}],
|
|
725
505
|
"text": "Custom style of the component."
|
|
726
506
|
},
|
|
@@ -744,8 +524,8 @@ export class KupTimePicker {
|
|
|
744
524
|
"optional": false,
|
|
745
525
|
"docs": {
|
|
746
526
|
"tags": [{
|
|
747
|
-
"
|
|
748
|
-
"
|
|
527
|
+
"name": "default",
|
|
528
|
+
"text": "{}"
|
|
749
529
|
}],
|
|
750
530
|
"text": "Props of the sub-components (time input text field)"
|
|
751
531
|
},
|
|
@@ -763,8 +543,8 @@ export class KupTimePicker {
|
|
|
763
543
|
"optional": false,
|
|
764
544
|
"docs": {
|
|
765
545
|
"tags": [{
|
|
766
|
-
"
|
|
767
|
-
"
|
|
546
|
+
"name": "default",
|
|
547
|
+
"text": "false"
|
|
768
548
|
}],
|
|
769
549
|
"text": "Defaults at false. When set to true, the component is disabled."
|
|
770
550
|
},
|
|
@@ -784,8 +564,8 @@ export class KupTimePicker {
|
|
|
784
564
|
"optional": false,
|
|
785
565
|
"docs": {
|
|
786
566
|
"tags": [{
|
|
787
|
-
"
|
|
788
|
-
"
|
|
567
|
+
"name": "default",
|
|
568
|
+
"text": "\"\""
|
|
789
569
|
}],
|
|
790
570
|
"text": "Sets the initial value of the component."
|
|
791
571
|
},
|
|
@@ -805,8 +585,8 @@ export class KupTimePicker {
|
|
|
805
585
|
"optional": false,
|
|
806
586
|
"docs": {
|
|
807
587
|
"tags": [{
|
|
808
|
-
"
|
|
809
|
-
"
|
|
588
|
+
"name": "default",
|
|
589
|
+
"text": "false"
|
|
810
590
|
}],
|
|
811
591
|
"text": "Manage seconds."
|
|
812
592
|
},
|
|
@@ -826,8 +606,8 @@ export class KupTimePicker {
|
|
|
826
606
|
"optional": false,
|
|
827
607
|
"docs": {
|
|
828
608
|
"tags": [{
|
|
829
|
-
"
|
|
830
|
-
"
|
|
609
|
+
"name": "default",
|
|
610
|
+
"text": "10"
|
|
831
611
|
}],
|
|
832
612
|
"text": "Minutes step."
|
|
833
613
|
},
|
|
@@ -1026,8 +806,8 @@ export class KupTimePicker {
|
|
|
1026
806
|
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
1027
807
|
"parameters": [{
|
|
1028
808
|
"tags": [{
|
|
1029
|
-
"
|
|
1030
|
-
"
|
|
809
|
+
"name": "param",
|
|
810
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
1031
811
|
}],
|
|
1032
812
|
"text": "- When provided and true, the result will be the list of props with their description."
|
|
1033
813
|
}],
|
|
@@ -1106,8 +886,8 @@ export class KupTimePicker {
|
|
|
1106
886
|
"signature": "(props: GenericObject) => Promise<void>",
|
|
1107
887
|
"parameters": [{
|
|
1108
888
|
"tags": [{
|
|
1109
|
-
"
|
|
1110
|
-
"
|
|
889
|
+
"name": "param",
|
|
890
|
+
"text": "props - Object containing props that will be set to the component."
|
|
1111
891
|
}],
|
|
1112
892
|
"text": "- Object containing props that will be set to the component."
|
|
1113
893
|
}],
|