@redvars/peacock 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseField-CAog9TIc.js → BaseField-BMumJpkW.js} +6 -3
- package/dist/BaseField-BMumJpkW.js.map +1 -0
- package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-mWdyYv27.js} +6 -3
- package/dist/BaseInput-mWdyYv27.js.map +1 -0
- package/dist/accordion.js.map +1 -1
- package/dist/ai-badge.js +2 -2
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-button-Do2TUy8M.js → base-button-BJMGMcMv.js} +3 -1
- package/dist/base-button-BJMGMcMv.js.map +1 -0
- package/dist/{base-progress-BiLlZVHJ.js → base-progress-CvLVSjuy.js} +4 -2
- package/dist/base-progress-CvLVSjuy.js.map +1 -0
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/button-group.js +4 -4
- package/dist/button.js +3 -3
- package/dist/calendar.js +2 -2
- package/dist/canvas-base-BTQMEVn_.js +788 -0
- package/dist/canvas-base-BTQMEVn_.js.map +1 -0
- package/dist/canvas-link-CtgsALq4.js +54 -0
- package/dist/canvas-link-CtgsALq4.js.map +1 -0
- package/dist/{cartesian-chart-C-f1frt0.js → cartesian-chart-DM1FC_XT.js} +3 -2
- package/dist/cartesian-chart-DM1FC_XT.js.map +1 -0
- package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-B6fa4Lll.js} +2 -2
- package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-B6fa4Lll.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +5 -4
- package/dist/chart-area.js.map +1 -1
- package/dist/chart-bar.js +5 -4
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-base-Dhxuw_Mw.js +833 -0
- package/dist/chart-base-Dhxuw_Mw.js.map +1 -0
- package/dist/chart-doughnut.js +4 -3
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-line.js +5 -4
- package/dist/chart-line.js.map +1 -1
- package/dist/chart-pie.js +4 -3
- package/dist/chart-pie.js.map +1 -1
- package/dist/chat-message.js +2 -2
- package/dist/chat-thread.js +2 -2
- package/dist/checkbox-group.js +4 -4
- package/dist/checkbox.js +4 -4
- package/dist/chip-set.js +3 -3
- package/dist/chip.js +4 -4
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +5 -4
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +5 -5
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +5 -5
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +5 -5
- package/dist/custom-elements-jsdocs.json +2115 -336
- package/dist/custom-elements.json +19483 -615
- package/dist/date-field.js +6 -6
- package/dist/date-picker.js +4 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-field.js +6 -6
- package/dist/datetime-field.js +6 -6
- package/dist/dependency-map-layout-5KUueabk.js +1390 -0
- package/dist/dependency-map-layout-5KUueabk.js.map +1 -0
- package/dist/dependency-map.js +1605 -0
- package/dist/dependency-map.js.map +1 -0
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/diagram-2r11KySs.js +2029 -0
- package/dist/diagram-2r11KySs.js.map +1 -0
- package/dist/diagram-controls.js +345 -0
- package/dist/diagram-controls.js.map +1 -0
- package/dist/diagram-minimap.js +216 -0
- package/dist/diagram-minimap.js.map +1 -0
- package/dist/diagram.js +20 -0
- package/dist/diagram.js.map +1 -0
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +2 -2
- package/dist/discussion-comment.js +2 -2
- package/dist/discussion.js +5 -5
- package/dist/{document-editor-BO7QPbO5.js → document-editor-BnEugM3E.js} +2 -2
- package/dist/{document-editor-BO7QPbO5.js.map → document-editor-BnEugM3E.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +2 -2
- package/dist/erd.js +2021 -0
- package/dist/erd.js.map +1 -0
- package/dist/fab.js +4 -4
- package/dist/field.js +257 -43
- package/dist/field.js.map +1 -1
- package/dist/file-upload.js +37 -15
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +27 -970
- package/dist/flow.js.map +1 -1
- package/dist/focus-ring.js +2 -0
- package/dist/focus-ring.js.map +1 -1
- package/dist/{form-associated-D3Tn33s_.js → form-associated-BHbg72PG.js} +3 -1
- package/dist/{form-associated-D3Tn33s_.js.map → form-associated-BHbg72PG.js.map} +1 -1
- package/dist/{form-submitter-DWwv6K9-.js → form-submitter-beG1CXAn.js} +7 -1
- package/dist/{form-submitter-DWwv6K9-.js.map → form-submitter-beG1CXAn.js.map} +1 -1
- package/dist/form.js +2 -2
- package/dist/{generative-view-DmtpDobn.js → generative-view-BgOcLRXr.js} +13 -13
- package/dist/generative-view-BgOcLRXr.js.map +1 -0
- package/dist/generative-view.js +3 -3
- package/dist/geometry-INg82Lxq.js +305 -0
- package/dist/geometry-INg82Lxq.js.map +1 -0
- package/dist/history-YbTSQZHj.js +45 -0
- package/dist/history-YbTSQZHj.js.map +1 -0
- package/dist/host-CZK7xhzh.js +40 -0
- package/dist/host-CZK7xhzh.js.map +1 -0
- package/dist/html-editor.js +5 -5
- package/dist/{hyperlink-DhE9RlVS.js → hyperlink-DycWPKwU.js} +10 -1
- package/dist/hyperlink-DycWPKwU.js.map +1 -0
- package/dist/{i18n-controller-urcQKYGe.js → i18n-controller-Cp43HjJl.js} +2 -2
- package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-Cp43HjJl.js.map} +1 -1
- package/dist/icon-button.js +4 -4
- package/dist/image.js +2 -2
- package/dist/index.js +37 -18
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +4 -4
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/link-button.js +2 -2
- package/dist/list-item.js +2 -2
- package/dist/list.js +2 -2
- package/dist/listbox.js +3 -3
- package/dist/loader-full.js +13 -13
- package/dist/loader.js +44 -15
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +5 -5
- package/dist/markers-BFmh1OCz.js +46 -0
- package/dist/markers-BFmh1OCz.js.map +1 -0
- package/dist/measure-controller-Dmc5hZKg.js +89 -0
- package/dist/measure-controller-Dmc5hZKg.js.map +1 -0
- package/dist/mention-input.js +6 -5
- package/dist/mention-input.js.map +1 -1
- package/dist/menu-item.js +3 -2
- package/dist/menu-item.js.map +1 -1
- package/dist/menu.js +2 -2
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +2 -2
- package/dist/number-field.js +6 -5
- package/dist/number-field.js.map +1 -1
- package/dist/option.js +2 -2
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +5 -5
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +5 -5
- package/dist/{picker-field-B4DtcJfL.js → picker-field-dTlIMAQn.js} +3 -3
- package/dist/{picker-field-B4DtcJfL.js.map → picker-field-dTlIMAQn.js.map} +1 -1
- package/dist/pin-input.js +5 -5
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +5 -5
- package/dist/radio-group.js +1 -0
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.js +5 -5
- package/dist/radio.js.map +1 -1
- package/dist/rating.js +5 -4
- package/dist/rating.js.map +1 -1
- package/dist/redvars-loader.js +2 -2
- package/dist/relative-time.js +2 -2
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-DLICqof1.js → rich-text-input-DM_BOzgk.js} +3 -3
- package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-DM_BOzgk.js.map} +1 -1
- package/dist/ripple.js +2 -0
- package/dist/ripple.js.map +1 -1
- package/dist/{schema-hMt-NRLk.js → schema-B8g30A_n.js} +2 -2
- package/dist/{schema-hMt-NRLk.js.map → schema-B8g30A_n.js.map} +1 -1
- package/dist/search.js +4 -4
- package/dist/segmented-button-group.js +1 -1
- package/dist/select.js +7 -7
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +5 -4
- package/dist/signature-pad.js.map +1 -1
- package/dist/slider.js +5 -4
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +2 -2
- package/dist/src/__internal/diagram/canvas-base.d.ts +105 -0
- package/dist/src/__internal/diagram/canvas-link.d.ts +21 -0
- package/dist/src/__internal/diagram/geometry.d.ts +49 -0
- package/dist/src/__internal/diagram/history.d.ts +17 -0
- package/dist/src/__internal/diagram/host.d.ts +45 -0
- package/dist/src/__internal/diagram/markers.d.ts +16 -0
- package/dist/src/__internal/diagram/measure-controller.d.ts +32 -0
- package/dist/src/__internal/diagram/motion.d.ts +22 -0
- package/dist/src/__internal/diagram/selection.d.ts +20 -0
- package/dist/src/__internal/diagram/types.d.ts +39 -0
- package/dist/src/__internal/diagram/viewport-controller.d.ts +89 -0
- package/dist/src/__internal/i18n/strings.d.ts +149 -0
- package/dist/src/__internal/toggle-base.d.ts +8 -0
- package/dist/src/__internal/utils/deprecate.d.ts +3 -3
- package/dist/src/accordion/accordion.d.ts +1 -0
- package/dist/src/code-editor/code-editor.d.ts +1 -0
- package/dist/src/date-picker/date-picker.d.ts +2 -0
- package/dist/src/dependency-map/dependency-map-layout.d.ts +48 -0
- package/dist/src/dependency-map/dependency-map.d.ts +241 -0
- package/dist/src/dependency-map/index.d.ts +2 -0
- package/dist/src/diagram/diagram.d.ts +300 -0
- package/dist/src/diagram/flow.d.ts +53 -0
- package/dist/src/diagram/index.d.ts +4 -0
- package/dist/src/diagram-controls/diagram-controls.d.ts +46 -0
- package/dist/src/diagram-controls/index.d.ts +1 -0
- package/dist/src/diagram-minimap/diagram-minimap.d.ts +39 -0
- package/dist/src/diagram-minimap/index.d.ts +1 -0
- package/dist/src/erd/erd-layout.d.ts +27 -0
- package/dist/src/erd/erd.d.ts +266 -0
- package/dist/src/erd/index.d.ts +2 -0
- package/dist/src/field/field.d.ts +38 -1
- package/dist/src/file-upload/file-upload.d.ts +3 -1
- package/dist/src/focus-ring/focus-ring.d.ts +2 -0
- package/dist/src/index.d.ts +15 -2
- package/dist/src/input/BaseField.d.ts +3 -0
- package/dist/src/input/BaseInput.d.ts +3 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +1 -0
- package/dist/src/number-field/number-field.d.ts +4 -0
- package/dist/src/progress/base-progress.d.ts +3 -0
- package/dist/src/radio/radio-group.d.ts +1 -0
- package/dist/src/rating/rating.d.ts +1 -0
- package/dist/src/ripple/ripple.d.ts +2 -0
- package/dist/src/signature-pad/signature-pad.d.ts +1 -0
- package/dist/src/slider/slider.d.ts +1 -0
- package/dist/src/switch/switch.d.ts +1 -0
- package/dist/src/tabs/tab.d.ts +2 -0
- package/dist/src/tabs/tabs.d.ts +1 -0
- package/dist/src/textarea/textarea.d.ts +1 -0
- package/dist/src/time-picker/time-picker.d.ts +2 -0
- package/dist/src/transfer-list/transfer-list.d.ts +1 -0
- package/dist/src/tree-chart/index.d.ts +2 -0
- package/dist/src/tree-chart/tree-chart-layout.d.ts +49 -0
- package/dist/src/tree-chart/tree-chart.d.ts +221 -0
- package/dist/src/workflow/index.d.ts +2 -0
- package/dist/src/workflow/workflow-format.d.ts +5 -0
- package/dist/src/workflow/workflow-model.d.ts +194 -0
- package/dist/src/workflow/workflow.d.ts +313 -0
- package/dist/src/workflow-timeline/index.d.ts +1 -0
- package/dist/src/workflow-timeline/workflow-timeline.d.ts +41 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-DmbqMTfs.js → strings-BJPuhKJk.js} +163 -1
- package/dist/{strings-DmbqMTfs.js.map → strings-BJPuhKJk.js.map} +1 -1
- package/dist/sub-menu.js +2 -2
- package/dist/svg.js +2 -2
- package/dist/switch.js +5 -4
- package/dist/switch.js.map +1 -1
- package/dist/tab.js +1 -0
- package/dist/tab.js.map +1 -1
- package/dist/table.js +2 -2
- package/dist/tabs.js +1 -0
- package/dist/tabs.js.map +1 -1
- package/dist/test/diagram-controls.test.d.ts +1 -0
- package/dist/test/diagram-geometry.test.d.ts +1 -0
- package/dist/test/diagram.test.d.ts +1 -0
- package/dist/test/erd.test.d.ts +1 -0
- package/dist/test/toggle-label.test.d.ts +1 -0
- package/dist/test/tree-chart.test.d.ts +1 -0
- package/dist/test/workflow-debug.test.d.ts +1 -0
- package/dist/test/workflow.test.d.ts +1 -0
- package/dist/textarea.js +7 -5
- package/dist/textarea.js.map +1 -1
- package/dist/time-field.js +6 -6
- package/dist/time-picker.js +4 -2
- package/dist/time-picker.js.map +1 -1
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-BQO5pjrU.js → toggle-base-BlaHalfS.js} +19 -3
- package/dist/toggle-base-BlaHalfS.js.map +1 -0
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +5 -4
- package/dist/transfer-list.js.map +1 -1
- package/dist/{chart-base-B-gOg2Di.js → transform-CxeQFXXB.js} +9 -839
- package/dist/transform-CxeQFXXB.js.map +1 -0
- package/dist/tree-chart.js +1986 -0
- package/dist/tree-chart.js.map +1 -0
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +5 -5
- package/dist/user-menu.js +2 -2
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-format-BsyveyeC.js +34 -0
- package/dist/workflow-format-BsyveyeC.js.map +1 -0
- package/dist/workflow-model-CauduOG2.js +330 -0
- package/dist/workflow-model-CauduOG2.js.map +1 -0
- package/dist/workflow-timeline.js +354 -0
- package/dist/workflow-timeline.js.map +1 -0
- package/dist/workflow.js +3337 -0
- package/dist/workflow.js.map +1 -0
- package/dist/workspace-switcher.js +2 -2
- package/package.json +1 -1
- package/readme.md +44 -2
- package/src/LoaderUtils.ts +9 -2
- package/src/__internal/diagram/canvas-base.ts +410 -0
- package/src/__internal/diagram/canvas-link.ts +66 -0
- package/src/__internal/diagram/geometry.ts +372 -0
- package/src/__internal/diagram/history.ts +49 -0
- package/src/__internal/diagram/host.ts +76 -0
- package/src/__internal/diagram/markers.ts +56 -0
- package/src/__internal/diagram/measure-controller.ts +104 -0
- package/src/__internal/diagram/motion.ts +89 -0
- package/src/__internal/diagram/selection.ts +69 -0
- package/src/__internal/diagram/types.ts +56 -0
- package/src/__internal/diagram/viewport-controller.ts +494 -0
- package/src/__internal/i18n/strings.ts +201 -0
- package/src/__internal/mixins/field.ts +3 -0
- package/src/__internal/mixins/form-associated.ts +2 -0
- package/src/__internal/mixins/form-submitter.ts +6 -0
- package/src/__internal/mixins/hyperlink.ts +10 -0
- package/src/__internal/toggle-base.ts +16 -0
- package/src/__internal/utils/deprecate.ts +5 -4
- package/src/accordion/accordion.ts +1 -0
- package/src/button/base-button/base-button.ts +2 -0
- package/src/code-editor/code-editor.ts +1 -0
- package/src/date-picker/date-picker.ts +2 -0
- package/src/dependency-map/dependency-map-layout.ts +505 -0
- package/src/dependency-map/dependency-map.scss +626 -0
- package/src/dependency-map/dependency-map.ts +1280 -0
- package/src/dependency-map/index.ts +16 -0
- package/src/diagram/diagram.scss +513 -0
- package/src/diagram/diagram.ts +1852 -0
- package/src/diagram/flow.ts +81 -0
- package/src/diagram/index.ts +44 -0
- package/src/diagram-controls/diagram-controls.scss +68 -0
- package/src/diagram-controls/diagram-controls.ts +255 -0
- package/src/diagram-controls/index.ts +1 -0
- package/src/diagram-minimap/diagram-minimap.scss +41 -0
- package/src/diagram-minimap/diagram-minimap.ts +149 -0
- package/src/diagram-minimap/index.ts +1 -0
- package/src/erd/erd-layout.ts +92 -0
- package/src/erd/erd.scss +636 -0
- package/src/erd/erd.ts +1728 -0
- package/src/erd/index.ts +17 -0
- package/src/field/field.scss +197 -23
- package/src/field/field.ts +109 -16
- package/src/file-upload/file-upload.scss +37 -10
- package/src/file-upload/file-upload.ts +3 -1
- package/src/focus-ring/focus-ring.ts +2 -0
- package/src/generative-view/catalog.generated.ts +12 -11
- package/src/index.ts +121 -2
- package/src/input/BaseField.ts +3 -0
- package/src/input/BaseInput.ts +3 -0
- package/src/loader.ts +25 -0
- package/src/mention-input/mention-input.scss +2 -0
- package/src/menu/menu-item/menu-item.ts +1 -0
- package/src/number-field/number-field.ts +4 -0
- package/src/progress/base-progress.ts +3 -0
- package/src/radio/radio-group.ts +1 -0
- package/src/radio/radio.ts +1 -1
- package/src/rating/rating.ts +1 -0
- package/src/ripple/ripple.ts +2 -0
- package/src/signature-pad/signature-pad.ts +1 -0
- package/src/slider/slider.ts +1 -0
- package/src/switch/switch.ts +1 -0
- package/src/tabs/tab.ts +2 -0
- package/src/tabs/tabs.ts +1 -0
- package/src/textarea/textarea.scss +2 -0
- package/src/textarea/textarea.ts +1 -0
- package/src/time-picker/time-picker.ts +2 -0
- package/src/transfer-list/transfer-list.ts +1 -0
- package/src/tree-chart/index.ts +13 -0
- package/src/tree-chart/tree-chart-layout.ts +185 -0
- package/src/tree-chart/tree-chart.scss +377 -0
- package/src/tree-chart/tree-chart.ts +1170 -0
- package/src/workflow/index.ts +35 -0
- package/src/workflow/workflow-format.ts +29 -0
- package/src/workflow/workflow-model.ts +583 -0
- package/src/workflow/workflow.scss +1164 -0
- package/src/workflow/workflow.ts +2674 -0
- package/src/workflow-timeline/index.ts +1 -0
- package/src/workflow-timeline/workflow-timeline.scss +128 -0
- package/src/workflow-timeline/workflow-timeline.ts +238 -0
- package/dist/BaseField-CAog9TIc.js.map +0 -1
- package/dist/BaseInput-CcMfg1Y2.js.map +0 -1
- package/dist/base-button-Do2TUy8M.js.map +0 -1
- package/dist/base-progress-BiLlZVHJ.js.map +0 -1
- package/dist/cartesian-chart-C-f1frt0.js.map +0 -1
- package/dist/chart-base-B-gOg2Di.js.map +0 -1
- package/dist/generative-view-DmtpDobn.js.map +0 -1
- package/dist/hyperlink-DhE9RlVS.js.map +0 -1
- package/dist/src/flow/flow.d.ts +0 -178
- package/dist/src/flow/index.d.ts +0 -2
- package/dist/toggle-base-BQO5pjrU.js.map +0 -1
- package/src/button/button-group/readme.md +0 -23
- package/src/flow/flow.scss +0 -215
- package/src/flow/flow.ts +0 -958
- package/src/flow/index.ts +0 -10
- /package/dist/test/{flow.test.d.ts → dependency-map.test.d.ts} +0 -0
package/dist/file-upload.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.js","sources":["../../src/file-upload/file-upload.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { I18nController } from '@/__internal/i18n/i18n-controller.js';\nimport {\n type FormRestoreState,\n type FormValue,\n getFormValue,\n} from '@/__internal/mixins/form-associated.js';\nimport IndividualComponent from '@/IndividualComponent.js';\n\nimport BaseInput, { type ControlValidity } from '../input/BaseInput.js';\nimport styles from './file-upload.scss';\n\n/** Why a file was not added. */\nexport type FileRejectionReason = 'type' | 'size' | 'count';\n\n/** A file that was not added, with the reason. */\nexport interface FileRejection {\n file: File;\n reason: FileRejectionReason;\n}\n\n/**\n * What the app reports about one listed file while it uploads it. `error` wins over `done`, which\n * wins over `progress`.\n */\nexport interface FileState {\n /** Upload progress from 0 to 100; shows a progress bar. `undefined` hides it. */\n progress?: number;\n /** An error message to show under the file, such as \"Upload failed\". */\n error?: string;\n /** The file is uploaded. */\n done?: boolean;\n}\n\n/** `detail` of `change`: the accepted files, as `value` (the field convention). */\nexport interface FileUploadChangeDetail {\n value: File[];\n}\n\n/** `detail` of `reject`. */\nexport interface FileUploadRejectDetail {\n files: FileRejection[];\n}\n\n/** `detail` of `remove`. */\nexport interface FileUploadRemoveDetail {\n file: File;\n}\n\nconst SIZE_UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'];\n\n/** Formats a size in bytes with `Intl`, in decimal units: \"512 bytes\", \"1.5 MB\". */\nexport function formatFileSize(bytes: number, locale: string): string {\n let size = Math.max(0, bytes);\n let unit = 0;\n while (size >= 1000 && unit < SIZE_UNITS.length - 1) {\n size /= 1000;\n unit += 1;\n }\n return new Intl.NumberFormat(locale, {\n style: 'unit',\n unit: SIZE_UNITS[unit],\n unitDisplay: unit === 0 ? 'long' : 'short',\n maximumFractionDigits: unit === 0 ? 0 : 1,\n }).format(size);\n}\n\n/** Whether `file` matches an `accept` list, as `<input type=\"file\" accept>` reads it. */\nexport function matchesAccept(file: File, accept: string): boolean {\n const tokens = accept\n .split(',')\n .map(token => token.trim().toLowerCase())\n .filter(Boolean);\n if (!tokens.length) return true;\n const name = file.name.toLowerCase();\n const type = file.type.toLowerCase();\n return tokens.some(token => {\n if (token.startsWith('.')) return name.endsWith(token);\n if (token.endsWith('/*')) return type.startsWith(token.slice(0, -1));\n return type === token;\n });\n}\n\n/** Whether two files are the same file chosen twice. */\nfunction sameFile(a: File, b: File): boolean {\n return (\n a === b ||\n (a.name === b.name &&\n a.size === b.size &&\n a.lastModified === b.lastModified &&\n a.type === b.type)\n );\n}\n\nlet fileUploadCount = 0;\n\n/**\n * @label File Upload\n * @tag wc-file-upload\n * @rawTag file-upload\n *\n * @summary A drop zone and file picker that collects files into a list, for the app to upload.\n * @overview\n * <p>File upload collects files: the person drops them on the zone, or activates it (click, Enter\n * or Space) to open the system file picker. Chosen files are listed with their name and size and a\n * button that removes them. The component uploads nothing itself: the app listens for\n * <code>change</code>, uploads <code>files</code> however it likes and reports back per file with\n * <code>setFileState(file, { progress, error, done })</code>, which shows a progress bar, an error\n * or a done mark on that file.</p>\n * <p><code>accept</code>, <code>max-size</code> (bytes per file) and <code>max-files</code> (with\n * <code>multiple</code>) decide what is added. Files that do not fit are left out, listed in a short\n * message under the zone, and reported in a <code>reject</code> event. Without\n * <code>multiple</code>, a new file replaces the chosen one. A file that is already listed is not\n * added twice. Adding, removing and rejecting files is announced to screen readers.</p>\n * <p>Inside a <code><form></code> the files are submitted under <code>name</code>, like a\n * native file input; <code>required</code> blocks submission while no file is chosen, and\n * <code>form.reset()</code> clears the list. <code>readonly</code> shows the list without the drop\n * zone and the remove buttons.</p>\n *\n * @fires {CustomEvent<{value: File[], files: File[]}>} change - Dispatched when files are added or removed. `value` and `files` are the same array: the accepted files.\n * @fires {CustomEvent<{value: File[]}>} change - Dispatched when files are added or removed; `value` is the accepted files.\n * @fires {CustomEvent<{file: File}>} remove - Dispatched when the person removes a file, before `change`.\n *\n * @cssprop --file-upload-drop-zone-color - Background of the drop zone.\n * @cssprop --file-upload-drop-zone-border-color - Dashed border of the drop zone.\n * @cssprop --file-upload-drop-zone-shape - Corner radius of the drop zone.\n * @cssprop --file-upload-drop-zone-min-block-size - Minimum height of the drop zone.\n *\n * @example\n * ```html\n * <wc-file-upload label=\"Attachment\" name=\"attachment\"></wc-file-upload>\n * ```\n * @example\n * ```html\n * <wc-file-upload\n * label=\"Photos\"\n * name=\"photos\"\n * accept=\"image/*\"\n * multiple\n * max-files=\"5\"\n * max-size=\"5000000\"\n * helper-text=\"Up to 5 images, 5 MB each\"\n * ></wc-file-upload>\n * ```\n * @tags input, form\n */\n@IndividualComponent\nexport class FileUpload extends BaseInput {\n // ── Static ───────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n // `name` and `disabled` come from mixinFormAssociated; `readonly` and `required` from BaseInput.\n\n /** The accepted files, in the order they were added. Set it to replace or clear the list. */\n @property({ attribute: false })\n files: File[] = [];\n\n /**\n * The same array as `files`, under the name every field uses (`detail.value` in `change`).\n * Not reactive on its own: setting it sets `files`.\n */\n get value(): File[] {\n return this.files;\n }\n\n set value(value: File[] | null | undefined) {\n this.files = Array.isArray(value) ? [...value] : [];\n }\n\n /** File types to take, as on `<input type=\"file\" accept>`: `.pdf`, `image/png`, `image/*`. */\n @property({ type: String })\n accept = '';\n\n /** Takes more than one file; without it a new file replaces the chosen one. */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /** Largest size of one file, in bytes; larger files are rejected. Unset or 0 for no limit. */\n @property({ type: Number, attribute: 'max-size' })\n maxSize?: number;\n\n /** With `multiple`, the most files the list holds; more are rejected. Unset or 0 for no limit. */\n @property({ type: Number, attribute: 'max-files' })\n maxFiles?: number;\n\n /** Label shown above the drop zone; also part of its accessible name. */\n @property({ type: String })\n label = '';\n\n /** Help text shown below the drop zone, such as the accepted types and sizes. */\n @property({ type: String, attribute: 'helper-text' })\n helperText = '';\n\n /** Shows the component in its error state with `error-text`. */\n @property({ type: Boolean, reflect: true })\n error = false;\n\n @property({ type: String, attribute: 'error-text' })\n errorText = '';\n\n /** Locale for file sizes and percentages; defaults to the nearest `lang`. */\n @property({ type: String })\n locale?: string;\n\n // ── State ────────────────────────────────────────────────────────────────\n\n /** True while files are dragged over the drop zone. */\n @state() private dragging = false;\n\n /** The files left out of the last pick or drop. */\n @state() private rejections: FileRejection[] = [];\n\n /** Text of the polite live region. */\n @state() private announcement = '';\n\n // ── Queries ──────────────────────────────────────────────────────────────\n\n @query('.drop-zone') private dropZone?: HTMLElement;\n\n @query('.native-input') private nativeInput?: HTMLInputElement;\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** What the app reported per file through `setFileState()`. */\n private fileStates = new Map<File, FileState>();\n\n /** `dragenter` minus `dragleave` count, so leaving a child of the zone does not end the drag. */\n private dragDepth = 0;\n\n private readonly idPrefix = `wc-file-upload-${(fileUploadCount += 1)}`;\n\n /** Peacock's strings for the zone, the list and the announcements. */\n private readonly i18n = new I18nController(this);\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (changed.has('files')) {\n if (!Array.isArray(this.files)) this.files = [];\n for (const file of this.fileStates.keys()) {\n if (!this.files.includes(file)) this.fileStates.delete(file);\n }\n }\n }\n\n // ── Public methods ───────────────────────────────────────────────────────\n\n override focus() {\n this.dropZone?.focus();\n }\n\n override blur() {\n this.dropZone?.blur();\n }\n\n /**\n * Reports the upload state of a listed file; the given keys replace the ones set before, so\n * `setFileState(file, { progress: 40 })` keeps an earlier `error`. Files not in `files` are\n * ignored.\n */\n setFileState(file: File, fileState: FileState): void {\n if (!this.files.includes(file)) return;\n this.fileStates.set(file, { ...this.fileStates.get(file), ...fileState });\n this.requestUpdate();\n }\n\n /** The upload state reported for `file`; an empty object when none was. */\n getFileState(file: File): FileState {\n return { ...this.fileStates.get(file) };\n }\n\n /** Opens the system file picker. */\n showPicker(): void {\n if (!this.isInteractive) return;\n this.nativeInput?.click();\n }\n\n // ── Protected methods ────────────────────────────────────────────────────\n\n protected override computeValidity(): ControlValidity {\n if (this.required && !this.files.length && !this.disabled) {\n return {\n flags: { valueMissing: true },\n message: this.valueMissingText(),\n };\n }\n return { flags: {}, message: '' };\n }\n\n protected override valueMissingText(): string {\n return this.i18n.t('valueMissingFile');\n }\n\n protected override validityAnchor() {\n return this.dropZone ?? undefined;\n }\n\n override [getFormValue](): FormValue | null {\n // `files` is unset while the base classes construct.\n if (!this.name || !this.files?.length) return null;\n const data = new FormData();\n for (const file of this.files) data.append(this.name, file);\n return data;\n }\n\n override formResetCallback() {\n super.formResetCallback();\n this.files = [];\n this.rejections = [];\n }\n\n protected override parseRestoreState(restored: FormRestoreState): unknown {\n if (restored instanceof File) return [restored];\n if (Array.isArray(restored)) {\n return restored\n .map(([, entry]) => entry)\n .filter((entry): entry is File => entry instanceof File);\n }\n return [];\n }\n\n // ── Private methods ──────────────────────────────────────────────────────\n\n private get isInteractive(): boolean {\n return !this.disabled && !this.readonly;\n }\n\n /** Adds files from the picker or a drop, rejecting those that do not fit. */\n private addFiles(incoming: File[]) {\n if (!incoming.length) return;\n const kept = this.multiple ? this.files : [];\n let limit = 1;\n if (this.multiple) {\n limit = this.maxFiles && this.maxFiles > 0 ? this.maxFiles : Infinity;\n }\n const accepted: File[] = [];\n const rejected: FileRejection[] = [];\n\n for (const file of incoming) {\n const listed = [...kept, ...accepted];\n if (!matchesAccept(file, this.accept)) {\n rejected.push({ file, reason: 'type' });\n } else if (this.maxSize && this.maxSize > 0 && file.size > this.maxSize) {\n rejected.push({ file, reason: 'size' });\n } else if (listed.some(other => sameFile(other, file))) {\n // Already listed: nothing to add, nothing to report.\n } else if (listed.length >= limit) {\n rejected.push({ file, reason: 'count' });\n } else {\n accepted.push(file);\n }\n }\n\n this.rejections = rejected;\n const messages: string[] = [];\n if (accepted.length) {\n this.files = [...kept, ...accepted];\n messages.push(this.i18n.t('filesAdded')(accepted.length));\n }\n messages.push(...rejected.map(rejection => this.rejectionText(rejection)));\n if (messages.length) this.announce(messages.join('. '));\n\n if (rejected.length) {\n this.emit<FileUploadRejectDetail>('reject', { files: rejected });\n }\n if (accepted.length) this.emitChange();\n }\n\n private async removeFile(file: File) {\n const index = this.files.indexOf(file);\n if (index < 0 || !this.isInteractive) return;\n const hadFocus = !!this.shadowRoot?.activeElement;\n this.files = this.files.filter(other => other !== file);\n this.rejections = [];\n this.announce(this.i18n.t('fileRemoved')(file.name));\n this.emit<FileUploadRemoveDetail>('remove', { file });\n this.emitChange();\n\n if (!hadFocus) return;\n // Keep focus in the component: on the next file's remove button, else the drop zone.\n await this.updateComplete;\n const buttons = Array.from(\n this.shadowRoot?.querySelectorAll<HTMLElement>('.remove-button') ?? [],\n );\n const target = buttons[Math.min(index, buttons.length - 1)];\n if (target) target.focus();\n else this.focus();\n }\n\n private emit<T>(type: string, detail: T) {\n this.dispatchEvent(\n new CustomEvent<T>(type, { detail, bubbles: true, composed: true }),\n );\n }\n\n private emitChange() {\n this.emit<FileUploadChangeDetail>('change', { value: this.files });\n }\n\n private announce(message: string) {\n // Clear first, so the same message twice in a row is read again.\n this.announcement = '';\n setTimeout(() => {\n this.announcement = message;\n });\n }\n\n private rejectionText({ file, reason }: FileRejection): string {\n if (reason === 'type') return this.i18n.t('fileTypeRejected')(file.name);\n if (reason === 'size') {\n return this.i18n.t('fileSizeRejected')(\n file.name,\n formatFileSize(this.maxSize ?? 0, this.i18n.locale),\n );\n }\n return this.i18n.t('fileCountRejected')(\n file.name,\n this.multiple ? (this.maxFiles ?? 1) : 1,\n );\n }\n\n private handleZoneClick() {\n this.showPicker();\n }\n\n private handleZoneKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.showPicker();\n } else if (event.key === ' ') {\n // A button acts on Space when it is released; stop the page scrolling now.\n event.preventDefault();\n }\n }\n\n private handleZoneKeyUp(event: KeyboardEvent) {\n if (event.key === ' ') {\n event.preventDefault();\n this.showPicker();\n }\n }\n\n /** The native `input` escapes the shadow root too; the component reports `change` only. */\n // eslint-disable-next-line class-methods-use-this\n private stopNativeEvent(event: Event) {\n event.stopPropagation();\n }\n\n private handleNativeChange(event: Event) {\n // Replace the native event, which escapes the shadow root, with the component's own.\n event.stopPropagation();\n const input = event.target as HTMLInputElement;\n const picked = Array.from(input.files ?? []);\n // Clear the input so picking the same file again fires `change` again.\n input.value = '';\n this.addFiles(picked);\n }\n\n private handleDragEnter(event: DragEvent) {\n event.preventDefault();\n if (!this.isInteractive) return;\n this.dragDepth += 1;\n this.dragging = true;\n }\n\n private handleDragOver(event: DragEvent) {\n // Without this the browser opens a dropped file instead of handing it over.\n event.preventDefault();\n const { dataTransfer } = event;\n if (dataTransfer) {\n dataTransfer.dropEffect = this.isInteractive ? 'copy' : 'none';\n }\n }\n\n private handleDragLeave() {\n this.dragDepth = Math.max(0, this.dragDepth - 1);\n if (this.dragDepth === 0) this.dragging = false;\n }\n\n private handleDrop(event: DragEvent) {\n event.preventDefault();\n this.dragDepth = 0;\n this.dragging = false;\n if (!this.isInteractive) return;\n this.addFiles(Array.from(event.dataTransfer?.files ?? []));\n }\n\n // ── Render helpers ───────────────────────────────────────────────────────\n\n private renderDropZone(labelId: string, descriptionId: string | undefined) {\n if (this.readonly) return nothing;\n const promptId = `${this.idPrefix}-prompt`;\n return html`\n <div\n class=${classMap({ 'drop-zone': true, dragging: this.dragging })}\n role=\"button\"\n tabindex=${this.disabled ? '-1' : '0'}\n aria-labelledby=${this.label ? `${labelId} ${promptId}` : promptId}\n aria-describedby=${descriptionId ?? nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n @click=${this.handleZoneClick}\n @keydown=${this.handleZoneKeyDown}\n @keyup=${this.handleZoneKeyUp}\n @dragenter=${this.handleDragEnter}\n @dragover=${this.handleDragOver}\n @dragleave=${this.handleDragLeave}\n @drop=${this.handleDrop}\n >\n <wc-icon class=\"drop-icon\" name=\"upload\" aria-hidden=\"true\"></wc-icon>\n <span class=\"prompt\" id=${promptId}>\n ${this.multiple\n ? this.i18n.t('dropFilesHere')\n : this.i18n.t('dropFileHere')}\n <span class=\"browse\"\n >${this.multiple\n ? this.i18n.t('chooseFiles')\n : this.i18n.t('chooseFile')}</span\n >\n </span>\n </div>\n <input\n class=\"native-input\"\n type=\"file\"\n hidden\n tabindex=\"-1\"\n aria-hidden=\"true\"\n accept=${this.accept || nothing}\n ?multiple=${this.multiple}\n ?disabled=${this.disabled}\n @input=${this.stopNativeEvent}\n @change=${this.handleNativeChange}\n />\n `;\n }\n\n private renderFileStatus(file: File, fileState: FileState) {\n if (fileState.error) {\n return html`<div class=\"file-error\">${fileState.error}</div>`;\n }\n if (fileState.done) {\n return html`<div class=\"file-status\">\n ${this.i18n.t('fileUploaded')}\n </div>`;\n }\n if (typeof fileState.progress === 'number') {\n const progress = Math.min(100, Math.max(0, fileState.progress));\n const percent = new Intl.NumberFormat(this.i18n.locale, {\n style: 'percent',\n maximumFractionDigits: 0,\n }).format(progress / 100);\n return html`<div class=\"file-progress\">\n <wc-linear-progress\n class=\"progress-bar\"\n value=${progress}\n aria-label=${this.i18n.t('uploadingFile')(file.name)}\n ></wc-linear-progress>\n <span class=\"percent\" aria-hidden=\"true\">${percent}</span>\n </div>`;\n }\n return nothing;\n }\n\n private renderFile(file: File) {\n const fileState = this.fileStates.get(file) ?? {};\n let icon = 'draft';\n if (fileState.error) icon = 'error';\n else if (fileState.done) icon = 'check_circle';\n return html`\n <li\n class=${classMap({\n 'file-item': true,\n error: !!fileState.error,\n done: !fileState.error && !!fileState.done,\n })}\n >\n <wc-icon class=\"file-icon\" name=${icon} aria-hidden=\"true\"></wc-icon>\n <div class=\"file-body\">\n <div class=\"file-header\">\n <span class=\"file-name\">${file.name}</span>\n <span class=\"file-size\"\n >${formatFileSize(file.size, this.i18n.locale)}</span\n >\n </div>\n ${this.renderFileStatus(file, fileState)}\n </div>\n ${this.readonly\n ? nothing\n : html`<wc-icon-button\n class=\"remove-button\"\n shape=\"round\"\n variant=\"text\"\n size=\"xs\"\n aria-label=${this.i18n.t('removeFile')(file.name)}\n ?disabled=${this.disabled}\n @click=${() => this.removeFile(file)}\n >\n <wc-icon name=\"close\"></wc-icon>\n </wc-icon-button>`}\n </li>\n `;\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n const labelId = `${this.idPrefix}-label`;\n const descriptionId = `${this.idPrefix}-description`;\n const errorText = this.error ? this.errorText : this.validationText;\n const description = errorText || this.helperText;\n\n return html`\n <div\n class=${classMap({\n 'file-upload': true,\n disabled: this.disabled,\n readonly: this.readonly,\n 'has-error': this.error || !!errorText,\n })}\n >\n ${this.label\n ? html`<div class=\"label\" id=${labelId}>\n ${this.label}${this.required\n ? html`<span class=\"required\" aria-hidden=\"true\">*</span>`\n : nothing}\n </div>`\n : nothing}\n ${this.renderDropZone(labelId, description ? descriptionId : undefined)}\n ${description\n ? html`<div class=\"helper\" id=${descriptionId}>${description}</div>`\n : nothing}\n ${this.rejections.length\n ? html`<ul class=\"rejections\">\n ${this.rejections.map(\n rejection => html`<li>${this.rejectionText(rejection)}</li>`,\n )}\n </ul>`\n : nothing}\n ${this.files.length\n ? html`<ul\n class=\"file-list\"\n aria-label=${this.label || this.i18n.t('chosenFiles')}\n >\n ${this.files.map(file => this.renderFile(file))}\n </ul>`\n : nothing}\n <div class=\"screen-reader-only\" role=\"status\" aria-live=\"polite\">\n ${this.announcement}\n </div>\n </div>\n `;\n }\n}\n"],"names":["nothing","html","classMap","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;AAE3E;AACM,SAAU,cAAc,CAAC,KAAa,EAAE,MAAc,EAAA;IAC1D,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC;IAC7B,IAAI,IAAI,GAAG,CAAC;AACZ,IAAA,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACnD,IAAI,IAAI,IAAI;QACZ,IAAI,IAAI,CAAC;IACX;AACA,IAAA,OAAO,IAAI,IAAI,CAAC,YAAY,CA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AAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACV,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAKC,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGjB,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA4C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAGjC,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA6B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAIN,UAAA,CAAA;IAA5BC,CAAK,CAAC,YAAY;AAAiC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAEpB,UAAA,CAAA;IAA/BA,CAAK,CAAC,eAAe;AAAyC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AA1EpD,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CA2ftB;;;;"}
|
|
1
|
+
{"version":3,"file":"file-upload.js","sources":["../../src/file-upload/file-upload.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { I18nController } from '@/__internal/i18n/i18n-controller.js';\nimport {\n type FormRestoreState,\n type FormValue,\n getFormValue,\n} from '@/__internal/mixins/form-associated.js';\nimport IndividualComponent from '@/IndividualComponent.js';\n\nimport BaseInput, { type ControlValidity } from '../input/BaseInput.js';\nimport styles from './file-upload.scss';\n\n/** Why a file was not added. */\nexport type FileRejectionReason = 'type' | 'size' | 'count';\n\n/** A file that was not added, with the reason. */\nexport interface FileRejection {\n file: File;\n reason: FileRejectionReason;\n}\n\n/**\n * What the app reports about one listed file while it uploads it. `error` wins over `done`, which\n * wins over `progress`.\n */\nexport interface FileState {\n /** Upload progress from 0 to 100; shows a progress bar. `undefined` hides it. */\n progress?: number;\n /** An error message to show under the file, such as \"Upload failed\". */\n error?: string;\n /** The file is uploaded. */\n done?: boolean;\n}\n\n/** `detail` of `change`: the accepted files, as `value` (the field convention). */\nexport interface FileUploadChangeDetail {\n value: File[];\n}\n\n/** `detail` of `reject`. */\nexport interface FileUploadRejectDetail {\n files: FileRejection[];\n}\n\n/** `detail` of `remove`. */\nexport interface FileUploadRemoveDetail {\n file: File;\n}\n\nconst SIZE_UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'];\n\n/** Formats a size in bytes with `Intl`, in decimal units: \"512 bytes\", \"1.5 MB\". */\nexport function formatFileSize(bytes: number, locale: string): string {\n let size = Math.max(0, bytes);\n let unit = 0;\n while (size >= 1000 && unit < SIZE_UNITS.length - 1) {\n size /= 1000;\n unit += 1;\n }\n return new Intl.NumberFormat(locale, {\n style: 'unit',\n unit: SIZE_UNITS[unit],\n unitDisplay: unit === 0 ? 'long' : 'short',\n maximumFractionDigits: unit === 0 ? 0 : 1,\n }).format(size);\n}\n\n/** Whether `file` matches an `accept` list, as `<input type=\"file\" accept>` reads it. */\nexport function matchesAccept(file: File, accept: string): boolean {\n const tokens = accept\n .split(',')\n .map(token => token.trim().toLowerCase())\n .filter(Boolean);\n if (!tokens.length) return true;\n const name = file.name.toLowerCase();\n const type = file.type.toLowerCase();\n return tokens.some(token => {\n if (token.startsWith('.')) return name.endsWith(token);\n if (token.endsWith('/*')) return type.startsWith(token.slice(0, -1));\n return type === token;\n });\n}\n\n/** Whether two files are the same file chosen twice. */\nfunction sameFile(a: File, b: File): boolean {\n return (\n a === b ||\n (a.name === b.name &&\n a.size === b.size &&\n a.lastModified === b.lastModified &&\n a.type === b.type)\n );\n}\n\nlet fileUploadCount = 0;\n\n/**\n * @label File Upload\n * @tag wc-file-upload\n * @rawTag file-upload\n *\n * @summary A drop zone and file picker that collects files into a list, for the app to upload.\n * @overview\n * <p>File upload collects files: the person drops them on the zone, or activates it (click, Enter\n * or Space) to open the system file picker. Chosen files are listed with their name and size and a\n * button that removes them. The component uploads nothing itself: the app listens for\n * <code>change</code>, uploads <code>files</code> however it likes and reports back per file with\n * <code>setFileState(file, { progress, error, done })</code>, which shows a progress bar, an error\n * or a done mark on that file.</p>\n * <p><code>accept</code>, <code>max-size</code> (bytes per file) and <code>max-files</code> (with\n * <code>multiple</code>) decide what is added. Files that do not fit are left out, listed in a short\n * message under the zone, and reported in a <code>reject</code> event. Without\n * <code>multiple</code>, a new file replaces the chosen one. A file that is already listed is not\n * added twice. Adding, removing and rejecting files is announced to screen readers.</p>\n * <p>Inside a <code><form></code> the files are submitted under <code>name</code>, like a\n * native file input; <code>required</code> blocks submission while no file is chosen, and\n * <code>form.reset()</code> clears the list. <code>readonly</code> shows the list without the drop\n * zone and the remove buttons.</p>\n *\n * @fires {CustomEvent<{value: File[], files: File[]}>} change - Dispatched when files are added or removed. `value` and `files` are the same array: the accepted files.\n * @fires {CustomEvent<{value: File[]}>} change - Dispatched when files are added or removed; `value` is the accepted files.\n * @fires {CustomEvent<{file: File}>} remove - Dispatched when the person removes a file, before `change`.\n *\n * @cssprop --file-upload-drop-zone-color - Background of the drop zone. Defaults to `surface-container-lowest`, the fill of a default field.\n * @cssprop --file-upload-file-item-color - Background of each file row. Defaults to `surface-container-lowest`.\n * @cssprop --file-upload-drop-zone-border-color - Dashed border of the drop zone.\n * @cssprop --file-upload-drop-zone-shape - Corner radius of the drop zone.\n * @cssprop --file-upload-drop-zone-min-block-size - Minimum height of the drop zone.\n *\n * @example\n * ```html\n * <wc-file-upload label=\"Attachment\" name=\"attachment\"></wc-file-upload>\n * ```\n * @example\n * ```html\n * <wc-file-upload\n * label=\"Photos\"\n * name=\"photos\"\n * accept=\"image/*\"\n * multiple\n * max-files=\"5\"\n * max-size=\"5000000\"\n * helper-text=\"Up to 5 images, 5 MB each\"\n * ></wc-file-upload>\n * ```\n * @tags input, form\n */\n@IndividualComponent\nexport class FileUpload extends BaseInput {\n // ── Static ───────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n // `name` and `disabled` come from mixinFormAssociated; `readonly` and `required` from BaseInput.\n\n /** The accepted files, in the order they were added. Set it to replace or clear the list. */\n @property({ attribute: false })\n files: File[] = [];\n\n /**\n * The same array as `files`, under the name every field uses (`detail.value` in `change`).\n * Not reactive on its own: setting it sets `files`.\n */\n get value(): File[] {\n return this.files;\n }\n\n set value(value: File[] | null | undefined) {\n this.files = Array.isArray(value) ? [...value] : [];\n }\n\n /** File types to take, as on `<input type=\"file\" accept>`: `.pdf`, `image/png`, `image/*`. */\n @property({ type: String })\n accept = '';\n\n /** Takes more than one file; without it a new file replaces the chosen one. */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /** Largest size of one file, in bytes; larger files are rejected. Unset or 0 for no limit. */\n @property({ type: Number, attribute: 'max-size' })\n maxSize?: number;\n\n /** With `multiple`, the most files the list holds; more are rejected. Unset or 0 for no limit. */\n @property({ type: Number, attribute: 'max-files' })\n maxFiles?: number;\n\n /** Label shown above the drop zone; also part of its accessible name. */\n @property({ type: String })\n label = '';\n\n /** Help text shown below the drop zone, such as the accepted types and sizes. */\n @property({ type: String, attribute: 'helper-text' })\n helperText = '';\n\n /** Shows the component in its error state with `error-text`. */\n @property({ type: Boolean, reflect: true })\n error = false;\n\n /** Error message shown below the component while `error` is set; replaces the help text. */\n @property({ type: String, attribute: 'error-text' })\n errorText = '';\n\n /** Locale for file sizes and percentages; defaults to the nearest `lang`. */\n @property({ type: String })\n locale?: string;\n\n // ── State ────────────────────────────────────────────────────────────────\n\n /** True while files are dragged over the drop zone. */\n @state() private dragging = false;\n\n /** The files left out of the last pick or drop. */\n @state() private rejections: FileRejection[] = [];\n\n /** Text of the polite live region. */\n @state() private announcement = '';\n\n // ── Queries ──────────────────────────────────────────────────────────────\n\n @query('.drop-zone') private dropZone?: HTMLElement;\n\n @query('.native-input') private nativeInput?: HTMLInputElement;\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** What the app reported per file through `setFileState()`. */\n private fileStates = new Map<File, FileState>();\n\n /** `dragenter` minus `dragleave` count, so leaving a child of the zone does not end the drag. */\n private dragDepth = 0;\n\n private readonly idPrefix = `wc-file-upload-${(fileUploadCount += 1)}`;\n\n /** Peacock's strings for the zone, the list and the announcements. */\n private readonly i18n = new I18nController(this);\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (changed.has('files')) {\n if (!Array.isArray(this.files)) this.files = [];\n for (const file of this.fileStates.keys()) {\n if (!this.files.includes(file)) this.fileStates.delete(file);\n }\n }\n }\n\n // ── Public methods ───────────────────────────────────────────────────────\n\n override focus() {\n this.dropZone?.focus();\n }\n\n override blur() {\n this.dropZone?.blur();\n }\n\n /**\n * Reports the upload state of a listed file; the given keys replace the ones set before, so\n * `setFileState(file, { progress: 40 })` keeps an earlier `error`. Files not in `files` are\n * ignored.\n */\n setFileState(file: File, fileState: FileState): void {\n if (!this.files.includes(file)) return;\n this.fileStates.set(file, { ...this.fileStates.get(file), ...fileState });\n this.requestUpdate();\n }\n\n /** The upload state reported for `file`; an empty object when none was. */\n getFileState(file: File): FileState {\n return { ...this.fileStates.get(file) };\n }\n\n /** Opens the system file picker. */\n showPicker(): void {\n if (!this.isInteractive) return;\n this.nativeInput?.click();\n }\n\n // ── Protected methods ────────────────────────────────────────────────────\n\n protected override computeValidity(): ControlValidity {\n if (this.required && !this.files.length && !this.disabled) {\n return {\n flags: { valueMissing: true },\n message: this.valueMissingText(),\n };\n }\n return { flags: {}, message: '' };\n }\n\n protected override valueMissingText(): string {\n return this.i18n.t('valueMissingFile');\n }\n\n protected override validityAnchor() {\n return this.dropZone ?? undefined;\n }\n\n override [getFormValue](): FormValue | null {\n // `files` is unset while the base classes construct.\n if (!this.name || !this.files?.length) return null;\n const data = new FormData();\n for (const file of this.files) data.append(this.name, file);\n return data;\n }\n\n override formResetCallback() {\n super.formResetCallback();\n this.files = [];\n this.rejections = [];\n }\n\n protected override parseRestoreState(restored: FormRestoreState): unknown {\n if (restored instanceof File) return [restored];\n if (Array.isArray(restored)) {\n return restored\n .map(([, entry]) => entry)\n .filter((entry): entry is File => entry instanceof File);\n }\n return [];\n }\n\n // ── Private methods ──────────────────────────────────────────────────────\n\n private get isInteractive(): boolean {\n return !this.disabled && !this.readonly;\n }\n\n /** Adds files from the picker or a drop, rejecting those that do not fit. */\n private addFiles(incoming: File[]) {\n if (!incoming.length) return;\n const kept = this.multiple ? this.files : [];\n let limit = 1;\n if (this.multiple) {\n limit = this.maxFiles && this.maxFiles > 0 ? this.maxFiles : Infinity;\n }\n const accepted: File[] = [];\n const rejected: FileRejection[] = [];\n\n for (const file of incoming) {\n const listed = [...kept, ...accepted];\n if (!matchesAccept(file, this.accept)) {\n rejected.push({ file, reason: 'type' });\n } else if (this.maxSize && this.maxSize > 0 && file.size > this.maxSize) {\n rejected.push({ file, reason: 'size' });\n } else if (listed.some(other => sameFile(other, file))) {\n // Already listed: nothing to add, nothing to report.\n } else if (listed.length >= limit) {\n rejected.push({ file, reason: 'count' });\n } else {\n accepted.push(file);\n }\n }\n\n this.rejections = rejected;\n const messages: string[] = [];\n if (accepted.length) {\n this.files = [...kept, ...accepted];\n messages.push(this.i18n.t('filesAdded')(accepted.length));\n }\n messages.push(...rejected.map(rejection => this.rejectionText(rejection)));\n if (messages.length) this.announce(messages.join('. '));\n\n if (rejected.length) {\n this.emit<FileUploadRejectDetail>('reject', { files: rejected });\n }\n if (accepted.length) this.emitChange();\n }\n\n private async removeFile(file: File) {\n const index = this.files.indexOf(file);\n if (index < 0 || !this.isInteractive) return;\n const hadFocus = !!this.shadowRoot?.activeElement;\n this.files = this.files.filter(other => other !== file);\n this.rejections = [];\n this.announce(this.i18n.t('fileRemoved')(file.name));\n this.emit<FileUploadRemoveDetail>('remove', { file });\n this.emitChange();\n\n if (!hadFocus) return;\n // Keep focus in the component: on the next file's remove button, else the drop zone.\n await this.updateComplete;\n const buttons = Array.from(\n this.shadowRoot?.querySelectorAll<HTMLElement>('.remove-button') ?? [],\n );\n const target = buttons[Math.min(index, buttons.length - 1)];\n if (target) target.focus();\n else this.focus();\n }\n\n private emit<T>(type: string, detail: T) {\n this.dispatchEvent(\n new CustomEvent<T>(type, { detail, bubbles: true, composed: true }),\n );\n }\n\n private emitChange() {\n this.emit<FileUploadChangeDetail>('change', { value: this.files });\n }\n\n private announce(message: string) {\n // Clear first, so the same message twice in a row is read again.\n this.announcement = '';\n setTimeout(() => {\n this.announcement = message;\n });\n }\n\n private rejectionText({ file, reason }: FileRejection): string {\n if (reason === 'type') return this.i18n.t('fileTypeRejected')(file.name);\n if (reason === 'size') {\n return this.i18n.t('fileSizeRejected')(\n file.name,\n formatFileSize(this.maxSize ?? 0, this.i18n.locale),\n );\n }\n return this.i18n.t('fileCountRejected')(\n file.name,\n this.multiple ? (this.maxFiles ?? 1) : 1,\n );\n }\n\n private handleZoneClick() {\n this.showPicker();\n }\n\n private handleZoneKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.showPicker();\n } else if (event.key === ' ') {\n // A button acts on Space when it is released; stop the page scrolling now.\n event.preventDefault();\n }\n }\n\n private handleZoneKeyUp(event: KeyboardEvent) {\n if (event.key === ' ') {\n event.preventDefault();\n this.showPicker();\n }\n }\n\n /** The native `input` escapes the shadow root too; the component reports `change` only. */\n // eslint-disable-next-line class-methods-use-this\n private stopNativeEvent(event: Event) {\n event.stopPropagation();\n }\n\n private handleNativeChange(event: Event) {\n // Replace the native event, which escapes the shadow root, with the component's own.\n event.stopPropagation();\n const input = event.target as HTMLInputElement;\n const picked = Array.from(input.files ?? []);\n // Clear the input so picking the same file again fires `change` again.\n input.value = '';\n this.addFiles(picked);\n }\n\n private handleDragEnter(event: DragEvent) {\n event.preventDefault();\n if (!this.isInteractive) return;\n this.dragDepth += 1;\n this.dragging = true;\n }\n\n private handleDragOver(event: DragEvent) {\n // Without this the browser opens a dropped file instead of handing it over.\n event.preventDefault();\n const { dataTransfer } = event;\n if (dataTransfer) {\n dataTransfer.dropEffect = this.isInteractive ? 'copy' : 'none';\n }\n }\n\n private handleDragLeave() {\n this.dragDepth = Math.max(0, this.dragDepth - 1);\n if (this.dragDepth === 0) this.dragging = false;\n }\n\n private handleDrop(event: DragEvent) {\n event.preventDefault();\n this.dragDepth = 0;\n this.dragging = false;\n if (!this.isInteractive) return;\n this.addFiles(Array.from(event.dataTransfer?.files ?? []));\n }\n\n // ── Render helpers ───────────────────────────────────────────────────────\n\n private renderDropZone(labelId: string, descriptionId: string | undefined) {\n if (this.readonly) return nothing;\n const promptId = `${this.idPrefix}-prompt`;\n return html`\n <div\n class=${classMap({ 'drop-zone': true, dragging: this.dragging })}\n role=\"button\"\n tabindex=${this.disabled ? '-1' : '0'}\n aria-labelledby=${this.label ? `${labelId} ${promptId}` : promptId}\n aria-describedby=${descriptionId ?? nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n @click=${this.handleZoneClick}\n @keydown=${this.handleZoneKeyDown}\n @keyup=${this.handleZoneKeyUp}\n @dragenter=${this.handleDragEnter}\n @dragover=${this.handleDragOver}\n @dragleave=${this.handleDragLeave}\n @drop=${this.handleDrop}\n >\n <wc-icon class=\"drop-icon\" name=\"upload\" aria-hidden=\"true\"></wc-icon>\n <span class=\"prompt\" id=${promptId}>\n ${this.multiple\n ? this.i18n.t('dropFilesHere')\n : this.i18n.t('dropFileHere')}\n <span class=\"browse\"\n >${this.multiple\n ? this.i18n.t('chooseFiles')\n : this.i18n.t('chooseFile')}</span\n >\n </span>\n </div>\n <input\n class=\"native-input\"\n type=\"file\"\n hidden\n tabindex=\"-1\"\n aria-hidden=\"true\"\n accept=${this.accept || nothing}\n ?multiple=${this.multiple}\n ?disabled=${this.disabled}\n @input=${this.stopNativeEvent}\n @change=${this.handleNativeChange}\n />\n `;\n }\n\n private renderFileStatus(file: File, fileState: FileState) {\n if (fileState.error) {\n return html`<div class=\"file-error\">${fileState.error}</div>`;\n }\n if (fileState.done) {\n return html`<div class=\"file-status\">\n ${this.i18n.t('fileUploaded')}\n </div>`;\n }\n if (typeof fileState.progress === 'number') {\n const progress = Math.min(100, Math.max(0, fileState.progress));\n const percent = new Intl.NumberFormat(this.i18n.locale, {\n style: 'percent',\n maximumFractionDigits: 0,\n }).format(progress / 100);\n return html`<div class=\"file-progress\">\n <wc-linear-progress\n class=\"progress-bar\"\n value=${progress}\n aria-label=${this.i18n.t('uploadingFile')(file.name)}\n ></wc-linear-progress>\n <span class=\"percent\" aria-hidden=\"true\">${percent}</span>\n </div>`;\n }\n return nothing;\n }\n\n private renderFile(file: File) {\n const fileState = this.fileStates.get(file) ?? {};\n let icon = 'draft';\n if (fileState.error) icon = 'error';\n else if (fileState.done) icon = 'check_circle';\n return html`\n <li\n class=${classMap({\n 'file-item': true,\n error: !!fileState.error,\n done: !fileState.error && !!fileState.done,\n })}\n >\n <wc-icon class=\"file-icon\" name=${icon} aria-hidden=\"true\"></wc-icon>\n <div class=\"file-body\">\n <div class=\"file-header\">\n <span class=\"file-name\">${file.name}</span>\n <span class=\"file-size\"\n >${formatFileSize(file.size, this.i18n.locale)}</span\n >\n </div>\n ${this.renderFileStatus(file, fileState)}\n </div>\n ${this.readonly\n ? nothing\n : html`<wc-icon-button\n class=\"remove-button\"\n shape=\"round\"\n variant=\"text\"\n size=\"xs\"\n aria-label=${this.i18n.t('removeFile')(file.name)}\n ?disabled=${this.disabled}\n @click=${() => this.removeFile(file)}\n >\n <wc-icon name=\"close\"></wc-icon>\n </wc-icon-button>`}\n </li>\n `;\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n const labelId = `${this.idPrefix}-label`;\n const descriptionId = `${this.idPrefix}-description`;\n const errorText = this.error ? this.errorText : this.validationText;\n const description = errorText || this.helperText;\n\n return html`\n <div\n class=${classMap({\n 'file-upload': true,\n disabled: this.disabled,\n readonly: this.readonly,\n 'has-error': this.error || !!errorText,\n })}\n >\n ${this.label\n ? html`<div class=\"label\" id=${labelId}>\n ${this.label}${this.required\n ? html`<span class=\"required\" aria-hidden=\"true\">*</span>`\n : nothing}\n </div>`\n : nothing}\n ${this.renderDropZone(labelId, description ? descriptionId : undefined)}\n ${description\n ? html`<div class=\"helper\" id=${descriptionId}>${description}</div>`\n : nothing}\n ${this.rejections.length\n ? html`<ul class=\"rejections\">\n ${this.rejections.map(\n rejection => html`<li>${this.rejectionText(rejection)}</li>`,\n )}\n </ul>`\n : nothing}\n ${this.files.length\n ? html`<ul\n class=\"file-list\"\n aria-label=${this.label || this.i18n.t('chosenFiles')}\n >\n ${this.files.map(file => this.renderFile(file))}\n </ul>`\n : nothing}\n <div class=\"screen-reader-only\" role=\"status\" aria-live=\"polite\">\n ${this.announcement}\n </div>\n </div>\n `;\n }\n}\n"],"names":["nothing","html","classMap","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;AAE3E;AACM,SAAU,cAAc,CAAC,KAAa,EAAE,MAAc,EAAA;IAC1D,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC;IAC7B,IAAI,IAAI,GAAG,CAAC;AACZ,IAAA,OAAO,IAAI,IA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C,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE;AACpC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAIf,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACV,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAKC,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGjB,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA4C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAGjC,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA6B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAIN,UAAA,CAAA;IAA5BC,CAAK,CAAC,YAAY;AAAiC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAEpB,UAAA,CAAA;IAA/BA,CAAK,CAAC,eAAe;AAAyC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AA3EpD,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CA4ftB;;;;"}
|
package/dist/filter-bar.js
CHANGED
|
@@ -3,7 +3,7 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { c } from './repeat-D_ERDRYT.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
|
|
7
7
|
import { R as RovingFocusController } from './roving-focus-controller-fm95JkZJ.js';
|
|
8
8
|
import { A as isoToDate, a as parseRange } from './date-vFrYT1S9.js';
|
|
9
9
|
import { A as AiController } from './ai-controller-DR_Tg0sN.js';
|
|
@@ -11,7 +11,7 @@ import { s as sparkle } from './sparkle-BmtM0vbq.js';
|
|
|
11
11
|
import './base-Cl6v8-BZ.js';
|
|
12
12
|
import './directive-ZPhl09Yt.js';
|
|
13
13
|
import './directive-helpers-Bx3mu42O.js';
|
|
14
|
-
import './strings-
|
|
14
|
+
import './strings-BJPuhKJk.js';
|
|
15
15
|
import './locale-DEsJZCQG.js';
|
|
16
16
|
import './utils-D92ldd1V.js';
|
|
17
17
|
|