@emuanalytics/flow-rdf-ui 4.0.5 → 4.0.7
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/components/alert/alert.component.mjs +202 -0
- package/dist/components/alert/alert.mjs +5 -0
- package/dist/components/alert/alert.styles.mjs +107 -0
- package/dist/components/animation/animation.component.mjs +207 -0
- package/dist/components/animation/animation.mjs +5 -0
- package/dist/components/animation/animation.styles.mjs +12 -0
- package/dist/components/animation/animations.mjs +11 -0
- package/dist/components/avatar/avatar.component.mjs +95 -0
- package/dist/components/avatar/avatar.mjs +5 -0
- package/dist/components/avatar/avatar.styles.mjs +70 -0
- package/dist/components/badge/badge.component.mjs +62 -0
- package/dist/components/badge/badge.mjs +5 -0
- package/dist/components/badge/badge.styles.mjs +105 -0
- package/dist/components/breadcrumb/breadcrumb.component.mjs +82 -0
- package/dist/components/breadcrumb/breadcrumb.mjs +5 -0
- package/dist/components/breadcrumb/breadcrumb.styles.mjs +14 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.component.mjs +73 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.mjs +5 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.mjs +90 -0
- package/dist/components/button/button.component.mjs +310 -0
- package/dist/components/button/button.mjs +5 -0
- package/dist/components/button/button.styles.mjs +690 -0
- package/dist/components/button-group/button-group.component.mjs +108 -0
- package/dist/components/button-group/button-group.mjs +5 -0
- package/dist/components/button-group/button-group.styles.mjs +21 -0
- package/dist/components/calendar/calendar.component.mjs +320 -0
- package/dist/components/calendar/calendar.mjs +5 -0
- package/dist/components/calendar/calendar.styles.mjs +145 -0
- package/dist/components/card/card.component.mjs +33 -0
- package/dist/components/card/card.mjs +5 -0
- package/dist/components/card/card.styles.mjs +73 -0
- package/dist/components/carousel/autoplay-controller.mjs +56 -0
- package/dist/components/carousel/carousel.component.mjs +406 -0
- package/dist/components/carousel/carousel.mjs +5 -0
- package/dist/components/carousel/carousel.styles.mjs +162 -0
- package/dist/components/carousel/scroll-controller.mjs +148 -0
- package/dist/components/carousel-item/carousel-item.component.mjs +22 -0
- package/dist/components/carousel-item/carousel-item.mjs +5 -0
- package/dist/components/carousel-item/carousel-item.styles.mjs +28 -0
- package/dist/components/chart/chart.component.mjs +82 -0
- package/dist/components/chart/chart.mjs +5 -0
- package/dist/components/chart/chart.styles.mjs +80 -0
- package/dist/components/chart/chartjs-plugins/interaction.interpolate.mjs +80 -0
- package/dist/components/chart/chartjs-plugins/plugin.flow-ui-colors.mjs +135 -0
- package/dist/components/chart/chartjs-plugins/positioner.cursor.mjs +14 -0
- package/dist/components/chart/chartjs-plugins/symlog.scale.mjs +42 -0
- package/dist/components/chart/chartjs-support.mjs +59 -0
- package/dist/components/checkbox/checkbox.component.mjs +246 -0
- package/dist/components/checkbox/checkbox.mjs +5 -0
- package/dist/components/checkbox/checkbox.styles.mjs +177 -0
- package/dist/components/color-mapper/color-mapper.component.mjs +260 -0
- package/dist/components/color-mapper/color-mapper.mjs +5 -0
- package/dist/components/color-mapper/color-mapper.styles.mjs +92 -0
- package/dist/components/color-mapper/helpers.mjs +55 -0
- package/dist/components/color-picker/color-picker.component.mjs +919 -0
- package/dist/components/color-picker/color-picker.mjs +5 -0
- package/dist/components/color-picker/color-picker.styles.mjs +337 -0
- package/dist/components/color-stop/color-stop.component.mjs +289 -0
- package/dist/components/color-stop/color-stop.mjs +5 -0
- package/dist/components/color-stop/color-stop.styles.mjs +103 -0
- package/dist/components/date-time-picker/date-time-picker.component.mjs +532 -0
- package/dist/components/date-time-picker/date-time-picker.mjs +5 -0
- package/dist/components/date-time-picker/date-time-picker.styles.mjs +260 -0
- package/dist/components/details/details.component.mjs +194 -0
- package/dist/components/details/details.mjs +5 -0
- package/dist/components/details/details.styles.mjs +85 -0
- package/dist/components/dialog/dialog.component.mjs +256 -0
- package/dist/components/dialog/dialog.mjs +5 -0
- package/dist/components/dialog/dialog.styles.mjs +125 -0
- package/dist/components/divider/divider.component.mjs +45 -0
- package/dist/components/divider/divider.mjs +5 -0
- package/dist/components/divider/divider.styles.mjs +34 -0
- package/dist/components/drawer/drawer.component.mjs +354 -0
- package/dist/components/drawer/drawer.mjs +5 -0
- package/dist/components/drawer/drawer.styles.mjs +161 -0
- package/dist/components/dropdown/dropdown.component.mjs +381 -0
- package/dist/components/dropdown/dropdown.mjs +5 -0
- package/dist/components/dropdown/dropdown.styles.mjs +56 -0
- package/dist/components/gauge/gauge.component.mjs +151 -0
- package/dist/components/gauge/gauge.mjs +5 -0
- package/dist/components/gauge/gauge.styles.mjs +127 -0
- package/dist/components/icon/icon.component.mjs +146 -0
- package/dist/components/icon/icon.mjs +5 -0
- package/dist/components/icon/icon.styles.mjs +35 -0
- package/dist/components/icon/library.default.mjs +38 -0
- package/dist/components/icon/library.mjs +38 -0
- package/dist/components/icon/library.system.mjs +158 -0
- package/dist/components/icon-button/icon-button.component.mjs +239 -0
- package/dist/components/icon-button/icon-button.mjs +5 -0
- package/dist/components/icon-button/icon-button.styles.mjs +81 -0
- package/dist/components/input/input.component.mjs +574 -0
- package/dist/components/input/input.mjs +5 -0
- package/dist/components/input/input.styles.mjs +310 -0
- package/dist/components/map/map.component.mjs +196 -0
- package/dist/components/map/map.mjs +5 -0
- package/dist/components/map/map.styles.mjs +90 -0
- package/dist/components/menu/menu.component.mjs +125 -0
- package/dist/components/menu/menu.mjs +5 -0
- package/dist/components/menu/menu.styles.mjs +23 -0
- package/dist/components/menu-item/menu-item.component.mjs +143 -0
- package/dist/components/menu-item/menu-item.mjs +5 -0
- package/dist/components/menu-item/menu-item.styles.mjs +103 -0
- package/dist/components/menu-label/menu-label.component.mjs +14 -0
- package/dist/components/menu-label/menu-label.mjs +5 -0
- package/dist/components/menu-label/menu-label.styles.mjs +24 -0
- package/dist/components/mutation-observer/mutation-observer.component.mjs +115 -0
- package/dist/components/mutation-observer/mutation-observer.mjs +5 -0
- package/dist/components/mutation-observer/mutation-observer.styles.mjs +12 -0
- package/dist/components/option/option.component.mjs +152 -0
- package/dist/components/option/option.mjs +5 -0
- package/dist/components/option/option.styles.mjs +102 -0
- package/dist/components/panel/panel.component.mjs +90 -0
- package/dist/components/panel/panel.mjs +5 -0
- package/dist/components/panel/panel.styles.mjs +51 -0
- package/dist/components/panel-header/panel-header.component.mjs +131 -0
- package/dist/components/panel-header/panel-header.mjs +5 -0
- package/dist/components/panel-header/panel-header.styles.mjs +67 -0
- package/dist/components/popup/popup.component.mjs +420 -0
- package/dist/components/popup/popup.mjs +5 -0
- package/dist/components/popup/popup.styles.mjs +63 -0
- package/dist/components/progress-bar/progress-bar.component.mjs +70 -0
- package/dist/components/progress-bar/progress-bar.mjs +5 -0
- package/dist/components/progress-bar/progress-bar.styles.mjs +87 -0
- package/dist/components/progress-ring/progress-ring.component.mjs +71 -0
- package/dist/components/progress-ring/progress-ring.mjs +5 -0
- package/dist/components/progress-ring/progress-ring.styles.mjs +72 -0
- package/dist/components/query-builder/converters/flow-query-converters.mjs +111 -0
- package/dist/components/query-builder/converters/map-layer-filter-converter.mjs +99 -0
- package/dist/components/query-builder/default-value-templates.mjs +151 -0
- package/dist/components/query-builder/helpers.mjs +42 -0
- package/dist/components/query-builder/query-builder.component.mjs +466 -0
- package/dist/components/query-builder/query-builder.mjs +5 -0
- package/dist/components/query-builder/query-builder.styles.mjs +261 -0
- package/dist/components/radio/radio.component.mjs +144 -0
- package/dist/components/radio/radio.mjs +5 -0
- package/dist/components/radio/radio.styles.mjs +164 -0
- package/dist/components/radio-group/radio-group.component.mjs +310 -0
- package/dist/components/radio-group/radio-group.mjs +5 -0
- package/dist/components/radio-group/radio-group.styles.mjs +49 -0
- package/dist/components/range/range.component.mjs +324 -0
- package/dist/components/range/range.mjs +5 -0
- package/dist/components/range/range.styles.mjs +233 -0
- package/dist/components/resize-observer/resize-observer.component.mjs +80 -0
- package/dist/components/resize-observer/resize-observer.mjs +5 -0
- package/dist/components/resize-observer/resize-observer.styles.mjs +12 -0
- package/dist/components/scroll-view/overlay-scrollbar.styles.mjs +686 -0
- package/dist/components/scroll-view/scroll-view.component.mjs +128 -0
- package/dist/components/scroll-view/scroll-view.mjs +5 -0
- package/dist/components/scroll-view/scroll-view.styles.mjs +57 -0
- package/dist/components/select/select.component.mjs +785 -0
- package/dist/components/select/select.mjs +5 -0
- package/dist/components/select/select.styles.mjs +339 -0
- package/dist/components/spinner/spinner.component.mjs +22 -0
- package/dist/components/spinner/spinner.mjs +5 -0
- package/dist/components/spinner/spinner.styles.mjs +64 -0
- package/dist/components/split-view/split-view.component.mjs +500 -0
- package/dist/components/split-view/split-view.mjs +5 -0
- package/dist/components/split-view/split-view.styles.mjs +33 -0
- package/dist/components/split-view-divider/split-view-divider.component.mjs +98 -0
- package/dist/components/split-view-divider/split-view-divider.mjs +5 -0
- package/dist/components/split-view-divider/split-view-divider.styles.mjs +96 -0
- package/dist/components/split-view-pane/split-view-pane.component.mjs +126 -0
- package/dist/components/split-view-pane/split-view-pane.mjs +5 -0
- package/dist/components/split-view-pane/split-view-pane.styles.mjs +49 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.component.mjs +76 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.mjs +5 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.styles.mjs +40 -0
- package/dist/components/stepper/stepper.component.mjs +139 -0
- package/dist/components/stepper/stepper.mjs +5 -0
- package/dist/components/stepper/stepper.styles.mjs +103 -0
- package/dist/components/stepper-panel/stepper-panel.component.mjs +76 -0
- package/dist/components/stepper-panel/stepper-panel.mjs +5 -0
- package/dist/components/stepper-panel/stepper-panel.styles.mjs +22 -0
- package/dist/components/switch/switch.component.mjs +211 -0
- package/dist/components/switch/switch.mjs +5 -0
- package/dist/components/switch/switch.styles.mjs +166 -0
- package/dist/components/tab/tab.component.mjs +159 -0
- package/dist/components/tab/tab.mjs +5 -0
- package/dist/components/tab/tab.styles.mjs +107 -0
- package/dist/components/tab-group/tab-group.component.mjs +402 -0
- package/dist/components/tab-group/tab-group.mjs +5 -0
- package/dist/components/tab-group/tab-group.styles.mjs +386 -0
- package/dist/components/tab-panel/tab-panel.component.mjs +72 -0
- package/dist/components/tab-panel/tab-panel.mjs +5 -0
- package/dist/components/tab-panel/tab-panel.styles.mjs +55 -0
- package/dist/components/tag/tag.component.mjs +94 -0
- package/dist/components/tag/tag.mjs +5 -0
- package/dist/components/tag/tag.styles.mjs +130 -0
- package/dist/components/textarea/textarea.component.mjs +359 -0
- package/dist/components/textarea/textarea.mjs +5 -0
- package/dist/components/textarea/textarea.styles.mjs +171 -0
- package/dist/components/timer/ticker.mjs +78 -0
- package/dist/components/timer/timer.component.mjs +297 -0
- package/dist/components/timer/timer.mjs +5 -0
- package/dist/components/timer/timer.styles.mjs +95 -0
- package/dist/components/tool-button/tool-button.component.mjs +208 -0
- package/dist/components/tool-button/tool-button.mjs +5 -0
- package/dist/components/tool-button/tool-button.styles.mjs +251 -0
- package/dist/components/tool-button-group/tool-button-group.component.mjs +347 -0
- package/dist/components/tool-button-group/tool-button-group.mjs +5 -0
- package/dist/components/tool-button-group/tool-button-group.styles.mjs +59 -0
- package/dist/components/tooltip/tooltip.component.mjs +259 -0
- package/dist/components/tooltip/tooltip.mjs +5 -0
- package/dist/components/tooltip/tooltip.styles.mjs +57 -0
- package/dist/components/tree/tree.component.mjs +368 -0
- package/dist/components/tree/tree.mjs +5 -0
- package/dist/components/tree/tree.styles.mjs +41 -0
- package/dist/components/tree-item/tree-item.component.mjs +324 -0
- package/dist/components/tree-item/tree-item.mjs +5 -0
- package/dist/components/tree-item/tree-item.styles.mjs +178 -0
- package/dist/components/visually-hidden/visually-hidden.component.mjs +14 -0
- package/dist/components/visually-hidden/visually-hidden.mjs +5 -0
- package/dist/components/visually-hidden/visually-hidden.styles.mjs +20 -0
- package/dist/custom-elements.json +1535 -1530
- package/dist/index.d.mts +145 -132
- package/dist/index.d.ts +145 -132
- package/dist/index.mjs +78 -25094
- package/dist/internal/animate.mjs +47 -0
- package/dist/internal/animations/attention_seekers/bounce.mjs +17 -0
- package/dist/internal/animations/attention_seekers/flash.mjs +9 -0
- package/dist/internal/animations/attention_seekers/headShake.mjs +10 -0
- package/dist/internal/animations/attention_seekers/heartBeat.mjs +9 -0
- package/dist/internal/animations/attention_seekers/jello.mjs +14 -0
- package/dist/internal/animations/attention_seekers/pulse.mjs +7 -0
- package/dist/internal/animations/attention_seekers/rubberBand.mjs +11 -0
- package/dist/internal/animations/attention_seekers/shake.mjs +15 -0
- package/dist/internal/animations/attention_seekers/shakeX.mjs +15 -0
- package/dist/internal/animations/attention_seekers/shakeY.mjs +15 -0
- package/dist/internal/animations/attention_seekers/swing.mjs +9 -0
- package/dist/internal/animations/attention_seekers/tada.mjs +15 -0
- package/dist/internal/animations/attention_seekers/wobble.mjs +11 -0
- package/dist/internal/animations/back_entrances/backInDown.mjs +7 -0
- package/dist/internal/animations/back_entrances/backInLeft.mjs +7 -0
- package/dist/internal/animations/back_entrances/backInRight.mjs +7 -0
- package/dist/internal/animations/back_entrances/backInUp.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutDown.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutLeft.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutRight.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutUp.mjs +7 -0
- package/dist/internal/animations/bouncing_entrances/bounceIn.mjs +16 -0
- package/dist/internal/animations/bouncing_entrances/bounceInDown.mjs +14 -0
- package/dist/internal/animations/bouncing_entrances/bounceInLeft.mjs +14 -0
- package/dist/internal/animations/bouncing_entrances/bounceInRight.mjs +14 -0
- package/dist/internal/animations/bouncing_entrances/bounceInUp.mjs +14 -0
- package/dist/internal/animations/bouncing_exits/bounceOut.mjs +8 -0
- package/dist/internal/animations/bouncing_exits/bounceOutDown.mjs +8 -0
- package/dist/internal/animations/bouncing_exits/bounceOutLeft.mjs +6 -0
- package/dist/internal/animations/bouncing_exits/bounceOutRight.mjs +6 -0
- package/dist/internal/animations/bouncing_exits/bounceOutUp.mjs +8 -0
- package/dist/internal/animations/easings/easings.mjs +33 -0
- package/dist/internal/animations/fading_entrances/fadeIn.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInBottomLeft.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInBottomRight.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInDown.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInDownBig.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInLeft.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInLeftBig.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInRight.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInRightBig.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInTopLeft.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInTopRight.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInUp.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInUpBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOut.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutBottomLeft.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutBottomRight.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutDown.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutDownBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutLeft.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutLeftBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutRight.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutRightBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutTopLeft.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutTopRight.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutUp.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutUpBig.mjs +6 -0
- package/dist/internal/animations/flippers/flip.mjs +29 -0
- package/dist/internal/animations/flippers/flipInX.mjs +9 -0
- package/dist/internal/animations/flippers/flipInY.mjs +9 -0
- package/dist/internal/animations/flippers/flipOutX.mjs +7 -0
- package/dist/internal/animations/flippers/flipOutY.mjs +7 -0
- package/dist/internal/animations/index.mjs +99 -0
- package/dist/internal/animations/lightspeed/lightSpeedInLeft.mjs +8 -0
- package/dist/internal/animations/lightspeed/lightSpeedInRight.mjs +8 -0
- package/dist/internal/animations/lightspeed/lightSpeedOutLeft.mjs +6 -0
- package/dist/internal/animations/lightspeed/lightSpeedOutRight.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateIn.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInDownLeft.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInDownRight.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInUpLeft.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInUpRight.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOut.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutDownLeft.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutDownRight.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutUpLeft.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutUpRight.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInDown.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInLeft.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInRight.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInUp.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutDown.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutLeft.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutRight.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutUp.mjs +6 -0
- package/dist/internal/animations/specials/hinge.mjs +10 -0
- package/dist/internal/animations/specials/jackInTheBox.mjs +8 -0
- package/dist/internal/animations/specials/rollIn.mjs +6 -0
- package/dist/internal/animations/specials/rollOut.mjs +6 -0
- package/dist/internal/animations/zooming_entrances/zoomIn.mjs +6 -0
- package/dist/internal/animations/zooming_entrances/zoomInDown.mjs +16 -0
- package/dist/internal/animations/zooming_entrances/zoomInLeft.mjs +16 -0
- package/dist/internal/animations/zooming_entrances/zoomInRight.mjs +16 -0
- package/dist/internal/animations/zooming_entrances/zoomInUp.mjs +16 -0
- package/dist/internal/animations/zooming_exits/zoomOut.mjs +7 -0
- package/dist/internal/animations/zooming_exits/zoomOutDown.mjs +16 -0
- package/dist/internal/animations/zooming_exits/zoomOutLeft.mjs +6 -0
- package/dist/internal/animations/zooming_exits/zoomOutRight.mjs +6 -0
- package/dist/internal/animations/zooming_exits/zoomOutUp.mjs +16 -0
- package/dist/internal/boolean.mjs +17 -0
- package/dist/internal/datetime.mjs +65 -0
- package/dist/internal/debounce.mjs +14 -0
- package/dist/internal/default-value.mjs +21 -0
- package/dist/internal/drag.mjs +30 -0
- package/dist/internal/ensure-array.mjs +16 -0
- package/dist/internal/event.mjs +13 -0
- package/dist/internal/flow-ui-rdf-element.mjs +61 -0
- package/dist/internal/form.mjs +264 -0
- package/dist/internal/localize.mjs +124 -0
- package/dist/internal/math.mjs +12 -0
- package/dist/internal/modal.mjs +52 -0
- package/dist/internal/offset.mjs +8 -0
- package/dist/internal/orderby.mjs +18 -0
- package/dist/internal/scroll.mjs +47 -0
- package/dist/internal/slot.mjs +59 -0
- package/dist/internal/string.mjs +5 -0
- package/dist/internal/tabbable.mjs +49 -0
- package/dist/internal/throttle.mjs +28 -0
- package/dist/internal/type-checks.mjs +16 -0
- package/dist/internal/watch.mjs +27 -0
- package/dist/package.json.mjs +3 -0
- package/dist/public-api.mjs +10 -0
- package/dist/styles/component.styles.mjs +19 -0
- package/dist/styles/form-control.styles.mjs +63 -0
- package/dist/translations/en.mjs +34 -0
- package/dist/utilities/animation-registry.mjs +33 -0
- package/dist/utilities/announce.mjs +12 -0
- package/dist/utilities/locale.mjs +10 -0
- package/dist/utilities/localize.mjs +7 -0
- package/dist/utilities/register-components.mjs +203 -0
- package/dist/vscode.html-custom-data.json +193 -181
- package/package.json +5 -8
- package/themes/dark.css +6 -2
- package/themes/dark.styles.js +6 -2
- package/themes/light.css +6 -2
- package/themes/light.styles.js +6 -2
- package/dist/icons/index.cjs +0 -4053
- package/dist/icons/index.d.cts +0 -2027
- package/dist/index.cjs +0 -25187
- package/dist/index.d.cts +0 -5678
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { query } from 'lit/decorators.js';
|
|
3
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
4
|
+
import styles from './menu.styles.mjs';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result)
|
|
14
|
+
__defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
class FlowUiMenu extends FlowRdfElement {
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
super.connectedCallback();
|
|
20
|
+
this.setAttribute("role", "menu");
|
|
21
|
+
}
|
|
22
|
+
handleClick(event) {
|
|
23
|
+
const target = event.target;
|
|
24
|
+
const item = target.closest("flow-ui-menu-item");
|
|
25
|
+
if (!item || item.disabled || item.inert) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (item.type === "checkbox") {
|
|
29
|
+
item.checked = !item.checked;
|
|
30
|
+
}
|
|
31
|
+
this.emit("flow-ui-select", { detail: { item } });
|
|
32
|
+
}
|
|
33
|
+
handleKeyDown(event) {
|
|
34
|
+
if (event.key === "Enter") {
|
|
35
|
+
const item = this.getCurrentItem();
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
item?.click();
|
|
38
|
+
}
|
|
39
|
+
if (event.key === " ") {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
}
|
|
42
|
+
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
|
|
43
|
+
const items = this.getAllItems();
|
|
44
|
+
const activeItem = this.getCurrentItem();
|
|
45
|
+
let index = activeItem ? items.indexOf(activeItem) : 0;
|
|
46
|
+
if (items.length > 0) {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
if (event.key === "ArrowDown") {
|
|
49
|
+
index++;
|
|
50
|
+
} else if (event.key === "ArrowUp") {
|
|
51
|
+
index--;
|
|
52
|
+
} else if (event.key === "Home") {
|
|
53
|
+
index = 0;
|
|
54
|
+
} else if (event.key === "End") {
|
|
55
|
+
index = items.length - 1;
|
|
56
|
+
}
|
|
57
|
+
if (index < 0) {
|
|
58
|
+
index = items.length - 1;
|
|
59
|
+
}
|
|
60
|
+
if (index > items.length - 1) {
|
|
61
|
+
index = 0;
|
|
62
|
+
}
|
|
63
|
+
this.setCurrentItem(items[index]);
|
|
64
|
+
items[index].focus();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
handleMouseDown(event) {
|
|
69
|
+
const target = event.target;
|
|
70
|
+
if (this.isMenuItem(target)) {
|
|
71
|
+
this.setCurrentItem(target);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
handleSlotChange() {
|
|
75
|
+
const items = this.getAllItems();
|
|
76
|
+
if (items.length > 0) {
|
|
77
|
+
this.setCurrentItem(items[0]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
isMenuItem(item) {
|
|
81
|
+
return item.tagName.toLowerCase() === "flow-ui-menu-item" || ["menuitem", "menuitemcheckbox", "menuitemradio"].includes(item.getAttribute("role") ?? "");
|
|
82
|
+
}
|
|
83
|
+
/** @internal Gets all slotted menu items, ignoring dividers, headers, and other elements. */
|
|
84
|
+
getAllItems() {
|
|
85
|
+
return [...this.defaultSlot.assignedElements({ flatten: true })].filter((el) => {
|
|
86
|
+
if (el.inert || !this.isMenuItem(el)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @internal Gets the current menu item, which is the menu item that has `tabindex="0"` within the roving tab index.
|
|
94
|
+
* The menu item may or may not have focus, but for keyboard interaction purposes it's considered the "active" item.
|
|
95
|
+
*/
|
|
96
|
+
getCurrentItem() {
|
|
97
|
+
return this.getAllItems().find((i) => i.getAttribute("tabindex") === "0");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @internal Sets the current menu item to the specified element. This sets `tabindex="0"` on the target element and
|
|
101
|
+
* `tabindex="-1"` to all other items. This method must be called prior to setting focus on a menu item.
|
|
102
|
+
*/
|
|
103
|
+
setCurrentItem(item) {
|
|
104
|
+
const items = this.getAllItems();
|
|
105
|
+
items.forEach((i) => {
|
|
106
|
+
i.setAttribute("tabindex", i === item ? "0" : "-1");
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
return html`
|
|
111
|
+
<slot
|
|
112
|
+
@slotchange=${this.handleSlotChange}
|
|
113
|
+
@click=${this.handleClick}
|
|
114
|
+
@keydown=${this.handleKeyDown}
|
|
115
|
+
@mousedown=${this.handleMouseDown}
|
|
116
|
+
></slot>
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
FlowUiMenu.styles = styles;
|
|
121
|
+
__decorateClass([
|
|
122
|
+
query("slot")
|
|
123
|
+
], FlowUiMenu.prototype, "defaultSlot", 2);
|
|
124
|
+
|
|
125
|
+
export { FlowUiMenu as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
|
|
4
|
+
const styles = css`
|
|
5
|
+
${componentStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
position: relative;
|
|
10
|
+
background: var(--flow-ui-panel-background-color);
|
|
11
|
+
border: solid var(--flow-ui-panel-border-width) var(--flow-ui-panel-border-color);
|
|
12
|
+
border-radius: var(--flow-ui-border-radius-medium);
|
|
13
|
+
padding: var(--flow-ui-spacing-x-small) 0;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
overscroll-behavior: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
::slotted(flow-ui-divider) {
|
|
19
|
+
--spacing: var(--flow-ui-spacing-x-small);
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export { styles as default };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { query, property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { boolean } from '../../internal/boolean.mjs';
|
|
5
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
6
|
+
import { getTextContent } from '../../internal/slot.mjs';
|
|
7
|
+
import { watch } from '../../internal/watch.mjs';
|
|
8
|
+
import styles from './menu-item.styles.mjs';
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result)
|
|
18
|
+
__defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
class FlowUiMenuItem extends FlowRdfElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.type = "normal";
|
|
25
|
+
this.checked = false;
|
|
26
|
+
this.value = "";
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
super.connectedCallback();
|
|
31
|
+
this.checked = boolean(this.checked, true);
|
|
32
|
+
this.disabled = boolean(this.disabled, true);
|
|
33
|
+
this.handleHostClick = this.handleHostClick.bind(this);
|
|
34
|
+
this.addEventListener("click", this.handleHostClick);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
super.disconnectedCallback();
|
|
38
|
+
this.removeEventListener("click", this.handleHostClick);
|
|
39
|
+
}
|
|
40
|
+
handleDefaultSlotChange() {
|
|
41
|
+
const textLabel = this.getTextLabel();
|
|
42
|
+
if (typeof this.cachedTextLabel === "undefined") {
|
|
43
|
+
this.cachedTextLabel = textLabel;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (textLabel !== this.cachedTextLabel) {
|
|
47
|
+
this.cachedTextLabel = textLabel;
|
|
48
|
+
this.emit("slotchange", { bubbles: true, composed: false, cancelable: false });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
handleHostClick(event) {
|
|
52
|
+
if (this.disabled) {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
event.stopImmediatePropagation();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
handleCheckedChange() {
|
|
58
|
+
if (this.checked && this.type !== "checkbox") {
|
|
59
|
+
this.checked = false;
|
|
60
|
+
console.error('The checked attribute can only be used on menu items with type="checkbox"', this);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (this.type === "checkbox") {
|
|
64
|
+
this.setAttribute("aria-checked", this.checked ? "true" : "false");
|
|
65
|
+
} else {
|
|
66
|
+
this.removeAttribute("aria-checked");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
handleDisabledChange() {
|
|
70
|
+
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
71
|
+
}
|
|
72
|
+
handleTypeChange() {
|
|
73
|
+
if (this.type === "checkbox") {
|
|
74
|
+
this.setAttribute("role", "menuitemcheckbox");
|
|
75
|
+
this.setAttribute("aria-checked", this.checked ? "true" : "false");
|
|
76
|
+
} else {
|
|
77
|
+
this.setAttribute("role", "menuitem");
|
|
78
|
+
this.removeAttribute("aria-checked");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** @internal Returns a text label based on the contents of the menu item's default slot. */
|
|
82
|
+
getTextLabel() {
|
|
83
|
+
return getTextContent(this.defaultSlot);
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
return html`
|
|
87
|
+
<div
|
|
88
|
+
part="base"
|
|
89
|
+
class=${classMap({
|
|
90
|
+
"menu-item": true,
|
|
91
|
+
"menu-item--checked": this.checked,
|
|
92
|
+
"menu-item--disabled": this.disabled,
|
|
93
|
+
"menu-item--has-submenu": false
|
|
94
|
+
// reserved for future use
|
|
95
|
+
})}
|
|
96
|
+
>
|
|
97
|
+
<span part="checked-icon" class="menu-item__check">
|
|
98
|
+
<flow-ui-icon name="check" library="system" aria-hidden="true"></flow-ui-icon>
|
|
99
|
+
</span>
|
|
100
|
+
|
|
101
|
+
<slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
|
|
102
|
+
|
|
103
|
+
<slot part="label" class="menu-item__label" @slotchange=${this.handleDefaultSlotChange}></slot>
|
|
104
|
+
|
|
105
|
+
<slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
|
|
106
|
+
|
|
107
|
+
<span part="submenu-icon" class="menu-item__chevron">
|
|
108
|
+
<flow-ui-icon name="chevron-right" library="system" aria-hidden="true"></flow-ui-icon>
|
|
109
|
+
</span>
|
|
110
|
+
</div>
|
|
111
|
+
`;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
FlowUiMenuItem.styles = styles;
|
|
115
|
+
__decorateClass([
|
|
116
|
+
query("slot:not([name])")
|
|
117
|
+
], FlowUiMenuItem.prototype, "defaultSlot", 2);
|
|
118
|
+
__decorateClass([
|
|
119
|
+
query(".menu-item")
|
|
120
|
+
], FlowUiMenuItem.prototype, "menuItem", 2);
|
|
121
|
+
__decorateClass([
|
|
122
|
+
property()
|
|
123
|
+
], FlowUiMenuItem.prototype, "type", 2);
|
|
124
|
+
__decorateClass([
|
|
125
|
+
property({ type: Boolean, reflect: true })
|
|
126
|
+
], FlowUiMenuItem.prototype, "checked", 2);
|
|
127
|
+
__decorateClass([
|
|
128
|
+
property()
|
|
129
|
+
], FlowUiMenuItem.prototype, "value", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
property({ type: Boolean, reflect: true })
|
|
132
|
+
], FlowUiMenuItem.prototype, "disabled", 2);
|
|
133
|
+
__decorateClass([
|
|
134
|
+
watch("checked")
|
|
135
|
+
], FlowUiMenuItem.prototype, "handleCheckedChange", 1);
|
|
136
|
+
__decorateClass([
|
|
137
|
+
watch("disabled")
|
|
138
|
+
], FlowUiMenuItem.prototype, "handleDisabledChange", 1);
|
|
139
|
+
__decorateClass([
|
|
140
|
+
watch("type")
|
|
141
|
+
], FlowUiMenuItem.prototype, "handleTypeChange", 1);
|
|
142
|
+
|
|
143
|
+
export { FlowUiMenuItem as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
|
|
4
|
+
const styles = css`
|
|
5
|
+
${componentStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([inert]) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.menu-item {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: stretch;
|
|
19
|
+
font-family: var(--flow-ui-font-sans);
|
|
20
|
+
font-size: var(--flow-ui-font-size-medium);
|
|
21
|
+
font-weight: var(--flow-ui-font-weight-normal);
|
|
22
|
+
line-height: var(--flow-ui-line-height-normal);
|
|
23
|
+
letter-spacing: var(--flow-ui-letter-spacing-normal);
|
|
24
|
+
color: var(--flow-ui-color-neutral-700);
|
|
25
|
+
padding: var(--flow-ui-spacing-2x-small) var(--flow-ui-spacing-2x-small);
|
|
26
|
+
transition: var(--flow-ui-transition-fast) fill;
|
|
27
|
+
user-select: none;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.menu-item.menu-item--disabled {
|
|
33
|
+
outline: none;
|
|
34
|
+
opacity: 0.5;
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.menu-item .menu-item__label {
|
|
39
|
+
flex: 1 1 auto;
|
|
40
|
+
display: inline-block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.menu-item .menu-item__prefix {
|
|
44
|
+
flex: 0 0 auto;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.menu-item .menu-item__prefix::slotted(*) {
|
|
50
|
+
margin-inline-end: var(--flow-ui-spacing-x-small);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.menu-item .menu-item__suffix {
|
|
54
|
+
flex: 0 0 auto;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.menu-item .menu-item__suffix::slotted(*) {
|
|
60
|
+
margin-inline-start: var(--flow-ui-spacing-x-small);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host(:focus-visible) {
|
|
64
|
+
outline: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host(:hover:not([aria-disabled='true'], :focus-visible)) .menu-item {
|
|
68
|
+
background-color: var(--flow-ui-color-neutral-100);
|
|
69
|
+
color: var(--flow-ui-color-neutral-1000);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host(:focus-visible) .menu-item {
|
|
73
|
+
outline: none;
|
|
74
|
+
background-color: var(--flow-ui-color-primary-500);
|
|
75
|
+
color: var(--flow-ui-color-neutral-0);
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.menu-item .menu-item__check,
|
|
80
|
+
.menu-item .menu-item__chevron {
|
|
81
|
+
flex: 0 0 auto;
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
width: 1.5em;
|
|
86
|
+
visibility: hidden;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.menu-item--checked .menu-item__check,
|
|
90
|
+
.menu-item--has-submenu .menu-item__chevron {
|
|
91
|
+
visibility: visible;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (forced-colors: active) {
|
|
95
|
+
:host(:hover:not([aria-disabled='true'])) .menu-item,
|
|
96
|
+
:host(:focus-visible) .menu-item {
|
|
97
|
+
outline: dashed 1px SelectedItem;
|
|
98
|
+
outline-offset: -1px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
export { styles as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
3
|
+
import styles from './menu-label.styles.mjs';
|
|
4
|
+
|
|
5
|
+
class FlowUiMenuLabel extends FlowRdfElement {
|
|
6
|
+
render() {
|
|
7
|
+
return html`
|
|
8
|
+
<slot part="base" class="menu-label"></slot>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
FlowUiMenuLabel.styles = styles;
|
|
13
|
+
|
|
14
|
+
export { FlowUiMenuLabel as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
|
|
4
|
+
const styles = css`
|
|
5
|
+
${componentStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.menu-label {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
font-family: var(--flow-ui-font-sans);
|
|
14
|
+
font-size: var(--flow-ui-font-size-small);
|
|
15
|
+
font-weight: var(--flow-ui-font-weight-semibold);
|
|
16
|
+
line-height: var(--flow-ui-line-height-normal);
|
|
17
|
+
letter-spacing: var(--flow-ui-letter-spacing-normal);
|
|
18
|
+
color: var(--flow-ui-color-neutral-500);
|
|
19
|
+
padding: var(--flow-ui-spacing-2x-small) var(--flow-ui-spacing-x-large);
|
|
20
|
+
user-select: none;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export { styles as default };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { boolean } from '../../internal/boolean.mjs';
|
|
4
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
5
|
+
import { watch } from '../../internal/watch.mjs';
|
|
6
|
+
import styles from './mutation-observer.styles.mjs';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result)
|
|
16
|
+
__defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
class FlowUiMutationObserver extends FlowRdfElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.attrOldValue = false;
|
|
23
|
+
this.charData = false;
|
|
24
|
+
this.charDataOldValue = false;
|
|
25
|
+
this.childList = false;
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback();
|
|
30
|
+
this.attrOldValue = boolean(this.attrOldValue, true);
|
|
31
|
+
this.charData = boolean(this.charData, true);
|
|
32
|
+
this.charDataOldValue = boolean(this.charDataOldValue, true);
|
|
33
|
+
this.childList = boolean(this.childList, true);
|
|
34
|
+
this.disabled = boolean(this.disabled, true);
|
|
35
|
+
this.handleMutation = this.handleMutation.bind(this);
|
|
36
|
+
this.mutationObserver = new MutationObserver(this.handleMutation);
|
|
37
|
+
if (!this.disabled) {
|
|
38
|
+
this.startObserver();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
this.stopObserver();
|
|
43
|
+
}
|
|
44
|
+
handleMutation(mutationList) {
|
|
45
|
+
this.emit("flow-ui-mutation", {
|
|
46
|
+
detail: { mutationList }
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
startObserver() {
|
|
50
|
+
const observeAttributes = typeof this.attr === "string" && this.attr.length > 0;
|
|
51
|
+
const attributeFilter = observeAttributes && this.attr !== "*" ? this.attr.split(" ") : void 0;
|
|
52
|
+
try {
|
|
53
|
+
this.mutationObserver.observe(this, {
|
|
54
|
+
subtree: true,
|
|
55
|
+
childList: this.childList,
|
|
56
|
+
attributes: observeAttributes,
|
|
57
|
+
attributeFilter,
|
|
58
|
+
attributeOldValue: this.attrOldValue,
|
|
59
|
+
characterData: this.charData,
|
|
60
|
+
characterDataOldValue: this.charDataOldValue
|
|
61
|
+
});
|
|
62
|
+
} catch {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
stopObserver() {
|
|
66
|
+
this.mutationObserver.disconnect();
|
|
67
|
+
}
|
|
68
|
+
handleDisabledChange() {
|
|
69
|
+
if (this.disabled) {
|
|
70
|
+
this.stopObserver();
|
|
71
|
+
} else {
|
|
72
|
+
this.startObserver();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
handleChange() {
|
|
76
|
+
this.stopObserver();
|
|
77
|
+
this.startObserver();
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
return html`
|
|
81
|
+
<slot></slot>
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
FlowUiMutationObserver.styles = styles;
|
|
86
|
+
__decorateClass([
|
|
87
|
+
property({ reflect: true })
|
|
88
|
+
], FlowUiMutationObserver.prototype, "attr", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
property({ attribute: "attr-old-value", type: Boolean, reflect: true })
|
|
91
|
+
], FlowUiMutationObserver.prototype, "attrOldValue", 2);
|
|
92
|
+
__decorateClass([
|
|
93
|
+
property({ attribute: "char-data", type: Boolean, reflect: true })
|
|
94
|
+
], FlowUiMutationObserver.prototype, "charData", 2);
|
|
95
|
+
__decorateClass([
|
|
96
|
+
property({ attribute: "char-data-old-value", type: Boolean, reflect: true })
|
|
97
|
+
], FlowUiMutationObserver.prototype, "charDataOldValue", 2);
|
|
98
|
+
__decorateClass([
|
|
99
|
+
property({ attribute: "child-list", type: Boolean, reflect: true })
|
|
100
|
+
], FlowUiMutationObserver.prototype, "childList", 2);
|
|
101
|
+
__decorateClass([
|
|
102
|
+
property({ type: Boolean, reflect: true })
|
|
103
|
+
], FlowUiMutationObserver.prototype, "disabled", 2);
|
|
104
|
+
__decorateClass([
|
|
105
|
+
watch("disabled")
|
|
106
|
+
], FlowUiMutationObserver.prototype, "handleDisabledChange", 1);
|
|
107
|
+
__decorateClass([
|
|
108
|
+
watch("attr", { waitUntilFirstUpdate: true }),
|
|
109
|
+
watch("attr-old-value", { waitUntilFirstUpdate: true }),
|
|
110
|
+
watch("char-data", { waitUntilFirstUpdate: true }),
|
|
111
|
+
watch("char-data-old-value", { waitUntilFirstUpdate: true }),
|
|
112
|
+
watch("childList", { waitUntilFirstUpdate: true })
|
|
113
|
+
], FlowUiMutationObserver.prototype, "handleChange", 1);
|
|
114
|
+
|
|
115
|
+
export { FlowUiMutationObserver as default };
|