@vonage/vivid 5.4.0 → 5.6.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/LICENSE.md +201 -0
- package/accordion/definition.cjs +5 -0
- package/accordion/definition.js +5 -0
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +14 -3
- package/alert/definition.cjs +4 -12
- package/alert/definition.js +5 -13
- package/alert/index.cjs +11 -11
- package/alert/index.js +33 -37
- package/audio-player/definition.cjs +4 -0
- package/audio-player/definition.js +4 -0
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +8 -2
- package/banner/definition.cjs +2 -4
- package/banner/definition.js +2 -4
- package/banner/index.cjs +2 -2
- package/banner/index.js +1 -1
- package/breadcrumb/definition.cjs +1 -0
- package/breadcrumb/definition.js +1 -0
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +1 -0
- package/bundled/affix.js +1 -1
- 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 +3 -1
- package/bundled/base-color-picker.cjs +18 -13
- package/bundled/base-color-picker.js +107 -84
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +3 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +14 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +4 -2
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +7 -7
- package/bundled/definition10.js +29 -19
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +73 -204
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +218 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +86 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +125 -71
- package/bundled/definition19.cjs +16 -16
- package/bundled/definition19.js +132 -94
- package/bundled/definition2.cjs +8 -9
- package/bundled/definition2.js +89 -142
- package/bundled/definition22.cjs +1 -1
- package/bundled/definition22.js +1 -0
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +2 -1
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +9 -3
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -0
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +7 -4
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -0
- package/bundled/definition9.cjs +6 -6
- package/bundled/definition9.js +545 -488
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +3 -1
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +11 -3
- package/bundled/host-semantics.js +4 -4
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +22 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +149 -66
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +11 -8
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +36 -56
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +4 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +12 -12
- package/bundled/time-selection-picker.template.js +16 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -0
- package/bundled/vivid-element.cjs +4 -4
- package/bundled/vivid-element.js +529 -492
- package/calendar/definition.cjs +2 -0
- package/calendar/definition.js +2 -0
- package/calendar/index.cjs +13 -13
- package/calendar/index.js +174 -144
- package/checkbox/definition.cjs +1 -0
- package/checkbox/definition.js +1 -0
- package/color-picker/definition.cjs +213 -112
- package/color-picker/definition.js +213 -112
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +417 -326
- package/combobox/definition.cjs +17 -6
- package/combobox/definition.js +17 -6
- package/combobox/index.cjs +14 -9
- package/combobox/index.js +54 -42
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +6976 -484
- package/data-grid/definition.cjs +105 -7
- package/data-grid/definition.js +105 -7
- package/data-grid/index.cjs +52 -38
- package/data-grid/index.js +313 -242
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +2 -0
- package/date-range-picker/definition.js +2 -0
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -3
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +148 -0
- package/dial-pad/definition.js +148 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +202 -101
- package/dialog/definition.cjs +1 -0
- package/dialog/definition.js +1 -0
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -0
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/fab/definition.cjs +1 -0
- package/fab/definition.js +1 -0
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -0
- package/file-picker/definition.cjs +7 -2
- package/file-picker/definition.js +7 -2
- package/file-picker/index.cjs +6 -6
- package/file-picker/index.js +82 -73
- package/icon/definition.cjs +66 -41
- package/icon/definition.js +67 -42
- package/index.cjs +21 -0
- package/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- package/lib/data-grid/locale.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/dial-pad/dial-pad.d.ts +1 -0
- package/lib/icon/icon.d.ts +1 -1
- package/lib/menu/menu.d.ts +4 -4
- package/lib/rich-text-editor/definition.d.ts +3 -2
- package/lib/rich-text-editor/locale.d.ts +29 -3
- package/lib/rich-text-editor/popover.d.ts +19 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/config.d.ts +18 -0
- package/lib/rich-text-editor/rte/document.d.ts +28 -0
- package/lib/rich-text-editor/rte/exports.d.ts +23 -0
- package/lib/rich-text-editor/rte/feature.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
- package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
- package/lib/rich-text-editor/rte/instance.d.ts +57 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
- package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +6 -5
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +4 -4
- package/locales/de-DE.cjs +58 -7
- package/locales/de-DE.js +58 -7
- package/locales/en-GB.cjs +60 -9
- package/locales/en-GB.js +60 -9
- package/locales/en-US.cjs +60 -9
- package/locales/en-US.js +60 -9
- package/locales/ja-JP.cjs +59 -8
- package/locales/ja-JP.js +59 -8
- package/locales/zh-CN.cjs +58 -7
- package/locales/zh-CN.js +58 -7
- package/menu/definition.cjs +1 -0
- package/menu/definition.js +1 -0
- package/number-field/definition.cjs +5 -3
- package/number-field/definition.js +5 -3
- package/number-field/index.cjs +5 -3
- package/number-field/index.js +34 -32
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +76 -62
- package/pagination/definition.cjs +2 -0
- package/pagination/definition.js +2 -0
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +2 -0
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/definition.cjs +4 -0
- package/radio/definition.js +4 -0
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/definition.cjs +2 -1
- package/range-slider/definition.js +2 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +3 -1
- package/rich-text-editor/definition.cjs +17942 -1074
- package/rich-text-editor/definition.js +17926 -1079
- package/rich-text-editor/index.cjs +29 -130
- package/rich-text-editor/index.js +5565 -2474
- package/searchable-select/definition.cjs +6 -2
- package/searchable-select/definition.js +6 -2
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +14 -10
- package/select/definition.cjs +22 -4
- package/select/definition.js +22 -4
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- package/shared/patterns/anchored.d.ts +8 -8
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/localized.d.ts +386 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/shared/utils/promise.d.ts +7 -0
- package/simple-color-picker/definition.cjs +11 -6
- package/simple-color-picker/definition.js +11 -6
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +44 -39
- package/slider/definition.cjs +7 -1
- package/slider/definition.js +7 -1
- package/styles/core/all.css +5 -1
- package/styles/core/theme.css +5 -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/definition.cjs +1 -0
- package/switch/definition.js +1 -0
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -0
- package/tabs/definition.cjs +2 -0
- package/tabs/definition.js +2 -0
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +2 -0
- package/tag/definition.cjs +34 -14
- package/tag/definition.js +34 -14
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- package/text-area/definition.cjs +13 -7
- package/text-area/definition.js +13 -7
- package/text-area/index.cjs +6 -6
- package/text-area/index.js +20 -14
- package/text-field/definition.cjs +16 -6
- package/text-field/definition.js +16 -6
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +5 -1
- package/toggletip/definition.js +5 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +6 -3
- package/tooltip/definition.js +6 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-view/definition.cjs +28 -6
- package/tree-view/definition.js +28 -6
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +28 -6
- package/unbundled/_commonjsHelpers.cjs +0 -26
- package/unbundled/_commonjsHelpers.js +1 -26
- package/unbundled/attribute-binding-behaviour.cjs +1 -0
- package/unbundled/attribute-binding-behaviour.js +1 -0
- package/unbundled/base-color-picker.cjs +45 -21
- package/unbundled/base-color-picker.js +45 -21
- package/unbundled/base-progress.cjs +3 -0
- package/unbundled/base-progress.js +3 -0
- package/unbundled/button.cjs +14 -10
- package/unbundled/button.js +14 -10
- package/unbundled/calendar-picker.template.cjs +3 -1
- package/unbundled/calendar-picker.template.js +3 -1
- package/unbundled/definition.cjs +1 -0
- package/unbundled/definition.js +1 -0
- package/unbundled/definition2.cjs +4 -1
- package/unbundled/definition2.js +4 -1
- package/unbundled/definition3.cjs +1 -0
- package/unbundled/definition3.js +1 -0
- package/unbundled/definition4.cjs +1 -0
- package/unbundled/definition4.js +1 -0
- package/unbundled/definition5.cjs +3 -2
- package/unbundled/definition5.js +4 -3
- package/unbundled/delegates-aria.cjs +1 -0
- package/unbundled/delegates-aria.js +1 -0
- package/unbundled/form-associated.cjs +4 -0
- package/unbundled/form-associated.js +4 -0
- package/unbundled/listbox.cjs +16 -1
- package/unbundled/listbox.js +16 -1
- package/unbundled/localized.cjs +36 -0
- package/unbundled/localized.js +37 -2
- package/unbundled/mixins.cjs +2 -0
- package/unbundled/mixins.js +2 -0
- package/unbundled/picker-field.template.cjs +3 -35
- package/unbundled/picker-field.template.js +3 -34
- package/unbundled/scrollIntoView.cjs +1 -0
- package/unbundled/scrollIntoView.js +1 -0
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +5 -1
- package/unbundled/time-selection-picker.template.js +5 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +54 -44
- package/video-player/definition.js +50 -40
- package/video-player/index.cjs +28 -28
- package/video-player/index.js +1448 -1442
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +6463 -6099
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
- package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
- package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
- package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
- package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
- package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
- package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
- package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
package/data-grid/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { V as
|
|
3
|
-
import { V as
|
|
4
|
-
import { R as
|
|
5
|
-
import { n as
|
|
6
|
-
import { d as
|
|
7
|
-
import { H as
|
|
8
|
-
import { c as
|
|
9
|
-
import { s as
|
|
10
|
-
import { L as
|
|
11
|
-
import { c as
|
|
12
|
-
import { w as
|
|
13
|
-
const
|
|
1
|
+
import { I as N, i as W } from "../bundled/definition2.js";
|
|
2
|
+
import { V as $, h as u, a as m, o as a, b as G, U as D, O as R, n as J, c as X, d as F } from "../bundled/vivid-element.js";
|
|
3
|
+
import { V as Y, v as Z } from "../bundled/definition14.js";
|
|
4
|
+
import { R as A } from "../bundled/repeat.js";
|
|
5
|
+
import { n as T } from "../bundled/normalize.js";
|
|
6
|
+
import { d as ee, e as te, f as L, k as P, a as M, g as oe, h as le, i as ie, j as ne, b as ae, c as re, l as se } from "../bundled/key-codes.js";
|
|
7
|
+
import { H as K, a as U } from "../bundled/host-semantics.js";
|
|
8
|
+
import { c as V } from "../bundled/children.js";
|
|
9
|
+
import { s as q, e as Q } from "../bundled/slotted.js";
|
|
10
|
+
import { L as ce } from "../bundled/localized.js";
|
|
11
|
+
import { c as B } from "../bundled/class-names.js";
|
|
12
|
+
import { w as k } from "../bundled/when.js";
|
|
13
|
+
const H = "focus", O = "focusin", w = "focusout", y = "keydown", de = ":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}", ue = ".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)}", he = ':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}', _ = {
|
|
14
14
|
none: "none",
|
|
15
15
|
ascending: "ascending",
|
|
16
16
|
descending: "descending",
|
|
@@ -19,36 +19,36 @@ const S = "focus", H = "focusin", w = "focusout", y = "keydown", ce = ":host{dis
|
|
|
19
19
|
none: "none",
|
|
20
20
|
default: "default",
|
|
21
21
|
sticky: "sticky"
|
|
22
|
-
},
|
|
22
|
+
}, v = {
|
|
23
23
|
default: "default",
|
|
24
24
|
columnHeader: "columnheader",
|
|
25
25
|
rowHeader: "rowheader"
|
|
26
|
-
},
|
|
26
|
+
}, g = {
|
|
27
27
|
default: "default",
|
|
28
28
|
header: "header",
|
|
29
29
|
stickyHeader: "sticky-header"
|
|
30
|
-
},
|
|
30
|
+
}, z = {
|
|
31
31
|
columnheader: "columnheader",
|
|
32
32
|
rowheader: "rowheader",
|
|
33
33
|
default: "gridcell"
|
|
34
34
|
};
|
|
35
|
-
var
|
|
36
|
-
for (var
|
|
37
|
-
(r =
|
|
38
|
-
return
|
|
35
|
+
var fe = Object.defineProperty, C = (o, e, t, i) => {
|
|
36
|
+
for (var l = void 0, n = o.length - 1, r; n >= 0; n--)
|
|
37
|
+
(r = o[n]) && (l = r(e, t, l) || l);
|
|
38
|
+
return l && fe(e, t, l), l;
|
|
39
39
|
};
|
|
40
|
-
const
|
|
40
|
+
const me = u`
|
|
41
41
|
<template>
|
|
42
|
-
${(
|
|
42
|
+
${(o) => o.rowData === null || o.columnDefinition === null || o.columnDefinition.columnDataKey === null ? null : o.rowData[o.columnDefinition.columnDataKey]}
|
|
43
43
|
</template>
|
|
44
|
-
`,
|
|
44
|
+
`, pe = u`
|
|
45
45
|
<template>
|
|
46
|
-
${(
|
|
46
|
+
${(o) => o.columnDefinition.title === void 0 ? o.columnDefinition.columnDataKey : o.columnDefinition.title}
|
|
47
47
|
</template>
|
|
48
48
|
`;
|
|
49
|
-
class p extends
|
|
49
|
+
class p extends ce(K($)) {
|
|
50
50
|
constructor() {
|
|
51
|
-
super(...arguments), this.cellType =
|
|
51
|
+
super(...arguments), this.cellType = v.default, this.rowData = null, this.columnDefinition = null, this.isActiveCell = !1, this.customCellView = null, this.updateCellStyle = () => {
|
|
52
52
|
this.gridColumn && !this.gridColumn.includes("undefined") ? this.style.gridColumn = this.gridColumn : this.style.removeProperty("grid-column");
|
|
53
53
|
}, this._selectable = !1, this.selected = !1, this.ariaSelected = null, this.ariaSort = null;
|
|
54
54
|
}
|
|
@@ -88,13 +88,13 @@ class p extends se(M(E)) {
|
|
|
88
88
|
* @internal
|
|
89
89
|
*/
|
|
90
90
|
connectedCallback() {
|
|
91
|
-
super.connectedCallback(), this.addEventListener(
|
|
91
|
+
super.connectedCallback(), this.addEventListener(O, 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();
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* @internal
|
|
95
95
|
*/
|
|
96
96
|
disconnectedCallback() {
|
|
97
|
-
super.disconnectedCallback(), this.removeEventListener(
|
|
97
|
+
super.disconnectedCallback(), this.removeEventListener(O, this.handleFocusin), this.removeEventListener(
|
|
98
98
|
w,
|
|
99
99
|
this.handleFocusout
|
|
100
100
|
), this.removeEventListener(y, this.handleKeydown), this.disconnectCellView();
|
|
@@ -102,15 +102,17 @@ class p extends se(M(E)) {
|
|
|
102
102
|
handleFocusin(e) {
|
|
103
103
|
if (this.shadowRoot.querySelector(".base").classList.add("active"), !this.isActiveCell) {
|
|
104
104
|
switch (this.isActiveCell = !0, this.cellType) {
|
|
105
|
-
case
|
|
105
|
+
case v.columnHeader:
|
|
106
106
|
if (this.columnDefinition !== null && this.columnDefinition.headerCellInternalFocusQueue !== !0 && typeof this.columnDefinition.headerCellFocusTargetCallback == "function") {
|
|
107
107
|
const t = this.columnDefinition.headerCellFocusTargetCallback(this);
|
|
108
|
+
/* v8 ignore else -- @preserve */
|
|
108
109
|
t !== null && t.focus();
|
|
109
110
|
}
|
|
110
111
|
break;
|
|
111
112
|
default:
|
|
112
113
|
if (this.columnDefinition !== null && this.columnDefinition.cellInternalFocusQueue !== !0 && typeof this.columnDefinition.cellFocusTargetCallback == "function") {
|
|
113
114
|
const t = this.columnDefinition.cellFocusTargetCallback(this);
|
|
115
|
+
/* v8 ignore else -- @preserve */
|
|
114
116
|
t !== null && t.focus();
|
|
115
117
|
}
|
|
116
118
|
break;
|
|
@@ -119,56 +121,64 @@ class p extends se(M(E)) {
|
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
handleFocusout(e) {
|
|
122
|
-
this.shadowRoot.querySelector(".base").classList.remove("active")
|
|
124
|
+
this.shadowRoot.querySelector(".base").classList.remove("active");
|
|
125
|
+
/* v8 ignore else -- @preserve */
|
|
126
|
+
this !== document.activeElement && !this.contains(document.activeElement) && (this.isActiveCell = !1);
|
|
123
127
|
}
|
|
124
128
|
handleKeydown(e) {
|
|
125
|
-
if (!(e.defaultPrevented || this.columnDefinition === null || this.cellType ===
|
|
129
|
+
if (!(e.defaultPrevented || this.columnDefinition === null || this.cellType === v.default && this.columnDefinition.cellInternalFocusQueue !== !0 || this.cellType === v.columnHeader && this.columnDefinition.headerCellInternalFocusQueue !== !0))
|
|
126
130
|
switch (e.key) {
|
|
127
|
-
case
|
|
128
|
-
case
|
|
131
|
+
case L:
|
|
132
|
+
case te:
|
|
129
133
|
if (this.contains(document.activeElement) && document.activeElement !== this)
|
|
130
134
|
return;
|
|
131
135
|
switch (this.cellType) {
|
|
132
|
-
case
|
|
136
|
+
case v.columnHeader: {
|
|
133
137
|
if (this.columnDefinition.headerCellFocusTargetCallback !== void 0) {
|
|
134
138
|
const t = this.columnDefinition.headerCellFocusTargetCallback(this);
|
|
139
|
+
/* v8 ignore else -- @preserve */
|
|
135
140
|
t !== null && t.focus(), e.preventDefault();
|
|
136
141
|
}
|
|
137
142
|
break;
|
|
138
|
-
|
|
143
|
+
}
|
|
144
|
+
default: {
|
|
139
145
|
if (this.columnDefinition.cellFocusTargetCallback !== void 0) {
|
|
140
146
|
const t = this.columnDefinition.cellFocusTargetCallback(this);
|
|
147
|
+
/* v8 ignore else -- @preserve */
|
|
141
148
|
t !== null && t.focus(), e.preventDefault();
|
|
142
149
|
}
|
|
143
150
|
break;
|
|
151
|
+
}
|
|
144
152
|
}
|
|
145
153
|
break;
|
|
146
|
-
case
|
|
154
|
+
case ee: {
|
|
155
|
+
/* v8 ignore else -- @preserve */
|
|
147
156
|
this.contains(document.activeElement) && document.activeElement !== this && (this.focus(), e.preventDefault());
|
|
148
157
|
break;
|
|
158
|
+
}
|
|
149
159
|
}
|
|
150
160
|
}
|
|
151
161
|
updateCellView() {
|
|
152
162
|
if (this.disconnectCellView(), this.columnDefinition !== null) {
|
|
153
163
|
switch (this.cellType) {
|
|
154
|
-
case
|
|
164
|
+
case v.columnHeader:
|
|
155
165
|
this.columnDefinition.headerCellTemplate !== void 0 ? this.customCellView = this.columnDefinition.headerCellTemplate.render(
|
|
156
166
|
this,
|
|
157
167
|
this
|
|
158
|
-
) : this.customCellView =
|
|
168
|
+
) : this.customCellView = pe.render(
|
|
159
169
|
this,
|
|
160
170
|
this
|
|
161
171
|
);
|
|
162
172
|
break;
|
|
163
|
-
case
|
|
164
|
-
case
|
|
173
|
+
case v.rowHeader:
|
|
174
|
+
case v.default:
|
|
165
175
|
this.columnDefinition.cellTemplate !== void 0 ? this.customCellView = this.columnDefinition.cellTemplate.render(
|
|
166
176
|
this,
|
|
167
177
|
this
|
|
168
|
-
) : this.customCellView =
|
|
178
|
+
) : this.customCellView = me.render(this, this);
|
|
169
179
|
break;
|
|
170
180
|
}
|
|
171
|
-
this.columnDefinition?.sortable ? this.columnDefinition.sortDirection ? this.sortDirection = this.columnDefinition.sortDirection : this.sortDirection =
|
|
181
|
+
this.columnDefinition?.sortable ? this.columnDefinition.sortDirection ? this.sortDirection = this.columnDefinition.sortDirection : this.sortDirection = _.none : this.sortDirection = void 0;
|
|
172
182
|
}
|
|
173
183
|
}
|
|
174
184
|
disconnectCellView() {
|
|
@@ -230,14 +240,14 @@ C([
|
|
|
230
240
|
C([
|
|
231
241
|
m({ attribute: "sort-direction" })
|
|
232
242
|
], p.prototype, "sortDirection");
|
|
233
|
-
var
|
|
234
|
-
for (var
|
|
235
|
-
(r =
|
|
236
|
-
return
|
|
243
|
+
var ve = Object.defineProperty, h = (o, e, t, i) => {
|
|
244
|
+
for (var l = void 0, n = o.length - 1, r; n >= 0; n--)
|
|
245
|
+
(r = o[n]) && (l = r(e, t, l) || l);
|
|
246
|
+
return l && ve(e, t, l), l;
|
|
237
247
|
};
|
|
238
|
-
class c extends
|
|
248
|
+
class c extends K($) {
|
|
239
249
|
constructor() {
|
|
240
|
-
super(...arguments), this.rowType =
|
|
250
|
+
super(...arguments), this.rowType = g.default, this.rowData = null, this.columnDefinitions = null, this.behaviorOrchestrator = null, this.focusColumnIndex = 0, this.updateRowStyle = () => {
|
|
241
251
|
this.style.gridTemplateColumns = this.gridTemplateColumns;
|
|
242
252
|
}, this.ariaSelected = null, this._selectable = !1, this.selected = !1;
|
|
243
253
|
}
|
|
@@ -269,10 +279,12 @@ class c extends M(E) {
|
|
|
269
279
|
* @internal
|
|
270
280
|
*/
|
|
271
281
|
connectedCallback() {
|
|
272
|
-
super.connectedCallback()
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
282
|
+
super.connectedCallback();
|
|
283
|
+
/* v8 ignore else -- @preserve */
|
|
284
|
+
this.behaviorOrchestrator === null && (this.updateItemTemplate(), this.behaviorOrchestrator = G.create(this), this.$fastController.addBehavior(this.behaviorOrchestrator), this.behaviorOrchestrator.addBehaviorFactory(
|
|
285
|
+
new A(
|
|
286
|
+
T((e) => e.columnDefinitions),
|
|
287
|
+
T((e) => e.activeCellItemTemplate),
|
|
276
288
|
{ positioning: !0 }
|
|
277
289
|
),
|
|
278
290
|
this.appendChild(document.createComment(""))
|
|
@@ -288,6 +300,7 @@ class c extends M(E) {
|
|
|
288
300
|
), this.removeEventListener(y, this.handleKeydown);
|
|
289
301
|
}
|
|
290
302
|
handleFocusout(e) {
|
|
303
|
+
/* v8 ignore else -- @preserve */
|
|
291
304
|
this.contains(document.activeElement) || (this.focusColumnIndex = 0);
|
|
292
305
|
}
|
|
293
306
|
handleCellFocus(e) {
|
|
@@ -298,16 +311,16 @@ class c extends M(E) {
|
|
|
298
311
|
return;
|
|
299
312
|
let t = 0;
|
|
300
313
|
switch (e.key) {
|
|
301
|
-
case
|
|
314
|
+
case le:
|
|
302
315
|
t = Math.max(0, this.focusColumnIndex - 1), this.cellElements[t].focus(), e.preventDefault();
|
|
303
316
|
break;
|
|
304
|
-
case
|
|
317
|
+
case oe:
|
|
305
318
|
t = Math.min(
|
|
306
319
|
this.cellElements.length - 1,
|
|
307
320
|
this.focusColumnIndex + 1
|
|
308
321
|
), this.cellElements[t].focus(), e.preventDefault();
|
|
309
322
|
break;
|
|
310
|
-
case
|
|
323
|
+
case M:
|
|
311
324
|
e.ctrlKey || (this.cellElements[0].focus(), e.preventDefault());
|
|
312
325
|
break;
|
|
313
326
|
case P:
|
|
@@ -316,7 +329,7 @@ class c extends M(E) {
|
|
|
316
329
|
}
|
|
317
330
|
}
|
|
318
331
|
updateItemTemplate() {
|
|
319
|
-
this.activeCellItemTemplate = this.rowType ===
|
|
332
|
+
this.activeCellItemTemplate = this.rowType === g.default && this.cellItemTemplate !== void 0 ? this.cellItemTemplate : this.rowType === g.default && this.cellItemTemplate === void 0 ? this.defaultCellItemTemplate : this.headerCellItemTemplate !== void 0 ? this.headerCellItemTemplate : this.defaultHeaderCellItemTemplate;
|
|
320
333
|
}
|
|
321
334
|
/**
|
|
322
335
|
* @internal
|
|
@@ -325,81 +338,82 @@ class c extends M(E) {
|
|
|
325
338
|
super.ariaSelectedChanged(e, t), this._selectable = t !== null, this.selected = t === "true";
|
|
326
339
|
}
|
|
327
340
|
}
|
|
328
|
-
|
|
341
|
+
h([
|
|
329
342
|
m({ attribute: "grid-template-columns" })
|
|
330
343
|
], c.prototype, "gridTemplateColumns");
|
|
331
|
-
|
|
344
|
+
h([
|
|
332
345
|
m({ attribute: "row-type" })
|
|
333
346
|
], c.prototype, "rowType");
|
|
334
|
-
|
|
347
|
+
h([
|
|
335
348
|
a
|
|
336
349
|
], c.prototype, "rowData");
|
|
337
|
-
|
|
350
|
+
h([
|
|
338
351
|
a
|
|
339
352
|
], c.prototype, "columnDefinitions");
|
|
340
|
-
|
|
353
|
+
h([
|
|
341
354
|
a
|
|
342
355
|
], c.prototype, "cellItemTemplate");
|
|
343
|
-
|
|
356
|
+
h([
|
|
344
357
|
a
|
|
345
358
|
], c.prototype, "headerCellItemTemplate");
|
|
346
|
-
|
|
359
|
+
h([
|
|
347
360
|
a
|
|
348
361
|
], c.prototype, "rowIndex");
|
|
349
|
-
|
|
362
|
+
h([
|
|
350
363
|
a
|
|
351
364
|
], c.prototype, "activeCellItemTemplate");
|
|
352
|
-
|
|
365
|
+
h([
|
|
353
366
|
a
|
|
354
367
|
], c.prototype, "defaultCellItemTemplate");
|
|
355
|
-
|
|
368
|
+
h([
|
|
356
369
|
a
|
|
357
370
|
], c.prototype, "defaultHeaderCellItemTemplate");
|
|
358
|
-
|
|
371
|
+
h([
|
|
359
372
|
a
|
|
360
373
|
], c.prototype, "cellElements");
|
|
361
|
-
|
|
374
|
+
h([
|
|
362
375
|
a
|
|
363
376
|
], c.prototype, "_selectable");
|
|
364
|
-
|
|
377
|
+
h([
|
|
365
378
|
m({ mode: "boolean" })
|
|
366
379
|
], c.prototype, "selected");
|
|
367
|
-
var
|
|
368
|
-
for (var
|
|
369
|
-
(r =
|
|
370
|
-
return
|
|
380
|
+
var ge = Object.defineProperty, d = (o, e, t, i) => {
|
|
381
|
+
for (var l = void 0, n = o.length - 1, r; n >= 0; n--)
|
|
382
|
+
(r = o[n]) && (l = r(e, t, l) || l);
|
|
383
|
+
return l && ge(e, t, l), l;
|
|
371
384
|
};
|
|
372
|
-
const
|
|
385
|
+
const f = {
|
|
373
386
|
none: "none",
|
|
374
387
|
singleRow: "single-row",
|
|
375
388
|
multiRow: "multi-row",
|
|
376
389
|
singleCell: "single-cell",
|
|
377
390
|
multiCell: "multi-cell"
|
|
378
|
-
}, s = class
|
|
391
|
+
}, s = class I extends $ {
|
|
379
392
|
constructor() {
|
|
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,
|
|
393
|
+
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, i) => {
|
|
381
394
|
if (this.rowElements.length === 0) {
|
|
382
395
|
this.focusRowIndex = 0, this.focusColumnIndex = 0;
|
|
383
396
|
return;
|
|
384
397
|
}
|
|
385
|
-
const
|
|
398
|
+
const l = Math.max(
|
|
386
399
|
0,
|
|
387
400
|
Math.min(this.rowElements.length - 1, e)
|
|
388
|
-
), r = this.rowElements[
|
|
401
|
+
), r = this.rowElements[l].querySelectorAll(
|
|
389
402
|
'[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"], [data-vvd-component="data-grid-cell"]'
|
|
390
|
-
),
|
|
403
|
+
), x = Math.max(
|
|
391
404
|
0,
|
|
392
405
|
Math.min(r.length - 1, t)
|
|
393
|
-
),
|
|
394
|
-
|
|
406
|
+
), S = r[x];
|
|
407
|
+
i && this.scrollHeight !== this.clientHeight && (l < this.focusRowIndex && this.scrollTop > 0 || l > this.focusRowIndex && this.scrollTop < this.scrollHeight - this.clientHeight) && S.scrollIntoView({ block: "center", inline: "center" }), S.focus();
|
|
395
408
|
}, this.onChildListChange = (e, t) => {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
409
|
+
/* v8 ignore else -- @preserve */
|
|
410
|
+
e && e.length && (e.forEach((i) => {
|
|
411
|
+
i.addedNodes.forEach((l) => {
|
|
412
|
+
l.nodeType === 1 && (l.getAttribute("role") === "row" || l.getAttribute("row-type") === "default") && (l.columnDefinitions = this.columnDefinitions);
|
|
399
413
|
});
|
|
400
414
|
}), this.queueRowIndexUpdate());
|
|
401
415
|
}, this.queueRowIndexUpdate = () => {
|
|
402
|
-
this.rowindexUpdateQueued || (this.rowindexUpdateQueued = !0,
|
|
416
|
+
this.rowindexUpdateQueued || (this.rowindexUpdateQueued = !0, D.enqueue(this.updateRowIndexes));
|
|
403
417
|
}, this.updateRowIndexes = () => {
|
|
404
418
|
let e = this.gridTemplateColumns;
|
|
405
419
|
if (e === void 0) {
|
|
@@ -411,28 +425,28 @@ const h = {
|
|
|
411
425
|
}
|
|
412
426
|
e = this.generatedGridTemplateColumns;
|
|
413
427
|
}
|
|
414
|
-
this.rowElements.forEach((t,
|
|
415
|
-
const
|
|
416
|
-
|
|
428
|
+
this.rowElements.forEach((t, i) => {
|
|
429
|
+
const l = t;
|
|
430
|
+
l.rowIndex = i, l.gridTemplateColumns = e, this.columnDefinitionsStale && (l.columnDefinitions = this.columnDefinitions);
|
|
417
431
|
}), this.rowindexUpdateQueued = !1, this.columnDefinitionsStale = !1;
|
|
418
432
|
}, this.#l = (e) => {
|
|
419
433
|
(e.key === "Enter" || e.key === " ") && this.#t(e);
|
|
420
|
-
}, this.#t = ({ target: e, ctrlKey: t, shiftKey:
|
|
434
|
+
}, this.#t = ({ target: e, ctrlKey: t, shiftKey: i, metaKey: l }) => {
|
|
421
435
|
if (!(e.getAttribute("role") !== "gridcell" || e.getAttribute("cell-type") !== "default")) {
|
|
422
|
-
if (this.selectionMode ===
|
|
423
|
-
this.#i({ target: e, ctrlKey: t, shiftKey:
|
|
436
|
+
if (this.selectionMode === f.singleCell || this.selectionMode === f.multiCell) {
|
|
437
|
+
this.#i({ target: e, ctrlKey: t, shiftKey: i, metaKey: l });
|
|
424
438
|
return;
|
|
425
439
|
}
|
|
426
|
-
(this.selectionMode ===
|
|
440
|
+
(this.selectionMode === f.singleRow || this.selectionMode === f.multiRow) && this.#n({ target: e, ctrlKey: t, shiftKey: i, metaKey: l });
|
|
427
441
|
}
|
|
428
442
|
}, this.#i = ({
|
|
429
443
|
target: e,
|
|
430
444
|
ctrlKey: t,
|
|
431
|
-
shiftKey:
|
|
432
|
-
metaKey:
|
|
445
|
+
shiftKey: i,
|
|
446
|
+
metaKey: l
|
|
433
447
|
}) => {
|
|
434
448
|
const n = e;
|
|
435
|
-
if (this.selectionMode ===
|
|
449
|
+
if (this.selectionMode === f.multiCell && (t || i || l))
|
|
436
450
|
n.selected = !this.#r.includes(n);
|
|
437
451
|
else {
|
|
438
452
|
const r = n.selected;
|
|
@@ -441,11 +455,11 @@ const h = {
|
|
|
441
455
|
}, this.#n = ({
|
|
442
456
|
target: e,
|
|
443
457
|
ctrlKey: t,
|
|
444
|
-
shiftKey:
|
|
445
|
-
metaKey:
|
|
458
|
+
shiftKey: i,
|
|
459
|
+
metaKey: l
|
|
446
460
|
}) => {
|
|
447
461
|
const n = e.parentNode;
|
|
448
|
-
if (this.selectionMode ===
|
|
462
|
+
if (this.selectionMode === f.multiRow && (t || i || l))
|
|
449
463
|
n.selected = !this.#a.includes(n);
|
|
450
464
|
else {
|
|
451
465
|
const r = n.selected;
|
|
@@ -453,28 +467,32 @@ const h = {
|
|
|
453
467
|
}
|
|
454
468
|
}, this.#o = {
|
|
455
469
|
handleChange(e, t) {
|
|
456
|
-
|
|
470
|
+
/* v8 ignore else -- @preserve */
|
|
471
|
+
if (t === "columnDefinitions") {
|
|
472
|
+
/* v8 ignore else -- @preserve */
|
|
473
|
+
e.$fastController.isConnected && e.toggleGeneratedHeader();
|
|
474
|
+
}
|
|
457
475
|
}
|
|
458
476
|
}, this._resetSelection = (e = !1) => {
|
|
459
477
|
const t = Array.from(
|
|
460
478
|
this.querySelectorAll('[role="gridcell"], [cell-type="default"]')
|
|
461
|
-
),
|
|
479
|
+
), i = Array.from(
|
|
462
480
|
this.querySelectorAll('[role="row"], [row-type="default"]')
|
|
463
481
|
);
|
|
464
|
-
if (this.selectionMode ===
|
|
465
|
-
for (const
|
|
466
|
-
|
|
467
|
-
for (const
|
|
468
|
-
|
|
482
|
+
if (this.selectionMode === f.singleCell || this.selectionMode === f.multiCell) {
|
|
483
|
+
for (const l of t)
|
|
484
|
+
l._selectable = !0, l.selected = e ? !1 : l.selected || !1;
|
|
485
|
+
for (const l of i)
|
|
486
|
+
l._selectable = !1, l.selected = !1;
|
|
469
487
|
}
|
|
470
|
-
if (this.selectionMode ===
|
|
471
|
-
for (const
|
|
472
|
-
|
|
473
|
-
if (this.selectionMode ===
|
|
474
|
-
for (const
|
|
475
|
-
|
|
476
|
-
for (const
|
|
477
|
-
|
|
488
|
+
if (this.selectionMode === f.none)
|
|
489
|
+
for (const l of [...t, ...i])
|
|
490
|
+
l._selectable = !1, l.selected = !1;
|
|
491
|
+
if (this.selectionMode === f.singleRow || this.selectionMode === f.multiRow) {
|
|
492
|
+
for (const l of t)
|
|
493
|
+
l._selectable = !1, l.selected = !1;
|
|
494
|
+
for (const l of i)
|
|
495
|
+
l._selectable = !0, l.selected = e ? !1 : l.selected || !1;
|
|
478
496
|
}
|
|
479
497
|
}, this.addEventListener("click", this.#t), this.addEventListener("keydown", this.#l);
|
|
480
498
|
}
|
|
@@ -483,7 +501,7 @@ const h = {
|
|
|
483
501
|
*/
|
|
484
502
|
static generateTemplateColumns(e) {
|
|
485
503
|
let t = "";
|
|
486
|
-
return e.forEach((
|
|
504
|
+
return e.forEach((i) => {
|
|
487
505
|
t = `${t}${t === "" ? "" : " "}1fr`;
|
|
488
506
|
}), t;
|
|
489
507
|
}
|
|
@@ -509,13 +527,14 @@ const h = {
|
|
|
509
527
|
* @internal
|
|
510
528
|
*/
|
|
511
529
|
gridTemplateColumnsChanged() {
|
|
530
|
+
/* v8 ignore if -- @preserve */
|
|
512
531
|
this.$fastController.isConnected && (this.updateRowIndexes(), this.fixedColumns && this.fixedColumns > 0 && this.applyFixedColumns());
|
|
513
532
|
}
|
|
514
533
|
/**
|
|
515
534
|
* @internal
|
|
516
535
|
*/
|
|
517
536
|
rowsDataChanged() {
|
|
518
|
-
this.columnDefinitions === null && this.rowsData.length > 0 && (this.columnDefinitions =
|
|
537
|
+
this.columnDefinitions === null && this.rowsData.length > 0 && (this.columnDefinitions = I.generateColumns(this.rowsData[0])), this.$fastController.isConnected && this.toggleGeneratedHeader();
|
|
519
538
|
}
|
|
520
539
|
/**
|
|
521
540
|
* @internal
|
|
@@ -525,14 +544,17 @@ const h = {
|
|
|
525
544
|
this.generatedGridTemplateColumns = "";
|
|
526
545
|
return;
|
|
527
546
|
}
|
|
528
|
-
this.generatedGridTemplateColumns =
|
|
547
|
+
this.generatedGridTemplateColumns = I.generateTemplateColumns(
|
|
529
548
|
this.columnDefinitions
|
|
530
|
-
)
|
|
549
|
+
);
|
|
550
|
+
/* v8 ignore if -- @preserve */
|
|
551
|
+
this.$fastController.isConnected && (this.columnDefinitionsStale = !0, this.queueRowIndexUpdate());
|
|
531
552
|
}
|
|
532
553
|
/**
|
|
533
554
|
* @internal
|
|
534
555
|
*/
|
|
535
556
|
headerCellItemTemplateChanged() {
|
|
557
|
+
/* v8 ignore if -- @preserve */
|
|
536
558
|
this.$fastController.isConnected && this.generatedHeader !== null && (this.generatedHeader.headerCellItemTemplate = this.headerCellItemTemplate);
|
|
537
559
|
}
|
|
538
560
|
/**
|
|
@@ -551,6 +573,7 @@ const h = {
|
|
|
551
573
|
* @internal
|
|
552
574
|
*/
|
|
553
575
|
fixedColumnsChanged() {
|
|
576
|
+
/* v8 ignore if -- @preserve */
|
|
554
577
|
this.$fastController.isConnected && (this.applyFixedColumns(), this.setupResizeObserver());
|
|
555
578
|
}
|
|
556
579
|
/**
|
|
@@ -565,14 +588,18 @@ const h = {
|
|
|
565
588
|
* @internal
|
|
566
589
|
*/
|
|
567
590
|
connectedCallback() {
|
|
568
|
-
super.connectedCallback()
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
591
|
+
super.connectedCallback();
|
|
592
|
+
/* v8 ignore else -- @preserve */
|
|
593
|
+
this.rowItemTemplate === void 0 && (this.rowItemTemplate = this.defaultRowItemTemplate);
|
|
594
|
+
/* v8 ignore else -- @preserve */
|
|
595
|
+
this.behaviorOrchestrator === null && (this.behaviorOrchestrator = G.create(this), this.$fastController.addBehavior(this.behaviorOrchestrator), this.behaviorOrchestrator.addBehaviorFactory(
|
|
596
|
+
new A(
|
|
597
|
+
T((e) => e.rowsData),
|
|
598
|
+
T((e) => e.rowItemTemplate),
|
|
572
599
|
{ positioning: !0 }
|
|
573
600
|
),
|
|
574
601
|
this.appendChild(document.createComment(""))
|
|
575
|
-
)), this.toggleGeneratedHeader(), this.addEventListener("row-focused", this.handleRowFocus), this.addEventListener(
|
|
602
|
+
)), this.toggleGeneratedHeader(), this.addEventListener("row-focused", this.handleRowFocus), this.addEventListener(H, 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(), D.enqueue(this.queueRowIndexUpdate), this.#e(), R.getNotifier(this).subscribe(
|
|
576
603
|
this.#o,
|
|
577
604
|
"columnDefinitions"
|
|
578
605
|
);
|
|
@@ -581,7 +608,7 @@ const h = {
|
|
|
581
608
|
* @internal
|
|
582
609
|
*/
|
|
583
610
|
disconnectedCallback() {
|
|
584
|
-
super.disconnectedCallback(), this.removeEventListener("row-focused", this.handleRowFocus), this.removeEventListener(
|
|
611
|
+
super.disconnectedCallback(), this.removeEventListener("row-focused", this.handleRowFocus), this.removeEventListener(H, this.handleFocus), this.removeEventListener(y, this.handleKeydown), this.removeEventListener(
|
|
585
612
|
w,
|
|
586
613
|
this.handleFocusOut
|
|
587
614
|
), this.observer.disconnect(), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0), this.generatedHeader = null, R.getNotifier(this).unsubscribe(
|
|
@@ -616,15 +643,15 @@ const h = {
|
|
|
616
643
|
if (e.defaultPrevented)
|
|
617
644
|
return;
|
|
618
645
|
let t;
|
|
619
|
-
const
|
|
646
|
+
const i = this.rowElements.length - 1, l = this.offsetHeight + this.scrollTop, n = this.rowElements[i];
|
|
620
647
|
switch (e.key) {
|
|
621
|
-
case
|
|
648
|
+
case re:
|
|
622
649
|
e.preventDefault(), this.focusOnCell(this.focusRowIndex - 1, this.focusColumnIndex, !0);
|
|
623
650
|
break;
|
|
624
|
-
case
|
|
651
|
+
case ae:
|
|
625
652
|
e.preventDefault(), this.focusOnCell(this.focusRowIndex + 1, this.focusColumnIndex, !0);
|
|
626
653
|
break;
|
|
627
|
-
case
|
|
654
|
+
case ne:
|
|
628
655
|
if (e.preventDefault(), this.rowElements.length === 0) {
|
|
629
656
|
this.focusOnCell(0, 0, !1);
|
|
630
657
|
break;
|
|
@@ -642,39 +669,43 @@ const h = {
|
|
|
642
669
|
}
|
|
643
670
|
this.focusOnCell(t, this.focusColumnIndex, !1);
|
|
644
671
|
break;
|
|
645
|
-
case
|
|
672
|
+
case ie:
|
|
646
673
|
if (e.preventDefault(), this.rowElements.length === 0) {
|
|
647
674
|
this.focusOnCell(0, 0, !1);
|
|
648
675
|
break;
|
|
649
676
|
}
|
|
650
|
-
if (this.focusRowIndex >=
|
|
651
|
-
this.focusOnCell(
|
|
677
|
+
if (this.focusRowIndex >= i || n.offsetTop + n.offsetHeight <= l) {
|
|
678
|
+
this.focusOnCell(i, this.focusColumnIndex, !1);
|
|
652
679
|
return;
|
|
653
680
|
}
|
|
654
|
-
for (t = this.focusRowIndex + 1, t; t <=
|
|
681
|
+
for (t = this.focusRowIndex + 1, t; t <= i; t++) {
|
|
655
682
|
const r = this.rowElements[t];
|
|
656
|
-
if (r.offsetTop + r.offsetHeight >
|
|
657
|
-
let
|
|
658
|
-
this.generateHeader === b.sticky && this.generatedHeader !== null && (
|
|
683
|
+
if (r.offsetTop + r.offsetHeight > l) {
|
|
684
|
+
let x = 0;
|
|
685
|
+
this.generateHeader === b.sticky && this.generatedHeader !== null && (x = this.generatedHeader.clientHeight), this.scrollTop = r.offsetTop - x;
|
|
659
686
|
break;
|
|
660
687
|
}
|
|
661
688
|
}
|
|
662
689
|
this.focusOnCell(t, this.focusColumnIndex, !1);
|
|
663
690
|
break;
|
|
664
|
-
case
|
|
691
|
+
case M: {
|
|
692
|
+
/* v8 ignore else -- @preserve */
|
|
665
693
|
e.ctrlKey && (e.preventDefault(), this.focusOnCell(0, 0, !0));
|
|
666
694
|
break;
|
|
667
|
-
|
|
695
|
+
}
|
|
696
|
+
case P: {
|
|
697
|
+
/* v8 ignore else -- @preserve */
|
|
668
698
|
e.ctrlKey && this.columnDefinitions !== null && (e.preventDefault(), this.focusOnCell(
|
|
669
699
|
this.rowElements.length - 1,
|
|
670
700
|
this.columnDefinitions.length - 1,
|
|
671
701
|
!0
|
|
672
702
|
));
|
|
673
703
|
break;
|
|
704
|
+
}
|
|
674
705
|
}
|
|
675
706
|
}
|
|
676
707
|
queueFocusUpdate() {
|
|
677
|
-
this.isUpdatingFocus && this.contains(document.activeElement) || this.pendingFocusUpdate === !1 && (this.pendingFocusUpdate = !0,
|
|
708
|
+
this.isUpdatingFocus && this.contains(document.activeElement) || this.pendingFocusUpdate === !1 && (this.pendingFocusUpdate = !0, D.enqueue(() => this.updateFocus()));
|
|
678
709
|
}
|
|
679
710
|
updateFocus() {
|
|
680
711
|
this.pendingFocusUpdate = !1, this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, !0);
|
|
@@ -684,7 +715,9 @@ const h = {
|
|
|
684
715
|
const e = document.createElement(
|
|
685
716
|
this.rowElementTag
|
|
686
717
|
);
|
|
687
|
-
this.generatedHeader = e, this.generatedHeader.columnDefinitions = this.columnDefinitions, this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns, this.generatedHeader.rowType = this.generateHeader === b.sticky ?
|
|
718
|
+
this.generatedHeader = e, this.generatedHeader.columnDefinitions = this.columnDefinitions, this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns, this.generatedHeader.rowType = this.generateHeader === b.sticky ? g.stickyHeader : g.header;
|
|
719
|
+
/* v8 ignore else -- @preserve */
|
|
720
|
+
this.firstChild !== null && this.insertBefore(e, this.firstChild);
|
|
688
721
|
return;
|
|
689
722
|
}
|
|
690
723
|
}
|
|
@@ -701,15 +734,15 @@ const h = {
|
|
|
701
734
|
}
|
|
702
735
|
get #r() {
|
|
703
736
|
return this.rowElements.reduce((e, t) => {
|
|
704
|
-
const
|
|
737
|
+
const l = Array.from(t.children).filter(
|
|
705
738
|
(n) => n.selected
|
|
706
739
|
);
|
|
707
|
-
return e.concat(
|
|
740
|
+
return e.concat(l);
|
|
708
741
|
}, []);
|
|
709
742
|
}
|
|
710
743
|
selectionModeChanged(e) {
|
|
711
744
|
if (e === void 0) {
|
|
712
|
-
|
|
745
|
+
D.enqueue(this._resetSelection);
|
|
713
746
|
return;
|
|
714
747
|
}
|
|
715
748
|
this._resetSelection(!0);
|
|
@@ -720,9 +753,9 @@ const h = {
|
|
|
720
753
|
#n;
|
|
721
754
|
#o;
|
|
722
755
|
static generateColumns(e) {
|
|
723
|
-
return Object.keys(e).map((t,
|
|
756
|
+
return Object.keys(e).map((t, i) => ({
|
|
724
757
|
columnDataKey: t,
|
|
725
|
-
gridColumn: `${
|
|
758
|
+
gridColumn: `${i}`
|
|
726
759
|
}));
|
|
727
760
|
}
|
|
728
761
|
/**
|
|
@@ -744,10 +777,12 @@ const h = {
|
|
|
744
777
|
const t = e.querySelectorAll(
|
|
745
778
|
'[role="cell"], [role="gridcell"], [role="columnheader"], [cell-type="default"], [cell-type="columnheader"]'
|
|
746
779
|
);
|
|
747
|
-
this.fixedColumnsPositions.forEach((
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
780
|
+
this.fixedColumnsPositions.forEach((i, l) => {
|
|
781
|
+
/* v8 ignore else -- @preserve */
|
|
782
|
+
if (l < t.length) {
|
|
783
|
+
const n = t[l];
|
|
784
|
+
/* v8 ignore else -- @preserve */
|
|
785
|
+
typeof n.setFixedPosition == "function" && n.setFixedPosition(`${i}px`);
|
|
751
786
|
}
|
|
752
787
|
});
|
|
753
788
|
});
|
|
@@ -762,8 +797,8 @@ const h = {
|
|
|
762
797
|
'[role="cell"], [role="gridcell"], [role="columnheader"], [cell-type="default"], [cell-type="columnheader"]'
|
|
763
798
|
);
|
|
764
799
|
let t = 0;
|
|
765
|
-
for (let
|
|
766
|
-
this.fixedColumnsPositions.push(t), t += e[
|
|
800
|
+
for (let i = 0; i < Math.min(this.fixedColumns, e.length); i++)
|
|
801
|
+
this.fixedColumnsPositions.push(t), t += e[i].offsetWidth;
|
|
767
802
|
}
|
|
768
803
|
/**
|
|
769
804
|
* Clears all fixed columns state and styling
|
|
@@ -778,9 +813,11 @@ const h = {
|
|
|
778
813
|
const t = e.querySelectorAll(
|
|
779
814
|
'[role="cell"], [role="gridcell"], [role="columnheader"], [cell-type="default"], [cell-type="columnheader"]'
|
|
780
815
|
);
|
|
781
|
-
this.fixedColumnsPositions.forEach((
|
|
782
|
-
|
|
783
|
-
|
|
816
|
+
this.fixedColumnsPositions.forEach((i, l) => {
|
|
817
|
+
/* v8 ignore else -- @preserve */
|
|
818
|
+
if (l < t.length) {
|
|
819
|
+
const n = t[l];
|
|
820
|
+
/* v8 ignore else -- @preserve */
|
|
784
821
|
typeof n.setFixedPosition == "function" && n.setFixedPosition(void 0);
|
|
785
822
|
}
|
|
786
823
|
});
|
|
@@ -818,7 +855,7 @@ d([
|
|
|
818
855
|
a
|
|
819
856
|
], s.prototype, "focusColumnIndex");
|
|
820
857
|
d([
|
|
821
|
-
m({ attribute: "fixed-columns", converter:
|
|
858
|
+
m({ attribute: "fixed-columns", converter: J })
|
|
822
859
|
], s.prototype, "fixedColumns");
|
|
823
860
|
d([
|
|
824
861
|
a
|
|
@@ -835,184 +872,218 @@ d([
|
|
|
835
872
|
d([
|
|
836
873
|
m({ attribute: "selection-mode" })
|
|
837
874
|
], s.prototype, "selectionMode");
|
|
838
|
-
let
|
|
839
|
-
function
|
|
840
|
-
const e =
|
|
841
|
-
return
|
|
875
|
+
let Ce = s;
|
|
876
|
+
function be(o) {
|
|
877
|
+
const e = o.tagFor(c);
|
|
878
|
+
return u`
|
|
842
879
|
<${e}
|
|
843
880
|
:rowData="${(t) => t}"
|
|
844
|
-
:cellItemTemplate="${(t,
|
|
845
|
-
:headerCellItemTemplate="${(t,
|
|
881
|
+
:cellItemTemplate="${(t, i) => i.parent.cellItemTemplate}"
|
|
882
|
+
:headerCellItemTemplate="${(t, i) => i.parent.headerCellItemTemplate}"
|
|
846
883
|
></${e}>
|
|
847
884
|
`;
|
|
848
885
|
}
|
|
849
|
-
function
|
|
850
|
-
return
|
|
886
|
+
function we(o) {
|
|
887
|
+
return o.selectionMode === void 0 || o.selectionMode === f.none ? null : o.selectionMode.includes("multi") ? "true" : "false";
|
|
851
888
|
}
|
|
852
|
-
function
|
|
853
|
-
if (
|
|
854
|
-
const e =
|
|
889
|
+
function ye(o) {
|
|
890
|
+
if (o.columnDefinitions === null) {
|
|
891
|
+
const e = o.querySelector(
|
|
855
892
|
'[cell-type="columnheader"]'
|
|
856
893
|
)?.parentElement;
|
|
857
|
-
if (
|
|
894
|
+
if (o.generateHeader === b.default && (e?.getAttribute("row-type") === g.header || e?.getAttribute("row-type") === g.stickyHeader))
|
|
858
895
|
return;
|
|
859
896
|
if (e) {
|
|
860
|
-
const t =
|
|
897
|
+
const t = o.generateHeader === b.sticky ? g.stickyHeader : g.header;
|
|
861
898
|
e.setAttribute("row-type", t);
|
|
862
899
|
}
|
|
863
900
|
}
|
|
864
901
|
}
|
|
865
|
-
function
|
|
902
|
+
function _e(o, { event: e }) {
|
|
866
903
|
e.stopPropagation();
|
|
867
904
|
}
|
|
868
|
-
const
|
|
869
|
-
const e =
|
|
870
|
-
return
|
|
905
|
+
const xe = (o) => {
|
|
906
|
+
const e = be(o), t = o.tagFor(c, !0);
|
|
907
|
+
return u`
|
|
871
908
|
<template
|
|
872
|
-
aria-multiselectable="${
|
|
909
|
+
aria-multiselectable="${we}"
|
|
873
910
|
role="grid"
|
|
874
911
|
tabindex="0"
|
|
875
|
-
@sort="${
|
|
912
|
+
@sort="${_e}"
|
|
876
913
|
:rowElementTag="${() => t}"
|
|
877
914
|
:defaultRowItemTemplate="${e}"
|
|
878
|
-
${
|
|
915
|
+
${V({
|
|
879
916
|
property: "rowElements",
|
|
880
|
-
filter:
|
|
917
|
+
filter: Q("[role=row],[data-vvd-component=data-grid-row]")
|
|
881
918
|
})}
|
|
882
919
|
>
|
|
883
920
|
<div class="base">
|
|
884
|
-
${
|
|
885
|
-
<slot ${
|
|
921
|
+
${ye}
|
|
922
|
+
<slot ${q("slottedRowElements")}></slot>
|
|
886
923
|
</div>
|
|
887
924
|
</template>
|
|
888
925
|
`;
|
|
889
926
|
};
|
|
890
|
-
function
|
|
891
|
-
return
|
|
927
|
+
function De(o) {
|
|
928
|
+
return o._selectable && o.selected ? "true" : o._selectable && !o.selected ? "false" : null;
|
|
892
929
|
}
|
|
893
|
-
function
|
|
894
|
-
const e =
|
|
895
|
-
return
|
|
930
|
+
function Te(o) {
|
|
931
|
+
const e = o.tagFor(p);
|
|
932
|
+
return u`
|
|
896
933
|
<${e}
|
|
897
934
|
cell-type="${(t) => t.isRowHeader ? "rowheader" : void 0}"
|
|
898
|
-
grid-column="${(t,
|
|
899
|
-
:rowData="${(t,
|
|
935
|
+
grid-column="${(t, i) => i.index + 1}"
|
|
936
|
+
:rowData="${(t, i) => i.parent.rowData}"
|
|
900
937
|
:columnDefinition="${(t) => t}"
|
|
901
|
-
selected="${(t,
|
|
938
|
+
selected="${(t, i) => i.parent.ariaSelected === "true" ? !0 : null}"
|
|
902
939
|
></${e}>
|
|
903
940
|
`;
|
|
904
941
|
}
|
|
905
|
-
function
|
|
906
|
-
const e =
|
|
907
|
-
return
|
|
942
|
+
function ke(o) {
|
|
943
|
+
const e = o.tagFor(p);
|
|
944
|
+
return u`
|
|
908
945
|
<${e}
|
|
909
946
|
cell-type="columnheader"
|
|
910
|
-
grid-column="${(t,
|
|
947
|
+
grid-column="${(t, i) => i.index + 1}"
|
|
911
948
|
:columnDefinition="${(t) => t}"
|
|
912
949
|
></${e}>
|
|
913
950
|
`;
|
|
914
951
|
}
|
|
915
|
-
const
|
|
916
|
-
const e =
|
|
917
|
-
return
|
|
952
|
+
const Ie = (o) => {
|
|
953
|
+
const e = Te(o), t = ke(o), i = (l) => B("base", ["selected", !!l.selected]);
|
|
954
|
+
return u`
|
|
918
955
|
<template
|
|
919
956
|
${U({
|
|
920
957
|
role: "row",
|
|
921
|
-
ariaSelected:
|
|
958
|
+
ariaSelected: De
|
|
922
959
|
})}
|
|
923
|
-
class="${(
|
|
960
|
+
class="${(l) => l.rowType !== "default" ? l.rowType : ""}"
|
|
924
961
|
:defaultCellItemTemplate="${e}"
|
|
925
962
|
:defaultHeaderCellItemTemplate="${t}"
|
|
926
|
-
${
|
|
963
|
+
${V({
|
|
927
964
|
property: "cellElements",
|
|
928
|
-
filter:
|
|
965
|
+
filter: Q(
|
|
929
966
|
'[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"],[data-vvd-component="data-grid-cell"]'
|
|
930
967
|
)
|
|
931
968
|
})}
|
|
932
969
|
>
|
|
933
970
|
<div
|
|
934
|
-
class="${
|
|
935
|
-
style="grid-template-columns: ${(
|
|
971
|
+
class="${i}"
|
|
972
|
+
style="grid-template-columns: ${(l) => l.gridTemplateColumns};"
|
|
936
973
|
>
|
|
937
|
-
<slot ${
|
|
974
|
+
<slot ${q("slottedCellElements")}></slot>
|
|
938
975
|
</div>
|
|
939
976
|
</template>
|
|
940
977
|
`;
|
|
941
978
|
};
|
|
942
|
-
function
|
|
943
|
-
return
|
|
979
|
+
function E(o) {
|
|
980
|
+
return o.cellType === "columnheader" && o.sortDirection !== void 0 && o.sortDirection !== _.other;
|
|
944
981
|
}
|
|
945
|
-
function
|
|
946
|
-
return
|
|
982
|
+
function Ee(o) {
|
|
983
|
+
return o.sortDirection === _.ascending ? "sort-asc-solid" : o.sortDirection === _.descending ? "sort-desc-solid" : "sort-solid";
|
|
947
984
|
}
|
|
948
|
-
function
|
|
949
|
-
return
|
|
985
|
+
function $e(o) {
|
|
986
|
+
return o._selectable && o.selected ? "true" : o._selectable && !o.selected ? "false" : null;
|
|
950
987
|
}
|
|
951
|
-
function Fe(
|
|
952
|
-
const e =
|
|
953
|
-
return
|
|
954
|
-
${
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
<${e} class="header-icon" name="${
|
|
988
|
+
function Fe(o) {
|
|
989
|
+
const e = o.tagFor(N);
|
|
990
|
+
return u`
|
|
991
|
+
${k(
|
|
992
|
+
E,
|
|
993
|
+
u`
|
|
994
|
+
<${e} class="header-icon" name="${Ee}"></${e}>
|
|
958
995
|
`
|
|
959
996
|
)}
|
|
960
997
|
`;
|
|
961
998
|
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
999
|
+
function Se(o) {
|
|
1000
|
+
return o.cellType === v.columnHeader && o.sortDirection !== void 0;
|
|
1001
|
+
}
|
|
1002
|
+
function j(o) {
|
|
1003
|
+
return o.sortDirection ?? _.none;
|
|
1004
|
+
}
|
|
1005
|
+
function Re(o) {
|
|
1006
|
+
const e = j(o);
|
|
1007
|
+
return o.locale.dataGrid.cell.sortStatus?.[e];
|
|
1008
|
+
}
|
|
1009
|
+
function He(o) {
|
|
1010
|
+
const e = j(o);
|
|
1011
|
+
return o.locale.dataGrid.cell.sortInstruction?.[e];
|
|
964
1012
|
}
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
1013
|
+
function Oe(o) {
|
|
1014
|
+
return [Re(o), He(o)].filter((e) => !!e).join(" ").trim();
|
|
1015
|
+
}
|
|
1016
|
+
function ze(o, e) {
|
|
1017
|
+
return (e.key === L || e.key === se) && o._handleInteraction(), !0;
|
|
1018
|
+
}
|
|
1019
|
+
const Ge = (o) => {
|
|
1020
|
+
const e = o.tagFor(Y), t = (i) => B("base", ["selected", !!i.selected]);
|
|
1021
|
+
return u`
|
|
968
1022
|
<template
|
|
969
1023
|
tabindex="-1"
|
|
970
1024
|
${U({
|
|
971
|
-
role: (
|
|
972
|
-
ariaSelected:
|
|
973
|
-
ariaSort: (
|
|
1025
|
+
role: (i) => z[i.cellType] ?? z.default,
|
|
1026
|
+
ariaSelected: $e,
|
|
1027
|
+
ariaSort: (i) => i.sortDirection ?? null
|
|
974
1028
|
})}
|
|
975
|
-
@click="${(
|
|
976
|
-
@keydown="${(
|
|
1029
|
+
@click="${(i) => i._handleInteraction()}"
|
|
1030
|
+
@keydown="${(i, l) => ze(i, l.event)}"
|
|
977
1031
|
>
|
|
978
1032
|
<div
|
|
979
1033
|
class="${t}"
|
|
980
|
-
role="${(
|
|
1034
|
+
role="${(i) => E(i) ? "button" : void 0}"
|
|
981
1035
|
>
|
|
982
|
-
${(
|
|
1036
|
+
${(i) => i.selected ? u`<${e}
|
|
1037
|
+
data-announcement="selection"
|
|
1038
|
+
>
|
|
1039
|
+
${(l) => l.locale.dataGrid.cell.selected}
|
|
1040
|
+
</${e}>` : null}
|
|
983
1041
|
<slot></slot>
|
|
984
|
-
${
|
|
985
|
-
|
|
986
|
-
|
|
1042
|
+
${k(
|
|
1043
|
+
E,
|
|
1044
|
+
u`<${e}
|
|
1045
|
+
data-announcement="button-role"
|
|
1046
|
+
>
|
|
1047
|
+
${(i) => i.locale.dataGrid.cell.button}
|
|
1048
|
+
</${e}>
|
|
987
1049
|
`
|
|
988
1050
|
)}
|
|
989
|
-
${(
|
|
1051
|
+
${k(
|
|
1052
|
+
Se,
|
|
1053
|
+
u`<${e}
|
|
1054
|
+
aria-live="polite"
|
|
1055
|
+
data-announcement="sort-state"
|
|
1056
|
+
>
|
|
1057
|
+
${Oe}
|
|
1058
|
+
</${e}>`
|
|
1059
|
+
)}
|
|
1060
|
+
${(i) => Fe(o)}
|
|
990
1061
|
</div>
|
|
991
1062
|
</template>
|
|
992
1063
|
`;
|
|
993
|
-
},
|
|
1064
|
+
}, Ae = F(
|
|
994
1065
|
"data-grid-cell",
|
|
995
1066
|
p,
|
|
996
|
-
|
|
997
|
-
[
|
|
1067
|
+
Ge,
|
|
1068
|
+
[W, Z],
|
|
998
1069
|
{
|
|
999
|
-
styles:
|
|
1070
|
+
styles: he
|
|
1000
1071
|
}
|
|
1001
|
-
),
|
|
1072
|
+
), Le = F(
|
|
1002
1073
|
"data-grid-row",
|
|
1003
1074
|
c,
|
|
1004
|
-
|
|
1005
|
-
[
|
|
1075
|
+
Ie,
|
|
1076
|
+
[Ae],
|
|
1006
1077
|
{
|
|
1007
|
-
styles:
|
|
1078
|
+
styles: ue
|
|
1008
1079
|
}
|
|
1009
|
-
),
|
|
1080
|
+
), Pe = F(
|
|
1010
1081
|
"data-grid",
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
[
|
|
1082
|
+
Ce,
|
|
1083
|
+
xe,
|
|
1084
|
+
[Le],
|
|
1014
1085
|
{
|
|
1015
|
-
styles:
|
|
1086
|
+
styles: de
|
|
1016
1087
|
}
|
|
1017
|
-
),
|
|
1018
|
-
|
|
1088
|
+
), Me = X(Pe);
|
|
1089
|
+
Me();
|