@sme.up/ketchup 9.6.3 → 9.6.5
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/dist/cjs/{bar.helpers-f46a5a83.js → bar.helpers-c481a535.js} +45 -13
- package/dist/cjs/{f-button-9a0eba42.js → f-button-23ec3db5.js} +1 -1
- package/dist/cjs/{f-cell-1ad41071.js → f-cell-bcc51c0f.js} +9 -29
- package/dist/cjs/{f-chip-48851b4f.js → f-chip-63363ecf.js} +2 -2
- package/dist/cjs/{f-image-541e5f4d.js → f-image-f3944c01.js} +2 -5
- package/dist/cjs/{f-paginator-utils-8ff2a9b4.js → f-paginator-utils-60e05759.js} +3 -3
- package/dist/cjs/{f-text-field-ac5d6497.js → f-text-field-354b6c78.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +48 -48
- package/dist/cjs/kup-box.cjs.entry.js +8 -8
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-cell.cjs.entry.js +7 -7
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +256 -40
- package/dist/cjs/kup-dashboard.cjs.entry.js +5 -5
- package/dist/cjs/{kup-dates-b7d53b4d.js → kup-dates-e22ee32c.js} +21 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-editor.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-gantt_10.cjs.entry.js +105 -39
- package/dist/cjs/kup-grid.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +21 -14
- package/dist/cjs/kup-input-panel.cjs.entry.js +444 -0
- package/dist/cjs/kup-lazy.cjs.entry.js +13 -13
- package/dist/cjs/kup-magic-box.cjs.entry.js +6 -6
- package/dist/cjs/{kup-manager-26a9154b.js → kup-manager-e1bfd4f8.js} +656 -121
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +4 -4
- package/dist/cjs/kup-pdf.cjs.entry.js +76600 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -4
- package/dist/cjs/{kup-planner-declarations-d3dec885.js → kup-planner-declarations-cb33663d.js} +3 -0
- package/dist/cjs/{kup-planner-renderer-helper-680bbd5a.js → kup-planner-renderer-helper-f001fad7.js} +56 -8
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +44 -11
- package/dist/cjs/{kup-planner-time-formatter-a74e70f0.js → kup-planner-time-formatter-b7dca3ea.js} +3 -0
- package/dist/cjs/kup-planner.cjs.entry.js +81 -9
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/image-list.js +332 -2
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/input-panel.js +480 -0
- package/dist/collection/assets/pdf.js +15 -0
- package/dist/collection/assets/planner-example-5.js +19 -7
- package/dist/collection/assets/planner-example-6.js +3 -0
- package/dist/collection/assets/planner.js +4 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/kup-badge/kup-badge.css +4 -4
- package/dist/collection/components/kup-image-list/kup-image-list.css +37 -4
- package/dist/collection/components/kup-image-list/kup-image-list.js +15 -8
- package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js +8 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +169 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js +346 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +669 -0
- package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
- package/dist/collection/components/kup-list/kup-list.js +1 -1
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
- package/dist/collection/components/kup-pdf/kup-pdf-declarations.js +8 -0
- package/dist/collection/components/kup-pdf/kup-pdf.css +169 -0
- package/dist/collection/components/kup-pdf/kup-pdf.js +262 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +3 -0
- package/dist/collection/components/kup-planner/kup-planner-helper.js +42 -1
- package/dist/collection/components/kup-planner/kup-planner.js +191 -5
- package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
- package/dist/collection/components/kup-planner/utils/custom-task-list-table.js +103 -11
- package/dist/collection/components/kup-planner/utils/gantt-table.module.css +80 -2
- package/dist/collection/components/kup-planner/utils/helpers/bar.helpers.js +41 -13
- package/dist/collection/components/kup-planner/utils/helpers/other.helpers.js +3 -0
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.css +10 -0
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +61 -6
- package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +32 -2
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.css +4 -0
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +208 -24
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.css +4 -0
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +131 -7
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer-helper.js +55 -6
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +40 -7
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.css +22 -15
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +21 -5
- package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +19 -3
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +76 -2
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
- 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-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 +34 -34
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
- package/dist/collection/f-components/f-cell/f-cell.js +5 -24
- package/dist/collection/f-components/f-image/f-image.js +2 -5
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +7 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/_commonjsHelpers.js +26 -0
- package/dist/components/custom-task-list-header.js +2 -2
- package/dist/components/custom-task-list-table.js +58 -13
- package/dist/components/kup-autocomplete2.js +48 -70
- package/dist/components/kup-box2.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-dates.js +2 -6
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-gantt-calendar2.js +31 -1
- package/dist/components/kup-gantt2.js +26 -7
- package/dist/components/kup-grid-renderer2.js +219 -81
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-horizontal-scroll2.js +48 -10
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +15 -8
- package/dist/components/kup-input-panel.d.ts +11 -0
- package/dist/components/kup-input-panel.js +595 -0
- package/dist/components/kup-lazy.js +11 -11
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-manager.js +658 -122
- package/dist/components/kup-nav-bar.js +1 -1
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-pdf.d.ts +11 -0
- package/dist/components/kup-pdf.js +76756 -0
- package/dist/components/kup-photo-frame.js +2 -2
- package/dist/components/kup-planner-declarations.js +91 -0
- package/dist/components/kup-planner-renderer2.js +42 -9
- package/dist/components/kup-planner.js +86 -6
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-standard-tooltip2.js +1 -1
- package/dist/components/kup-switcher2.js +19 -7
- package/dist/components/kup-task-gantt2.js +6 -4
- package/dist/components/kup-task-list-header2.js +7 -7
- package/dist/components/kup-task-list-table2.js +1 -1
- package/dist/components/kup-task-list2.js +434 -84
- package/dist/components/kup-tooltip2.js +1 -1
- package/dist/components/kup-vertical-scroll2.js +2 -2
- package/dist/components/other.helpers.js +47 -0
- package/dist/esm/{bar.helpers-0898efb9.js → bar.helpers-23a51579.js} +45 -14
- package/dist/esm/{f-button-45d690a5.js → f-button-d6dbcfd6.js} +1 -1
- package/dist/esm/{f-cell-63db06db.js → f-cell-7b41415c.js} +9 -29
- package/dist/esm/{f-chip-f1ab6c5e.js → f-chip-68d27d7a.js} +2 -2
- package/dist/esm/{f-image-8b382cc5.js → f-image-a67229e5.js} +2 -5
- package/dist/esm/{f-paginator-utils-ae563cd5.js → f-paginator-utils-8773e358.js} +3 -3
- package/dist/esm/{f-text-field-b5fcb598.js → f-text-field-d364ffd2.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +48 -48
- package/dist/esm/kup-box.entry.js +8 -8
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-card-list.entry.js +2 -2
- package/dist/esm/kup-cell.entry.js +7 -7
- package/dist/esm/kup-custom-task-list-header_4.entry.js +256 -40
- package/dist/esm/kup-dashboard.entry.js +5 -5
- package/dist/esm/{kup-dates-4ad48be7.js → kup-dates-26a56bf7.js} +20 -1
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-editor.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-gantt_10.entry.js +106 -40
- package/dist/esm/kup-grid.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +21 -14
- package/dist/esm/kup-input-panel.entry.js +440 -0
- package/dist/esm/kup-lazy.entry.js +13 -13
- package/dist/esm/kup-magic-box.entry.js +6 -6
- package/dist/esm/{kup-manager-cdb4f21a.js → kup-manager-a316a70e.js} +656 -121
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +4 -4
- package/dist/esm/kup-pdf.entry.js +76596 -0
- package/dist/esm/kup-photo-frame.entry.js +4 -4
- package/dist/esm/{kup-planner-declarations-b9345758.js → kup-planner-declarations-398babf9.js} +3 -0
- package/dist/esm/{kup-planner-renderer-helper-da0518be.js → kup-planner-renderer-helper-a2ec9a1c.js} +57 -8
- package/dist/esm/kup-planner-renderer.entry.js +44 -11
- package/dist/esm/{kup-planner-time-formatter-a68e05ba.js → kup-planner-time-formatter-ddf84f9b.js} +1 -1
- package/dist/esm/kup-planner.entry.js +81 -9
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +3 -3
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-008bdcdc.js +1 -0
- package/dist/ketchup/p-042e874a.entry.js +1 -0
- package/dist/ketchup/{p-837bd0a6.entry.js → p-074ccd53.entry.js} +1 -1
- package/dist/ketchup/{p-41e8402e.entry.js → p-1088ab22.entry.js} +1 -1
- package/dist/ketchup/{p-d9284d98.entry.js → p-1bcac01f.entry.js} +1 -1
- package/dist/ketchup/{p-e0a1fbe7.entry.js → p-1e028d95.entry.js} +1 -1
- package/dist/ketchup/p-25058baa.js +1 -0
- package/dist/ketchup/{p-cbe42afd.entry.js → p-2932e7e8.entry.js} +1 -1
- package/dist/ketchup/{p-1cd48eea.entry.js → p-2b84db7b.entry.js} +1 -1
- package/dist/ketchup/{p-d608f866.entry.js → p-2ef90f60.entry.js} +1 -1
- package/dist/ketchup/{p-bedabdb5.js → p-339bbeae.js} +1 -1
- package/dist/ketchup/{p-157f0e89.entry.js → p-48e45ac0.entry.js} +1 -1
- package/dist/ketchup/p-53af4c87.js +1 -0
- package/dist/ketchup/{p-4dfc5927.entry.js → p-556f7ddc.entry.js} +1 -1
- package/dist/ketchup/{p-cc7352a8.entry.js → p-5f7d8c21.entry.js} +1 -1
- package/dist/ketchup/{p-e0c10de2.entry.js → p-6362738c.entry.js} +1 -1
- package/dist/ketchup/{p-ad6a3c2a.entry.js → p-65e363c6.entry.js} +1 -1
- package/dist/ketchup/p-6921bc81.entry.js +16 -0
- package/dist/ketchup/p-6961e0ce.entry.js +1 -0
- package/dist/ketchup/p-7123d2a4.entry.js +1 -0
- package/dist/ketchup/{p-a5074ce4.js → p-801776bc.js} +1 -1
- package/dist/ketchup/{p-ca8a1f53.entry.js → p-81645576.entry.js} +1 -1
- package/dist/ketchup/p-838dea62.js +1 -0
- package/dist/ketchup/{p-924b841b.js → p-84b511e1.js} +1 -1
- package/dist/ketchup/{p-9a856951.js → p-8d4050ec.js} +4 -4
- package/dist/ketchup/{p-1474852d.entry.js → p-9e2533e1.entry.js} +1 -1
- package/dist/ketchup/{p-c6b34763.entry.js → p-a06974a3.entry.js} +1 -1
- package/dist/ketchup/p-a6beb822.js +1 -0
- package/dist/ketchup/p-abe181d0.entry.js +1 -0
- package/dist/ketchup/{p-ba0f28b7.js → p-b3540f83.js} +1 -1
- package/dist/ketchup/{p-b6a21b6a.entry.js → p-c702eb45.entry.js} +1 -1
- package/dist/ketchup/{p-090e5097.entry.js → p-ccb6dbb0.entry.js} +1 -1
- package/dist/ketchup/{p-d839ce21.entry.js → p-cf44485a.entry.js} +2 -2
- package/dist/ketchup/p-d2001dec.entry.js +44 -0
- package/dist/ketchup/{p-e508b2fd.entry.js → p-dbb6cd8d.entry.js} +1 -1
- package/dist/ketchup/p-eb8ea3a6.js +1 -0
- package/dist/ketchup/{p-590c34bc.js → p-f6c8f006.js} +1 -1
- package/dist/ketchup/{p-4c100286.entry.js → p-f79ffe77.entry.js} +1 -1
- package/dist/ketchup/{p-31c0cfc0.entry.js → p-fdcfaedd.entry.js} +1 -1
- package/dist/ketchup/p-fe75ede2.entry.js +1 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +1 -1
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +81 -0
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +67 -0
- package/dist/types/components/kup-pdf/kup-pdf-declarations.d.ts +7 -0
- package/dist/types/components/kup-pdf/kup-pdf.d.ts +42 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +29 -2
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +2 -1
- package/dist/types/components/kup-planner/kup-planner.d.ts +38 -0
- package/dist/types/components/kup-planner/utils/custom-task-list-table.d.ts +7 -0
- package/dist/types/components/kup-planner/utils/helpers/bar.helpers.d.ts +1 -1
- package/dist/types/components/kup-planner/utils/helpers/other.helpers.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-gantt/kup-gantt.d.ts +6 -0
- package/dist/types/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.d.ts +13 -1
- package/dist/types/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.d.ts +7 -0
- package/dist/types/components/kup-planner/utils/kup-planner-renderer-helper.d.ts +6 -2
- package/dist/types/components/kup-planner/utils/kup-planner-renderer.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-switcher/kup-switcher.d.ts +3 -1
- package/dist/types/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list.d.ts +4 -0
- package/dist/types/components.d.ts +266 -2
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +2 -1
- package/dist/components/kup-planner-renderer-helper.js +0 -379
- package/dist/ketchup/p-21351b19.entry.js +0 -1
- package/dist/ketchup/p-2b40d9b9.entry.js +0 -1
- package/dist/ketchup/p-5c79cb74.js +0 -1
- package/dist/ketchup/p-670354ef.entry.js +0 -1
- package/dist/ketchup/p-8e3b6de8.js +0 -1
- package/dist/ketchup/p-935f58fc.js +0 -1
- package/dist/ketchup/p-9852b1e9.js +0 -1
- package/dist/ketchup/p-ca42a421.entry.js +0 -16
- package/dist/ketchup/p-d50515f7.js +0 -1
- package/dist/ketchup/p-e841c2ae.js +0 -1
- package/dist/ketchup/p-ec4050e1.entry.js +0 -1
|
@@ -117,9 +117,9 @@ const KupPhotoFrame$1 = /*@__PURE__*/ proxyCustomElement(class KupPhotoFrame ext
|
|
|
117
117
|
if (this.isInViewport && !__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f")) {
|
|
118
118
|
__classPrivateFieldSet(this, _KupPhotoFrame_renderResource, true, "f");
|
|
119
119
|
}
|
|
120
|
-
return (h(Host, { key: '
|
|
120
|
+
return (h(Host, { key: 'd6d82199e94a278a68fcd3bcb2e128f4714f7dcd' }, h("style", { key: 'ba1ceb0cd797d7a3a7808d7b2cd4849193faff42' }, __classPrivateFieldGet(this, _KupPhotoFrame_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '4701a46d03923c418672ed93098d5bde32ae38ae', id: componentWrapperId, ref: (el) => {
|
|
121
121
|
__classPrivateFieldSet(this, _KupPhotoFrame_wrapperEl, el, "f");
|
|
122
|
-
} }, h("img", Object.assign({ key: '
|
|
122
|
+
} }, h("img", Object.assign({ key: '451b86c100861cb4b72cfc2575e2c7ad6da3b6ee' }, this.placeholderAttrs, { class: "placeholder", ref: (el) => (__classPrivateFieldSet(this, _KupPhotoFrame_placeholderEl, el, "f")), onLoad: () => {
|
|
123
123
|
if (__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").naturalWidth >
|
|
124
124
|
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").naturalHeight) {
|
|
125
125
|
__classPrivateFieldGet(this, _KupPhotoFrame_wrapperEl, "f").classList.add('horizontal');
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props of the kup-gantt component.
|
|
3
|
+
* Used to export every prop in an object.
|
|
4
|
+
*/
|
|
5
|
+
var KupPlannerProps;
|
|
6
|
+
(function (KupPlannerProps) {
|
|
7
|
+
KupPlannerProps["customStyle"] = "Custom style of the component.";
|
|
8
|
+
KupPlannerProps["data"] = "Dataset containg the tasks list";
|
|
9
|
+
KupPlannerProps["detailData"] = "Dataset containg the details list";
|
|
10
|
+
KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
|
|
11
|
+
KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
|
|
12
|
+
KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
|
|
13
|
+
KupPlannerProps["detailFilter"] = "Sets the detail's filter.";
|
|
14
|
+
KupPlannerProps["detailHeight"] = "Height for detail gantt";
|
|
15
|
+
KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
|
|
16
|
+
KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
|
|
17
|
+
KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
|
|
18
|
+
KupPlannerProps["detailInitialScrollX"] = "Sets the initial scroll X for the detail.";
|
|
19
|
+
KupPlannerProps["detailInitialScrollY"] = "Sets the initial scroll Y for the detail.";
|
|
20
|
+
KupPlannerProps["listCellWidth"] = "Total size of the cells inside to the left box, near the gantt";
|
|
21
|
+
KupPlannerProps["maxWidth"] = "Max width for component";
|
|
22
|
+
KupPlannerProps["phaseColorCol"] = "Column containing the phase color in hex format";
|
|
23
|
+
KupPlannerProps["phaseColumns"] = "Columns containing informations displayed in the left box ,near the gantt of phases";
|
|
24
|
+
KupPlannerProps["phaseColParDep"] = "Column containing the name of the parent phases";
|
|
25
|
+
KupPlannerProps["phaseDates"] = "Columns containing phase duration, from (firstDate) to (secondDate)";
|
|
26
|
+
KupPlannerProps["phaseIdCol"] = "Column containing unique phase identifier";
|
|
27
|
+
KupPlannerProps["phaseNameCol"] = "Column containing phase name displayed";
|
|
28
|
+
KupPlannerProps["phasePrevDates"] = "Columns containing forecast phase duration, from (firstDate) to (secondDate)";
|
|
29
|
+
KupPlannerProps["readOnly"] = "When true, the two gantts are not interactable.";
|
|
30
|
+
KupPlannerProps["showSecondaryDates"] = "Enable/disable display of secondary dates";
|
|
31
|
+
KupPlannerProps["taskColumns"] = "Columns containing informations displayed in the left box, near the gantt";
|
|
32
|
+
KupPlannerProps["taskDates"] = "Columns containing task duration, from (firstDate) to (secondDate)";
|
|
33
|
+
KupPlannerProps["taskFilter"] = "Sets the task's filter.";
|
|
34
|
+
KupPlannerProps["taskHeight"] = "Height for main gantt";
|
|
35
|
+
KupPlannerProps["taskIdCol"] = "Column containing unique task identifier";
|
|
36
|
+
KupPlannerProps["taskNameCol"] = "Column containing task name displayed";
|
|
37
|
+
KupPlannerProps["taskPrevDates"] = "Columns containing forecast task duration, from (firstDate) to (secondDate)";
|
|
38
|
+
KupPlannerProps["taskInitialScrollX"] = "Sets the initial scroll X for the task.";
|
|
39
|
+
KupPlannerProps["taskInitialScrollY"] = "Sets the initial scroll Y for the task.";
|
|
40
|
+
KupPlannerProps["titleMess"] = "Message displayed on top";
|
|
41
|
+
})(KupPlannerProps || (KupPlannerProps = {}));
|
|
42
|
+
var KupPlannerTaskAction;
|
|
43
|
+
(function (KupPlannerTaskAction) {
|
|
44
|
+
KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
|
|
45
|
+
KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
|
|
46
|
+
KupPlannerTaskAction["onClick"] = "onClick";
|
|
47
|
+
KupPlannerTaskAction["onDblClick"] = "onDblClick";
|
|
48
|
+
KupPlannerTaskAction["onResize"] = "onResize";
|
|
49
|
+
KupPlannerTaskAction["onRightClick"] = "onRightClick";
|
|
50
|
+
KupPlannerTaskAction["onPhase"] = "onPhase";
|
|
51
|
+
KupPlannerTaskAction["onTask"] = "onTask";
|
|
52
|
+
})(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
|
|
53
|
+
var KupPlannerGanttRowType;
|
|
54
|
+
(function (KupPlannerGanttRowType) {
|
|
55
|
+
KupPlannerGanttRowType["TASK"] = "task";
|
|
56
|
+
KupPlannerGanttRowType["PHASE"] = "phase";
|
|
57
|
+
KupPlannerGanttRowType["DETAIL"] = "detail";
|
|
58
|
+
})(KupPlannerGanttRowType || (KupPlannerGanttRowType = {}));
|
|
59
|
+
class KupPlannerLastOnChangeReceived {
|
|
60
|
+
constructor(event, threshold = 100) {
|
|
61
|
+
this.dateTime = new Date();
|
|
62
|
+
this.event = event;
|
|
63
|
+
this.threshold = threshold;
|
|
64
|
+
}
|
|
65
|
+
isEquivalent(newEvent) {
|
|
66
|
+
const intervalTime = new Date().valueOf() - this.dateTime.valueOf();
|
|
67
|
+
const equals = JSON.stringify(this.event) === JSON.stringify(newEvent);
|
|
68
|
+
return equals && intervalTime < this.threshold;
|
|
69
|
+
}
|
|
70
|
+
resetDateTime() {
|
|
71
|
+
this.dateTime = new Date();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const defaultStylingOptions = {
|
|
75
|
+
listCellWidth: '300px',
|
|
76
|
+
rowHeight: 40,
|
|
77
|
+
barFill: 90,
|
|
78
|
+
projectProgressColor: '#CBCBCB',
|
|
79
|
+
projectProgressSelectedColor: '#CBCBCB',
|
|
80
|
+
projectBackgroundColor: '#CBCBCB',
|
|
81
|
+
projectBackgroundSelectedColor: '#CBCBCB',
|
|
82
|
+
barProgressColor: '#A2A415',
|
|
83
|
+
barProgressSelectedColor: '#A2A415',
|
|
84
|
+
barBackgroundColor: '#A2A415',
|
|
85
|
+
barBackgroundSelectedColor: '#A2A415',
|
|
86
|
+
barDropZoneColor: '#4d9f0240'
|
|
87
|
+
};
|
|
88
|
+
const KUP_PLANNER_MAIN_GANTT_ID = 'main';
|
|
89
|
+
const KUP_PLANNER_SECONDARY_GANTT_ID = 'secondary';
|
|
90
|
+
|
|
91
|
+
export { KUP_PLANNER_MAIN_GANTT_ID as K, KupPlannerGanttRowType as a, KupPlannerTaskAction as b, KupPlannerLastOnChangeReceived as c, defaultStylingOptions as d, KupPlannerProps as e, KUP_PLANNER_SECONDARY_GANTT_ID as f };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { c as calculateDisplayedDateRange, a as convertProjectToTasks, b as getPhaseById, m as mergeTaskIntoProjects, e as getProjectById, f as mergeTaskIntoPhases, h as columnWidthForTimeUnit, d as defineCustomElement$5 } from './kup-task-list2.js';
|
|
3
|
+
import { K as KUP_PLANNER_MAIN_GANTT_ID, f as KUP_PLANNER_SECONDARY_GANTT_ID } from './kup-planner-declarations.js';
|
|
4
4
|
import { b as KupDates } from './kup-dates.js';
|
|
5
5
|
import { g as ganttDateTimeFormatters, d as defineCustomElement$b } from './kup-gantt-calendar2.js';
|
|
6
6
|
import { d as defineCustomElement$e } from './custom-task-list-header.js';
|
|
@@ -78,14 +78,14 @@ const KupPlannerRenderer = /*@__PURE__*/ proxyCustomElement(class KupPlannerRend
|
|
|
78
78
|
}
|
|
79
79
|
//---- Lifecycle hooks ----
|
|
80
80
|
componentWillLoad() {
|
|
81
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
82
82
|
this.timeUnit = (_a = this.props) === null || _a === void 0 ? void 0 : _a.viewMode;
|
|
83
83
|
this.currentTasks = ((_b = this.props) === null || _b === void 0 ? void 0 : _b.mainGantt.items) || [];
|
|
84
84
|
this.currentDetails = (_d = (_c = this.props) === null || _c === void 0 ? void 0 : _c.secondaryGantt) === null || _d === void 0 ? void 0 : _d.items;
|
|
85
|
-
this.scrollX = ((_f = (_e = this.props) === null || _e === void 0 ? void 0 : _e.mainGantt) === null || _f === void 0 ? void 0 : _f.initialScrollX)
|
|
85
|
+
this.scrollX = (_g = (_f = (_e = this.props) === null || _e === void 0 ? void 0 : _e.mainGantt) === null || _f === void 0 ? void 0 : _f.initialScrollX) !== null && _g !== void 0 ? _g : -1;
|
|
86
86
|
this.mainGanttDoubleView =
|
|
87
|
-
(
|
|
88
|
-
this.displayedDates = calculateDisplayedDateRange(this.currentTasks, this.timeUnit, this.mainGanttDoubleView, this.currentDetails, (
|
|
87
|
+
(_k = (_j = (_h = this.props) === null || _h === void 0 ? void 0 : _h.mainGantt) === null || _j === void 0 ? void 0 : _j.showSecondaryDates) !== null && _k !== void 0 ? _k : false;
|
|
88
|
+
this.displayedDates = calculateDisplayedDateRange(this.currentTasks, this.timeUnit, this.mainGanttDoubleView, this.currentDetails, (_l = this.props) === null || _l === void 0 ? void 0 : _l.preStepsCount);
|
|
89
89
|
this.viewDate = undefined;
|
|
90
90
|
this.projection = undefined;
|
|
91
91
|
this.updateTasks();
|
|
@@ -202,6 +202,31 @@ const KupPlannerRenderer = /*@__PURE__*/ proxyCustomElement(class KupPlannerRend
|
|
|
202
202
|
// Use setTimeout to ensure DOM updates
|
|
203
203
|
setTimeout(this.getScrollX, 500);
|
|
204
204
|
}
|
|
205
|
+
// Handle phase drop
|
|
206
|
+
handlePhaseDrop(originalPhaseData,
|
|
207
|
+
// originalTaskData: KupPlannerGanttTaskN | KupPlannerItemDetail,
|
|
208
|
+
finalPhaseData, destinationData, onPhaseDrop) {
|
|
209
|
+
// Invoke callback
|
|
210
|
+
let row = undefined;
|
|
211
|
+
const currentProjects = this.currentTasks;
|
|
212
|
+
const parentOfClickedPhase = currentProjects.find((p) => { var _a; return (_a = p.phases) === null || _a === void 0 ? void 0 : _a.some((ph) => (ph === null || ph === void 0 ? void 0 : ph.id) === finalPhaseData.id); });
|
|
213
|
+
if (parentOfClickedPhase) {
|
|
214
|
+
const phases = mergeTaskIntoPhases(parentOfClickedPhase.phases, finalPhaseData);
|
|
215
|
+
const updatedProjects = currentProjects.map((p) => p.id === parentOfClickedPhase.id ? Object.assign(Object.assign({}, p), { phases }) : p);
|
|
216
|
+
row = getPhaseById(finalPhaseData.id, updatedProjects);
|
|
217
|
+
}
|
|
218
|
+
row === null || row === void 0 ? true : delete row['taskRow'];
|
|
219
|
+
onPhaseDrop === null || onPhaseDrop === void 0 ? void 0 : onPhaseDrop({
|
|
220
|
+
originalPhaseData,
|
|
221
|
+
// originalTaskData,
|
|
222
|
+
finalPhaseData: row,
|
|
223
|
+
destinationData,
|
|
224
|
+
});
|
|
225
|
+
// to move the phase back to its original position
|
|
226
|
+
this.currentTasks = JSON.parse(JSON.stringify(this.currentTasks));
|
|
227
|
+
// Use setTimeout to ensure DOM updates
|
|
228
|
+
setTimeout(this.getScrollX, 500);
|
|
229
|
+
}
|
|
205
230
|
// Get scrollX
|
|
206
231
|
getScrollX() {
|
|
207
232
|
var _a, _b, _c;
|
|
@@ -214,7 +239,7 @@ const KupPlannerRenderer = /*@__PURE__*/ proxyCustomElement(class KupPlannerRend
|
|
|
214
239
|
}
|
|
215
240
|
render() {
|
|
216
241
|
var _a, _b, _c;
|
|
217
|
-
return (h("div", { key: '
|
|
242
|
+
return (h("div", { key: 'ca2bc5b1e398639943fc073b92035b83d304dee1', class: "planner-render" }, h("kup-switcher", { key: '02903e6f1d14536cc3e82e535f98f56761004051', timeUnitChange: (timeUnit) => {
|
|
218
243
|
var _a, _b;
|
|
219
244
|
(_b = (_a = this.props).onSetViewMode) === null || _b === void 0 ? void 0 : _b.call(_a, timeUnit);
|
|
220
245
|
this.timeUnit = timeUnit;
|
|
@@ -247,7 +272,15 @@ const KupPlannerRenderer = /*@__PURE__*/ proxyCustomElement(class KupPlannerRend
|
|
|
247
272
|
if (row) {
|
|
248
273
|
this.handleContextMenu(event, row, this.props.mainGantt.onContextMenu);
|
|
249
274
|
}
|
|
250
|
-
}, dateChange: (task) => this.handleDateChange(task, this.currentTasks, this.props.mainGantt.onDateChange), locale: this.locale, dateTimeFormatters: ganttDateTimeFormatters, initialScrollX: this.scrollX, initialScrollY: this.props.mainGantt.initialScrollY, readOnly: this.props.mainGantt.readOnly, scrollXChange: this.props.onScrollX, scrollYChange: this.props.mainGantt.onScrollY, currentTasks: this.currentTasks, handleClick: this.handleClick.bind(this), handleDblClick: this.handleDblClick.bind(this), handleContextMenu: this.handleContextMenu.bind(this), ganttOnClick: this.props.mainGantt.onClick, ganttOnDblClick: this.props.mainGantt.onDblClick, ganttonOnContextMenu: this.props.mainGantt.onContextMenu, label: this.props.mainGantt.title, doubleView: (_b = this.mainGanttDoubleView) !== null && _b !== void 0 ? _b : false, setDoubleView: this.handleSetDoubleView.bind(this)
|
|
275
|
+
}, dateChange: (task) => this.handleDateChange(task, this.currentTasks, this.props.mainGantt.onDateChange), locale: this.locale, dateTimeFormatters: ganttDateTimeFormatters, initialScrollX: this.scrollX, initialScrollY: this.props.mainGantt.initialScrollY, readOnly: this.props.mainGantt.readOnly, scrollXChange: this.props.onScrollX, scrollYChange: this.props.mainGantt.onScrollY, currentTasks: this.currentTasks, handleClick: this.handleClick.bind(this), handleDblClick: this.handleDblClick.bind(this), handleContextMenu: this.handleContextMenu.bind(this), ganttOnClick: this.props.mainGantt.onClick, ganttOnDblClick: this.props.mainGantt.onDblClick, ganttonOnContextMenu: this.props.mainGantt.onContextMenu, label: this.props.mainGantt.title, doubleView: (_b = this.mainGanttDoubleView) !== null && _b !== void 0 ? _b : false, setDoubleView: this.handleSetDoubleView.bind(this), scrollableTaskList: this.props.scrollableTaskList, phaseDrop: (originalPhaseData, originalTaskData, finalPhaseData, destinationData) => {
|
|
276
|
+
const originalPhase = getPhaseById(originalPhaseData.id, this.currentTasks);
|
|
277
|
+
getProjectById(originalTaskData.id, this.currentTasks);
|
|
278
|
+
getPhaseById(finalPhaseData.id, this.currentTasks);
|
|
279
|
+
const destinationTask = getProjectById(destinationData.id, this.currentTasks);
|
|
280
|
+
this.handlePhaseDrop(originalPhase,
|
|
281
|
+
// originalTask,
|
|
282
|
+
finalPhaseData, destinationTask, this.props.mainGantt.onPhaseDrop);
|
|
283
|
+
} })), this.props.secondaryGantt && (h("kup-gantt", Object.assign({ ref: (el) => (this.secondaryGantt = el), ganttId: KUP_PLANNER_SECONDARY_GANTT_ID, key: KUP_PLANNER_SECONDARY_GANTT_ID, filter: this.props.secondaryGantt.filter, hideLabel: this.props.secondaryGantt.hideLabel, showSecondaryDates: this.mainGanttDoubleView, hideDependencies: this.props.secondaryGantt.hideDependencies, ganttHeight: this.props.secondaryGantt.ganttHeight, displayedStartDate: this.displayedDates.displayedStartDate, displayedEndDate: this.displayedDates.displayedEndDate, viewDate: this.viewDate, tasks: this.details, columnWidth: columnWidthForTimeUnit(this.timeUnit), viewMode: this.timeUnit }, this.props.secondaryGantt.stylingOptions, { TaskListHeader: this.props.secondaryGantt
|
|
251
284
|
.taskListHeaderProject, TaskListTable: this.props.secondaryGantt
|
|
252
285
|
.taskListTableProject, TooltipContent: (_c = this.props.secondaryGantt.tooltipContent) !== null && _c !== void 0 ? _c : CustomTooltipHOC(), projection: this.projection, barClick: (task) => {
|
|
253
286
|
if (this.props.secondaryGantt) {
|
|
@@ -277,7 +310,7 @@ const KupPlannerRenderer = /*@__PURE__*/ proxyCustomElement(class KupPlannerRend
|
|
|
277
310
|
}
|
|
278
311
|
}
|
|
279
312
|
}, dateChange: (task) => this.handleDateChange(task, this
|
|
280
|
-
.currentTasks, this.props.secondaryGantt.onDateChange), locale: this.locale, dateTimeFormatters: ganttDateTimeFormatters, initialScrollX: this.scrollX, initialScrollY: this.props.secondaryGantt.initialScrollY, readOnly: this.props.secondaryGantt.readOnly, scrollXChange: this.props.onScrollX, scrollYChange: this.props.secondaryGantt.onScrollY, currentTasks: this.currentTasks, handleClick: this.handleClick.bind(this), handleDblClick: this.handleDblClick.bind(this), handleContextMenu: this.handleContextMenu.bind(this), ganttOnClick: this.props.secondaryGantt.onClick, ganttOnDblClick: this.props.secondaryGantt.onDblClick, ganttonOnContextMenu: this.props.secondaryGantt.onContextMenu, label: this.props.secondaryGantt.title })))))));
|
|
313
|
+
.currentTasks, this.props.secondaryGantt.onDateChange), locale: this.locale, dateTimeFormatters: ganttDateTimeFormatters, initialScrollX: this.scrollX, initialScrollY: this.props.secondaryGantt.initialScrollY, readOnly: this.props.secondaryGantt.readOnly, scrollXChange: this.props.onScrollX, scrollYChange: this.props.secondaryGantt.onScrollY, currentTasks: this.currentTasks, handleClick: this.handleClick.bind(this), handleDblClick: this.handleDblClick.bind(this), handleContextMenu: this.handleContextMenu.bind(this), ganttOnClick: this.props.secondaryGantt.onClick, ganttOnDblClick: this.props.secondaryGantt.onDblClick, ganttonOnContextMenu: this.props.secondaryGantt.onContextMenu, label: this.props.secondaryGantt.title, scrollableTaskList: this.props.scrollableTaskList })))))));
|
|
281
314
|
}
|
|
282
315
|
get rootElement() { return this; }
|
|
283
316
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host, getAssetPath } from '@stencil/core/internal/client';
|
|
2
2
|
import { k as kupManagerInstance, m as getCellValueForDisplay, g as getProps, s as setProps, b as KupThemeIconValues, Q as KupLanguageSearch } from './kup-manager.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as KupPlannerGanttRowType, d as defaultStylingOptions, b as KupPlannerTaskAction, c as KupPlannerLastOnChangeReceived, e as KupPlannerProps } from './kup-planner-declarations.js';
|
|
4
4
|
import { N as FTextFieldMDC, c as componentWrapperId, Z as FTextField, d as defineCustomElement$3, a as defineCustomElement$5, b as defineCustomElement$6, e as defineCustomElement$b, f as defineCustomElement$d, g as defineCustomElement$f, h as defineCustomElement$g, i as defineCustomElement$h, j as defineCustomElement$i, k as defineCustomElement$k, l as defineCustomElement$l, m as defineCustomElement$o, n as defineCustomElement$r, o as defineCustomElement$s, p as defineCustomElement$t, q as defineCustomElement$u, r as defineCustomElement$v, s as defineCustomElement$y, t as defineCustomElement$z, u as defineCustomElement$A, v as defineCustomElement$B, w as defineCustomElement$C, x as defineCustomElement$D, y as defineCustomElement$E, z as defineCustomElement$F, A as defineCustomElement$G, B as defineCustomElement$H } from './kup-autocomplete2.js';
|
|
5
5
|
import { K as KupDatesFormats } from './kup-dates.js';
|
|
6
6
|
import { d as defineCustomElement$x } from './custom-task-list-header.js';
|
|
@@ -13,13 +13,14 @@ import { d as defineCustomElement$j } from './kup-planner-renderer2.js';
|
|
|
13
13
|
import { d as defineCustomElement$e } from './kup-standard-tooltip2.js';
|
|
14
14
|
import { d as defineCustomElement$c } from './kup-switcher2.js';
|
|
15
15
|
import { d as defineCustomElement$a } from './kup-task-gantt2.js';
|
|
16
|
+
import { d as defineCustomElement$9 } from './kup-task-list2.js';
|
|
16
17
|
import { d as defineCustomElement$8 } from './kup-task-list-header2.js';
|
|
17
18
|
import { d as defineCustomElement$7 } from './kup-task-list-table2.js';
|
|
18
19
|
import { d as defineCustomElement$4 } from './kup-tooltip2.js';
|
|
19
20
|
import { d as defineCustomElement$2 } from './kup-vertical-scroll2.js';
|
|
20
21
|
|
|
21
22
|
const kupManager = kupManagerInstance();
|
|
22
|
-
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
23
|
+
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell, startHourCell, endHourCell, secStartHourCell, secEndHourCell) {
|
|
23
24
|
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
24
25
|
let sanitizedSecDateValues = [];
|
|
25
26
|
if (secStartDateCell && secEndDateCell) {
|
|
@@ -30,9 +31,29 @@ function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDa
|
|
|
30
31
|
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
let sanitizedHourValues = [];
|
|
35
|
+
if (startHourCell && endHourCell) {
|
|
36
|
+
if (isAtLeastOneHourValid(startHourCell, endHourCell)) {
|
|
37
|
+
sanitizedHourValues = sanitizeHours(startHourCell, endHourCell);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
let sanitizedSecHourValues = [];
|
|
44
|
+
if (secStartHourCell && secEndHourCell) {
|
|
45
|
+
if (isAtLeastOneHourValid(secStartHourCell, secEndHourCell)) {
|
|
46
|
+
sanitizedSecHourValues = sanitizeHours(secStartHourCell, secEndHourCell);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
33
52
|
return {
|
|
34
53
|
dateValues: sanitizedDateValues,
|
|
35
54
|
secDateValues: sanitizedSecDateValues,
|
|
55
|
+
hourValues: sanitizedHourValues,
|
|
56
|
+
secHourValues: sanitizedSecHourValues
|
|
36
57
|
};
|
|
37
58
|
}
|
|
38
59
|
function sanitizeDates(startDateCell, endDateCell) {
|
|
@@ -50,13 +71,34 @@ function sanitizeDates(startDateCell, endDateCell) {
|
|
|
50
71
|
return returnValues;
|
|
51
72
|
}
|
|
52
73
|
}
|
|
74
|
+
function sanitizeHours(startHourCell, endHourCell) {
|
|
75
|
+
let returnValues = [startHourCell.value, endHourCell.value];
|
|
76
|
+
if (isHourValid(startHourCell) && isHourValid(endHourCell)) {
|
|
77
|
+
return returnValues;
|
|
78
|
+
}
|
|
79
|
+
else if (isHourValid(startHourCell)) {
|
|
80
|
+
return [startHourCell.value, startHourCell.value];
|
|
81
|
+
}
|
|
82
|
+
else if (isHourValid(endHourCell)) {
|
|
83
|
+
return [endHourCell.value, endHourCell.value];
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return returnValues;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
53
89
|
function isDateValid(dateCell) {
|
|
54
90
|
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
55
91
|
kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
|
|
56
92
|
}
|
|
93
|
+
function isHourValid(dateCell) {
|
|
94
|
+
return (kupManager.objects.isTime(dateCell.obj) || kupManager.objects.isTimeWithSeconds(dateCell.obj));
|
|
95
|
+
}
|
|
57
96
|
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
58
97
|
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
59
98
|
}
|
|
99
|
+
function isAtLeastOneHourValid(startHourCell, endHourCell) {
|
|
100
|
+
return isHourValid(startHourCell) || isHourValid(endHourCell);
|
|
101
|
+
}
|
|
60
102
|
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
61
103
|
let toValuesFunction = () => columns.map((col) => {
|
|
62
104
|
return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
@@ -115,6 +157,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
115
157
|
this.kupClick = createEvent(this, "kup-planner-click", 6);
|
|
116
158
|
this.kupDblClick = createEvent(this, "kup-planner-dblclick", 6);
|
|
117
159
|
this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
|
|
160
|
+
this.kupPhaseDrop = createEvent(this, "kup-planner-phasedrop", 6);
|
|
118
161
|
this.kupReady = createEvent(this, "kup-planner-ready", 6);
|
|
119
162
|
this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
|
|
120
163
|
this.kupDidUnload = createEvent(this, "kup-planner-didunload", 6);
|
|
@@ -143,9 +186,11 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
143
186
|
this.detailDates = undefined;
|
|
144
187
|
this.detailFilter = undefined;
|
|
145
188
|
this.detailHeight = undefined;
|
|
189
|
+
this.detailHours = [];
|
|
146
190
|
this.detailIconCol = undefined;
|
|
147
191
|
this.detailIdCol = undefined;
|
|
148
192
|
this.detailNameCol = undefined;
|
|
193
|
+
this.detailPrevHours = [];
|
|
149
194
|
this.detailPrevDates = undefined;
|
|
150
195
|
this.detailInitialScrollX = undefined;
|
|
151
196
|
this.detailInitialScrollY = undefined;
|
|
@@ -155,9 +200,11 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
155
200
|
this.phaseColumns = undefined;
|
|
156
201
|
this.phaseColParDep = undefined;
|
|
157
202
|
this.phaseDates = undefined;
|
|
203
|
+
this.phaseHours = [];
|
|
158
204
|
this.phaseIconCol = undefined;
|
|
159
205
|
this.phaseIdCol = undefined;
|
|
160
206
|
this.phaseNameCol = undefined;
|
|
207
|
+
this.phasePrevHours = [];
|
|
161
208
|
this.phasePrevDates = undefined;
|
|
162
209
|
this.readOnly = false;
|
|
163
210
|
this.showSecondaryDates = false;
|
|
@@ -165,16 +212,19 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
165
212
|
this.taskDates = undefined;
|
|
166
213
|
this.taskFilter = undefined;
|
|
167
214
|
this.taskHeight = undefined;
|
|
215
|
+
this.taskHours = [];
|
|
168
216
|
this.taskIconCol = undefined;
|
|
169
217
|
this.taskIdCol = undefined;
|
|
170
218
|
this.taskInitialScrollX = undefined;
|
|
171
219
|
this.taskInitialScrollY = undefined;
|
|
172
220
|
this.taskNameCol = undefined;
|
|
221
|
+
this.taskPrevHours = [];
|
|
173
222
|
this.taskPrevDates = undefined;
|
|
174
223
|
this.titleMess = undefined;
|
|
175
224
|
this.viewMode = 'month';
|
|
176
225
|
this.mainFilter = undefined;
|
|
177
226
|
this.secondaryFilter = undefined;
|
|
227
|
+
this.scrollableTaskList = false;
|
|
178
228
|
this.plannerProps = undefined;
|
|
179
229
|
}
|
|
180
230
|
initWithPersistedState() {
|
|
@@ -279,7 +329,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
279
329
|
if (task) {
|
|
280
330
|
__classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
|
|
281
331
|
task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]])).map((row) => {
|
|
282
|
-
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
332
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]], row.cells[this.phaseHours[0]], row.cells[this.phaseHours[1]], row.cells[this.phasePrevHours[0]], row.cells[this.phasePrevHours[1]]);
|
|
283
333
|
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
284
334
|
? '#START#'
|
|
285
335
|
: col == this.phaseDates[1]
|
|
@@ -306,6 +356,10 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
306
356
|
icon: iconUrl
|
|
307
357
|
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
308
358
|
: undefined,
|
|
359
|
+
startHour: datesSanitized.hourValues[0],
|
|
360
|
+
endHour: datesSanitized.hourValues[1],
|
|
361
|
+
secondaryStartHour: datesSanitized.secHourValues[0],
|
|
362
|
+
secondaryEndHour: datesSanitized.secHourValues[1],
|
|
309
363
|
};
|
|
310
364
|
return phase;
|
|
311
365
|
});
|
|
@@ -373,6 +427,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
373
427
|
window.clearTimeout(taskScrollYTimeout);
|
|
374
428
|
taskScrollYTimeout = window.setTimeout(() => this.handleTaskGanttScrollY(y), scrollDelay);
|
|
375
429
|
},
|
|
430
|
+
onPhaseDrop: (nativeEvent) => this.handleOnPhaseDrop(nativeEvent),
|
|
376
431
|
},
|
|
377
432
|
secondaryGantt: details
|
|
378
433
|
? {
|
|
@@ -397,6 +452,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
397
452
|
onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
|
|
398
453
|
onSetViewMode: (value) => this.handleOnSetViewMode(value),
|
|
399
454
|
viewMode: this.viewMode,
|
|
455
|
+
scrollableTaskList: this.scrollableTaskList,
|
|
400
456
|
onScrollX: (x) => {
|
|
401
457
|
window.clearTimeout(scrollXTimeout);
|
|
402
458
|
scrollXTimeout = window.setTimeout(() => this.handleOnScrollX(x), scrollDelay);
|
|
@@ -480,6 +536,14 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
480
536
|
taskAction: taskAction,
|
|
481
537
|
});
|
|
482
538
|
}
|
|
539
|
+
onKupPhaseDrop(event, taskAction) {
|
|
540
|
+
this.kupPhaseDrop.emit({
|
|
541
|
+
comp: this,
|
|
542
|
+
id: this.rootElement.id,
|
|
543
|
+
value: event,
|
|
544
|
+
taskAction: taskAction,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
483
547
|
handleOnDblClick(nativeEvent) {
|
|
484
548
|
switch (nativeEvent.rowType) {
|
|
485
549
|
case KupPlannerGanttRowType.TASK:
|
|
@@ -581,6 +645,9 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
581
645
|
}
|
|
582
646
|
}
|
|
583
647
|
}
|
|
648
|
+
handleOnPhaseDrop(nativeEvent) {
|
|
649
|
+
this.onKupPhaseDrop(nativeEvent, KupPlannerTaskAction.onTask);
|
|
650
|
+
}
|
|
584
651
|
render() {
|
|
585
652
|
var _a, _b, _c;
|
|
586
653
|
const plannerProps = this.plannerProps
|
|
@@ -588,7 +655,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
588
655
|
if ((_b = this.plannerProps) === null || _b === void 0 ? void 0 : _b.secondaryGantt) {
|
|
589
656
|
plannerProps.secondaryGantt = Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { onScrollY: this.handleDetailGanttScrollY.bind(this) });
|
|
590
657
|
}
|
|
591
|
-
return (h(Host, { key: '
|
|
658
|
+
return (h(Host, { key: 'cce744fe8b14527039c6a39116da3ebbb79b5593' }, h("style", { key: '3ac43e5c414360d07ba8a745c000bbc7e545545f' }, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '3a9fb6211d0fc2b554bf4265350c567fc1108adb', id: componentWrapperId, style: { maxWidth: this.maxWidth } }, this.plannerProps && (h("kup-planner-renderer", { props: plannerProps, ref: (el) => (this.plannerRenderer = el) }))), h("div", { key: '9dda490b90dc263b1e42496c7c602ee0c09d081f', style: { display: this.plannerProps ? 'none' : '' } }, h(FTextField, { key: 'b569efffbce491b845d813d913545bbb1efc3d08', icon: KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
592
659
|
if (e.key === 'Enter') {
|
|
593
660
|
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value);
|
|
594
661
|
}
|
|
@@ -623,9 +690,11 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
623
690
|
"detailDates": [16],
|
|
624
691
|
"detailFilter": [1, "detail-filter"],
|
|
625
692
|
"detailHeight": [2, "detail-height"],
|
|
693
|
+
"detailHours": [16],
|
|
626
694
|
"detailIconCol": [1, "detail-icon-col"],
|
|
627
695
|
"detailIdCol": [1, "detail-id-col"],
|
|
628
696
|
"detailNameCol": [1, "detail-name-col"],
|
|
697
|
+
"detailPrevHours": [16],
|
|
629
698
|
"detailPrevDates": [16],
|
|
630
699
|
"detailInitialScrollX": [2, "detail-initial-scroll-x"],
|
|
631
700
|
"detailInitialScrollY": [2, "detail-initial-scroll-y"],
|
|
@@ -635,9 +704,11 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
635
704
|
"phaseColumns": [16],
|
|
636
705
|
"phaseColParDep": [1, "phase-col-par-dep"],
|
|
637
706
|
"phaseDates": [16],
|
|
707
|
+
"phaseHours": [16],
|
|
638
708
|
"phaseIconCol": [1, "phase-icon-col"],
|
|
639
709
|
"phaseIdCol": [1, "phase-id-col"],
|
|
640
710
|
"phaseNameCol": [1, "phase-name-col"],
|
|
711
|
+
"phasePrevHours": [16],
|
|
641
712
|
"phasePrevDates": [16],
|
|
642
713
|
"readOnly": [4, "read-only"],
|
|
643
714
|
"showSecondaryDates": [4, "show-secondary-dates"],
|
|
@@ -645,16 +716,19 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
645
716
|
"taskDates": [16],
|
|
646
717
|
"taskFilter": [1, "task-filter"],
|
|
647
718
|
"taskHeight": [2, "task-height"],
|
|
719
|
+
"taskHours": [16],
|
|
648
720
|
"taskIconCol": [1, "task-icon-col"],
|
|
649
721
|
"taskIdCol": [1, "task-id-col"],
|
|
650
722
|
"taskInitialScrollX": [2, "task-initial-scroll-x"],
|
|
651
723
|
"taskInitialScrollY": [2, "task-initial-scroll-y"],
|
|
652
724
|
"taskNameCol": [1, "task-name-col"],
|
|
725
|
+
"taskPrevHours": [16],
|
|
653
726
|
"taskPrevDates": [16],
|
|
654
727
|
"titleMess": [1, "title-mess"],
|
|
655
728
|
"viewMode": [1, "view-mode"],
|
|
656
729
|
"mainFilter": [16],
|
|
657
730
|
"secondaryFilter": [16],
|
|
731
|
+
"scrollableTaskList": [4, "scrollable-task-list"],
|
|
658
732
|
"plannerProps": [32],
|
|
659
733
|
"getProps": [64],
|
|
660
734
|
"refresh": [64],
|
|
@@ -669,7 +743,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new W
|
|
|
669
743
|
return [];
|
|
670
744
|
}
|
|
671
745
|
let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]])).map((row) => {
|
|
672
|
-
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
|
|
746
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]], row.cells[this.taskHours[0]], row.cells[this.taskHours[1]], row.cells[this.taskPrevHours[0]], row.cells[this.taskPrevHours[1]]);
|
|
673
747
|
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
|
|
674
748
|
? '#START#'
|
|
675
749
|
: col == this.taskDates[1]
|
|
@@ -692,6 +766,10 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new W
|
|
|
692
766
|
icon: iconUrl
|
|
693
767
|
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
694
768
|
: undefined,
|
|
769
|
+
startHour: datesSanitized.hourValues[0],
|
|
770
|
+
endHour: datesSanitized.hourValues[1],
|
|
771
|
+
secondaryStartHour: datesSanitized.secHourValues[0],
|
|
772
|
+
secondaryEndHour: datesSanitized.secHourValues[1]
|
|
695
773
|
};
|
|
696
774
|
return task;
|
|
697
775
|
});
|
|
@@ -707,7 +785,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new W
|
|
|
707
785
|
var _a, _b;
|
|
708
786
|
const detailId = row.cells[this.detailIdCol].value;
|
|
709
787
|
const detailNameId = row.cells[this.detailNameCol].value;
|
|
710
|
-
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
788
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]], undefined, undefined, row.cells[this.detailHours[0]], row.cells[this.detailHours[1]]);
|
|
711
789
|
const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
|
|
712
790
|
let detail = details.find((det) => det.id == detailId);
|
|
713
791
|
if (!detail) {
|
|
@@ -736,6 +814,8 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new W
|
|
|
736
814
|
icon: iconUrl
|
|
737
815
|
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
738
816
|
: undefined,
|
|
817
|
+
startHour: datesSanitized.hourValues[0],
|
|
818
|
+
endHour: datesSanitized.hourValues[1]
|
|
739
819
|
});
|
|
740
820
|
});
|
|
741
821
|
return details;
|
|
@@ -236,7 +236,7 @@ const KupProbe$1 = /*@__PURE__*/ proxyCustomElement(class KupProbe extends HTMLE
|
|
|
236
236
|
if (this.features.theme) {
|
|
237
237
|
customStyle = this.kupManager.theme.setKupStyle(this.rootElement);
|
|
238
238
|
}
|
|
239
|
-
return (h(Host, { key: '
|
|
239
|
+
return (h(Host, { key: '71372dfbcfbf66e3f83eda11eca5fddca3402d1c' }, customStyle ? h("style", null, customStyle) : null, h("div", { key: 'a05d5a30011b2e1ede2f6ca1eca593de48aebd06', id: componentWrapperId }, this.content)));
|
|
240
240
|
}
|
|
241
241
|
disconnectedCallback() {
|
|
242
242
|
if (this.features.language) {
|
|
@@ -117,7 +117,7 @@ const KupQlik$1 = /*@__PURE__*/ proxyCustomElement(class KupQlik extends HTMLEle
|
|
|
117
117
|
layoutStyle = {
|
|
118
118
|
['--lyo_obj-height']: this.defobjsize,
|
|
119
119
|
};
|
|
120
|
-
return (h("div", { key: '
|
|
120
|
+
return (h("div", { key: 'ad3b840b782c155e43d25d46b4fbf3150d0d5296', class: classLayout, style: layoutStyle }, this.divlist));
|
|
121
121
|
}
|
|
122
122
|
componentDidRender() {
|
|
123
123
|
if (this.debug) {
|
|
@@ -112,7 +112,7 @@ const KupSnackbar$1 = /*@__PURE__*/ proxyCustomElement(class KupSnackbar extends
|
|
|
112
112
|
this.kupManager.debug.logRender(this, true);
|
|
113
113
|
}
|
|
114
114
|
render() {
|
|
115
|
-
return (h(Host, { key: '
|
|
115
|
+
return (h(Host, { key: '3e52e4dd0672594bf385bcd44f3ceac7474ebb54', "kup-visible": this.visible }, h("style", { key: '2b6dcba48e84c7ba0ded38c5a86907a1ddb0aed4' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: '6843781af0232d8dd65eb23941a2f33a17ec694f', id: componentWrapperId }, h("div", { key: '178a36a80ff89fa6b31af04c372367e0e4427b89', class: snackbarClass }, h("div", { key: '8383fa478dd8a4f35fb9718a83131d26caadb275', class: `${snackbarClass}__text` }, this.text), this.actionButton || this.closeButton ? (h("div", { class: `${snackbarClass}__buttons` }, this.actionButton ? (h("div", { class: `${snackbarClass}__action` }, h(FButton, Object.assign({}, this.actionButton, { onClick: () => this.onKupActionClick() })))) : null, this.closeButton ? (h("div", { class: `${snackbarClass}__close` }, h(FButton, { icon: "close", onClick: () => this.hide() }))) : null)) : null))));
|
|
116
116
|
}
|
|
117
117
|
disconnectedCallback() {
|
|
118
118
|
this.kupManager.theme.unregister(this);
|
|
@@ -13,7 +13,7 @@ const StandardTooltipContent = /*@__PURE__*/ proxyCustomElement(class StandardTo
|
|
|
13
13
|
this.fontFamily = undefined;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h("div", { key: '
|
|
16
|
+
return (h("div", { key: 'c9b5188678b4980a396d82ea533c06ab66559061', class: "tooltipDefaultContainer", style: { fontSize: this.fontSize, fontFamily: this.fontFamily } }, h("b", { key: 'f1597026854513f01c5f40c95ac1b5dee2284f1a', style: { fontSize: `${parseInt(this.fontSize) + 6}px` } }, `${this.task.name}: ${this.task.start.getDate()}-${this.task.start.getMonth() + 1}-${this.task.start.getFullYear()} - ${this.task.end.getDate()}-${this.task.end.getMonth() + 1}-${this.task.end.getFullYear()}`), this.task.end.getTime() - this.task.start.getTime() !== 0 && (h("p", { class: "tooltipDefaultContainerParagraph" }, `Duration: ${~~((this.task.end.getTime() - this.task.start.getTime()) / (1000 * 60 * 60 * 24))} day(s)`)), h("p", { key: 'c544fe0f4499f5ef8dbc3cbb0076b9a4addfd5d1', class: "tooltipDefaultContainerParagraph" }, !!this.task.progress && `Progress: ${this.task.progress} %`)));
|
|
17
17
|
}
|
|
18
18
|
static get style() { return KupStandardTooltipStyle0; }
|
|
19
19
|
}, [1, "kup-standard-tooltip", {
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const kupSwitcherCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.switcher{display:grid;grid-auto-flow:column;grid-gap:8px;margin-
|
|
3
|
+
const kupSwitcherCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.switcher{display:grid;grid-auto-flow:column;grid-gap:8px;width:max-content;margin-bottom:var(--kup-space-05);margin-left:var(--kup-space-04)}.button{background-color:var(--kup-gray-color-70);border:none;text-align:left;box-sizing:border-box;color:var(--kup-gray-color-0);cursor:pointer;padding:var(--kup-space-03) var(--kup-space-05)}.button:hover{background-color:var(--kup-gray-color-90)}.button:focus{background-color:var(--kup-primary-color-60)}.label{text-decoration:none;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.buttonActive{background-color:var(--kup-primary-color-60)}";
|
|
4
4
|
const KupSwitcherStyle0 = kupSwitcherCss;
|
|
5
5
|
|
|
6
6
|
const KupSwitcher = /*@__PURE__*/ proxyCustomElement(class KupSwitcher extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
10
|
+
this.buttonLabels = [
|
|
11
|
+
'hour',
|
|
12
|
+
'day',
|
|
13
|
+
'week',
|
|
14
|
+
'month',
|
|
15
|
+
'year',
|
|
16
|
+
];
|
|
10
17
|
this.timeUnitChange = undefined;
|
|
18
|
+
this.activeButton = 'day';
|
|
11
19
|
}
|
|
12
20
|
render() {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return (h("div", { key: '
|
|
21
|
+
const handleButtonClick = (mode) => {
|
|
22
|
+
this.activeButton = mode;
|
|
23
|
+
this.timeUnitChange(mode);
|
|
24
|
+
};
|
|
25
|
+
return (h("div", { key: '1a1621221e411df713757eae42e028968277e0a5', class: "switcher" }, this.buttonLabels.map((label) => (h("button", { type: "button", class: {
|
|
26
|
+
button: true,
|
|
27
|
+
buttonActive: this.activeButton === label,
|
|
28
|
+
}, onClick: () => handleButtonClick(label) }, h("span", { class: "label" }, label.charAt(0).toUpperCase() + label.slice(1)))))));
|
|
18
29
|
}
|
|
19
30
|
static get style() { return KupSwitcherStyle0; }
|
|
20
31
|
}, [0, "kup-switcher", {
|
|
21
|
-
"timeUnitChange": [16]
|
|
32
|
+
"timeUnitChange": [16],
|
|
33
|
+
"activeButton": [32]
|
|
22
34
|
}]);
|
|
23
35
|
function defineCustomElement() {
|
|
24
36
|
if (typeof customElements === "undefined") {
|