@sme.up/ketchup 8.0.2 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{GenericVariables-a9ed17ee.js → GenericVariables-9cd88034.js} +3 -3
- package/dist/cjs/{component-85c2bd4d.js → component-2c7ddef7.js} +91 -10
- package/dist/cjs/{f-button-9524bbf7.js → f-button-a5f661f2.js} +99 -99
- package/dist/cjs/{f-button-declarations-b611587f.js → f-button-declarations-76b4fb4c.js} +16 -16
- package/dist/cjs/{f-cell-bcb75ade.js → f-cell-ca9e4352.js} +472 -472
- package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-e2c6ecef.js} +23 -23
- package/dist/cjs/{f-chip-2249b386.js → f-chip-e941fa19.js} +125 -125
- package/dist/cjs/{f-image-47d74999.js → f-image-466b724f.js} +107 -107
- package/dist/cjs/{f-paginator-utils-b0a9ae5f.js → f-paginator-utils-f775ce67.js} +1548 -1548
- package/dist/cjs/{f-text-field-579c0fc0.js → f-text-field-ddb47dda.js} +172 -172
- package/dist/cjs/{f-text-field-mdc-0e22f3e3.js → f-text-field-mdc-d38d80b5.js} +59 -60
- package/dist/cjs/{index-1f177abc.js → index-26fb8571.js} +78 -24
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +199 -200
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +17546 -17508
- package/dist/cjs/kup-box.cjs.entry.js +1294 -1232
- package/dist/cjs/kup-calendar.cjs.entry.js +9542 -10035
- package/dist/cjs/kup-cell.cjs.entry.js +172 -172
- package/dist/cjs/kup-dash-list.cjs.entry.js +106 -106
- package/dist/cjs/kup-dash_2.cjs.entry.js +162 -162
- package/dist/cjs/kup-dashboard.cjs.entry.js +400 -401
- package/dist/cjs/kup-drawer.cjs.entry.js +138 -138
- package/dist/cjs/kup-echart.cjs.entry.js +7145 -6598
- package/dist/cjs/kup-family-tree.cjs.entry.js +439 -439
- package/dist/cjs/kup-iframe.cjs.entry.js +94 -94
- package/dist/cjs/kup-image-list.cjs.entry.js +255 -256
- package/dist/cjs/kup-lazy.cjs.entry.js +186 -186
- package/dist/cjs/kup-magic-box.cjs.entry.js +298 -298
- package/dist/cjs/{kup-manager-85b2a756.js → kup-manager-16b684bd.js} +7286 -7287
- package/dist/cjs/kup-nav-bar.cjs.entry.js +130 -130
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +367 -368
- package/dist/cjs/kup-photo-frame.cjs.entry.js +144 -144
- package/dist/cjs/kup-planner.cjs.entry.js +1151 -1009
- package/dist/cjs/kup-probe.cjs.entry.js +246 -246
- package/dist/cjs/kup-qlik.cjs.entry.js +138 -138
- package/dist/cjs/kup-snackbar.cjs.entry.js +116 -116
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dash-list.js +466 -293
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/planner.js +8189 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +10 -10
- package/dist/collection/components/kup-accordion/kup-accordion.js +445 -445
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +27 -27
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +908 -908
- package/dist/collection/components/kup-badge/kup-badge-declarations.js +10 -10
- package/dist/collection/components/kup-badge/kup-badge.js +276 -276
- package/dist/collection/components/kup-box/kup-box-declarations.js +34 -33
- package/dist/collection/components/kup-box/kup-box-state.js +15 -15
- package/dist/collection/components/kup-box/kup-box.js +2159 -2079
- package/dist/collection/components/kup-button/kup-button-declarations.js +18 -18
- package/dist/collection/components/kup-button/kup-button.js +580 -580
- package/dist/collection/components/kup-button-list/kup-button-list-declarations.js +13 -13
- package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +144 -0
- package/dist/collection/components/kup-button-list/kup-button-list.js +527 -527
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +35 -35
- package/dist/collection/components/kup-calendar/kup-calendar.css +0 -4
- package/dist/collection/components/kup-calendar/kup-calendar.js +690 -690
- package/dist/collection/components/kup-card/box/kup-card-box.js +227 -227
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +56 -56
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +393 -393
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +308 -308
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +165 -165
- package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +10 -10
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +118 -118
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +64 -64
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +217 -217
- package/dist/collection/components/kup-card/free/kup-card-free.js +22 -22
- package/dist/collection/components/kup-card/kup-card-declarations.js +98 -98
- package/dist/collection/components/kup-card/kup-card-helper.js +196 -196
- package/dist/collection/components/kup-card/kup-card.js +809 -809
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +251 -251
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +593 -593
- package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -11
- package/dist/collection/components/kup-cell/kup-cell.js +401 -401
- package/dist/collection/components/kup-chart/kup-chart-builder.js +93 -93
- package/dist/collection/components/kup-chart/kup-chart-declarations.js +49 -49
- package/dist/collection/components/kup-chart/kup-chart.js +1080 -1080
- package/dist/collection/components/kup-checkbox/kup-checkbox-declarations.js +13 -13
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +433 -433
- package/dist/collection/components/kup-chip/kup-chip-declarations.js +12 -12
- package/dist/collection/components/kup-chip/kup-chip.js +558 -558
- package/dist/collection/components/kup-color-picker/kup-color-picker-declarations.js +12 -12
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +546 -546
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +15 -15
- package/dist/collection/components/kup-combobox/kup-combobox.js +821 -821
- package/dist/collection/components/kup-dash/kup-dash.js +171 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +327 -327
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -10
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +588 -588
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +156 -156
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +808 -808
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +36 -36
- package/dist/collection/components/kup-data-table/kup-data-table.js +5527 -5527
- package/dist/collection/components/kup-date-picker/kup-date-picker-declarations.js +18 -18
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +816 -816
- package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +14 -14
- package/dist/collection/components/kup-dialog/kup-dialog.js +467 -467
- package/dist/collection/components/kup-drawer/kup-drawer-declarations.js +10 -10
- package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +9 -0
- package/dist/collection/components/kup-drawer/kup-drawer.js +383 -383
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +18 -18
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +800 -800
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +52 -52
- package/dist/collection/components/kup-echart/kup-echart.js +1437 -1437
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +15 -15
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +829 -829
- package/dist/collection/components/kup-form/kup-form-declarations.js +29 -29
- package/dist/collection/components/kup-form/kup-form.js +731 -731
- package/dist/collection/components/kup-gauge/kup-gauge-declarations.js +26 -26
- package/dist/collection/components/kup-gauge/kup-gauge.js +764 -764
- package/dist/collection/components/kup-grid/kup-grid-declarations.js +10 -10
- package/dist/collection/components/kup-grid/kup-grid.js +253 -253
- package/dist/collection/components/kup-iframe/kup-iframe-declarations.js +10 -10
- package/dist/collection/components/kup-iframe/kup-iframe.js +281 -281
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +184 -184
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +19 -19
- package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +225 -225
- package/dist/collection/components/kup-image/kup-image-declarations.js +16 -16
- package/dist/collection/components/kup-image/kup-image.js +491 -491
- package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -10
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -9
- package/dist/collection/components/kup-image-list/kup-image-list.js +533 -533
- package/dist/collection/components/kup-lazy/kup-lazy-declarations.js +20 -20
- package/dist/collection/components/kup-lazy/kup-lazy.js +430 -430
- package/dist/collection/components/kup-list/kup-list-declarations.js +34 -34
- package/dist/collection/components/kup-list/kup-list-helper.js +121 -121
- package/dist/collection/components/kup-list/kup-list.js +949 -949
- package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +23 -23
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +431 -431
- package/dist/collection/components/kup-nav-bar/kup-nav-bar-declarations.js +21 -21
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +315 -315
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -16
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +864 -864
- package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -10
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +372 -372
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +83 -76
- package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -54
- package/dist/collection/components/kup-planner/kup-planner-state.js +16 -0
- package/dist/collection/components/kup-planner/kup-planner.js +1725 -1352
- package/dist/collection/components/kup-probe/kup-probe.js +358 -358
- package/dist/collection/components/kup-progress-bar/kup-progress-bar-declarations.js +14 -14
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +405 -405
- package/dist/collection/components/kup-qlik/kup-qlik-declarations.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +326 -326
- package/dist/collection/components/kup-radio/kup-radio-declarations.js +12 -12
- package/dist/collection/components/kup-radio/kup-radio.js +398 -398
- package/dist/collection/components/kup-rating/kup-rating-declarations.js +11 -11
- package/dist/collection/components/kup-rating/kup-rating.js +332 -332
- package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -13
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +389 -389
- package/dist/collection/components/kup-spinner/kup-spinner-declarations.js +15 -15
- package/dist/collection/components/kup-spinner/kup-spinner.js +468 -468
- package/dist/collection/components/kup-state/kup-state.js +1 -1
- package/dist/collection/components/kup-state/kup-store.js +1 -1
- package/dist/collection/components/kup-state/mock-store.js +13 -13
- package/dist/collection/components/kup-switch/kup-switch-declarations.js +12 -12
- package/dist/collection/components/kup-switch/kup-switch.js +402 -402
- package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +10 -10
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +443 -443
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +35 -35
- package/dist/collection/components/kup-text-field/kup-text-field.js +1193 -1189
- package/dist/collection/components/kup-time-picker/kup-time-picker-declarations.js +14 -14
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +921 -921
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +43 -43
- package/dist/collection/components/kup-tree/kup-tree-faker.js +305 -305
- package/dist/collection/components/kup-tree/kup-tree-state.js +15 -15
- package/dist/collection/components/kup-tree/kup-tree.js +2479 -2479
- package/dist/collection/f-components/f-button/f-button-declarations.js +17 -17
- package/dist/collection/f-components/f-button/f-button.js +91 -91
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +158 -158
- package/dist/collection/f-components/f-cell/f-cell.js +429 -429
- package/dist/collection/f-components/f-checkbox/f-checkbox-declarations.js +1 -1
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +16 -16
- package/dist/collection/f-components/f-chip/f-chip-declarations.js +15 -15
- package/dist/collection/f-components/f-chip/f-chip.js +101 -101
- package/dist/collection/f-components/f-image/f-image-declarations.js +8 -8
- package/dist/collection/f-components/f-image/f-image.js +100 -100
- package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -5
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -28
- package/dist/collection/f-components/f-paginator/f-paginator.js +86 -86
- package/dist/collection/f-components/f-switch/f-switch-declarations.js +1 -1
- package/dist/collection/f-components/f-switch/f-switch.js +12 -12
- package/dist/collection/f-components/f-text-field/f-text-field-declarations.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +29 -29
- package/dist/collection/f-components/f-text-field/f-text-field.js +151 -151
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +86 -86
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +300 -300
- package/dist/collection/managers/kup-data/kup-data-declarations.js +10 -10
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +165 -165
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -28
- package/dist/collection/managers/kup-data/kup-data.js +499 -499
- package/dist/collection/managers/kup-dates/kup-dates-declarations.js +43 -43
- package/dist/collection/managers/kup-dates/kup-dates.js +654 -654
- package/dist/collection/managers/kup-debug/kup-debug-declarations.js +20 -20
- package/dist/collection/managers/kup-debug/kup-debug.js +670 -670
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position-declarations.js +27 -27
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +244 -244
- package/dist/collection/managers/kup-interact/kup-interact-declarations.js +49 -49
- package/dist/collection/managers/kup-interact/kup-interact.js +397 -397
- package/dist/collection/managers/kup-language/kup-language-declarations.js +211 -211
- package/dist/collection/managers/kup-language/kup-language.js +151 -151
- package/dist/collection/managers/kup-manager/kup-manager-declarations.js +1 -1
- package/dist/collection/managers/kup-manager/kup-manager.js +303 -303
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -13
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -39
- package/dist/collection/managers/kup-math/kup-math.js +413 -413
- package/dist/collection/managers/kup-objects/kup-objects-declarations.js +1 -1
- package/dist/collection/managers/kup-objects/kup-objects.js +387 -387
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +10 -10
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +334 -334
- package/dist/collection/managers/kup-search/kup-search-declarations.js +1 -1
- package/dist/collection/managers/kup-search/kup-search.js +75 -75
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +177 -177
- package/dist/collection/managers/kup-theme/kup-theme.js +715 -715
- package/dist/collection/managers/kup-toolbar/kup-toolbar-declarations.js +9 -9
- package/dist/collection/managers/kup-toolbar/kup-toolbar.js +111 -111
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -1
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +229 -229
- package/dist/collection/types/GenericTypes.js +54 -54
- package/dist/collection/utils/cell-utils.js +156 -156
- package/dist/collection/utils/filters/filters-column-menu.js +360 -360
- package/dist/collection/utils/filters/filters-declarations.js +25 -25
- package/dist/collection/utils/filters/filters-rows.js +238 -238
- package/dist/collection/utils/filters/filters-tree-items.js +117 -117
- package/dist/collection/utils/filters/filters.js +287 -287
- package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +20 -20
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +751 -751
- package/dist/collection/utils/utils.js +84 -80
- package/dist/collection/variables/GenericVariables.js +4 -4
- package/dist/components/kup-accordion.js +355 -355
- package/dist/components/kup-autocomplete2.js +31799 -31760
- package/dist/components/kup-box2.js +1469 -1405
- package/dist/components/kup-calendar.js +9788 -10280
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +325 -325
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dash-list.js +276 -276
- package/dist/components/kup-dash2.js +220 -220
- package/dist/components/kup-dashboard.js +549 -549
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +295 -295
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +7312 -6765
- package/dist/components/kup-family-tree.js +604 -604
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +251 -251
- package/dist/components/kup-iframe.js +249 -249
- package/dist/components/kup-image-list.js +407 -407
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-lazy.js +344 -344
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +461 -461
- package/dist/components/kup-nav-bar.js +284 -284
- package/dist/components/kup-numeric-picker.js +529 -529
- package/dist/components/kup-photo-frame.js +300 -300
- package/dist/components/kup-planner.js +1342 -1189
- package/dist/components/kup-probe.js +399 -399
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +296 -296
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +273 -273
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{GenericVariables-665de00a.js → GenericVariables-6dfdd433.js} +3 -3
- package/dist/esm/{component-120651a0.js → component-e86c51ea.js} +81 -2
- package/dist/esm/{f-button-024f0cfe.js → f-button-c6a69f75.js} +99 -99
- package/dist/esm/{f-button-declarations-b1b4cac4.js → f-button-declarations-fd4965d1.js} +16 -16
- package/dist/esm/{f-cell-90240a8c.js → f-cell-5822ea68.js} +472 -472
- package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-c15911de.js} +23 -23
- package/dist/esm/{f-chip-2238ad43.js → f-chip-f46a03f5.js} +125 -125
- package/dist/esm/{f-image-f2e9bf79.js → f-image-f57832fa.js} +107 -107
- package/dist/esm/{f-paginator-utils-8cb3c023.js → f-paginator-utils-bafc463d.js} +1548 -1548
- package/dist/esm/{f-text-field-d231982c.js → f-text-field-15850e05.js} +172 -172
- package/dist/esm/{f-text-field-mdc-cee583ea.js → f-text-field-mdc-a1b4a919.js} +27 -28
- package/dist/esm/{index-8bd38435.js → index-238342f2.js} +78 -24
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +199 -200
- package/dist/esm/kup-autocomplete_27.entry.js +17546 -17508
- package/dist/esm/kup-box.entry.js +1294 -1232
- package/dist/esm/kup-calendar.entry.js +9557 -10050
- package/dist/esm/kup-cell.entry.js +172 -172
- package/dist/esm/kup-dash-list.entry.js +106 -106
- package/dist/esm/kup-dash_2.entry.js +162 -162
- package/dist/esm/kup-dashboard.entry.js +400 -401
- package/dist/esm/kup-drawer.entry.js +138 -138
- package/dist/esm/kup-echart.entry.js +7145 -6598
- package/dist/esm/kup-family-tree.entry.js +439 -439
- package/dist/esm/kup-iframe.entry.js +94 -94
- package/dist/esm/kup-image-list.entry.js +255 -256
- package/dist/esm/kup-lazy.entry.js +186 -186
- package/dist/esm/kup-magic-box.entry.js +298 -298
- package/dist/esm/{kup-manager-d1da769e.js → kup-manager-89dd9137.js} +7287 -7287
- package/dist/esm/kup-nav-bar.entry.js +130 -130
- package/dist/esm/kup-numeric-picker.entry.js +367 -368
- package/dist/esm/kup-photo-frame.entry.js +144 -144
- package/dist/esm/kup-planner.entry.js +1151 -1009
- package/dist/esm/kup-probe.entry.js +246 -246
- package/dist/esm/kup-qlik.entry.js +138 -138
- package/dist/esm/kup-snackbar.entry.js +116 -116
- package/dist/esm/loader.js +4 -4
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-83435e6c.entry.js → p-01d44efe.entry.js} +1 -1
- package/dist/ketchup/{p-8b46e7ce.js → p-1a8a06de.js} +1 -1
- package/dist/ketchup/{p-eda7f130.js → p-206245c0.js} +1 -1
- package/dist/ketchup/p-4bd63e97.entry.js +25 -0
- package/dist/ketchup/{p-651d89c8.entry.js → p-4da77173.entry.js} +1 -1
- package/dist/ketchup/{p-e1f1e661.entry.js → p-514dcb7d.entry.js} +1 -1
- package/dist/ketchup/{p-37067ee6.entry.js → p-51573263.entry.js} +1 -1
- package/dist/ketchup/{p-9f9b6656.js → p-54248440.js} +1 -1
- package/dist/ketchup/{p-1ad628fb.entry.js → p-5dfa5c49.entry.js} +1 -1
- package/dist/ketchup/{p-10d84b1b.js → p-6507e9eb.js} +7 -6
- package/dist/ketchup/{p-410c102a.js → p-673bb93e.js} +1 -1
- package/dist/ketchup/{p-063d4c27.entry.js → p-688478e9.entry.js} +1 -1
- package/dist/ketchup/p-6a5d95df.entry.js +1 -0
- package/dist/ketchup/p-6ec8629e.js +30 -0
- package/dist/ketchup/{p-a84f1d24.entry.js → p-785e8d74.entry.js} +1 -1
- package/dist/ketchup/{p-43b67de4.entry.js → p-78cc5a2d.entry.js} +1 -1
- package/dist/ketchup/{p-c42b80c1.entry.js → p-799f7f10.entry.js} +1 -1
- package/dist/ketchup/p-7e757c27.entry.js +1 -0
- package/dist/ketchup/p-843253dd.entry.js +1 -0
- package/dist/ketchup/{p-0d7d59c7.entry.js → p-84d3f676.entry.js} +1 -1
- package/dist/ketchup/p-8c1edebd.js +2 -0
- package/dist/ketchup/{p-5f3680f2.js → p-a5f15864.js} +1 -1
- package/dist/ketchup/p-af7202ff.entry.js +1 -0
- package/dist/ketchup/{p-89743989.entry.js → p-ba959bb5.entry.js} +1 -1
- package/dist/ketchup/{p-39a55c47.js → p-c1931214.js} +1 -1
- package/dist/ketchup/{p-3cf64473.js → p-c354c5d0.js} +1 -1
- package/dist/ketchup/p-cd8512d9.entry.js +39 -0
- package/dist/ketchup/{p-3432ebaf.entry.js → p-d4f86197.entry.js} +2 -2
- package/dist/ketchup/{p-163b18b9.entry.js → p-e59c2bc0.entry.js} +1 -1
- package/dist/ketchup/{p-f876125d.entry.js → p-f2fda43b.entry.js} +1 -1
- package/dist/ketchup/p-f4b6aa3f.entry.js +1 -0
- package/dist/ketchup/p-f4f5170c.entry.js +1 -0
- package/dist/ketchup/{p-27a56c87.js → p-fb03f2f5.js} +2 -2
- package/dist/loader/index.d.ts +1 -1
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +20 -20
- package/dist/types/components/kup-accordion/kup-accordion.d.ts +80 -80
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +35 -35
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +119 -119
- package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +9 -9
- package/dist/types/components/kup-badge/kup-badge.d.ts +51 -51
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +114 -113
- package/dist/types/components/kup-box/kup-box-state.d.ts +10 -10
- package/dist/types/components/kup-box/kup-box.d.ts +275 -270
- package/dist/types/components/kup-button/kup-button-declarations.d.ts +24 -24
- package/dist/types/components/kup-button/kup-button.d.ts +111 -111
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +24 -24
- package/dist/types/components/kup-button-list/kup-button-list.d.ts +82 -82
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +70 -70
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +100 -100
- package/dist/types/components/kup-card/box/kup-card-box.d.ts +50 -50
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +39 -39
- package/dist/types/components/kup-card/built-in/kup-card-calendar.d.ts +2 -2
- package/dist/types/components/kup-card/built-in/kup-card-clock.d.ts +2 -2
- package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -3
- package/dist/types/components/kup-card/built-in/kup-card-message-box.d.ts +3 -3
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -2
- package/dist/types/components/kup-card/collapsible/kup-card-collapsible.d.ts +14 -14
- package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +44 -44
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +14 -14
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +236 -236
- package/dist/types/components/kup-card/kup-card-helper.d.ts +27 -27
- package/dist/types/components/kup-card/kup-card.d.ts +159 -159
- package/dist/types/components/kup-card/scalable/kup-card-scalable.d.ts +56 -56
- package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +92 -92
- package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -10
- package/dist/types/components/kup-cell/kup-cell.d.ts +67 -67
- package/dist/types/components/kup-chart/kup-chart-builder.d.ts +7 -7
- package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +135 -135
- package/dist/types/components/kup-chart/kup-chart.d.ts +170 -170
- package/dist/types/components/kup-checkbox/kup-checkbox-declarations.d.ts +17 -17
- package/dist/types/components/kup-checkbox/kup-checkbox.d.ts +85 -85
- package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +22 -22
- package/dist/types/components/kup-chip/kup-chip.d.ts +89 -89
- package/dist/types/components/kup-color-picker/kup-color-picker-declarations.d.ts +15 -15
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +89 -89
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +24 -24
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +95 -95
- package/dist/types/components/kup-dash/kup-dash.d.ts +33 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +22 -22
- package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +61 -61
- package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +80 -80
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +254 -254
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +25 -25
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +36 -36
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +444 -444
- package/dist/types/components/kup-date-picker/kup-date-picker-declarations.d.ts +20 -20
- package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +110 -110
- package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +26 -26
- package/dist/types/components/kup-dialog/kup-dialog.d.ts +77 -77
- package/dist/types/components/kup-drawer/kup-drawer-declarations.d.ts +9 -9
- package/dist/types/components/kup-drawer/kup-drawer.d.ts +74 -74
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +21 -21
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +161 -161
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +62 -62
- package/dist/types/components/kup-echart/kup-echart.d.ts +111 -111
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +38 -38
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +87 -87
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +64 -64
- package/dist/types/components/kup-form/kup-form.d.ts +83 -83
- package/dist/types/components/kup-gauge/kup-gauge-declarations.d.ts +25 -25
- package/dist/types/components/kup-gauge/kup-gauge.d.ts +147 -147
- package/dist/types/components/kup-grid/kup-grid-declarations.d.ts +9 -9
- package/dist/types/components/kup-grid/kup-grid.d.ts +48 -48
- package/dist/types/components/kup-iframe/kup-iframe-declarations.d.ts +9 -9
- package/dist/types/components/kup-iframe/kup-iframe.d.ts +49 -49
- package/dist/types/components/kup-image/canvas/kup-image-canvas-declarations.d.ts +23 -23
- package/dist/types/components/kup-image/canvas/kup-image-canvas-helper.d.ts +2 -2
- package/dist/types/components/kup-image/canvas/kup-image-canvas.d.ts +28 -28
- package/dist/types/components/kup-image/kup-image-declarations.d.ts +19 -19
- package/dist/types/components/kup-image/kup-image.d.ts +103 -103
- package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -14
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -6
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +73 -73
- package/dist/types/components/kup-lazy/kup-lazy-declarations.d.ts +18 -18
- package/dist/types/components/kup-lazy/kup-lazy.d.ts +78 -78
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +48 -48
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +128 -128
- package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +21 -21
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +65 -65
- package/dist/types/components/kup-nav-bar/kup-nav-bar-declarations.d.ts +19 -19
- package/dist/types/components/kup-nav-bar/kup-nav-bar.d.ts +65 -65
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -19
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -121
- package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -9
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -61
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +127 -106
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -6
- package/dist/types/components/kup-planner/kup-planner-state.d.ts +13 -0
- package/dist/types/components/kup-planner/kup-planner.d.ts +266 -212
- package/dist/types/components/kup-probe/kup-probe.d.ts +72 -72
- package/dist/types/components/kup-progress-bar/kup-progress-bar-declarations.d.ts +13 -13
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +69 -69
- package/dist/types/components/kup-qlik/kup-qlik-declarations.d.ts +19 -19
- package/dist/types/components/kup-qlik/kup-qlik.d.ts +100 -100
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +23 -23
- package/dist/types/components/kup-radio/kup-radio.d.ts +80 -80
- package/dist/types/components/kup-rating/kup-rating-declarations.d.ts +14 -14
- package/dist/types/components/kup-rating/kup-rating.d.ts +62 -62
- package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -12
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +84 -84
- package/dist/types/components/kup-spinner/kup-spinner-declarations.d.ts +14 -14
- package/dist/types/components/kup-spinner/kup-spinner.d.ts +79 -79
- package/dist/types/components/kup-state/kup-state.d.ts +3 -3
- package/dist/types/components/kup-state/kup-store.d.ts +4 -4
- package/dist/types/components/kup-state/mock-store.d.ts +8 -8
- package/dist/types/components/kup-switch/kup-switch-declarations.d.ts +15 -15
- package/dist/types/components/kup-switch/kup-switch.d.ts +80 -80
- package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +21 -21
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +77 -77
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +38 -38
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +253 -253
- package/dist/types/components/kup-time-picker/kup-time-picker-declarations.d.ts +17 -17
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +125 -125
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +97 -97
- package/dist/types/components/kup-tree/kup-tree-faker.d.ts +54 -54
- package/dist/types/components/kup-tree/kup-tree-state.d.ts +14 -14
- package/dist/types/components/kup-tree/kup-tree.d.ts +362 -362
- package/dist/types/components.d.ts +98 -2
- package/dist/types/f-components/f-button/f-button-declarations.d.ts +41 -41
- package/dist/types/f-components/f-button/f-button.d.ts +3 -3
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +162 -162
- package/dist/types/f-components/f-cell/f-cell.d.ts +3 -3
- package/dist/types/f-components/f-checkbox/f-checkbox-declarations.d.ts +15 -15
- package/dist/types/f-components/f-checkbox/f-checkbox.d.ts +3 -3
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +29 -29
- package/dist/types/f-components/f-chip/f-chip.d.ts +3 -3
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +36 -36
- package/dist/types/f-components/f-image/f-image.d.ts +3 -3
- package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -22
- package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -2
- package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -3
- package/dist/types/f-components/f-switch/f-switch-declarations.d.ts +14 -14
- package/dist/types/f-components/f-switch/f-switch.d.ts +3 -3
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +42 -42
- package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +6 -6
- package/dist/types/f-components/f-text-field/f-text-field.d.ts +3 -3
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +31 -31
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +39 -39
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +173 -173
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +44 -44
- package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -14
- package/dist/types/managers/kup-data/kup-data.d.ts +86 -86
- package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +39 -39
- package/dist/types/managers/kup-dates/kup-dates.d.ts +207 -207
- package/dist/types/managers/kup-debug/kup-debug-declarations.d.ts +38 -38
- package/dist/types/managers/kup-debug/kup-debug.d.ts +95 -95
- package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +50 -50
- package/dist/types/managers/kup-dynamic-position/kup-dynamic-position.d.ts +61 -61
- package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +128 -128
- package/dist/types/managers/kup-interact/kup-interact.d.ts +105 -105
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +225 -225
- package/dist/types/managers/kup-language/kup-language.d.ts +52 -52
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +162 -162
- package/dist/types/managers/kup-manager/kup-manager.d.ts +95 -95
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +33 -33
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -17
- package/dist/types/managers/kup-math/kup-math.d.ts +147 -146
- package/dist/types/managers/kup-objects/kup-objects-declarations.d.ts +15 -15
- package/dist/types/managers/kup-objects/kup-objects.d.ts +210 -210
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +28 -28
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +62 -62
- package/dist/types/managers/kup-search/kup-search-declarations.d.ts +7 -7
- package/dist/types/managers/kup-search/kup-search.d.ts +20 -20
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +185 -185
- package/dist/types/managers/kup-theme/kup-theme.d.ts +127 -127
- package/dist/types/managers/kup-toolbar/kup-toolbar-declarations.d.ts +8 -8
- package/dist/types/managers/kup-toolbar/kup-toolbar.d.ts +39 -39
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -8
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -51
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/types/GenericTypes.d.ts +110 -110
- package/dist/types/utils/cell-utils.d.ts +10 -10
- package/dist/types/utils/filters/filters-column-menu.d.ts +96 -96
- package/dist/types/utils/filters/filters-declarations.d.ts +39 -39
- package/dist/types/utils/filters/filters-rows.d.ts +30 -30
- package/dist/types/utils/filters/filters-tree-items.d.ts +19 -19
- package/dist/types/utils/filters/filters.d.ts +72 -72
- package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +19 -19
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +142 -142
- package/dist/types/utils/utils.d.ts +37 -35
- package/dist/types/variables/GenericVariables.d.ts +4 -4
- package/package.json +21 -16
- package/dist/cjs/tslib.es6-386654de.js +0 -87
- package/dist/esm/tslib.es6-8c2af864.js +0 -82
- package/dist/ketchup/p-0bcda0e2.entry.js +0 -1
- package/dist/ketchup/p-33aff1ca.entry.js +0 -25
- package/dist/ketchup/p-35b29b22.entry.js +0 -1
- package/dist/ketchup/p-36dac88e.js +0 -30
- package/dist/ketchup/p-489d55ff.entry.js +0 -39
- package/dist/ketchup/p-73c8d651.entry.js +0 -1
- package/dist/ketchup/p-7f59211b.js +0 -1
- package/dist/ketchup/p-9dcfbb1e.js +0 -2
- package/dist/ketchup/p-b2fd2dbf.entry.js +0 -1
- package/dist/ketchup/p-d1b050d0.entry.js +0 -27
- package/dist/ketchup/p-d6ea709e.entry.js +0 -1
- /package/dist/ketchup/{p-6c77a36c.js → p-0fd98ab4.js} +0 -0
- /package/dist/ketchup/{p-97e8ea42.js → p-ad2e21d2.js} +0 -0
|
@@ -1,81 +1,88 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host, getAssetPath } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Props of the kup-gantt component.
|
|
6
|
-
* Used to export every prop in an object.
|
|
7
|
-
*/
|
|
8
|
-
var KupPlannerProps;
|
|
9
|
-
(function (KupPlannerProps) {
|
|
10
|
-
KupPlannerProps["customStyle"] = "Custom style of the component.";
|
|
11
|
-
KupPlannerProps["data"] = "Dataset containg the tasks list";
|
|
12
|
-
KupPlannerProps["detailData"] = "Dataset containg the details list";
|
|
13
|
-
KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
|
|
14
|
-
KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
|
|
15
|
-
KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
|
|
16
|
-
KupPlannerProps["
|
|
17
|
-
KupPlannerProps["
|
|
18
|
-
KupPlannerProps["
|
|
19
|
-
KupPlannerProps["
|
|
20
|
-
KupPlannerProps["
|
|
21
|
-
KupPlannerProps["
|
|
22
|
-
KupPlannerProps["
|
|
23
|
-
KupPlannerProps["
|
|
24
|
-
KupPlannerProps["
|
|
25
|
-
KupPlannerProps["
|
|
26
|
-
KupPlannerProps["
|
|
27
|
-
KupPlannerProps["
|
|
28
|
-
KupPlannerProps["
|
|
29
|
-
KupPlannerProps["
|
|
30
|
-
KupPlannerProps["
|
|
31
|
-
KupPlannerProps["
|
|
32
|
-
KupPlannerProps["
|
|
33
|
-
KupPlannerProps["
|
|
34
|
-
KupPlannerProps["
|
|
35
|
-
KupPlannerProps["
|
|
36
|
-
KupPlannerProps["
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
2
|
+
import { ay as createCommonjsModule, az as commonjsGlobal, k as kupManagerInstance, aA as KupDatesFormats, af as getCellValueForDisplay, g as getProps, s as setProps, _ as FTextFieldMDC, c as componentWrapperId, ah as FTextField, a as KupThemeIconValues, $ as KupLanguageSearch, d as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, h as defineCustomElement$6, i as defineCustomElement$7, j as defineCustomElement$8, l as defineCustomElement$9, m as defineCustomElement$a, n as defineCustomElement$b, o as defineCustomElement$c, p as defineCustomElement$d, q as defineCustomElement$e, r as defineCustomElement$f, t as defineCustomElement$g, u as defineCustomElement$h, v as defineCustomElement$i, w as defineCustomElement$j, x as defineCustomElement$k, y as defineCustomElement$l, z as defineCustomElement$m, A as defineCustomElement$n, B as defineCustomElement$o, C as defineCustomElement$p, D as defineCustomElement$q, E as defineCustomElement$r, G as defineCustomElement$s } from './kup-autocomplete2.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props of the kup-gantt component.
|
|
6
|
+
* Used to export every prop in an object.
|
|
7
|
+
*/
|
|
8
|
+
var KupPlannerProps;
|
|
9
|
+
(function (KupPlannerProps) {
|
|
10
|
+
KupPlannerProps["customStyle"] = "Custom style of the component.";
|
|
11
|
+
KupPlannerProps["data"] = "Dataset containg the tasks list";
|
|
12
|
+
KupPlannerProps["detailData"] = "Dataset containg the details list";
|
|
13
|
+
KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
|
|
14
|
+
KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
|
|
15
|
+
KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
|
|
16
|
+
KupPlannerProps["detailFilter"] = "Sets the detail's filter.";
|
|
17
|
+
KupPlannerProps["detailHeight"] = "Height for detail gantt";
|
|
18
|
+
KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
|
|
19
|
+
KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
|
|
20
|
+
KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
|
|
21
|
+
KupPlannerProps["detailInitialScrollX"] = "Sets the initial scroll X for the detail.";
|
|
22
|
+
KupPlannerProps["detailInitialScrollY"] = "Sets the initial scroll Y for the detail.";
|
|
23
|
+
KupPlannerProps["listCellWidth"] = "Total size of the cells inside to the left box, near the gantt";
|
|
24
|
+
KupPlannerProps["maxWidth"] = "Max width for component";
|
|
25
|
+
KupPlannerProps["phaseColorCol"] = "Column containing the phase color in hex format";
|
|
26
|
+
KupPlannerProps["phaseColumns"] = "Columns containing informations displayed in the left box ,near the gantt of phases";
|
|
27
|
+
KupPlannerProps["phaseColParDep"] = "Column containing the name of the parent phases";
|
|
28
|
+
KupPlannerProps["phaseDates"] = "Columns containing phase duration, from (firstDate) to (secondDate)";
|
|
29
|
+
KupPlannerProps["phaseIdCol"] = "Column containing unique phase identifier";
|
|
30
|
+
KupPlannerProps["phaseNameCol"] = "Column containing phase name displayed";
|
|
31
|
+
KupPlannerProps["phasePrevDates"] = "Columns containing forecast phase duration, from (firstDate) to (secondDate)";
|
|
32
|
+
KupPlannerProps["readOnly"] = "When true, the two gantts are not interactable.";
|
|
33
|
+
KupPlannerProps["showSecondaryDates"] = "Enable/disable display of secondary dates";
|
|
34
|
+
KupPlannerProps["taskColumns"] = "Columns containing informations displayed in the left box, near the gantt";
|
|
35
|
+
KupPlannerProps["taskDates"] = "Columns containing task duration, from (firstDate) to (secondDate)";
|
|
36
|
+
KupPlannerProps["taskFilter"] = "Sets the task's filter.";
|
|
37
|
+
KupPlannerProps["taskHeight"] = "Height for main gantt";
|
|
38
|
+
KupPlannerProps["taskIdCol"] = "Column containing unique task identifier";
|
|
39
|
+
KupPlannerProps["taskNameCol"] = "Column containing task name displayed";
|
|
40
|
+
KupPlannerProps["taskPrevDates"] = "Columns containing forecast task duration, from (firstDate) to (secondDate)";
|
|
41
|
+
KupPlannerProps["taskInitialScrollX"] = "Sets the initial scroll X for the task.";
|
|
42
|
+
KupPlannerProps["taskInitialScrollY"] = "Sets the initial scroll Y for the task.";
|
|
43
|
+
KupPlannerProps["titleMess"] = "Message displayed on top";
|
|
44
|
+
})(KupPlannerProps || (KupPlannerProps = {}));
|
|
45
|
+
var KupPlannerTaskAction;
|
|
46
|
+
(function (KupPlannerTaskAction) {
|
|
47
|
+
KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
|
|
48
|
+
KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
|
|
49
|
+
KupPlannerTaskAction["onClick"] = "onClick";
|
|
50
|
+
KupPlannerTaskAction["onResize"] = "onResize";
|
|
51
|
+
KupPlannerTaskAction["onRightClick"] = "onRightClick";
|
|
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',
|
|
79
86
|
};
|
|
80
87
|
|
|
81
88
|
/**
|
|
@@ -8949,25 +8956,6 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
8949
8956
|
}
|
|
8950
8957
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8951
8958
|
}
|
|
8952
|
-
|
|
8953
|
-
var ViewMode;
|
|
8954
|
-
(function (ViewMode) {
|
|
8955
|
-
ViewMode["Hour"] = "Hour";
|
|
8956
|
-
ViewMode["QuarterDay"] = "Quarter Day";
|
|
8957
|
-
ViewMode["HalfDay"] = "Half Day";
|
|
8958
|
-
ViewMode["Day"] = "Day";
|
|
8959
|
-
ViewMode["Week"] = "Week";
|
|
8960
|
-
ViewMode["Month"] = "Month";
|
|
8961
|
-
ViewMode["Year"] = "Year";
|
|
8962
|
-
})(ViewMode || (ViewMode = {}));
|
|
8963
|
-
|
|
8964
|
-
var TimeUnit;
|
|
8965
|
-
(function (TimeUnit) {
|
|
8966
|
-
TimeUnit["DAY"] = "days";
|
|
8967
|
-
TimeUnit["WEEK"] = "weeks";
|
|
8968
|
-
TimeUnit["MONTH"] = "months";
|
|
8969
|
-
TimeUnit["YEAR"] = "YEAR";
|
|
8970
|
-
})(TimeUnit || (TimeUnit = {}));
|
|
8971
8959
|
var parseToDayStart = function parseToDayStart(ymd) {
|
|
8972
8960
|
return luxon.DateTime.fromISO(ymd).toJSDate();
|
|
8973
8961
|
};
|
|
@@ -8996,211 +8984,6 @@ function validDates(startDate, endDate, _name) {
|
|
|
8996
8984
|
};
|
|
8997
8985
|
}
|
|
8998
8986
|
|
|
8999
|
-
var MAIN_GANTT_ID = "main";
|
|
9000
|
-
var SECONDARY_GANTT_ID = "secondary";
|
|
9001
|
-
var toViewMode = function toViewMode(timeUnit) {
|
|
9002
|
-
switch (timeUnit) {
|
|
9003
|
-
case TimeUnit.DAY:
|
|
9004
|
-
return ViewMode.Day;
|
|
9005
|
-
case TimeUnit.WEEK:
|
|
9006
|
-
return ViewMode.Week;
|
|
9007
|
-
case TimeUnit.MONTH:
|
|
9008
|
-
return ViewMode.Month;
|
|
9009
|
-
case TimeUnit.YEAR:
|
|
9010
|
-
return ViewMode.Year;
|
|
9011
|
-
}
|
|
9012
|
-
};
|
|
9013
|
-
var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
|
|
9014
|
-
switch (timeUnit) {
|
|
9015
|
-
case TimeUnit.YEAR:
|
|
9016
|
-
return 60 * 2;
|
|
9017
|
-
default:
|
|
9018
|
-
return 60;
|
|
9019
|
-
}
|
|
9020
|
-
};
|
|
9021
|
-
var convertPhaseToTask = function convertPhaseToTask(item) {
|
|
9022
|
-
var mapPhase = function mapPhase(_ref) {
|
|
9023
|
-
var phaseStart = _ref.startDate,
|
|
9024
|
-
phaseEnd = _ref.endDate,
|
|
9025
|
-
secondaryStartDate = _ref.secondaryStartDate,
|
|
9026
|
-
secondaryEndDate = _ref.secondaryEndDate,
|
|
9027
|
-
phaseName = _ref.name,
|
|
9028
|
-
phaseId = _ref.id,
|
|
9029
|
-
color = _ref.color,
|
|
9030
|
-
selectedColor = _ref.selectedColor,
|
|
9031
|
-
dependencies = _ref.dependencies,
|
|
9032
|
-
icon = _ref.icon;
|
|
9033
|
-
var _validDates = validDates(phaseStart, phaseEnd),
|
|
9034
|
-
start = _validDates.start,
|
|
9035
|
-
end = _validDates.end;
|
|
9036
|
-
var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
|
|
9037
|
-
phaseStart2 = _validDates2.start,
|
|
9038
|
-
phaseEnd2 = _validDates2.end;
|
|
9039
|
-
return {
|
|
9040
|
-
start: start,
|
|
9041
|
-
end: end,
|
|
9042
|
-
secondaryStart: phaseStart2,
|
|
9043
|
-
secondaryEnd: phaseEnd2,
|
|
9044
|
-
name: phaseName,
|
|
9045
|
-
valuesToShow: item.valuesToShow,
|
|
9046
|
-
id: phaseId,
|
|
9047
|
-
type: "task",
|
|
9048
|
-
progress: 100,
|
|
9049
|
-
dependencies: dependencies,
|
|
9050
|
-
styles: color ? {
|
|
9051
|
-
backgroundColor: color,
|
|
9052
|
-
progressColor: color,
|
|
9053
|
-
backgroundSelectedColor: selectedColor,
|
|
9054
|
-
progressSelectedColor: selectedColor
|
|
9055
|
-
} : {},
|
|
9056
|
-
icon: icon
|
|
9057
|
-
};
|
|
9058
|
-
};
|
|
9059
|
-
return mapPhase(item);
|
|
9060
|
-
};
|
|
9061
|
-
var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
|
|
9062
|
-
var id = item.id,
|
|
9063
|
-
name = item.name,
|
|
9064
|
-
schedule = item.schedule;
|
|
9065
|
-
var getDatesForTask = function getDatesForTask(item) {
|
|
9066
|
-
var start = mainGanttStartDate != null ? mainGanttStartDate : "";
|
|
9067
|
-
var end = mainGanttEndDate != null ? mainGanttEndDate : "";
|
|
9068
|
-
for (var i = 0; i < item.schedule.length; i++) {
|
|
9069
|
-
var lstart = item.schedule[i].startDate;
|
|
9070
|
-
var lend = item.schedule[i].endDate;
|
|
9071
|
-
if (!start || lstart.localeCompare(start) < 0) {
|
|
9072
|
-
start = lstart;
|
|
9073
|
-
}
|
|
9074
|
-
if (!end || lend.localeCompare(end) > 0) {
|
|
9075
|
-
end = lend;
|
|
9076
|
-
}
|
|
9077
|
-
}
|
|
9078
|
-
return validDates(start, end);
|
|
9079
|
-
};
|
|
9080
|
-
var _getDatesForTask = getDatesForTask(item),
|
|
9081
|
-
start = _getDatesForTask.start,
|
|
9082
|
-
end = _getDatesForTask.end;
|
|
9083
|
-
var convertToFrame = function convertToFrame(x) {
|
|
9084
|
-
var startDate = x.startDate,
|
|
9085
|
-
endDate = x.endDate,
|
|
9086
|
-
color = x.color,
|
|
9087
|
-
selectedColor = x.selectedColor,
|
|
9088
|
-
icon = x.icon;
|
|
9089
|
-
var _validDates3 = validDates(startDate, endDate),
|
|
9090
|
-
start = _validDates3.start,
|
|
9091
|
-
end = _validDates3.end;
|
|
9092
|
-
return {
|
|
9093
|
-
start: start,
|
|
9094
|
-
end: end,
|
|
9095
|
-
backgroundColor: color != null ? color : "0xffffff",
|
|
9096
|
-
backgroundSelectedColor: selectedColor != null ? selectedColor : color,
|
|
9097
|
-
icon: icon
|
|
9098
|
-
};
|
|
9099
|
-
};
|
|
9100
|
-
var defaultColor = "#595959";
|
|
9101
|
-
return {
|
|
9102
|
-
id: id,
|
|
9103
|
-
type: "timeline",
|
|
9104
|
-
timeline: schedule.map(convertToFrame),
|
|
9105
|
-
name: name,
|
|
9106
|
-
valuesToShow: item.valuesToShow,
|
|
9107
|
-
start: start,
|
|
9108
|
-
end: end,
|
|
9109
|
-
progress: 100,
|
|
9110
|
-
styles: {
|
|
9111
|
-
backgroundColor: defaultColor,
|
|
9112
|
-
progressColor: defaultColor,
|
|
9113
|
-
backgroundSelectedColor: defaultColor,
|
|
9114
|
-
progressSelectedColor: defaultColor
|
|
9115
|
-
}
|
|
9116
|
-
};
|
|
9117
|
-
};
|
|
9118
|
-
var isDetail = function isDetail(row) {
|
|
9119
|
-
return row && row.schedule && row.schedule.length !== 0;
|
|
9120
|
-
};
|
|
9121
|
-
var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
|
|
9122
|
-
if (!isDetail(item)) {
|
|
9123
|
-
var _row$phases;
|
|
9124
|
-
var row = item;
|
|
9125
|
-
var _validDates4 = validDates(row.startDate, row.endDate),
|
|
9126
|
-
start = _validDates4.start,
|
|
9127
|
-
end = _validDates4.end;
|
|
9128
|
-
var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
|
|
9129
|
-
start2 = _validDates5.start,
|
|
9130
|
-
end2 = _validDates5.end;
|
|
9131
|
-
var mainTask = {
|
|
9132
|
-
start: start,
|
|
9133
|
-
end: end,
|
|
9134
|
-
id: row.id,
|
|
9135
|
-
name: row.name,
|
|
9136
|
-
type: row.type,
|
|
9137
|
-
valuesToShow: row.valuesToShow,
|
|
9138
|
-
secondaryStart: start2,
|
|
9139
|
-
secondaryEnd: end2,
|
|
9140
|
-
progress: 100,
|
|
9141
|
-
isDisabled: false,
|
|
9142
|
-
hideChildren: false,
|
|
9143
|
-
icon: row.icon
|
|
9144
|
-
};
|
|
9145
|
-
var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
|
|
9146
|
-
return [mainTask].concat(children1);
|
|
9147
|
-
} else {
|
|
9148
|
-
var _row = item;
|
|
9149
|
-
return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
|
|
9150
|
-
}
|
|
9151
|
-
};
|
|
9152
|
-
var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
|
|
9153
|
-
var id = _ref2.id,
|
|
9154
|
-
start = _ref2.start,
|
|
9155
|
-
end = _ref2.end;
|
|
9156
|
-
return projects.map(function (project) {
|
|
9157
|
-
return project.id === id ? withNewDates(project, start, end) : project;
|
|
9158
|
-
});
|
|
9159
|
-
};
|
|
9160
|
-
var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
|
|
9161
|
-
var id = _ref3.id,
|
|
9162
|
-
start = _ref3.start,
|
|
9163
|
-
end = _ref3.end;
|
|
9164
|
-
if (phases) {
|
|
9165
|
-
return phases.map(function (phase) {
|
|
9166
|
-
return phase.id === id ? withNewDates(phase, start, end) : phase;
|
|
9167
|
-
});
|
|
9168
|
-
}
|
|
9169
|
-
return undefined;
|
|
9170
|
-
};
|
|
9171
|
-
var withNewDates = function withNewDates(p, start, end) {
|
|
9172
|
-
var startDate = formatToIsoDate(start);
|
|
9173
|
-
var endDate = formatToIsoDate(end);
|
|
9174
|
-
var extra = {
|
|
9175
|
-
startDate: startDate,
|
|
9176
|
-
endDate: endDate
|
|
9177
|
-
};
|
|
9178
|
-
return _extends({}, p, extra);
|
|
9179
|
-
};
|
|
9180
|
-
var getProjectById = function getProjectById(id, items) {
|
|
9181
|
-
for (var i = 0; i < items.length; i++) {
|
|
9182
|
-
if (items[i].id === id) {
|
|
9183
|
-
return items[i];
|
|
9184
|
-
}
|
|
9185
|
-
}
|
|
9186
|
-
return undefined;
|
|
9187
|
-
};
|
|
9188
|
-
var getPhaseById = function getPhaseById(id, items) {
|
|
9189
|
-
for (var i = 0; i < items.length; i++) {
|
|
9190
|
-
if (isDetail(items[i])) {
|
|
9191
|
-
continue;
|
|
9192
|
-
}
|
|
9193
|
-
var item = items[i];
|
|
9194
|
-
if (!item.phases) {
|
|
9195
|
-
continue;
|
|
9196
|
-
}
|
|
9197
|
-
for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
|
|
9198
|
-
return item.phases[j];
|
|
9199
|
-
}
|
|
9200
|
-
}
|
|
9201
|
-
return undefined;
|
|
9202
|
-
};
|
|
9203
|
-
|
|
9204
8987
|
var intlDTCache = {};
|
|
9205
8988
|
var getCachedDateTimeFormat = function getCachedDateTimeFormat(locString, opts) {
|
|
9206
8989
|
if (opts === void 0) {
|
|
@@ -9248,9 +9031,9 @@ var ganttDateRangeFromTask = function ganttDateRangeFromTask(tasks, viewMode, pr
|
|
|
9248
9031
|
return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates);
|
|
9249
9032
|
};
|
|
9250
9033
|
var calculateDisplayedDateRange = function calculateDisplayedDateRange(mainGanttItems, timeUnit, mainGanttDoubleView, secondaryGanttItems, preStepsCount) {
|
|
9251
|
-
var dates = ganttDateRangeFromGanttTask(mainGanttItems,
|
|
9034
|
+
var dates = ganttDateRangeFromGanttTask(mainGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
|
|
9252
9035
|
if (secondaryGanttItems) {
|
|
9253
|
-
var dates2 = ganttDateRangeFromDetail(secondaryGanttItems,
|
|
9036
|
+
var dates2 = ganttDateRangeFromDetail(secondaryGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
|
|
9254
9037
|
if (dates2[0] < dates[0]) {
|
|
9255
9038
|
dates[0] = dates2[0];
|
|
9256
9039
|
}
|
|
@@ -9325,48 +9108,30 @@ var ganttDateRangeGeneric = function ganttDateRangeGeneric(dates, viewMode, preS
|
|
|
9325
9108
|
return [newStartDate, newEndDate];
|
|
9326
9109
|
}
|
|
9327
9110
|
switch (viewMode) {
|
|
9328
|
-
case
|
|
9111
|
+
case "year":
|
|
9329
9112
|
newStartDate = addToDate(newStartDate, -1, "year");
|
|
9330
9113
|
newStartDate = startOfDate(newStartDate, "year");
|
|
9331
9114
|
newEndDate = addToDate(newEndDate, 1, "year");
|
|
9332
9115
|
newEndDate = startOfDate(newEndDate, "year");
|
|
9333
9116
|
break;
|
|
9334
|
-
case
|
|
9117
|
+
case "month":
|
|
9335
9118
|
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "month");
|
|
9336
9119
|
newStartDate = startOfDate(newStartDate, "month");
|
|
9337
9120
|
newEndDate = addToDate(newEndDate, 1, "year");
|
|
9338
9121
|
newEndDate = startOfDate(newEndDate, "year");
|
|
9339
9122
|
break;
|
|
9340
|
-
case
|
|
9123
|
+
case "week":
|
|
9341
9124
|
newStartDate = startOfDate(newStartDate, "day");
|
|
9342
9125
|
newStartDate = addToDate(getMonday(newStartDate), -7 * preStepsCount, "day");
|
|
9343
9126
|
newEndDate = startOfDate(newEndDate, "day");
|
|
9344
9127
|
newEndDate = addToDate(newEndDate, 1.5, "month");
|
|
9345
9128
|
break;
|
|
9346
|
-
case
|
|
9129
|
+
case "day":
|
|
9347
9130
|
newStartDate = startOfDate(newStartDate, "day");
|
|
9348
9131
|
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9349
9132
|
newEndDate = startOfDate(newEndDate, "day");
|
|
9350
9133
|
newEndDate = addToDate(newEndDate, 19, "day");
|
|
9351
9134
|
break;
|
|
9352
|
-
case ViewMode.QuarterDay:
|
|
9353
|
-
newStartDate = startOfDate(newStartDate, "day");
|
|
9354
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9355
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9356
|
-
newEndDate = addToDate(newEndDate, 66, "hour");
|
|
9357
|
-
break;
|
|
9358
|
-
case ViewMode.HalfDay:
|
|
9359
|
-
newStartDate = startOfDate(newStartDate, "day");
|
|
9360
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9361
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9362
|
-
newEndDate = addToDate(newEndDate, 108, "hour");
|
|
9363
|
-
break;
|
|
9364
|
-
case ViewMode.Hour:
|
|
9365
|
-
newStartDate = startOfDate(newStartDate, "hour");
|
|
9366
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "hour");
|
|
9367
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9368
|
-
newEndDate = addToDate(newEndDate, 1, "day");
|
|
9369
|
-
break;
|
|
9370
9135
|
}
|
|
9371
9136
|
return [newStartDate, newEndDate];
|
|
9372
9137
|
};
|
|
@@ -9375,27 +9140,18 @@ var seedDates = function seedDates(startDate, endDate, viewMode) {
|
|
|
9375
9140
|
var dates = [currentDate];
|
|
9376
9141
|
while (currentDate < endDate) {
|
|
9377
9142
|
switch (viewMode) {
|
|
9378
|
-
case
|
|
9143
|
+
case "year":
|
|
9379
9144
|
currentDate = addToDate(currentDate, 1, "year");
|
|
9380
9145
|
break;
|
|
9381
|
-
case
|
|
9146
|
+
case "month":
|
|
9382
9147
|
currentDate = addToDate(currentDate, 1, "month");
|
|
9383
9148
|
break;
|
|
9384
|
-
case
|
|
9149
|
+
case "week":
|
|
9385
9150
|
currentDate = addToDate(currentDate, 7, "day");
|
|
9386
9151
|
break;
|
|
9387
|
-
case
|
|
9152
|
+
case "day":
|
|
9388
9153
|
currentDate = addToDate(currentDate, 1, "day");
|
|
9389
9154
|
break;
|
|
9390
|
-
case ViewMode.HalfDay:
|
|
9391
|
-
currentDate = addToDate(currentDate, 12, "hour");
|
|
9392
|
-
break;
|
|
9393
|
-
case ViewMode.QuarterDay:
|
|
9394
|
-
currentDate = addToDate(currentDate, 6, "hour");
|
|
9395
|
-
break;
|
|
9396
|
-
case ViewMode.Hour:
|
|
9397
|
-
currentDate = addToDate(currentDate, 1, "hour");
|
|
9398
|
-
break;
|
|
9399
9155
|
}
|
|
9400
9156
|
dates.push(currentDate);
|
|
9401
9157
|
}
|
|
@@ -9697,6 +9453,15 @@ var VerticalScroll = function VerticalScroll(_ref) {
|
|
|
9697
9453
|
rtl = _ref.rtl,
|
|
9698
9454
|
onScroll = _ref.onScroll;
|
|
9699
9455
|
var scrollRef = react.useRef(null);
|
|
9456
|
+
react.useEffect(function () {
|
|
9457
|
+
if (scrollRef.current) {
|
|
9458
|
+
var wrap = scrollRef.current;
|
|
9459
|
+
var setScrollTop = function setScrollTop() {
|
|
9460
|
+
wrap.scrollTop = scroll;
|
|
9461
|
+
};
|
|
9462
|
+
setTimeout(setScrollTop, 250);
|
|
9463
|
+
}
|
|
9464
|
+
}, []);
|
|
9700
9465
|
react.useEffect(function () {
|
|
9701
9466
|
if (scrollRef.current) {
|
|
9702
9467
|
scrollRef.current.scrollTop = scroll;
|
|
@@ -9739,12 +9504,12 @@ var TaskList = function TaskList(_ref) {
|
|
|
9739
9504
|
TaskListHeader = _ref.TaskListHeader,
|
|
9740
9505
|
TaskListTable = _ref.TaskListTable,
|
|
9741
9506
|
filter = _ref.filter;
|
|
9742
|
-
var horizontalContainerRef = react.
|
|
9507
|
+
var horizontalContainerRef = react.createRef();
|
|
9743
9508
|
react.useEffect(function () {
|
|
9744
9509
|
if (horizontalContainerRef.current) {
|
|
9745
9510
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
9746
9511
|
}
|
|
9747
|
-
}, [scrollY]);
|
|
9512
|
+
}, [horizontalContainerRef, scrollY]);
|
|
9748
9513
|
var headerProps = {
|
|
9749
9514
|
headerHeight: headerHeight,
|
|
9750
9515
|
fontFamily: fontFamily,
|
|
@@ -9900,10 +9665,9 @@ var SinglePartOfCalendar = function SinglePartOfCalendar(_ref) {
|
|
|
9900
9665
|
};
|
|
9901
9666
|
|
|
9902
9667
|
var Calendar = function Calendar(_ref) {
|
|
9903
|
-
var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d
|
|
9668
|
+
var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d;
|
|
9904
9669
|
var dateSetup = _ref.dateSetup,
|
|
9905
9670
|
locale = _ref.locale,
|
|
9906
|
-
viewMode = _ref.viewMode,
|
|
9907
9671
|
rtl = _ref.rtl,
|
|
9908
9672
|
headerHeight = _ref.headerHeight,
|
|
9909
9673
|
columnWidth = _ref.columnWidth,
|
|
@@ -9913,15 +9677,13 @@ var Calendar = function Calendar(_ref) {
|
|
|
9913
9677
|
_ref$singleLineHeader = _ref.singleLineHeader,
|
|
9914
9678
|
singleLineHeader = _ref$singleLineHeader === void 0 ? false : _ref$singleLineHeader,
|
|
9915
9679
|
currentDateIndicator = _ref.currentDateIndicator;
|
|
9916
|
-
var simplifiedHeader = singleLineHeader && dateSetup.viewMode !==
|
|
9680
|
+
var simplifiedHeader = singleLineHeader && dateSetup.viewMode !== "year";
|
|
9917
9681
|
var TopCal = simplifiedHeader ? SinglePartOfCalendar : TopPartOfCalendar;
|
|
9918
9682
|
var formatYear = (_dateTimeFormatters$y = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.year) != null ? _dateTimeFormatters$y : defaultDateTimeFormatters.year;
|
|
9919
9683
|
var formatMonth = (_dateTimeFormatters$m = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.month) != null ? _dateTimeFormatters$m : defaultDateTimeFormatters.month;
|
|
9920
9684
|
var formatMonthAndYear = (_dateTimeFormatters$m2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.monthAndYear) != null ? _dateTimeFormatters$m2 : defaultDateTimeFormatters.monthAndYear;
|
|
9921
9685
|
var formatWeek = (_dateTimeFormatters$w = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.week) != null ? _dateTimeFormatters$w : defaultDateTimeFormatters.week;
|
|
9922
9686
|
var formatDay = (_dateTimeFormatters$d = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.day) != null ? _dateTimeFormatters$d : defaultDateTimeFormatters.day;
|
|
9923
|
-
var formatHour = (_dateTimeFormatters$h = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.hour) != null ? _dateTimeFormatters$h : defaultDateTimeFormatters.hour;
|
|
9924
|
-
var formatDayAndMonth = (_dateTimeFormatters$d2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.dayAndMonth) != null ? _dateTimeFormatters$d2 : defaultDateTimeFormatters.dayAndMonth;
|
|
9925
9687
|
var getCalendarValuesForYear = function getCalendarValuesForYear() {
|
|
9926
9688
|
var topValues = [];
|
|
9927
9689
|
var bottomValues = [];
|
|
@@ -10056,70 +9818,12 @@ var Calendar = function Calendar(_ref) {
|
|
|
10056
9818
|
}
|
|
10057
9819
|
return [topValues, bottomValues];
|
|
10058
9820
|
};
|
|
10059
|
-
var
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
var dates = dateSetup.dates;
|
|
10065
|
-
for (var i = 0; i < dates.length; i++) {
|
|
10066
|
-
var date = dates[i];
|
|
10067
|
-
var bottomValue = formatHour(date, locale);
|
|
10068
|
-
bottomValues.push(react.createElement("text", {
|
|
10069
|
-
key: date.getTime(),
|
|
10070
|
-
y: headerHeight * 0.8,
|
|
10071
|
-
x: columnWidth * (i + +rtl),
|
|
10072
|
-
className: styles$5.calendarBottomText,
|
|
10073
|
-
fontFamily: fontFamily
|
|
10074
|
-
}, bottomValue));
|
|
10075
|
-
if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
|
|
10076
|
-
var topValue = formatDayAndMonth(date, locale);
|
|
10077
|
-
topValues.push(react.createElement(TopCal, {
|
|
10078
|
-
key: date.toISOString(),
|
|
10079
|
-
value: topValue,
|
|
10080
|
-
x1Line: columnWidth * i + ticks * columnWidth,
|
|
10081
|
-
y1Line: 0,
|
|
10082
|
-
y2Line: topDefaultHeight,
|
|
10083
|
-
xText: columnWidth * i + ticks * columnWidth * 0.5,
|
|
10084
|
-
yText: topDefaultHeight * 0.9
|
|
10085
|
-
}));
|
|
10086
|
-
}
|
|
10087
|
-
}
|
|
10088
|
-
return [topValues, bottomValues];
|
|
9821
|
+
var getters = {
|
|
9822
|
+
year: getCalendarValuesForYear,
|
|
9823
|
+
month: getCalendarValuesForMonth,
|
|
9824
|
+
week: getCalendarValuesForWeek,
|
|
9825
|
+
day: getCalendarValuesForDay
|
|
10089
9826
|
};
|
|
10090
|
-
var getCalendarValuesForHour = function getCalendarValuesForHour() {
|
|
10091
|
-
var topValues = [];
|
|
10092
|
-
var bottomValues = [];
|
|
10093
|
-
var topDefaultHeight = headerHeight * 0.5;
|
|
10094
|
-
var dates = dateSetup.dates;
|
|
10095
|
-
for (var i = 0; i < dates.length; i++) {
|
|
10096
|
-
var date = dates[i];
|
|
10097
|
-
var bottomValue = formatHour(date, locale);
|
|
10098
|
-
bottomValues.push(react.createElement("text", {
|
|
10099
|
-
key: date.getTime(),
|
|
10100
|
-
y: headerHeight * 0.8,
|
|
10101
|
-
x: columnWidth * (i + +rtl),
|
|
10102
|
-
className: styles$5.calendarBottomText,
|
|
10103
|
-
fontFamily: fontFamily
|
|
10104
|
-
}, bottomValue));
|
|
10105
|
-
if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
|
|
10106
|
-
var displayDate = dates[i - 1];
|
|
10107
|
-
var topValue = formatDayAndMonth(date, locale);
|
|
10108
|
-
var topPosition = (date.getHours() - 24) / 2;
|
|
10109
|
-
topValues.push(react.createElement(TopCal, {
|
|
10110
|
-
key: topValue + displayDate.getFullYear(),
|
|
10111
|
-
value: topValue,
|
|
10112
|
-
x1Line: columnWidth * i,
|
|
10113
|
-
y1Line: 0,
|
|
10114
|
-
y2Line: topDefaultHeight,
|
|
10115
|
-
xText: columnWidth * (i + topPosition),
|
|
10116
|
-
yText: topDefaultHeight * 0.9
|
|
10117
|
-
}));
|
|
10118
|
-
}
|
|
10119
|
-
}
|
|
10120
|
-
return [topValues, bottomValues];
|
|
10121
|
-
};
|
|
10122
|
-
var getters = (_getters = {}, _getters[ViewMode.Year] = getCalendarValuesForYear, _getters[ViewMode.Month] = getCalendarValuesForMonth, _getters[ViewMode.Week] = getCalendarValuesForWeek, _getters[ViewMode.Day] = getCalendarValuesForDay, _getters[ViewMode.QuarterDay] = getCalendarValuesForPartOfDay, _getters[ViewMode.HalfDay] = getCalendarValuesForPartOfDay, _getters[ViewMode.Hour] = getCalendarValuesForHour, _getters);
|
|
10123
9827
|
var _getters$dateSetup$vi = getters[dateSetup.viewMode](),
|
|
10124
9828
|
topValues = _getters$dateSetup$vi[0],
|
|
10125
9829
|
bottomValues = _getters$dateSetup$vi[1];
|
|
@@ -10988,6 +10692,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
10988
10692
|
showSecondaryDates = _ref$showSecondaryDat === void 0 ? false : _ref$showSecondaryDat,
|
|
10989
10693
|
currentDateIndicator = _ref.currentDateIndicator,
|
|
10990
10694
|
projection = _ref.projection,
|
|
10695
|
+
readOnly = _ref.readOnly,
|
|
10991
10696
|
setGanttEvent = _ref.setGanttEvent,
|
|
10992
10697
|
setFailedTask = _ref.setFailedTask,
|
|
10993
10698
|
setSelectedTask = _ref.setSelectedTask,
|
|
@@ -11104,6 +10809,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11104
10809
|
}
|
|
11105
10810
|
}, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
|
|
11106
10811
|
var hasMovedHorizontally = function hasMovedHorizontally(event) {
|
|
10812
|
+
if (readOnly) {
|
|
10813
|
+
return false;
|
|
10814
|
+
}
|
|
11107
10815
|
return initEventXClick !== (event === null || event === void 0 ? void 0 : event.clientX);
|
|
11108
10816
|
};
|
|
11109
10817
|
var handleBarEventStart = function handleBarEventStart(action, task, event) {
|
|
@@ -11155,8 +10863,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11155
10863
|
} else if (action === "dblclick") {
|
|
11156
10864
|
!!onDoubleClick && onDoubleClick(task);
|
|
11157
10865
|
} else if (action === "click") {
|
|
11158
|
-
var skipClick =
|
|
11159
|
-
skipClick && !!onClick && onClick(task);
|
|
10866
|
+
var skipClick = hasMovedHorizontally(event);
|
|
10867
|
+
!skipClick && !!onClick && onClick(task);
|
|
11160
10868
|
} else if (action === "contextmenu") {
|
|
11161
10869
|
event.preventDefault();
|
|
11162
10870
|
!!onContextMenu && onContextMenu(event, task);
|
|
@@ -11226,9 +10934,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11226
10934
|
task: task,
|
|
11227
10935
|
arrowIndent: arrowIndent,
|
|
11228
10936
|
taskHeight: taskHeight,
|
|
11229
|
-
isProgressChangeable: !!onProgressChange && !task.isDisabled,
|
|
11230
|
-
isDateMovable: !!onDateChange && !task.isDisabled,
|
|
11231
|
-
isDateResizable: !!onDateChange && !task.isDisabled && !forbidResize,
|
|
10937
|
+
isProgressChangeable: !readOnly && !!onProgressChange && !task.isDisabled,
|
|
10938
|
+
isDateMovable: !readOnly && !!onDateChange && !task.isDisabled,
|
|
10939
|
+
isDateResizable: !readOnly && !!onDateChange && !task.isDisabled && !forbidResize,
|
|
11232
10940
|
isDelete: !task.isDisabled,
|
|
11233
10941
|
onEventStart: handleBarEventStart,
|
|
11234
10942
|
key: task.id,
|
|
@@ -11251,8 +10959,8 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
11251
10959
|
scrollY = _ref.scrollY,
|
|
11252
10960
|
scrollX = _ref.scrollX;
|
|
11253
10961
|
var ganttSVGRef = react.useRef(null);
|
|
11254
|
-
var horizontalContainerRef = react.
|
|
11255
|
-
var verticalGanttContainerRef = react.
|
|
10962
|
+
var horizontalContainerRef = react.createRef();
|
|
10963
|
+
var verticalGanttContainerRef = react.createRef();
|
|
11256
10964
|
var newBarProps = _extends({}, barProps, {
|
|
11257
10965
|
svg: ganttSVGRef
|
|
11258
10966
|
});
|
|
@@ -11260,12 +10968,12 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
11260
10968
|
if (horizontalContainerRef.current) {
|
|
11261
10969
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
11262
10970
|
}
|
|
11263
|
-
}, [scrollY]);
|
|
10971
|
+
}, [horizontalContainerRef, scrollY]);
|
|
11264
10972
|
react.useEffect(function () {
|
|
11265
10973
|
if (verticalGanttContainerRef.current) {
|
|
11266
10974
|
verticalGanttContainerRef.current.scrollLeft = scrollX;
|
|
11267
10975
|
}
|
|
11268
|
-
}, [scrollX]);
|
|
10976
|
+
}, [scrollX, verticalGanttContainerRef]);
|
|
11269
10977
|
return react.createElement("div", {
|
|
11270
10978
|
className: styles$7.ganttContainer,
|
|
11271
10979
|
ref: taskGanttRef
|
|
@@ -11306,6 +11014,15 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
11306
11014
|
rtl = _ref.rtl,
|
|
11307
11015
|
onScroll = _ref.onScroll;
|
|
11308
11016
|
var scrollRef = react.useRef(null);
|
|
11017
|
+
react.useEffect(function () {
|
|
11018
|
+
if (scrollRef.current) {
|
|
11019
|
+
var wrap = scrollRef.current;
|
|
11020
|
+
var setScrollLeft = function setScrollLeft() {
|
|
11021
|
+
wrap.scrollLeft = scroll;
|
|
11022
|
+
};
|
|
11023
|
+
setTimeout(setScrollLeft, 250);
|
|
11024
|
+
}
|
|
11025
|
+
}, []);
|
|
11309
11026
|
react.useEffect(function () {
|
|
11310
11027
|
if (scrollRef.current) {
|
|
11311
11028
|
scrollRef.current.scrollLeft = scroll;
|
|
@@ -11319,6 +11036,7 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
11319
11036
|
} : undefined,
|
|
11320
11037
|
className: styles$8.scrollWrapper,
|
|
11321
11038
|
onScroll: onScroll,
|
|
11039
|
+
"data-scrollx": "true",
|
|
11322
11040
|
ref: scrollRef
|
|
11323
11041
|
}, react.createElement("div", {
|
|
11324
11042
|
style: {
|
|
@@ -11342,8 +11060,6 @@ var Gantt = function Gantt(_ref) {
|
|
|
11342
11060
|
filter = _ref.filter,
|
|
11343
11061
|
_ref$ganttHeight = _ref.ganttHeight,
|
|
11344
11062
|
ganttHeight = _ref$ganttHeight === void 0 ? 0 : _ref$ganttHeight,
|
|
11345
|
-
_ref$viewMode = _ref.viewMode,
|
|
11346
|
-
viewMode = _ref$viewMode === void 0 ? ViewMode.Day : _ref$viewMode,
|
|
11347
11063
|
_ref$preStepsCount = _ref.preStepsCount,
|
|
11348
11064
|
preStepsCount = _ref$preStepsCount === void 0 ? 1 : _ref$preStepsCount,
|
|
11349
11065
|
_ref$locale = _ref.locale,
|
|
@@ -11407,6 +11123,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11407
11123
|
projection = _ref.projection,
|
|
11408
11124
|
displayedStartDate = _ref.displayedStartDate,
|
|
11409
11125
|
displayedEndDate = _ref.displayedEndDate,
|
|
11126
|
+
_ref$initialScrollX = _ref.initialScrollX,
|
|
11127
|
+
initialScrollX = _ref$initialScrollX === void 0 ? -1 : _ref$initialScrollX,
|
|
11128
|
+
_ref$initialScrollY = _ref.initialScrollY,
|
|
11129
|
+
initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,
|
|
11130
|
+
_ref$readOnly = _ref.readOnly,
|
|
11131
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
11410
11132
|
onDateChange = _ref.onDateChange,
|
|
11411
11133
|
onProgressChange = _ref.onProgressChange,
|
|
11412
11134
|
onDoubleClick = _ref.onDoubleClick,
|
|
@@ -11414,7 +11136,11 @@ var Gantt = function Gantt(_ref) {
|
|
|
11414
11136
|
onContextMenu = _ref.onContextMenu,
|
|
11415
11137
|
onDelete = _ref.onDelete,
|
|
11416
11138
|
onSelect = _ref.onSelect,
|
|
11417
|
-
onExpanderClick = _ref.onExpanderClick
|
|
11139
|
+
onExpanderClick = _ref.onExpanderClick,
|
|
11140
|
+
_ref$viewMode = _ref.viewMode,
|
|
11141
|
+
viewMode = _ref$viewMode === void 0 ? "month" : _ref$viewMode,
|
|
11142
|
+
onScrollX = _ref.onScrollX,
|
|
11143
|
+
onScrollY = _ref.onScrollY;
|
|
11418
11144
|
var wrapperRef = react.useRef(null);
|
|
11419
11145
|
var taskGanttRef = react.useRef(null);
|
|
11420
11146
|
var taskListRef = react.useRef(null);
|
|
@@ -11466,12 +11192,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11466
11192
|
setFailedTask = _useState5[1];
|
|
11467
11193
|
var svgWidth = dateSetup.dates.length * columnWidth;
|
|
11468
11194
|
var ganttFullHeight = barTasks.length * rowHeight;
|
|
11469
|
-
var _useState6 = react.useState(
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
var _useState7 = react.useState(
|
|
11473
|
-
|
|
11474
|
-
|
|
11195
|
+
var _useState6 = react.useState(initialScrollX),
|
|
11196
|
+
scrollX = _useState6[0],
|
|
11197
|
+
setScrollX = _useState6[1];
|
|
11198
|
+
var _useState7 = react.useState(initialScrollY),
|
|
11199
|
+
scrollY = _useState7[0],
|
|
11200
|
+
setScrollY = _useState7[1];
|
|
11475
11201
|
var ignoreScrollEvent = react.useRef(false);
|
|
11476
11202
|
var setIgnoreScrollEvent = function setIgnoreScrollEvent(value) {
|
|
11477
11203
|
ignoreScrollEvent.current = value;
|
|
@@ -11486,9 +11212,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11486
11212
|
window.addEventListener("gantt-sync-scroll-event", function (e) {
|
|
11487
11213
|
if (e.detail.id !== id) {
|
|
11488
11214
|
setScrollX(e.detail.scrollX);
|
|
11215
|
+
if (onScrollX) {
|
|
11216
|
+
onScrollX(e.detail.scrollX);
|
|
11217
|
+
}
|
|
11489
11218
|
}
|
|
11490
11219
|
});
|
|
11491
|
-
}, [id]);
|
|
11220
|
+
}, [id, onScrollX]);
|
|
11492
11221
|
react.useEffect(function () {
|
|
11493
11222
|
var filteredTasks;
|
|
11494
11223
|
if (onExpanderClick) {
|
|
@@ -11582,6 +11311,24 @@ var Gantt = function Gantt(_ref) {
|
|
|
11582
11311
|
setTaskListWidth(taskListRef.current.offsetWidth);
|
|
11583
11312
|
}
|
|
11584
11313
|
}, [taskListRef, listCellWidth]);
|
|
11314
|
+
react.useEffect(function () {
|
|
11315
|
+
if (wrapperRef.current) {
|
|
11316
|
+
if (scrollX !== -1) {
|
|
11317
|
+
var wrap = wrapperRef.current;
|
|
11318
|
+
var setScrollLeft = function setScrollLeft() {
|
|
11319
|
+
wrap.scrollLeft = scrollX;
|
|
11320
|
+
};
|
|
11321
|
+
setTimeout(setScrollLeft, 125);
|
|
11322
|
+
}
|
|
11323
|
+
if (scrollY !== 0) {
|
|
11324
|
+
var _wrap = wrapperRef.current;
|
|
11325
|
+
var setScrollTop = function setScrollTop() {
|
|
11326
|
+
_wrap.scrollTop = scrollY;
|
|
11327
|
+
};
|
|
11328
|
+
setTimeout(setScrollTop, 125);
|
|
11329
|
+
}
|
|
11330
|
+
}
|
|
11331
|
+
}, []);
|
|
11585
11332
|
react.useEffect(function () {
|
|
11586
11333
|
if (wrapperRef.current) {
|
|
11587
11334
|
setSvgContainerWidth(wrapperRef.current.offsetWidth - taskListWidth.current);
|
|
@@ -11629,9 +11376,16 @@ var Gantt = function Gantt(_ref) {
|
|
|
11629
11376
|
};
|
|
11630
11377
|
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
11631
11378
|
var handleScrollY = function handleScrollY(event) {
|
|
11632
|
-
if (scrollY !== event.currentTarget.scrollTop
|
|
11633
|
-
|
|
11634
|
-
|
|
11379
|
+
if (scrollY !== event.currentTarget.scrollTop) {
|
|
11380
|
+
if (onScrollY) {
|
|
11381
|
+
onScrollY(event.currentTarget.scrollTop);
|
|
11382
|
+
}
|
|
11383
|
+
if (!ignoreScrollEvent.current) {
|
|
11384
|
+
setScrollY(event.currentTarget.scrollTop);
|
|
11385
|
+
setIgnoreScrollEvent(true);
|
|
11386
|
+
} else {
|
|
11387
|
+
setIgnoreScrollEvent(false);
|
|
11388
|
+
}
|
|
11635
11389
|
} else {
|
|
11636
11390
|
setIgnoreScrollEvent(false);
|
|
11637
11391
|
}
|
|
@@ -11697,6 +11451,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
11697
11451
|
} else if (newScrollY > ganttFullHeight - ganttHeight) {
|
|
11698
11452
|
newScrollY = ganttFullHeight - ganttHeight;
|
|
11699
11453
|
}
|
|
11454
|
+
if (onScrollY) {
|
|
11455
|
+
onScrollY(event.currentTarget.scrollTop);
|
|
11456
|
+
}
|
|
11700
11457
|
setScrollY(newScrollY);
|
|
11701
11458
|
}
|
|
11702
11459
|
setIgnoreScrollEvent(true);
|
|
@@ -11790,6 +11547,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11790
11547
|
ganttHeight: ganttHeight,
|
|
11791
11548
|
currentDateIndicator: currentDateIndicatorContent,
|
|
11792
11549
|
projection: projectionContent,
|
|
11550
|
+
readOnly: readOnly,
|
|
11793
11551
|
setGanttEvent: setGanttEvent,
|
|
11794
11552
|
setFailedTask: setFailedTask,
|
|
11795
11553
|
setSelectedTask: handleSelectedTask,
|
|
@@ -11820,7 +11578,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11820
11578
|
TaskListTable: TaskListTable
|
|
11821
11579
|
};
|
|
11822
11580
|
return react.createElement("div", null, react.createElement("div", {
|
|
11823
|
-
className: styles$7.wrapper,
|
|
11581
|
+
className: "" + styles$7.wrapper,
|
|
11824
11582
|
onKeyDown: handleKeyDown,
|
|
11825
11583
|
tabIndex: 0,
|
|
11826
11584
|
ref: wrapperRef
|
|
@@ -11864,6 +11622,199 @@ var Gantt = function Gantt(_ref) {
|
|
|
11864
11622
|
}));
|
|
11865
11623
|
};
|
|
11866
11624
|
|
|
11625
|
+
var MAIN_GANTT_ID = "main";
|
|
11626
|
+
var SECONDARY_GANTT_ID = "secondary";
|
|
11627
|
+
var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
|
|
11628
|
+
switch (timeUnit) {
|
|
11629
|
+
case "year":
|
|
11630
|
+
return 60 * 2;
|
|
11631
|
+
default:
|
|
11632
|
+
return 60;
|
|
11633
|
+
}
|
|
11634
|
+
};
|
|
11635
|
+
var convertPhaseToTask = function convertPhaseToTask(item) {
|
|
11636
|
+
var mapPhase = function mapPhase(_ref) {
|
|
11637
|
+
var phaseStart = _ref.startDate,
|
|
11638
|
+
phaseEnd = _ref.endDate,
|
|
11639
|
+
secondaryStartDate = _ref.secondaryStartDate,
|
|
11640
|
+
secondaryEndDate = _ref.secondaryEndDate,
|
|
11641
|
+
phaseName = _ref.name,
|
|
11642
|
+
phaseId = _ref.id,
|
|
11643
|
+
color = _ref.color,
|
|
11644
|
+
selectedColor = _ref.selectedColor,
|
|
11645
|
+
dependencies = _ref.dependencies,
|
|
11646
|
+
icon = _ref.icon;
|
|
11647
|
+
var _validDates = validDates(phaseStart, phaseEnd),
|
|
11648
|
+
start = _validDates.start,
|
|
11649
|
+
end = _validDates.end;
|
|
11650
|
+
var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
|
|
11651
|
+
phaseStart2 = _validDates2.start,
|
|
11652
|
+
phaseEnd2 = _validDates2.end;
|
|
11653
|
+
return {
|
|
11654
|
+
start: start,
|
|
11655
|
+
end: end,
|
|
11656
|
+
secondaryStart: phaseStart2,
|
|
11657
|
+
secondaryEnd: phaseEnd2,
|
|
11658
|
+
name: phaseName,
|
|
11659
|
+
valuesToShow: item.valuesToShow,
|
|
11660
|
+
id: phaseId,
|
|
11661
|
+
type: "task",
|
|
11662
|
+
progress: 100,
|
|
11663
|
+
dependencies: dependencies,
|
|
11664
|
+
styles: color ? {
|
|
11665
|
+
backgroundColor: color,
|
|
11666
|
+
progressColor: color,
|
|
11667
|
+
backgroundSelectedColor: selectedColor,
|
|
11668
|
+
progressSelectedColor: selectedColor
|
|
11669
|
+
} : {},
|
|
11670
|
+
icon: icon
|
|
11671
|
+
};
|
|
11672
|
+
};
|
|
11673
|
+
return mapPhase(item);
|
|
11674
|
+
};
|
|
11675
|
+
var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
|
|
11676
|
+
var id = item.id,
|
|
11677
|
+
name = item.name,
|
|
11678
|
+
schedule = item.schedule;
|
|
11679
|
+
var getDatesForTask = function getDatesForTask(item) {
|
|
11680
|
+
var start = mainGanttStartDate != null ? mainGanttStartDate : "";
|
|
11681
|
+
var end = mainGanttEndDate != null ? mainGanttEndDate : "";
|
|
11682
|
+
for (var i = 0; i < item.schedule.length; i++) {
|
|
11683
|
+
var lstart = item.schedule[i].startDate;
|
|
11684
|
+
var lend = item.schedule[i].endDate;
|
|
11685
|
+
if (!start || lstart.localeCompare(start) < 0) {
|
|
11686
|
+
start = lstart;
|
|
11687
|
+
}
|
|
11688
|
+
if (!end || lend.localeCompare(end) > 0) {
|
|
11689
|
+
end = lend;
|
|
11690
|
+
}
|
|
11691
|
+
}
|
|
11692
|
+
return validDates(start, end);
|
|
11693
|
+
};
|
|
11694
|
+
var _getDatesForTask = getDatesForTask(item),
|
|
11695
|
+
start = _getDatesForTask.start,
|
|
11696
|
+
end = _getDatesForTask.end;
|
|
11697
|
+
var convertToFrame = function convertToFrame(x) {
|
|
11698
|
+
var startDate = x.startDate,
|
|
11699
|
+
endDate = x.endDate,
|
|
11700
|
+
color = x.color,
|
|
11701
|
+
selectedColor = x.selectedColor,
|
|
11702
|
+
icon = x.icon;
|
|
11703
|
+
var _validDates3 = validDates(startDate, endDate),
|
|
11704
|
+
start = _validDates3.start,
|
|
11705
|
+
end = _validDates3.end;
|
|
11706
|
+
return {
|
|
11707
|
+
start: start,
|
|
11708
|
+
end: end,
|
|
11709
|
+
backgroundColor: color != null ? color : "0xffffff",
|
|
11710
|
+
backgroundSelectedColor: selectedColor != null ? selectedColor : color,
|
|
11711
|
+
icon: icon
|
|
11712
|
+
};
|
|
11713
|
+
};
|
|
11714
|
+
var defaultColor = "#595959";
|
|
11715
|
+
return {
|
|
11716
|
+
id: id,
|
|
11717
|
+
type: "timeline",
|
|
11718
|
+
timeline: schedule.map(convertToFrame),
|
|
11719
|
+
name: name,
|
|
11720
|
+
valuesToShow: item.valuesToShow,
|
|
11721
|
+
start: start,
|
|
11722
|
+
end: end,
|
|
11723
|
+
progress: 100,
|
|
11724
|
+
styles: {
|
|
11725
|
+
backgroundColor: defaultColor,
|
|
11726
|
+
progressColor: defaultColor,
|
|
11727
|
+
backgroundSelectedColor: defaultColor,
|
|
11728
|
+
progressSelectedColor: defaultColor
|
|
11729
|
+
}
|
|
11730
|
+
};
|
|
11731
|
+
};
|
|
11732
|
+
var isDetail = function isDetail(row) {
|
|
11733
|
+
return row && row.schedule && row.schedule.length !== 0;
|
|
11734
|
+
};
|
|
11735
|
+
var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
|
|
11736
|
+
if (!isDetail(item)) {
|
|
11737
|
+
var _row$phases;
|
|
11738
|
+
var row = item;
|
|
11739
|
+
var _validDates4 = validDates(row.startDate, row.endDate),
|
|
11740
|
+
start = _validDates4.start,
|
|
11741
|
+
end = _validDates4.end;
|
|
11742
|
+
var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
|
|
11743
|
+
start2 = _validDates5.start,
|
|
11744
|
+
end2 = _validDates5.end;
|
|
11745
|
+
var mainTask = {
|
|
11746
|
+
start: start,
|
|
11747
|
+
end: end,
|
|
11748
|
+
id: row.id,
|
|
11749
|
+
name: row.name,
|
|
11750
|
+
type: row.type,
|
|
11751
|
+
valuesToShow: row.valuesToShow,
|
|
11752
|
+
secondaryStart: start2,
|
|
11753
|
+
secondaryEnd: end2,
|
|
11754
|
+
progress: 100,
|
|
11755
|
+
isDisabled: false,
|
|
11756
|
+
hideChildren: false,
|
|
11757
|
+
icon: row.icon
|
|
11758
|
+
};
|
|
11759
|
+
var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
|
|
11760
|
+
return [mainTask].concat(children1);
|
|
11761
|
+
} else {
|
|
11762
|
+
var _row = item;
|
|
11763
|
+
return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
|
|
11764
|
+
}
|
|
11765
|
+
};
|
|
11766
|
+
var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
|
|
11767
|
+
var id = _ref2.id,
|
|
11768
|
+
start = _ref2.start,
|
|
11769
|
+
end = _ref2.end;
|
|
11770
|
+
return projects.map(function (project) {
|
|
11771
|
+
return project.id === id ? withNewDates(project, start, end) : project;
|
|
11772
|
+
});
|
|
11773
|
+
};
|
|
11774
|
+
var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
|
|
11775
|
+
var id = _ref3.id,
|
|
11776
|
+
start = _ref3.start,
|
|
11777
|
+
end = _ref3.end;
|
|
11778
|
+
if (phases) {
|
|
11779
|
+
return phases.map(function (phase) {
|
|
11780
|
+
return phase.id === id ? withNewDates(phase, start, end) : phase;
|
|
11781
|
+
});
|
|
11782
|
+
}
|
|
11783
|
+
return undefined;
|
|
11784
|
+
};
|
|
11785
|
+
var withNewDates = function withNewDates(p, start, end) {
|
|
11786
|
+
var startDate = formatToIsoDate(start);
|
|
11787
|
+
var endDate = formatToIsoDate(end);
|
|
11788
|
+
var extra = {
|
|
11789
|
+
startDate: startDate,
|
|
11790
|
+
endDate: endDate
|
|
11791
|
+
};
|
|
11792
|
+
return _extends({}, p, extra);
|
|
11793
|
+
};
|
|
11794
|
+
var getProjectById = function getProjectById(id, items) {
|
|
11795
|
+
for (var i = 0; i < items.length; i++) {
|
|
11796
|
+
if (items[i].id === id) {
|
|
11797
|
+
return items[i];
|
|
11798
|
+
}
|
|
11799
|
+
}
|
|
11800
|
+
return undefined;
|
|
11801
|
+
};
|
|
11802
|
+
var getPhaseById = function getPhaseById(id, items) {
|
|
11803
|
+
for (var i = 0; i < items.length; i++) {
|
|
11804
|
+
if (isDetail(items[i])) {
|
|
11805
|
+
continue;
|
|
11806
|
+
}
|
|
11807
|
+
var item = items[i];
|
|
11808
|
+
if (!item.phases) {
|
|
11809
|
+
continue;
|
|
11810
|
+
}
|
|
11811
|
+
for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
|
|
11812
|
+
return item.phases[j];
|
|
11813
|
+
}
|
|
11814
|
+
}
|
|
11815
|
+
return undefined;
|
|
11816
|
+
};
|
|
11817
|
+
|
|
11867
11818
|
var cachedFormats = {};
|
|
11868
11819
|
var getOrBuildCachedFormat = function getOrBuildCachedFormat(locale, options) {
|
|
11869
11820
|
var _cachedFormats$key;
|
|
@@ -12137,16 +12088,16 @@ var classes$2 = {"switcher":"_3P0WE","button":"_1oXbe","label":"_1R9mh"};
|
|
|
12137
12088
|
var Switcher = function Switcher(_ref) {
|
|
12138
12089
|
var onTimeUnitChange = _ref.onTimeUnitChange;
|
|
12139
12090
|
var day = function day() {
|
|
12140
|
-
return onTimeUnitChange(
|
|
12091
|
+
return onTimeUnitChange("day");
|
|
12141
12092
|
};
|
|
12142
12093
|
var week = function week() {
|
|
12143
|
-
return onTimeUnitChange(
|
|
12094
|
+
return onTimeUnitChange("week");
|
|
12144
12095
|
};
|
|
12145
12096
|
var month = function month() {
|
|
12146
|
-
return onTimeUnitChange(
|
|
12097
|
+
return onTimeUnitChange("month");
|
|
12147
12098
|
};
|
|
12148
12099
|
var year = function year() {
|
|
12149
|
-
return onTimeUnitChange(
|
|
12100
|
+
return onTimeUnitChange("year");
|
|
12150
12101
|
};
|
|
12151
12102
|
return react.createElement("div", {
|
|
12152
12103
|
className: classes$2.switcher
|
|
@@ -12179,7 +12130,7 @@ var Switcher = function Switcher(_ref) {
|
|
|
12179
12130
|
|
|
12180
12131
|
var Planner = function Planner(props) {
|
|
12181
12132
|
var _props$secondaryGantt, _props$mainGantt$show, _props$mainGantt$task, _props$mainGantt$task2, _props$mainGantt$tool, _props$secondaryGantt3, _props$secondaryGantt4, _props$secondaryGantt5, _props$secondaryGantt6;
|
|
12182
|
-
var _useState = react.useState(
|
|
12133
|
+
var _useState = react.useState(props.viewMode),
|
|
12183
12134
|
timeUnit = _useState[0],
|
|
12184
12135
|
setTimeUnit = _useState[1];
|
|
12185
12136
|
var currentTasks = react.useRef(props.mainGantt.items);
|
|
@@ -12292,6 +12243,17 @@ var Planner = function Planner(props) {
|
|
|
12292
12243
|
}
|
|
12293
12244
|
}
|
|
12294
12245
|
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(row);
|
|
12246
|
+
var getScrollX = function getScrollX() {
|
|
12247
|
+
if (wrapperRef.current) {
|
|
12248
|
+
var _wrapperRef$current$q;
|
|
12249
|
+
var x = (_wrapperRef$current$q = wrapperRef.current.querySelector('[data-scrollx="true"]')) === null || _wrapperRef$current$q === void 0 ? void 0 : _wrapperRef$current$q.scrollLeft;
|
|
12250
|
+
if (x !== undefined) {
|
|
12251
|
+
var _props$onScrollX;
|
|
12252
|
+
(_props$onScrollX = props.onScrollX) === null || _props$onScrollX === void 0 ? void 0 : _props$onScrollX.call(props, x);
|
|
12253
|
+
}
|
|
12254
|
+
}
|
|
12255
|
+
};
|
|
12256
|
+
setTimeout(getScrollX, 500);
|
|
12295
12257
|
};
|
|
12296
12258
|
react.useEffect(function () {
|
|
12297
12259
|
var _props$secondaryGantt2;
|
|
@@ -12322,8 +12284,13 @@ var Planner = function Planner(props) {
|
|
|
12322
12284
|
}
|
|
12323
12285
|
}
|
|
12324
12286
|
console.log("PLANNER render");
|
|
12325
|
-
|
|
12287
|
+
var wrapperRef = react.useRef(null);
|
|
12288
|
+
return react.createElement("div", {
|
|
12289
|
+
ref: wrapperRef
|
|
12290
|
+
}, react.createElement(Switcher, {
|
|
12326
12291
|
onTimeUnitChange: function onTimeUnitChange(timeUnit) {
|
|
12292
|
+
var _props$onSetViewMode;
|
|
12293
|
+
(_props$onSetViewMode = props.onSetViewMode) === null || _props$onSetViewMode === void 0 ? void 0 : _props$onSetViewMode.call(props, timeUnit);
|
|
12327
12294
|
setTimeUnit(timeUnit);
|
|
12328
12295
|
setViewDate(undefined);
|
|
12329
12296
|
}
|
|
@@ -12345,7 +12312,7 @@ var Planner = function Planner(props) {
|
|
|
12345
12312
|
viewDate: viewDate,
|
|
12346
12313
|
tasks: tasks,
|
|
12347
12314
|
columnWidth: columnWidthForTimeUnit(timeUnit),
|
|
12348
|
-
viewMode:
|
|
12315
|
+
viewMode: timeUnit
|
|
12349
12316
|
}, props.mainGantt.stylingOptions, {
|
|
12350
12317
|
TaskListHeader: (_props$mainGantt$task = props.mainGantt.taskListHeaderProject) != null ? _props$mainGantt$task : CustomTaskListHeaderHOC(props.mainGantt.title, mainGanttDoubleView != null ? mainGanttDoubleView : false, handleSetDoubleView),
|
|
12351
12318
|
TaskListTable: (_props$mainGantt$task2 = props.mainGantt.taskListTableProject) != null ? _props$mainGantt$task2 : CustomTaskListTableHOC(function (id) {
|
|
@@ -12388,7 +12355,12 @@ var Planner = function Planner(props) {
|
|
|
12388
12355
|
return handleDateChange(task, currentTasks.current, props.mainGantt.onDateChange);
|
|
12389
12356
|
},
|
|
12390
12357
|
locale: locale,
|
|
12391
|
-
dateTimeFormatters: ganttDateTimeFormatters
|
|
12358
|
+
dateTimeFormatters: ganttDateTimeFormatters,
|
|
12359
|
+
initialScrollX: props.mainGantt.initialScrollX,
|
|
12360
|
+
initialScrollY: props.mainGantt.initialScrollY,
|
|
12361
|
+
readOnly: props.mainGantt.readOnly,
|
|
12362
|
+
onScrollX: props.onScrollX,
|
|
12363
|
+
onScrollY: props.mainGantt.onScrollY
|
|
12392
12364
|
})), props.secondaryGantt && react.createElement(Gantt, Object.assign({
|
|
12393
12365
|
id: SECONDARY_GANTT_ID,
|
|
12394
12366
|
key: SECONDARY_GANTT_ID,
|
|
@@ -12402,7 +12374,7 @@ var Planner = function Planner(props) {
|
|
|
12402
12374
|
viewDate: viewDate,
|
|
12403
12375
|
tasks: details,
|
|
12404
12376
|
columnWidth: columnWidthForTimeUnit(timeUnit),
|
|
12405
|
-
viewMode:
|
|
12377
|
+
viewMode: timeUnit
|
|
12406
12378
|
}, props.mainGantt.stylingOptions, {
|
|
12407
12379
|
TaskListHeader: (_props$secondaryGantt3 = props.secondaryGantt.taskListHeaderProject) != null ? _props$secondaryGantt3 : CustomTaskListHeaderHOC(props.secondaryGantt.title),
|
|
12408
12380
|
TaskListTable: (_props$secondaryGantt4 = (_props$secondaryGantt5 = props.secondaryGantt) === null || _props$secondaryGantt5 === void 0 ? void 0 : _props$secondaryGantt5.taskListTableProject) != null ? _props$secondaryGantt4 : CustomTaskListTableHOC(function (id) {
|
|
@@ -12438,762 +12410,943 @@ var Planner = function Planner(props) {
|
|
|
12438
12410
|
return handleDateChange(task, currentDetails.current, (_props$secondaryGantt7 = props.secondaryGantt) === null || _props$secondaryGantt7 === void 0 ? void 0 : _props$secondaryGantt7.onDateChange);
|
|
12439
12411
|
},
|
|
12440
12412
|
locale: locale,
|
|
12441
|
-
dateTimeFormatters: ganttDateTimeFormatters
|
|
12413
|
+
dateTimeFormatters: ganttDateTimeFormatters,
|
|
12414
|
+
initialScrollX: props.secondaryGantt.initialScrollX,
|
|
12415
|
+
initialScrollY: props.secondaryGantt.initialScrollY,
|
|
12416
|
+
readOnly: props.secondaryGantt.readOnly,
|
|
12417
|
+
onScrollY: props.secondaryGantt.onScrollY
|
|
12442
12418
|
}))));
|
|
12443
12419
|
};
|
|
12444
12420
|
|
|
12445
|
-
const kupManager = kupManagerInstance();
|
|
12446
|
-
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
12447
|
-
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
12448
|
-
let sanitizedSecDateValues = [];
|
|
12449
|
-
if (secStartDateCell && secEndDateCell) {
|
|
12450
|
-
if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
|
|
12451
|
-
sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
|
|
12452
|
-
}
|
|
12453
|
-
else {
|
|
12454
|
-
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
12455
|
-
}
|
|
12456
|
-
}
|
|
12457
|
-
return {
|
|
12458
|
-
dateValues: sanitizedDateValues,
|
|
12459
|
-
secDateValues: sanitizedSecDateValues,
|
|
12460
|
-
};
|
|
12461
|
-
}
|
|
12462
|
-
function sanitizeDates(startDateCell, endDateCell) {
|
|
12463
|
-
let returnValues = [startDateCell.value, endDateCell.value];
|
|
12464
|
-
if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
|
|
12465
|
-
return returnValues;
|
|
12466
|
-
}
|
|
12467
|
-
else if (isDateValid(startDateCell)) {
|
|
12468
|
-
return [startDateCell.value, startDateCell.value];
|
|
12469
|
-
}
|
|
12470
|
-
else if (isDateValid(endDateCell)) {
|
|
12471
|
-
return [endDateCell.value, endDateCell.value];
|
|
12472
|
-
}
|
|
12473
|
-
else {
|
|
12474
|
-
return returnValues;
|
|
12475
|
-
}
|
|
12476
|
-
}
|
|
12477
|
-
function isDateValid(dateCell) {
|
|
12478
|
-
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
12479
|
-
kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
|
|
12480
|
-
}
|
|
12481
|
-
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
12482
|
-
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
12483
|
-
}
|
|
12484
|
-
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
12485
|
-
let toValuesFunction = () => columns.map((col) => {
|
|
12486
|
-
return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
12487
|
-
});
|
|
12488
|
-
if (customToValuesFunction) {
|
|
12489
|
-
toValuesFunction = customToValuesFunction;
|
|
12490
|
-
}
|
|
12491
|
-
const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
|
|
12492
|
-
? toValuesFunction()
|
|
12493
|
-
: [row.cells[idCol].value, row.cells[nameCol].value];
|
|
12494
|
-
return valuesToShow;
|
|
12421
|
+
const kupManager = kupManagerInstance();
|
|
12422
|
+
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
12423
|
+
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
12424
|
+
let sanitizedSecDateValues = [];
|
|
12425
|
+
if (secStartDateCell && secEndDateCell) {
|
|
12426
|
+
if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
|
|
12427
|
+
sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
|
|
12428
|
+
}
|
|
12429
|
+
else {
|
|
12430
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
12431
|
+
}
|
|
12432
|
+
}
|
|
12433
|
+
return {
|
|
12434
|
+
dateValues: sanitizedDateValues,
|
|
12435
|
+
secDateValues: sanitizedSecDateValues,
|
|
12436
|
+
};
|
|
12437
|
+
}
|
|
12438
|
+
function sanitizeDates(startDateCell, endDateCell) {
|
|
12439
|
+
let returnValues = [startDateCell.value, endDateCell.value];
|
|
12440
|
+
if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
|
|
12441
|
+
return returnValues;
|
|
12442
|
+
}
|
|
12443
|
+
else if (isDateValid(startDateCell)) {
|
|
12444
|
+
return [startDateCell.value, startDateCell.value];
|
|
12445
|
+
}
|
|
12446
|
+
else if (isDateValid(endDateCell)) {
|
|
12447
|
+
return [endDateCell.value, endDateCell.value];
|
|
12448
|
+
}
|
|
12449
|
+
else {
|
|
12450
|
+
return returnValues;
|
|
12451
|
+
}
|
|
12452
|
+
}
|
|
12453
|
+
function isDateValid(dateCell) {
|
|
12454
|
+
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
12455
|
+
kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
|
|
12456
|
+
}
|
|
12457
|
+
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
12458
|
+
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
12459
|
+
}
|
|
12460
|
+
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
12461
|
+
let toValuesFunction = () => columns.map((col) => {
|
|
12462
|
+
return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
12463
|
+
});
|
|
12464
|
+
if (customToValuesFunction) {
|
|
12465
|
+
toValuesFunction = customToValuesFunction;
|
|
12466
|
+
}
|
|
12467
|
+
const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
|
|
12468
|
+
? toValuesFunction()
|
|
12469
|
+
: [row.cells[idCol].value, row.cells[nameCol].value];
|
|
12470
|
+
return valuesToShow;
|
|
12471
|
+
}
|
|
12472
|
+
|
|
12473
|
+
class KupPlannerState {
|
|
12474
|
+
constructor() {
|
|
12475
|
+
this.showSecondaryDates = false;
|
|
12476
|
+
this.detailFilter = "";
|
|
12477
|
+
this.detailInitialScrollX = 0;
|
|
12478
|
+
this.detailInitialScrollY = 0;
|
|
12479
|
+
this.taskFilter = "";
|
|
12480
|
+
this.taskInitialScrollX = 0;
|
|
12481
|
+
this.taskInitialScrollY = 0;
|
|
12482
|
+
this.viewMode = "day";
|
|
12483
|
+
}
|
|
12484
|
+
toDebugString() {
|
|
12485
|
+
// TODO
|
|
12486
|
+
return 'dt state';
|
|
12487
|
+
}
|
|
12495
12488
|
}
|
|
12496
12489
|
|
|
12497
12490
|
const kupPlannerCss = "._3_ygE{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._1nBOt{display:table-row;list-style:none}._2eZzQ{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}._WuQ0f{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}._3ZbQT{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._34SS0{display:table-row;text-overflow:ellipsis}._34SS0:nth-of-type(even){}._3lLk3{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._nI1Xw{display:flex}._2QjE6{color:rgb(86 86 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}._2TfEi{font-size:0.6rem;padding-left:1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3T42e{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}._29NTg{font-size:12px;margin-bottom:6px;color:#666}._25P-K{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3gVAq{visibility:hidden;position:absolute;display:flex;pointer-events:none}._1eT-t{overflow:hidden auto;width:1rem;flex-shrink:0;scrollbar-width:thin}._1eT-t::-webkit-scrollbar{width:1.1rem;height:1.1rem}._1eT-t::-webkit-scrollbar-corner{background:transparent}._1eT-t::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._1eT-t::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._EvhC1{border-radius:8px;background:#efefef;margin:12px;padding:12px}._2dZTy{fill:#fff}._2dZTy:nth-child(even){}._3rUKi{stroke:transparent}._RuwuK{stroke:#e6e4e4}._9w8d5{text-anchor:middle;fill:#333;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._1rLuZ{stroke:#e6e4e4}._2q1Kt{text-anchor:middle;fill:#555;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._35nLX{fill:#ffffff;stroke:#e0e0e0;stroke-width:1.4}._KxSXS{cursor:pointer;outline:none}._KxSXS:hover ._3w_5u{visibility:visible;opacity:1}._3w_5u{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}._31ERP{-webkit-user-select:none;-moz-user-select:none;user-select:none;stroke-width:0}._3zRJQ{fill:#fff;text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._3KcaM{fill:#555;text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._11iN9{background:#efefef;border-radius:8px;margin:12px;overflow:hidden;padding:12px}._CZjuD{overflow:hidden;font-size:0;margin:0;padding:0}._2B2zv{margin:0;padding:0;overflow:hidden}._3eULf{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}._2k9Ys{overflow:auto;max-width:100%;scrollbar-width:thin;height:1.2rem}._2k9Ys::-webkit-scrollbar{width:1.1rem;height:1.1rem}._2k9Ys::-webkit-scrollbar-corner{background:transparent}._2k9Ys::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._2k9Ys::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._19jgW{height:1px}._37E9D{display:flex;justify-content:space-around;max-width:330px;place-items:\"center\";text-align:center;align-items:center}._WrYI6{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._c53zr{max-width:-moz-max-content;max-width:max-content;padding:0 4px;text-align:right}._2eBO5{position:relative;display:inline-block;width:30px;height:17px}._hiyro{opacity:0;width:0;height:0}._hiyro:checked+._2HI58{background-color:#003b77}._hiyro:checked+._2HI58:before{transform:translateX(13px)}._hiyro:focus+._2HI58{box-shadow:0 0 1px #003b77}._2HI58{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}._2HI58:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:\"\";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}._2gSdA{font-size:12px;padding:6px}._2cfRI{font-size:12px}._lEI6r{padding:0 10px;margin-right:10px}._RU6Aa{background:var(--kup-background-color, #ffffff);border:1px solid var(--kup-border-color, #acacac);border-radius:4px;box-sizing:border-box;color:var(--kup-text-color, #595959);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center}._RU6Aa>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._RU6Aa ._30j6y{font-weight:700;width:100%;text-align:center}._T0HQN{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#acacac;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#ffffff;color:#595959;font-weight:400}._T0HQN>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}._T0HQN:has(+._T0HQN),._RU6Aa:has(+._T0HQN){border-bottom-left-radius:0;border-bottom-right-radius:0}._yp2DW{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#cbcbcb;border-radius:4px;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#fff;color:#595959;font-weight:400;box-sizing:border-box}._yp2DW>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._yp2DW ._30j6y{font-weight:700;width:100%;text-align:center}._3P0WE{display:grid;grid-auto-flow:column;grid-gap:8px;margin-left:12px;width:-moz-max-content;width:max-content}._1oXbe{background:transparent;border-color:var(--kup-primary-color, #003b77);border-radius:4px;border-width:1px;box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb, 51 51 51), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.12);box-sizing:border-box;color:var(--kup-primary-color, #003b77);cursor:pointer;font-size:11px;height:32px;min-width:64px}._1R9mh{font-family:var(--kup-font-family, inherit);font-size:11px;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;padding:0 6px}:host{display:block}.filter{margin:12px 10px 12px 0;padding:0 10px}";
|
|
12498
12491
|
|
|
12499
|
-
var
|
|
12500
|
-
if (kind === "
|
|
12501
|
-
throw new TypeError("Private
|
|
12502
|
-
if (
|
|
12503
|
-
throw new TypeError("
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
if (kind === "a" && !f)
|
|
12510
|
-
throw new TypeError("Private accessor was defined without a
|
|
12511
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12512
|
-
throw new TypeError("Cannot
|
|
12513
|
-
return kind === "
|
|
12514
|
-
};
|
|
12515
|
-
var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases,
|
|
12516
|
-
const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12517
|
-
constructor() {
|
|
12518
|
-
super();
|
|
12519
|
-
this.__registerHost();
|
|
12520
|
-
this.__attachShadow();
|
|
12521
|
-
this.kupClick = createEvent(this, "kup-planner-click", 6);
|
|
12522
|
-
this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
|
|
12523
|
-
this.kupReady = createEvent(this, "kup-planner-ready", 6);
|
|
12524
|
-
this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
/*-------------------------------------------------*/
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
this
|
|
12537
|
-
this.
|
|
12538
|
-
this.
|
|
12539
|
-
this.
|
|
12540
|
-
this.
|
|
12541
|
-
this.
|
|
12542
|
-
this.
|
|
12543
|
-
this.
|
|
12544
|
-
this.
|
|
12545
|
-
this.
|
|
12546
|
-
this.
|
|
12547
|
-
this.
|
|
12548
|
-
this.
|
|
12549
|
-
this.
|
|
12550
|
-
this.
|
|
12551
|
-
this.
|
|
12552
|
-
this.
|
|
12553
|
-
this.
|
|
12554
|
-
this.
|
|
12555
|
-
this.
|
|
12556
|
-
this.
|
|
12557
|
-
this.
|
|
12558
|
-
this.
|
|
12559
|
-
this.
|
|
12560
|
-
this.
|
|
12561
|
-
this.
|
|
12562
|
-
this.
|
|
12563
|
-
this.
|
|
12564
|
-
this.
|
|
12565
|
-
this.
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
}
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
});
|
|
12712
|
-
}
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
this.
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
this.
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
}
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
},
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
}
|
|
12966
|
-
return
|
|
12967
|
-
},
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
}
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
return;
|
|
13053
|
-
}
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
}
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
if (
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
}
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
12492
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12493
|
+
if (kind === "a" && !f)
|
|
12494
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
12495
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12496
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12497
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12498
|
+
};
|
|
12499
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12500
|
+
if (kind === "m")
|
|
12501
|
+
throw new TypeError("Private method is not writable");
|
|
12502
|
+
if (kind === "a" && !f)
|
|
12503
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
12504
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12505
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
12506
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12507
|
+
};
|
|
12508
|
+
var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases, _KupPlanner_storedSettings, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_handleOnContextMenuOnTask, _KupPlanner_handleOnContextMenuOnPhase, _KupPlanner_handleOnContextMenuOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter, _KupPlanner_getFilteredRows, _KupPlanner_getIconUrl, _KupPlanner_getIconColor;
|
|
12509
|
+
const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends HTMLElement {
|
|
12510
|
+
constructor() {
|
|
12511
|
+
super();
|
|
12512
|
+
this.__registerHost();
|
|
12513
|
+
this.__attachShadow();
|
|
12514
|
+
this.kupClick = createEvent(this, "kup-planner-click", 6);
|
|
12515
|
+
this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
|
|
12516
|
+
this.kupReady = createEvent(this, "kup-planner-ready", 6);
|
|
12517
|
+
this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
|
|
12518
|
+
this.kupDidUnload = createEvent(this, "kup-planner-didunload", 6);
|
|
12519
|
+
_KupPlanner_instances.add(this);
|
|
12520
|
+
this.state = new KupPlannerState();
|
|
12521
|
+
/*-------------------------------------------------*/
|
|
12522
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
12523
|
+
/*-------------------------------------------------*/
|
|
12524
|
+
_KupPlanner_kupManager.set(this, kupManagerInstance());
|
|
12525
|
+
_KupPlanner_lastOnChangeReceived.set(this, void 0);
|
|
12526
|
+
_KupPlanner_rootPlanner.set(this, void 0);
|
|
12527
|
+
_KupPlanner_phases.set(this, {});
|
|
12528
|
+
// no re-render
|
|
12529
|
+
_KupPlanner_storedSettings.set(this, void 0);
|
|
12530
|
+
this.stateId = '';
|
|
12531
|
+
this.store = undefined;
|
|
12532
|
+
this.customStyle = '';
|
|
12533
|
+
this.data = undefined;
|
|
12534
|
+
this.detailData = undefined;
|
|
12535
|
+
this.detailColorCol = undefined;
|
|
12536
|
+
this.detailColumns = undefined;
|
|
12537
|
+
this.detailDates = undefined;
|
|
12538
|
+
this.detailFilter = undefined;
|
|
12539
|
+
this.detailHeight = undefined;
|
|
12540
|
+
this.detailIconCol = undefined;
|
|
12541
|
+
this.detailIdCol = undefined;
|
|
12542
|
+
this.detailNameCol = undefined;
|
|
12543
|
+
this.detailPrevDates = undefined;
|
|
12544
|
+
this.detailInitialScrollX = undefined;
|
|
12545
|
+
this.detailInitialScrollY = undefined;
|
|
12546
|
+
this.listCellWidth = '300px';
|
|
12547
|
+
this.maxWidth = '90vw';
|
|
12548
|
+
this.phaseColorCol = undefined;
|
|
12549
|
+
this.phaseColumns = undefined;
|
|
12550
|
+
this.phaseColParDep = undefined;
|
|
12551
|
+
this.phaseDates = undefined;
|
|
12552
|
+
this.phaseIconCol = undefined;
|
|
12553
|
+
this.phaseIdCol = undefined;
|
|
12554
|
+
this.phaseNameCol = undefined;
|
|
12555
|
+
this.phasePrevDates = undefined;
|
|
12556
|
+
this.readOnly = false;
|
|
12557
|
+
this.showSecondaryDates = false;
|
|
12558
|
+
this.taskColumns = undefined;
|
|
12559
|
+
this.taskDates = undefined;
|
|
12560
|
+
this.taskFilter = undefined;
|
|
12561
|
+
this.taskHeight = undefined;
|
|
12562
|
+
this.taskIconCol = undefined;
|
|
12563
|
+
this.taskIdCol = undefined;
|
|
12564
|
+
this.taskInitialScrollX = undefined;
|
|
12565
|
+
this.taskInitialScrollY = undefined;
|
|
12566
|
+
this.taskNameCol = undefined;
|
|
12567
|
+
this.taskPrevDates = undefined;
|
|
12568
|
+
this.titleMess = undefined;
|
|
12569
|
+
this.viewMode = 'month';
|
|
12570
|
+
this.plannerProps = undefined;
|
|
12571
|
+
}
|
|
12572
|
+
initWithPersistedState() {
|
|
12573
|
+
if (this.store && this.stateId) {
|
|
12574
|
+
const state = this.store.getState(this.stateId);
|
|
12575
|
+
if (state != null) {
|
|
12576
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
12577
|
+
// *** PROPS ***
|
|
12578
|
+
this.detailFilter = state.detailFilter;
|
|
12579
|
+
this.showSecondaryDates = state.showSecondaryDates;
|
|
12580
|
+
this.detailInitialScrollX = state.detailInitialScrollX;
|
|
12581
|
+
this.detailInitialScrollY = state.detailInitialScrollY;
|
|
12582
|
+
this.taskFilter = state.taskFilter;
|
|
12583
|
+
this.taskInitialScrollX = state.taskInitialScrollX;
|
|
12584
|
+
this.taskInitialScrollY = state.taskInitialScrollY;
|
|
12585
|
+
this.viewMode = state.viewMode;
|
|
12586
|
+
}
|
|
12587
|
+
}
|
|
12588
|
+
}
|
|
12589
|
+
persistState() {
|
|
12590
|
+
if (this.store && this.stateId) {
|
|
12591
|
+
let somethingChanged = false;
|
|
12592
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter)) {
|
|
12593
|
+
this.state.detailFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter;
|
|
12594
|
+
somethingChanged = true;
|
|
12595
|
+
}
|
|
12596
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.showSecondaryDates, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates)) {
|
|
12597
|
+
this.state.showSecondaryDates =
|
|
12598
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates;
|
|
12599
|
+
somethingChanged = true;
|
|
12600
|
+
}
|
|
12601
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX)) {
|
|
12602
|
+
this.state.detailInitialScrollX =
|
|
12603
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
|
|
12604
|
+
somethingChanged = true;
|
|
12605
|
+
}
|
|
12606
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY)) {
|
|
12607
|
+
this.state.detailInitialScrollY =
|
|
12608
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
|
|
12609
|
+
somethingChanged = true;
|
|
12610
|
+
}
|
|
12611
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter)) {
|
|
12612
|
+
this.state.taskFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter;
|
|
12613
|
+
somethingChanged = true;
|
|
12614
|
+
}
|
|
12615
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX)) {
|
|
12616
|
+
this.state.taskInitialScrollX =
|
|
12617
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
|
|
12618
|
+
somethingChanged = true;
|
|
12619
|
+
}
|
|
12620
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY)) {
|
|
12621
|
+
this.state.taskInitialScrollY =
|
|
12622
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
|
|
12623
|
+
somethingChanged = true;
|
|
12624
|
+
}
|
|
12625
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.viewMode, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode)) {
|
|
12626
|
+
this.state.viewMode = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode;
|
|
12627
|
+
somethingChanged = true;
|
|
12628
|
+
}
|
|
12629
|
+
if (somethingChanged) {
|
|
12630
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
12631
|
+
this.store.persistState(this.stateId, this.state);
|
|
12632
|
+
}
|
|
12633
|
+
}
|
|
12634
|
+
}
|
|
12635
|
+
dataChanged() {
|
|
12636
|
+
__classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
|
|
12637
|
+
}
|
|
12638
|
+
/*-------------------------------------------------*/
|
|
12639
|
+
/* P u b l i c M e t h o d s */
|
|
12640
|
+
/*-------------------------------------------------*/
|
|
12641
|
+
/**
|
|
12642
|
+
* Used to retrieve component's props values.
|
|
12643
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
12644
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
12645
|
+
*/
|
|
12646
|
+
async getProps(descriptions) {
|
|
12647
|
+
return getProps(this, KupPlannerProps, descriptions);
|
|
12648
|
+
}
|
|
12649
|
+
/**
|
|
12650
|
+
* This method is used to trigger a new render of the component.
|
|
12651
|
+
*/
|
|
12652
|
+
async refresh() {
|
|
12653
|
+
forceUpdate(this);
|
|
12654
|
+
}
|
|
12655
|
+
/**
|
|
12656
|
+
* Sets the props to the component.
|
|
12657
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
12658
|
+
*/
|
|
12659
|
+
async setProps(props) {
|
|
12660
|
+
setProps(this, KupPlannerProps, props);
|
|
12661
|
+
}
|
|
12662
|
+
/**
|
|
12663
|
+
* Add a list of phases to the project
|
|
12664
|
+
* @param taskId
|
|
12665
|
+
* @param data - Matrix which contains project phases
|
|
12666
|
+
*/
|
|
12667
|
+
async addPhases(taskId, data) {
|
|
12668
|
+
var _a;
|
|
12669
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
12670
|
+
if (task) {
|
|
12671
|
+
__classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
|
|
12672
|
+
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) => {
|
|
12673
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
12674
|
+
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
12675
|
+
? '#START#'
|
|
12676
|
+
: col == this.phaseDates[1]
|
|
12677
|
+
? '#END#'
|
|
12678
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
12679
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
|
|
12680
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
|
|
12681
|
+
let phase = {
|
|
12682
|
+
taskRow: task.taskRow,
|
|
12683
|
+
phaseRow: row,
|
|
12684
|
+
id: task.id + '_' + row.cells[this.phaseIdCol].value,
|
|
12685
|
+
phaseRowId: row.id,
|
|
12686
|
+
taskRowId: task.taskRowId,
|
|
12687
|
+
name: row.cells[this.phaseNameCol].value,
|
|
12688
|
+
startDate: datesSanitized.dateValues[0],
|
|
12689
|
+
endDate: datesSanitized.dateValues[1],
|
|
12690
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
12691
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
12692
|
+
type: 'task',
|
|
12693
|
+
color: row.cells[this.phaseColorCol].value,
|
|
12694
|
+
selectedColor: row.cells[this.phaseColorCol].value,
|
|
12695
|
+
valuesToShow: valuesToShow,
|
|
12696
|
+
rowType: KupPlannerGanttRowType.PHASE,
|
|
12697
|
+
icon: iconUrl
|
|
12698
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
12699
|
+
: undefined,
|
|
12700
|
+
};
|
|
12701
|
+
return phase;
|
|
12702
|
+
});
|
|
12703
|
+
}
|
|
12704
|
+
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
12705
|
+
}
|
|
12706
|
+
//---- Lifecycle hooks ----
|
|
12707
|
+
componentWillLoad() {
|
|
12708
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
|
|
12709
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
|
|
12710
|
+
// *** Store
|
|
12711
|
+
this.initWithPersistedState();
|
|
12712
|
+
__classPrivateFieldSet(this, _KupPlanner_storedSettings, {
|
|
12713
|
+
detailFilter: this.detailFilter,
|
|
12714
|
+
detailInitialScrollX: this.detailInitialScrollX,
|
|
12715
|
+
detailInitialScrollY: this.detailInitialScrollY,
|
|
12716
|
+
showSecondaryDates: this.showSecondaryDates,
|
|
12717
|
+
taskFilter: this.taskFilter,
|
|
12718
|
+
taskInitialScrollX: this.taskInitialScrollX,
|
|
12719
|
+
taskInitialScrollY: this.taskInitialScrollY,
|
|
12720
|
+
viewMode: this.viewMode,
|
|
12721
|
+
}, "f");
|
|
12722
|
+
}
|
|
12723
|
+
componentDidLoad() {
|
|
12724
|
+
let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter, true));
|
|
12725
|
+
const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
|
|
12726
|
+
FTextFieldMDC(mainFilter);
|
|
12727
|
+
const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
|
|
12728
|
+
if (details) {
|
|
12729
|
+
FTextFieldMDC(secondaryFilter);
|
|
12730
|
+
}
|
|
12731
|
+
// timeout for scroll events
|
|
12732
|
+
let scrollXTimeout;
|
|
12733
|
+
let taskScrollYTimeout;
|
|
12734
|
+
let detailScrollYTimeout;
|
|
12735
|
+
const scrollDelay = 1500;
|
|
12736
|
+
this.plannerProps = {
|
|
12737
|
+
mainGantt: {
|
|
12738
|
+
title: this.titleMess,
|
|
12739
|
+
items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter, false)),
|
|
12740
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
12741
|
+
filter: mainFilter,
|
|
12742
|
+
hideLabel: true,
|
|
12743
|
+
ganttHeight: this.taskHeight,
|
|
12744
|
+
showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates,
|
|
12745
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
12746
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
12747
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
12748
|
+
initialScrollX: this.taskInitialScrollX,
|
|
12749
|
+
initialScrollY: this.taskInitialScrollY,
|
|
12750
|
+
readOnly: this.readOnly,
|
|
12751
|
+
onScrollY: (y) => {
|
|
12752
|
+
window.clearTimeout(taskScrollYTimeout);
|
|
12753
|
+
taskScrollYTimeout = window.setTimeout(() => this.handleTaskGanttScrollY(y), scrollDelay);
|
|
12754
|
+
},
|
|
12755
|
+
},
|
|
12756
|
+
secondaryGantt: details
|
|
12757
|
+
? {
|
|
12758
|
+
title: '',
|
|
12759
|
+
items: details,
|
|
12760
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
12761
|
+
filter: secondaryFilter,
|
|
12762
|
+
hideLabel: true,
|
|
12763
|
+
ganttHeight: this.detailHeight,
|
|
12764
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
12765
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
12766
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
12767
|
+
initialScrollX: this.detailInitialScrollX,
|
|
12768
|
+
initialScrollY: this.detailInitialScrollY,
|
|
12769
|
+
readOnly: this.readOnly,
|
|
12770
|
+
onScrollY: (y) => {
|
|
12771
|
+
window.clearTimeout(detailScrollYTimeout);
|
|
12772
|
+
detailScrollYTimeout = window.setTimeout(() => this.handleDetailGanttScrollY(y), scrollDelay);
|
|
12773
|
+
},
|
|
12774
|
+
}
|
|
12775
|
+
: undefined,
|
|
12776
|
+
onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
|
|
12777
|
+
onSetViewMode: (value) => this.handleOnSetViewMode(value),
|
|
12778
|
+
viewMode: this.viewMode,
|
|
12779
|
+
onScrollX: (x) => {
|
|
12780
|
+
window.clearTimeout(scrollXTimeout);
|
|
12781
|
+
scrollXTimeout = window.setTimeout(() => this.handleOnScrollX(x), scrollDelay);
|
|
12782
|
+
},
|
|
12783
|
+
};
|
|
12784
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
12785
|
+
this.kupReady.emit({
|
|
12786
|
+
comp: this,
|
|
12787
|
+
id: this.rootElement.id,
|
|
12788
|
+
value: undefined,
|
|
12789
|
+
});
|
|
12790
|
+
if (this.taskFilter) {
|
|
12791
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.taskFilter);
|
|
12792
|
+
}
|
|
12793
|
+
if (this.detailFilter) {
|
|
12794
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.detailFilter, true);
|
|
12795
|
+
}
|
|
12796
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
|
|
12797
|
+
}
|
|
12798
|
+
componentWillRender() {
|
|
12799
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
12800
|
+
}
|
|
12801
|
+
componentDidRender() {
|
|
12802
|
+
this.persistState();
|
|
12803
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
|
|
12804
|
+
}
|
|
12805
|
+
onKupClick(event, taskAction) {
|
|
12806
|
+
this.kupClick.emit({
|
|
12807
|
+
comp: this,
|
|
12808
|
+
id: this.rootElement.id,
|
|
12809
|
+
value: event,
|
|
12810
|
+
taskAction: taskAction,
|
|
12811
|
+
});
|
|
12812
|
+
}
|
|
12813
|
+
onKupContextMenu(event, ganttRow, taskAction) {
|
|
12814
|
+
let row;
|
|
12815
|
+
let cell;
|
|
12816
|
+
let column;
|
|
12817
|
+
switch (ganttRow.type) {
|
|
12818
|
+
case 'project': {
|
|
12819
|
+
row = ganttRow.taskRow;
|
|
12820
|
+
cell = row.cells[this.taskIdCol];
|
|
12821
|
+
column = this.data.columns[this.taskIdCol];
|
|
12822
|
+
break;
|
|
12823
|
+
}
|
|
12824
|
+
case 'task': {
|
|
12825
|
+
row = ganttRow.phaseRow;
|
|
12826
|
+
cell = row.cells[this.phaseIdCol];
|
|
12827
|
+
//column = this.data.columns[this.taskIdCol];
|
|
12828
|
+
break;
|
|
12829
|
+
}
|
|
12830
|
+
case 'timeline': {
|
|
12831
|
+
row = ganttRow.detailRow;
|
|
12832
|
+
cell = row.cells[this.detailIdCol];
|
|
12833
|
+
column = this.data.columns[this.detailIdCol];
|
|
12834
|
+
break;
|
|
12835
|
+
}
|
|
12836
|
+
}
|
|
12837
|
+
this.kupContextMenu.emit({
|
|
12838
|
+
comp: this,
|
|
12839
|
+
id: this.rootElement.id,
|
|
12840
|
+
value: ganttRow,
|
|
12841
|
+
taskAction: taskAction,
|
|
12842
|
+
details: {
|
|
12843
|
+
cell: cell,
|
|
12844
|
+
column: column,
|
|
12845
|
+
originalEvent: event,
|
|
12846
|
+
row: row,
|
|
12847
|
+
},
|
|
12848
|
+
});
|
|
12849
|
+
}
|
|
12850
|
+
onKupDateChange(event, taskAction) {
|
|
12851
|
+
this.kupDateChange.emit({
|
|
12852
|
+
comp: this,
|
|
12853
|
+
id: this.rootElement.id,
|
|
12854
|
+
value: event,
|
|
12855
|
+
taskAction: taskAction,
|
|
12856
|
+
});
|
|
12857
|
+
}
|
|
12858
|
+
handleOnClick(nativeEvent) {
|
|
12859
|
+
switch (nativeEvent.rowType) {
|
|
12860
|
+
case KupPlannerGanttRowType.TASK:
|
|
12861
|
+
const taskAction = nativeEvent.phases
|
|
12862
|
+
? KupPlannerTaskAction.onTaskClosing
|
|
12863
|
+
: KupPlannerTaskAction.onTaskOpening;
|
|
12864
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
|
|
12865
|
+
this.onKupClick(nativeEvent, taskAction);
|
|
12866
|
+
}
|
|
12867
|
+
break;
|
|
12868
|
+
case KupPlannerGanttRowType.PHASE:
|
|
12869
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
12870
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
12871
|
+
}
|
|
12872
|
+
break;
|
|
12873
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
12874
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
12875
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
12876
|
+
}
|
|
12877
|
+
break;
|
|
12878
|
+
}
|
|
12879
|
+
}
|
|
12880
|
+
handleOnContextMenu(event, row) {
|
|
12881
|
+
switch (row.rowType) {
|
|
12882
|
+
case KupPlannerGanttRowType.TASK:
|
|
12883
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
|
|
12884
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12885
|
+
}
|
|
12886
|
+
break;
|
|
12887
|
+
case KupPlannerGanttRowType.PHASE:
|
|
12888
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
|
|
12889
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12890
|
+
}
|
|
12891
|
+
break;
|
|
12892
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
12893
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
|
|
12894
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12895
|
+
}
|
|
12896
|
+
break;
|
|
12897
|
+
}
|
|
12898
|
+
}
|
|
12899
|
+
handleOnSetDoubleView(checked) {
|
|
12900
|
+
var _a;
|
|
12901
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates = checked;
|
|
12902
|
+
if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
|
|
12903
|
+
this.plannerProps.mainGantt.showSecondaryDates = checked;
|
|
12904
|
+
}
|
|
12905
|
+
this.persistState();
|
|
12906
|
+
}
|
|
12907
|
+
handleOnSetViewMode(value) {
|
|
12908
|
+
var _a;
|
|
12909
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode = value;
|
|
12910
|
+
if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
|
|
12911
|
+
this.plannerProps.mainGantt.viewMode = value;
|
|
12912
|
+
}
|
|
12913
|
+
this.persistState();
|
|
12914
|
+
}
|
|
12915
|
+
handleOnScrollX(x) {
|
|
12916
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX = x;
|
|
12917
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX = x;
|
|
12918
|
+
this.persistState();
|
|
12919
|
+
}
|
|
12920
|
+
handleTaskGanttScrollY(y) {
|
|
12921
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY = y;
|
|
12922
|
+
this.persistState();
|
|
12923
|
+
}
|
|
12924
|
+
handleDetailGanttScrollY(y) {
|
|
12925
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY = y;
|
|
12926
|
+
this.persistState();
|
|
12927
|
+
}
|
|
12928
|
+
handleOnDateChange(nativeEvent) {
|
|
12929
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
|
|
12930
|
+
if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
|
|
12931
|
+
this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
|
|
12932
|
+
}
|
|
12933
|
+
}
|
|
12934
|
+
}
|
|
12935
|
+
render() {
|
|
12936
|
+
var _a;
|
|
12937
|
+
return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } }), h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
12938
|
+
if (e.key === 'Enter') {
|
|
12939
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value);
|
|
12940
|
+
}
|
|
12941
|
+
}, value: this.taskFilter, wrapperClass: "filter" }), ((_a = this.detailData) === null || _a === void 0 ? void 0 : _a.rows) && this.detailData.rows.length > 0 ? (h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "secondary-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
12942
|
+
if (e.key === 'Enter') {
|
|
12943
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value, true);
|
|
12944
|
+
}
|
|
12945
|
+
}, value: this.detailFilter, wrapperClass: "filter" })) : null));
|
|
12946
|
+
}
|
|
12947
|
+
disconnectedCallback() {
|
|
12948
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
|
|
12949
|
+
this.kupDidUnload.emit({
|
|
12950
|
+
comp: this,
|
|
12951
|
+
id: this.rootElement.id,
|
|
12952
|
+
storedSettings: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f"),
|
|
12953
|
+
});
|
|
12954
|
+
}
|
|
12955
|
+
get rootElement() { return this; }
|
|
12956
|
+
static get watchers() { return {
|
|
12957
|
+
"data": ["dataChanged"]
|
|
12958
|
+
}; }
|
|
12959
|
+
static get style() { return kupPlannerCss; }
|
|
12960
|
+
}, [1, "kup-planner", {
|
|
12961
|
+
"stateId": [1, "state-id"],
|
|
12962
|
+
"store": [16],
|
|
12963
|
+
"customStyle": [1, "custom-style"],
|
|
12964
|
+
"data": [16],
|
|
12965
|
+
"detailData": [16],
|
|
12966
|
+
"detailColorCol": [1, "detail-color-col"],
|
|
12967
|
+
"detailColumns": [16],
|
|
12968
|
+
"detailDates": [16],
|
|
12969
|
+
"detailFilter": [1, "detail-filter"],
|
|
12970
|
+
"detailHeight": [2, "detail-height"],
|
|
12971
|
+
"detailIconCol": [1, "detail-icon-col"],
|
|
12972
|
+
"detailIdCol": [1, "detail-id-col"],
|
|
12973
|
+
"detailNameCol": [1, "detail-name-col"],
|
|
12974
|
+
"detailPrevDates": [16],
|
|
12975
|
+
"detailInitialScrollX": [2, "detail-initial-scroll-x"],
|
|
12976
|
+
"detailInitialScrollY": [2, "detail-initial-scroll-y"],
|
|
12977
|
+
"listCellWidth": [1, "list-cell-width"],
|
|
12978
|
+
"maxWidth": [1, "max-width"],
|
|
12979
|
+
"phaseColorCol": [1, "phase-color-col"],
|
|
12980
|
+
"phaseColumns": [16],
|
|
12981
|
+
"phaseColParDep": [1, "phase-col-par-dep"],
|
|
12982
|
+
"phaseDates": [16],
|
|
12983
|
+
"phaseIconCol": [1, "phase-icon-col"],
|
|
12984
|
+
"phaseIdCol": [1, "phase-id-col"],
|
|
12985
|
+
"phaseNameCol": [1, "phase-name-col"],
|
|
12986
|
+
"phasePrevDates": [16],
|
|
12987
|
+
"readOnly": [4, "read-only"],
|
|
12988
|
+
"showSecondaryDates": [4, "show-secondary-dates"],
|
|
12989
|
+
"taskColumns": [16],
|
|
12990
|
+
"taskDates": [16],
|
|
12991
|
+
"taskFilter": [1, "task-filter"],
|
|
12992
|
+
"taskHeight": [2, "task-height"],
|
|
12993
|
+
"taskIconCol": [1, "task-icon-col"],
|
|
12994
|
+
"taskIdCol": [1, "task-id-col"],
|
|
12995
|
+
"taskInitialScrollX": [2, "task-initial-scroll-x"],
|
|
12996
|
+
"taskInitialScrollY": [2, "task-initial-scroll-y"],
|
|
12997
|
+
"taskNameCol": [1, "task-name-col"],
|
|
12998
|
+
"taskPrevDates": [16],
|
|
12999
|
+
"titleMess": [1, "title-mess"],
|
|
13000
|
+
"viewMode": [1, "view-mode"],
|
|
13001
|
+
"plannerProps": [32],
|
|
13002
|
+
"getProps": [64],
|
|
13003
|
+
"refresh": [64],
|
|
13004
|
+
"setProps": [64],
|
|
13005
|
+
"addPhases": [64]
|
|
13006
|
+
}]);
|
|
13007
|
+
_KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_storedSettings = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
|
|
13008
|
+
var _a;
|
|
13009
|
+
(_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
13010
|
+
const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
|
|
13011
|
+
if (componentWrapperElement) {
|
|
13012
|
+
__classPrivateFieldSet(this, _KupPlanner_rootPlanner, client.createRoot(componentWrapperElement), "f");
|
|
13013
|
+
__classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(react.createElement(Planner, this.plannerProps));
|
|
13014
|
+
}
|
|
13015
|
+
}, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
|
|
13016
|
+
var _a;
|
|
13017
|
+
if (!data || !data.rows) {
|
|
13018
|
+
return [];
|
|
13019
|
+
}
|
|
13020
|
+
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) => {
|
|
13021
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
|
|
13022
|
+
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
|
|
13023
|
+
? '#START#'
|
|
13024
|
+
: col == this.taskDates[1]
|
|
13025
|
+
? '#END#'
|
|
13026
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
13027
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
|
|
13028
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
|
|
13029
|
+
let task = {
|
|
13030
|
+
taskRow: row,
|
|
13031
|
+
taskRowId: row.id,
|
|
13032
|
+
id: row.cells[this.taskIdCol].value,
|
|
13033
|
+
name: row.cells[this.taskNameCol].value,
|
|
13034
|
+
startDate: datesSanitized.dateValues[0],
|
|
13035
|
+
endDate: datesSanitized.dateValues[1],
|
|
13036
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
13037
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
13038
|
+
type: 'project',
|
|
13039
|
+
valuesToShow: valuesToShow,
|
|
13040
|
+
rowType: KupPlannerGanttRowType.TASK,
|
|
13041
|
+
icon: iconUrl
|
|
13042
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
13043
|
+
: undefined,
|
|
13044
|
+
};
|
|
13045
|
+
return task;
|
|
13046
|
+
});
|
|
13047
|
+
return tasks;
|
|
13048
|
+
}, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
|
|
13049
|
+
if (!data || !data.rows) {
|
|
13050
|
+
return undefined;
|
|
13051
|
+
}
|
|
13052
|
+
let details = [];
|
|
13053
|
+
data.rows
|
|
13054
|
+
.filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
|
|
13055
|
+
.forEach((row) => {
|
|
13056
|
+
var _a, _b;
|
|
13057
|
+
const detailId = row.cells[this.detailIdCol].value;
|
|
13058
|
+
const detailNameId = row.cells[this.detailNameCol].value;
|
|
13059
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
13060
|
+
const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
|
|
13061
|
+
let detail = details.find((det) => det.id == detailId);
|
|
13062
|
+
if (!detail) {
|
|
13063
|
+
detail = {
|
|
13064
|
+
id: detailId,
|
|
13065
|
+
name: detailNameId,
|
|
13066
|
+
detailRow: row,
|
|
13067
|
+
type: 'timeline',
|
|
13068
|
+
valuesToShow: valuesToShow,
|
|
13069
|
+
rowType: KupPlannerGanttRowType.DETAIL,
|
|
13070
|
+
schedule: [],
|
|
13071
|
+
};
|
|
13072
|
+
details.push(detail);
|
|
13073
|
+
}
|
|
13074
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
|
|
13075
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
|
|
13076
|
+
detail.schedule.push({
|
|
13077
|
+
startDate: datesSanitized.dateValues[0],
|
|
13078
|
+
endDate: datesSanitized.dateValues[1],
|
|
13079
|
+
color: this.detailColorCol
|
|
13080
|
+
? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
|
|
13081
|
+
: '#D9D9D8',
|
|
13082
|
+
selectedColor: this.detailColorCol
|
|
13083
|
+
? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
|
|
13084
|
+
: '#D9D9D8',
|
|
13085
|
+
icon: iconUrl
|
|
13086
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
13087
|
+
: undefined,
|
|
13088
|
+
});
|
|
13089
|
+
});
|
|
13090
|
+
return details;
|
|
13091
|
+
}, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
|
|
13092
|
+
return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
|
|
13093
|
+
}, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
|
|
13094
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
13095
|
+
if (task)
|
|
13096
|
+
task.phases = undefined;
|
|
13097
|
+
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
13098
|
+
}, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
|
|
13099
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
|
|
13100
|
+
if (task === null || task === void 0 ? void 0 : task.phases) {
|
|
13101
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
|
|
13102
|
+
}
|
|
13103
|
+
return true;
|
|
13104
|
+
}, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
|
|
13105
|
+
return true;
|
|
13106
|
+
}, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
|
|
13107
|
+
return true;
|
|
13108
|
+
}, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
|
|
13109
|
+
return true;
|
|
13110
|
+
}, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
|
|
13111
|
+
return true;
|
|
13112
|
+
}, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
|
|
13113
|
+
return true;
|
|
13114
|
+
}, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
|
|
13115
|
+
let emitEvent = false;
|
|
13116
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
|
|
13117
|
+
emitEvent = true;
|
|
13118
|
+
__classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
|
|
13119
|
+
}
|
|
13120
|
+
else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
|
|
13121
|
+
__classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
|
|
13122
|
+
emitEvent = true;
|
|
13123
|
+
}
|
|
13124
|
+
return emitEvent;
|
|
13125
|
+
}, _KupPlanner_onFilter = function _KupPlanner_onFilter(value, isDetail) {
|
|
13126
|
+
if (isDetail) {
|
|
13127
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter = value;
|
|
13128
|
+
}
|
|
13129
|
+
else {
|
|
13130
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter = value;
|
|
13131
|
+
}
|
|
13132
|
+
const newGantt = isDetail
|
|
13133
|
+
? {
|
|
13134
|
+
secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, value, isDetail)) }),
|
|
13135
|
+
}
|
|
13136
|
+
: {
|
|
13137
|
+
mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, value, isDetail)) }),
|
|
13138
|
+
};
|
|
13139
|
+
this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
|
|
13140
|
+
this.persistState();
|
|
13141
|
+
}, _KupPlanner_getFilteredRows = function _KupPlanner_getFilteredRows(value, isDetail) {
|
|
13142
|
+
const data = isDetail ? this.detailData : this.data;
|
|
13143
|
+
if (!data || !data.rows || data.rows.length == 0) {
|
|
13144
|
+
return undefined;
|
|
13145
|
+
}
|
|
13146
|
+
if (!value) {
|
|
13147
|
+
return data;
|
|
13148
|
+
}
|
|
13149
|
+
const tempData = {
|
|
13150
|
+
columns: this.data.columns,
|
|
13151
|
+
rows: [],
|
|
13152
|
+
};
|
|
13153
|
+
const tempRows = [];
|
|
13154
|
+
for (let index = 0; index < data.rows.length; index++) {
|
|
13155
|
+
const row = data.rows[index];
|
|
13156
|
+
const cells = row.cells;
|
|
13157
|
+
for (let index = 0; index < data.columns.length; index++) {
|
|
13158
|
+
const column = data.columns[index];
|
|
13159
|
+
const cell = cells[column.name];
|
|
13160
|
+
if (cell) {
|
|
13161
|
+
const dValue = getCellValueForDisplay(data.columns[index], cell);
|
|
13162
|
+
const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
|
|
13163
|
+
if (found) {
|
|
13164
|
+
tempRows.push({ row, weight: index });
|
|
13165
|
+
break;
|
|
13166
|
+
}
|
|
13167
|
+
}
|
|
13168
|
+
}
|
|
13169
|
+
}
|
|
13170
|
+
tempRows
|
|
13171
|
+
.sort((a, b) => a.weight - b.weight)
|
|
13172
|
+
.forEach((tempRow) => {
|
|
13173
|
+
tempData.rows.push(tempRow.row);
|
|
13174
|
+
});
|
|
13175
|
+
return tempData;
|
|
13176
|
+
}, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
|
|
13177
|
+
var _a;
|
|
13178
|
+
let iconUrl = undefined;
|
|
13179
|
+
if (columnName) {
|
|
13180
|
+
const iconCell = row.cells[columnName];
|
|
13181
|
+
let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
|
|
13182
|
+
if (!icon) {
|
|
13183
|
+
icon = iconCell.value;
|
|
13184
|
+
}
|
|
13185
|
+
if (icon) {
|
|
13186
|
+
iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
|
|
13187
|
+
}
|
|
13188
|
+
}
|
|
13189
|
+
return iconUrl;
|
|
13190
|
+
}, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
|
|
13191
|
+
var _a;
|
|
13192
|
+
let iconColor = undefined;
|
|
13193
|
+
if (columnName) {
|
|
13194
|
+
const iconCell = row.cells[columnName];
|
|
13195
|
+
iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
|
|
13196
|
+
if (iconColor) {
|
|
13197
|
+
iconColor =
|
|
13198
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
|
|
13199
|
+
}
|
|
13200
|
+
}
|
|
13201
|
+
return iconColor;
|
|
13202
|
+
};
|
|
13203
|
+
function defineCustomElement$1() {
|
|
13204
|
+
if (typeof customElements === "undefined") {
|
|
13205
|
+
return;
|
|
13206
|
+
}
|
|
13207
|
+
const components = ["kup-planner", "kup-autocomplete", "kup-badge", "kup-button", "kup-button-list", "kup-card", "kup-chart", "kup-checkbox", "kup-chip", "kup-color-picker", "kup-combobox", "kup-data-table", "kup-date-picker", "kup-dialog", "kup-dropdown-button", "kup-form", "kup-gauge", "kup-image", "kup-list", "kup-progress-bar", "kup-radio", "kup-rating", "kup-spinner", "kup-switch", "kup-tab-bar", "kup-text-field", "kup-time-picker", "kup-tree"];
|
|
13208
|
+
components.forEach(tagName => { switch (tagName) {
|
|
13209
|
+
case "kup-planner":
|
|
13210
|
+
if (!customElements.get(tagName)) {
|
|
13211
|
+
customElements.define(tagName, KupPlanner$1);
|
|
13212
|
+
}
|
|
13213
|
+
break;
|
|
13214
|
+
case "kup-autocomplete":
|
|
13215
|
+
if (!customElements.get(tagName)) {
|
|
13216
|
+
defineCustomElement$s();
|
|
13217
|
+
}
|
|
13218
|
+
break;
|
|
13219
|
+
case "kup-badge":
|
|
13220
|
+
if (!customElements.get(tagName)) {
|
|
13221
|
+
defineCustomElement$r();
|
|
13222
|
+
}
|
|
13223
|
+
break;
|
|
13224
|
+
case "kup-button":
|
|
13225
|
+
if (!customElements.get(tagName)) {
|
|
13226
|
+
defineCustomElement$q();
|
|
13227
|
+
}
|
|
13228
|
+
break;
|
|
13229
|
+
case "kup-button-list":
|
|
13230
|
+
if (!customElements.get(tagName)) {
|
|
13231
|
+
defineCustomElement$p();
|
|
13232
|
+
}
|
|
13233
|
+
break;
|
|
13234
|
+
case "kup-card":
|
|
13235
|
+
if (!customElements.get(tagName)) {
|
|
13236
|
+
defineCustomElement$o();
|
|
13237
|
+
}
|
|
13238
|
+
break;
|
|
13239
|
+
case "kup-chart":
|
|
13240
|
+
if (!customElements.get(tagName)) {
|
|
13241
|
+
defineCustomElement$n();
|
|
13242
|
+
}
|
|
13243
|
+
break;
|
|
13244
|
+
case "kup-checkbox":
|
|
13245
|
+
if (!customElements.get(tagName)) {
|
|
13246
|
+
defineCustomElement$m();
|
|
13247
|
+
}
|
|
13248
|
+
break;
|
|
13249
|
+
case "kup-chip":
|
|
13250
|
+
if (!customElements.get(tagName)) {
|
|
13251
|
+
defineCustomElement$l();
|
|
13252
|
+
}
|
|
13253
|
+
break;
|
|
13254
|
+
case "kup-color-picker":
|
|
13255
|
+
if (!customElements.get(tagName)) {
|
|
13256
|
+
defineCustomElement$k();
|
|
13257
|
+
}
|
|
13258
|
+
break;
|
|
13259
|
+
case "kup-combobox":
|
|
13260
|
+
if (!customElements.get(tagName)) {
|
|
13261
|
+
defineCustomElement$j();
|
|
13262
|
+
}
|
|
13263
|
+
break;
|
|
13264
|
+
case "kup-data-table":
|
|
13265
|
+
if (!customElements.get(tagName)) {
|
|
13266
|
+
defineCustomElement$i();
|
|
13267
|
+
}
|
|
13268
|
+
break;
|
|
13269
|
+
case "kup-date-picker":
|
|
13270
|
+
if (!customElements.get(tagName)) {
|
|
13271
|
+
defineCustomElement$h();
|
|
13272
|
+
}
|
|
13273
|
+
break;
|
|
13274
|
+
case "kup-dialog":
|
|
13275
|
+
if (!customElements.get(tagName)) {
|
|
13276
|
+
defineCustomElement$g();
|
|
13277
|
+
}
|
|
13278
|
+
break;
|
|
13279
|
+
case "kup-dropdown-button":
|
|
13280
|
+
if (!customElements.get(tagName)) {
|
|
13281
|
+
defineCustomElement$f();
|
|
13282
|
+
}
|
|
13283
|
+
break;
|
|
13284
|
+
case "kup-form":
|
|
13285
|
+
if (!customElements.get(tagName)) {
|
|
13286
|
+
defineCustomElement$e();
|
|
13287
|
+
}
|
|
13288
|
+
break;
|
|
13289
|
+
case "kup-gauge":
|
|
13290
|
+
if (!customElements.get(tagName)) {
|
|
13291
|
+
defineCustomElement$d();
|
|
13292
|
+
}
|
|
13293
|
+
break;
|
|
13294
|
+
case "kup-image":
|
|
13295
|
+
if (!customElements.get(tagName)) {
|
|
13296
|
+
defineCustomElement$c();
|
|
13297
|
+
}
|
|
13298
|
+
break;
|
|
13299
|
+
case "kup-list":
|
|
13300
|
+
if (!customElements.get(tagName)) {
|
|
13301
|
+
defineCustomElement$b();
|
|
13302
|
+
}
|
|
13303
|
+
break;
|
|
13304
|
+
case "kup-progress-bar":
|
|
13305
|
+
if (!customElements.get(tagName)) {
|
|
13306
|
+
defineCustomElement$a();
|
|
13307
|
+
}
|
|
13308
|
+
break;
|
|
13309
|
+
case "kup-radio":
|
|
13310
|
+
if (!customElements.get(tagName)) {
|
|
13311
|
+
defineCustomElement$9();
|
|
13312
|
+
}
|
|
13313
|
+
break;
|
|
13314
|
+
case "kup-rating":
|
|
13315
|
+
if (!customElements.get(tagName)) {
|
|
13316
|
+
defineCustomElement$8();
|
|
13317
|
+
}
|
|
13318
|
+
break;
|
|
13319
|
+
case "kup-spinner":
|
|
13320
|
+
if (!customElements.get(tagName)) {
|
|
13321
|
+
defineCustomElement$7();
|
|
13322
|
+
}
|
|
13323
|
+
break;
|
|
13324
|
+
case "kup-switch":
|
|
13325
|
+
if (!customElements.get(tagName)) {
|
|
13326
|
+
defineCustomElement$6();
|
|
13327
|
+
}
|
|
13328
|
+
break;
|
|
13329
|
+
case "kup-tab-bar":
|
|
13330
|
+
if (!customElements.get(tagName)) {
|
|
13331
|
+
defineCustomElement$5();
|
|
13332
|
+
}
|
|
13333
|
+
break;
|
|
13334
|
+
case "kup-text-field":
|
|
13335
|
+
if (!customElements.get(tagName)) {
|
|
13336
|
+
defineCustomElement$4();
|
|
13337
|
+
}
|
|
13338
|
+
break;
|
|
13339
|
+
case "kup-time-picker":
|
|
13340
|
+
if (!customElements.get(tagName)) {
|
|
13341
|
+
defineCustomElement$3();
|
|
13342
|
+
}
|
|
13343
|
+
break;
|
|
13344
|
+
case "kup-tree":
|
|
13345
|
+
if (!customElements.get(tagName)) {
|
|
13346
|
+
defineCustomElement$2();
|
|
13347
|
+
}
|
|
13348
|
+
break;
|
|
13349
|
+
} });
|
|
13197
13350
|
}
|
|
13198
13351
|
|
|
13199
13352
|
const KupPlanner = KupPlanner$1;
|