bromcom-ui 2.7.36-rc.11 → 2.7.36-rc.12-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/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-ab7bb0f5.entry.js → p-118e711c.entry.js} +1 -1
- package/dist/bromcom-ui/p-121e4ca5.js +5 -0
- package/dist/bromcom-ui/{p-ae99e107.entry.js → p-25f444e7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8a66f4e1.entry.js → p-26e68ec6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-89241a6e.entry.js → p-27c8e474.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ed6d2390.entry.js → p-2ec58d06.entry.js} +1 -1
- package/dist/bromcom-ui/{p-81dff515.entry.js → p-2fc5b5bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c5c60034.entry.js → p-3cd7aace.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c5dcbc05.entry.js → p-41d1f8b7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c268491e.entry.js → p-505b1f51.entry.js} +1 -1
- package/dist/bromcom-ui/{p-950af117.js → p-5d337c50.js} +1 -1
- package/dist/bromcom-ui/{p-a7f8e8af.entry.js → p-5e502028.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a6fb1b6f.js → p-5f46c328.js} +1 -1
- package/dist/bromcom-ui/{p-d2101bab.entry.js → p-6711d370.entry.js} +1 -1
- package/dist/bromcom-ui/p-6b61ef5d.js +5 -0
- package/dist/bromcom-ui/{p-36168a4c.entry.js → p-76e8a020.entry.js} +1 -1
- package/dist/bromcom-ui/{p-49be07bc.entry.js → p-80cdeb5b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0505b430.entry.js → p-831fa0e8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ed8e6005.entry.js → p-83332466.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1c211b1a.entry.js → p-885292bf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1e4c4c89.entry.js → p-8ad347e0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8a189e31.entry.js → p-965d1cb2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c00cbc3c.js → p-9ab7c5f9.js} +1 -1
- package/dist/bromcom-ui/{p-7386f0eb.entry.js → p-a18bb86e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d2f22f4b.js → p-a25d4102.js} +1 -1
- package/dist/bromcom-ui/{p-01951e92.entry.js → p-a57c40a2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-16f3143c.entry.js → p-a6f49d6c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cef328d2.entry.js → p-a7acf688.entry.js} +1 -1
- package/dist/bromcom-ui/{p-50d9b950.entry.js → p-aedac6e4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d2d00b45.entry.js → p-b6c04be0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-eefa89b6.entry.js → p-bb4a5441.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1aa2c6f1.entry.js → p-bbeb3aa8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ae8f263e.entry.js → p-c0648349.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b0ecb69b.entry.js → p-c0a49e8e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7d21bcdb.entry.js → p-ca48c3aa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-febeb28c.entry.js → p-cad94133.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fcd2ded4.entry.js → p-cf48e4bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d8ef8c9d.entry.js → p-cf68a762.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4595d534.entry.js → p-cfeac4c2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c8dae4b7.entry.js → p-d0ae1e25.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b339c2f1.entry.js → p-e58a867d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-97a630d5.entry.js → p-e97f680e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d7189ee1.entry.js → p-f559a41c.entry.js} +1 -1
- package/dist/bromcom-ui/p-fb65423b.js +5 -0
- package/dist/bromcom-ui/{p-00028e84.entry.js → p-fb8d1e47.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-3330b325.js +0 -5
- package/dist/bromcom-ui/p-940d3fc3.js +0 -5
- package/dist/bromcom-ui/p-bddecc0e.js +0 -5
- package/dist/cjs/_commonjsHelpers-bd20f4c0.js +0 -29
- package/dist/cjs/bcm-2c51bf0c.js +0 -448
- package/dist/cjs/bcm-accordion.cjs.entry.js +0 -85
- package/dist/cjs/bcm-alert.cjs.entry.js +0 -112
- package/dist/cjs/bcm-attendance.cjs.entry.js +0 -50
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +0 -155
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -156
- package/dist/cjs/bcm-box.cjs.entry.js +0 -35
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +0 -67
- package/dist/cjs/bcm-button-group.cjs.entry.js +0 -102
- package/dist/cjs/bcm-button_13.cjs.entry.js +0 -1981
- package/dist/cjs/bcm-card.cjs.entry.js +0 -76
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -409
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +0 -2570
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -203
- package/dist/cjs/bcm-chip.cjs.entry.js +0 -70
- package/dist/cjs/bcm-collapse-group.cjs.entry.js +0 -57
- package/dist/cjs/bcm-collapse.cjs.entry.js +0 -58
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +0 -433
- package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -171
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1432
- package/dist/cjs/bcm-default.cjs.entry.js +0 -40
- package/dist/cjs/bcm-drawer.cjs.entry.js +0 -111
- package/dist/cjs/bcm-error-layout.cjs.entry.js +0 -78
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +0 -127
- package/dist/cjs/bcm-form-2.cjs.entry.js +0 -205
- package/dist/cjs/bcm-form-group.cjs.entry.js +0 -45
- package/dist/cjs/bcm-input.cjs.entry.js +0 -324
- package/dist/cjs/bcm-link.cjs.entry.js +0 -62
- package/dist/cjs/bcm-linked.cjs.entry.js +0 -83
- package/dist/cjs/bcm-list.cjs.entry.js +0 -1761
- package/dist/cjs/bcm-message.cjs.entry.js +0 -99
- package/dist/cjs/bcm-modal.cjs.entry.js +0 -137
- package/dist/cjs/bcm-notification.cjs.entry.js +0 -103
- package/dist/cjs/bcm-old-input.cjs.entry.js +0 -398
- package/dist/cjs/bcm-old-tag_2.cjs.entry.js +0 -157
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +0 -122
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +0 -112
- package/dist/cjs/bcm-progress.cjs.entry.js +0 -174
- package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -267
- package/dist/cjs/bcm-radio.cjs.entry.js +0 -104
- package/dist/cjs/bcm-range.cjs.entry.js +0 -189
- package/dist/cjs/bcm-result.cjs.entry.js +0 -79
- package/dist/cjs/bcm-search.cjs.entry.js +0 -256
- package/dist/cjs/bcm-select-group.cjs.entry.js +0 -31
- package/dist/cjs/bcm-select-option.cjs.entry.js +0 -37
- package/dist/cjs/bcm-select.cjs.entry.js +0 -1181
- package/dist/cjs/bcm-skeleton.cjs.entry.js +0 -56
- package/dist/cjs/bcm-step.cjs.entry.js +0 -93
- package/dist/cjs/bcm-stepper.cjs.entry.js +0 -211
- package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -172
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +0 -70
- package/dist/cjs/bcm-tab.cjs.entry.js +0 -89
- package/dist/cjs/bcm-table.cjs.entry.js +0 -78
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +0 -62
- package/dist/cjs/bcm-tabs.cjs.entry.js +0 -390
- package/dist/cjs/bcm-tag.cjs.entry.js +0 -101
- package/dist/cjs/bcm-textarea.cjs.entry.js +0 -150
- package/dist/cjs/bcm-time-picker.cjs.entry.js +0 -139
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +0 -55
- package/dist/cjs/bcm-timeline.cjs.entry.js +0 -73
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +0 -23
- package/dist/cjs/bromcom-ui.cjs.js +0 -24
- package/dist/cjs/caption-template-abc6b8bd.js +0 -34
- package/dist/cjs/color-helper-c9882bd8.js +0 -490
- package/dist/cjs/colors-56282b00.js +0 -224
- package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
- package/dist/cjs/element-dragger-a8562f82.js +0 -279
- package/dist/cjs/generate-f31baeb2.js +0 -198
- package/dist/cjs/global-b0d21446.js +0 -15
- package/dist/cjs/index-53637125.js +0 -1864
- package/dist/cjs/index-89682d55.js +0 -193
- package/dist/cjs/index-a2b50e51.js +0 -64
- package/dist/cjs/index.cjs.js +0 -6
- package/dist/cjs/input-template-9d262873.js +0 -86
- package/dist/cjs/is-load-decorator-20a4687b.js +0 -56
- package/dist/cjs/json-parse-decarator-c3596560.js +0 -40
- package/dist/cjs/label-template-b35d7e8e.js +0 -23
- package/dist/cjs/loader.cjs.js +0 -26
- package/dist/cjs/number-helper-0975436a.js +0 -20
- package/dist/cjs/old-bcm-popover.cjs.entry.js +0 -104
- package/dist/cjs/popover-placement-87901bb3.js +0 -98
- package/dist/cjs/property-decorators-b0cb1a50.js +0 -33
- package/dist/cjs/slot-template-546b0f5a.js +0 -15
- package/dist/cjs/stepper-states-0a54437d.js +0 -83
- package/dist/cjs/string-helper-df40a475.js +0 -134
- package/dist/cjs/tooltip-helper-6b5d41a4.js +0 -1449
- package/dist/cjs/types-3871235f.js +0 -32
- package/dist/cjs/types-6eb7e028.js +0 -32
- package/dist/cjs/types-cc4adee7.js +0 -19
- package/dist/cjs/utils-fc077139.js +0 -131
- package/dist/cjs/validators-f572960b.js +0 -33
- package/dist/collection/collection-manifest.json +0 -95
- package/dist/collection/components/atoms/avatar/avatar.css +0 -448
- package/dist/collection/components/atoms/avatar/avatar.js +0 -259
- package/dist/collection/components/atoms/badge/badge.css +0 -481
- package/dist/collection/components/atoms/badge/badge.js +0 -224
- package/dist/collection/components/atoms/box/box.js +0 -23
- package/dist/collection/components/atoms/button/button.css +0 -637
- package/dist/collection/components/atoms/button/button.js +0 -525
- package/dist/collection/components/atoms/button/types.js +0 -170
- package/dist/collection/components/atoms/chip/chip.css +0 -453
- package/dist/collection/components/atoms/chip/chip.js +0 -187
- package/dist/collection/components/atoms/divider/divider.css +0 -142
- package/dist/collection/components/atoms/divider/divider.js +0 -83
- package/dist/collection/components/atoms/icon/icon.css +0 -127
- package/dist/collection/components/atoms/icon/icon.js +0 -70
- package/dist/collection/components/atoms/label/label.css +0 -408
- package/dist/collection/components/atoms/label/label.js +0 -216
- package/dist/collection/components/atoms/link/link.css +0 -419
- package/dist/collection/components/atoms/link/link.js +0 -176
- package/dist/collection/components/atoms/states/button.states.js +0 -31
- package/dist/collection/components/atoms/tag/tag.js +0 -334
- package/dist/collection/components/atoms/tag/types.js +0 -30
- package/dist/collection/components/atoms/typography/typography.js +0 -23
- package/dist/collection/components/molecules/accordion/accordion.css +0 -127
- package/dist/collection/components/molecules/accordion/accordion.js +0 -129
- package/dist/collection/components/molecules/alert/alert.css +0 -191
- package/dist/collection/components/molecules/alert/alert.js +0 -298
- package/dist/collection/components/molecules/alert/types.js +0 -23
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +0 -201
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +0 -155
- package/dist/collection/components/molecules/breadcrumb/types.js +0 -5
- package/dist/collection/components/molecules/button-group/button-group.css +0 -423
- package/dist/collection/components/molecules/button-group/button-group.js +0 -235
- package/dist/collection/components/molecules/card/card.css +0 -408
- package/dist/collection/components/molecules/card/card.js +0 -128
- package/dist/collection/components/molecules/checkbox/checkbox-lite.js +0 -237
- package/dist/collection/components/molecules/checkbox/checkbox.css +0 -1280
- package/dist/collection/components/molecules/checkbox/checkbox.js +0 -688
- package/dist/collection/components/molecules/checkbox/group.css +0 -156
- package/dist/collection/components/molecules/checkbox/group.js +0 -779
- package/dist/collection/components/molecules/drawer/drawer.css +0 -502
- package/dist/collection/components/molecules/drawer/drawer.js +0 -272
- package/dist/collection/components/molecules/dropdown/dropdown.css +0 -419
- package/dist/collection/components/molecules/dropdown/dropdown.js +0 -839
- package/dist/collection/components/molecules/empty/empty.js +0 -44
- package/dist/collection/components/molecules/error-layout/error-layout.css +0 -396
- package/dist/collection/components/molecules/error-layout/error-layout.js +0 -177
- package/dist/collection/components/molecules/error-layout/types.js +0 -5
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -488
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +0 -322
- package/dist/collection/components/molecules/input/input.css +0 -1208
- package/dist/collection/components/molecules/input/input.js +0 -1170
- package/dist/collection/components/molecules/input/types.js +0 -17
- package/dist/collection/components/molecules/item/item.css +0 -446
- package/dist/collection/components/molecules/item/item.js +0 -151
- package/dist/collection/components/molecules/items/items.js +0 -84
- package/dist/collection/components/molecules/linked/linked.js +0 -179
- package/dist/collection/components/molecules/menu/menu.css +0 -718
- package/dist/collection/components/molecules/menu/menu.js +0 -618
- package/dist/collection/components/molecules/message/message.css +0 -165
- package/dist/collection/components/molecules/message/message.js +0 -222
- package/dist/collection/components/molecules/message/types.js +0 -14
- package/dist/collection/components/molecules/modal/modal.css +0 -526
- package/dist/collection/components/molecules/modal/modal.js +0 -379
- package/dist/collection/components/molecules/notification/notification.css +0 -183
- package/dist/collection/components/molecules/notification/notification.js +0 -244
- package/dist/collection/components/molecules/notification/types.js +0 -15
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +0 -563
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +0 -396
- package/dist/collection/components/molecules/popconfirm/popconfirm.css +0 -127
- package/dist/collection/components/molecules/popconfirm/popconfirm.js +0 -382
- package/dist/collection/components/molecules/popover/popover.js +0 -254
- package/dist/collection/components/molecules/progress/progress.css +0 -486
- package/dist/collection/components/molecules/progress/progress.js +0 -404
- package/dist/collection/components/molecules/progress/types.js +0 -28
- package/dist/collection/components/molecules/radio/group.css +0 -798
- package/dist/collection/components/molecules/radio/group.js +0 -652
- package/dist/collection/components/molecules/radio/radio.css +0 -1280
- package/dist/collection/components/molecules/radio/radio.js +0 -291
- package/dist/collection/components/molecules/radio/types.js +0 -30
- package/dist/collection/components/molecules/range/range.css +0 -570
- package/dist/collection/components/molecules/range/range.js +0 -472
- package/dist/collection/components/molecules/result/result.css +0 -164
- package/dist/collection/components/molecules/result/result.js +0 -143
- package/dist/collection/components/molecules/result/types.js +0 -22
- package/dist/collection/components/molecules/search/search.css +0 -1208
- package/dist/collection/components/molecules/search/search.js +0 -406
- package/dist/collection/components/molecules/skeleton/skeleton.js +0 -94
- package/dist/collection/components/molecules/states/alert.states.js +0 -25
- package/dist/collection/components/molecules/states/checkbox-group.states.js +0 -199
- package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
- package/dist/collection/components/molecules/states/search.states.js +0 -137
- package/dist/collection/components/molecules/states/stepper-states.js +0 -79
- package/dist/collection/components/molecules/stepper/step.js +0 -346
- package/dist/collection/components/molecules/stepper/stepper.css +0 -617
- package/dist/collection/components/molecules/stepper/stepper.js +0 -484
- package/dist/collection/components/molecules/switch/switch.css +0 -1272
- package/dist/collection/components/molecules/switch/switch.js +0 -716
- package/dist/collection/components/molecules/tab-group/tab-group.js +0 -280
- package/dist/collection/components/molecules/textarea/textarea.css +0 -1208
- package/dist/collection/components/molecules/textarea/textarea.js +0 -731
- package/dist/collection/components/molecules/textarea/types.js +0 -13
- package/dist/collection/components/molecules/timeline/timeline-item.css +0 -254
- package/dist/collection/components/molecules/timeline/timeline-item.js +0 -159
- package/dist/collection/components/molecules/timeline/timeline.css +0 -205
- package/dist/collection/components/molecules/timeline/timeline.js +0 -125
- package/dist/collection/components/molecules/tooltip/tooltip.js +0 -232
- package/dist/collection/components/organism/autocomplete/autocomplete.css +0 -168
- package/dist/collection/components/organism/autocomplete/autocomplete.js +0 -399
- package/dist/collection/components/organism/colorpicker/colorpicker.css +0 -313
- package/dist/collection/components/organism/colorpicker/colorpicker.js +0 -774
- package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
- package/dist/collection/components/organism/colorpicker/static/color.svg +0 -14
- package/dist/collection/components/organism/colorpicker/static/colors.svg +0 -16
- package/dist/collection/components/organism/date-picker/date-picker.css +0 -141
- package/dist/collection/components/organism/date-picker/date-picker.js +0 -780
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +0 -1429
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +0 -2166
- package/dist/collection/components/organism/datetime-picker/types.js +0 -39
- package/dist/collection/components/organism/form/form-group.css +0 -131
- package/dist/collection/components/organism/form/form-group.js +0 -131
- package/dist/collection/components/organism/form/form.css +0 -132
- package/dist/collection/components/organism/form/form.js +0 -680
- package/dist/collection/components/organism/form-2/bcm-form-components.js +0 -26
- package/dist/collection/components/organism/form-2/form-2.css +0 -127
- package/dist/collection/components/organism/form-2/form-2.js +0 -328
- package/dist/collection/components/organism/list/list-key-control.js +0 -125
- package/dist/collection/components/organism/list/list-tag-control.js +0 -172
- package/dist/collection/components/organism/list/list.css +0 -2047
- package/dist/collection/components/organism/list/list.js +0 -1860
- package/dist/collection/components/organism/states/bcm-list2.states.js +0 -532
- package/dist/collection/components/organism/time-picker/time-picker.css +0 -141
- package/dist/collection/components/organism/time-picker/time-picker.js +0 -627
- package/dist/collection/components/other/attendance/attendance.css +0 -433
- package/dist/collection/components/other/attendance/attendance.js +0 -87
- package/dist/collection/components/other/data-table/table.css +0 -130
- package/dist/collection/components/other/data-table/table.js +0 -92
- package/dist/collection/components/other/default/default.css +0 -127
- package/dist/collection/components/other/default/default.js +0 -54
- package/dist/collection/components/other_deprecated/collapse/collapse.css +0 -177
- package/dist/collection/components/other_deprecated/collapse/collapse.js +0 -163
- package/dist/collection/components/other_deprecated/collapse/group.js +0 -128
- package/dist/collection/components/other_deprecated/listbox/listbox-group.css +0 -139
- package/dist/collection/components/other_deprecated/listbox/listbox-group.js +0 -93
- package/dist/collection/components/other_deprecated/listbox/listbox-item.css +0 -269
- package/dist/collection/components/other_deprecated/listbox/listbox-item.js +0 -641
- package/dist/collection/components/other_deprecated/listbox/listbox.css +0 -365
- package/dist/collection/components/other_deprecated/listbox/listbox.js +0 -1999
- package/dist/collection/components/other_deprecated/listbox/types.js +0 -11
- package/dist/collection/components/other_deprecated/old-input/old-input.css +0 -1360
- package/dist/collection/components/other_deprecated/old-input/old-input.js +0 -1154
- package/dist/collection/components/other_deprecated/old-input/types.js +0 -17
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +0 -582
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +0 -411
- package/dist/collection/components/other_deprecated/old-popover/old-popover.css +0 -127
- package/dist/collection/components/other_deprecated/old-popover/old-popover.js +0 -296
- package/dist/collection/components/other_deprecated/old-search/old-search.css +0 -131
- package/dist/collection/components/other_deprecated/old-search/old-search.js +0 -496
- package/dist/collection/components/other_deprecated/old-tag/old-tag.css +0 -305
- package/dist/collection/components/other_deprecated/old-tag/old-tag.js +0 -326
- package/dist/collection/components/other_deprecated/old-tag/types.js +0 -30
- package/dist/collection/components/other_deprecated/select/group.css +0 -144
- package/dist/collection/components/other_deprecated/select/group.js +0 -88
- package/dist/collection/components/other_deprecated/select/option.css +0 -164
- package/dist/collection/components/other_deprecated/select/option.js +0 -142
- package/dist/collection/components/other_deprecated/select/select-box.css +0 -143
- package/dist/collection/components/other_deprecated/select/select-box.js +0 -104
- package/dist/collection/components/other_deprecated/select/select.css +0 -364
- package/dist/collection/components/other_deprecated/select/select.js +0 -2229
- package/dist/collection/components/other_deprecated/tabs/tab-pane.css +0 -142
- package/dist/collection/components/other_deprecated/tabs/tab-pane.js +0 -168
- package/dist/collection/components/other_deprecated/tabs/tab.css +0 -587
- package/dist/collection/components/other_deprecated/tabs/tab.js +0 -303
- package/dist/collection/components/other_deprecated/tabs/tabs-content.css +0 -136
- package/dist/collection/components/other_deprecated/tabs/tabs-content.js +0 -147
- package/dist/collection/components/other_deprecated/tabs/tabs.css +0 -212
- package/dist/collection/components/other_deprecated/tabs/tabs.js +0 -806
- package/dist/collection/components/other_deprecated/tabs/types.js +0 -30
- package/dist/collection/components/other_deprecated/text/text.css +0 -429
- package/dist/collection/components/other_deprecated/text/text.js +0 -159
- package/dist/collection/components/other_deprecated/treeview/treeview-group.css +0 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-group.js +0 -18
- package/dist/collection/components/other_deprecated/treeview/treeview-item.css +0 -318
- package/dist/collection/components/other_deprecated/treeview/treeview-item.js +0 -977
- package/dist/collection/components/other_deprecated/treeview/treeview.css +0 -190
- package/dist/collection/components/other_deprecated/treeview/treeview.js +0 -1699
- package/dist/collection/components/other_deprecated/treeview/types.js +0 -11
- package/dist/collection/decorators/id-decorator.js +0 -18
- package/dist/collection/decorators/index.js +0 -8
- package/dist/collection/decorators/is-load-decorator.js +0 -51
- package/dist/collection/decorators/json-parse-decarator.js +0 -35
- package/dist/collection/decorators/property-decorators.js +0 -28
- package/dist/collection/global/components/_checkbox.css +0 -627
- package/dist/collection/global/config.js +0 -45
- package/dist/collection/global/global.js +0 -43
- package/dist/collection/global/variables/colors.js +0 -220
- package/dist/collection/helper/color-helper.js +0 -81
- package/dist/collection/helper/content-helper.js +0 -63
- package/dist/collection/helper/datetime-helper.js +0 -7
- package/dist/collection/helper/generate.js +0 -163
- package/dist/collection/helper/index.js +0 -13
- package/dist/collection/helper/number-helper.js +0 -15
- package/dist/collection/helper/popover-helper.js +0 -104
- package/dist/collection/helper/string-helper.js +0 -65
- package/dist/collection/helper/tooltip-helper.js +0 -93
- package/dist/collection/helper/validators.js +0 -28
- package/dist/collection/index.js +0 -5
- package/dist/collection/models/abstract-classes/abstract-key-control.js +0 -97
- package/dist/collection/models/bcm-types.js +0 -5
- package/dist/collection/models/bcm.js +0 -466
- package/dist/collection/models/index.js +0 -6
- package/dist/collection/models/states/atoms/bcm-atoms-state.js +0 -5
- package/dist/collection/models/states/molecules/bcm-molecules-state.js +0 -5
- package/dist/collection/models/states/organisms/bcm-organisms-state.js +0 -5
- package/dist/collection/templates/button-template.js +0 -22
- package/dist/collection/templates/caption-template.js +0 -29
- package/dist/collection/templates/checkbox-group-template.js +0 -10
- package/dist/collection/templates/checkbox-template.js +0 -31
- package/dist/collection/templates/icon-template.js +0 -24
- package/dist/collection/templates/index.js +0 -17
- package/dist/collection/templates/info-footer-template.js +0 -16
- package/dist/collection/templates/input-template.js +0 -81
- package/dist/collection/templates/label-template.js +0 -18
- package/dist/collection/templates/list-item-template.js +0 -58
- package/dist/collection/templates/list-template.js +0 -24
- package/dist/collection/templates/slot-template.js +0 -10
- package/dist/collection/templates/step-template.js +0 -26
- package/dist/collection/templates/tag-template.js +0 -45
- package/dist/collection/types/index.js +0 -5
- package/dist/collection/utils/element-dragger.js +0 -274
- package/dist/collection/utils/floating-ui.js +0 -62
- package/dist/collection/utils/index.js +0 -9
- package/dist/collection/utils/popover-placement.js +0 -96
- package/dist/collection/utils/utils.js +0 -223
- package/dist/collection/utils/validation.js +0 -47
- package/dist/esm/_commonjsHelpers-3016b722.js +0 -25
- package/dist/esm/bcm-accordion.entry.js +0 -81
- package/dist/esm/bcm-alert.entry.js +0 -108
- package/dist/esm/bcm-attendance.entry.js +0 -46
- package/dist/esm/bcm-autocomplete.entry.js +0 -151
- package/dist/esm/bcm-avatar_2.entry.js +0 -151
- package/dist/esm/bcm-b8d8a236.js +0 -446
- package/dist/esm/bcm-box.entry.js +0 -31
- package/dist/esm/bcm-breadcrumb.entry.js +0 -63
- package/dist/esm/bcm-button-group.entry.js +0 -98
- package/dist/esm/bcm-button_13.entry.js +0 -1965
- package/dist/esm/bcm-card.entry.js +0 -72
- package/dist/esm/bcm-checkbox-group.entry.js +0 -405
- package/dist/esm/bcm-checkbox-lite_9.entry.js +0 -2558
- package/dist/esm/bcm-checkbox_2.entry.js +0 -198
- package/dist/esm/bcm-chip.entry.js +0 -66
- package/dist/esm/bcm-collapse-group.entry.js +0 -53
- package/dist/esm/bcm-collapse.entry.js +0 -54
- package/dist/esm/bcm-colorpicker.entry.js +0 -429
- package/dist/esm/bcm-date-picker.entry.js +0 -167
- package/dist/esm/bcm-datetime-picker.entry.js +0 -1428
- package/dist/esm/bcm-default.entry.js +0 -36
- package/dist/esm/bcm-drawer.entry.js +0 -107
- package/dist/esm/bcm-error-layout.entry.js +0 -74
- package/dist/esm/bcm-expansion-panel.entry.js +0 -123
- package/dist/esm/bcm-form-2.entry.js +0 -201
- package/dist/esm/bcm-form-group.entry.js +0 -41
- package/dist/esm/bcm-input.entry.js +0 -320
- package/dist/esm/bcm-link.entry.js +0 -58
- package/dist/esm/bcm-linked.entry.js +0 -79
- package/dist/esm/bcm-list.entry.js +0 -1757
- package/dist/esm/bcm-message.entry.js +0 -95
- package/dist/esm/bcm-modal.entry.js +0 -133
- package/dist/esm/bcm-notification.entry.js +0 -99
- package/dist/esm/bcm-old-input.entry.js +0 -394
- package/dist/esm/bcm-old-tag_2.entry.js +0 -152
- package/dist/esm/bcm-popconfirm-box.entry.js +0 -118
- package/dist/esm/bcm-popconfirm.entry.js +0 -108
- package/dist/esm/bcm-progress.entry.js +0 -170
- package/dist/esm/bcm-radio-group.entry.js +0 -263
- package/dist/esm/bcm-radio.entry.js +0 -100
- package/dist/esm/bcm-range.entry.js +0 -185
- package/dist/esm/bcm-result.entry.js +0 -75
- package/dist/esm/bcm-search.entry.js +0 -252
- package/dist/esm/bcm-select-group.entry.js +0 -27
- package/dist/esm/bcm-select-option.entry.js +0 -33
- package/dist/esm/bcm-select.entry.js +0 -1177
- package/dist/esm/bcm-skeleton.entry.js +0 -52
- package/dist/esm/bcm-step.entry.js +0 -89
- package/dist/esm/bcm-stepper.entry.js +0 -207
- package/dist/esm/bcm-tab-group.entry.js +0 -168
- package/dist/esm/bcm-tab-pane.entry.js +0 -66
- package/dist/esm/bcm-tab.entry.js +0 -85
- package/dist/esm/bcm-table.entry.js +0 -74
- package/dist/esm/bcm-tabs-content.entry.js +0 -58
- package/dist/esm/bcm-tabs.entry.js +0 -386
- package/dist/esm/bcm-tag.entry.js +0 -97
- package/dist/esm/bcm-textarea.entry.js +0 -146
- package/dist/esm/bcm-time-picker.entry.js +0 -135
- package/dist/esm/bcm-timeline-item.entry.js +0 -51
- package/dist/esm/bcm-timeline.entry.js +0 -69
- package/dist/esm/bcm-treeview-group.entry.js +0 -19
- package/dist/esm/bromcom-ui.js +0 -22
- package/dist/esm/caption-template-3dc68282.js +0 -32
- package/dist/esm/color-helper-7e202fd8.js +0 -488
- package/dist/esm/colors-1d7854ea.js +0 -222
- package/dist/esm/datetime-helper-df25808a.js +0 -9
- package/dist/esm/element-dragger-89bb52fd.js +0 -277
- package/dist/esm/generate-fb5ddb87.js +0 -195
- package/dist/esm/global-4fad925b.js +0 -13
- package/dist/esm/index-36ae55c5.js +0 -191
- package/dist/esm/index-ba2edd32.js +0 -62
- package/dist/esm/index-bd33e7be.js +0 -1833
- package/dist/esm/index.js +0 -4
- package/dist/esm/input-template-0c47abf5.js +0 -84
- package/dist/esm/is-load-decorator-73e33bee.js +0 -54
- package/dist/esm/json-parse-decarator-7b411846.js +0 -38
- package/dist/esm/label-template-c83a04a3.js +0 -21
- package/dist/esm/loader.js +0 -22
- package/dist/esm/number-helper-42be449e.js +0 -18
- package/dist/esm/old-bcm-popover.entry.js +0 -100
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/popover-placement-9864294b.js +0 -95
- package/dist/esm/property-decorators-61be220d.js +0 -31
- package/dist/esm/slot-template-24f1e66e.js +0 -13
- package/dist/esm/stepper-states-b8e9888d.js +0 -81
- package/dist/esm/string-helper-74a1648f.js +0 -132
- package/dist/esm/tooltip-helper-427dd3f5.js +0 -1446
- package/dist/esm/types-6f06fa1a.js +0 -19
- package/dist/esm/types-b211a5eb.js +0 -32
- package/dist/esm/types-bfc3bba1.js +0 -32
- package/dist/esm/utils-57652744.js +0 -123
- package/dist/esm/validators-6f23b54f.js +0 -31
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +0 -23
- package/dist/types/components/atoms/badge/badge.d.ts +0 -17
- package/dist/types/components/atoms/box/box.d.ts +0 -5
- package/dist/types/components/atoms/button/button.d.ts +0 -33
- package/dist/types/components/atoms/button/types.d.ts +0 -166
- package/dist/types/components/atoms/chip/chip.d.ts +0 -24
- package/dist/types/components/atoms/divider/divider.d.ts +0 -7
- package/dist/types/components/atoms/icon/icon.d.ts +0 -6
- package/dist/types/components/atoms/label/label.d.ts +0 -16
- package/dist/types/components/atoms/link/link.d.ts +0 -13
- package/dist/types/components/atoms/states/button.states.d.ts +0 -7
- package/dist/types/components/atoms/tag/tag.d.ts +0 -24
- package/dist/types/components/atoms/tag/types.d.ts +0 -29
- package/dist/types/components/atoms/typography/typography.d.ts +0 -5
- package/dist/types/components/molecules/accordion/accordion.d.ts +0 -11
- package/dist/types/components/molecules/alert/alert.d.ts +0 -21
- package/dist/types/components/molecules/alert/types.d.ts +0 -25
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +0 -14
- package/dist/types/components/molecules/breadcrumb/types.d.ts +0 -10
- package/dist/types/components/molecules/button-group/button-group.d.ts +0 -21
- package/dist/types/components/molecules/card/card.d.ts +0 -11
- package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +0 -14
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +0 -56
- package/dist/types/components/molecules/checkbox/group.d.ts +0 -56
- package/dist/types/components/molecules/drawer/drawer.d.ts +0 -21
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +0 -54
- package/dist/types/components/molecules/empty/empty.d.ts +0 -5
- package/dist/types/components/molecules/error-layout/error-layout.d.ts +0 -25
- package/dist/types/components/molecules/error-layout/types.d.ts +0 -4
- package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +0 -31
- package/dist/types/components/molecules/input/input.d.ts +0 -82
- package/dist/types/components/molecules/input/types.d.ts +0 -13
- package/dist/types/components/molecules/item/item.d.ts +0 -13
- package/dist/types/components/molecules/items/items.d.ts +0 -10
- package/dist/types/components/molecules/linked/linked.d.ts +0 -14
- package/dist/types/components/molecules/menu/menu.d.ts +0 -41
- package/dist/types/components/molecules/message/message.d.ts +0 -32
- package/dist/types/components/molecules/message/types.d.ts +0 -13
- package/dist/types/components/molecules/modal/modal.d.ts +0 -26
- package/dist/types/components/molecules/notification/notification.d.ts +0 -42
- package/dist/types/components/molecules/notification/types.d.ts +0 -14
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +0 -29
- package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +0 -28
- package/dist/types/components/molecules/popover/popover.d.ts +0 -20
- package/dist/types/components/molecules/progress/progress.d.ts +0 -25
- package/dist/types/components/molecules/progress/types.d.ts +0 -14
- package/dist/types/components/molecules/radio/group.d.ts +0 -54
- package/dist/types/components/molecules/radio/radio.d.ts +0 -21
- package/dist/types/components/molecules/radio/types.d.ts +0 -29
- package/dist/types/components/molecules/range/range.d.ts +0 -36
- package/dist/types/components/molecules/result/result.d.ts +0 -13
- package/dist/types/components/molecules/result/types.d.ts +0 -19
- package/dist/types/components/molecules/search/search.d.ts +0 -35
- package/dist/types/components/molecules/skeleton/skeleton.d.ts +0 -8
- package/dist/types/components/molecules/states/alert.states.d.ts +0 -7
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +0 -53
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
- package/dist/types/components/molecules/states/search.states.d.ts +0 -14
- package/dist/types/components/molecules/states/stepper-states.d.ts +0 -13
- package/dist/types/components/molecules/stepper/step.d.ts +0 -25
- package/dist/types/components/molecules/stepper/stepper.d.ts +0 -34
- package/dist/types/components/molecules/switch/switch.d.ts +0 -46
- package/dist/types/components/molecules/tab-group/tab-group.d.ts +0 -18
- package/dist/types/components/molecules/textarea/textarea.d.ts +0 -53
- package/dist/types/components/molecules/textarea/types.d.ts +0 -9
- package/dist/types/components/molecules/timeline/timeline-item.d.ts +0 -16
- package/dist/types/components/molecules/timeline/timeline.d.ts +0 -25
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +0 -19
- package/dist/types/components/organism/autocomplete/autocomplete.d.ts +0 -31
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +0 -176
- package/dist/types/components/organism/date-picker/date-picker.d.ts +0 -77
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +0 -438
- package/dist/types/components/organism/datetime-picker/types.d.ts +0 -54
- package/dist/types/components/organism/form/form-group.d.ts +0 -10
- package/dist/types/components/organism/form/form.d.ts +0 -34
- package/dist/types/components/organism/form-2/bcm-form-components.d.ts +0 -2
- package/dist/types/components/organism/form-2/form-2.d.ts +0 -25
- package/dist/types/components/organism/list/list-key-control.d.ts +0 -18
- package/dist/types/components/organism/list/list-tag-control.d.ts +0 -18
- package/dist/types/components/organism/list/list.d.ts +0 -138
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +0 -28
- package/dist/types/components/organism/time-picker/time-picker.d.ts +0 -69
- package/dist/types/components/other/attendance/attendance.d.ts +0 -7
- package/dist/types/components/other/data-table/table.d.ts +0 -8
- package/dist/types/components/other/default/default.d.ts +0 -6
- package/dist/types/components/other_deprecated/collapse/collapse.d.ts +0 -12
- package/dist/types/components/other_deprecated/collapse/group.d.ts +0 -15
- package/dist/types/components/other_deprecated/listbox/listbox-group.d.ts +0 -7
- package/dist/types/components/other_deprecated/listbox/listbox-item.d.ts +0 -58
- package/dist/types/components/other_deprecated/listbox/listbox.d.ts +0 -152
- package/dist/types/components/other_deprecated/listbox/types.d.ts +0 -11
- package/dist/types/components/other_deprecated/old-input/old-input.d.ts +0 -80
- package/dist/types/components/other_deprecated/old-input/types.d.ts +0 -13
- package/dist/types/components/other_deprecated/old-popover/old-popover-box.d.ts +0 -25
- package/dist/types/components/other_deprecated/old-popover/old-popover.d.ts +0 -22
- package/dist/types/components/other_deprecated/old-search/old-search.d.ts +0 -32
- package/dist/types/components/other_deprecated/old-tag/old-tag.d.ts +0 -27
- package/dist/types/components/other_deprecated/old-tag/types.d.ts +0 -29
- package/dist/types/components/other_deprecated/select/group.d.ts +0 -6
- package/dist/types/components/other_deprecated/select/option.d.ts +0 -10
- package/dist/types/components/other_deprecated/select/select-box.d.ts +0 -15
- package/dist/types/components/other_deprecated/select/select.d.ts +0 -131
- package/dist/types/components/other_deprecated/tabs/tab-pane.d.ts +0 -19
- package/dist/types/components/other_deprecated/tabs/tab.d.ts +0 -36
- package/dist/types/components/other_deprecated/tabs/tabs-content.d.ts +0 -18
- package/dist/types/components/other_deprecated/tabs/tabs.d.ts +0 -112
- package/dist/types/components/other_deprecated/tabs/types.d.ts +0 -39
- package/dist/types/components/other_deprecated/text/text.d.ts +0 -11
- package/dist/types/components/other_deprecated/treeview/treeview-group.d.ts +0 -3
- package/dist/types/components/other_deprecated/treeview/treeview-item.d.ts +0 -119
- package/dist/types/components/other_deprecated/treeview/treeview.d.ts +0 -181
- package/dist/types/components/other_deprecated/treeview/types.d.ts +0 -11
- package/dist/types/components.d.ts +0 -3517
- package/dist/types/decorators/id-decorator.d.ts +0 -4
- package/dist/types/decorators/index.d.ts +0 -4
- package/dist/types/decorators/is-load-decorator.d.ts +0 -7
- package/dist/types/decorators/json-parse-decarator.d.ts +0 -4
- package/dist/types/decorators/property-decorators.d.ts +0 -4
- package/dist/types/global/variables/colors.d.ts +0 -217
- package/dist/types/helper/color-helper.d.ts +0 -16
- package/dist/types/helper/content-helper.d.ts +0 -18
- package/dist/types/helper/datetime-helper.d.ts +0 -3
- package/dist/types/helper/generate.d.ts +0 -21
- package/dist/types/helper/index.d.ts +0 -9
- package/dist/types/helper/number-helper.d.ts +0 -10
- package/dist/types/helper/popover-helper.d.ts +0 -31
- package/dist/types/helper/string-helper.d.ts +0 -27
- package/dist/types/helper/tooltip-helper.d.ts +0 -25
- package/dist/types/helper/validators.d.ts +0 -10
- package/dist/types/index.d.ts +0 -1
- package/dist/types/models/abstract-classes/abstract-key-control.d.ts +0 -31
- package/dist/types/models/bcm-types.d.ts +0 -21
- package/dist/types/models/bcm.d.ts +0 -456
- package/dist/types/models/index.d.ts +0 -2
- package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +0 -34
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +0 -90
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +0 -78
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/dist/types/templates/button-template.d.ts +0 -18
- package/dist/types/templates/caption-template.d.ts +0 -14
- package/dist/types/templates/checkbox-group-template.d.ts +0 -10
- package/dist/types/templates/checkbox-template.d.ts +0 -13
- package/dist/types/templates/icon-template.d.ts +0 -7
- package/dist/types/templates/index.d.ts +0 -13
- package/dist/types/templates/info-footer-template.d.ts +0 -10
- package/dist/types/templates/input-template.d.ts +0 -34
- package/dist/types/templates/label-template.d.ts +0 -12
- package/dist/types/templates/list-item-template.d.ts +0 -13
- package/dist/types/templates/list-template.d.ts +0 -29
- package/dist/types/templates/slot-template.d.ts +0 -8
- package/dist/types/templates/step-template.d.ts +0 -17
- package/dist/types/templates/tag-template.d.ts +0 -21
- package/dist/types/types/index.d.ts +0 -12
- package/dist/types/utils/element-dragger.d.ts +0 -146
- package/dist/types/utils/floating-ui.d.ts +0 -6
- package/dist/types/utils/index.d.ts +0 -5
- package/dist/types/utils/popover-placement.d.ts +0 -3
- package/dist/types/utils/utils.d.ts +0 -55
- package/dist/types/utils/validation.d.ts +0 -19
|
@@ -1,2166 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
-
};
|
|
11
|
-
import { Component, Prop, h, State, Watch, Element, forceUpdate, Host, Method, Listen, Event } from '@stencil/core';
|
|
12
|
-
import { ElementDragger, DragDirections } from '../../../utils/element-dragger';
|
|
13
|
-
import { Months, Days, Types } from './types';
|
|
14
|
-
import cs from 'classnames';
|
|
15
|
-
import { DateTimeHelper } from '../../../helper/datetime-helper';
|
|
16
|
-
import { delay } from '../../../utils/utils';
|
|
17
|
-
import { Generate } from '../../../helper/generate';
|
|
18
|
-
import Bcm from '../../../models/bcm';
|
|
19
|
-
import { getPlacement, setPosition } from '../../../utils/popover-placement';
|
|
20
|
-
import { LabelTemplate } from '../../../templates/label-template';
|
|
21
|
-
import { IsLoad } from '../../../decorators/is-load-decorator';
|
|
22
|
-
const stringify = JSON.stringify;
|
|
23
|
-
export class BcmDatetimePicker {
|
|
24
|
-
constructor() {
|
|
25
|
-
this.inputId = null;
|
|
26
|
-
this.emptyState = false;
|
|
27
|
-
this.initialized = false;
|
|
28
|
-
this.disabledDatesList = { min: null, max: null, dates: [] };
|
|
29
|
-
this.dayNumbers = [];
|
|
30
|
-
this.valueText = null;
|
|
31
|
-
this.dataIsValid = false;
|
|
32
|
-
/**
|
|
33
|
-
* Component Properties
|
|
34
|
-
*/
|
|
35
|
-
this._id = Generate.UID();
|
|
36
|
-
this.date = new Date();
|
|
37
|
-
this.endDate = null;
|
|
38
|
-
this.type = Types.datetime;
|
|
39
|
-
this.disabled = false;
|
|
40
|
-
this.disabledDates = '';
|
|
41
|
-
this.value = null;
|
|
42
|
-
this._open = false;
|
|
43
|
-
this.hidden = false;
|
|
44
|
-
this.fullWidth = false;
|
|
45
|
-
this.required = false;
|
|
46
|
-
this.minYear = 1900;
|
|
47
|
-
this.maxYear = 2200;
|
|
48
|
-
this.noCaption = false;
|
|
49
|
-
this.caption = '';
|
|
50
|
-
this.captionType = 'default';
|
|
51
|
-
this.placement = Bcm.Placement['bottom-start'];
|
|
52
|
-
/**
|
|
53
|
-
* Component States
|
|
54
|
-
*/
|
|
55
|
-
this.years = [];
|
|
56
|
-
this.hours = [];
|
|
57
|
-
this.minutes = [];
|
|
58
|
-
this.hasDateModule = false;
|
|
59
|
-
this.hasTimeModule = false;
|
|
60
|
-
this.error = false;
|
|
61
|
-
this.errorText = '';
|
|
62
|
-
this.tick = {};
|
|
63
|
-
}
|
|
64
|
-
markForCheck() {
|
|
65
|
-
this.tick = Generate.UID();
|
|
66
|
-
}
|
|
67
|
-
openChanged() {
|
|
68
|
-
this.bcmOpen.emit(this._open);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @ComponentMethod
|
|
72
|
-
*/
|
|
73
|
-
componentWillLoad() {
|
|
74
|
-
this.inputId = 'picker-input-' + this._id;
|
|
75
|
-
this.hasDateModule = this.type === Types.datetime
|
|
76
|
-
|| this.type === Types.date
|
|
77
|
-
|| this.type === Types.range;
|
|
78
|
-
this.hasTimeModule = this.type === Types.datetime
|
|
79
|
-
|| this.type === Types.time;
|
|
80
|
-
this.prepareDisabledDates();
|
|
81
|
-
this.setData();
|
|
82
|
-
// Generate year, hour, minute sequences
|
|
83
|
-
// #
|
|
84
|
-
if (!this.initialized) {
|
|
85
|
-
for (let i = this.minYear; i <= this.maxYear; i++)
|
|
86
|
-
this.years.push(i);
|
|
87
|
-
for (let i = 0; i <= 23; i++)
|
|
88
|
-
this.hours.push(i);
|
|
89
|
-
for (let i = 0; i <= 59; i++)
|
|
90
|
-
this.minutes.push(i);
|
|
91
|
-
this.load.emit();
|
|
92
|
-
}
|
|
93
|
-
this.initialized = true;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @ComponentMethod
|
|
97
|
-
*/
|
|
98
|
-
componentDidRender() {
|
|
99
|
-
// Create years selection
|
|
100
|
-
// #
|
|
101
|
-
if (this.hasDateModule && !this.yearsDragger) {
|
|
102
|
-
this.createDragSelection('years', this.yearsElement, this.yearsWrapperElement, this.yearsStripElement, DragDirections.y);
|
|
103
|
-
this.createWheelChange('years', this.yearsWrapperElement, this.yearsStripElement);
|
|
104
|
-
this.setDragSelection('years', this.currentDate.year);
|
|
105
|
-
}
|
|
106
|
-
// Create hours selection
|
|
107
|
-
// #
|
|
108
|
-
if (this.hasTimeModule && !this.hoursDragger) {
|
|
109
|
-
this.createDragSelection('hours', this.hoursElement, this.hoursWrapperElement, this.timeStripElement, DragDirections.y);
|
|
110
|
-
this.createWheelChange('hours', this.hoursWrapperElement, this.timeStripElement);
|
|
111
|
-
this.setDragSelection('hours', this.currentDate.hour);
|
|
112
|
-
}
|
|
113
|
-
// Create minutes selection
|
|
114
|
-
// #
|
|
115
|
-
if (this.hasTimeModule && !this.minutesDragger) {
|
|
116
|
-
this.createDragSelection('minutes', this.minutesElement, this.minutesWrapperElement, this.timeStripElement, DragDirections.y);
|
|
117
|
-
this.createWheelChange('minutes', this.minutesWrapperElement, this.timeStripElement);
|
|
118
|
-
this.setDragSelection('minutes', this.currentDate.minute);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* @desc
|
|
123
|
-
* @param newValue
|
|
124
|
-
*/
|
|
125
|
-
renderDateChange() {
|
|
126
|
-
if (!this.initialized)
|
|
127
|
-
return;
|
|
128
|
-
this.setData();
|
|
129
|
-
this.hasDateModule && this.setDragSelection('years', this.currentDate.year);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* @desc
|
|
133
|
-
* @param newValue
|
|
134
|
-
*/
|
|
135
|
-
openChange(newValue) {
|
|
136
|
-
if (newValue) {
|
|
137
|
-
this.calculateLocation();
|
|
138
|
-
// Create years selection
|
|
139
|
-
// #
|
|
140
|
-
if (this.hasDateModule) {
|
|
141
|
-
this.createDragSelection('years', this.yearsElement, this.yearsWrapperElement, this.yearsStripElement, DragDirections.y);
|
|
142
|
-
this.createWheelChange('years', this.yearsWrapperElement, this.yearsStripElement);
|
|
143
|
-
this.setDragSelection('years', this.currentDate.year);
|
|
144
|
-
}
|
|
145
|
-
// Create hours selection
|
|
146
|
-
// #
|
|
147
|
-
if (this.hasTimeModule) {
|
|
148
|
-
this.createDragSelection('hours', this.hoursElement, this.hoursWrapperElement, this.timeStripElement, DragDirections.y);
|
|
149
|
-
this.createWheelChange('hours', this.hoursWrapperElement, this.timeStripElement);
|
|
150
|
-
this.setDragSelection('hours', this.currentDate.hour, true);
|
|
151
|
-
}
|
|
152
|
-
// Create minutes selection
|
|
153
|
-
// #
|
|
154
|
-
if (this.hasTimeModule) {
|
|
155
|
-
this.createDragSelection('minutes', this.minutesElement, this.minutesWrapperElement, this.timeStripElement, DragDirections.y);
|
|
156
|
-
this.createWheelChange('minutes', this.minutesWrapperElement, this.timeStripElement);
|
|
157
|
-
this.setDragSelection('minutes', this.currentDate.minute, true);
|
|
158
|
-
}
|
|
159
|
-
this.markForCheck();
|
|
160
|
-
forceUpdate(this.el);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @desc
|
|
165
|
-
* @param newValue
|
|
166
|
-
*/
|
|
167
|
-
valueChange(newValue, oldValue) {
|
|
168
|
-
const errorObject1 = { isValid: false, value: this.valueText };
|
|
169
|
-
const errorObject2 = { isValid: false, value: this.inputElement.value };
|
|
170
|
-
if (!newValue) {
|
|
171
|
-
this.change.emit();
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
if (this.type !== Types.range && this.error) {
|
|
175
|
-
this.change.emit(errorObject2);
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
try {
|
|
179
|
-
if ((oldValue && stringify(newValue.dateObject) !== stringify(oldValue.dateObject)) || (!oldValue && newValue)) {
|
|
180
|
-
if (this.type === Types.date || this.type === Types.datetime) {
|
|
181
|
-
this.change.emit(newValue);
|
|
182
|
-
}
|
|
183
|
-
if (this.type === Types.time) {
|
|
184
|
-
this.change.emit(newValue);
|
|
185
|
-
// this.change.emit({
|
|
186
|
-
// time: newValue.time,
|
|
187
|
-
// timeObject: newValue.dateObject
|
|
188
|
-
// })
|
|
189
|
-
}
|
|
190
|
-
if (this.type === Types.range) {
|
|
191
|
-
const dateObject = newValue.dateObject;
|
|
192
|
-
if (dateObject.start.date && dateObject.end.date) {
|
|
193
|
-
if (newValue.isValid) {
|
|
194
|
-
this.change.emit({
|
|
195
|
-
isValid: newValue.isValid,
|
|
196
|
-
value: newValue.value,
|
|
197
|
-
start: dateObject.start,
|
|
198
|
-
end: dateObject.end
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
this.change.emit(errorObject1);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
catch (exception) { }
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* @desc
|
|
212
|
-
* @param newValue -
|
|
213
|
-
*/
|
|
214
|
-
disabledDatesChange(newValue) {
|
|
215
|
-
if (newValue) {
|
|
216
|
-
this.prepareDisabledDates();
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @desc
|
|
221
|
-
* @param date
|
|
222
|
-
*/
|
|
223
|
-
stringToDate(date) {
|
|
224
|
-
const isDate = !!date.getMonth;
|
|
225
|
-
if (!isDate) {
|
|
226
|
-
return new Date(Date.parse(this.switchDDMM(date)));
|
|
227
|
-
}
|
|
228
|
-
return date;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* @desc
|
|
232
|
-
* @param date
|
|
233
|
-
*/
|
|
234
|
-
dateToString(date) {
|
|
235
|
-
if (!(date instanceof Date))
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
*
|
|
240
|
-
* @param str
|
|
241
|
-
*/
|
|
242
|
-
switchDDMM(str) {
|
|
243
|
-
if (!str)
|
|
244
|
-
return;
|
|
245
|
-
const parts = str.split('/');
|
|
246
|
-
if (str.indexOf('/') === -1 || parts.length !== 3)
|
|
247
|
-
return str;
|
|
248
|
-
return `${parts[1]}/${parts[0]}/${parts[2]}`;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* @desc
|
|
252
|
-
*/
|
|
253
|
-
setData() {
|
|
254
|
-
this.date = this.stringToDate(this.date);
|
|
255
|
-
if (!this.initialized && !this.renderDate) {
|
|
256
|
-
this.renderDate = this.date && this.date || new Date();
|
|
257
|
-
}
|
|
258
|
-
if (!this.initialized && this.endDate) {
|
|
259
|
-
this.selectedEndDate = this.stringToDate(this.endDate);
|
|
260
|
-
//this.currentEndDate = this.createDateObject(this.selectedEndDate)
|
|
261
|
-
}
|
|
262
|
-
const date = this.renderDate;
|
|
263
|
-
this.currentDate = this.createDateObject(date);
|
|
264
|
-
// Calculate days in current
|
|
265
|
-
// month
|
|
266
|
-
this.dayNumbers = this.getMonthDayNumbers(date).map(day => {
|
|
267
|
-
return {
|
|
268
|
-
day,
|
|
269
|
-
thisMonth: true,
|
|
270
|
-
isWeekend: this.getDayIsWeekend(date, day),
|
|
271
|
-
today: this.getIsCurrentDate(date, day),
|
|
272
|
-
date: this.getTargetDayDate(date, day)
|
|
273
|
-
};
|
|
274
|
-
});
|
|
275
|
-
// Add prev month days to
|
|
276
|
-
// empty columns
|
|
277
|
-
if (this.currentDate.year > this.minYear) {
|
|
278
|
-
let targetMonth = new Date(new Date(date).setMonth(this.currentDate.month - 1, 1));
|
|
279
|
-
let targetMonthDayNumbers = this.getMonthDayNumbers(targetMonth).reverse();
|
|
280
|
-
let max = this.currentDate.monthFirstDay;
|
|
281
|
-
for (let i = 1; i < (max === 0 ? 7 : max); i++) {
|
|
282
|
-
const day = targetMonthDayNumbers[i - 1];
|
|
283
|
-
this.dayNumbers.unshift({
|
|
284
|
-
day,
|
|
285
|
-
prevMonth: true,
|
|
286
|
-
isWeekend: this.getDayIsWeekend(targetMonth, day),
|
|
287
|
-
date: this.getTargetDayDate(targetMonth, day)
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
// Add next month days to
|
|
292
|
-
// rest of columns
|
|
293
|
-
if (this.currentDate.year < this.maxYear) {
|
|
294
|
-
let targetMonth = new Date(new Date(date).setMonth(this.currentDate.month + 1));
|
|
295
|
-
let targetMonthDayNumbers = this.getMonthDayNumbers(targetMonth);
|
|
296
|
-
let max = 42 - this.dayNumbers.length;
|
|
297
|
-
for (let i = 0; i < max; i++) {
|
|
298
|
-
const day = targetMonthDayNumbers[i];
|
|
299
|
-
this.dayNumbers.push({
|
|
300
|
-
day,
|
|
301
|
-
nextMonth: true,
|
|
302
|
-
isWeekend: this.getDayIsWeekend(targetMonth, day),
|
|
303
|
-
date: this.getTargetDayDate(targetMonth, day)
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
if (!this.emptyState) {
|
|
308
|
-
this.valueText = this.getValueText();
|
|
309
|
-
}
|
|
310
|
-
forceUpdate(this.el);
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* @desc
|
|
314
|
-
*/
|
|
315
|
-
prepareDisabledDates() {
|
|
316
|
-
if (!this.disabledDates)
|
|
317
|
-
return;
|
|
318
|
-
let disabledDatesData = null;
|
|
319
|
-
if (typeof this.disabledDates === 'string') {
|
|
320
|
-
try {
|
|
321
|
-
disabledDatesData = JSON.parse(this.disabledDates);
|
|
322
|
-
}
|
|
323
|
-
catch (e) {
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
else
|
|
328
|
-
disabledDatesData = this.disabledDates;
|
|
329
|
-
// Convert dates to list
|
|
330
|
-
// #
|
|
331
|
-
if (disabledDatesData.dates && disabledDatesData.dates.length && !!disabledDatesData.dates.length) {
|
|
332
|
-
const disabledDates = disabledDatesData.dates.map(date => {
|
|
333
|
-
const tempDate = new Date(date);
|
|
334
|
-
if (tempDate.toString().toLowerCase() === 'invalid date')
|
|
335
|
-
return null;
|
|
336
|
-
else
|
|
337
|
-
return tempDate;
|
|
338
|
-
}).filter(date => date);
|
|
339
|
-
this.disabledDatesList.dates = disabledDates;
|
|
340
|
-
}
|
|
341
|
-
// Get min & max range
|
|
342
|
-
// #
|
|
343
|
-
if (disabledDatesData.min &&
|
|
344
|
-
disabledDatesData.max && (disabledDatesData.min.getTime() > disabledDatesData.max.getTime() ||
|
|
345
|
-
disabledDatesData.max.getTime() < disabledDatesData.min.getTime())) {
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
if (disabledDatesData.min && disabledDatesData.min instanceof Date) {
|
|
349
|
-
this.disabledDatesList.min = new Date(disabledDatesData.min.toDateString());
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
352
|
-
delete this.disabledDatesList.min;
|
|
353
|
-
}
|
|
354
|
-
if (disabledDatesData.max && disabledDatesData.max instanceof Date) {
|
|
355
|
-
this.disabledDatesList.max = new Date(disabledDatesData.max.toDateString());
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
delete this.disabledDatesList.max;
|
|
359
|
-
}
|
|
360
|
-
const value = this.inputElement.value;
|
|
361
|
-
value && this.setDataFromText(value);
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
*
|
|
365
|
-
* @param target
|
|
366
|
-
* @param wheelTriggerElement
|
|
367
|
-
* @param strip
|
|
368
|
-
*/
|
|
369
|
-
createWheelChange(target, wheelTriggerElement, strip) {
|
|
370
|
-
/**
|
|
371
|
-
* [ Mouse Event: wheel ]
|
|
372
|
-
*/
|
|
373
|
-
wheelTriggerElement.addEventListener('wheel', (event) => {
|
|
374
|
-
const moveDown = event.deltaY > 0;
|
|
375
|
-
const dragger = this[target + 'Dragger'];
|
|
376
|
-
const draggerOffsetY = dragger.getOffset().top;
|
|
377
|
-
const childIdx = this.getTargetChildByDragPosition({ y: draggerOffsetY }, strip);
|
|
378
|
-
let nextChild = moveDown ? childIdx + 1 : childIdx - 1;
|
|
379
|
-
// Array bounds check
|
|
380
|
-
// #
|
|
381
|
-
nextChild < 0
|
|
382
|
-
? (nextChild = 0) : typeof this[target][nextChild] === 'undefined'
|
|
383
|
-
? (nextChild = this[target].length - 1) : nextChild;
|
|
384
|
-
if (this.type == "time" && !this.selectedDate) {
|
|
385
|
-
this.setTime();
|
|
386
|
-
}
|
|
387
|
-
this.setDragSelection(target, this[target][nextChild], true, true);
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* @desc
|
|
392
|
-
*/
|
|
393
|
-
createDragSelection(target, element, dragTriggerElement, strip, direction) {
|
|
394
|
-
const dragger = target + 'Dragger';
|
|
395
|
-
this[dragger] = new ElementDragger({
|
|
396
|
-
target: element,
|
|
397
|
-
trigger: dragTriggerElement,
|
|
398
|
-
direction: direction,
|
|
399
|
-
useTransform: true,
|
|
400
|
-
limit: {
|
|
401
|
-
y: {
|
|
402
|
-
max: strip.offsetTop - (strip.offsetHeight / 2),
|
|
403
|
-
min: (element.offsetHeight - (strip.offsetTop + strip.offsetHeight / 2)) * -1
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
/**
|
|
408
|
-
* [ ElementDragger Event: end ]
|
|
409
|
-
*/
|
|
410
|
-
this[dragger].on('end', (pos) => {
|
|
411
|
-
const childIdx = this.getTargetChildByDragPosition(pos, strip);
|
|
412
|
-
// Select target child when dragging
|
|
413
|
-
// end
|
|
414
|
-
this.selectTargetChildByDragIdx(childIdx, strip, this[dragger]);
|
|
415
|
-
// Set target value
|
|
416
|
-
// #
|
|
417
|
-
this.setDragSelection(target, this[target][childIdx], false);
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* @desc Calculates which child in center of strip
|
|
422
|
-
* for drag areas
|
|
423
|
-
*/
|
|
424
|
-
getTargetChildByDragPosition({ y }, strip) {
|
|
425
|
-
const stripHeight = strip.offsetHeight;
|
|
426
|
-
const stripCenter = stripHeight / 2;
|
|
427
|
-
const stripTriggerY = strip.offsetTop - (stripCenter);
|
|
428
|
-
const childY = -(y - stripTriggerY - (stripCenter));
|
|
429
|
-
return Math.floor(childY / stripHeight);
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* @esc
|
|
433
|
-
* @param target
|
|
434
|
-
* @param childIdx
|
|
435
|
-
*/
|
|
436
|
-
selectTargetChildByDragIdx(childIdx, strip, dragger, anim = true) {
|
|
437
|
-
const y = ((strip.offsetHeight / 2) + strip.offsetTop) - ((childIdx + 1) * (strip.offsetHeight));
|
|
438
|
-
dragger.setPosition({ y, anim });
|
|
439
|
-
}
|
|
440
|
-
/**
|
|
441
|
-
* @desc
|
|
442
|
-
* @param year
|
|
443
|
-
*/
|
|
444
|
-
setDragSelection(target, value, scroll = true, anim = false) {
|
|
445
|
-
// if (!value) return
|
|
446
|
-
const childIdx = this[target].findIndex((itemValue) => itemValue === value);
|
|
447
|
-
scroll && this.selectTargetChildByDragIdx(childIdx, this[target === 'years' ? target + 'StripElement' : 'timeStripElement'], this[target + 'Dragger'], anim);
|
|
448
|
-
switch (target) {
|
|
449
|
-
case 'years':
|
|
450
|
-
this.date.setFullYear(value);
|
|
451
|
-
break;
|
|
452
|
-
case 'hours':
|
|
453
|
-
this.date.setHours(value);
|
|
454
|
-
break;
|
|
455
|
-
case 'minutes':
|
|
456
|
-
this.date.setMinutes(value);
|
|
457
|
-
break;
|
|
458
|
-
}
|
|
459
|
-
this.renderDate = this.date;
|
|
460
|
-
this.setData();
|
|
461
|
-
if (this.selectedDate) {
|
|
462
|
-
this.setValue();
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* @desc
|
|
467
|
-
* @returns
|
|
468
|
-
*/
|
|
469
|
-
getHours12() {
|
|
470
|
-
const hours = (this.date.getHours() + 24) % 12 || 12;
|
|
471
|
-
return hours > 12 ? hours - 12 : hours;
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* @desc
|
|
475
|
-
* @param date
|
|
476
|
-
* @param excludeTime -
|
|
477
|
-
*/
|
|
478
|
-
createDateObject(date, { excludeTime = false, exactMonthNumber = false } = {}) {
|
|
479
|
-
const dateYear = date.getFullYear();
|
|
480
|
-
const year = dateYear >= this.maxYear
|
|
481
|
-
? this.maxYear : dateYear <= this.minYear
|
|
482
|
-
? this.minYear : dateYear;
|
|
483
|
-
return Object.assign(Object.assign({ year, day: date.getDate(), month: date.getMonth() + (exactMonthNumber ? 1 : 0), dayOfWeek: date.getDay(), monthFirstDay: new Date(new Date(date).setDate(1)).getDay() }, !excludeTime && { hour: date.getHours() }), !excludeTime && { minute: date.getMinutes() });
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* @desc
|
|
487
|
-
* @param max
|
|
488
|
-
*/
|
|
489
|
-
generateDaysArrayFromMax(max) {
|
|
490
|
-
return Array.from(Array(max + 1).keys()).slice(1);
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* @desc
|
|
494
|
-
* @param date
|
|
495
|
-
*/
|
|
496
|
-
getMonthDayNumbers(date) {
|
|
497
|
-
const totalDays = this.getDaysInMonth(date.getMonth(), date.getFullYear());
|
|
498
|
-
return this.generateDaysArrayFromMax(totalDays);
|
|
499
|
-
}
|
|
500
|
-
/**
|
|
501
|
-
* @desc
|
|
502
|
-
* @param date
|
|
503
|
-
* @param day
|
|
504
|
-
*/
|
|
505
|
-
getTargetDayDate(date, day) {
|
|
506
|
-
return new Date(new Date(date).setDate(day));
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* @desc
|
|
510
|
-
* @param date
|
|
511
|
-
* @param day
|
|
512
|
-
*/
|
|
513
|
-
getDayIsWeekend(date, day) {
|
|
514
|
-
const dayOfWeek = new Date(new Date(date).setDate(day)).getDay();
|
|
515
|
-
return (dayOfWeek === 6) || (dayOfWeek === 0);
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* @desc
|
|
519
|
-
* @param date
|
|
520
|
-
*/
|
|
521
|
-
getClock(date) {
|
|
522
|
-
date = date || new Date();
|
|
523
|
-
const hours = date.getHours();
|
|
524
|
-
const minutes = date.getMinutes();
|
|
525
|
-
const seconds = date.getSeconds();
|
|
526
|
-
const milis = date.getMilliseconds();
|
|
527
|
-
return { hours, minutes, seconds, milis };
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* @desc
|
|
531
|
-
*/
|
|
532
|
-
setValue(reset) {
|
|
533
|
-
var _a, _b, _c;
|
|
534
|
-
const date = new Date(this.date.setHours(Number(this.currentDate.hour), Number(this.currentDate.minute)));
|
|
535
|
-
if (reset) {
|
|
536
|
-
this.value = null;
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
|
-
this.dataIsValid = true;
|
|
540
|
-
if (this.type === Types.datetime) {
|
|
541
|
-
const dateObject = Object.assign({}, this.currentDate);
|
|
542
|
-
dateObject.month += 1;
|
|
543
|
-
if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.value) != this.valueText) {
|
|
544
|
-
this.value = {
|
|
545
|
-
isValid: this.dataIsValid,
|
|
546
|
-
date: date,
|
|
547
|
-
timestamp: date.getTime(),
|
|
548
|
-
dateObject,
|
|
549
|
-
value: this.valueText
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
if (this.type === Types.date) {
|
|
554
|
-
const dateObject = Object.assign({}, this.currentDate);
|
|
555
|
-
delete dateObject.hour;
|
|
556
|
-
delete dateObject.minute;
|
|
557
|
-
dateObject.month += 1;
|
|
558
|
-
if (((_b = this.value) === null || _b === void 0 ? void 0 : _b.value) != this.valueText) {
|
|
559
|
-
this.value = {
|
|
560
|
-
isValid: this.dataIsValid,
|
|
561
|
-
date,
|
|
562
|
-
timestamp: date.getTime(),
|
|
563
|
-
dateObject,
|
|
564
|
-
value: this.valueText
|
|
565
|
-
};
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
if (this.type === Types.time) {
|
|
569
|
-
const getTimeText = this.getTimeText();
|
|
570
|
-
const dateObject = Object.assign({}, this.currentDate);
|
|
571
|
-
dateObject.month += 1;
|
|
572
|
-
this.value = {
|
|
573
|
-
isValid: this.dataIsValid,
|
|
574
|
-
date: date,
|
|
575
|
-
timestamp: date.getTime(),
|
|
576
|
-
time: getTimeText,
|
|
577
|
-
dateObject,
|
|
578
|
-
timeObject: {
|
|
579
|
-
hours: this.currentDate.hour,
|
|
580
|
-
minutes: this.currentDate.minute
|
|
581
|
-
},
|
|
582
|
-
value: getTimeText
|
|
583
|
-
};
|
|
584
|
-
this.inputElement.value = getTimeText;
|
|
585
|
-
}
|
|
586
|
-
if (this.type === Types.range) {
|
|
587
|
-
if (((_c = this.value) === null || _c === void 0 ? void 0 : _c.value) != this.valueText) {
|
|
588
|
-
this.value = {
|
|
589
|
-
isValid: this.dataIsValid,
|
|
590
|
-
dateObject: {
|
|
591
|
-
start: Object.assign({}, this.selectedDate && {
|
|
592
|
-
date: this.selectedDate,
|
|
593
|
-
timestamp: this.selectedDate.getTime(),
|
|
594
|
-
detail: this.createDateObject(this.selectedDate, {
|
|
595
|
-
excludeTime: true,
|
|
596
|
-
exactMonthNumber: true
|
|
597
|
-
})
|
|
598
|
-
}),
|
|
599
|
-
end: Object.assign({}, this.selectedEndDate && {
|
|
600
|
-
date: this.selectedEndDate,
|
|
601
|
-
timestamp: this.selectedEndDate.getTime(),
|
|
602
|
-
detail: this.createDateObject(this.selectedEndDate, {
|
|
603
|
-
excludeTime: true,
|
|
604
|
-
exactMonthNumber: true
|
|
605
|
-
})
|
|
606
|
-
})
|
|
607
|
-
},
|
|
608
|
-
value: this.valueText
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* @desc
|
|
615
|
-
* @param month
|
|
616
|
-
*/
|
|
617
|
-
setMonth(month) {
|
|
618
|
-
this.renderDate.setDate(1);
|
|
619
|
-
this.renderDate = new Date(this.renderDate.setMonth(month));
|
|
620
|
-
this.setDragSelection('years', this.currentDate.year);
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* @desc
|
|
624
|
-
* @param popupClosing -
|
|
625
|
-
*/
|
|
626
|
-
checkRangeValidation({ popupClosing = false } = {}) {
|
|
627
|
-
if (this.type !== Types.range)
|
|
628
|
-
return true;
|
|
629
|
-
const errorText = 'date range invalid';
|
|
630
|
-
if (popupClosing && (!this.selectedDate || this.selectedDate && !this.selectedEndDate)) {
|
|
631
|
-
this.setError(true, errorText);
|
|
632
|
-
return false;
|
|
633
|
-
}
|
|
634
|
-
if (!popupClosing) {
|
|
635
|
-
this.setError(false);
|
|
636
|
-
return true;
|
|
637
|
-
}
|
|
638
|
-
return true;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* @desc
|
|
642
|
-
* @param value
|
|
643
|
-
* @param max
|
|
644
|
-
* @returns
|
|
645
|
-
*/
|
|
646
|
-
pad(value, max) {
|
|
647
|
-
return value < max ? '0' : '';
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* @desc
|
|
651
|
-
* @returns
|
|
652
|
-
*/
|
|
653
|
-
isInputClearable() {
|
|
654
|
-
if (this.inputElement && this.inputElement.value) {
|
|
655
|
-
return true;
|
|
656
|
-
}
|
|
657
|
-
return false;
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* @desc
|
|
661
|
-
* @param date
|
|
662
|
-
*/
|
|
663
|
-
isDisabledDate(date) {
|
|
664
|
-
if (!!this.disabledDatesList.dates.map(d => this.isSameDate(d, date)).filter(d => d).length)
|
|
665
|
-
return true;
|
|
666
|
-
if (this.disabledDatesList.min) {
|
|
667
|
-
const minDate = new Date(this.disabledDatesList.min);
|
|
668
|
-
if (minDate && minDate.getTime() > date.getTime())
|
|
669
|
-
return true;
|
|
670
|
-
}
|
|
671
|
-
if (this.disabledDatesList.max) {
|
|
672
|
-
const maxDate = new Date(this.disabledDatesList.max);
|
|
673
|
-
if (maxDate && new Date(maxDate.setDate(maxDate.getDate() + 1)).getTime() < date.getTime())
|
|
674
|
-
return true;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
/**
|
|
678
|
-
* @desc
|
|
679
|
-
* @param date
|
|
680
|
-
*/
|
|
681
|
-
setDate(date, isUserSelect, notClosePicker = false) {
|
|
682
|
-
const isRange = this.type === Types.range;
|
|
683
|
-
const isEndSelect = !!this.selectedEndDate;
|
|
684
|
-
// Check disabled date
|
|
685
|
-
// #
|
|
686
|
-
if ((this.type === Types.date || this.type === Types.datetime) && this.isDisabledDate(date)) {
|
|
687
|
-
return;
|
|
688
|
-
}
|
|
689
|
-
this.emptyState = false;
|
|
690
|
-
if (!isRange || (isRange && !isEndSelect)) {
|
|
691
|
-
this.date = new Date(date.setHours(this.currentDate.hour, this.currentDate.minute));
|
|
692
|
-
}
|
|
693
|
-
isRange && this.checkRangeValidation();
|
|
694
|
-
if (isRange && this.selectedDate && this.selectedEndDate) {
|
|
695
|
-
this.selectedDate = null;
|
|
696
|
-
this.selectedEndDate = null;
|
|
697
|
-
}
|
|
698
|
-
if (isUserSelect) {
|
|
699
|
-
const newDate = new Date(date);
|
|
700
|
-
!isRange
|
|
701
|
-
? this.selectedDate = newDate
|
|
702
|
-
: !this.selectedDate
|
|
703
|
-
? this.selectedDate = newDate
|
|
704
|
-
: this.selectedDate.getTime() > newDate.getTime()
|
|
705
|
-
? (this.selectedEndDate = this.selectedDate) && (this.selectedDate = newDate)
|
|
706
|
-
: this.selectedEndDate = newDate;
|
|
707
|
-
!isRange && (this._open = notClosePicker);
|
|
708
|
-
this.renderDate = this.date;
|
|
709
|
-
this.valueText = this.getValueText();
|
|
710
|
-
this.setValue();
|
|
711
|
-
const splitText = this.valueText.split('/');
|
|
712
|
-
const newValue = this.valueText ? this.changeFormat(new Date(splitText[1] + "/" + splitText[0] + "/" + splitText[2])) : '';
|
|
713
|
-
this.inputElement.value = newValue;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
setDataFromText(text, updateData = false, openPicker = true) {
|
|
717
|
-
let update = false;
|
|
718
|
-
let errorState = '';
|
|
719
|
-
const parsed = this.parse(text);
|
|
720
|
-
if ((this.type === Types.date || this.type === Types.datetime) && this.isDisabledDate(parsed.date)) {
|
|
721
|
-
parsed.dateIsValid = false;
|
|
722
|
-
errorState = 'disabled-date';
|
|
723
|
-
}
|
|
724
|
-
// Check mode datetime
|
|
725
|
-
// #
|
|
726
|
-
if (this.type === Types.datetime && parsed.dateIsValid && parsed.timeIsValid) {
|
|
727
|
-
updateData && this.setDate(parsed.date, true, openPicker);
|
|
728
|
-
updateData && this.setTime(parsed.timeSections[0], parsed.timeSections[1]);
|
|
729
|
-
update = true;
|
|
730
|
-
}
|
|
731
|
-
// Check mode date
|
|
732
|
-
// #
|
|
733
|
-
if (this.type === Types.date && parsed.dateIsValid) {
|
|
734
|
-
updateData && this.setDate(parsed.date, true, openPicker);
|
|
735
|
-
update = true;
|
|
736
|
-
}
|
|
737
|
-
// Check mode time
|
|
738
|
-
// #
|
|
739
|
-
if (this.type === Types.time && parsed.timeIsValid) {
|
|
740
|
-
updateData && this.setTime(parsed.timeSections[0], parsed.timeSections[1]);
|
|
741
|
-
update = true;
|
|
742
|
-
}
|
|
743
|
-
// Check mode range
|
|
744
|
-
// #
|
|
745
|
-
if (this.type === Types.range) {
|
|
746
|
-
if (parsed.dateIsValid && !this.selectedDate) {
|
|
747
|
-
updateData && this.setDate(parsed.date, true, openPicker);
|
|
748
|
-
update = true;
|
|
749
|
-
}
|
|
750
|
-
if (parsed.date2IsValid && !this.selectedEndDate) {
|
|
751
|
-
updateData && this.setDate(parsed.date2, true, openPicker);
|
|
752
|
-
update = true;
|
|
753
|
-
}
|
|
754
|
-
if (this.selectedDate && this.selectedEndDate && parsed.rangeIsValid) {
|
|
755
|
-
if (this.isSameDate(parsed.date2, this.selectedEndDate) && !this.isSameDate(parsed.date, this.selectedDate)) {
|
|
756
|
-
this.selectedDate = null;
|
|
757
|
-
updateData && this.setDate(parsed.date, true, openPicker);
|
|
758
|
-
update = true;
|
|
759
|
-
}
|
|
760
|
-
if (this.isSameDate(parsed.date, this.selectedDate) && !this.isSameDate(parsed.date2, this.selectedEndDate)) {
|
|
761
|
-
this.selectedEndDate = null;
|
|
762
|
-
updateData && this.setDate(parsed.date2, true, openPicker);
|
|
763
|
-
update = true;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if (this.selectedDate && this.selectedEndDate && !parsed.rangeIsValid && updateData) {
|
|
767
|
-
this.selectedDate = null;
|
|
768
|
-
this.selectedEndDate = null;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
// Fix: render warning
|
|
772
|
-
if (update) {
|
|
773
|
-
if (updateData) {
|
|
774
|
-
this.renderDate = this.date;
|
|
775
|
-
}
|
|
776
|
-
this.setError(false);
|
|
777
|
-
}
|
|
778
|
-
else {
|
|
779
|
-
if (this.type === Types.range && this.selectedDate && this.selectedEndDate && parsed.rangeIsValid) {
|
|
780
|
-
this.setError(false);
|
|
781
|
-
}
|
|
782
|
-
else {
|
|
783
|
-
if (errorState) {
|
|
784
|
-
this.setError(true, (errorState === 'disabled-date' && 'selected date is not allowed'));
|
|
785
|
-
}
|
|
786
|
-
else {
|
|
787
|
-
if (text) {
|
|
788
|
-
this.setError(true, (this.type === Types.datetime && 'invalid date or time') ||
|
|
789
|
-
(this.type === Types.range && 'invalid date range') ||
|
|
790
|
-
(this.type === Types.date && 'invalid date') ||
|
|
791
|
-
(this.type === Types.time && 'invalid time'));
|
|
792
|
-
}
|
|
793
|
-
this.setValue(true);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
const splitText = text.split('/');
|
|
797
|
-
const newValue = text && !this.error ? this.changeFormat(new Date(splitText[1] + "/" + splitText[0] + "/" + splitText[2])) : '';
|
|
798
|
-
this.inputElement.value = newValue;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* @desc
|
|
803
|
-
*/
|
|
804
|
-
setDateToday() {
|
|
805
|
-
const date = new Date();
|
|
806
|
-
if (this.type === Types.range) {
|
|
807
|
-
this.selectedDate = null;
|
|
808
|
-
this.selectedEndDate = null;
|
|
809
|
-
}
|
|
810
|
-
this.setDate(date, true, false);
|
|
811
|
-
}
|
|
812
|
-
HourContentDblClick(e) {
|
|
813
|
-
const getPath = Generate.findEventPathWithNodeName(e, 'SPAN');
|
|
814
|
-
if (getPath && getPath.classList.contains('selected')) {
|
|
815
|
-
this.setValue();
|
|
816
|
-
this._open = false;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
/**
|
|
820
|
-
* @desc
|
|
821
|
-
*/
|
|
822
|
-
setTime(hours, minutes) {
|
|
823
|
-
this.renderDate = new Date(this.date.setHours(Number(hours || this.getClock().hours), Number(minutes || this.getClock().minutes)));
|
|
824
|
-
if (this.type === Types.time) {
|
|
825
|
-
this.selectedDate = this.date;
|
|
826
|
-
}
|
|
827
|
-
const hour = this.currentDate.hour || new Date().getHours();
|
|
828
|
-
const minute = this.currentDate.minute || new Date().getMinutes();
|
|
829
|
-
this.setDragSelection('hours', hour, true, true);
|
|
830
|
-
this.setDragSelection('minutes', minute, true, true);
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* @desc
|
|
834
|
-
* @param state
|
|
835
|
-
* @param error
|
|
836
|
-
*/
|
|
837
|
-
setError(state = false, error = '') {
|
|
838
|
-
this.error = state;
|
|
839
|
-
this.errorText = !state ? '' : error;
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* @desc
|
|
843
|
-
*/
|
|
844
|
-
getError() {
|
|
845
|
-
const { error, errorText } = this;
|
|
846
|
-
return { valid: !error, error, errorText };
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* @desc
|
|
850
|
-
* @param month
|
|
851
|
-
* @param year
|
|
852
|
-
*/
|
|
853
|
-
getDaysInMonth(month, year) {
|
|
854
|
-
return new Date(year, month + 1, 0).getDate();
|
|
855
|
-
}
|
|
856
|
-
/**
|
|
857
|
-
* @desc
|
|
858
|
-
* @param date
|
|
859
|
-
* @param day
|
|
860
|
-
* @returns
|
|
861
|
-
*/
|
|
862
|
-
getIsCurrentDate(date, day) {
|
|
863
|
-
const today = new Date();
|
|
864
|
-
return today.getDate() === day
|
|
865
|
-
&& today.getMonth() === date.getMonth()
|
|
866
|
-
&& today.getFullYear() === date.getFullYear();
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* @desc
|
|
870
|
-
* @param date1
|
|
871
|
-
* @param date2
|
|
872
|
-
*/
|
|
873
|
-
isSameDate(date1, date2) {
|
|
874
|
-
return (date1.getFullYear() === date2.getFullYear() &&
|
|
875
|
-
date1.getMonth() === date2.getMonth() &&
|
|
876
|
-
date1.getDate() === date2.getDate());
|
|
877
|
-
}
|
|
878
|
-
/**
|
|
879
|
-
* @desc
|
|
880
|
-
* @param date
|
|
881
|
-
* @returns
|
|
882
|
-
*/
|
|
883
|
-
getSelected(date, endDate = false) {
|
|
884
|
-
const selectPart = endDate ? 'EndDate' : 'Date';
|
|
885
|
-
const targetDate = new Date(this['selected' + selectPart]);
|
|
886
|
-
const year = targetDate.getFullYear();
|
|
887
|
-
const month = targetDate.getMonth();
|
|
888
|
-
const day = targetDate.getDate();
|
|
889
|
-
const isSelected = date.getDate() === day
|
|
890
|
-
&& date.getMonth() === month
|
|
891
|
-
&& date.getFullYear() === year;
|
|
892
|
-
return isSelected;
|
|
893
|
-
}
|
|
894
|
-
/**
|
|
895
|
-
* @desc
|
|
896
|
-
* @param date
|
|
897
|
-
*/
|
|
898
|
-
getDateIsInRange(date) {
|
|
899
|
-
if (this.type !== Types.range || (!this.selectedDate || !this.selectedEndDate))
|
|
900
|
-
return;
|
|
901
|
-
const current = date.getTime();
|
|
902
|
-
const start = this.selectedDate.getTime();
|
|
903
|
-
const end = this.selectedEndDate.getTime();
|
|
904
|
-
return current > start && current < end;
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* @desc
|
|
908
|
-
*/
|
|
909
|
-
getMonthText() {
|
|
910
|
-
return Object.values(Months)[this.renderDate.getMonth()];
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* @desc
|
|
914
|
-
*/
|
|
915
|
-
getCurrentDateText() {
|
|
916
|
-
const dayText = Object.values(Days)[this.currentDate.dayOfWeek];
|
|
917
|
-
const monthText = Object.values(Months)[this.currentDate.month];
|
|
918
|
-
const text = `${dayText}, ${this.currentDate.day}th ${monthText} ${this.currentDate.year}`;
|
|
919
|
-
return text;
|
|
920
|
-
}
|
|
921
|
-
/**
|
|
922
|
-
* @desc
|
|
923
|
-
* @returns
|
|
924
|
-
*/
|
|
925
|
-
getTimeText() {
|
|
926
|
-
const { hour, minute } = this.currentDate;
|
|
927
|
-
return `${hour < 10 ? '0' + hour : hour}:${minute < 10 ? '0' + minute : minute}`;
|
|
928
|
-
}
|
|
929
|
-
/**
|
|
930
|
-
*
|
|
931
|
-
*/
|
|
932
|
-
getValueText() {
|
|
933
|
-
if (!this.selectedDate)
|
|
934
|
-
return '';
|
|
935
|
-
const selectedDate = this.selectedDate;
|
|
936
|
-
const year = selectedDate.getFullYear();
|
|
937
|
-
const day = selectedDate.getDate();
|
|
938
|
-
const baseMonth = selectedDate.getMonth();
|
|
939
|
-
const month = baseMonth + 1;
|
|
940
|
-
let text = '';
|
|
941
|
-
if (this.type === Types.date || this.type === Types.datetime) {
|
|
942
|
-
text = `${day < 10 ? '0' + day : day}/${month < 10 ? '0' + month : month}/${year}`;
|
|
943
|
-
}
|
|
944
|
-
if (this.type === Types.time) {
|
|
945
|
-
text = this.getTimeText();
|
|
946
|
-
}
|
|
947
|
-
if (this.type === Types.datetime) {
|
|
948
|
-
text = `${text} ${this.getTimeText()}`;
|
|
949
|
-
}
|
|
950
|
-
if (this.type === Types.range) {
|
|
951
|
-
text = `${day < 10 ? '0' + day : day}/${month < 10 ? '0' + month : month}/${year}`;
|
|
952
|
-
}
|
|
953
|
-
if (this.type === Types.range && this.selectedEndDate) {
|
|
954
|
-
const endDate = this.selectedEndDate;
|
|
955
|
-
const endYear = endDate.getFullYear();
|
|
956
|
-
const endDay = endDate.getDate();
|
|
957
|
-
const endBaseMonth = endDate.getMonth();
|
|
958
|
-
const endMonth = endBaseMonth + 1;
|
|
959
|
-
text += `-${endDay < 10 ? '0' + endDay : endDay}/${endMonth < 10 ? '0' + endMonth : endMonth}/${endYear}`;
|
|
960
|
-
}
|
|
961
|
-
this.setDataFromText(text);
|
|
962
|
-
return text;
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* @desc
|
|
966
|
-
* @param dateStr
|
|
967
|
-
*/
|
|
968
|
-
parse(dateStr) {
|
|
969
|
-
const sections = dateStr.split(this.type === Types.range ? '-' : ' ');
|
|
970
|
-
// const sections: Array<string> = dateStr.split("-")
|
|
971
|
-
const sectionDate = this.switchDDMM(sections[0]);
|
|
972
|
-
const sectionDate2 = this.switchDDMM(sections[1]);
|
|
973
|
-
const sectionTime = this.type === Types.datetime ? sections[1] : sections[0];
|
|
974
|
-
const date = new Date(sectionDate);
|
|
975
|
-
const date2 = new Date(sectionDate2);
|
|
976
|
-
const dateCheck = date.toString().toLowerCase() !== 'invalid date';
|
|
977
|
-
const dateCheck2 = date2.toString().toLowerCase() !== 'invalid date';
|
|
978
|
-
const regDate = /^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/;
|
|
979
|
-
const regDateCheck = regDate.test(sectionDate);
|
|
980
|
-
const regDateCheck2 = regDate.test(sectionDate2);
|
|
981
|
-
const regTime = /\b([01][0-9]|2[0-3]):([0-5][0-9])\b/;
|
|
982
|
-
const regTimeCheck = regTime.test(sectionTime);
|
|
983
|
-
const dateIsValid = dateCheck && regDateCheck;
|
|
984
|
-
const date2IsValid = dateCheck2 && regDateCheck2;
|
|
985
|
-
const timeSections = regTimeCheck ? sectionTime.split(':') : '';
|
|
986
|
-
return {
|
|
987
|
-
date,
|
|
988
|
-
date2,
|
|
989
|
-
timeSections,
|
|
990
|
-
dateIsValid,
|
|
991
|
-
date2IsValid,
|
|
992
|
-
rangeIsValid: dateIsValid && date2IsValid,
|
|
993
|
-
timeIsValid: regTimeCheck
|
|
994
|
-
};
|
|
995
|
-
}
|
|
996
|
-
/**
|
|
997
|
-
* @desc
|
|
998
|
-
*/
|
|
999
|
-
getPrevMonth() {
|
|
1000
|
-
this.setMonth(this.renderDate.getMonth() - 1);
|
|
1001
|
-
}
|
|
1002
|
-
/**
|
|
1003
|
-
* @desc
|
|
1004
|
-
*/
|
|
1005
|
-
getNextMonth() {
|
|
1006
|
-
this.setMonth(this.renderDate.getMonth() + 1);
|
|
1007
|
-
}
|
|
1008
|
-
/**
|
|
1009
|
-
* @desc
|
|
1010
|
-
* @param idx
|
|
1011
|
-
*/
|
|
1012
|
-
yearClick(idx) {
|
|
1013
|
-
if (this.yearsDragger.busy)
|
|
1014
|
-
return;
|
|
1015
|
-
this.setDragSelection('years', this.years[idx], true, true);
|
|
1016
|
-
}
|
|
1017
|
-
/**
|
|
1018
|
-
* @desc
|
|
1019
|
-
* @param idx
|
|
1020
|
-
*/
|
|
1021
|
-
hourClick(idx) {
|
|
1022
|
-
if (this.hoursDragger.busy)
|
|
1023
|
-
return;
|
|
1024
|
-
if (!this.selectedDate) {
|
|
1025
|
-
this.setTime();
|
|
1026
|
-
}
|
|
1027
|
-
this.setDragSelection('hours', this.hours[idx], true, true);
|
|
1028
|
-
}
|
|
1029
|
-
/**
|
|
1030
|
-
* @desc
|
|
1031
|
-
* @param idx
|
|
1032
|
-
*/
|
|
1033
|
-
minuteClick(idx) {
|
|
1034
|
-
if (this.minutesDragger.busy)
|
|
1035
|
-
return;
|
|
1036
|
-
if (!this.selectedDate) {
|
|
1037
|
-
this.setTime();
|
|
1038
|
-
}
|
|
1039
|
-
this.setDragSelection('minutes', this.minutes[idx], true, true);
|
|
1040
|
-
}
|
|
1041
|
-
/**
|
|
1042
|
-
* @desc
|
|
1043
|
-
*/
|
|
1044
|
-
openPicker() {
|
|
1045
|
-
if (this.disabled)
|
|
1046
|
-
return;
|
|
1047
|
-
!this._open && (this._open = true);
|
|
1048
|
-
}
|
|
1049
|
-
/**
|
|
1050
|
-
* @desc
|
|
1051
|
-
* @param date
|
|
1052
|
-
*/
|
|
1053
|
-
handleDayNumber(date) {
|
|
1054
|
-
if (this.type === Types.range
|
|
1055
|
-
&& this.selectedDate
|
|
1056
|
-
&& !this.selectedEndDate
|
|
1057
|
-
&& this.isSameDate(this.selectedDate, date))
|
|
1058
|
-
return;
|
|
1059
|
-
this.setDate(date, true);
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* @desc
|
|
1063
|
-
* @param value
|
|
1064
|
-
*/
|
|
1065
|
-
handleInputInput(value) {
|
|
1066
|
-
this.setDataFromText(value, true);
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* @desc
|
|
1070
|
-
* @param event -
|
|
1071
|
-
*/
|
|
1072
|
-
handleInputChange(event) {
|
|
1073
|
-
this.setDataFromText(this.inputElement.value, true, false);
|
|
1074
|
-
event.stopPropagation();
|
|
1075
|
-
}
|
|
1076
|
-
/**
|
|
1077
|
-
* @desc
|
|
1078
|
-
*/
|
|
1079
|
-
async handleInputClear() {
|
|
1080
|
-
this.selectedDate = null;
|
|
1081
|
-
this.selectedEndDate = null;
|
|
1082
|
-
this.emptyState = true;
|
|
1083
|
-
this.renderDate = new Date();
|
|
1084
|
-
this._open = false;
|
|
1085
|
-
this.setValue(true);
|
|
1086
|
-
this.setError();
|
|
1087
|
-
this.getValueText();
|
|
1088
|
-
await this.inputElement.setClear();
|
|
1089
|
-
await delay(10);
|
|
1090
|
-
return Promise.resolve();
|
|
1091
|
-
}
|
|
1092
|
-
/**
|
|
1093
|
-
* @desc
|
|
1094
|
-
* @param event
|
|
1095
|
-
*/
|
|
1096
|
-
handleWheel(event) {
|
|
1097
|
-
event.preventDefault();
|
|
1098
|
-
}
|
|
1099
|
-
/**
|
|
1100
|
-
* @desc
|
|
1101
|
-
* @param event
|
|
1102
|
-
*/
|
|
1103
|
-
handleWindowClick(event) {
|
|
1104
|
-
if (this._open) {
|
|
1105
|
-
const list = document.getElementById(`picker-vp-${this._id}`);
|
|
1106
|
-
const isClickInside = Generate.findEventPath(event, this.el);
|
|
1107
|
-
const isClickList = list ? (Generate.findEventPath(event, list)) : false;
|
|
1108
|
-
if (!isClickInside && !isClickList) {
|
|
1109
|
-
this._open = false;
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
openToggle() {
|
|
1114
|
-
if (this.disabled)
|
|
1115
|
-
return;
|
|
1116
|
-
this._open = !this._open;
|
|
1117
|
-
}
|
|
1118
|
-
/**
|
|
1119
|
-
* @desc
|
|
1120
|
-
*/
|
|
1121
|
-
async open() {
|
|
1122
|
-
await delay(50);
|
|
1123
|
-
this.openToggle();
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* @desc
|
|
1127
|
-
*/
|
|
1128
|
-
async close() {
|
|
1129
|
-
this._open = false;
|
|
1130
|
-
}
|
|
1131
|
-
/**
|
|
1132
|
-
* @desc
|
|
1133
|
-
*/
|
|
1134
|
-
async getValue() {
|
|
1135
|
-
return this.value;
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* @param
|
|
1139
|
-
* @param disabled
|
|
1140
|
-
*/
|
|
1141
|
-
async setDisabled(disabled) {
|
|
1142
|
-
this.disabled = disabled;
|
|
1143
|
-
}
|
|
1144
|
-
changeFormat(date, reverseDay = false) {
|
|
1145
|
-
if (!date)
|
|
1146
|
-
return;
|
|
1147
|
-
const pad = (n) => n < 10 ? `0${n}` : n;
|
|
1148
|
-
const day = pad(new Date(date).getDate());
|
|
1149
|
-
const month = pad(new Date(date).getMonth() + 1);
|
|
1150
|
-
const year = new Date(date).getFullYear();
|
|
1151
|
-
const hours = pad(new Date(date).getHours());
|
|
1152
|
-
const minutes = pad(new Date(date).getMinutes());
|
|
1153
|
-
if (this.type == "range" || this.type == "date") {
|
|
1154
|
-
return reverseDay ? `${month}/${day}/${year}` : `${day}/${month}/${year}`;
|
|
1155
|
-
}
|
|
1156
|
-
return reverseDay ? `${month}/${day}/${year} ${hours}:${minutes}` : `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
1157
|
-
}
|
|
1158
|
-
isTime(value) {
|
|
1159
|
-
return /^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(value);
|
|
1160
|
-
}
|
|
1161
|
-
getHHMM(date) {
|
|
1162
|
-
if (!date)
|
|
1163
|
-
return;
|
|
1164
|
-
const pad = (n) => n < 10 ? `0${n}` : n;
|
|
1165
|
-
const hours = pad(new Date(date).getHours());
|
|
1166
|
-
const minutes = pad(new Date(date).getMinutes());
|
|
1167
|
-
return `${hours}:${minutes}`;
|
|
1168
|
-
}
|
|
1169
|
-
/**
|
|
1170
|
-
* @desc
|
|
1171
|
-
* @param dateOrTime
|
|
1172
|
-
*/
|
|
1173
|
-
async set(dateOrTime) {
|
|
1174
|
-
if (dateOrTime) {
|
|
1175
|
-
if (typeof dateOrTime === "number") {
|
|
1176
|
-
dateOrTime = new Date(dateOrTime);
|
|
1177
|
-
}
|
|
1178
|
-
if (this.type == "time") {
|
|
1179
|
-
let time = dateOrTime;
|
|
1180
|
-
if (!this.isTime(dateOrTime)) {
|
|
1181
|
-
time = this.getHHMM(dateOrTime);
|
|
1182
|
-
}
|
|
1183
|
-
this.setDataFromText(time, true, false);
|
|
1184
|
-
}
|
|
1185
|
-
else {
|
|
1186
|
-
const split = dateOrTime.toString().split('-');
|
|
1187
|
-
const parseDate0 = Date.parse(split[0]);
|
|
1188
|
-
if (split[0] && !isNaN(parseDate0)) {
|
|
1189
|
-
var date = this.changeFormat(DateTimeHelper.convertTimeStampToDate(new Date(split[0]).getTime()));
|
|
1190
|
-
if (split[1] && !isNaN(Date.parse(split[1]))) {
|
|
1191
|
-
var date2 = this.changeFormat(DateTimeHelper.convertTimeStampToDate(new Date(split[1]).getTime()));
|
|
1192
|
-
date = date + "-" + date2;
|
|
1193
|
-
}
|
|
1194
|
-
this.setDataFromText(date, true, false);
|
|
1195
|
-
}
|
|
1196
|
-
else {
|
|
1197
|
-
this.setDataFromText('', true, false);
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
else {
|
|
1202
|
-
this.setClear();
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
async get() {
|
|
1206
|
-
var _a;
|
|
1207
|
-
return ((_a = this.value) === null || _a === void 0 ? void 0 : _a.timestamp) || null;
|
|
1208
|
-
}
|
|
1209
|
-
async setClear() {
|
|
1210
|
-
await this.handleInputClear();
|
|
1211
|
-
return Promise.resolve();
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* @desc
|
|
1215
|
-
*/
|
|
1216
|
-
async getInput() {
|
|
1217
|
-
return this.inputElement;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* @desc
|
|
1221
|
-
* @returns
|
|
1222
|
-
*/
|
|
1223
|
-
async isValid() {
|
|
1224
|
-
return this.getError();
|
|
1225
|
-
}
|
|
1226
|
-
async resetCaption() {
|
|
1227
|
-
await delay(10);
|
|
1228
|
-
await this.inputElement.resetCaption();
|
|
1229
|
-
this.captionType = 'default';
|
|
1230
|
-
this.captionError = null;
|
|
1231
|
-
await delay(10);
|
|
1232
|
-
return Promise.resolve();
|
|
1233
|
-
}
|
|
1234
|
-
addZeroBefore(n) {
|
|
1235
|
-
return (n < 10 ? '0' : '') + n;
|
|
1236
|
-
}
|
|
1237
|
-
formatDate(date, format) {
|
|
1238
|
-
const map = {
|
|
1239
|
-
mm: this.addZeroBefore(date.getMonth() + 1),
|
|
1240
|
-
dd: this.addZeroBefore(date.getDate()),
|
|
1241
|
-
yyyy: this.addZeroBefore(date.getFullYear()),
|
|
1242
|
-
hh: this.addZeroBefore(date.getHours()),
|
|
1243
|
-
mi: this.addZeroBefore(date.getMinutes()),
|
|
1244
|
-
};
|
|
1245
|
-
return format.replace(/mm|dd|yyyy|hh|mi/gi, matched => map[matched]);
|
|
1246
|
-
}
|
|
1247
|
-
handleResize() {
|
|
1248
|
-
this.calculateLocation();
|
|
1249
|
-
}
|
|
1250
|
-
handleWheels(event) {
|
|
1251
|
-
if (this._open) {
|
|
1252
|
-
const list = document.querySelector(`#picker-vp-${this._id}`);
|
|
1253
|
-
const isClickInside = list && Generate.findEventPath(event, list);
|
|
1254
|
-
if (isClickInside) {
|
|
1255
|
-
this.calculateLocation();
|
|
1256
|
-
}
|
|
1257
|
-
else {
|
|
1258
|
-
this._open = false;
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
componentDidLoad() {
|
|
1263
|
-
const picker = this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);
|
|
1264
|
-
//move to body
|
|
1265
|
-
if (picker) {
|
|
1266
|
-
document.body.appendChild(picker);
|
|
1267
|
-
this.calculateLocation();
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
disconnectedCallback() {
|
|
1271
|
-
this.el.innerHTML = '';
|
|
1272
|
-
const pickerBox = document.getElementById(`picker-vp-${this._id}`);
|
|
1273
|
-
if (pickerBox) {
|
|
1274
|
-
pickerBox.remove();
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
async calculateLocation() {
|
|
1278
|
-
const pickerBox = document.getElementById(`picker-vp-${this._id}`);
|
|
1279
|
-
const placementArray = this.placement.split('-');
|
|
1280
|
-
if (this.alignment) {
|
|
1281
|
-
this.placement = placementArray[0] + (this.alignment == "right" ? "-end" : "-start");
|
|
1282
|
-
}
|
|
1283
|
-
var placement = this.placement;
|
|
1284
|
-
const targetElementId = this.linkedComponent ? this.linkedComponent : this._id;
|
|
1285
|
-
const target = document.getElementById(targetElementId);
|
|
1286
|
-
if (target) {
|
|
1287
|
-
const targetElement = this.linkedComponent ? target : target.shadowRoot.querySelector(`#picker-input-${this._id}`) || target.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);
|
|
1288
|
-
if (pickerBox && targetElement) {
|
|
1289
|
-
getPlacement(pickerBox, targetElement, placement, (place) => (placement = place));
|
|
1290
|
-
await delay(10);
|
|
1291
|
-
let pos = setPosition(placement, targetElement);
|
|
1292
|
-
let captionAreaHeight = this.noCaption ? 0 : 20;
|
|
1293
|
-
let labelAreaHeight = 0;
|
|
1294
|
-
// if (this.fullWidth) {
|
|
1295
|
-
// pickerBox.style.width = targetElement.offsetWidth + 'px';
|
|
1296
|
-
// }
|
|
1297
|
-
getPlacement(pickerBox, targetElement, placement, (place) => (placement = place));
|
|
1298
|
-
await delay(10);
|
|
1299
|
-
pos = setPosition(placement, targetElement);
|
|
1300
|
-
if (this.linkedComponent) {
|
|
1301
|
-
pickerBox.style.top = (placement.split('-')[0] == 'top' ? pos[0] - pickerBox.offsetHeight : pos[0]) + 'px';
|
|
1302
|
-
}
|
|
1303
|
-
else {
|
|
1304
|
-
pickerBox.style.top = (placement.split('-')[0] == 'top' ? pos[0] - pickerBox.offsetHeight + labelAreaHeight : pos[0] - captionAreaHeight) + 'px';
|
|
1305
|
-
}
|
|
1306
|
-
switch (placement.split('-')[1]) {
|
|
1307
|
-
case "start":
|
|
1308
|
-
pickerBox.style.left = pos[1] + 'px';
|
|
1309
|
-
break;
|
|
1310
|
-
case "center":
|
|
1311
|
-
pickerBox.style.left = pos[1] - pickerBox.offsetWidth / 2 + 'px';
|
|
1312
|
-
break;
|
|
1313
|
-
case "end":
|
|
1314
|
-
pickerBox.style.left = pos[1] - pickerBox.offsetWidth + 'px';
|
|
1315
|
-
break;
|
|
1316
|
-
default:
|
|
1317
|
-
break;
|
|
1318
|
-
}
|
|
1319
|
-
pickerBox.classList.toggle('bcm-list--top', placement.split('-')[0] == 'top');
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
handleKeyDown(ev) {
|
|
1324
|
-
const keycode = ev.keyCode || ev.which;
|
|
1325
|
-
if (keycode === Bcm.KeyCode.escape) {
|
|
1326
|
-
if (this._open) {
|
|
1327
|
-
this._open = false;
|
|
1328
|
-
ev.preventDefault();
|
|
1329
|
-
ev.stopPropagation();
|
|
1330
|
-
ev.stopImmediatePropagation();
|
|
1331
|
-
this.markForCheck();
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
render() {
|
|
1336
|
-
const dayNumbersClasses = cs('day-numbers');
|
|
1337
|
-
const datetimePickerClasses = cs('datetime-picker', 'datetime-picker-wrapper', {
|
|
1338
|
-
'open': this._open,
|
|
1339
|
-
'no-caption': this.noCaption,
|
|
1340
|
-
});
|
|
1341
|
-
const hostClasses = cs(this.hidden ? 'hidden' : null, {
|
|
1342
|
-
'full-width': this.fullWidth,
|
|
1343
|
-
'linked-component': this.linkedComponent,
|
|
1344
|
-
});
|
|
1345
|
-
const toggleClasses = cs('toggle', {
|
|
1346
|
-
disabled: this.disabled
|
|
1347
|
-
});
|
|
1348
|
-
const clockIcon = `<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>`;
|
|
1349
|
-
const calendarIcon = `<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>`;
|
|
1350
|
-
const inputIcon = this.type == "time" ? clockIcon : calendarIcon;
|
|
1351
|
-
return (h(Host, { class: hostClasses, "bcm-internal-id": this.inputId },
|
|
1352
|
-
this.label && (h("div", { class: "picker-label", onClick: () => this.openToggle() },
|
|
1353
|
-
h(LabelTemplate, { size: "medium", type: this.captionType, value: this.label, required: this.required, htmlFor: this._id }))),
|
|
1354
|
-
h("bcm-old-input", { ref: el => (this.inputElement = el), placeholder: this.placeholder || 'Select ' + (this.type === Types.datetime ? 'date and time' : '') + (this.type === Types.date ? 'date' : '') + (this.type === Types.time ? 'time' : '') + (this.type === Types.range ? 'date range' : ''), value: this.valueText, required: this.required, fullWidth: this.fullWidth, disabled: this.disabled, name: this.name, id: this.inputId, clearable: true, onClick: () => this.openPicker(), disableWatchValue: true, "on-bcm-clear": () => this.handleInputClear(), "on-bcm-change": (e) => this.handleInputChange(e),
|
|
1355
|
-
// on-bcm-input={(e: CustomEvent) => this.handleInputInput(e.detail)}
|
|
1356
|
-
noCaption: this.noCaption, captionError: this.captionError, caption: this.caption, captionType: this.captionType },
|
|
1357
|
-
this.error && (h("span", { slot: "suffix" },
|
|
1358
|
-
h("bcm-tooltip", { placement: "top", message: this.errorText, trigger: "hover" },
|
|
1359
|
-
h("bcm-icon", {
|
|
1360
|
-
// slot="suffix"
|
|
1361
|
-
// title={this.errorText}
|
|
1362
|
-
icon: "far fa-exclamation-circle" })))),
|
|
1363
|
-
h("span", { slot: "suffix", onClick: () => this.openPicker() },
|
|
1364
|
-
h("span", { id: "calender-icon", class: toggleClasses, innerHTML: inputIcon }))),
|
|
1365
|
-
h("div", { id: "picker-vp-" + this._id, class: datetimePickerClasses, onWheel: (e) => this.handleWheel(e) },
|
|
1366
|
-
h("div", { class: "modules" },
|
|
1367
|
-
this.hasDateModule && (h("div", { class: "date-container" },
|
|
1368
|
-
h("div", { class: "bcm-datetime-picker__header" },
|
|
1369
|
-
h("span", null),
|
|
1370
|
-
h("div", { class: "month-year" },
|
|
1371
|
-
h("button", { onClick: () => this.getPrevMonth() },
|
|
1372
|
-
h("bcm-icon", { icon: "far fa-chevron-left" })),
|
|
1373
|
-
h("div", { class: "month-year-wrapper" },
|
|
1374
|
-
h("span", { class: "month" }, this.getMonthText()),
|
|
1375
|
-
",",
|
|
1376
|
-
h("span", { class: "year" }, this.date.getFullYear())),
|
|
1377
|
-
h("button", { onClick: () => this.getNextMonth() },
|
|
1378
|
-
h("bcm-icon", { icon: "far fa-chevron-right" }))),
|
|
1379
|
-
h("span", { class: "today", onClick: () => this.setDateToday() }, "Today")),
|
|
1380
|
-
h("div", { class: "bcm-datetime-picker__content" },
|
|
1381
|
-
h("div", { class: "years", ref: el => (this.yearsWrapperElement = el) },
|
|
1382
|
-
h("div", { class: "items", ref: el => (this.yearsElement = el) }, this.years.map((year, idx) => h("span", { onClick: () => this.yearClick(idx) }, year))),
|
|
1383
|
-
h("div", { class: "select-strip", ref: el => (this.yearsStripElement = el) })),
|
|
1384
|
-
h("div", { class: "days" },
|
|
1385
|
-
h("div", { class: "day-labels" },
|
|
1386
|
-
h("span", null, "Mo"),
|
|
1387
|
-
h("span", null, "Tu"),
|
|
1388
|
-
h("span", null, "We"),
|
|
1389
|
-
h("span", null, "Th"),
|
|
1390
|
-
h("span", null, "Fr"),
|
|
1391
|
-
h("span", null, "Sa"),
|
|
1392
|
-
h("span", null, "Su")),
|
|
1393
|
-
h("div", { class: dayNumbersClasses }, this.dayNumbers.map(day => (h("span", { class: {
|
|
1394
|
-
'is-disabled-date': (this.type === Types.date || this.type === Types.datetime) && this.isDisabledDate(day.date),
|
|
1395
|
-
'not-this-month': !day.thisMonth,
|
|
1396
|
-
'is-weekend': day.isWeekend,
|
|
1397
|
-
'today': day.today,
|
|
1398
|
-
'selected': this.getSelected(day.date),
|
|
1399
|
-
'selected-start': this.getSelected(day.date) && this.selectedEndDate && this.type === Types.range,
|
|
1400
|
-
'selected-end': this.getSelected(day.date, true) && this.type === Types.range,
|
|
1401
|
-
'range': this.getDateIsInRange(day.date) && this.type === Types.range
|
|
1402
|
-
}, onClick: () => this.handleDayNumber(day.date) },
|
|
1403
|
-
h("span", { class: "number" }, day.day))))))))),
|
|
1404
|
-
this.hasTimeModule && (h("div", { class: "time-container" },
|
|
1405
|
-
h("div", { class: "bcm-datetime-picker__header" },
|
|
1406
|
-
h("div", { class: "month-year" },
|
|
1407
|
-
h("span", { class: "month" }, this.getTimeText())),
|
|
1408
|
-
h("span", { class: "now", onClick: () => { this.setTime(), this.type == "time" && (this._open = false); } }, "Now")),
|
|
1409
|
-
h("div", { class: "bcm-datetime-picker__content", onDblClick: (e) => { this.HourContentDblClick(e); } },
|
|
1410
|
-
h("div", { class: "hours", ref: el => (this.hoursWrapperElement = el) },
|
|
1411
|
-
h("div", { class: "items", ref: el => (this.hoursElement = el) }, this.hours.map((hour, idx) => h("span", { class: this.currentDate.hour === hour ? 'selected' : '', onClick: () => this.hourClick(idx) }, (hour < 10 && '0') + hour)))),
|
|
1412
|
-
h("div", { class: "minutes", ref: el => (this.minutesWrapperElement = el) },
|
|
1413
|
-
h("div", { class: "items", ref: el => (this.minutesElement = el) }, this.minutes.map((minute, idx) => h("span", { class: this.currentDate.minute === minute ? 'selected' : '', onClick: () => this.minuteClick(idx) }, (minute < 10 && '0') + minute)))),
|
|
1414
|
-
h("div", { class: "select-strip", ref: el => (this.timeStripElement = el) }))))))));
|
|
1415
|
-
}
|
|
1416
|
-
static get is() { return "bcm-datetime-picker"; }
|
|
1417
|
-
static get encapsulation() { return "shadow"; }
|
|
1418
|
-
static get originalStyleUrls() { return {
|
|
1419
|
-
"$": ["datetime-picker.scss"]
|
|
1420
|
-
}; }
|
|
1421
|
-
static get styleUrls() { return {
|
|
1422
|
-
"$": ["datetime-picker.css"]
|
|
1423
|
-
}; }
|
|
1424
|
-
static get properties() { return {
|
|
1425
|
-
"_id": {
|
|
1426
|
-
"type": "string",
|
|
1427
|
-
"mutable": true,
|
|
1428
|
-
"complexType": {
|
|
1429
|
-
"original": "string",
|
|
1430
|
-
"resolved": "string",
|
|
1431
|
-
"references": {}
|
|
1432
|
-
},
|
|
1433
|
-
"required": false,
|
|
1434
|
-
"optional": false,
|
|
1435
|
-
"docs": {
|
|
1436
|
-
"tags": [],
|
|
1437
|
-
"text": "Component Properties"
|
|
1438
|
-
},
|
|
1439
|
-
"attribute": "id",
|
|
1440
|
-
"reflect": true,
|
|
1441
|
-
"defaultValue": "Generate.UID()"
|
|
1442
|
-
},
|
|
1443
|
-
"date": {
|
|
1444
|
-
"type": "string",
|
|
1445
|
-
"mutable": true,
|
|
1446
|
-
"complexType": {
|
|
1447
|
-
"original": "string | Date",
|
|
1448
|
-
"resolved": "Date | string",
|
|
1449
|
-
"references": {
|
|
1450
|
-
"Date": {
|
|
1451
|
-
"location": "global"
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
},
|
|
1455
|
-
"required": false,
|
|
1456
|
-
"optional": false,
|
|
1457
|
-
"docs": {
|
|
1458
|
-
"tags": [],
|
|
1459
|
-
"text": ""
|
|
1460
|
-
},
|
|
1461
|
-
"attribute": "date",
|
|
1462
|
-
"reflect": false,
|
|
1463
|
-
"defaultValue": "new Date()"
|
|
1464
|
-
},
|
|
1465
|
-
"endDate": {
|
|
1466
|
-
"type": "string",
|
|
1467
|
-
"mutable": true,
|
|
1468
|
-
"complexType": {
|
|
1469
|
-
"original": "string | Date",
|
|
1470
|
-
"resolved": "Date | string",
|
|
1471
|
-
"references": {
|
|
1472
|
-
"Date": {
|
|
1473
|
-
"location": "global"
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
},
|
|
1477
|
-
"required": false,
|
|
1478
|
-
"optional": false,
|
|
1479
|
-
"docs": {
|
|
1480
|
-
"tags": [],
|
|
1481
|
-
"text": ""
|
|
1482
|
-
},
|
|
1483
|
-
"attribute": "end-date",
|
|
1484
|
-
"reflect": false,
|
|
1485
|
-
"defaultValue": "null"
|
|
1486
|
-
},
|
|
1487
|
-
"type": {
|
|
1488
|
-
"type": "string",
|
|
1489
|
-
"mutable": true,
|
|
1490
|
-
"complexType": {
|
|
1491
|
-
"original": "Type",
|
|
1492
|
-
"resolved": "\"date\" | \"datetime\" | \"range\" | \"time\"",
|
|
1493
|
-
"references": {
|
|
1494
|
-
"Type": {
|
|
1495
|
-
"location": "import",
|
|
1496
|
-
"path": "./types"
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
},
|
|
1500
|
-
"required": false,
|
|
1501
|
-
"optional": false,
|
|
1502
|
-
"docs": {
|
|
1503
|
-
"tags": [],
|
|
1504
|
-
"text": ""
|
|
1505
|
-
},
|
|
1506
|
-
"attribute": "type",
|
|
1507
|
-
"reflect": false,
|
|
1508
|
-
"defaultValue": "Types.datetime"
|
|
1509
|
-
},
|
|
1510
|
-
"disabled": {
|
|
1511
|
-
"type": "boolean",
|
|
1512
|
-
"mutable": true,
|
|
1513
|
-
"complexType": {
|
|
1514
|
-
"original": "boolean",
|
|
1515
|
-
"resolved": "boolean",
|
|
1516
|
-
"references": {}
|
|
1517
|
-
},
|
|
1518
|
-
"required": false,
|
|
1519
|
-
"optional": false,
|
|
1520
|
-
"docs": {
|
|
1521
|
-
"tags": [],
|
|
1522
|
-
"text": ""
|
|
1523
|
-
},
|
|
1524
|
-
"attribute": "disabled",
|
|
1525
|
-
"reflect": false,
|
|
1526
|
-
"defaultValue": "false"
|
|
1527
|
-
},
|
|
1528
|
-
"disabledDates": {
|
|
1529
|
-
"type": "any",
|
|
1530
|
-
"mutable": true,
|
|
1531
|
-
"complexType": {
|
|
1532
|
-
"original": "any",
|
|
1533
|
-
"resolved": "any",
|
|
1534
|
-
"references": {}
|
|
1535
|
-
},
|
|
1536
|
-
"required": false,
|
|
1537
|
-
"optional": false,
|
|
1538
|
-
"docs": {
|
|
1539
|
-
"tags": [],
|
|
1540
|
-
"text": ""
|
|
1541
|
-
},
|
|
1542
|
-
"attribute": "disableddates",
|
|
1543
|
-
"reflect": false,
|
|
1544
|
-
"defaultValue": "''"
|
|
1545
|
-
},
|
|
1546
|
-
"value": {
|
|
1547
|
-
"type": "any",
|
|
1548
|
-
"mutable": true,
|
|
1549
|
-
"complexType": {
|
|
1550
|
-
"original": "any",
|
|
1551
|
-
"resolved": "any",
|
|
1552
|
-
"references": {}
|
|
1553
|
-
},
|
|
1554
|
-
"required": false,
|
|
1555
|
-
"optional": false,
|
|
1556
|
-
"docs": {
|
|
1557
|
-
"tags": [],
|
|
1558
|
-
"text": ""
|
|
1559
|
-
},
|
|
1560
|
-
"attribute": "value",
|
|
1561
|
-
"reflect": false,
|
|
1562
|
-
"defaultValue": "null"
|
|
1563
|
-
},
|
|
1564
|
-
"_open": {
|
|
1565
|
-
"type": "boolean",
|
|
1566
|
-
"mutable": true,
|
|
1567
|
-
"complexType": {
|
|
1568
|
-
"original": "boolean",
|
|
1569
|
-
"resolved": "boolean",
|
|
1570
|
-
"references": {}
|
|
1571
|
-
},
|
|
1572
|
-
"required": false,
|
|
1573
|
-
"optional": false,
|
|
1574
|
-
"docs": {
|
|
1575
|
-
"tags": [],
|
|
1576
|
-
"text": ""
|
|
1577
|
-
},
|
|
1578
|
-
"attribute": "open",
|
|
1579
|
-
"reflect": false,
|
|
1580
|
-
"defaultValue": "false"
|
|
1581
|
-
},
|
|
1582
|
-
"hidden": {
|
|
1583
|
-
"type": "boolean",
|
|
1584
|
-
"mutable": true,
|
|
1585
|
-
"complexType": {
|
|
1586
|
-
"original": "boolean",
|
|
1587
|
-
"resolved": "boolean",
|
|
1588
|
-
"references": {}
|
|
1589
|
-
},
|
|
1590
|
-
"required": false,
|
|
1591
|
-
"optional": false,
|
|
1592
|
-
"docs": {
|
|
1593
|
-
"tags": [],
|
|
1594
|
-
"text": ""
|
|
1595
|
-
},
|
|
1596
|
-
"attribute": "hidden",
|
|
1597
|
-
"reflect": false,
|
|
1598
|
-
"defaultValue": "false"
|
|
1599
|
-
},
|
|
1600
|
-
"name": {
|
|
1601
|
-
"type": "string",
|
|
1602
|
-
"mutable": true,
|
|
1603
|
-
"complexType": {
|
|
1604
|
-
"original": "string",
|
|
1605
|
-
"resolved": "string",
|
|
1606
|
-
"references": {}
|
|
1607
|
-
},
|
|
1608
|
-
"required": false,
|
|
1609
|
-
"optional": false,
|
|
1610
|
-
"docs": {
|
|
1611
|
-
"tags": [],
|
|
1612
|
-
"text": ""
|
|
1613
|
-
},
|
|
1614
|
-
"attribute": "name",
|
|
1615
|
-
"reflect": true
|
|
1616
|
-
},
|
|
1617
|
-
"fullWidth": {
|
|
1618
|
-
"type": "boolean",
|
|
1619
|
-
"mutable": true,
|
|
1620
|
-
"complexType": {
|
|
1621
|
-
"original": "boolean",
|
|
1622
|
-
"resolved": "boolean",
|
|
1623
|
-
"references": {}
|
|
1624
|
-
},
|
|
1625
|
-
"required": false,
|
|
1626
|
-
"optional": false,
|
|
1627
|
-
"docs": {
|
|
1628
|
-
"tags": [],
|
|
1629
|
-
"text": ""
|
|
1630
|
-
},
|
|
1631
|
-
"attribute": "full-width",
|
|
1632
|
-
"reflect": false,
|
|
1633
|
-
"defaultValue": "false"
|
|
1634
|
-
},
|
|
1635
|
-
"required": {
|
|
1636
|
-
"type": "boolean",
|
|
1637
|
-
"mutable": true,
|
|
1638
|
-
"complexType": {
|
|
1639
|
-
"original": "boolean",
|
|
1640
|
-
"resolved": "boolean",
|
|
1641
|
-
"references": {}
|
|
1642
|
-
},
|
|
1643
|
-
"required": false,
|
|
1644
|
-
"optional": false,
|
|
1645
|
-
"docs": {
|
|
1646
|
-
"tags": [],
|
|
1647
|
-
"text": ""
|
|
1648
|
-
},
|
|
1649
|
-
"attribute": "required",
|
|
1650
|
-
"reflect": false,
|
|
1651
|
-
"defaultValue": "false"
|
|
1652
|
-
},
|
|
1653
|
-
"label": {
|
|
1654
|
-
"type": "string",
|
|
1655
|
-
"mutable": true,
|
|
1656
|
-
"complexType": {
|
|
1657
|
-
"original": "string",
|
|
1658
|
-
"resolved": "string",
|
|
1659
|
-
"references": {}
|
|
1660
|
-
},
|
|
1661
|
-
"required": false,
|
|
1662
|
-
"optional": false,
|
|
1663
|
-
"docs": {
|
|
1664
|
-
"tags": [],
|
|
1665
|
-
"text": ""
|
|
1666
|
-
},
|
|
1667
|
-
"attribute": "label",
|
|
1668
|
-
"reflect": false
|
|
1669
|
-
},
|
|
1670
|
-
"placeholder": {
|
|
1671
|
-
"type": "string",
|
|
1672
|
-
"mutable": true,
|
|
1673
|
-
"complexType": {
|
|
1674
|
-
"original": "string",
|
|
1675
|
-
"resolved": "string",
|
|
1676
|
-
"references": {}
|
|
1677
|
-
},
|
|
1678
|
-
"required": false,
|
|
1679
|
-
"optional": false,
|
|
1680
|
-
"docs": {
|
|
1681
|
-
"tags": [],
|
|
1682
|
-
"text": ""
|
|
1683
|
-
},
|
|
1684
|
-
"attribute": "placeholder",
|
|
1685
|
-
"reflect": false
|
|
1686
|
-
},
|
|
1687
|
-
"minYear": {
|
|
1688
|
-
"type": "number",
|
|
1689
|
-
"mutable": true,
|
|
1690
|
-
"complexType": {
|
|
1691
|
-
"original": "number",
|
|
1692
|
-
"resolved": "number",
|
|
1693
|
-
"references": {}
|
|
1694
|
-
},
|
|
1695
|
-
"required": false,
|
|
1696
|
-
"optional": false,
|
|
1697
|
-
"docs": {
|
|
1698
|
-
"tags": [],
|
|
1699
|
-
"text": ""
|
|
1700
|
-
},
|
|
1701
|
-
"attribute": "min-year",
|
|
1702
|
-
"reflect": false,
|
|
1703
|
-
"defaultValue": "1900"
|
|
1704
|
-
},
|
|
1705
|
-
"maxYear": {
|
|
1706
|
-
"type": "number",
|
|
1707
|
-
"mutable": true,
|
|
1708
|
-
"complexType": {
|
|
1709
|
-
"original": "number",
|
|
1710
|
-
"resolved": "number",
|
|
1711
|
-
"references": {}
|
|
1712
|
-
},
|
|
1713
|
-
"required": false,
|
|
1714
|
-
"optional": false,
|
|
1715
|
-
"docs": {
|
|
1716
|
-
"tags": [],
|
|
1717
|
-
"text": ""
|
|
1718
|
-
},
|
|
1719
|
-
"attribute": "max-year",
|
|
1720
|
-
"reflect": false,
|
|
1721
|
-
"defaultValue": "2200"
|
|
1722
|
-
},
|
|
1723
|
-
"noCaption": {
|
|
1724
|
-
"type": "boolean",
|
|
1725
|
-
"mutable": true,
|
|
1726
|
-
"complexType": {
|
|
1727
|
-
"original": "boolean",
|
|
1728
|
-
"resolved": "boolean",
|
|
1729
|
-
"references": {}
|
|
1730
|
-
},
|
|
1731
|
-
"required": false,
|
|
1732
|
-
"optional": false,
|
|
1733
|
-
"docs": {
|
|
1734
|
-
"tags": [],
|
|
1735
|
-
"text": ""
|
|
1736
|
-
},
|
|
1737
|
-
"attribute": "no-caption",
|
|
1738
|
-
"reflect": false,
|
|
1739
|
-
"defaultValue": "false"
|
|
1740
|
-
},
|
|
1741
|
-
"captionError": {
|
|
1742
|
-
"type": "string",
|
|
1743
|
-
"mutable": true,
|
|
1744
|
-
"complexType": {
|
|
1745
|
-
"original": "string",
|
|
1746
|
-
"resolved": "string",
|
|
1747
|
-
"references": {}
|
|
1748
|
-
},
|
|
1749
|
-
"required": false,
|
|
1750
|
-
"optional": false,
|
|
1751
|
-
"docs": {
|
|
1752
|
-
"tags": [],
|
|
1753
|
-
"text": ""
|
|
1754
|
-
},
|
|
1755
|
-
"attribute": "caption-error",
|
|
1756
|
-
"reflect": false
|
|
1757
|
-
},
|
|
1758
|
-
"caption": {
|
|
1759
|
-
"type": "string",
|
|
1760
|
-
"mutable": true,
|
|
1761
|
-
"complexType": {
|
|
1762
|
-
"original": "string",
|
|
1763
|
-
"resolved": "string",
|
|
1764
|
-
"references": {}
|
|
1765
|
-
},
|
|
1766
|
-
"required": false,
|
|
1767
|
-
"optional": false,
|
|
1768
|
-
"docs": {
|
|
1769
|
-
"tags": [],
|
|
1770
|
-
"text": ""
|
|
1771
|
-
},
|
|
1772
|
-
"attribute": "caption",
|
|
1773
|
-
"reflect": false,
|
|
1774
|
-
"defaultValue": "''"
|
|
1775
|
-
},
|
|
1776
|
-
"captionType": {
|
|
1777
|
-
"type": "string",
|
|
1778
|
-
"mutable": true,
|
|
1779
|
-
"complexType": {
|
|
1780
|
-
"original": "'primary' | 'success' | 'warning' | 'error' | 'default'",
|
|
1781
|
-
"resolved": "\"default\" | \"error\" | \"primary\" | \"success\" | \"warning\"",
|
|
1782
|
-
"references": {}
|
|
1783
|
-
},
|
|
1784
|
-
"required": false,
|
|
1785
|
-
"optional": false,
|
|
1786
|
-
"docs": {
|
|
1787
|
-
"tags": [],
|
|
1788
|
-
"text": ""
|
|
1789
|
-
},
|
|
1790
|
-
"attribute": "caption-type",
|
|
1791
|
-
"reflect": false,
|
|
1792
|
-
"defaultValue": "'default'"
|
|
1793
|
-
},
|
|
1794
|
-
"alignment": {
|
|
1795
|
-
"type": "any",
|
|
1796
|
-
"mutable": true,
|
|
1797
|
-
"complexType": {
|
|
1798
|
-
"original": "any",
|
|
1799
|
-
"resolved": "any",
|
|
1800
|
-
"references": {}
|
|
1801
|
-
},
|
|
1802
|
-
"required": false,
|
|
1803
|
-
"optional": false,
|
|
1804
|
-
"docs": {
|
|
1805
|
-
"tags": [],
|
|
1806
|
-
"text": ""
|
|
1807
|
-
},
|
|
1808
|
-
"attribute": "alignment",
|
|
1809
|
-
"reflect": false
|
|
1810
|
-
},
|
|
1811
|
-
"placement": {
|
|
1812
|
-
"type": "string",
|
|
1813
|
-
"mutable": true,
|
|
1814
|
-
"complexType": {
|
|
1815
|
-
"original": "PlacementTypes",
|
|
1816
|
-
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
1817
|
-
"references": {
|
|
1818
|
-
"PlacementTypes": {
|
|
1819
|
-
"location": "import",
|
|
1820
|
-
"path": "../../../models/bcm-types"
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
},
|
|
1824
|
-
"required": false,
|
|
1825
|
-
"optional": false,
|
|
1826
|
-
"docs": {
|
|
1827
|
-
"tags": [],
|
|
1828
|
-
"text": ""
|
|
1829
|
-
},
|
|
1830
|
-
"attribute": "placement",
|
|
1831
|
-
"reflect": false,
|
|
1832
|
-
"defaultValue": "Bcm.Placement['bottom-start']"
|
|
1833
|
-
},
|
|
1834
|
-
"linkedComponent": {
|
|
1835
|
-
"type": "string",
|
|
1836
|
-
"mutable": true,
|
|
1837
|
-
"complexType": {
|
|
1838
|
-
"original": "string",
|
|
1839
|
-
"resolved": "string",
|
|
1840
|
-
"references": {}
|
|
1841
|
-
},
|
|
1842
|
-
"required": false,
|
|
1843
|
-
"optional": false,
|
|
1844
|
-
"docs": {
|
|
1845
|
-
"tags": [],
|
|
1846
|
-
"text": ""
|
|
1847
|
-
},
|
|
1848
|
-
"attribute": "linked-component",
|
|
1849
|
-
"reflect": false
|
|
1850
|
-
}
|
|
1851
|
-
}; }
|
|
1852
|
-
static get states() { return {
|
|
1853
|
-
"years": {},
|
|
1854
|
-
"hours": {},
|
|
1855
|
-
"minutes": {},
|
|
1856
|
-
"hasDateModule": {},
|
|
1857
|
-
"hasTimeModule": {},
|
|
1858
|
-
"renderDate": {},
|
|
1859
|
-
"selectedDate": {},
|
|
1860
|
-
"selectedEndDate": {},
|
|
1861
|
-
"error": {},
|
|
1862
|
-
"errorText": {},
|
|
1863
|
-
"tick": {}
|
|
1864
|
-
}; }
|
|
1865
|
-
static get events() { return [{
|
|
1866
|
-
"method": "load",
|
|
1867
|
-
"name": "bcm-load",
|
|
1868
|
-
"bubbles": true,
|
|
1869
|
-
"cancelable": true,
|
|
1870
|
-
"composed": true,
|
|
1871
|
-
"docs": {
|
|
1872
|
-
"tags": [{
|
|
1873
|
-
"name": "desc",
|
|
1874
|
-
"text": undefined
|
|
1875
|
-
}],
|
|
1876
|
-
"text": ""
|
|
1877
|
-
},
|
|
1878
|
-
"complexType": {
|
|
1879
|
-
"original": "any",
|
|
1880
|
-
"resolved": "any",
|
|
1881
|
-
"references": {}
|
|
1882
|
-
}
|
|
1883
|
-
}, {
|
|
1884
|
-
"method": "change",
|
|
1885
|
-
"name": "bcm-change",
|
|
1886
|
-
"bubbles": true,
|
|
1887
|
-
"cancelable": true,
|
|
1888
|
-
"composed": true,
|
|
1889
|
-
"docs": {
|
|
1890
|
-
"tags": [],
|
|
1891
|
-
"text": ""
|
|
1892
|
-
},
|
|
1893
|
-
"complexType": {
|
|
1894
|
-
"original": "any",
|
|
1895
|
-
"resolved": "any",
|
|
1896
|
-
"references": {}
|
|
1897
|
-
}
|
|
1898
|
-
}, {
|
|
1899
|
-
"method": "bcmOpen",
|
|
1900
|
-
"name": "bcm-open",
|
|
1901
|
-
"bubbles": true,
|
|
1902
|
-
"cancelable": true,
|
|
1903
|
-
"composed": true,
|
|
1904
|
-
"docs": {
|
|
1905
|
-
"tags": [],
|
|
1906
|
-
"text": ""
|
|
1907
|
-
},
|
|
1908
|
-
"complexType": {
|
|
1909
|
-
"original": "any",
|
|
1910
|
-
"resolved": "any",
|
|
1911
|
-
"references": {}
|
|
1912
|
-
}
|
|
1913
|
-
}]; }
|
|
1914
|
-
static get methods() { return {
|
|
1915
|
-
"open": {
|
|
1916
|
-
"complexType": {
|
|
1917
|
-
"signature": "() => Promise<void>",
|
|
1918
|
-
"parameters": [],
|
|
1919
|
-
"references": {
|
|
1920
|
-
"Promise": {
|
|
1921
|
-
"location": "global"
|
|
1922
|
-
}
|
|
1923
|
-
},
|
|
1924
|
-
"return": "Promise<void>"
|
|
1925
|
-
},
|
|
1926
|
-
"docs": {
|
|
1927
|
-
"text": "",
|
|
1928
|
-
"tags": [{
|
|
1929
|
-
"name": "desc",
|
|
1930
|
-
"text": undefined
|
|
1931
|
-
}]
|
|
1932
|
-
}
|
|
1933
|
-
},
|
|
1934
|
-
"close": {
|
|
1935
|
-
"complexType": {
|
|
1936
|
-
"signature": "() => Promise<void>",
|
|
1937
|
-
"parameters": [],
|
|
1938
|
-
"references": {
|
|
1939
|
-
"Promise": {
|
|
1940
|
-
"location": "global"
|
|
1941
|
-
}
|
|
1942
|
-
},
|
|
1943
|
-
"return": "Promise<void>"
|
|
1944
|
-
},
|
|
1945
|
-
"docs": {
|
|
1946
|
-
"text": "",
|
|
1947
|
-
"tags": [{
|
|
1948
|
-
"name": "desc",
|
|
1949
|
-
"text": undefined
|
|
1950
|
-
}]
|
|
1951
|
-
}
|
|
1952
|
-
},
|
|
1953
|
-
"getValue": {
|
|
1954
|
-
"complexType": {
|
|
1955
|
-
"signature": "() => Promise<any>",
|
|
1956
|
-
"parameters": [],
|
|
1957
|
-
"references": {
|
|
1958
|
-
"Promise": {
|
|
1959
|
-
"location": "global"
|
|
1960
|
-
}
|
|
1961
|
-
},
|
|
1962
|
-
"return": "Promise<any>"
|
|
1963
|
-
},
|
|
1964
|
-
"docs": {
|
|
1965
|
-
"text": "",
|
|
1966
|
-
"tags": [{
|
|
1967
|
-
"name": "desc",
|
|
1968
|
-
"text": undefined
|
|
1969
|
-
}]
|
|
1970
|
-
}
|
|
1971
|
-
},
|
|
1972
|
-
"setDisabled": {
|
|
1973
|
-
"complexType": {
|
|
1974
|
-
"signature": "(disabled: boolean) => Promise<void>",
|
|
1975
|
-
"parameters": [{
|
|
1976
|
-
"tags": [{
|
|
1977
|
-
"name": "param",
|
|
1978
|
-
"text": "disabled"
|
|
1979
|
-
}],
|
|
1980
|
-
"text": ""
|
|
1981
|
-
}],
|
|
1982
|
-
"references": {
|
|
1983
|
-
"Promise": {
|
|
1984
|
-
"location": "global"
|
|
1985
|
-
}
|
|
1986
|
-
},
|
|
1987
|
-
"return": "Promise<void>"
|
|
1988
|
-
},
|
|
1989
|
-
"docs": {
|
|
1990
|
-
"text": "",
|
|
1991
|
-
"tags": [{
|
|
1992
|
-
"name": "param",
|
|
1993
|
-
"text": ""
|
|
1994
|
-
}, {
|
|
1995
|
-
"name": "param",
|
|
1996
|
-
"text": "disabled"
|
|
1997
|
-
}]
|
|
1998
|
-
}
|
|
1999
|
-
},
|
|
2000
|
-
"set": {
|
|
2001
|
-
"complexType": {
|
|
2002
|
-
"signature": "(dateOrTime: any) => Promise<void>",
|
|
2003
|
-
"parameters": [{
|
|
2004
|
-
"tags": [{
|
|
2005
|
-
"name": "param",
|
|
2006
|
-
"text": "dateOrTime"
|
|
2007
|
-
}],
|
|
2008
|
-
"text": ""
|
|
2009
|
-
}],
|
|
2010
|
-
"references": {
|
|
2011
|
-
"Promise": {
|
|
2012
|
-
"location": "global"
|
|
2013
|
-
}
|
|
2014
|
-
},
|
|
2015
|
-
"return": "Promise<void>"
|
|
2016
|
-
},
|
|
2017
|
-
"docs": {
|
|
2018
|
-
"text": "",
|
|
2019
|
-
"tags": [{
|
|
2020
|
-
"name": "desc",
|
|
2021
|
-
"text": undefined
|
|
2022
|
-
}, {
|
|
2023
|
-
"name": "param",
|
|
2024
|
-
"text": "dateOrTime"
|
|
2025
|
-
}]
|
|
2026
|
-
}
|
|
2027
|
-
},
|
|
2028
|
-
"get": {
|
|
2029
|
-
"complexType": {
|
|
2030
|
-
"signature": "() => Promise<any>",
|
|
2031
|
-
"parameters": [],
|
|
2032
|
-
"references": {
|
|
2033
|
-
"Promise": {
|
|
2034
|
-
"location": "global"
|
|
2035
|
-
}
|
|
2036
|
-
},
|
|
2037
|
-
"return": "Promise<any>"
|
|
2038
|
-
},
|
|
2039
|
-
"docs": {
|
|
2040
|
-
"text": "",
|
|
2041
|
-
"tags": []
|
|
2042
|
-
}
|
|
2043
|
-
},
|
|
2044
|
-
"setClear": {
|
|
2045
|
-
"complexType": {
|
|
2046
|
-
"signature": "() => Promise<void>",
|
|
2047
|
-
"parameters": [],
|
|
2048
|
-
"references": {
|
|
2049
|
-
"Promise": {
|
|
2050
|
-
"location": "global"
|
|
2051
|
-
}
|
|
2052
|
-
},
|
|
2053
|
-
"return": "Promise<void>"
|
|
2054
|
-
},
|
|
2055
|
-
"docs": {
|
|
2056
|
-
"text": "",
|
|
2057
|
-
"tags": []
|
|
2058
|
-
}
|
|
2059
|
-
},
|
|
2060
|
-
"getInput": {
|
|
2061
|
-
"complexType": {
|
|
2062
|
-
"signature": "() => Promise<HTMLBcmOldInputElement>",
|
|
2063
|
-
"parameters": [],
|
|
2064
|
-
"references": {
|
|
2065
|
-
"Promise": {
|
|
2066
|
-
"location": "global"
|
|
2067
|
-
},
|
|
2068
|
-
"HTMLBcmOldInputElement": {
|
|
2069
|
-
"location": "global"
|
|
2070
|
-
}
|
|
2071
|
-
},
|
|
2072
|
-
"return": "Promise<HTMLBcmOldInputElement>"
|
|
2073
|
-
},
|
|
2074
|
-
"docs": {
|
|
2075
|
-
"text": "",
|
|
2076
|
-
"tags": [{
|
|
2077
|
-
"name": "desc",
|
|
2078
|
-
"text": undefined
|
|
2079
|
-
}]
|
|
2080
|
-
}
|
|
2081
|
-
},
|
|
2082
|
-
"isValid": {
|
|
2083
|
-
"complexType": {
|
|
2084
|
-
"signature": "() => Promise<{ valid: boolean; error: boolean; errorText: string; }>",
|
|
2085
|
-
"parameters": [],
|
|
2086
|
-
"references": {
|
|
2087
|
-
"Promise": {
|
|
2088
|
-
"location": "global"
|
|
2089
|
-
}
|
|
2090
|
-
},
|
|
2091
|
-
"return": "Promise<{ valid: boolean; error: boolean; errorText: string; }>"
|
|
2092
|
-
},
|
|
2093
|
-
"docs": {
|
|
2094
|
-
"text": "",
|
|
2095
|
-
"tags": [{
|
|
2096
|
-
"name": "desc",
|
|
2097
|
-
"text": undefined
|
|
2098
|
-
}, {
|
|
2099
|
-
"name": "returns",
|
|
2100
|
-
"text": undefined
|
|
2101
|
-
}]
|
|
2102
|
-
}
|
|
2103
|
-
},
|
|
2104
|
-
"resetCaption": {
|
|
2105
|
-
"complexType": {
|
|
2106
|
-
"signature": "() => Promise<void>",
|
|
2107
|
-
"parameters": [],
|
|
2108
|
-
"references": {
|
|
2109
|
-
"Promise": {
|
|
2110
|
-
"location": "global"
|
|
2111
|
-
}
|
|
2112
|
-
},
|
|
2113
|
-
"return": "Promise<void>"
|
|
2114
|
-
},
|
|
2115
|
-
"docs": {
|
|
2116
|
-
"text": "",
|
|
2117
|
-
"tags": []
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
}; }
|
|
2121
|
-
static get elementRef() { return "el"; }
|
|
2122
|
-
static get watchers() { return [{
|
|
2123
|
-
"propName": "_open",
|
|
2124
|
-
"methodName": "openChanged"
|
|
2125
|
-
}, {
|
|
2126
|
-
"propName": "renderDate",
|
|
2127
|
-
"methodName": "renderDateChange"
|
|
2128
|
-
}, {
|
|
2129
|
-
"propName": "_open",
|
|
2130
|
-
"methodName": "openChange"
|
|
2131
|
-
}, {
|
|
2132
|
-
"propName": "value",
|
|
2133
|
-
"methodName": "valueChange"
|
|
2134
|
-
}, {
|
|
2135
|
-
"propName": "disabledDates",
|
|
2136
|
-
"methodName": "disabledDatesChange"
|
|
2137
|
-
}]; }
|
|
2138
|
-
static get listeners() { return [{
|
|
2139
|
-
"name": "click",
|
|
2140
|
-
"method": "handleWindowClick",
|
|
2141
|
-
"target": "window",
|
|
2142
|
-
"capture": false,
|
|
2143
|
-
"passive": false
|
|
2144
|
-
}, {
|
|
2145
|
-
"name": "resize",
|
|
2146
|
-
"method": "handleResize",
|
|
2147
|
-
"target": "window",
|
|
2148
|
-
"capture": false,
|
|
2149
|
-
"passive": true
|
|
2150
|
-
}, {
|
|
2151
|
-
"name": "wheel",
|
|
2152
|
-
"method": "handleWheels",
|
|
2153
|
-
"target": "document",
|
|
2154
|
-
"capture": false,
|
|
2155
|
-
"passive": false
|
|
2156
|
-
}, {
|
|
2157
|
-
"name": "keydown",
|
|
2158
|
-
"method": "handleKeyDown",
|
|
2159
|
-
"target": "window",
|
|
2160
|
-
"capture": true,
|
|
2161
|
-
"passive": false
|
|
2162
|
-
}]; }
|
|
2163
|
-
}
|
|
2164
|
-
__decorate([
|
|
2165
|
-
IsLoad()
|
|
2166
|
-
], BcmDatetimePicker.prototype, "el", void 0);
|