@angular/aria 22.0.0-next.7 → 22.0.0-rc.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/fesm2022/_accordion-chunk.mjs +11 -1
- package/fesm2022/_accordion-chunk.mjs.map +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_list-chunk.mjs +4 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs +1 -1
- package/fesm2022/_menu-chunk.mjs +10 -1
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/{_combobox-listbox-chunk.mjs → _option-chunk.mjs} +13 -50
- package/fesm2022/_option-chunk.mjs.map +1 -0
- package/fesm2022/_tabs-chunk.mjs +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +10 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_transforms-chunk.mjs +8 -0
- package/fesm2022/_transforms-chunk.mjs.map +1 -0
- package/fesm2022/{_combobox-tree-chunk.mjs → _tree-chunk.mjs} +8 -48
- package/fesm2022/_tree-chunk.mjs.map +1 -0
- package/fesm2022/{_signal-like-chunk.mjs → _violations-chunk.mjs} +60 -2
- package/fesm2022/_violations-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +46 -15
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +116 -89
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox-testing.mjs +79 -0
- package/fesm2022/combobox-testing.mjs.map +1 -0
- package/fesm2022/combobox.mjs +273 -307
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs +8 -0
- package/fesm2022/grid-testing.mjs.map +1 -1
- package/fesm2022/grid.mjs +75 -87
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +4 -0
- package/fesm2022/listbox-testing.mjs.map +1 -1
- package/fesm2022/listbox.mjs +192 -215
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +11 -0
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +60 -66
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +19 -13
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +172 -115
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +5 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +41 -30
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +12 -0
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +126 -156
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +6 -6
- package/types/_accordion-chunk.d.ts +4 -2
- package/types/_collection-chunk.d.ts +42 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +11 -3
- package/types/_keyboard-event-manager-chunk.d.ts +1 -1
- package/types/_list-chunk.d.ts +1 -1
- package/types/_list-navigation-chunk.d.ts +1 -1
- package/types/_listbox-chunk.d.ts +1 -1
- package/types/_menu-chunk.d.ts +3 -1
- package/types/_tabs-chunk.d.ts +1 -1
- package/types/_toolbar-chunk.d.ts +3 -1
- package/types/_tree-chunk.d.ts +1 -1
- package/types/accordion.d.ts +10 -18
- package/types/combobox-testing.d.ts +63 -0
- package/types/combobox.d.ts +96 -193
- package/types/grid-testing.d.ts +4 -0
- package/types/grid.d.ts +99 -103
- package/types/listbox-testing.d.ts +25 -0
- package/types/listbox.d.ts +53 -62
- package/types/menu-testing.d.ts +6 -0
- package/types/menu.d.ts +17 -23
- package/types/private.d.ts +26 -137
- package/types/tabs.d.ts +69 -80
- package/types/toolbar-testing.d.ts +4 -0
- package/types/toolbar.d.ts +6 -12
- package/types/tree-testing.d.ts +8 -0
- package/types/tree.d.ts +7 -20
- package/fesm2022/_combobox-chunk.mjs +0 -478
- package/fesm2022/_combobox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-tree-chunk.mjs.map +0 -1
- package/fesm2022/_element-chunk.mjs +0 -6
- package/fesm2022/_element-chunk.mjs.map +0 -1
- package/fesm2022/_signal-like-chunk.mjs.map +0 -1
- package/fesm2022/simple-combobox.mjs +0 -443
- package/fesm2022/simple-combobox.mjs.map +0 -1
- package/types/_combobox-chunk.d.ts +0 -224
- package/types/_element-chunk.d.ts +0 -10
- package/types/_signal-like-chunk.d.ts +0 -14
- package/types/simple-combobox.d.ts +0 -124
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-popup.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-dialog.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-input.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-popup-container.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {Combobox} from './combobox';\n\n/** Token used to provide the combobox to child components. */\nexport const COMBOBOX = new InjectionToken<Combobox<unknown>>('COMBOBOX');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive, inject, signal} from '@angular/core';\nimport {ComboboxListboxControls, ComboboxTreeControls, ComboboxDialogPattern} from '../private';\nimport type {Combobox} from './combobox';\nimport {COMBOBOX} from './combobox-tokens';\n\n/**\n * Identifies an element as a popup for an `ngCombobox`.\n *\n * This directive acts as a bridge, allowing the `ngCombobox` to discover and interact\n * with the underlying control (e.g., `ngListbox`, `ngTree`, or `ngComboboxDialog`) that\n * manages the options. It's primarily used as a host directive and is responsible for\n * exposing the popup's control pattern to the parent combobox.\n *\n * @developerPreview 21.0\n *\n * @see [Combobox](guide/aria/combobox)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n * @see [Autocomplete](guide/aria/autocomplete)\n */\n@Directive({\n selector: '[ngComboboxPopup]',\n exportAs: 'ngComboboxPopup',\n})\nexport class ComboboxPopup<V> {\n /** The combobox that the popup belongs to. */\n readonly combobox = inject<Combobox<V>>(COMBOBOX, {optional: true});\n\n /** The popup controls exposed to the combobox. */\n readonly _controls = signal<\n | ComboboxListboxControls<any, V>\n | ComboboxTreeControls<any, V>\n | ComboboxDialogPattern\n | undefined\n >(undefined);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport {DeferredContentAware, ComboboxPattern} from '../private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {COMBOBOX} from './combobox-tokens';\nimport {ComboboxPopup} from './combobox-popup';\n\n/**\n * The container element that wraps a combobox input and popup, and orchestrates its behavior.\n *\n * The `ngCombobox` directive is the main entry point for creating a combobox and customizing its\n * behavior. It coordinates the interactions between the `ngComboboxInput` and the popup, which\n * is defined by a `ng-template` with the `ngComboboxPopupContainer` directive. If using the\n * `CdkOverlay`, the `cdkConnectedOverlay` directive takes the place of `ngComboboxPopupContainer`.\n *\n * ```html\n * <div ngCombobox filterMode=\"highlight\">\n * <input\n * ngComboboxInput\n * placeholder=\"Search for a state...\"\n * [(value)]=\"searchString\"\n * />\n *\n * <ng-template ngComboboxPopupContainer>\n * <div ngListbox [(value)]=\"selectedValue\">\n * @for (option of filteredOptions(); track option) {\n * <div ngOption [value]=\"option\" [label]=\"option\">\n * <span>{{option}}</span>\n * </div>\n * }\n * </div>\n * </ng-template>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n *\n * @see [Combobox](guide/aria/combobox)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n * @see [Autocomplete](guide/aria/autocomplete)\n */\n@Directive({\n selector: '[ngCombobox]',\n exportAs: 'ngCombobox',\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n host: {\n '[attr.data-expanded]': 'expanded()',\n '(input)': '_pattern.onInput($event)',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n providers: [{provide: COMBOBOX, useExisting: Combobox}],\n})\nexport class Combobox<V> {\n /** A signal wrapper for directionality. */\n protected readonly textDirection = inject(Directionality).valueSignal.asReadonly();\n\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the combobox element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The combobox popup. */\n readonly popup = contentChild<ComboboxPopup<V>>(ComboboxPopup);\n\n /**\n * The filter mode for the combobox.\n * - `manual`: The consumer is responsible for filtering the options.\n * - `auto-select`: The combobox automatically selects the first matching option.\n * - `highlight`: The combobox highlights matching text in the options without changing selection.\n */\n readonly filterMode = input<'manual' | 'auto-select' | 'highlight'>('manual');\n\n /** Whether the combobox is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the combobox is read-only. */\n readonly readonly = input(false, {transform: booleanAttribute});\n\n /** The value of the first matching item in the popup. */\n readonly firstMatch = input<V | undefined>(undefined);\n\n /** Whether the combobox is expanded. */\n readonly expanded = computed(() => this.alwaysExpanded() || this._pattern.expanded());\n\n // TODO: Maybe make expanded a signal that can be passed in?\n // Or an \"always expanded\" option?\n\n /** Whether the combobox popup should always be expanded, regardless of user interaction. */\n readonly alwaysExpanded = input(false, {transform: booleanAttribute});\n\n /** Input element connected to the combobox, if any. */\n readonly inputElement = computed(() => this._pattern.inputs.inputEl());\n\n /** The combobox ui pattern. */\n readonly _pattern = new ComboboxPattern<any, V>({\n ...this,\n textDirection: this.textDirection,\n disabled: this.disabled,\n readonly: this.readonly,\n inputValue: signal(''),\n inputEl: signal(undefined),\n containerEl: () => this._elementRef.nativeElement,\n popupControls: () => this.popup()?._controls(),\n });\n\n constructor() {\n afterRenderEffect(() => {\n if (this.alwaysExpanded()) {\n this._pattern.expanded.set(true);\n }\n });\n\n afterRenderEffect({\n write: () => {\n if (\n !this._deferredContentAware?.contentVisible() &&\n (this._pattern.isFocused() || this.alwaysExpanded())\n ) {\n this._deferredContentAware?.contentVisible.set(true);\n }\n },\n });\n }\n\n /** Opens the combobox to the selected item. */\n open() {\n this._pattern.open({selected: true});\n }\n\n /** Closes the combobox. */\n close() {\n this._pattern.close();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {afterRenderEffect, Directive, ElementRef, inject, input} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {ComboboxDialogPattern} from '../private';\nimport {Combobox} from './combobox';\nimport {ComboboxPopup} from './combobox-popup';\n\n/**\n * Integrates a native `<dialog>` element with the combobox, allowing for\n * a modal or non-modal popup experience. It handles the opening and closing of the dialog\n * based on the combobox's expanded state.\n *\n * ```html\n * <ng-template ngComboboxPopupContainer>\n * <dialog ngComboboxDialog class=\"example-dialog\">\n * <!-- ... dialog content ... -->\n * </dialog>\n * </ng-template>\n * ```\n *\n * @developerPreview 21.0\n *\n * @see [Combobox](guide/aria/combobox)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n * @see [Autocomplete](guide/aria/autocomplete)\n */\n@Directive({\n selector: 'dialog[ngComboboxDialog]',\n exportAs: 'ngComboboxDialog',\n host: {\n '[attr.data-open]': 'combobox._pattern.expanded()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n },\n hostDirectives: [ComboboxPopup],\n})\nexport class ComboboxDialog {\n /** The dialog element. */\n private readonly _elementRef = inject(ElementRef<HTMLDialogElement>);\n\n /** A reference to the dialog element. */\n readonly element = this._elementRef.nativeElement as HTMLDialogElement;\n\n /** The combobox that the dialog belongs to. */\n readonly combobox = inject(Combobox);\n\n /** The unique identifier for the trigger. */\n readonly id = input(inject(_IdGenerator).getId('ng-combobox-dialog-', true));\n\n /** A reference to the parent combobox popup, if one exists. */\n private readonly _popup = inject<ComboboxPopup<unknown>>(ComboboxPopup, {\n optional: true,\n });\n\n readonly _pattern: ComboboxDialogPattern = new ComboboxDialogPattern({\n id: this.id,\n element: () => this.element,\n combobox: this.combobox._pattern,\n });\n\n constructor() {\n if (this._popup) {\n this._popup._controls.set(this._pattern);\n }\n\n afterRenderEffect({\n write: () => {\n this.combobox._pattern.expanded() ? this.element.showModal() : this.element.close();\n },\n });\n }\n\n close() {\n this._popup?.combobox?._pattern.close();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n Directive,\n ElementRef,\n inject,\n model,\n untracked,\n WritableSignal,\n} from '@angular/core';\nimport {ComboboxDialogPattern} from '../private';\nimport {Combobox} from './combobox';\n\n/**\n * An input that is part of a combobox. It is responsible for displaying the\n * current value and handling user input for filtering and selection.\n *\n * This directive should be applied to an `<input>` element within an `ngCombobox`\n * container. It automatically handles keyboard interactions, such as opening the\n * popup and navigating through the options.\n *\n * ```html\n * <input\n * ngComboboxInput\n * placeholder=\"Search...\"\n * [(value)]=\"searchString\"\n * />\n * ```\n *\n * @developerPreview 21.0\n *\n * @see [Combobox](guide/aria/combobox)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n * @see [Autocomplete](guide/aria/autocomplete)\n */\n@Directive({\n selector: 'input[ngComboboxInput]',\n exportAs: 'ngComboboxInput',\n host: {\n 'role': 'combobox',\n '[value]': 'value()',\n '[attr.aria-disabled]': 'combobox._pattern.disabled()',\n '[attr.aria-expanded]': 'combobox._pattern.expanded()',\n '[attr.aria-activedescendant]': 'combobox._pattern.activeDescendant()',\n '[attr.aria-controls]': 'combobox._pattern.popupId()',\n '[attr.aria-haspopup]': 'combobox._pattern.hasPopup()',\n '[attr.aria-autocomplete]': 'combobox._pattern.autocomplete()',\n '[attr.readonly]': 'combobox._pattern.readonly()',\n },\n})\nexport class ComboboxInput {\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n /** A reference to the input element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The combobox that the input belongs to. */\n readonly combobox = inject(Combobox);\n\n /** The value of the input. */\n readonly value = model<string>('');\n\n constructor() {\n (this.combobox._pattern.inputs.inputEl as WritableSignal<HTMLInputElement>).set(\n this._elementRef.nativeElement,\n );\n this.combobox._pattern.inputs.inputValue = this.value;\n\n const controls = this.combobox.popup()?._controls();\n if (controls instanceof ComboboxDialogPattern) {\n return;\n }\n\n /** Focuses & selects the first item in the combobox if the user changes the input value. */\n afterRenderEffect({\n write: () => {\n this.value();\n controls?.items();\n untracked(() => this.combobox._pattern.onFilter());\n },\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive} from '@angular/core';\nimport {DeferredContent} from '../private';\n\n/**\n * A structural directive that marks the `ng-template` to be used as the popup\n * for a combobox. This content is conditionally rendered.\n *\n * The content of the popup can be a `ngListbox`, `ngTree`, or `role=\"dialog\"`, allowing for\n * flexible and complex combobox implementations. The consumer is responsible for\n * implementing the filtering logic based on the `ngComboboxInput`'s value.\n *\n * ```html\n * <ng-template ngComboboxPopupContainer>\n * <div ngListbox [(value)]=\"selectedValue\">\n * <!-- ... options ... -->\n * </div>\n * </ng-template>\n * ```\n *\n * When using CdkOverlay, this directive can be replaced by `cdkConnectedOverlay`.\n *\n * ```html\n * <ng-template\n * [cdkConnectedOverlay]=\"{origin: inputElement, usePopover: 'inline' matchWidth: true}\"\n * [cdkConnectedOverlayOpen]=\"combobox.expanded()\">\n * <div ngListbox [(value)]=\"selectedValue\">\n * <!-- ... options ... -->\n * </div>\n * </ng-template>\n * ```\n *\n * @developerPreview 21.0\n *\n * @see [Combobox](guide/aria/combobox)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n * @see [Autocomplete](guide/aria/autocomplete)\n */\n@Directive({\n selector: 'ng-template[ngComboboxPopupContainer]',\n exportAs: 'ngComboboxPopupContainer',\n hostDirectives: [DeferredContent],\n})\nexport class ComboboxPopupContainer {}\n"],"names":["COMBOBOX","InjectionToken","ComboboxPopup","combobox","inject","optional","_controls","signal","undefined","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","exportAs","ngImport","decorators","args","Combobox","textDirection","Directionality","valueSignal","asReadonly","_elementRef","ElementRef","element","nativeElement","_deferredContentAware","DeferredContentAware","popup","contentChild","filterMode","input","disabled","transform","booleanAttribute","readonly","firstMatch","expanded","computed","alwaysExpanded","_pattern","inputElement","inputs","inputEl","ComboboxPattern","inputValue","containerEl","popupControls","constructor","afterRenderEffect","set","write","contentVisible","isFocused","open","selected","close","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","classPropertyName","publicName","isSignal","isRequired","transformFunction","host","listeners","properties","providers","provide","useExisting","descendants","hostDirectives","directive","i1","Input","alias","required","ComboboxDialog","id","_IdGenerator","getId","_popup","ComboboxDialogPattern","showModal","ComboboxInput","value","model","controls","items","untracked","onFilter","outputs","attributes","ComboboxPopupContainer","DeferredContent"],"mappings":";;;;;;;;;AAYO,MAAMA,QAAQ,GAAG,IAAIC,cAAc,CAAoB,UAAU,CAAC;;MCoB5DC,aAAa,CAAA;AAEfC,EAAAA,QAAQ,GAAGC,MAAM,CAAcJ,QAAQ,EAAE;AAACK,IAAAA,QAAQ,EAAE;AAAI,GAAC,CAAC;EAG1DC,SAAS,GAAGC,MAAM,CAKzBC,SAAS;;WAAC;;;;;UAVDN,aAAa;AAAAO,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;UAAbX,aAAa;AAAAY,IAAAA,YAAA,EAAA,IAAA;AAAAC,IAAAA,QAAA,EAAA,mBAAA;IAAAC,QAAA,EAAA,CAAA,iBAAA,CAAA;AAAAC,IAAAA,QAAA,EAAAN;AAAA,GAAA,CAAA;;;;;;QAAbT,aAAa;AAAAgB,EAAAA,UAAA,EAAA,CAAA;UAJzBL,SAAS;AAACM,IAAAA,IAAA,EAAA,CAAA;AACTJ,MAAAA,QAAQ,EAAE,mBAAmB;AAC7BC,MAAAA,QAAQ,EAAE;KACX;;;;MC+CYI,QAAQ,CAAA;EAEAC,aAAa,GAAGjB,MAAM,CAACkB,cAAc,CAAC,CAACC,WAAW,CAACC,UAAU,EAAE;AAGjEC,EAAAA,WAAW,GAAGrB,MAAM,CAACsB,UAAU,CAAC;AAGxCC,EAAAA,OAAO,GAAG,IAAI,CAACF,WAAW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Q,EAAE,uCAAuC;AACjDC,MAAAA,QAAQ,EAAE,0BAA0B;MACpC6D,cAAc,EAAE,CAACuB,eAAe;KACjC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"combobox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-popup.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-widget.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnInit,\n signal,\n Renderer2,\n} from '@angular/core';\nimport {DeferredContentAware, ComboboxPattern, tabIndexTransform} from '@angular/aria/private';\nimport type {ComboboxPopup} from './combobox-popup';\n\n/**\n * The container element that wraps a combobox input and popup, and orchestrates its behavior.\n *\n * The `ngCombobox` directive is the main entry point for creating a combobox and customizing its\n * behavior. It coordinates the interactions between the input and the popup.\n *\n * ```html\n * <div ngCombobox [(expanded)]=\"expanded\">\n * <input ngComboboxInput />\n *\n * <ng-template ngComboboxPopup>\n * <div ngComboboxWidget>\n * <!-- ... options ... -->\n * </div>\n * </ng-template>\n * </div>\n * ```\n */\n@Directive({\n selector: '[ngCombobox]',\n exportAs: 'ngCombobox',\n host: {\n 'role': 'combobox',\n '[attr.aria-autocomplete]': '_pattern.autocomplete()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-expanded]': '_pattern.isExpanded()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '[attr.aria-controls]': '_pattern.popupId()',\n '[attr.aria-haspopup]': '_pattern.popupType()',\n '[attr.tabindex]':\n 'disabled() && !softDisabled() ? -1 : (tabIndex() !== undefined ? tabIndex() : 0)',\n '[attr.disabled]': 'disabled() && !softDisabled() ? \"\" : null',\n '[attr.readonly]': 'disabled() && _pattern.isEditable() ? \"\" : null',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusin)': '_pattern.onFocusin()',\n '(focusout)': '_pattern.onFocusout($event)',\n '(click)': '_pattern.onClick($event)',\n '(input)': '_pattern.onInput($event)',\n },\n})\nexport class Combobox extends DeferredContentAware implements OnInit {\n private readonly _renderer = inject(Renderer2);\n\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** A reference to the input element. */\n readonly element = this._elementRef.nativeElement;\n\n /** The popup associated with the combobox. */\n readonly _popup = signal<ComboboxPopup | undefined>(undefined);\n\n /** Whether the combobox is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the combobox is soft disabled (remains focusable). */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether the combobox should always remain expanded. */\n readonly alwaysExpanded = input(false, {transform: booleanAttribute});\n\n /** The tabindex of the combobox. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\n\n /** Whether the combobox is expanded. */\n readonly expanded = model<boolean>(false);\n\n /** The value of the combobox input. */\n readonly value = model<string>('');\n\n /** An inline suggestion to be displayed in the input. */\n readonly inlineSuggestion = input<string | undefined>(undefined);\n\n /** The combobox ui pattern. */\n readonly _pattern = new ComboboxPattern({\n ...this,\n element: () => this.element,\n expandable: () => true,\n popup: computed(() => this._popup()?._pattern),\n });\n\n constructor() {\n super();\n\n afterRenderEffect(() => this._pattern.keyboardEventRelayEffect());\n afterRenderEffect(() => this._pattern.closePopupOnBlurEffect());\n afterRenderEffect(() => {\n this.contentVisible.set(this._pattern.isExpanded());\n });\n\n if (this._pattern.isEditable()) {\n afterRenderEffect(() => {\n this._renderer.setProperty(this.element, 'value', this.value());\n });\n afterRenderEffect(() => {\n this._pattern.highlightEffect();\n });\n }\n }\n\n ngOnInit() {\n if (this.alwaysExpanded()) {\n this.expanded.set(true);\n }\n }\n\n /** Registers a popup with the combobox. */\n _registerPopup(popup: ComboboxPopup) {\n this._popup.set(popup);\n }\n\n /** Unregisters the popup from the combobox. */\n _unregisterPopup() {\n this._popup.set(undefined);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {ComboboxPopup} from './combobox-popup';\n\n/** Token used to expose the combobox popup. */\nexport const COMBOBOX_POPUP = new InjectionToken<ComboboxPopup>('COMBOBOX_POPUP');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed, Directive, inject, input, OnDestroy, OnInit, signal} from '@angular/core';\nimport {DeferredContent, ComboboxPopupPattern} from '@angular/aria/private';\nimport type {Combobox} from './combobox';\nimport type {ComboboxWidget} from './combobox-widget';\nimport {COMBOBOX_POPUP} from './combobox-tokens';\n\n/**\n * A structural directive that marks the `ng-template` to be used as the popup\n * for a combobox. This content is conditionally rendered.\n *\n * The content of the popup can be any element with the `ngComboboxWidget` directive.\n *\n * ```html\n * <ng-template ngComboboxPopup>\n * <div ngComboboxWidget>\n * <!-- ... options ... -->\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n selector: 'ng-template[ngComboboxPopup]',\n exportAs: 'ngComboboxPopup',\n hostDirectives: [DeferredContent],\n providers: [{provide: COMBOBOX_POPUP, useExisting: ComboboxPopup}],\n})\nexport class ComboboxPopup implements OnInit, OnDestroy {\n private readonly _deferredContent = inject(DeferredContent);\n\n /** The combobox that the popup belongs to. */\n readonly combobox = input.required<Combobox>();\n\n /** The widget contained within the popup. */\n readonly _widget = signal<ComboboxWidget | undefined>(undefined);\n\n /** The element that serves as the control target for the popup. */\n readonly controlTarget = computed(() => this._widget()?.element);\n\n /** The ID of the popup. */\n readonly popupId = computed(() => this._widget()?.popupId());\n\n /** The ID of the active descendant in the popup. */\n readonly activeDescendant = computed(() => this._widget()?.activeDescendant());\n\n /** The type of the popup (e.g., listbox, tree, grid, dialog). */\n readonly popupType = input<'listbox' | 'tree' | 'grid' | 'dialog'>('listbox');\n\n /** The popup pattern. */\n readonly _pattern = new ComboboxPopupPattern({\n ...this,\n });\n\n ngOnInit() {\n this.combobox()._registerPopup(this);\n this._deferredContent.deferredContentAware.set(this.combobox());\n }\n\n ngOnDestroy() {\n this.combobox()._unregisterPopup();\n }\n\n /** Registers a widget with the popup. */\n _registerWidget(widget: ComboboxWidget) {\n this._widget.set(widget);\n }\n\n /** Unregisters the widget from the popup. */\n _unregisterWidget() {\n this._widget.set(undefined);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive, ElementRef, inject, input, OnDestroy, OnInit, signal} from '@angular/core';\nimport {COMBOBOX_POPUP} from './combobox-tokens';\n\n/**\n * Identifies an element as a widget within a combobox popup.\n *\n * This directive should be applied to the element that contains the options or content\n * of the popup. It handles the communication of ID and active descendant information\n * to the combobox.\n */\n@Directive({\n selector: '[ngComboboxWidget]',\n exportAs: 'ngComboboxWidget',\n host: {\n '(focusin)': 'onFocusin()',\n '(focusout)': 'onFocusout($event)',\n },\n})\nexport class ComboboxWidget implements OnInit, OnDestroy {\n /** The element that the popup widget is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _popup = inject(COMBOBOX_POPUP);\n\n /** A reference to the popup widget element. */\n readonly element = this._elementRef.nativeElement;\n\n /** The ID of the popup widget. */\n readonly popupId = signal<string | undefined>(undefined);\n\n /** The ID of the active descendant in the widget. */\n readonly activeDescendant = input<string | undefined>(undefined);\n\n private _observer: MutationObserver | undefined;\n\n constructor() {\n const el = this.element;\n this._observer = new MutationObserver(mutations => {\n for (const mutation of mutations) {\n if (mutation.attributeName === 'id') {\n this.popupId.set(el.id);\n }\n }\n });\n\n this._observer.observe(el, {\n attributes: true,\n attributeFilter: ['id'],\n });\n }\n\n ngOnInit() {\n this.popupId.set(this.element.id);\n this._popup._registerWidget(this);\n }\n\n ngOnDestroy(): void {\n this._observer?.disconnect();\n this._popup._unregisterWidget();\n }\n\n /** Handles focus in events for the widget. */\n onFocusin() {\n this._popup._pattern.onFocusin();\n }\n\n /** Handles focus out events for the widget. */\n onFocusout(event: FocusEvent) {\n this._popup._pattern.onFocusout(event);\n }\n}\n"],"names":["Combobox","DeferredContentAware","_renderer","inject","Renderer2","_elementRef","ElementRef","element","nativeElement","_popup","signal","undefined","disabled","input","transform","booleanAttribute","softDisabled","alwaysExpanded","tabIndex","ngDevMode","debugName","alias","tabIndexTransform","expanded","model","value","inlineSuggestion","_pattern","ComboboxPattern","expandable","popup","computed","constructor","afterRenderEffect","keyboardEventRelayEffect","closePopupOnBlurEffect","contentVisible","set","isExpanded","isEditable","setProperty","highlightEffect","ngOnInit","_registerPopup","_unregisterPopup","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","outputs","host","attributes","listeners","properties","exportAs","usesInheritance","ngImport","decorators","args","COMBOBOX_POPUP","InjectionToken","ComboboxPopup","_deferredContent","DeferredContent","combobox","required","_widget","controlTarget","popupId","activeDescendant","popupType","ComboboxPopupPattern","deferredContentAware","ngOnDestroy","_registerWidget","widget","_unregisterWidget","providers","provide","useExisting","hostDirectives","directive","i1","ComboboxWidget","_observer","el","MutationObserver","mutations","mutation","attributeName","id","observe","attributeFilter","disconnect","onFocusin","onFocusout","event"],"mappings":";;;;;;AAgEM,MAAOA,QAAS,SAAQC,oBAAoB,CAAA;AAC/BC,EAAAA,SAAS,GAAGC,MAAM,CAACC,SAA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AA,EAAAlB;AAAA,GAAA,CAAA;;;;;;QAAd6C,cAAc;AAAA1B,EAAAA,UAAA,EAAA,CAAA;UAR1BjB,SAAS;AAACkB,IAAAA,IAAA,EAAA,CAAA;AACThB,MAAAA,QAAQ,EAAE,oBAAoB;AAC9BY,MAAAA,QAAQ,EAAE,kBAAkB;AAC5BJ,MAAAA,IAAI,EAAE;AACJ,QAAA,WAAW,EAAE,aAAa;AAC1B,QAAA,YAAY,EAAE;AACf;KACF;;;;;;;;;;;;;;;;;"}
|
|
@@ -29,6 +29,14 @@ class GridCellHarness extends ContentContainerComponentHarness {
|
|
|
29
29
|
const host = await this.host();
|
|
30
30
|
return host.blur();
|
|
31
31
|
}
|
|
32
|
+
async isActive() {
|
|
33
|
+
const host = await this.host();
|
|
34
|
+
return (await host.getAttribute('data-active')) === 'true';
|
|
35
|
+
}
|
|
36
|
+
async isFocused() {
|
|
37
|
+
const host = await this.host();
|
|
38
|
+
return host.isFocused();
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
41
|
class GridRowHarness extends ComponentHarness {
|
|
34
42
|
static hostSelector = '[ngGridRow]';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/testing/grid-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ContentContainerComponentHarness,\n HarnessPredicate,\n parallel,\n} from '@angular/cdk/testing';\nimport {\n GridHarnessFilters,\n GridRowHarnessFilters,\n GridCellHarnessFilters,\n} from './grid-harness-filters';\n\n/** Harness for interacting with a standard ngGridCell in tests. */\nexport class GridCellHarness extends ContentContainerComponentHarness {\n static hostSelector = '[ngGridCell]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a grid cell with specific attributes.\n * @param options Options for filtering which cell instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: GridCellHarnessFilters = {}): HarnessPredicate<GridCellHarness> {\n return new HarnessPredicate(GridCellHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Whether the cell is selected. */\n async isSelected(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-selected')) === 'true';\n }\n\n /** Whether the cell is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Gets the text content of the cell. */\n async getText(): Promise<string> {\n const host = await this.host();\n return host.text();\n }\n\n /** Clicks the cell. */\n async click(): Promise<void> {\n const host = await this.host();\n return host.click();\n }\n\n /** Focuses the cell. */\n async focus(): Promise<void> {\n const host = await this.host();\n return host.focus();\n }\n\n /** Blurs the cell. */\n async blur(): Promise<void> {\n const host = await this.host();\n return host.blur();\n }\n}\n\n/** Harness for interacting with a standard ngGridRow in tests. */\nexport class GridRowHarness extends ComponentHarness {\n static hostSelector = '[ngGridRow]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a grid row with specific attributes.\n * @param options Options for filtering which row instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: GridRowHarnessFilters = {}): HarnessPredicate<GridRowHarness> {\n return new HarnessPredicate(GridRowHarness, options);\n }\n\n /** Gets all cells in the row. */\n async getCells(filters: GridCellHarnessFilters = {}): Promise<GridCellHarness[]> {\n return this.locatorForAll(GridCellHarness.with(filters))();\n }\n\n /** Gets the text of the cells in the row. */\n async getCellTextByIndex(filters: GridCellHarnessFilters = {}): Promise<string[]> {\n const cells = await this.getCells(filters);\n return parallel(() => cells.map(cell => cell.getText()));\n }\n}\n\n/** Harness for interacting with a standard ngGrid in tests. */\nexport class GridHarness extends ComponentHarness {\n static hostSelector = '[ngGrid]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a grid with specific attributes.\n * @param options Options for filtering which grid instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: GridHarnessFilters = {}): HarnessPredicate<GridHarness> {\n return new HarnessPredicate(GridHarness, options).addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Whether the grid is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the grid is multi-selectable. */\n async isMultiSelectable(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-multiselectable')) === 'true';\n }\n\n /** Gets all rows in the grid. */\n async getRows(filters: GridRowHarnessFilters = {}): Promise<GridRowHarness[]> {\n return this.locatorForAll(GridRowHarness.with(filters))();\n }\n\n /** Gets all cells in the grid. */\n async getCells(filters: GridCellHarnessFilters = {}): Promise<GridCellHarness[]> {\n return this.locatorForAll(GridCellHarness.with(filters))();\n }\n\n /** Gets the text inside the entire grid organized by rows. */\n async getCellTextByIndex(): Promise<string[][]> {\n const rows = await this.getRows();\n return parallel(() => rows.map(row => row.getCellTextByIndex()));\n }\n}\n"],"names":["GridCellHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","text","harness","stringMatches","getText","selected","isSelected","disabled","isDisabled","host","getAttribute","click","focus","blur","GridRowHarness","ComponentHarness","getCells","filters","locatorForAll","getCellTextByIndex","cells","parallel","map","cell","GridHarness","isMultiSelectable","getRows","rows","row"],"mappings":";;AAqBM,MAAOA,eAAgB,SAAQC,gCAAgC,CAAA;EACnE,OAAOC,YAAY,GAAG,cAAc;AAOpC,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAAkC,EAAE,EAAA;AAC9C,IAAA,OAAO,IAAIC,gBAAgB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AAA,OAAOA,IAAI,CAACG,KAAK,EAAE;AACrB,EAAA;EAGA,MAAMC,IAAIA,GAAA;AACR,IAAA,MAAMJ,IAAI,GAAG,MAAM,IAAI,CAACA,IAAI,EAAE;AAC9B,IAAA,OAAOA,IAAI,CAACI,IAAI,EAAE;AACpB,EAAA;;AAII,MAAOC,cAAe,SAAQC,gBAAgB,CAAA;EAClD,
|
|
1
|
+
{"version":3,"file":"grid-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/testing/grid-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ContentContainerComponentHarness,\n HarnessPredicate,\n parallel,\n} from '@angular/cdk/testing';\nimport {\n GridHarnessFilters,\n GridRowHarnessFilters,\n GridCellHarnessFilters,\n} from './grid-harness-filters';\n\n/** Harness for interacting with a standard ngGridCell in tests. */\nexport class GridCellHarness extends ContentContainerComponentHarness {\n static hostSelector = '[ngGridCell]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a grid cell with specific attributes.\n * @param options Options for filtering which cell instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: GridCellHarnessFilters = {}): HarnessPredicate<GridCellHarness> {\n return new HarnessPredicate(GridCellHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Whether the cell is selected. */\n async isSelected(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-selected')) === 'true';\n }\n\n /** Whether the cell is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Gets the text content of the cell. */\n async getText(): Promise<string> {\n const host = await this.host();\n return host.text();\n }\n\n /** Clicks the cell. */\n async click(): Promise<void> {\n const host = await this.host();\n return host.click();\n }\n\n /** Focuses the cell. */\n async focus(): Promise<void> {\n const host = await this.host();\n return host.focus();\n }\n\n /** Blurs the cell. */\n async blur(): Promise<void> {\n const host = await this.host();\n return host.blur();\n }\n\n /** Whether the cell is active. */\n async isActive(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('data-active')) === 'true';\n }\n\n /** Whether the cell is focused. */\n async isFocused(): Promise<boolean> {\n const host = await this.host();\n return host.isFocused();\n }\n}\n\n/** Harness for interacting with a standard ngGridRow in tests. */\nexport class GridRowHarness extends ComponentHarness {\n static hostSelector = '[ngGridRow]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a grid row with specific attributes.\n * @param options Options for filtering which row instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: GridRowHarnessFilters = {}): HarnessPredicate<GridRowHarness> {\n return new HarnessPredicate(GridRowHarness, options);\n }\n\n /** Gets all cells in the row. */\n async getCells(filters: GridCellHarnessFilters = {}): Promise<GridCellHarness[]> {\n return this.locatorForAll(GridCellHarness.with(filters))();\n }\n\n /** Gets the text of the cells in the row. */\n async getCellTextByIndex(filters: GridCellHarnessFilters = {}): Promise<string[]> {\n const cells = await this.getCells(filters);\n return parallel(() => cells.map(cell => cell.getText()));\n }\n}\n\n/** Harness for interacting with a standard ngGrid in tests. */\nexport class GridHarness extends ComponentHarness {\n static hostSelector = '[ngGrid]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a grid with specific attributes.\n * @param options Options for filtering which grid instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: GridHarnessFilters = {}): HarnessPredicate<GridHarness> {\n return new HarnessPredicate(GridHarness, options).addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Whether the grid is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the grid is multi-selectable. */\n async isMultiSelectable(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-multiselectable')) === 'true';\n }\n\n /** Gets all rows in the grid. */\n async getRows(filters: GridRowHarnessFilters = {}): Promise<GridRowHarness[]> {\n return this.locatorForAll(GridRowHarness.with(filters))();\n }\n\n /** Gets all cells in the grid. */\n async getCells(filters: GridCellHarnessFilters = {}): Promise<GridCellHarness[]> {\n return this.locatorForAll(GridCellHarness.with(filters))();\n }\n\n /** Gets the text inside the entire grid organized by rows. */\n async getCellTextByIndex(): Promise<string[][]> {\n const rows = await this.getRows();\n return parallel(() => rows.map(row => row.getCellTextByIndex()));\n }\n}\n"],"names":["GridCellHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","text","harness","stringMatches","getText","selected","isSelected","disabled","isDisabled","host","getAttribute","click","focus","blur","isActive","isFocused","GridRowHarness","ComponentHarness","getCells","filters","locatorForAll","getCellTextByIndex","cells","parallel","map","cell","GridHarness","isMultiSelectable","getRows","rows","row"],"mappings":";;AAqBM,MAAOA,eAAgB,SAAQC,gCAAgC,CAAA;EACnE,OAAOC,YAAY,GAAG,cAAc;AAOpC,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAAkC,EAAE,EAAA;AAC9C,IAAA,OAAO,IAAIC,gBAAgB,CAACL,eAAe,EAAEI,OAAO,CAAA,CACjDE,SAAS,CAAC,MAAM,EAAEF,OAAO,CAACG,IAAI,EAAE,CAACC,OAAO,EAAED,IAAI,KAC7CF,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAACE,OAAO,EAAE,EAAEH,IAAI,CAAC,CAAA,CAExDD,SAAS,CACR,UAAU,EACVF,OAAO,CAACO,QAAQ,EAChB,OAAOH,OAAO,EAAEG,QAAQ,KAAK,CAAC,MAAMH,OAAO,CAACI,U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AAMC,IAAI,GAAG,MAAM,IAAI,CAACA,IAAI,EAAE;IAC9B,OAAO,CAAC,MAAMA,IAAI,CAACC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM;AAC9D,EAAA;EAGA,MAAMiB,iBAAiBA,GAAA;AACrB,IAAA,MAAMlB,IAAI,GAAG,MAAM,IAAI,CAACA,IAAI,EAAE;IAC9B,OAAO,CAAC,MAAMA,IAAI,CAACC,YAAY,CAAC,sBAAsB,CAAC,MAAM,MAAM;AACrE,EAAA;AAGA,EAAA,MAAMkB,OAAOA,CAACT,OAAA,GAAiC,EAAE,EAAA;AAC/C,IAAA,OAAO,IAAI,CAACC,aAAa,CAACJ,cAAc,CAACnB,IAAI,CAACsB,OAAO,CAAC,CAAC,EAAE;AAC3D,EAAA;AAGA,EAAA,MAAMD,QAAQA,CAACC,OAAA,GAAkC,EAAE,EAAA;AACjD,IAAA,OAAO,IAAI,CAACC,aAAa,CAAC1B,eAAe,CAACG,IAAI,CAACsB,OAAO,CAAC,CAAC,EAAE;AAC5D,EAAA;EAGA,MAAME,kBAAkBA,GAAA;AACtB,IAAA,MAAMQ,IAAI,GAAG,MAAM,IAAI,CAACD,OAAO,EAAE;AACjC,IAAA,OAAOL,QAAQ,CAAC,MAAMM,IAAI,CAACL,GAAG,CAACM,GAAG,IAAIA,GAAG,CAACT,kBAAkB,EAAE,CAAC,CAAC;AAClE,EAAA;;;;;"}
|
package/fesm2022/grid.mjs
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ElementRef,
|
|
2
|
+
import { InjectionToken, inject, ElementRef, computed, input, booleanAttribute, afterRenderEffect, afterNextRender, Directive, output, Renderer2, contentChild, model } from '@angular/core';
|
|
3
3
|
import { Directionality } from '@angular/cdk/bidi';
|
|
4
|
+
import { tabIndexTransform } from './_transforms-chunk.mjs';
|
|
4
5
|
import { GridPattern, GridCellWidgetPattern, GridCellPattern, GridRowPattern } from './_widget-chunk.mjs';
|
|
6
|
+
import { SortedCollection, reportViolations } from './_violations-chunk.mjs';
|
|
5
7
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
6
|
-
import './_signal-like-chunk.mjs';
|
|
7
|
-
import '@angular/core/primitives/signals';
|
|
8
8
|
import './_click-event-manager-chunk.mjs';
|
|
9
|
+
import '@angular/core/primitives/signals';
|
|
9
10
|
|
|
10
11
|
const GRID_CELL = new InjectionToken('GRID_CELL');
|
|
11
12
|
const GRID_ROW = new InjectionToken('GRID_ROW');
|
|
13
|
+
const GRID = new InjectionToken('GRID');
|
|
12
14
|
|
|
13
15
|
class Grid {
|
|
14
16
|
_elementRef = inject(ElementRef);
|
|
15
17
|
element = this._elementRef.nativeElement;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
debugName: "_rows"
|
|
19
|
-
} : {}),
|
|
20
|
-
descendants: true
|
|
21
|
-
});
|
|
22
|
-
_rowPatterns = computed(() => this._rows().map(r => r._pattern), ...(ngDevMode ? [{
|
|
18
|
+
_collection = new SortedCollection();
|
|
19
|
+
_rowPatterns = computed(() => this._collection.orderedItems().map(r => r._pattern), ...(ngDevMode ? [{
|
|
23
20
|
debugName: "_rowPatterns"
|
|
24
21
|
}] : []));
|
|
25
22
|
textDirection = inject(Directionality).valueSignal;
|
|
@@ -63,7 +60,8 @@ class Grid {
|
|
|
63
60
|
...(ngDevMode ? {
|
|
64
61
|
debugName: "tabIndex"
|
|
65
62
|
} : {}),
|
|
66
|
-
|
|
63
|
+
alias: 'tabindex',
|
|
64
|
+
transform: tabIndexTransform
|
|
67
65
|
});
|
|
68
66
|
_pattern = new GridPattern({
|
|
69
67
|
...this,
|
|
@@ -90,6 +88,19 @@ class Grid {
|
|
|
90
88
|
afterRenderEffect({
|
|
91
89
|
write: () => this._pattern.focusEffect()
|
|
92
90
|
});
|
|
91
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
92
|
+
afterRenderEffect({
|
|
93
|
+
read: () => {
|
|
94
|
+
reportViolations(this._pattern.validate(), this.element);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
afterNextRender(() => {
|
|
99
|
+
this._collection.startObserving(this.element);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
ngOnDestroy() {
|
|
103
|
+
this._collection.stopObserving();
|
|
93
104
|
}
|
|
94
105
|
scrollActiveCellIntoView(options = {
|
|
95
106
|
block: 'nearest'
|
|
@@ -112,15 +123,15 @@ class Grid {
|
|
|
112
123
|
}
|
|
113
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
114
125
|
minVersion: "12.0.0",
|
|
115
|
-
version: "22.0.0-next.
|
|
126
|
+
version: "22.0.0-next.12",
|
|
116
127
|
ngImport: i0,
|
|
117
128
|
type: Grid,
|
|
118
129
|
deps: [],
|
|
119
130
|
target: i0.ɵɵFactoryTarget.Directive
|
|
120
131
|
});
|
|
121
132
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
122
|
-
minVersion: "17.
|
|
123
|
-
version: "22.0.0-next.
|
|
133
|
+
minVersion: "17.1.0",
|
|
134
|
+
version: "22.0.0-next.12",
|
|
124
135
|
type: Grid,
|
|
125
136
|
isStandalone: true,
|
|
126
137
|
selector: "[ngGrid]",
|
|
@@ -183,7 +194,7 @@ class Grid {
|
|
|
183
194
|
},
|
|
184
195
|
tabIndex: {
|
|
185
196
|
classPropertyName: "tabIndex",
|
|
186
|
-
publicName: "
|
|
197
|
+
publicName: "tabindex",
|
|
187
198
|
isSignal: true,
|
|
188
199
|
isRequired: false,
|
|
189
200
|
transformFunction: null
|
|
@@ -206,11 +217,9 @@ class Grid {
|
|
|
206
217
|
"attr.aria-activedescendant": "_pattern.activeDescendant()"
|
|
207
218
|
}
|
|
208
219
|
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
descendants: true,
|
|
213
|
-
isSignal: true
|
|
220
|
+
providers: [{
|
|
221
|
+
provide: GRID,
|
|
222
|
+
useExisting: Grid
|
|
214
223
|
}],
|
|
215
224
|
exportAs: ["ngGrid"],
|
|
216
225
|
ngImport: i0
|
|
@@ -218,7 +227,7 @@ class Grid {
|
|
|
218
227
|
}
|
|
219
228
|
i0.ɵɵngDeclareClassMetadata({
|
|
220
229
|
minVersion: "12.0.0",
|
|
221
|
-
version: "22.0.0-next.
|
|
230
|
+
version: "22.0.0-next.12",
|
|
222
231
|
ngImport: i0,
|
|
223
232
|
type: Grid,
|
|
224
233
|
decorators: [{
|
|
@@ -236,20 +245,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
236
245
|
'(click)': '_pattern.onClick($event)',
|
|
237
246
|
'(focusin)': '_pattern.onFocusIn($event)',
|
|
238
247
|
'(focusout)': '_pattern.onFocusOut($event)'
|
|
239
|
-
}
|
|
248
|
+
},
|
|
249
|
+
providers: [{
|
|
250
|
+
provide: GRID,
|
|
251
|
+
useExisting: Grid
|
|
252
|
+
}]
|
|
240
253
|
}]
|
|
241
254
|
}],
|
|
242
255
|
ctorParameters: () => [],
|
|
243
256
|
propDecorators: {
|
|
244
|
-
_rows: [{
|
|
245
|
-
type: i0.ContentChildren,
|
|
246
|
-
args: [i0.forwardRef(() => GRID_ROW), {
|
|
247
|
-
...{
|
|
248
|
-
descendants: true
|
|
249
|
-
},
|
|
250
|
-
isSignal: true
|
|
251
|
-
}]
|
|
252
|
-
}],
|
|
253
257
|
enableSelection: [{
|
|
254
258
|
type: i0.Input,
|
|
255
259
|
args: [{
|
|
@@ -318,7 +322,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
318
322
|
type: i0.Input,
|
|
319
323
|
args: [{
|
|
320
324
|
isSignal: true,
|
|
321
|
-
alias: "
|
|
325
|
+
alias: "tabindex",
|
|
322
326
|
required: false
|
|
323
327
|
}]
|
|
324
328
|
}]
|
|
@@ -352,34 +356,25 @@ class GridCellWidget {
|
|
|
352
356
|
tabindex = input(...(ngDevMode ? [undefined, {
|
|
353
357
|
debugName: "tabindex"
|
|
354
358
|
}] : []));
|
|
355
|
-
_tabIndex = computed(() => this.tabindex() ??
|
|
359
|
+
_tabIndex = computed(() => this.tabindex() ?? this._pattern.tabIndex(), ...(ngDevMode ? [{
|
|
356
360
|
debugName: "_tabIndex"
|
|
357
361
|
}] : []));
|
|
358
362
|
_pattern = new GridCellWidgetPattern({
|
|
359
363
|
...this,
|
|
360
364
|
element: () => this.element,
|
|
361
|
-
cell: () => this._cell._pattern
|
|
365
|
+
cell: () => this._cell._pattern,
|
|
366
|
+
onActivate: e => this.activated.emit(e),
|
|
367
|
+
onDeactivate: e => this.deactivated.emit(e)
|
|
362
368
|
});
|
|
363
369
|
get isActivated() {
|
|
364
370
|
return computed(() => this._pattern.isActivated());
|
|
365
371
|
}
|
|
366
372
|
constructor() {
|
|
367
373
|
afterRenderEffect({
|
|
368
|
-
|
|
369
|
-
if (this._pattern.isActivated()) {
|
|
370
|
-
const activateEvent = this._pattern.lastActivateEvent();
|
|
371
|
-
this.activated.emit(activateEvent);
|
|
372
|
-
this._pattern.focus();
|
|
373
|
-
}
|
|
374
|
-
}
|
|
374
|
+
write: () => this._pattern.activationEffect()
|
|
375
375
|
});
|
|
376
376
|
afterRenderEffect({
|
|
377
|
-
|
|
378
|
-
const deactivateEvent = this._pattern.lastDeactivateEvent();
|
|
379
|
-
if (deactivateEvent) {
|
|
380
|
-
this.deactivated.emit(deactivateEvent);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
377
|
+
write: () => this._pattern.deactivationEffect()
|
|
383
378
|
});
|
|
384
379
|
}
|
|
385
380
|
activate() {
|
|
@@ -390,7 +385,7 @@ class GridCellWidget {
|
|
|
390
385
|
}
|
|
391
386
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
392
387
|
minVersion: "12.0.0",
|
|
393
|
-
version: "22.0.0-next.
|
|
388
|
+
version: "22.0.0-next.12",
|
|
394
389
|
ngImport: i0,
|
|
395
390
|
type: GridCellWidget,
|
|
396
391
|
deps: [],
|
|
@@ -398,7 +393,7 @@ class GridCellWidget {
|
|
|
398
393
|
});
|
|
399
394
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
400
395
|
minVersion: "17.1.0",
|
|
401
|
-
version: "22.0.0-next.
|
|
396
|
+
version: "22.0.0-next.12",
|
|
402
397
|
type: GridCellWidget,
|
|
403
398
|
isStandalone: true,
|
|
404
399
|
selector: "[ngGridCellWidget]",
|
|
@@ -457,7 +452,7 @@ class GridCellWidget {
|
|
|
457
452
|
}
|
|
458
453
|
i0.ɵɵngDeclareClassMetadata({
|
|
459
454
|
minVersion: "12.0.0",
|
|
460
|
-
version: "22.0.0-next.
|
|
455
|
+
version: "22.0.0-next.12",
|
|
461
456
|
ngImport: i0,
|
|
462
457
|
type: GridCellWidget,
|
|
463
458
|
decorators: [{
|
|
@@ -530,7 +525,6 @@ class GridCell {
|
|
|
530
525
|
_elementRef = inject(ElementRef);
|
|
531
526
|
_renderer = inject(Renderer2);
|
|
532
527
|
element = this._elementRef.nativeElement;
|
|
533
|
-
activated = new EventEmitter();
|
|
534
528
|
active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
|
|
535
529
|
debugName: "active"
|
|
536
530
|
}] : []));
|
|
@@ -587,8 +581,7 @@ class GridCell {
|
|
|
587
581
|
row: () => this._row._pattern,
|
|
588
582
|
widget: this._widgetPattern,
|
|
589
583
|
getWidget: e => this._getWidget(e),
|
|
590
|
-
element: () => this.element
|
|
591
|
-
onActivate: e => this.activated.emit(e)
|
|
584
|
+
element: () => this.element
|
|
592
585
|
});
|
|
593
586
|
constructor() {
|
|
594
587
|
afterRenderEffect({
|
|
@@ -615,6 +608,12 @@ class GridCell {
|
|
|
615
608
|
}
|
|
616
609
|
});
|
|
617
610
|
}
|
|
611
|
+
ngOnInit() {
|
|
612
|
+
this._row._collection.register(this);
|
|
613
|
+
}
|
|
614
|
+
ngOnDestroy() {
|
|
615
|
+
this._row._collection.unregister(this);
|
|
616
|
+
}
|
|
618
617
|
_toggleAttribute = (name, value) => {
|
|
619
618
|
if (value == null) {
|
|
620
619
|
this._renderer.removeAttribute(this.element, name);
|
|
@@ -636,7 +635,7 @@ class GridCell {
|
|
|
636
635
|
}
|
|
637
636
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
638
637
|
minVersion: "12.0.0",
|
|
639
|
-
version: "22.0.0-next.
|
|
638
|
+
version: "22.0.0-next.12",
|
|
640
639
|
ngImport: i0,
|
|
641
640
|
type: GridCell,
|
|
642
641
|
deps: [],
|
|
@@ -644,7 +643,7 @@ class GridCell {
|
|
|
644
643
|
});
|
|
645
644
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
646
645
|
minVersion: "17.2.0",
|
|
647
|
-
version: "22.0.0-next.
|
|
646
|
+
version: "22.0.0-next.12",
|
|
648
647
|
type: GridCell,
|
|
649
648
|
isStandalone: true,
|
|
650
649
|
selector: "[ngGridCell]",
|
|
@@ -721,7 +720,6 @@ class GridCell {
|
|
|
721
720
|
}
|
|
722
721
|
},
|
|
723
722
|
outputs: {
|
|
724
|
-
activated: "activated",
|
|
725
723
|
selected: "selectedChange"
|
|
726
724
|
},
|
|
727
725
|
providers: [{
|
|
@@ -741,7 +739,7 @@ class GridCell {
|
|
|
741
739
|
}
|
|
742
740
|
i0.ɵɵngDeclareClassMetadata({
|
|
743
741
|
minVersion: "12.0.0",
|
|
744
|
-
version: "22.0.0-next.
|
|
742
|
+
version: "22.0.0-next.12",
|
|
745
743
|
ngImport: i0,
|
|
746
744
|
type: GridCell,
|
|
747
745
|
decorators: [{
|
|
@@ -757,9 +755,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
757
755
|
}],
|
|
758
756
|
ctorParameters: () => [],
|
|
759
757
|
propDecorators: {
|
|
760
|
-
activated: [{
|
|
761
|
-
type: Output
|
|
762
|
-
}],
|
|
763
758
|
_widget: [{
|
|
764
759
|
type: i0.ContentChild,
|
|
765
760
|
args: [i0.forwardRef(() => GridCellWidget), {
|
|
@@ -858,16 +853,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
858
853
|
class GridRow {
|
|
859
854
|
_elementRef = inject(ElementRef);
|
|
860
855
|
element = this._elementRef.nativeElement;
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
debugName: "_cells"
|
|
864
|
-
} : {}),
|
|
865
|
-
descendants: true
|
|
866
|
-
});
|
|
867
|
-
_cellPatterns = computed(() => this._cells().map(c => c._pattern), ...(ngDevMode ? [{
|
|
856
|
+
_collection = new SortedCollection();
|
|
857
|
+
_cellPatterns = computed(() => this._collection.orderedItems().map(c => c._pattern), ...(ngDevMode ? [{
|
|
868
858
|
debugName: "_cellPatterns"
|
|
869
859
|
}] : []));
|
|
870
|
-
_grid = inject(
|
|
860
|
+
_grid = inject(GRID);
|
|
871
861
|
_gridPattern = computed(() => this._grid._pattern, ...(ngDevMode ? [{
|
|
872
862
|
debugName: "_gridPattern"
|
|
873
863
|
}] : []));
|
|
@@ -879,17 +869,29 @@ class GridRow {
|
|
|
879
869
|
cells: this._cellPatterns,
|
|
880
870
|
grid: this._gridPattern
|
|
881
871
|
});
|
|
872
|
+
constructor() {
|
|
873
|
+
afterNextRender(() => {
|
|
874
|
+
this._collection.startObserving(this.element);
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
ngOnInit() {
|
|
878
|
+
this._grid._collection.register(this);
|
|
879
|
+
}
|
|
880
|
+
ngOnDestroy() {
|
|
881
|
+
this._grid._collection.unregister(this);
|
|
882
|
+
this._collection.stopObserving();
|
|
883
|
+
}
|
|
882
884
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
883
885
|
minVersion: "12.0.0",
|
|
884
|
-
version: "22.0.0-next.
|
|
886
|
+
version: "22.0.0-next.12",
|
|
885
887
|
ngImport: i0,
|
|
886
888
|
type: GridRow,
|
|
887
889
|
deps: [],
|
|
888
890
|
target: i0.ɵɵFactoryTarget.Directive
|
|
889
891
|
});
|
|
890
892
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
891
|
-
minVersion: "17.
|
|
892
|
-
version: "22.0.0-next.
|
|
893
|
+
minVersion: "17.1.0",
|
|
894
|
+
version: "22.0.0-next.12",
|
|
893
895
|
type: GridRow,
|
|
894
896
|
isStandalone: true,
|
|
895
897
|
selector: "[ngGridRow]",
|
|
@@ -914,19 +916,13 @@ class GridRow {
|
|
|
914
916
|
provide: GRID_ROW,
|
|
915
917
|
useExisting: GridRow
|
|
916
918
|
}],
|
|
917
|
-
queries: [{
|
|
918
|
-
propertyName: "_cells",
|
|
919
|
-
predicate: GRID_CELL,
|
|
920
|
-
descendants: true,
|
|
921
|
-
isSignal: true
|
|
922
|
-
}],
|
|
923
919
|
exportAs: ["ngGridRow"],
|
|
924
920
|
ngImport: i0
|
|
925
921
|
});
|
|
926
922
|
}
|
|
927
923
|
i0.ɵɵngDeclareClassMetadata({
|
|
928
924
|
minVersion: "12.0.0",
|
|
929
|
-
version: "22.0.0-next.
|
|
925
|
+
version: "22.0.0-next.12",
|
|
930
926
|
ngImport: i0,
|
|
931
927
|
type: GridRow,
|
|
932
928
|
decorators: [{
|
|
@@ -944,16 +940,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
944
940
|
}]
|
|
945
941
|
}]
|
|
946
942
|
}],
|
|
943
|
+
ctorParameters: () => [],
|
|
947
944
|
propDecorators: {
|
|
948
|
-
_cells: [{
|
|
949
|
-
type: i0.ContentChildren,
|
|
950
|
-
args: [i0.forwardRef(() => GRID_CELL), {
|
|
951
|
-
...{
|
|
952
|
-
descendants: true
|
|
953
|
-
},
|
|
954
|
-
isSignal: true
|
|
955
|
-
}]
|
|
956
|
-
}],
|
|
957
945
|
rowIndex: [{
|
|
958
946
|
type: i0.Input,
|
|
959
947
|
args: [{
|