@angular/aria 22.0.0-rc.0 → 22.0.0-rc.2
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.map +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_deferred-content-chunk.mjs.map +1 -1
- package/fesm2022/_expansion-chunk.mjs.map +1 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_menu-chunk.mjs +17 -3
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_transforms-chunk.mjs.map +1 -1
- package/fesm2022/_tree-chunk.mjs.map +1 -1
- package/fesm2022/_violations-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion-testing.mjs.map +1 -1
- package/fesm2022/accordion.mjs +15 -12
- 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.map +1 -1
- package/fesm2022/combobox.mjs +9 -9
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs.map +1 -1
- package/fesm2022/grid.mjs +12 -12
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs.map +1 -1
- package/fesm2022/listbox.mjs +6 -6
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +62 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +18 -15
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +9 -9
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +9 -9
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_menu-chunk.d.ts +7 -1
- package/types/combobox.d.ts +26 -10
- package/types/menu.d.ts +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/testing/item-harness.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/testing/tree-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 {ContentContainerComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {TreeItemHarnessFilters} from './tree-harness-filters';\n\n/** Harness for interacting with an Aria tree item. */\nexport class TreeItemHarness extends ContentContainerComponentHarness<string> {\n static hostSelector = '[ngTreeItem]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a tree item with specific attributes.\n * @param options Options for narrowing the search\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TreeItemHarnessFilters = {}): HarnessPredicate<TreeItemHarness> {\n return new HarnessPredicate(TreeItemHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n )\n .addOption(\n 'expanded',\n options.expanded,\n async (harness, expanded) => (await harness.isExpanded()) === expanded,\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'level',\n options.level,\n async (harness, level) => (await harness.getLevel()) === level,\n );\n }\n\n /** Whether the tree item is expanded. */\n async isExpanded(): Promise<boolean> {\n return (await this._getHostAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the tree item is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this._getHostAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the tree item is selected. */\n async isSelected(): Promise<boolean> {\n return (await this._getHostAttribute('aria-selected')) === 'true';\n }\n\n /** Gets the level of the tree item. Note that this gets the aria-level and is 1 indexed. */\n async getLevel(): Promise<number> {\n const level = (await this._getHostAttribute('aria-level')) ?? '1';\n return parseInt(level);\n }\n\n /** Gets the tree item's text. */\n async getText(): Promise<string> {\n return (await this.host()).text({exclude: '[ngTreeItem], [ngTreeItemGroup]'});\n }\n\n /** Clicks the tree item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Focuses the tree item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the tree item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the tree item is active. */\n async isActive(): Promise<boolean> {\n return (await this._getHostAttribute('data-active')) === 'true';\n }\n\n /** Whether the tree item has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n private async _getHostAttribute(attributeName: string): Promise<string | null> {\n return (await this.host()).getAttribute(attributeName);\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 {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {TreeItemHarness} from './item-harness';\nimport {TreeHarnessFilters, TreeItemHarnessFilters} from './tree-harness-filters';\n\nexport interface TextTree {\n text?: string;\n children?: TextTree[];\n}\n\n/** Harness for interacting with an Aria tree in tests. */\nexport class TreeHarness extends ComponentHarness {\n static hostSelector = '[ngTree]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a tree with specific attributes.\n * @param options Options for narrowing the search\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TreeHarnessFilters = {}): HarnessPredicate<TreeHarness> {\n return new HarnessPredicate(TreeHarness, options);\n }\n\n /** Gets all of the items in the tree. */\n async getItems(filter: TreeItemHarnessFilters = {}): Promise<TreeItemHarness[]> {\n return this.locatorForAll(TreeItemHarness.with(filter))();\n }\n\n /**\n * Gets an object representation for the visible tree structure\n * If an item is under an unexpanded item it will not be included.\n */\n async getTreeStructure(): Promise<TextTree> {\n const items = await this.getItems();\n const itemInformation = await parallel(() =>\n items.map(item => parallel(() => [item.getLevel(), item.getText(), item.isExpanded()])),\n );\n return this._getTreeStructure(itemInformation, 1, true);\n }\n\n /**\n * Recursively collect the structured text of the tree items.\n * @param items A list of tree items\n * @param level The level of items that are being accounted for during this iteration\n * @param parentExpanded Whether the parent of the first item in param items is expanded\n */\n private _getTreeStructure(\n items: [number, string, boolean][],\n level: number,\n parentExpanded: boolean,\n ): TextTree {\n const result: TextTree = {};\n for (let i = 0; i < items.length; i++) {\n const [itemLevel, text, expanded] = items[i];\n const nextItemLevel = items[i + 1]?.[0] ?? -1;\n\n // Return the accumulated value for the current level once we reach a shallower level item\n if (itemLevel < level) {\n return result;\n }\n // Skip deeper level items during this iteration, they will be picked up in a later iteration\n if (itemLevel > level) {\n continue;\n }\n // Only add to representation if it is visible (parent is expanded)\n if (parentExpanded) {\n // Collect the data under this item according to the following rules:\n // 1. If the next item in the list is a sibling of the current item add it to the child list\n // 2. If the next item is a child of the current item, get the sub-tree structure for the\n // child and add it under this item\n // 3. If the next item has a shallower level, we've reached the end of the child items for\n // the current parent.\n if (nextItemLevel === level) {\n this._addChildToItem(result, {text});\n } else if (nextItemLevel > level) {\n let children = this._getTreeStructure(\n items.slice(i + 1),\n nextItemLevel,\n expanded,\n )?.children;\n let child = children ? {text, children} : {text};\n this._addChildToItem(result, child);\n } else {\n this._addChildToItem(result, {text});\n return result;\n }\n }\n }\n return result;\n }\n\n private _addChildToItem(result: TextTree, child: TextTree) {\n result.children ? result.children.push(child) : (result.children = [child]);\n }\n}\n"],"names":["TreeItemHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","text","harness","stringMatches","getText","disabled","isDisabled","expanded","isExpanded","selected","isSelected","level","getLevel","_getHostAttribute","parseInt","host","exclude","click","focus","blur","isActive","isFocused","attributeName","getAttribute","TreeHarness","ComponentHarness","getItems","filter","locatorForAll","getTreeStructure","items","itemInformation","parallel","map","item","_getTreeStructure","parentExpanded","result","i","length","itemLevel","nextItemLevel","_addChildToItem","children","slice","child","push"],"mappings":";;AAYM,MAAOA,eAAgB,SAAQC,gCAAwC,CAAA;EAC3E,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,UAAU,EAAE,MAAMD,QAAQ,CAAA,CAEvEL,SAAS,CACR,UAAU,EACVF,OAAO,CAACS,QAAQ,EAChB,OAAOL,OAAO,EAAEK,QAAQ,KAAK,CAAC,MAAML,OAAO,CAACM,UAAU,EAAE,MAAMD,QAAQ,CAAA,CAEvEP,SAAS,CACR,UAAU,EACVF,OAAO,CAACW,QAAQ,EAChB,OAAOP,OAAO,EAAEO,QAAQ,KAAK,CAAC,MAAMP,OAAO,CAACQ,UAAU,EAAE,MAAMD,QAA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ACD,KAAK,CAAC,GAAIR,MAAM,CAACM,QAAQ,GAAG,CAACE,KAAK,CAAE;AAC7E,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"tree-testing.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/testing/item-harness.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/testing/tree-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 {ContentContainerComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {TreeItemHarnessFilters} from './tree-harness-filters';\n\n/** Harness for interacting with an Aria tree item. */\nexport class TreeItemHarness extends ContentContainerComponentHarness<string> {\n static hostSelector = '[ngTreeItem]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a tree item with specific attributes.\n * @param options Options for narrowing the search\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TreeItemHarnessFilters = {}): HarnessPredicate<TreeItemHarness> {\n return new HarnessPredicate(TreeItemHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n )\n .addOption(\n 'expanded',\n options.expanded,\n async (harness, expanded) => (await harness.isExpanded()) === expanded,\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'level',\n options.level,\n async (harness, level) => (await harness.getLevel()) === level,\n );\n }\n\n /** Whether the tree item is expanded. */\n async isExpanded(): Promise<boolean> {\n return (await this._getHostAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the tree item is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this._getHostAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the tree item is selected. */\n async isSelected(): Promise<boolean> {\n return (await this._getHostAttribute('aria-selected')) === 'true';\n }\n\n /** Gets the level of the tree item. Note that this gets the aria-level and is 1 indexed. */\n async getLevel(): Promise<number> {\n const level = (await this._getHostAttribute('aria-level')) ?? '1';\n return parseInt(level);\n }\n\n /** Gets the tree item's text. */\n async getText(): Promise<string> {\n return (await this.host()).text({exclude: '[ngTreeItem], [ngTreeItemGroup]'});\n }\n\n /** Clicks the tree item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Focuses the tree item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the tree item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the tree item is active. */\n async isActive(): Promise<boolean> {\n return (await this._getHostAttribute('data-active')) === 'true';\n }\n\n /** Whether the tree item has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n private async _getHostAttribute(attributeName: string): Promise<string | null> {\n return (await this.host()).getAttribute(attributeName);\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 {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {TreeItemHarness} from './item-harness';\nimport {TreeHarnessFilters, TreeItemHarnessFilters} from './tree-harness-filters';\n\nexport interface TextTree {\n text?: string;\n children?: TextTree[];\n}\n\n/** Harness for interacting with an Aria tree in tests. */\nexport class TreeHarness extends ComponentHarness {\n static hostSelector = '[ngTree]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a tree with specific attributes.\n * @param options Options for narrowing the search\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TreeHarnessFilters = {}): HarnessPredicate<TreeHarness> {\n return new HarnessPredicate(TreeHarness, options);\n }\n\n /** Gets all of the items in the tree. */\n async getItems(filter: TreeItemHarnessFilters = {}): Promise<TreeItemHarness[]> {\n return this.locatorForAll(TreeItemHarness.with(filter))();\n }\n\n /**\n * Gets an object representation for the visible tree structure\n * If an item is under an unexpanded item it will not be included.\n */\n async getTreeStructure(): Promise<TextTree> {\n const items = await this.getItems();\n const itemInformation = await parallel(() =>\n items.map(item => parallel(() => [item.getLevel(), item.getText(), item.isExpanded()])),\n );\n return this._getTreeStructure(itemInformation, 1, true);\n }\n\n /**\n * Recursively collect the structured text of the tree items.\n * @param items A list of tree items\n * @param level The level of items that are being accounted for during this iteration\n * @param parentExpanded Whether the parent of the first item in param items is expanded\n */\n private _getTreeStructure(\n items: [number, string, boolean][],\n level: number,\n parentExpanded: boolean,\n ): TextTree {\n const result: TextTree = {};\n for (let i = 0; i < items.length; i++) {\n const [itemLevel, text, expanded] = items[i];\n const nextItemLevel = items[i + 1]?.[0] ?? -1;\n\n // Return the accumulated value for the current level once we reach a shallower level item\n if (itemLevel < level) {\n return result;\n }\n // Skip deeper level items during this iteration, they will be picked up in a later iteration\n if (itemLevel > level) {\n continue;\n }\n // Only add to representation if it is visible (parent is expanded)\n if (parentExpanded) {\n // Collect the data under this item according to the following rules:\n // 1. If the next item in the list is a sibling of the current item add it to the child list\n // 2. If the next item is a child of the current item, get the sub-tree structure for the\n // child and add it under this item\n // 3. If the next item has a shallower level, we've reached the end of the child items for\n // the current parent.\n if (nextItemLevel === level) {\n this._addChildToItem(result, {text});\n } else if (nextItemLevel > level) {\n let children = this._getTreeStructure(\n items.slice(i + 1),\n nextItemLevel,\n expanded,\n )?.children;\n let child = children ? {text, children} : {text};\n this._addChildToItem(result, child);\n } else {\n this._addChildToItem(result, {text});\n return result;\n }\n }\n }\n return result;\n }\n\n private _addChildToItem(result: TextTree, child: TextTree) {\n result.children ? result.children.push(child) : (result.children = [child]);\n }\n}\n"],"names":["TreeItemHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","text","harness","stringMatches","getText","disabled","isDisabled","expanded","isExpanded","selected","isSelected","level","getLevel","_getHostAttribute","parseInt","host","exclude","click","focus","blur","isActive","isFocused","attributeName","getAttribute","TreeHarness","ComponentHarness","getItems","filter","locatorForAll","getTreeStructure","items","itemInformation","parallel","map","item","_getTreeStructure","parentExpanded","result","i","length","itemLevel","nextItemLevel","_addChildToItem","children","slice","child","push"],"mappings":";;AAYM,MAAOA,eAAgB,SAAQC,gCAAwC,CAAA;EAC3E,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,UAAU,EAAE,MAAMD,QAAQ,CAAA,CAEvEL,SAAS,CACR,UAAU,EACVF,OAAO,CAACS,QAAQ,EAChB,OAAOL,OAAO,EAAEK,QAAQ,KAAK,CAAC,MAAML,OAAO,CAACM,UAAU,EAAE,MAAMD,QAAQ,CAAA,CAEvEP,SAAS,CACR,UAAU,EACVF,OAAO,CAACW,QAAQ,EAChB,OAAOP,OAAO,EAAEO,QAAQ,KAAK,CAAC,MAAMP,OAAO,CAACQ,UAAU,EAAE,MAAMD,QAAQ,CAAA,CAEvET,SAAS,CACR,OAAO,EACPF,OAAO,CAACa,KAAK,EACb,OAAOT,OAAO,EAAES,KAAK,KAAK,CAAC,MAAMT,OAAO,CAACU,QAAQ,EAAE,MAAMD,KAAK,CAC/D;AACL,EAAA;EAGA,MAAMH,UAAUA,GAAA;IACd,OAAO,CAAC,MAAM,IAAI,CAACK,iBAAiB,CAAC,eAAe,CAAC,MAAM,MAAM;AACnE,EAAA;EAGA,MAAMP,UAA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MAAM;AACf,MAAA;MAEA,IAAIG,SAAS,GAAG7B,KAAK,EAAE;AACrB,QAAA;AACF,MAAA;AAEA,MAAA,IAAIyB,cAAc,EAAE;QAOlB,IAAIK,aAAa,KAAK9B,KAAK,EAAE;AAC3B,UAAA,IAAI,CAAC+B,eAAe,CAACL,MAAM,EAAE;AAACpC,YAAAA;AAAI,WAAC,CAAC;AACtC,QAAA,CAAA,MAAO,IAAIwC,aAAa,GAAG9B,KAAK,EAAE;UAChC,IAAIgC,QAAQ,GAAG,IAAI,CAACR,iBAAiB,CACnCL,KAAK,CAACc,KAAK,CAACN,CAAC,GAAG,CAAC,CAAC,EAClBG,aAAa,EACblC,QAAQ,CACT,EAAEoC,QAAQ;UACX,IAAIE,KAAK,GAAGF,QAAQ,GAAG;YAAC1C,IAAI;AAAE0C,YAAAA;WAAS,GAAG;AAAC1C,YAAAA;WAAK;AAChD,UAAA,IAAI,CAACyC,eAAe,CAACL,MAAM,EAAEQ,KAAK,CAAC;AACrC,QAAA,CAAA,MAAO;AACL,UAAA,IAAI,CAACH,eAAe,CAACL,MAAM,EAAE;AAACpC,YAAAA;AAAI,WAAC,CAAC;AACpC,UAAA,OAAOoC,MAAM;AACf,QAAA;AACF,MAAA;AACF,IAAA;AACA,IAAA,OAAOA,MAAM;AACf,EAAA;AAEQK,EAAAA,eAAeA,CAACL,MAAgB,EAAEQ,KAAe,EAAA;AACvDR,IAAAA,MAAM,CAACM,QAAQ,GAAGN,MAAM,CAACM,QAAQ,CAACG,IAAI,CAACD,KAAK,CAAC,GAAIR,MAAM,CAACM,QAAQ,GAAG,CAACE,KAAK,CAAE;AAC7E,EAAA;;;;;"}
|
package/fesm2022/tree.mjs
CHANGED
|
@@ -123,7 +123,7 @@ class Tree {
|
|
|
123
123
|
}
|
|
124
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
125
|
minVersion: "12.0.0",
|
|
126
|
-
version: "22.0.0-
|
|
126
|
+
version: "22.0.0-rc.0",
|
|
127
127
|
ngImport: i0,
|
|
128
128
|
type: Tree,
|
|
129
129
|
deps: [],
|
|
@@ -131,7 +131,7 @@ class Tree {
|
|
|
131
131
|
});
|
|
132
132
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
133
133
|
minVersion: "17.1.0",
|
|
134
|
-
version: "22.0.0-
|
|
134
|
+
version: "22.0.0-rc.0",
|
|
135
135
|
type: Tree,
|
|
136
136
|
isStandalone: true,
|
|
137
137
|
selector: "[ngTree]",
|
|
@@ -255,7 +255,7 @@ class Tree {
|
|
|
255
255
|
}
|
|
256
256
|
i0.ɵɵngDeclareClassMetadata({
|
|
257
257
|
minVersion: "12.0.0",
|
|
258
|
-
version: "22.0.0-
|
|
258
|
+
version: "22.0.0-rc.0",
|
|
259
259
|
ngImport: i0,
|
|
260
260
|
type: Tree,
|
|
261
261
|
decorators: [{
|
|
@@ -419,7 +419,7 @@ class TreeItemGroup {
|
|
|
419
419
|
}
|
|
420
420
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
421
421
|
minVersion: "12.0.0",
|
|
422
|
-
version: "22.0.0-
|
|
422
|
+
version: "22.0.0-rc.0",
|
|
423
423
|
ngImport: i0,
|
|
424
424
|
type: TreeItemGroup,
|
|
425
425
|
deps: [],
|
|
@@ -427,7 +427,7 @@ class TreeItemGroup {
|
|
|
427
427
|
});
|
|
428
428
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
429
429
|
minVersion: "17.1.0",
|
|
430
|
-
version: "22.0.0-
|
|
430
|
+
version: "22.0.0-rc.0",
|
|
431
431
|
type: TreeItemGroup,
|
|
432
432
|
isStandalone: true,
|
|
433
433
|
selector: "ng-template[ngTreeItemGroup]",
|
|
@@ -449,7 +449,7 @@ class TreeItemGroup {
|
|
|
449
449
|
}
|
|
450
450
|
i0.ɵɵngDeclareClassMetadata({
|
|
451
451
|
minVersion: "12.0.0",
|
|
452
|
-
version: "22.0.0-
|
|
452
|
+
version: "22.0.0-rc.0",
|
|
453
453
|
ngImport: i0,
|
|
454
454
|
type: TreeItemGroup,
|
|
455
455
|
decorators: [{
|
|
@@ -577,7 +577,7 @@ class TreeItem extends DeferredContentAware {
|
|
|
577
577
|
}
|
|
578
578
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
579
579
|
minVersion: "12.0.0",
|
|
580
|
-
version: "22.0.0-
|
|
580
|
+
version: "22.0.0-rc.0",
|
|
581
581
|
ngImport: i0,
|
|
582
582
|
type: TreeItem,
|
|
583
583
|
deps: [],
|
|
@@ -585,7 +585,7 @@ class TreeItem extends DeferredContentAware {
|
|
|
585
585
|
});
|
|
586
586
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
587
587
|
minVersion: "17.1.0",
|
|
588
|
-
version: "22.0.0-
|
|
588
|
+
version: "22.0.0-rc.0",
|
|
589
589
|
type: TreeItem,
|
|
590
590
|
isStandalone: true,
|
|
591
591
|
selector: "[ngTreeItem]",
|
|
@@ -667,7 +667,7 @@ class TreeItem extends DeferredContentAware {
|
|
|
667
667
|
}
|
|
668
668
|
i0.ɵɵngDeclareClassMetadata({
|
|
669
669
|
minVersion: "12.0.0",
|
|
670
|
-
version: "22.0.0-
|
|
670
|
+
version: "22.0.0-rc.0",
|
|
671
671
|
ngImport: i0,
|
|
672
672
|
type: TreeItem,
|
|
673
673
|
decorators: [{
|
package/fesm2022/tree.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/tree.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/tree-item-group.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/tree-item.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 afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n signal,\n Signal,\n untracked,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n SortedCollection,\n tabIndexTransform,\n TreeItemPattern,\n TreePattern,\n reportViolations,\n} from '../private';\nimport type {TreeItem} from './tree-item';\n\n/**\n * A container that transforms nested lists into an accessible, ARIA-compliant tree structure.\n * It manages the overall state of the tree, including selection, expansion, and keyboard\n * navigation.\n *\n * ```html\n * <ul ngTree [(value)]=\"selectedItems\" [multi]=\"true\">\n * <ng-template\n * [ngTemplateOutlet]=\"treeNodes\"\n * [ngTemplateOutletContext]=\"{nodes: treeData, parent: tree}\"\n * />\n * </ul>\n *\n * <ng-template #treeNodes let-nodes=\"nodes\" let-parent=\"parent\">\n * @for (node of nodes; track node.name) {\n * <li ngTreeItem [parent]=\"parent\" [value]=\"node.name\" [label]=\"node.name\">\n * {{ node.name }}\n * @if (node.children) {\n * <ul role=\"group\">\n * <ng-template ngTreeItemGroup [ownedBy]=\"treeItem\" #group=\"ngTreeItemGroup\">\n * <ng-template\n * [ngTemplateOutlet]=\"treeNodes\"\n * [ngTemplateOutletContext]=\"{nodes: node.children, parent: group}\"\n * />\n * </ng-template>\n * </ul>\n * }\n * </li>\n * }\n * </ng-template>\n * ```\n *\n * @see [Tree](guide/aria/tree)\n */\n@Directive({\n selector: '[ngTree]',\n exportAs: 'ngTree',\n host: {\n 'role': 'tree',\n '[attr.id]': 'id()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '[attr.aria-multiselectable]': '_pattern.multi()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '[tabindex]': 'tabIndex() !== undefined ? tabIndex() : _pattern.tabIndex()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class Tree<V> implements OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The collection of tree items. */\n readonly _collection = new SortedCollection<TreeItem<V>>();\n\n /** A unique identifier for the tree. */\n readonly id = input(inject(_IdGenerator).getId('ng-tree-', true));\n\n /** Orientation of the tree. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multi-selection is allowed. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** Whether the tree is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /**\n * The selection strategy used by the tree.\n * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).\n * - `follow`: The focused item is automatically selected.\n */\n readonly selectionMode = input<'explicit' | 'follow'>('explicit');\n\n /**\n * The focus strategy used by the tree.\n * - `roving`: Focus is moved to the active item using `tabindex`.\n * - `activedescendant`: Focus remains on the tree container, and `aria-activedescendant` is used to indicate the active item.\n */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** Whether navigation wraps. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The delay in seconds before the typeahead search is reset. */\n readonly typeaheadDelay = input(500);\n\n /** The tabindex of the tree. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\n\n /** The values of the currently selected items. */\n readonly value = model<V[]>([]);\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Whether the tree is in navigation mode. */\n readonly nav = input(false, {transform: booleanAttribute});\n\n /**\n * The `aria-current` type. It can be used in navigation trees to indicate the currently active item.\n * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-current for more details.\n */\n readonly currentType = input<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>(\n 'page',\n );\n\n /** The UI pattern for the tree. */\n readonly _pattern: TreePattern<V>;\n\n /** The ID of the active descendant in the tree. */\n readonly activeDescendant: Signal<string | undefined>;\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n items: computed(() => this._collection.orderedItems().map(item => item._pattern)),\n activeItem: signal<TreeItemPattern<V> | undefined>(undefined),\n element: () => this.element,\n };\n\n this._pattern = new TreePattern<V>(inputs);\n\n this.activeDescendant = computed(() => this._pattern.activeDescendant());\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n // Resets default focus based on selection state until interacted.\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n afterRenderEffect({\n write: () => {\n const items = inputs.items();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (activeItem && !items.some(i => i === activeItem)) {\n this._pattern.treeBehavior.unfocus();\n this._pattern.setDefaultState();\n }\n },\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n scrollActiveItemIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {\n this._pattern.inputs.activeItem()?.element()?.scrollIntoView(options);\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 Directive,\n ElementRef,\n computed,\n inject,\n input,\n signal,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {TreeItemPattern, DeferredContent, sortDirectives} from '../private';\nimport type {TreeItem} from './tree-item';\n\n/**\n * Group that contains children tree items.\n *\n * The `ngTreeItemGroup` structural directive should be applied to an `ng-template` that\n * wraps the child `ngTreeItem` elements. It is used to define a group of children for an\n * expandable `ngTreeItem`. The `ownedBy` input links the group to its parent `ngTreeItem`.\n *\n * ```html\n * <li ngTreeItem [value]=\"'parent-id'\">\n * Parent Item\n * <ul role=\"group\">\n * <ng-template ngTreeItemGroup [ownedBy]=\"parentTreeItemRef\">\n * <li ngTreeItem [value]=\"'child-id'\">Child Item</li>\n * </ng-template>\n * </ul>\n * </li>\n * ```\n *\n * @see [Tree](guide/aria/tree)\n */\n@Directive({\n selector: 'ng-template[ngTreeItemGroup]',\n exportAs: 'ngTreeItemGroup',\n hostDirectives: [DeferredContent],\n})\nexport class TreeItemGroup<V> implements OnInit, OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The DeferredContent host directive. */\n private readonly _deferredContent = inject(DeferredContent);\n\n /** All groupable items that are descendants of the group. */\n private readonly _unorderedItems = signal(new Set<TreeItem<V>>());\n\n /** Child items within this group. */\n readonly _childPatterns = computed<TreeItemPattern<V>[]>(() =>\n [...this._unorderedItems()].sort(sortDirectives).map(c => c._pattern),\n );\n\n /** Tree item that owns the group. */\n readonly ownedBy = input.required<TreeItem<V>>();\n\n ngOnInit() {\n this._deferredContent.deferredContentAware.set(this.ownedBy());\n this.ownedBy()._register(this);\n }\n\n ngOnDestroy() {\n this.ownedBy()._unregister();\n }\n\n _register(child: TreeItem<V>) {\n this._unorderedItems().add(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\n }\n\n _unregister(child: TreeItem<V>) {\n this._unorderedItems().delete(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\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 Directive,\n ElementRef,\n afterRenderEffect,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n Signal,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {TreeItemPattern, DeferredContentAware, HasElement} from '../private';\nimport {Tree} from './tree';\nimport {TreeItemGroup} from './tree-item-group';\n\n/**\n * A selectable and expandable item in an `ngTree`.\n *\n * The `ngTreeItem` directive represents an individual node within an `ngTree`. It can be\n * selected, expanded (if it has children), and disabled. The `parent` input establishes\n * the hierarchical relationship within the tree.\n *\n * ```html\n * <li ngTreeItem [parent]=\"parentTreeOrGroup\" value=\"item-id\" label=\"Item Label\">\n * Item Label\n * </li>\n * ```\n */\n@Directive({\n selector: '[ngTreeItem]',\n exportAs: 'ngTreeItem',\n host: {\n '[attr.data-active]': 'active()',\n 'role': 'treeitem',\n '[id]': '_pattern.id()',\n '[attr.aria-expanded]': '_expanded()',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-current]': '_pattern.current()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-level]': 'level()',\n '[attr.aria-setsize]': '_pattern.setsize()',\n '[attr.aria-posinset]': '_pattern.posinset()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestroy, HasElement {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The owned tree item group. */\n private readonly _group = signal<TreeItemGroup<V> | undefined>(undefined);\n\n /** A unique identifier for the tree item. */\n readonly id = input(inject(_IdGenerator).getId('ng-tree-item-', true));\n\n /** The value of the tree item. */\n readonly value = input.required<V>();\n\n /** The parent tree root or tree item group. */\n readonly parent = input.required<Tree<V> | TreeItemGroup<V>>();\n\n /** Whether the tree item is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the tree item is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** Whether the tree item is expanded. */\n readonly expanded = model<boolean>(false);\n\n /** Optional label for typeahead. Defaults to the element's textContent. */\n readonly label = input<string>();\n\n /** Search term for typeahead. */\n readonly searchTerm = computed(() => this.label() ?? this.element.textContent);\n\n /** The tree root. */\n readonly tree: Signal<Tree<V>> = computed(() => {\n if (this.parent() instanceof Tree) {\n return this.parent() as Tree<V>;\n }\n return (this.parent() as TreeItemGroup<V>).ownedBy().tree();\n });\n\n /** Whether the item is active. */\n readonly active = computed(() => this._pattern.active());\n\n /** The level of the current item in a tree. */\n readonly level = computed(() => this._pattern.level());\n\n /** Whether the item is selected. */\n readonly selected = computed(() => this._pattern.selected());\n\n /** Whether this item is visible due to all of its parents being expanded. */\n readonly visible = computed(() => this._pattern.visible());\n\n /** Whether the tree is expanded. Use this value for aria-expanded. */\n protected readonly _expanded: Signal<boolean | undefined> = computed(() =>\n this._pattern.expandable() ? this._pattern.expanded() : undefined,\n );\n\n /** The UI pattern for this item. */\n _pattern!: TreeItemPattern<V>;\n\n constructor() {\n super();\n afterRenderEffect({\n write: () => {\n this.contentVisible.set(this._pattern.expanded());\n },\n });\n }\n\n ngOnInit() {\n if (this.parent() instanceof TreeItemGroup) {\n (this.parent() as TreeItemGroup<V>)._register(this);\n }\n this.tree()._collection.register(this);\n\n const treePattern = computed(() => this.tree()._pattern);\n const parentPattern = computed(() => {\n if (this.parent() instanceof Tree) {\n return treePattern();\n }\n return (this.parent() as TreeItemGroup<V>).ownedBy()._pattern;\n });\n this._pattern = new TreeItemPattern<V>({\n ...this,\n tree: treePattern,\n parent: parentPattern,\n children: computed(() => this._group()?._childPatterns()),\n hasChildren: computed(() => !!this._group()),\n element: () => this.element,\n searchTerm: () => this.searchTerm() ?? '',\n });\n }\n\n ngOnDestroy() {\n if (this.parent() instanceof TreeItemGroup) {\n (this.parent() as TreeItemGroup<V>)._unregister(this);\n }\n this.tree()._collection.unregister(this);\n }\n\n _register(group: TreeItemGroup<V>) {\n this._group.set(group);\n }\n\n _unregister() {\n this._group.set(undefined);\n }\n}\n"],"names":["Tree","_elementRef","inject","ElementRef","element","nativeElement","_collection","SortedCollection","id","input","_IdGenerator","getId","orientation","multi","transform","booleanAttribute","disabled","selectionMode","focusMode","wrap","softDisabled","typeaheadDelay","tabIndex","undefined","ngDevMode","debugName","alias","tabIndexTransform","value","model","textDirection","Directionality","valueSignal","nav","currentType","_pattern","activeDescendant","constructor","inputs","items","computed","orderedItems","map","item","activeItem","signal","TreePattern","afterNextRender","startObserving","afterRenderEffect","read","reportViolations","validate","write","setDefaultStateEffect","untracked","some","i","treeBehavior","unfocus","setDefaultState","ngOnDestroy","stopObserving","scrollActiveItemIntoView","options","block","scrollIntoView","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","classPropertyName","publicName","isSignal","isRequired","transformFunction","outputs","host","attributes","listeners","properties","exportAs","ngImport","decorators","args","TreeItemGroup","_deferredContent","DeferredContent","_unorderedItems","Set","_childPatterns","sort","sortDirectives","c","ownedBy","required","ngOnInit","deferredContentAware","set","_register","_unregister","child","add","delete","hostDirectives","directive","i1","TreeItem","DeferredContentAware","_group","parent","selectable","expanded","label","searchTerm","textContent","tree","active","level","selected","visible","_expanded","expandable","contentVisible","register","treePattern","parentPattern","TreeItemPattern","children","hasChildren","unregister","group","usesInheritance"],"mappings":";;;;;;;;;;;;;;MAoFaA,IAAI,CAAA;AAEEC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;AAGxCC,EAAAA,OAAO,GAAG,IAAI,CAACH,WAAW,CAACI,aAA4B;AAGvDC,EAAAA,WAAW,GAAG,IAAIC,gBAAgB,EAAe;AAGjDC,EAAAA,EAAE,GAAGC,KAAK,CAACP,MAAM,CAACQ,YAAY,CAAC,CAACC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC;;WAAC;EAGxDC,WAAW,GAAGH,KAAK,CAA4B,UAAU;;WAAC;AAG1DI,EAAAA,KAAK,GAAGJ,KAAK,CAAC,KAAK;;;;AAAGK,IAAAA,SAAS,EAAEC;AAAgB,GAAA,CAAE;AAGnDC,EAAAA,QAAQ,GAAGP,KAAK,CAAC,KAAK;;;;AAAGK,IAAAA,SAAS,EAAEC;AAAgB,G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AAA,qBAAqB,EAAE,oBAAoB;AAC3C,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,iBAAiB,EAAE;AACpB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tree.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/tree.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/tree-item-group.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/tree/tree-item.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 afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n signal,\n Signal,\n untracked,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n SortedCollection,\n tabIndexTransform,\n TreeItemPattern,\n TreePattern,\n reportViolations,\n} from '../private';\nimport type {TreeItem} from './tree-item';\n\n/**\n * A container that transforms nested lists into an accessible, ARIA-compliant tree structure.\n * It manages the overall state of the tree, including selection, expansion, and keyboard\n * navigation.\n *\n * ```html\n * <ul ngTree [(value)]=\"selectedItems\" [multi]=\"true\">\n * <ng-template\n * [ngTemplateOutlet]=\"treeNodes\"\n * [ngTemplateOutletContext]=\"{nodes: treeData, parent: tree}\"\n * />\n * </ul>\n *\n * <ng-template #treeNodes let-nodes=\"nodes\" let-parent=\"parent\">\n * @for (node of nodes; track node.name) {\n * <li ngTreeItem [parent]=\"parent\" [value]=\"node.name\" [label]=\"node.name\">\n * {{ node.name }}\n * @if (node.children) {\n * <ul role=\"group\">\n * <ng-template ngTreeItemGroup [ownedBy]=\"treeItem\" #group=\"ngTreeItemGroup\">\n * <ng-template\n * [ngTemplateOutlet]=\"treeNodes\"\n * [ngTemplateOutletContext]=\"{nodes: node.children, parent: group}\"\n * />\n * </ng-template>\n * </ul>\n * }\n * </li>\n * }\n * </ng-template>\n * ```\n *\n * @see [Tree](guide/aria/tree)\n */\n@Directive({\n selector: '[ngTree]',\n exportAs: 'ngTree',\n host: {\n 'role': 'tree',\n '[attr.id]': 'id()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '[attr.aria-multiselectable]': '_pattern.multi()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '[tabindex]': 'tabIndex() !== undefined ? tabIndex() : _pattern.tabIndex()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class Tree<V> implements OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The collection of tree items. */\n readonly _collection = new SortedCollection<TreeItem<V>>();\n\n /** A unique identifier for the tree. */\n readonly id = input(inject(_IdGenerator).getId('ng-tree-', true));\n\n /** Orientation of the tree. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multi-selection is allowed. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** Whether the tree is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /**\n * The selection strategy used by the tree.\n * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).\n * - `follow`: The focused item is automatically selected.\n */\n readonly selectionMode = input<'explicit' | 'follow'>('explicit');\n\n /**\n * The focus strategy used by the tree.\n * - `roving`: Focus is moved to the active item using `tabindex`.\n * - `activedescendant`: Focus remains on the tree container, and `aria-activedescendant` is used to indicate the active item.\n */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** Whether navigation wraps. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The delay in seconds before the typeahead search is reset. */\n readonly typeaheadDelay = input(500);\n\n /** The tabindex of the tree. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\n\n /** The values of the currently selected items. */\n readonly value = model<V[]>([]);\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Whether the tree is in navigation mode. */\n readonly nav = input(false, {transform: booleanAttribute});\n\n /**\n * The `aria-current` type. It can be used in navigation trees to indicate the currently active item.\n * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-current for more details.\n */\n readonly currentType = input<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>(\n 'page',\n );\n\n /** The UI pattern for the tree. */\n readonly _pattern: TreePattern<V>;\n\n /** The ID of the active descendant in the tree. */\n readonly activeDescendant: Signal<string | undefined>;\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n items: computed(() => this._collection.orderedItems().map(item => item._pattern)),\n activeItem: signal<TreeItemPattern<V> | undefined>(undefined),\n element: () => this.element,\n };\n\n this._pattern = new TreePattern<V>(inputs);\n\n this.activeDescendant = computed(() => this._pattern.activeDescendant());\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n // Resets default focus based on selection state until interacted.\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n afterRenderEffect({\n write: () => {\n const items = inputs.items();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (activeItem && !items.some(i => i === activeItem)) {\n this._pattern.treeBehavior.unfocus();\n this._pattern.setDefaultState();\n }\n },\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n scrollActiveItemIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {\n this._pattern.inputs.activeItem()?.element()?.scrollIntoView(options);\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 Directive,\n ElementRef,\n computed,\n inject,\n input,\n signal,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {TreeItemPattern, DeferredContent, sortDirectives} from '../private';\nimport type {TreeItem} from './tree-item';\n\n/**\n * Group that contains children tree items.\n *\n * The `ngTreeItemGroup` structural directive should be applied to an `ng-template` that\n * wraps the child `ngTreeItem` elements. It is used to define a group of children for an\n * expandable `ngTreeItem`. The `ownedBy` input links the group to its parent `ngTreeItem`.\n *\n * ```html\n * <li ngTreeItem [value]=\"'parent-id'\">\n * Parent Item\n * <ul role=\"group\">\n * <ng-template ngTreeItemGroup [ownedBy]=\"parentTreeItemRef\">\n * <li ngTreeItem [value]=\"'child-id'\">Child Item</li>\n * </ng-template>\n * </ul>\n * </li>\n * ```\n *\n * @see [Tree](guide/aria/tree)\n */\n@Directive({\n selector: 'ng-template[ngTreeItemGroup]',\n exportAs: 'ngTreeItemGroup',\n hostDirectives: [DeferredContent],\n})\nexport class TreeItemGroup<V> implements OnInit, OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The DeferredContent host directive. */\n private readonly _deferredContent = inject(DeferredContent);\n\n /** All groupable items that are descendants of the group. */\n private readonly _unorderedItems = signal(new Set<TreeItem<V>>());\n\n /** Child items within this group. */\n readonly _childPatterns = computed<TreeItemPattern<V>[]>(() =>\n [...this._unorderedItems()].sort(sortDirectives).map(c => c._pattern),\n );\n\n /** Tree item that owns the group. */\n readonly ownedBy = input.required<TreeItem<V>>();\n\n ngOnInit() {\n this._deferredContent.deferredContentAware.set(this.ownedBy());\n this.ownedBy()._register(this);\n }\n\n ngOnDestroy() {\n this.ownedBy()._unregister();\n }\n\n _register(child: TreeItem<V>) {\n this._unorderedItems().add(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\n }\n\n _unregister(child: TreeItem<V>) {\n this._unorderedItems().delete(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\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 Directive,\n ElementRef,\n afterRenderEffect,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n Signal,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {TreeItemPattern, DeferredContentAware, HasElement} from '../private';\nimport {Tree} from './tree';\nimport {TreeItemGroup} from './tree-item-group';\n\n/**\n * A selectable and expandable item in an `ngTree`.\n *\n * The `ngTreeItem` directive represents an individual node within an `ngTree`. It can be\n * selected, expanded (if it has children), and disabled. The `parent` input establishes\n * the hierarchical relationship within the tree.\n *\n * ```html\n * <li ngTreeItem [parent]=\"parentTreeOrGroup\" value=\"item-id\" label=\"Item Label\">\n * Item Label\n * </li>\n * ```\n */\n@Directive({\n selector: '[ngTreeItem]',\n exportAs: 'ngTreeItem',\n host: {\n '[attr.data-active]': 'active()',\n 'role': 'treeitem',\n '[id]': '_pattern.id()',\n '[attr.aria-expanded]': '_expanded()',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-current]': '_pattern.current()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-level]': 'level()',\n '[attr.aria-setsize]': '_pattern.setsize()',\n '[attr.aria-posinset]': '_pattern.posinset()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestroy, HasElement {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The owned tree item group. */\n private readonly _group = signal<TreeItemGroup<V> | undefined>(undefined);\n\n /** A unique identifier for the tree item. */\n readonly id = input(inject(_IdGenerator).getId('ng-tree-item-', true));\n\n /** The value of the tree item. */\n readonly value = input.required<V>();\n\n /** The parent tree root or tree item group. */\n readonly parent = input.required<Tree<V> | TreeItemGroup<V>>();\n\n /** Whether the tree item is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the tree item is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** Whether the tree item is expanded. */\n readonly expanded = model<boolean>(false);\n\n /** Optional label for typeahead. Defaults to the element's textContent. */\n readonly label = input<string>();\n\n /** Search term for typeahead. */\n readonly searchTerm = computed(() => this.label() ?? this.element.textContent);\n\n /** The tree root. */\n readonly tree: Signal<Tree<V>> = computed(() => {\n if (this.parent() instanceof Tree) {\n return this.parent() as Tree<V>;\n }\n return (this.parent() as TreeItemGroup<V>).ownedBy().tree();\n });\n\n /** Whether the item is active. */\n readonly active = computed(() => this._pattern.active());\n\n /** The level of the current item in a tree. */\n readonly level = computed(() => this._pattern.level());\n\n /** Whether the item is selected. */\n readonly selected = computed(() => this._pattern.selected());\n\n /** Whether this item is visible due to all of its parents being expanded. */\n readonly visible = computed(() => this._pattern.visible());\n\n /** Whether the tree is expanded. Use this value for aria-expanded. */\n protected readonly _expanded: Signal<boolean | undefined> = computed(() =>\n this._pattern.expandable() ? this._pattern.expanded() : undefined,\n );\n\n /** The UI pattern for this item. */\n _pattern!: TreeItemPattern<V>;\n\n constructor() {\n super();\n afterRenderEffect({\n write: () => {\n this.contentVisible.set(this._pattern.expanded());\n },\n });\n }\n\n ngOnInit() {\n if (this.parent() instanceof TreeItemGroup) {\n (this.parent() as TreeItemGroup<V>)._register(this);\n }\n this.tree()._collection.register(this);\n\n const treePattern = computed(() => this.tree()._pattern);\n const parentPattern = computed(() => {\n if (this.parent() instanceof Tree) {\n return treePattern();\n }\n return (this.parent() as TreeItemGroup<V>).ownedBy()._pattern;\n });\n this._pattern = new TreeItemPattern<V>({\n ...this,\n tree: treePattern,\n parent: parentPattern,\n children: computed(() => this._group()?._childPatterns()),\n hasChildren: computed(() => !!this._group()),\n element: () => this.element,\n searchTerm: () => this.searchTerm() ?? '',\n });\n }\n\n ngOnDestroy() {\n if (this.parent() instanceof TreeItemGroup) {\n (this.parent() as TreeItemGroup<V>)._unregister(this);\n }\n this.tree()._collection.unregister(this);\n }\n\n _register(group: TreeItemGroup<V>) {\n this._group.set(group);\n }\n\n _unregister() {\n this._group.set(undefined);\n }\n}\n"],"names":["Tree","_elementRef","inject","ElementRef","element","nativeElement","_collection","SortedCollection","id","input","_IdGenerator","getId","orientation","multi","transform","booleanAttribute","disabled","selectionMode","focusMode","wrap","softDisabled","typeaheadDelay","tabIndex","undefined","ngDevMode","debugName","alias","tabIndexTransform","value","model","textDirection","Directionality","valueSignal","nav","currentType","_pattern","activeDescendant","constructor","inputs","items","computed","orderedItems","map","item","activeItem","signal","TreePattern","afterNextRender","startObserving","afterRenderEffect","read","reportViolations","validate","write","setDefaultStateEffect","untracked","some","i","treeBehavior","unfocus","setDefaultState","ngOnDestroy","stopObserving","scrollActiveItemIntoView","options","block","scrollIntoView","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","classPropertyName","publicName","isSignal","isRequired","transformFunction","outputs","host","attributes","listeners","properties","exportAs","ngImport","decorators","args","TreeItemGroup","_deferredContent","DeferredContent","_unorderedItems","Set","_childPatterns","sort","sortDirectives","c","ownedBy","required","ngOnInit","deferredContentAware","set","_register","_unregister","child","add","delete","hostDirectives","directive","i1","TreeItem","DeferredContentAware","_group","parent","selectable","expanded","label","searchTerm","textContent","tree","active","level","selected","visible","_expanded","expandable","contentVisible","register","treePattern","parentPattern","TreeItemPattern","children","hasChildren","unregister","group","usesInheritance"],"mappings":";;;;;;;;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AAA,eAAA,EAAA,IAAA;AAAAlD,IAAAA,QAAA,EAAAhB;AAAA,GAAA,CAAA;;;;;;QAARyC,QAAQ;AAAAxB,EAAAA,UAAA,EAAA,CAAA;UAjBpBf,SAAS;AAACgB,IAAAA,IAAA,EAAA,CAAA;AACTd,MAAAA,QAAQ,EAAE,cAAc;AACxBW,MAAAA,QAAQ,EAAE,YAAY;AACtBJ,MAAAA,IAAI,EAAE;AACJ,QAAA,oBAAoB,EAAE,UAAU;AAChC,QAAA,MAAM,EAAE,UAAU;AAClB,QAAA,MAAM,EAAE,eAAe;AACvB,QAAA,sBAAsB,EAAE,aAAa;AACrC,QAAA,sBAAsB,EAAE,YAAY;AACpC,QAAA,qBAAqB,EAAE,oBAAoB;AAC3C,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,mBAAmB,EAAE,SAAS;AAC9B,QAAA,qBAAqB,EAAE,oBAAoB;AAC3C,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,iBAAiB,EAAE;AACpB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/aria",
|
|
3
|
-
"version": "22.0.0-rc.
|
|
3
|
+
"version": "22.0.0-rc.2",
|
|
4
4
|
"description": "Angular Aria",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/angular/components#readme",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/cdk": "22.0.0-rc.
|
|
15
|
+
"@angular/cdk": "22.0.0-rc.2",
|
|
16
16
|
"@angular/core": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
package/types/_menu-chunk.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
|
|
|
43
43
|
parent: SignalLike<MenuPattern<V> | MenuBarPattern<V> | undefined>;
|
|
44
44
|
/** A reference to the submenu associated with the menu item. */
|
|
45
45
|
submenu: SignalLike<MenuPattern<V> | undefined>;
|
|
46
|
+
/** The role of the menu item. */
|
|
47
|
+
role: SignalLike<'menuitem' | 'menuitemradio' | 'menuitemcheckbox'>;
|
|
46
48
|
}
|
|
47
49
|
/** The menu ui pattern class. */
|
|
48
50
|
declare class MenuPattern<V> {
|
|
@@ -189,6 +191,8 @@ declare class MenuTriggerPattern<V> {
|
|
|
189
191
|
readonly expanded: WritableSignalLike<boolean>;
|
|
190
192
|
/** Whether the menu trigger has received interaction. */
|
|
191
193
|
readonly hasBeenInteracted: WritableSignalLike<boolean>;
|
|
194
|
+
/** The pending focus target when the menu is opened before the menu instance is available. */
|
|
195
|
+
readonly pendingFocus: WritableSignalLike<"first" | "last" | undefined>;
|
|
192
196
|
/** The role of the menu trigger. */
|
|
193
197
|
readonly role: () => string;
|
|
194
198
|
/** Whether the menu trigger has a popup. */
|
|
@@ -202,6 +206,8 @@ declare class MenuTriggerPattern<V> {
|
|
|
202
206
|
/** Handles keyboard events for the menu trigger. */
|
|
203
207
|
readonly keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
|
|
204
208
|
constructor(inputs: MenuTriggerInputs<V>);
|
|
209
|
+
/** Flushes any pending focus when the menu instance becomes available. */
|
|
210
|
+
pendingFocusEffect(): void;
|
|
205
211
|
/** Handles keyboard events for the menu trigger. */
|
|
206
212
|
onKeydown(event: KeyboardEvent): void;
|
|
207
213
|
/** Handles click events for the menu trigger. */
|
|
@@ -248,7 +254,7 @@ declare class MenuItemPattern<V> implements ListItem<V> {
|
|
|
248
254
|
/** The ID of the menu that the menu item controls. */
|
|
249
255
|
readonly controls: WritableSignalLike<string | undefined>;
|
|
250
256
|
/** The role of the menu item. */
|
|
251
|
-
readonly role: () =>
|
|
257
|
+
readonly role: () => "menuitem" | "menuitemradio" | "menuitemcheckbox";
|
|
252
258
|
/** Whether the menu item has a popup. */
|
|
253
259
|
readonly hasPopup: SignalLike<boolean>;
|
|
254
260
|
/** The submenu associated with the menu item. */
|
package/types/combobox.d.ts
CHANGED
|
@@ -74,21 +74,37 @@ declare class ComboboxPopup implements OnInit, OnDestroy {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* A directive that coordinates a combobox trigger element and its associated popup widget.
|
|
78
78
|
*
|
|
79
|
-
* The `ngCombobox` directive is
|
|
80
|
-
*
|
|
79
|
+
* The `ngCombobox` directive is applied directly to the interactive trigger element, which can be
|
|
80
|
+
* either an editable `<input>` (for search/autocomplete behaviors) or a non-editable element like
|
|
81
|
+
* a `<div>` (for custom select dropdowns). It manages focus and expansion states, coordinates autocomplete
|
|
82
|
+
* suggestions (if editable), and forwards navigation keys down into the active popup.
|
|
81
83
|
*
|
|
84
|
+
* ### Example 1: Editable Autocomplete Input
|
|
82
85
|
* ```html
|
|
83
|
-
* <
|
|
84
|
-
* <input ngComboboxInput />
|
|
86
|
+
* <input ngCombobox #combobox="ngCombobox" [(value)]="searchQuery" [(expanded)]="isExpanded" />
|
|
85
87
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* </div>
|
|
90
|
-
* </
|
|
88
|
+
* <ng-template ngComboboxPopup [combobox]="combobox">
|
|
89
|
+
* <div ngComboboxWidget #listbox="ngListbox" ngListbox [(value)]="selectedValues" [activeDescendant]="listbox.activeDescendant()">
|
|
90
|
+
* <div ngOption value="first">First Option</div>
|
|
91
|
+
* <div ngOption value="second">Second Option</div>
|
|
92
|
+
* </div>
|
|
93
|
+
* </ng-template>
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* ### Example 2: Non-Editable Custom Select Dropdown
|
|
97
|
+
* ```html
|
|
98
|
+
* <div ngCombobox #combobox="ngCombobox" [(expanded)]="isExpanded" class="select-trigger">
|
|
99
|
+
* {{selectedValue}}
|
|
91
100
|
* </div>
|
|
101
|
+
*
|
|
102
|
+
* <ng-template ngComboboxPopup [combobox]="combobox">
|
|
103
|
+
* <div ngComboboxWidget #listbox="ngListbox" ngListbox [(value)]="selectedValues" [activeDescendant]="listbox.activeDescendant()">
|
|
104
|
+
* <div ngOption value="first">First Option</div>
|
|
105
|
+
* <div ngOption value="second">Second Option</div>
|
|
106
|
+
* </div>
|
|
107
|
+
* </ng-template>
|
|
92
108
|
* ```
|
|
93
109
|
*/
|
|
94
110
|
declare class Combobox extends DeferredContentAware implements OnInit {
|
package/types/menu.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
|
|
|
98
98
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
99
99
|
/** The search term associated with the menu item. */
|
|
100
100
|
readonly searchTerm: _angular_core.ModelSignal<string>;
|
|
101
|
+
/** The role of the menu item. */
|
|
102
|
+
readonly role: _angular_core.InputSignal<"menuitem" | "menuitemradio" | "menuitemcheckbox">;
|
|
101
103
|
/** A reference to the parent menu or menubar. */
|
|
102
104
|
readonly parent: Menu<V> | MenuBar<V> | null;
|
|
103
105
|
/** The submenu associated with the menu item. */
|
|
@@ -118,7 +120,7 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
|
|
|
118
120
|
/** Closes the submenu. */
|
|
119
121
|
close(): void;
|
|
120
122
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuItem<any>, never>;
|
|
121
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
|
|
123
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
/**
|
|
@@ -169,6 +171,8 @@ declare class Menu<V> implements OnDestroy {
|
|
|
169
171
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
170
172
|
/** A reference to the parent menu item or menu trigger. */
|
|
171
173
|
readonly parent: _angular_core.WritableSignal<MenuTrigger<V> | MenuItem<V> | undefined>;
|
|
174
|
+
/** Whether the menu is soft disabled. */
|
|
175
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
172
176
|
/** The menu ui pattern instance. */
|
|
173
177
|
readonly _pattern: MenuPattern<V>;
|
|
174
178
|
/**
|
|
@@ -195,7 +199,7 @@ declare class Menu<V> implements OnDestroy {
|
|
|
195
199
|
/** Closes the menu. */
|
|
196
200
|
close(): void;
|
|
197
201
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Menu<any>, never>;
|
|
198
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Menu<any>, "[ngMenu]", ["ngMenu"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expansionDelay": { "alias": "expansionDelay"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; }, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
202
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Menu<any>, "[ngMenu]", ["ngMenu"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "expansionDelay": { "alias": "expansionDelay"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; }, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
199
203
|
}
|
|
200
204
|
|
|
201
205
|
/**
|