bromcom-ui 2.11.1-rc.8 → 2.11.1-rc.9-1
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-c7e8dcf7.js → p-0d0e3903.js} +1 -1
- package/dist/bromcom-ui/{p-fb529ec0.entry.js → p-1345d51b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e037ee2b.js → p-170cf07d.js} +1 -1
- package/dist/bromcom-ui/{p-4d7ea23c.entry.js → p-1b558b0f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5b76a893.entry.js → p-1d81a0a4.entry.js} +1 -1
- package/dist/bromcom-ui/p-228c74e9.entry.js +5 -0
- package/dist/bromcom-ui/{p-18bc4e04.entry.js → p-270e1b24.entry.js} +1 -1
- package/dist/bromcom-ui/p-2bdf78f5.entry.js +5 -0
- package/dist/bromcom-ui/{p-0999d548.js → p-2c4435e2.js} +1 -1
- package/dist/bromcom-ui/{p-1cac8ccc.js → p-2cd6cdee.js} +1 -1
- package/dist/bromcom-ui/{p-63138ee5.entry.js → p-32c55505.entry.js} +1 -1
- package/dist/bromcom-ui/p-376a20ed.js +5 -0
- package/dist/bromcom-ui/{p-78bdc41e.entry.js → p-3a290e0d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4438d629.entry.js → p-4393b33e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cb190cbb.js → p-46cc4f0c.js} +1 -1
- package/dist/bromcom-ui/p-4cc25225.entry.js +20 -0
- package/dist/bromcom-ui/{p-16e8e9ba.js → p-4d55ba21.js} +1 -1
- package/dist/bromcom-ui/{p-5e4f84aa.entry.js → p-54788d6e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6e7bb16f.entry.js → p-59f7fa84.entry.js} +1 -1
- package/dist/bromcom-ui/p-5b63bfc6.entry.js +5 -0
- package/dist/bromcom-ui/{p-77b99601.entry.js → p-5be80cce.entry.js} +1 -1
- package/dist/bromcom-ui/{p-468157a0.entry.js → p-5d670fd7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d0e56a89.entry.js → p-5f4a7e27.entry.js} +1 -1
- package/dist/bromcom-ui/{p-745e2913.entry.js → p-65119762.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e45c1546.js → p-6657830f.js} +1 -1
- package/dist/bromcom-ui/{p-3b079331.entry.js → p-67343ad8.entry.js} +1 -1
- package/dist/bromcom-ui/p-6a82a1c6.entry.js +5 -0
- package/dist/bromcom-ui/{p-4798d827.js → p-6bea284a.js} +1 -1
- package/dist/bromcom-ui/p-6e5f5f36.js +1 -1
- package/dist/bromcom-ui/{p-197aba37.js → p-74e6d2b6.js} +1 -1
- package/dist/bromcom-ui/{p-1e8559ac.entry.js → p-77b1dbdd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-95a2c489.entry.js → p-77ef609e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1f99c170.entry.js → p-7a590e30.entry.js} +1 -1
- package/dist/bromcom-ui/{p-03337609.entry.js → p-7c5763cc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-991ffc23.entry.js → p-7d0d6073.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
- package/dist/bromcom-ui/{p-d2f863d9.js → p-8b6d3a37.js} +1 -1
- package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
- package/dist/bromcom-ui/p-959bd503.entry.js +5 -0
- package/dist/bromcom-ui/{p-79572dc0.entry.js → p-9668c853.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8e5e362a.js → p-9850cbce.js} +1 -1
- package/dist/bromcom-ui/p-991f374c.entry.js +5 -0
- package/dist/bromcom-ui/{p-0efc9196.entry.js → p-9b59c689.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6b5ed4d8.js → p-a0d6d680.js} +1 -1
- package/dist/bromcom-ui/p-a0f44b56.entry.js +5 -0
- package/dist/bromcom-ui/{p-0e362df2.entry.js → p-a20ac74f.entry.js} +1 -1
- package/dist/bromcom-ui/p-a313fba6.js +1 -1
- package/dist/bromcom-ui/{p-f39d9d7c.entry.js → p-a32b4186.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e32ab4da.entry.js → p-a486613b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7a89243a.entry.js → p-a6aa173f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0fc9f542.entry.js → p-a9759941.entry.js} +1 -1
- package/dist/bromcom-ui/p-ae57f046.entry.js +5 -0
- package/dist/bromcom-ui/p-aeb4be41.js +5 -0
- package/dist/bromcom-ui/{p-5f9b5e9a.entry.js → p-b703f03f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-80eb3fdb.entry.js → p-b72147fd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fcc6f71e.js → p-beaec5b8.js} +1 -1
- package/dist/bromcom-ui/{p-107f11df.entry.js → p-c1a992e7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-48f5a3c9.entry.js → p-c49b6287.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0c8f2481.entry.js → p-c661de9e.entry.js} +1 -1
- package/dist/bromcom-ui/p-cb7003f0.entry.js +5 -0
- package/dist/bromcom-ui/{p-32a2509b.entry.js → p-cbbadc43.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9686cdb.entry.js → p-ce917a87.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8290f0dc.entry.js → p-cf119021.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a496024a.entry.js → p-d5251ffe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-188b9079.entry.js → p-d59d9687.entry.js} +1 -1
- package/dist/bromcom-ui/p-de0b0192.entry.js +5 -0
- package/dist/bromcom-ui/p-e0ab7b38.js +11 -0
- package/dist/bromcom-ui/p-e72cd4e5.entry.js +5 -0
- package/dist/bromcom-ui/{p-181f2f4a.entry.js → p-e8eaa3bb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-298c652a.entry.js → p-e98016f3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-64da3643.entry.js → p-ea062405.entry.js} +1 -1
- package/dist/bromcom-ui/p-eca0acda.js +5 -0
- package/dist/bromcom-ui/{p-6bdc5130.entry.js → p-ee0bfc38.entry.js} +1 -1
- package/dist/bromcom-ui/p-f990f4c3.js +5 -0
- package/dist/bromcom-ui/{p-08159d00.entry.js → p-f9b59bcc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9119bec.entry.js → p-fc787048.entry.js} +1 -1
- package/dist/cjs/{bcm-489c9b1a.js → bcm-1d1fcf21.js} +4 -4
- package/dist/cjs/bcm-accordion_45.cjs.entry.js +23947 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +5 -5
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +10 -10
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +10 -10
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/bcm-caption.cjs.entry.js +11 -11
- package/dist/cjs/bcm-card.cjs.entry.js +7 -7
- package/dist/cjs/{bcm-checkbox-lite_9.cjs.entry.js → bcm-checkbox-lite_8.cjs.entry.js} +7 -27
- package/dist/cjs/bcm-chip-group.cjs.entry.js +11 -11
- package/dist/cjs/bcm-collapse.cjs.entry.js +62 -0
- package/dist/cjs/bcm-date-picker.cjs.entry.js +5 -5
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +9 -9
- package/dist/cjs/bcm-default.cjs.entry.js +3 -3
- package/dist/cjs/bcm-error-layout.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +6 -6
- package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +12 -12
- package/dist/cjs/bcm-link.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +8 -8
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +8 -8
- package/dist/cjs/bcm-modal-2.cjs.entry.js +9 -9
- package/dist/cjs/bcm-modal.cjs.entry.js +8 -8
- package/dist/cjs/bcm-number-input.cjs.entry.js +11 -11
- package/dist/cjs/bcm-old-input.cjs.entry.js +1 -1
- package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +11 -11
- package/dist/cjs/bcm-range.cjs.entry.js +7 -7
- package/dist/cjs/bcm-select.cjs.entry.js +2 -2
- package/dist/cjs/bcm-skeleton.cjs.entry.js +8 -8
- package/dist/cjs/bcm-table.cjs.entry.js +8 -8
- package/dist/cjs/bcm-tag.cjs.entry.js +16 -16
- package/dist/cjs/bcm-time-picker.cjs.entry.js +5 -5
- package/dist/cjs/bcm-toast.cjs.entry.js +12 -12
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{caption-template-086e9cac.js → caption-template-85a18b6d.js} +2 -2
- package/dist/cjs/{color-helper-c3a819ea.js → color-helper-dc98a2ca.js} +1 -1
- package/dist/cjs/{colors-078851ec.js → colors-250d0982.js} +13 -7
- package/dist/cjs/{floating-ui-21890d11.js → floating-ui-5b396838.js} +2 -2
- package/dist/cjs/{generate-06bf97b8.js → generate-c4e28fef.js} +2 -2
- package/dist/cjs/{global-74a88067.js → global-32a72f23.js} +1 -1
- package/dist/cjs/{label-template-94b3d775.js → label-template-e83447b5.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-362f0e03.js → number-helper-40bfb2fc.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +8 -8
- package/dist/cjs/old-bcm-popover.cjs.entry.js +6 -6
- package/dist/cjs/{package-92cfcafb.js → package-4a28cfe9.js} +1 -1
- package/dist/cjs/{popover-placement-e7d6eabd.js → popover-placement-02e6101b.js} +1 -1
- package/dist/cjs/{slot-template-c8e2816c.js → slot-template-df7b5b59.js} +1 -1
- package/dist/cjs/{string-helper-f9184277.js → string-helper-9cdfb273.js} +2 -2
- package/dist/cjs/{validators-07d7a0c9.js → validators-0f4f7438.js} +1 -1
- package/dist/collection/components/atoms/avatar/avatar.js +1 -1
- package/dist/collection/components/atoms/badge/badge.js +1 -1
- package/dist/collection/components/atoms/badge/badge.style.js +1 -1
- package/dist/collection/components/atoms/button/button.css +13 -13
- package/dist/collection/components/atoms/button/button.js +14 -14
- package/dist/collection/components/atoms/chip/chip.css +4 -4
- package/dist/collection/components/atoms/chip/chip.js +3 -3
- package/dist/collection/components/molecules/checkbox/group.css +2 -2
- package/dist/collection/components/molecules/checkbox/group.js +1 -1
- package/dist/collection/components/molecules/color-input/color-input.js +1 -1
- package/dist/collection/components/molecules/empty/empty.js +1 -1
- package/dist/collection/components/molecules/error-layout/error-layout.js +1 -1
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +1 -1
- package/dist/collection/components/molecules/input/input.js +1 -1
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +1 -1
- package/dist/collection/components/molecules/menu/menu.css +4 -4
- package/dist/collection/components/molecules/radio/radio-group.js +1 -1
- package/dist/collection/components/molecules/radio/radio.js +1 -1
- package/dist/collection/components/molecules/range/range.js +1 -1
- package/dist/collection/components/molecules/switch/switch.css +2 -2
- package/dist/collection/components/molecules/tab-group/tab-group.js +2 -2
- package/dist/collection/components/molecules/tab-group/tab-item-header.js +5 -5
- package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
- package/dist/collection/components/organism/list/list.js +2 -2
- package/dist/collection/components/other/attendance/attendance.js +1 -1
- package/dist/collection/stories/ui-library/components/date/argTypes_common.js +1 -0
- package/dist/collection/templates/button-template.js +1 -1
- package/dist/collection/templates/caption-template.js +2 -2
- package/dist/collection/templates/input-template.js +1 -1
- package/dist/collection/templates/label-template.js +1 -1
- package/dist/collection/templates/list-item-template.js +1 -1
- package/dist/collection/templates/list-template.js +3 -9
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +2 -2
- package/dist/components/bcm-attendance.js +1 -1
- package/dist/components/bcm-checkbox-group.js +2 -2
- package/dist/components/bcm-color-input.js +1 -1
- package/dist/components/bcm-error-layout.js +1 -1
- package/dist/components/bcm-expansion-panel.js +1 -1
- package/dist/components/bcm-input-dropdown.js +1 -1
- package/dist/components/bcm-radio-group.js +1 -1
- package/dist/components/bcm-range.js +1 -1
- package/dist/components/bcm-switch.js +1 -1
- package/dist/components/bcm-tab-group.js +2 -2
- package/dist/components/bcm-tab-item-header.js +5 -5
- package/dist/components/button.js +16 -16
- package/dist/components/caption-template.js +2 -2
- package/dist/components/chip.js +4 -4
- package/dist/components/colors2.js +13 -7
- package/dist/components/empty.js +1 -1
- package/dist/components/generate.js +1 -1
- package/dist/components/input-template.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/list.js +6 -12
- package/dist/components/menu.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/esm/{_commonjsHelpers-be0d4ec8.js → _commonjsHelpers-82aa9212.js} +1 -1
- package/dist/esm/bcm-a50d55ba.js +1 -1
- package/dist/esm/bcm-accordion_45.entry.js +23899 -0
- package/dist/esm/bcm-alert.entry.js +8 -8
- package/dist/esm/bcm-attendance-actions-comment.entry.js +12 -12
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +13 -13
- package/dist/esm/bcm-autocomplete.entry.js +3 -3
- package/dist/esm/bcm-box.entry.js +1 -1
- package/dist/esm/bcm-breadcrumb.entry.js +6 -6
- package/dist/esm/bcm-caption.entry.js +14 -14
- package/dist/esm/bcm-card.entry.js +10 -10
- package/dist/esm/{bcm-checkbox-lite_9.entry.js → bcm-checkbox-lite_8.entry.js} +10 -29
- package/dist/esm/bcm-chip-group.entry.js +15 -15
- package/dist/esm/bcm-collapse-group.entry.js +2 -2
- package/dist/esm/bcm-collapse.entry.js +58 -0
- package/dist/esm/bcm-colorpicker.entry.js +5 -5
- package/dist/esm/bcm-content.entry.js +1 -1
- package/dist/esm/bcm-date-picker.entry.js +9 -9
- package/dist/esm/bcm-datetime-picker.entry.js +13 -13
- package/dist/esm/bcm-default.entry.js +5 -5
- package/dist/esm/bcm-error-layout.entry.js +4 -4
- package/dist/esm/bcm-form-2.entry.js +8 -8
- package/dist/esm/bcm-form-group.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +6 -6
- package/dist/esm/bcm-input-dropdown.entry.js +15 -15
- package/dist/esm/bcm-link.entry.js +4 -4
- package/dist/esm/bcm-message.entry.js +3 -3
- package/dist/esm/bcm-modal-2-footer.entry.js +12 -12
- package/dist/esm/bcm-modal-2-header.entry.js +11 -11
- package/dist/esm/bcm-modal-2.entry.js +13 -13
- package/dist/esm/bcm-modal.entry.js +9 -9
- package/dist/esm/bcm-notification.entry.js +3 -3
- package/dist/esm/bcm-number-input.entry.js +14 -14
- package/dist/esm/bcm-old-input.entry.js +5 -5
- package/dist/esm/bcm-old-tag_2.entry.js +4 -4
- package/dist/esm/bcm-overlay_2.entry.js +4 -4
- package/dist/esm/bcm-popover.entry.js +12 -12
- package/dist/esm/bcm-range.entry.js +9 -9
- package/dist/esm/bcm-result.entry.js +3 -3
- package/dist/esm/bcm-select-group.entry.js +3 -3
- package/dist/esm/bcm-select-option.entry.js +3 -3
- package/dist/esm/bcm-select.entry.js +5 -5
- package/dist/esm/bcm-skeleton.entry.js +11 -11
- package/dist/esm/bcm-tab-pane.entry.js +3 -3
- package/dist/esm/bcm-tab.entry.js +3 -3
- package/dist/esm/bcm-table.entry.js +12 -12
- package/dist/esm/bcm-tabs-content.entry.js +4 -4
- package/dist/esm/bcm-tabs.entry.js +4 -4
- package/dist/esm/bcm-tag.entry.js +9 -9
- package/dist/esm/bcm-time-picker.entry.js +9 -9
- package/dist/esm/bcm-timeline-item.entry.js +3 -3
- package/dist/esm/bcm-timeline.entry.js +3 -3
- package/dist/esm/bcm-toast.entry.js +9 -9
- package/dist/esm/bcm-treeview-group.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +5 -5
- package/dist/esm/{caption-template-caa3bc94.js → caption-template-d7953d13.js} +4 -4
- package/dist/esm/{color-helper-c4fa9ebc.js → color-helper-74614f24.js} +2 -2
- package/dist/esm/{colors-e1c31f79.js → colors-dd598eea.js} +14 -8
- package/dist/esm/{element-dragger-7ea06c76.js → element-dragger-89bb52fd.js} +1 -1
- package/dist/esm/floating-ui-3f4394da.js +1 -1
- package/dist/esm/{generate-2696a8c2.js → generate-7f921cea.js} +2 -2
- package/dist/esm/{global-61bfbbb2.js → global-e270bb55.js} +2 -2
- package/dist/esm/{index-4614b7f0.js → index-0615c2b8.js} +1 -1
- package/dist/esm/{index-f38e3364.js → index-7e71bbc8.js} +1 -1
- package/dist/esm/{index-b84bc8c9.js → index-f549811f.js} +1 -1
- package/dist/esm/{is-load-decorator-b8ca22f2.js → is-load-decorator-8277e3b8.js} +1 -1
- package/dist/esm/{label-template-737576c4.js → label-template-a26f76c0.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{lodash-0a4396a7.js → lodash-4197be99.js} +1 -1
- package/dist/esm/{number-helper-738f0f80.js → number-helper-48abae7a.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +11 -11
- package/dist/esm/old-bcm-popover.entry.js +7 -7
- package/dist/esm/{package-131d6f3d.js → package-52b93905.js} +1 -1
- package/dist/esm/{popover-placement-2f5939ea.js → popover-placement-d12fec40.js} +1 -1
- package/dist/esm/{slot-template-08ed1fe4.js → slot-template-2a19b2db.js} +2 -2
- package/dist/esm/{string-helper-85990695.js → string-helper-3592bdc2.js} +2 -2
- package/dist/esm/{utils-b3338faf.js → utils-57652744.js} +1 -1
- package/dist/esm/{validators-0d91bd42.js → validators-2bf0eca1.js} +1 -1
- package/dist/types/templates/list-template.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-02209931.entry.js +0 -5
- package/dist/bromcom-ui/p-0267a472.entry.js +0 -5
- package/dist/bromcom-ui/p-034bbcdd.js +0 -5
- package/dist/bromcom-ui/p-04e5fdfe.entry.js +0 -5
- package/dist/bromcom-ui/p-0b28fa4e.entry.js +0 -5
- package/dist/bromcom-ui/p-1a33d7a3.entry.js +0 -5
- package/dist/bromcom-ui/p-2297ea95.entry.js +0 -5
- package/dist/bromcom-ui/p-2b3800d3.entry.js +0 -5
- package/dist/bromcom-ui/p-2e1a70ec.entry.js +0 -5
- package/dist/bromcom-ui/p-3089e9c7.js +0 -5
- package/dist/bromcom-ui/p-3182df7e.js +0 -10
- package/dist/bromcom-ui/p-339aca62.entry.js +0 -5
- package/dist/bromcom-ui/p-393f0e15.entry.js +0 -5
- package/dist/bromcom-ui/p-3f0b84a6.entry.js +0 -5
- package/dist/bromcom-ui/p-3f9f5a13.entry.js +0 -5
- package/dist/bromcom-ui/p-4213ba24.js +0 -5
- package/dist/bromcom-ui/p-45a9f416.entry.js +0 -5
- package/dist/bromcom-ui/p-4aa5350f.entry.js +0 -5
- package/dist/bromcom-ui/p-4ad0e51a.entry.js +0 -5
- package/dist/bromcom-ui/p-4d8067b9.entry.js +0 -5
- package/dist/bromcom-ui/p-5199f537.entry.js +0 -5
- package/dist/bromcom-ui/p-52722917.entry.js +0 -5
- package/dist/bromcom-ui/p-5362c0b3.js +0 -5
- package/dist/bromcom-ui/p-57bbbd50.entry.js +0 -5
- package/dist/bromcom-ui/p-5ea9881d.entry.js +0 -5
- package/dist/bromcom-ui/p-6f11eb8e.entry.js +0 -5
- package/dist/bromcom-ui/p-70259bf1.entry.js +0 -5
- package/dist/bromcom-ui/p-734c3522.entry.js +0 -5
- package/dist/bromcom-ui/p-7380fb38.entry.js +0 -5
- package/dist/bromcom-ui/p-76c877e3.entry.js +0 -5
- package/dist/bromcom-ui/p-76edf59f.js +0 -7
- package/dist/bromcom-ui/p-77035c08.entry.js +0 -5
- package/dist/bromcom-ui/p-7e3209a0.js +0 -14
- package/dist/bromcom-ui/p-7fcb7aec.entry.js +0 -5
- package/dist/bromcom-ui/p-88b59874.entry.js +0 -5
- package/dist/bromcom-ui/p-8ec1a890.js +0 -5
- package/dist/bromcom-ui/p-98a4c883.entry.js +0 -5
- package/dist/bromcom-ui/p-9da2b0d5.entry.js +0 -5
- package/dist/bromcom-ui/p-9e4cb37f.entry.js +0 -5
- package/dist/bromcom-ui/p-a387fa95.entry.js +0 -5
- package/dist/bromcom-ui/p-a436ed99.entry.js +0 -5
- package/dist/bromcom-ui/p-a9aaa5c1.entry.js +0 -5
- package/dist/bromcom-ui/p-bb37a2e6.entry.js +0 -5
- package/dist/bromcom-ui/p-be6595a2.entry.js +0 -5
- package/dist/bromcom-ui/p-bed627ab.js +0 -11
- package/dist/bromcom-ui/p-c4df05e3.entry.js +0 -5
- package/dist/bromcom-ui/p-d7309e81.entry.js +0 -5
- package/dist/bromcom-ui/p-d88a206a.entry.js +0 -5
- package/dist/bromcom-ui/p-dbde1ce5.entry.js +0 -5
- package/dist/bromcom-ui/p-dc6a4f29.entry.js +0 -5
- package/dist/bromcom-ui/p-e3c66141.js +0 -5
- package/dist/bromcom-ui/p-e55dc873.js +0 -5
- package/dist/bromcom-ui/p-e8075d25.entry.js +0 -5
- package/dist/bromcom-ui/p-e8ef1d0d.js +0 -5
- package/dist/bromcom-ui/p-f27a5636.entry.js +0 -5
- package/dist/bromcom-ui/p-f2850f20.entry.js +0 -5
- package/dist/bromcom-ui/p-f2d598d5.entry.js +0 -5
- package/dist/bromcom-ui/p-f6c83f16.entry.js +0 -5
- package/dist/bromcom-ui/p-fedb8902.entry.js +0 -5
- package/dist/cjs/bcm-accordion.cjs.entry.js +0 -74
- package/dist/cjs/bcm-attendance-actions.cjs.entry.js +0 -330
- package/dist/cjs/bcm-attendance.cjs.entry.js +0 -35
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -210
- package/dist/cjs/bcm-button-group.cjs.entry.js +0 -92
- package/dist/cjs/bcm-button_2.cjs.entry.js +0 -419
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -415
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -194
- package/dist/cjs/bcm-chip.cjs.entry.js +0 -91
- package/dist/cjs/bcm-color-input.cjs.entry.js +0 -77
- package/dist/cjs/bcm-colorful_2.cjs.entry.js +0 -251
- package/dist/cjs/bcm-date.cjs.entry.js +0 -182
- package/dist/cjs/bcm-drawer.cjs.entry.js +0 -96
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -119
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +0 -116
- package/dist/cjs/bcm-form.cjs.entry.js +0 -492
- package/dist/cjs/bcm-icon.cjs.entry.js +0 -39
- package/dist/cjs/bcm-input_2.cjs.entry.js +0 -550
- package/dist/cjs/bcm-item.cjs.entry.js +0 -72
- package/dist/cjs/bcm-items.cjs.entry.js +0 -49
- package/dist/cjs/bcm-label_2.cjs.entry.js +0 -135
- package/dist/cjs/bcm-list_3.cjs.entry.js +0 -2563
- package/dist/cjs/bcm-menu.cjs.entry.js +0 -151
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +0 -115
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +0 -101
- package/dist/cjs/bcm-progress.cjs.entry.js +0 -162
- package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -161
- package/dist/cjs/bcm-radio.cjs.entry.js +0 -65
- package/dist/cjs/bcm-rc-picker.cjs.entry.js +0 -9391
- package/dist/cjs/bcm-shortcut.cjs.entry.js +0 -65
- package/dist/cjs/bcm-step.cjs.entry.js +0 -89
- package/dist/cjs/bcm-stepper.cjs.entry.js +0 -240
- package/dist/cjs/bcm-switch.cjs.entry.js +0 -151
- package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -210
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +0 -59
- package/dist/cjs/bcm-tab-item.cjs.entry.js +0 -91
- package/dist/cjs/bcm-text.cjs.entry.js +0 -49
- package/dist/cjs/index-3d67f613.js +0 -1610
- package/dist/cjs/index-e05a7c6f.js +0 -545
- package/dist/cjs/input-template-106fdeb9.js +0 -92
- package/dist/cjs/json-parse-decarator-6cbdad46.js +0 -40
- package/dist/cjs/moment-d06b012f.js +0 -4601
- package/dist/cjs/stepper-states-5c4f767b.js +0 -85
- package/dist/cjs/tooltip-helper-9f0c156a.js +0 -158
- package/dist/esm/bcm-accordion.entry.js +0 -70
- package/dist/esm/bcm-attendance-actions.entry.js +0 -326
- package/dist/esm/bcm-attendance.entry.js +0 -31
- package/dist/esm/bcm-avatar_2.entry.js +0 -205
- package/dist/esm/bcm-button-group.entry.js +0 -88
- package/dist/esm/bcm-button_2.entry.js +0 -414
- package/dist/esm/bcm-checkbox-group.entry.js +0 -411
- package/dist/esm/bcm-checkbox_2.entry.js +0 -189
- package/dist/esm/bcm-chip.entry.js +0 -87
- package/dist/esm/bcm-color-input.entry.js +0 -73
- package/dist/esm/bcm-colorful_2.entry.js +0 -246
- package/dist/esm/bcm-date.entry.js +0 -178
- package/dist/esm/bcm-drawer.entry.js +0 -92
- package/dist/esm/bcm-dropdown.entry.js +0 -115
- package/dist/esm/bcm-expansion-panel.entry.js +0 -112
- package/dist/esm/bcm-form.entry.js +0 -488
- package/dist/esm/bcm-icon.entry.js +0 -35
- package/dist/esm/bcm-input_2.entry.js +0 -545
- package/dist/esm/bcm-item.entry.js +0 -68
- package/dist/esm/bcm-items.entry.js +0 -45
- package/dist/esm/bcm-label_2.entry.js +0 -130
- package/dist/esm/bcm-list_3.entry.js +0 -2557
- package/dist/esm/bcm-menu.entry.js +0 -147
- package/dist/esm/bcm-popconfirm-box.entry.js +0 -111
- package/dist/esm/bcm-popconfirm.entry.js +0 -97
- package/dist/esm/bcm-progress.entry.js +0 -158
- package/dist/esm/bcm-radio-group.entry.js +0 -157
- package/dist/esm/bcm-radio.entry.js +0 -61
- package/dist/esm/bcm-rc-picker.entry.js +0 -9387
- package/dist/esm/bcm-shortcut.entry.js +0 -61
- package/dist/esm/bcm-step.entry.js +0 -85
- package/dist/esm/bcm-stepper.entry.js +0 -236
- package/dist/esm/bcm-switch.entry.js +0 -147
- package/dist/esm/bcm-tab-group.entry.js +0 -206
- package/dist/esm/bcm-tab-item-header.entry.js +0 -55
- package/dist/esm/bcm-tab-item.entry.js +0 -87
- package/dist/esm/bcm-text.entry.js +0 -45
- package/dist/esm/index-a6d9d0af.js +0 -541
- package/dist/esm/index-c4568336.js +0 -1594
- package/dist/esm/input-template-b2e1b39d.js +0 -90
- package/dist/esm/json-parse-decarator-44a00bc5.js +0 -38
- package/dist/esm/moment-15cd9198.js +0 -4598
- package/dist/esm/stepper-states-66f07873.js +0 -83
- package/dist/esm/tooltip-helper-4b501ffa.js +0 -156
|
@@ -1,1594 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import { r as react, a as reactDom } from './index-a6d9d0af.js';
|
|
6
|
-
import { c as createCommonjsModule } from './_commonjsHelpers-be0d4ec8.js';
|
|
7
|
-
|
|
8
|
-
function useEvent(callback) {
|
|
9
|
-
var fnRef = react.useRef();
|
|
10
|
-
fnRef.current = callback;
|
|
11
|
-
var memoFn = react.useCallback(function () {
|
|
12
|
-
var _fnRef$current;
|
|
13
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14
|
-
args[_key] = arguments[_key];
|
|
15
|
-
}
|
|
16
|
-
return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
|
|
17
|
-
}, []);
|
|
18
|
-
return memoFn;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function canUseDom() {
|
|
22
|
-
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
27
|
-
*/
|
|
28
|
-
var useInternalLayoutEffect = canUseDom() ? react.useLayoutEffect : react.useEffect;
|
|
29
|
-
var useLayoutEffect = function useLayoutEffect(callback, deps) {
|
|
30
|
-
var firstMountRef = react.useRef(true);
|
|
31
|
-
useInternalLayoutEffect(function () {
|
|
32
|
-
return callback(firstMountRef.current);
|
|
33
|
-
}, deps);
|
|
34
|
-
|
|
35
|
-
// We tell react that first mount has passed
|
|
36
|
-
useInternalLayoutEffect(function () {
|
|
37
|
-
firstMountRef.current = false;
|
|
38
|
-
return function () {
|
|
39
|
-
firstMountRef.current = true;
|
|
40
|
-
};
|
|
41
|
-
}, []);
|
|
42
|
-
};
|
|
43
|
-
var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
|
|
44
|
-
useLayoutEffect(function (firstMount) {
|
|
45
|
-
if (!firstMount) {
|
|
46
|
-
return callback();
|
|
47
|
-
}
|
|
48
|
-
}, deps);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/* eslint-disable no-console */
|
|
52
|
-
var warned = {};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Pre warning enable you to parse content before console.error.
|
|
56
|
-
* Modify to null will prevent warning.
|
|
57
|
-
*/
|
|
58
|
-
var preMessage = function preMessage(fn) {
|
|
59
|
-
};
|
|
60
|
-
function warning(valid, message) {
|
|
61
|
-
}
|
|
62
|
-
function note(valid, message) {
|
|
63
|
-
}
|
|
64
|
-
function resetWarned() {
|
|
65
|
-
warned = {};
|
|
66
|
-
}
|
|
67
|
-
function call(method, valid, message) {
|
|
68
|
-
if (!valid && !warned[message]) {
|
|
69
|
-
method(false, message);
|
|
70
|
-
warned[message] = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function warningOnce(valid, message) {
|
|
74
|
-
call(warning, valid, message);
|
|
75
|
-
}
|
|
76
|
-
function noteOnce(valid, message) {
|
|
77
|
-
call(note, valid, message);
|
|
78
|
-
}
|
|
79
|
-
warningOnce.preMessage = preMessage;
|
|
80
|
-
warningOnce.resetWarned = resetWarned;
|
|
81
|
-
warningOnce.noteOnce = noteOnce;
|
|
82
|
-
/* eslint-enable */
|
|
83
|
-
|
|
84
|
-
function _typeof$1(obj) {
|
|
85
|
-
"@babel/helpers - typeof";
|
|
86
|
-
|
|
87
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
88
|
-
return typeof obj;
|
|
89
|
-
} : function (obj) {
|
|
90
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
91
|
-
}, _typeof$1(obj);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function useMemo(getValue, condition, shouldUpdate) {
|
|
95
|
-
var cacheRef = react.useRef({});
|
|
96
|
-
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
97
|
-
cacheRef.current.value = getValue();
|
|
98
|
-
cacheRef.current.condition = condition;
|
|
99
|
-
}
|
|
100
|
-
return cacheRef.current.value;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
var raf = function raf(callback) {
|
|
104
|
-
return +setTimeout(callback, 16);
|
|
105
|
-
};
|
|
106
|
-
var caf = function caf(num) {
|
|
107
|
-
return clearTimeout(num);
|
|
108
|
-
};
|
|
109
|
-
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
|
|
110
|
-
raf = function raf(callback) {
|
|
111
|
-
return window.requestAnimationFrame(callback);
|
|
112
|
-
};
|
|
113
|
-
caf = function caf(handle) {
|
|
114
|
-
return window.cancelAnimationFrame(handle);
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
var rafUUID = 0;
|
|
118
|
-
var rafIds = new Map();
|
|
119
|
-
function cleanup(id) {
|
|
120
|
-
rafIds.delete(id);
|
|
121
|
-
}
|
|
122
|
-
var wrapperRaf = function wrapperRaf(callback) {
|
|
123
|
-
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
124
|
-
rafUUID += 1;
|
|
125
|
-
var id = rafUUID;
|
|
126
|
-
function callRef(leftTimes) {
|
|
127
|
-
if (leftTimes === 0) {
|
|
128
|
-
// Clean up
|
|
129
|
-
cleanup(id);
|
|
130
|
-
|
|
131
|
-
// Trigger
|
|
132
|
-
callback();
|
|
133
|
-
} else {
|
|
134
|
-
// Next raf
|
|
135
|
-
var realId = raf(function () {
|
|
136
|
-
callRef(leftTimes - 1);
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// Bind real raf id
|
|
140
|
-
rafIds.set(id, realId);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
callRef(times);
|
|
144
|
-
return id;
|
|
145
|
-
};
|
|
146
|
-
wrapperRaf.cancel = function (id) {
|
|
147
|
-
var realId = rafIds.get(id);
|
|
148
|
-
cleanup(realId);
|
|
149
|
-
return caf(realId);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
/** @license React v16.13.1
|
|
153
|
-
* react-is.production.min.js
|
|
154
|
-
*
|
|
155
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the MIT license found in the
|
|
158
|
-
* LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/
|
|
160
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
161
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
162
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element$1=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
163
|
-
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
164
|
-
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
165
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
166
|
-
|
|
167
|
-
var reactIs_production_min = {
|
|
168
|
-
AsyncMode: AsyncMode,
|
|
169
|
-
ConcurrentMode: ConcurrentMode,
|
|
170
|
-
ContextConsumer: ContextConsumer,
|
|
171
|
-
ContextProvider: ContextProvider,
|
|
172
|
-
Element: Element$1,
|
|
173
|
-
ForwardRef: ForwardRef,
|
|
174
|
-
Fragment: Fragment,
|
|
175
|
-
Lazy: Lazy,
|
|
176
|
-
Memo: Memo,
|
|
177
|
-
Portal: Portal,
|
|
178
|
-
Profiler: Profiler,
|
|
179
|
-
StrictMode: StrictMode,
|
|
180
|
-
Suspense: Suspense,
|
|
181
|
-
isAsyncMode: isAsyncMode,
|
|
182
|
-
isConcurrentMode: isConcurrentMode,
|
|
183
|
-
isContextConsumer: isContextConsumer,
|
|
184
|
-
isContextProvider: isContextProvider,
|
|
185
|
-
isElement: isElement,
|
|
186
|
-
isForwardRef: isForwardRef,
|
|
187
|
-
isFragment: isFragment,
|
|
188
|
-
isLazy: isLazy,
|
|
189
|
-
isMemo: isMemo,
|
|
190
|
-
isPortal: isPortal,
|
|
191
|
-
isProfiler: isProfiler,
|
|
192
|
-
isStrictMode: isStrictMode,
|
|
193
|
-
isSuspense: isSuspense,
|
|
194
|
-
isValidElementType: isValidElementType,
|
|
195
|
-
typeOf: typeOf
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
createCommonjsModule(function (module, exports) {
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
var reactIs = createCommonjsModule(function (module) {
|
|
202
|
-
|
|
203
|
-
{
|
|
204
|
-
module.exports = reactIs_production_min;
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
function fillRef(ref, node) {
|
|
209
|
-
if (typeof ref === 'function') {
|
|
210
|
-
ref(node);
|
|
211
|
-
} else if (_typeof$1(ref) === 'object' && ref && 'current' in ref) {
|
|
212
|
-
ref.current = node;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Merge refs into one ref function to support ref passing.
|
|
218
|
-
*/
|
|
219
|
-
function composeRef() {
|
|
220
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
221
|
-
refs[_key] = arguments[_key];
|
|
222
|
-
}
|
|
223
|
-
var refList = refs.filter(function (ref) {
|
|
224
|
-
return ref;
|
|
225
|
-
});
|
|
226
|
-
if (refList.length <= 1) {
|
|
227
|
-
return refList[0];
|
|
228
|
-
}
|
|
229
|
-
return function (node) {
|
|
230
|
-
refs.forEach(function (ref) {
|
|
231
|
-
fillRef(ref, node);
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function useComposeRef() {
|
|
236
|
-
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
237
|
-
refs[_key2] = arguments[_key2];
|
|
238
|
-
}
|
|
239
|
-
return useMemo(function () {
|
|
240
|
-
return composeRef.apply(void 0, refs);
|
|
241
|
-
}, refs, function (prev, next) {
|
|
242
|
-
return prev.length === next.length && prev.every(function (ref, i) {
|
|
243
|
-
return ref === next[i];
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
function supportRef(nodeOrComponent) {
|
|
248
|
-
var _type$prototype, _nodeOrComponent$prot;
|
|
249
|
-
var type = reactIs.isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
|
|
250
|
-
|
|
251
|
-
// Function component node
|
|
252
|
-
if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) {
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Class component
|
|
257
|
-
if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) {
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
return true;
|
|
261
|
-
}
|
|
262
|
-
/* eslint-enable */
|
|
263
|
-
|
|
264
|
-
function _extends() {
|
|
265
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
266
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
267
|
-
var source = arguments[i];
|
|
268
|
-
for (var key in source) {
|
|
269
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
270
|
-
target[key] = source[key];
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
return target;
|
|
275
|
-
};
|
|
276
|
-
return _extends.apply(this, arguments);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function toArray(children) {
|
|
280
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
281
|
-
var ret = [];
|
|
282
|
-
react.Children.forEach(children, function (child) {
|
|
283
|
-
if ((child === undefined || child === null) && !option.keepEmpty) {
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
if (Array.isArray(child)) {
|
|
287
|
-
ret = ret.concat(toArray(child));
|
|
288
|
-
} else if (reactIs.isFragment(child) && child.props) {
|
|
289
|
-
ret = ret.concat(toArray(child.props.children, option));
|
|
290
|
-
} else {
|
|
291
|
-
ret.push(child);
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
return ret;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
function _typeof(obj) {
|
|
298
|
-
"@babel/helpers - typeof";
|
|
299
|
-
|
|
300
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
301
|
-
return typeof obj;
|
|
302
|
-
} : function (obj) {
|
|
303
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
304
|
-
}, _typeof(obj);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
function _toPrimitive(input, hint) {
|
|
308
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
309
|
-
var prim = input[Symbol.toPrimitive];
|
|
310
|
-
if (prim !== undefined) {
|
|
311
|
-
var res = prim.call(input, hint || "default");
|
|
312
|
-
if (_typeof(res) !== "object") return res;
|
|
313
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
314
|
-
}
|
|
315
|
-
return (hint === "string" ? String : Number)(input);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function _toPropertyKey(arg) {
|
|
319
|
-
var key = _toPrimitive(arg, "string");
|
|
320
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
function _defineProperty(obj, key, value) {
|
|
324
|
-
key = _toPropertyKey(key);
|
|
325
|
-
if (key in obj) {
|
|
326
|
-
Object.defineProperty(obj, key, {
|
|
327
|
-
value: value,
|
|
328
|
-
enumerable: true,
|
|
329
|
-
configurable: true,
|
|
330
|
-
writable: true
|
|
331
|
-
});
|
|
332
|
-
} else {
|
|
333
|
-
obj[key] = value;
|
|
334
|
-
}
|
|
335
|
-
return obj;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
function ownKeys(object, enumerableOnly) {
|
|
339
|
-
var keys = Object.keys(object);
|
|
340
|
-
if (Object.getOwnPropertySymbols) {
|
|
341
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
342
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
343
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
344
|
-
})), keys.push.apply(keys, symbols);
|
|
345
|
-
}
|
|
346
|
-
return keys;
|
|
347
|
-
}
|
|
348
|
-
function _objectSpread2(target) {
|
|
349
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
350
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
351
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
352
|
-
_defineProperty(target, key, source[key]);
|
|
353
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
354
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
return target;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
function isDOM(node) {
|
|
361
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Element
|
|
362
|
-
// Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement
|
|
363
|
-
return node instanceof HTMLElement || node instanceof SVGElement;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Return if a node is a DOM node. Else will return by `findDOMNode`
|
|
368
|
-
*/
|
|
369
|
-
function findDOMNode(node) {
|
|
370
|
-
if (isDOM(node)) {
|
|
371
|
-
return node;
|
|
372
|
-
}
|
|
373
|
-
if (node instanceof react.Component) {
|
|
374
|
-
return reactDom.findDOMNode(node);
|
|
375
|
-
}
|
|
376
|
-
return null;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
381
|
-
*
|
|
382
|
-
* These implementations are not meant to be used outside of the ResizeObserver
|
|
383
|
-
* modules as they cover only a limited range of use cases.
|
|
384
|
-
*/
|
|
385
|
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
386
|
-
var MapShim = (function () {
|
|
387
|
-
if (typeof Map !== 'undefined') {
|
|
388
|
-
return Map;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Returns index in provided array that matches the specified key.
|
|
392
|
-
*
|
|
393
|
-
* @param {Array<Array>} arr
|
|
394
|
-
* @param {*} key
|
|
395
|
-
* @returns {number}
|
|
396
|
-
*/
|
|
397
|
-
function getIndex(arr, key) {
|
|
398
|
-
var result = -1;
|
|
399
|
-
arr.some(function (entry, index) {
|
|
400
|
-
if (entry[0] === key) {
|
|
401
|
-
result = index;
|
|
402
|
-
return true;
|
|
403
|
-
}
|
|
404
|
-
return false;
|
|
405
|
-
});
|
|
406
|
-
return result;
|
|
407
|
-
}
|
|
408
|
-
return /** @class */ (function () {
|
|
409
|
-
function class_1() {
|
|
410
|
-
this.__entries__ = [];
|
|
411
|
-
}
|
|
412
|
-
Object.defineProperty(class_1.prototype, "size", {
|
|
413
|
-
/**
|
|
414
|
-
* @returns {boolean}
|
|
415
|
-
*/
|
|
416
|
-
get: function () {
|
|
417
|
-
return this.__entries__.length;
|
|
418
|
-
},
|
|
419
|
-
enumerable: true,
|
|
420
|
-
configurable: true
|
|
421
|
-
});
|
|
422
|
-
/**
|
|
423
|
-
* @param {*} key
|
|
424
|
-
* @returns {*}
|
|
425
|
-
*/
|
|
426
|
-
class_1.prototype.get = function (key) {
|
|
427
|
-
var index = getIndex(this.__entries__, key);
|
|
428
|
-
var entry = this.__entries__[index];
|
|
429
|
-
return entry && entry[1];
|
|
430
|
-
};
|
|
431
|
-
/**
|
|
432
|
-
* @param {*} key
|
|
433
|
-
* @param {*} value
|
|
434
|
-
* @returns {void}
|
|
435
|
-
*/
|
|
436
|
-
class_1.prototype.set = function (key, value) {
|
|
437
|
-
var index = getIndex(this.__entries__, key);
|
|
438
|
-
if (~index) {
|
|
439
|
-
this.__entries__[index][1] = value;
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
this.__entries__.push([key, value]);
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
/**
|
|
446
|
-
* @param {*} key
|
|
447
|
-
* @returns {void}
|
|
448
|
-
*/
|
|
449
|
-
class_1.prototype.delete = function (key) {
|
|
450
|
-
var entries = this.__entries__;
|
|
451
|
-
var index = getIndex(entries, key);
|
|
452
|
-
if (~index) {
|
|
453
|
-
entries.splice(index, 1);
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
/**
|
|
457
|
-
* @param {*} key
|
|
458
|
-
* @returns {void}
|
|
459
|
-
*/
|
|
460
|
-
class_1.prototype.has = function (key) {
|
|
461
|
-
return !!~getIndex(this.__entries__, key);
|
|
462
|
-
};
|
|
463
|
-
/**
|
|
464
|
-
* @returns {void}
|
|
465
|
-
*/
|
|
466
|
-
class_1.prototype.clear = function () {
|
|
467
|
-
this.__entries__.splice(0);
|
|
468
|
-
};
|
|
469
|
-
/**
|
|
470
|
-
* @param {Function} callback
|
|
471
|
-
* @param {*} [ctx=null]
|
|
472
|
-
* @returns {void}
|
|
473
|
-
*/
|
|
474
|
-
class_1.prototype.forEach = function (callback, ctx) {
|
|
475
|
-
if (ctx === void 0) { ctx = null; }
|
|
476
|
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
477
|
-
var entry = _a[_i];
|
|
478
|
-
callback.call(ctx, entry[1], entry[0]);
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
return class_1;
|
|
482
|
-
}());
|
|
483
|
-
})();
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Detects whether window and document objects are available in current environment.
|
|
487
|
-
*/
|
|
488
|
-
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
489
|
-
|
|
490
|
-
// Returns global object of a current environment.
|
|
491
|
-
var global$1 = (function () {
|
|
492
|
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
|
493
|
-
return global;
|
|
494
|
-
}
|
|
495
|
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
496
|
-
return self;
|
|
497
|
-
}
|
|
498
|
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
499
|
-
return window;
|
|
500
|
-
}
|
|
501
|
-
// eslint-disable-next-line no-new-func
|
|
502
|
-
return Function('return this')();
|
|
503
|
-
})();
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
507
|
-
* first one is not supported.
|
|
508
|
-
*
|
|
509
|
-
* @returns {number} Requests' identifier.
|
|
510
|
-
*/
|
|
511
|
-
var requestAnimationFrame$1 = (function () {
|
|
512
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
513
|
-
// It's required to use a bounded function because IE sometimes throws
|
|
514
|
-
// an "Invalid calling object" error if rAF is invoked without the global
|
|
515
|
-
// object on the left hand side.
|
|
516
|
-
return requestAnimationFrame.bind(global$1);
|
|
517
|
-
}
|
|
518
|
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
519
|
-
})();
|
|
520
|
-
|
|
521
|
-
// Defines minimum timeout before adding a trailing call.
|
|
522
|
-
var trailingTimeout = 2;
|
|
523
|
-
/**
|
|
524
|
-
* Creates a wrapper function which ensures that provided callback will be
|
|
525
|
-
* invoked only once during the specified delay period.
|
|
526
|
-
*
|
|
527
|
-
* @param {Function} callback - Function to be invoked after the delay period.
|
|
528
|
-
* @param {number} delay - Delay after which to invoke callback.
|
|
529
|
-
* @returns {Function}
|
|
530
|
-
*/
|
|
531
|
-
function throttle (callback, delay) {
|
|
532
|
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
533
|
-
/**
|
|
534
|
-
* Invokes the original callback function and schedules new invocation if
|
|
535
|
-
* the "proxy" was called during current request.
|
|
536
|
-
*
|
|
537
|
-
* @returns {void}
|
|
538
|
-
*/
|
|
539
|
-
function resolvePending() {
|
|
540
|
-
if (leadingCall) {
|
|
541
|
-
leadingCall = false;
|
|
542
|
-
callback();
|
|
543
|
-
}
|
|
544
|
-
if (trailingCall) {
|
|
545
|
-
proxy();
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Callback invoked after the specified delay. It will further postpone
|
|
550
|
-
* invocation of the original function delegating it to the
|
|
551
|
-
* requestAnimationFrame.
|
|
552
|
-
*
|
|
553
|
-
* @returns {void}
|
|
554
|
-
*/
|
|
555
|
-
function timeoutCallback() {
|
|
556
|
-
requestAnimationFrame$1(resolvePending);
|
|
557
|
-
}
|
|
558
|
-
/**
|
|
559
|
-
* Schedules invocation of the original function.
|
|
560
|
-
*
|
|
561
|
-
* @returns {void}
|
|
562
|
-
*/
|
|
563
|
-
function proxy() {
|
|
564
|
-
var timeStamp = Date.now();
|
|
565
|
-
if (leadingCall) {
|
|
566
|
-
// Reject immediately following calls.
|
|
567
|
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
// Schedule new call to be in invoked when the pending one is resolved.
|
|
571
|
-
// This is important for "transitions" which never actually start
|
|
572
|
-
// immediately so there is a chance that we might miss one if change
|
|
573
|
-
// happens amids the pending invocation.
|
|
574
|
-
trailingCall = true;
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
leadingCall = true;
|
|
578
|
-
trailingCall = false;
|
|
579
|
-
setTimeout(timeoutCallback, delay);
|
|
580
|
-
}
|
|
581
|
-
lastCallTime = timeStamp;
|
|
582
|
-
}
|
|
583
|
-
return proxy;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
// Minimum delay before invoking the update of observers.
|
|
587
|
-
var REFRESH_DELAY = 20;
|
|
588
|
-
// A list of substrings of CSS properties used to find transition events that
|
|
589
|
-
// might affect dimensions of observed elements.
|
|
590
|
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
591
|
-
// Check if MutationObserver is available.
|
|
592
|
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
593
|
-
/**
|
|
594
|
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
595
|
-
*/
|
|
596
|
-
var ResizeObserverController = /** @class */ (function () {
|
|
597
|
-
/**
|
|
598
|
-
* Creates a new instance of ResizeObserverController.
|
|
599
|
-
*
|
|
600
|
-
* @private
|
|
601
|
-
*/
|
|
602
|
-
function ResizeObserverController() {
|
|
603
|
-
/**
|
|
604
|
-
* Indicates whether DOM listeners have been added.
|
|
605
|
-
*
|
|
606
|
-
* @private {boolean}
|
|
607
|
-
*/
|
|
608
|
-
this.connected_ = false;
|
|
609
|
-
/**
|
|
610
|
-
* Tells that controller has subscribed for Mutation Events.
|
|
611
|
-
*
|
|
612
|
-
* @private {boolean}
|
|
613
|
-
*/
|
|
614
|
-
this.mutationEventsAdded_ = false;
|
|
615
|
-
/**
|
|
616
|
-
* Keeps reference to the instance of MutationObserver.
|
|
617
|
-
*
|
|
618
|
-
* @private {MutationObserver}
|
|
619
|
-
*/
|
|
620
|
-
this.mutationsObserver_ = null;
|
|
621
|
-
/**
|
|
622
|
-
* A list of connected observers.
|
|
623
|
-
*
|
|
624
|
-
* @private {Array<ResizeObserverSPI>}
|
|
625
|
-
*/
|
|
626
|
-
this.observers_ = [];
|
|
627
|
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
628
|
-
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
* Adds observer to observers list.
|
|
632
|
-
*
|
|
633
|
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
634
|
-
* @returns {void}
|
|
635
|
-
*/
|
|
636
|
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
637
|
-
if (!~this.observers_.indexOf(observer)) {
|
|
638
|
-
this.observers_.push(observer);
|
|
639
|
-
}
|
|
640
|
-
// Add listeners if they haven't been added yet.
|
|
641
|
-
if (!this.connected_) {
|
|
642
|
-
this.connect_();
|
|
643
|
-
}
|
|
644
|
-
};
|
|
645
|
-
/**
|
|
646
|
-
* Removes observer from observers list.
|
|
647
|
-
*
|
|
648
|
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
649
|
-
* @returns {void}
|
|
650
|
-
*/
|
|
651
|
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
652
|
-
var observers = this.observers_;
|
|
653
|
-
var index = observers.indexOf(observer);
|
|
654
|
-
// Remove observer if it's present in registry.
|
|
655
|
-
if (~index) {
|
|
656
|
-
observers.splice(index, 1);
|
|
657
|
-
}
|
|
658
|
-
// Remove listeners if controller has no connected observers.
|
|
659
|
-
if (!observers.length && this.connected_) {
|
|
660
|
-
this.disconnect_();
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
|
-
/**
|
|
664
|
-
* Invokes the update of observers. It will continue running updates insofar
|
|
665
|
-
* it detects changes.
|
|
666
|
-
*
|
|
667
|
-
* @returns {void}
|
|
668
|
-
*/
|
|
669
|
-
ResizeObserverController.prototype.refresh = function () {
|
|
670
|
-
var changesDetected = this.updateObservers_();
|
|
671
|
-
// Continue running updates if changes have been detected as there might
|
|
672
|
-
// be future ones caused by CSS transitions.
|
|
673
|
-
if (changesDetected) {
|
|
674
|
-
this.refresh();
|
|
675
|
-
}
|
|
676
|
-
};
|
|
677
|
-
/**
|
|
678
|
-
* Updates every observer from observers list and notifies them of queued
|
|
679
|
-
* entries.
|
|
680
|
-
*
|
|
681
|
-
* @private
|
|
682
|
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
683
|
-
* dimensions of it's elements.
|
|
684
|
-
*/
|
|
685
|
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
686
|
-
// Collect observers that have active observations.
|
|
687
|
-
var activeObservers = this.observers_.filter(function (observer) {
|
|
688
|
-
return observer.gatherActive(), observer.hasActive();
|
|
689
|
-
});
|
|
690
|
-
// Deliver notifications in a separate cycle in order to avoid any
|
|
691
|
-
// collisions between observers, e.g. when multiple instances of
|
|
692
|
-
// ResizeObserver are tracking the same element and the callback of one
|
|
693
|
-
// of them changes content dimensions of the observed target. Sometimes
|
|
694
|
-
// this may result in notifications being blocked for the rest of observers.
|
|
695
|
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
696
|
-
return activeObservers.length > 0;
|
|
697
|
-
};
|
|
698
|
-
/**
|
|
699
|
-
* Initializes DOM listeners.
|
|
700
|
-
*
|
|
701
|
-
* @private
|
|
702
|
-
* @returns {void}
|
|
703
|
-
*/
|
|
704
|
-
ResizeObserverController.prototype.connect_ = function () {
|
|
705
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
706
|
-
// have been already added.
|
|
707
|
-
if (!isBrowser || this.connected_) {
|
|
708
|
-
return;
|
|
709
|
-
}
|
|
710
|
-
// Subscription to the "Transitionend" event is used as a workaround for
|
|
711
|
-
// delayed transitions. This way it's possible to capture at least the
|
|
712
|
-
// final state of an element.
|
|
713
|
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
714
|
-
window.addEventListener('resize', this.refresh);
|
|
715
|
-
if (mutationObserverSupported) {
|
|
716
|
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
717
|
-
this.mutationsObserver_.observe(document, {
|
|
718
|
-
attributes: true,
|
|
719
|
-
childList: true,
|
|
720
|
-
characterData: true,
|
|
721
|
-
subtree: true
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
else {
|
|
725
|
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
726
|
-
this.mutationEventsAdded_ = true;
|
|
727
|
-
}
|
|
728
|
-
this.connected_ = true;
|
|
729
|
-
};
|
|
730
|
-
/**
|
|
731
|
-
* Removes DOM listeners.
|
|
732
|
-
*
|
|
733
|
-
* @private
|
|
734
|
-
* @returns {void}
|
|
735
|
-
*/
|
|
736
|
-
ResizeObserverController.prototype.disconnect_ = function () {
|
|
737
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
738
|
-
// have been already removed.
|
|
739
|
-
if (!isBrowser || !this.connected_) {
|
|
740
|
-
return;
|
|
741
|
-
}
|
|
742
|
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
743
|
-
window.removeEventListener('resize', this.refresh);
|
|
744
|
-
if (this.mutationsObserver_) {
|
|
745
|
-
this.mutationsObserver_.disconnect();
|
|
746
|
-
}
|
|
747
|
-
if (this.mutationEventsAdded_) {
|
|
748
|
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
749
|
-
}
|
|
750
|
-
this.mutationsObserver_ = null;
|
|
751
|
-
this.mutationEventsAdded_ = false;
|
|
752
|
-
this.connected_ = false;
|
|
753
|
-
};
|
|
754
|
-
/**
|
|
755
|
-
* "Transitionend" event handler.
|
|
756
|
-
*
|
|
757
|
-
* @private
|
|
758
|
-
* @param {TransitionEvent} event
|
|
759
|
-
* @returns {void}
|
|
760
|
-
*/
|
|
761
|
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
762
|
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
763
|
-
// Detect whether transition may affect dimensions of an element.
|
|
764
|
-
var isReflowProperty = transitionKeys.some(function (key) {
|
|
765
|
-
return !!~propertyName.indexOf(key);
|
|
766
|
-
});
|
|
767
|
-
if (isReflowProperty) {
|
|
768
|
-
this.refresh();
|
|
769
|
-
}
|
|
770
|
-
};
|
|
771
|
-
/**
|
|
772
|
-
* Returns instance of the ResizeObserverController.
|
|
773
|
-
*
|
|
774
|
-
* @returns {ResizeObserverController}
|
|
775
|
-
*/
|
|
776
|
-
ResizeObserverController.getInstance = function () {
|
|
777
|
-
if (!this.instance_) {
|
|
778
|
-
this.instance_ = new ResizeObserverController();
|
|
779
|
-
}
|
|
780
|
-
return this.instance_;
|
|
781
|
-
};
|
|
782
|
-
/**
|
|
783
|
-
* Holds reference to the controller's instance.
|
|
784
|
-
*
|
|
785
|
-
* @private {ResizeObserverController}
|
|
786
|
-
*/
|
|
787
|
-
ResizeObserverController.instance_ = null;
|
|
788
|
-
return ResizeObserverController;
|
|
789
|
-
}());
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Defines non-writable/enumerable properties of the provided target object.
|
|
793
|
-
*
|
|
794
|
-
* @param {Object} target - Object for which to define properties.
|
|
795
|
-
* @param {Object} props - Properties to be defined.
|
|
796
|
-
* @returns {Object} Target object.
|
|
797
|
-
*/
|
|
798
|
-
var defineConfigurable = (function (target, props) {
|
|
799
|
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
800
|
-
var key = _a[_i];
|
|
801
|
-
Object.defineProperty(target, key, {
|
|
802
|
-
value: props[key],
|
|
803
|
-
enumerable: false,
|
|
804
|
-
writable: false,
|
|
805
|
-
configurable: true
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
return target;
|
|
809
|
-
});
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* Returns the global object associated with provided element.
|
|
813
|
-
*
|
|
814
|
-
* @param {Object} target
|
|
815
|
-
* @returns {Object}
|
|
816
|
-
*/
|
|
817
|
-
var getWindowOf = (function (target) {
|
|
818
|
-
// Assume that the element is an instance of Node, which means that it
|
|
819
|
-
// has the "ownerDocument" property from which we can retrieve a
|
|
820
|
-
// corresponding global object.
|
|
821
|
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
822
|
-
// Return the local global object if it's not possible extract one from
|
|
823
|
-
// provided element.
|
|
824
|
-
return ownerGlobal || global$1;
|
|
825
|
-
});
|
|
826
|
-
|
|
827
|
-
// Placeholder of an empty content rectangle.
|
|
828
|
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
829
|
-
/**
|
|
830
|
-
* Converts provided string to a number.
|
|
831
|
-
*
|
|
832
|
-
* @param {number|string} value
|
|
833
|
-
* @returns {number}
|
|
834
|
-
*/
|
|
835
|
-
function toFloat(value) {
|
|
836
|
-
return parseFloat(value) || 0;
|
|
837
|
-
}
|
|
838
|
-
/**
|
|
839
|
-
* Extracts borders size from provided styles.
|
|
840
|
-
*
|
|
841
|
-
* @param {CSSStyleDeclaration} styles
|
|
842
|
-
* @param {...string} positions - Borders positions (top, right, ...)
|
|
843
|
-
* @returns {number}
|
|
844
|
-
*/
|
|
845
|
-
function getBordersSize(styles) {
|
|
846
|
-
var positions = [];
|
|
847
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
848
|
-
positions[_i - 1] = arguments[_i];
|
|
849
|
-
}
|
|
850
|
-
return positions.reduce(function (size, position) {
|
|
851
|
-
var value = styles['border-' + position + '-width'];
|
|
852
|
-
return size + toFloat(value);
|
|
853
|
-
}, 0);
|
|
854
|
-
}
|
|
855
|
-
/**
|
|
856
|
-
* Extracts paddings sizes from provided styles.
|
|
857
|
-
*
|
|
858
|
-
* @param {CSSStyleDeclaration} styles
|
|
859
|
-
* @returns {Object} Paddings box.
|
|
860
|
-
*/
|
|
861
|
-
function getPaddings(styles) {
|
|
862
|
-
var positions = ['top', 'right', 'bottom', 'left'];
|
|
863
|
-
var paddings = {};
|
|
864
|
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
865
|
-
var position = positions_1[_i];
|
|
866
|
-
var value = styles['padding-' + position];
|
|
867
|
-
paddings[position] = toFloat(value);
|
|
868
|
-
}
|
|
869
|
-
return paddings;
|
|
870
|
-
}
|
|
871
|
-
/**
|
|
872
|
-
* Calculates content rectangle of provided SVG element.
|
|
873
|
-
*
|
|
874
|
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
875
|
-
* to be calculated.
|
|
876
|
-
* @returns {DOMRectInit}
|
|
877
|
-
*/
|
|
878
|
-
function getSVGContentRect(target) {
|
|
879
|
-
var bbox = target.getBBox();
|
|
880
|
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* Calculates content rectangle of provided HTMLElement.
|
|
884
|
-
*
|
|
885
|
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
886
|
-
* @returns {DOMRectInit}
|
|
887
|
-
*/
|
|
888
|
-
function getHTMLElementContentRect(target) {
|
|
889
|
-
// Client width & height properties can't be
|
|
890
|
-
// used exclusively as they provide rounded values.
|
|
891
|
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
892
|
-
// By this condition we can catch all non-replaced inline, hidden and
|
|
893
|
-
// detached elements. Though elements with width & height properties less
|
|
894
|
-
// than 0.5 will be discarded as well.
|
|
895
|
-
//
|
|
896
|
-
// Without it we would need to implement separate methods for each of
|
|
897
|
-
// those cases and it's not possible to perform a precise and performance
|
|
898
|
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
899
|
-
// gives wrong results for elements with width & height less than 0.5.
|
|
900
|
-
if (!clientWidth && !clientHeight) {
|
|
901
|
-
return emptyRect;
|
|
902
|
-
}
|
|
903
|
-
var styles = getWindowOf(target).getComputedStyle(target);
|
|
904
|
-
var paddings = getPaddings(styles);
|
|
905
|
-
var horizPad = paddings.left + paddings.right;
|
|
906
|
-
var vertPad = paddings.top + paddings.bottom;
|
|
907
|
-
// Computed styles of width & height are being used because they are the
|
|
908
|
-
// only dimensions available to JS that contain non-rounded values. It could
|
|
909
|
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
910
|
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
911
|
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
912
|
-
// Width & height include paddings and borders when the 'border-box' box
|
|
913
|
-
// model is applied (except for IE).
|
|
914
|
-
if (styles.boxSizing === 'border-box') {
|
|
915
|
-
// Following conditions are required to handle Internet Explorer which
|
|
916
|
-
// doesn't include paddings and borders to computed CSS dimensions.
|
|
917
|
-
//
|
|
918
|
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
919
|
-
// properties then it's either IE, and thus we don't need to subtract
|
|
920
|
-
// anything, or an element merely doesn't have paddings/borders styles.
|
|
921
|
-
if (Math.round(width + horizPad) !== clientWidth) {
|
|
922
|
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
923
|
-
}
|
|
924
|
-
if (Math.round(height + vertPad) !== clientHeight) {
|
|
925
|
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
// Following steps can't be applied to the document's root element as its
|
|
929
|
-
// client[Width/Height] properties represent viewport area of the window.
|
|
930
|
-
// Besides, it's as well not necessary as the <html> itself neither has
|
|
931
|
-
// rendered scroll bars nor it can be clipped.
|
|
932
|
-
if (!isDocumentElement(target)) {
|
|
933
|
-
// In some browsers (only in Firefox, actually) CSS width & height
|
|
934
|
-
// include scroll bars size which can be removed at this step as scroll
|
|
935
|
-
// bars are the only difference between rounded dimensions + paddings
|
|
936
|
-
// and "client" properties, though that is not always true in Chrome.
|
|
937
|
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
938
|
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
939
|
-
// Chrome has a rather weird rounding of "client" properties.
|
|
940
|
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
941
|
-
// the client width of 315px and for the width of 314.7px it may give
|
|
942
|
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
943
|
-
// as a non-relevant.
|
|
944
|
-
if (Math.abs(vertScrollbar) !== 1) {
|
|
945
|
-
width -= vertScrollbar;
|
|
946
|
-
}
|
|
947
|
-
if (Math.abs(horizScrollbar) !== 1) {
|
|
948
|
-
height -= horizScrollbar;
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
return createRectInit(paddings.left, paddings.top, width, height);
|
|
952
|
-
}
|
|
953
|
-
/**
|
|
954
|
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
955
|
-
*
|
|
956
|
-
* @param {Element} target - Element to be checked.
|
|
957
|
-
* @returns {boolean}
|
|
958
|
-
*/
|
|
959
|
-
var isSVGGraphicsElement = (function () {
|
|
960
|
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
961
|
-
// interface.
|
|
962
|
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
963
|
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
964
|
-
}
|
|
965
|
-
// If it's so, then check that element is at least an instance of the
|
|
966
|
-
// SVGElement and that it has the "getBBox" method.
|
|
967
|
-
// eslint-disable-next-line no-extra-parens
|
|
968
|
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
969
|
-
typeof target.getBBox === 'function'); };
|
|
970
|
-
})();
|
|
971
|
-
/**
|
|
972
|
-
* Checks whether provided element is a document element (<html>).
|
|
973
|
-
*
|
|
974
|
-
* @param {Element} target - Element to be checked.
|
|
975
|
-
* @returns {boolean}
|
|
976
|
-
*/
|
|
977
|
-
function isDocumentElement(target) {
|
|
978
|
-
return target === getWindowOf(target).document.documentElement;
|
|
979
|
-
}
|
|
980
|
-
/**
|
|
981
|
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
982
|
-
*
|
|
983
|
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
984
|
-
* @returns {DOMRectInit}
|
|
985
|
-
*/
|
|
986
|
-
function getContentRect(target) {
|
|
987
|
-
if (!isBrowser) {
|
|
988
|
-
return emptyRect;
|
|
989
|
-
}
|
|
990
|
-
if (isSVGGraphicsElement(target)) {
|
|
991
|
-
return getSVGContentRect(target);
|
|
992
|
-
}
|
|
993
|
-
return getHTMLElementContentRect(target);
|
|
994
|
-
}
|
|
995
|
-
/**
|
|
996
|
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
997
|
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
998
|
-
*
|
|
999
|
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
1000
|
-
* @returns {DOMRectReadOnly}
|
|
1001
|
-
*/
|
|
1002
|
-
function createReadOnlyRect(_a) {
|
|
1003
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
1004
|
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
1005
|
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
1006
|
-
var rect = Object.create(Constr.prototype);
|
|
1007
|
-
// Rectangle's properties are not writable and non-enumerable.
|
|
1008
|
-
defineConfigurable(rect, {
|
|
1009
|
-
x: x, y: y, width: width, height: height,
|
|
1010
|
-
top: y,
|
|
1011
|
-
right: x + width,
|
|
1012
|
-
bottom: height + y,
|
|
1013
|
-
left: x
|
|
1014
|
-
});
|
|
1015
|
-
return rect;
|
|
1016
|
-
}
|
|
1017
|
-
/**
|
|
1018
|
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
1019
|
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
1020
|
-
*
|
|
1021
|
-
* @param {number} x - X coordinate.
|
|
1022
|
-
* @param {number} y - Y coordinate.
|
|
1023
|
-
* @param {number} width - Rectangle's width.
|
|
1024
|
-
* @param {number} height - Rectangle's height.
|
|
1025
|
-
* @returns {DOMRectInit}
|
|
1026
|
-
*/
|
|
1027
|
-
function createRectInit(x, y, width, height) {
|
|
1028
|
-
return { x: x, y: y, width: width, height: height };
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* Class that is responsible for computations of the content rectangle of
|
|
1033
|
-
* provided DOM element and for keeping track of it's changes.
|
|
1034
|
-
*/
|
|
1035
|
-
var ResizeObservation = /** @class */ (function () {
|
|
1036
|
-
/**
|
|
1037
|
-
* Creates an instance of ResizeObservation.
|
|
1038
|
-
*
|
|
1039
|
-
* @param {Element} target - Element to be observed.
|
|
1040
|
-
*/
|
|
1041
|
-
function ResizeObservation(target) {
|
|
1042
|
-
/**
|
|
1043
|
-
* Broadcasted width of content rectangle.
|
|
1044
|
-
*
|
|
1045
|
-
* @type {number}
|
|
1046
|
-
*/
|
|
1047
|
-
this.broadcastWidth = 0;
|
|
1048
|
-
/**
|
|
1049
|
-
* Broadcasted height of content rectangle.
|
|
1050
|
-
*
|
|
1051
|
-
* @type {number}
|
|
1052
|
-
*/
|
|
1053
|
-
this.broadcastHeight = 0;
|
|
1054
|
-
/**
|
|
1055
|
-
* Reference to the last observed content rectangle.
|
|
1056
|
-
*
|
|
1057
|
-
* @private {DOMRectInit}
|
|
1058
|
-
*/
|
|
1059
|
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
1060
|
-
this.target = target;
|
|
1061
|
-
}
|
|
1062
|
-
/**
|
|
1063
|
-
* Updates content rectangle and tells whether it's width or height properties
|
|
1064
|
-
* have changed since the last broadcast.
|
|
1065
|
-
*
|
|
1066
|
-
* @returns {boolean}
|
|
1067
|
-
*/
|
|
1068
|
-
ResizeObservation.prototype.isActive = function () {
|
|
1069
|
-
var rect = getContentRect(this.target);
|
|
1070
|
-
this.contentRect_ = rect;
|
|
1071
|
-
return (rect.width !== this.broadcastWidth ||
|
|
1072
|
-
rect.height !== this.broadcastHeight);
|
|
1073
|
-
};
|
|
1074
|
-
/**
|
|
1075
|
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
1076
|
-
* from the corresponding properties of the last observed content rectangle.
|
|
1077
|
-
*
|
|
1078
|
-
* @returns {DOMRectInit} Last observed content rectangle.
|
|
1079
|
-
*/
|
|
1080
|
-
ResizeObservation.prototype.broadcastRect = function () {
|
|
1081
|
-
var rect = this.contentRect_;
|
|
1082
|
-
this.broadcastWidth = rect.width;
|
|
1083
|
-
this.broadcastHeight = rect.height;
|
|
1084
|
-
return rect;
|
|
1085
|
-
};
|
|
1086
|
-
return ResizeObservation;
|
|
1087
|
-
}());
|
|
1088
|
-
|
|
1089
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
1090
|
-
/**
|
|
1091
|
-
* Creates an instance of ResizeObserverEntry.
|
|
1092
|
-
*
|
|
1093
|
-
* @param {Element} target - Element that is being observed.
|
|
1094
|
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
1095
|
-
*/
|
|
1096
|
-
function ResizeObserverEntry(target, rectInit) {
|
|
1097
|
-
var contentRect = createReadOnlyRect(rectInit);
|
|
1098
|
-
// According to the specification following properties are not writable
|
|
1099
|
-
// and are also not enumerable in the native implementation.
|
|
1100
|
-
//
|
|
1101
|
-
// Property accessors are not being used as they'd require to define a
|
|
1102
|
-
// private WeakMap storage which may cause memory leaks in browsers that
|
|
1103
|
-
// don't support this type of collections.
|
|
1104
|
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
1105
|
-
}
|
|
1106
|
-
return ResizeObserverEntry;
|
|
1107
|
-
}());
|
|
1108
|
-
|
|
1109
|
-
var ResizeObserverSPI = /** @class */ (function () {
|
|
1110
|
-
/**
|
|
1111
|
-
* Creates a new instance of ResizeObserver.
|
|
1112
|
-
*
|
|
1113
|
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
1114
|
-
* when one of the observed elements changes it's content dimensions.
|
|
1115
|
-
* @param {ResizeObserverController} controller - Controller instance which
|
|
1116
|
-
* is responsible for the updates of observer.
|
|
1117
|
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
1118
|
-
* ResizeObserver instance which will be passed to callback function.
|
|
1119
|
-
*/
|
|
1120
|
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
1121
|
-
/**
|
|
1122
|
-
* Collection of resize observations that have detected changes in dimensions
|
|
1123
|
-
* of elements.
|
|
1124
|
-
*
|
|
1125
|
-
* @private {Array<ResizeObservation>}
|
|
1126
|
-
*/
|
|
1127
|
-
this.activeObservations_ = [];
|
|
1128
|
-
/**
|
|
1129
|
-
* Registry of the ResizeObservation instances.
|
|
1130
|
-
*
|
|
1131
|
-
* @private {Map<Element, ResizeObservation>}
|
|
1132
|
-
*/
|
|
1133
|
-
this.observations_ = new MapShim();
|
|
1134
|
-
if (typeof callback !== 'function') {
|
|
1135
|
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
1136
|
-
}
|
|
1137
|
-
this.callback_ = callback;
|
|
1138
|
-
this.controller_ = controller;
|
|
1139
|
-
this.callbackCtx_ = callbackCtx;
|
|
1140
|
-
}
|
|
1141
|
-
/**
|
|
1142
|
-
* Starts observing provided element.
|
|
1143
|
-
*
|
|
1144
|
-
* @param {Element} target - Element to be observed.
|
|
1145
|
-
* @returns {void}
|
|
1146
|
-
*/
|
|
1147
|
-
ResizeObserverSPI.prototype.observe = function (target) {
|
|
1148
|
-
if (!arguments.length) {
|
|
1149
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
1150
|
-
}
|
|
1151
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
1152
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
1156
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1157
|
-
}
|
|
1158
|
-
var observations = this.observations_;
|
|
1159
|
-
// Do nothing if element is already being observed.
|
|
1160
|
-
if (observations.has(target)) {
|
|
1161
|
-
return;
|
|
1162
|
-
}
|
|
1163
|
-
observations.set(target, new ResizeObservation(target));
|
|
1164
|
-
this.controller_.addObserver(this);
|
|
1165
|
-
// Force the update of observations.
|
|
1166
|
-
this.controller_.refresh();
|
|
1167
|
-
};
|
|
1168
|
-
/**
|
|
1169
|
-
* Stops observing provided element.
|
|
1170
|
-
*
|
|
1171
|
-
* @param {Element} target - Element to stop observing.
|
|
1172
|
-
* @returns {void}
|
|
1173
|
-
*/
|
|
1174
|
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
1175
|
-
if (!arguments.length) {
|
|
1176
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
1177
|
-
}
|
|
1178
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
1179
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
1180
|
-
return;
|
|
1181
|
-
}
|
|
1182
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
1183
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1184
|
-
}
|
|
1185
|
-
var observations = this.observations_;
|
|
1186
|
-
// Do nothing if element is not being observed.
|
|
1187
|
-
if (!observations.has(target)) {
|
|
1188
|
-
return;
|
|
1189
|
-
}
|
|
1190
|
-
observations.delete(target);
|
|
1191
|
-
if (!observations.size) {
|
|
1192
|
-
this.controller_.removeObserver(this);
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
/**
|
|
1196
|
-
* Stops observing all elements.
|
|
1197
|
-
*
|
|
1198
|
-
* @returns {void}
|
|
1199
|
-
*/
|
|
1200
|
-
ResizeObserverSPI.prototype.disconnect = function () {
|
|
1201
|
-
this.clearActive();
|
|
1202
|
-
this.observations_.clear();
|
|
1203
|
-
this.controller_.removeObserver(this);
|
|
1204
|
-
};
|
|
1205
|
-
/**
|
|
1206
|
-
* Collects observation instances the associated element of which has changed
|
|
1207
|
-
* it's content rectangle.
|
|
1208
|
-
*
|
|
1209
|
-
* @returns {void}
|
|
1210
|
-
*/
|
|
1211
|
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
1212
|
-
var _this = this;
|
|
1213
|
-
this.clearActive();
|
|
1214
|
-
this.observations_.forEach(function (observation) {
|
|
1215
|
-
if (observation.isActive()) {
|
|
1216
|
-
_this.activeObservations_.push(observation);
|
|
1217
|
-
}
|
|
1218
|
-
});
|
|
1219
|
-
};
|
|
1220
|
-
/**
|
|
1221
|
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
1222
|
-
* instances collected from active resize observations.
|
|
1223
|
-
*
|
|
1224
|
-
* @returns {void}
|
|
1225
|
-
*/
|
|
1226
|
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
1227
|
-
// Do nothing if observer doesn't have active observations.
|
|
1228
|
-
if (!this.hasActive()) {
|
|
1229
|
-
return;
|
|
1230
|
-
}
|
|
1231
|
-
var ctx = this.callbackCtx_;
|
|
1232
|
-
// Create ResizeObserverEntry instance for every active observation.
|
|
1233
|
-
var entries = this.activeObservations_.map(function (observation) {
|
|
1234
|
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
1235
|
-
});
|
|
1236
|
-
this.callback_.call(ctx, entries, ctx);
|
|
1237
|
-
this.clearActive();
|
|
1238
|
-
};
|
|
1239
|
-
/**
|
|
1240
|
-
* Clears the collection of active observations.
|
|
1241
|
-
*
|
|
1242
|
-
* @returns {void}
|
|
1243
|
-
*/
|
|
1244
|
-
ResizeObserverSPI.prototype.clearActive = function () {
|
|
1245
|
-
this.activeObservations_.splice(0);
|
|
1246
|
-
};
|
|
1247
|
-
/**
|
|
1248
|
-
* Tells whether observer has active observations.
|
|
1249
|
-
*
|
|
1250
|
-
* @returns {boolean}
|
|
1251
|
-
*/
|
|
1252
|
-
ResizeObserverSPI.prototype.hasActive = function () {
|
|
1253
|
-
return this.activeObservations_.length > 0;
|
|
1254
|
-
};
|
|
1255
|
-
return ResizeObserverSPI;
|
|
1256
|
-
}());
|
|
1257
|
-
|
|
1258
|
-
// Registry of internal observers. If WeakMap is not available use current shim
|
|
1259
|
-
// for the Map collection as it has all required methods and because WeakMap
|
|
1260
|
-
// can't be fully polyfilled anyway.
|
|
1261
|
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
1262
|
-
/**
|
|
1263
|
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
1264
|
-
* exposing only those methods and properties that are defined in the spec.
|
|
1265
|
-
*/
|
|
1266
|
-
var ResizeObserver$1 = /** @class */ (function () {
|
|
1267
|
-
/**
|
|
1268
|
-
* Creates a new instance of ResizeObserver.
|
|
1269
|
-
*
|
|
1270
|
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
1271
|
-
* dimensions of the observed elements change.
|
|
1272
|
-
*/
|
|
1273
|
-
function ResizeObserver(callback) {
|
|
1274
|
-
if (!(this instanceof ResizeObserver)) {
|
|
1275
|
-
throw new TypeError('Cannot call a class as a function.');
|
|
1276
|
-
}
|
|
1277
|
-
if (!arguments.length) {
|
|
1278
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
1279
|
-
}
|
|
1280
|
-
var controller = ResizeObserverController.getInstance();
|
|
1281
|
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
1282
|
-
observers.set(this, observer);
|
|
1283
|
-
}
|
|
1284
|
-
return ResizeObserver;
|
|
1285
|
-
}());
|
|
1286
|
-
// Expose public methods of ResizeObserver.
|
|
1287
|
-
[
|
|
1288
|
-
'observe',
|
|
1289
|
-
'unobserve',
|
|
1290
|
-
'disconnect'
|
|
1291
|
-
].forEach(function (method) {
|
|
1292
|
-
ResizeObserver$1.prototype[method] = function () {
|
|
1293
|
-
var _a;
|
|
1294
|
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
1295
|
-
};
|
|
1296
|
-
});
|
|
1297
|
-
|
|
1298
|
-
var index = (function () {
|
|
1299
|
-
// Export existing implementation if available.
|
|
1300
|
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
1301
|
-
return global$1.ResizeObserver;
|
|
1302
|
-
}
|
|
1303
|
-
return ResizeObserver$1;
|
|
1304
|
-
})();
|
|
1305
|
-
|
|
1306
|
-
// =============================== Const ===============================
|
|
1307
|
-
var elementListeners = new Map();
|
|
1308
|
-
function onResize(entities) {
|
|
1309
|
-
entities.forEach(function (entity) {
|
|
1310
|
-
var _elementListeners$get;
|
|
1311
|
-
var target = entity.target;
|
|
1312
|
-
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
|
|
1313
|
-
return listener(target);
|
|
1314
|
-
});
|
|
1315
|
-
});
|
|
1316
|
-
}
|
|
1317
|
-
// Note: ResizeObserver polyfill not support option to measure border-box resize
|
|
1318
|
-
var resizeObserver = new index(onResize);
|
|
1319
|
-
// ============================== Observe ==============================
|
|
1320
|
-
function observe(element, callback) {
|
|
1321
|
-
if (!elementListeners.has(element)) {
|
|
1322
|
-
elementListeners.set(element, new Set());
|
|
1323
|
-
resizeObserver.observe(element);
|
|
1324
|
-
}
|
|
1325
|
-
elementListeners.get(element).add(callback);
|
|
1326
|
-
}
|
|
1327
|
-
function unobserve(element, callback) {
|
|
1328
|
-
if (elementListeners.has(element)) {
|
|
1329
|
-
elementListeners.get(element).delete(callback);
|
|
1330
|
-
if (!elementListeners.get(element).size) {
|
|
1331
|
-
resizeObserver.unobserve(element);
|
|
1332
|
-
elementListeners.delete(element);
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
function _classCallCheck(instance, Constructor) {
|
|
1338
|
-
if (!(instance instanceof Constructor)) {
|
|
1339
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
function _defineProperties(target, props) {
|
|
1344
|
-
for (var i = 0; i < props.length; i++) {
|
|
1345
|
-
var descriptor = props[i];
|
|
1346
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1347
|
-
descriptor.configurable = true;
|
|
1348
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1349
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1353
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1354
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1355
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
1356
|
-
writable: false
|
|
1357
|
-
});
|
|
1358
|
-
return Constructor;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
function _setPrototypeOf(o, p) {
|
|
1362
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1363
|
-
o.__proto__ = p;
|
|
1364
|
-
return o;
|
|
1365
|
-
};
|
|
1366
|
-
return _setPrototypeOf(o, p);
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
function _inherits(subClass, superClass) {
|
|
1370
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
1371
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
1372
|
-
}
|
|
1373
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
1374
|
-
constructor: {
|
|
1375
|
-
value: subClass,
|
|
1376
|
-
writable: true,
|
|
1377
|
-
configurable: true
|
|
1378
|
-
}
|
|
1379
|
-
});
|
|
1380
|
-
Object.defineProperty(subClass, "prototype", {
|
|
1381
|
-
writable: false
|
|
1382
|
-
});
|
|
1383
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
function _getPrototypeOf(o) {
|
|
1387
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
1388
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1389
|
-
};
|
|
1390
|
-
return _getPrototypeOf(o);
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
function _isNativeReflectConstruct() {
|
|
1394
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
1395
|
-
if (Reflect.construct.sham) return false;
|
|
1396
|
-
if (typeof Proxy === "function") return true;
|
|
1397
|
-
try {
|
|
1398
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
1399
|
-
return true;
|
|
1400
|
-
} catch (e) {
|
|
1401
|
-
return false;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
function _assertThisInitialized(self) {
|
|
1406
|
-
if (self === void 0) {
|
|
1407
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1408
|
-
}
|
|
1409
|
-
return self;
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
function _possibleConstructorReturn(self, call) {
|
|
1413
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
1414
|
-
return call;
|
|
1415
|
-
} else if (call !== void 0) {
|
|
1416
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
1417
|
-
}
|
|
1418
|
-
return _assertThisInitialized(self);
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
function _createSuper(Derived) {
|
|
1422
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
1423
|
-
return function _createSuperInternal() {
|
|
1424
|
-
var Super = _getPrototypeOf(Derived),
|
|
1425
|
-
result;
|
|
1426
|
-
if (hasNativeReflectConstruct) {
|
|
1427
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
1428
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
1429
|
-
} else {
|
|
1430
|
-
result = Super.apply(this, arguments);
|
|
1431
|
-
}
|
|
1432
|
-
return _possibleConstructorReturn(this, result);
|
|
1433
|
-
};
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
/**
|
|
1437
|
-
* Fallback to findDOMNode if origin ref do not provide any dom element
|
|
1438
|
-
*/
|
|
1439
|
-
var DomWrapper = /*#__PURE__*/function (_React$Component) {
|
|
1440
|
-
_inherits(DomWrapper, _React$Component);
|
|
1441
|
-
var _super = _createSuper(DomWrapper);
|
|
1442
|
-
function DomWrapper() {
|
|
1443
|
-
_classCallCheck(this, DomWrapper);
|
|
1444
|
-
return _super.apply(this, arguments);
|
|
1445
|
-
}
|
|
1446
|
-
_createClass(DomWrapper, [{
|
|
1447
|
-
key: "render",
|
|
1448
|
-
value: function render() {
|
|
1449
|
-
return this.props.children;
|
|
1450
|
-
}
|
|
1451
|
-
}]);
|
|
1452
|
-
return DomWrapper;
|
|
1453
|
-
}(react.Component);
|
|
1454
|
-
|
|
1455
|
-
var CollectionContext = /*#__PURE__*/react.createContext(null);
|
|
1456
|
-
/**
|
|
1457
|
-
* Collect all the resize event from children ResizeObserver
|
|
1458
|
-
*/
|
|
1459
|
-
function Collection(_ref) {
|
|
1460
|
-
var children = _ref.children,
|
|
1461
|
-
onBatchResize = _ref.onBatchResize;
|
|
1462
|
-
var resizeIdRef = react.useRef(0);
|
|
1463
|
-
var resizeInfosRef = react.useRef([]);
|
|
1464
|
-
var onCollectionResize = react.useContext(CollectionContext);
|
|
1465
|
-
var onResize = react.useCallback(function (size, element, data) {
|
|
1466
|
-
resizeIdRef.current += 1;
|
|
1467
|
-
var currentId = resizeIdRef.current;
|
|
1468
|
-
resizeInfosRef.current.push({
|
|
1469
|
-
size: size,
|
|
1470
|
-
element: element,
|
|
1471
|
-
data: data
|
|
1472
|
-
});
|
|
1473
|
-
Promise.resolve().then(function () {
|
|
1474
|
-
if (currentId === resizeIdRef.current) {
|
|
1475
|
-
onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
|
|
1476
|
-
resizeInfosRef.current = [];
|
|
1477
|
-
}
|
|
1478
|
-
});
|
|
1479
|
-
// Continue bubbling if parent exist
|
|
1480
|
-
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
|
|
1481
|
-
}, [onBatchResize, onCollectionResize]);
|
|
1482
|
-
return /*#__PURE__*/react.createElement(CollectionContext.Provider, {
|
|
1483
|
-
value: onResize
|
|
1484
|
-
}, children);
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
function SingleObserver(props, ref) {
|
|
1488
|
-
var children = props.children,
|
|
1489
|
-
disabled = props.disabled;
|
|
1490
|
-
var elementRef = react.useRef(null);
|
|
1491
|
-
var wrapperRef = react.useRef(null);
|
|
1492
|
-
var onCollectionResize = react.useContext(CollectionContext);
|
|
1493
|
-
// =========================== Children ===========================
|
|
1494
|
-
var isRenderProps = typeof children === 'function';
|
|
1495
|
-
var mergedChildren = isRenderProps ? children(elementRef) : children;
|
|
1496
|
-
// ============================= Size =============================
|
|
1497
|
-
var sizeRef = react.useRef({
|
|
1498
|
-
width: -1,
|
|
1499
|
-
height: -1,
|
|
1500
|
-
offsetWidth: -1,
|
|
1501
|
-
offsetHeight: -1
|
|
1502
|
-
});
|
|
1503
|
-
// ============================= Ref ==============================
|
|
1504
|
-
var canRef = !isRenderProps && /*#__PURE__*/react.isValidElement(mergedChildren) && supportRef(mergedChildren);
|
|
1505
|
-
var originRef = canRef ? mergedChildren.ref : null;
|
|
1506
|
-
var mergedRef = react.useMemo(function () {
|
|
1507
|
-
return composeRef(originRef, elementRef);
|
|
1508
|
-
}, [originRef, elementRef]);
|
|
1509
|
-
var getDom = function getDom() {
|
|
1510
|
-
return findDOMNode(elementRef.current) || findDOMNode(wrapperRef.current);
|
|
1511
|
-
};
|
|
1512
|
-
react.useImperativeHandle(ref, function () {
|
|
1513
|
-
return getDom();
|
|
1514
|
-
});
|
|
1515
|
-
// =========================== Observe ============================
|
|
1516
|
-
var propsRef = react.useRef(props);
|
|
1517
|
-
propsRef.current = props;
|
|
1518
|
-
// Handler
|
|
1519
|
-
var onInternalResize = react.useCallback(function (target) {
|
|
1520
|
-
var _propsRef$current = propsRef.current,
|
|
1521
|
-
onResize = _propsRef$current.onResize,
|
|
1522
|
-
data = _propsRef$current.data;
|
|
1523
|
-
var _target$getBoundingCl = target.getBoundingClientRect(),
|
|
1524
|
-
width = _target$getBoundingCl.width,
|
|
1525
|
-
height = _target$getBoundingCl.height;
|
|
1526
|
-
var offsetWidth = target.offsetWidth,
|
|
1527
|
-
offsetHeight = target.offsetHeight;
|
|
1528
|
-
/**
|
|
1529
|
-
* Resize observer trigger when content size changed.
|
|
1530
|
-
* In most case we just care about element size,
|
|
1531
|
-
* let's use `boundary` instead of `contentRect` here to avoid shaking.
|
|
1532
|
-
*/
|
|
1533
|
-
var fixedWidth = Math.floor(width);
|
|
1534
|
-
var fixedHeight = Math.floor(height);
|
|
1535
|
-
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
|
|
1536
|
-
var size = {
|
|
1537
|
-
width: fixedWidth,
|
|
1538
|
-
height: fixedHeight,
|
|
1539
|
-
offsetWidth: offsetWidth,
|
|
1540
|
-
offsetHeight: offsetHeight
|
|
1541
|
-
};
|
|
1542
|
-
sizeRef.current = size;
|
|
1543
|
-
// IE is strange, right?
|
|
1544
|
-
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
|
|
1545
|
-
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
|
|
1546
|
-
var sizeInfo = _objectSpread2(_objectSpread2({}, size), {}, {
|
|
1547
|
-
offsetWidth: mergedOffsetWidth,
|
|
1548
|
-
offsetHeight: mergedOffsetHeight
|
|
1549
|
-
});
|
|
1550
|
-
// Let collection know what happened
|
|
1551
|
-
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
|
|
1552
|
-
if (onResize) {
|
|
1553
|
-
// defer the callback but not defer to next frame
|
|
1554
|
-
Promise.resolve().then(function () {
|
|
1555
|
-
onResize(sizeInfo, target);
|
|
1556
|
-
});
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
}, []);
|
|
1560
|
-
// Dynamic observe
|
|
1561
|
-
react.useEffect(function () {
|
|
1562
|
-
var currentElement = getDom();
|
|
1563
|
-
if (currentElement && !disabled) {
|
|
1564
|
-
observe(currentElement, onInternalResize);
|
|
1565
|
-
}
|
|
1566
|
-
return function () {
|
|
1567
|
-
return unobserve(currentElement, onInternalResize);
|
|
1568
|
-
};
|
|
1569
|
-
}, [elementRef.current, disabled]);
|
|
1570
|
-
// ============================ Render ============================
|
|
1571
|
-
return /*#__PURE__*/react.createElement(DomWrapper, {
|
|
1572
|
-
ref: wrapperRef
|
|
1573
|
-
}, canRef ? /*#__PURE__*/react.cloneElement(mergedChildren, {
|
|
1574
|
-
ref: mergedRef
|
|
1575
|
-
}) : mergedChildren);
|
|
1576
|
-
}
|
|
1577
|
-
var RefSingleObserver = /*#__PURE__*/react.forwardRef(SingleObserver);
|
|
1578
|
-
|
|
1579
|
-
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
|
|
1580
|
-
function ResizeObserver(props, ref) {
|
|
1581
|
-
var children = props.children;
|
|
1582
|
-
var childNodes = typeof children === 'function' ? [children] : toArray(children);
|
|
1583
|
-
return childNodes.map(function (child, index) {
|
|
1584
|
-
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
|
|
1585
|
-
return /*#__PURE__*/react.createElement(RefSingleObserver, _extends({}, props, {
|
|
1586
|
-
key: key,
|
|
1587
|
-
ref: index === 0 ? ref : undefined
|
|
1588
|
-
}), child);
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
|
-
var RefResizeObserver = /*#__PURE__*/react.forwardRef(ResizeObserver);
|
|
1592
|
-
RefResizeObserver.Collection = Collection;
|
|
1593
|
-
|
|
1594
|
-
export { RefResizeObserver as R, _typeof$1 as _, useLayoutUpdateEffect as a, useMemo as b, wrapperRaf as c, useLayoutEffect as d, canUseDom as e, useComposeRef as f, fillRef as g, findDOMNode as h, isDOM as i, composeRef as j, supportRef as s, useEvent as u, warningOnce as w };
|