@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,4845 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const kupObjects = require('./kup-objects-59ea949c.js');
|
|
4
|
-
const index = require('./index-3c471303.js');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Category of debug logs.
|
|
8
|
-
*/
|
|
9
|
-
exports.KupDebugCategory = void 0;
|
|
10
|
-
(function (KupDebugCategory) {
|
|
11
|
-
KupDebugCategory["INFO"] = "Informational";
|
|
12
|
-
KupDebugCategory["WARNING"] = "Warning";
|
|
13
|
-
KupDebugCategory["ERROR"] = "Error";
|
|
14
|
-
})(exports.KupDebugCategory || (exports.KupDebugCategory = {}));
|
|
15
|
-
/**
|
|
16
|
-
* Colors associated with every type of log to be printed.
|
|
17
|
-
*/
|
|
18
|
-
var KupDebugLogColor;
|
|
19
|
-
(function (KupDebugLogColor) {
|
|
20
|
-
KupDebugLogColor["Load"] = "green";
|
|
21
|
-
KupDebugLogColor["Render"] = "green";
|
|
22
|
-
KupDebugLogColor["Resize"] = "green";
|
|
23
|
-
KupDebugLogColor["Misc"] = "blue";
|
|
24
|
-
KupDebugLogColor["Total"] = "teal";
|
|
25
|
-
})(KupDebugLogColor || (KupDebugLogColor = {}));
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* HTML attribute attached to dynamically positioned elements.
|
|
29
|
-
*/
|
|
30
|
-
const kupDynamicPositionAttribute = 'kup-dynamic-position';
|
|
31
|
-
/**
|
|
32
|
-
* HTML attribute attached to dynamically positioned elements' anchor point.
|
|
33
|
-
*/
|
|
34
|
-
const kupDynamicPositionAnchorAttribute = 'kup-dynamic-position-anchor';
|
|
35
|
-
/**
|
|
36
|
-
* CSS class attached to dynamically positioned elements when the script is running.
|
|
37
|
-
*/
|
|
38
|
-
const kupDynamicPositionActiveClass = 'kup-dynamic-position-active';
|
|
39
|
-
/**
|
|
40
|
-
* Available placements.
|
|
41
|
-
*/
|
|
42
|
-
exports.KupDynamicPositionPlacement = void 0;
|
|
43
|
-
(function (KupDynamicPositionPlacement) {
|
|
44
|
-
KupDynamicPositionPlacement["AUTO"] = "";
|
|
45
|
-
KupDynamicPositionPlacement["BOTTOM"] = "b";
|
|
46
|
-
KupDynamicPositionPlacement["BOTTOM_LEFT"] = "bl";
|
|
47
|
-
KupDynamicPositionPlacement["BOTTOM_RIGHT"] = "br";
|
|
48
|
-
KupDynamicPositionPlacement["LEFT"] = "l";
|
|
49
|
-
KupDynamicPositionPlacement["RIGHT"] = "r";
|
|
50
|
-
KupDynamicPositionPlacement["TOP"] = "t";
|
|
51
|
-
KupDynamicPositionPlacement["TOP_LEFT"] = "tl";
|
|
52
|
-
KupDynamicPositionPlacement["TOP_RIGHT"] = "tr";
|
|
53
|
-
})(exports.KupDynamicPositionPlacement || (exports.KupDynamicPositionPlacement = {}));
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Props of the kup-card component.
|
|
57
|
-
* Used to export every prop in an object.
|
|
58
|
-
*/
|
|
59
|
-
exports.KupCardProps = void 0;
|
|
60
|
-
(function (KupCardProps) {
|
|
61
|
-
KupCardProps["customStyle"] = "Custom style of the component.";
|
|
62
|
-
KupCardProps["data"] = "The actual data of the card.";
|
|
63
|
-
KupCardProps["isMenu"] = "Defines whether the card is a menu or not. Works together with menuVisible.";
|
|
64
|
-
KupCardProps["layoutFamily"] = "Sets the type of the card.";
|
|
65
|
-
KupCardProps["layoutNumber"] = "Sets the number of the layout.";
|
|
66
|
-
KupCardProps["menuVisible"] = "Sets the status of the card as menu, when false it's hidden otherwise it's visible. Works together with isMenu.";
|
|
67
|
-
KupCardProps["sizeX"] = "The width of the card, defaults to 100%. Accepts any valid CSS format (px, %, vw, etc.).";
|
|
68
|
-
KupCardProps["sizeY"] = "The height of the card, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.).";
|
|
69
|
-
})(exports.KupCardProps || (exports.KupCardProps = {}));
|
|
70
|
-
/**
|
|
71
|
-
* Layout families of the kup-card component.
|
|
72
|
-
* @enum {string}
|
|
73
|
-
* @property {string} COLLAPSIBLE - Cards belonging to this family will display an area usable to expand the content of the card.
|
|
74
|
-
* @property {string} SCALABLE - Content will fit its container, resizing itself automatically.
|
|
75
|
-
* @property {string} STANDARD - Stndard layouts.
|
|
76
|
-
*/
|
|
77
|
-
exports.KupCardFamily = void 0;
|
|
78
|
-
(function (KupCardFamily) {
|
|
79
|
-
KupCardFamily["COLLAPSIBLE"] = "collapsible";
|
|
80
|
-
KupCardFamily["DIALOG"] = "dialog";
|
|
81
|
-
KupCardFamily["SCALABLE"] = "scalable";
|
|
82
|
-
KupCardFamily["STANDARD"] = "standard";
|
|
83
|
-
})(exports.KupCardFamily || (exports.KupCardFamily = {}));
|
|
84
|
-
/**
|
|
85
|
-
* Recurring IDs.
|
|
86
|
-
*/
|
|
87
|
-
exports.KupCardIds = void 0;
|
|
88
|
-
(function (KupCardIds) {
|
|
89
|
-
KupCardIds["COLUMNS_LIST"] = "columns-list";
|
|
90
|
-
KupCardIds["DIALOG_CLOSE"] = "dialog-close";
|
|
91
|
-
KupCardIds["DRAG_HANDLE"] = "drag-handle";
|
|
92
|
-
KupCardIds["EXPAND_ACTION"] = "expand-action";
|
|
93
|
-
KupCardIds["EXTRA_COLUMNS"] = "extra-columns";
|
|
94
|
-
KupCardIds["NEXT_ROW"] = "next-row";
|
|
95
|
-
KupCardIds["OBJECT_CHANGE"] = "object-change";
|
|
96
|
-
KupCardIds["PREVIOUS_ROW"] = "previous-row";
|
|
97
|
-
KupCardIds["VIEW_SELECTOR"] = "view-selector";
|
|
98
|
-
})(exports.KupCardIds || (exports.KupCardIds = {}));
|
|
99
|
-
/**
|
|
100
|
-
* Recurring CSS classes.
|
|
101
|
-
*/
|
|
102
|
-
exports.KupCardCSSClasses = void 0;
|
|
103
|
-
(function (KupCardCSSClasses) {
|
|
104
|
-
KupCardCSSClasses["CARD_VIEW"] = "card-view";
|
|
105
|
-
KupCardCSSClasses["CLICKABLE_LINK"] = "clickable-link";
|
|
106
|
-
KupCardCSSClasses["COLLAPSIBLE_ACTIVE"] = "collapsible-active";
|
|
107
|
-
KupCardCSSClasses["COLLAPSIBLE_CARD"] = "collapsible-card";
|
|
108
|
-
KupCardCSSClasses["COLLAPSIBLE_ELEMENT"] = "collapsible-element";
|
|
109
|
-
KupCardCSSClasses["COLLAPSIBLE_WRAPPER"] = "collapsible-wrapper";
|
|
110
|
-
KupCardCSSClasses["DIALOG_TITLE"] = "dialog-title";
|
|
111
|
-
KupCardCSSClasses["DIALOG_UNRESIZABLE"] = "dialog-unresizable";
|
|
112
|
-
KupCardCSSClasses["EXPANDED"] = "expanded";
|
|
113
|
-
KupCardCSSClasses["HAS_ACTIONS"] = "has-actions";
|
|
114
|
-
KupCardCSSClasses["HAS_CONTENT"] = "has-content";
|
|
115
|
-
KupCardCSSClasses["HEADER_BAR"] = "header-bar";
|
|
116
|
-
KupCardCSSClasses["VIEW_PREFIX"] = "view-";
|
|
117
|
-
KupCardCSSClasses["VISIBLE"] = "visible";
|
|
118
|
-
})(exports.KupCardCSSClasses || (exports.KupCardCSSClasses = {}));
|
|
119
|
-
/**
|
|
120
|
-
* Internally-handled sub-component events.
|
|
121
|
-
*/
|
|
122
|
-
exports.KupCardSubEvents = void 0;
|
|
123
|
-
(function (KupCardSubEvents) {
|
|
124
|
-
KupCardSubEvents["AUTOCOMPLETE_BLUR"] = "kup-autocomplete-blur";
|
|
125
|
-
KupCardSubEvents["AUTOCOMPLETE_ITEMCLICK"] = "kup-autocomplete-itemclick";
|
|
126
|
-
KupCardSubEvents["BUTTON_CLICK"] = "kup-button-click";
|
|
127
|
-
KupCardSubEvents["CHIP_BLUR"] = "kup-chip-blur";
|
|
128
|
-
KupCardSubEvents["CHIP_ICONCLICK"] = "kup-chip-iconclick";
|
|
129
|
-
KupCardSubEvents["TABBAR_CLICK"] = "kup-tabbar-click";
|
|
130
|
-
KupCardSubEvents["TREE_NODESELECTED"] = "kup-tree-nodeselected";
|
|
131
|
-
})(exports.KupCardSubEvents || (exports.KupCardSubEvents = {}));
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Default languages available.
|
|
135
|
-
*/
|
|
136
|
-
var KupLanguageDefaults;
|
|
137
|
-
(function (KupLanguageDefaults) {
|
|
138
|
-
KupLanguageDefaults["cn"] = "chinese";
|
|
139
|
-
KupLanguageDefaults["en"] = "english";
|
|
140
|
-
KupLanguageDefaults["es"] = "spanish";
|
|
141
|
-
KupLanguageDefaults["it"] = "italian";
|
|
142
|
-
KupLanguageDefaults["fr"] = "french";
|
|
143
|
-
KupLanguageDefaults["pl"] = "polish";
|
|
144
|
-
KupLanguageDefaults["ru"] = "russian";
|
|
145
|
-
})(KupLanguageDefaults || (KupLanguageDefaults = {}));
|
|
146
|
-
/**
|
|
147
|
-
* Checkbox statuses decodes.
|
|
148
|
-
*/
|
|
149
|
-
exports.KupLanguageCheckbox = void 0;
|
|
150
|
-
(function (KupLanguageCheckbox) {
|
|
151
|
-
KupLanguageCheckbox["ALL"] = "checkboxAll";
|
|
152
|
-
KupLanguageCheckbox["CHECKED"] = "checkboxChecked";
|
|
153
|
-
KupLanguageCheckbox["INDETERMINATE"] = "checkboxIndeterminate";
|
|
154
|
-
KupLanguageCheckbox["UNCHECKED"] = "checkboxUnchecked";
|
|
155
|
-
})(exports.KupLanguageCheckbox || (exports.KupLanguageCheckbox = {}));
|
|
156
|
-
/**
|
|
157
|
-
* Column related decodes.
|
|
158
|
-
*/
|
|
159
|
-
exports.KupLanguageColumn = void 0;
|
|
160
|
-
(function (KupLanguageColumn) {
|
|
161
|
-
KupLanguageColumn["ADD"] = "columnAdd";
|
|
162
|
-
KupLanguageColumn["ADD_DESCRIPTION"] = "columnAddDescription";
|
|
163
|
-
KupLanguageColumn["COLUMNS"] = "columnColumns";
|
|
164
|
-
KupLanguageColumn["HIDE"] = "columnHide";
|
|
165
|
-
})(exports.KupLanguageColumn || (exports.KupLanguageColumn = {}));
|
|
166
|
-
/**
|
|
167
|
-
* Debug widget decodes.
|
|
168
|
-
*/
|
|
169
|
-
var KupLanguageDebug;
|
|
170
|
-
(function (KupLanguageDebug) {
|
|
171
|
-
KupLanguageDebug["AUTOPRINT"] = "debugAutoprint";
|
|
172
|
-
KupLanguageDebug["CLEAR"] = "debugClear";
|
|
173
|
-
KupLanguageDebug["DUMP"] = "debugDump";
|
|
174
|
-
KupLanguageDebug["DL_ALL"] = "debugDLAll";
|
|
175
|
-
KupLanguageDebug["DL_PROPS"] = "debugDLProps";
|
|
176
|
-
KupLanguageDebug["DL_PROPS_COMP"] = "debugDLPropsComp";
|
|
177
|
-
KupLanguageDebug["LANGUAGE_CHANGER"] = "debugLanguageChanger";
|
|
178
|
-
KupLanguageDebug["LOG_LIMIT"] = "debugLogLimit";
|
|
179
|
-
KupLanguageDebug["MAGIC_BOX"] = "debugMagicBox";
|
|
180
|
-
KupLanguageDebug["OFF"] = "debugOff";
|
|
181
|
-
KupLanguageDebug["PRINT"] = "debugPrint";
|
|
182
|
-
KupLanguageDebug["THEME_CHANGER"] = "debugThemeChanger";
|
|
183
|
-
})(KupLanguageDebug || (KupLanguageDebug = {}));
|
|
184
|
-
/**
|
|
185
|
-
* Density decodes (data table customization settings).
|
|
186
|
-
*/
|
|
187
|
-
exports.KupLanguageDensity = void 0;
|
|
188
|
-
(function (KupLanguageDensity) {
|
|
189
|
-
KupLanguageDensity["DENSE"] = "densityDense";
|
|
190
|
-
KupLanguageDensity["LABEL"] = "densityLabel";
|
|
191
|
-
KupLanguageDensity["MEDIUM"] = "densityMedium";
|
|
192
|
-
KupLanguageDensity["WIDE"] = "densityWide";
|
|
193
|
-
})(exports.KupLanguageDensity || (exports.KupLanguageDensity = {}));
|
|
194
|
-
/**
|
|
195
|
-
* Font size decodes (data table customization settings).
|
|
196
|
-
*/
|
|
197
|
-
exports.KupLanguageFontsize = void 0;
|
|
198
|
-
(function (KupLanguageFontsize) {
|
|
199
|
-
KupLanguageFontsize["BIG"] = "fontsizeBig";
|
|
200
|
-
KupLanguageFontsize["LABEL"] = "fontsizeLabel";
|
|
201
|
-
KupLanguageFontsize["MEDIUM"] = "fontsizeMedium";
|
|
202
|
-
KupLanguageFontsize["SMALL"] = "fontsizeSmall";
|
|
203
|
-
})(exports.KupLanguageFontsize || (exports.KupLanguageFontsize = {}));
|
|
204
|
-
/**
|
|
205
|
-
* Generic user interface action/messages.
|
|
206
|
-
*/
|
|
207
|
-
exports.KupLanguageGeneric = void 0;
|
|
208
|
-
(function (KupLanguageGeneric) {
|
|
209
|
-
KupLanguageGeneric["ADD_NEW"] = "genericAddNew";
|
|
210
|
-
KupLanguageGeneric["APPLY"] = "genericApply";
|
|
211
|
-
KupLanguageGeneric["COLLAPSE"] = "genericCollapse";
|
|
212
|
-
KupLanguageGeneric["DAY"] = "genericDay";
|
|
213
|
-
KupLanguageGeneric["DRAG_AND_DROP"] = "genericDragAndDrop";
|
|
214
|
-
KupLanguageGeneric["DROP_YOUR_DATA"] = "genericDropYourData";
|
|
215
|
-
KupLanguageGeneric["EDITABLE"] = "genericEditable";
|
|
216
|
-
KupLanguageGeneric["EDITABLE_FIELD"] = "genericEditableField";
|
|
217
|
-
KupLanguageGeneric["EMPTY_DATA"] = "genericEmptyData";
|
|
218
|
-
KupLanguageGeneric["EXPAND"] = "genericExpand";
|
|
219
|
-
KupLanguageGeneric["EXPERIMENTAL_FEAT"] = "genericExperimentalFeat";
|
|
220
|
-
KupLanguageGeneric["FILTERS"] = "genericFilters";
|
|
221
|
-
KupLanguageGeneric["INFO"] = "genericInfo";
|
|
222
|
-
KupLanguageGeneric["INVALID_COLOR"] = "genericInvalidColor";
|
|
223
|
-
KupLanguageGeneric["LAYOUT_NYI"] = "genericLayoutNotYetImplemented";
|
|
224
|
-
KupLanguageGeneric["LIST"] = "genericList";
|
|
225
|
-
KupLanguageGeneric["LOAD_MORE"] = "genericLoadMoreData";
|
|
226
|
-
KupLanguageGeneric["MENU"] = "genericMenu";
|
|
227
|
-
KupLanguageGeneric["MONTH"] = "genericMonth";
|
|
228
|
-
KupLanguageGeneric["NEXT"] = "genericNext";
|
|
229
|
-
KupLanguageGeneric["OPEN_NAVIGATION_MENU"] = "genericOpenNavigationMenu";
|
|
230
|
-
KupLanguageGeneric["OPEN_IN_NEW_TAB"] = "genericOpenInNewTab";
|
|
231
|
-
KupLanguageGeneric["OPEN_IN_NEW_WINDOW"] = "genericOpenInNewWindow";
|
|
232
|
-
KupLanguageGeneric["OPTIONS"] = "genericOptions";
|
|
233
|
-
KupLanguageGeneric["PREVIOUS"] = "genericPrevious";
|
|
234
|
-
KupLanguageGeneric["REMOVE_FILTERS"] = "genericRemoveFilters";
|
|
235
|
-
KupLanguageGeneric["SETTINGS"] = "genericSettings";
|
|
236
|
-
KupLanguageGeneric["SHOW_ROW_OPTIONS"] = "genericShowRowOptions";
|
|
237
|
-
KupLanguageGeneric["SHOW_TOOLTIP_INFO"] = "genericShowTooltipInfo";
|
|
238
|
-
KupLanguageGeneric["SORT_BY"] = "genericSortBy";
|
|
239
|
-
KupLanguageGeneric["TOGGLE"] = "genericToggle";
|
|
240
|
-
KupLanguageGeneric["TODAY"] = "genericToday";
|
|
241
|
-
KupLanguageGeneric["TOTALS_TABLE"] = "genericTotalsTable";
|
|
242
|
-
KupLanguageGeneric["TRANSPOSE_DATA"] = "genericTransposeData";
|
|
243
|
-
KupLanguageGeneric["VIEW_AS"] = "genericViewAs";
|
|
244
|
-
KupLanguageGeneric["WEEK"] = "genericWeek";
|
|
245
|
-
})(exports.KupLanguageGeneric || (exports.KupLanguageGeneric = {}));
|
|
246
|
-
/**
|
|
247
|
-
* Grid decodes (data table customization settings).
|
|
248
|
-
*/
|
|
249
|
-
exports.KupLanguageGrid = void 0;
|
|
250
|
-
(function (KupLanguageGrid) {
|
|
251
|
-
KupLanguageGrid["COLUMN"] = "gridColumn";
|
|
252
|
-
KupLanguageGrid["COMPLETE"] = "gridComplete";
|
|
253
|
-
KupLanguageGrid["LABEL"] = "gridLabel";
|
|
254
|
-
KupLanguageGrid["NONE"] = "gridNone";
|
|
255
|
-
KupLanguageGrid["ROW"] = "gridRow";
|
|
256
|
-
})(exports.KupLanguageGrid || (exports.KupLanguageGrid = {}));
|
|
257
|
-
/**
|
|
258
|
-
* Grouping decodes (data table groups).
|
|
259
|
-
*/
|
|
260
|
-
exports.KupLanguageGrouping = void 0;
|
|
261
|
-
(function (KupLanguageGrouping) {
|
|
262
|
-
KupLanguageGrouping["DISABLE"] = "groupingDisable";
|
|
263
|
-
KupLanguageGrouping["ENABLE"] = "groupingEnable";
|
|
264
|
-
KupLanguageGrouping["GROUPS"] = "groupingGroups";
|
|
265
|
-
})(exports.KupLanguageGrouping || (exports.KupLanguageGrouping = {}));
|
|
266
|
-
/**
|
|
267
|
-
* Page related decodes.
|
|
268
|
-
*/
|
|
269
|
-
exports.KupLanguagePage = void 0;
|
|
270
|
-
(function (KupLanguagePage) {
|
|
271
|
-
KupLanguagePage["PAGE"] = "pagePage";
|
|
272
|
-
KupLanguagePage["TOTAL"] = "pageTotal";
|
|
273
|
-
})(exports.KupLanguagePage || (exports.KupLanguagePage = {}));
|
|
274
|
-
/**
|
|
275
|
-
* Row related decodes.
|
|
276
|
-
*/
|
|
277
|
-
exports.KupLanguageRow = void 0;
|
|
278
|
-
(function (KupLanguageRow) {
|
|
279
|
-
KupLanguageRow["DETAIL"] = "rowDetail";
|
|
280
|
-
KupLanguageRow["EDITABLE_KEY"] = "rowEditableKey";
|
|
281
|
-
KupLanguageRow["KEY"] = "rowKey";
|
|
282
|
-
KupLanguageRow["NEXT"] = "rowNext";
|
|
283
|
-
KupLanguageRow["PREVIOUS"] = "rowPrevious";
|
|
284
|
-
KupLanguageRow["RENDERED"] = "rowRendered";
|
|
285
|
-
KupLanguageRow["ROWS"] = "rowRows";
|
|
286
|
-
KupLanguageRow["SELECTED"] = "rowSelected";
|
|
287
|
-
KupLanguageRow["TOTAL"] = "rowTotal";
|
|
288
|
-
})(exports.KupLanguageRow || (exports.KupLanguageRow = {}));
|
|
289
|
-
/**
|
|
290
|
-
* Search decodes.
|
|
291
|
-
*/
|
|
292
|
-
exports.KupLanguageSearch = void 0;
|
|
293
|
-
(function (KupLanguageSearch) {
|
|
294
|
-
KupLanguageSearch["FROM"] = "searchFrom";
|
|
295
|
-
KupLanguageSearch["SEARCH"] = "searchSearch";
|
|
296
|
-
KupLanguageSearch["TO"] = "searchTo";
|
|
297
|
-
})(exports.KupLanguageSearch || (exports.KupLanguageSearch = {}));
|
|
298
|
-
/**
|
|
299
|
-
* Footer totals decodes (tree and data table).
|
|
300
|
-
*/
|
|
301
|
-
exports.KupLanguageTotals = void 0;
|
|
302
|
-
(function (KupLanguageTotals) {
|
|
303
|
-
KupLanguageTotals["AVERAGE"] = "totalsAverage";
|
|
304
|
-
KupLanguageTotals["CALCULATE"] = "totalsCalculate";
|
|
305
|
-
KupLanguageTotals["CANCEL"] = "totalsCancel";
|
|
306
|
-
KupLanguageTotals["COUNT"] = "totalsCount";
|
|
307
|
-
KupLanguageTotals["DISTINCT"] = "totalsDistinct";
|
|
308
|
-
KupLanguageTotals["FORMULA"] = "totalsFormula";
|
|
309
|
-
KupLanguageTotals["MAXIMUM"] = "totalsMaximum";
|
|
310
|
-
KupLanguageTotals["MINIMUM"] = "totalsMinimum";
|
|
311
|
-
KupLanguageTotals["SUM"] = "totalsSum";
|
|
312
|
-
})(exports.KupLanguageTotals || (exports.KupLanguageTotals = {}));
|
|
313
|
-
|
|
314
|
-
var __classPrivateFieldSet$3 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
315
|
-
if (!privateMap.has(receiver)) {
|
|
316
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
317
|
-
}
|
|
318
|
-
privateMap.set(receiver, value);
|
|
319
|
-
return value;
|
|
320
|
-
};
|
|
321
|
-
var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
322
|
-
if (!privateMap.has(receiver)) {
|
|
323
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
324
|
-
}
|
|
325
|
-
return privateMap.get(receiver);
|
|
326
|
-
};
|
|
327
|
-
var _debugWidget;
|
|
328
|
-
const dom$7 = document.documentElement;
|
|
329
|
-
/**
|
|
330
|
-
* Debugging suite, used to log messages and statuses from the Ketch.UP components.
|
|
331
|
-
* @module KupDebug
|
|
332
|
-
*/
|
|
333
|
-
class KupDebug {
|
|
334
|
-
/**
|
|
335
|
-
* Initializes KupDebug.
|
|
336
|
-
* @param {boolean} active - When true, the debug is active on initialization.
|
|
337
|
-
* @param {boolean} autoprint - When true, logs will be automatically printed inside the debug widget.
|
|
338
|
-
* @param {number} logLimit - Maximum amount of logs stored, when they exceed the number specified in logLimit the cache will be automatically cleared.
|
|
339
|
-
*/
|
|
340
|
-
constructor(active, autoprint, logLimit) {
|
|
341
|
-
_debugWidget.set(this, void 0);
|
|
342
|
-
this.active = active ? true : false;
|
|
343
|
-
this.autoPrint = autoprint ? true : false;
|
|
344
|
-
this.container = document.createElement('div');
|
|
345
|
-
this.container.setAttribute('kup-debug', '');
|
|
346
|
-
document.body.appendChild(this.container);
|
|
347
|
-
this.logLimit = logLimit ? logLimit : 250;
|
|
348
|
-
this.logs = [];
|
|
349
|
-
__classPrivateFieldSet$3(this, _debugWidget, null);
|
|
350
|
-
document.addEventListener('kup-language-change', () => {
|
|
351
|
-
if (this.active && __classPrivateFieldGet$3(this, _debugWidget)) {
|
|
352
|
-
this.hideWidget();
|
|
353
|
-
this.showWidget();
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Allows the download of props by creating a temporary clickable anchor element.
|
|
359
|
-
*/
|
|
360
|
-
downloadProps(res) {
|
|
361
|
-
const dataStr = 'data:text/json;charset=utf-8,' +
|
|
362
|
-
encodeURIComponent(JSON.stringify(res, null, 2));
|
|
363
|
-
const downloadAnchorNode = document.createElement('a');
|
|
364
|
-
downloadAnchorNode.setAttribute('href', dataStr);
|
|
365
|
-
downloadAnchorNode.setAttribute('download', 'kup_props.json');
|
|
366
|
-
this.container.appendChild(downloadAnchorNode);
|
|
367
|
-
downloadAnchorNode.click();
|
|
368
|
-
downloadAnchorNode.remove();
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Creates the debug widget.
|
|
372
|
-
*/
|
|
373
|
-
showWidget() {
|
|
374
|
-
const debugWidget = document.createElement('kup-card');
|
|
375
|
-
const languages = dom$7.ketchup.language.getLanguages();
|
|
376
|
-
const languagesListData = [];
|
|
377
|
-
for (let index = 0; index < languages.length; index++) {
|
|
378
|
-
languagesListData.push({
|
|
379
|
-
text: languages[index],
|
|
380
|
-
value: languages[index],
|
|
381
|
-
selected: languages[index] === dom$7.ketchup.language.name
|
|
382
|
-
? true
|
|
383
|
-
: false,
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
const themes = dom$7.ketchup.theme.getThemes();
|
|
387
|
-
const themesListData = [];
|
|
388
|
-
for (let index = 0; index < themes.length; index++) {
|
|
389
|
-
themesListData.push({
|
|
390
|
-
text: themes[index],
|
|
391
|
-
value: themes[index],
|
|
392
|
-
selected: themes[index] === dom$7.ketchup.theme.name ? true : false,
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
debugWidget.data = {
|
|
396
|
-
button: [
|
|
397
|
-
{
|
|
398
|
-
icon: 'power_settings_new',
|
|
399
|
-
id: 'kup-debug-off',
|
|
400
|
-
customStyle: ':host {--kup-font-size: 0.875em; border-left: 1px solid var(--kup-border-color); border-right: 1px solid var(--kup-border-color);}',
|
|
401
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.OFF),
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
405
|
-
icon: 'print',
|
|
406
|
-
id: 'kup-debug-print',
|
|
407
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.PRINT),
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
checked: this.autoPrint,
|
|
411
|
-
customStyle: ':host {--kup-font-size: 0.875em; border-right: 1px solid var(--kup-border-color);}',
|
|
412
|
-
icon: 'speaker_notes',
|
|
413
|
-
iconOff: 'speaker_notes_off',
|
|
414
|
-
id: 'kup-debug-autoprint',
|
|
415
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.AUTOPRINT),
|
|
416
|
-
toggable: true,
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
420
|
-
icon: 'broom',
|
|
421
|
-
id: 'kup-debug-clear',
|
|
422
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.CLEAR),
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
426
|
-
icon: 'delete',
|
|
427
|
-
id: 'kup-debug-delete',
|
|
428
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.DUMP),
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
className: 'kup-full-height',
|
|
432
|
-
customStyle: ':host {border-left: 1px solid var(--kup-border-color);}',
|
|
433
|
-
icon: 'download',
|
|
434
|
-
id: 'kup-debug-dl-props',
|
|
435
|
-
label: 'Props',
|
|
436
|
-
styling: 'flat',
|
|
437
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.DL_PROPS),
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
className: 'kup-full-height',
|
|
441
|
-
customStyle: ':host {border-right: 1px solid var(--kup-border-color);}',
|
|
442
|
-
icon: 'download',
|
|
443
|
-
id: 'kup-debug-dl-all',
|
|
444
|
-
label: dom$7.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
445
|
-
styling: 'flat',
|
|
446
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.DL_ALL),
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
customStyle: ':host {--kup-font-size: 0.875em;}',
|
|
450
|
-
icon: 'auto-fix',
|
|
451
|
-
id: 'kup-debug-magic-box',
|
|
452
|
-
title: dom$7.ketchup.language.translate(KupLanguageDebug.MAGIC_BOX),
|
|
453
|
-
},
|
|
454
|
-
],
|
|
455
|
-
combobox: [
|
|
456
|
-
{
|
|
457
|
-
className: 'kup-full-height',
|
|
458
|
-
data: {
|
|
459
|
-
'kup-list': {
|
|
460
|
-
data: themesListData,
|
|
461
|
-
id: 'kup-debug-theme-changer-list',
|
|
462
|
-
},
|
|
463
|
-
'kup-text-field': {
|
|
464
|
-
className: 'kup-full-height',
|
|
465
|
-
emitSubmitEventOnEnter: false,
|
|
466
|
-
inputType: 'text',
|
|
467
|
-
label: dom$7.ketchup.language.translate(KupLanguageDebug.THEME_CHANGER),
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
|
-
id: 'kup-debug-theme-changer',
|
|
471
|
-
initialValue: dom$7.ketchup.theme.name,
|
|
472
|
-
isSelect: true,
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
className: 'kup-full-height',
|
|
476
|
-
data: {
|
|
477
|
-
'kup-list': {
|
|
478
|
-
data: languagesListData,
|
|
479
|
-
id: 'kup-debug-language-changer-list',
|
|
480
|
-
},
|
|
481
|
-
'kup-text-field': {
|
|
482
|
-
className: 'kup-full-height',
|
|
483
|
-
emitSubmitEventOnEnter: false,
|
|
484
|
-
inputType: 'text',
|
|
485
|
-
label: dom$7.ketchup.language.translate(KupLanguageDebug.LANGUAGE_CHANGER),
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
id: 'kup-debug-language-changer',
|
|
489
|
-
initialValue: dom$7.ketchup.language.name,
|
|
490
|
-
isSelect: true,
|
|
491
|
-
},
|
|
492
|
-
],
|
|
493
|
-
textfield: [
|
|
494
|
-
{
|
|
495
|
-
className: 'kup-full-height',
|
|
496
|
-
id: 'kup-debug-log-limit',
|
|
497
|
-
label: dom$7.ketchup.language.translate(KupLanguageDebug.LOG_LIMIT),
|
|
498
|
-
initialValue: this.logLimit,
|
|
499
|
-
emitSubmitEventOnEnter: false,
|
|
500
|
-
inputType: 'number',
|
|
501
|
-
},
|
|
502
|
-
],
|
|
503
|
-
};
|
|
504
|
-
debugWidget.customStyle =
|
|
505
|
-
'#kup-debug-log-limit {width: 120px;} #kup-debug-theme-changer {width: 190px;} #kup-debug-language-changer {width: 190px;}';
|
|
506
|
-
debugWidget.id = 'kup-debug-widget';
|
|
507
|
-
debugWidget.layoutFamily = exports.KupCardFamily.DIALOG;
|
|
508
|
-
debugWidget.layoutNumber = 3;
|
|
509
|
-
debugWidget.sizeX = 'auto';
|
|
510
|
-
debugWidget.sizeY = 'auto';
|
|
511
|
-
debugWidget.addEventListener('kup-card-event', (e) => this.handleEvents(e));
|
|
512
|
-
this.container.append(debugWidget);
|
|
513
|
-
__classPrivateFieldSet$3(this, _debugWidget, debugWidget);
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Closes the debug widget.
|
|
517
|
-
*/
|
|
518
|
-
hideWidget() {
|
|
519
|
-
__classPrivateFieldGet$3(this, _debugWidget).remove();
|
|
520
|
-
__classPrivateFieldSet$3(this, _debugWidget, null);
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* Clears all the printed logs inside the debug widget.
|
|
524
|
-
*/
|
|
525
|
-
widgetClear() {
|
|
526
|
-
const children = Array.prototype.slice.call(__classPrivateFieldGet$3(this, _debugWidget).children, 0);
|
|
527
|
-
for (let index = 0; index < children.length; index++) {
|
|
528
|
-
children[index].remove();
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Prints the stored logs inside the debug widget.
|
|
533
|
-
*/
|
|
534
|
-
widgetPrint() {
|
|
535
|
-
const slots = [];
|
|
536
|
-
for (let index = 0; index < this.logs.length; index++) {
|
|
537
|
-
// Wrapper div
|
|
538
|
-
const slot = document.createElement('div');
|
|
539
|
-
slot.classList.add('text');
|
|
540
|
-
switch (this.logs[index].category) {
|
|
541
|
-
case exports.KupDebugCategory.ERROR:
|
|
542
|
-
slot.style.backgroundColor =
|
|
543
|
-
'rgba(var(--kup-danger-color-rgb), 0.15)';
|
|
544
|
-
slot.style.borderLeft = '5px solid var(--kup-danger-color)';
|
|
545
|
-
break;
|
|
546
|
-
case exports.KupDebugCategory.WARNING:
|
|
547
|
-
slot.style.backgroundColor =
|
|
548
|
-
'rgba(var(--kup-warning-color-rgb), 0.15)';
|
|
549
|
-
slot.style.borderLeft =
|
|
550
|
-
'5px solid var(--kup-warning-color)';
|
|
551
|
-
break;
|
|
552
|
-
case exports.KupDebugCategory.INFO:
|
|
553
|
-
default:
|
|
554
|
-
slot.style.borderLeft = '5px solid var(--kup-info-color)';
|
|
555
|
-
break;
|
|
556
|
-
}
|
|
557
|
-
// If the log is tied to a KupComponent, on click its props will be downloaded.
|
|
558
|
-
// Also, a different style will be applied to distinguish it between the others.
|
|
559
|
-
if (typeof this.logs[index].element == 'object') {
|
|
560
|
-
slot.title = dom$7.ketchup.language.translate(KupLanguageDebug.DL_PROPS_COMP);
|
|
561
|
-
slot.style.fontWeight = 'bold';
|
|
562
|
-
slot.style.cursor = 'pointer';
|
|
563
|
-
slot.onclick = () => {
|
|
564
|
-
try {
|
|
565
|
-
this.logs[index].element
|
|
566
|
-
.getProps()
|
|
567
|
-
.then((res) => {
|
|
568
|
-
this.downloadProps(res);
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
catch (err) {
|
|
572
|
-
this.logMessage('kup-debug', err, exports.KupDebugCategory.WARNING);
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
// ID span
|
|
577
|
-
const id = document.createElement('span');
|
|
578
|
-
id.innerHTML = this.logs[index].id;
|
|
579
|
-
id.style.opacity = '0.75';
|
|
580
|
-
id.style.marginLeft = '5px';
|
|
581
|
-
// Message span
|
|
582
|
-
const message = document.createElement('span');
|
|
583
|
-
message.innerHTML = this.logs[index].message;
|
|
584
|
-
// Append elements
|
|
585
|
-
slot.append(id, message);
|
|
586
|
-
slots.push(slot);
|
|
587
|
-
}
|
|
588
|
-
slots.reverse();
|
|
589
|
-
for (let index = 0; index < slots.length; index++) {
|
|
590
|
-
__classPrivateFieldGet$3(this, _debugWidget).append(slots[index]);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Dumps the stored logs.
|
|
595
|
-
*/
|
|
596
|
-
dump() {
|
|
597
|
-
this.logs = [];
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
* Displays a table with debug information inside the browser's console.
|
|
601
|
-
*/
|
|
602
|
-
print() {
|
|
603
|
-
let printLog = {};
|
|
604
|
-
for (let index = 0; index < this.logs.length; index++) {
|
|
605
|
-
const type = this.logs[index].message.indexOf('Render #') > -1
|
|
606
|
-
? 'Render'
|
|
607
|
-
: this.logs[index].message.indexOf('Component ready') > -1
|
|
608
|
-
? 'Load'
|
|
609
|
-
: this.logs[index].message.indexOf('Size changed') > -1
|
|
610
|
-
? 'Resize'
|
|
611
|
-
: 'Misc';
|
|
612
|
-
const isComponent = !!this.logs[index]
|
|
613
|
-
.element;
|
|
614
|
-
if (!printLog[type]) {
|
|
615
|
-
printLog[type] = [];
|
|
616
|
-
}
|
|
617
|
-
printLog[type].push({
|
|
618
|
-
date: this.formatDate(this.logs[index].date),
|
|
619
|
-
element: isComponent
|
|
620
|
-
? this.logs[index].element
|
|
621
|
-
: this.logs[index].id,
|
|
622
|
-
message: isComponent
|
|
623
|
-
? this.logs[index].id + this.logs[index].message
|
|
624
|
-
: this.logs[index].message,
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
for (const key in printLog) {
|
|
628
|
-
if (Object.prototype.hasOwnProperty.call(printLog, key)) {
|
|
629
|
-
console.groupCollapsed('%c %c' +
|
|
630
|
-
key +
|
|
631
|
-
' logs ' +
|
|
632
|
-
'(' +
|
|
633
|
-
printLog[key].length +
|
|
634
|
-
')', 'background-color: ' +
|
|
635
|
-
KupDebugLogColor[key] +
|
|
636
|
-
'; margin-right: 10px; border-radius: 50%', 'background-color: transparent');
|
|
637
|
-
for (let index = 0; index < printLog[key].length; index++) {
|
|
638
|
-
console.log(printLog[key][index].date, printLog[key][index].message, printLog[key][index].element);
|
|
639
|
-
}
|
|
640
|
-
console.groupEnd();
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
if (this.logs.length > 0) {
|
|
644
|
-
console.groupCollapsed('%c %c' + 'All logs (' + this.logs.length + ')', 'background-color: ' +
|
|
645
|
-
KupDebugLogColor['Total'] +
|
|
646
|
-
'; margin-right: 10px; border-radius: 50%', 'background-color: transparent');
|
|
647
|
-
console.table(this.logs);
|
|
648
|
-
console.groupEnd();
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* Function used to set the status of the debug.
|
|
653
|
-
* If no argument is provided, this method will work as a toggler.
|
|
654
|
-
* @param {boolean} value - If this argument is provided, the debug status will be forced to its value.
|
|
655
|
-
*/
|
|
656
|
-
toggle(value) {
|
|
657
|
-
if (typeof value !== 'boolean') {
|
|
658
|
-
this.active = !this.active;
|
|
659
|
-
}
|
|
660
|
-
else {
|
|
661
|
-
this.active = value;
|
|
662
|
-
}
|
|
663
|
-
if (this.active) {
|
|
664
|
-
document.dispatchEvent(new CustomEvent('kup-debug-active'));
|
|
665
|
-
if (!__classPrivateFieldGet$3(this, _debugWidget)) {
|
|
666
|
-
this.showWidget();
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
else {
|
|
670
|
-
document.dispatchEvent(new CustomEvent('kup-debug-inactive'));
|
|
671
|
-
if (__classPrivateFieldGet$3(this, _debugWidget)) {
|
|
672
|
-
this.hideWidget();
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
/**
|
|
677
|
-
* Listens the card events and handles the related actions.
|
|
678
|
-
* @param {CustomEvent} e - kup-card-event.
|
|
679
|
-
*/
|
|
680
|
-
handleEvents(e) {
|
|
681
|
-
const compEvent = e.detail.event;
|
|
682
|
-
const compID = compEvent.detail.id;
|
|
683
|
-
switch (compEvent.type) {
|
|
684
|
-
case 'kup-button-click':
|
|
685
|
-
switch (compID) {
|
|
686
|
-
case 'kup-debug-autoprint':
|
|
687
|
-
this.autoPrint = !this.autoPrint;
|
|
688
|
-
break;
|
|
689
|
-
case 'kup-debug-clear':
|
|
690
|
-
this.widgetClear();
|
|
691
|
-
__classPrivateFieldGet$3(this, _debugWidget).refresh();
|
|
692
|
-
break;
|
|
693
|
-
case 'kup-debug-dl-props':
|
|
694
|
-
this.getProps().then((res) => {
|
|
695
|
-
this.downloadProps(res);
|
|
696
|
-
});
|
|
697
|
-
break;
|
|
698
|
-
case 'kup-debug-dl-all':
|
|
699
|
-
this.getProps(true).then((res) => {
|
|
700
|
-
this.downloadProps(res);
|
|
701
|
-
});
|
|
702
|
-
break;
|
|
703
|
-
case 'kup-debug-delete':
|
|
704
|
-
this.dump();
|
|
705
|
-
break;
|
|
706
|
-
case 'kup-debug-magic-box':
|
|
707
|
-
dom$7.ketchup.toggleMagicBox();
|
|
708
|
-
break;
|
|
709
|
-
case 'kup-debug-off':
|
|
710
|
-
this.toggle();
|
|
711
|
-
break;
|
|
712
|
-
case 'kup-debug-print':
|
|
713
|
-
this.widgetClear();
|
|
714
|
-
this.widgetPrint();
|
|
715
|
-
__classPrivateFieldGet$3(this, _debugWidget).refresh();
|
|
716
|
-
break;
|
|
717
|
-
}
|
|
718
|
-
break;
|
|
719
|
-
case 'kup-combobox-itemclick':
|
|
720
|
-
switch (compID) {
|
|
721
|
-
case 'kup-debug-language-changer':
|
|
722
|
-
dom$7.ketchup.language.set(compEvent.detail.value);
|
|
723
|
-
break;
|
|
724
|
-
case 'kup-debug-theme-changer':
|
|
725
|
-
dom$7.ketchup.theme.set(compEvent.detail.value);
|
|
726
|
-
break;
|
|
727
|
-
}
|
|
728
|
-
case 'kup-textfield-input':
|
|
729
|
-
switch (compID) {
|
|
730
|
-
case 'kup-debug-log-limit':
|
|
731
|
-
if (compEvent.detail.value === '' ||
|
|
732
|
-
compEvent.detail.value < 1) {
|
|
733
|
-
this.logLimit = 1;
|
|
734
|
-
}
|
|
735
|
-
else {
|
|
736
|
-
this.logLimit = compEvent.detail.value;
|
|
737
|
-
}
|
|
738
|
-
break;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* Function used to check whether the debug is active or not.
|
|
744
|
-
* If kupDebug on documentElement's type is not a boolean, it will be set to false.
|
|
745
|
-
* @returns {boolean} Status of the debug.
|
|
746
|
-
*/
|
|
747
|
-
isDebug() {
|
|
748
|
-
return this.active;
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* Retrieves the information for every component in this.logs by invoking the getProps public method of each component.
|
|
752
|
-
* 'tag' will contain the props of the component's html tag (i.e.: <kup-chip>).
|
|
753
|
-
* 'props' will contain the developer defined props of the component, making it handy for test purposes.
|
|
754
|
-
* @param {boolean} detail - If provided and true, the returned object will contain additional information (i.e.: className, id).
|
|
755
|
-
* @returns {GenericObject} Props of the components.
|
|
756
|
-
*/
|
|
757
|
-
async getProps(detail) {
|
|
758
|
-
let comps = new Set();
|
|
759
|
-
let props = detail ? { descriptions: {} } : {};
|
|
760
|
-
// Storing unique components inside "comps"
|
|
761
|
-
for (let index = 0; index < this.logs.length; index++) {
|
|
762
|
-
if (typeof this.logs[index].element !== 'string') {
|
|
763
|
-
if (!comps.has(this.logs[index].element)) {
|
|
764
|
-
comps.add(this.logs[index].element);
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
// Object of two arrays, positionally matching each other.
|
|
769
|
-
// One contains components, the other the relative promise.
|
|
770
|
-
const matchingObject = {
|
|
771
|
-
comps: [],
|
|
772
|
-
promises: [],
|
|
773
|
-
};
|
|
774
|
-
comps.forEach((el) => {
|
|
775
|
-
try {
|
|
776
|
-
matchingObject.comps.push(el);
|
|
777
|
-
matchingObject.promises.push(el.getProps());
|
|
778
|
-
}
|
|
779
|
-
catch (error) {
|
|
780
|
-
this.logMessage('kup-debug', 'Exception when accessing "getProps" public method for component: ' +
|
|
781
|
-
el.rootElement.tagName, exports.KupDebugCategory.WARNING);
|
|
782
|
-
}
|
|
783
|
-
});
|
|
784
|
-
// Returning "props", which is returned by the Promise.all
|
|
785
|
-
return Promise.all(matchingObject.promises).then((responses) => {
|
|
786
|
-
for (let index = 0; index < matchingObject.comps.length; index++) {
|
|
787
|
-
const el = matchingObject.comps[index];
|
|
788
|
-
const res = responses[index];
|
|
789
|
-
let cnt = 0;
|
|
790
|
-
let key = el.rootElement.id
|
|
791
|
-
? el.rootElement.tagName + '#' + el.rootElement.id
|
|
792
|
-
: el.rootElement.tagName + '_' + ++cnt;
|
|
793
|
-
while (props[key]) {
|
|
794
|
-
key = el.rootElement.tagName + '_' + ++cnt;
|
|
795
|
-
}
|
|
796
|
-
if (detail) {
|
|
797
|
-
let tag = {};
|
|
798
|
-
for (const key in el.rootElement) {
|
|
799
|
-
tag[key] = el.rootElement[key];
|
|
800
|
-
}
|
|
801
|
-
props[key] = {
|
|
802
|
-
props: res,
|
|
803
|
-
tagInfo: tag,
|
|
804
|
-
};
|
|
805
|
-
if (!props.descriptions[el.rootElement.tagName]) {
|
|
806
|
-
try {
|
|
807
|
-
el.getProps(true).then((res) => {
|
|
808
|
-
props.descriptions[el.rootElement.tagName] =
|
|
809
|
-
res;
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
catch (error) {
|
|
813
|
-
this.logMessage('kup-debug', 'Exception when accessing "getProps" public method for component: ' +
|
|
814
|
-
el.rootElement.tagName, exports.KupDebugCategory.WARNING);
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
else {
|
|
819
|
-
props[key] = res;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
return props;
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Displays a timestamped message in the browser's console when the kupDebug property on document.documentElement is true.
|
|
827
|
-
* Warnings and errors will be displayed even when kupDebug !== true.
|
|
828
|
-
* @param {any} comp - The component calling this function or a string.
|
|
829
|
-
* @param {string} message - The actual message that will be printed.
|
|
830
|
-
* @param {KupDebugCategory} category - The type of console message, defaults to log but warning and error can be used as well.
|
|
831
|
-
*/
|
|
832
|
-
logMessage(comp, message, category) {
|
|
833
|
-
if ((!category || category === exports.KupDebugCategory.INFO) &&
|
|
834
|
-
!this.isDebug()) {
|
|
835
|
-
return;
|
|
836
|
-
}
|
|
837
|
-
const date = new Date();
|
|
838
|
-
if (!category) {
|
|
839
|
-
category = exports.KupDebugCategory.INFO;
|
|
840
|
-
}
|
|
841
|
-
let obj = null;
|
|
842
|
-
let id = '';
|
|
843
|
-
if (comp.rootElement) {
|
|
844
|
-
id =
|
|
845
|
-
' ' +
|
|
846
|
-
comp.rootElement.tagName +
|
|
847
|
-
'#' +
|
|
848
|
-
comp.rootElement.id +
|
|
849
|
-
' => ';
|
|
850
|
-
obj = comp;
|
|
851
|
-
}
|
|
852
|
-
else {
|
|
853
|
-
id = ' ' + comp + ' => ';
|
|
854
|
-
obj = '';
|
|
855
|
-
}
|
|
856
|
-
if (this.isDebug() && id.indexOf('#kup-debug') < 0) {
|
|
857
|
-
const log = {
|
|
858
|
-
category: category,
|
|
859
|
-
date: date,
|
|
860
|
-
element: obj,
|
|
861
|
-
id: id,
|
|
862
|
-
message: message,
|
|
863
|
-
};
|
|
864
|
-
if (this.logs.length > this.logLimit) {
|
|
865
|
-
console.warn(this.formatDate(date) +
|
|
866
|
-
' kup-debug => ' +
|
|
867
|
-
'Too many logs (> ' +
|
|
868
|
-
this.logLimit +
|
|
869
|
-
')! Dumping (increase debug.logLimit to store more logs)... .');
|
|
870
|
-
this.dump();
|
|
871
|
-
}
|
|
872
|
-
this.logs.push(log);
|
|
873
|
-
if (this.autoPrint && __classPrivateFieldGet$3(this, _debugWidget)) {
|
|
874
|
-
this.widgetClear();
|
|
875
|
-
this.widgetPrint();
|
|
876
|
-
__classPrivateFieldGet$3(this, _debugWidget).refresh();
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
switch (category) {
|
|
880
|
-
case exports.KupDebugCategory.ERROR:
|
|
881
|
-
console.error(this.formatDate(date) + id + message, obj);
|
|
882
|
-
window.dispatchEvent(new CustomEvent('kupError', {
|
|
883
|
-
bubbles: true,
|
|
884
|
-
detail: { comp, date, message },
|
|
885
|
-
}));
|
|
886
|
-
break;
|
|
887
|
-
case exports.KupDebugCategory.WARNING:
|
|
888
|
-
console.warn(this.formatDate(date) + id + message, obj);
|
|
889
|
-
break;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
|
-
* Function used to format a date.
|
|
894
|
-
* Example: "Sun Mar 14 2021 13:50:56,329pm"
|
|
895
|
-
* @param {Date} date - Date to be formatted.
|
|
896
|
-
* @returns {string} Formatted
|
|
897
|
-
*/
|
|
898
|
-
formatDate(date) {
|
|
899
|
-
let minutes = date.getMinutes().toString().length == 1
|
|
900
|
-
? '0' + date.getMinutes()
|
|
901
|
-
: date.getMinutes(), hours = date.getHours().toString().length == 1
|
|
902
|
-
? '0' + date.getHours()
|
|
903
|
-
: date.getHours(), seconds = date.getSeconds().toString().length == 1
|
|
904
|
-
? '0' + date.getSeconds()
|
|
905
|
-
: date.getSeconds(), milliseconds = date.getMilliseconds().toString().length == 1
|
|
906
|
-
? '0' + date.getMilliseconds()
|
|
907
|
-
: date.getMilliseconds(), ampm = date.getHours() >= 12 ? 'pm' : 'am', months = [
|
|
908
|
-
'Jan',
|
|
909
|
-
'Feb',
|
|
910
|
-
'Mar',
|
|
911
|
-
'Apr',
|
|
912
|
-
'May',
|
|
913
|
-
'Jun',
|
|
914
|
-
'Jul',
|
|
915
|
-
'Aug',
|
|
916
|
-
'Sep',
|
|
917
|
-
'Oct',
|
|
918
|
-
'Nov',
|
|
919
|
-
'Dec',
|
|
920
|
-
], days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
921
|
-
return (days[date.getDay()] +
|
|
922
|
-
' ' +
|
|
923
|
-
months[date.getMonth()] +
|
|
924
|
-
' ' +
|
|
925
|
-
date.getDate() +
|
|
926
|
-
' ' +
|
|
927
|
-
date.getFullYear() +
|
|
928
|
-
' ' +
|
|
929
|
-
hours +
|
|
930
|
-
':' +
|
|
931
|
-
minutes +
|
|
932
|
-
':' +
|
|
933
|
-
seconds +
|
|
934
|
-
',' +
|
|
935
|
-
milliseconds +
|
|
936
|
-
ampm);
|
|
937
|
-
}
|
|
938
|
-
/**
|
|
939
|
-
* Function used to time the loading times of a component.
|
|
940
|
-
* @param {any} comp - The component calling this function or a string.
|
|
941
|
-
* @param {boolean} didLoad - Must be set to false when called inside a componentWillLoad() lifecycle hook and true when called inside componentDidLoad().
|
|
942
|
-
*/
|
|
943
|
-
logLoad(comp, didLoad) {
|
|
944
|
-
if (!didLoad) {
|
|
945
|
-
comp['debugInfo'] = {
|
|
946
|
-
startTime: window.performance.now(),
|
|
947
|
-
endTime: 0,
|
|
948
|
-
renderCount: 0,
|
|
949
|
-
renderStart: 0,
|
|
950
|
-
renderEnd: 0,
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
else {
|
|
954
|
-
comp.debugInfo.endTime = window.performance.now();
|
|
955
|
-
let timeDiff = comp.debugInfo.endTime - comp.debugInfo.startTime;
|
|
956
|
-
if (this.isDebug()) {
|
|
957
|
-
this.logMessage(comp, 'Component ready after ' + timeDiff + 'ms.');
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* Function used to time the render times of a component.
|
|
963
|
-
* @param {any} comp - The component calling this function or a string.
|
|
964
|
-
* @param {boolean} didRender - Must be set to false when called inside a componentWillRender() lifecycle hook and true when called inside componentDidRender().
|
|
965
|
-
* @param {string} breakpoint - When present, this log is supposedly between a willRender and didRender hook. Used to time single features of the render lifecycle.
|
|
966
|
-
*/
|
|
967
|
-
logRender(comp, didRender, breakpoint) {
|
|
968
|
-
if (breakpoint) {
|
|
969
|
-
const timeDiff = window.performance.now() - comp.debugInfo.renderStart;
|
|
970
|
-
if (this.isDebug()) {
|
|
971
|
-
this.logMessage(comp, breakpoint + ' took ' + timeDiff + 'ms.');
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
else if (!didRender) {
|
|
975
|
-
comp.debugInfo.renderCount++;
|
|
976
|
-
comp.debugInfo.renderStart = window.performance.now();
|
|
977
|
-
}
|
|
978
|
-
else {
|
|
979
|
-
comp.debugInfo.renderEnd = window.performance.now();
|
|
980
|
-
const timeDiff = comp.debugInfo.renderEnd - comp.debugInfo.renderStart;
|
|
981
|
-
if (this.isDebug()) {
|
|
982
|
-
this.logMessage(comp, 'Render #' +
|
|
983
|
-
comp.debugInfo.renderCount +
|
|
984
|
-
' took ' +
|
|
985
|
-
timeDiff +
|
|
986
|
-
'ms.');
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
_debugWidget = new WeakMap();
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* HTML Attribute attached to dialogs.
|
|
995
|
-
* Referenced by kup-theme.css
|
|
996
|
-
*/
|
|
997
|
-
const kupDialogAttribute = 'kup-dialog';
|
|
998
|
-
/**
|
|
999
|
-
* CSS class attached to resizable dialogs.
|
|
1000
|
-
* Referenced by kup-theme.css
|
|
1001
|
-
*/
|
|
1002
|
-
const kupResizableDialogClass = 'kup-resizable';
|
|
1003
|
-
/**
|
|
1004
|
-
* Actions performed by KupDialog.
|
|
1005
|
-
* The value reflects the CSS "cursor" property.
|
|
1006
|
-
*/
|
|
1007
|
-
var KupDialogActions;
|
|
1008
|
-
(function (KupDialogActions) {
|
|
1009
|
-
KupDialogActions["MOVE"] = "move";
|
|
1010
|
-
KupDialogActions["RESIZE"] = "resize";
|
|
1011
|
-
})(KupDialogActions || (KupDialogActions = {}));
|
|
1012
|
-
/**
|
|
1013
|
-
* Coordinates of the resize.
|
|
1014
|
-
* The value reflects the CSS "cursor" property.
|
|
1015
|
-
*/
|
|
1016
|
-
var KupDialogCoordinates;
|
|
1017
|
-
(function (KupDialogCoordinates) {
|
|
1018
|
-
KupDialogCoordinates["ALL"] = "move";
|
|
1019
|
-
KupDialogCoordinates["UNSET"] = "auto";
|
|
1020
|
-
KupDialogCoordinates["NORTHWEST"] = "nw-resize";
|
|
1021
|
-
KupDialogCoordinates["NORTH"] = "n-resize";
|
|
1022
|
-
KupDialogCoordinates["NORTHEAST"] = "ne-resize";
|
|
1023
|
-
KupDialogCoordinates["EAST"] = "e-resize";
|
|
1024
|
-
KupDialogCoordinates["SOUTHEAST"] = "se-resize";
|
|
1025
|
-
KupDialogCoordinates["SOUTH"] = "s-resize";
|
|
1026
|
-
KupDialogCoordinates["SOUTHWEST"] = "sw-resize";
|
|
1027
|
-
KupDialogCoordinates["WEST"] = "w-resize";
|
|
1028
|
-
})(KupDialogCoordinates || (KupDialogCoordinates = {}));
|
|
1029
|
-
|
|
1030
|
-
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
1031
|
-
if (!privateMap.has(receiver)) {
|
|
1032
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
1033
|
-
}
|
|
1034
|
-
privateMap.set(receiver, value);
|
|
1035
|
-
return value;
|
|
1036
|
-
};
|
|
1037
|
-
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
1038
|
-
if (!privateMap.has(receiver)) {
|
|
1039
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
1040
|
-
}
|
|
1041
|
-
return privateMap.get(receiver);
|
|
1042
|
-
};
|
|
1043
|
-
var _elementDrag, _mouseDown, _mouseUp;
|
|
1044
|
-
const dom$6 = document.documentElement;
|
|
1045
|
-
/**
|
|
1046
|
-
* This class handles elements as dialogs, making them resizable and movable.
|
|
1047
|
-
* @module KupDialog
|
|
1048
|
-
*/
|
|
1049
|
-
class KupDialog {
|
|
1050
|
-
/**
|
|
1051
|
-
* Initializes KupDialog.
|
|
1052
|
-
* @param {number} zIndex - The starting z-index assigned to dialogs.
|
|
1053
|
-
*/
|
|
1054
|
-
constructor(zIndex) {
|
|
1055
|
-
_elementDrag.set(this, void 0);
|
|
1056
|
-
_mouseDown.set(this, void 0);
|
|
1057
|
-
_mouseUp.set(this, void 0);
|
|
1058
|
-
this.action = null;
|
|
1059
|
-
this.activeElement = null;
|
|
1060
|
-
this.activeX = 0;
|
|
1061
|
-
this.activeY = 0;
|
|
1062
|
-
this.coordinates = null;
|
|
1063
|
-
this.managedElements = new Set();
|
|
1064
|
-
this.startingHeight = 0;
|
|
1065
|
-
this.startingWidth = 0;
|
|
1066
|
-
this.startingX = 0;
|
|
1067
|
-
this.startingY = 0;
|
|
1068
|
-
this.threshold = 5;
|
|
1069
|
-
this.zIndex = zIndex ? zIndex : 200;
|
|
1070
|
-
__classPrivateFieldSet$2(this, _elementDrag, function (e) {
|
|
1071
|
-
const kupDialog = dom$6.ketchup.dialog;
|
|
1072
|
-
const paths = e.composedPath();
|
|
1073
|
-
if (kupDialog.action === KupDialogActions.MOVE) {
|
|
1074
|
-
const x = kupDialog.activeElement.offsetLeft -
|
|
1075
|
-
(kupDialog.activeX - e.clientX);
|
|
1076
|
-
const y = kupDialog.activeElement.offsetTop -
|
|
1077
|
-
(kupDialog.activeY - e.clientY);
|
|
1078
|
-
kupDialog.activeElement.style.left = x + 'px';
|
|
1079
|
-
kupDialog.activeElement.style.top = y + 'px';
|
|
1080
|
-
kupDialog.activeX = e.clientX;
|
|
1081
|
-
kupDialog.activeY = e.clientY;
|
|
1082
|
-
}
|
|
1083
|
-
else if (kupDialog.action === KupDialogActions.RESIZE) {
|
|
1084
|
-
const height = kupDialog.activeElement.offsetHeight;
|
|
1085
|
-
const width = kupDialog.activeElement.offsetWidth;
|
|
1086
|
-
let x = kupDialog.startingWidth;
|
|
1087
|
-
let y = kupDialog.startingHeight;
|
|
1088
|
-
//Y coordinates
|
|
1089
|
-
switch (kupDialog.coordinates) {
|
|
1090
|
-
case KupDialogCoordinates.NORTH:
|
|
1091
|
-
case KupDialogCoordinates.NORTHEAST:
|
|
1092
|
-
case KupDialogCoordinates.NORTHWEST: {
|
|
1093
|
-
y += kupDialog.activeY - e.clientY;
|
|
1094
|
-
if (y < 100) {
|
|
1095
|
-
y = 100;
|
|
1096
|
-
}
|
|
1097
|
-
kupDialog.activeElement.style.height = y + 'px';
|
|
1098
|
-
if (height !== kupDialog.activeElement.offsetHeight) {
|
|
1099
|
-
kupDialog.activeElement.style.top =
|
|
1100
|
-
kupDialog.activeElement.offsetTop -
|
|
1101
|
-
(kupDialog.startingY - e.clientY) +
|
|
1102
|
-
'px';
|
|
1103
|
-
kupDialog.startingY = e.clientY;
|
|
1104
|
-
}
|
|
1105
|
-
break;
|
|
1106
|
-
}
|
|
1107
|
-
case KupDialogCoordinates.SOUTH:
|
|
1108
|
-
case KupDialogCoordinates.SOUTHEAST:
|
|
1109
|
-
case KupDialogCoordinates.SOUTHWEST: {
|
|
1110
|
-
y -= kupDialog.activeY - e.clientY;
|
|
1111
|
-
if (y < 100) {
|
|
1112
|
-
y = 100;
|
|
1113
|
-
}
|
|
1114
|
-
kupDialog.activeElement.style.height = y + 'px';
|
|
1115
|
-
break;
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
//X coordinates
|
|
1119
|
-
switch (kupDialog.coordinates) {
|
|
1120
|
-
case KupDialogCoordinates.EAST:
|
|
1121
|
-
case KupDialogCoordinates.NORTHEAST:
|
|
1122
|
-
case KupDialogCoordinates.SOUTHEAST: {
|
|
1123
|
-
x -= kupDialog.activeX - e.clientX;
|
|
1124
|
-
if (x < 100) {
|
|
1125
|
-
x = 100;
|
|
1126
|
-
}
|
|
1127
|
-
kupDialog.activeElement.style.width = x + 'px';
|
|
1128
|
-
break;
|
|
1129
|
-
}
|
|
1130
|
-
case KupDialogCoordinates.WEST:
|
|
1131
|
-
case KupDialogCoordinates.NORTHWEST:
|
|
1132
|
-
case KupDialogCoordinates.SOUTHWEST: {
|
|
1133
|
-
x += kupDialog.activeX - e.clientX;
|
|
1134
|
-
if (x < 100) {
|
|
1135
|
-
x = 100;
|
|
1136
|
-
}
|
|
1137
|
-
kupDialog.activeElement.style.width = x + 'px';
|
|
1138
|
-
if (width !== kupDialog.activeElement.offsetWidth) {
|
|
1139
|
-
kupDialog.activeElement.style.left =
|
|
1140
|
-
kupDialog.activeElement.offsetLeft -
|
|
1141
|
-
(kupDialog.startingX - e.clientX) +
|
|
1142
|
-
'px';
|
|
1143
|
-
kupDialog.startingX = e.clientX;
|
|
1144
|
-
}
|
|
1145
|
-
break;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
else {
|
|
1150
|
-
kupDialog.managedElements.forEach((el) => {
|
|
1151
|
-
if (paths.includes(el)) {
|
|
1152
|
-
kupDialog.activeElement = el;
|
|
1153
|
-
}
|
|
1154
|
-
});
|
|
1155
|
-
kupDialog.setCoords(e.clientX, e.clientY, paths);
|
|
1156
|
-
}
|
|
1157
|
-
// Check whether position is inside viewport's contraints
|
|
1158
|
-
if (kupDialog.activeElement) {
|
|
1159
|
-
const rect = kupDialog.activeElement.getBoundingClientRect();
|
|
1160
|
-
if (rect.left < 0) {
|
|
1161
|
-
kupDialog.activeElement.style.left = '0';
|
|
1162
|
-
}
|
|
1163
|
-
else if (rect.right > window.innerWidth) {
|
|
1164
|
-
kupDialog.activeElement.style.left =
|
|
1165
|
-
window.innerWidth - rect.width + 'px';
|
|
1166
|
-
}
|
|
1167
|
-
if (rect.top < 0) {
|
|
1168
|
-
kupDialog.activeElement.style.top = '0';
|
|
1169
|
-
}
|
|
1170
|
-
else if (rect.bottom > window.innerHeight) {
|
|
1171
|
-
kupDialog.activeElement.style.top =
|
|
1172
|
-
window.innerHeight - rect.height + 'px';
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
});
|
|
1176
|
-
__classPrivateFieldSet$2(this, _mouseDown, function (e) {
|
|
1177
|
-
const kupDialog = dom$6.ketchup.dialog;
|
|
1178
|
-
if (kupDialog.activeElement) {
|
|
1179
|
-
switch (kupDialog.coordinates) {
|
|
1180
|
-
case KupDialogCoordinates.ALL:
|
|
1181
|
-
kupDialog.action = KupDialogActions.MOVE;
|
|
1182
|
-
break;
|
|
1183
|
-
case KupDialogCoordinates.UNSET:
|
|
1184
|
-
return;
|
|
1185
|
-
default:
|
|
1186
|
-
kupDialog.action = KupDialogActions.RESIZE;
|
|
1187
|
-
kupDialog.startingHeight =
|
|
1188
|
-
kupDialog.activeElement.offsetHeight;
|
|
1189
|
-
kupDialog.startingWidth =
|
|
1190
|
-
kupDialog.activeElement.offsetWidth;
|
|
1191
|
-
kupDialog.startingX =
|
|
1192
|
-
kupDialog.activeElement.offsetLeft;
|
|
1193
|
-
kupDialog.startingY = kupDialog.activeElement.offsetTop;
|
|
1194
|
-
break;
|
|
1195
|
-
}
|
|
1196
|
-
e.preventDefault();
|
|
1197
|
-
kupDialog.activeX = e.clientX;
|
|
1198
|
-
kupDialog.activeY = e.clientY;
|
|
1199
|
-
kupDialog.activeElement.style.zIndex = (this
|
|
1200
|
-
.zIndex++).toString();
|
|
1201
|
-
}
|
|
1202
|
-
});
|
|
1203
|
-
__classPrivateFieldSet$2(this, _mouseUp, function () {
|
|
1204
|
-
const kupDialog = dom$6.ketchup.dialog;
|
|
1205
|
-
kupDialog.action = null;
|
|
1206
|
-
kupDialog.activeElement = null;
|
|
1207
|
-
});
|
|
1208
|
-
document.addEventListener('mousemove', __classPrivateFieldGet$2(this, _elementDrag));
|
|
1209
|
-
document.addEventListener('mouseup', __classPrivateFieldGet$2(this, _mouseUp));
|
|
1210
|
-
}
|
|
1211
|
-
/**
|
|
1212
|
-
* Checks whether the mouse overs on the edges of the element or not.
|
|
1213
|
-
* @param {number} x - X coordinate.
|
|
1214
|
-
* @param {number} y - Y coordinate.
|
|
1215
|
-
* @param {EventTarget[]} paths - Paths returned from the event. Used to search for the drag handle and, if found, enables dragging.
|
|
1216
|
-
*/
|
|
1217
|
-
setCoords(x, y, paths) {
|
|
1218
|
-
this.coordinates = KupDialogCoordinates.UNSET;
|
|
1219
|
-
if (this.activeElement) {
|
|
1220
|
-
if (this.activeElement.kupDialog.resizable) {
|
|
1221
|
-
// Left border
|
|
1222
|
-
if (x === this.activeElement.offsetLeft ||
|
|
1223
|
-
(x > this.activeElement.offsetLeft &&
|
|
1224
|
-
x < this.activeElement.offsetLeft + this.threshold)) {
|
|
1225
|
-
this.coordinates = KupDialogCoordinates.WEST;
|
|
1226
|
-
}
|
|
1227
|
-
else if (x ===
|
|
1228
|
-
this.activeElement.offsetLeft +
|
|
1229
|
-
this.activeElement.offsetWidth ||
|
|
1230
|
-
(x <
|
|
1231
|
-
this.activeElement.offsetLeft +
|
|
1232
|
-
this.activeElement.offsetWidth &&
|
|
1233
|
-
x >
|
|
1234
|
-
this.activeElement.offsetLeft +
|
|
1235
|
-
this.activeElement.offsetWidth -
|
|
1236
|
-
this.threshold)) {
|
|
1237
|
-
// Right border
|
|
1238
|
-
this.coordinates = KupDialogCoordinates.EAST;
|
|
1239
|
-
}
|
|
1240
|
-
// Top border
|
|
1241
|
-
if (y === this.activeElement.offsetTop ||
|
|
1242
|
-
(y > this.activeElement.offsetTop &&
|
|
1243
|
-
y < this.activeElement.offsetTop + this.threshold)) {
|
|
1244
|
-
if (this.coordinates === KupDialogCoordinates.WEST) {
|
|
1245
|
-
this.coordinates = KupDialogCoordinates.NORTHWEST;
|
|
1246
|
-
}
|
|
1247
|
-
else if (this.coordinates === KupDialogCoordinates.EAST) {
|
|
1248
|
-
this.coordinates = KupDialogCoordinates.NORTHEAST;
|
|
1249
|
-
}
|
|
1250
|
-
else {
|
|
1251
|
-
this.coordinates = KupDialogCoordinates.NORTH;
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
else if (
|
|
1255
|
-
// Bottom border
|
|
1256
|
-
y ===
|
|
1257
|
-
this.activeElement.offsetTop +
|
|
1258
|
-
this.activeElement.offsetHeight ||
|
|
1259
|
-
(y <
|
|
1260
|
-
this.activeElement.offsetTop +
|
|
1261
|
-
this.activeElement.offsetHeight &&
|
|
1262
|
-
y >
|
|
1263
|
-
this.activeElement.offsetTop +
|
|
1264
|
-
this.activeElement.offsetHeight -
|
|
1265
|
-
this.threshold)) {
|
|
1266
|
-
if (this.coordinates === KupDialogCoordinates.WEST) {
|
|
1267
|
-
this.coordinates = KupDialogCoordinates.SOUTHWEST;
|
|
1268
|
-
}
|
|
1269
|
-
else if (this.coordinates === KupDialogCoordinates.EAST) {
|
|
1270
|
-
this.coordinates = KupDialogCoordinates.SOUTHEAST;
|
|
1271
|
-
}
|
|
1272
|
-
else {
|
|
1273
|
-
this.coordinates = KupDialogCoordinates.SOUTH;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
if (this.coordinates === KupDialogCoordinates.UNSET) {
|
|
1278
|
-
if (this.activeElement.kupDialog.dragHandle) {
|
|
1279
|
-
if (paths.includes(this.activeElement.kupDialog.dragHandle)) {
|
|
1280
|
-
this.coordinates = KupDialogCoordinates.ALL;
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
else {
|
|
1284
|
-
this.coordinates = KupDialogCoordinates.ALL;
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
this.activeElement.style.cursor = this.coordinates;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
/**
|
|
1291
|
-
* Watches the element handled as dialog.
|
|
1292
|
-
* @param {DialogElement} el - Dialog element.
|
|
1293
|
-
* @param {HTMLElement} handleEl - Element that must be dragged in order to trigger movement. When not provided, dragging anywhere on "el" will move it.
|
|
1294
|
-
* @param {boolean} unresizable - When true, the dialog can't be resized.
|
|
1295
|
-
*/
|
|
1296
|
-
register(el, handleEl, unresizable) {
|
|
1297
|
-
el.setAttribute(kupDialogAttribute, '');
|
|
1298
|
-
el.style.zIndex = (this.zIndex++).toString();
|
|
1299
|
-
if (!el.style.left) {
|
|
1300
|
-
el.style.left = '0';
|
|
1301
|
-
}
|
|
1302
|
-
if (!el.style.top) {
|
|
1303
|
-
el.style.top = '0';
|
|
1304
|
-
}
|
|
1305
|
-
el.addEventListener('mousedown', (e) => __classPrivateFieldGet$2(this, _mouseDown).call(this, e));
|
|
1306
|
-
el.kupDialog = { dragHandle: null, resizable: true };
|
|
1307
|
-
if (handleEl) {
|
|
1308
|
-
el.kupDialog.dragHandle = handleEl;
|
|
1309
|
-
}
|
|
1310
|
-
if (unresizable) {
|
|
1311
|
-
el.kupDialog.resizable = false;
|
|
1312
|
-
}
|
|
1313
|
-
else {
|
|
1314
|
-
el.classList.add(kupResizableDialogClass);
|
|
1315
|
-
}
|
|
1316
|
-
this.managedElements.add(el);
|
|
1317
|
-
}
|
|
1318
|
-
/**
|
|
1319
|
-
* Removes the elements from the MoveOnDrag class watchlist.
|
|
1320
|
-
* @param {DialogElement[]} elements - Elements to remove.
|
|
1321
|
-
*/
|
|
1322
|
-
unregister(elements) {
|
|
1323
|
-
if (this.managedElements) {
|
|
1324
|
-
for (let index = 0; index < elements.length; index++) {
|
|
1325
|
-
this.managedElements.delete(elements[index]);
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
/**
|
|
1330
|
-
* Returns whether an element was previously registered or not.
|
|
1331
|
-
* @param {DialogElement} el - Element to test.
|
|
1332
|
-
* @returns {boolean} True if the element was registered.
|
|
1333
|
-
*/
|
|
1334
|
-
isRegistered(el) {
|
|
1335
|
-
return !this.managedElements ? false : this.managedElements.has(el);
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
_elementDrag = new WeakMap(), _mouseDown = new WeakMap(), _mouseUp = new WeakMap();
|
|
1339
|
-
|
|
1340
|
-
const dom$5 = document.documentElement;
|
|
1341
|
-
/**
|
|
1342
|
-
* This class is used to dynamically reposition HTML elements.
|
|
1343
|
-
* @module KupDynamicPosition
|
|
1344
|
-
*/
|
|
1345
|
-
class KupDynamicPosition {
|
|
1346
|
-
/**
|
|
1347
|
-
* Initializes KupDynamicPosition.
|
|
1348
|
-
*/
|
|
1349
|
-
constructor() {
|
|
1350
|
-
this.container = document.createElement('div');
|
|
1351
|
-
this.container.setAttribute('kup-dynamic-position', '');
|
|
1352
|
-
document.body.appendChild(this.container);
|
|
1353
|
-
this.managedElements = new Set();
|
|
1354
|
-
}
|
|
1355
|
-
/**
|
|
1356
|
-
* Function used to check whether the anchor point is an HTMLElement or a set of coordinates.
|
|
1357
|
-
* @param {KupDynamicPositionAnchor} anchor - Anchor point.
|
|
1358
|
-
* @returns {anchor is HTMLElement} Returns true when the anchor point is an HTMLElement.
|
|
1359
|
-
*/
|
|
1360
|
-
anchorIsHTMLElement(anchor) {
|
|
1361
|
-
return anchor.tagName !== undefined;
|
|
1362
|
-
}
|
|
1363
|
-
/**
|
|
1364
|
-
* Watches the element eligible to dynamic positioning.
|
|
1365
|
-
* @param {KupDynamicPositionElement} el - Element to reposition.
|
|
1366
|
-
* @param {KupDynamicPositionAnchor} anchorEl - "el" position will be anchored to this element or to these coordinates.
|
|
1367
|
-
* @param {number} margin - "el" distance from its parent in pixels.
|
|
1368
|
-
* @param {KupDynamicPositionPlacement} placement - "el" placement.
|
|
1369
|
-
* @param {boolean} detach - When true, the function won't be recursive but it will be executed only once. "el" will be detached from its original parent and it will be appended to this.container.
|
|
1370
|
-
*/
|
|
1371
|
-
register(el, anchorEl, margin, placement, detach) {
|
|
1372
|
-
if (this.isRegistered(el)) {
|
|
1373
|
-
if (this.anchorIsHTMLElement(anchorEl)) {
|
|
1374
|
-
this.changeAnchor(el, anchorEl);
|
|
1375
|
-
}
|
|
1376
|
-
return;
|
|
1377
|
-
}
|
|
1378
|
-
el.setAttribute(kupDynamicPositionAttribute, '');
|
|
1379
|
-
if (this.anchorIsHTMLElement(anchorEl)) {
|
|
1380
|
-
anchorEl.setAttribute(kupDynamicPositionAnchorAttribute, '');
|
|
1381
|
-
}
|
|
1382
|
-
if (detach) {
|
|
1383
|
-
el.style.position = 'absolute';
|
|
1384
|
-
this.container.appendChild(el);
|
|
1385
|
-
}
|
|
1386
|
-
else {
|
|
1387
|
-
el.style.position = 'fixed';
|
|
1388
|
-
}
|
|
1389
|
-
el.style.zIndex = '1000';
|
|
1390
|
-
el.kupDynamicPosition = {
|
|
1391
|
-
anchor: anchorEl,
|
|
1392
|
-
detach: detach ? true : false,
|
|
1393
|
-
margin: margin ? margin : 0,
|
|
1394
|
-
placement: placement ? placement : exports.KupDynamicPositionPlacement.AUTO,
|
|
1395
|
-
rAF: null,
|
|
1396
|
-
};
|
|
1397
|
-
const mutObserver = new MutationObserver(function (mutations) {
|
|
1398
|
-
const target = mutations[0].target;
|
|
1399
|
-
if (target.classList.contains(kupDynamicPositionActiveClass)) {
|
|
1400
|
-
requestAnimationFrame(function () {
|
|
1401
|
-
dom$5.ketchup.dynamicPosition.run(el);
|
|
1402
|
-
});
|
|
1403
|
-
}
|
|
1404
|
-
});
|
|
1405
|
-
mutObserver.observe(el, {
|
|
1406
|
-
attributes: true,
|
|
1407
|
-
attributeFilter: ['class'],
|
|
1408
|
-
});
|
|
1409
|
-
this.managedElements.add(el);
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* Changes the anchor point of the given element.
|
|
1413
|
-
* @param {KupDynamicPositionElement} elements - Dynamically positioned element previously registered.
|
|
1414
|
-
* @param {HTMLElement} anchorEl - New anchor point.
|
|
1415
|
-
*/
|
|
1416
|
-
changeAnchor(el, anchorEl) {
|
|
1417
|
-
el.kupDynamicPosition.anchor = anchorEl;
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* Removes the element from dynamic position management.
|
|
1421
|
-
* @param {KupDynamicPositionElement[]} elements - Elements to remove from the managed elements set.
|
|
1422
|
-
*/
|
|
1423
|
-
unregister(elements) {
|
|
1424
|
-
if (this.managedElements) {
|
|
1425
|
-
for (let index = 0; index < elements.length; index++) {
|
|
1426
|
-
this.managedElements.delete(elements[index]);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
/**
|
|
1431
|
-
* Returns whether an element was previously registered or not.
|
|
1432
|
-
* @param {KupDynamicPositionElement} el - Element to test.
|
|
1433
|
-
* @returns {boolean} True if the element was registered.
|
|
1434
|
-
*/
|
|
1435
|
-
isRegistered(el) {
|
|
1436
|
-
return !this.managedElements ? false : this.managedElements.has(el);
|
|
1437
|
-
}
|
|
1438
|
-
/**
|
|
1439
|
-
* Starts the process of dynamically reposition the element (which must be firstly initialized through this.setup()).
|
|
1440
|
-
* @param {KupDynamicPositionElement} el - Element to reposition.
|
|
1441
|
-
*/
|
|
1442
|
-
start(el) {
|
|
1443
|
-
el.classList.add(kupDynamicPositionActiveClass);
|
|
1444
|
-
}
|
|
1445
|
-
/**
|
|
1446
|
-
* Ends the process of dynamically reposition the element.
|
|
1447
|
-
* @param {KupDynamicPositionElement} el - Element to reposition.
|
|
1448
|
-
*/
|
|
1449
|
-
stop(el) {
|
|
1450
|
-
el.classList.remove(kupDynamicPositionActiveClass);
|
|
1451
|
-
}
|
|
1452
|
-
/**
|
|
1453
|
-
* This function calculates where to place the element in order to correctly display it attached to its anchor point.
|
|
1454
|
-
* @param {KupDynamicPositionElement} el - Element to reposition.
|
|
1455
|
-
*/
|
|
1456
|
-
run(el) {
|
|
1457
|
-
if (!el.isConnected) {
|
|
1458
|
-
dom$5.ketchup.dynamicPosition.managedElements.delete(el);
|
|
1459
|
-
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
1460
|
-
return;
|
|
1461
|
-
}
|
|
1462
|
-
if (!el.classList.contains(kupDynamicPositionActiveClass)) {
|
|
1463
|
-
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
1464
|
-
return;
|
|
1465
|
-
}
|
|
1466
|
-
// Reset placement
|
|
1467
|
-
el.style.top = '';
|
|
1468
|
-
el.style.right = '';
|
|
1469
|
-
el.style.bottom = '';
|
|
1470
|
-
el.style.left = '';
|
|
1471
|
-
// Fixed position (usually from mouse events).
|
|
1472
|
-
// When anchor doesn't have the tagName property, anchor is considered as a set of coordinates.
|
|
1473
|
-
if (!this.anchorIsHTMLElement(el.kupDynamicPosition.anchor)) {
|
|
1474
|
-
const x = el.kupDynamicPosition.anchor.x;
|
|
1475
|
-
const y = el.kupDynamicPosition.anchor.y;
|
|
1476
|
-
if (el.offsetWidth >
|
|
1477
|
-
window.innerWidth - el.kupDynamicPosition.anchor.x) {
|
|
1478
|
-
el.style.left = x - el.offsetWidth + 'px';
|
|
1479
|
-
}
|
|
1480
|
-
else {
|
|
1481
|
-
el.style.left = x + 'px';
|
|
1482
|
-
}
|
|
1483
|
-
if (el.offsetHeight >
|
|
1484
|
-
window.innerHeight - el.kupDynamicPosition.anchor.y) {
|
|
1485
|
-
el.style.top = y - el.offsetHeight + 'px';
|
|
1486
|
-
}
|
|
1487
|
-
else {
|
|
1488
|
-
el.style.top = y + 'px';
|
|
1489
|
-
}
|
|
1490
|
-
return;
|
|
1491
|
-
}
|
|
1492
|
-
const detached = !!el.kupDynamicPosition.detach;
|
|
1493
|
-
const offsetH = el.clientHeight;
|
|
1494
|
-
const offsetW = el.clientWidth;
|
|
1495
|
-
const rect = el.kupDynamicPosition.anchor.getBoundingClientRect();
|
|
1496
|
-
const top = detached ? window.pageYOffset + rect.top : rect.top, left = detached
|
|
1497
|
-
? window.pageXOffset + rect.left
|
|
1498
|
-
: rect.left, bottom = detached
|
|
1499
|
-
? window.pageYOffset + rect.bottom
|
|
1500
|
-
: rect.bottom, right = detached
|
|
1501
|
-
? window.pageXOffset + rect.right
|
|
1502
|
-
: rect.right;
|
|
1503
|
-
// Vertical position
|
|
1504
|
-
if (el.kupDynamicPosition.placement ===
|
|
1505
|
-
exports.KupDynamicPositionPlacement.TOP ||
|
|
1506
|
-
el.kupDynamicPosition.placement ===
|
|
1507
|
-
exports.KupDynamicPositionPlacement.TOP_LEFT ||
|
|
1508
|
-
el.kupDynamicPosition.placement ===
|
|
1509
|
-
exports.KupDynamicPositionPlacement.TOP_RIGHT) {
|
|
1510
|
-
el.style.bottom = `${window.innerHeight - top + el.kupDynamicPosition.margin}px`;
|
|
1511
|
-
}
|
|
1512
|
-
else if (el.kupDynamicPosition.placement ===
|
|
1513
|
-
exports.KupDynamicPositionPlacement.BOTTOM ||
|
|
1514
|
-
el.kupDynamicPosition.placement ===
|
|
1515
|
-
exports.KupDynamicPositionPlacement.BOTTOM_LEFT ||
|
|
1516
|
-
el.kupDynamicPosition.placement ===
|
|
1517
|
-
exports.KupDynamicPositionPlacement.BOTTOM_RIGHT) {
|
|
1518
|
-
el.style.top = `${bottom + el.kupDynamicPosition.margin}px`;
|
|
1519
|
-
}
|
|
1520
|
-
else {
|
|
1521
|
-
if (window.innerHeight - bottom < offsetH) {
|
|
1522
|
-
el.style.bottom = `${window.innerHeight - top + el.kupDynamicPosition.margin}px`;
|
|
1523
|
-
}
|
|
1524
|
-
else {
|
|
1525
|
-
el.style.top = `${bottom + el.kupDynamicPosition.margin}px`;
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
// Horizontal position
|
|
1529
|
-
if (el.kupDynamicPosition.placement ===
|
|
1530
|
-
exports.KupDynamicPositionPlacement.LEFT ||
|
|
1531
|
-
el.kupDynamicPosition.placement ===
|
|
1532
|
-
exports.KupDynamicPositionPlacement.BOTTOM_LEFT ||
|
|
1533
|
-
el.kupDynamicPosition.placement ===
|
|
1534
|
-
exports.KupDynamicPositionPlacement.TOP_LEFT) {
|
|
1535
|
-
el.style.left = `${left}px`;
|
|
1536
|
-
}
|
|
1537
|
-
else if (el.kupDynamicPosition.placement ===
|
|
1538
|
-
exports.KupDynamicPositionPlacement.RIGHT ||
|
|
1539
|
-
el.kupDynamicPosition.placement ===
|
|
1540
|
-
exports.KupDynamicPositionPlacement.BOTTOM_RIGHT ||
|
|
1541
|
-
el.kupDynamicPosition.placement ===
|
|
1542
|
-
exports.KupDynamicPositionPlacement.TOP_RIGHT) {
|
|
1543
|
-
let scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
1544
|
-
if (scrollbarWidth > 30) {
|
|
1545
|
-
scrollbarWidth = 0;
|
|
1546
|
-
}
|
|
1547
|
-
el.style.right = `${window.innerWidth - scrollbarWidth - right}px`;
|
|
1548
|
-
}
|
|
1549
|
-
else {
|
|
1550
|
-
if (window.innerWidth - left < offsetW) {
|
|
1551
|
-
let scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
1552
|
-
if (scrollbarWidth > 30) {
|
|
1553
|
-
scrollbarWidth = 0;
|
|
1554
|
-
}
|
|
1555
|
-
el.style.right = `${window.innerWidth - scrollbarWidth - right}px`;
|
|
1556
|
-
}
|
|
1557
|
-
else {
|
|
1558
|
-
el.style.left = `${left}px`;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
// Recursive
|
|
1562
|
-
if (!el.kupDynamicPosition.detach) {
|
|
1563
|
-
el.kupDynamicPosition.rAF = requestAnimationFrame(function () {
|
|
1564
|
-
dom$5.ketchup.dynamicPosition.run(el);
|
|
1565
|
-
});
|
|
1566
|
-
}
|
|
1567
|
-
else {
|
|
1568
|
-
cancelAnimationFrame(el.kupDynamicPosition.rAF);
|
|
1569
|
-
return;
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
const chinese = {
|
|
1575
|
-
keys: {
|
|
1576
|
-
checkboxAll: "全部",
|
|
1577
|
-
checkboxChecked: "已检查",
|
|
1578
|
-
checkboxIndeterminate: "不定",
|
|
1579
|
-
checkboxUnchecked: "未检查",
|
|
1580
|
-
columnAdd: "添加栏",
|
|
1581
|
-
columnAddDescription: "添加代码/描述列",
|
|
1582
|
-
columnColumns: "列",
|
|
1583
|
-
columnHide: "隐藏栏",
|
|
1584
|
-
debugAutoprint: "切换自动打印",
|
|
1585
|
-
debugClear: "清除小部件",
|
|
1586
|
-
debugDLAll: "全部",
|
|
1587
|
-
debugDLProps: "下载组件道具",
|
|
1588
|
-
debugDLPropsComp: "下载组件道具",
|
|
1589
|
-
debugDump: "转储存储的日志",
|
|
1590
|
-
debugLanguageChanger: "设置语言",
|
|
1591
|
-
debugLogLimit: "设置日志限制",
|
|
1592
|
-
debugMagicBox: "切换kup-magic-box",
|
|
1593
|
-
debugOff: "关闭调试",
|
|
1594
|
-
debugPrint: "打印已存储的日志",
|
|
1595
|
-
debugThemeChanger: "设置主题",
|
|
1596
|
-
densityDense: "稠密",
|
|
1597
|
-
densityLabel: "行密度",
|
|
1598
|
-
densityMedium: "中等的",
|
|
1599
|
-
densityWide: "宽的",
|
|
1600
|
-
fontsizeBig: "大的",
|
|
1601
|
-
fontsizeLabel: "字体大小",
|
|
1602
|
-
fontsizeMedium: "中等的",
|
|
1603
|
-
fontsizeSmall: "小的",
|
|
1604
|
-
genericAddNew: "添新",
|
|
1605
|
-
genericApply: "申请",
|
|
1606
|
-
genericCollapse: "坍塌",
|
|
1607
|
-
genericDay: "日",
|
|
1608
|
-
genericDragAndDrop: "拖放",
|
|
1609
|
-
genericDropYourData: "将您的数据放在这里",
|
|
1610
|
-
genericEditable: "可编辑的",
|
|
1611
|
-
genericEditableField: "该字段可以编辑",
|
|
1612
|
-
genericEmptyData: "空数据",
|
|
1613
|
-
genericExpand: "扩张",
|
|
1614
|
-
genericExperimentalFeat: "实验功能",
|
|
1615
|
-
genericFilters: "筛选器",
|
|
1616
|
-
genericInfo: "信息",
|
|
1617
|
-
genericInvalidColor: "颜色无效",
|
|
1618
|
-
genericLayoutNotYetImplemented: "布局尚未实施",
|
|
1619
|
-
genericList: "列表",
|
|
1620
|
-
genericLoadMoreData: "加载更多数据",
|
|
1621
|
-
genericMenu: "画面",
|
|
1622
|
-
genericMonth: "月",
|
|
1623
|
-
genericNext: "下一个",
|
|
1624
|
-
genericOpenInNewTab: "在新标签页中打开",
|
|
1625
|
-
genericOpenInNewWindow: "在新窗口中打开",
|
|
1626
|
-
genericOpenNavigationMenu: "打开导航菜单",
|
|
1627
|
-
genericOptions: "选项",
|
|
1628
|
-
genericPrevious: "以前的",
|
|
1629
|
-
genericRemoveFilters: "删除过滤器",
|
|
1630
|
-
genericSettings: "设置",
|
|
1631
|
-
genericShowRowOptions: "显示行选项",
|
|
1632
|
-
genericShowTooltipInfo: "显示工具提示信息",
|
|
1633
|
-
genericSortBy: "排序方式",
|
|
1634
|
-
genericToday: "今天",
|
|
1635
|
-
genericToggle: "切换",
|
|
1636
|
-
genericTotalsTable: "总计表",
|
|
1637
|
-
genericTransposeData: "转置数据",
|
|
1638
|
-
genericViewAs: "查看为",
|
|
1639
|
-
genericWeek: "星期",
|
|
1640
|
-
gridColumn: "柱子",
|
|
1641
|
-
gridComplete: "完全的",
|
|
1642
|
-
gridLabel: "网格类型",
|
|
1643
|
-
gridNone: "没有任何",
|
|
1644
|
-
gridRow: "排",
|
|
1645
|
-
groupingDisable: "禁用分组",
|
|
1646
|
-
groupingEnable: "启用分组",
|
|
1647
|
-
groupingGroups: "团体",
|
|
1648
|
-
pagePage: "页",
|
|
1649
|
-
pageTotal: "总页数",
|
|
1650
|
-
rowDetail: "行详细信息",
|
|
1651
|
-
rowEditableKey: "可编辑的记录键",
|
|
1652
|
-
rowKey: "记录键",
|
|
1653
|
-
rowNext: "下一行",
|
|
1654
|
-
rowPrevious: "上一行",
|
|
1655
|
-
rowRendered: "渲染的行",
|
|
1656
|
-
rowRows: "行数",
|
|
1657
|
-
rowSelected: "选定的行",
|
|
1658
|
-
rowTotal: "总行数",
|
|
1659
|
-
searchFrom: "从",
|
|
1660
|
-
searchSearch: "搜索",
|
|
1661
|
-
searchTo: "至",
|
|
1662
|
-
totalsAverage: "平均数",
|
|
1663
|
-
totalsCalculate: "计算",
|
|
1664
|
-
totalsCancel: "取消",
|
|
1665
|
-
totalsCount: "数数",
|
|
1666
|
-
totalsDistinct: "清楚的",
|
|
1667
|
-
totalsFormula: "公式",
|
|
1668
|
-
totalsMaximum: "最大",
|
|
1669
|
-
totalsMinimum: "最低限度",
|
|
1670
|
-
totalsSum: "和"
|
|
1671
|
-
}
|
|
1672
|
-
};
|
|
1673
|
-
const english = {
|
|
1674
|
-
keys: {
|
|
1675
|
-
checkboxAll: "All",
|
|
1676
|
-
checkboxChecked: "Checked",
|
|
1677
|
-
checkboxIndeterminate: "Indeterminate",
|
|
1678
|
-
checkboxUnchecked: "Unchecked",
|
|
1679
|
-
columnAdd: "Add column",
|
|
1680
|
-
columnAddDescription: "Add code/description column",
|
|
1681
|
-
columnColumns: "Columns",
|
|
1682
|
-
columnHide: "Hide column",
|
|
1683
|
-
debugAutoprint: "Toggle automatic print",
|
|
1684
|
-
debugClear: "Clear widget",
|
|
1685
|
-
debugDLAll: "All",
|
|
1686
|
-
debugDLProps: "Download components props",
|
|
1687
|
-
debugDLPropsComp: "Download component props",
|
|
1688
|
-
debugDump: "Dump stored logs",
|
|
1689
|
-
debugLanguageChanger: "Set language",
|
|
1690
|
-
debugLogLimit: "Set log limit",
|
|
1691
|
-
debugMagicBox: "Toggle kup-magic-box",
|
|
1692
|
-
debugOff: "Turn off debug",
|
|
1693
|
-
debugPrint: "Print logs stored",
|
|
1694
|
-
debugThemeChanger: "Set theme",
|
|
1695
|
-
densityDense: "Dense",
|
|
1696
|
-
densityLabel: "Row density",
|
|
1697
|
-
densityMedium: "Medium",
|
|
1698
|
-
densityWide: "Wide",
|
|
1699
|
-
fontsizeBig: "Big",
|
|
1700
|
-
fontsizeLabel: "Font size",
|
|
1701
|
-
fontsizeMedium: "Medium",
|
|
1702
|
-
fontsizeSmall: "Small",
|
|
1703
|
-
genericAddNew: "Add new",
|
|
1704
|
-
genericApply: "Apply",
|
|
1705
|
-
genericCollapse: "Collapse",
|
|
1706
|
-
genericDay: "Day",
|
|
1707
|
-
genericDragAndDrop: "Drag and drop",
|
|
1708
|
-
genericDropYourData: "Drop your data here",
|
|
1709
|
-
genericEditable: "Editable",
|
|
1710
|
-
genericEditableField: "This field can be edited",
|
|
1711
|
-
genericEmptyData: "Empty data.",
|
|
1712
|
-
genericExpand: "Expand",
|
|
1713
|
-
genericExperimentalFeat: "Experimental feature",
|
|
1714
|
-
genericFilters: "Filters",
|
|
1715
|
-
genericInfo: "Info",
|
|
1716
|
-
genericInvalidColor: "Invalid color",
|
|
1717
|
-
genericLayoutNotYetImplemented: "Layout not yet implemented",
|
|
1718
|
-
genericList: "List",
|
|
1719
|
-
genericLoadMoreData: "Load more data",
|
|
1720
|
-
genericMenu: "Menu",
|
|
1721
|
-
genericMonth: "Month",
|
|
1722
|
-
genericNext: "Next",
|
|
1723
|
-
genericOpenInNewTab: "Open in new tab",
|
|
1724
|
-
genericOpenInNewWindow: "Open in new window",
|
|
1725
|
-
genericOpenNavigationMenu: "Open navigation menu",
|
|
1726
|
-
genericOptions: "Options",
|
|
1727
|
-
genericPrevious: "Previous",
|
|
1728
|
-
genericRemoveFilters: "Remove filters",
|
|
1729
|
-
genericSettings: "Settings",
|
|
1730
|
-
genericShowRowOptions: "Show row options",
|
|
1731
|
-
genericShowTooltipInfo: "Show tooltip info",
|
|
1732
|
-
genericSortBy: "Sort by",
|
|
1733
|
-
genericToday: "Today",
|
|
1734
|
-
genericToggle: "Toggle",
|
|
1735
|
-
genericTotalsTable: "Totals table",
|
|
1736
|
-
genericTransposeData: "Transpose data",
|
|
1737
|
-
genericViewAs: "View as",
|
|
1738
|
-
genericWeek: "Week",
|
|
1739
|
-
gridColumn: "Column",
|
|
1740
|
-
gridComplete: "Complete",
|
|
1741
|
-
gridLabel: "Grid type",
|
|
1742
|
-
gridNone: "None",
|
|
1743
|
-
gridRow: "Row",
|
|
1744
|
-
groupingDisable: "Disable grouping",
|
|
1745
|
-
groupingEnable: "Enable grouping",
|
|
1746
|
-
groupingGroups: "Group",
|
|
1747
|
-
pagePage: "Page",
|
|
1748
|
-
pageTotal: "Total",
|
|
1749
|
-
rowDetail: "Row detail",
|
|
1750
|
-
rowEditableKey: "Editable record key",
|
|
1751
|
-
rowKey: "Record key",
|
|
1752
|
-
rowNext: "Next row",
|
|
1753
|
-
rowPrevious: "Previous row",
|
|
1754
|
-
rowRendered: "Rendered rows",
|
|
1755
|
-
rowRows: "Rows",
|
|
1756
|
-
rowSelected: "Selected rows",
|
|
1757
|
-
rowTotal: "Total rows",
|
|
1758
|
-
searchFrom: "From",
|
|
1759
|
-
searchSearch: "Search",
|
|
1760
|
-
searchTo: "To",
|
|
1761
|
-
totalsAverage: "Average",
|
|
1762
|
-
totalsCalculate: "Calculate",
|
|
1763
|
-
totalsCancel: "Cancel",
|
|
1764
|
-
totalsCount: "Count",
|
|
1765
|
-
totalsDistinct: "Distinct",
|
|
1766
|
-
totalsFormula: "Formula",
|
|
1767
|
-
totalsMaximum: "Maximum",
|
|
1768
|
-
totalsMinimum: "Minimum",
|
|
1769
|
-
totalsSum: "Sum"
|
|
1770
|
-
}
|
|
1771
|
-
};
|
|
1772
|
-
const french = {
|
|
1773
|
-
keys: {
|
|
1774
|
-
checkboxAll: "Tout",
|
|
1775
|
-
checkboxChecked: "Vérifié",
|
|
1776
|
-
checkboxIndeterminate: "Indéterminé",
|
|
1777
|
-
checkboxUnchecked: "Non coché",
|
|
1778
|
-
columnAdd: "Ajouter une colonne",
|
|
1779
|
-
columnAddDescription: "Ajouter une colonne code / description",
|
|
1780
|
-
columnColumns: "Colonnes",
|
|
1781
|
-
columnHide: "Masquer la colonne",
|
|
1782
|
-
debugAutoprint: "Activer l'impression automatique",
|
|
1783
|
-
debugClear: "Effacer le widget",
|
|
1784
|
-
debugDLAll: "Tout",
|
|
1785
|
-
debugDLProps: "Télécharger les accessoires des composants",
|
|
1786
|
-
debugDLPropsComp: "Télécharger les accessoires des composants",
|
|
1787
|
-
debugDump: "Vider les journaux stockés",
|
|
1788
|
-
debugLanguageChanger: "Définir la langue",
|
|
1789
|
-
debugLogLimit: "Définir la limite du journal",
|
|
1790
|
-
debugMagicBox: "Activer / désactiver kup-magic-box",
|
|
1791
|
-
debugOff: "Désactiver le débogage",
|
|
1792
|
-
debugPrint: "Imprimer les journaux stockés",
|
|
1793
|
-
debugThemeChanger: "Définir le thème",
|
|
1794
|
-
densityDense: "Dense",
|
|
1795
|
-
densityLabel: "Densité des rangs",
|
|
1796
|
-
densityMedium: "Moyen",
|
|
1797
|
-
densityWide: "Large",
|
|
1798
|
-
fontsizeBig: "Gros",
|
|
1799
|
-
fontsizeLabel: "Taille de police",
|
|
1800
|
-
fontsizeMedium: "Moyen",
|
|
1801
|
-
fontsizeSmall: "Petit",
|
|
1802
|
-
genericAddNew: "Ajouter un nouveau",
|
|
1803
|
-
genericApply: "Appliquer",
|
|
1804
|
-
genericCollapse: "Effondrer",
|
|
1805
|
-
genericDay: "Jour",
|
|
1806
|
-
genericDragAndDrop: "Glisser-déposer",
|
|
1807
|
-
genericDropYourData: "Déposez vos données ici",
|
|
1808
|
-
genericEditable: "Modifiable",
|
|
1809
|
-
genericEditableField: "Ce champ peut être édité",
|
|
1810
|
-
genericEmptyData: "Données vides",
|
|
1811
|
-
genericExpand: "Étendre",
|
|
1812
|
-
genericExperimentalFeat: "Fonctionnalité expérimentale",
|
|
1813
|
-
genericFilters: "Filtres",
|
|
1814
|
-
genericInfo: "Info",
|
|
1815
|
-
genericInvalidColor: "Couleur invalide",
|
|
1816
|
-
genericLayoutNotYetImplemented: "Mise en page pas encore implémentée",
|
|
1817
|
-
genericList: "Lister",
|
|
1818
|
-
genericLoadMoreData: "Charger plus de données",
|
|
1819
|
-
genericMenu: "Menu",
|
|
1820
|
-
genericMonth: "Mois",
|
|
1821
|
-
genericNext: "Prochain",
|
|
1822
|
-
genericOpenInNewTab: "Ouvrir dans un nouvel onglet",
|
|
1823
|
-
genericOpenInNewWindow: "Ouvrir dans une nouvelle fenêtre",
|
|
1824
|
-
genericOpenNavigationMenu: "Ouvrir le menu de navigation",
|
|
1825
|
-
genericOptions: "Options",
|
|
1826
|
-
genericPrevious: "Précédent",
|
|
1827
|
-
genericRemoveFilters: "Supprimer les filtres",
|
|
1828
|
-
genericSettings: "Paramètres",
|
|
1829
|
-
genericShowRowOptions: "Afficher les options de ligne",
|
|
1830
|
-
genericShowTooltipInfo: "Afficher les informations de l'info-bulle",
|
|
1831
|
-
genericSortBy: "Trier par",
|
|
1832
|
-
genericToday: "Aujourd'hui",
|
|
1833
|
-
genericToggle: "Basculer",
|
|
1834
|
-
genericTotalsTable: "Tableau des totaux",
|
|
1835
|
-
genericTransposeData: "Transposer les données",
|
|
1836
|
-
genericViewAs: "Voir comme",
|
|
1837
|
-
genericWeek: "La semaine",
|
|
1838
|
-
gridColumn: "Colonne",
|
|
1839
|
-
gridComplete: "Compléte",
|
|
1840
|
-
gridLabel: "Type de grille",
|
|
1841
|
-
gridNone: "Rien",
|
|
1842
|
-
gridRow: "Ligne",
|
|
1843
|
-
groupingDisable: "Désactiver le regroupement",
|
|
1844
|
-
groupingEnable: "Activer le regroupement",
|
|
1845
|
-
groupingGroups: "Groupe",
|
|
1846
|
-
pagePage: "Page",
|
|
1847
|
-
pageTotal: "Pages totales",
|
|
1848
|
-
rowDetail: "Détail de la ligne",
|
|
1849
|
-
rowEditableKey: "Clé d'enregistrement modifiable",
|
|
1850
|
-
rowKey: "Clé d'enregistrement",
|
|
1851
|
-
rowNext: "Ligne suivante",
|
|
1852
|
-
rowPrevious: "Ligne précédente",
|
|
1853
|
-
rowRendered: "Lignes rendues",
|
|
1854
|
-
rowRows: "Lignes",
|
|
1855
|
-
rowSelected: "Lignes sélectionnées",
|
|
1856
|
-
rowTotal: "Total des lignes",
|
|
1857
|
-
searchFrom: "De",
|
|
1858
|
-
searchSearch: "Rechercher",
|
|
1859
|
-
searchTo: "À",
|
|
1860
|
-
totalsAverage: "Moyenne",
|
|
1861
|
-
totalsCalculate: "Calculer",
|
|
1862
|
-
totalsCancel: "Annuler",
|
|
1863
|
-
totalsCount: "Compter",
|
|
1864
|
-
totalsDistinct: "Distinct",
|
|
1865
|
-
totalsFormula: "Formule",
|
|
1866
|
-
totalsMaximum: "Maximum",
|
|
1867
|
-
totalsMinimum: "Minimum",
|
|
1868
|
-
totalsSum: "Somme"
|
|
1869
|
-
}
|
|
1870
|
-
};
|
|
1871
|
-
const italian = {
|
|
1872
|
-
keys: {
|
|
1873
|
-
checkboxAll: "Tutti",
|
|
1874
|
-
checkboxChecked: "Selezionato",
|
|
1875
|
-
checkboxIndeterminate: "Indeterminato",
|
|
1876
|
-
checkboxUnchecked: "Non selezionato",
|
|
1877
|
-
columnAdd: "Aggiungi colonna",
|
|
1878
|
-
columnAddDescription: "Aggiungi colonna codice/descrizione",
|
|
1879
|
-
columnColumns: "Colonne",
|
|
1880
|
-
columnHide: "Nascondi colonna",
|
|
1881
|
-
debugAutoprint: "Attiva stampa automatica logs",
|
|
1882
|
-
debugClear: "Pulisci widget",
|
|
1883
|
-
debugDLAll: "Tutto",
|
|
1884
|
-
debugDLProps: "Scarica props componenti",
|
|
1885
|
-
debugDLPropsComp: "Scarica props del componente",
|
|
1886
|
-
debugDump: "Svuota cache dei logs",
|
|
1887
|
-
debugLanguageChanger: "Cambia lingua",
|
|
1888
|
-
debugLogLimit: "Imposta limite log",
|
|
1889
|
-
debugMagicBox: "Attiva kup-magic-box",
|
|
1890
|
-
debugOff: "Disattiva debug",
|
|
1891
|
-
debugPrint: "Stampa logs immagazzinati",
|
|
1892
|
-
debugThemeChanger: "Cambia tema",
|
|
1893
|
-
densityDense: "Densa",
|
|
1894
|
-
densityLabel: "Densità righe",
|
|
1895
|
-
densityMedium: "Media",
|
|
1896
|
-
densityWide: "Ampia",
|
|
1897
|
-
fontsizeBig: "Grande",
|
|
1898
|
-
fontsizeLabel: "Dimensione caratteri",
|
|
1899
|
-
fontsizeMedium: "Media",
|
|
1900
|
-
fontsizeSmall: "Piccola",
|
|
1901
|
-
genericAddNew: "Aggiungi nuovo",
|
|
1902
|
-
genericApply: "Applica",
|
|
1903
|
-
genericCollapse: "Chiudi",
|
|
1904
|
-
genericDay: "Giorno",
|
|
1905
|
-
genericDragAndDrop: "Drag & drop",
|
|
1906
|
-
genericDropYourData: "Trascina qui i tuoi dati",
|
|
1907
|
-
genericEditable: "Editabile",
|
|
1908
|
-
genericEditableField: "Questo campo è editabile",
|
|
1909
|
-
genericEmptyData: "Nessun dato da visualizzare.",
|
|
1910
|
-
genericExpand: "Espandi",
|
|
1911
|
-
genericExperimentalFeat: "Funzionalità sperimentale",
|
|
1912
|
-
genericFilters: "Filtri",
|
|
1913
|
-
genericInfo: "Informazioni",
|
|
1914
|
-
genericInvalidColor: "Colore invalido",
|
|
1915
|
-
genericLayoutNotYetImplemented: "Layout non ancora implementato",
|
|
1916
|
-
genericList: "Lista",
|
|
1917
|
-
genericLoadMoreData: "Carica più dati",
|
|
1918
|
-
genericMenu: "Menu",
|
|
1919
|
-
genericMonth: "Mese",
|
|
1920
|
-
genericNext: "Avanti",
|
|
1921
|
-
genericOpenInNewTab: "Apri in nuovo tab",
|
|
1922
|
-
genericOpenInNewWindow: "Apri in nuova finestra",
|
|
1923
|
-
genericOpenNavigationMenu: "Apri menu di navigazione",
|
|
1924
|
-
genericOptions: "Opzioni",
|
|
1925
|
-
genericPrevious: "Indietro",
|
|
1926
|
-
genericRemoveFilters: "Rimuovi filtri",
|
|
1927
|
-
genericSettings: "Impostazioni",
|
|
1928
|
-
genericShowRowOptions: "Mostra opzioni di riga",
|
|
1929
|
-
genericShowTooltipInfo: "Mostra informazioni tooltip",
|
|
1930
|
-
genericSortBy: "Ordina per",
|
|
1931
|
-
genericToday: "Oggi",
|
|
1932
|
-
genericToggle: "Attiva",
|
|
1933
|
-
genericTotalsTable: "Tabella dei totali",
|
|
1934
|
-
genericTransposeData: "Trasposizione dati",
|
|
1935
|
-
genericViewAs: "Vedi come",
|
|
1936
|
-
genericWeek: "Settimana",
|
|
1937
|
-
gridColumn: "Colonna",
|
|
1938
|
-
gridComplete: "Completa",
|
|
1939
|
-
gridLabel: "Tipo di griglia",
|
|
1940
|
-
gridNone: "Nessuna",
|
|
1941
|
-
gridRow: "Riga",
|
|
1942
|
-
groupingDisable: "Disabilita gruppo",
|
|
1943
|
-
groupingEnable: "Abilita gruppo",
|
|
1944
|
-
groupingGroups: "Gruppo",
|
|
1945
|
-
pagePage: "Pagina",
|
|
1946
|
-
pageTotal: "Totale",
|
|
1947
|
-
rowDetail: "Dettaglio riga",
|
|
1948
|
-
rowEditableKey: "Chiave record editabile",
|
|
1949
|
-
rowKey: "Chiave record",
|
|
1950
|
-
rowNext: "Riga successiva",
|
|
1951
|
-
rowPrevious: "Riga precedente",
|
|
1952
|
-
rowRendered: "Righe renderizzate",
|
|
1953
|
-
rowRows: "Righe",
|
|
1954
|
-
rowSelected: "Righe selezionate",
|
|
1955
|
-
rowTotal: "Righe totali",
|
|
1956
|
-
searchFrom: "Da...",
|
|
1957
|
-
searchSearch: "Cerca...",
|
|
1958
|
-
searchTo: "A...",
|
|
1959
|
-
totalsAverage: "Media",
|
|
1960
|
-
totalsCalculate: "Calcola",
|
|
1961
|
-
totalsCancel: "Cancella",
|
|
1962
|
-
totalsCount: "Conta",
|
|
1963
|
-
totalsDistinct: "Distinct",
|
|
1964
|
-
totalsFormula: "Formula",
|
|
1965
|
-
totalsMinimum: "Minimo",
|
|
1966
|
-
totalsMaximum: "Massimo",
|
|
1967
|
-
totalsSum: "Somma"
|
|
1968
|
-
},
|
|
1969
|
-
variants: {
|
|
1970
|
-
smeup: {
|
|
1971
|
-
keys: {
|
|
1972
|
-
genericEditableField: "Questo OAV è editabile",
|
|
1973
|
-
genericTotalsTable: "Matrice dei totali",
|
|
1974
|
-
groupingDisable: "Disabilita raggruppamento",
|
|
1975
|
-
groupingEnable: "Abilita raggruppamento",
|
|
1976
|
-
groupingGroups: "Raggruppamento",
|
|
1977
|
-
rowEditableKey: "K01 (editabile)",
|
|
1978
|
-
rowKey: "K01"
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
};
|
|
1983
|
-
const polish = {
|
|
1984
|
-
keys: {
|
|
1985
|
-
checkboxAll: "Wszystko",
|
|
1986
|
-
checkboxChecked: "Sprawdzone",
|
|
1987
|
-
checkboxIndeterminate: "Nieokreślony",
|
|
1988
|
-
checkboxUnchecked: "Niepowstrzymany",
|
|
1989
|
-
columnAdd: "Dodaj kolumnę",
|
|
1990
|
-
columnAddDescription: "Dodaj kolumnę z kodem / opisem",
|
|
1991
|
-
columnColumns: "Kolumny",
|
|
1992
|
-
columnHide: "Ukryj kolumnę",
|
|
1993
|
-
debugAutoprint: "Przełącz automatyczne drukowanie",
|
|
1994
|
-
debugClear: "Wyczyść widżet",
|
|
1995
|
-
debugDLAll: "Wszystko",
|
|
1996
|
-
debugDLProps: "Pobierz właściwości komponentów",
|
|
1997
|
-
debugDLPropsComp: "Pobierz rekwizyty komponentów",
|
|
1998
|
-
debugDump: "Zrzuć zapisane dzienniki",
|
|
1999
|
-
debugLanguageChanger: "Ustaw język",
|
|
2000
|
-
debugLogLimit: "Ustaw limit logów",
|
|
2001
|
-
debugMagicBox: "Przełącz kup-magic-box",
|
|
2002
|
-
debugOff: "Wyłącz debugowanie",
|
|
2003
|
-
debugPrint: "Drukuj zapisane logi",
|
|
2004
|
-
debugThemeChanger: "Ustaw motyw",
|
|
2005
|
-
densityDense: "Gęsty",
|
|
2006
|
-
densityLabel: "Gęstość rzędów",
|
|
2007
|
-
densityMedium: "Średni",
|
|
2008
|
-
densityWide: "Szeroki",
|
|
2009
|
-
fontsizeBig: "Duży",
|
|
2010
|
-
fontsizeLabel: "Rozmiar czcionki",
|
|
2011
|
-
fontsizeMedium: "Średni",
|
|
2012
|
-
fontsizeSmall: "Mały",
|
|
2013
|
-
genericAddNew: "Dodaj nowe",
|
|
2014
|
-
genericApply: "Zastosować",
|
|
2015
|
-
genericCollapse: "Zawalić się",
|
|
2016
|
-
genericDay: "Dzień",
|
|
2017
|
-
genericDragAndDrop: "Przeciągnij i upuść",
|
|
2018
|
-
genericDropYourData: "Upuść swoje dane tutaj",
|
|
2019
|
-
genericEditable: "Edytowalne",
|
|
2020
|
-
genericEditableField: "To pole można edytować",
|
|
2021
|
-
genericEmptyData: "Puste dane",
|
|
2022
|
-
genericExpand: "Rozszerzać",
|
|
2023
|
-
genericExperimentalFeat: "Funkcja eksperymentalna",
|
|
2024
|
-
genericFilters: "Filtry",
|
|
2025
|
-
genericInfo: "Informacje",
|
|
2026
|
-
genericInvalidColor: "Nieprawidłowy kolor",
|
|
2027
|
-
genericLayoutNotYetImplemented: "Układ nie został jeszcze zaimplementowany",
|
|
2028
|
-
genericList: "Lista",
|
|
2029
|
-
genericLoadMoreData: "Załaduj więcej danych",
|
|
2030
|
-
genericMenu: "Menu",
|
|
2031
|
-
genericMonth: "Miesiąc",
|
|
2032
|
-
genericNext: "Następny",
|
|
2033
|
-
genericOpenInNewTab: "Otwórz w nowej karcie",
|
|
2034
|
-
genericOpenInNewWindow: "Otworzyć w nowym oknie",
|
|
2035
|
-
genericOpenNavigationMenu: "Otwórz menu nawigacyjne",
|
|
2036
|
-
genericOptions: "Opcje",
|
|
2037
|
-
genericPrevious: "Poprzedni",
|
|
2038
|
-
genericRemoveFilters: "Usuń filtry",
|
|
2039
|
-
genericSettings: "Ustawienia",
|
|
2040
|
-
genericShowRowOptions: "Pokaż opcje wierszy",
|
|
2041
|
-
genericShowTooltipInfo: "Pokaż informacje w podpowiedzi",
|
|
2042
|
-
genericSortBy: "Sortuj według",
|
|
2043
|
-
genericToday: "Dziś",
|
|
2044
|
-
genericToggle: "Przełącznik",
|
|
2045
|
-
genericTotalsTable: "Tabela sum",
|
|
2046
|
-
genericTransposeData: "Transpozycja danych",
|
|
2047
|
-
genericViewAs: "Wyświetl jako",
|
|
2048
|
-
genericWeek: "Tydzień",
|
|
2049
|
-
gridColumn: "Kolumna",
|
|
2050
|
-
gridComplete: "Kompletny",
|
|
2051
|
-
gridLabel: "Typ siatki",
|
|
2052
|
-
gridNone: "Żaden",
|
|
2053
|
-
gridRow: "Rząd",
|
|
2054
|
-
groupingDisable: "Wyłącz grupowanie",
|
|
2055
|
-
groupingEnable: "Włącz grupowanie",
|
|
2056
|
-
groupingGroups: "Grupy",
|
|
2057
|
-
pagePage: "Strona",
|
|
2058
|
-
pageTotal: "Wszystkie strony",
|
|
2059
|
-
rowDetail: "Szczegóły rzędu",
|
|
2060
|
-
rowEditableKey: "Edytowalny klucz nagrywania",
|
|
2061
|
-
rowKey: "Klucz nagrywania",
|
|
2062
|
-
rowNext: "Następny rząd",
|
|
2063
|
-
rowPrevious: "Poprzedni wiersz",
|
|
2064
|
-
rowRendered: "Renderowane wiersze",
|
|
2065
|
-
rowRows: "Wydziwianie",
|
|
2066
|
-
rowSelected: "Wybrane wiersze",
|
|
2067
|
-
rowTotal: "Łączna liczba wierszy",
|
|
2068
|
-
searchFrom: "Z",
|
|
2069
|
-
searchSearch: "Szukaj",
|
|
2070
|
-
searchTo: "Do",
|
|
2071
|
-
totalsAverage: "Średni",
|
|
2072
|
-
totalsCalculate: "Oblicz",
|
|
2073
|
-
totalsCancel: "Anuluj",
|
|
2074
|
-
totalsCount: "Liczyć",
|
|
2075
|
-
totalsDistinct: "Odrębny",
|
|
2076
|
-
totalsFormula: "Formuła",
|
|
2077
|
-
totalsMinimum: "Minimo",
|
|
2078
|
-
totalsMaximum: "Maksymalny",
|
|
2079
|
-
totalsSum: "Suma"
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
const russian = {
|
|
2083
|
-
keys: {
|
|
2084
|
-
checkboxAll: "Все",
|
|
2085
|
-
checkboxChecked: "Проверено",
|
|
2086
|
-
checkboxIndeterminate: "Неопределенный",
|
|
2087
|
-
checkboxUnchecked: "Не отмечено",
|
|
2088
|
-
columnAdd: "Добавить столбец",
|
|
2089
|
-
columnAddDescription: "Добавить столбец кода / описания",
|
|
2090
|
-
columnColumns: "Столбцы",
|
|
2091
|
-
columnHide: "Скрыть столбец",
|
|
2092
|
-
debugAutoprint: "Включить автоматическую печать",
|
|
2093
|
-
debugClear: "Очистить виджет",
|
|
2094
|
-
debugDLAll: "Все",
|
|
2095
|
-
debugDLProps: "Загрузить свойства компонентов",
|
|
2096
|
-
debugDLPropsComp: "Скачать реквизиты компонентов",
|
|
2097
|
-
debugDump: "Дамп сохраненных журналов",
|
|
2098
|
-
debugLanguageChanger: "Установить язык",
|
|
2099
|
-
debugLogLimit: "Установить ограничение журнала",
|
|
2100
|
-
debugMagicBox: "Переключить волшебный ящик купа",
|
|
2101
|
-
debugOff: "Отключить отладку",
|
|
2102
|
-
debugPrint: "Печать сохраненных журналов",
|
|
2103
|
-
debugThemeChanger: "Установить тему",
|
|
2104
|
-
densityDense: "Плотный",
|
|
2105
|
-
densityLabel: "Плотность строк",
|
|
2106
|
-
densityMedium: "Середина",
|
|
2107
|
-
densityWide: "Широкий",
|
|
2108
|
-
fontsizeBig: "Большой",
|
|
2109
|
-
fontsizeLabel: "Размер шрифта",
|
|
2110
|
-
fontsizeMedium: "Середина",
|
|
2111
|
-
fontsizeSmall: "Небольшой",
|
|
2112
|
-
genericAddNew: "Добавить новое",
|
|
2113
|
-
genericApply: "Применять",
|
|
2114
|
-
genericCollapse: "Крах",
|
|
2115
|
-
genericDay: "День",
|
|
2116
|
-
genericDragAndDrop: "Перетащить и отпустить",
|
|
2117
|
-
genericDropYourData: "Перетащите сюда свои данные",
|
|
2118
|
-
genericEditable: "Редактируемый",
|
|
2119
|
-
genericEditableField: "Это поле можно редактировать",
|
|
2120
|
-
genericEmptyData: "Пустые данные",
|
|
2121
|
-
genericExpand: "Расширять",
|
|
2122
|
-
genericExperimentalFeat: "Экспериментальная особенность",
|
|
2123
|
-
genericFilters: "Фильтры",
|
|
2124
|
-
genericInfo: "Информация",
|
|
2125
|
-
genericInvalidColor: "Неверный цвет",
|
|
2126
|
-
genericLayoutNotYetImplemented: "Макет еще не реализован",
|
|
2127
|
-
genericList: "Список",
|
|
2128
|
-
genericLoadMoreData: "Загрузить больше данных",
|
|
2129
|
-
genericMenu: "Меню",
|
|
2130
|
-
genericMonth: "Месяц",
|
|
2131
|
-
genericNext: "Следующий",
|
|
2132
|
-
genericOpenInNewTab: "Открыть в новой вкладке",
|
|
2133
|
-
genericOpenInNewWindow: "Открыть в новом окне",
|
|
2134
|
-
genericOpenNavigationMenu: "Открыть меню навигации",
|
|
2135
|
-
genericOptions: "Параметры",
|
|
2136
|
-
genericPrevious: "Предыдущий",
|
|
2137
|
-
genericRemoveFilters: "Удалить фильтры",
|
|
2138
|
-
genericSettings: "Настройки",
|
|
2139
|
-
genericShowRowOptions: "Показать параметры строки",
|
|
2140
|
-
genericShowTooltipInfo: "Показать информацию во всплывающей подсказке",
|
|
2141
|
-
genericSortBy: "Сортировать по",
|
|
2142
|
-
genericToday: "Сегодня",
|
|
2143
|
-
genericToggle: "Переключать",
|
|
2144
|
-
genericTotalsTable: "Итоговая таблица",
|
|
2145
|
-
genericTransposeData: "Транспонировать данные",
|
|
2146
|
-
genericViewAs: "Просмотреть как",
|
|
2147
|
-
genericWeek: "Неделя",
|
|
2148
|
-
gridColumn: "Столбец",
|
|
2149
|
-
gridComplete: "Полный",
|
|
2150
|
-
gridLabel: "Тип сетки",
|
|
2151
|
-
gridNone: "Никто",
|
|
2152
|
-
gridRow: "Строка",
|
|
2153
|
-
groupingDisable: "Отключить группировку",
|
|
2154
|
-
groupingEnable: "Включить группировку",
|
|
2155
|
-
groupingGroups: "Группы",
|
|
2156
|
-
pagePage: "Страница",
|
|
2157
|
-
pageTotal: "Всего страниц",
|
|
2158
|
-
rowDetail: "Детали строки",
|
|
2159
|
-
rowEditableKey: "Редактируемый ключ записи",
|
|
2160
|
-
rowKey: "Ключ записи",
|
|
2161
|
-
rowNext: "Следующая строка",
|
|
2162
|
-
rowPrevious: "Предыдущая строка",
|
|
2163
|
-
rowRendered: "Отрисованные строки",
|
|
2164
|
-
rowRows: "Рядов",
|
|
2165
|
-
rowSelected: "Выбранные строки",
|
|
2166
|
-
rowTotal: "Всего строк",
|
|
2167
|
-
searchFrom: "Из",
|
|
2168
|
-
searchSearch: "Поиск",
|
|
2169
|
-
searchTo: "К",
|
|
2170
|
-
totalsAverage: "В среднем",
|
|
2171
|
-
totalsCalculate: "Рассчитать",
|
|
2172
|
-
totalsCancel: "Отмена",
|
|
2173
|
-
totalsCount: "Считать",
|
|
2174
|
-
totalsDistinct: "Отчетливый",
|
|
2175
|
-
totalsFormula: "Формула",
|
|
2176
|
-
totalsMinimum: "Минимум",
|
|
2177
|
-
totalsMaximum: "Максимум",
|
|
2178
|
-
totalsSum: "Сумма"
|
|
2179
|
-
}
|
|
2180
|
-
};
|
|
2181
|
-
const spanish = {
|
|
2182
|
-
keys: {
|
|
2183
|
-
checkboxAll: "Todas",
|
|
2184
|
-
checkboxChecked: "Marcado",
|
|
2185
|
-
checkboxIndeterminate: "Indeterminado",
|
|
2186
|
-
checkboxUnchecked: "Sin marcar",
|
|
2187
|
-
columnAdd: "Añadir columna",
|
|
2188
|
-
columnAddDescription: "Agregar columna de código / descripción",
|
|
2189
|
-
columnColumns: "Columnas",
|
|
2190
|
-
columnHide: "Ocultar columna",
|
|
2191
|
-
debugAutoprint: "Alternar impresión automática",
|
|
2192
|
-
debugClear: "Borrar widget",
|
|
2193
|
-
debugDLAll: "Todas",
|
|
2194
|
-
debugDLProps: "Descargar accesorios de componentes",
|
|
2195
|
-
debugDLPropsComp: "Descargar accesorios de componentes",
|
|
2196
|
-
debugDump: "Volcar registros almacenados",
|
|
2197
|
-
debugLanguageChanger: "Establecer idioma",
|
|
2198
|
-
debugLogLimit: "Establecer límite de registro",
|
|
2199
|
-
debugMagicBox: "Alternar kup-magic-box",
|
|
2200
|
-
debugOff: "Desactivar depuración",
|
|
2201
|
-
debugPrint: "Imprimir registros almacenados",
|
|
2202
|
-
debugThemeChanger: "Establecer tema",
|
|
2203
|
-
densityDense: "Densa",
|
|
2204
|
-
densityLabel: "Densidad de hileras",
|
|
2205
|
-
densityMedium: "Medio",
|
|
2206
|
-
densityWide: "Amplia",
|
|
2207
|
-
fontsizeBig: "Grande",
|
|
2208
|
-
fontsizeLabel: "Tamaño de fuente",
|
|
2209
|
-
fontsizeMedium: "Medio",
|
|
2210
|
-
fontsizeSmall: "Pequeño",
|
|
2211
|
-
genericAddNew: "Añadir nuevo",
|
|
2212
|
-
genericApply: "Solicitar",
|
|
2213
|
-
genericCollapse: "Colapso",
|
|
2214
|
-
genericDay: "Día",
|
|
2215
|
-
genericDragAndDrop: "Arrastrar y soltar",
|
|
2216
|
-
genericDropYourData: "Deja tus datos aquí",
|
|
2217
|
-
genericEditable: "Editable",
|
|
2218
|
-
genericEditableField: "Este campo se puede editar",
|
|
2219
|
-
genericEmptyData: "Datos vacíos",
|
|
2220
|
-
genericExpand: "Expandir",
|
|
2221
|
-
genericExperimentalFeat: "Característica experimental",
|
|
2222
|
-
genericFilters: "Filtros",
|
|
2223
|
-
genericInfo: "Información",
|
|
2224
|
-
genericInvalidColor: "Color inválido",
|
|
2225
|
-
genericLayoutNotYetImplemented: "Diseño aún no implementado",
|
|
2226
|
-
genericList: "Lista",
|
|
2227
|
-
genericLoadMoreData: "Cargar más datos",
|
|
2228
|
-
genericMenu: "Menú",
|
|
2229
|
-
genericMonth: "Mes",
|
|
2230
|
-
genericNext: "Próximo",
|
|
2231
|
-
genericOpenInNewTab: "Abrir en una pestaña nueva",
|
|
2232
|
-
genericOpenInNewWindow: "Abrir en Nueva ventana",
|
|
2233
|
-
genericOpenNavigationMenu: "Abrir menú de navegación",
|
|
2234
|
-
genericOptions: "Opciones",
|
|
2235
|
-
genericPrevious: "Previo",
|
|
2236
|
-
genericRemoveFilters: "Quitar filtros",
|
|
2237
|
-
genericSettings: "Ajustes",
|
|
2238
|
-
genericShowRowOptions: "Mostrar opciones de fila",
|
|
2239
|
-
genericShowTooltipInfo: "Mostrar información de información sobre herramientas",
|
|
2240
|
-
genericSortBy: "Ordenar por",
|
|
2241
|
-
genericToday: "Hoy dia",
|
|
2242
|
-
genericToggle: "Palanca",
|
|
2243
|
-
genericTotalsTable: "Tabla de totales",
|
|
2244
|
-
genericTransposeData: "Transponer datos",
|
|
2245
|
-
genericViewAs: "Visto como",
|
|
2246
|
-
genericWeek: "Semana",
|
|
2247
|
-
gridColumn: "Columna",
|
|
2248
|
-
gridComplete: "Completa",
|
|
2249
|
-
gridLabel: "Tipo de cuadrícula",
|
|
2250
|
-
gridNone: "Ninguna",
|
|
2251
|
-
gridRow: "Fila",
|
|
2252
|
-
groupingDisable: "Desactivar agrupación",
|
|
2253
|
-
groupingEnable: "Habilitar agrupación",
|
|
2254
|
-
groupingGroups: "Grupo",
|
|
2255
|
-
pagePage: "Página",
|
|
2256
|
-
pageTotal: "Paginas totales",
|
|
2257
|
-
rowDetail: "Detalle de fila",
|
|
2258
|
-
rowEditableKey: "Clave de registro editable",
|
|
2259
|
-
rowKey: "Grabar clave",
|
|
2260
|
-
rowNext: "Siguiente fila",
|
|
2261
|
-
rowPrevious: "Fila anterior",
|
|
2262
|
-
rowRendered: "Filas renderizadas",
|
|
2263
|
-
rowRows: "Filas",
|
|
2264
|
-
rowSelected: "Filas seleccionadas",
|
|
2265
|
-
rowTotal: "Filas totales",
|
|
2266
|
-
searchFrom: "De",
|
|
2267
|
-
searchSearch: "Buscar",
|
|
2268
|
-
searchTo: "A",
|
|
2269
|
-
totalsAverage: "Promedio",
|
|
2270
|
-
totalsCalculate: "Calcular",
|
|
2271
|
-
totalsCancel: "Cancelar",
|
|
2272
|
-
totalsCount: "Contar",
|
|
2273
|
-
totalsDistinct: "Distinct",
|
|
2274
|
-
totalsFormula: "Fórmula",
|
|
2275
|
-
totalsMaximum: "Máximo",
|
|
2276
|
-
totalsMinimum: "Mínimo",
|
|
2277
|
-
totalsSum: "Suma"
|
|
2278
|
-
}
|
|
2279
|
-
};
|
|
2280
|
-
const languages = {
|
|
2281
|
-
chinese: chinese,
|
|
2282
|
-
english: english,
|
|
2283
|
-
french: french,
|
|
2284
|
-
italian: italian,
|
|
2285
|
-
polish: polish,
|
|
2286
|
-
russian: russian,
|
|
2287
|
-
spanish: spanish
|
|
2288
|
-
};
|
|
2289
|
-
|
|
2290
|
-
const dom$4 = document.documentElement;
|
|
2291
|
-
/**
|
|
2292
|
-
* Handles the translation to different languages.
|
|
2293
|
-
* @module KupLanguage
|
|
2294
|
-
*/
|
|
2295
|
-
class KupLanguage {
|
|
2296
|
-
/**
|
|
2297
|
-
* Initializes KupLanguage.
|
|
2298
|
-
* @param {KupLanguageJSON} list - Overrides the default languages.json.
|
|
2299
|
-
* @param {string} name - Starting language. Can be a combination of language and variant (separated by "_").
|
|
2300
|
-
*/
|
|
2301
|
-
constructor(list, name) {
|
|
2302
|
-
this.list = list ? list : languages;
|
|
2303
|
-
this.managedComponents = new Set();
|
|
2304
|
-
this.name = name ? name : KupLanguageDefaults.en;
|
|
2305
|
-
}
|
|
2306
|
-
/**
|
|
2307
|
-
* Translates the string to the given language.
|
|
2308
|
-
* When translation fails, the key will be displayed in place of the string - this way it will be easier to correct missing string <-> key bounds.
|
|
2309
|
-
* @param {KupLanguageKey} key - Key of a string to be translated.
|
|
2310
|
-
* @param {string} language - Language to translate the string to. When not provided, KupLanguage current language will be used.
|
|
2311
|
-
* @returns {string} Translated string or initial string (when translation failed).
|
|
2312
|
-
*/
|
|
2313
|
-
translate(key, language) {
|
|
2314
|
-
const decodedLanguage = this.decodeLanguage(language ? language : this.name);
|
|
2315
|
-
const name = decodedLanguage.language;
|
|
2316
|
-
const variantName = decodedLanguage.variant;
|
|
2317
|
-
try {
|
|
2318
|
-
let translatedString = null;
|
|
2319
|
-
if (variantName) {
|
|
2320
|
-
const variants = this.list[name].variants;
|
|
2321
|
-
if (variants &&
|
|
2322
|
-
variants[variantName] &&
|
|
2323
|
-
variants[variantName].keys[key]) {
|
|
2324
|
-
translatedString = variants[variantName].keys[key];
|
|
2325
|
-
}
|
|
2326
|
-
else {
|
|
2327
|
-
translatedString = this.list[name].keys[key];
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
else {
|
|
2331
|
-
translatedString = this.list[name].keys[key];
|
|
2332
|
-
}
|
|
2333
|
-
if (translatedString) {
|
|
2334
|
-
return translatedString;
|
|
2335
|
-
}
|
|
2336
|
-
else {
|
|
2337
|
-
return invalidKey(key);
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
catch (error) {
|
|
2341
|
-
return invalidKey(key);
|
|
2342
|
-
}
|
|
2343
|
-
function invalidKey(key) {
|
|
2344
|
-
dom$4.ketchup.debug.logMessage('kup-language', 'Invalid translation for key (' + key + ')!', exports.KupDebugCategory.WARNING);
|
|
2345
|
-
return key;
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
/**
|
|
2349
|
-
* Changes the current Ketch.UP language to the one provided. If the language argument contains a "_", a combo of language and variant will be assumed.
|
|
2350
|
-
* @param {string} language - The new language. If not present in this.list, this function will keep the previous language.
|
|
2351
|
-
*/
|
|
2352
|
-
set(language) {
|
|
2353
|
-
if (language && typeof language === 'string') {
|
|
2354
|
-
language = language.toLowerCase();
|
|
2355
|
-
}
|
|
2356
|
-
else {
|
|
2357
|
-
dom$4.ketchup.debug.logMessage('kup-language', "Couldn't set language, invalid string received (" +
|
|
2358
|
-
language +
|
|
2359
|
-
')!', exports.KupDebugCategory.WARNING);
|
|
2360
|
-
return;
|
|
2361
|
-
}
|
|
2362
|
-
const decodedLanguage = this.decodeLanguage(language);
|
|
2363
|
-
const dLanguage = decodedLanguage.language;
|
|
2364
|
-
const dVariant = decodedLanguage.variant;
|
|
2365
|
-
if (this.list[dLanguage]) {
|
|
2366
|
-
if (dVariant && !this.list[dLanguage].variants[dVariant]) {
|
|
2367
|
-
dom$4.ketchup.debug.logMessage('kup-language', 'Variant not found (' + dVariant + ')!', exports.KupDebugCategory.WARNING);
|
|
2368
|
-
return;
|
|
2369
|
-
}
|
|
2370
|
-
}
|
|
2371
|
-
else {
|
|
2372
|
-
dom$4.ketchup.debug.logMessage('kup-language', 'Language not found (' + dLanguage + ')!', exports.KupDebugCategory.WARNING);
|
|
2373
|
-
return;
|
|
2374
|
-
}
|
|
2375
|
-
this.name = language;
|
|
2376
|
-
this.managedComponents.forEach(function (comp) {
|
|
2377
|
-
if (comp.isConnected) {
|
|
2378
|
-
comp.refresh();
|
|
2379
|
-
}
|
|
2380
|
-
});
|
|
2381
|
-
document.dispatchEvent(new CustomEvent('kup-language-change'));
|
|
2382
|
-
}
|
|
2383
|
-
/**
|
|
2384
|
-
* Checks whether the language is a combination of main language and variant (separated by "_"), returning them splitted in an object.
|
|
2385
|
-
* @param {string} language - Language to check.
|
|
2386
|
-
* @returns {KupLanguageDecode} Object containing language and variant.
|
|
2387
|
-
*/
|
|
2388
|
-
decodeLanguage(language) {
|
|
2389
|
-
const result = {
|
|
2390
|
-
language: null,
|
|
2391
|
-
variant: null,
|
|
2392
|
-
};
|
|
2393
|
-
const separator = language.indexOf('_');
|
|
2394
|
-
if (separator > -1) {
|
|
2395
|
-
result.variant = language.substr(separator + 1);
|
|
2396
|
-
result.language = language.substr(0, separator);
|
|
2397
|
-
}
|
|
2398
|
-
else {
|
|
2399
|
-
result.language = language;
|
|
2400
|
-
}
|
|
2401
|
-
return result;
|
|
2402
|
-
}
|
|
2403
|
-
/**
|
|
2404
|
-
* Gets the name of available languages.
|
|
2405
|
-
* @returns {Array<string>} Array of languages' names.
|
|
2406
|
-
*/
|
|
2407
|
-
getLanguages() {
|
|
2408
|
-
const languages = [];
|
|
2409
|
-
for (var key in this.list) {
|
|
2410
|
-
if (this.list.hasOwnProperty(key)) {
|
|
2411
|
-
const language = this.list[key];
|
|
2412
|
-
languages.push(key);
|
|
2413
|
-
for (const variantKey in language.variants) {
|
|
2414
|
-
languages.push(key + '_' + variantKey);
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
return languages;
|
|
2419
|
-
}
|
|
2420
|
-
/**
|
|
2421
|
-
* Registers a KupComponent in KupLanguage, in order to be properly handled whenever the language changes.
|
|
2422
|
-
* @param {any} component - The component calling this function.
|
|
2423
|
-
*/
|
|
2424
|
-
register(component) {
|
|
2425
|
-
this.managedComponents.add(component.rootElement);
|
|
2426
|
-
}
|
|
2427
|
-
/**
|
|
2428
|
-
* Unregisters a KupComponent, so it won't be handled when the theme changes.
|
|
2429
|
-
*
|
|
2430
|
-
* @param {any} component - The component calling this function.
|
|
2431
|
-
*/
|
|
2432
|
-
unregister(component) {
|
|
2433
|
-
if (this.managedComponents) {
|
|
2434
|
-
this.managedComponents.delete(component.rootElement);
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
/**
|
|
2440
|
-
* The direction to which ScollableElement can be scrolled.
|
|
2441
|
-
*/
|
|
2442
|
-
var ScrollOnHoverDirection;
|
|
2443
|
-
(function (ScrollOnHoverDirection) {
|
|
2444
|
-
ScrollOnHoverDirection["LEFT"] = "left";
|
|
2445
|
-
ScrollOnHoverDirection["RIGHT"] = "right";
|
|
2446
|
-
})(ScrollOnHoverDirection || (ScrollOnHoverDirection = {}));
|
|
2447
|
-
|
|
2448
|
-
var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
2449
|
-
if (!privateMap.has(receiver)) {
|
|
2450
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
2451
|
-
}
|
|
2452
|
-
privateMap.set(receiver, value);
|
|
2453
|
-
return value;
|
|
2454
|
-
};
|
|
2455
|
-
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
2456
|
-
if (!privateMap.has(receiver)) {
|
|
2457
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
2458
|
-
}
|
|
2459
|
-
return privateMap.get(receiver);
|
|
2460
|
-
};
|
|
2461
|
-
var _arrowsContainer, _leftArrows, _rightArrows, _scrollEvent, _mousemoveEvent, _mouseleaveEvent, _rAF, _timeout;
|
|
2462
|
-
const dom$3 = document.documentElement;
|
|
2463
|
-
/**
|
|
2464
|
-
* Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
|
|
2465
|
-
* @module KupScrollOnHover
|
|
2466
|
-
*/
|
|
2467
|
-
class KupScrollOnHover {
|
|
2468
|
-
/**
|
|
2469
|
-
* Initializes KupScrollOnHover.
|
|
2470
|
-
* @param {number} delay - Sets the time in milliseconds before the scrolling starts when mouse-hovering.
|
|
2471
|
-
* @param {number} step - The amount in pixels for each scroll recursion.
|
|
2472
|
-
*/
|
|
2473
|
-
constructor(delay, step) {
|
|
2474
|
-
_arrowsContainer.set(this, void 0);
|
|
2475
|
-
_leftArrows.set(this, void 0);
|
|
2476
|
-
_rightArrows.set(this, void 0);
|
|
2477
|
-
_scrollEvent.set(this, void 0);
|
|
2478
|
-
_mousemoveEvent.set(this, void 0);
|
|
2479
|
-
_mouseleaveEvent.set(this, void 0);
|
|
2480
|
-
_rAF.set(this, void 0);
|
|
2481
|
-
_timeout.set(this, void 0);
|
|
2482
|
-
this.delay = delay ? delay : 500;
|
|
2483
|
-
this.managedElements = new Set();
|
|
2484
|
-
this.step = step ? step : 50;
|
|
2485
|
-
__classPrivateFieldSet$1(this, _arrowsContainer, document.createElement('div'));
|
|
2486
|
-
__classPrivateFieldSet$1(this, _leftArrows, []);
|
|
2487
|
-
__classPrivateFieldSet$1(this, _mouseleaveEvent, (event) => this.stop(event.target));
|
|
2488
|
-
__classPrivateFieldSet$1(this, _mousemoveEvent, (event) => this.start(event));
|
|
2489
|
-
__classPrivateFieldSet$1(this, _rAF, null);
|
|
2490
|
-
__classPrivateFieldSet$1(this, _rightArrows, []);
|
|
2491
|
-
__classPrivateFieldSet$1(this, _scrollEvent, (event) => this.updateChildren(event.target));
|
|
2492
|
-
__classPrivateFieldSet$1(this, _timeout, null);
|
|
2493
|
-
__classPrivateFieldGet$1(this, _arrowsContainer).id = 'kup-scrolling-arrows';
|
|
2494
|
-
for (let index = 1; index < 4; index++) {
|
|
2495
|
-
const arrow = document.createElement('div');
|
|
2496
|
-
arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
|
|
2497
|
-
__classPrivateFieldGet$1(this, _leftArrows).push(arrow);
|
|
2498
|
-
}
|
|
2499
|
-
for (let index = 1; index < 4; index++) {
|
|
2500
|
-
const arrow = document.createElement('div');
|
|
2501
|
-
arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
|
|
2502
|
-
__classPrivateFieldGet$1(this, _rightArrows).push(arrow);
|
|
2503
|
-
}
|
|
2504
|
-
__classPrivateFieldGet$1(this, _arrowsContainer).append(__classPrivateFieldGet$1(this, _leftArrows)[2], __classPrivateFieldGet$1(this, _leftArrows)[1], __classPrivateFieldGet$1(this, _leftArrows)[0], __classPrivateFieldGet$1(this, _rightArrows)[0], __classPrivateFieldGet$1(this, _rightArrows)[1], __classPrivateFieldGet$1(this, _rightArrows)[2]);
|
|
2505
|
-
this.container = document.createElement('div');
|
|
2506
|
-
this.container.setAttribute('kup-scroll-on-hover', '');
|
|
2507
|
-
this.container.appendChild(__classPrivateFieldGet$1(this, _arrowsContainer));
|
|
2508
|
-
document.body.appendChild(this.container);
|
|
2509
|
-
}
|
|
2510
|
-
/**
|
|
2511
|
-
* Watches the given element in order to trigger the scroll on hover when conditions are met.
|
|
2512
|
-
* Children nodes with the "hover-scrolling-child" will be watched and scrolled when el scrolls.
|
|
2513
|
-
* @param {KupScrollOnHoverElement} el - Element to watch.
|
|
2514
|
-
*/
|
|
2515
|
-
register(el) {
|
|
2516
|
-
el.style.overflowX = 'auto';
|
|
2517
|
-
el.scrollOnHover = {
|
|
2518
|
-
active: false,
|
|
2519
|
-
children: el.querySelectorAll('.hover-scrolling-child'),
|
|
2520
|
-
rect: null,
|
|
2521
|
-
x: 0,
|
|
2522
|
-
y: 0,
|
|
2523
|
-
};
|
|
2524
|
-
if (el.scrollOnHover.children) {
|
|
2525
|
-
el.addEventListener('scroll', __classPrivateFieldGet$1(this, _scrollEvent));
|
|
2526
|
-
}
|
|
2527
|
-
el.addEventListener('mousemove', __classPrivateFieldGet$1(this, _mousemoveEvent));
|
|
2528
|
-
el.addEventListener('mouseleave', __classPrivateFieldGet$1(this, _mouseleaveEvent));
|
|
2529
|
-
this.managedElements.add(el);
|
|
2530
|
-
}
|
|
2531
|
-
/**
|
|
2532
|
-
* Removes the given element from ScrollOnHover watchlist.
|
|
2533
|
-
* @param {KupScrollOnHoverElement} el - Element to unregister.
|
|
2534
|
-
*/
|
|
2535
|
-
unregister(el) {
|
|
2536
|
-
el.removeEventListener('scroll', __classPrivateFieldGet$1(this, _scrollEvent));
|
|
2537
|
-
el.removeEventListener('mousemove', __classPrivateFieldGet$1(this, _mousemoveEvent));
|
|
2538
|
-
el.removeEventListener('mouseleave', __classPrivateFieldGet$1(this, _mouseleaveEvent));
|
|
2539
|
-
if (this.managedElements) {
|
|
2540
|
-
this.managedElements.delete(el);
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
/**
|
|
2544
|
-
* Returns whether an element was previously registered or not.
|
|
2545
|
-
* @param {KupScrollOnHoverElement} el - Element to test.
|
|
2546
|
-
* @returns {boolean} True if the element was registered.
|
|
2547
|
-
*/
|
|
2548
|
-
isRegistered(el) {
|
|
2549
|
-
return !this.managedElements ? false : this.managedElements.has(el);
|
|
2550
|
-
}
|
|
2551
|
-
/**
|
|
2552
|
-
* When called, this function prepares the class for the scrolling process.
|
|
2553
|
-
* @param {MouseEvent} event - The starter event, which should be a MouseMove event.
|
|
2554
|
-
*/
|
|
2555
|
-
async start(event) {
|
|
2556
|
-
const el = event.currentTarget;
|
|
2557
|
-
el.scrollOnHover.rect = el.getBoundingClientRect();
|
|
2558
|
-
el.scrollOnHover.x = event.clientX;
|
|
2559
|
-
el.scrollOnHover.y = event.clientY;
|
|
2560
|
-
__classPrivateFieldGet$1(this, _arrowsContainer).style.left = event.clientX + 'px';
|
|
2561
|
-
__classPrivateFieldGet$1(this, _arrowsContainer).style.top = event.clientY + 'px';
|
|
2562
|
-
if (el.scrollOnHover.active || __classPrivateFieldGet$1(this, _timeout)) {
|
|
2563
|
-
return;
|
|
2564
|
-
}
|
|
2565
|
-
let trueWidth = el.clientWidth;
|
|
2566
|
-
if (trueWidth === 0) {
|
|
2567
|
-
trueWidth = el.offsetWidth;
|
|
2568
|
-
}
|
|
2569
|
-
if (el.scrollWidth > trueWidth + 10) {
|
|
2570
|
-
if (trueWidth !== 0 && !el.scrollOnHover.active) {
|
|
2571
|
-
const percRight = trueWidth - trueWidth * 0.1;
|
|
2572
|
-
const percLeft = trueWidth - trueWidth * 0.9;
|
|
2573
|
-
const elOffset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
2574
|
-
const maxScrollLeft = el.scrollWidth - trueWidth;
|
|
2575
|
-
const direction = elOffset < percLeft && el.scrollLeft !== 0
|
|
2576
|
-
? ScrollOnHoverDirection.LEFT
|
|
2577
|
-
: elOffset > percRight &&
|
|
2578
|
-
el.scrollLeft !== maxScrollLeft
|
|
2579
|
-
? ScrollOnHoverDirection.RIGHT
|
|
2580
|
-
: null;
|
|
2581
|
-
if (direction) {
|
|
2582
|
-
for (let i = 0; i < 3; i++) {
|
|
2583
|
-
if (direction === ScrollOnHoverDirection.LEFT) {
|
|
2584
|
-
__classPrivateFieldGet$1(this, _leftArrows)[i].classList.add('kup-activated');
|
|
2585
|
-
}
|
|
2586
|
-
else {
|
|
2587
|
-
__classPrivateFieldGet$1(this, _rightArrows)[i].classList.add('kup-activated');
|
|
2588
|
-
}
|
|
2589
|
-
}
|
|
2590
|
-
__classPrivateFieldSet$1(this, _timeout, setTimeout(() => {
|
|
2591
|
-
el.scrollOnHover.active = true;
|
|
2592
|
-
__classPrivateFieldSet$1(this, _rAF, requestAnimationFrame(function () {
|
|
2593
|
-
dom$3.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
|
|
2594
|
-
}));
|
|
2595
|
-
}, this.delay));
|
|
2596
|
-
}
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
/**
|
|
2601
|
-
* When called, this function stops the scrolling process.
|
|
2602
|
-
* @param {KupScrollOnHoverElement} el - The scrolled element.
|
|
2603
|
-
*/
|
|
2604
|
-
async stop(el) {
|
|
2605
|
-
el.scrollOnHover.active = false;
|
|
2606
|
-
cancelAnimationFrame(__classPrivateFieldGet$1(this, _rAF));
|
|
2607
|
-
clearTimeout(__classPrivateFieldGet$1(this, _timeout));
|
|
2608
|
-
__classPrivateFieldSet$1(this, _timeout, null);
|
|
2609
|
-
for (let i = 0; i < __classPrivateFieldGet$1(this, _leftArrows).length; i++) {
|
|
2610
|
-
__classPrivateFieldGet$1(this, _leftArrows)[i].classList.remove('kup-activated');
|
|
2611
|
-
__classPrivateFieldGet$1(this, _leftArrows)[i].classList.remove('kup-animated');
|
|
2612
|
-
}
|
|
2613
|
-
for (let i = 0; i < __classPrivateFieldGet$1(this, _rightArrows).length; i++) {
|
|
2614
|
-
__classPrivateFieldGet$1(this, _rightArrows)[i].classList.remove('kup-activated');
|
|
2615
|
-
__classPrivateFieldGet$1(this, _rightArrows)[i].classList.remove('kup-animated');
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
/**
|
|
2619
|
-
* The actual recursive scroll function.
|
|
2620
|
-
* @param {KupScrollOnHoverElement} el - The scrolled element.
|
|
2621
|
-
* @param {number} maxScrollLeft - Left coordinates to which the recursiveness must be stopped.
|
|
2622
|
-
* @param {number} percRight - Range of the right scrollable area.
|
|
2623
|
-
* @param {number} percLeft - Range of the left scrollable area.
|
|
2624
|
-
* @param {ScrollOnHoverDirection} direction - Direction of the scroll.
|
|
2625
|
-
*/
|
|
2626
|
-
run(el, maxScrollLeft, percRight, percLeft, direction) {
|
|
2627
|
-
if (!el.scrollOnHover.active) {
|
|
2628
|
-
this.stop(el);
|
|
2629
|
-
return;
|
|
2630
|
-
}
|
|
2631
|
-
const offset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
|
|
2632
|
-
if (offset > percLeft && offset < percRight) {
|
|
2633
|
-
this.stop(el);
|
|
2634
|
-
return;
|
|
2635
|
-
}
|
|
2636
|
-
if (direction === ScrollOnHoverDirection.RIGHT && percRight > offset) {
|
|
2637
|
-
this.stop(el);
|
|
2638
|
-
return;
|
|
2639
|
-
}
|
|
2640
|
-
if (direction === ScrollOnHoverDirection.LEFT && percLeft < offset) {
|
|
2641
|
-
this.stop(el);
|
|
2642
|
-
return;
|
|
2643
|
-
}
|
|
2644
|
-
if (el.scrollOnHover.children) {
|
|
2645
|
-
this.updateChildren(el);
|
|
2646
|
-
}
|
|
2647
|
-
let arrow;
|
|
2648
|
-
if (direction === ScrollOnHoverDirection.LEFT) {
|
|
2649
|
-
arrow = __classPrivateFieldGet$1(this, _leftArrows);
|
|
2650
|
-
if (el.scrollLeft === 0) {
|
|
2651
|
-
this.stop(el);
|
|
2652
|
-
return;
|
|
2653
|
-
}
|
|
2654
|
-
el.scrollLeft -= this.step;
|
|
2655
|
-
}
|
|
2656
|
-
else {
|
|
2657
|
-
arrow = __classPrivateFieldGet$1(this, _rightArrows);
|
|
2658
|
-
if (el.scrollLeft === maxScrollLeft) {
|
|
2659
|
-
this.stop(el);
|
|
2660
|
-
return;
|
|
2661
|
-
}
|
|
2662
|
-
el.scrollLeft += this.step;
|
|
2663
|
-
}
|
|
2664
|
-
for (let i = 0; i < arrow.length; i++) {
|
|
2665
|
-
arrow[i].classList.add('kup-animated');
|
|
2666
|
-
}
|
|
2667
|
-
__classPrivateFieldSet$1(this, _rAF, requestAnimationFrame(function () {
|
|
2668
|
-
dom$3.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
|
|
2669
|
-
}));
|
|
2670
|
-
}
|
|
2671
|
-
/**
|
|
2672
|
-
* Scrolls children of the element having the "hover-scrolling-child" class
|
|
2673
|
-
* @param {KupScrollOnHoverElement} el - The scrolled element.
|
|
2674
|
-
*/
|
|
2675
|
-
updateChildren(el) {
|
|
2676
|
-
for (let i = 0; i < el.scrollOnHover.children.length; i++) {
|
|
2677
|
-
el.scrollOnHover.children[i].scrollLeft = el.scrollLeft;
|
|
2678
|
-
}
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
_arrowsContainer = new WeakMap(), _leftArrows = new WeakMap(), _rightArrows = new WeakMap(), _scrollEvent = new WeakMap(), _mousemoveEvent = new WeakMap(), _mouseleaveEvent = new WeakMap(), _rAF = new WeakMap(), _timeout = new WeakMap();
|
|
2682
|
-
|
|
2683
|
-
const bubbles = {
|
|
2684
|
-
cssVariables: {
|
|
2685
|
-
"--kup-primary-color": "#c18f00",
|
|
2686
|
-
"--kup-secondary-color": "#1d1d1d",
|
|
2687
|
-
"--kup-background-color": "#ffffff",
|
|
2688
|
-
"--kup-navbar-background-color": "#beb08d",
|
|
2689
|
-
"--kup-navbar-color": "#ffffff",
|
|
2690
|
-
"--kup-drawer-background-color": "#ffffff",
|
|
2691
|
-
"--kup-drawer-color": "#000000",
|
|
2692
|
-
"--kup-navbar-height": "64px",
|
|
2693
|
-
"--kup-drawer-width": "300px",
|
|
2694
|
-
"--kup-font-family": "Lato, sans-serif",
|
|
2695
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
2696
|
-
"--kup-font-size": "14px",
|
|
2697
|
-
"--kup-text-color": "#2e2e2e",
|
|
2698
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
2699
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
2700
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
2701
|
-
"--kup-disabled-color": "#5c5c5c",
|
|
2702
|
-
"--kup-hover-background-color": "#f0f0f0",
|
|
2703
|
-
"--kup-hover-color": "#545454",
|
|
2704
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
2705
|
-
"--kup-title-color": "#2e2e2e",
|
|
2706
|
-
"--kup-icon-color": "#505050",
|
|
2707
|
-
"--kup-border-color": "#e0e0e0",
|
|
2708
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
2709
|
-
"--kup-info-color": "#2592df",
|
|
2710
|
-
"--kup-success-color": "#4d9f02",
|
|
2711
|
-
"--kup-warning-color": "#ffc107",
|
|
2712
|
-
"--kup-danger-color": "#d91e18",
|
|
2713
|
-
"--kup-spinner-color": "#1D1D1B",
|
|
2714
|
-
"--kup-chart-color-1": "#ff5959",
|
|
2715
|
-
"--kup-chart-color-2": "#e0a0a0",
|
|
2716
|
-
"--kup-chart-color-3": "#8e1010",
|
|
2717
|
-
"--kup-chart-color-4": "#f5f5dc",
|
|
2718
|
-
"--kup-obj-cursor": "inherit",
|
|
2719
|
-
"--kup-drawer-zindex": "90",
|
|
2720
|
-
"--kup-navbar-zindex": "90"
|
|
2721
|
-
},
|
|
2722
|
-
icons: {
|
|
2723
|
-
"--kup-ascending-icon": "sort-ascending",
|
|
2724
|
-
"--kup-descending-icon": "sort-descending",
|
|
2725
|
-
"--kup-expanded-icon": "chevron-down",
|
|
2726
|
-
"--kup-collapsed-icon": "chevron_right",
|
|
2727
|
-
"--kup-dropdown-icon": "chevron-down",
|
|
2728
|
-
"--kup-clear-icon": "clear",
|
|
2729
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
2730
|
-
"--kup-key-icon": "key-variant",
|
|
2731
|
-
"--kup-search-icon": "search"
|
|
2732
|
-
},
|
|
2733
|
-
customStyles: {
|
|
2734
|
-
},
|
|
2735
|
-
imports: [
|
|
2736
|
-
"@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap')"
|
|
2737
|
-
]
|
|
2738
|
-
};
|
|
2739
|
-
const cobalt = {
|
|
2740
|
-
cssVariables: {
|
|
2741
|
-
"--kup-primary-color": "#248aff",
|
|
2742
|
-
"--kup-secondary-color": "#65cbe9",
|
|
2743
|
-
"--kup-background-color": "#222222",
|
|
2744
|
-
"--kup-navbar-background-color": "#131313",
|
|
2745
|
-
"--kup-navbar-color": "#65cbe9",
|
|
2746
|
-
"--kup-drawer-background-color": "#2e2e2e",
|
|
2747
|
-
"--kup-drawer-color": "#65cbe9",
|
|
2748
|
-
"--kup-navbar-height": "64px",
|
|
2749
|
-
"--kup-drawer-width": "300px",
|
|
2750
|
-
"--kup-font-family": "Blinker, sans-serif;",
|
|
2751
|
-
"--kup-font-family-monospace": "Andalé Mono, monospace",
|
|
2752
|
-
"--kup-font-size": "14px",
|
|
2753
|
-
"--kup-text-color": "#65cbe9",
|
|
2754
|
-
"--kup-text-on-primary-color": "#f1f7ff",
|
|
2755
|
-
"--kup-text-on-secondary-color": "#000000",
|
|
2756
|
-
"--kup-disabled-background-color": "#3c3c3c",
|
|
2757
|
-
"--kup-disabled-color": "#7e7e7e",
|
|
2758
|
-
"--kup-hover-background-color": "#383838",
|
|
2759
|
-
"--kup-hover-color": "#96e7ff",
|
|
2760
|
-
"--kup-title-background-color": "#2e2e2e",
|
|
2761
|
-
"--kup-title-color": "#f5f5f5",
|
|
2762
|
-
"--kup-icon-color": "#65cbe9",
|
|
2763
|
-
"--kup-border-color": "#535353",
|
|
2764
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
2765
|
-
"--kup-info-color": "#2592df",
|
|
2766
|
-
"--kup-success-color": "#4d9f02",
|
|
2767
|
-
"--kup-warning-color": "#ffc107",
|
|
2768
|
-
"--kup-danger-color": "#d91e18",
|
|
2769
|
-
"--kup-spinner-color": "#a4d9f7",
|
|
2770
|
-
"--kup-chart-color-1": "#308aff",
|
|
2771
|
-
"--kup-chart-color-2": "#5eb6d1",
|
|
2772
|
-
"--kup-chart-color-3": "#b1eafb",
|
|
2773
|
-
"--kup-chart-color-4": "#ffffff",
|
|
2774
|
-
"--kup-obj-cursor": "inherit",
|
|
2775
|
-
"--kup-drawer-zindex": "90",
|
|
2776
|
-
"--kup-navbar-zindex": "90"
|
|
2777
|
-
},
|
|
2778
|
-
icons: {
|
|
2779
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
2780
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
2781
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
2782
|
-
"--kup-collapsed-icon": "menu-right",
|
|
2783
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
2784
|
-
"--kup-clear-icon": "cancel",
|
|
2785
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
2786
|
-
"--kup-key-icon": "key-variant",
|
|
2787
|
-
"--kup-search-icon": "search"
|
|
2788
|
-
},
|
|
2789
|
-
imports: [
|
|
2790
|
-
"url('https://fonts.googleapis.com/css2?family=Blinker:wght@200;300;600&display=swap')"
|
|
2791
|
-
]
|
|
2792
|
-
};
|
|
2793
|
-
const dark = {
|
|
2794
|
-
cssVariables: {
|
|
2795
|
-
"--kup-primary-color": "#82f0e2",
|
|
2796
|
-
"--kup-secondary-color": "#f9ff00",
|
|
2797
|
-
"--kup-background-color": "#2d2d2d",
|
|
2798
|
-
"--kup-navbar-background-color": "#2d2d2d",
|
|
2799
|
-
"--kup-navbar-color": "#ffffff",
|
|
2800
|
-
"--kup-drawer-background-color": "#1f1f1f",
|
|
2801
|
-
"--kup-drawer-color": "#f5f5f5",
|
|
2802
|
-
"--kup-navbar-height": "64px",
|
|
2803
|
-
"--kup-drawer-width": "300px",
|
|
2804
|
-
"--kup-font-family": "Lato, sans-serif",
|
|
2805
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
2806
|
-
"--kup-font-size": "14px",
|
|
2807
|
-
"--kup-text-color": "#f5f5f5",
|
|
2808
|
-
"--kup-text-on-primary-color": "#555555",
|
|
2809
|
-
"--kup-text-on-secondary-color": "#000000",
|
|
2810
|
-
"--kup-disabled-background-color": "#3c3c3c",
|
|
2811
|
-
"--kup-disabled-color": "#7e7e7e",
|
|
2812
|
-
"--kup-hover-background-color": "#3c3c3c",
|
|
2813
|
-
"--kup-hover-color": "#dddddd",
|
|
2814
|
-
"--kup-title-background-color": "#111111",
|
|
2815
|
-
"--kup-title-color": "#f5f5f5",
|
|
2816
|
-
"--kup-icon-color": "#e0e0e0",
|
|
2817
|
-
"--kup-border-color": "#535353",
|
|
2818
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
2819
|
-
"--kup-info-color": "#2592df",
|
|
2820
|
-
"--kup-success-color": "#4d9f02",
|
|
2821
|
-
"--kup-warning-color": "#ffc107",
|
|
2822
|
-
"--kup-danger-color": "#d91e18",
|
|
2823
|
-
"--kup-spinner-color": "#f2e114",
|
|
2824
|
-
"--kup-chart-color-1": "#60c3fc",
|
|
2825
|
-
"--kup-chart-color-2": "#e268d8",
|
|
2826
|
-
"--kup-chart-color-3": "#860bb5",
|
|
2827
|
-
"--kup-chart-color-4": "#1a83e4",
|
|
2828
|
-
"--kup-obj-cursor": "inherit",
|
|
2829
|
-
"--kup-drawer-zindex": "90",
|
|
2830
|
-
"--kup-navbar-zindex": "90"
|
|
2831
|
-
},
|
|
2832
|
-
icons: {
|
|
2833
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
2834
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
2835
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
2836
|
-
"--kup-collapsed-icon": "menu-right",
|
|
2837
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
2838
|
-
"--kup-clear-icon": "cancel",
|
|
2839
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
2840
|
-
"--kup-key-icon": "key-variant",
|
|
2841
|
-
"--kup-search-icon": "search"
|
|
2842
|
-
},
|
|
2843
|
-
imports: [
|
|
2844
|
-
"@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap')"
|
|
2845
|
-
]
|
|
2846
|
-
};
|
|
2847
|
-
const flamingo = {
|
|
2848
|
-
cssVariables: {
|
|
2849
|
-
"--kup-primary-color": "#e88aab",
|
|
2850
|
-
"--kup-secondary-color": "#7f00e7",
|
|
2851
|
-
"--kup-background-color": "#222222",
|
|
2852
|
-
"--kup-navbar-background-color": "#2d2d2d",
|
|
2853
|
-
"--kup-navbar-color": "#ffffff",
|
|
2854
|
-
"--kup-drawer-background-color": "#1f1f1f",
|
|
2855
|
-
"--kup-drawer-color": "#f5f5f5",
|
|
2856
|
-
"--kup-navbar-height": "64px",
|
|
2857
|
-
"--kup-drawer-width": "300px",
|
|
2858
|
-
"--kup-font-family": "Mali, cursive;",
|
|
2859
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
2860
|
-
"--kup-font-size": "14px",
|
|
2861
|
-
"--kup-text-color": "#f5f5f5",
|
|
2862
|
-
"--kup-text-on-primary-color": "#000000",
|
|
2863
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
2864
|
-
"--kup-disabled-background-color": "#3c3c3c",
|
|
2865
|
-
"--kup-disabled-color": "#7e7e7e",
|
|
2866
|
-
"--kup-hover-background-color": "#3c3c3c",
|
|
2867
|
-
"--kup-hover-color": "#dddddd",
|
|
2868
|
-
"--kup-title-background-color": "#111111",
|
|
2869
|
-
"--kup-title-color": "#f5f5f5",
|
|
2870
|
-
"--kup-icon-color": "#e0e0e0",
|
|
2871
|
-
"--kup-border-color": "#535353",
|
|
2872
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
2873
|
-
"--kup-info-color": "#2592df",
|
|
2874
|
-
"--kup-success-color": "#4d9f02",
|
|
2875
|
-
"--kup-warning-color": "#ffc107",
|
|
2876
|
-
"--kup-danger-color": "#d91e18",
|
|
2877
|
-
"--kup-spinner-color": "#ffd0d8",
|
|
2878
|
-
"--kup-chart-color-1": "#e88aab",
|
|
2879
|
-
"--kup-chart-color-2": "#dc5584",
|
|
2880
|
-
"--kup-chart-color-3": "#c21350",
|
|
2881
|
-
"--kup-chart-color-4": "#c88da1",
|
|
2882
|
-
"--kup-obj-cursor": "inherit",
|
|
2883
|
-
"--kup-drawer-zindex": "90",
|
|
2884
|
-
"--kup-navbar-zindex": "90"
|
|
2885
|
-
},
|
|
2886
|
-
icons: {
|
|
2887
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
2888
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
2889
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
2890
|
-
"--kup-collapsed-icon": "menu-right",
|
|
2891
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
2892
|
-
"--kup-clear-icon": "cancel",
|
|
2893
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
2894
|
-
"--kup-key-icon": "key-variant",
|
|
2895
|
-
"--kup-search-icon": "search"
|
|
2896
|
-
},
|
|
2897
|
-
imports: [
|
|
2898
|
-
"url('https://fonts.googleapis.com/css2?family=Mali:wght@300&display=swap')"
|
|
2899
|
-
]
|
|
2900
|
-
};
|
|
2901
|
-
const graphite = {
|
|
2902
|
-
cssVariables: {
|
|
2903
|
-
"--kup-primary-color": "#888888",
|
|
2904
|
-
"--kup-secondary-color": "#d91e18",
|
|
2905
|
-
"--kup-background-color": "#ffffff",
|
|
2906
|
-
"--kup-navbar-background-color": "#535353",
|
|
2907
|
-
"--kup-navbar-color": "#ffffff",
|
|
2908
|
-
"--kup-drawer-background-color": "#ffffff",
|
|
2909
|
-
"--kup-drawer-color": "#545454",
|
|
2910
|
-
"--kup-navbar-height": "64px",
|
|
2911
|
-
"--kup-drawer-width": "300px",
|
|
2912
|
-
"--kup-font-family": "Roboto, sans-serif",
|
|
2913
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
2914
|
-
"--kup-font-size": "13px",
|
|
2915
|
-
"--kup-text-color": "#545454",
|
|
2916
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
2917
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
2918
|
-
"--kup-disabled-color": "#5c5c5c",
|
|
2919
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
2920
|
-
"--kup-hover-background-color": "#f0f0f0",
|
|
2921
|
-
"--kup-hover-color": "#545454",
|
|
2922
|
-
"--kup-title-background-color": "#f0f0f0",
|
|
2923
|
-
"--kup-title-color": "#545454",
|
|
2924
|
-
"--kup-icon-color": "#808080",
|
|
2925
|
-
"--kup-border-color": "#e0e0e0",
|
|
2926
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
2927
|
-
"--kup-info-color": "#2592df",
|
|
2928
|
-
"--kup-success-color": "#4d9f02",
|
|
2929
|
-
"--kup-warning-color": "#ffc107",
|
|
2930
|
-
"--kup-danger-color": "#d91e18",
|
|
2931
|
-
"--kup-spinner-color": "#eaa710",
|
|
2932
|
-
"--kup-chart-color-1": "red",
|
|
2933
|
-
"--kup-chart-color-2": "blue",
|
|
2934
|
-
"--kup-chart-color-3": "orange",
|
|
2935
|
-
"--kup-chart-color-4": "green",
|
|
2936
|
-
"--kup-chart-color-5": "yellow",
|
|
2937
|
-
"--kup-chart-color-6": "cyan",
|
|
2938
|
-
"--kup-chart-color-7": "brown",
|
|
2939
|
-
"--kup-chart-color-8": "magenta",
|
|
2940
|
-
"--kup-chart-color-9": "grey",
|
|
2941
|
-
"--kup-chart-color-10": "indigo",
|
|
2942
|
-
"--kup-obj-cursor": "inherit",
|
|
2943
|
-
"--kup-drawer-zindex": "90",
|
|
2944
|
-
"--kup-navbar-zindex": "90"
|
|
2945
|
-
},
|
|
2946
|
-
customStyles: {
|
|
2947
|
-
"KUP-BUTTON": "#kup-component button {\ntext-transform: unset;\n}\n\n"
|
|
2948
|
-
},
|
|
2949
|
-
icons: {
|
|
2950
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
2951
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
2952
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
2953
|
-
"--kup-collapsed-icon": "menu-right",
|
|
2954
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
2955
|
-
"--kup-clear-icon": "cancel",
|
|
2956
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
2957
|
-
"--kup-key-icon": "key-variant",
|
|
2958
|
-
"--kup-search-icon": "search"
|
|
2959
|
-
}
|
|
2960
|
-
};
|
|
2961
|
-
const ketchup = {
|
|
2962
|
-
cssVariables: {
|
|
2963
|
-
"--kup-primary-color": "#d64325",
|
|
2964
|
-
"--kup-secondary-color": "#a6192e",
|
|
2965
|
-
"--kup-background-color": "#ffffff",
|
|
2966
|
-
"--kup-navbar-background-color": "#2e2e2e",
|
|
2967
|
-
"--kup-navbar-color": "#ffffff",
|
|
2968
|
-
"--kup-drawer-background-color": "#ffffff",
|
|
2969
|
-
"--kup-drawer-color": "#595959",
|
|
2970
|
-
"--kup-navbar-height": "64px",
|
|
2971
|
-
"--kup-drawer-width": "300px",
|
|
2972
|
-
"--kup-font-family": "Ubuntu, sans-serif",
|
|
2973
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
2974
|
-
"--kup-font-size": "14px",
|
|
2975
|
-
"--kup-text-color": "#595959",
|
|
2976
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
2977
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
2978
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
2979
|
-
"--kup-disabled-color": "#5c5c5c",
|
|
2980
|
-
"--kup-hover-background-color": "#f0f0f0",
|
|
2981
|
-
"--kup-hover-color": "#545454",
|
|
2982
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
2983
|
-
"--kup-title-color": "#2e2e2e",
|
|
2984
|
-
"--kup-icon-color": "#505050",
|
|
2985
|
-
"--kup-border-color": "#e0e0e0",
|
|
2986
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
2987
|
-
"--kup-info-color": "#2592df",
|
|
2988
|
-
"--kup-success-color": "#4d9f02",
|
|
2989
|
-
"--kup-warning-color": "#ffc107",
|
|
2990
|
-
"--kup-danger-color": "#d91e18",
|
|
2991
|
-
"--kup-spinner-color": "#eaa710",
|
|
2992
|
-
"--kup-chart-color-1": "#ff5959",
|
|
2993
|
-
"--kup-chart-color-2": "#e0a0a0",
|
|
2994
|
-
"--kup-chart-color-3": "#8e1010",
|
|
2995
|
-
"--kup-chart-color-4": "#f5f5dc",
|
|
2996
|
-
"--kup-obj-cursor": "inherit",
|
|
2997
|
-
"--kup-drawer-zindex": "90",
|
|
2998
|
-
"--kup-navbar-zindex": "90"
|
|
2999
|
-
},
|
|
3000
|
-
icons: {
|
|
3001
|
-
"--kup-ascending-icon": "sort-ascending",
|
|
3002
|
-
"--kup-descending-icon": "sort-descending",
|
|
3003
|
-
"--kup-expanded-icon": "chevron-down",
|
|
3004
|
-
"--kup-collapsed-icon": "chevron_right",
|
|
3005
|
-
"--kup-dropdown-icon": "chevron-down",
|
|
3006
|
-
"--kup-clear-icon": "clear",
|
|
3007
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3008
|
-
"--kup-key-icon": "key",
|
|
3009
|
-
"--kup-search-icon": "search"
|
|
3010
|
-
},
|
|
3011
|
-
imports: [
|
|
3012
|
-
"url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;500&display=swap')"
|
|
3013
|
-
]
|
|
3014
|
-
};
|
|
3015
|
-
const obsidian = {
|
|
3016
|
-
cssVariables: {
|
|
3017
|
-
"--kup-primary-color": "#a6192e",
|
|
3018
|
-
"--kup-secondary-color": "#f5f4f4",
|
|
3019
|
-
"--kup-background-color": "#ffffff",
|
|
3020
|
-
"--kup-navbar-background-color": "#000000",
|
|
3021
|
-
"--kup-navbar-color": "#ffffff",
|
|
3022
|
-
"--kup-drawer-background-color": "#f5f4f4",
|
|
3023
|
-
"--kup-drawer-color": "#4c4c4d",
|
|
3024
|
-
"--kup-navbar-height": "64px",
|
|
3025
|
-
"--kup-drawer-width": "300px",
|
|
3026
|
-
"--kup-font-family": "Open Sans, arial, helvatica",
|
|
3027
|
-
"--kup-font-family-monospace": "Courier New, Courier, monospace",
|
|
3028
|
-
"--kup-font-size": "13px",
|
|
3029
|
-
"--kup-text-color": "#4c4c4d",
|
|
3030
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3031
|
-
"--kup-text-on-secondary-color": "#a6192e",
|
|
3032
|
-
"--kup-disabled-background-color": "#ffffff",
|
|
3033
|
-
"--kup-disabled-color": "#4c4c4d",
|
|
3034
|
-
"--kup-hover-background-color": "#f5f4f4",
|
|
3035
|
-
"--kup-hover-color": "#000000",
|
|
3036
|
-
"--kup-title-background-color": "#068a9c",
|
|
3037
|
-
"--kup-title-color": "#ffffff",
|
|
3038
|
-
"--kup-icon-color": "#9d9d9d",
|
|
3039
|
-
"--kup-border-color": "#ededed",
|
|
3040
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
3041
|
-
"--kup-info-color": "#2592df",
|
|
3042
|
-
"--kup-success-color": "#4d9f02",
|
|
3043
|
-
"--kup-warning-color": "#ffc107",
|
|
3044
|
-
"--kup-danger-color": "#A6192E",
|
|
3045
|
-
"--kup-spinner-color": "#a6192e",
|
|
3046
|
-
"--kup-chart-color-1": "#735DED",
|
|
3047
|
-
"--kup-chart-color-2": "#00B2CB",
|
|
3048
|
-
"--kup-chart-color-3": "#EDC900",
|
|
3049
|
-
"--kup-chart-color-4": "green",
|
|
3050
|
-
"--kup-chart-color-5": "yellow",
|
|
3051
|
-
"--kup-chart-color-6": "cyan",
|
|
3052
|
-
"--kup-chart-color-7": "brown",
|
|
3053
|
-
"--kup-chart-color-8": "magenta",
|
|
3054
|
-
"--kup-chart-color-9": "grey",
|
|
3055
|
-
"--kup-chart-color-10": "indigo",
|
|
3056
|
-
"--kup-obj-cursor": "inherit",
|
|
3057
|
-
"--kup-drawer-zindex": "90",
|
|
3058
|
-
"--kup-navbar-zindex": "90"
|
|
3059
|
-
},
|
|
3060
|
-
icons: {
|
|
3061
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3062
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3063
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3064
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3065
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3066
|
-
"--kup-clear-icon": "cancel",
|
|
3067
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3068
|
-
"--kup-key-icon": "key-variant",
|
|
3069
|
-
"--kup-search-icon": "search"
|
|
3070
|
-
},
|
|
3071
|
-
imports: [
|
|
3072
|
-
"url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400&display=swap')"
|
|
3073
|
-
]
|
|
3074
|
-
};
|
|
3075
|
-
const ocean = {
|
|
3076
|
-
cssVariables: {
|
|
3077
|
-
"--kup-primary-color": "#0081c5",
|
|
3078
|
-
"--kup-secondary-color": "#3a8ede",
|
|
3079
|
-
"--kup-background-color": "#ffffff",
|
|
3080
|
-
"--kup-navbar-background-color": "#001d3e",
|
|
3081
|
-
"--kup-navbar-color": "#ffffff",
|
|
3082
|
-
"--kup-drawer-background-color": "#e6f1ff",
|
|
3083
|
-
"--kup-drawer-color": "#1b1b1b",
|
|
3084
|
-
"--kup-navbar-height": "64px",
|
|
3085
|
-
"--kup-drawer-width": "300px",
|
|
3086
|
-
"--kup-font-family": "Open Sans Condensed, sans-serif",
|
|
3087
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
3088
|
-
"--kup-font-size": "16px",
|
|
3089
|
-
"--kup-text-color": "#1b1b1b",
|
|
3090
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3091
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
3092
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
3093
|
-
"--kup-disabled-color": "#5c5c5c",
|
|
3094
|
-
"--kup-hover-background-color": "#cfe8ff",
|
|
3095
|
-
"--kup-hover-color": "#545454",
|
|
3096
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
3097
|
-
"--kup-title-color": "#1b1b1b",
|
|
3098
|
-
"--kup-icon-color": "#505050",
|
|
3099
|
-
"--kup-border-color": "#e0e0e0",
|
|
3100
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
3101
|
-
"--kup-info-color": "#2592df",
|
|
3102
|
-
"--kup-success-color": "#4d9f02",
|
|
3103
|
-
"--kup-warning-color": "#ffc107",
|
|
3104
|
-
"--kup-danger-color": "#d91e18",
|
|
3105
|
-
"--kup-spinner-color": "#6edeff",
|
|
3106
|
-
"--kup-chart-color-1": "#60c3fc",
|
|
3107
|
-
"--kup-chart-color-2": "#e268d8",
|
|
3108
|
-
"--kup-chart-color-3": "#e48b47",
|
|
3109
|
-
"--kup-chart-color-4": "#81e447",
|
|
3110
|
-
"--kup-obj-cursor": "inherit",
|
|
3111
|
-
"--kup-drawer-zindex": "90",
|
|
3112
|
-
"--kup-navbar-zindex": "90"
|
|
3113
|
-
},
|
|
3114
|
-
icons: {
|
|
3115
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3116
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3117
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3118
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3119
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3120
|
-
"--kup-clear-icon": "cancel",
|
|
3121
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3122
|
-
"--kup-key-icon": "key-variant",
|
|
3123
|
-
"--kup-search-icon": "search"
|
|
3124
|
-
},
|
|
3125
|
-
imports: [
|
|
3126
|
-
"url('https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@300;700&display=swap')"
|
|
3127
|
-
]
|
|
3128
|
-
};
|
|
3129
|
-
const print = {
|
|
3130
|
-
cssVariables: {
|
|
3131
|
-
"--kup-primary-color": "#000000",
|
|
3132
|
-
"--kup-secondary-color": "#cccccc",
|
|
3133
|
-
"--kup-background-color": "#ffffff",
|
|
3134
|
-
"--kup-navbar-background-color": "#000000",
|
|
3135
|
-
"--kup-navbar-color": "#ffffff",
|
|
3136
|
-
"--kup-drawer-background-color": "#ffffff",
|
|
3137
|
-
"--kup-drawer-color": "#000000",
|
|
3138
|
-
"--kup-navbar-height": "64px",
|
|
3139
|
-
"--kup-drawer-width": "300px",
|
|
3140
|
-
"--kup-font-family": "Arial, Helvetica, sans-serif",
|
|
3141
|
-
"--kup-font-family-monospace": "Courier New, Courier, monospace",
|
|
3142
|
-
"--kup-font-size": "13px",
|
|
3143
|
-
"--kup-text-color": "#000000",
|
|
3144
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3145
|
-
"--kup-text-on-secondary-color": "#000000",
|
|
3146
|
-
"--kup-disabled-background-color": "#ffffff",
|
|
3147
|
-
"--kup-disabled-color": "#000000",
|
|
3148
|
-
"--kup-hover-background-color": "#ffffff",
|
|
3149
|
-
"--kup-hover-color": "#000000",
|
|
3150
|
-
"--kup-title-background-color": "#f1f1f1",
|
|
3151
|
-
"--kup-title-color": "#000000",
|
|
3152
|
-
"--kup-icon-color": "#9d9d9d",
|
|
3153
|
-
"--kup-border-color": "#ededed",
|
|
3154
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
3155
|
-
"--kup-info-color": "#2592df",
|
|
3156
|
-
"--kup-success-color": "#4d9f02",
|
|
3157
|
-
"--kup-warning-color": "#ffc107",
|
|
3158
|
-
"--kup-danger-color": "#A6192E",
|
|
3159
|
-
"--kup-spinner-color": "#eaa710",
|
|
3160
|
-
"--kup-chart-color-1": "#735DED",
|
|
3161
|
-
"--kup-chart-color-2": "#00B2CB",
|
|
3162
|
-
"--kup-chart-color-3": "#EDC900",
|
|
3163
|
-
"--kup-chart-color-4": "green",
|
|
3164
|
-
"--kup-chart-color-5": "yellow",
|
|
3165
|
-
"--kup-chart-color-6": "cyan",
|
|
3166
|
-
"--kup-chart-color-7": "brown",
|
|
3167
|
-
"--kup-chart-color-8": "magenta",
|
|
3168
|
-
"--kup-chart-color-9": "grey",
|
|
3169
|
-
"--kup-chart-color-10": "indigo",
|
|
3170
|
-
"--kup-obj-cursor": "inherit",
|
|
3171
|
-
"--kup-drawer-zindex": "90",
|
|
3172
|
-
"--kup-navbar-zindex": "90"
|
|
3173
|
-
},
|
|
3174
|
-
customStyles: {
|
|
3175
|
-
MASTER: "#kup-component #global-filter {\ndisplay: none;\n}\n\n",
|
|
3176
|
-
"KUP-BOX": "#kup-component #box-container .box-wrapper .box:hover {\nbox-shadow: none;\n}\n\n#kup-component #box-container .box-wrapper .box.selected {\nbackground-color: inherit;\n}",
|
|
3177
|
-
"KUP-BUTTON": ":host(:not(.printable)) {\ndisplay: none;\n}\n\n",
|
|
3178
|
-
"KUP-CARD": "",
|
|
3179
|
-
"KUP-DATA-TABLE": "#kup-component sticky-header {\ndisplay: none;\n}\n\n#kup-component kup-paginator {\ndisplay: none;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.selected, \n#kup-component table td.selected, #kup-component tr.selected td {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n#kup-component table,\n#kup-component .below-wrapper {\noverflow: hidden !important;\n}\n\n:host(.cross-selection) #kup-component tr.selected td:first-of-type,\n:host(.cross-selection) #kup-component th.selected { \nbox-shadow: none !important;\n}\n\n:host(.cross-selection) #kup-component table td.selected,\n:host(.cross-selection) #kup-component table tr.selected td {\nbackground-color: inherit;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column.selected,\n:host(.cross-selection) #kup-component table td.selected.fixed-column, \n:host(.cross-selection) #kup-component table td.selected.fixed-row,\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column, \n:host(.cross-selection) #kup-component table tr.selected td.fixed-row {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n",
|
|
3180
|
-
"KUP-PROGRESS-BAR": "#kup-component .progress-bar {\nbackground: #e7e7e7;\n}\n\n#kup-component .progress-bar-percentage span {\ntext-shadow: 0px 0px 0px hsl(0deg 0% 100%);\n}\n\n",
|
|
3181
|
-
"KUP-TREE": "#kup-component .wrapper {\noverflow: hidden;\n}\n\n#kup-component tr.mdc-ripple-surface::before, \n#kup-component tr.mdc-ripple-surface::after,\n#kup-component td.mdc-ripple-surface::before, \n#kup-component td.mdc-ripple-surface::after,\n#kup-component .kup-tree__node--selected:not(.kup-tree__node--disabled) td {\nbackground-color: var(--kup-background-color);\n}"
|
|
3182
|
-
},
|
|
3183
|
-
icons: {
|
|
3184
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3185
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3186
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3187
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3188
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3189
|
-
"--kup-clear-icon": "cancel",
|
|
3190
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3191
|
-
"--kup-key-icon": "key-variant",
|
|
3192
|
-
"--kup-search-icon": "search"
|
|
3193
|
-
}
|
|
3194
|
-
};
|
|
3195
|
-
const raj = {
|
|
3196
|
-
cssVariables: {
|
|
3197
|
-
"--kup-primary-color": "rgb(187, 198, 5)",
|
|
3198
|
-
"--kup-secondary-color": "#ffe600",
|
|
3199
|
-
"--kup-background-color": "#000000",
|
|
3200
|
-
"--kup-navbar-background-color": "#000000",
|
|
3201
|
-
"--kup-navbar-color": "#ffffff",
|
|
3202
|
-
"--kup-drawer-background-color": "#000000",
|
|
3203
|
-
"--kup-drawer-color": "#ffffff",
|
|
3204
|
-
"--kup-navbar-height": "64px",
|
|
3205
|
-
"--kup-drawer-width": "300px",
|
|
3206
|
-
"--kup-font-family": "'Rajdhani', sans-serif",
|
|
3207
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
3208
|
-
"--kup-font-size": "15px",
|
|
3209
|
-
"--kup-text-color": "#ffffff",
|
|
3210
|
-
"--kup-text-on-primary-color": "#000000",
|
|
3211
|
-
"--kup-text-on-secondary-color": "#000000",
|
|
3212
|
-
"--kup-disabled-background-color": "#151515",
|
|
3213
|
-
"--kup-disabled-color": "#7b7b7b",
|
|
3214
|
-
"--kup-hover-background-color": "#404040",
|
|
3215
|
-
"--kup-hover-color": "#ffffff",
|
|
3216
|
-
"--kup-title-background-color": "#ffe600",
|
|
3217
|
-
"--kup-title-color": "#000000",
|
|
3218
|
-
"--kup-icon-color": "#9d9d9d",
|
|
3219
|
-
"--kup-border-color": "#9d9d9d",
|
|
3220
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
3221
|
-
"--kup-info-color": "#2592df",
|
|
3222
|
-
"--kup-success-color": "#4d9f02",
|
|
3223
|
-
"--kup-warning-color": "#ffc107",
|
|
3224
|
-
"--kup-danger-color": "#d91e18",
|
|
3225
|
-
"--kup-spinner-color": "#ffe600",
|
|
3226
|
-
"--kup-chart-color-1": "#ffffff",
|
|
3227
|
-
"--kup-chart-color-2": "rgb(187, 198, 5)",
|
|
3228
|
-
"--kup-chart-color-3": "#ffe600",
|
|
3229
|
-
"--kup-chart-color-4": "#effd02",
|
|
3230
|
-
"--kup-obj-cursor": "inherit",
|
|
3231
|
-
"--kup-drawer-zindex": "90",
|
|
3232
|
-
"--kup-navbar-zindex": "90"
|
|
3233
|
-
},
|
|
3234
|
-
icons: {
|
|
3235
|
-
"--kup-ascending-icon": "sort-ascending",
|
|
3236
|
-
"--kup-descending-icon": "sort-descending",
|
|
3237
|
-
"--kup-expanded-icon": "chevron-down",
|
|
3238
|
-
"--kup-collapsed-icon": "chevron_right",
|
|
3239
|
-
"--kup-dropdown-icon": "chevron-down",
|
|
3240
|
-
"--kup-clear-icon": "cancel",
|
|
3241
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3242
|
-
"--kup-key-icon": "key-variant",
|
|
3243
|
-
"--kup-search-icon": "search"
|
|
3244
|
-
},
|
|
3245
|
-
imports: [
|
|
3246
|
-
"url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600&display=swap')"
|
|
3247
|
-
]
|
|
3248
|
-
};
|
|
3249
|
-
const red = {
|
|
3250
|
-
cssVariables: {
|
|
3251
|
-
"--kup-primary-color": "#a6192e",
|
|
3252
|
-
"--kup-secondary-color": "#ffc107",
|
|
3253
|
-
"--kup-background-color": "#ffffff",
|
|
3254
|
-
"--kup-navbar-background-color": "#a6192e",
|
|
3255
|
-
"--kup-navbar-color": "#ffffff",
|
|
3256
|
-
"--kup-drawer-background-color": "#f5f5f5",
|
|
3257
|
-
"--kup-drawer-color": "#000000",
|
|
3258
|
-
"--kup-navbar-height": "64px",
|
|
3259
|
-
"--kup-drawer-width": "300px",
|
|
3260
|
-
"--kup-font-family": "Open Sans, arial, helvatica",
|
|
3261
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
3262
|
-
"--kup-font-size": "13px",
|
|
3263
|
-
"--kup-text-color": "#000000",
|
|
3264
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3265
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
3266
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
3267
|
-
"--kup-disabled-color": "#333333",
|
|
3268
|
-
"--kup-hover-background-color": "#eeeeee",
|
|
3269
|
-
"--kup-hover-color": "#000000",
|
|
3270
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
3271
|
-
"--kup-title-color": "#2e2e2e",
|
|
3272
|
-
"--kup-icon-color": "#808080",
|
|
3273
|
-
"--kup-border-color": "#ededed",
|
|
3274
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
3275
|
-
"--kup-info-color": "#2592df",
|
|
3276
|
-
"--kup-success-color": "#4d9f02",
|
|
3277
|
-
"--kup-warning-color": "#ffc107",
|
|
3278
|
-
"--kup-danger-color": "#A6192E",
|
|
3279
|
-
"--kup-spinner-color": "#1D1D1B",
|
|
3280
|
-
"--kup-chart-color-1": "#735DED",
|
|
3281
|
-
"--kup-chart-color-2": "#00B2CB",
|
|
3282
|
-
"--kup-chart-color-3": "#EDC900",
|
|
3283
|
-
"--kup-chart-color-4": "#a6192e",
|
|
3284
|
-
"--kup-chart-color-5": "yellow",
|
|
3285
|
-
"--kup-chart-color-6": "cyan",
|
|
3286
|
-
"--kup-chart-color-7": "brown",
|
|
3287
|
-
"--kup-chart-color-8": "magenta",
|
|
3288
|
-
"--kup-chart-color-9": "grey",
|
|
3289
|
-
"--kup-chart-color-10": "indigo",
|
|
3290
|
-
"--kup-obj-cursor": "inherit",
|
|
3291
|
-
"--kup-drawer-zindex": "90",
|
|
3292
|
-
"--kup-navbar-zindex": "90"
|
|
3293
|
-
},
|
|
3294
|
-
icons: {
|
|
3295
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3296
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3297
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3298
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3299
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3300
|
-
"--kup-clear-icon": "cancel",
|
|
3301
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3302
|
-
"--kup-key-icon": "key-variant",
|
|
3303
|
-
"--kup-search-icon": "search"
|
|
3304
|
-
},
|
|
3305
|
-
customStyles: {
|
|
3306
|
-
},
|
|
3307
|
-
imports: [
|
|
3308
|
-
"url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400&display=swap')"
|
|
3309
|
-
]
|
|
3310
|
-
};
|
|
3311
|
-
const sapphire = {
|
|
3312
|
-
cssVariables: {
|
|
3313
|
-
"--kup-primary-color": "#003b77",
|
|
3314
|
-
"--kup-secondary-color": "#ff1414",
|
|
3315
|
-
"--kup-background-color": "#ffffff",
|
|
3316
|
-
"--kup-navbar-background-color": "#003b77",
|
|
3317
|
-
"--kup-navbar-color": "#ffffff",
|
|
3318
|
-
"--kup-drawer-background-color": "#002244",
|
|
3319
|
-
"--kup-drawer-color": "#ffffff",
|
|
3320
|
-
"--kup-navbar-height": "64px",
|
|
3321
|
-
"--kup-drawer-width": "20em",
|
|
3322
|
-
"--kup-font-family": "Arial",
|
|
3323
|
-
"--kup-font-family-monospace": "Arial",
|
|
3324
|
-
"--kup-font-size": "13px",
|
|
3325
|
-
"--kup-text-color": "#333333",
|
|
3326
|
-
"--kup-text-on-primary-color": "#fafafa",
|
|
3327
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
3328
|
-
"--kup-disabled-background-color": "#ddecf8",
|
|
3329
|
-
"--kup-disabled-color": "#333333",
|
|
3330
|
-
"--kup-hover-background-color": "#d8ecf6",
|
|
3331
|
-
"--kup-hover-color": "#333333",
|
|
3332
|
-
"--kup-title-background-color": "#003b77",
|
|
3333
|
-
"--kup-title-color": "#ffffff",
|
|
3334
|
-
"--kup-icon-color": "#808080",
|
|
3335
|
-
"--kup-border-color": "#93c4ec",
|
|
3336
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
3337
|
-
"--kup-info-color": "#2592df",
|
|
3338
|
-
"--kup-success-color": "#4d9f02",
|
|
3339
|
-
"--kup-warning-color": "#ffc107",
|
|
3340
|
-
"--kup-danger-color": "#a94442",
|
|
3341
|
-
"--kup-spinner-color": "#003b77",
|
|
3342
|
-
"--kup-chart-color-1": "#0781fd",
|
|
3343
|
-
"--kup-chart-color-2": "#002244",
|
|
3344
|
-
"--kup-chart-color-3": "#c6cff8",
|
|
3345
|
-
"--kup-chart-color-4": "#66bdda",
|
|
3346
|
-
"--kup-chart-color-5": "yellow",
|
|
3347
|
-
"--kup-chart-color-6": "cyan",
|
|
3348
|
-
"--kup-chart-color-7": "brown",
|
|
3349
|
-
"--kup-chart-color-8": "magenta",
|
|
3350
|
-
"--kup-chart-color-9": "grey",
|
|
3351
|
-
"--kup-chart-color-10": "indigo",
|
|
3352
|
-
"--kup-obj-cursor": "inherit",
|
|
3353
|
-
"--kup-drawer-zindex": "90",
|
|
3354
|
-
"--kup-navbar-zindex": "90"
|
|
3355
|
-
},
|
|
3356
|
-
icons: {
|
|
3357
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3358
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3359
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3360
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3361
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3362
|
-
"--kup-clear-icon": "cancel",
|
|
3363
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3364
|
-
"--kup-key-icon": "key-variant",
|
|
3365
|
-
"--kup-search-icon": "search"
|
|
3366
|
-
},
|
|
3367
|
-
customStyles: {
|
|
3368
|
-
"KUP-DATA-TABLE": "#kup-component th { --kup_datatable_th_border: none; font-weight: normal; }"
|
|
3369
|
-
}
|
|
3370
|
-
};
|
|
3371
|
-
const teal = {
|
|
3372
|
-
cssVariables: {
|
|
3373
|
-
"--kup-primary-color": "#068A9C",
|
|
3374
|
-
"--kup-secondary-color": "#ffc107",
|
|
3375
|
-
"--kup-background-color": "#ffffff",
|
|
3376
|
-
"--kup-navbar-background-color": "#068A9C",
|
|
3377
|
-
"--kup-navbar-color": "#ffffff",
|
|
3378
|
-
"--kup-drawer-background-color": "#ffffff",
|
|
3379
|
-
"--kup-drawer-color": "#000000",
|
|
3380
|
-
"--kup-navbar-height": "64px",
|
|
3381
|
-
"--kup-drawer-width": "300px",
|
|
3382
|
-
"--kup-font-family": "Roboto, sans-serif",
|
|
3383
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
3384
|
-
"--kup-font-size": "13px",
|
|
3385
|
-
"--kup-text-color": "#000000",
|
|
3386
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3387
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
3388
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
3389
|
-
"--kup-disabled-color": "#333333",
|
|
3390
|
-
"--kup-hover-background-color": "#f0f0f0",
|
|
3391
|
-
"--kup-hover-color": "#000000",
|
|
3392
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
3393
|
-
"--kup-title-color": "#2e2e2e",
|
|
3394
|
-
"--kup-icon-color": "#808080",
|
|
3395
|
-
"--kup-border-color": "#ededed",
|
|
3396
|
-
"--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
|
|
3397
|
-
"--kup-info-color": "#2592df",
|
|
3398
|
-
"--kup-success-color": "#4d9f02",
|
|
3399
|
-
"--kup-warning-color": "#ffc107",
|
|
3400
|
-
"--kup-danger-color": "#A6192E",
|
|
3401
|
-
"--kup-spinner-color": "#eaa710",
|
|
3402
|
-
"--kup-chart-color-1": "#735DED",
|
|
3403
|
-
"--kup-chart-color-2": "#00B2CB",
|
|
3404
|
-
"--kup-chart-color-3": "#EDC900",
|
|
3405
|
-
"--kup-chart-color-4": "green",
|
|
3406
|
-
"--kup-chart-color-5": "yellow",
|
|
3407
|
-
"--kup-chart-color-6": "cyan",
|
|
3408
|
-
"--kup-chart-color-7": "brown",
|
|
3409
|
-
"--kup-chart-color-8": "magenta",
|
|
3410
|
-
"--kup-chart-color-9": "grey",
|
|
3411
|
-
"--kup-chart-color-10": "indigo",
|
|
3412
|
-
"--kup-obj-cursor": "inherit",
|
|
3413
|
-
"--kup-drawer-zindex": "90",
|
|
3414
|
-
"--kup-navbar-zindex": "90"
|
|
3415
|
-
},
|
|
3416
|
-
icons: {
|
|
3417
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3418
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3419
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3420
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3421
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3422
|
-
"--kup-clear-icon": "cancel",
|
|
3423
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3424
|
-
"--kup-key-icon": "key-variant",
|
|
3425
|
-
"--kup-search-icon": "search"
|
|
3426
|
-
}
|
|
3427
|
-
};
|
|
3428
|
-
const wildlife = {
|
|
3429
|
-
cssVariables: {
|
|
3430
|
-
"--kup-primary-color": "#0fa918",
|
|
3431
|
-
"--kup-secondary-color": "#739f5a",
|
|
3432
|
-
"--kup-background-color": "#ffffff",
|
|
3433
|
-
"--kup-navbar-background-color": "#095a1f",
|
|
3434
|
-
"--kup-navbar-color": "#ffffff",
|
|
3435
|
-
"--kup-drawer-background-color": "#dbfbd5",
|
|
3436
|
-
"--kup-drawer-color": "#000000",
|
|
3437
|
-
"--kup-navbar-height": "64px",
|
|
3438
|
-
"--kup-drawer-width": "300px",
|
|
3439
|
-
"--kup-font-family": "Abel, sans-serif",
|
|
3440
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
3441
|
-
"--kup-font-size": "16px",
|
|
3442
|
-
"--kup-text-color": "#000000",
|
|
3443
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3444
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
3445
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
3446
|
-
"--kup-disabled-color": "#5c5c5c",
|
|
3447
|
-
"--kup-hover-background-color": "#63ab46",
|
|
3448
|
-
"--kup-hover-color": "#ffffff",
|
|
3449
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
3450
|
-
"--kup-title-color": "#000000",
|
|
3451
|
-
"--kup-icon-color": "#333333",
|
|
3452
|
-
"--kup-border-color": "#e0e0e0",
|
|
3453
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
3454
|
-
"--kup-info-color": "#2592df",
|
|
3455
|
-
"--kup-success-color": "#4d9f02",
|
|
3456
|
-
"--kup-warning-color": "#ffc107",
|
|
3457
|
-
"--kup-danger-color": "#d91e18",
|
|
3458
|
-
"--kup-spinner-color": "#44b383",
|
|
3459
|
-
"--kup-chart-color-1": "#60c3fc",
|
|
3460
|
-
"--kup-chart-color-2": "#e268d8",
|
|
3461
|
-
"--kup-chart-color-3": "#e48b47",
|
|
3462
|
-
"--kup-chart-color-4": "#81e447",
|
|
3463
|
-
"--kup-obj-cursor": "inherit",
|
|
3464
|
-
"--kup-drawer-zindex": "90",
|
|
3465
|
-
"--kup-navbar-zindex": "90"
|
|
3466
|
-
},
|
|
3467
|
-
icons: {
|
|
3468
|
-
"--kup-ascending-icon": "arrow_drop_up",
|
|
3469
|
-
"--kup-descending-icon": "arrow_drop_down",
|
|
3470
|
-
"--kup-expanded-icon": "arrow_drop_down",
|
|
3471
|
-
"--kup-collapsed-icon": "menu-right",
|
|
3472
|
-
"--kup-dropdown-icon": "arrow_drop_down",
|
|
3473
|
-
"--kup-clear-icon": "cancel",
|
|
3474
|
-
"--kup-filter-remove-icon": "filter-remove",
|
|
3475
|
-
"--kup-key-icon": "key-variant",
|
|
3476
|
-
"--kup-search-icon": "search"
|
|
3477
|
-
},
|
|
3478
|
-
imports: [
|
|
3479
|
-
"url('https://fonts.googleapis.com/css2?family=Abel&display=swap')"
|
|
3480
|
-
]
|
|
3481
|
-
};
|
|
3482
|
-
const test = {
|
|
3483
|
-
cssVariables: {
|
|
3484
|
-
"--kup-primary-color": "#d64325",
|
|
3485
|
-
"--kup-secondary-color": "#ffc107",
|
|
3486
|
-
"--kup-background-color": "#ffffff",
|
|
3487
|
-
"--kup-navbar-background-color": "#f5f5f5",
|
|
3488
|
-
"--kup-navbar-color": "pink",
|
|
3489
|
-
"--kup-drawer-background-color": "#ffffff",
|
|
3490
|
-
"--kup-drawer-color": "purple",
|
|
3491
|
-
"--kup-navbar-height": "64px",
|
|
3492
|
-
"--kup-drawer-width": "300px",
|
|
3493
|
-
"--kup-font-family": "Architects Daughter, cursive",
|
|
3494
|
-
"--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
|
|
3495
|
-
"--kup-font-size": "14px",
|
|
3496
|
-
"--kup-text-color": "#2e2e2e",
|
|
3497
|
-
"--kup-text-on-primary-color": "#ffffff",
|
|
3498
|
-
"--kup-text-on-secondary-color": "#ffffff",
|
|
3499
|
-
"--kup-disabled-background-color": "#eaeaea",
|
|
3500
|
-
"--kup-disabled-color": "#5c5c5c",
|
|
3501
|
-
"--kup-hover-background-color": "#f0f0f0",
|
|
3502
|
-
"--kup-hover-color": "#545454",
|
|
3503
|
-
"--kup-title-background-color": "#f1f3f4",
|
|
3504
|
-
"--kup-title-color": "#2e2e2e",
|
|
3505
|
-
"--kup-icon-color": "#505050",
|
|
3506
|
-
"--kup-border-color": "#e0e0e0",
|
|
3507
|
-
"--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
|
|
3508
|
-
"--kup-info-color": "#2592df",
|
|
3509
|
-
"--kup-success-color": "#4d9f02",
|
|
3510
|
-
"--kup-warning-color": "#ffc107",
|
|
3511
|
-
"--kup-danger-color": "#d91e18",
|
|
3512
|
-
"--kup-spinner-color": "#eaa710",
|
|
3513
|
-
"--kup-chart-color-1": "#60c3fc",
|
|
3514
|
-
"--kup-chart-color-2": "#e268d8",
|
|
3515
|
-
"--kup-chart-color-3": "#e48b47",
|
|
3516
|
-
"--kup-chart-color-4": "#81e447",
|
|
3517
|
-
"--kup-obj-cursor": "alias",
|
|
3518
|
-
"--kup-drawer-zindex": "90",
|
|
3519
|
-
"--kup-navbar-zindex": "90"
|
|
3520
|
-
},
|
|
3521
|
-
customStyles: {
|
|
3522
|
-
MASTER: "#kup-component { background-color: red; }",
|
|
3523
|
-
"KUP-AUTOCOMPLETE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3524
|
-
"KUP-BADGE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3525
|
-
"KUP-BUTTON": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3526
|
-
"KUP-BOX": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3527
|
-
"KUP-CARD": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3528
|
-
"KUP-CHECKBOX": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3529
|
-
"KUP-CHIP": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3530
|
-
"KUP-COLOR-PICKER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3531
|
-
"KUP-COMBOBOX": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3532
|
-
"KUP-DATA-TABLE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3533
|
-
"KUP-DATE-PICKER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3534
|
-
"KUP-DRAWER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3535
|
-
"KUP-FIELD": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3536
|
-
"KUP-GAUGE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3537
|
-
"KUP-GRID": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3538
|
-
"KUP-IMAGE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3539
|
-
"KUP-LAZY": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3540
|
-
"KUP-LIST": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3541
|
-
"KUP-NAV-BAR": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3542
|
-
"KUP-PROGRESS-BAR": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3543
|
-
"KUP-RADIO": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3544
|
-
"KUP-RATING": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3545
|
-
"KUP-SPINNER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3546
|
-
"KUP-SWITCH": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3547
|
-
"KUP-TAB-BAR": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3548
|
-
"KUP-TEXT-FIELD": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3549
|
-
"KUP-TIME-PICKER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
|
|
3550
|
-
"KUP-TREE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n"
|
|
3551
|
-
},
|
|
3552
|
-
icons: {
|
|
3553
|
-
"--kup-ascending-icon": "sort-ascending",
|
|
3554
|
-
"--kup-descending-icon": "sort-descending",
|
|
3555
|
-
"--kup-expanded-icon": "chevron-down",
|
|
3556
|
-
"--kup-collapsed-icon": "chevron_right",
|
|
3557
|
-
"--kup-dropdown-icon": "chevron-down",
|
|
3558
|
-
"--kup-clear-icon": "cancel",
|
|
3559
|
-
"--kup-filter-remove-icon": "broom",
|
|
3560
|
-
"--kup-key-icon": "key",
|
|
3561
|
-
"--kup-search-icon": "search"
|
|
3562
|
-
},
|
|
3563
|
-
imports: [
|
|
3564
|
-
"url('https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap')"
|
|
3565
|
-
]
|
|
3566
|
-
};
|
|
3567
|
-
const themes = {
|
|
3568
|
-
bubbles: bubbles,
|
|
3569
|
-
cobalt: cobalt,
|
|
3570
|
-
dark: dark,
|
|
3571
|
-
flamingo: flamingo,
|
|
3572
|
-
graphite: graphite,
|
|
3573
|
-
ketchup: ketchup,
|
|
3574
|
-
obsidian: obsidian,
|
|
3575
|
-
ocean: ocean,
|
|
3576
|
-
print: print,
|
|
3577
|
-
raj: raj,
|
|
3578
|
-
red: red,
|
|
3579
|
-
sapphire: sapphire,
|
|
3580
|
-
teal: teal,
|
|
3581
|
-
wildlife: wildlife,
|
|
3582
|
-
test: test
|
|
3583
|
-
};
|
|
3584
|
-
|
|
3585
|
-
const kupThemeCss = "#kup-debug-widget{position:fixed;top:0;left:0;z-index:200}[kup-dialog]{background-color:var(--kup-background-color);margin:0;position:fixed;transition:none;max-height:95vh;max-width:95vw}[kup-dialog].kup-resizable{border:3px outset var(--kup-title-background-color)}#kup-scrolling-arrows{position:fixed;top:50%;left:50%;pointer-events:none;z-index:9999}#kup-scrolling-arrows .kup-left-scrolling-arrow,#kup-scrolling-arrows .kup-right-scrolling-arrow{position:absolute;width:0;height:0;visibility:hidden}#kup-scrolling-arrows .kup-left-scrolling-arrow{border-top:8px solid transparent;border-bottom:8px solid transparent;border-right:8px solid var(--kup-primary-color);transform:translate(30px, -10px) translateZ(0)}#kup-scrolling-arrows .kup-right-scrolling-arrow{border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid var(--kup-primary-color);transform:translate(-30px, -10px) translateZ(0)}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated{visibility:visible}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated.kup-animated.kup-arrow-1{-webkit-animation:kup-pulseleft 1.2s infinite;animation:kup-pulseleft 1.2s infinite;animation-delay:0.4s}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated.kup-animated.kup-arrow-2{-webkit-animation:kup-pulseleft 1.2s infinite;animation:kup-pulseleft 1.2s infinite;animation-delay:0.2s}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated.kup-animated.kup-arrow-3{-webkit-animation:kup-pulseleft 1.2s infinite;animation:kup-pulseleft 1.2s infinite}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated{visibility:visible}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated.kup-animated.kup-arrow-1{-webkit-animation:kup-pulseright 1.2s infinite;animation:kup-pulseright 1.2s infinite;animation-delay:0.4s}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated.kup-animated.kup-arrow-2{-webkit-animation:kup-pulseright 1.2s infinite;animation:kup-pulseright 1.2s infinite;animation-delay:0.2s}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated.kup-animated.kup-arrow-3{-webkit-animation:kup-pulseright 1.2s infinite;animation:kup-pulseright 1.2s infinite}@-moz-keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@-webkit-keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@-o-keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@-moz-keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}@-webkit-keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}@-o-keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}@keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}";
|
|
3586
|
-
|
|
3587
|
-
/**
|
|
3588
|
-
* Variable used to fetch the MASTER customStyle (used in every component).
|
|
3589
|
-
*/
|
|
3590
|
-
const masterCustomStyle = 'MASTER';
|
|
3591
|
-
/**
|
|
3592
|
-
* List of all colors.
|
|
3593
|
-
*/
|
|
3594
|
-
exports.KupThemeColorValues = void 0;
|
|
3595
|
-
(function (KupThemeColorValues) {
|
|
3596
|
-
KupThemeColorValues["PRIMARY"] = "--kup-primary-color";
|
|
3597
|
-
KupThemeColorValues["SECONDARY"] = "--kup-secondary-color";
|
|
3598
|
-
KupThemeColorValues["BACKGROUND"] = "--kup-background-color";
|
|
3599
|
-
KupThemeColorValues["NAV_BAR"] = "--kup-navbar-color";
|
|
3600
|
-
KupThemeColorValues["NAV_BAR_BACKGROUND"] = "--kup-navbar-background-color";
|
|
3601
|
-
KupThemeColorValues["DRAWER_BACKGROUND"] = "--kup-drawer-background-color";
|
|
3602
|
-
KupThemeColorValues["TEXT"] = "--kup-text-color";
|
|
3603
|
-
KupThemeColorValues["TEXT_ON_PRIMARY"] = "--kup-text-on-primary-color";
|
|
3604
|
-
KupThemeColorValues["TEXT_ON_SECONDARY"] = "--kup-text-on-secondary-color";
|
|
3605
|
-
KupThemeColorValues["DISABLED_BACKGROUND"] = "--kup-disabled-background-color";
|
|
3606
|
-
KupThemeColorValues["DISABLED"] = "--kup-disabled-color";
|
|
3607
|
-
KupThemeColorValues["HOVER_BACKGROUND"] = "--kup-hover-background-color";
|
|
3608
|
-
KupThemeColorValues["HOVER"] = "--kup-hover-color";
|
|
3609
|
-
KupThemeColorValues["TITLE_BACKGROUND"] = "--kup-title-background-color";
|
|
3610
|
-
KupThemeColorValues["TITLE"] = "--kup-title-color";
|
|
3611
|
-
KupThemeColorValues["ICON"] = "--kup-icon-color";
|
|
3612
|
-
KupThemeColorValues["BORDER"] = "--kup-border-color";
|
|
3613
|
-
KupThemeColorValues["INFO"] = "--kup-info-color";
|
|
3614
|
-
KupThemeColorValues["SUCCESS"] = "--kup-success-color";
|
|
3615
|
-
KupThemeColorValues["WARNING"] = "--kup-warning-color";
|
|
3616
|
-
KupThemeColorValues["DANGER"] = "--kup-danger-color";
|
|
3617
|
-
KupThemeColorValues["SPINNER"] = "--kup-spinner-color";
|
|
3618
|
-
KupThemeColorValues["CHART_1"] = "--kup-chart-color-1";
|
|
3619
|
-
KupThemeColorValues["CHART_2"] = "--kup-chart-color-2";
|
|
3620
|
-
KupThemeColorValues["CHART_3"] = "--kup-chart-color-3";
|
|
3621
|
-
KupThemeColorValues["CHART_4"] = "--kup-chart-color-4";
|
|
3622
|
-
})(exports.KupThemeColorValues || (exports.KupThemeColorValues = {}));
|
|
3623
|
-
/**
|
|
3624
|
-
* List of all icons.
|
|
3625
|
-
*/
|
|
3626
|
-
exports.KupThemeIconValues = void 0;
|
|
3627
|
-
(function (KupThemeIconValues) {
|
|
3628
|
-
KupThemeIconValues["ASCENDING"] = "--kup-ascending-icon";
|
|
3629
|
-
KupThemeIconValues["CLEAR"] = "--kup-clear-icon";
|
|
3630
|
-
KupThemeIconValues["COLLAPSED"] = "--kup-collapsed-icon";
|
|
3631
|
-
KupThemeIconValues["DESCENDING"] = "--kup-descending-icon";
|
|
3632
|
-
KupThemeIconValues["DROPDOWN"] = "--kup-dropdown-icon";
|
|
3633
|
-
KupThemeIconValues["EXPANDED"] = "--kup-expanded-icon";
|
|
3634
|
-
KupThemeIconValues["FILTER_REMOVE"] = "--kup-filter-remove-icon";
|
|
3635
|
-
KupThemeIconValues["KEY"] = "--kup-key-icon";
|
|
3636
|
-
KupThemeIconValues["SEARCH"] = "--kup-search-icon";
|
|
3637
|
-
})(exports.KupThemeIconValues || (exports.KupThemeIconValues = {}));
|
|
3638
|
-
|
|
3639
|
-
const dom$2 = document.documentElement;
|
|
3640
|
-
/**
|
|
3641
|
-
* Theme manager, handles everything about theming, customStyles and color utilities.
|
|
3642
|
-
* @module KupTheme
|
|
3643
|
-
*/
|
|
3644
|
-
class KupTheme {
|
|
3645
|
-
/**
|
|
3646
|
-
* Initializes KupTheme.
|
|
3647
|
-
*/
|
|
3648
|
-
constructor(list, name) {
|
|
3649
|
-
this.cssVars = {};
|
|
3650
|
-
this.list = list ? list : themes;
|
|
3651
|
-
this.managedComponents = new Set();
|
|
3652
|
-
this.name = name ? name : 'ketchup';
|
|
3653
|
-
this.styleTag = dom$2
|
|
3654
|
-
.querySelector('head')
|
|
3655
|
-
.appendChild(document.createElement('style'));
|
|
3656
|
-
}
|
|
3657
|
-
/**
|
|
3658
|
-
* Sets the theme using this.name or the function's argument.
|
|
3659
|
-
* @param {string} name - When present, this theme will be set.
|
|
3660
|
-
*/
|
|
3661
|
-
set(name, list) {
|
|
3662
|
-
if (name) {
|
|
3663
|
-
this.name = name;
|
|
3664
|
-
}
|
|
3665
|
-
if (list) {
|
|
3666
|
-
this.list = list;
|
|
3667
|
-
}
|
|
3668
|
-
dom$2.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
|
|
3669
|
-
if (!this.list[this.name]) {
|
|
3670
|
-
dom$2.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
|
|
3671
|
-
this.name = 'ketchup';
|
|
3672
|
-
}
|
|
3673
|
-
this.cssVars = {};
|
|
3674
|
-
this.styleTag.innerText =
|
|
3675
|
-
this.imports() +
|
|
3676
|
-
' :root[kup-theme="' +
|
|
3677
|
-
this.name +
|
|
3678
|
-
'"]{' +
|
|
3679
|
-
this.cssVariables() +
|
|
3680
|
-
this.icons() +
|
|
3681
|
-
'}' +
|
|
3682
|
-
kupThemeCss;
|
|
3683
|
-
this.customStyle();
|
|
3684
|
-
document.documentElement.setAttribute('kup-theme', this.name);
|
|
3685
|
-
document.dispatchEvent(new CustomEvent('kup-theme-change'));
|
|
3686
|
-
}
|
|
3687
|
-
/**
|
|
3688
|
-
* Gets the name of available themes (filters out themes named "test").
|
|
3689
|
-
* @returns {Array<string>} Array of themes' names.
|
|
3690
|
-
*/
|
|
3691
|
-
getThemes() {
|
|
3692
|
-
const themes = [];
|
|
3693
|
-
for (var key in this.list) {
|
|
3694
|
-
if (this.list.hasOwnProperty(key)) {
|
|
3695
|
-
if (key !== 'test') {
|
|
3696
|
-
themes.push(key);
|
|
3697
|
-
}
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
|
-
return themes;
|
|
3701
|
-
}
|
|
3702
|
-
/**
|
|
3703
|
-
* Sets the CSS variables of the theme.
|
|
3704
|
-
*/
|
|
3705
|
-
imports() {
|
|
3706
|
-
const imports = this.list[this.name].imports
|
|
3707
|
-
? this.list[this.name].imports
|
|
3708
|
-
: [];
|
|
3709
|
-
let css = '';
|
|
3710
|
-
for (let index = 0; index < imports.length; index++) {
|
|
3711
|
-
css += '@import ' + imports[index] + ';';
|
|
3712
|
-
}
|
|
3713
|
-
return css;
|
|
3714
|
-
}
|
|
3715
|
-
/**
|
|
3716
|
-
* Sets the CSS variables of the theme.
|
|
3717
|
-
*/
|
|
3718
|
-
cssVariables() {
|
|
3719
|
-
const variables = this.list[this.name].cssVariables;
|
|
3720
|
-
let css = '';
|
|
3721
|
-
for (let key in variables) {
|
|
3722
|
-
if (variables.hasOwnProperty(key)) {
|
|
3723
|
-
const val = variables[key];
|
|
3724
|
-
this.cssVars[key] = val;
|
|
3725
|
-
css += key + ': ' + val + ';';
|
|
3726
|
-
if (key.indexOf('color') > -1) {
|
|
3727
|
-
const computedColor = this.colorCheck(val);
|
|
3728
|
-
const rgbKey = key + '-rgb';
|
|
3729
|
-
const hKey = key + '-h';
|
|
3730
|
-
const sKey = key + '-s';
|
|
3731
|
-
const lKey = key + '-l';
|
|
3732
|
-
const rgbVal = computedColor.rgbValues;
|
|
3733
|
-
const hue = computedColor.hue;
|
|
3734
|
-
const saturation = computedColor.saturation;
|
|
3735
|
-
const lightness = computedColor.lightness;
|
|
3736
|
-
this.cssVars[rgbKey] = rgbVal;
|
|
3737
|
-
this.cssVars[hKey] = hue;
|
|
3738
|
-
this.cssVars[lKey] = lightness;
|
|
3739
|
-
this.cssVars[sKey] = saturation;
|
|
3740
|
-
css += rgbKey + ': ' + rgbVal + ';';
|
|
3741
|
-
css += hKey + ': ' + hue + ';';
|
|
3742
|
-
css += lKey + ': ' + lightness + ';';
|
|
3743
|
-
css += sKey + ': ' + saturation + ';';
|
|
3744
|
-
}
|
|
3745
|
-
}
|
|
3746
|
-
}
|
|
3747
|
-
return css;
|
|
3748
|
-
}
|
|
3749
|
-
/**
|
|
3750
|
-
* Sets the icon variables of the theme.
|
|
3751
|
-
*/
|
|
3752
|
-
icons() {
|
|
3753
|
-
const icons = this.list[this.name].icons;
|
|
3754
|
-
let css = '';
|
|
3755
|
-
for (var key in icons) {
|
|
3756
|
-
if (icons.hasOwnProperty(key)) {
|
|
3757
|
-
const val = `url('${index.getAssetPath(`./assets/svg/${icons[key]}.svg`)}') no-repeat center`;
|
|
3758
|
-
this.cssVars[key] = val;
|
|
3759
|
-
css += key + ': ' + val + ';';
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
|
-
return css;
|
|
3763
|
-
}
|
|
3764
|
-
/**
|
|
3765
|
-
* Refreshed managed components to apply theme customStyles.
|
|
3766
|
-
*/
|
|
3767
|
-
customStyle() {
|
|
3768
|
-
this.managedComponents.forEach(function (comp) {
|
|
3769
|
-
if (comp.isConnected) {
|
|
3770
|
-
comp.refresh();
|
|
3771
|
-
}
|
|
3772
|
-
});
|
|
3773
|
-
}
|
|
3774
|
-
/**
|
|
3775
|
-
* This method will just refresh the current theme.
|
|
3776
|
-
*/
|
|
3777
|
-
refresh() {
|
|
3778
|
-
try {
|
|
3779
|
-
this.styleTag.innerText =
|
|
3780
|
-
':root[kup-theme="' +
|
|
3781
|
-
this.name +
|
|
3782
|
-
'"]{' +
|
|
3783
|
-
this.cssVariables() +
|
|
3784
|
-
this.icons() +
|
|
3785
|
-
'}';
|
|
3786
|
-
this.customStyle();
|
|
3787
|
-
dom$2.ketchup.debug.logMessage('kup-theme', 'Theme ' + dom$2.getAttribute('kup-theme') + ' refreshed.');
|
|
3788
|
-
document.dispatchEvent(new CustomEvent('kup-theme-refresh'));
|
|
3789
|
-
}
|
|
3790
|
-
catch (error) {
|
|
3791
|
-
dom$2.ketchup.debug.logMessage('kup-theme', 'Theme not refreshed.', exports.KupDebugCategory.WARNING);
|
|
3792
|
-
}
|
|
3793
|
-
}
|
|
3794
|
-
/**
|
|
3795
|
-
* Registers a KupComponent in KupTheme, in order to be properly handled whenever the theme changes.
|
|
3796
|
-
* @param {any} comp - The component calling this function.
|
|
3797
|
-
*/
|
|
3798
|
-
register(comp) {
|
|
3799
|
-
this.managedComponents.add(comp.rootElement);
|
|
3800
|
-
}
|
|
3801
|
-
/**
|
|
3802
|
-
* Unregisters a KupComponent, so it won't be handled when the theme changes.
|
|
3803
|
-
* @param {any} comp - The component calling this function.
|
|
3804
|
-
*/
|
|
3805
|
-
unregister(comp) {
|
|
3806
|
-
if (this.managedComponents) {
|
|
3807
|
-
this.managedComponents.delete(comp.rootElement);
|
|
3808
|
-
}
|
|
3809
|
-
}
|
|
3810
|
-
/**
|
|
3811
|
-
* Combines theme's and component's customStyles, returning the result.
|
|
3812
|
-
* @param comp - The component calling this function.
|
|
3813
|
-
* @returns {string} Combined customStyle.
|
|
3814
|
-
*/
|
|
3815
|
-
setCustomStyle(comp) {
|
|
3816
|
-
const styles = this.list[this.name].customStyles;
|
|
3817
|
-
let completeStyle = '';
|
|
3818
|
-
if (styles && styles[masterCustomStyle]) {
|
|
3819
|
-
completeStyle += styles[masterCustomStyle];
|
|
3820
|
-
}
|
|
3821
|
-
if (styles && styles[comp.tagName]) {
|
|
3822
|
-
completeStyle += ' ' + styles[comp.tagName];
|
|
3823
|
-
}
|
|
3824
|
-
if (comp.customStyle) {
|
|
3825
|
-
completeStyle += ' ' + comp.customStyle;
|
|
3826
|
-
}
|
|
3827
|
-
return completeStyle ? completeStyle : null;
|
|
3828
|
-
}
|
|
3829
|
-
/**
|
|
3830
|
-
* Checks whether on a given color the text should be white or black.
|
|
3831
|
-
* @param {string} color - Color used to check the contrast.
|
|
3832
|
-
* @returns {string} "white" or "black".
|
|
3833
|
-
*/
|
|
3834
|
-
colorContrast(color) {
|
|
3835
|
-
color = this.colorCheck(color).rgbColor;
|
|
3836
|
-
const colorValues = color.replace(/[^\d,.]/g, '').split(',');
|
|
3837
|
-
const brightness = Math.round((parseInt(colorValues[0]) * 299 +
|
|
3838
|
-
parseInt(colorValues[1]) * 587 +
|
|
3839
|
-
parseInt(colorValues[2]) * 114) /
|
|
3840
|
-
1000);
|
|
3841
|
-
return brightness > 125 ? 'black' : 'white';
|
|
3842
|
-
}
|
|
3843
|
-
/**
|
|
3844
|
-
* Generates a random HEX color.
|
|
3845
|
-
* @param {number} brightness - Brightness of the color generated (0-255).
|
|
3846
|
-
* @returns {string} Random HEX color.
|
|
3847
|
-
*/
|
|
3848
|
-
randomColor(brightness) {
|
|
3849
|
-
function randomChannel(brightness) {
|
|
3850
|
-
var r = 255 - brightness;
|
|
3851
|
-
var n = 0 | (Math.random() * r + brightness);
|
|
3852
|
-
var s = n.toString(16);
|
|
3853
|
-
return s.length == 1 ? '0' + s : s;
|
|
3854
|
-
}
|
|
3855
|
-
return ('#' +
|
|
3856
|
-
randomChannel(brightness) +
|
|
3857
|
-
randomChannel(brightness) +
|
|
3858
|
-
randomChannel(brightness));
|
|
3859
|
-
}
|
|
3860
|
-
/**
|
|
3861
|
-
* Sets a random theme between those specified in this.list (excludes "print" and "test").
|
|
3862
|
-
*/
|
|
3863
|
-
randomTheme() {
|
|
3864
|
-
let themes = [];
|
|
3865
|
-
for (var key in this.list) {
|
|
3866
|
-
if (this.list.hasOwnProperty(key)) {
|
|
3867
|
-
if (key !== 'test' && key !== 'print') {
|
|
3868
|
-
themes.push(key);
|
|
3869
|
-
}
|
|
3870
|
-
}
|
|
3871
|
-
}
|
|
3872
|
-
if (themes.length > 0) {
|
|
3873
|
-
this.set(themes[Math.floor(Math.random() * Math.floor(themes.length))]);
|
|
3874
|
-
}
|
|
3875
|
-
else {
|
|
3876
|
-
dom$2.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", exports.KupDebugCategory.WARNING);
|
|
3877
|
-
}
|
|
3878
|
-
}
|
|
3879
|
-
/**
|
|
3880
|
-
* Returns HEX, RGB and RGB values from a given color.
|
|
3881
|
-
* @param {string} color - Color.
|
|
3882
|
-
* @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").
|
|
3883
|
-
*/
|
|
3884
|
-
colorCheck(color) {
|
|
3885
|
-
//Testing whether the color is transparent, if it is a fall back value will be returned matching the background-color
|
|
3886
|
-
if (color === 'transparent') {
|
|
3887
|
-
color = this.cssVars['--kup-background-color'];
|
|
3888
|
-
dom$2.ketchup.debug.logMessage('theme manager', 'Received TRANSPARENT color, converted to ' +
|
|
3889
|
-
color +
|
|
3890
|
-
' (theme background).');
|
|
3891
|
-
}
|
|
3892
|
-
let isHex = color.substr(0, 1) === '#';
|
|
3893
|
-
const isHsl = color.substr(0, 3).toLowerCase() === 'hsl';
|
|
3894
|
-
const isRgb = color.substr(0, 3).toLowerCase() === 'rgb';
|
|
3895
|
-
//If true, supposedly it's a code word
|
|
3896
|
-
if (!isHex && !isHsl && !isRgb) {
|
|
3897
|
-
const oldColor = color;
|
|
3898
|
-
color = this.codeToHex(color);
|
|
3899
|
-
isHex = color.substr(0, 1) === '#' ? true : false;
|
|
3900
|
-
dom$2.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
|
|
3901
|
-
oldColor +
|
|
3902
|
-
', converted to ' +
|
|
3903
|
-
color +
|
|
3904
|
-
'.');
|
|
3905
|
-
}
|
|
3906
|
-
//Testing whether the color is "hex" value or "hsl"
|
|
3907
|
-
let hexColor = null;
|
|
3908
|
-
let hslColor = null;
|
|
3909
|
-
let hslValues = null;
|
|
3910
|
-
let hue = null;
|
|
3911
|
-
let lightness = null;
|
|
3912
|
-
let saturation = null;
|
|
3913
|
-
if (isHex || isHsl) {
|
|
3914
|
-
const oldColor = color;
|
|
3915
|
-
let rgbColor = null;
|
|
3916
|
-
if (isHex) {
|
|
3917
|
-
hexColor = color;
|
|
3918
|
-
rgbColor = this.hexToRgb(color);
|
|
3919
|
-
}
|
|
3920
|
-
else {
|
|
3921
|
-
hslColor = color;
|
|
3922
|
-
const regexp = /hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/g;
|
|
3923
|
-
const hsl = regexp.exec(color).slice(1);
|
|
3924
|
-
hslValues = hsl[0] + ',' + hsl[1] + ',' + hsl[2];
|
|
3925
|
-
hue = hsl[0];
|
|
3926
|
-
saturation = hsl[2];
|
|
3927
|
-
lightness = hsl[1];
|
|
3928
|
-
const h = parseInt(hue.replace('deg', ''));
|
|
3929
|
-
const s = parseInt(saturation.replace('%', '')) / 100;
|
|
3930
|
-
const l = parseInt(lightness.replace('%', '')) / 100;
|
|
3931
|
-
rgbColor = this.hslToRgb(h, s, l);
|
|
3932
|
-
}
|
|
3933
|
-
try {
|
|
3934
|
-
color =
|
|
3935
|
-
'rgb(' +
|
|
3936
|
-
rgbColor.r +
|
|
3937
|
-
',' +
|
|
3938
|
-
rgbColor.g +
|
|
3939
|
-
',' +
|
|
3940
|
-
rgbColor.b +
|
|
3941
|
-
')';
|
|
3942
|
-
if (isHex) {
|
|
3943
|
-
const hsl = this.rgbToHsl(rgbColor.r, rgbColor.g, rgbColor.b);
|
|
3944
|
-
hue = hsl.h.toString();
|
|
3945
|
-
saturation = hsl.s.toString() + '%';
|
|
3946
|
-
lightness = hsl.l.toString() + '%';
|
|
3947
|
-
hslValues = hue + ',' + saturation + ',' + lightness;
|
|
3948
|
-
hslColor = 'hsl(' + hslValues + ')';
|
|
3949
|
-
}
|
|
3950
|
-
else {
|
|
3951
|
-
hexColor = this.rgbToHex(rgbColor.r, rgbColor.g, rgbColor.b);
|
|
3952
|
-
}
|
|
3953
|
-
dom$2.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
|
|
3954
|
-
oldColor +
|
|
3955
|
-
', converted to ' +
|
|
3956
|
-
color +
|
|
3957
|
-
'.');
|
|
3958
|
-
}
|
|
3959
|
-
catch (error) {
|
|
3960
|
-
dom$2.ketchup.debug.logMessage('theme-manager', 'Invalid color: ' + color + '.');
|
|
3961
|
-
}
|
|
3962
|
-
}
|
|
3963
|
-
let rgbValues = null;
|
|
3964
|
-
const values = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
|
|
3965
|
-
try {
|
|
3966
|
-
rgbValues = values[1] + ',' + values[2] + ',' + values[3];
|
|
3967
|
-
}
|
|
3968
|
-
catch (error) {
|
|
3969
|
-
dom$2.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
|
|
3970
|
-
}
|
|
3971
|
-
if (!hexColor) {
|
|
3972
|
-
try {
|
|
3973
|
-
hexColor = this.rgbToHex(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
|
|
3974
|
-
}
|
|
3975
|
-
catch (error) {
|
|
3976
|
-
dom$2.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
3977
|
-
}
|
|
3978
|
-
}
|
|
3979
|
-
if (!hslColor || !hslValues) {
|
|
3980
|
-
try {
|
|
3981
|
-
const hsl = this.rgbToHsl(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
|
|
3982
|
-
hue = hsl.h.toString();
|
|
3983
|
-
saturation = hsl.s.toString() + '%';
|
|
3984
|
-
lightness = hsl.l.toString() + '%';
|
|
3985
|
-
hslValues = hsl.h + ',' + hsl.s + '%,' + hsl.l + '%';
|
|
3986
|
-
hslColor = 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';
|
|
3987
|
-
}
|
|
3988
|
-
catch (error) {
|
|
3989
|
-
dom$2.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
|
|
3990
|
-
}
|
|
3991
|
-
}
|
|
3992
|
-
return {
|
|
3993
|
-
hexColor: hexColor,
|
|
3994
|
-
hslColor: hslColor,
|
|
3995
|
-
hslValues: hslValues,
|
|
3996
|
-
hue: hue,
|
|
3997
|
-
lightness: lightness,
|
|
3998
|
-
saturation: saturation,
|
|
3999
|
-
rgbColor: color,
|
|
4000
|
-
rgbValues: rgbValues,
|
|
4001
|
-
};
|
|
4002
|
-
}
|
|
4003
|
-
/**
|
|
4004
|
-
* Converts an HEX color to its RGB values.
|
|
4005
|
-
* @param {string} hex - Hex code.
|
|
4006
|
-
* @returns {KupThemeRGBValues} Object containing RGB values.
|
|
4007
|
-
*/
|
|
4008
|
-
hexToRgb(hex) {
|
|
4009
|
-
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
4010
|
-
return result
|
|
4011
|
-
? {
|
|
4012
|
-
r: parseInt(result[1], 16),
|
|
4013
|
-
g: parseInt(result[2], 16),
|
|
4014
|
-
b: parseInt(result[3], 16),
|
|
4015
|
-
}
|
|
4016
|
-
: null;
|
|
4017
|
-
}
|
|
4018
|
-
/**
|
|
4019
|
-
* Converts an HSL color to its RGB values.
|
|
4020
|
-
* @param {number} h - Hue (range [0, 360)).
|
|
4021
|
-
* @param {number} s - Saturation (range [0, 1)).
|
|
4022
|
-
* @param {number} l - Lightness (range [0, 1)).
|
|
4023
|
-
* @returns {Array} RGB values.
|
|
4024
|
-
*/
|
|
4025
|
-
hslToRgb(h, s, l) {
|
|
4026
|
-
if (h == undefined) {
|
|
4027
|
-
return { r: 0, g: 0, b: 0 };
|
|
4028
|
-
}
|
|
4029
|
-
let huePrime = h / 60;
|
|
4030
|
-
const chroma = (1 - Math.abs(2 * l - 1)) * s;
|
|
4031
|
-
const secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1));
|
|
4032
|
-
huePrime = Math.floor(huePrime);
|
|
4033
|
-
let red, green, blue;
|
|
4034
|
-
if (huePrime === 0) {
|
|
4035
|
-
red = chroma;
|
|
4036
|
-
green = secondComponent;
|
|
4037
|
-
blue = 0;
|
|
4038
|
-
}
|
|
4039
|
-
else if (huePrime === 1) {
|
|
4040
|
-
red = secondComponent;
|
|
4041
|
-
green = chroma;
|
|
4042
|
-
blue = 0;
|
|
4043
|
-
}
|
|
4044
|
-
else if (huePrime === 2) {
|
|
4045
|
-
red = 0;
|
|
4046
|
-
green = chroma;
|
|
4047
|
-
blue = secondComponent;
|
|
4048
|
-
}
|
|
4049
|
-
else if (huePrime === 3) {
|
|
4050
|
-
red = 0;
|
|
4051
|
-
green = secondComponent;
|
|
4052
|
-
blue = chroma;
|
|
4053
|
-
}
|
|
4054
|
-
else if (huePrime === 4) {
|
|
4055
|
-
red = secondComponent;
|
|
4056
|
-
green = 0;
|
|
4057
|
-
blue = chroma;
|
|
4058
|
-
}
|
|
4059
|
-
else if (huePrime === 5) {
|
|
4060
|
-
red = chroma;
|
|
4061
|
-
green = 0;
|
|
4062
|
-
blue = secondComponent;
|
|
4063
|
-
}
|
|
4064
|
-
const lightnessAdjustment = l - chroma / 2;
|
|
4065
|
-
red += lightnessAdjustment;
|
|
4066
|
-
green += lightnessAdjustment;
|
|
4067
|
-
blue += lightnessAdjustment;
|
|
4068
|
-
return {
|
|
4069
|
-
r: Math.round(red * 255),
|
|
4070
|
-
g: Math.round(green * 255),
|
|
4071
|
-
b: Math.round(blue * 255),
|
|
4072
|
-
};
|
|
4073
|
-
}
|
|
4074
|
-
/**
|
|
4075
|
-
* Converts a color in RGB format to the corresponding HEX color.
|
|
4076
|
-
* @param {number} r - Red channel value.
|
|
4077
|
-
* @param {number} g - Green channel value.
|
|
4078
|
-
* @param {number} b - Blue channel value.
|
|
4079
|
-
* @returns {string} HEX color.
|
|
4080
|
-
*/
|
|
4081
|
-
rgbToHex(r, g, b) {
|
|
4082
|
-
return ('#' + this.valueToHex(r) + this.valueToHex(g) + this.valueToHex(b));
|
|
4083
|
-
}
|
|
4084
|
-
/**
|
|
4085
|
-
* Converts a color in RGB format to the corresponding HSL color.
|
|
4086
|
-
* @param {number} r - Red channel value.
|
|
4087
|
-
* @param {number} g - Green channel value.
|
|
4088
|
-
* @param {number} b - Blue channel value.
|
|
4089
|
-
* @returns {KupThemeHSLValues} Object containing HSL values.
|
|
4090
|
-
*/
|
|
4091
|
-
rgbToHsl(r, g, b) {
|
|
4092
|
-
// Make r, g, and b fractions of 1
|
|
4093
|
-
r /= 255;
|
|
4094
|
-
g /= 255;
|
|
4095
|
-
b /= 255;
|
|
4096
|
-
// Find greatest and smallest channel values
|
|
4097
|
-
const cmin = Math.min(r, g, b), cmax = Math.max(r, g, b), delta = cmax - cmin;
|
|
4098
|
-
let h = 0, s = 0, l = 0;
|
|
4099
|
-
// Calculate hue
|
|
4100
|
-
// No difference
|
|
4101
|
-
if (delta == 0)
|
|
4102
|
-
h = 0;
|
|
4103
|
-
// Red is max
|
|
4104
|
-
else if (cmax == r)
|
|
4105
|
-
h = ((g - b) / delta) % 6;
|
|
4106
|
-
// Green is max
|
|
4107
|
-
else if (cmax == g)
|
|
4108
|
-
h = (b - r) / delta + 2;
|
|
4109
|
-
// Blue is max
|
|
4110
|
-
else
|
|
4111
|
-
h = (r - g) / delta + 4;
|
|
4112
|
-
h = Math.round(h * 60);
|
|
4113
|
-
// Make negative hues positive behind 360°
|
|
4114
|
-
if (h < 0)
|
|
4115
|
-
h += 360;
|
|
4116
|
-
// Calculate lightness
|
|
4117
|
-
l = (cmax + cmin) / 2;
|
|
4118
|
-
// Calculate saturation
|
|
4119
|
-
s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
|
|
4120
|
-
// Multiply l and s by 100
|
|
4121
|
-
s = +(s * 100).toFixed(1);
|
|
4122
|
-
l = +(l * 100).toFixed(1);
|
|
4123
|
-
return { h: h, s: s, l: l };
|
|
4124
|
-
}
|
|
4125
|
-
/**
|
|
4126
|
-
* Converts a single RGB value to the corresponding HEX value.
|
|
4127
|
-
* @param {number} c - Color value.
|
|
4128
|
-
* @returns {string} HEX value.
|
|
4129
|
-
*/
|
|
4130
|
-
valueToHex(c) {
|
|
4131
|
-
const hex = c.toString(16);
|
|
4132
|
-
return hex.length == 1 ? '0' + hex : hex;
|
|
4133
|
-
}
|
|
4134
|
-
/**
|
|
4135
|
-
* Converts a color code word to the corresponding HEX value.
|
|
4136
|
-
* @param {string} color - Color code word.
|
|
4137
|
-
* @returns {string} HEX value.
|
|
4138
|
-
*/
|
|
4139
|
-
codeToHex(color) {
|
|
4140
|
-
const colorCodes = {
|
|
4141
|
-
aliceblue: '#f0f8ff',
|
|
4142
|
-
antiquewhite: '#faebd7',
|
|
4143
|
-
aqua: '#00ffff',
|
|
4144
|
-
aquamarine: '#7fffd4',
|
|
4145
|
-
azure: '#f0ffff',
|
|
4146
|
-
beige: '#f5f5dc',
|
|
4147
|
-
bisque: '#ffe4c4',
|
|
4148
|
-
black: '#000000',
|
|
4149
|
-
blanchedalmond: '#ffebcd',
|
|
4150
|
-
blue: '#0000ff',
|
|
4151
|
-
blueviolet: '#8a2be2',
|
|
4152
|
-
brown: '#a52a2a',
|
|
4153
|
-
burlywood: '#deb887',
|
|
4154
|
-
cadetblue: '#5f9ea0',
|
|
4155
|
-
chartreuse: '#7fff00',
|
|
4156
|
-
chocolate: '#d2691e',
|
|
4157
|
-
coral: '#ff7f50',
|
|
4158
|
-
cornflowerblue: '#6495ed',
|
|
4159
|
-
cornsilk: '#fff8dc',
|
|
4160
|
-
crimson: '#dc143c',
|
|
4161
|
-
cyan: '#00ffff',
|
|
4162
|
-
darkblue: '#00008b',
|
|
4163
|
-
darkcyan: '#008b8b',
|
|
4164
|
-
darkgoldenrod: '#b8860b',
|
|
4165
|
-
darkgray: '#a9a9a9',
|
|
4166
|
-
darkgreen: '#006400',
|
|
4167
|
-
darkgrey: '#a9a9a9',
|
|
4168
|
-
darkkhaki: '#bdb76b',
|
|
4169
|
-
darkmagenta: '#8b008b',
|
|
4170
|
-
darkolivegreen: '#556b2f',
|
|
4171
|
-
darkorange: '#ff8c00',
|
|
4172
|
-
darkorchid: '#9932cc',
|
|
4173
|
-
darkred: '#8b0000',
|
|
4174
|
-
darksalmon: '#e9967a',
|
|
4175
|
-
darkseagreen: '#8fbc8f',
|
|
4176
|
-
darkslateblue: '#483d8b',
|
|
4177
|
-
darkslategray: '#2f4f4f',
|
|
4178
|
-
darkslategrey: '#2f4f4f',
|
|
4179
|
-
darkturquoise: '#00ced1',
|
|
4180
|
-
darkviolet: '#9400d3',
|
|
4181
|
-
deeppink: '#ff1493',
|
|
4182
|
-
deepskyblue: '#00bfff',
|
|
4183
|
-
dimgray: '#696969',
|
|
4184
|
-
dimgrey: '#696969',
|
|
4185
|
-
dodgerblue: '#1e90ff',
|
|
4186
|
-
firebrick: '#b22222',
|
|
4187
|
-
floralwhite: '#fffaf0',
|
|
4188
|
-
forestgreen: '#228b22',
|
|
4189
|
-
fuchsia: '#ff00ff',
|
|
4190
|
-
gainsboro: '#dcdcdc',
|
|
4191
|
-
ghostwhite: '#f8f8ff',
|
|
4192
|
-
goldenrod: '#daa520',
|
|
4193
|
-
gold: '#ffd700',
|
|
4194
|
-
gray: '#808080',
|
|
4195
|
-
green: '#008000',
|
|
4196
|
-
greenyellow: '#adff2f',
|
|
4197
|
-
grey: '#808080',
|
|
4198
|
-
honeydew: '#f0fff0',
|
|
4199
|
-
hotpink: '#ff69b4',
|
|
4200
|
-
indianred: '#cd5c5c',
|
|
4201
|
-
indigo: '#4b0082',
|
|
4202
|
-
ivory: '#fffff0',
|
|
4203
|
-
khaki: '#f0e68c',
|
|
4204
|
-
lavenderblush: '#fff0f5',
|
|
4205
|
-
lavender: '#e6e6fa',
|
|
4206
|
-
lawngreen: '#7cfc00',
|
|
4207
|
-
lemonchiffon: '#fffacd',
|
|
4208
|
-
lightblue: '#add8e6',
|
|
4209
|
-
lightcoral: '#f08080',
|
|
4210
|
-
lightcyan: '#e0ffff',
|
|
4211
|
-
lightgoldenrodyellow: '#fafad2',
|
|
4212
|
-
lightgray: '#d3d3d3',
|
|
4213
|
-
lightgreen: '#90ee90',
|
|
4214
|
-
lightgrey: '#d3d3d3',
|
|
4215
|
-
lightpink: '#ffb6c1',
|
|
4216
|
-
lightsalmon: '#ffa07a',
|
|
4217
|
-
lightseagreen: '#20b2aa',
|
|
4218
|
-
lightskyblue: '#87cefa',
|
|
4219
|
-
lightslategray: '#778899',
|
|
4220
|
-
lightslategrey: '#778899',
|
|
4221
|
-
lightsteelblue: '#b0c4de',
|
|
4222
|
-
lightyellow: '#ffffe0',
|
|
4223
|
-
lime: '#00ff00',
|
|
4224
|
-
limegreen: '#32cd32',
|
|
4225
|
-
linen: '#faf0e6',
|
|
4226
|
-
magenta: '#ff00ff',
|
|
4227
|
-
maroon: '#800000',
|
|
4228
|
-
mediumaquamarine: '#66cdaa',
|
|
4229
|
-
mediumblue: '#0000cd',
|
|
4230
|
-
mediumorchid: '#ba55d3',
|
|
4231
|
-
mediumpurple: '#9370db',
|
|
4232
|
-
mediumseagreen: '#3cb371',
|
|
4233
|
-
mediumslateblue: '#7b68ee',
|
|
4234
|
-
mediumspringgreen: '#00fa9a',
|
|
4235
|
-
mediumturquoise: '#48d1cc',
|
|
4236
|
-
mediumvioletred: '#c71585',
|
|
4237
|
-
midnightblue: '#191970',
|
|
4238
|
-
mintcream: '#f5fffa',
|
|
4239
|
-
mistyrose: '#ffe4e1',
|
|
4240
|
-
moccasin: '#ffe4b5',
|
|
4241
|
-
navajowhite: '#ffdead',
|
|
4242
|
-
navy: '#000080',
|
|
4243
|
-
oldlace: '#fdf5e6',
|
|
4244
|
-
olive: '#808000',
|
|
4245
|
-
olivedrab: '#6b8e23',
|
|
4246
|
-
orange: '#ffa500',
|
|
4247
|
-
orangered: '#ff4500',
|
|
4248
|
-
orchid: '#da70d6',
|
|
4249
|
-
palegoldenrod: '#eee8aa',
|
|
4250
|
-
palegreen: '#98fb98',
|
|
4251
|
-
paleturquoise: '#afeeee',
|
|
4252
|
-
palevioletred: '#db7093',
|
|
4253
|
-
papayawhip: '#ffefd5',
|
|
4254
|
-
peachpuff: '#ffdab9',
|
|
4255
|
-
peru: '#cd853f',
|
|
4256
|
-
pink: '#ffc0cb',
|
|
4257
|
-
plum: '#dda0dd',
|
|
4258
|
-
powderblue: '#b0e0e6',
|
|
4259
|
-
purple: '#800080',
|
|
4260
|
-
rebeccapurple: '#663399',
|
|
4261
|
-
red: '#ff0000',
|
|
4262
|
-
rosybrown: '#bc8f8f',
|
|
4263
|
-
royalblue: '#4169e1',
|
|
4264
|
-
saddlebrown: '#8b4513',
|
|
4265
|
-
salmon: '#fa8072',
|
|
4266
|
-
sandybrown: '#f4a460',
|
|
4267
|
-
seagreen: '#2e8b57',
|
|
4268
|
-
seashell: '#fff5ee',
|
|
4269
|
-
sienna: '#a0522d',
|
|
4270
|
-
silver: '#c0c0c0',
|
|
4271
|
-
skyblue: '#87ceeb',
|
|
4272
|
-
slateblue: '#6a5acd',
|
|
4273
|
-
slategray: '#708090',
|
|
4274
|
-
slategrey: '#708090',
|
|
4275
|
-
snow: '#fffafa',
|
|
4276
|
-
springgreen: '#00ff7f',
|
|
4277
|
-
steelblue: '#4682b4',
|
|
4278
|
-
tan: '#d2b48c',
|
|
4279
|
-
teal: '#008080',
|
|
4280
|
-
thistle: '#d8bfd8',
|
|
4281
|
-
tomato: '#ff6347',
|
|
4282
|
-
turquoise: '#40e0d0',
|
|
4283
|
-
violet: '#ee82ee',
|
|
4284
|
-
wheat: '#f5deb3',
|
|
4285
|
-
white: '#ffffff',
|
|
4286
|
-
whitesmoke: '#f5f5f5',
|
|
4287
|
-
yellow: '#ffff00',
|
|
4288
|
-
yellowgreen: '#9acd32',
|
|
4289
|
-
};
|
|
4290
|
-
if (colorCodes[color.toLowerCase()]) {
|
|
4291
|
-
return colorCodes[color.toLowerCase()];
|
|
4292
|
-
}
|
|
4293
|
-
else {
|
|
4294
|
-
dom$2.ketchup.debug.logMessage('theme manager', 'Could not decode color ' + color + '!');
|
|
4295
|
-
return color;
|
|
4296
|
-
}
|
|
4297
|
-
}
|
|
4298
|
-
}
|
|
4299
|
-
|
|
4300
|
-
/**
|
|
4301
|
-
* Modifiers to listen to in Keyboard Event in order to trigger the toolbars.
|
|
4302
|
-
*/
|
|
4303
|
-
var KupToolbarModifierKeys;
|
|
4304
|
-
(function (KupToolbarModifierKeys) {
|
|
4305
|
-
KupToolbarModifierKeys["ALT"] = "altKey";
|
|
4306
|
-
KupToolbarModifierKeys["CTRL"] = "ctrlKey";
|
|
4307
|
-
KupToolbarModifierKeys["SHIFT"] = "shiftKey";
|
|
4308
|
-
})(KupToolbarModifierKeys || (KupToolbarModifierKeys = {}));
|
|
4309
|
-
|
|
4310
|
-
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
4311
|
-
if (!privateMap.has(receiver)) {
|
|
4312
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
4313
|
-
}
|
|
4314
|
-
privateMap.set(receiver, value);
|
|
4315
|
-
return value;
|
|
4316
|
-
};
|
|
4317
|
-
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
4318
|
-
if (!privateMap.has(receiver)) {
|
|
4319
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
4320
|
-
}
|
|
4321
|
-
return privateMap.get(receiver);
|
|
4322
|
-
};
|
|
4323
|
-
var _keyEvent;
|
|
4324
|
-
const dom$1 = document.documentElement;
|
|
4325
|
-
/**
|
|
4326
|
-
* Handles component's toolbar.
|
|
4327
|
-
* @module KupToolbar
|
|
4328
|
-
*/
|
|
4329
|
-
class KupToolbar {
|
|
4330
|
-
/**
|
|
4331
|
-
* Initializes KupToolbar.
|
|
4332
|
-
*/
|
|
4333
|
-
constructor() {
|
|
4334
|
-
_keyEvent.set(this, void 0);
|
|
4335
|
-
this.active = false;
|
|
4336
|
-
this.managedElements = new Set();
|
|
4337
|
-
this.modifiers = [
|
|
4338
|
-
KupToolbarModifierKeys.ALT,
|
|
4339
|
-
KupToolbarModifierKeys.CTRL,
|
|
4340
|
-
];
|
|
4341
|
-
__classPrivateFieldSet(this, _keyEvent, function (e) {
|
|
4342
|
-
const toolbar = dom$1.ketchup.toolbar;
|
|
4343
|
-
if (toolbar.managedElements) {
|
|
4344
|
-
for (let index = 0; index < toolbar.modifiers.length; index++) {
|
|
4345
|
-
if (toolbar.modifiers[index] ===
|
|
4346
|
-
KupToolbarModifierKeys.CTRL &&
|
|
4347
|
-
e.metaKey) {
|
|
4348
|
-
continue;
|
|
4349
|
-
}
|
|
4350
|
-
else {
|
|
4351
|
-
if (!e[toolbar.modifiers[index]]) {
|
|
4352
|
-
{
|
|
4353
|
-
if (toolbar.active) {
|
|
4354
|
-
toolbar.hide();
|
|
4355
|
-
}
|
|
4356
|
-
return;
|
|
4357
|
-
}
|
|
4358
|
-
}
|
|
4359
|
-
}
|
|
4360
|
-
}
|
|
4361
|
-
toolbar.show();
|
|
4362
|
-
}
|
|
4363
|
-
});
|
|
4364
|
-
document.addEventListener('keydown', __classPrivateFieldGet(this, _keyEvent));
|
|
4365
|
-
document.addEventListener('keyup', __classPrivateFieldGet(this, _keyEvent));
|
|
4366
|
-
}
|
|
4367
|
-
/**
|
|
4368
|
-
* Shows components' toolbar.
|
|
4369
|
-
*/
|
|
4370
|
-
show() {
|
|
4371
|
-
this.managedElements.forEach(function (comp) {
|
|
4372
|
-
if (comp.isConnected) {
|
|
4373
|
-
comp.setAttribute('kup-toolbar', '');
|
|
4374
|
-
}
|
|
4375
|
-
});
|
|
4376
|
-
this.active = true;
|
|
4377
|
-
}
|
|
4378
|
-
/**
|
|
4379
|
-
* Hides components' toolbar.
|
|
4380
|
-
*/
|
|
4381
|
-
hide() {
|
|
4382
|
-
this.managedElements.forEach(function (comp) {
|
|
4383
|
-
if (comp.isConnected) {
|
|
4384
|
-
comp.removeAttribute('kup-toolbar');
|
|
4385
|
-
}
|
|
4386
|
-
});
|
|
4387
|
-
this.active = false;
|
|
4388
|
-
}
|
|
4389
|
-
/**
|
|
4390
|
-
* Watches the element eligible to move when dragging.
|
|
4391
|
-
* @param {HTMLElement} el - Toolbar-supporting element.
|
|
4392
|
-
*/
|
|
4393
|
-
register(el) {
|
|
4394
|
-
this.managedElements.add(el);
|
|
4395
|
-
}
|
|
4396
|
-
/**
|
|
4397
|
-
* Removes the elements from the KupToolbar class watchlist.
|
|
4398
|
-
* @param {HTMLElement[]} elements - Elements to remove.
|
|
4399
|
-
*/
|
|
4400
|
-
unregister(elements) {
|
|
4401
|
-
if (this.managedElements) {
|
|
4402
|
-
for (let index = 0; index < elements.length; index++) {
|
|
4403
|
-
this.managedElements.delete(elements[index]);
|
|
4404
|
-
}
|
|
4405
|
-
}
|
|
4406
|
-
}
|
|
4407
|
-
/**
|
|
4408
|
-
* Returns whether an element was previously registered or not.
|
|
4409
|
-
* @param {HTMLElement} el - Element to test.
|
|
4410
|
-
* @returns {boolean} True if the element was registered.
|
|
4411
|
-
*/
|
|
4412
|
-
isRegistered(el) {
|
|
4413
|
-
return !this.managedElements ? false : this.managedElements.has(el);
|
|
4414
|
-
}
|
|
4415
|
-
}
|
|
4416
|
-
_keyEvent = new WeakMap();
|
|
4417
|
-
|
|
4418
|
-
var ContentRect_1 = kupObjects.createCommonjsModule(function (module, exports) {
|
|
4419
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4420
|
-
var ContentRect = function (target) {
|
|
4421
|
-
if ('getBBox' in target) {
|
|
4422
|
-
var box = target.getBBox();
|
|
4423
|
-
return Object.freeze({
|
|
4424
|
-
height: box.height,
|
|
4425
|
-
left: 0,
|
|
4426
|
-
top: 0,
|
|
4427
|
-
width: box.width,
|
|
4428
|
-
});
|
|
4429
|
-
}
|
|
4430
|
-
else { // if (target instanceof HTMLElement) { // also includes all other non-SVGGraphicsElements
|
|
4431
|
-
var styles = window.getComputedStyle(target);
|
|
4432
|
-
return Object.freeze({
|
|
4433
|
-
height: parseFloat(styles.height || '0'),
|
|
4434
|
-
left: parseFloat(styles.paddingLeft || '0'),
|
|
4435
|
-
top: parseFloat(styles.paddingTop || '0'),
|
|
4436
|
-
width: parseFloat(styles.width || '0'),
|
|
4437
|
-
});
|
|
4438
|
-
}
|
|
4439
|
-
};
|
|
4440
|
-
exports.ContentRect = ContentRect;
|
|
4441
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29udGVudFJlY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvQ29udGVudFJlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFPQSxJQUFNLFdBQVcsR0FBRyxVQUFDLE1BQWU7SUFDaEMsSUFBSSxTQUFTLElBQUssTUFBNkIsRUFBRTtRQUM3QyxJQUFNLEdBQUcsR0FBSSxNQUE2QixDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ3JELE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQztZQUNqQixNQUFNLEVBQUUsR0FBRyxDQUFDLE1BQU07WUFDbEIsSUFBSSxFQUFFLENBQUM7WUFDUCxHQUFHLEVBQUUsQ0FBQztZQUNOLEtBQUssRUFBRSxHQUFHLENBQUMsS0FBSztTQUNuQixDQUFDLENBQUM7S0FDTjtTQUFNLEVBQUUsMEZBQTBGO1FBQy9GLElBQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUMvQyxPQUFPLE1BQU0sQ0FBQyxNQUFNLENBQUM7WUFDakIsTUFBTSxFQUFFLFVBQVUsQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFJLEdBQUcsQ0FBQztZQUN4QyxJQUFJLEVBQUUsVUFBVSxDQUFDLE1BQU0sQ0FBQyxXQUFXLElBQUksR0FBRyxDQUFDO1lBQzNDLEdBQUcsRUFBRSxVQUFVLENBQUMsTUFBTSxDQUFDLFVBQVUsSUFBSSxHQUFHLENBQUM7WUFDekMsS0FBSyxFQUFFLFVBQVUsQ0FBQyxNQUFNLENBQUMsS0FBSyxJQUFJLEdBQUcsQ0FBQztTQUN6QyxDQUFDLENBQUM7S0FDTjtBQUNMLENBQUMsQ0FBQztBQUVPLGtDQUFXIn0=
|
|
4442
|
-
});
|
|
4443
|
-
|
|
4444
|
-
var ResizeObservation_1 = kupObjects.createCommonjsModule(function (module, exports) {
|
|
4445
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4446
|
-
|
|
4447
|
-
var ResizeObservation = /** @class */ (function () {
|
|
4448
|
-
function ResizeObservation(target) {
|
|
4449
|
-
this.target = target;
|
|
4450
|
-
this.$$broadcastWidth = this.$$broadcastHeight = 0;
|
|
4451
|
-
}
|
|
4452
|
-
Object.defineProperty(ResizeObservation.prototype, "broadcastWidth", {
|
|
4453
|
-
get: function () {
|
|
4454
|
-
return this.$$broadcastWidth;
|
|
4455
|
-
},
|
|
4456
|
-
enumerable: true,
|
|
4457
|
-
configurable: true
|
|
4458
|
-
});
|
|
4459
|
-
Object.defineProperty(ResizeObservation.prototype, "broadcastHeight", {
|
|
4460
|
-
get: function () {
|
|
4461
|
-
return this.$$broadcastHeight;
|
|
4462
|
-
},
|
|
4463
|
-
enumerable: true,
|
|
4464
|
-
configurable: true
|
|
4465
|
-
});
|
|
4466
|
-
ResizeObservation.prototype.isActive = function () {
|
|
4467
|
-
var cr = ContentRect_1.ContentRect(this.target);
|
|
4468
|
-
return !!cr
|
|
4469
|
-
&& (cr.width !== this.broadcastWidth
|
|
4470
|
-
|| cr.height !== this.broadcastHeight);
|
|
4471
|
-
};
|
|
4472
|
-
return ResizeObservation;
|
|
4473
|
-
}());
|
|
4474
|
-
exports.ResizeObservation = ResizeObservation;
|
|
4475
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzaXplT2JzZXJ2YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUmVzaXplT2JzZXJ2YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw2Q0FBNEM7QUFFNUM7SUFlSSwyQkFBWSxNQUFlO1FBQ3ZCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1FBQ3JCLElBQUksQ0FBQyxnQkFBZ0IsR0FBRyxJQUFJLENBQUMsaUJBQWlCLEdBQUcsQ0FBQyxDQUFDO0lBQ3ZELENBQUM7SUFWRCxzQkFBVyw2Q0FBYzthQUF6QjtZQUNJLE9BQU8sSUFBSSxDQUFDLGdCQUFnQixDQUFDO1FBQ2pDLENBQUM7OztPQUFBO0lBQ0Qsc0JBQVcsOENBQWU7YUFBMUI7WUFDSSxPQUFPLElBQUksQ0FBQyxpQkFBaUIsQ0FBQztRQUNsQyxDQUFDOzs7T0FBQTtJQU9NLG9DQUFRLEdBQWY7UUFDSSxJQUFNLEVBQUUsR0FBRyx5QkFBVyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUVwQyxPQUFPLENBQUMsQ0FBQyxFQUFFO2VBQ0osQ0FDQyxFQUFFLENBQUMsS0FBSyxLQUFLLElBQUksQ0FBQyxjQUFjO21CQUM3QixFQUFFLENBQUMsTUFBTSxLQUFLLElBQUksQ0FBQyxlQUFlLENBQ3hDLENBQUM7SUFDVixDQUFDO0lBQ0wsd0JBQUM7QUFBRCxDQUFDLEFBN0JELElBNkJDO0FBRVEsOENBQWlCIn0=
|
|
4476
|
-
});
|
|
4477
|
-
|
|
4478
|
-
var ResizeObserverEntry_1 = kupObjects.createCommonjsModule(function (module, exports) {
|
|
4479
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4480
|
-
|
|
4481
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
4482
|
-
function ResizeObserverEntry(target) {
|
|
4483
|
-
this.target = target;
|
|
4484
|
-
this.contentRect = ContentRect_1.ContentRect(target);
|
|
4485
|
-
}
|
|
4486
|
-
return ResizeObserverEntry;
|
|
4487
|
-
}());
|
|
4488
|
-
exports.ResizeObserverEntry = ResizeObserverEntry;
|
|
4489
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzaXplT2JzZXJ2ZXJFbnRyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9SZXNpemVPYnNlcnZlckVudHJ5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNkNBQTRDO0FBRTVDO0lBR0ksNkJBQVksTUFBZTtRQUN2QixJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztRQUNyQixJQUFJLENBQUMsV0FBVyxHQUFHLHlCQUFXLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDM0MsQ0FBQztJQUNMLDBCQUFDO0FBQUQsQ0FBQyxBQVBELElBT0M7QUFFUSxrREFBbUIifQ==
|
|
4490
|
-
});
|
|
4491
|
-
|
|
4492
|
-
var ResizeObserver_1 = kupObjects.createCommonjsModule(function (module, exports) {
|
|
4493
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
var resizeObservers = [];
|
|
4497
|
-
var ResizeObserver = /** @class */ (function () {
|
|
4498
|
-
function ResizeObserver(callback) {
|
|
4499
|
-
/** @internal */
|
|
4500
|
-
this.$$observationTargets = [];
|
|
4501
|
-
/** @internal */
|
|
4502
|
-
this.$$activeTargets = [];
|
|
4503
|
-
/** @internal */
|
|
4504
|
-
this.$$skippedTargets = [];
|
|
4505
|
-
var message = callbackGuard(callback);
|
|
4506
|
-
if (message) {
|
|
4507
|
-
throw TypeError(message);
|
|
4508
|
-
}
|
|
4509
|
-
this.$$callback = callback;
|
|
4510
|
-
}
|
|
4511
|
-
ResizeObserver.prototype.observe = function (target) {
|
|
4512
|
-
var message = targetGuard('observe', target);
|
|
4513
|
-
if (message) {
|
|
4514
|
-
throw TypeError(message);
|
|
4515
|
-
}
|
|
4516
|
-
var index = findTargetIndex(this.$$observationTargets, target);
|
|
4517
|
-
if (index >= 0) {
|
|
4518
|
-
return;
|
|
4519
|
-
}
|
|
4520
|
-
this.$$observationTargets.push(new ResizeObservation_1.ResizeObservation(target));
|
|
4521
|
-
registerResizeObserver(this);
|
|
4522
|
-
};
|
|
4523
|
-
ResizeObserver.prototype.unobserve = function (target) {
|
|
4524
|
-
var message = targetGuard('unobserve', target);
|
|
4525
|
-
if (message) {
|
|
4526
|
-
throw TypeError(message);
|
|
4527
|
-
}
|
|
4528
|
-
var index = findTargetIndex(this.$$observationTargets, target);
|
|
4529
|
-
if (index < 0) {
|
|
4530
|
-
return;
|
|
4531
|
-
}
|
|
4532
|
-
this.$$observationTargets.splice(index, 1);
|
|
4533
|
-
if (this.$$observationTargets.length === 0) {
|
|
4534
|
-
deregisterResizeObserver(this);
|
|
4535
|
-
}
|
|
4536
|
-
};
|
|
4537
|
-
ResizeObserver.prototype.disconnect = function () {
|
|
4538
|
-
this.$$observationTargets = [];
|
|
4539
|
-
this.$$activeTargets = [];
|
|
4540
|
-
deregisterResizeObserver(this);
|
|
4541
|
-
};
|
|
4542
|
-
return ResizeObserver;
|
|
4543
|
-
}());
|
|
4544
|
-
exports.ResizeObserver = ResizeObserver;
|
|
4545
|
-
function registerResizeObserver(resizeObserver) {
|
|
4546
|
-
var index = resizeObservers.indexOf(resizeObserver);
|
|
4547
|
-
if (index < 0) {
|
|
4548
|
-
resizeObservers.push(resizeObserver);
|
|
4549
|
-
startLoop();
|
|
4550
|
-
}
|
|
4551
|
-
}
|
|
4552
|
-
function deregisterResizeObserver(resizeObserver) {
|
|
4553
|
-
var index = resizeObservers.indexOf(resizeObserver);
|
|
4554
|
-
if (index >= 0) {
|
|
4555
|
-
resizeObservers.splice(index, 1);
|
|
4556
|
-
checkStopLoop();
|
|
4557
|
-
}
|
|
4558
|
-
}
|
|
4559
|
-
function callbackGuard(callback) {
|
|
4560
|
-
if (typeof (callback) === 'undefined') {
|
|
4561
|
-
return "Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";
|
|
4562
|
-
}
|
|
4563
|
-
if (typeof (callback) !== 'function') {
|
|
4564
|
-
return "Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.";
|
|
4565
|
-
}
|
|
4566
|
-
}
|
|
4567
|
-
function targetGuard(functionName, target) {
|
|
4568
|
-
if (typeof (target) === 'undefined') {
|
|
4569
|
-
return "Failed to execute '" + functionName + "' on 'ResizeObserver': 1 argument required, but only 0 present.";
|
|
4570
|
-
}
|
|
4571
|
-
if (!(target instanceof window.Element)) {
|
|
4572
|
-
return "Failed to execute '" + functionName + "' on 'ResizeObserver': parameter 1 is not of type 'Element'.";
|
|
4573
|
-
}
|
|
4574
|
-
}
|
|
4575
|
-
function findTargetIndex(collection, target) {
|
|
4576
|
-
for (var index = 0; index < collection.length; index += 1) {
|
|
4577
|
-
if (collection[index].target === target) {
|
|
4578
|
-
return index;
|
|
4579
|
-
}
|
|
4580
|
-
}
|
|
4581
|
-
return -1;
|
|
4582
|
-
}
|
|
4583
|
-
var gatherActiveObservationsAtDepth = function (depth) {
|
|
4584
|
-
resizeObservers.forEach(function (ro) {
|
|
4585
|
-
ro.$$activeTargets = [];
|
|
4586
|
-
ro.$$skippedTargets = [];
|
|
4587
|
-
ro.$$observationTargets.forEach(function (ot) {
|
|
4588
|
-
if (ot.isActive()) {
|
|
4589
|
-
var targetDepth = calculateDepthForNode(ot.target);
|
|
4590
|
-
if (targetDepth > depth) {
|
|
4591
|
-
ro.$$activeTargets.push(ot);
|
|
4592
|
-
}
|
|
4593
|
-
else {
|
|
4594
|
-
ro.$$skippedTargets.push(ot);
|
|
4595
|
-
}
|
|
4596
|
-
}
|
|
4597
|
-
});
|
|
4598
|
-
});
|
|
4599
|
-
};
|
|
4600
|
-
var hasActiveObservations = function () {
|
|
4601
|
-
return resizeObservers.some(function (ro) { return !!ro.$$activeTargets.length; });
|
|
4602
|
-
};
|
|
4603
|
-
var hasSkippedObservations = function () {
|
|
4604
|
-
return resizeObservers.some(function (ro) { return !!ro.$$skippedTargets.length; });
|
|
4605
|
-
};
|
|
4606
|
-
var broadcastActiveObservations = function () {
|
|
4607
|
-
var shallowestTargetDepth = Infinity;
|
|
4608
|
-
resizeObservers.forEach(function (ro) {
|
|
4609
|
-
if (!ro.$$activeTargets.length) {
|
|
4610
|
-
return;
|
|
4611
|
-
}
|
|
4612
|
-
var entries = [];
|
|
4613
|
-
ro.$$activeTargets.forEach(function (obs) {
|
|
4614
|
-
var entry = new ResizeObserverEntry_1.ResizeObserverEntry(obs.target);
|
|
4615
|
-
entries.push(entry);
|
|
4616
|
-
obs.$$broadcastWidth = entry.contentRect.width;
|
|
4617
|
-
obs.$$broadcastHeight = entry.contentRect.height;
|
|
4618
|
-
var targetDepth = calculateDepthForNode(obs.target);
|
|
4619
|
-
if (targetDepth < shallowestTargetDepth) {
|
|
4620
|
-
shallowestTargetDepth = targetDepth;
|
|
4621
|
-
}
|
|
4622
|
-
});
|
|
4623
|
-
ro.$$callback(entries, ro);
|
|
4624
|
-
ro.$$activeTargets = [];
|
|
4625
|
-
});
|
|
4626
|
-
return shallowestTargetDepth;
|
|
4627
|
-
};
|
|
4628
|
-
var deliverResizeLoopErrorNotification = function () {
|
|
4629
|
-
var errorEvent = new window.ErrorEvent('ResizeLoopError', {
|
|
4630
|
-
message: 'ResizeObserver loop completed with undelivered notifications.',
|
|
4631
|
-
});
|
|
4632
|
-
window.dispatchEvent(errorEvent);
|
|
4633
|
-
};
|
|
4634
|
-
var calculateDepthForNode = function (target) {
|
|
4635
|
-
var depth = 0;
|
|
4636
|
-
while (target.parentNode) {
|
|
4637
|
-
target = target.parentNode;
|
|
4638
|
-
depth += 1;
|
|
4639
|
-
}
|
|
4640
|
-
return depth;
|
|
4641
|
-
};
|
|
4642
|
-
var notificationIteration = function () {
|
|
4643
|
-
var depth = 0;
|
|
4644
|
-
gatherActiveObservationsAtDepth(depth);
|
|
4645
|
-
while (hasActiveObservations()) {
|
|
4646
|
-
depth = broadcastActiveObservations();
|
|
4647
|
-
gatherActiveObservationsAtDepth(depth);
|
|
4648
|
-
}
|
|
4649
|
-
if (hasSkippedObservations()) {
|
|
4650
|
-
deliverResizeLoopErrorNotification();
|
|
4651
|
-
}
|
|
4652
|
-
};
|
|
4653
|
-
var animationFrameCancelToken;
|
|
4654
|
-
var startLoop = function () {
|
|
4655
|
-
if (animationFrameCancelToken)
|
|
4656
|
-
return;
|
|
4657
|
-
runLoop();
|
|
4658
|
-
};
|
|
4659
|
-
var runLoop = function () {
|
|
4660
|
-
animationFrameCancelToken = window.requestAnimationFrame(function () {
|
|
4661
|
-
notificationIteration();
|
|
4662
|
-
runLoop();
|
|
4663
|
-
});
|
|
4664
|
-
};
|
|
4665
|
-
var checkStopLoop = function () {
|
|
4666
|
-
if (animationFrameCancelToken && !resizeObservers.some(function (ro) { return !!ro.$$observationTargets.length; })) {
|
|
4667
|
-
window.cancelAnimationFrame(animationFrameCancelToken);
|
|
4668
|
-
animationFrameCancelToken = undefined;
|
|
4669
|
-
}
|
|
4670
|
-
};
|
|
4671
|
-
var install = function () {
|
|
4672
|
-
return window.ResizeObserver = ResizeObserver;
|
|
4673
|
-
};
|
|
4674
|
-
exports.install = install;
|
|
4675
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzaXplT2JzZXJ2ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUmVzaXplT2JzZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5REFBd0Q7QUFFeEQsNkRBQTREO0FBRTVELElBQU0sZUFBZSxHQUFHLEVBQXNCLENBQUM7QUFFL0M7SUFVSSx3QkFBWSxRQUFnQztRQVA1QyxnQkFBZ0I7UUFDVCx5QkFBb0IsR0FBRyxFQUF5QixDQUFDO1FBQ3hELGdCQUFnQjtRQUNULG9CQUFlLEdBQUcsRUFBeUIsQ0FBQztRQUNuRCxnQkFBZ0I7UUFDVCxxQkFBZ0IsR0FBRyxFQUF5QixDQUFDO1FBR2hELElBQU0sT0FBTyxHQUFHLGFBQWEsQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUN4QyxJQUFJLE9BQU8sRUFBRTtZQUNULE1BQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBQzVCO1FBQ0QsSUFBSSxDQUFDLFVBQVUsR0FBRyxRQUFRLENBQUM7SUFDL0IsQ0FBQztJQUVNLGdDQUFPLEdBQWQsVUFBZSxNQUFlO1FBQzFCLElBQU0sT0FBTyxHQUFHLFdBQVcsQ0FBQyxTQUFTLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDL0MsSUFBSSxPQUFPLEVBQUU7WUFDVCxNQUFNLFNBQVMsQ0FBQyxPQUFPLENBQUMsQ0FBQztTQUM1QjtRQUNELElBQU0sS0FBSyxHQUFHLGVBQWUsQ0FBQyxJQUFJLENBQUMsb0JBQW9CLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDakUsSUFBSSxLQUFLLElBQUksQ0FBQyxFQUFFO1lBQ1osT0FBTztTQUNWO1FBQ0QsSUFBSSxDQUFDLG9CQUFvQixDQUFDLElBQUksQ0FBQyxJQUFJLHFDQUFpQixDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7UUFDOUQsc0JBQXNCLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDakMsQ0FBQztJQUVNLGtDQUFTLEdBQWhCLFVBQWlCLE1BQWU7UUFDNUIsSUFBTSxPQUFPLEdBQUcsV0FBVyxDQUFDLFdBQVcsRUFBRSxNQUFNLENBQUMsQ0FBQztRQUNqRCxJQUFJLE9BQU8sRUFBRTtZQUNULE1BQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBQzVCO1FBQ0QsSUFBTSxLQUFLLEdBQUcsZUFBZSxDQUFDLElBQUksQ0FBQyxvQkFBb0IsRUFBRSxNQUFNLENBQUMsQ0FBQztRQUNqRSxJQUFJLEtBQUssR0FBRyxDQUFDLEVBQUU7WUFDWCxPQUFPO1NBQ1Y7UUFDRCxJQUFJLENBQUMsb0JBQW9CLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztRQUMzQyxJQUFJLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1lBQ3hDLHdCQUF3QixDQUFDLElBQUksQ0FBQyxDQUFDO1NBQ2xDO0lBQ0wsQ0FBQztJQUVNLG1DQUFVLEdBQWpCO1FBQ0ksSUFBSSxDQUFDLG9CQUFvQixHQUFHLEVBQUUsQ0FBQztRQUMvQixJQUFJLENBQUMsZUFBZSxHQUFHLEVBQUUsQ0FBQztRQUMxQix3QkFBd0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNuQyxDQUFDO0lBQ0wscUJBQUM7QUFBRCxDQUFDLEFBbkRELElBbURDO0FBdUpHLHdDQUFjO0FBckpsQixTQUFTLHNCQUFzQixDQUFDLGNBQThCO0lBQzFELElBQU0sS0FBSyxHQUFHLGVBQWUsQ0FBQyxPQUFPLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDdEQsSUFBSSxLQUFLLEdBQUcsQ0FBQyxFQUFFO1FBQ1gsZUFBZSxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQztRQUNyQyxTQUFTLEVBQUUsQ0FBQztLQUNmO0FBQ0wsQ0FBQztBQUVELFNBQVMsd0JBQXdCLENBQUMsY0FBOEI7SUFDNUQsSUFBTSxLQUFLLEdBQUcsZUFBZSxDQUFDLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FBQztJQUN0RCxJQUFJLEtBQUssSUFBSSxDQUFDLEVBQUU7UUFDWixlQUFlLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztRQUNqQyxhQUFhLEVBQUUsQ0FBQztLQUNuQjtBQUNMLENBQUM7QUFFRCxTQUFTLGFBQWEsQ0FBQyxRQUFnQztJQUNuRCxJQUFJLE9BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxXQUFXLEVBQUU7UUFDbEMsT0FBTyxnRkFBZ0YsQ0FBQztLQUMzRjtJQUNELElBQUksT0FBTSxDQUFDLFFBQVEsQ0FBQyxLQUFLLFVBQVUsRUFBRTtRQUNqQyxPQUFPLCtGQUErRixDQUFDO0tBQzFHO0FBQ0wsQ0FBQztBQUVELFNBQVMsV0FBVyxDQUFDLFlBQW9CLEVBQUUsTUFBZTtJQUN0RCxJQUFJLE9BQU0sQ0FBQyxNQUFNLENBQUMsS0FBSyxXQUFXLEVBQUU7UUFDaEMsT0FBTyx3QkFBc0IsWUFBWSxvRUFBaUUsQ0FBQztLQUM5RztJQUNELElBQUksQ0FBQyxDQUFDLE1BQU0sWUFBYSxNQUFjLENBQUMsT0FBTyxDQUFDLEVBQUU7UUFDOUMsT0FBTyx3QkFBc0IsWUFBWSxpRUFBOEQsQ0FBQztLQUMzRztBQUNMLENBQUM7QUFFRCxTQUFTLGVBQWUsQ0FBQyxVQUErQixFQUFFLE1BQWU7SUFDckUsS0FBSyxJQUFJLEtBQUssR0FBRyxDQUFDLEVBQUUsS0FBSyxHQUFHLFVBQVUsQ0FBQyxNQUFNLEVBQUUsS0FBSyxJQUFJLENBQUMsRUFBRTtRQUN2RCxJQUFJLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQyxNQUFNLEtBQUssTUFBTSxFQUFFO1lBQ3JDLE9BQU8sS0FBSyxDQUFDO1NBQ2hCO0tBQ0o7SUFDRCxPQUFPLENBQUMsQ0FBQyxDQUFDO0FBQ2QsQ0FBQztBQUVELElBQU0sK0JBQStCLEdBQUcsVUFBQyxLQUFhO0lBQ2xELGVBQWUsQ0FBQyxPQUFPLENBQUMsVUFBQyxFQUFFO1FBQ3ZCLEVBQUUsQ0FBQyxlQUFlLEdBQUcsRUFBRSxDQUFDO1FBQ3hCLEVBQUUsQ0FBQyxnQkFBZ0IsR0FBRyxFQUFFLENBQUM7UUFDekIsRUFBRSxDQUFDLG9CQUFvQixDQUFDLE9BQU8sQ0FBQyxVQUFDLEVBQUU7WUFDL0IsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFLEVBQUU7Z0JBQ2YsSUFBTSxXQUFXLEdBQUcscUJBQXFCLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxDQUFDO2dCQUNyRCxJQUFJLFdBQVcsR0FBRyxLQUFLLEVBQUU7b0JBQ3JCLEVBQUUsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO2lCQUMvQjtxQkFBTTtvQkFDSCxFQUFFLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO2lCQUNoQzthQUNKO1FBQ0wsQ0FBQyxDQUFDLENBQUM7SUFDUCxDQUFDLENBQUMsQ0FBQztBQUNQLENBQUMsQ0FBQztBQUVGLElBQU0scUJBQXFCLEdBQUc7SUFDMUIsT0FBQSxlQUFlLENBQUMsSUFBSSxDQUFDLFVBQUMsRUFBRSxJQUFLLE9BQUEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxlQUFlLENBQUMsTUFBTSxFQUEzQixDQUEyQixDQUFDO0FBQXpELENBQXlELENBQUM7QUFFOUQsSUFBTSxzQkFBc0IsR0FBRztJQUMzQixPQUFBLGVBQWUsQ0FBQyxJQUFJLENBQUMsVUFBQyxFQUFFLElBQUssT0FBQSxDQUFDLENBQUMsRUFBRSxDQUFDLGdCQUFnQixDQUFDLE1BQU0sRUFBNUIsQ0FBNEIsQ0FBQztBQUExRCxDQUEwRCxDQUFDO0FBRS9ELElBQU0sMkJBQTJCLEdBQUc7SUFDaEMsSUFBSSxxQkFBcUIsR0FBRyxRQUFRLENBQUM7SUFDckMsZUFBZSxDQUFDLE9BQU8sQ0FBQyxVQUFDLEVBQUU7UUFDdkIsSUFBSSxDQUFDLEVBQUUsQ0FBQyxlQUFlLENBQUMsTUFBTSxFQUFFO1lBQzVCLE9BQU87U0FDVjtRQUVELElBQU0sT0FBTyxHQUFHLEVBQTJCLENBQUM7UUFDNUMsRUFBRSxDQUFDLGVBQWUsQ0FBQyxPQUFPLENBQUMsVUFBQyxHQUFHO1lBQzNCLElBQU0sS0FBSyxHQUFHLElBQUkseUNBQW1CLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBQ2xELE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7WUFDcEIsR0FBRyxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDO1lBQy9DLEdBQUcsQ0FBQyxpQkFBaUIsR0FBRyxLQUFLLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQztZQUNqRCxJQUFNLFdBQVcsR0FBRyxxQkFBcUIsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdEQsSUFBSSxXQUFXLEdBQUcscUJBQXFCLEVBQUU7Z0JBQ3JDLHFCQUFxQixHQUFHLFdBQVcsQ0FBQzthQUN2QztRQUNMLENBQUMsQ0FBQyxDQUFDO1FBRUgsRUFBRSxDQUFDLFVBQVUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDM0IsRUFBRSxDQUFDLGVBQWUsR0FBRyxFQUFFLENBQUM7SUFDNUIsQ0FBQyxDQUFDLENBQUM7SUFFSCxPQUFPLHFCQUFxQixDQUFDO0FBQ2pDLENBQUMsQ0FBQztBQUVGLElBQU0sa0NBQWtDLEdBQUc7SUFDdkMsSUFBTSxVQUFVLEdBQUcsSUFBSyxNQUFjLENBQUMsVUFBVSxDQUFDLGlCQUFpQixFQUFFO1FBQ2pFLE9BQU8sRUFBRSwrREFBK0Q7S0FDM0UsQ0FBQyxDQUFDO0lBRUgsTUFBTSxDQUFDLGFBQWEsQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUNyQyxDQUFDLENBQUM7QUFFRixJQUFNLHFCQUFxQixHQUFHLFVBQUMsTUFBWTtJQUN2QyxJQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7SUFDZCxPQUFPLE1BQU0sQ0FBQyxVQUFVLEVBQUU7UUFDdEIsTUFBTSxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUM7UUFDM0IsS0FBSyxJQUFJLENBQUMsQ0FBQztLQUNkO0lBQ0QsT0FBTyxLQUFLLENBQUM7QUFDakIsQ0FBQyxDQUFDO0FBRUYsSUFBTSxxQkFBcUIsR0FBRztJQUMxQixJQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7SUFDZCwrQkFBK0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUN2QyxPQUFPLHFCQUFxQixFQUFFLEVBQUU7UUFDNUIsS0FBSyxHQUFHLDJCQUEyQixFQUFFLENBQUM7UUFDdEMsK0JBQStCLENBQUMsS0FBSyxDQUFDLENBQUM7S0FDMUM7SUFFRCxJQUFJLHNCQUFzQixFQUFFLEVBQUU7UUFDMUIsa0NBQWtDLEVBQUUsQ0FBQztLQUN4QztBQUNMLENBQUMsQ0FBQztBQUVGLElBQUkseUJBQTZDLENBQUM7QUFFbEQsSUFBTSxTQUFTLEdBQUc7SUFDZCxJQUFJLHlCQUF5QjtRQUFFLE9BQU87SUFFdEMsT0FBTyxFQUFFLENBQUM7QUFDZCxDQUFDLENBQUM7QUFFRixJQUFNLE9BQU8sR0FBRztJQUNaLHlCQUF5QixHQUFHLE1BQU0sQ0FBQyxxQkFBcUIsQ0FBQztRQUNyRCxxQkFBcUIsRUFBRSxDQUFDO1FBQ3hCLE9BQU8sRUFBRSxDQUFDO0lBQ2QsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUM7QUFFRixJQUFNLGFBQWEsR0FBRztJQUNsQixJQUFJLHlCQUF5QixJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxVQUFDLEVBQUUsSUFBSyxPQUFBLENBQUMsQ0FBQyxFQUFFLENBQUMsb0JBQW9CLENBQUMsTUFBTSxFQUFoQyxDQUFnQyxDQUFDLEVBQUU7UUFDOUYsTUFBTSxDQUFDLG9CQUFvQixDQUFDLHlCQUF5QixDQUFDLENBQUM7UUFDdkQseUJBQXlCLEdBQUcsU0FBUyxDQUFDO0tBQ3pDO0FBQ0wsQ0FBQyxDQUFDO0FBRUYsSUFBTSxPQUFPLEdBQUc7SUFDWixPQUFDLE1BQWMsQ0FBQyxjQUFjLEdBQUcsY0FBYztBQUEvQyxDQUErQyxDQUFDO0FBR2hELDBCQUFPIn0=
|
|
4676
|
-
});
|
|
4677
|
-
|
|
4678
|
-
const dom = document.documentElement;
|
|
4679
|
-
/**
|
|
4680
|
-
* This class controls every other Ketch.UP utility suite.
|
|
4681
|
-
* @module KupManager
|
|
4682
|
-
*/
|
|
4683
|
-
class KupManager {
|
|
4684
|
-
/**
|
|
4685
|
-
* Initializes KupManager.
|
|
4686
|
-
*/
|
|
4687
|
-
constructor(overrides) {
|
|
4688
|
-
let datesLocale = null, debugActive = null, debugAutoprint = null, debugLogLimit = null, dialogZIndex = null, languageList = null, languageName = null, objectsList = null, scrollOnHoverDelay = null, scrollOnHoverStep = null, themeList = null, themeName = null;
|
|
4689
|
-
if (overrides) {
|
|
4690
|
-
const dates = overrides.dates;
|
|
4691
|
-
const debug = overrides.debug;
|
|
4692
|
-
const dialog = overrides.dialog;
|
|
4693
|
-
const language = overrides.language;
|
|
4694
|
-
const objects = overrides.objects;
|
|
4695
|
-
const scrollOnHover = overrides.scrollOnHover;
|
|
4696
|
-
const theme = overrides.theme;
|
|
4697
|
-
if (dates) {
|
|
4698
|
-
datesLocale = dates.locale ? dates.locale : null;
|
|
4699
|
-
}
|
|
4700
|
-
if (debug) {
|
|
4701
|
-
debugActive = debug.active ? debug.active : null;
|
|
4702
|
-
debugAutoprint = debug.autoPrint ? debug.autoPrint : null;
|
|
4703
|
-
debugLogLimit = debug.logLimit ? debug.logLimit : null;
|
|
4704
|
-
}
|
|
4705
|
-
if (dialog) {
|
|
4706
|
-
dialogZIndex = dialog.zIndex ? dialog.zIndex : null;
|
|
4707
|
-
}
|
|
4708
|
-
if (language) {
|
|
4709
|
-
languageList = language.list ? language.list : null;
|
|
4710
|
-
languageName = language.name ? language.name : null;
|
|
4711
|
-
}
|
|
4712
|
-
if (objects) {
|
|
4713
|
-
objectsList = objects.list ? objects.list : null;
|
|
4714
|
-
}
|
|
4715
|
-
if (scrollOnHover) {
|
|
4716
|
-
scrollOnHoverDelay = scrollOnHover.delay
|
|
4717
|
-
? scrollOnHover.delay
|
|
4718
|
-
: null;
|
|
4719
|
-
scrollOnHoverStep = scrollOnHover.step
|
|
4720
|
-
? scrollOnHover.step
|
|
4721
|
-
: null;
|
|
4722
|
-
}
|
|
4723
|
-
if (theme) {
|
|
4724
|
-
themeList = theme.list ? theme.list : null;
|
|
4725
|
-
themeName = theme.name ? theme.name : null;
|
|
4726
|
-
}
|
|
4727
|
-
}
|
|
4728
|
-
this.dates = new kupObjects.KupDates(datesLocale);
|
|
4729
|
-
this.debug = new KupDebug(debugActive, debugAutoprint, debugLogLimit);
|
|
4730
|
-
this.dialog = new KupDialog(dialogZIndex);
|
|
4731
|
-
this.dynamicPosition = new KupDynamicPosition();
|
|
4732
|
-
this.language = new KupLanguage(languageList, languageName);
|
|
4733
|
-
this.magicBox = null;
|
|
4734
|
-
this.overrides = overrides ? overrides : null;
|
|
4735
|
-
this.objects = new kupObjects.KupObjects(objectsList);
|
|
4736
|
-
this.resize = new ResizeObserver_1.ResizeObserver((entries) => {
|
|
4737
|
-
entries.forEach((entry) => {
|
|
4738
|
-
if (entry.contentRect.height && entry.contentRect.width) {
|
|
4739
|
-
entry.target.resizeCallback();
|
|
4740
|
-
this.debug.logMessage('kup-manager (' +
|
|
4741
|
-
entry.target.tagName +
|
|
4742
|
-
'#' +
|
|
4743
|
-
entry.target.id +
|
|
4744
|
-
')', 'Size changed to x: ' +
|
|
4745
|
-
entry.contentRect.width +
|
|
4746
|
-
', y: ' +
|
|
4747
|
-
entry.contentRect.height +
|
|
4748
|
-
'.');
|
|
4749
|
-
}
|
|
4750
|
-
});
|
|
4751
|
-
});
|
|
4752
|
-
this.scrollOnHover = new KupScrollOnHover(scrollOnHoverDelay, scrollOnHoverStep);
|
|
4753
|
-
this.utilities = {
|
|
4754
|
-
lastPointerDownPath: null,
|
|
4755
|
-
lastPointerDownString: null,
|
|
4756
|
-
};
|
|
4757
|
-
this.theme = new KupTheme(themeList, themeName);
|
|
4758
|
-
this.toolbar = new KupToolbar();
|
|
4759
|
-
document.addEventListener('pointerdown', (e) => {
|
|
4760
|
-
const paths = e.composedPath();
|
|
4761
|
-
const lastString = paths[0].innerText || paths[0].value;
|
|
4762
|
-
this.utilities.lastPointerDownPath = paths;
|
|
4763
|
-
this.utilities.lastPointerDownString = lastString;
|
|
4764
|
-
if (lastString) {
|
|
4765
|
-
document.dispatchEvent(new CustomEvent('kup-manager-stringfinder', {
|
|
4766
|
-
bubbles: true,
|
|
4767
|
-
detail: { string: lastString },
|
|
4768
|
-
}));
|
|
4769
|
-
}
|
|
4770
|
-
});
|
|
4771
|
-
}
|
|
4772
|
-
/**
|
|
4773
|
-
* Creates kup-magic-box component.
|
|
4774
|
-
*/
|
|
4775
|
-
showMagicBox() {
|
|
4776
|
-
if (this.magicBox) {
|
|
4777
|
-
return;
|
|
4778
|
-
}
|
|
4779
|
-
this.magicBox = document.createElement('kup-magic-box');
|
|
4780
|
-
this.magicBox.id = 'kup-magic-box';
|
|
4781
|
-
this.magicBox.style.position = 'fixed';
|
|
4782
|
-
this.magicBox.style.left = 'calc(50% - 350px)';
|
|
4783
|
-
this.magicBox.style.top = 'calc(50% - 150px)';
|
|
4784
|
-
document.body.append(this.magicBox);
|
|
4785
|
-
}
|
|
4786
|
-
/**
|
|
4787
|
-
* Removes kup-magic-box component.
|
|
4788
|
-
*/
|
|
4789
|
-
hideMagicBox() {
|
|
4790
|
-
if (!this.magicBox) {
|
|
4791
|
-
return;
|
|
4792
|
-
}
|
|
4793
|
-
this.magicBox.remove();
|
|
4794
|
-
this.magicBox = null;
|
|
4795
|
-
}
|
|
4796
|
-
/**
|
|
4797
|
-
* Creates or removes kup-magic-box component depending on its existence.
|
|
4798
|
-
*/
|
|
4799
|
-
toggleMagicBox() {
|
|
4800
|
-
if (!this.magicBox) {
|
|
4801
|
-
this.showMagicBox();
|
|
4802
|
-
}
|
|
4803
|
-
else {
|
|
4804
|
-
this.hideMagicBox();
|
|
4805
|
-
}
|
|
4806
|
-
}
|
|
4807
|
-
/**
|
|
4808
|
-
* Sets both locale and language library-wide.
|
|
4809
|
-
* @param {KupDatesLocales} locale - The supported locale.
|
|
4810
|
-
*/
|
|
4811
|
-
setLibraryLocalization(locale) {
|
|
4812
|
-
if (!Object.values(kupObjects.KupDatesLocales).includes(locale)) {
|
|
4813
|
-
this.debug.logMessage('kup-manager', 'Missing locale (' + locale + ')!', exports.KupDebugCategory.ERROR);
|
|
4814
|
-
return;
|
|
4815
|
-
}
|
|
4816
|
-
if (!KupLanguageDefaults[locale]) {
|
|
4817
|
-
this.debug.logMessage('kup-manager', 'Missing language for locale (' + locale + ')!', exports.KupDebugCategory.ERROR);
|
|
4818
|
-
return;
|
|
4819
|
-
}
|
|
4820
|
-
this.dates.setLocale(locale);
|
|
4821
|
-
this.language.set(KupLanguageDefaults[locale]);
|
|
4822
|
-
}
|
|
4823
|
-
}
|
|
4824
|
-
/**
|
|
4825
|
-
* Called by the Ketch.UP components to retrieve the instance of KupManager (or creating a new one when missing).
|
|
4826
|
-
* @returns {KupManager} KupManager instance.
|
|
4827
|
-
*/
|
|
4828
|
-
function kupManagerInstance() {
|
|
4829
|
-
if (!dom.ketchup) {
|
|
4830
|
-
const overrides = dom.ketchupInit
|
|
4831
|
-
? dom.ketchupInit
|
|
4832
|
-
: null;
|
|
4833
|
-
dom.ketchup = new KupManager(overrides);
|
|
4834
|
-
dom.ketchup.theme.set();
|
|
4835
|
-
if (dom.ketchup.debug.active) {
|
|
4836
|
-
dom.ketchup.debug.toggle(dom.ketchup.debug.active);
|
|
4837
|
-
}
|
|
4838
|
-
globalThis.kupManager = dom.ketchup;
|
|
4839
|
-
document.dispatchEvent(new CustomEvent('kup-manager-ready'));
|
|
4840
|
-
}
|
|
4841
|
-
return dom.ketchup;
|
|
4842
|
-
}
|
|
4843
|
-
|
|
4844
|
-
exports.kupDynamicPositionAttribute = kupDynamicPositionAttribute;
|
|
4845
|
-
exports.kupManagerInstance = kupManagerInstance;
|