@vonage/vivid 5.2.0 → 5.4.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/accordion-item/definition.cjs +2 -1
- package/accordion-item/definition.js +3 -2
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +4 -2
- package/audio-player/definition.js +4 -2
- package/audio-player/index.cjs +5 -3
- package/audio-player/index.js +5 -3
- package/badge/definition.js +1 -1
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- package/banner/definition.js +1 -1
- package/banner/index.cjs +3 -3
- package/banner/index.js +6 -6
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/affix.cjs +7 -7
- package/bundled/affix.js +5 -5
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +15 -13
- package/bundled/base-color-picker.cjs +13 -0
- package/bundled/base-color-picker.js +194 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +118 -118
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/children.cjs +1 -1
- package/bundled/children.js +28 -20
- package/bundled/definition.cjs +3 -3
- package/bundled/definition.js +38 -38
- package/bundled/definition10.cjs +72 -18
- package/bundled/definition10.js +351 -65
- package/bundled/definition11.cjs +19 -10
- package/bundled/definition11.js +217 -36
- package/bundled/definition12.cjs +10 -1
- package/bundled/definition12.js +38 -14
- package/bundled/definition13.cjs +1 -73
- package/bundled/definition13.js +15 -354
- package/bundled/definition15.cjs +1 -1
- package/bundled/definition15.js +1 -1
- package/bundled/definition16.cjs +2 -2
- package/bundled/definition16.js +8 -8
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +17 -17
- package/bundled/definition19.cjs +23 -24
- package/bundled/definition19.js +151 -163
- package/bundled/definition2.cjs +9 -5
- package/bundled/definition2.js +21 -17
- package/bundled/definition22.cjs +9 -9
- package/bundled/definition22.js +31 -31
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +28 -28
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +6 -6
- package/bundled/definition8.cjs +2 -2
- package/bundled/definition8.js +4 -4
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +59 -46
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +3 -3
- package/bundled/host-semantics.cjs +1 -1
- package/bundled/host-semantics.js +48 -34
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +51 -36
- package/bundled/mixins.cjs +18 -18
- package/bundled/mixins.js +99 -93
- package/bundled/normalize.cjs +1 -0
- package/bundled/normalize.js +7 -0
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +4 -4
- package/bundled/ref.cjs +1 -1
- package/bundled/ref.js +8 -25
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +459 -233
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +2 -2
- package/bundled/slotted.cjs +1 -1
- package/bundled/slotted.js +62 -45
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +2159 -1162
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +15 -15
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +11 -3
- package/card/definition.js +11 -3
- package/card/index.cjs +19 -11
- package/card/index.js +35 -27
- package/color-picker/definition.cjs +1079 -0
- package/color-picker/definition.js +1073 -0
- package/color-picker/index.cjs +127 -0
- package/color-picker/index.js +726 -0
- package/combobox/definition.cjs +8 -28
- package/combobox/definition.js +10 -30
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +60 -74
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1670 -163
- package/data-grid/definition.cjs +862 -27
- package/data-grid/definition.js +863 -28
- package/data-grid/index.cjs +25 -25
- package/data-grid/index.js +175 -168
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +4 -0
- package/dial-pad/definition.js +4 -0
- package/dial-pad/index.cjs +3 -3
- package/dial-pad/index.js +42 -39
- package/dialog/definition.cjs +6 -3
- package/dialog/definition.js +6 -3
- package/dialog/index.cjs +22 -19
- package/dialog/index.js +48 -45
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/empty-state/definition.cjs +7 -2
- package/empty-state/definition.js +7 -2
- package/empty-state/index.cjs +10 -5
- package/empty-state/index.js +18 -13
- package/fab/definition.js +1 -1
- package/fab/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +2 -2
- package/file-picker/definition.js +3 -3
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +4 -4
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +7 -4
- package/index.js +3 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/action-group/action-group.d.ts +2 -2
- package/lib/alert/alert.d.ts +4 -4
- package/lib/audio-player/audio-player.d.ts +3 -3
- package/lib/avatar/avatar.d.ts +2 -2
- package/lib/badge/badge.d.ts +2 -2
- package/lib/banner/banner.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +2 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +2 -2
- package/lib/button/button.d.ts +6 -6
- package/lib/button/button.template.d.ts +2 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +2 -2
- package/lib/card/card.d.ts +2 -2
- package/lib/checkbox/checkbox.d.ts +12 -12
- package/lib/color-picker/color-picker.d.ts +2420 -0
- package/lib/color-picker/color-picker.template.d.ts +3 -0
- package/lib/color-picker/definition.d.ts +4 -0
- package/lib/color-picker/locale.d.ts +9 -0
- package/lib/combobox/combobox.d.ts +15 -14
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +3 -4
- package/lib/data-grid/data-grid.d.ts +1 -2
- package/lib/date-picker/date-picker.d.ts +54 -54
- package/lib/date-range-picker/date-range-picker.d.ts +28 -28
- package/lib/date-time-picker/date-time-picker.d.ts +56 -56
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +3 -3
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +14 -14
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +4 -4
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +4 -4
- package/lib/nav/nav.d.ts +2 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +4 -4
- package/lib/nav-item/nav-item.d.ts +4 -4
- package/lib/note/note.d.ts +2 -2
- package/lib/number-field/number-field.d.ts +18 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/popup/popup.d.ts +1 -1
- package/lib/progress/progress.d.ts +2 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -2
- package/lib/radio/radio.d.ts +6 -6
- package/lib/radio-group/radio-group.d.ts +2 -2
- package/lib/range-slider/range-slider.d.ts +6 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +21 -18
- package/lib/select/select.d.ts +19 -17
- package/lib/selectable-box/selectable-box.d.ts +2 -2
- package/lib/simple-color-picker/locale.d.ts +0 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +47 -821
- package/lib/slider/slider.d.ts +7 -7
- package/lib/split-button/split-button.d.ts +6 -6
- package/lib/switch/switch.d.ts +4 -4
- package/lib/tab/tab.d.ts +6 -6
- package/lib/tab-panel/tab-panel.d.ts +2 -2
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/tag/tag.d.ts +6 -6
- package/lib/tag-group/tag-group.d.ts +2 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +17 -17
- package/lib/text-field/text-field.d.ts +19 -19
- package/lib/time-picker/time-picker.d.ts +28 -28
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +4 -4
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/lib/video-player/video-player.d.ts +2 -2
- package/locales/de-DE.cjs +17 -2
- package/locales/de-DE.js +17 -2
- package/locales/en-GB.cjs +17 -2
- package/locales/en-GB.js +17 -2
- package/locales/en-US.cjs +17 -2
- package/locales/en-US.js +17 -2
- package/locales/ja-JP.cjs +17 -2
- package/locales/ja-JP.js +17 -2
- package/locales/zh-CN.cjs +17 -2
- package/locales/zh-CN.js +17 -2
- package/menu/definition.cjs +6 -6
- package/menu/definition.js +7 -7
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +3 -3
- package/number-field/index.cjs +5 -5
- package/number-field/index.js +21 -21
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +34 -8
- package/pagination/definition.cjs +2 -1
- package/pagination/definition.js +2 -1
- package/pagination/index.cjs +12 -12
- package/pagination/index.js +59 -59
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/radio/definition.cjs +9 -9
- package/radio/definition.js +10 -10
- package/radio-group/definition.cjs +2 -1
- package/radio-group/definition.js +2 -1
- package/radio-group/index.cjs +5 -5
- package/radio-group/index.js +80 -77
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +3 -4
- package/rich-text-editor/definition.js +3 -4
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1208 -1198
- package/searchable-select/definition.cjs +106 -14
- package/searchable-select/definition.js +107 -15
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +362 -276
- package/select/definition.cjs +25 -42
- package/select/definition.js +26 -43
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +3 -3
- package/selectable-box/index.js +20 -20
- package/shared/aria/aria-change-subscription.d.ts +0 -1
- package/shared/aria/aria-mixin.d.ts +3 -3
- package/shared/aria/delegate-aria-behavior.d.ts +5 -10
- package/shared/aria/delegates-aria.d.ts +3 -3
- package/shared/aria/host-semantics-behavior.d.ts +5 -8
- package/shared/aria/host-semantics.d.ts +3 -3
- package/shared/color-picker/base-color-picker.d.ts +436 -0
- package/shared/color-picker/index.d.ts +1 -0
- package/shared/color-picker/locale.d.ts +3 -0
- package/shared/color-picker/utils.d.ts +1 -0
- package/shared/deprecation/replaced-props.d.ts +317 -2
- package/shared/design-system/defineVividComponent.d.ts +2 -2
- package/shared/feedback/feedback-message.d.ts +2 -2
- package/shared/feedback/mixins.d.ts +4 -4
- package/shared/foundation/button/button.d.ts +4 -4
- package/shared/foundation/form-associated/form-associated.d.ts +4 -4
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +335 -8
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/affix.d.ts +4 -4
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/char-count/char-count.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +4 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +6 -6
- package/shared/patterns/form-elements/with-error-text.d.ts +6 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +2 -2
- package/shared/patterns/linkable.d.ts +2 -2
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +14 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +14 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +40 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +12 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +29 -29
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +28 -28
- package/shared/picker-field/picker-field.d.ts +14 -14
- package/shared/templating/attribute-binding-behaviour.d.ts +3 -4
- package/shared/templating/render-in-light-dom.d.ts +13 -12
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/simple-color-picker/definition.cjs +29 -216
- package/simple-color-picker/definition.js +30 -217
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +4 -4
- package/tab/definition.js +1 -1
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +2 -2
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +16 -16
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +8 -8
- package/text-field/definition.cjs +2 -2
- package/text-field/definition.js +4 -4
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +2 -2
- package/toggletip/definition.cjs +2 -2
- package/toggletip/definition.js +3 -3
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +2 -2
- package/tree-view/definition.js +3 -3
- package/tree-view/index.cjs +2 -2
- package/tree-view/index.js +6 -6
- package/unbundled/_commonjsHelpers.cjs +36 -0
- package/unbundled/_commonjsHelpers.js +32 -0
- package/unbundled/affix.cjs +1 -1
- package/unbundled/affix.js +2 -2
- package/unbundled/attribute-binding-behaviour.cjs +11 -10
- package/unbundled/attribute-binding-behaviour.js +11 -10
- package/unbundled/base-color-picker.cjs +278 -0
- package/unbundled/base-color-picker.js +275 -0
- package/unbundled/button.cjs +1 -1
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +4 -4
- package/unbundled/calendar-picker.template.js +5 -5
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +3 -3
- package/unbundled/definition3.cjs +222 -140
- package/unbundled/definition3.js +220 -138
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/delegates-aria.cjs +67 -33
- package/unbundled/delegates-aria.js +69 -35
- package/unbundled/form-associated.cjs +2 -2
- package/unbundled/form-associated.js +3 -3
- package/unbundled/host-semantics.cjs +47 -22
- package/unbundled/host-semantics.js +48 -23
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +3 -3
- package/unbundled/picker-field.template.js +4 -4
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +4 -4
- package/unbundled/time-selection-picker.template.js +5 -5
- package/unbundled/vivid-element.cjs +22 -15
- package/unbundled/vivid-element.js +23 -15
- package/video-player/definition.cjs +69047 -1
- package/video-player/definition.js +69047 -1
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +1895 -1905
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +719 -224
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
package/data-grid/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { V as
|
|
3
|
-
import { V as
|
|
4
|
-
import { d as X, e as Y, f as O, k as P, a as z, g as Z, h as ee, i as te, j as oe, b as le, c as ie, l as ae } from "../bundled/key-codes.js";
|
|
1
|
+
import { I as j, i as N } from "../bundled/definition2.js";
|
|
2
|
+
import { V as E, h as f, a as m, o as a, b as z, U as x, O as R, n as W, c as J, d as F } from "../bundled/vivid-element.js";
|
|
3
|
+
import { V as X, v as Y } from "../bundled/definition13.js";
|
|
5
4
|
import { R as G } from "../bundled/repeat.js";
|
|
6
|
-
import {
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
5
|
+
import { n as D } from "../bundled/normalize.js";
|
|
6
|
+
import { d as Z, e as ee, f as A, k as P, a as L, g as te, h as oe, i as le, j as ie, b as ne, c as ae, l as re } from "../bundled/key-codes.js";
|
|
7
|
+
import { H as M, a as U } from "../bundled/host-semantics.js";
|
|
8
|
+
import { c as K } from "../bundled/children.js";
|
|
9
|
+
import { s as V, e as q } from "../bundled/slotted.js";
|
|
10
|
+
import { L as se } from "../bundled/localized.js";
|
|
11
|
+
import { c as Q } from "../bundled/class-names.js";
|
|
12
|
+
import { w as B } from "../bundled/when.js";
|
|
13
|
+
const S = "focus", H = "focusin", w = "focusout", y = "keydown", ce = ":host{display:block}:host([generate-header=sticky]){max-block-size:400px}.base{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.base{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.base ::-webkit-scrollbar{width:4px}.base ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.base ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.base{position:relative;overflow:auto;block-size:inherit;inline-size:100%;max-block-size:inherit}", de = ".base.connotation-cta{--_connotation-color-primary: var(--vvd-data-grid-row-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-data-grid-row-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-data-grid-row-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-firm: var(--vvd-data-grid-row-cta-firm, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-data-grid-row-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-data-grid-row-cta-soft, var(--vvd-color-cta-100));--_connotation-color-pale: var(--vvd-data-grid-row-cta-pale, var(--vvd-color-cta-300));--_connotation-color-dim: var(--vvd-data-grid-row-cta-dim, var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary: var(--vvd-data-grid-row-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-data-grid-row-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-data-grid-row-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-data-grid-row-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-data-grid-row-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-data-grid-row-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-data-grid-row-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-data-grid-row-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:grid;width:100%;box-sizing:border-box;color:var(--vvd-color-canvas-text)}:host([row-type=sticky-header]) .base{position:sticky;z-index:9;top:0;background:var(--data-grid-row-background, var(--vvd-color-canvas))}:host([row-type=hidden-header]) .base{display:none}:host(:is([selected]):not([row-type*=header])) .base{background-color:var(--_appearance-color-fill)}", ue = ':host{block-size:100%;min-inline-size:80px}:host(:focus-visible){outline:none}:host([data-fixed]){position:sticky;z-index:5;background:var(--data-grid-cell-background, var(--vvd-color-surface-2dp))}:host([data-fixed]):before{position:absolute;z-index:1;top:0;right:0;width:1px;block-size:100%;box-shadow:4px 0 4px #0000001a,2px 0 2px #0000000d,1px 0 1px #0000000d;content:"";pointer-events:none}.base.connotation-cta{--_connotation-color-primary: var(--vvd-data-grid-cell-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-data-grid-cell-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-data-grid-cell-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-firm: var(--vvd-data-grid-cell-cta-firm, var(--vvd-color-cta-600));--_connotation-color-soft: var(--vvd-data-grid-cell-cta-soft, var(--vvd-color-cta-100));--_connotation-color-faint: var(--vvd-data-grid-cell-cta-faint, var(--vvd-color-cta-50));--_connotation-color-pale: var(--vvd-data-grid-cell-cta-pale, var(--vvd-color-cta-300));--_connotation-color-dim: var(--vvd-data-grid-cell-cta-dim, var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary: var(--vvd-data-grid-cell-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-data-grid-cell-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-data-grid-cell-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-data-grid-cell-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-soft: var(--vvd-data-grid-cell-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-faint: var(--vvd-data-grid-cell-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-pale: var(--vvd-data-grid-cell-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-data-grid-cell-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-bottom:1px solid var(--vvd-color-neutral-300);block-size:var(--data-grid-cell-block-size, var(--_data-grid-cell-default-block-size));color:var(--_appearance-color-text);font:var(--vvd-typography-base);min-block-size:calc(1px*(48 + 4*clamp(-1,var(--vvd-size-density, 0),2)));padding-block:13px 14px;padding-inline:12px}:host(:focus-visible) .base{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}:host([cell-type=columnheader]) .base{border-color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);--_data-grid-cell-default-block-size: calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_data-grid-cell-default-white-space: nowrap}:host(:not([cell-type=columnheader])) .base{--_data-grid-cell-default-block-size: 100%;--_data-grid-cell-default-white-space: normal}:host(:is([selected]):not([cell-type=columnheader])) .base{background-color:var(--_appearance-color-fill)}slot{display:block;overflow:hidden;text-overflow:ellipsis;white-space:var(--data-grid-cell-white-space, var(--_data-grid-cell-default-white-space))}:host(:not([cell-type=columnheader][aria-sort])) slot{inline-size:100%}.header-icon{margin-inline-start:16px}', T = {
|
|
13
14
|
none: "none",
|
|
14
15
|
ascending: "ascending",
|
|
15
16
|
descending: "descending",
|
|
@@ -26,26 +27,26 @@ const R = "focus", S = "focusin", w = "focusout", y = "keydown", re = ":host{dis
|
|
|
26
27
|
default: "default",
|
|
27
28
|
header: "header",
|
|
28
29
|
stickyHeader: "sticky-header"
|
|
29
|
-
},
|
|
30
|
+
}, O = {
|
|
30
31
|
columnheader: "columnheader",
|
|
31
32
|
rowheader: "rowheader",
|
|
32
33
|
default: "gridcell"
|
|
33
34
|
};
|
|
34
|
-
var
|
|
35
|
-
for (var o = void 0,
|
|
36
|
-
(r = i[
|
|
37
|
-
return o &&
|
|
35
|
+
var he = Object.defineProperty, C = (i, e, t, l) => {
|
|
36
|
+
for (var o = void 0, n = i.length - 1, r; n >= 0; n--)
|
|
37
|
+
(r = i[n]) && (o = r(e, t, o) || o);
|
|
38
|
+
return o && he(e, t, o), o;
|
|
38
39
|
};
|
|
39
|
-
const
|
|
40
|
+
const fe = f`
|
|
40
41
|
<template>
|
|
41
42
|
${(i) => i.rowData === null || i.columnDefinition === null || i.columnDefinition.columnDataKey === null ? null : i.rowData[i.columnDefinition.columnDataKey]}
|
|
42
43
|
</template>
|
|
43
|
-
`,
|
|
44
|
+
`, me = f`
|
|
44
45
|
<template>
|
|
45
46
|
${(i) => i.columnDefinition.title === void 0 ? i.columnDefinition.columnDataKey : i.columnDefinition.title}
|
|
46
47
|
</template>
|
|
47
48
|
`;
|
|
48
|
-
class p extends
|
|
49
|
+
class p extends se(M(E)) {
|
|
49
50
|
constructor() {
|
|
50
51
|
super(...arguments), this.cellType = g.default, this.rowData = null, this.columnDefinition = null, this.isActiveCell = !1, this.customCellView = null, this.updateCellStyle = () => {
|
|
51
52
|
this.gridColumn && !this.gridColumn.includes("undefined") ? this.style.gridColumn = this.gridColumn : this.style.removeProperty("grid-column");
|
|
@@ -87,13 +88,13 @@ class p extends ne(A(I)) {
|
|
|
87
88
|
* @internal
|
|
88
89
|
*/
|
|
89
90
|
connectedCallback() {
|
|
90
|
-
super.connectedCallback(), this.addEventListener(
|
|
91
|
+
super.connectedCallback(), this.addEventListener(H, this.handleFocusin), this.addEventListener(w, this.handleFocusout), this.addEventListener(y, this.handleKeydown), this.style.gridColumn = `${this.columnDefinition?.gridColumn === void 0 ? 0 : this.columnDefinition.gridColumn}`, this.updateCellView(), this.updateCellStyle(), this.updateFixedStyle();
|
|
91
92
|
}
|
|
92
93
|
/**
|
|
93
94
|
* @internal
|
|
94
95
|
*/
|
|
95
96
|
disconnectedCallback() {
|
|
96
|
-
super.disconnectedCallback(), this.removeEventListener(
|
|
97
|
+
super.disconnectedCallback(), this.removeEventListener(H, this.handleFocusin), this.removeEventListener(
|
|
97
98
|
w,
|
|
98
99
|
this.handleFocusout
|
|
99
100
|
), this.removeEventListener(y, this.handleKeydown), this.disconnectCellView();
|
|
@@ -123,8 +124,8 @@ class p extends ne(A(I)) {
|
|
|
123
124
|
handleKeydown(e) {
|
|
124
125
|
if (!(e.defaultPrevented || this.columnDefinition === null || this.cellType === g.default && this.columnDefinition.cellInternalFocusQueue !== !0 || this.cellType === g.columnHeader && this.columnDefinition.headerCellInternalFocusQueue !== !0))
|
|
125
126
|
switch (e.key) {
|
|
126
|
-
case
|
|
127
|
-
case
|
|
127
|
+
case A:
|
|
128
|
+
case ee:
|
|
128
129
|
if (this.contains(document.activeElement) && document.activeElement !== this)
|
|
129
130
|
return;
|
|
130
131
|
switch (this.cellType) {
|
|
@@ -142,7 +143,7 @@ class p extends ne(A(I)) {
|
|
|
142
143
|
break;
|
|
143
144
|
}
|
|
144
145
|
break;
|
|
145
|
-
case
|
|
146
|
+
case Z:
|
|
146
147
|
this.contains(document.activeElement) && document.activeElement !== this && (this.focus(), e.preventDefault());
|
|
147
148
|
break;
|
|
148
149
|
}
|
|
@@ -154,7 +155,7 @@ class p extends ne(A(I)) {
|
|
|
154
155
|
this.columnDefinition.headerCellTemplate !== void 0 ? this.customCellView = this.columnDefinition.headerCellTemplate.render(
|
|
155
156
|
this,
|
|
156
157
|
this
|
|
157
|
-
) : this.customCellView =
|
|
158
|
+
) : this.customCellView = me.render(
|
|
158
159
|
this,
|
|
159
160
|
this
|
|
160
161
|
);
|
|
@@ -164,10 +165,10 @@ class p extends ne(A(I)) {
|
|
|
164
165
|
this.columnDefinition.cellTemplate !== void 0 ? this.customCellView = this.columnDefinition.cellTemplate.render(
|
|
165
166
|
this,
|
|
166
167
|
this
|
|
167
|
-
) : this.customCellView =
|
|
168
|
+
) : this.customCellView = fe.render(this, this);
|
|
168
169
|
break;
|
|
169
170
|
}
|
|
170
|
-
this.columnDefinition?.sortable ? this.columnDefinition.sortDirection ? this.sortDirection = this.columnDefinition.sortDirection : this.sortDirection =
|
|
171
|
+
this.columnDefinition?.sortable ? this.columnDefinition.sortDirection ? this.sortDirection = this.columnDefinition.sortDirection : this.sortDirection = T.none : this.sortDirection = void 0;
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
disconnectCellView() {
|
|
@@ -215,13 +216,13 @@ C([
|
|
|
215
216
|
m({ attribute: "grid-column" })
|
|
216
217
|
], p.prototype, "gridColumn");
|
|
217
218
|
C([
|
|
218
|
-
|
|
219
|
+
a
|
|
219
220
|
], p.prototype, "rowData");
|
|
220
221
|
C([
|
|
221
|
-
|
|
222
|
+
a
|
|
222
223
|
], p.prototype, "columnDefinition");
|
|
223
224
|
C([
|
|
224
|
-
|
|
225
|
+
a
|
|
225
226
|
], p.prototype, "_selectable");
|
|
226
227
|
C([
|
|
227
228
|
m({ mode: "boolean" })
|
|
@@ -229,14 +230,14 @@ C([
|
|
|
229
230
|
C([
|
|
230
231
|
m({ attribute: "sort-direction" })
|
|
231
232
|
], p.prototype, "sortDirection");
|
|
232
|
-
var
|
|
233
|
-
for (var o = void 0,
|
|
234
|
-
(r = i[
|
|
235
|
-
return o &&
|
|
233
|
+
var pe = Object.defineProperty, u = (i, e, t, l) => {
|
|
234
|
+
for (var o = void 0, n = i.length - 1, r; n >= 0; n--)
|
|
235
|
+
(r = i[n]) && (o = r(e, t, o) || o);
|
|
236
|
+
return o && pe(e, t, o), o;
|
|
236
237
|
};
|
|
237
|
-
class c extends
|
|
238
|
+
class c extends M(E) {
|
|
238
239
|
constructor() {
|
|
239
|
-
super(...arguments), this.rowType = v.default, this.rowData = null, this.columnDefinitions = null, this.
|
|
240
|
+
super(...arguments), this.rowType = v.default, this.rowData = null, this.columnDefinitions = null, this.behaviorOrchestrator = null, this.focusColumnIndex = 0, this.updateRowStyle = () => {
|
|
240
241
|
this.style.gridTemplateColumns = this.gridTemplateColumns;
|
|
241
242
|
}, this.ariaSelected = null, this._selectable = !1, this.selected = !1;
|
|
242
243
|
}
|
|
@@ -268,11 +269,14 @@ class c extends A(I) {
|
|
|
268
269
|
* @internal
|
|
269
270
|
*/
|
|
270
271
|
connectedCallback() {
|
|
271
|
-
super.connectedCallback(), this.
|
|
272
|
-
(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
super.connectedCallback(), this.behaviorOrchestrator === null && (this.updateItemTemplate(), this.behaviorOrchestrator = z.create(this), this.$fastController.addBehavior(this.behaviorOrchestrator), this.behaviorOrchestrator.addBehaviorFactory(
|
|
273
|
+
new G(
|
|
274
|
+
D((e) => e.columnDefinitions),
|
|
275
|
+
D((e) => e.activeCellItemTemplate),
|
|
276
|
+
{ positioning: !0 }
|
|
277
|
+
),
|
|
278
|
+
this.appendChild(document.createComment(""))
|
|
279
|
+
)), this.addEventListener("cell-focused", this.handleCellFocus), this.addEventListener(w, this.handleFocusout), this.addEventListener(y, this.handleKeydown), this.updateRowStyle();
|
|
276
280
|
}
|
|
277
281
|
/**
|
|
278
282
|
* @internal
|
|
@@ -294,16 +298,16 @@ class c extends A(I) {
|
|
|
294
298
|
return;
|
|
295
299
|
let t = 0;
|
|
296
300
|
switch (e.key) {
|
|
297
|
-
case
|
|
301
|
+
case oe:
|
|
298
302
|
t = Math.max(0, this.focusColumnIndex - 1), this.cellElements[t].focus(), e.preventDefault();
|
|
299
303
|
break;
|
|
300
|
-
case
|
|
304
|
+
case te:
|
|
301
305
|
t = Math.min(
|
|
302
306
|
this.cellElements.length - 1,
|
|
303
307
|
this.focusColumnIndex + 1
|
|
304
308
|
), this.cellElements[t].focus(), e.preventDefault();
|
|
305
309
|
break;
|
|
306
|
-
case
|
|
310
|
+
case L:
|
|
307
311
|
e.ctrlKey || (this.cellElements[0].focus(), e.preventDefault());
|
|
308
312
|
break;
|
|
309
313
|
case P:
|
|
@@ -328,42 +332,42 @@ u([
|
|
|
328
332
|
m({ attribute: "row-type" })
|
|
329
333
|
], c.prototype, "rowType");
|
|
330
334
|
u([
|
|
331
|
-
|
|
335
|
+
a
|
|
332
336
|
], c.prototype, "rowData");
|
|
333
337
|
u([
|
|
334
|
-
|
|
338
|
+
a
|
|
335
339
|
], c.prototype, "columnDefinitions");
|
|
336
340
|
u([
|
|
337
|
-
|
|
341
|
+
a
|
|
338
342
|
], c.prototype, "cellItemTemplate");
|
|
339
343
|
u([
|
|
340
|
-
|
|
344
|
+
a
|
|
341
345
|
], c.prototype, "headerCellItemTemplate");
|
|
342
346
|
u([
|
|
343
|
-
|
|
347
|
+
a
|
|
344
348
|
], c.prototype, "rowIndex");
|
|
345
349
|
u([
|
|
346
|
-
|
|
350
|
+
a
|
|
347
351
|
], c.prototype, "activeCellItemTemplate");
|
|
348
352
|
u([
|
|
349
|
-
|
|
353
|
+
a
|
|
350
354
|
], c.prototype, "defaultCellItemTemplate");
|
|
351
355
|
u([
|
|
352
|
-
|
|
356
|
+
a
|
|
353
357
|
], c.prototype, "defaultHeaderCellItemTemplate");
|
|
354
358
|
u([
|
|
355
|
-
|
|
359
|
+
a
|
|
356
360
|
], c.prototype, "cellElements");
|
|
357
361
|
u([
|
|
358
|
-
|
|
362
|
+
a
|
|
359
363
|
], c.prototype, "_selectable");
|
|
360
364
|
u([
|
|
361
365
|
m({ mode: "boolean" })
|
|
362
366
|
], c.prototype, "selected");
|
|
363
|
-
var
|
|
364
|
-
for (var o = void 0,
|
|
365
|
-
(r = i[
|
|
366
|
-
return o &&
|
|
367
|
+
var ve = Object.defineProperty, d = (i, e, t, l) => {
|
|
368
|
+
for (var o = void 0, n = i.length - 1, r; n >= 0; n--)
|
|
369
|
+
(r = i[n]) && (o = r(e, t, o) || o);
|
|
370
|
+
return o && ve(e, t, o), o;
|
|
367
371
|
};
|
|
368
372
|
const h = {
|
|
369
373
|
none: "none",
|
|
@@ -371,9 +375,9 @@ const h = {
|
|
|
371
375
|
multiRow: "multi-row",
|
|
372
376
|
singleCell: "single-cell",
|
|
373
377
|
multiCell: "multi-cell"
|
|
374
|
-
}, s = class
|
|
378
|
+
}, s = class k extends E {
|
|
375
379
|
constructor() {
|
|
376
|
-
super(), this.noTabbing = !1, this.generateHeader = b.default, this.rowsData = [], this.columnDefinitions = null, this.focusRowIndex = 0, this.focusColumnIndex = 0, this.fixedColumnsPositions = [], this.
|
|
380
|
+
super(), this.noTabbing = !1, this.generateHeader = b.default, this.rowsData = [], this.columnDefinitions = null, this.focusRowIndex = 0, this.focusColumnIndex = 0, this.fixedColumnsPositions = [], this.behaviorOrchestrator = null, this.generatedHeader = null, this.isUpdatingFocus = !1, this.pendingFocusUpdate = !1, this.rowindexUpdateQueued = !1, this.columnDefinitionsStale = !0, this.generatedGridTemplateColumns = "", this.focusOnCell = (e, t, l) => {
|
|
377
381
|
if (this.rowElements.length === 0) {
|
|
378
382
|
this.focusRowIndex = 0, this.focusColumnIndex = 0;
|
|
379
383
|
return;
|
|
@@ -395,7 +399,7 @@ const h = {
|
|
|
395
399
|
});
|
|
396
400
|
}), this.queueRowIndexUpdate());
|
|
397
401
|
}, this.queueRowIndexUpdate = () => {
|
|
398
|
-
this.rowindexUpdateQueued || (this.rowindexUpdateQueued = !0, x.
|
|
402
|
+
this.rowindexUpdateQueued || (this.rowindexUpdateQueued = !0, x.enqueue(this.updateRowIndexes));
|
|
399
403
|
}, this.updateRowIndexes = () => {
|
|
400
404
|
let e = this.gridTemplateColumns;
|
|
401
405
|
if (e === void 0) {
|
|
@@ -419,7 +423,7 @@ const h = {
|
|
|
419
423
|
this.#i({ target: e, ctrlKey: t, shiftKey: l, metaKey: o });
|
|
420
424
|
return;
|
|
421
425
|
}
|
|
422
|
-
(this.selectionMode === h.singleRow || this.selectionMode === h.multiRow) && this.#
|
|
426
|
+
(this.selectionMode === h.singleRow || this.selectionMode === h.multiRow) && this.#n({ target: e, ctrlKey: t, shiftKey: l, metaKey: o });
|
|
423
427
|
}
|
|
424
428
|
}, this.#i = ({
|
|
425
429
|
target: e,
|
|
@@ -427,25 +431,25 @@ const h = {
|
|
|
427
431
|
shiftKey: l,
|
|
428
432
|
metaKey: o
|
|
429
433
|
}) => {
|
|
430
|
-
const
|
|
434
|
+
const n = e;
|
|
431
435
|
if (this.selectionMode === h.multiCell && (t || l || o))
|
|
432
|
-
|
|
436
|
+
n.selected = !this.#r.includes(n);
|
|
433
437
|
else {
|
|
434
|
-
const r =
|
|
435
|
-
this._resetSelection(!0),
|
|
438
|
+
const r = n.selected;
|
|
439
|
+
this._resetSelection(!0), n.selected = !r;
|
|
436
440
|
}
|
|
437
|
-
}, this.#
|
|
441
|
+
}, this.#n = ({
|
|
438
442
|
target: e,
|
|
439
443
|
ctrlKey: t,
|
|
440
444
|
shiftKey: l,
|
|
441
445
|
metaKey: o
|
|
442
446
|
}) => {
|
|
443
|
-
const
|
|
447
|
+
const n = e.parentNode;
|
|
444
448
|
if (this.selectionMode === h.multiRow && (t || l || o))
|
|
445
|
-
|
|
449
|
+
n.selected = !this.#a.includes(n);
|
|
446
450
|
else {
|
|
447
|
-
const r =
|
|
448
|
-
this._resetSelection(!0),
|
|
451
|
+
const r = n.selected;
|
|
452
|
+
this._resetSelection(!0), n.selected = !r;
|
|
449
453
|
}
|
|
450
454
|
}, this.#o = {
|
|
451
455
|
handleChange(e, t) {
|
|
@@ -511,7 +515,7 @@ const h = {
|
|
|
511
515
|
* @internal
|
|
512
516
|
*/
|
|
513
517
|
rowsDataChanged() {
|
|
514
|
-
this.columnDefinitions === null && this.rowsData.length > 0 && (this.columnDefinitions =
|
|
518
|
+
this.columnDefinitions === null && this.rowsData.length > 0 && (this.columnDefinitions = k.generateColumns(this.rowsData[0])), this.$fastController.isConnected && this.toggleGeneratedHeader();
|
|
515
519
|
}
|
|
516
520
|
/**
|
|
517
521
|
* @internal
|
|
@@ -521,7 +525,7 @@ const h = {
|
|
|
521
525
|
this.generatedGridTemplateColumns = "";
|
|
522
526
|
return;
|
|
523
527
|
}
|
|
524
|
-
this.generatedGridTemplateColumns =
|
|
528
|
+
this.generatedGridTemplateColumns = k.generateTemplateColumns(
|
|
525
529
|
this.columnDefinitions
|
|
526
530
|
), this.$fastController.isConnected && (this.columnDefinitionsStale = !0, this.queueRowIndexUpdate());
|
|
527
531
|
}
|
|
@@ -561,11 +565,14 @@ const h = {
|
|
|
561
565
|
* @internal
|
|
562
566
|
*/
|
|
563
567
|
connectedCallback() {
|
|
564
|
-
super.connectedCallback(), this.rowItemTemplate === void 0 && (this.rowItemTemplate = this.defaultRowItemTemplate), this.
|
|
565
|
-
(
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
568
|
+
super.connectedCallback(), this.rowItemTemplate === void 0 && (this.rowItemTemplate = this.defaultRowItemTemplate), this.behaviorOrchestrator === null && (this.behaviorOrchestrator = z.create(this), this.$fastController.addBehavior(this.behaviorOrchestrator), this.behaviorOrchestrator.addBehaviorFactory(
|
|
569
|
+
new G(
|
|
570
|
+
D((e) => e.rowsData),
|
|
571
|
+
D((e) => e.rowItemTemplate),
|
|
572
|
+
{ positioning: !0 }
|
|
573
|
+
),
|
|
574
|
+
this.appendChild(document.createComment(""))
|
|
575
|
+
)), this.toggleGeneratedHeader(), this.addEventListener("row-focused", this.handleRowFocus), this.addEventListener(S, this.handleFocus), this.addEventListener(y, this.handleKeydown), this.addEventListener(w, this.handleFocusOut), this.observer = new MutationObserver(this.onChildListChange), this.observer.observe(this, { childList: !0 }), this.setupResizeObserver(), x.enqueue(this.queueRowIndexUpdate), this.#e(), R.getNotifier(this).subscribe(
|
|
569
576
|
this.#o,
|
|
570
577
|
"columnDefinitions"
|
|
571
578
|
);
|
|
@@ -574,10 +581,10 @@ const h = {
|
|
|
574
581
|
* @internal
|
|
575
582
|
*/
|
|
576
583
|
disconnectedCallback() {
|
|
577
|
-
super.disconnectedCallback(), this.removeEventListener("row-focused", this.handleRowFocus), this.removeEventListener(
|
|
584
|
+
super.disconnectedCallback(), this.removeEventListener("row-focused", this.handleRowFocus), this.removeEventListener(S, this.handleFocus), this.removeEventListener(y, this.handleKeydown), this.removeEventListener(
|
|
578
585
|
w,
|
|
579
586
|
this.handleFocusOut
|
|
580
|
-
), this.observer.disconnect(), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0), this.
|
|
587
|
+
), this.observer.disconnect(), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0), this.generatedHeader = null, R.getNotifier(this).unsubscribe(
|
|
581
588
|
this.#o,
|
|
582
589
|
"columnDefinitions"
|
|
583
590
|
);
|
|
@@ -609,15 +616,15 @@ const h = {
|
|
|
609
616
|
if (e.defaultPrevented)
|
|
610
617
|
return;
|
|
611
618
|
let t;
|
|
612
|
-
const l = this.rowElements.length - 1, o = this.offsetHeight + this.scrollTop,
|
|
619
|
+
const l = this.rowElements.length - 1, o = this.offsetHeight + this.scrollTop, n = this.rowElements[l];
|
|
613
620
|
switch (e.key) {
|
|
614
|
-
case
|
|
621
|
+
case ae:
|
|
615
622
|
e.preventDefault(), this.focusOnCell(this.focusRowIndex - 1, this.focusColumnIndex, !0);
|
|
616
623
|
break;
|
|
617
|
-
case
|
|
624
|
+
case ne:
|
|
618
625
|
e.preventDefault(), this.focusOnCell(this.focusRowIndex + 1, this.focusColumnIndex, !0);
|
|
619
626
|
break;
|
|
620
|
-
case
|
|
627
|
+
case ie:
|
|
621
628
|
if (e.preventDefault(), this.rowElements.length === 0) {
|
|
622
629
|
this.focusOnCell(0, 0, !1);
|
|
623
630
|
break;
|
|
@@ -635,12 +642,12 @@ const h = {
|
|
|
635
642
|
}
|
|
636
643
|
this.focusOnCell(t, this.focusColumnIndex, !1);
|
|
637
644
|
break;
|
|
638
|
-
case
|
|
645
|
+
case le:
|
|
639
646
|
if (e.preventDefault(), this.rowElements.length === 0) {
|
|
640
647
|
this.focusOnCell(0, 0, !1);
|
|
641
648
|
break;
|
|
642
649
|
}
|
|
643
|
-
if (this.focusRowIndex >= l ||
|
|
650
|
+
if (this.focusRowIndex >= l || n.offsetTop + n.offsetHeight <= o) {
|
|
644
651
|
this.focusOnCell(l, this.focusColumnIndex, !1);
|
|
645
652
|
return;
|
|
646
653
|
}
|
|
@@ -654,7 +661,7 @@ const h = {
|
|
|
654
661
|
}
|
|
655
662
|
this.focusOnCell(t, this.focusColumnIndex, !1);
|
|
656
663
|
break;
|
|
657
|
-
case
|
|
664
|
+
case L:
|
|
658
665
|
e.ctrlKey && (e.preventDefault(), this.focusOnCell(0, 0, !0));
|
|
659
666
|
break;
|
|
660
667
|
case P:
|
|
@@ -667,7 +674,7 @@ const h = {
|
|
|
667
674
|
}
|
|
668
675
|
}
|
|
669
676
|
queueFocusUpdate() {
|
|
670
|
-
this.isUpdatingFocus && this.contains(document.activeElement) || this.pendingFocusUpdate === !1 && (this.pendingFocusUpdate = !0, x.
|
|
677
|
+
this.isUpdatingFocus && this.contains(document.activeElement) || this.pendingFocusUpdate === !1 && (this.pendingFocusUpdate = !0, x.enqueue(() => this.updateFocus()));
|
|
671
678
|
}
|
|
672
679
|
updateFocus() {
|
|
673
680
|
this.pendingFocusUpdate = !1, this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, !0);
|
|
@@ -689,20 +696,20 @@ const h = {
|
|
|
689
696
|
slottedRowElementsChanged(e, t) {
|
|
690
697
|
this._resetSelection();
|
|
691
698
|
}
|
|
692
|
-
get #
|
|
699
|
+
get #a() {
|
|
693
700
|
return this.rowElements.filter((e) => e.selected);
|
|
694
701
|
}
|
|
695
702
|
get #r() {
|
|
696
703
|
return this.rowElements.reduce((e, t) => {
|
|
697
704
|
const o = Array.from(t.children).filter(
|
|
698
|
-
(
|
|
705
|
+
(n) => n.selected
|
|
699
706
|
);
|
|
700
707
|
return e.concat(o);
|
|
701
708
|
}, []);
|
|
702
709
|
}
|
|
703
710
|
selectionModeChanged(e) {
|
|
704
711
|
if (e === void 0) {
|
|
705
|
-
x.
|
|
712
|
+
x.enqueue(this._resetSelection);
|
|
706
713
|
return;
|
|
707
714
|
}
|
|
708
715
|
this._resetSelection(!0);
|
|
@@ -710,7 +717,7 @@ const h = {
|
|
|
710
717
|
#l;
|
|
711
718
|
#t;
|
|
712
719
|
#i;
|
|
713
|
-
#
|
|
720
|
+
#n;
|
|
714
721
|
#o;
|
|
715
722
|
static generateColumns(e) {
|
|
716
723
|
return Object.keys(e).map((t, l) => ({
|
|
@@ -739,8 +746,8 @@ const h = {
|
|
|
739
746
|
);
|
|
740
747
|
this.fixedColumnsPositions.forEach((l, o) => {
|
|
741
748
|
if (o < t.length) {
|
|
742
|
-
const
|
|
743
|
-
typeof
|
|
749
|
+
const n = t[o];
|
|
750
|
+
typeof n.setFixedPosition == "function" && n.setFixedPosition(`${l}px`);
|
|
744
751
|
}
|
|
745
752
|
});
|
|
746
753
|
});
|
|
@@ -773,8 +780,8 @@ const h = {
|
|
|
773
780
|
);
|
|
774
781
|
this.fixedColumnsPositions.forEach((l, o) => {
|
|
775
782
|
if (o < t.length) {
|
|
776
|
-
const
|
|
777
|
-
typeof
|
|
783
|
+
const n = t[o];
|
|
784
|
+
typeof n.setFixedPosition == "function" && n.setFixedPosition(void 0);
|
|
778
785
|
}
|
|
779
786
|
});
|
|
780
787
|
}), this.fixedColumnsPositions = [];
|
|
@@ -790,46 +797,46 @@ d([
|
|
|
790
797
|
m({ attribute: "grid-template-columns" })
|
|
791
798
|
], s.prototype, "gridTemplateColumns");
|
|
792
799
|
d([
|
|
793
|
-
|
|
800
|
+
a
|
|
794
801
|
], s.prototype, "rowsData");
|
|
795
802
|
d([
|
|
796
|
-
|
|
803
|
+
a
|
|
797
804
|
], s.prototype, "columnDefinitions");
|
|
798
805
|
d([
|
|
799
|
-
|
|
806
|
+
a
|
|
800
807
|
], s.prototype, "rowItemTemplate");
|
|
801
808
|
d([
|
|
802
|
-
|
|
809
|
+
a
|
|
803
810
|
], s.prototype, "cellItemTemplate");
|
|
804
811
|
d([
|
|
805
|
-
|
|
812
|
+
a
|
|
806
813
|
], s.prototype, "headerCellItemTemplate");
|
|
807
814
|
d([
|
|
808
|
-
|
|
815
|
+
a
|
|
809
816
|
], s.prototype, "focusRowIndex");
|
|
810
817
|
d([
|
|
811
|
-
|
|
818
|
+
a
|
|
812
819
|
], s.prototype, "focusColumnIndex");
|
|
813
820
|
d([
|
|
814
|
-
m({ attribute: "fixed-columns", converter:
|
|
821
|
+
m({ attribute: "fixed-columns", converter: W })
|
|
815
822
|
], s.prototype, "fixedColumns");
|
|
816
823
|
d([
|
|
817
|
-
|
|
824
|
+
a
|
|
818
825
|
], s.prototype, "defaultRowItemTemplate");
|
|
819
826
|
d([
|
|
820
|
-
|
|
827
|
+
a
|
|
821
828
|
], s.prototype, "rowElementTag");
|
|
822
829
|
d([
|
|
823
|
-
|
|
830
|
+
a
|
|
824
831
|
], s.prototype, "rowElements");
|
|
825
832
|
d([
|
|
826
|
-
|
|
833
|
+
a
|
|
827
834
|
], s.prototype, "slottedRowElements");
|
|
828
835
|
d([
|
|
829
836
|
m({ attribute: "selection-mode" })
|
|
830
837
|
], s.prototype, "selectionMode");
|
|
831
|
-
let
|
|
832
|
-
function
|
|
838
|
+
let ge = s;
|
|
839
|
+
function Ce(i) {
|
|
833
840
|
const e = i.tagFor(c);
|
|
834
841
|
return f`
|
|
835
842
|
<${e}
|
|
@@ -839,10 +846,10 @@ function ve(i) {
|
|
|
839
846
|
></${e}>
|
|
840
847
|
`;
|
|
841
848
|
}
|
|
842
|
-
function
|
|
849
|
+
function be(i) {
|
|
843
850
|
return i.selectionMode === void 0 || i.selectionMode === h.none ? null : i.selectionMode.includes("multi") ? "true" : "false";
|
|
844
851
|
}
|
|
845
|
-
function
|
|
852
|
+
function we(i) {
|
|
846
853
|
if (i.columnDefinitions === null) {
|
|
847
854
|
const e = i.querySelector(
|
|
848
855
|
'[cell-type="columnheader"]'
|
|
@@ -855,35 +862,35 @@ function Ce(i) {
|
|
|
855
862
|
}
|
|
856
863
|
}
|
|
857
864
|
}
|
|
858
|
-
function
|
|
865
|
+
function ye(i, { event: e }) {
|
|
859
866
|
e.stopPropagation();
|
|
860
867
|
}
|
|
861
|
-
const
|
|
862
|
-
const e =
|
|
868
|
+
const _e = (i) => {
|
|
869
|
+
const e = Ce(i), t = i.tagFor(c, !0);
|
|
863
870
|
return f`
|
|
864
871
|
<template
|
|
865
|
-
aria-multiselectable="${
|
|
872
|
+
aria-multiselectable="${be}"
|
|
866
873
|
role="grid"
|
|
867
874
|
tabindex="0"
|
|
868
|
-
@sort="${
|
|
875
|
+
@sort="${ye}"
|
|
869
876
|
:rowElementTag="${() => t}"
|
|
870
877
|
:defaultRowItemTemplate="${e}"
|
|
871
|
-
${
|
|
878
|
+
${K({
|
|
872
879
|
property: "rowElements",
|
|
873
|
-
filter:
|
|
880
|
+
filter: q("[role=row],[data-vvd-component=data-grid-row]")
|
|
874
881
|
})}
|
|
875
882
|
>
|
|
876
883
|
<div class="base">
|
|
877
|
-
${
|
|
878
|
-
<slot ${
|
|
884
|
+
${we}
|
|
885
|
+
<slot ${V("slottedRowElements")}></slot>
|
|
879
886
|
</div>
|
|
880
887
|
</template>
|
|
881
888
|
`;
|
|
882
889
|
};
|
|
883
|
-
function
|
|
890
|
+
function xe(i) {
|
|
884
891
|
return i._selectable && i.selected ? "true" : i._selectable && !i.selected ? "false" : null;
|
|
885
892
|
}
|
|
886
|
-
function
|
|
893
|
+
function De(i) {
|
|
887
894
|
const e = i.tagFor(p);
|
|
888
895
|
return f`
|
|
889
896
|
<${e}
|
|
@@ -895,7 +902,7 @@ function _e(i) {
|
|
|
895
902
|
></${e}>
|
|
896
903
|
`;
|
|
897
904
|
}
|
|
898
|
-
function
|
|
905
|
+
function Te(i) {
|
|
899
906
|
const e = i.tagFor(p);
|
|
900
907
|
return f`
|
|
901
908
|
<${e}
|
|
@@ -905,20 +912,20 @@ function xe(i) {
|
|
|
905
912
|
></${e}>
|
|
906
913
|
`;
|
|
907
914
|
}
|
|
908
|
-
const
|
|
909
|
-
const e =
|
|
915
|
+
const ke = (i) => {
|
|
916
|
+
const e = De(i), t = Te(i), l = (o) => Q("base", ["selected", !!o.selected]);
|
|
910
917
|
return f`
|
|
911
918
|
<template
|
|
912
|
-
${
|
|
919
|
+
${U({
|
|
913
920
|
role: "row",
|
|
914
|
-
ariaSelected:
|
|
921
|
+
ariaSelected: xe
|
|
915
922
|
})}
|
|
916
923
|
class="${(o) => o.rowType !== "default" ? o.rowType : ""}"
|
|
917
924
|
:defaultCellItemTemplate="${e}"
|
|
918
925
|
:defaultHeaderCellItemTemplate="${t}"
|
|
919
|
-
${
|
|
926
|
+
${K({
|
|
920
927
|
property: "cellElements",
|
|
921
|
-
filter:
|
|
928
|
+
filter: q(
|
|
922
929
|
'[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"],[data-vvd-component="data-grid-cell"]'
|
|
923
930
|
)
|
|
924
931
|
})}
|
|
@@ -927,85 +934,85 @@ const De = (i) => {
|
|
|
927
934
|
class="${l}"
|
|
928
935
|
style="grid-template-columns: ${(o) => o.gridTemplateColumns};"
|
|
929
936
|
>
|
|
930
|
-
<slot ${
|
|
937
|
+
<slot ${V("slottedCellElements")}></slot>
|
|
931
938
|
</div>
|
|
932
939
|
</template>
|
|
933
940
|
`;
|
|
934
941
|
};
|
|
935
|
-
function
|
|
936
|
-
return i.cellType === "columnheader" && i.sortDirection !== void 0 && i.sortDirection !==
|
|
942
|
+
function I(i) {
|
|
943
|
+
return i.cellType === "columnheader" && i.sortDirection !== void 0 && i.sortDirection !== T.other;
|
|
937
944
|
}
|
|
938
|
-
function
|
|
939
|
-
return i.sortDirection ===
|
|
945
|
+
function Ie(i) {
|
|
946
|
+
return i.sortDirection === T.ascending ? "sort-asc-solid" : i.sortDirection === T.descending ? "sort-desc-solid" : "sort-solid";
|
|
940
947
|
}
|
|
941
|
-
function
|
|
948
|
+
function Ee(i) {
|
|
942
949
|
return i._selectable && i.selected ? "true" : i._selectable && !i.selected ? "false" : null;
|
|
943
950
|
}
|
|
944
|
-
function
|
|
945
|
-
const e = i.tagFor(
|
|
951
|
+
function Fe(i) {
|
|
952
|
+
const e = i.tagFor(j);
|
|
946
953
|
return f`
|
|
947
|
-
${
|
|
948
|
-
|
|
954
|
+
${B(
|
|
955
|
+
I,
|
|
949
956
|
f`
|
|
950
|
-
<${e} class="header-icon" name="${
|
|
957
|
+
<${e} class="header-icon" name="${Ie}"></${e}>
|
|
951
958
|
`
|
|
952
959
|
)}
|
|
953
960
|
`;
|
|
954
961
|
}
|
|
955
|
-
function
|
|
956
|
-
return (e.key ===
|
|
962
|
+
function $e(i, e) {
|
|
963
|
+
return (e.key === A || e.key === re) && i._handleInteraction(), !0;
|
|
957
964
|
}
|
|
958
|
-
const
|
|
959
|
-
const e = i.tagFor(
|
|
965
|
+
const Re = (i) => {
|
|
966
|
+
const e = i.tagFor(X), t = (l) => Q("base", ["selected", !!l.selected]);
|
|
960
967
|
return f`
|
|
961
968
|
<template
|
|
962
969
|
tabindex="-1"
|
|
963
|
-
${
|
|
964
|
-
role: (l) =>
|
|
965
|
-
ariaSelected:
|
|
970
|
+
${U({
|
|
971
|
+
role: (l) => O[l.cellType] ?? O.default,
|
|
972
|
+
ariaSelected: Ee,
|
|
966
973
|
ariaSort: (l) => l.sortDirection ?? null
|
|
967
974
|
})}
|
|
968
975
|
@click="${(l) => l._handleInteraction()}"
|
|
969
|
-
@keydown="${(l, o) =>
|
|
976
|
+
@keydown="${(l, o) => $e(l, o.event)}"
|
|
970
977
|
>
|
|
971
978
|
<div
|
|
972
979
|
class="${t}"
|
|
973
|
-
role="${(l) =>
|
|
980
|
+
role="${(l) => I(l) ? "button" : void 0}"
|
|
974
981
|
>
|
|
975
982
|
${(l) => l.selected ? f`<${e}>${(o) => o.locale.dataGrid.cell.selected}</${e}>` : null}
|
|
976
983
|
<slot></slot>
|
|
977
|
-
${
|
|
978
|
-
|
|
984
|
+
${B(
|
|
985
|
+
I,
|
|
979
986
|
f`<${e}>${(l) => l.locale.dataGrid.cell.button}</${e}>
|
|
980
987
|
`
|
|
981
988
|
)}
|
|
982
|
-
${(l) =>
|
|
989
|
+
${(l) => Fe(i)}
|
|
983
990
|
</div>
|
|
984
991
|
</template>
|
|
985
992
|
`;
|
|
986
|
-
},
|
|
993
|
+
}, Se = F(
|
|
987
994
|
"data-grid-cell",
|
|
988
995
|
p,
|
|
989
|
-
|
|
990
|
-
[
|
|
996
|
+
Re,
|
|
997
|
+
[N, Y],
|
|
991
998
|
{
|
|
992
|
-
styles:
|
|
999
|
+
styles: ue
|
|
993
1000
|
}
|
|
994
|
-
),
|
|
1001
|
+
), He = F(
|
|
995
1002
|
"data-grid-row",
|
|
996
1003
|
c,
|
|
997
|
-
|
|
998
|
-
[
|
|
1004
|
+
ke,
|
|
1005
|
+
[Se],
|
|
999
1006
|
{
|
|
1000
|
-
styles:
|
|
1007
|
+
styles: de
|
|
1001
1008
|
}
|
|
1002
|
-
),
|
|
1009
|
+
), Oe = F(
|
|
1003
1010
|
"data-grid",
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
[
|
|
1011
|
+
ge,
|
|
1012
|
+
_e,
|
|
1013
|
+
[He],
|
|
1007
1014
|
{
|
|
1008
|
-
styles:
|
|
1015
|
+
styles: ce
|
|
1009
1016
|
}
|
|
1010
|
-
),
|
|
1011
|
-
|
|
1017
|
+
), ze = J(Oe);
|
|
1018
|
+
ze();
|