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