@sme.up/ketchup 8.0.2 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-797c8e7f.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-9c8ed48b.js} +478 -472
- package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-cff77b2c.js} +23 -23
- package/dist/cjs/{f-chip-2249b386.js → f-chip-318863df.js} +125 -125
- package/dist/cjs/{f-image-47d74999.js → f-image-f10144e9.js} +107 -107
- package/dist/cjs/{f-paginator-utils-b0a9ae5f.js → f-paginator-utils-8c44a37b.js} +1548 -1548
- package/dist/cjs/{f-text-field-579c0fc0.js → f-text-field-9610c198.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-a9a3b467.js} +93 -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 +17557 -17508
- package/dist/cjs/kup-box.cjs.entry.js +1289 -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 +7228 -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-7747decd.js} +7287 -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 +1185 -1027
- 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/data-table.js +45 -0
- package/dist/collection/assets/echart.js +176 -0
- 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 +33 -33
- package/dist/collection/components/kup-box/kup-box-state.js +15 -15
- package/dist/collection/components/kup-box/kup-box.js +2134 -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 +157 -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.css +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +5572 -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 +53 -52
- package/dist/collection/components/kup-echart/kup-echart.js +1519 -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 +734 -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.css +2 -2
- package/dist/collection/components/kup-planner/kup-planner.js +1732 -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 +435 -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 +31821 -31763
- package/dist/components/kup-box2.js +1463 -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 +7395 -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 +1376 -1207
- 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-declarations-b1b4cac4.js → f-button-declarations-fd4965d1.js} +16 -16
- package/dist/esm/{f-button-024f0cfe.js → f-button-e0e6f65f.js} +99 -99
- package/dist/esm/{f-cell-90240a8c.js → f-cell-359dfe28.js} +478 -472
- package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-91358c27.js} +23 -23
- package/dist/esm/{f-chip-2238ad43.js → f-chip-0fd043b4.js} +125 -125
- package/dist/esm/{f-image-f2e9bf79.js → f-image-b853b0cc.js} +107 -107
- package/dist/esm/{f-paginator-utils-8cb3c023.js → f-paginator-utils-124c146a.js} +1548 -1548
- package/dist/esm/{f-text-field-d231982c.js → f-text-field-92bb3a1f.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-bb15ce14.js} +93 -25
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +199 -200
- package/dist/esm/kup-autocomplete_27.entry.js +17557 -17508
- package/dist/esm/kup-box.entry.js +1289 -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 +7228 -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-1e6ea451.js} +7288 -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 +1185 -1027
- 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-3cf64473.js → p-0143e942.js} +1 -1
- package/dist/ketchup/{p-5f3680f2.js → p-1ca9aece.js} +1 -1
- package/dist/ketchup/p-1cd5785e.entry.js +9 -0
- package/dist/ketchup/{p-410c102a.js → p-2ac2c05e.js} +1 -1
- package/dist/ketchup/{p-8b46e7ce.js → p-349d4715.js} +1 -1
- package/dist/ketchup/{p-83435e6c.entry.js → p-374f867e.entry.js} +1 -1
- package/dist/ketchup/{p-c42b80c1.entry.js → p-41c00681.entry.js} +1 -1
- package/dist/ketchup/p-5dbd4402.entry.js +1 -0
- package/dist/ketchup/{p-89743989.entry.js → p-620faa59.entry.js} +1 -1
- package/dist/ketchup/{p-10d84b1b.js → p-6507e9eb.js} +7 -6
- package/dist/ketchup/{p-a84f1d24.entry.js → p-6837f725.entry.js} +1 -1
- package/dist/ketchup/p-6d46cbb0.js +30 -0
- package/dist/ketchup/{p-e1f1e661.entry.js → p-6e79b764.entry.js} +1 -1
- package/dist/ketchup/{p-1ad628fb.entry.js → p-818a4a09.entry.js} +1 -1
- package/dist/ketchup/p-81e20baa.entry.js +1 -0
- package/dist/ketchup/p-85d6bb1f.entry.js +1 -0
- package/dist/ketchup/p-8c1804d7.entry.js +1 -0
- package/dist/ketchup/{p-163b18b9.entry.js → p-ad919f87.entry.js} +1 -1
- package/dist/ketchup/{p-651d89c8.entry.js → p-adad6804.entry.js} +1 -1
- package/dist/ketchup/{p-37067ee6.entry.js → p-adebe276.entry.js} +1 -1
- package/dist/ketchup/p-b5deb573.js +2 -0
- package/dist/ketchup/{p-f876125d.entry.js → p-b73b3b52.entry.js} +1 -1
- package/dist/ketchup/{p-0d7d59c7.entry.js → p-ba0c4019.entry.js} +1 -1
- package/dist/ketchup/p-c010483d.entry.js +25 -0
- package/dist/ketchup/p-c1b10c9c.entry.js +1 -0
- package/dist/ketchup/{p-063d4c27.entry.js → p-c28be862.entry.js} +1 -1
- package/dist/ketchup/p-c6088459.entry.js +39 -0
- package/dist/ketchup/{p-43b67de4.entry.js → p-cf24193b.entry.js} +1 -1
- package/dist/ketchup/p-e646523d.js +1 -0
- package/dist/ketchup/p-e8977116.entry.js +1 -0
- package/dist/ketchup/{p-27a56c87.js → p-fb03f2f5.js} +2 -2
- package/dist/ketchup/{p-eda7f130.js → p-fb29ba2a.js} +1 -1
- package/dist/ketchup/{p-9f9b6656.js → p-fd1323da.js} +1 -1
- 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 +113 -113
- package/dist/types/components/kup-box/kup-box-state.d.ts +10 -10
- package/dist/types/components/kup-box/kup-box.d.ts +270 -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 +258 -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 +452 -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 +63 -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 +112 -14
- 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 +3 -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-3432ebaf.entry.js +0 -9
- package/dist/ketchup/p-35b29b22.entry.js +0 -1
- package/dist/ketchup/p-36dac88e.js +0 -30
- package/dist/ketchup/p-39a55c47.js +0 -1
- 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,86 +1,92 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement, a as getAssetPath } from './index-
|
|
2
|
-
import {
|
|
3
|
-
import { c as componentWrapperId } from './GenericVariables-
|
|
4
|
-
import { F as FTextField } from './f-text-field-
|
|
5
|
-
import { F as FTextFieldMDC } from './f-text-field-mdc-
|
|
6
|
-
import './
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
KupPlannerProps["
|
|
16
|
-
KupPlannerProps["
|
|
17
|
-
KupPlannerProps["
|
|
18
|
-
KupPlannerProps["
|
|
19
|
-
KupPlannerProps["
|
|
20
|
-
KupPlannerProps["
|
|
21
|
-
KupPlannerProps["detailHeight"] = "Height for detail gantt";
|
|
22
|
-
KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
|
|
23
|
-
KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
|
|
24
|
-
KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
|
|
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
|
-
KupPlannerProps["
|
|
38
|
-
KupPlannerProps["
|
|
39
|
-
KupPlannerProps["
|
|
40
|
-
KupPlannerProps["
|
|
41
|
-
KupPlannerProps["
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement, a as getAssetPath } from './index-bb15ce14.js';
|
|
2
|
+
import { ao as createCommonjsModule, ap as commonjsGlobal, k as kupManagerInstance, h as KupDatesFormats, af as getCellValueForDisplay, g as getProps, s as setProps, K as KupThemeIconValues, I as KupLanguageSearch } from './kup-manager-1e6ea451.js';
|
|
3
|
+
import { c as componentWrapperId } from './GenericVariables-6dfdd433.js';
|
|
4
|
+
import { F as FTextField } from './f-text-field-92bb3a1f.js';
|
|
5
|
+
import { F as FTextFieldMDC } from './f-text-field-mdc-a1b4a919.js';
|
|
6
|
+
import './component-e86c51ea.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Props of the kup-gantt component.
|
|
10
|
+
* Used to export every prop in an object.
|
|
11
|
+
*/
|
|
12
|
+
var KupPlannerProps;
|
|
13
|
+
(function (KupPlannerProps) {
|
|
14
|
+
KupPlannerProps["customStyle"] = "Custom style of the component.";
|
|
15
|
+
KupPlannerProps["data"] = "Dataset containg the tasks list";
|
|
16
|
+
KupPlannerProps["detailData"] = "Dataset containg the details list";
|
|
17
|
+
KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
|
|
18
|
+
KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
|
|
19
|
+
KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
|
|
20
|
+
KupPlannerProps["detailFilter"] = "Sets the detail's filter.";
|
|
21
|
+
KupPlannerProps["detailHeight"] = "Height for detail gantt";
|
|
22
|
+
KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
|
|
23
|
+
KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
|
|
24
|
+
KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
|
|
25
|
+
KupPlannerProps["detailInitialScrollX"] = "Sets the initial scroll X for the detail.";
|
|
26
|
+
KupPlannerProps["detailInitialScrollY"] = "Sets the initial scroll Y for the detail.";
|
|
27
|
+
KupPlannerProps["listCellWidth"] = "Total size of the cells inside to the left box, near the gantt";
|
|
28
|
+
KupPlannerProps["maxWidth"] = "Max width for component";
|
|
29
|
+
KupPlannerProps["phaseColorCol"] = "Column containing the phase color in hex format";
|
|
30
|
+
KupPlannerProps["phaseColumns"] = "Columns containing informations displayed in the left box ,near the gantt of phases";
|
|
31
|
+
KupPlannerProps["phaseColParDep"] = "Column containing the name of the parent phases";
|
|
32
|
+
KupPlannerProps["phaseDates"] = "Columns containing phase duration, from (firstDate) to (secondDate)";
|
|
33
|
+
KupPlannerProps["phaseIdCol"] = "Column containing unique phase identifier";
|
|
34
|
+
KupPlannerProps["phaseNameCol"] = "Column containing phase name displayed";
|
|
35
|
+
KupPlannerProps["phasePrevDates"] = "Columns containing forecast phase duration, from (firstDate) to (secondDate)";
|
|
36
|
+
KupPlannerProps["readOnly"] = "When true, the two gantts are not interactable.";
|
|
37
|
+
KupPlannerProps["showSecondaryDates"] = "Enable/disable display of secondary dates";
|
|
38
|
+
KupPlannerProps["taskColumns"] = "Columns containing informations displayed in the left box, near the gantt";
|
|
39
|
+
KupPlannerProps["taskDates"] = "Columns containing task duration, from (firstDate) to (secondDate)";
|
|
40
|
+
KupPlannerProps["taskFilter"] = "Sets the task's filter.";
|
|
41
|
+
KupPlannerProps["taskHeight"] = "Height for main gantt";
|
|
42
|
+
KupPlannerProps["taskIdCol"] = "Column containing unique task identifier";
|
|
43
|
+
KupPlannerProps["taskNameCol"] = "Column containing task name displayed";
|
|
44
|
+
KupPlannerProps["taskPrevDates"] = "Columns containing forecast task duration, from (firstDate) to (secondDate)";
|
|
45
|
+
KupPlannerProps["taskInitialScrollX"] = "Sets the initial scroll X for the task.";
|
|
46
|
+
KupPlannerProps["taskInitialScrollY"] = "Sets the initial scroll Y for the task.";
|
|
47
|
+
KupPlannerProps["titleMess"] = "Message displayed on top";
|
|
48
|
+
})(KupPlannerProps || (KupPlannerProps = {}));
|
|
49
|
+
var KupPlannerTaskAction;
|
|
50
|
+
(function (KupPlannerTaskAction) {
|
|
51
|
+
KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
|
|
52
|
+
KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
|
|
53
|
+
KupPlannerTaskAction["onClick"] = "onClick";
|
|
54
|
+
KupPlannerTaskAction["onResize"] = "onResize";
|
|
55
|
+
KupPlannerTaskAction["onRightClick"] = "onRightClick";
|
|
56
|
+
})(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
|
|
57
|
+
var KupPlannerGanttRowType;
|
|
58
|
+
(function (KupPlannerGanttRowType) {
|
|
59
|
+
KupPlannerGanttRowType["TASK"] = "task";
|
|
60
|
+
KupPlannerGanttRowType["PHASE"] = "phase";
|
|
61
|
+
KupPlannerGanttRowType["DETAIL"] = "detail";
|
|
62
|
+
})(KupPlannerGanttRowType || (KupPlannerGanttRowType = {}));
|
|
63
|
+
class KupPlannerLastOnChangeReceived {
|
|
64
|
+
constructor(event, threshold = 100) {
|
|
65
|
+
this.dateTime = new Date();
|
|
66
|
+
this.event = event;
|
|
67
|
+
this.threshold = threshold;
|
|
68
|
+
}
|
|
69
|
+
isEquivalent(newEvent) {
|
|
70
|
+
const intervalTime = new Date().valueOf() - this.dateTime.valueOf();
|
|
71
|
+
const equals = JSON.stringify(this.event) === JSON.stringify(newEvent);
|
|
72
|
+
return equals && intervalTime < this.threshold;
|
|
73
|
+
}
|
|
74
|
+
resetDateTime() {
|
|
75
|
+
this.dateTime = new Date();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const defaultStylingOptions = {
|
|
79
|
+
listCellWidth: '300px',
|
|
80
|
+
rowHeight: 40,
|
|
81
|
+
barFill: 90,
|
|
82
|
+
projectProgressColor: '#CBCBCB',
|
|
83
|
+
projectProgressSelectedColor: '#CBCBCB',
|
|
84
|
+
projectBackgroundColor: '#CBCBCB',
|
|
85
|
+
projectBackgroundSelectedColor: '#CBCBCB',
|
|
86
|
+
barProgressColor: '#A2A415',
|
|
87
|
+
barProgressSelectedColor: '#A2A415',
|
|
88
|
+
barBackgroundColor: '#A2A415',
|
|
89
|
+
barBackgroundSelectedColor: '#A2A415',
|
|
84
90
|
};
|
|
85
91
|
|
|
86
92
|
/**
|
|
@@ -8954,25 +8960,6 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
8954
8960
|
}
|
|
8955
8961
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8956
8962
|
}
|
|
8957
|
-
|
|
8958
|
-
var ViewMode;
|
|
8959
|
-
(function (ViewMode) {
|
|
8960
|
-
ViewMode["Hour"] = "Hour";
|
|
8961
|
-
ViewMode["QuarterDay"] = "Quarter Day";
|
|
8962
|
-
ViewMode["HalfDay"] = "Half Day";
|
|
8963
|
-
ViewMode["Day"] = "Day";
|
|
8964
|
-
ViewMode["Week"] = "Week";
|
|
8965
|
-
ViewMode["Month"] = "Month";
|
|
8966
|
-
ViewMode["Year"] = "Year";
|
|
8967
|
-
})(ViewMode || (ViewMode = {}));
|
|
8968
|
-
|
|
8969
|
-
var TimeUnit;
|
|
8970
|
-
(function (TimeUnit) {
|
|
8971
|
-
TimeUnit["DAY"] = "days";
|
|
8972
|
-
TimeUnit["WEEK"] = "weeks";
|
|
8973
|
-
TimeUnit["MONTH"] = "months";
|
|
8974
|
-
TimeUnit["YEAR"] = "YEAR";
|
|
8975
|
-
})(TimeUnit || (TimeUnit = {}));
|
|
8976
8963
|
var parseToDayStart = function parseToDayStart(ymd) {
|
|
8977
8964
|
return luxon.DateTime.fromISO(ymd).toJSDate();
|
|
8978
8965
|
};
|
|
@@ -9001,211 +8988,6 @@ function validDates(startDate, endDate, _name) {
|
|
|
9001
8988
|
};
|
|
9002
8989
|
}
|
|
9003
8990
|
|
|
9004
|
-
var MAIN_GANTT_ID = "main";
|
|
9005
|
-
var SECONDARY_GANTT_ID = "secondary";
|
|
9006
|
-
var toViewMode = function toViewMode(timeUnit) {
|
|
9007
|
-
switch (timeUnit) {
|
|
9008
|
-
case TimeUnit.DAY:
|
|
9009
|
-
return ViewMode.Day;
|
|
9010
|
-
case TimeUnit.WEEK:
|
|
9011
|
-
return ViewMode.Week;
|
|
9012
|
-
case TimeUnit.MONTH:
|
|
9013
|
-
return ViewMode.Month;
|
|
9014
|
-
case TimeUnit.YEAR:
|
|
9015
|
-
return ViewMode.Year;
|
|
9016
|
-
}
|
|
9017
|
-
};
|
|
9018
|
-
var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
|
|
9019
|
-
switch (timeUnit) {
|
|
9020
|
-
case TimeUnit.YEAR:
|
|
9021
|
-
return 60 * 2;
|
|
9022
|
-
default:
|
|
9023
|
-
return 60;
|
|
9024
|
-
}
|
|
9025
|
-
};
|
|
9026
|
-
var convertPhaseToTask = function convertPhaseToTask(item) {
|
|
9027
|
-
var mapPhase = function mapPhase(_ref) {
|
|
9028
|
-
var phaseStart = _ref.startDate,
|
|
9029
|
-
phaseEnd = _ref.endDate,
|
|
9030
|
-
secondaryStartDate = _ref.secondaryStartDate,
|
|
9031
|
-
secondaryEndDate = _ref.secondaryEndDate,
|
|
9032
|
-
phaseName = _ref.name,
|
|
9033
|
-
phaseId = _ref.id,
|
|
9034
|
-
color = _ref.color,
|
|
9035
|
-
selectedColor = _ref.selectedColor,
|
|
9036
|
-
dependencies = _ref.dependencies,
|
|
9037
|
-
icon = _ref.icon;
|
|
9038
|
-
var _validDates = validDates(phaseStart, phaseEnd),
|
|
9039
|
-
start = _validDates.start,
|
|
9040
|
-
end = _validDates.end;
|
|
9041
|
-
var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
|
|
9042
|
-
phaseStart2 = _validDates2.start,
|
|
9043
|
-
phaseEnd2 = _validDates2.end;
|
|
9044
|
-
return {
|
|
9045
|
-
start: start,
|
|
9046
|
-
end: end,
|
|
9047
|
-
secondaryStart: phaseStart2,
|
|
9048
|
-
secondaryEnd: phaseEnd2,
|
|
9049
|
-
name: phaseName,
|
|
9050
|
-
valuesToShow: item.valuesToShow,
|
|
9051
|
-
id: phaseId,
|
|
9052
|
-
type: "task",
|
|
9053
|
-
progress: 100,
|
|
9054
|
-
dependencies: dependencies,
|
|
9055
|
-
styles: color ? {
|
|
9056
|
-
backgroundColor: color,
|
|
9057
|
-
progressColor: color,
|
|
9058
|
-
backgroundSelectedColor: selectedColor,
|
|
9059
|
-
progressSelectedColor: selectedColor
|
|
9060
|
-
} : {},
|
|
9061
|
-
icon: icon
|
|
9062
|
-
};
|
|
9063
|
-
};
|
|
9064
|
-
return mapPhase(item);
|
|
9065
|
-
};
|
|
9066
|
-
var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
|
|
9067
|
-
var id = item.id,
|
|
9068
|
-
name = item.name,
|
|
9069
|
-
schedule = item.schedule;
|
|
9070
|
-
var getDatesForTask = function getDatesForTask(item) {
|
|
9071
|
-
var start = mainGanttStartDate != null ? mainGanttStartDate : "";
|
|
9072
|
-
var end = mainGanttEndDate != null ? mainGanttEndDate : "";
|
|
9073
|
-
for (var i = 0; i < item.schedule.length; i++) {
|
|
9074
|
-
var lstart = item.schedule[i].startDate;
|
|
9075
|
-
var lend = item.schedule[i].endDate;
|
|
9076
|
-
if (!start || lstart.localeCompare(start) < 0) {
|
|
9077
|
-
start = lstart;
|
|
9078
|
-
}
|
|
9079
|
-
if (!end || lend.localeCompare(end) > 0) {
|
|
9080
|
-
end = lend;
|
|
9081
|
-
}
|
|
9082
|
-
}
|
|
9083
|
-
return validDates(start, end);
|
|
9084
|
-
};
|
|
9085
|
-
var _getDatesForTask = getDatesForTask(item),
|
|
9086
|
-
start = _getDatesForTask.start,
|
|
9087
|
-
end = _getDatesForTask.end;
|
|
9088
|
-
var convertToFrame = function convertToFrame(x) {
|
|
9089
|
-
var startDate = x.startDate,
|
|
9090
|
-
endDate = x.endDate,
|
|
9091
|
-
color = x.color,
|
|
9092
|
-
selectedColor = x.selectedColor,
|
|
9093
|
-
icon = x.icon;
|
|
9094
|
-
var _validDates3 = validDates(startDate, endDate),
|
|
9095
|
-
start = _validDates3.start,
|
|
9096
|
-
end = _validDates3.end;
|
|
9097
|
-
return {
|
|
9098
|
-
start: start,
|
|
9099
|
-
end: end,
|
|
9100
|
-
backgroundColor: color != null ? color : "0xffffff",
|
|
9101
|
-
backgroundSelectedColor: selectedColor != null ? selectedColor : color,
|
|
9102
|
-
icon: icon
|
|
9103
|
-
};
|
|
9104
|
-
};
|
|
9105
|
-
var defaultColor = "#595959";
|
|
9106
|
-
return {
|
|
9107
|
-
id: id,
|
|
9108
|
-
type: "timeline",
|
|
9109
|
-
timeline: schedule.map(convertToFrame),
|
|
9110
|
-
name: name,
|
|
9111
|
-
valuesToShow: item.valuesToShow,
|
|
9112
|
-
start: start,
|
|
9113
|
-
end: end,
|
|
9114
|
-
progress: 100,
|
|
9115
|
-
styles: {
|
|
9116
|
-
backgroundColor: defaultColor,
|
|
9117
|
-
progressColor: defaultColor,
|
|
9118
|
-
backgroundSelectedColor: defaultColor,
|
|
9119
|
-
progressSelectedColor: defaultColor
|
|
9120
|
-
}
|
|
9121
|
-
};
|
|
9122
|
-
};
|
|
9123
|
-
var isDetail = function isDetail(row) {
|
|
9124
|
-
return row && row.schedule && row.schedule.length !== 0;
|
|
9125
|
-
};
|
|
9126
|
-
var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
|
|
9127
|
-
if (!isDetail(item)) {
|
|
9128
|
-
var _row$phases;
|
|
9129
|
-
var row = item;
|
|
9130
|
-
var _validDates4 = validDates(row.startDate, row.endDate),
|
|
9131
|
-
start = _validDates4.start,
|
|
9132
|
-
end = _validDates4.end;
|
|
9133
|
-
var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
|
|
9134
|
-
start2 = _validDates5.start,
|
|
9135
|
-
end2 = _validDates5.end;
|
|
9136
|
-
var mainTask = {
|
|
9137
|
-
start: start,
|
|
9138
|
-
end: end,
|
|
9139
|
-
id: row.id,
|
|
9140
|
-
name: row.name,
|
|
9141
|
-
type: row.type,
|
|
9142
|
-
valuesToShow: row.valuesToShow,
|
|
9143
|
-
secondaryStart: start2,
|
|
9144
|
-
secondaryEnd: end2,
|
|
9145
|
-
progress: 100,
|
|
9146
|
-
isDisabled: false,
|
|
9147
|
-
hideChildren: false,
|
|
9148
|
-
icon: row.icon
|
|
9149
|
-
};
|
|
9150
|
-
var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
|
|
9151
|
-
return [mainTask].concat(children1);
|
|
9152
|
-
} else {
|
|
9153
|
-
var _row = item;
|
|
9154
|
-
return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
|
|
9155
|
-
}
|
|
9156
|
-
};
|
|
9157
|
-
var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
|
|
9158
|
-
var id = _ref2.id,
|
|
9159
|
-
start = _ref2.start,
|
|
9160
|
-
end = _ref2.end;
|
|
9161
|
-
return projects.map(function (project) {
|
|
9162
|
-
return project.id === id ? withNewDates(project, start, end) : project;
|
|
9163
|
-
});
|
|
9164
|
-
};
|
|
9165
|
-
var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
|
|
9166
|
-
var id = _ref3.id,
|
|
9167
|
-
start = _ref3.start,
|
|
9168
|
-
end = _ref3.end;
|
|
9169
|
-
if (phases) {
|
|
9170
|
-
return phases.map(function (phase) {
|
|
9171
|
-
return phase.id === id ? withNewDates(phase, start, end) : phase;
|
|
9172
|
-
});
|
|
9173
|
-
}
|
|
9174
|
-
return undefined;
|
|
9175
|
-
};
|
|
9176
|
-
var withNewDates = function withNewDates(p, start, end) {
|
|
9177
|
-
var startDate = formatToIsoDate(start);
|
|
9178
|
-
var endDate = formatToIsoDate(end);
|
|
9179
|
-
var extra = {
|
|
9180
|
-
startDate: startDate,
|
|
9181
|
-
endDate: endDate
|
|
9182
|
-
};
|
|
9183
|
-
return _extends({}, p, extra);
|
|
9184
|
-
};
|
|
9185
|
-
var getProjectById = function getProjectById(id, items) {
|
|
9186
|
-
for (var i = 0; i < items.length; i++) {
|
|
9187
|
-
if (items[i].id === id) {
|
|
9188
|
-
return items[i];
|
|
9189
|
-
}
|
|
9190
|
-
}
|
|
9191
|
-
return undefined;
|
|
9192
|
-
};
|
|
9193
|
-
var getPhaseById = function getPhaseById(id, items) {
|
|
9194
|
-
for (var i = 0; i < items.length; i++) {
|
|
9195
|
-
if (isDetail(items[i])) {
|
|
9196
|
-
continue;
|
|
9197
|
-
}
|
|
9198
|
-
var item = items[i];
|
|
9199
|
-
if (!item.phases) {
|
|
9200
|
-
continue;
|
|
9201
|
-
}
|
|
9202
|
-
for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
|
|
9203
|
-
return item.phases[j];
|
|
9204
|
-
}
|
|
9205
|
-
}
|
|
9206
|
-
return undefined;
|
|
9207
|
-
};
|
|
9208
|
-
|
|
9209
8991
|
var intlDTCache = {};
|
|
9210
8992
|
var getCachedDateTimeFormat = function getCachedDateTimeFormat(locString, opts) {
|
|
9211
8993
|
if (opts === void 0) {
|
|
@@ -9253,9 +9035,9 @@ var ganttDateRangeFromTask = function ganttDateRangeFromTask(tasks, viewMode, pr
|
|
|
9253
9035
|
return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates);
|
|
9254
9036
|
};
|
|
9255
9037
|
var calculateDisplayedDateRange = function calculateDisplayedDateRange(mainGanttItems, timeUnit, mainGanttDoubleView, secondaryGanttItems, preStepsCount) {
|
|
9256
|
-
var dates = ganttDateRangeFromGanttTask(mainGanttItems,
|
|
9038
|
+
var dates = ganttDateRangeFromGanttTask(mainGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
|
|
9257
9039
|
if (secondaryGanttItems) {
|
|
9258
|
-
var dates2 = ganttDateRangeFromDetail(secondaryGanttItems,
|
|
9040
|
+
var dates2 = ganttDateRangeFromDetail(secondaryGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
|
|
9259
9041
|
if (dates2[0] < dates[0]) {
|
|
9260
9042
|
dates[0] = dates2[0];
|
|
9261
9043
|
}
|
|
@@ -9330,48 +9112,30 @@ var ganttDateRangeGeneric = function ganttDateRangeGeneric(dates, viewMode, preS
|
|
|
9330
9112
|
return [newStartDate, newEndDate];
|
|
9331
9113
|
}
|
|
9332
9114
|
switch (viewMode) {
|
|
9333
|
-
case
|
|
9115
|
+
case "year":
|
|
9334
9116
|
newStartDate = addToDate(newStartDate, -1, "year");
|
|
9335
9117
|
newStartDate = startOfDate(newStartDate, "year");
|
|
9336
9118
|
newEndDate = addToDate(newEndDate, 1, "year");
|
|
9337
9119
|
newEndDate = startOfDate(newEndDate, "year");
|
|
9338
9120
|
break;
|
|
9339
|
-
case
|
|
9121
|
+
case "month":
|
|
9340
9122
|
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "month");
|
|
9341
9123
|
newStartDate = startOfDate(newStartDate, "month");
|
|
9342
9124
|
newEndDate = addToDate(newEndDate, 1, "year");
|
|
9343
9125
|
newEndDate = startOfDate(newEndDate, "year");
|
|
9344
9126
|
break;
|
|
9345
|
-
case
|
|
9127
|
+
case "week":
|
|
9346
9128
|
newStartDate = startOfDate(newStartDate, "day");
|
|
9347
9129
|
newStartDate = addToDate(getMonday(newStartDate), -7 * preStepsCount, "day");
|
|
9348
9130
|
newEndDate = startOfDate(newEndDate, "day");
|
|
9349
9131
|
newEndDate = addToDate(newEndDate, 1.5, "month");
|
|
9350
9132
|
break;
|
|
9351
|
-
case
|
|
9133
|
+
case "day":
|
|
9352
9134
|
newStartDate = startOfDate(newStartDate, "day");
|
|
9353
9135
|
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9354
9136
|
newEndDate = startOfDate(newEndDate, "day");
|
|
9355
9137
|
newEndDate = addToDate(newEndDate, 19, "day");
|
|
9356
9138
|
break;
|
|
9357
|
-
case ViewMode.QuarterDay:
|
|
9358
|
-
newStartDate = startOfDate(newStartDate, "day");
|
|
9359
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9360
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9361
|
-
newEndDate = addToDate(newEndDate, 66, "hour");
|
|
9362
|
-
break;
|
|
9363
|
-
case ViewMode.HalfDay:
|
|
9364
|
-
newStartDate = startOfDate(newStartDate, "day");
|
|
9365
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9366
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9367
|
-
newEndDate = addToDate(newEndDate, 108, "hour");
|
|
9368
|
-
break;
|
|
9369
|
-
case ViewMode.Hour:
|
|
9370
|
-
newStartDate = startOfDate(newStartDate, "hour");
|
|
9371
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "hour");
|
|
9372
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9373
|
-
newEndDate = addToDate(newEndDate, 1, "day");
|
|
9374
|
-
break;
|
|
9375
9139
|
}
|
|
9376
9140
|
return [newStartDate, newEndDate];
|
|
9377
9141
|
};
|
|
@@ -9380,27 +9144,18 @@ var seedDates = function seedDates(startDate, endDate, viewMode) {
|
|
|
9380
9144
|
var dates = [currentDate];
|
|
9381
9145
|
while (currentDate < endDate) {
|
|
9382
9146
|
switch (viewMode) {
|
|
9383
|
-
case
|
|
9147
|
+
case "year":
|
|
9384
9148
|
currentDate = addToDate(currentDate, 1, "year");
|
|
9385
9149
|
break;
|
|
9386
|
-
case
|
|
9150
|
+
case "month":
|
|
9387
9151
|
currentDate = addToDate(currentDate, 1, "month");
|
|
9388
9152
|
break;
|
|
9389
|
-
case
|
|
9153
|
+
case "week":
|
|
9390
9154
|
currentDate = addToDate(currentDate, 7, "day");
|
|
9391
9155
|
break;
|
|
9392
|
-
case
|
|
9156
|
+
case "day":
|
|
9393
9157
|
currentDate = addToDate(currentDate, 1, "day");
|
|
9394
9158
|
break;
|
|
9395
|
-
case ViewMode.HalfDay:
|
|
9396
|
-
currentDate = addToDate(currentDate, 12, "hour");
|
|
9397
|
-
break;
|
|
9398
|
-
case ViewMode.QuarterDay:
|
|
9399
|
-
currentDate = addToDate(currentDate, 6, "hour");
|
|
9400
|
-
break;
|
|
9401
|
-
case ViewMode.Hour:
|
|
9402
|
-
currentDate = addToDate(currentDate, 1, "hour");
|
|
9403
|
-
break;
|
|
9404
9159
|
}
|
|
9405
9160
|
dates.push(currentDate);
|
|
9406
9161
|
}
|
|
@@ -9702,6 +9457,15 @@ var VerticalScroll = function VerticalScroll(_ref) {
|
|
|
9702
9457
|
rtl = _ref.rtl,
|
|
9703
9458
|
onScroll = _ref.onScroll;
|
|
9704
9459
|
var scrollRef = react.useRef(null);
|
|
9460
|
+
react.useEffect(function () {
|
|
9461
|
+
if (scrollRef.current) {
|
|
9462
|
+
var wrap = scrollRef.current;
|
|
9463
|
+
var setScrollTop = function setScrollTop() {
|
|
9464
|
+
wrap.scrollTop = scroll;
|
|
9465
|
+
};
|
|
9466
|
+
setTimeout(setScrollTop, 250);
|
|
9467
|
+
}
|
|
9468
|
+
}, []);
|
|
9705
9469
|
react.useEffect(function () {
|
|
9706
9470
|
if (scrollRef.current) {
|
|
9707
9471
|
scrollRef.current.scrollTop = scroll;
|
|
@@ -9744,12 +9508,12 @@ var TaskList = function TaskList(_ref) {
|
|
|
9744
9508
|
TaskListHeader = _ref.TaskListHeader,
|
|
9745
9509
|
TaskListTable = _ref.TaskListTable,
|
|
9746
9510
|
filter = _ref.filter;
|
|
9747
|
-
var horizontalContainerRef = react.
|
|
9511
|
+
var horizontalContainerRef = react.createRef();
|
|
9748
9512
|
react.useEffect(function () {
|
|
9749
9513
|
if (horizontalContainerRef.current) {
|
|
9750
9514
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
9751
9515
|
}
|
|
9752
|
-
}, [scrollY]);
|
|
9516
|
+
}, [horizontalContainerRef, scrollY]);
|
|
9753
9517
|
var headerProps = {
|
|
9754
9518
|
headerHeight: headerHeight,
|
|
9755
9519
|
fontFamily: fontFamily,
|
|
@@ -9905,10 +9669,9 @@ var SinglePartOfCalendar = function SinglePartOfCalendar(_ref) {
|
|
|
9905
9669
|
};
|
|
9906
9670
|
|
|
9907
9671
|
var Calendar = function Calendar(_ref) {
|
|
9908
|
-
var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d
|
|
9672
|
+
var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d;
|
|
9909
9673
|
var dateSetup = _ref.dateSetup,
|
|
9910
9674
|
locale = _ref.locale,
|
|
9911
|
-
viewMode = _ref.viewMode,
|
|
9912
9675
|
rtl = _ref.rtl,
|
|
9913
9676
|
headerHeight = _ref.headerHeight,
|
|
9914
9677
|
columnWidth = _ref.columnWidth,
|
|
@@ -9918,15 +9681,13 @@ var Calendar = function Calendar(_ref) {
|
|
|
9918
9681
|
_ref$singleLineHeader = _ref.singleLineHeader,
|
|
9919
9682
|
singleLineHeader = _ref$singleLineHeader === void 0 ? false : _ref$singleLineHeader,
|
|
9920
9683
|
currentDateIndicator = _ref.currentDateIndicator;
|
|
9921
|
-
var simplifiedHeader = singleLineHeader && dateSetup.viewMode !==
|
|
9684
|
+
var simplifiedHeader = singleLineHeader && dateSetup.viewMode !== "year";
|
|
9922
9685
|
var TopCal = simplifiedHeader ? SinglePartOfCalendar : TopPartOfCalendar;
|
|
9923
9686
|
var formatYear = (_dateTimeFormatters$y = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.year) != null ? _dateTimeFormatters$y : defaultDateTimeFormatters.year;
|
|
9924
9687
|
var formatMonth = (_dateTimeFormatters$m = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.month) != null ? _dateTimeFormatters$m : defaultDateTimeFormatters.month;
|
|
9925
9688
|
var formatMonthAndYear = (_dateTimeFormatters$m2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.monthAndYear) != null ? _dateTimeFormatters$m2 : defaultDateTimeFormatters.monthAndYear;
|
|
9926
9689
|
var formatWeek = (_dateTimeFormatters$w = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.week) != null ? _dateTimeFormatters$w : defaultDateTimeFormatters.week;
|
|
9927
9690
|
var formatDay = (_dateTimeFormatters$d = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.day) != null ? _dateTimeFormatters$d : defaultDateTimeFormatters.day;
|
|
9928
|
-
var formatHour = (_dateTimeFormatters$h = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.hour) != null ? _dateTimeFormatters$h : defaultDateTimeFormatters.hour;
|
|
9929
|
-
var formatDayAndMonth = (_dateTimeFormatters$d2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.dayAndMonth) != null ? _dateTimeFormatters$d2 : defaultDateTimeFormatters.dayAndMonth;
|
|
9930
9691
|
var getCalendarValuesForYear = function getCalendarValuesForYear() {
|
|
9931
9692
|
var topValues = [];
|
|
9932
9693
|
var bottomValues = [];
|
|
@@ -10061,70 +9822,12 @@ var Calendar = function Calendar(_ref) {
|
|
|
10061
9822
|
}
|
|
10062
9823
|
return [topValues, bottomValues];
|
|
10063
9824
|
};
|
|
10064
|
-
var
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
var dates = dateSetup.dates;
|
|
10070
|
-
for (var i = 0; i < dates.length; i++) {
|
|
10071
|
-
var date = dates[i];
|
|
10072
|
-
var bottomValue = formatHour(date, locale);
|
|
10073
|
-
bottomValues.push(react.createElement("text", {
|
|
10074
|
-
key: date.getTime(),
|
|
10075
|
-
y: headerHeight * 0.8,
|
|
10076
|
-
x: columnWidth * (i + +rtl),
|
|
10077
|
-
className: styles$5.calendarBottomText,
|
|
10078
|
-
fontFamily: fontFamily
|
|
10079
|
-
}, bottomValue));
|
|
10080
|
-
if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
|
|
10081
|
-
var topValue = formatDayAndMonth(date, locale);
|
|
10082
|
-
topValues.push(react.createElement(TopCal, {
|
|
10083
|
-
key: date.toISOString(),
|
|
10084
|
-
value: topValue,
|
|
10085
|
-
x1Line: columnWidth * i + ticks * columnWidth,
|
|
10086
|
-
y1Line: 0,
|
|
10087
|
-
y2Line: topDefaultHeight,
|
|
10088
|
-
xText: columnWidth * i + ticks * columnWidth * 0.5,
|
|
10089
|
-
yText: topDefaultHeight * 0.9
|
|
10090
|
-
}));
|
|
10091
|
-
}
|
|
10092
|
-
}
|
|
10093
|
-
return [topValues, bottomValues];
|
|
9825
|
+
var getters = {
|
|
9826
|
+
year: getCalendarValuesForYear,
|
|
9827
|
+
month: getCalendarValuesForMonth,
|
|
9828
|
+
week: getCalendarValuesForWeek,
|
|
9829
|
+
day: getCalendarValuesForDay
|
|
10094
9830
|
};
|
|
10095
|
-
var getCalendarValuesForHour = function getCalendarValuesForHour() {
|
|
10096
|
-
var topValues = [];
|
|
10097
|
-
var bottomValues = [];
|
|
10098
|
-
var topDefaultHeight = headerHeight * 0.5;
|
|
10099
|
-
var dates = dateSetup.dates;
|
|
10100
|
-
for (var i = 0; i < dates.length; i++) {
|
|
10101
|
-
var date = dates[i];
|
|
10102
|
-
var bottomValue = formatHour(date, locale);
|
|
10103
|
-
bottomValues.push(react.createElement("text", {
|
|
10104
|
-
key: date.getTime(),
|
|
10105
|
-
y: headerHeight * 0.8,
|
|
10106
|
-
x: columnWidth * (i + +rtl),
|
|
10107
|
-
className: styles$5.calendarBottomText,
|
|
10108
|
-
fontFamily: fontFamily
|
|
10109
|
-
}, bottomValue));
|
|
10110
|
-
if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
|
|
10111
|
-
var displayDate = dates[i - 1];
|
|
10112
|
-
var topValue = formatDayAndMonth(date, locale);
|
|
10113
|
-
var topPosition = (date.getHours() - 24) / 2;
|
|
10114
|
-
topValues.push(react.createElement(TopCal, {
|
|
10115
|
-
key: topValue + displayDate.getFullYear(),
|
|
10116
|
-
value: topValue,
|
|
10117
|
-
x1Line: columnWidth * i,
|
|
10118
|
-
y1Line: 0,
|
|
10119
|
-
y2Line: topDefaultHeight,
|
|
10120
|
-
xText: columnWidth * (i + topPosition),
|
|
10121
|
-
yText: topDefaultHeight * 0.9
|
|
10122
|
-
}));
|
|
10123
|
-
}
|
|
10124
|
-
}
|
|
10125
|
-
return [topValues, bottomValues];
|
|
10126
|
-
};
|
|
10127
|
-
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);
|
|
10128
9831
|
var _getters$dateSetup$vi = getters[dateSetup.viewMode](),
|
|
10129
9832
|
topValues = _getters$dateSetup$vi[0],
|
|
10130
9833
|
bottomValues = _getters$dateSetup$vi[1];
|
|
@@ -10993,6 +10696,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
10993
10696
|
showSecondaryDates = _ref$showSecondaryDat === void 0 ? false : _ref$showSecondaryDat,
|
|
10994
10697
|
currentDateIndicator = _ref.currentDateIndicator,
|
|
10995
10698
|
projection = _ref.projection,
|
|
10699
|
+
readOnly = _ref.readOnly,
|
|
10996
10700
|
setGanttEvent = _ref.setGanttEvent,
|
|
10997
10701
|
setFailedTask = _ref.setFailedTask,
|
|
10998
10702
|
setSelectedTask = _ref.setSelectedTask,
|
|
@@ -11109,6 +10813,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11109
10813
|
}
|
|
11110
10814
|
}, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
|
|
11111
10815
|
var hasMovedHorizontally = function hasMovedHorizontally(event) {
|
|
10816
|
+
if (readOnly) {
|
|
10817
|
+
return false;
|
|
10818
|
+
}
|
|
11112
10819
|
return initEventXClick !== (event === null || event === void 0 ? void 0 : event.clientX);
|
|
11113
10820
|
};
|
|
11114
10821
|
var handleBarEventStart = function handleBarEventStart(action, task, event) {
|
|
@@ -11160,8 +10867,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11160
10867
|
} else if (action === "dblclick") {
|
|
11161
10868
|
!!onDoubleClick && onDoubleClick(task);
|
|
11162
10869
|
} else if (action === "click") {
|
|
11163
|
-
var skipClick =
|
|
11164
|
-
skipClick && !!onClick && onClick(task);
|
|
10870
|
+
var skipClick = hasMovedHorizontally(event);
|
|
10871
|
+
!skipClick && !!onClick && onClick(task);
|
|
11165
10872
|
} else if (action === "contextmenu") {
|
|
11166
10873
|
event.preventDefault();
|
|
11167
10874
|
!!onContextMenu && onContextMenu(event, task);
|
|
@@ -11231,9 +10938,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11231
10938
|
task: task,
|
|
11232
10939
|
arrowIndent: arrowIndent,
|
|
11233
10940
|
taskHeight: taskHeight,
|
|
11234
|
-
isProgressChangeable: !!onProgressChange && !task.isDisabled,
|
|
11235
|
-
isDateMovable: !!onDateChange && !task.isDisabled,
|
|
11236
|
-
isDateResizable: !!onDateChange && !task.isDisabled && !forbidResize,
|
|
10941
|
+
isProgressChangeable: !readOnly && !!onProgressChange && !task.isDisabled,
|
|
10942
|
+
isDateMovable: !readOnly && !!onDateChange && !task.isDisabled,
|
|
10943
|
+
isDateResizable: !readOnly && !!onDateChange && !task.isDisabled && !forbidResize,
|
|
11237
10944
|
isDelete: !task.isDisabled,
|
|
11238
10945
|
onEventStart: handleBarEventStart,
|
|
11239
10946
|
key: task.id,
|
|
@@ -11256,8 +10963,8 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
11256
10963
|
scrollY = _ref.scrollY,
|
|
11257
10964
|
scrollX = _ref.scrollX;
|
|
11258
10965
|
var ganttSVGRef = react.useRef(null);
|
|
11259
|
-
var horizontalContainerRef = react.
|
|
11260
|
-
var verticalGanttContainerRef = react.
|
|
10966
|
+
var horizontalContainerRef = react.createRef();
|
|
10967
|
+
var verticalGanttContainerRef = react.createRef();
|
|
11261
10968
|
var newBarProps = _extends({}, barProps, {
|
|
11262
10969
|
svg: ganttSVGRef
|
|
11263
10970
|
});
|
|
@@ -11265,12 +10972,12 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
11265
10972
|
if (horizontalContainerRef.current) {
|
|
11266
10973
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
11267
10974
|
}
|
|
11268
|
-
}, [scrollY]);
|
|
10975
|
+
}, [horizontalContainerRef, scrollY]);
|
|
11269
10976
|
react.useEffect(function () {
|
|
11270
10977
|
if (verticalGanttContainerRef.current) {
|
|
11271
10978
|
verticalGanttContainerRef.current.scrollLeft = scrollX;
|
|
11272
10979
|
}
|
|
11273
|
-
}, [scrollX]);
|
|
10980
|
+
}, [verticalGanttContainerRef, scrollX]);
|
|
11274
10981
|
return react.createElement("div", {
|
|
11275
10982
|
className: styles$7.ganttContainer,
|
|
11276
10983
|
ref: taskGanttRef
|
|
@@ -11310,12 +11017,20 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
11310
11017
|
taskGanttRef = _ref.taskGanttRef,
|
|
11311
11018
|
rtl = _ref.rtl,
|
|
11312
11019
|
onScroll = _ref.onScroll;
|
|
11313
|
-
var scrollRef = react.
|
|
11020
|
+
var scrollRef = react.createRef();
|
|
11314
11021
|
react.useEffect(function () {
|
|
11022
|
+
var id;
|
|
11315
11023
|
if (scrollRef.current) {
|
|
11316
|
-
scrollRef.current
|
|
11024
|
+
var wrap = scrollRef.current;
|
|
11025
|
+
var setScrollLeft = function setScrollLeft() {
|
|
11026
|
+
wrap.scrollLeft = scroll;
|
|
11027
|
+
};
|
|
11028
|
+
id = setTimeout(setScrollLeft, 50);
|
|
11317
11029
|
}
|
|
11318
|
-
|
|
11030
|
+
return function () {
|
|
11031
|
+
clearTimeout(id);
|
|
11032
|
+
};
|
|
11033
|
+
}, [scroll, scrollRef]);
|
|
11319
11034
|
var rect = (_taskGanttRef$current = taskGanttRef.current) === null || _taskGanttRef$current === void 0 ? void 0 : _taskGanttRef$current.getBoundingClientRect();
|
|
11320
11035
|
return react.createElement("div", {
|
|
11321
11036
|
dir: "ltr",
|
|
@@ -11324,6 +11039,7 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
11324
11039
|
} : undefined,
|
|
11325
11040
|
className: styles$8.scrollWrapper,
|
|
11326
11041
|
onScroll: onScroll,
|
|
11042
|
+
"data-scrollx": "true",
|
|
11327
11043
|
ref: scrollRef
|
|
11328
11044
|
}, react.createElement("div", {
|
|
11329
11045
|
style: {
|
|
@@ -11347,8 +11063,6 @@ var Gantt = function Gantt(_ref) {
|
|
|
11347
11063
|
filter = _ref.filter,
|
|
11348
11064
|
_ref$ganttHeight = _ref.ganttHeight,
|
|
11349
11065
|
ganttHeight = _ref$ganttHeight === void 0 ? 0 : _ref$ganttHeight,
|
|
11350
|
-
_ref$viewMode = _ref.viewMode,
|
|
11351
|
-
viewMode = _ref$viewMode === void 0 ? ViewMode.Day : _ref$viewMode,
|
|
11352
11066
|
_ref$preStepsCount = _ref.preStepsCount,
|
|
11353
11067
|
preStepsCount = _ref$preStepsCount === void 0 ? 1 : _ref$preStepsCount,
|
|
11354
11068
|
_ref$locale = _ref.locale,
|
|
@@ -11412,6 +11126,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11412
11126
|
projection = _ref.projection,
|
|
11413
11127
|
displayedStartDate = _ref.displayedStartDate,
|
|
11414
11128
|
displayedEndDate = _ref.displayedEndDate,
|
|
11129
|
+
_ref$initialScrollX = _ref.initialScrollX,
|
|
11130
|
+
initialScrollX = _ref$initialScrollX === void 0 ? -1 : _ref$initialScrollX,
|
|
11131
|
+
_ref$initialScrollY = _ref.initialScrollY,
|
|
11132
|
+
initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,
|
|
11133
|
+
_ref$readOnly = _ref.readOnly,
|
|
11134
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
11415
11135
|
onDateChange = _ref.onDateChange,
|
|
11416
11136
|
onProgressChange = _ref.onProgressChange,
|
|
11417
11137
|
onDoubleClick = _ref.onDoubleClick,
|
|
@@ -11419,7 +11139,11 @@ var Gantt = function Gantt(_ref) {
|
|
|
11419
11139
|
onContextMenu = _ref.onContextMenu,
|
|
11420
11140
|
onDelete = _ref.onDelete,
|
|
11421
11141
|
onSelect = _ref.onSelect,
|
|
11422
|
-
onExpanderClick = _ref.onExpanderClick
|
|
11142
|
+
onExpanderClick = _ref.onExpanderClick,
|
|
11143
|
+
_ref$viewMode = _ref.viewMode,
|
|
11144
|
+
viewMode = _ref$viewMode === void 0 ? "month" : _ref$viewMode,
|
|
11145
|
+
onScrollX = _ref.onScrollX,
|
|
11146
|
+
onScrollY = _ref.onScrollY;
|
|
11423
11147
|
var wrapperRef = react.useRef(null);
|
|
11424
11148
|
var taskGanttRef = react.useRef(null);
|
|
11425
11149
|
var taskListRef = react.useRef(null);
|
|
@@ -11471,12 +11195,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11471
11195
|
setFailedTask = _useState5[1];
|
|
11472
11196
|
var svgWidth = dateSetup.dates.length * columnWidth;
|
|
11473
11197
|
var ganttFullHeight = barTasks.length * rowHeight;
|
|
11474
|
-
var _useState6 = react.useState(
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
var _useState7 = react.useState(
|
|
11478
|
-
|
|
11479
|
-
|
|
11198
|
+
var _useState6 = react.useState(initialScrollX),
|
|
11199
|
+
scrollX = _useState6[0],
|
|
11200
|
+
setScrollX = _useState6[1];
|
|
11201
|
+
var _useState7 = react.useState(initialScrollY),
|
|
11202
|
+
scrollY = _useState7[0],
|
|
11203
|
+
setScrollY = _useState7[1];
|
|
11480
11204
|
var ignoreScrollEvent = react.useRef(false);
|
|
11481
11205
|
var setIgnoreScrollEvent = function setIgnoreScrollEvent(value) {
|
|
11482
11206
|
ignoreScrollEvent.current = value;
|
|
@@ -11491,9 +11215,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11491
11215
|
window.addEventListener("gantt-sync-scroll-event", function (e) {
|
|
11492
11216
|
if (e.detail.id !== id) {
|
|
11493
11217
|
setScrollX(e.detail.scrollX);
|
|
11218
|
+
if (onScrollX) {
|
|
11219
|
+
onScrollX(e.detail.scrollX);
|
|
11220
|
+
}
|
|
11494
11221
|
}
|
|
11495
11222
|
});
|
|
11496
|
-
}, [id]);
|
|
11223
|
+
}, [id, onScrollX]);
|
|
11497
11224
|
react.useEffect(function () {
|
|
11498
11225
|
var filteredTasks;
|
|
11499
11226
|
if (onExpanderClick) {
|
|
@@ -11533,9 +11260,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
11533
11260
|
});
|
|
11534
11261
|
}
|
|
11535
11262
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, projectHeight, timelineHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, showSecondaryDates));
|
|
11536
|
-
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, rtl, scrollX, onExpanderClick, showSecondaryDates, projectHeight, timelineHeight, displayedStartDate, displayedEndDate]);
|
|
11263
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, rtl, scrollX, onExpanderClick, showSecondaryDates, projectHeight, timelineHeight, displayedStartDate, displayedEndDate, dateSetup]);
|
|
11537
11264
|
react.useEffect(function () {
|
|
11538
|
-
if (viewMode === dateSetup.viewMode && viewDate) {
|
|
11265
|
+
if (viewMode === dateSetup.viewMode && viewDate && initialScrollX < 1) {
|
|
11539
11266
|
var dates = dateSetup.dates;
|
|
11540
11267
|
var index = dates.findIndex(function (d, i) {
|
|
11541
11268
|
return viewDate.valueOf() >= d.valueOf() && i + 1 !== dates.length && viewDate.valueOf() < dates[i + 1].valueOf();
|
|
@@ -11546,7 +11273,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11546
11273
|
setIgnoreScrollEvent(true);
|
|
11547
11274
|
setScrollX(columnWidth * index);
|
|
11548
11275
|
}
|
|
11549
|
-
}, [viewDate, columnWidth, dateSetup.dates, dateSetup.viewMode, viewMode]);
|
|
11276
|
+
}, [viewDate, columnWidth, dateSetup.dates, dateSetup.viewMode, viewMode, initialScrollX]);
|
|
11550
11277
|
react.useEffect(function () {
|
|
11551
11278
|
var changedTask = ganttEvent.changedTask,
|
|
11552
11279
|
action = ganttEvent.action;
|
|
@@ -11587,6 +11314,24 @@ var Gantt = function Gantt(_ref) {
|
|
|
11587
11314
|
setTaskListWidth(taskListRef.current.offsetWidth);
|
|
11588
11315
|
}
|
|
11589
11316
|
}, [taskListRef, listCellWidth]);
|
|
11317
|
+
react.useEffect(function () {
|
|
11318
|
+
if (wrapperRef.current) {
|
|
11319
|
+
if (scrollX !== -1) {
|
|
11320
|
+
var wrap = wrapperRef.current;
|
|
11321
|
+
var setScrollLeft = function setScrollLeft() {
|
|
11322
|
+
wrap.scrollLeft = scrollX;
|
|
11323
|
+
};
|
|
11324
|
+
setTimeout(setScrollLeft, 125);
|
|
11325
|
+
}
|
|
11326
|
+
if (scrollY !== 0) {
|
|
11327
|
+
var _wrap = wrapperRef.current;
|
|
11328
|
+
var setScrollTop = function setScrollTop() {
|
|
11329
|
+
_wrap.scrollTop = scrollY;
|
|
11330
|
+
};
|
|
11331
|
+
setTimeout(setScrollTop, 125);
|
|
11332
|
+
}
|
|
11333
|
+
}
|
|
11334
|
+
}, []);
|
|
11590
11335
|
react.useEffect(function () {
|
|
11591
11336
|
if (wrapperRef.current) {
|
|
11592
11337
|
setSvgContainerWidth(wrapperRef.current.offsetWidth - taskListWidth.current);
|
|
@@ -11611,6 +11356,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11611
11356
|
newScrollX = svgWidth;
|
|
11612
11357
|
}
|
|
11613
11358
|
setScrollX(newScrollX);
|
|
11359
|
+
window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event", {
|
|
11360
|
+
detail: {
|
|
11361
|
+
componentId: id,
|
|
11362
|
+
scrollX: newScrollX
|
|
11363
|
+
}
|
|
11364
|
+
}));
|
|
11614
11365
|
event.preventDefault();
|
|
11615
11366
|
} else if (ganttHeight) {
|
|
11616
11367
|
var newScrollY = scrollY + event.deltaY;
|
|
@@ -11634,9 +11385,16 @@ var Gantt = function Gantt(_ref) {
|
|
|
11634
11385
|
};
|
|
11635
11386
|
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
11636
11387
|
var handleScrollY = function handleScrollY(event) {
|
|
11637
|
-
if (scrollY !== event.currentTarget.scrollTop
|
|
11638
|
-
|
|
11639
|
-
|
|
11388
|
+
if (scrollY !== event.currentTarget.scrollTop) {
|
|
11389
|
+
if (onScrollY) {
|
|
11390
|
+
onScrollY(event.currentTarget.scrollTop);
|
|
11391
|
+
}
|
|
11392
|
+
if (!ignoreScrollEvent.current) {
|
|
11393
|
+
setScrollY(event.currentTarget.scrollTop);
|
|
11394
|
+
setIgnoreScrollEvent(true);
|
|
11395
|
+
} else {
|
|
11396
|
+
setIgnoreScrollEvent(false);
|
|
11397
|
+
}
|
|
11640
11398
|
} else {
|
|
11641
11399
|
setIgnoreScrollEvent(false);
|
|
11642
11400
|
}
|
|
@@ -11702,6 +11460,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
11702
11460
|
} else if (newScrollY > ganttFullHeight - ganttHeight) {
|
|
11703
11461
|
newScrollY = ganttFullHeight - ganttHeight;
|
|
11704
11462
|
}
|
|
11463
|
+
if (onScrollY) {
|
|
11464
|
+
onScrollY(event.currentTarget.scrollTop);
|
|
11465
|
+
}
|
|
11705
11466
|
setScrollY(newScrollY);
|
|
11706
11467
|
}
|
|
11707
11468
|
setIgnoreScrollEvent(true);
|
|
@@ -11795,6 +11556,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11795
11556
|
ganttHeight: ganttHeight,
|
|
11796
11557
|
currentDateIndicator: currentDateIndicatorContent,
|
|
11797
11558
|
projection: projectionContent,
|
|
11559
|
+
readOnly: readOnly,
|
|
11798
11560
|
setGanttEvent: setGanttEvent,
|
|
11799
11561
|
setFailedTask: setFailedTask,
|
|
11800
11562
|
setSelectedTask: handleSelectedTask,
|
|
@@ -11825,7 +11587,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11825
11587
|
TaskListTable: TaskListTable
|
|
11826
11588
|
};
|
|
11827
11589
|
return react.createElement("div", null, react.createElement("div", {
|
|
11828
|
-
className: styles$7.wrapper,
|
|
11590
|
+
className: "" + styles$7.wrapper,
|
|
11829
11591
|
onKeyDown: handleKeyDown,
|
|
11830
11592
|
tabIndex: 0,
|
|
11831
11593
|
ref: wrapperRef
|
|
@@ -11869,6 +11631,199 @@ var Gantt = function Gantt(_ref) {
|
|
|
11869
11631
|
}));
|
|
11870
11632
|
};
|
|
11871
11633
|
|
|
11634
|
+
var MAIN_GANTT_ID = "main";
|
|
11635
|
+
var SECONDARY_GANTT_ID = "secondary";
|
|
11636
|
+
var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
|
|
11637
|
+
switch (timeUnit) {
|
|
11638
|
+
case "year":
|
|
11639
|
+
return 60 * 2;
|
|
11640
|
+
default:
|
|
11641
|
+
return 60;
|
|
11642
|
+
}
|
|
11643
|
+
};
|
|
11644
|
+
var convertPhaseToTask = function convertPhaseToTask(item) {
|
|
11645
|
+
var mapPhase = function mapPhase(_ref) {
|
|
11646
|
+
var phaseStart = _ref.startDate,
|
|
11647
|
+
phaseEnd = _ref.endDate,
|
|
11648
|
+
secondaryStartDate = _ref.secondaryStartDate,
|
|
11649
|
+
secondaryEndDate = _ref.secondaryEndDate,
|
|
11650
|
+
phaseName = _ref.name,
|
|
11651
|
+
phaseId = _ref.id,
|
|
11652
|
+
color = _ref.color,
|
|
11653
|
+
selectedColor = _ref.selectedColor,
|
|
11654
|
+
dependencies = _ref.dependencies,
|
|
11655
|
+
icon = _ref.icon;
|
|
11656
|
+
var _validDates = validDates(phaseStart, phaseEnd),
|
|
11657
|
+
start = _validDates.start,
|
|
11658
|
+
end = _validDates.end;
|
|
11659
|
+
var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
|
|
11660
|
+
phaseStart2 = _validDates2.start,
|
|
11661
|
+
phaseEnd2 = _validDates2.end;
|
|
11662
|
+
return {
|
|
11663
|
+
start: start,
|
|
11664
|
+
end: end,
|
|
11665
|
+
secondaryStart: phaseStart2,
|
|
11666
|
+
secondaryEnd: phaseEnd2,
|
|
11667
|
+
name: phaseName,
|
|
11668
|
+
valuesToShow: item.valuesToShow,
|
|
11669
|
+
id: phaseId,
|
|
11670
|
+
type: "task",
|
|
11671
|
+
progress: 100,
|
|
11672
|
+
dependencies: dependencies,
|
|
11673
|
+
styles: color ? {
|
|
11674
|
+
backgroundColor: color,
|
|
11675
|
+
progressColor: color,
|
|
11676
|
+
backgroundSelectedColor: selectedColor,
|
|
11677
|
+
progressSelectedColor: selectedColor
|
|
11678
|
+
} : {},
|
|
11679
|
+
icon: icon
|
|
11680
|
+
};
|
|
11681
|
+
};
|
|
11682
|
+
return mapPhase(item);
|
|
11683
|
+
};
|
|
11684
|
+
var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
|
|
11685
|
+
var id = item.id,
|
|
11686
|
+
name = item.name,
|
|
11687
|
+
schedule = item.schedule;
|
|
11688
|
+
var getDatesForTask = function getDatesForTask(item) {
|
|
11689
|
+
var start = mainGanttStartDate != null ? mainGanttStartDate : "";
|
|
11690
|
+
var end = mainGanttEndDate != null ? mainGanttEndDate : "";
|
|
11691
|
+
for (var i = 0; i < item.schedule.length; i++) {
|
|
11692
|
+
var lstart = item.schedule[i].startDate;
|
|
11693
|
+
var lend = item.schedule[i].endDate;
|
|
11694
|
+
if (!start || lstart.localeCompare(start) < 0) {
|
|
11695
|
+
start = lstart;
|
|
11696
|
+
}
|
|
11697
|
+
if (!end || lend.localeCompare(end) > 0) {
|
|
11698
|
+
end = lend;
|
|
11699
|
+
}
|
|
11700
|
+
}
|
|
11701
|
+
return validDates(start, end);
|
|
11702
|
+
};
|
|
11703
|
+
var _getDatesForTask = getDatesForTask(item),
|
|
11704
|
+
start = _getDatesForTask.start,
|
|
11705
|
+
end = _getDatesForTask.end;
|
|
11706
|
+
var convertToFrame = function convertToFrame(x) {
|
|
11707
|
+
var startDate = x.startDate,
|
|
11708
|
+
endDate = x.endDate,
|
|
11709
|
+
color = x.color,
|
|
11710
|
+
selectedColor = x.selectedColor,
|
|
11711
|
+
icon = x.icon;
|
|
11712
|
+
var _validDates3 = validDates(startDate, endDate),
|
|
11713
|
+
start = _validDates3.start,
|
|
11714
|
+
end = _validDates3.end;
|
|
11715
|
+
return {
|
|
11716
|
+
start: start,
|
|
11717
|
+
end: end,
|
|
11718
|
+
backgroundColor: color != null ? color : "0xffffff",
|
|
11719
|
+
backgroundSelectedColor: selectedColor != null ? selectedColor : color,
|
|
11720
|
+
icon: icon
|
|
11721
|
+
};
|
|
11722
|
+
};
|
|
11723
|
+
var defaultColor = "#595959";
|
|
11724
|
+
return {
|
|
11725
|
+
id: id,
|
|
11726
|
+
type: "timeline",
|
|
11727
|
+
timeline: schedule.map(convertToFrame),
|
|
11728
|
+
name: name,
|
|
11729
|
+
valuesToShow: item.valuesToShow,
|
|
11730
|
+
start: start,
|
|
11731
|
+
end: end,
|
|
11732
|
+
progress: 100,
|
|
11733
|
+
styles: {
|
|
11734
|
+
backgroundColor: defaultColor,
|
|
11735
|
+
progressColor: defaultColor,
|
|
11736
|
+
backgroundSelectedColor: defaultColor,
|
|
11737
|
+
progressSelectedColor: defaultColor
|
|
11738
|
+
}
|
|
11739
|
+
};
|
|
11740
|
+
};
|
|
11741
|
+
var isDetail = function isDetail(row) {
|
|
11742
|
+
return row && row.schedule && row.schedule.length !== 0;
|
|
11743
|
+
};
|
|
11744
|
+
var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
|
|
11745
|
+
if (!isDetail(item)) {
|
|
11746
|
+
var _row$phases;
|
|
11747
|
+
var row = item;
|
|
11748
|
+
var _validDates4 = validDates(row.startDate, row.endDate),
|
|
11749
|
+
start = _validDates4.start,
|
|
11750
|
+
end = _validDates4.end;
|
|
11751
|
+
var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
|
|
11752
|
+
start2 = _validDates5.start,
|
|
11753
|
+
end2 = _validDates5.end;
|
|
11754
|
+
var mainTask = {
|
|
11755
|
+
start: start,
|
|
11756
|
+
end: end,
|
|
11757
|
+
id: row.id,
|
|
11758
|
+
name: row.name,
|
|
11759
|
+
type: row.type,
|
|
11760
|
+
valuesToShow: row.valuesToShow,
|
|
11761
|
+
secondaryStart: start2,
|
|
11762
|
+
secondaryEnd: end2,
|
|
11763
|
+
progress: 100,
|
|
11764
|
+
isDisabled: false,
|
|
11765
|
+
hideChildren: false,
|
|
11766
|
+
icon: row.icon
|
|
11767
|
+
};
|
|
11768
|
+
var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
|
|
11769
|
+
return [mainTask].concat(children1);
|
|
11770
|
+
} else {
|
|
11771
|
+
var _row = item;
|
|
11772
|
+
return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
|
|
11773
|
+
}
|
|
11774
|
+
};
|
|
11775
|
+
var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
|
|
11776
|
+
var id = _ref2.id,
|
|
11777
|
+
start = _ref2.start,
|
|
11778
|
+
end = _ref2.end;
|
|
11779
|
+
return projects.map(function (project) {
|
|
11780
|
+
return project.id === id ? withNewDates(project, start, end) : project;
|
|
11781
|
+
});
|
|
11782
|
+
};
|
|
11783
|
+
var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
|
|
11784
|
+
var id = _ref3.id,
|
|
11785
|
+
start = _ref3.start,
|
|
11786
|
+
end = _ref3.end;
|
|
11787
|
+
if (phases) {
|
|
11788
|
+
return phases.map(function (phase) {
|
|
11789
|
+
return phase.id === id ? withNewDates(phase, start, end) : phase;
|
|
11790
|
+
});
|
|
11791
|
+
}
|
|
11792
|
+
return undefined;
|
|
11793
|
+
};
|
|
11794
|
+
var withNewDates = function withNewDates(p, start, end) {
|
|
11795
|
+
var startDate = formatToIsoDate(start);
|
|
11796
|
+
var endDate = formatToIsoDate(end);
|
|
11797
|
+
var extra = {
|
|
11798
|
+
startDate: startDate,
|
|
11799
|
+
endDate: endDate
|
|
11800
|
+
};
|
|
11801
|
+
return _extends({}, p, extra);
|
|
11802
|
+
};
|
|
11803
|
+
var getProjectById = function getProjectById(id, items) {
|
|
11804
|
+
for (var i = 0; i < items.length; i++) {
|
|
11805
|
+
if (items[i].id === id) {
|
|
11806
|
+
return items[i];
|
|
11807
|
+
}
|
|
11808
|
+
}
|
|
11809
|
+
return undefined;
|
|
11810
|
+
};
|
|
11811
|
+
var getPhaseById = function getPhaseById(id, items) {
|
|
11812
|
+
for (var i = 0; i < items.length; i++) {
|
|
11813
|
+
if (isDetail(items[i])) {
|
|
11814
|
+
continue;
|
|
11815
|
+
}
|
|
11816
|
+
var item = items[i];
|
|
11817
|
+
if (!item.phases) {
|
|
11818
|
+
continue;
|
|
11819
|
+
}
|
|
11820
|
+
for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
|
|
11821
|
+
return item.phases[j];
|
|
11822
|
+
}
|
|
11823
|
+
}
|
|
11824
|
+
return undefined;
|
|
11825
|
+
};
|
|
11826
|
+
|
|
11872
11827
|
var cachedFormats = {};
|
|
11873
11828
|
var getOrBuildCachedFormat = function getOrBuildCachedFormat(locale, options) {
|
|
11874
11829
|
var _cachedFormats$key;
|
|
@@ -12142,16 +12097,16 @@ var classes$2 = {"switcher":"_3P0WE","button":"_1oXbe","label":"_1R9mh"};
|
|
|
12142
12097
|
var Switcher = function Switcher(_ref) {
|
|
12143
12098
|
var onTimeUnitChange = _ref.onTimeUnitChange;
|
|
12144
12099
|
var day = function day() {
|
|
12145
|
-
return onTimeUnitChange(
|
|
12100
|
+
return onTimeUnitChange("day");
|
|
12146
12101
|
};
|
|
12147
12102
|
var week = function week() {
|
|
12148
|
-
return onTimeUnitChange(
|
|
12103
|
+
return onTimeUnitChange("week");
|
|
12149
12104
|
};
|
|
12150
12105
|
var month = function month() {
|
|
12151
|
-
return onTimeUnitChange(
|
|
12106
|
+
return onTimeUnitChange("month");
|
|
12152
12107
|
};
|
|
12153
12108
|
var year = function year() {
|
|
12154
|
-
return onTimeUnitChange(
|
|
12109
|
+
return onTimeUnitChange("year");
|
|
12155
12110
|
};
|
|
12156
12111
|
return react.createElement("div", {
|
|
12157
12112
|
className: classes$2.switcher
|
|
@@ -12184,7 +12139,7 @@ var Switcher = function Switcher(_ref) {
|
|
|
12184
12139
|
|
|
12185
12140
|
var Planner = function Planner(props) {
|
|
12186
12141
|
var _props$secondaryGantt, _props$mainGantt$show, _props$mainGantt$task, _props$mainGantt$task2, _props$mainGantt$tool, _props$secondaryGantt3, _props$secondaryGantt4, _props$secondaryGantt5, _props$secondaryGantt6;
|
|
12187
|
-
var _useState = react.useState(
|
|
12142
|
+
var _useState = react.useState(props.viewMode),
|
|
12188
12143
|
timeUnit = _useState[0],
|
|
12189
12144
|
setTimeUnit = _useState[1];
|
|
12190
12145
|
var currentTasks = react.useRef(props.mainGantt.items);
|
|
@@ -12195,19 +12150,22 @@ var Planner = function Planner(props) {
|
|
|
12195
12150
|
var setCurrentDetails = function setCurrentDetails(details) {
|
|
12196
12151
|
currentDetails.current = details;
|
|
12197
12152
|
};
|
|
12198
|
-
var _useState2 = react.useState(
|
|
12199
|
-
|
|
12200
|
-
|
|
12153
|
+
var _useState2 = react.useState(props.mainGantt.initialScrollX ? props.mainGantt.initialScrollX : -1),
|
|
12154
|
+
scrollX = _useState2[0],
|
|
12155
|
+
setScrollX = _useState2[1];
|
|
12156
|
+
var _useState3 = react.useState((_props$mainGantt$show = props.mainGantt.showSecondaryDates) != null ? _props$mainGantt$show : false),
|
|
12157
|
+
mainGanttDoubleView = _useState3[0],
|
|
12158
|
+
setMainGanttDoubleView = _useState3[1];
|
|
12201
12159
|
var displayedDates = react.useRef(calculateDisplayedDateRange(currentTasks.current, timeUnit, mainGanttDoubleView, currentDetails.current, props.preStepsCount));
|
|
12202
12160
|
var setDisplayedDates = function setDisplayedDates(dates) {
|
|
12203
12161
|
displayedDates.current = dates;
|
|
12204
12162
|
};
|
|
12205
|
-
var _useState3 = react.useState(),
|
|
12206
|
-
viewDate = _useState3[0],
|
|
12207
|
-
setViewDate = _useState3[1];
|
|
12208
12163
|
var _useState4 = react.useState(),
|
|
12209
|
-
|
|
12210
|
-
|
|
12164
|
+
viewDate = _useState4[0],
|
|
12165
|
+
setViewDate = _useState4[1];
|
|
12166
|
+
var _useState5 = react.useState(),
|
|
12167
|
+
projection = _useState5[0],
|
|
12168
|
+
setProjection = _useState5[1];
|
|
12211
12169
|
var locale = "it-IT";
|
|
12212
12170
|
var handleClick = function handleClick(row, onClick) {
|
|
12213
12171
|
if (!row) {
|
|
@@ -12297,6 +12255,17 @@ var Planner = function Planner(props) {
|
|
|
12297
12255
|
}
|
|
12298
12256
|
}
|
|
12299
12257
|
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(row);
|
|
12258
|
+
var getScrollX = function getScrollX() {
|
|
12259
|
+
if (wrapperRef.current) {
|
|
12260
|
+
var _wrapperRef$current$q;
|
|
12261
|
+
var x = (_wrapperRef$current$q = wrapperRef.current.querySelector('[data-scrollx="true"]')) === null || _wrapperRef$current$q === void 0 ? void 0 : _wrapperRef$current$q.scrollLeft;
|
|
12262
|
+
if (x !== undefined) {
|
|
12263
|
+
var _props$onScrollX;
|
|
12264
|
+
(_props$onScrollX = props.onScrollX) === null || _props$onScrollX === void 0 ? void 0 : _props$onScrollX.call(props, x);
|
|
12265
|
+
}
|
|
12266
|
+
}
|
|
12267
|
+
};
|
|
12268
|
+
setTimeout(getScrollX, 500);
|
|
12300
12269
|
};
|
|
12301
12270
|
react.useEffect(function () {
|
|
12302
12271
|
var _props$secondaryGantt2;
|
|
@@ -12327,10 +12296,16 @@ var Planner = function Planner(props) {
|
|
|
12327
12296
|
}
|
|
12328
12297
|
}
|
|
12329
12298
|
console.log("PLANNER render");
|
|
12330
|
-
|
|
12299
|
+
var wrapperRef = react.useRef(null);
|
|
12300
|
+
return react.createElement("div", {
|
|
12301
|
+
ref: wrapperRef
|
|
12302
|
+
}, react.createElement(Switcher, {
|
|
12331
12303
|
onTimeUnitChange: function onTimeUnitChange(timeUnit) {
|
|
12304
|
+
var _props$onSetViewMode;
|
|
12305
|
+
(_props$onSetViewMode = props.onSetViewMode) === null || _props$onSetViewMode === void 0 ? void 0 : _props$onSetViewMode.call(props, timeUnit);
|
|
12332
12306
|
setTimeUnit(timeUnit);
|
|
12333
12307
|
setViewDate(undefined);
|
|
12308
|
+
setScrollX(-1);
|
|
12334
12309
|
}
|
|
12335
12310
|
}), react.createElement("div", {
|
|
12336
12311
|
style: {
|
|
@@ -12350,7 +12325,7 @@ var Planner = function Planner(props) {
|
|
|
12350
12325
|
viewDate: viewDate,
|
|
12351
12326
|
tasks: tasks,
|
|
12352
12327
|
columnWidth: columnWidthForTimeUnit(timeUnit),
|
|
12353
|
-
viewMode:
|
|
12328
|
+
viewMode: timeUnit
|
|
12354
12329
|
}, props.mainGantt.stylingOptions, {
|
|
12355
12330
|
TaskListHeader: (_props$mainGantt$task = props.mainGantt.taskListHeaderProject) != null ? _props$mainGantt$task : CustomTaskListHeaderHOC(props.mainGantt.title, mainGanttDoubleView != null ? mainGanttDoubleView : false, handleSetDoubleView),
|
|
12356
12331
|
TaskListTable: (_props$mainGantt$task2 = props.mainGantt.taskListTableProject) != null ? _props$mainGantt$task2 : CustomTaskListTableHOC(function (id) {
|
|
@@ -12393,7 +12368,12 @@ var Planner = function Planner(props) {
|
|
|
12393
12368
|
return handleDateChange(task, currentTasks.current, props.mainGantt.onDateChange);
|
|
12394
12369
|
},
|
|
12395
12370
|
locale: locale,
|
|
12396
|
-
dateTimeFormatters: ganttDateTimeFormatters
|
|
12371
|
+
dateTimeFormatters: ganttDateTimeFormatters,
|
|
12372
|
+
initialScrollX: scrollX,
|
|
12373
|
+
initialScrollY: props.mainGantt.initialScrollY,
|
|
12374
|
+
readOnly: props.mainGantt.readOnly,
|
|
12375
|
+
onScrollX: props.onScrollX,
|
|
12376
|
+
onScrollY: props.mainGantt.onScrollY
|
|
12397
12377
|
})), props.secondaryGantt && react.createElement(Gantt, Object.assign({
|
|
12398
12378
|
id: SECONDARY_GANTT_ID,
|
|
12399
12379
|
key: SECONDARY_GANTT_ID,
|
|
@@ -12407,7 +12387,7 @@ var Planner = function Planner(props) {
|
|
|
12407
12387
|
viewDate: viewDate,
|
|
12408
12388
|
tasks: details,
|
|
12409
12389
|
columnWidth: columnWidthForTimeUnit(timeUnit),
|
|
12410
|
-
viewMode:
|
|
12390
|
+
viewMode: timeUnit
|
|
12411
12391
|
}, props.mainGantt.stylingOptions, {
|
|
12412
12392
|
TaskListHeader: (_props$secondaryGantt3 = props.secondaryGantt.taskListHeaderProject) != null ? _props$secondaryGantt3 : CustomTaskListHeaderHOC(props.secondaryGantt.title),
|
|
12413
12393
|
TaskListTable: (_props$secondaryGantt4 = (_props$secondaryGantt5 = props.secondaryGantt) === null || _props$secondaryGantt5 === void 0 ? void 0 : _props$secondaryGantt5.taskListTableProject) != null ? _props$secondaryGantt4 : CustomTaskListTableHOC(function (id) {
|
|
@@ -12443,576 +12423,754 @@ var Planner = function Planner(props) {
|
|
|
12443
12423
|
return handleDateChange(task, currentDetails.current, (_props$secondaryGantt7 = props.secondaryGantt) === null || _props$secondaryGantt7 === void 0 ? void 0 : _props$secondaryGantt7.onDateChange);
|
|
12444
12424
|
},
|
|
12445
12425
|
locale: locale,
|
|
12446
|
-
dateTimeFormatters: ganttDateTimeFormatters
|
|
12426
|
+
dateTimeFormatters: ganttDateTimeFormatters,
|
|
12427
|
+
initialScrollX: scrollX,
|
|
12428
|
+
initialScrollY: props.secondaryGantt.initialScrollY,
|
|
12429
|
+
readOnly: props.secondaryGantt.readOnly,
|
|
12430
|
+
onScrollY: props.secondaryGantt.onScrollY
|
|
12447
12431
|
}))));
|
|
12448
12432
|
};
|
|
12449
12433
|
|
|
12450
|
-
const kupManager = kupManagerInstance();
|
|
12451
|
-
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
12452
|
-
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
12453
|
-
let sanitizedSecDateValues = [];
|
|
12454
|
-
if (secStartDateCell && secEndDateCell) {
|
|
12455
|
-
if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
|
|
12456
|
-
sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
|
|
12457
|
-
}
|
|
12458
|
-
else {
|
|
12459
|
-
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
12460
|
-
}
|
|
12461
|
-
}
|
|
12462
|
-
return {
|
|
12463
|
-
dateValues: sanitizedDateValues,
|
|
12464
|
-
secDateValues: sanitizedSecDateValues,
|
|
12465
|
-
};
|
|
12466
|
-
}
|
|
12467
|
-
function sanitizeDates(startDateCell, endDateCell) {
|
|
12468
|
-
let returnValues = [startDateCell.value, endDateCell.value];
|
|
12469
|
-
if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
|
|
12470
|
-
return returnValues;
|
|
12471
|
-
}
|
|
12472
|
-
else if (isDateValid(startDateCell)) {
|
|
12473
|
-
return [startDateCell.value, startDateCell.value];
|
|
12474
|
-
}
|
|
12475
|
-
else if (isDateValid(endDateCell)) {
|
|
12476
|
-
return [endDateCell.value, endDateCell.value];
|
|
12477
|
-
}
|
|
12478
|
-
else {
|
|
12479
|
-
return returnValues;
|
|
12480
|
-
}
|
|
12481
|
-
}
|
|
12482
|
-
function isDateValid(dateCell) {
|
|
12483
|
-
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
12484
|
-
kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
|
|
12485
|
-
}
|
|
12486
|
-
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
12487
|
-
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
12488
|
-
}
|
|
12489
|
-
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
12490
|
-
let toValuesFunction = () => columns.map((col) => {
|
|
12491
|
-
return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
12492
|
-
});
|
|
12493
|
-
if (customToValuesFunction) {
|
|
12494
|
-
toValuesFunction = customToValuesFunction;
|
|
12495
|
-
}
|
|
12496
|
-
const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
|
|
12497
|
-
? toValuesFunction()
|
|
12498
|
-
: [row.cells[idCol].value, row.cells[nameCol].value];
|
|
12499
|
-
return valuesToShow;
|
|
12500
|
-
}
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
}
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
};
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
this
|
|
12541
|
-
this.
|
|
12542
|
-
this.
|
|
12543
|
-
this.
|
|
12544
|
-
this.
|
|
12545
|
-
this.
|
|
12546
|
-
this
|
|
12547
|
-
this.
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
this
|
|
12552
|
-
this
|
|
12553
|
-
this
|
|
12554
|
-
this
|
|
12555
|
-
|
|
12556
|
-
this
|
|
12557
|
-
this.
|
|
12558
|
-
this.
|
|
12559
|
-
this.
|
|
12560
|
-
this.
|
|
12561
|
-
this.
|
|
12562
|
-
this.
|
|
12563
|
-
this.
|
|
12564
|
-
this.
|
|
12565
|
-
this.
|
|
12566
|
-
this.
|
|
12567
|
-
this.
|
|
12568
|
-
this.
|
|
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
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12434
|
+
const kupManager = kupManagerInstance();
|
|
12435
|
+
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
12436
|
+
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
12437
|
+
let sanitizedSecDateValues = [];
|
|
12438
|
+
if (secStartDateCell && secEndDateCell) {
|
|
12439
|
+
if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
|
|
12440
|
+
sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
|
|
12441
|
+
}
|
|
12442
|
+
else {
|
|
12443
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
12444
|
+
}
|
|
12445
|
+
}
|
|
12446
|
+
return {
|
|
12447
|
+
dateValues: sanitizedDateValues,
|
|
12448
|
+
secDateValues: sanitizedSecDateValues,
|
|
12449
|
+
};
|
|
12450
|
+
}
|
|
12451
|
+
function sanitizeDates(startDateCell, endDateCell) {
|
|
12452
|
+
let returnValues = [startDateCell.value, endDateCell.value];
|
|
12453
|
+
if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
|
|
12454
|
+
return returnValues;
|
|
12455
|
+
}
|
|
12456
|
+
else if (isDateValid(startDateCell)) {
|
|
12457
|
+
return [startDateCell.value, startDateCell.value];
|
|
12458
|
+
}
|
|
12459
|
+
else if (isDateValid(endDateCell)) {
|
|
12460
|
+
return [endDateCell.value, endDateCell.value];
|
|
12461
|
+
}
|
|
12462
|
+
else {
|
|
12463
|
+
return returnValues;
|
|
12464
|
+
}
|
|
12465
|
+
}
|
|
12466
|
+
function isDateValid(dateCell) {
|
|
12467
|
+
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
12468
|
+
kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
|
|
12469
|
+
}
|
|
12470
|
+
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
12471
|
+
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
12472
|
+
}
|
|
12473
|
+
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
12474
|
+
let toValuesFunction = () => columns.map((col) => {
|
|
12475
|
+
return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
12476
|
+
});
|
|
12477
|
+
if (customToValuesFunction) {
|
|
12478
|
+
toValuesFunction = customToValuesFunction;
|
|
12479
|
+
}
|
|
12480
|
+
const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
|
|
12481
|
+
? toValuesFunction()
|
|
12482
|
+
: [row.cells[idCol].value, row.cells[nameCol].value];
|
|
12483
|
+
return valuesToShow;
|
|
12484
|
+
}
|
|
12485
|
+
|
|
12486
|
+
class KupPlannerState {
|
|
12487
|
+
constructor() {
|
|
12488
|
+
this.showSecondaryDates = false;
|
|
12489
|
+
this.detailFilter = "";
|
|
12490
|
+
this.detailInitialScrollX = 0;
|
|
12491
|
+
this.detailInitialScrollY = 0;
|
|
12492
|
+
this.taskFilter = "";
|
|
12493
|
+
this.taskInitialScrollX = 0;
|
|
12494
|
+
this.taskInitialScrollY = 0;
|
|
12495
|
+
this.viewMode = "day";
|
|
12496
|
+
}
|
|
12497
|
+
toDebugString() {
|
|
12498
|
+
// TODO
|
|
12499
|
+
return 'dt state';
|
|
12500
|
+
}
|
|
12501
|
+
}
|
|
12502
|
+
|
|
12503
|
+
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%;padding-left:4px}._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%;padding-left:4px}._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}";
|
|
12504
|
+
|
|
12505
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12506
|
+
if (kind === "a" && !f)
|
|
12507
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
12508
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12509
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12510
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12511
|
+
};
|
|
12512
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12513
|
+
if (kind === "m")
|
|
12514
|
+
throw new TypeError("Private method is not writable");
|
|
12515
|
+
if (kind === "a" && !f)
|
|
12516
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
12517
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12518
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
12519
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12520
|
+
};
|
|
12521
|
+
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;
|
|
12522
|
+
const KupPlanner = class {
|
|
12523
|
+
constructor(hostRef) {
|
|
12524
|
+
registerInstance(this, hostRef);
|
|
12525
|
+
this.kupClick = createEvent(this, "kup-planner-click", 6);
|
|
12526
|
+
this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
|
|
12527
|
+
this.kupReady = createEvent(this, "kup-planner-ready", 6);
|
|
12528
|
+
this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
|
|
12529
|
+
this.kupDidUnload = createEvent(this, "kup-planner-didunload", 6);
|
|
12530
|
+
_KupPlanner_instances.add(this);
|
|
12531
|
+
this.state = new KupPlannerState();
|
|
12532
|
+
/*-------------------------------------------------*/
|
|
12533
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
12534
|
+
/*-------------------------------------------------*/
|
|
12535
|
+
_KupPlanner_kupManager.set(this, kupManagerInstance());
|
|
12536
|
+
_KupPlanner_lastOnChangeReceived.set(this, void 0);
|
|
12537
|
+
_KupPlanner_rootPlanner.set(this, void 0);
|
|
12538
|
+
_KupPlanner_phases.set(this, {});
|
|
12539
|
+
// no re-render
|
|
12540
|
+
_KupPlanner_storedSettings.set(this, void 0);
|
|
12541
|
+
this.stateId = '';
|
|
12542
|
+
this.store = undefined;
|
|
12543
|
+
this.customStyle = '';
|
|
12544
|
+
this.data = undefined;
|
|
12545
|
+
this.detailData = undefined;
|
|
12546
|
+
this.detailColorCol = undefined;
|
|
12547
|
+
this.detailColumns = undefined;
|
|
12548
|
+
this.detailDates = undefined;
|
|
12549
|
+
this.detailFilter = undefined;
|
|
12550
|
+
this.detailHeight = undefined;
|
|
12551
|
+
this.detailIconCol = undefined;
|
|
12552
|
+
this.detailIdCol = undefined;
|
|
12553
|
+
this.detailNameCol = undefined;
|
|
12554
|
+
this.detailPrevDates = undefined;
|
|
12555
|
+
this.detailInitialScrollX = undefined;
|
|
12556
|
+
this.detailInitialScrollY = undefined;
|
|
12557
|
+
this.listCellWidth = '300px';
|
|
12558
|
+
this.maxWidth = '90vw';
|
|
12559
|
+
this.phaseColorCol = undefined;
|
|
12560
|
+
this.phaseColumns = undefined;
|
|
12561
|
+
this.phaseColParDep = undefined;
|
|
12562
|
+
this.phaseDates = undefined;
|
|
12563
|
+
this.phaseIconCol = undefined;
|
|
12564
|
+
this.phaseIdCol = undefined;
|
|
12565
|
+
this.phaseNameCol = undefined;
|
|
12566
|
+
this.phasePrevDates = undefined;
|
|
12567
|
+
this.readOnly = false;
|
|
12568
|
+
this.showSecondaryDates = false;
|
|
12569
|
+
this.taskColumns = undefined;
|
|
12570
|
+
this.taskDates = undefined;
|
|
12571
|
+
this.taskFilter = undefined;
|
|
12572
|
+
this.taskHeight = undefined;
|
|
12573
|
+
this.taskIconCol = undefined;
|
|
12574
|
+
this.taskIdCol = undefined;
|
|
12575
|
+
this.taskInitialScrollX = undefined;
|
|
12576
|
+
this.taskInitialScrollY = undefined;
|
|
12577
|
+
this.taskNameCol = undefined;
|
|
12578
|
+
this.taskPrevDates = undefined;
|
|
12579
|
+
this.titleMess = undefined;
|
|
12580
|
+
this.viewMode = 'month';
|
|
12581
|
+
this.plannerProps = undefined;
|
|
12582
|
+
}
|
|
12583
|
+
initWithPersistedState() {
|
|
12584
|
+
if (this.store && this.stateId) {
|
|
12585
|
+
const state = this.store.getState(this.stateId);
|
|
12586
|
+
if (state != null) {
|
|
12587
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
12588
|
+
// *** PROPS ***
|
|
12589
|
+
this.detailFilter = state.detailFilter;
|
|
12590
|
+
this.showSecondaryDates = state.showSecondaryDates;
|
|
12591
|
+
this.detailInitialScrollX = state.detailInitialScrollX;
|
|
12592
|
+
this.detailInitialScrollY = state.detailInitialScrollY;
|
|
12593
|
+
this.taskFilter = state.taskFilter;
|
|
12594
|
+
this.taskInitialScrollX = state.taskInitialScrollX;
|
|
12595
|
+
this.taskInitialScrollY = state.taskInitialScrollY;
|
|
12596
|
+
this.viewMode = state.viewMode;
|
|
12597
|
+
}
|
|
12598
|
+
}
|
|
12599
|
+
}
|
|
12600
|
+
persistState() {
|
|
12601
|
+
if (this.store && this.stateId) {
|
|
12602
|
+
let somethingChanged = false;
|
|
12603
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter)) {
|
|
12604
|
+
this.state.detailFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter;
|
|
12605
|
+
somethingChanged = true;
|
|
12606
|
+
}
|
|
12607
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.showSecondaryDates, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates)) {
|
|
12608
|
+
this.state.showSecondaryDates =
|
|
12609
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates;
|
|
12610
|
+
somethingChanged = true;
|
|
12611
|
+
}
|
|
12612
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX)) {
|
|
12613
|
+
this.state.detailInitialScrollX =
|
|
12614
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
|
|
12615
|
+
somethingChanged = true;
|
|
12616
|
+
}
|
|
12617
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY)) {
|
|
12618
|
+
this.state.detailInitialScrollY =
|
|
12619
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
|
|
12620
|
+
somethingChanged = true;
|
|
12621
|
+
}
|
|
12622
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter)) {
|
|
12623
|
+
this.state.taskFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter;
|
|
12624
|
+
somethingChanged = true;
|
|
12625
|
+
}
|
|
12626
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX)) {
|
|
12627
|
+
this.state.taskInitialScrollX =
|
|
12628
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
|
|
12629
|
+
somethingChanged = true;
|
|
12630
|
+
}
|
|
12631
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY)) {
|
|
12632
|
+
this.state.taskInitialScrollY =
|
|
12633
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
|
|
12634
|
+
somethingChanged = true;
|
|
12635
|
+
}
|
|
12636
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.viewMode, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode)) {
|
|
12637
|
+
this.state.viewMode = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode;
|
|
12638
|
+
somethingChanged = true;
|
|
12639
|
+
}
|
|
12640
|
+
if (somethingChanged) {
|
|
12641
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
12642
|
+
this.store.persistState(this.stateId, this.state);
|
|
12643
|
+
}
|
|
12644
|
+
}
|
|
12645
|
+
}
|
|
12646
|
+
dataChanged() {
|
|
12647
|
+
__classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
|
|
12648
|
+
}
|
|
12649
|
+
/*-------------------------------------------------*/
|
|
12650
|
+
/* P u b l i c M e t h o d s */
|
|
12651
|
+
/*-------------------------------------------------*/
|
|
12652
|
+
/**
|
|
12653
|
+
* Used to retrieve component's props values.
|
|
12654
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
12655
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
12656
|
+
*/
|
|
12657
|
+
async getProps(descriptions) {
|
|
12658
|
+
return getProps(this, KupPlannerProps, descriptions);
|
|
12659
|
+
}
|
|
12660
|
+
/**
|
|
12661
|
+
* This method is used to trigger a new render of the component.
|
|
12662
|
+
*/
|
|
12663
|
+
async refresh() {
|
|
12664
|
+
forceUpdate(this);
|
|
12665
|
+
}
|
|
12666
|
+
/**
|
|
12667
|
+
* Sets the props to the component.
|
|
12668
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
12669
|
+
*/
|
|
12670
|
+
async setProps(props) {
|
|
12671
|
+
setProps(this, KupPlannerProps, props);
|
|
12672
|
+
}
|
|
12673
|
+
/**
|
|
12674
|
+
* Add a list of phases to the project
|
|
12675
|
+
* @param taskId
|
|
12676
|
+
* @param data - Matrix which contains project phases
|
|
12677
|
+
*/
|
|
12678
|
+
async addPhases(taskId, data) {
|
|
12679
|
+
var _a;
|
|
12680
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
12681
|
+
if (task) {
|
|
12682
|
+
__classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
|
|
12683
|
+
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) => {
|
|
12684
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
12685
|
+
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
12686
|
+
? '#START#'
|
|
12687
|
+
: col == this.phaseDates[1]
|
|
12688
|
+
? '#END#'
|
|
12689
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
12690
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
|
|
12691
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
|
|
12692
|
+
let phase = {
|
|
12693
|
+
taskRow: task.taskRow,
|
|
12694
|
+
phaseRow: row,
|
|
12695
|
+
id: task.id + '_' + row.cells[this.phaseIdCol].value,
|
|
12696
|
+
phaseRowId: row.id,
|
|
12697
|
+
taskRowId: task.taskRowId,
|
|
12698
|
+
name: row.cells[this.phaseNameCol].value,
|
|
12699
|
+
startDate: datesSanitized.dateValues[0],
|
|
12700
|
+
endDate: datesSanitized.dateValues[1],
|
|
12701
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
12702
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
12703
|
+
type: 'task',
|
|
12704
|
+
color: row.cells[this.phaseColorCol].value,
|
|
12705
|
+
selectedColor: row.cells[this.phaseColorCol].value,
|
|
12706
|
+
valuesToShow: valuesToShow,
|
|
12707
|
+
rowType: KupPlannerGanttRowType.PHASE,
|
|
12708
|
+
icon: iconUrl
|
|
12709
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
12710
|
+
: undefined,
|
|
12711
|
+
};
|
|
12712
|
+
return phase;
|
|
12713
|
+
});
|
|
12714
|
+
}
|
|
12715
|
+
this.plannerProps.mainGantt.initialScrollX =
|
|
12716
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
|
|
12717
|
+
this.plannerProps.mainGantt.initialScrollY =
|
|
12718
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
|
|
12719
|
+
if (this.plannerProps.secondaryGantt) {
|
|
12720
|
+
this.plannerProps.secondaryGantt.initialScrollX =
|
|
12721
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
|
|
12722
|
+
this.plannerProps.secondaryGantt.initialScrollX =
|
|
12723
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
|
|
12724
|
+
}
|
|
12725
|
+
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
12726
|
+
}
|
|
12727
|
+
//---- Lifecycle hooks ----
|
|
12728
|
+
componentWillLoad() {
|
|
12729
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
|
|
12730
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
|
|
12731
|
+
// *** Store
|
|
12732
|
+
this.initWithPersistedState();
|
|
12733
|
+
__classPrivateFieldSet(this, _KupPlanner_storedSettings, {
|
|
12734
|
+
detailFilter: this.detailFilter,
|
|
12735
|
+
detailInitialScrollX: this.detailInitialScrollX,
|
|
12736
|
+
detailInitialScrollY: this.detailInitialScrollY,
|
|
12737
|
+
showSecondaryDates: this.showSecondaryDates,
|
|
12738
|
+
taskFilter: this.taskFilter,
|
|
12739
|
+
taskInitialScrollX: this.taskInitialScrollX,
|
|
12740
|
+
taskInitialScrollY: this.taskInitialScrollY,
|
|
12741
|
+
viewMode: this.viewMode,
|
|
12742
|
+
}, "f");
|
|
12743
|
+
}
|
|
12744
|
+
componentDidLoad() {
|
|
12745
|
+
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));
|
|
12746
|
+
const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
|
|
12747
|
+
FTextFieldMDC(mainFilter);
|
|
12748
|
+
const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
|
|
12749
|
+
if (details) {
|
|
12750
|
+
FTextFieldMDC(secondaryFilter);
|
|
12751
|
+
}
|
|
12752
|
+
// timeout for scroll events
|
|
12753
|
+
let scrollXTimeout;
|
|
12754
|
+
let taskScrollYTimeout;
|
|
12755
|
+
let detailScrollYTimeout;
|
|
12756
|
+
const scrollDelay = 500;
|
|
12757
|
+
this.plannerProps = {
|
|
12758
|
+
mainGantt: {
|
|
12759
|
+
title: this.titleMess,
|
|
12760
|
+
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)),
|
|
12761
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
12762
|
+
filter: mainFilter,
|
|
12763
|
+
hideLabel: true,
|
|
12764
|
+
ganttHeight: this.taskHeight,
|
|
12765
|
+
showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates,
|
|
12766
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
12767
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
12768
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
12769
|
+
initialScrollX: this.taskInitialScrollX,
|
|
12770
|
+
initialScrollY: this.taskInitialScrollY,
|
|
12771
|
+
readOnly: this.readOnly,
|
|
12772
|
+
onScrollY: (y) => {
|
|
12773
|
+
window.clearTimeout(taskScrollYTimeout);
|
|
12774
|
+
taskScrollYTimeout = window.setTimeout(() => this.handleTaskGanttScrollY(y), scrollDelay);
|
|
12775
|
+
},
|
|
12776
|
+
},
|
|
12777
|
+
secondaryGantt: details
|
|
12778
|
+
? {
|
|
12779
|
+
title: '',
|
|
12780
|
+
items: details,
|
|
12781
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
12782
|
+
filter: secondaryFilter,
|
|
12783
|
+
hideLabel: true,
|
|
12784
|
+
ganttHeight: this.detailHeight,
|
|
12785
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
12786
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
12787
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
12788
|
+
initialScrollX: this.detailInitialScrollX,
|
|
12789
|
+
initialScrollY: this.detailInitialScrollY,
|
|
12790
|
+
readOnly: this.readOnly,
|
|
12791
|
+
onScrollY: (y) => {
|
|
12792
|
+
window.clearTimeout(detailScrollYTimeout);
|
|
12793
|
+
detailScrollYTimeout = window.setTimeout(() => this.handleDetailGanttScrollY(y), scrollDelay);
|
|
12794
|
+
},
|
|
12795
|
+
}
|
|
12796
|
+
: undefined,
|
|
12797
|
+
onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
|
|
12798
|
+
onSetViewMode: (value) => this.handleOnSetViewMode(value),
|
|
12799
|
+
viewMode: this.viewMode,
|
|
12800
|
+
onScrollX: (x) => {
|
|
12801
|
+
window.clearTimeout(scrollXTimeout);
|
|
12802
|
+
scrollXTimeout = window.setTimeout(() => this.handleOnScrollX(x), scrollDelay);
|
|
12803
|
+
},
|
|
12804
|
+
};
|
|
12805
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
12806
|
+
this.kupReady.emit({
|
|
12807
|
+
comp: this,
|
|
12808
|
+
id: this.rootElement.id,
|
|
12809
|
+
value: undefined,
|
|
12810
|
+
});
|
|
12811
|
+
if (this.taskFilter) {
|
|
12812
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.taskFilter);
|
|
12813
|
+
}
|
|
12814
|
+
if (this.detailFilter) {
|
|
12815
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.detailFilter, true);
|
|
12816
|
+
}
|
|
12817
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
|
|
12818
|
+
}
|
|
12819
|
+
componentWillRender() {
|
|
12820
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
12821
|
+
}
|
|
12822
|
+
componentDidRender() {
|
|
12823
|
+
this.persistState();
|
|
12824
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
|
|
12825
|
+
}
|
|
12826
|
+
onKupClick(event, taskAction) {
|
|
12827
|
+
this.kupClick.emit({
|
|
12828
|
+
comp: this,
|
|
12829
|
+
id: this.rootElement.id,
|
|
12830
|
+
value: event,
|
|
12831
|
+
taskAction: taskAction,
|
|
12832
|
+
});
|
|
12833
|
+
}
|
|
12834
|
+
onKupContextMenu(event, ganttRow, taskAction) {
|
|
12835
|
+
let row;
|
|
12836
|
+
let cell;
|
|
12837
|
+
let column;
|
|
12838
|
+
switch (ganttRow.type) {
|
|
12839
|
+
case 'project': {
|
|
12840
|
+
row = ganttRow.taskRow;
|
|
12841
|
+
cell = row.cells[this.taskIdCol];
|
|
12842
|
+
column = this.data.columns[this.taskIdCol];
|
|
12843
|
+
break;
|
|
12844
|
+
}
|
|
12845
|
+
case 'task': {
|
|
12846
|
+
row = ganttRow.phaseRow;
|
|
12847
|
+
cell = row.cells[this.phaseIdCol];
|
|
12848
|
+
//column = this.data.columns[this.taskIdCol];
|
|
12849
|
+
break;
|
|
12850
|
+
}
|
|
12851
|
+
case 'timeline': {
|
|
12852
|
+
row = ganttRow.detailRow;
|
|
12853
|
+
cell = row.cells[this.detailIdCol];
|
|
12854
|
+
column = this.data.columns[this.detailIdCol];
|
|
12855
|
+
break;
|
|
12856
|
+
}
|
|
12857
|
+
}
|
|
12858
|
+
this.kupContextMenu.emit({
|
|
12859
|
+
comp: this,
|
|
12860
|
+
id: this.rootElement.id,
|
|
12861
|
+
value: ganttRow,
|
|
12862
|
+
taskAction: taskAction,
|
|
12863
|
+
details: {
|
|
12864
|
+
cell: cell,
|
|
12865
|
+
column: column,
|
|
12866
|
+
originalEvent: event,
|
|
12867
|
+
row: row,
|
|
12868
|
+
},
|
|
12869
|
+
});
|
|
12870
|
+
}
|
|
12871
|
+
onKupDateChange(event, taskAction) {
|
|
12872
|
+
this.kupDateChange.emit({
|
|
12873
|
+
comp: this,
|
|
12874
|
+
id: this.rootElement.id,
|
|
12875
|
+
value: event,
|
|
12876
|
+
taskAction: taskAction,
|
|
12877
|
+
});
|
|
12878
|
+
}
|
|
12879
|
+
handleOnClick(nativeEvent) {
|
|
12880
|
+
switch (nativeEvent.rowType) {
|
|
12881
|
+
case KupPlannerGanttRowType.TASK:
|
|
12882
|
+
const taskAction = nativeEvent.phases
|
|
12883
|
+
? KupPlannerTaskAction.onTaskClosing
|
|
12884
|
+
: KupPlannerTaskAction.onTaskOpening;
|
|
12885
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
|
|
12886
|
+
this.onKupClick(nativeEvent, taskAction);
|
|
12887
|
+
}
|
|
12888
|
+
break;
|
|
12889
|
+
case KupPlannerGanttRowType.PHASE:
|
|
12890
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
12891
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
12892
|
+
}
|
|
12893
|
+
break;
|
|
12894
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
12895
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
12896
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
12897
|
+
}
|
|
12898
|
+
break;
|
|
12899
|
+
}
|
|
12900
|
+
}
|
|
12901
|
+
handleOnContextMenu(event, row) {
|
|
12902
|
+
switch (row.rowType) {
|
|
12903
|
+
case KupPlannerGanttRowType.TASK:
|
|
12904
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
|
|
12905
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12906
|
+
}
|
|
12907
|
+
break;
|
|
12908
|
+
case KupPlannerGanttRowType.PHASE:
|
|
12909
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
|
|
12910
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12911
|
+
}
|
|
12912
|
+
break;
|
|
12913
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
12914
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
|
|
12915
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12916
|
+
}
|
|
12917
|
+
break;
|
|
12918
|
+
}
|
|
12919
|
+
}
|
|
12920
|
+
handleOnSetDoubleView(checked) {
|
|
12921
|
+
var _a;
|
|
12922
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates = checked;
|
|
12923
|
+
if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
|
|
12924
|
+
this.plannerProps.mainGantt.showSecondaryDates = checked;
|
|
12925
|
+
}
|
|
12926
|
+
this.persistState();
|
|
12927
|
+
}
|
|
12928
|
+
handleOnSetViewMode(value) {
|
|
12929
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode = value;
|
|
12930
|
+
this.plannerProps.viewMode = value;
|
|
12931
|
+
this.persistState();
|
|
12932
|
+
}
|
|
12933
|
+
handleOnScrollX(x) {
|
|
12934
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX = x;
|
|
12935
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX = x;
|
|
12936
|
+
this.persistState();
|
|
12937
|
+
}
|
|
12938
|
+
handleTaskGanttScrollY(y) {
|
|
12939
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY = y;
|
|
12940
|
+
this.persistState();
|
|
12941
|
+
}
|
|
12942
|
+
handleDetailGanttScrollY(y) {
|
|
12943
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY = y;
|
|
12944
|
+
this.persistState();
|
|
12945
|
+
}
|
|
12946
|
+
handleOnDateChange(nativeEvent) {
|
|
12947
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
|
|
12948
|
+
if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
|
|
12949
|
+
this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
|
|
12950
|
+
}
|
|
12951
|
+
}
|
|
12952
|
+
}
|
|
12953
|
+
render() {
|
|
12954
|
+
var _a;
|
|
12955
|
+
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) => {
|
|
12956
|
+
if (e.key === 'Enter') {
|
|
12957
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value);
|
|
12958
|
+
}
|
|
12959
|
+
}, 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) => {
|
|
12960
|
+
if (e.key === 'Enter') {
|
|
12961
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value, true);
|
|
12962
|
+
}
|
|
12963
|
+
}, value: this.detailFilter, wrapperClass: "filter" })) : null));
|
|
12964
|
+
}
|
|
12965
|
+
disconnectedCallback() {
|
|
12966
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
|
|
12967
|
+
this.kupDidUnload.emit({
|
|
12968
|
+
comp: this,
|
|
12969
|
+
id: this.rootElement.id,
|
|
12970
|
+
storedSettings: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f"),
|
|
12971
|
+
});
|
|
12972
|
+
}
|
|
12973
|
+
get rootElement() { return getElement(this); }
|
|
12974
|
+
static get watchers() { return {
|
|
12975
|
+
"data": ["dataChanged"]
|
|
12976
|
+
}; }
|
|
12977
|
+
};
|
|
12978
|
+
_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() {
|
|
12979
|
+
var _a;
|
|
12980
|
+
(_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
12981
|
+
const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
|
|
12982
|
+
if (componentWrapperElement) {
|
|
12983
|
+
__classPrivateFieldSet(this, _KupPlanner_rootPlanner, client.createRoot(componentWrapperElement), "f");
|
|
12984
|
+
__classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(react.createElement(Planner, this.plannerProps));
|
|
12985
|
+
}
|
|
12986
|
+
}, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
|
|
12987
|
+
var _a;
|
|
12988
|
+
if (!data || !data.rows) {
|
|
12989
|
+
return [];
|
|
12990
|
+
}
|
|
12991
|
+
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) => {
|
|
12992
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
|
|
12993
|
+
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
|
|
12994
|
+
? '#START#'
|
|
12995
|
+
: col == this.taskDates[1]
|
|
12996
|
+
? '#END#'
|
|
12997
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
12998
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
|
|
12999
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
|
|
13000
|
+
let task = {
|
|
13001
|
+
taskRow: row,
|
|
13002
|
+
taskRowId: row.id,
|
|
13003
|
+
id: row.cells[this.taskIdCol].value,
|
|
13004
|
+
name: row.cells[this.taskNameCol].value,
|
|
13005
|
+
startDate: datesSanitized.dateValues[0],
|
|
13006
|
+
endDate: datesSanitized.dateValues[1],
|
|
13007
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
13008
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
13009
|
+
type: 'project',
|
|
13010
|
+
valuesToShow: valuesToShow,
|
|
13011
|
+
rowType: KupPlannerGanttRowType.TASK,
|
|
13012
|
+
icon: iconUrl
|
|
13013
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
13014
|
+
: undefined,
|
|
13015
|
+
};
|
|
13016
|
+
return task;
|
|
13017
|
+
});
|
|
13018
|
+
return tasks;
|
|
13019
|
+
}, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
|
|
13020
|
+
if (!data || !data.rows) {
|
|
13021
|
+
return undefined;
|
|
13022
|
+
}
|
|
13023
|
+
let details = [];
|
|
13024
|
+
data.rows
|
|
13025
|
+
.filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
|
|
13026
|
+
.forEach((row) => {
|
|
13027
|
+
var _a, _b;
|
|
13028
|
+
const detailId = row.cells[this.detailIdCol].value;
|
|
13029
|
+
const detailNameId = row.cells[this.detailNameCol].value;
|
|
13030
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
13031
|
+
const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
|
|
13032
|
+
let detail = details.find((det) => det.id == detailId);
|
|
13033
|
+
if (!detail) {
|
|
13034
|
+
detail = {
|
|
13035
|
+
id: detailId,
|
|
13036
|
+
name: detailNameId,
|
|
13037
|
+
detailRow: row,
|
|
13038
|
+
type: 'timeline',
|
|
13039
|
+
valuesToShow: valuesToShow,
|
|
13040
|
+
rowType: KupPlannerGanttRowType.DETAIL,
|
|
13041
|
+
schedule: [],
|
|
13042
|
+
};
|
|
13043
|
+
details.push(detail);
|
|
13044
|
+
}
|
|
13045
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
|
|
13046
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
|
|
13047
|
+
detail.schedule.push({
|
|
13048
|
+
startDate: datesSanitized.dateValues[0],
|
|
13049
|
+
endDate: datesSanitized.dateValues[1],
|
|
13050
|
+
color: this.detailColorCol
|
|
13051
|
+
? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
|
|
13052
|
+
: '#D9D9D8',
|
|
13053
|
+
selectedColor: this.detailColorCol
|
|
13054
|
+
? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
|
|
13055
|
+
: '#D9D9D8',
|
|
13056
|
+
icon: iconUrl
|
|
13057
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
13058
|
+
: undefined,
|
|
13059
|
+
});
|
|
13060
|
+
});
|
|
13061
|
+
return details;
|
|
13062
|
+
}, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
|
|
13063
|
+
return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
|
|
13064
|
+
}, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
|
|
13065
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
13066
|
+
if (task)
|
|
13067
|
+
task.phases = undefined;
|
|
13068
|
+
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
13069
|
+
}, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
|
|
13070
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
|
|
13071
|
+
if (task === null || task === void 0 ? void 0 : task.phases) {
|
|
13072
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
|
|
13073
|
+
}
|
|
13074
|
+
return true;
|
|
13075
|
+
}, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
|
|
13076
|
+
return true;
|
|
13077
|
+
}, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
|
|
13078
|
+
return true;
|
|
13079
|
+
}, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
|
|
13080
|
+
return true;
|
|
13081
|
+
}, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
|
|
13082
|
+
return true;
|
|
13083
|
+
}, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
|
|
13084
|
+
return true;
|
|
13085
|
+
}, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
|
|
13086
|
+
let emitEvent = false;
|
|
13087
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
|
|
13088
|
+
emitEvent = true;
|
|
13089
|
+
__classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
|
|
13090
|
+
}
|
|
13091
|
+
else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
|
|
13092
|
+
__classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
|
|
13093
|
+
emitEvent = true;
|
|
13094
|
+
}
|
|
13095
|
+
return emitEvent;
|
|
13096
|
+
}, _KupPlanner_onFilter = function _KupPlanner_onFilter(value, isDetail) {
|
|
13097
|
+
if (isDetail) {
|
|
13098
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter = value;
|
|
13099
|
+
}
|
|
13100
|
+
else {
|
|
13101
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter = value;
|
|
13102
|
+
}
|
|
13103
|
+
const newGantt = isDetail
|
|
13104
|
+
? {
|
|
13105
|
+
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)) }),
|
|
13106
|
+
}
|
|
13107
|
+
: {
|
|
13108
|
+
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)) }),
|
|
13109
|
+
};
|
|
13110
|
+
this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
|
|
13111
|
+
this.persistState();
|
|
13112
|
+
}, _KupPlanner_getFilteredRows = function _KupPlanner_getFilteredRows(value, isDetail) {
|
|
13113
|
+
const data = isDetail ? this.detailData : this.data;
|
|
13114
|
+
if (!data || !data.rows || data.rows.length == 0) {
|
|
13115
|
+
return undefined;
|
|
13116
|
+
}
|
|
13117
|
+
if (!value) {
|
|
13118
|
+
return data;
|
|
13119
|
+
}
|
|
13120
|
+
const tempData = {
|
|
13121
|
+
columns: this.data.columns,
|
|
13122
|
+
rows: [],
|
|
13123
|
+
};
|
|
13124
|
+
const tempRows = [];
|
|
13125
|
+
for (let index = 0; index < data.rows.length; index++) {
|
|
13126
|
+
const row = data.rows[index];
|
|
13127
|
+
const cells = row.cells;
|
|
13128
|
+
for (let index = 0; index < data.columns.length; index++) {
|
|
13129
|
+
const column = data.columns[index];
|
|
13130
|
+
const cell = cells[column.name];
|
|
13131
|
+
if (cell) {
|
|
13132
|
+
const dValue = getCellValueForDisplay(data.columns[index], cell);
|
|
13133
|
+
const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
|
|
13134
|
+
if (found) {
|
|
13135
|
+
tempRows.push({ row, weight: index });
|
|
13136
|
+
break;
|
|
13137
|
+
}
|
|
13138
|
+
}
|
|
13139
|
+
}
|
|
13140
|
+
}
|
|
13141
|
+
tempRows
|
|
13142
|
+
.sort((a, b) => a.weight - b.weight)
|
|
13143
|
+
.forEach((tempRow) => {
|
|
13144
|
+
tempData.rows.push(tempRow.row);
|
|
13145
|
+
});
|
|
13146
|
+
return tempData;
|
|
13147
|
+
}, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
|
|
13148
|
+
var _a;
|
|
13149
|
+
let iconUrl = undefined;
|
|
13150
|
+
if (columnName) {
|
|
13151
|
+
const iconCell = row.cells[columnName];
|
|
13152
|
+
let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
|
|
13153
|
+
if (!icon) {
|
|
13154
|
+
icon = iconCell.value;
|
|
13155
|
+
}
|
|
13156
|
+
if (icon) {
|
|
13157
|
+
iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
|
|
13158
|
+
}
|
|
13159
|
+
}
|
|
13160
|
+
return iconUrl;
|
|
13161
|
+
}, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
|
|
13162
|
+
var _a;
|
|
13163
|
+
let iconColor = undefined;
|
|
13164
|
+
if (columnName) {
|
|
13165
|
+
const iconCell = row.cells[columnName];
|
|
13166
|
+
iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
|
|
13167
|
+
if (iconColor) {
|
|
13168
|
+
iconColor =
|
|
13169
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
|
|
13170
|
+
}
|
|
13171
|
+
}
|
|
13172
|
+
return iconColor;
|
|
13173
|
+
};
|
|
13016
13174
|
KupPlanner.style = kupPlannerCss;
|
|
13017
13175
|
|
|
13018
13176
|
export { KupPlanner as kup_planner };
|