@sme.up/ketchup 4.2.0-SNAPSHOT → 5.1.0-SNAPSHOT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -3
- package/dist/cjs/{cell-utils-1d44a3f0.js → cell-utils-9b1d6563.js} +4 -4
- package/dist/cjs/{component-8fbc31a2.js → component-d1496215.js} +203 -174
- package/dist/cjs/{f-button-a5788453.js → f-button-02a7cde4.js} +2 -2
- package/dist/cjs/{f-cell-eba6f39e.js → f-cell-4d1450a8.js} +62 -48
- package/dist/cjs/f-chip-a50b9f00.js +130 -0
- package/dist/cjs/{f-image-e03842eb.js → f-image-db55ac49.js} +3 -3
- package/dist/cjs/{index-0416afab.js → index-ab119fad.js} +23 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +7 -7
- package/dist/cjs/{kup-autocomplete_28.cjs.entry.js → kup-autocomplete_27.cjs.entry.js} +5759 -4805
- package/dist/cjs/kup-calendar.cjs.entry.js +626 -359
- package/dist/cjs/kup-cell.cjs.entry.js +15 -13
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +8 -7
- package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
- package/dist/cjs/kup-echart.cjs.entry.js +93039 -0
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +22 -5
- package/dist/cjs/kup-magic-box.cjs.entry.js +95 -42
- package/dist/cjs/{kup-manager-75f1a2cd.js → kup-manager-5877b2ee.js} +3395 -737
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tslib.es6-4360c099.js → tslib.es6-0ee02c67.js} +13 -0
- package/dist/cjs/utils-1b5c8c70.js +482 -0
- package/dist/collection/assets/calendar.js +46 -1
- package/dist/collection/assets/card.js +15 -15
- package/dist/collection/assets/data-table.js +18 -6
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/kupdata.js +937 -0
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/kup-accordion/kup-accordion.css +0 -1
- package/dist/collection/components/kup-accordion/kup-accordion.js +2 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +148 -52
- package/dist/collection/components/kup-badge/kup-badge.js +2 -2
- package/dist/collection/components/kup-box/kup-box.js +31 -17
- package/dist/collection/components/kup-button/kup-button.js +2 -2
- package/dist/collection/components/kup-button-list/kup-button-list.js +26 -8
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +14 -8
- package/dist/collection/components/kup-calendar/kup-calendar.css +2 -2
- package/dist/collection/components/kup-calendar/kup-calendar.js +185 -315
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +38 -0
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +458 -0
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +321 -0
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +167 -0
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +1 -1
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +2 -2
- package/dist/collection/components/kup-card/free/kup-card-free.js +22 -0
- package/dist/collection/components/kup-card/kup-card-declarations.js +19 -0
- package/dist/collection/components/kup-card/kup-card-helper.js +3 -3
- package/dist/collection/components/kup-card/kup-card.css +793 -8
- package/dist/collection/components/kup-card/kup-card.js +75 -15
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +1 -1
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +18 -5
- package/dist/collection/components/kup-cell/kup-cell.js +15 -13
- package/dist/collection/components/kup-chart/kup-chart-builder.js +3 -4
- package/dist/collection/components/kup-chart/kup-chart.js +7 -7
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
- package/dist/collection/components/kup-chip/kup-chip.css +1 -0
- package/dist/collection/components/kup-chip/kup-chip.js +51 -92
- package/dist/collection/components/kup-color-picker/kup-color-picker.css +1 -265
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +93 -48
- package/dist/collection/components/kup-combobox/kup-combobox.js +148 -115
- package/dist/collection/components/kup-dash/kup-dash.js +1 -1
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +5 -5
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +28 -56
- package/dist/collection/components/kup-data-table/kup-data-table.css +4 -38
- package/dist/collection/components/kup-data-table/kup-data-table.js +366 -168
- package/dist/collection/components/kup-date-picker/kup-date-picker.css +0 -82
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +41 -312
- package/dist/collection/components/kup-drawer/kup-drawer.js +1 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +2 -2
- package/dist/collection/components/kup-echart/assets/maps/africa.json +6116 -0
- package/dist/collection/components/kup-echart/assets/maps/america.json +5416 -0
- package/dist/collection/components/kup-echart/assets/maps/asia.json +6053 -0
- package/dist/collection/components/kup-echart/assets/maps/europe.json +5051 -0
- package/dist/collection/components/kup-echart/assets/maps/italy.json +3562 -0
- package/dist/collection/components/kup-echart/assets/maps/oceania.json +1069 -0
- package/dist/collection/components/kup-echart/assets/maps/world.json +23685 -0
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +45 -0
- package/dist/collection/components/kup-echart/kup-echart.css +13 -0
- package/dist/collection/components/kup-echart/kup-echart.js +1165 -0
- package/dist/collection/components/kup-field/kup-field.js +2 -2
- package/dist/collection/components/kup-gauge/kup-gauge.js +3 -3
- package/dist/collection/components/kup-grid/kup-grid.css +2 -2
- package/dist/collection/components/kup-grid/kup-grid.js +6 -5
- package/dist/collection/components/kup-iframe/kup-iframe.js +2 -2
- package/dist/collection/components/kup-image/assets/svg/science.svg +1 -0
- package/dist/collection/components/kup-image/kup-image.js +3 -3
- package/dist/collection/components/kup-lazy/kup-lazy.css +21 -11
- package/dist/collection/components/kup-lazy/kup-lazy.js +62 -3
- package/dist/collection/components/kup-list/kup-list-helper.js +7 -1
- package/dist/collection/components/kup-list/kup-list.css +3 -0
- package/dist/collection/components/kup-list/kup-list.js +219 -288
- package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +11 -7
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +90 -41
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-radio/kup-radio.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +1 -1
- package/dist/collection/components/kup-state/mock-store.js +1 -1
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +3 -3
- package/dist/collection/components/kup-text-field/kup-text-field.css +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +2 -2
- package/dist/collection/components/kup-time-picker/kup-time-picker.css +1 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +57 -244
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +3 -3
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -5
- package/dist/collection/components/kup-tree/kup-tree-faker.js +2 -3
- package/dist/collection/components/kup-tree/kup-tree.css +2 -0
- package/dist/collection/components/kup-tree/kup-tree.js +145 -70
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +3 -1
- package/dist/collection/f-components/f-cell/f-cell.js +53 -39
- package/dist/collection/f-components/f-chip/f-chip.js +76 -87
- package/dist/collection/f-components/f-image/f-image.js +2 -2
- package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -0
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -0
- package/dist/collection/f-components/f-paginator/f-paginator.js +91 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +4 -4
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +52 -0
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +272 -0
- package/dist/collection/managers/kup-data/kup-data-declarations.js +9 -0
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +72 -0
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -0
- package/dist/collection/managers/kup-data/kup-data.js +382 -0
- package/dist/collection/{utils → managers}/kup-dates/kup-dates-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-dates/kup-dates.js +53 -19
- package/dist/collection/{utils → managers}/kup-debug/kup-debug-browser-utils.js +1 -1
- package/dist/collection/{utils → managers}/kup-debug/kup-debug-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-debug/kup-debug.js +79 -124
- package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position.js +10 -1
- package/dist/collection/{utils → managers}/kup-interact/kup-interact-declarations.js +1 -0
- package/dist/collection/{utils → managers}/kup-interact/kup-interact.js +22 -13
- package/dist/collection/{utils → managers}/kup-language/kup-language-declarations.js +10 -0
- package/dist/collection/{utils → managers}/kup-language/kup-language.js +5 -5
- package/dist/collection/{utils → managers}/kup-manager/kup-manager-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-manager/kup-manager.js +45 -4
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
- package/dist/collection/managers/kup-math/kup-math.js +151 -0
- package/dist/collection/{utils → managers}/kup-objects/kup-objects-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-objects/kup-objects.js +15 -0
- package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.js +0 -0
- package/dist/collection/{utils → managers}/kup-search/kup-search-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-search/kup-search.js +0 -1
- package/dist/collection/{utils → managers}/kup-theme/kup-theme-declarations.js +99 -0
- package/dist/collection/{utils → managers}/kup-theme/kup-theme.js +117 -68
- package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar.js +0 -0
- package/dist/collection/types/GenericTypes.js +48 -1
- package/dist/collection/utils/cell-utils.js +3 -4
- package/dist/collection/utils/filters/filters-column-menu.js +7 -7
- package/dist/collection/utils/filters/filters-rows.js +2 -2
- package/dist/collection/utils/filters/filters-tree-items.js +12 -12
- package/dist/collection/utils/filters/filters.js +3 -2
- package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +1 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +100 -68
- package/dist/collection/utils/utils.js +4 -4
- package/dist/esm/{cell-utils-9a2914fc.js → cell-utils-571978d6.js} +4 -4
- package/dist/esm/{component-d2803feb.js → component-c4eb6153.js} +204 -170
- package/dist/esm/{f-button-55a9ed88.js → f-button-b3011cc2.js} +2 -2
- package/dist/esm/{f-cell-ac520cb2.js → f-cell-b88b2731.js} +62 -48
- package/dist/esm/f-chip-a52489ec.js +128 -0
- package/dist/esm/{f-image-70ca9dfe.js → f-image-5e5ed7e2.js} +3 -3
- package/dist/esm/{index-e0e67c23.js → index-78f3699d.js} +23 -0
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +7 -7
- package/dist/esm/{kup-autocomplete_28.entry.js → kup-autocomplete_27.entry.js} +5570 -4615
- package/dist/esm/kup-calendar.entry.js +626 -359
- package/dist/esm/kup-cell.entry.js +15 -13
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +8 -7
- package/dist/esm/kup-drawer.entry.js +3 -3
- package/dist/esm/kup-echart.entry.js +93035 -0
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +22 -5
- package/dist/esm/kup-magic-box.entry.js +95 -42
- package/dist/esm/{kup-manager-bba32828.js → kup-manager-1f76a3ef.js} +3391 -737
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{tslib.es6-e6137777.js → tslib.es6-8f2d44b6.js} +13 -1
- package/dist/esm/utils-93ae800f.js +461 -0
- package/dist/ketchup/assets/maps/africa.json +6116 -0
- package/dist/ketchup/assets/maps/america.json +5416 -0
- package/dist/ketchup/assets/maps/asia.json +6053 -0
- package/dist/ketchup/assets/maps/europe.json +5051 -0
- package/dist/ketchup/assets/maps/italy.json +3562 -0
- package/dist/ketchup/assets/maps/oceania.json +1069 -0
- package/dist/ketchup/assets/maps/world.json +23685 -0
- package/dist/ketchup/assets/svg/science.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-74259992.entry.js → p-088a886c.entry.js} +1 -1
- package/dist/ketchup/p-135cabdc.entry.js +1 -0
- package/dist/ketchup/p-1c1e830f.entry.js +1 -0
- package/dist/ketchup/{p-69a705ae.entry.js → p-29208220.entry.js} +1 -1
- package/dist/ketchup/{p-62208488.entry.js → p-2b9f2019.entry.js} +1 -1
- package/dist/ketchup/p-52d0582a.js +1 -0
- package/dist/ketchup/p-554bd5f0.entry.js +39 -0
- package/dist/ketchup/{p-06c209a5.js → p-5f52e313.js} +1 -1
- package/dist/ketchup/{p-e90934b5.entry.js → p-65449480.entry.js} +1 -1
- package/dist/ketchup/p-79cf3874.entry.js +1 -0
- package/dist/ketchup/p-7a85cda4.js +1 -0
- package/dist/ketchup/p-84cce555.entry.js +27 -0
- package/dist/ketchup/p-8c44c3b9.js +135 -0
- package/dist/ketchup/{p-ff7d590e.entry.js → p-9d49cdb2.entry.js} +1 -1
- package/dist/ketchup/{p-5a4a5fdc.js → p-a0b1d769.js} +1 -1
- package/dist/ketchup/{p-40df35de.entry.js → p-a2b6672e.entry.js} +1 -1
- package/dist/ketchup/{p-5faf7715.entry.js → p-a4be630b.entry.js} +1 -1
- package/dist/ketchup/p-c072b270.js +1 -0
- package/dist/ketchup/{p-daf03877.entry.js → p-c648972c.entry.js} +1 -1
- package/dist/ketchup/{p-03ae1be9.entry.js → p-d67d39c0.entry.js} +1 -1
- package/dist/ketchup/p-d6e2f2b0.entry.js +1 -0
- package/dist/ketchup/{p-52038ccb.js → p-da387e0e.js} +1 -1
- package/dist/ketchup/p-e5c9ec9e.js +1 -0
- package/dist/ketchup/{p-cb5f4994.js → p-ed0b8666.js} +0 -0
- package/dist/ketchup/p-ef539eda.js +9 -0
- package/dist/ketchup/p-f316234c.entry.js +143 -0
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +2 -2
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +6 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +29 -22
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +7 -11
- package/dist/types/components/kup-box/kup-box.d.ts +4 -4
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +6 -1
- package/dist/types/components/kup-button-list/kup-button-list.d.ts +4 -3
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +28 -10
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +19 -47
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +27 -0
- package/dist/types/components/kup-card/built-in/kup-card-calendar.d.ts +2 -0
- package/dist/types/components/kup-card/built-in/kup-card-clock.d.ts +2 -0
- package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -0
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +14 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +100 -1
- package/dist/types/components/kup-card/kup-card.d.ts +12 -5
- package/dist/types/components/kup-cell/kup-cell.d.ts +3 -3
- package/dist/types/components/kup-chart/kup-chart-builder.d.ts +5 -5
- package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +3 -3
- package/dist/types/components/kup-chart/kup-chart.d.ts +2 -2
- package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +6 -3
- package/dist/types/components/kup-chip/kup-chip.d.ts +9 -13
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +7 -3
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +4 -0
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +11 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +2 -2
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +45 -109
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +8 -11
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +50 -29
- package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +0 -10
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +55 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +100 -0
- package/dist/types/components/kup-lazy/kup-lazy.d.ts +13 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +2 -1
- package/dist/types/components/kup-list/kup-list.d.ts +4 -35
- package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +6 -10
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +7 -11
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +2 -9
- package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +11 -13
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +14 -35
- package/dist/types/components/kup-tree/kup-tree-faker.d.ts +10 -10
- package/dist/types/components/kup-tree/kup-tree.d.ts +45 -35
- package/dist/types/components.d.ts +307 -188
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +11 -10
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +7 -22
- package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -0
- package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -0
- package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +24 -0
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +31 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +160 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +23 -0
- package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +77 -0
- package/dist/types/{utils → managers}/kup-dates/kup-dates-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-dates/kup-dates.d.ts +24 -2
- package/dist/types/{utils → managers}/kup-debug/kup-debug-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-debug/kup-debug.d.ts +6 -13
- package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -0
- package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-interact/kup-interact-declarations.d.ts +9 -8
- package/dist/types/{utils → managers}/kup-interact/kup-interact.d.ts +7 -6
- package/dist/types/{utils → managers}/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/{utils → managers}/kup-language/kup-language.d.ts +3 -3
- package/dist/types/{utils → managers}/kup-manager/kup-manager-declarations.d.ts +21 -2
- package/dist/types/{utils → managers}/kup-manager/kup-manager.d.ts +4 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +21 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +60 -0
- package/dist/types/{utils → managers}/kup-objects/kup-objects-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-search/kup-search-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-search/kup-search.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-theme/kup-theme-declarations.d.ts +37 -1
- package/dist/types/{utils → managers}/kup-theme/kup-theme.d.ts +19 -19
- package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar.d.ts +0 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/types/GenericTypes.d.ts +53 -6
- package/dist/types/utils/cell-utils.d.ts +7 -6
- package/dist/types/utils/filters/filters-column-menu.d.ts +16 -16
- package/dist/types/utils/filters/filters-rows.d.ts +10 -10
- package/dist/types/utils/filters/filters-tree-items.d.ts +7 -7
- package/dist/types/utils/helpers.d.ts +2 -2
- package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +1 -0
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +27 -33
- package/dist/types/utils/utils.d.ts +4 -2
- package/package.json +31 -26
- package/dist/cjs/f-chip-ce69b7d2.js +0 -141
- package/dist/cjs/utils-b3ec89fe.js +0 -1550
- package/dist/collection/components/kup-paginator/kup-paginator-declarations.js +0 -5
- package/dist/collection/components/kup-paginator/kup-paginator.css +0 -46
- package/dist/collection/components/kup-paginator/kup-paginator.js +0 -408
- package/dist/esm/f-chip-babf1740.js +0 -139
- package/dist/esm/utils-cfcbe33f.js +0 -1526
- package/dist/ketchup/p-1ce9a037.js +0 -1
- package/dist/ketchup/p-1e2c3497.js +0 -1
- package/dist/ketchup/p-4748be4b.js +0 -8
- package/dist/ketchup/p-5db41fae.entry.js +0 -45
- package/dist/ketchup/p-6cc8264d.entry.js +0 -1
- package/dist/ketchup/p-756aa8b1.entry.js +0 -1
- package/dist/ketchup/p-9d02a676.js +0 -134
- package/dist/ketchup/p-a7687c0e.entry.js +0 -27
- package/dist/ketchup/p-d58dbf0e.js +0 -1
- package/dist/ketchup/p-d6ce1ac6.entry.js +0 -1
- package/dist/ketchup/p-ea387b49.entry.js +0 -1
- package/dist/ketchup/p-f6bff949.js +0 -1
- package/dist/types/components/kup-paginator/kup-paginator-declarations.d.ts +0 -11
- package/dist/types/components/kup-paginator/kup-paginator.d.ts +0 -48
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { FButton } from '../../../f-components/f-button/f-button';
|
|
3
|
+
import { FButtonStyling, } from '../../../f-components/f-button/f-button-declarations';
|
|
4
|
+
import { KupDatesFormats } from '../../../managers/kup-dates/kup-dates-declarations';
|
|
5
|
+
import { DateTimeFormatOptionsMonth, getMonthsAsStringByLocale, } from '../../../utils/utils';
|
|
6
|
+
import { SourceEvent } from '../../kup-date-picker/kup-date-picker-declarations';
|
|
7
|
+
const dom = document.documentElement;
|
|
8
|
+
export function prepareCalendar(component) {
|
|
9
|
+
const el = component.rootElement;
|
|
10
|
+
if (!el.kupData)
|
|
11
|
+
el.kupData = {};
|
|
12
|
+
if (component.data && component.data.options) {
|
|
13
|
+
const opts = component.data.options;
|
|
14
|
+
if (opts.resetStatus) {
|
|
15
|
+
el.kupData = {};
|
|
16
|
+
const obj = opts.initialValue;
|
|
17
|
+
if (opts.initialValue) {
|
|
18
|
+
if (obj && obj.k)
|
|
19
|
+
setValue(component, new Date(obj.k));
|
|
20
|
+
else
|
|
21
|
+
setValue(component, new Date(opts.initialValue));
|
|
22
|
+
}
|
|
23
|
+
if (opts.firstDayIndex)
|
|
24
|
+
el.kupData.firstDayIndex = opts.firstDayIndex;
|
|
25
|
+
opts.resetStatus = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (!el.kupData.value)
|
|
29
|
+
setValue(component, new Date());
|
|
30
|
+
const months = getMonthsAsStringByLocale();
|
|
31
|
+
const curYear = getYear(component);
|
|
32
|
+
const curMonth = getMonth(component);
|
|
33
|
+
const yearRange = getInitEndYear(curYear);
|
|
34
|
+
const initYear = yearRange.initYear;
|
|
35
|
+
const endYear = yearRange.endYear;
|
|
36
|
+
let changeViewButtonLabel = 'not-set';
|
|
37
|
+
switch (getView(component)) {
|
|
38
|
+
case SourceEvent.DATE: {
|
|
39
|
+
changeViewButtonLabel =
|
|
40
|
+
months[curMonth] + ', ' + curYear.toString();
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
case SourceEvent.MONTH: {
|
|
44
|
+
changeViewButtonLabel = curYear.toString();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case SourceEvent.YEAR: {
|
|
48
|
+
changeViewButtonLabel =
|
|
49
|
+
initYear.toString() + ' - ' + endYear.toString();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const prevButtonProp = {
|
|
54
|
+
icon: 'chevron_left',
|
|
55
|
+
wrapperClass: 'prev-page',
|
|
56
|
+
onClick: () => prevPage(component),
|
|
57
|
+
};
|
|
58
|
+
const prevButtonComp = h(FButton, Object.assign({}, prevButtonProp));
|
|
59
|
+
const nextButtonProp = {
|
|
60
|
+
icon: 'chevron_right',
|
|
61
|
+
wrapperClass: 'next-page',
|
|
62
|
+
onClick: () => nextPage(component),
|
|
63
|
+
};
|
|
64
|
+
const nextButtonComp = h(FButton, Object.assign({}, nextButtonProp));
|
|
65
|
+
const changeViewButtonProp = {
|
|
66
|
+
wrapperClass: 'change-view-button',
|
|
67
|
+
styling: FButtonStyling.FLAT,
|
|
68
|
+
label: changeViewButtonLabel,
|
|
69
|
+
onClick: () => changeView(component),
|
|
70
|
+
id: 'change-view-button',
|
|
71
|
+
};
|
|
72
|
+
//text-transform:capitalize
|
|
73
|
+
return (h("div", { id: component.rootElement.id + '_calendar' },
|
|
74
|
+
h("div", { class: "section-1" },
|
|
75
|
+
h("div", { class: "sub-1 nav" },
|
|
76
|
+
prevButtonComp,
|
|
77
|
+
h(FButton, Object.assign({}, changeViewButtonProp)),
|
|
78
|
+
nextButtonComp)),
|
|
79
|
+
h("div", { class: "section-2" }, createCalendar(component))));
|
|
80
|
+
}
|
|
81
|
+
function setValue(component, value) {
|
|
82
|
+
const el = component.rootElement;
|
|
83
|
+
el.kupData.value = value;
|
|
84
|
+
el.kupData.day = el.kupData.value.getDate();
|
|
85
|
+
el.kupData.month = el.kupData.value.getMonth();
|
|
86
|
+
el.kupData.year = el.kupData.value.getFullYear();
|
|
87
|
+
}
|
|
88
|
+
function getValue(component) {
|
|
89
|
+
const el = component.rootElement;
|
|
90
|
+
if (el.kupData.value == null)
|
|
91
|
+
setValue(component, new Date());
|
|
92
|
+
return el.kupData.value;
|
|
93
|
+
}
|
|
94
|
+
function getDay(component) {
|
|
95
|
+
const el = component.rootElement;
|
|
96
|
+
if (el.kupData.day != null)
|
|
97
|
+
return el.kupData.day;
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
function getMonth(component) {
|
|
101
|
+
const el = component.rootElement;
|
|
102
|
+
if (el.kupData.month != null)
|
|
103
|
+
return el.kupData.month;
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
function getYear(component) {
|
|
107
|
+
const el = component.rootElement;
|
|
108
|
+
if (el.kupData.year != null)
|
|
109
|
+
return el.kupData.year;
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
function setDay(component, value) {
|
|
113
|
+
const el = component.rootElement;
|
|
114
|
+
el.kupData.day = value;
|
|
115
|
+
}
|
|
116
|
+
function setMonth(component, value) {
|
|
117
|
+
const el = component.rootElement;
|
|
118
|
+
el.kupData.month = value;
|
|
119
|
+
}
|
|
120
|
+
function setYear(component, value) {
|
|
121
|
+
const el = component.rootElement;
|
|
122
|
+
el.kupData.year = value;
|
|
123
|
+
}
|
|
124
|
+
function getFirstDayIndex(component) {
|
|
125
|
+
const el = component.rootElement;
|
|
126
|
+
if (el.kupData.firstDayIndex)
|
|
127
|
+
return el.kupData.firstDayIndex;
|
|
128
|
+
return 1;
|
|
129
|
+
}
|
|
130
|
+
function getView(component) {
|
|
131
|
+
const el = component.rootElement;
|
|
132
|
+
if (el.kupData.calendarView)
|
|
133
|
+
return el.kupData.calendarView;
|
|
134
|
+
return SourceEvent.DATE;
|
|
135
|
+
}
|
|
136
|
+
function setView(component, value) {
|
|
137
|
+
const el = component.rootElement;
|
|
138
|
+
el.kupData.calendarView = value;
|
|
139
|
+
}
|
|
140
|
+
function createCalendar(component) {
|
|
141
|
+
switch (getView(component)) {
|
|
142
|
+
case SourceEvent.DATE: {
|
|
143
|
+
return createDaysCalendar(component);
|
|
144
|
+
}
|
|
145
|
+
case SourceEvent.MONTH: {
|
|
146
|
+
return createMonthsCalendar(component);
|
|
147
|
+
}
|
|
148
|
+
case SourceEvent.YEAR: {
|
|
149
|
+
return createYearsCalendar(component);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function createDaysCalendar(component) {
|
|
154
|
+
const days = getDaysOfWeekAsStringByLocale(getFirstDayIndex(component));
|
|
155
|
+
const selectedDate = getValue(component);
|
|
156
|
+
const selectedDay = getDay(component);
|
|
157
|
+
const selectedMonth = getMonth(component);
|
|
158
|
+
const selectedYear = getYear(component);
|
|
159
|
+
const thead = [];
|
|
160
|
+
const tbody = [];
|
|
161
|
+
for (let index = 0; index < days.length; index++) {
|
|
162
|
+
thead.push(h("th", null,
|
|
163
|
+
h("span", { class: "item-text" }, days[index])));
|
|
164
|
+
}
|
|
165
|
+
const firstMonthDay = new Date(selectedYear, selectedMonth, 1);
|
|
166
|
+
const lastMonthDay = new Date(selectedYear, selectedMonth + 1, 0);
|
|
167
|
+
const finish = false;
|
|
168
|
+
let currentDayIndex = getFirstDayIndex(component);
|
|
169
|
+
const firstMonthDayIndex = firstMonthDay.getDay();
|
|
170
|
+
let row = [];
|
|
171
|
+
let daysForRowAdded = 0;
|
|
172
|
+
while (!finish) {
|
|
173
|
+
if (currentDayIndex == firstMonthDayIndex) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
row.push(h("td", { class: "item empty" }));
|
|
177
|
+
currentDayIndex++;
|
|
178
|
+
daysForRowAdded++;
|
|
179
|
+
if (currentDayIndex > 6) {
|
|
180
|
+
currentDayIndex = 0;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
let dayCount = 1;
|
|
184
|
+
while (dayCount <= lastMonthDay.getDate()) {
|
|
185
|
+
for (let i = daysForRowAdded; i < 7; i++) {
|
|
186
|
+
let dayClass = 'item';
|
|
187
|
+
let dataIndex = {
|
|
188
|
+
'data-index': selectedYear.toString() +
|
|
189
|
+
'-' +
|
|
190
|
+
fillString((selectedMonth + 1).toString(), '0', 2, true) +
|
|
191
|
+
'-' +
|
|
192
|
+
fillString(dayCount.toString(), '0', 2, true),
|
|
193
|
+
};
|
|
194
|
+
if ((selectedDay != null && dayCount === selectedDay) ||
|
|
195
|
+
(dayCount === selectedDate.getDate() &&
|
|
196
|
+
selectedMonth === selectedDate.getMonth() &&
|
|
197
|
+
selectedYear === selectedDate.getFullYear())) {
|
|
198
|
+
dayClass += ' selected';
|
|
199
|
+
}
|
|
200
|
+
row.push(h("td", { class: dayClass },
|
|
201
|
+
h("span", Object.assign({}, dataIndex, { class: "item-number", onClick: () => {
|
|
202
|
+
onCalendarItemClick(component, dataIndex['data-index']);
|
|
203
|
+
} }), dayCount)));
|
|
204
|
+
dayCount++;
|
|
205
|
+
if (dayCount > lastMonthDay.getDate()) {
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (row.length > 0) {
|
|
210
|
+
tbody.push(h("tr", null, row));
|
|
211
|
+
row = [];
|
|
212
|
+
}
|
|
213
|
+
daysForRowAdded = 0;
|
|
214
|
+
}
|
|
215
|
+
return (h("table", { class: "calendar" },
|
|
216
|
+
h("thead", null, thead),
|
|
217
|
+
h("tbody", null, tbody)));
|
|
218
|
+
}
|
|
219
|
+
function createMonthsCalendar(component) {
|
|
220
|
+
const months = getMonthsAsStringByLocale(DateTimeFormatOptionsMonth.SHORT);
|
|
221
|
+
let selectedDay = getDay(component);
|
|
222
|
+
const selectedMonth = getMonth(component);
|
|
223
|
+
const selectedYear = getYear(component);
|
|
224
|
+
if (selectedDay == null)
|
|
225
|
+
selectedDay = 1;
|
|
226
|
+
const tbody = [];
|
|
227
|
+
let row = [];
|
|
228
|
+
let monthCount = 0;
|
|
229
|
+
while (monthCount < 12) {
|
|
230
|
+
for (let i = 0; i < 4; i++) {
|
|
231
|
+
let monthClass = 'item';
|
|
232
|
+
const dataIndex = {
|
|
233
|
+
'data-index': selectedYear.toString() +
|
|
234
|
+
'-' +
|
|
235
|
+
fillString((monthCount + 1).toString(), '0', 2, true) +
|
|
236
|
+
'-' +
|
|
237
|
+
fillString(selectedDay.toString(), '0', 2, true),
|
|
238
|
+
};
|
|
239
|
+
if (monthCount === selectedMonth) {
|
|
240
|
+
monthClass += ' selected';
|
|
241
|
+
}
|
|
242
|
+
row.push(h("td", { class: monthClass },
|
|
243
|
+
h("span", Object.assign({}, dataIndex, { class: "item-number", onClick: () => {
|
|
244
|
+
onCalendarMonthYearItemClick(component, dataIndex['data-index']);
|
|
245
|
+
} }), months[monthCount])));
|
|
246
|
+
monthCount++;
|
|
247
|
+
}
|
|
248
|
+
if (row.length > 0) {
|
|
249
|
+
tbody.push(h("tr", null, row));
|
|
250
|
+
row = [];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return (h("table", { class: "calendar" },
|
|
254
|
+
h("tbody", null, tbody)));
|
|
255
|
+
}
|
|
256
|
+
function createYearsCalendar(component) {
|
|
257
|
+
let selectedDay = getDay(component);
|
|
258
|
+
const selectedMonth = getMonth(component);
|
|
259
|
+
const selectedYear = getYear(component);
|
|
260
|
+
if (selectedDay == null)
|
|
261
|
+
selectedDay = 1;
|
|
262
|
+
const yearRange = getInitEndYear(selectedYear);
|
|
263
|
+
const initYear = yearRange.initYear;
|
|
264
|
+
const endYear = yearRange.endYear;
|
|
265
|
+
const tbody = [];
|
|
266
|
+
let row = [];
|
|
267
|
+
let yearCount = initYear;
|
|
268
|
+
while (yearCount <= endYear) {
|
|
269
|
+
for (let i = 0; i < 4; i++) {
|
|
270
|
+
let yearClass = 'item';
|
|
271
|
+
let dataIndex = {
|
|
272
|
+
'data-index': yearCount.toString() +
|
|
273
|
+
'-' +
|
|
274
|
+
fillString((selectedMonth + 1).toString(), '0', 2, true) +
|
|
275
|
+
'-' +
|
|
276
|
+
fillString(selectedDay.toString(), '0', 2, true),
|
|
277
|
+
};
|
|
278
|
+
if (yearCount === selectedYear) {
|
|
279
|
+
yearClass += ' selected';
|
|
280
|
+
}
|
|
281
|
+
row.push(h("td", { class: yearClass },
|
|
282
|
+
h("span", Object.assign({}, dataIndex, { class: "item-number", onClick: () => {
|
|
283
|
+
onCalendarMonthYearItemClick(component, dataIndex['data-index']);
|
|
284
|
+
} }), yearCount)));
|
|
285
|
+
yearCount++;
|
|
286
|
+
}
|
|
287
|
+
if (row.length > 0) {
|
|
288
|
+
tbody.push(h("tr", null, row));
|
|
289
|
+
row = [];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return (h("table", { class: "calendar" },
|
|
293
|
+
h("tbody", null, tbody)));
|
|
294
|
+
}
|
|
295
|
+
function getDaysOfWeekAsStringByLocale(firstDayIndex) {
|
|
296
|
+
const thisWeekDays = thisWeek(firstDayIndex);
|
|
297
|
+
const monday = thisWeekDays.startDate;
|
|
298
|
+
const days = [];
|
|
299
|
+
for (var i = 0; i < 7; i++) {
|
|
300
|
+
var date = new Date(monday.toISOString());
|
|
301
|
+
date.setDate(date.getDate() + i);
|
|
302
|
+
days[i] = getDayAsStringByLocale(date);
|
|
303
|
+
}
|
|
304
|
+
return days;
|
|
305
|
+
}
|
|
306
|
+
function thisWeek(firstDayIndex) {
|
|
307
|
+
const firstDay = firstDayThisWeek(firstDayIndex);
|
|
308
|
+
return {
|
|
309
|
+
startDate: firstDay,
|
|
310
|
+
endDate: offsetDate(firstDay, 6),
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function firstDayThisWeek(firstDayIndex) {
|
|
314
|
+
const d = new Date();
|
|
315
|
+
const day = d.getDay();
|
|
316
|
+
// dayIndex0
|
|
317
|
+
d.setDate(d.getDate() - day);
|
|
318
|
+
// dayIndexX
|
|
319
|
+
d.setDate(d.getDate() + firstDayIndex);
|
|
320
|
+
return d;
|
|
321
|
+
}
|
|
322
|
+
const offsetDate = (base, count) => {
|
|
323
|
+
const date = new Date(base);
|
|
324
|
+
date.setDate(base.getDate() + count);
|
|
325
|
+
return date;
|
|
326
|
+
};
|
|
327
|
+
function getDayAsStringByLocale(date) {
|
|
328
|
+
if (date == null) {
|
|
329
|
+
return '';
|
|
330
|
+
}
|
|
331
|
+
const options = {
|
|
332
|
+
weekday: 'narrow',
|
|
333
|
+
/** weekday: 'narrow' 'short' 'long' */
|
|
334
|
+
};
|
|
335
|
+
const dateTimeFormat = new Intl.DateTimeFormat(dom.ketchup.dates.getLocale(), options);
|
|
336
|
+
return dateTimeFormat.format(date);
|
|
337
|
+
}
|
|
338
|
+
function fillString(stringIn, stringForFill, finalLen, addBefore) {
|
|
339
|
+
const initSize = stringIn.length;
|
|
340
|
+
let stringOut = '';
|
|
341
|
+
for (let i = initSize; i < finalLen; i += stringForFill.length) {
|
|
342
|
+
stringOut += stringForFill;
|
|
343
|
+
}
|
|
344
|
+
if (addBefore) {
|
|
345
|
+
return stringOut + stringIn;
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
return stringIn + stringOut;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function prevPage(component) {
|
|
352
|
+
let mm = getMonth(component);
|
|
353
|
+
let yy = getYear(component);
|
|
354
|
+
if (getView(component) == SourceEvent.DATE) {
|
|
355
|
+
if (mm < 1) {
|
|
356
|
+
mm = 11;
|
|
357
|
+
yy--;
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
mm--;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
if (getView(component) == SourceEvent.MONTH) {
|
|
364
|
+
yy--;
|
|
365
|
+
}
|
|
366
|
+
if (getView(component) == SourceEvent.YEAR) {
|
|
367
|
+
let yearRange = getInitEndYear(yy);
|
|
368
|
+
yy = yearRange.initYear - 1;
|
|
369
|
+
}
|
|
370
|
+
setDay(component, null);
|
|
371
|
+
setMonth(component, mm);
|
|
372
|
+
setYear(component, yy);
|
|
373
|
+
refresh(component);
|
|
374
|
+
}
|
|
375
|
+
function nextPage(component) {
|
|
376
|
+
let mm = getMonth(component);
|
|
377
|
+
let yy = getYear(component);
|
|
378
|
+
if (getView(component) == SourceEvent.DATE) {
|
|
379
|
+
if (mm > 10) {
|
|
380
|
+
mm = 0;
|
|
381
|
+
yy++;
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
mm++;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if (getView(component) == SourceEvent.MONTH) {
|
|
388
|
+
yy++;
|
|
389
|
+
}
|
|
390
|
+
if (getView(component) == SourceEvent.YEAR) {
|
|
391
|
+
const yearRange = getInitEndYear(yy);
|
|
392
|
+
yy = yearRange.endYear + 1;
|
|
393
|
+
}
|
|
394
|
+
setDay(component, null);
|
|
395
|
+
setMonth(component, mm);
|
|
396
|
+
setYear(component, yy);
|
|
397
|
+
refresh(component);
|
|
398
|
+
}
|
|
399
|
+
function getInitEndYear(curYear) {
|
|
400
|
+
const initYear = curYear - (curYear % 10);
|
|
401
|
+
const endYear = initYear + 16 - 1;
|
|
402
|
+
return { initYear: initYear, endYear: endYear };
|
|
403
|
+
}
|
|
404
|
+
function changeView(component) {
|
|
405
|
+
setDay(component, null);
|
|
406
|
+
switch (getView(component)) {
|
|
407
|
+
case SourceEvent.DATE: {
|
|
408
|
+
setView(component, SourceEvent.MONTH);
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
case SourceEvent.MONTH: {
|
|
412
|
+
setView(component, SourceEvent.YEAR);
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
case SourceEvent.YEAR: {
|
|
416
|
+
setView(component, SourceEvent.DATE);
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
refresh(component);
|
|
421
|
+
}
|
|
422
|
+
function refresh(component) {
|
|
423
|
+
component.refresh();
|
|
424
|
+
}
|
|
425
|
+
function onCalendarMonthYearItemClick(component, value) {
|
|
426
|
+
let d;
|
|
427
|
+
if (dom.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
428
|
+
d = new Date(value);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
d = new Date();
|
|
432
|
+
}
|
|
433
|
+
setMonth(component, d.getMonth());
|
|
434
|
+
setYear(component, d.getFullYear());
|
|
435
|
+
switch (getView(component)) {
|
|
436
|
+
case SourceEvent.MONTH: {
|
|
437
|
+
setView(component, SourceEvent.DATE);
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
case SourceEvent.YEAR: {
|
|
441
|
+
setView(component, SourceEvent.MONTH);
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
refresh(component);
|
|
446
|
+
}
|
|
447
|
+
function onCalendarItemClick(component, value) {
|
|
448
|
+
let d;
|
|
449
|
+
if (dom.ketchup.dates.isValid(value, KupDatesFormats.ISO_DATE)) {
|
|
450
|
+
d = new Date(value);
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
d = new Date();
|
|
454
|
+
}
|
|
455
|
+
setValue(component, d);
|
|
456
|
+
component.onKupClick(component.rootElement.id, value);
|
|
457
|
+
refresh(component);
|
|
458
|
+
}
|