bromcom-ui 2.7.37-rc.1 → 2.7.37-rc.2
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.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-0e480b7b.entry.js → p-02892da0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-250f52d3.entry.js → p-043f3a0d.entry.js} +1 -1
- package/dist/bromcom-ui/p-053962ad.entry.js +5 -0
- package/dist/bromcom-ui/{p-7477b927.entry.js → p-0aec8d73.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a12fbd0.entry.js → p-0cd7e628.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0ba73c30.js → p-10caf4ce.js} +1 -1
- package/dist/bromcom-ui/{p-125213af.entry.js → p-13ed55a9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2d3c0790.entry.js → p-1507f99a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-83317635.entry.js → p-151d7bec.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d11eccc0.entry.js → p-1a7873c8.entry.js} +1 -1
- package/dist/bromcom-ui/p-1dab0ebb.entry.js +5 -0
- package/dist/bromcom-ui/p-27d06f30.entry.js +5 -0
- package/dist/bromcom-ui/{p-6f5cff36.entry.js → p-2806e672.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6fe3bfd9.entry.js → p-2b332236.entry.js} +1 -1
- package/dist/bromcom-ui/{p-515f3937.entry.js → p-2b346de3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-de9979a6.entry.js → p-2b479251.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c1253548.entry.js → p-2b7cb17c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a0352fdd.entry.js → p-2b91dab0.entry.js} +1 -1
- package/dist/bromcom-ui/p-2cca68b4.js +5 -0
- package/dist/bromcom-ui/p-2cfa8d1a.js +5 -0
- package/dist/bromcom-ui/{p-f4c06b78.entry.js → p-3455ec3e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20fc8571.entry.js → p-34b815f5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-81927f68.entry.js → p-355e259c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d36f9b12.entry.js → p-35bd1307.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9401599.entry.js → p-405441b2.entry.js} +1 -1
- package/dist/bromcom-ui/p-40aeceda.entry.js +5 -0
- package/dist/bromcom-ui/{p-0baf7808.entry.js → p-41f2ef93.entry.js} +1 -1
- package/dist/bromcom-ui/p-444235f5.js +5 -0
- package/dist/bromcom-ui/{p-128a5956.js → p-4be4c5bf.js} +1 -1
- package/dist/bromcom-ui/p-4c75beb3.entry.js +5 -0
- package/dist/bromcom-ui/{p-f69302a8.js → p-4e0c990d.js} +1 -1
- package/dist/bromcom-ui/{p-2135cb11.js → p-4f99361a.js} +1 -1
- package/dist/bromcom-ui/{p-f053ed80.entry.js → p-50c7a3cd.entry.js} +1 -1
- package/dist/bromcom-ui/p-522c96a2.js +5 -0
- package/dist/bromcom-ui/{p-e73e6d2b.entry.js → p-573647ab.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7fad995d.entry.js → p-591b3100.entry.js} +1 -1
- package/dist/bromcom-ui/{p-df0a2839.entry.js → p-60cee147.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7b9b694.entry.js → p-640244fa.entry.js} +1 -1
- package/dist/bromcom-ui/p-6ad01d01.entry.js +5 -0
- package/dist/bromcom-ui/{p-173ebc98.entry.js → p-6c7eb43f.entry.js} +1 -1
- package/dist/bromcom-ui/p-6caa9460.entry.js +5 -0
- package/dist/bromcom-ui/p-705d248e.entry.js +5 -0
- package/dist/bromcom-ui/{p-9ecacdbb.entry.js → p-751c94dd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c562e4c2.entry.js → p-75a92b4c.entry.js} +1 -1
- package/dist/bromcom-ui/p-75f864ae.entry.js +5 -0
- package/dist/bromcom-ui/{p-51f23b60.entry.js → p-78d48636.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
- package/dist/bromcom-ui/{p-1c525c05.entry.js → p-7f065a45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-603183c2.entry.js → p-8255f60a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-172edb20.entry.js → p-8595742c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4958dd94.js → p-8b72bce1.js} +1 -1
- package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
- package/dist/bromcom-ui/p-93010f03.js +5 -0
- package/dist/bromcom-ui/{p-ace65422.entry.js → p-9a78235b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b9f0114c.entry.js → p-9efe118a.entry.js} +1 -1
- package/dist/bromcom-ui/p-a1c849e7.js +5 -0
- package/dist/bromcom-ui/{p-a8d1397d.js → p-a3ffcb0d.js} +1 -1
- package/dist/bromcom-ui/p-a63ba9a2.entry.js +5 -0
- package/dist/bromcom-ui/{p-1bb1ffce.entry.js → p-a8073fed.entry.js} +1 -1
- package/dist/bromcom-ui/{p-99009fb3.entry.js → p-a98aecdf.entry.js} +1 -1
- package/dist/bromcom-ui/p-af93c8e6.entry.js +5 -0
- package/dist/bromcom-ui/p-b265dd24.entry.js +5 -0
- package/dist/bromcom-ui/{p-5fb75161.entry.js → p-b2bae44d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ca13fe84.entry.js → p-b2ea4774.entry.js} +1 -1
- package/dist/bromcom-ui/{p-23d5fe0b.entry.js → p-b3a57653.entry.js} +1 -1
- package/dist/bromcom-ui/{p-eb809fa4.entry.js → p-b47e5352.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dbc48ab6.entry.js → p-b4cbf3bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-236a8be4.entry.js → p-b9983e4b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-10dfe83e.js → p-bc868e9e.js} +1 -1
- package/dist/bromcom-ui/{p-12c97616.entry.js → p-bf30bf7f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cc9ba164.entry.js → p-c9a20860.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20e22beb.js → p-cd0490e2.js} +1 -1
- package/dist/bromcom-ui/{p-1115af65.entry.js → p-d87118f3.entry.js} +1 -1
- package/dist/bromcom-ui/p-d8f95e30.entry.js +5 -0
- package/dist/bromcom-ui/{p-0540bd97.entry.js → p-d9fb53c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a03334e.entry.js → p-db11376b.entry.js} +1 -1
- package/dist/bromcom-ui/p-dbb106a4.entry.js +5 -0
- package/dist/bromcom-ui/{p-ac7386a1.entry.js → p-e467d49f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bfb83484.entry.js → p-ea4f2618.entry.js} +1 -1
- package/dist/bromcom-ui/{p-56f22945.entry.js → p-ef923122.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cc270a88.entry.js → p-f1b1bb76.entry.js} +1 -1
- package/dist/bromcom-ui/p-f2caf9d3.entry.js +5 -0
- package/dist/bromcom-ui/{p-6cda636f.entry.js → p-f374395b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-be904c55.js → p-f9cb7ae4.js} +1 -1
- package/dist/bromcom-ui/{p-1b5695a9.entry.js → p-fa42b2de.entry.js} +1 -1
- package/dist/bromcom-ui/p-fcaba9dd.entry.js +5 -0
- package/dist/bromcom-ui/p-fe3e3210.js +5 -0
- package/dist/cjs/_commonjsHelpers-bd20f4c0.js +29 -0
- package/dist/cjs/bcm-2c51bf0c.js +448 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +85 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +112 -0
- package/dist/cjs/bcm-attendance.cjs.entry.js +50 -0
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +155 -0
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +156 -0
- package/dist/cjs/bcm-box.cjs.entry.js +35 -0
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +67 -0
- package/dist/cjs/bcm-button-group.cjs.entry.js +102 -0
- package/dist/cjs/bcm-button_4.cjs.entry.js +995 -0
- package/dist/cjs/bcm-card.cjs.entry.js +76 -0
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +409 -0
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2570 -0
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +203 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +70 -0
- package/dist/cjs/bcm-collapse-group.cjs.entry.js +57 -0
- package/dist/cjs/bcm-collapse.cjs.entry.js +58 -0
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +433 -0
- package/dist/cjs/bcm-date-picker.cjs.entry.js +171 -0
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1432 -0
- package/dist/cjs/bcm-default.cjs.entry.js +40 -0
- package/dist/cjs/bcm-drawer.cjs.entry.js +111 -0
- package/dist/cjs/bcm-dropdown.cjs.entry.js +239 -0
- package/dist/cjs/bcm-error-layout.cjs.entry.js +78 -0
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +127 -0
- package/dist/cjs/bcm-form-2.cjs.entry.js +206 -0
- package/dist/cjs/bcm-form-group.cjs.entry.js +45 -0
- package/dist/cjs/bcm-input.cjs.entry.js +325 -0
- package/dist/cjs/bcm-item.cjs.entry.js +83 -0
- package/dist/cjs/bcm-items.cjs.entry.js +61 -0
- package/dist/cjs/bcm-label_2.cjs.entry.js +119 -0
- package/dist/cjs/bcm-link.cjs.entry.js +62 -0
- package/dist/cjs/bcm-linked.cjs.entry.js +179 -0
- package/dist/cjs/bcm-list.cjs.entry.js +1768 -0
- package/dist/cjs/bcm-menu.cjs.entry.js +248 -0
- package/dist/cjs/bcm-message.cjs.entry.js +99 -0
- package/dist/cjs/bcm-notification.cjs.entry.js +103 -0
- package/dist/cjs/bcm-old-input.cjs.entry.js +398 -0
- package/dist/cjs/bcm-old-tag_2.cjs.entry.js +157 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +122 -0
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +112 -0
- package/dist/cjs/bcm-popover.cjs.entry.js +182 -0
- package/dist/cjs/bcm-progress.cjs.entry.js +174 -0
- package/dist/cjs/bcm-radio-group.cjs.entry.js +267 -0
- package/dist/cjs/bcm-radio.cjs.entry.js +104 -0
- package/dist/cjs/bcm-range.cjs.entry.js +189 -0
- package/dist/cjs/bcm-result.cjs.entry.js +79 -0
- package/dist/cjs/bcm-search.cjs.entry.js +256 -0
- package/dist/cjs/bcm-select-group.cjs.entry.js +31 -0
- package/dist/cjs/bcm-select-option.cjs.entry.js +37 -0
- package/dist/cjs/bcm-select.cjs.entry.js +1198 -0
- package/dist/cjs/bcm-skeleton.cjs.entry.js +56 -0
- package/dist/cjs/bcm-step.cjs.entry.js +93 -0
- package/dist/cjs/bcm-stepper.cjs.entry.js +211 -0
- package/dist/cjs/bcm-switch.cjs.entry.js +139 -0
- package/dist/cjs/bcm-tab-group.cjs.entry.js +172 -0
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +70 -0
- package/dist/cjs/bcm-tab.cjs.entry.js +89 -0
- package/dist/cjs/bcm-table.cjs.entry.js +78 -0
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +62 -0
- package/dist/cjs/bcm-tabs.cjs.entry.js +390 -0
- package/dist/cjs/bcm-tag.cjs.entry.js +101 -0
- package/dist/cjs/bcm-text.cjs.entry.js +60 -0
- package/dist/cjs/bcm-textarea.cjs.entry.js +150 -0
- package/dist/cjs/bcm-time-picker.cjs.entry.js +139 -0
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +55 -0
- package/dist/cjs/bcm-timeline.cjs.entry.js +73 -0
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +23 -0
- package/dist/cjs/bromcom-ui.cjs.js +24 -0
- package/dist/cjs/caption-template-954d34bc.js +34 -0
- package/dist/cjs/color-helper-c9882bd8.js +490 -0
- package/dist/cjs/colors-56282b00.js +224 -0
- package/dist/cjs/datetime-helper-eaf4fadb.js +11 -0
- package/dist/cjs/element-dragger-a8562f82.js +279 -0
- package/dist/cjs/floating-ui-dae608ba.js +1455 -0
- package/dist/cjs/generate-716a328d.js +203 -0
- package/dist/cjs/global-b0d21446.js +15 -0
- package/dist/cjs/index-9d98aa56.js +1864 -0
- package/dist/cjs/index-a2b50e51.js +64 -0
- package/dist/cjs/index-f8547ecd.js +193 -0
- package/dist/cjs/index.cjs.js +6 -0
- package/dist/cjs/input-template-4747050f.js +86 -0
- package/dist/cjs/is-load-decorator-65755a67.js +56 -0
- package/dist/cjs/json-parse-decarator-b8a37140.js +40 -0
- package/dist/cjs/label-template-1ed6a569.js +23 -0
- package/dist/cjs/loader.cjs.js +26 -0
- package/dist/cjs/number-helper-e62c32d5.js +20 -0
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +161 -0
- package/dist/cjs/old-bcm-popover.cjs.entry.js +104 -0
- package/dist/cjs/popover-placement-87901bb3.js +98 -0
- package/dist/cjs/property-decorators-cb2155ed.js +33 -0
- package/dist/cjs/slot-template-2ff0d22a.js +15 -0
- package/dist/cjs/stepper-states-1be09180.js +83 -0
- package/dist/cjs/string-helper-df40a475.js +134 -0
- package/dist/cjs/tooltip-helper-a192b748.js +104 -0
- package/dist/cjs/types-3871235f.js +32 -0
- package/dist/cjs/types-6eb7e028.js +32 -0
- package/dist/cjs/types-cc4adee7.js +19 -0
- package/dist/cjs/utils-fc077139.js +131 -0
- package/dist/cjs/validators-8f5537d4.js +33 -0
- package/dist/collection/collection-manifest.json +95 -0
- package/dist/collection/components/atoms/avatar/avatar.css +448 -0
- package/dist/collection/components/atoms/avatar/avatar.js +259 -0
- package/dist/collection/components/atoms/badge/badge.css +481 -0
- package/dist/collection/components/atoms/badge/badge.js +224 -0
- package/dist/collection/components/atoms/box/box.js +23 -0
- package/dist/collection/components/atoms/button/button.css +637 -0
- package/dist/collection/components/atoms/button/button.js +525 -0
- package/dist/collection/components/atoms/button/types.js +170 -0
- package/dist/collection/components/atoms/chip/chip.css +453 -0
- package/dist/collection/components/atoms/chip/chip.js +187 -0
- package/dist/collection/components/atoms/divider/divider.css +142 -0
- package/dist/collection/components/atoms/divider/divider.js +83 -0
- package/dist/collection/components/atoms/icon/icon.css +127 -0
- package/dist/collection/components/atoms/icon/icon.js +70 -0
- package/dist/collection/components/atoms/label/label.css +408 -0
- package/dist/collection/components/atoms/label/label.js +216 -0
- package/dist/collection/components/atoms/link/link.css +419 -0
- package/dist/collection/components/atoms/link/link.js +176 -0
- package/dist/collection/components/atoms/states/button.states.js +31 -0
- package/dist/collection/components/atoms/tag/tag.js +334 -0
- package/dist/collection/components/atoms/tag/types.js +30 -0
- package/dist/collection/components/atoms/typography/typography.js +23 -0
- package/dist/collection/components/molecules/accordion/accordion.css +127 -0
- package/dist/collection/components/molecules/accordion/accordion.js +129 -0
- package/dist/collection/components/molecules/alert/alert.css +191 -0
- package/dist/collection/components/molecules/alert/alert.js +298 -0
- package/dist/collection/components/molecules/alert/types.js +23 -0
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +201 -0
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +155 -0
- package/dist/collection/components/molecules/breadcrumb/types.js +5 -0
- package/dist/collection/components/molecules/button-group/button-group.css +423 -0
- package/dist/collection/components/molecules/button-group/button-group.js +235 -0
- package/dist/collection/components/molecules/card/card.css +408 -0
- package/dist/collection/components/molecules/card/card.js +128 -0
- package/dist/collection/components/molecules/checkbox/checkbox-lite.js +237 -0
- package/dist/collection/components/molecules/checkbox/checkbox.css +1280 -0
- package/dist/collection/components/molecules/checkbox/checkbox.js +688 -0
- package/dist/collection/components/molecules/checkbox/group.css +156 -0
- package/dist/collection/components/molecules/checkbox/group.js +779 -0
- package/dist/collection/components/molecules/drawer/drawer.css +502 -0
- package/dist/collection/components/molecules/drawer/drawer.js +272 -0
- package/dist/collection/components/molecules/dropdown/dropdown.css +419 -0
- package/dist/collection/components/molecules/dropdown/dropdown.js +857 -0
- package/dist/collection/components/molecules/empty/empty.js +44 -0
- package/dist/collection/components/molecules/error-layout/error-layout.css +396 -0
- package/dist/collection/components/molecules/error-layout/error-layout.js +177 -0
- package/dist/collection/components/molecules/error-layout/types.js +5 -0
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +488 -0
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +322 -0
- package/dist/collection/components/molecules/input/input.css +1208 -0
- package/dist/collection/components/molecules/input/input.js +1171 -0
- package/dist/collection/components/molecules/input/types.js +17 -0
- package/dist/collection/components/molecules/item/item.css +446 -0
- package/dist/collection/components/molecules/item/item.js +151 -0
- package/dist/collection/components/molecules/items/items.js +84 -0
- package/dist/collection/components/molecules/linked/linked.js +410 -0
- package/dist/collection/components/molecules/menu/menu.css +718 -0
- package/dist/collection/components/molecules/menu/menu.js +623 -0
- package/dist/collection/components/molecules/message/message.css +165 -0
- package/dist/collection/components/molecules/message/message.js +222 -0
- package/dist/collection/components/molecules/message/types.js +14 -0
- package/dist/collection/components/molecules/modal/modal.css +526 -0
- package/dist/collection/components/molecules/modal/modal.js +379 -0
- package/dist/collection/components/molecules/notification/notification.css +183 -0
- package/dist/collection/components/molecules/notification/notification.js +244 -0
- package/dist/collection/components/molecules/notification/types.js +15 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +563 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +396 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm.css +127 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm.js +382 -0
- package/dist/collection/components/molecules/popover/popover.js +254 -0
- package/dist/collection/components/molecules/progress/progress.css +486 -0
- package/dist/collection/components/molecules/progress/progress.js +404 -0
- package/dist/collection/components/molecules/progress/types.js +28 -0
- package/dist/collection/components/molecules/radio/group.css +798 -0
- package/dist/collection/components/molecules/radio/group.js +652 -0
- package/dist/collection/components/molecules/radio/radio.css +1280 -0
- package/dist/collection/components/molecules/radio/radio.js +291 -0
- package/dist/collection/components/molecules/radio/types.js +30 -0
- package/dist/collection/components/molecules/range/range.css +570 -0
- package/dist/collection/components/molecules/range/range.js +472 -0
- package/dist/collection/components/molecules/result/result.css +164 -0
- package/dist/collection/components/molecules/result/result.js +143 -0
- package/dist/collection/components/molecules/result/types.js +22 -0
- package/dist/collection/components/molecules/search/search.css +1208 -0
- package/dist/collection/components/molecules/search/search.js +406 -0
- package/dist/collection/components/molecules/skeleton/skeleton.js +94 -0
- package/dist/collection/components/molecules/states/alert.states.js +25 -0
- package/dist/collection/components/molecules/states/checkbox-group.states.js +199 -0
- package/dist/collection/components/molecules/states/radio-group.states.js +107 -0
- package/dist/collection/components/molecules/states/search.states.js +137 -0
- package/dist/collection/components/molecules/states/stepper-states.js +79 -0
- package/dist/collection/components/molecules/stepper/step.js +346 -0
- package/dist/collection/components/molecules/stepper/stepper.css +617 -0
- package/dist/collection/components/molecules/stepper/stepper.js +484 -0
- package/dist/collection/components/molecules/switch/switch.css +1272 -0
- package/dist/collection/components/molecules/switch/switch.js +716 -0
- package/dist/collection/components/molecules/tab-group/tab-group.js +280 -0
- package/dist/collection/components/molecules/textarea/textarea.css +1208 -0
- package/dist/collection/components/molecules/textarea/textarea.js +731 -0
- package/dist/collection/components/molecules/textarea/types.js +13 -0
- package/dist/collection/components/molecules/timeline/timeline-item.css +254 -0
- package/dist/collection/components/molecules/timeline/timeline-item.js +159 -0
- package/dist/collection/components/molecules/timeline/timeline.css +205 -0
- package/dist/collection/components/molecules/timeline/timeline.js +125 -0
- package/dist/collection/components/molecules/tooltip/tooltip.js +232 -0
- package/dist/collection/components/organism/autocomplete/autocomplete.css +168 -0
- package/dist/collection/components/organism/autocomplete/autocomplete.js +399 -0
- package/dist/collection/components/organism/colorpicker/colorpicker.css +313 -0
- package/dist/collection/components/organism/colorpicker/colorpicker.js +774 -0
- package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
- package/dist/collection/components/organism/colorpicker/static/color.svg +14 -0
- package/dist/collection/components/organism/colorpicker/static/colors.svg +16 -0
- package/dist/collection/components/organism/date-picker/date-picker.css +141 -0
- package/dist/collection/components/organism/date-picker/date-picker.js +780 -0
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +1429 -0
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +2166 -0
- package/dist/collection/components/organism/datetime-picker/types.js +39 -0
- package/dist/collection/components/organism/form/form-group.css +131 -0
- package/dist/collection/components/organism/form/form-group.js +131 -0
- package/dist/collection/components/organism/form/form.css +132 -0
- package/dist/collection/components/organism/form/form.js +680 -0
- package/dist/collection/components/organism/form-2/bcm-form-components.js +26 -0
- package/dist/collection/components/organism/form-2/form-2.css +127 -0
- package/dist/collection/components/organism/form-2/form-2.js +329 -0
- package/dist/collection/components/organism/list/list-key-control.js +125 -0
- package/dist/collection/components/organism/list/list-tag-control.js +172 -0
- package/dist/collection/components/organism/list/list.css +2047 -0
- package/dist/collection/components/organism/list/list.js +1894 -0
- package/dist/collection/components/organism/states/bcm-list2.states.js +532 -0
- package/dist/collection/components/organism/time-picker/time-picker.css +141 -0
- package/dist/collection/components/organism/time-picker/time-picker.js +627 -0
- package/dist/collection/components/other/attendance/attendance.css +433 -0
- package/dist/collection/components/other/attendance/attendance.js +87 -0
- package/dist/collection/components/other/data-table/table.css +130 -0
- package/dist/collection/components/other/data-table/table.js +92 -0
- package/dist/collection/components/other/default/default.css +127 -0
- package/dist/collection/components/other/default/default.js +54 -0
- package/dist/collection/components/other_deprecated/collapse/collapse.css +177 -0
- package/dist/collection/components/other_deprecated/collapse/collapse.js +163 -0
- package/dist/collection/components/other_deprecated/collapse/group.js +128 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-group.css +139 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-group.js +93 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-item.css +269 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-item.js +641 -0
- package/dist/collection/components/other_deprecated/listbox/listbox.css +365 -0
- package/dist/collection/components/other_deprecated/listbox/listbox.js +1999 -0
- package/dist/collection/components/other_deprecated/listbox/types.js +11 -0
- package/dist/collection/components/other_deprecated/old-input/old-input.css +1360 -0
- package/dist/collection/components/other_deprecated/old-input/old-input.js +1154 -0
- package/dist/collection/components/other_deprecated/old-input/types.js +17 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +582 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +422 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover.css +127 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover.js +296 -0
- package/dist/collection/components/other_deprecated/old-search/old-search.css +131 -0
- package/dist/collection/components/other_deprecated/old-search/old-search.js +496 -0
- package/dist/collection/components/other_deprecated/old-tag/old-tag.css +305 -0
- package/dist/collection/components/other_deprecated/old-tag/old-tag.js +326 -0
- package/dist/collection/components/other_deprecated/old-tag/types.js +30 -0
- package/dist/collection/components/other_deprecated/select/group.css +144 -0
- package/dist/collection/components/other_deprecated/select/group.js +88 -0
- package/dist/collection/components/other_deprecated/select/option.css +164 -0
- package/dist/collection/components/other_deprecated/select/option.js +142 -0
- package/dist/collection/components/other_deprecated/select/select-box.css +143 -0
- package/dist/collection/components/other_deprecated/select/select-box.js +104 -0
- package/dist/collection/components/other_deprecated/select/select.css +364 -0
- package/dist/collection/components/other_deprecated/select/select.js +2281 -0
- package/dist/collection/components/other_deprecated/tabs/tab-pane.css +142 -0
- package/dist/collection/components/other_deprecated/tabs/tab-pane.js +168 -0
- package/dist/collection/components/other_deprecated/tabs/tab.css +587 -0
- package/dist/collection/components/other_deprecated/tabs/tab.js +303 -0
- package/dist/collection/components/other_deprecated/tabs/tabs-content.css +136 -0
- package/dist/collection/components/other_deprecated/tabs/tabs-content.js +147 -0
- package/dist/collection/components/other_deprecated/tabs/tabs.css +212 -0
- package/dist/collection/components/other_deprecated/tabs/tabs.js +806 -0
- package/dist/collection/components/other_deprecated/tabs/types.js +30 -0
- package/dist/collection/components/other_deprecated/text/text.css +429 -0
- package/dist/collection/components/other_deprecated/text/text.js +159 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-group.css +0 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-group.js +18 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-item.css +318 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-item.js +977 -0
- package/dist/collection/components/other_deprecated/treeview/treeview.css +190 -0
- package/dist/collection/components/other_deprecated/treeview/treeview.js +1699 -0
- package/dist/collection/components/other_deprecated/treeview/types.js +11 -0
- package/dist/collection/decorators/id-decorator.js +18 -0
- package/dist/collection/decorators/index.js +8 -0
- package/dist/collection/decorators/is-load-decorator.js +51 -0
- package/dist/collection/decorators/json-parse-decarator.js +35 -0
- package/dist/collection/decorators/property-decorators.js +28 -0
- package/dist/collection/global/components/_checkbox.css +627 -0
- package/dist/collection/global/config.js +45 -0
- package/dist/collection/global/global.js +43 -0
- package/dist/collection/global/variables/colors.js +220 -0
- package/dist/collection/helper/color-helper.js +81 -0
- package/dist/collection/helper/datetime-helper.js +7 -0
- package/dist/collection/helper/generate.js +168 -0
- package/dist/collection/helper/index.js +12 -0
- package/dist/collection/helper/number-helper.js +15 -0
- package/dist/collection/helper/popover-helper.js +106 -0
- package/dist/collection/helper/string-helper.js +65 -0
- package/dist/collection/helper/tooltip-helper.js +95 -0
- package/dist/collection/helper/validators.js +28 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/models/abstract-classes/abstract-key-control.js +97 -0
- package/dist/collection/models/bcm-types.js +5 -0
- package/dist/collection/models/bcm.js +466 -0
- package/dist/collection/models/index.js +6 -0
- package/dist/collection/models/states/atoms/bcm-atoms-state.js +5 -0
- package/dist/collection/models/states/molecules/bcm-molecules-state.js +5 -0
- package/dist/collection/models/states/organisms/bcm-organisms-state.js +5 -0
- package/dist/collection/templates/button-template.js +22 -0
- package/dist/collection/templates/caption-template.js +29 -0
- package/dist/collection/templates/checkbox-group-template.js +10 -0
- package/dist/collection/templates/checkbox-template.js +31 -0
- package/dist/collection/templates/icon-template.js +24 -0
- package/dist/collection/templates/index.js +17 -0
- package/dist/collection/templates/info-footer-template.js +16 -0
- package/dist/collection/templates/input-template.js +81 -0
- package/dist/collection/templates/label-template.js +18 -0
- package/dist/collection/templates/list-item-template.js +58 -0
- package/dist/collection/templates/list-template.js +24 -0
- package/dist/collection/templates/slot-template.js +10 -0
- package/dist/collection/templates/step-template.js +26 -0
- package/dist/collection/templates/tag-template.js +45 -0
- package/dist/collection/types/index.js +5 -0
- package/dist/collection/utils/element-dragger.js +274 -0
- package/dist/collection/utils/floating-ui.js +95 -0
- package/dist/collection/utils/index.js +9 -0
- package/dist/collection/utils/popover-placement.js +96 -0
- package/dist/collection/utils/utils.js +223 -0
- package/dist/collection/utils/validation.js +47 -0
- package/dist/esm/_commonjsHelpers-3016b722.js +25 -0
- package/dist/esm/bcm-accordion.entry.js +81 -0
- package/dist/esm/bcm-alert.entry.js +108 -0
- package/dist/esm/bcm-attendance.entry.js +46 -0
- package/dist/esm/bcm-autocomplete.entry.js +151 -0
- package/dist/esm/bcm-avatar_2.entry.js +151 -0
- package/dist/esm/bcm-b8d8a236.js +446 -0
- package/dist/esm/bcm-box.entry.js +31 -0
- package/dist/esm/bcm-breadcrumb.entry.js +63 -0
- package/dist/esm/bcm-button-group.entry.js +98 -0
- package/dist/esm/bcm-button_4.entry.js +988 -0
- package/dist/esm/bcm-card.entry.js +72 -0
- package/dist/esm/bcm-checkbox-group.entry.js +405 -0
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2558 -0
- package/dist/esm/bcm-checkbox_2.entry.js +198 -0
- package/dist/esm/bcm-chip.entry.js +66 -0
- package/dist/esm/bcm-collapse-group.entry.js +53 -0
- package/dist/esm/bcm-collapse.entry.js +54 -0
- package/dist/esm/bcm-colorpicker.entry.js +429 -0
- package/dist/esm/bcm-date-picker.entry.js +167 -0
- package/dist/esm/bcm-datetime-picker.entry.js +1428 -0
- package/dist/esm/bcm-default.entry.js +36 -0
- package/dist/esm/bcm-drawer.entry.js +107 -0
- package/dist/esm/bcm-dropdown.entry.js +235 -0
- package/dist/esm/bcm-error-layout.entry.js +74 -0
- package/dist/esm/bcm-expansion-panel.entry.js +123 -0
- package/dist/esm/bcm-form-2.entry.js +202 -0
- package/dist/esm/bcm-form-group.entry.js +41 -0
- package/dist/esm/bcm-input.entry.js +321 -0
- package/dist/esm/bcm-item.entry.js +79 -0
- package/dist/esm/bcm-items.entry.js +57 -0
- package/dist/esm/bcm-label_2.entry.js +114 -0
- package/dist/esm/bcm-link.entry.js +58 -0
- package/dist/esm/bcm-linked.entry.js +175 -0
- package/dist/esm/bcm-list.entry.js +1764 -0
- package/dist/esm/bcm-menu.entry.js +244 -0
- package/dist/esm/bcm-message.entry.js +95 -0
- package/dist/esm/bcm-notification.entry.js +99 -0
- package/dist/esm/bcm-old-input.entry.js +394 -0
- package/dist/esm/bcm-old-tag_2.entry.js +152 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +118 -0
- package/dist/esm/bcm-popconfirm.entry.js +108 -0
- package/dist/esm/bcm-popover.entry.js +178 -0
- package/dist/esm/bcm-progress.entry.js +170 -0
- package/dist/esm/bcm-radio-group.entry.js +263 -0
- package/dist/esm/bcm-radio.entry.js +100 -0
- package/dist/esm/bcm-range.entry.js +185 -0
- package/dist/esm/bcm-result.entry.js +75 -0
- package/dist/esm/bcm-search.entry.js +252 -0
- package/dist/esm/bcm-select-group.entry.js +27 -0
- package/dist/esm/bcm-select-option.entry.js +33 -0
- package/dist/esm/bcm-select.entry.js +1194 -0
- package/dist/esm/bcm-skeleton.entry.js +52 -0
- package/dist/esm/bcm-step.entry.js +89 -0
- package/dist/esm/bcm-stepper.entry.js +207 -0
- package/dist/esm/bcm-switch.entry.js +135 -0
- package/dist/esm/bcm-tab-group.entry.js +168 -0
- package/dist/esm/bcm-tab-pane.entry.js +66 -0
- package/dist/esm/bcm-tab.entry.js +85 -0
- package/dist/esm/bcm-table.entry.js +74 -0
- package/dist/esm/bcm-tabs-content.entry.js +58 -0
- package/dist/esm/bcm-tabs.entry.js +386 -0
- package/dist/esm/bcm-tag.entry.js +97 -0
- package/dist/esm/bcm-text.entry.js +56 -0
- package/dist/esm/bcm-textarea.entry.js +146 -0
- package/dist/esm/bcm-time-picker.entry.js +135 -0
- package/dist/esm/bcm-timeline-item.entry.js +51 -0
- package/dist/esm/bcm-timeline.entry.js +69 -0
- package/dist/esm/bcm-treeview-group.entry.js +19 -0
- package/dist/esm/bromcom-ui.js +22 -0
- package/dist/esm/caption-template-d54ee0c3.js +32 -0
- package/dist/esm/color-helper-7e202fd8.js +488 -0
- package/dist/esm/colors-1d7854ea.js +222 -0
- package/dist/esm/datetime-helper-df25808a.js +9 -0
- package/dist/esm/element-dragger-89bb52fd.js +277 -0
- package/dist/esm/floating-ui-f03a96ce.js +1453 -0
- package/dist/esm/generate-4e9309bd.js +200 -0
- package/dist/esm/global-4fad925b.js +13 -0
- package/dist/esm/index-2a3eeccc.js +1833 -0
- package/dist/esm/index-6e950253.js +191 -0
- package/dist/esm/index-ba2edd32.js +62 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/input-template-6a8e4cc6.js +84 -0
- package/dist/esm/is-load-decorator-b990575a.js +54 -0
- package/dist/esm/json-parse-decarator-87ac1cd9.js +38 -0
- package/dist/esm/label-template-e3eebfbc.js +21 -0
- package/dist/esm/loader.js +22 -0
- package/dist/esm/number-helper-f34393b1.js +18 -0
- package/dist/esm/old-bcm-popover-box.entry.js +157 -0
- package/dist/esm/old-bcm-popover.entry.js +100 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/popover-placement-9864294b.js +95 -0
- package/dist/esm/property-decorators-f3f1e7de.js +31 -0
- package/dist/esm/slot-template-877c4e01.js +13 -0
- package/dist/esm/stepper-states-12a190b4.js +81 -0
- package/dist/esm/string-helper-74a1648f.js +132 -0
- package/dist/esm/tooltip-helper-ae137bee.js +102 -0
- package/dist/esm/types-6f06fa1a.js +19 -0
- package/dist/esm/types-b211a5eb.js +32 -0
- package/dist/esm/types-bfc3bba1.js +32 -0
- package/dist/esm/utils-57652744.js +123 -0
- package/dist/esm/validators-0e0c76db.js +31 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/atoms/avatar/avatar.d.ts +23 -0
- package/dist/types/components/atoms/badge/badge.d.ts +17 -0
- package/dist/types/components/atoms/box/box.d.ts +5 -0
- package/dist/types/components/atoms/button/button.d.ts +33 -0
- package/dist/types/components/atoms/button/types.d.ts +166 -0
- package/dist/types/components/atoms/chip/chip.d.ts +24 -0
- package/dist/types/components/atoms/divider/divider.d.ts +7 -0
- package/dist/types/components/atoms/icon/icon.d.ts +6 -0
- package/dist/types/components/atoms/label/label.d.ts +16 -0
- package/dist/types/components/atoms/link/link.d.ts +13 -0
- package/dist/types/components/atoms/states/button.states.d.ts +7 -0
- package/dist/types/components/atoms/tag/tag.d.ts +24 -0
- package/dist/types/components/atoms/tag/types.d.ts +29 -0
- package/dist/types/components/atoms/typography/typography.d.ts +5 -0
- package/dist/types/components/molecules/accordion/accordion.d.ts +11 -0
- package/dist/types/components/molecules/alert/alert.d.ts +21 -0
- package/dist/types/components/molecules/alert/types.d.ts +25 -0
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +14 -0
- package/dist/types/components/molecules/breadcrumb/types.d.ts +10 -0
- package/dist/types/components/molecules/button-group/button-group.d.ts +21 -0
- package/dist/types/components/molecules/card/card.d.ts +11 -0
- package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +14 -0
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +56 -0
- package/dist/types/components/molecules/checkbox/group.d.ts +56 -0
- package/dist/types/components/molecules/drawer/drawer.d.ts +21 -0
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +55 -0
- package/dist/types/components/molecules/empty/empty.d.ts +5 -0
- package/dist/types/components/molecules/error-layout/error-layout.d.ts +25 -0
- package/dist/types/components/molecules/error-layout/types.d.ts +4 -0
- package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +31 -0
- package/dist/types/components/molecules/input/input.d.ts +82 -0
- package/dist/types/components/molecules/input/types.d.ts +13 -0
- package/dist/types/components/molecules/item/item.d.ts +13 -0
- package/dist/types/components/molecules/items/items.d.ts +10 -0
- package/dist/types/components/molecules/linked/linked.d.ts +30 -0
- package/dist/types/components/molecules/menu/menu.d.ts +41 -0
- package/dist/types/components/molecules/message/message.d.ts +32 -0
- package/dist/types/components/molecules/message/types.d.ts +13 -0
- package/dist/types/components/molecules/modal/modal.d.ts +26 -0
- package/dist/types/components/molecules/notification/notification.d.ts +42 -0
- package/dist/types/components/molecules/notification/types.d.ts +14 -0
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +29 -0
- package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +28 -0
- package/dist/types/components/molecules/popover/popover.d.ts +20 -0
- package/dist/types/components/molecules/progress/progress.d.ts +25 -0
- package/dist/types/components/molecules/progress/types.d.ts +14 -0
- package/dist/types/components/molecules/radio/group.d.ts +54 -0
- package/dist/types/components/molecules/radio/radio.d.ts +21 -0
- package/dist/types/components/molecules/radio/types.d.ts +29 -0
- package/dist/types/components/molecules/range/range.d.ts +36 -0
- package/dist/types/components/molecules/result/result.d.ts +13 -0
- package/dist/types/components/molecules/result/types.d.ts +19 -0
- package/dist/types/components/molecules/search/search.d.ts +35 -0
- package/dist/types/components/molecules/skeleton/skeleton.d.ts +8 -0
- package/dist/types/components/molecules/states/alert.states.d.ts +7 -0
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +53 -0
- package/dist/types/components/molecules/states/radio-group.states.d.ts +48 -0
- package/dist/types/components/molecules/states/search.states.d.ts +14 -0
- package/dist/types/components/molecules/states/stepper-states.d.ts +13 -0
- package/dist/types/components/molecules/stepper/step.d.ts +25 -0
- package/dist/types/components/molecules/stepper/stepper.d.ts +34 -0
- package/dist/types/components/molecules/switch/switch.d.ts +46 -0
- package/dist/types/components/molecules/tab-group/tab-group.d.ts +18 -0
- package/dist/types/components/molecules/textarea/textarea.d.ts +53 -0
- package/dist/types/components/molecules/textarea/types.d.ts +9 -0
- package/dist/types/components/molecules/timeline/timeline-item.d.ts +16 -0
- package/dist/types/components/molecules/timeline/timeline.d.ts +25 -0
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +19 -0
- package/dist/types/components/organism/autocomplete/autocomplete.d.ts +31 -0
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +176 -0
- package/dist/types/components/organism/date-picker/date-picker.d.ts +77 -0
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +438 -0
- package/dist/types/components/organism/datetime-picker/types.d.ts +54 -0
- package/dist/types/components/organism/form/form-group.d.ts +10 -0
- package/dist/types/components/organism/form/form.d.ts +34 -0
- package/dist/types/components/organism/form-2/bcm-form-components.d.ts +2 -0
- package/dist/types/components/organism/form-2/form-2.d.ts +25 -0
- package/dist/types/components/organism/list/list-key-control.d.ts +18 -0
- package/dist/types/components/organism/list/list-tag-control.d.ts +18 -0
- package/dist/types/components/organism/list/list.d.ts +140 -0
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +28 -0
- package/dist/types/components/organism/time-picker/time-picker.d.ts +69 -0
- package/dist/types/components/other/attendance/attendance.d.ts +7 -0
- package/dist/types/components/other/data-table/table.d.ts +8 -0
- package/dist/types/components/other/default/default.d.ts +6 -0
- package/dist/types/components/other_deprecated/collapse/collapse.d.ts +12 -0
- package/dist/types/components/other_deprecated/collapse/group.d.ts +15 -0
- package/dist/types/components/other_deprecated/listbox/listbox-group.d.ts +7 -0
- package/dist/types/components/other_deprecated/listbox/listbox-item.d.ts +58 -0
- package/dist/types/components/other_deprecated/listbox/listbox.d.ts +152 -0
- package/dist/types/components/other_deprecated/listbox/types.d.ts +11 -0
- package/dist/types/components/other_deprecated/old-input/old-input.d.ts +80 -0
- package/dist/types/components/other_deprecated/old-input/types.d.ts +13 -0
- package/dist/types/components/other_deprecated/old-popover/old-popover-box.d.ts +26 -0
- package/dist/types/components/other_deprecated/old-popover/old-popover.d.ts +22 -0
- package/dist/types/components/other_deprecated/old-search/old-search.d.ts +32 -0
- package/dist/types/components/other_deprecated/old-tag/old-tag.d.ts +27 -0
- package/dist/types/components/other_deprecated/old-tag/types.d.ts +29 -0
- package/dist/types/components/other_deprecated/select/group.d.ts +6 -0
- package/dist/types/components/other_deprecated/select/option.d.ts +10 -0
- package/dist/types/components/other_deprecated/select/select-box.d.ts +15 -0
- package/dist/types/components/other_deprecated/select/select.d.ts +133 -0
- package/dist/types/components/other_deprecated/tabs/tab-pane.d.ts +19 -0
- package/dist/types/components/other_deprecated/tabs/tab.d.ts +36 -0
- package/dist/types/components/other_deprecated/tabs/tabs-content.d.ts +18 -0
- package/dist/types/components/other_deprecated/tabs/tabs.d.ts +112 -0
- package/dist/types/components/other_deprecated/tabs/types.d.ts +39 -0
- package/dist/types/components/other_deprecated/text/text.d.ts +11 -0
- package/dist/types/components/other_deprecated/treeview/treeview-group.d.ts +3 -0
- package/dist/types/components/other_deprecated/treeview/treeview-item.d.ts +119 -0
- package/dist/types/components/other_deprecated/treeview/treeview.d.ts +181 -0
- package/dist/types/components/other_deprecated/treeview/types.d.ts +11 -0
- package/dist/types/components.d.ts +3532 -0
- package/dist/types/decorators/id-decorator.d.ts +4 -0
- package/dist/types/decorators/index.d.ts +4 -0
- package/dist/types/decorators/is-load-decorator.d.ts +7 -0
- package/dist/types/decorators/json-parse-decarator.d.ts +4 -0
- package/dist/types/decorators/property-decorators.d.ts +4 -0
- package/dist/types/global/variables/colors.d.ts +217 -0
- package/dist/types/helper/color-helper.d.ts +16 -0
- package/dist/types/helper/datetime-helper.d.ts +3 -0
- package/dist/types/helper/generate.d.ts +22 -0
- package/dist/types/helper/index.d.ts +8 -0
- package/dist/types/helper/number-helper.d.ts +10 -0
- package/dist/types/helper/popover-helper.d.ts +31 -0
- package/dist/types/helper/string-helper.d.ts +27 -0
- package/dist/types/helper/tooltip-helper.d.ts +25 -0
- package/dist/types/helper/validators.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/abstract-classes/abstract-key-control.d.ts +31 -0
- package/dist/types/models/bcm-types.d.ts +21 -0
- package/dist/types/models/bcm.d.ts +456 -0
- package/dist/types/models/index.d.ts +2 -0
- package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +34 -0
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +90 -0
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +78 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/templates/button-template.d.ts +18 -0
- package/dist/types/templates/caption-template.d.ts +14 -0
- package/dist/types/templates/checkbox-group-template.d.ts +10 -0
- package/dist/types/templates/checkbox-template.d.ts +13 -0
- package/dist/types/templates/icon-template.d.ts +7 -0
- package/dist/types/templates/index.d.ts +13 -0
- package/dist/types/templates/info-footer-template.d.ts +10 -0
- package/dist/types/templates/input-template.d.ts +34 -0
- package/dist/types/templates/label-template.d.ts +12 -0
- package/dist/types/templates/list-item-template.d.ts +13 -0
- package/dist/types/templates/list-template.d.ts +29 -0
- package/dist/types/templates/slot-template.d.ts +8 -0
- package/dist/types/templates/step-template.d.ts +17 -0
- package/dist/types/templates/tag-template.d.ts +21 -0
- package/dist/types/types/index.d.ts +12 -0
- package/dist/types/utils/element-dragger.d.ts +146 -0
- package/dist/types/utils/floating-ui.d.ts +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/popover-placement.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +55 -0
- package/dist/types/utils/validation.d.ts +19 -0
- package/package.json +3 -3
- package/dist/bromcom-ui/p-0846712b.js +0 -5
- package/dist/bromcom-ui/p-0f4e34e9.js +0 -5
- package/dist/bromcom-ui/p-1b60d9d1.entry.js +0 -5
- package/dist/bromcom-ui/p-3c8d24f0.entry.js +0 -5
- package/dist/bromcom-ui/p-4ee3fbcf.entry.js +0 -5
- package/dist/bromcom-ui/p-517bca05.entry.js +0 -5
- package/dist/bromcom-ui/p-73cacbce.entry.js +0 -5
- package/dist/bromcom-ui/p-7a34d5a4.entry.js +0 -5
- package/dist/bromcom-ui/p-7de55a4c.entry.js +0 -5
- package/dist/bromcom-ui/p-8c4b256e.js +0 -5
- package/dist/bromcom-ui/p-8f394771.js +0 -5
- package/dist/bromcom-ui/p-b66edda8.js +0 -5
- package/dist/bromcom-ui/p-b970549a.entry.js +0 -5
- package/dist/bromcom-ui/p-bb698305.js +0 -5
- package/dist/bromcom-ui/p-d3d143b3.entry.js +0 -5
- package/dist/bromcom-ui/p-d9913ea9.js +0 -5
- package/dist/bromcom-ui/p-dbde0dc8.entry.js +0 -5
- package/dist/bromcom-ui/p-e8159c40.entry.js +0 -5
- package/dist/bromcom-ui/p-f7589887.entry.js +0 -5
- package/dist/bromcom-ui/p-f932d88a.entry.js +0 -5
|
@@ -0,0 +1,2166 @@
|
|
|
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);
|