@vonage/vivid 5.1.0 → 5.3.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 +2 -1
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +41 -6
- package/audio-player/definition.js +41 -6
- package/audio-player/index.cjs +27 -25
- package/audio-player/index.js +88 -62
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- 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 +1 -1
- package/bundled/calendar-picker.template.js +21 -21
- 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 +66 -37
- 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 +17 -14
- package/bundled/definition19.js +85 -77
- 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 +6 -6
- package/bundled/definition6.js +34 -31
- 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 +1 -1
- package/bundled/definition9.js +1 -1
- 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/localized.cjs +1 -1
- package/bundled/localized.js +43 -31
- 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 +18 -13
- package/bundled/picker-field.template.js +45 -37
- 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/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +2126 -1172
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/bundled/with-contextual-help.cjs +1 -1
- package/bundled/with-contextual-help.js +17 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -6
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +10 -2
- package/card/definition.js +10 -2
- 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 +13 -6
- package/combobox/definition.js +14 -7
- package/combobox/index.cjs +15 -11
- package/combobox/index.js +82 -75
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1621 -325
- 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/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +55 -1
- package/dial-pad/definition.js +56 -2
- package/dial-pad/index.cjs +21 -18
- package/dial-pad/index.js +138 -104
- package/dialog/definition.cjs +4 -1
- package/dialog/definition.js +4 -1
- package/dialog/index.cjs +21 -18
- package/dialog/index.js +43 -40
- 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/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +16 -7
- package/file-picker/definition.js +17 -8
- package/file-picker/index.cjs +12 -9
- package/file-picker/index.js +103 -93
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +4 -0
- package/index.js +1 -0
- 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 +6 -2
- 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 +495 -78
- 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 +906 -894
- package/lib/date-range-picker/date-range-picker.d.ts +596 -590
- package/lib/date-time-picker/date-time-picker.d.ts +907 -895
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dial-pad/dial-pad.template.d.ts +1 -1
- package/lib/dial-pad/locale.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +2 -2
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +495 -78
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +5 -4
- 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 +19 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- 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/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +521 -104
- package/lib/select/select.d.ts +484 -67
- 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 +6 -6
- 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/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 -16
- package/lib/text-field/text-field.d.ts +19 -18
- package/lib/time-picker/time-picker.d.ts +579 -573
- 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 +15 -3
- package/locales/de-DE.js +15 -3
- package/locales/en-GB.cjs +15 -3
- package/locales/en-GB.js +15 -3
- package/locales/en-US.cjs +15 -3
- package/locales/en-US.js +15 -3
- package/locales/ja-JP.cjs +15 -3
- package/locales/ja-JP.js +15 -3
- package/locales/zh-CN.cjs +15 -3
- package/locales/zh-CN.js +15 -3
- package/menu/definition.cjs +8 -4
- package/menu/definition.js +9 -5
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +3 -3
- package/number-field/definition.js +4 -4
- package/number-field/index.cjs +8 -8
- package/number-field/index.js +41 -40
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +5 -5
- 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/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/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +2 -2
- package/rich-text-editor/index.js +3 -3
- package/searchable-select/definition.cjs +30 -21
- package/searchable-select/definition.js +31 -22
- package/searchable-select/index.cjs +28 -25
- package/searchable-select/index.js +149 -140
- package/select/definition.cjs +15 -7
- package/select/definition.js +16 -8
- 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 +2 -2
- 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/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/index.d.ts +1 -0
- package/shared/patterns/form-elements/with-contextual-help.d.ts +7 -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 +454 -451
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +454 -451
- 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 +600 -594
- package/shared/picker-field/mixins/single-date-picker.d.ts +746 -737
- package/shared/picker-field/mixins/single-value-picker.d.ts +451 -448
- package/shared/picker-field/mixins/time-selection-picker.d.ts +580 -574
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +579 -573
- package/shared/picker-field/picker-field.d.ts +495 -78
- 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 +28 -215
- package/simple-color-picker/definition.js +29 -216
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- 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/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/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +9 -9
- package/text-field/definition.cjs +3 -3
- package/text-field/definition.js +4 -4
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +2 -2
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +2 -2
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +2 -2
- 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 +1 -1
- 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 +3 -3
- package/unbundled/calendar-picker.template.js +4 -4
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +2 -2
- package/unbundled/definition3.cjs +2 -1
- package/unbundled/definition3.js +2 -1
- 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/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +13 -5
- package/unbundled/picker-field.template.js +14 -6
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.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/unbundled/with-contextual-help.cjs +11 -0
- package/unbundled/with-contextual-help.js +11 -0
- package/video-player/definition.cjs +69007 -1
- package/video-player/definition.js +69007 -1
- package/video-player/index.cjs +35 -35
- package/video-player/index.js +1358 -1384
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +347 -69
package/data-grid/definition.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VwcIconElement as Icon, iconDefinition } from '../icon/definition.js';
|
|
2
2
|
import { V as VividElement, d as defineVividComponent, c as createRegisterFunction } from '../unbundled/vivid-element.js';
|
|
3
3
|
import { VwcVisuallyHiddenElement as VisuallyHidden, visuallyHiddenDefinition } from '../visually-hidden/definition.js';
|
|
4
|
-
import { html, attr, observable, RepeatDirective,
|
|
4
|
+
import { html, attr, observable, RepeatDirective, normalizeBinding, Updates as Updates$1, Observable, nullableNumberConverter, children, slotted, elements, when } from '@microsoft/fast-element';
|
|
5
|
+
import { c as commonjsGlobal } from '../unbundled/_commonjsHelpers.js';
|
|
5
6
|
import { eventFocusIn, eventFocusOut, eventKeyDown, keyEscape, keyFunction2, keyEnter, keyEnd, keyHome, eventFocus, keyPageDown, keyPageUp, keyArrowDown, keyArrowUp, classNames, keySpace } from '@microsoft/fast-web-utilities';
|
|
6
7
|
import { k as keyArrowRight, a as keyArrowLeft } from '../unbundled/key-codes.js';
|
|
7
8
|
import { H as HostSemantics, a as applyHostSemantics } from '../unbundled/host-semantics.js';
|
|
@@ -13,6 +14,837 @@ const dataGridRowStyles = ".base.connotation-cta{--_connotation-color-primary: v
|
|
|
13
14
|
|
|
14
15
|
const dataGridCellStyles = ":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}";
|
|
15
16
|
|
|
17
|
+
let kernelMode;
|
|
18
|
+
const kernelAttr = "fast-kernel";
|
|
19
|
+
try {
|
|
20
|
+
if (document.currentScript) {
|
|
21
|
+
kernelMode = document.currentScript.getAttribute(kernelAttr);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const scripts = document.getElementsByTagName("script");
|
|
25
|
+
const currentScript = scripts[scripts.length - 1];
|
|
26
|
+
kernelMode = currentScript.getAttribute(kernelAttr);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
kernelMode = "isolate";
|
|
31
|
+
}
|
|
32
|
+
let KernelServiceId;
|
|
33
|
+
switch (kernelMode) {
|
|
34
|
+
case "share": // share the kernel across major versions
|
|
35
|
+
KernelServiceId = Object.freeze({
|
|
36
|
+
updateQueue: 1,
|
|
37
|
+
observable: 2,
|
|
38
|
+
contextEvent: 3,
|
|
39
|
+
elementRegistry: 4,
|
|
40
|
+
});
|
|
41
|
+
break;
|
|
42
|
+
case "share-v2": // only share the kernel with other v2 instances
|
|
43
|
+
KernelServiceId = Object.freeze({
|
|
44
|
+
updateQueue: 1.2,
|
|
45
|
+
observable: 2.2,
|
|
46
|
+
contextEvent: 3.2,
|
|
47
|
+
elementRegistry: 4.2,
|
|
48
|
+
});
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
// fully isolate the kernel from all other FAST instances
|
|
52
|
+
const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
|
|
53
|
+
KernelServiceId = Object.freeze({
|
|
54
|
+
updateQueue: `1.2${postfix}`,
|
|
55
|
+
observable: `2.2${postfix}`,
|
|
56
|
+
contextEvent: `3.2${postfix}`,
|
|
57
|
+
elementRegistry: `4.2${postfix}`,
|
|
58
|
+
});
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Determines whether or not an object is a function.
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
const isFunction = (object) => typeof object === "function";
|
|
66
|
+
/**
|
|
67
|
+
* Determines whether or not an object is a string.
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
const isString = (object) => typeof object === "string";
|
|
71
|
+
/**
|
|
72
|
+
* A function which does nothing.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
const noop = () => void 0;
|
|
76
|
+
|
|
77
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
78
|
+
|
|
79
|
+
(function ensureGlobalThis() {
|
|
80
|
+
if (typeof globalThis !== "undefined") {
|
|
81
|
+
// We're running in a modern environment.
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
if (typeof commonjsGlobal !== "undefined") {
|
|
86
|
+
// We're running in NodeJS
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
commonjsGlobal.globalThis = commonjsGlobal;
|
|
89
|
+
}
|
|
90
|
+
else if (typeof self !== "undefined") {
|
|
91
|
+
self.globalThis = self;
|
|
92
|
+
}
|
|
93
|
+
else if (typeof window !== "undefined") {
|
|
94
|
+
// We're running in the browser's main thread.
|
|
95
|
+
window.globalThis = window;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
// Hopefully we never get here...
|
|
99
|
+
// Not all environments allow eval and Function. Use only as a last resort:
|
|
100
|
+
// eslint-disable-next-line no-new-func
|
|
101
|
+
const result = new Function("return this")();
|
|
102
|
+
result.globalThis = result;
|
|
103
|
+
}
|
|
104
|
+
})();
|
|
105
|
+
|
|
106
|
+
// ensure FAST global - duplicated debug.ts
|
|
107
|
+
const propConfig = {
|
|
108
|
+
configurable: false,
|
|
109
|
+
enumerable: false,
|
|
110
|
+
writable: false,
|
|
111
|
+
};
|
|
112
|
+
if (globalThis.FAST === void 0) {
|
|
113
|
+
Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: Object.create(null) }, propConfig));
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The FAST global.
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
const FAST = globalThis.FAST;
|
|
120
|
+
if (FAST.getById === void 0) {
|
|
121
|
+
const storage = Object.create(null);
|
|
122
|
+
Reflect.defineProperty(FAST, "getById", Object.assign({ value(id, initialize) {
|
|
123
|
+
let found = storage[id];
|
|
124
|
+
if (found === void 0) {
|
|
125
|
+
found = initialize ? (storage[id] = initialize()) : null;
|
|
126
|
+
}
|
|
127
|
+
return found;
|
|
128
|
+
} }, propConfig));
|
|
129
|
+
}
|
|
130
|
+
if (FAST.error === void 0) {
|
|
131
|
+
Object.assign(FAST, {
|
|
132
|
+
warn() { },
|
|
133
|
+
error(code) {
|
|
134
|
+
return new Error(`Error ${code}`);
|
|
135
|
+
},
|
|
136
|
+
addMessages() { },
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Creates a function capable of locating metadata associated with a type.
|
|
141
|
+
* @returns A metadata locator function.
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
function createMetadataLocator() {
|
|
145
|
+
const metadataLookup = new WeakMap();
|
|
146
|
+
return function (target) {
|
|
147
|
+
let metadata = metadataLookup.get(target);
|
|
148
|
+
if (metadata === void 0) {
|
|
149
|
+
let currentTarget = Reflect.getPrototypeOf(target);
|
|
150
|
+
while (metadata === void 0 && currentTarget !== null) {
|
|
151
|
+
metadata = metadataLookup.get(currentTarget);
|
|
152
|
+
currentTarget = Reflect.getPrototypeOf(currentTarget);
|
|
153
|
+
}
|
|
154
|
+
metadata = metadata === void 0 ? [] : metadata.slice(0);
|
|
155
|
+
metadataLookup.set(target, metadata);
|
|
156
|
+
}
|
|
157
|
+
return metadata;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Makes a type noop for JSON serialization.
|
|
162
|
+
* @param type - The type to make noop for JSON serialization.
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
function makeSerializationNoop(type) {
|
|
166
|
+
type.prototype.toJSON = noop;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const createHTML = html => html;
|
|
170
|
+
const fastTrustedType = globalThis.trustedTypes
|
|
171
|
+
? globalThis.trustedTypes.createPolicy("fast-html", { createHTML })
|
|
172
|
+
: { createHTML };
|
|
173
|
+
let defaultPolicy = Object.freeze({
|
|
174
|
+
createHTML(value) {
|
|
175
|
+
return fastTrustedType.createHTML(value);
|
|
176
|
+
},
|
|
177
|
+
protect(tagName, aspect, aspectName, sink) {
|
|
178
|
+
return sink;
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
const fastPolicy = defaultPolicy;
|
|
182
|
+
/**
|
|
183
|
+
* Common DOM APIs.
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
const DOM = Object.freeze({
|
|
187
|
+
/**
|
|
188
|
+
* Gets the dom policy used by the templating system.
|
|
189
|
+
*/
|
|
190
|
+
get policy() {
|
|
191
|
+
return defaultPolicy;
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* Sets the dom policy used by the templating system.
|
|
195
|
+
* @param policy - The policy to set.
|
|
196
|
+
* @remarks
|
|
197
|
+
* This API can only be called once, for security reasons. It should be
|
|
198
|
+
* called by the application developer at the start of their program.
|
|
199
|
+
*/
|
|
200
|
+
setPolicy(value) {
|
|
201
|
+
if (defaultPolicy !== fastPolicy) {
|
|
202
|
+
throw FAST.error(1201 /* Message.onlySetDOMPolicyOnce */);
|
|
203
|
+
}
|
|
204
|
+
defaultPolicy = value;
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* Sets an attribute value on an element.
|
|
208
|
+
* @param element - The element to set the attribute value on.
|
|
209
|
+
* @param attributeName - The attribute name to set.
|
|
210
|
+
* @param value - The value of the attribute to set.
|
|
211
|
+
* @remarks
|
|
212
|
+
* If the value is `null` or `undefined`, the attribute is removed, otherwise
|
|
213
|
+
* it is set to the provided value using the standard `setAttribute` API.
|
|
214
|
+
*/
|
|
215
|
+
setAttribute(element, attributeName, value) {
|
|
216
|
+
value === null || value === undefined
|
|
217
|
+
? element.removeAttribute(attributeName)
|
|
218
|
+
: element.setAttribute(attributeName, value);
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* Sets a boolean attribute value.
|
|
222
|
+
* @param element - The element to set the boolean attribute value on.
|
|
223
|
+
* @param attributeName - The attribute name to set.
|
|
224
|
+
* @param value - The value of the attribute to set.
|
|
225
|
+
* @remarks
|
|
226
|
+
* If the value is true, the attribute is added; otherwise it is removed.
|
|
227
|
+
*/
|
|
228
|
+
setBooleanAttribute(element, attributeName, value) {
|
|
229
|
+
value
|
|
230
|
+
? element.setAttribute(attributeName, "")
|
|
231
|
+
: element.removeAttribute(attributeName);
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The default UpdateQueue.
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
const Updates = FAST.getById(KernelServiceId.updateQueue, () => {
|
|
240
|
+
const tasks = [];
|
|
241
|
+
const pendingErrors = [];
|
|
242
|
+
const rAF = globalThis.requestAnimationFrame;
|
|
243
|
+
let updateAsync = true;
|
|
244
|
+
function throwFirstError() {
|
|
245
|
+
if (pendingErrors.length) {
|
|
246
|
+
throw pendingErrors.shift();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function tryRunTask(task) {
|
|
250
|
+
try {
|
|
251
|
+
task.call();
|
|
252
|
+
}
|
|
253
|
+
catch (error) {
|
|
254
|
+
if (updateAsync) {
|
|
255
|
+
pendingErrors.push(error);
|
|
256
|
+
setTimeout(throwFirstError, 0);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
tasks.length = 0;
|
|
260
|
+
throw error;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function process() {
|
|
265
|
+
const capacity = 1024;
|
|
266
|
+
let index = 0;
|
|
267
|
+
while (index < tasks.length) {
|
|
268
|
+
tryRunTask(tasks[index]);
|
|
269
|
+
index++;
|
|
270
|
+
// Prevent leaking memory for long chains of recursive calls to `enqueue`.
|
|
271
|
+
// If we call `enqueue` within a task scheduled by `enqueue`, the queue will
|
|
272
|
+
// grow, but to avoid an O(n) walk for every task we execute, we don't
|
|
273
|
+
// shift tasks off the queue after they have been executed.
|
|
274
|
+
// Instead, we periodically shift 1024 tasks off the queue.
|
|
275
|
+
if (index > capacity) {
|
|
276
|
+
// Manually shift all values starting at the index back to the
|
|
277
|
+
// beginning of the queue.
|
|
278
|
+
for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) {
|
|
279
|
+
tasks[scan] = tasks[scan + index];
|
|
280
|
+
}
|
|
281
|
+
tasks.length -= index;
|
|
282
|
+
index = 0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
tasks.length = 0;
|
|
286
|
+
}
|
|
287
|
+
function enqueue(callable) {
|
|
288
|
+
tasks.push(callable);
|
|
289
|
+
if (tasks.length < 2) {
|
|
290
|
+
updateAsync ? rAF(process) : process();
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return Object.freeze({
|
|
294
|
+
enqueue,
|
|
295
|
+
next: () => new Promise(enqueue),
|
|
296
|
+
process,
|
|
297
|
+
setMode: (isAsync) => (updateAsync = isAsync),
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* An implementation of {@link Notifier} that efficiently keeps track of
|
|
303
|
+
* subscribers interested in a specific change notification on an
|
|
304
|
+
* observable subject.
|
|
305
|
+
*
|
|
306
|
+
* @remarks
|
|
307
|
+
* This set is optimized for the most common scenario of 1 or 2 subscribers.
|
|
308
|
+
* With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.
|
|
309
|
+
* If the set ever exceeds two subscribers, it upgrades to an array automatically.
|
|
310
|
+
* @public
|
|
311
|
+
*/
|
|
312
|
+
class SubscriberSet {
|
|
313
|
+
/**
|
|
314
|
+
* Creates an instance of SubscriberSet for the specified subject.
|
|
315
|
+
* @param subject - The subject that subscribers will receive notifications from.
|
|
316
|
+
* @param initialSubscriber - An initial subscriber to changes.
|
|
317
|
+
*/
|
|
318
|
+
constructor(subject, initialSubscriber) {
|
|
319
|
+
this.sub1 = void 0;
|
|
320
|
+
this.sub2 = void 0;
|
|
321
|
+
this.spillover = void 0;
|
|
322
|
+
this.subject = subject;
|
|
323
|
+
this.sub1 = initialSubscriber;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Checks whether the provided subscriber has been added to this set.
|
|
327
|
+
* @param subscriber - The subscriber to test for inclusion in this set.
|
|
328
|
+
*/
|
|
329
|
+
has(subscriber) {
|
|
330
|
+
return this.spillover === void 0
|
|
331
|
+
? this.sub1 === subscriber || this.sub2 === subscriber
|
|
332
|
+
: this.spillover.indexOf(subscriber) !== -1;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Subscribes to notification of changes in an object's state.
|
|
336
|
+
* @param subscriber - The object that is subscribing for change notification.
|
|
337
|
+
*/
|
|
338
|
+
subscribe(subscriber) {
|
|
339
|
+
const spillover = this.spillover;
|
|
340
|
+
if (spillover === void 0) {
|
|
341
|
+
if (this.has(subscriber)) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
if (this.sub1 === void 0) {
|
|
345
|
+
this.sub1 = subscriber;
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
if (this.sub2 === void 0) {
|
|
349
|
+
this.sub2 = subscriber;
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
this.spillover = [this.sub1, this.sub2, subscriber];
|
|
353
|
+
this.sub1 = void 0;
|
|
354
|
+
this.sub2 = void 0;
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
const index = spillover.indexOf(subscriber);
|
|
358
|
+
if (index === -1) {
|
|
359
|
+
spillover.push(subscriber);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Unsubscribes from notification of changes in an object's state.
|
|
365
|
+
* @param subscriber - The object that is unsubscribing from change notification.
|
|
366
|
+
*/
|
|
367
|
+
unsubscribe(subscriber) {
|
|
368
|
+
const spillover = this.spillover;
|
|
369
|
+
if (spillover === void 0) {
|
|
370
|
+
if (this.sub1 === subscriber) {
|
|
371
|
+
this.sub1 = void 0;
|
|
372
|
+
}
|
|
373
|
+
else if (this.sub2 === subscriber) {
|
|
374
|
+
this.sub2 = void 0;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
const index = spillover.indexOf(subscriber);
|
|
379
|
+
if (index !== -1) {
|
|
380
|
+
spillover.splice(index, 1);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Notifies all subscribers.
|
|
386
|
+
* @param args - Data passed along to subscribers during notification.
|
|
387
|
+
*/
|
|
388
|
+
notify(args) {
|
|
389
|
+
const spillover = this.spillover;
|
|
390
|
+
const subject = this.subject;
|
|
391
|
+
if (spillover === void 0) {
|
|
392
|
+
const sub1 = this.sub1;
|
|
393
|
+
const sub2 = this.sub2;
|
|
394
|
+
if (sub1 !== void 0) {
|
|
395
|
+
sub1.handleChange(subject, args);
|
|
396
|
+
}
|
|
397
|
+
if (sub2 !== void 0) {
|
|
398
|
+
sub2.handleChange(subject, args);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
for (let i = 0, ii = spillover.length; i < ii; ++i) {
|
|
403
|
+
spillover[i].handleChange(subject, args);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* An implementation of Notifier that allows subscribers to be notified
|
|
410
|
+
* of individual property changes on an object.
|
|
411
|
+
* @public
|
|
412
|
+
*/
|
|
413
|
+
class PropertyChangeNotifier {
|
|
414
|
+
/**
|
|
415
|
+
* Creates an instance of PropertyChangeNotifier for the specified subject.
|
|
416
|
+
* @param subject - The object that subscribers will receive notifications for.
|
|
417
|
+
*/
|
|
418
|
+
constructor(subject) {
|
|
419
|
+
this.subscribers = {};
|
|
420
|
+
this.subjectSubscribers = null;
|
|
421
|
+
this.subject = subject;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Notifies all subscribers, based on the specified property.
|
|
425
|
+
* @param propertyName - The property name, passed along to subscribers during notification.
|
|
426
|
+
*/
|
|
427
|
+
notify(propertyName) {
|
|
428
|
+
var _a, _b;
|
|
429
|
+
(_a = this.subscribers[propertyName]) === null || _a === void 0 ? void 0 : _a.notify(propertyName);
|
|
430
|
+
(_b = this.subjectSubscribers) === null || _b === void 0 ? void 0 : _b.notify(propertyName);
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Subscribes to notification of changes in an object's state.
|
|
434
|
+
* @param subscriber - The object that is subscribing for change notification.
|
|
435
|
+
* @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
|
|
436
|
+
*/
|
|
437
|
+
subscribe(subscriber, propertyToWatch) {
|
|
438
|
+
var _a, _b;
|
|
439
|
+
let subscribers;
|
|
440
|
+
if (propertyToWatch) {
|
|
441
|
+
subscribers =
|
|
442
|
+
(_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : (this.subscribers[propertyToWatch] = new SubscriberSet(this.subject));
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
subscribers =
|
|
446
|
+
(_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : (this.subjectSubscribers = new SubscriberSet(this.subject));
|
|
447
|
+
}
|
|
448
|
+
subscribers.subscribe(subscriber);
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Unsubscribes from notification of changes in an object's state.
|
|
452
|
+
* @param subscriber - The object that is unsubscribing from change notification.
|
|
453
|
+
* @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
|
|
454
|
+
*/
|
|
455
|
+
unsubscribe(subscriber, propertyToUnwatch) {
|
|
456
|
+
var _a, _b;
|
|
457
|
+
if (propertyToUnwatch) {
|
|
458
|
+
(_a = this.subscribers[propertyToUnwatch]) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
(_b = this.subjectSubscribers) === null || _b === void 0 ? void 0 : _b.unsubscribe(subscriber);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Describes how the source's lifetime relates to its controller's lifetime.
|
|
468
|
+
* @public
|
|
469
|
+
*/
|
|
470
|
+
const SourceLifetime = Object.freeze({
|
|
471
|
+
/**
|
|
472
|
+
* The source to controller lifetime relationship is unknown.
|
|
473
|
+
*/
|
|
474
|
+
unknown: void 0,
|
|
475
|
+
/**
|
|
476
|
+
* The source and controller lifetimes are coupled to one another.
|
|
477
|
+
* They can/will be GC'd together.
|
|
478
|
+
*/
|
|
479
|
+
coupled: 1,
|
|
480
|
+
});
|
|
481
|
+
/**
|
|
482
|
+
* Common Observable APIs.
|
|
483
|
+
* @public
|
|
484
|
+
*/
|
|
485
|
+
FAST.getById(KernelServiceId.observable, () => {
|
|
486
|
+
const queueUpdate = Updates.enqueue;
|
|
487
|
+
const volatileRegex = /(:|&&|\|\||if|\?\.)/;
|
|
488
|
+
const notifierLookup = new WeakMap();
|
|
489
|
+
let watcher = void 0;
|
|
490
|
+
let createArrayObserver = (array) => {
|
|
491
|
+
throw FAST.error(1101 /* Message.needsArrayObservation */);
|
|
492
|
+
};
|
|
493
|
+
function getNotifier(source) {
|
|
494
|
+
var _a;
|
|
495
|
+
let found = (_a = source.$fastController) !== null && _a !== void 0 ? _a : notifierLookup.get(source);
|
|
496
|
+
if (found === void 0) {
|
|
497
|
+
Array.isArray(source)
|
|
498
|
+
? (found = createArrayObserver(source))
|
|
499
|
+
: notifierLookup.set(source, (found = new PropertyChangeNotifier(source)));
|
|
500
|
+
}
|
|
501
|
+
return found;
|
|
502
|
+
}
|
|
503
|
+
const getAccessors = createMetadataLocator();
|
|
504
|
+
class DefaultObservableAccessor {
|
|
505
|
+
constructor(name) {
|
|
506
|
+
this.name = name;
|
|
507
|
+
this.field = `_${name}`;
|
|
508
|
+
this.callback = `${name}Changed`;
|
|
509
|
+
}
|
|
510
|
+
getValue(source) {
|
|
511
|
+
if (watcher !== void 0) {
|
|
512
|
+
watcher.watch(source, this.name);
|
|
513
|
+
}
|
|
514
|
+
return source[this.field];
|
|
515
|
+
}
|
|
516
|
+
setValue(source, newValue) {
|
|
517
|
+
const field = this.field;
|
|
518
|
+
const oldValue = source[field];
|
|
519
|
+
if (oldValue !== newValue) {
|
|
520
|
+
source[field] = newValue;
|
|
521
|
+
const callback = source[this.callback];
|
|
522
|
+
if (isFunction(callback)) {
|
|
523
|
+
callback.call(source, oldValue, newValue);
|
|
524
|
+
}
|
|
525
|
+
getNotifier(source).notify(this.name);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
class ExpressionNotifierImplementation extends SubscriberSet {
|
|
530
|
+
constructor(expression, initialSubscriber, isVolatileBinding = false) {
|
|
531
|
+
super(expression, initialSubscriber);
|
|
532
|
+
this.expression = expression;
|
|
533
|
+
this.isVolatileBinding = isVolatileBinding;
|
|
534
|
+
this.needsRefresh = true;
|
|
535
|
+
this.needsQueue = true;
|
|
536
|
+
this.isAsync = true;
|
|
537
|
+
this.first = this;
|
|
538
|
+
this.last = null;
|
|
539
|
+
this.propertySource = void 0;
|
|
540
|
+
this.propertyName = void 0;
|
|
541
|
+
this.notifier = void 0;
|
|
542
|
+
this.next = void 0;
|
|
543
|
+
}
|
|
544
|
+
setMode(isAsync) {
|
|
545
|
+
this.isAsync = this.needsQueue = isAsync;
|
|
546
|
+
}
|
|
547
|
+
bind(controller) {
|
|
548
|
+
this.controller = controller;
|
|
549
|
+
const value = this.observe(controller.source, controller.context);
|
|
550
|
+
if (!controller.isBound && this.requiresUnbind(controller)) {
|
|
551
|
+
controller.onUnbind(this);
|
|
552
|
+
}
|
|
553
|
+
return value;
|
|
554
|
+
}
|
|
555
|
+
requiresUnbind(controller) {
|
|
556
|
+
return (controller.sourceLifetime !== SourceLifetime.coupled ||
|
|
557
|
+
this.first !== this.last ||
|
|
558
|
+
this.first.propertySource !== controller.source);
|
|
559
|
+
}
|
|
560
|
+
unbind(controller) {
|
|
561
|
+
this.dispose();
|
|
562
|
+
}
|
|
563
|
+
observe(source, context) {
|
|
564
|
+
if (this.needsRefresh && this.last !== null) {
|
|
565
|
+
this.dispose();
|
|
566
|
+
}
|
|
567
|
+
const previousWatcher = watcher;
|
|
568
|
+
watcher = this.needsRefresh ? this : void 0;
|
|
569
|
+
this.needsRefresh = this.isVolatileBinding;
|
|
570
|
+
let result;
|
|
571
|
+
try {
|
|
572
|
+
result = this.expression(source, context);
|
|
573
|
+
}
|
|
574
|
+
finally {
|
|
575
|
+
watcher = previousWatcher;
|
|
576
|
+
}
|
|
577
|
+
return result;
|
|
578
|
+
}
|
|
579
|
+
// backwards compat with v1 kernel
|
|
580
|
+
disconnect() {
|
|
581
|
+
this.dispose();
|
|
582
|
+
}
|
|
583
|
+
dispose() {
|
|
584
|
+
if (this.last !== null) {
|
|
585
|
+
let current = this.first;
|
|
586
|
+
while (current !== void 0) {
|
|
587
|
+
current.notifier.unsubscribe(this, current.propertyName);
|
|
588
|
+
current = current.next;
|
|
589
|
+
}
|
|
590
|
+
this.last = null;
|
|
591
|
+
this.needsRefresh = this.needsQueue = this.isAsync;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
watch(propertySource, propertyName) {
|
|
595
|
+
const prev = this.last;
|
|
596
|
+
const notifier = getNotifier(propertySource);
|
|
597
|
+
const current = prev === null ? this.first : {};
|
|
598
|
+
current.propertySource = propertySource;
|
|
599
|
+
current.propertyName = propertyName;
|
|
600
|
+
current.notifier = notifier;
|
|
601
|
+
notifier.subscribe(this, propertyName);
|
|
602
|
+
if (prev !== null) {
|
|
603
|
+
if (!this.needsRefresh) {
|
|
604
|
+
// Declaring the variable prior to assignment below circumvents
|
|
605
|
+
// a bug in Angular's optimization process causing infinite recursion
|
|
606
|
+
// of this watch() method. Details https://github.com/microsoft/fast/issues/4969
|
|
607
|
+
let prevValue;
|
|
608
|
+
watcher = void 0;
|
|
609
|
+
/* eslint-disable-next-line */
|
|
610
|
+
prevValue = prev.propertySource[prev.propertyName];
|
|
611
|
+
/* eslint-disable-next-line */
|
|
612
|
+
watcher = this;
|
|
613
|
+
if (propertySource === prevValue) {
|
|
614
|
+
this.needsRefresh = true;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
prev.next = current;
|
|
618
|
+
}
|
|
619
|
+
this.last = current;
|
|
620
|
+
}
|
|
621
|
+
handleChange() {
|
|
622
|
+
if (this.needsQueue) {
|
|
623
|
+
this.needsQueue = false;
|
|
624
|
+
queueUpdate(this);
|
|
625
|
+
}
|
|
626
|
+
else if (!this.isAsync) {
|
|
627
|
+
this.call();
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
call() {
|
|
631
|
+
if (this.last !== null) {
|
|
632
|
+
this.needsQueue = this.isAsync;
|
|
633
|
+
this.notify(this);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
*records() {
|
|
637
|
+
let next = this.first;
|
|
638
|
+
while (next !== void 0) {
|
|
639
|
+
yield next;
|
|
640
|
+
next = next.next;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
makeSerializationNoop(ExpressionNotifierImplementation);
|
|
645
|
+
return Object.freeze({
|
|
646
|
+
/**
|
|
647
|
+
* @internal
|
|
648
|
+
* @param factory - The factory used to create array observers.
|
|
649
|
+
*/
|
|
650
|
+
setArrayObserverFactory(factory) {
|
|
651
|
+
createArrayObserver = factory;
|
|
652
|
+
},
|
|
653
|
+
/**
|
|
654
|
+
* Gets a notifier for an object or Array.
|
|
655
|
+
* @param source - The object or Array to get the notifier for.
|
|
656
|
+
*/
|
|
657
|
+
getNotifier,
|
|
658
|
+
/**
|
|
659
|
+
* Records a property change for a source object.
|
|
660
|
+
* @param source - The object to record the change against.
|
|
661
|
+
* @param propertyName - The property to track as changed.
|
|
662
|
+
*/
|
|
663
|
+
track(source, propertyName) {
|
|
664
|
+
watcher && watcher.watch(source, propertyName);
|
|
665
|
+
},
|
|
666
|
+
/**
|
|
667
|
+
* Notifies watchers that the currently executing property getter or function is volatile
|
|
668
|
+
* with respect to its observable dependencies.
|
|
669
|
+
*/
|
|
670
|
+
trackVolatile() {
|
|
671
|
+
watcher && (watcher.needsRefresh = true);
|
|
672
|
+
},
|
|
673
|
+
/**
|
|
674
|
+
* Notifies subscribers of a source object of changes.
|
|
675
|
+
* @param source - the object to notify of changes.
|
|
676
|
+
* @param args - The change args to pass to subscribers.
|
|
677
|
+
*/
|
|
678
|
+
notify(source, args) {
|
|
679
|
+
/* eslint-disable-next-line @typescript-eslint/no-use-before-define */
|
|
680
|
+
getNotifier(source).notify(args);
|
|
681
|
+
},
|
|
682
|
+
/**
|
|
683
|
+
* Defines an observable property on an object or prototype.
|
|
684
|
+
* @param target - The target object to define the observable on.
|
|
685
|
+
* @param nameOrAccessor - The name of the property to define as observable;
|
|
686
|
+
* or a custom accessor that specifies the property name and accessor implementation.
|
|
687
|
+
*/
|
|
688
|
+
defineProperty(target, nameOrAccessor) {
|
|
689
|
+
if (isString(nameOrAccessor)) {
|
|
690
|
+
nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);
|
|
691
|
+
}
|
|
692
|
+
getAccessors(target).push(nameOrAccessor);
|
|
693
|
+
Reflect.defineProperty(target, nameOrAccessor.name, {
|
|
694
|
+
enumerable: true,
|
|
695
|
+
get() {
|
|
696
|
+
return nameOrAccessor.getValue(this);
|
|
697
|
+
},
|
|
698
|
+
set(newValue) {
|
|
699
|
+
nameOrAccessor.setValue(this, newValue);
|
|
700
|
+
},
|
|
701
|
+
});
|
|
702
|
+
},
|
|
703
|
+
/**
|
|
704
|
+
* Finds all the observable accessors defined on the target,
|
|
705
|
+
* including its prototype chain.
|
|
706
|
+
* @param target - The target object to search for accessor on.
|
|
707
|
+
*/
|
|
708
|
+
getAccessors,
|
|
709
|
+
/**
|
|
710
|
+
* Creates a {@link ExpressionNotifier} that can watch the
|
|
711
|
+
* provided {@link Expression} for changes.
|
|
712
|
+
* @param expression - The binding to observe.
|
|
713
|
+
* @param initialSubscriber - An initial subscriber to changes in the binding value.
|
|
714
|
+
* @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
|
|
715
|
+
*/
|
|
716
|
+
binding(expression, initialSubscriber, isVolatileBinding = this.isVolatileBinding(expression)) {
|
|
717
|
+
return new ExpressionNotifierImplementation(expression, initialSubscriber, isVolatileBinding);
|
|
718
|
+
},
|
|
719
|
+
/**
|
|
720
|
+
* Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
|
|
721
|
+
* on every evaluation of the value.
|
|
722
|
+
* @param expression - The binding to inspect.
|
|
723
|
+
*/
|
|
724
|
+
isVolatileBinding(expression) {
|
|
725
|
+
return volatileRegex.test(expression.toString());
|
|
726
|
+
},
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
const contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
|
|
730
|
+
let current = null;
|
|
731
|
+
return {
|
|
732
|
+
get() {
|
|
733
|
+
return current;
|
|
734
|
+
},
|
|
735
|
+
set(event) {
|
|
736
|
+
current = event;
|
|
737
|
+
},
|
|
738
|
+
};
|
|
739
|
+
});
|
|
740
|
+
/**
|
|
741
|
+
* Provides additional contextual information available to behaviors and expressions.
|
|
742
|
+
* @public
|
|
743
|
+
*/
|
|
744
|
+
const ExecutionContext = Object.freeze({
|
|
745
|
+
/**
|
|
746
|
+
* A default execution context.
|
|
747
|
+
*/
|
|
748
|
+
default: {
|
|
749
|
+
index: 0,
|
|
750
|
+
length: 0,
|
|
751
|
+
get event() {
|
|
752
|
+
return ExecutionContext.getEvent();
|
|
753
|
+
},
|
|
754
|
+
eventDetail() {
|
|
755
|
+
return this.event.detail;
|
|
756
|
+
},
|
|
757
|
+
eventTarget() {
|
|
758
|
+
return this.event.target;
|
|
759
|
+
},
|
|
760
|
+
},
|
|
761
|
+
/**
|
|
762
|
+
* Gets the current event.
|
|
763
|
+
* @returns An event object.
|
|
764
|
+
*/
|
|
765
|
+
getEvent() {
|
|
766
|
+
return contextEvent.get();
|
|
767
|
+
},
|
|
768
|
+
/**
|
|
769
|
+
* Sets the current event.
|
|
770
|
+
* @param event - An event object.
|
|
771
|
+
*/
|
|
772
|
+
setEvent(event) {
|
|
773
|
+
contextEvent.set(event);
|
|
774
|
+
},
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
const marker = `fast-${Math.random().toString(36).substring(2, 8)}`;
|
|
778
|
+
let id = 0;
|
|
779
|
+
/** @internal */
|
|
780
|
+
const nextId = () => `${marker}-${++id}`;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Bridges between ViewBehaviors and HostBehaviors, enabling a host to
|
|
784
|
+
* control ViewBehaviors.
|
|
785
|
+
* @public
|
|
786
|
+
*/
|
|
787
|
+
const ViewBehaviorOrchestrator = Object.freeze({
|
|
788
|
+
/**
|
|
789
|
+
* Creates a ViewBehaviorOrchestrator.
|
|
790
|
+
* @param source - The source to to associate behaviors with.
|
|
791
|
+
* @returns A ViewBehaviorOrchestrator.
|
|
792
|
+
*/
|
|
793
|
+
create(source) {
|
|
794
|
+
const behaviors = [];
|
|
795
|
+
const targets = {};
|
|
796
|
+
let unbindables = null;
|
|
797
|
+
let isConnected = false;
|
|
798
|
+
return {
|
|
799
|
+
source,
|
|
800
|
+
context: ExecutionContext.default,
|
|
801
|
+
targets,
|
|
802
|
+
get isBound() {
|
|
803
|
+
return isConnected;
|
|
804
|
+
},
|
|
805
|
+
addBehaviorFactory(factory, target) {
|
|
806
|
+
var _a, _b, _c, _d;
|
|
807
|
+
const compiled = factory;
|
|
808
|
+
compiled.id = (_a = compiled.id) !== null && _a !== void 0 ? _a : nextId();
|
|
809
|
+
compiled.targetNodeId = (_b = compiled.targetNodeId) !== null && _b !== void 0 ? _b : nextId();
|
|
810
|
+
compiled.targetTagName = (_c = target.tagName) !== null && _c !== void 0 ? _c : null;
|
|
811
|
+
compiled.policy = (_d = compiled.policy) !== null && _d !== void 0 ? _d : DOM.policy;
|
|
812
|
+
this.addTarget(compiled.targetNodeId, target);
|
|
813
|
+
this.addBehavior(compiled.createBehavior());
|
|
814
|
+
},
|
|
815
|
+
addTarget(nodeId, target) {
|
|
816
|
+
targets[nodeId] = target;
|
|
817
|
+
},
|
|
818
|
+
addBehavior(behavior) {
|
|
819
|
+
behaviors.push(behavior);
|
|
820
|
+
if (isConnected) {
|
|
821
|
+
behavior.bind(this);
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
onUnbind(unbindable) {
|
|
825
|
+
if (unbindables === null) {
|
|
826
|
+
unbindables = [];
|
|
827
|
+
}
|
|
828
|
+
unbindables.push(unbindable);
|
|
829
|
+
},
|
|
830
|
+
connectedCallback(controller) {
|
|
831
|
+
if (!isConnected) {
|
|
832
|
+
isConnected = true;
|
|
833
|
+
behaviors.forEach(x => x.bind(this));
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
disconnectedCallback(controller) {
|
|
837
|
+
if (isConnected) {
|
|
838
|
+
isConnected = false;
|
|
839
|
+
if (unbindables !== null) {
|
|
840
|
+
unbindables.forEach(x => x.unbind(this));
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
};
|
|
845
|
+
},
|
|
846
|
+
});
|
|
847
|
+
|
|
16
848
|
const DataGridCellSortStates = {
|
|
17
849
|
none: "none",
|
|
18
850
|
ascending: "ascending",
|
|
@@ -365,8 +1197,7 @@ class DataGridRow extends HostSemantics(VividElement) {
|
|
|
365
1197
|
this.rowType = DataGridRowTypes.default;
|
|
366
1198
|
this.rowData = null;
|
|
367
1199
|
this.columnDefinitions = null;
|
|
368
|
-
this.
|
|
369
|
-
this.cellsPlaceholder = null;
|
|
1200
|
+
this.behaviorOrchestrator = null;
|
|
370
1201
|
/**
|
|
371
1202
|
* @internal
|
|
372
1203
|
*/
|
|
@@ -418,16 +1249,18 @@ class DataGridRow extends HostSemantics(VividElement) {
|
|
|
418
1249
|
*/
|
|
419
1250
|
connectedCallback() {
|
|
420
1251
|
super.connectedCallback();
|
|
421
|
-
if (this.
|
|
422
|
-
this.cellsPlaceholder = document.createComment("");
|
|
423
|
-
this.appendChild(this.cellsPlaceholder);
|
|
1252
|
+
if (this.behaviorOrchestrator === null) {
|
|
424
1253
|
this.updateItemTemplate();
|
|
425
|
-
this.
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
1254
|
+
this.behaviorOrchestrator = ViewBehaviorOrchestrator.create(this);
|
|
1255
|
+
this.$fastController.addBehavior(this.behaviorOrchestrator);
|
|
1256
|
+
this.behaviorOrchestrator.addBehaviorFactory(
|
|
1257
|
+
new RepeatDirective(
|
|
1258
|
+
normalizeBinding((x) => x.columnDefinitions),
|
|
1259
|
+
normalizeBinding((x) => x.activeCellItemTemplate),
|
|
1260
|
+
{ positioning: true }
|
|
1261
|
+
),
|
|
1262
|
+
this.appendChild(document.createComment(""))
|
|
1263
|
+
);
|
|
431
1264
|
}
|
|
432
1265
|
this.addEventListener("cell-focused", this.handleCellFocus);
|
|
433
1266
|
this.addEventListener(eventFocusOut, this.handleFocusout);
|
|
@@ -571,8 +1404,7 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
571
1404
|
* @internal
|
|
572
1405
|
*/
|
|
573
1406
|
this.fixedColumnsPositions = [];
|
|
574
|
-
this.
|
|
575
|
-
this.rowsPlaceholder = null;
|
|
1407
|
+
this.behaviorOrchestrator = null;
|
|
576
1408
|
this.generatedHeader = null;
|
|
577
1409
|
this.isUpdatingFocus = false;
|
|
578
1410
|
this.pendingFocusUpdate = false;
|
|
@@ -618,7 +1450,7 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
618
1450
|
this.queueRowIndexUpdate = () => {
|
|
619
1451
|
if (!this.rowindexUpdateQueued) {
|
|
620
1452
|
this.rowindexUpdateQueued = true;
|
|
621
|
-
|
|
1453
|
+
Updates$1.enqueue(this.updateRowIndexes);
|
|
622
1454
|
}
|
|
623
1455
|
};
|
|
624
1456
|
this.updateRowIndexes = () => {
|
|
@@ -866,15 +1698,19 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
866
1698
|
if (this.rowItemTemplate === void 0) {
|
|
867
1699
|
this.rowItemTemplate = this.defaultRowItemTemplate;
|
|
868
1700
|
}
|
|
869
|
-
this.
|
|
870
|
-
|
|
1701
|
+
if (this.behaviorOrchestrator === null) {
|
|
1702
|
+
this.behaviorOrchestrator = ViewBehaviorOrchestrator.create(this);
|
|
1703
|
+
this.$fastController.addBehavior(this.behaviorOrchestrator);
|
|
1704
|
+
this.behaviorOrchestrator.addBehaviorFactory(
|
|
1705
|
+
new RepeatDirective(
|
|
1706
|
+
normalizeBinding((x) => x.rowsData),
|
|
1707
|
+
normalizeBinding((x) => x.rowItemTemplate),
|
|
1708
|
+
{ positioning: true }
|
|
1709
|
+
),
|
|
1710
|
+
this.appendChild(document.createComment(""))
|
|
1711
|
+
);
|
|
1712
|
+
}
|
|
871
1713
|
this.toggleGeneratedHeader();
|
|
872
|
-
this.rowsRepeatBehavior = new RepeatDirective(
|
|
873
|
-
(x) => x.rowsData,
|
|
874
|
-
(x) => x.rowItemTemplate,
|
|
875
|
-
{ positioning: true }
|
|
876
|
-
).createBehavior(this.rowsPlaceholder);
|
|
877
|
-
this.$fastController.addBehaviors([this.rowsRepeatBehavior]);
|
|
878
1714
|
this.addEventListener("row-focused", this.handleRowFocus);
|
|
879
1715
|
this.addEventListener(eventFocus, this.handleFocus);
|
|
880
1716
|
this.addEventListener(eventKeyDown, this.handleKeydown);
|
|
@@ -882,7 +1718,7 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
882
1718
|
this.observer = new MutationObserver(this.onChildListChange);
|
|
883
1719
|
this.observer.observe(this, { childList: true });
|
|
884
1720
|
this.setupResizeObserver();
|
|
885
|
-
|
|
1721
|
+
Updates$1.enqueue(this.queueRowIndexUpdate);
|
|
886
1722
|
this.#setTabIndex();
|
|
887
1723
|
Observable.getNotifier(this).subscribe(
|
|
888
1724
|
this.#changeHandler,
|
|
@@ -906,7 +1742,6 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
906
1742
|
this.resizeObserver.disconnect();
|
|
907
1743
|
this.resizeObserver = void 0;
|
|
908
1744
|
}
|
|
909
|
-
this.rowsPlaceholder = null;
|
|
910
1745
|
this.generatedHeader = null;
|
|
911
1746
|
Observable.getNotifier(this).unsubscribe(
|
|
912
1747
|
this.#changeHandler,
|
|
@@ -1026,7 +1861,7 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
1026
1861
|
}
|
|
1027
1862
|
if (this.pendingFocusUpdate === false) {
|
|
1028
1863
|
this.pendingFocusUpdate = true;
|
|
1029
|
-
|
|
1864
|
+
Updates$1.enqueue(() => this.updateFocus());
|
|
1030
1865
|
}
|
|
1031
1866
|
}
|
|
1032
1867
|
updateFocus() {
|
|
@@ -1074,7 +1909,7 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
1074
1909
|
}
|
|
1075
1910
|
selectionModeChanged(oldValue) {
|
|
1076
1911
|
if (oldValue === void 0) {
|
|
1077
|
-
|
|
1912
|
+
Updates$1.enqueue(this._resetSelection);
|
|
1078
1913
|
return;
|
|
1079
1914
|
}
|
|
1080
1915
|
this._resetSelection(true);
|
|
@@ -1246,7 +2081,7 @@ function handleColumnSort(_, { event }) {
|
|
|
1246
2081
|
}
|
|
1247
2082
|
const DataGridTemplate = (context) => {
|
|
1248
2083
|
const rowItemTemplate = createRowItemTemplate(context);
|
|
1249
|
-
const rowTag = context.tagFor(DataGridRow);
|
|
2084
|
+
const rowTag = context.tagFor(DataGridRow, true);
|
|
1250
2085
|
return html`
|
|
1251
2086
|
<template
|
|
1252
2087
|
aria-multiselectable="${getMultiSelectAriaState}"
|