@angular/cdk-experimental 20.1.2 → 20.2.0-next.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.mjs +25 -25
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +53 -53
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +10 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +8 -8
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/listbox.mjs +26 -26
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +43 -43
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/radio-group.mjs +20 -20
- package/fesm2022/radio-group.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +7 -7
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +19 -19
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +7 -7
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/{tabs-YS9XXb7X.mjs → tabs-DvjCdS14.mjs} +36 -1
- package/fesm2022/tabs-DvjCdS14.mjs.map +1 -0
- package/fesm2022/tabs.mjs +38 -37
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/tree.mjs +58 -39
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +1 -1
- package/{list-selection.d-BBLdeUeF.d.ts → list-selection.d-zyz_XRbe.d.ts} +2 -2
- package/listbox/index.d.ts +2 -2
- package/{listbox.d-hkdivyCf.d.ts → listbox.d-Ck8-1BdR.d.ts} +1 -1
- package/package.json +3 -3
- package/radio-group/index.d.ts +2 -2
- package/{radio-group.d-CcY7mCC2.d.ts → radio-group.d-B6Ntu9oI.d.ts} +1 -1
- package/tabs/index.d.ts +2 -2
- package/{tabs.d-C4vwhxZL.d.ts → tabs.d-BGC0Izc3.d.ts} +29 -3
- package/tree/index.d.ts +13 -3
- package/ui-patterns/index.d.ts +4 -4
- package/fesm2022/tabs-YS9XXb7X.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/combobox/combobox.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/combobox/combobox-popup.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/combobox/combobox-module.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 */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceArray, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB} from '@angular/cdk/keycodes';\nimport {\n ConnectedPosition,\n createBlockScrollStrategy,\n createFlexibleConnectedPositionStrategy,\n createOverlayRef,\n FlexibleConnectedPositionStrategy,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\n\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n HOST_TAG_NAME,\n InjectionToken,\n Injector,\n Input,\n OnDestroy,\n Output,\n TemplateRef,\n ViewContainerRef,\n inject,\n DOCUMENT,\n} from '@angular/core';\n\nexport type AriaHasPopupValue = 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\nexport type OpenAction = 'focus' | 'click' | 'downKey' | 'toggle';\nexport type OpenActionInput = OpenAction | OpenAction[] | string | null | undefined;\n\nconst allowedOpenActions = ['focus', 'click', 'downKey', 'toggle'];\n\nexport const CDK_COMBOBOX = new InjectionToken<CdkCombobox>('CDK_COMBOBOX');\n\n@Directive({\n selector: '[cdkCombobox]',\n exportAs: 'cdkCombobox',\n host: {\n 'role': 'combobox',\n 'class': 'cdk-combobox',\n '(click)': '_handleInteractions(\"click\")',\n '(focus)': '_handleInteractions(\"focus\")',\n '(keydown)': '_keydown($event)',\n '(document:click)': '_attemptClose($event)',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-owns]': 'contentId',\n '[attr.aria-haspopup]': 'contentType',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.tabindex]': '_getTabIndex()',\n },\n providers: [{provide: CDK_COMBOBOX, useExisting: CdkCombobox}],\n})\nexport class CdkCombobox<T = unknown> implements OnDestroy {\n private readonly _tagName = inject(HOST_TAG_NAME);\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _injector = inject(Injector);\n private readonly _doc = inject(DOCUMENT);\n private readonly _directionality = inject(Directionality, {optional: true});\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _overlayRef: OverlayRef;\n private _panelPortal: TemplatePortal;\n\n @Input('cdkComboboxTriggerFor')\n _panelTemplateRef: TemplateRef<unknown>;\n\n @Input()\n value: T | T[];\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled: boolean = false;\n\n @Input()\n get openActions(): OpenAction[] {\n return this._openActions;\n }\n set openActions(action: OpenActionInput) {\n this._openActions = this._coerceOpenActionProperty(action);\n }\n private _openActions: OpenAction[] = ['click'];\n\n /** Whether the textContent is automatically updated upon change of the combobox value. */\n @Input()\n get autoSetText(): boolean {\n return this._autoSetText;\n }\n set autoSetText(value: BooleanInput) {\n this._autoSetText = coerceBooleanProperty(value);\n }\n private _autoSetText: boolean = true;\n\n @Output('comboboxPanelOpened') readonly opened: EventEmitter<void> = new EventEmitter<void>();\n @Output('comboboxPanelClosed') readonly closed: EventEmitter<void> = new EventEmitter<void>();\n @Output('panelValueChanged') readonly panelValueChanged: EventEmitter<T[]> = new EventEmitter<\n T[]\n >();\n\n contentId: string = '';\n contentType: AriaHasPopupValue;\n\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n\n this.opened.complete();\n this.closed.complete();\n this.panelValueChanged.complete();\n }\n\n _keydown(event: KeyboardEvent) {\n const {keyCode} = event;\n\n if (keyCode === DOWN_ARROW) {\n if (this.isOpen()) {\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n this._doc.getElementById(this.contentId)?.focus();\n } else if (this._openActions.indexOf('downKey') !== -1) {\n this.open();\n }\n } else if (keyCode === ENTER) {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (keyCode === ESCAPE) {\n event.preventDefault();\n this.close();\n } else if (keyCode === TAB) {\n this.close();\n }\n }\n\n /** Handles click or focus interactions. */\n _handleInteractions(interaction: OpenAction) {\n if (interaction === 'click') {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (interaction === 'focus') {\n if (this._openActions.indexOf('focus') !== -1) {\n this.open();\n }\n }\n }\n\n /** Given a click in the document, determines if the click was inside a combobox. */\n _attemptClose(event: MouseEvent) {\n if (this.isOpen()) {\n let target = _getEventTarget(event);\n while (target instanceof Element) {\n if (target.className.indexOf('cdk-combobox') !== -1) {\n return;\n }\n target = target.parentElement;\n }\n }\n\n this.close();\n }\n\n /** Toggles the open state of the panel. */\n toggle() {\n if (this.hasPanel()) {\n this.isOpen() ? this.close() : this.open();\n }\n }\n\n /** If the combobox is closed and not disabled, opens the panel. */\n open() {\n if (!this.isOpen() && !this.disabled) {\n this.opened.next();\n this._overlayRef =\n this._overlayRef || createOverlayRef(this._injector, this._getOverlayConfig());\n this._overlayRef.attach(this._getPanelContent());\n this._changeDetectorRef.markForCheck();\n if (!this._isTextTrigger()) {\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n this._doc.getElementById(this.contentId)?.focus();\n }\n }\n }\n\n /** If the combobox is open and not disabled, closes the panel. */\n close() {\n if (this.isOpen() && !this.disabled) {\n this.closed.next();\n this._overlayRef.detach();\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** Returns true if panel is currently opened. */\n isOpen(): boolean {\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\n }\n\n /** Returns true if combobox has a child panel. */\n hasPanel(): boolean {\n return !!this._panelTemplateRef;\n }\n\n _getTabIndex(): string | null {\n return this.disabled ? null : '0';\n }\n\n private _setComboboxValue(value: T | T[]) {\n const valueChanged = this.value !== value;\n this.value = value;\n\n if (valueChanged) {\n this.panelValueChanged.emit(coerceArray(value));\n if (this._autoSetText) {\n this._setTextContent(value);\n }\n }\n }\n\n updateAndClose(value: T | T[]) {\n this._setComboboxValue(value);\n this.close();\n }\n\n private _setTextContent(content: T | T[]) {\n const contentArray = coerceArray(content);\n this._elementRef.nativeElement.textContent = contentArray.join(' ');\n }\n\n private _isTextTrigger() {\n // TODO: Should check if the trigger is contenteditable.\n const tagName = this._tagName.toLowerCase();\n return tagName === 'input' || tagName === 'textarea';\n }\n\n private _getOverlayConfig() {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPositionStrategy(),\n scrollStrategy: createBlockScrollStrategy(this._injector),\n direction: this._directionality || undefined,\n });\n }\n\n private _getOverlayPositionStrategy(): FlexibleConnectedPositionStrategy {\n return createFlexibleConnectedPositionStrategy(this._injector, this._elementRef).withPositions(\n this._getOverlayPositions(),\n );\n }\n\n private _getOverlayPositions(): ConnectedPosition[] {\n return [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},\n ];\n }\n\n private _getPanelInjector() {\n return this._injector;\n }\n\n private _getPanelContent() {\n const hasPanelChanged = this._panelTemplateRef !== this._panelPortal?.templateRef;\n if (this._panelTemplateRef && (!this._panelPortal || hasPanelChanged)) {\n this._panelPortal = new TemplatePortal(\n this._panelTemplateRef,\n this._viewContainerRef,\n undefined,\n this._getPanelInjector(),\n );\n }\n\n return this._panelPortal;\n }\n\n private _coerceOpenActionProperty(input: OpenActionInput): OpenAction[] {\n let actions = typeof input === 'string' ? input.trim().split(/[ ,]+/) : input;\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n actions?.some(a => allowedOpenActions.indexOf(a) === -1)\n ) {\n throw Error(`${input} is not a support open action for CdkCombobox`);\n }\n return actions as OpenAction[];\n }\n\n /** Registers the content's id and the content type with the panel. */\n _registerContent(contentId: string, contentType: AriaHasPopupValue) {\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n contentType !== 'listbox' &&\n contentType !== 'dialog'\n ) {\n throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');\n }\n this.contentId = contentId;\n this.contentType = contentType;\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, Input, OnInit, inject} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {AriaHasPopupValue, CDK_COMBOBOX, CdkCombobox} from './combobox';\n\n@Directive({\n selector: '[cdkComboboxPopup]',\n exportAs: 'cdkComboboxPopup',\n host: {\n 'class': 'cdk-combobox-popup',\n '[attr.role]': 'role',\n '[id]': 'id',\n 'tabindex': '-1',\n '(focus)': 'focusFirstElement()',\n },\n})\nexport class CdkComboboxPopup<T = unknown> implements OnInit {\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _combobox = inject<CdkCombobox>(CDK_COMBOBOX);\n\n @Input()\n get role(): AriaHasPopupValue {\n return this._role;\n }\n set role(value: AriaHasPopupValue) {\n this._role = value;\n }\n private _role: AriaHasPopupValue = 'dialog';\n\n @Input()\n get firstFocus(): HTMLElement {\n return this._firstFocusElement;\n }\n set firstFocus(id: HTMLElement) {\n this._firstFocusElement = id;\n }\n private _firstFocusElement: HTMLElement;\n\n @Input() id: string = inject(_IdGenerator).getId('cdk-combobox-popup-');\n\n ngOnInit() {\n this.registerWithPanel();\n }\n\n registerWithPanel(): void {\n this._combobox._registerContent(this.id, this._role);\n }\n\n focusFirstElement() {\n if (this._firstFocusElement) {\n this._firstFocusElement.focus();\n } else {\n this._elementRef.nativeElement.focus();\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 {NgModule} from '@angular/core';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {CdkCombobox} from './combobox';\nimport {CdkComboboxPopup} from './combobox-popup';\n\nconst EXPORTED_DECLARATIONS = [CdkCombobox, CdkComboboxPopup];\n@NgModule({\n imports: [OverlayModule, ...EXPORTED_DECLARATIONS],\n exports: EXPORTED_DECLARATIONS,\n})\nexport class CdkComboboxModule {}\n"],"names":[],"mappings":";;;;;;;;;;AA2CA,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;MAErD,YAAY,GAAG,IAAI,cAAc,CAAc,cAAc;MAoB7D,WAAW,CAAA;AACL,IAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACvD,IAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9C,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC;IACvB,eAAe,GAAG,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AA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAjB,iBAAiB,EAAA,OAAA,EAAA,CAHlB,aAAa,EAFM,WAAW,EAAE,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAA7B,WAAW,EAAE,gBAAgB,CAAA,EAAA,CAAA;AAK/C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,aAAa,CAAA,EAAA,CAAA;;2FAGZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,GAAG,qBAAqB,CAAC;AAClD,oBAAA,OAAO,EAAE,qBAAqB;AAC/B,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"combobox.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/combobox/combobox.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/combobox/combobox-popup.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/combobox/combobox-module.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 */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceArray, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB} from '@angular/cdk/keycodes';\nimport {\n ConnectedPosition,\n createBlockScrollStrategy,\n createFlexibleConnectedPositionStrategy,\n createOverlayRef,\n FlexibleConnectedPositionStrategy,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\n\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n HOST_TAG_NAME,\n InjectionToken,\n Injector,\n Input,\n OnDestroy,\n Output,\n TemplateRef,\n ViewContainerRef,\n inject,\n DOCUMENT,\n} from '@angular/core';\n\nexport type AriaHasPopupValue = 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\nexport type OpenAction = 'focus' | 'click' | 'downKey' | 'toggle';\nexport type OpenActionInput = OpenAction | OpenAction[] | string | null | undefined;\n\nconst allowedOpenActions = ['focus', 'click', 'downKey', 'toggle'];\n\nexport const CDK_COMBOBOX = new InjectionToken<CdkCombobox>('CDK_COMBOBOX');\n\n@Directive({\n selector: '[cdkCombobox]',\n exportAs: 'cdkCombobox',\n host: {\n 'role': 'combobox',\n 'class': 'cdk-combobox',\n '(click)': '_handleInteractions(\"click\")',\n '(focus)': '_handleInteractions(\"focus\")',\n '(keydown)': '_keydown($event)',\n '(document:click)': '_attemptClose($event)',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-owns]': 'contentId',\n '[attr.aria-haspopup]': 'contentType',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.tabindex]': '_getTabIndex()',\n },\n providers: [{provide: CDK_COMBOBOX, useExisting: CdkCombobox}],\n})\nexport class CdkCombobox<T = unknown> implements OnDestroy {\n private readonly _tagName = inject(HOST_TAG_NAME);\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _injector = inject(Injector);\n private readonly _doc = inject(DOCUMENT);\n private readonly _directionality = inject(Directionality, {optional: true});\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _overlayRef: OverlayRef;\n private _panelPortal: TemplatePortal;\n\n @Input('cdkComboboxTriggerFor')\n _panelTemplateRef: TemplateRef<unknown>;\n\n @Input()\n value: T | T[];\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled: boolean = false;\n\n @Input()\n get openActions(): OpenAction[] {\n return this._openActions;\n }\n set openActions(action: OpenActionInput) {\n this._openActions = this._coerceOpenActionProperty(action);\n }\n private _openActions: OpenAction[] = ['click'];\n\n /** Whether the textContent is automatically updated upon change of the combobox value. */\n @Input()\n get autoSetText(): boolean {\n return this._autoSetText;\n }\n set autoSetText(value: BooleanInput) {\n this._autoSetText = coerceBooleanProperty(value);\n }\n private _autoSetText: boolean = true;\n\n @Output('comboboxPanelOpened') readonly opened: EventEmitter<void> = new EventEmitter<void>();\n @Output('comboboxPanelClosed') readonly closed: EventEmitter<void> = new EventEmitter<void>();\n @Output('panelValueChanged') readonly panelValueChanged: EventEmitter<T[]> = new EventEmitter<\n T[]\n >();\n\n contentId: string = '';\n contentType: AriaHasPopupValue;\n\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n\n this.opened.complete();\n this.closed.complete();\n this.panelValueChanged.complete();\n }\n\n _keydown(event: KeyboardEvent) {\n const {keyCode} = event;\n\n if (keyCode === DOWN_ARROW) {\n if (this.isOpen()) {\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n this._doc.getElementById(this.contentId)?.focus();\n } else if (this._openActions.indexOf('downKey') !== -1) {\n this.open();\n }\n } else if (keyCode === ENTER) {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (keyCode === ESCAPE) {\n event.preventDefault();\n this.close();\n } else if (keyCode === TAB) {\n this.close();\n }\n }\n\n /** Handles click or focus interactions. */\n _handleInteractions(interaction: OpenAction) {\n if (interaction === 'click') {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (interaction === 'focus') {\n if (this._openActions.indexOf('focus') !== -1) {\n this.open();\n }\n }\n }\n\n /** Given a click in the document, determines if the click was inside a combobox. */\n _attemptClose(event: MouseEvent) {\n if (this.isOpen()) {\n let target = _getEventTarget(event);\n while (target instanceof Element) {\n if (target.className.indexOf('cdk-combobox') !== -1) {\n return;\n }\n target = target.parentElement;\n }\n }\n\n this.close();\n }\n\n /** Toggles the open state of the panel. */\n toggle() {\n if (this.hasPanel()) {\n this.isOpen() ? this.close() : this.open();\n }\n }\n\n /** If the combobox is closed and not disabled, opens the panel. */\n open() {\n if (!this.isOpen() && !this.disabled) {\n this.opened.next();\n this._overlayRef =\n this._overlayRef || createOverlayRef(this._injector, this._getOverlayConfig());\n this._overlayRef.attach(this._getPanelContent());\n this._changeDetectorRef.markForCheck();\n if (!this._isTextTrigger()) {\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n this._doc.getElementById(this.contentId)?.focus();\n }\n }\n }\n\n /** If the combobox is open and not disabled, closes the panel. */\n close() {\n if (this.isOpen() && !this.disabled) {\n this.closed.next();\n this._overlayRef.detach();\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** Returns true if panel is currently opened. */\n isOpen(): boolean {\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\n }\n\n /** Returns true if combobox has a child panel. */\n hasPanel(): boolean {\n return !!this._panelTemplateRef;\n }\n\n _getTabIndex(): string | null {\n return this.disabled ? null : '0';\n }\n\n private _setComboboxValue(value: T | T[]) {\n const valueChanged = this.value !== value;\n this.value = value;\n\n if (valueChanged) {\n this.panelValueChanged.emit(coerceArray(value));\n if (this._autoSetText) {\n this._setTextContent(value);\n }\n }\n }\n\n updateAndClose(value: T | T[]) {\n this._setComboboxValue(value);\n this.close();\n }\n\n private _setTextContent(content: T | T[]) {\n const contentArray = coerceArray(content);\n this._elementRef.nativeElement.textContent = contentArray.join(' ');\n }\n\n private _isTextTrigger() {\n // TODO: Should check if the trigger is contenteditable.\n const tagName = this._tagName.toLowerCase();\n return tagName === 'input' || tagName === 'textarea';\n }\n\n private _getOverlayConfig() {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPositionStrategy(),\n scrollStrategy: createBlockScrollStrategy(this._injector),\n direction: this._directionality || undefined,\n });\n }\n\n private _getOverlayPositionStrategy(): FlexibleConnectedPositionStrategy {\n return createFlexibleConnectedPositionStrategy(this._injector, this._elementRef).withPositions(\n this._getOverlayPositions(),\n );\n }\n\n private _getOverlayPositions(): ConnectedPosition[] {\n return [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},\n ];\n }\n\n private _getPanelInjector() {\n return this._injector;\n }\n\n private _getPanelContent() {\n const hasPanelChanged = this._panelTemplateRef !== this._panelPortal?.templateRef;\n if (this._panelTemplateRef && (!this._panelPortal || hasPanelChanged)) {\n this._panelPortal = new TemplatePortal(\n this._panelTemplateRef,\n this._viewContainerRef,\n undefined,\n this._getPanelInjector(),\n );\n }\n\n return this._panelPortal;\n }\n\n private _coerceOpenActionProperty(input: OpenActionInput): OpenAction[] {\n let actions = typeof input === 'string' ? input.trim().split(/[ ,]+/) : input;\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n actions?.some(a => allowedOpenActions.indexOf(a) === -1)\n ) {\n throw Error(`${input} is not a support open action for CdkCombobox`);\n }\n return actions as OpenAction[];\n }\n\n /** Registers the content's id and the content type with the panel. */\n _registerContent(contentId: string, contentType: AriaHasPopupValue) {\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n contentType !== 'listbox' &&\n contentType !== 'dialog'\n ) {\n throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');\n }\n this.contentId = contentId;\n this.contentType = contentType;\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, Input, OnInit, inject} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {AriaHasPopupValue, CDK_COMBOBOX, CdkCombobox} from './combobox';\n\n@Directive({\n selector: '[cdkComboboxPopup]',\n exportAs: 'cdkComboboxPopup',\n host: {\n 'class': 'cdk-combobox-popup',\n '[attr.role]': 'role',\n '[id]': 'id',\n 'tabindex': '-1',\n '(focus)': 'focusFirstElement()',\n },\n})\nexport class CdkComboboxPopup<T = unknown> implements OnInit {\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _combobox = inject<CdkCombobox>(CDK_COMBOBOX);\n\n @Input()\n get role(): AriaHasPopupValue {\n return this._role;\n }\n set role(value: AriaHasPopupValue) {\n this._role = value;\n }\n private _role: AriaHasPopupValue = 'dialog';\n\n @Input()\n get firstFocus(): HTMLElement {\n return this._firstFocusElement;\n }\n set firstFocus(id: HTMLElement) {\n this._firstFocusElement = id;\n }\n private _firstFocusElement: HTMLElement;\n\n @Input() id: string = inject(_IdGenerator).getId('cdk-combobox-popup-');\n\n ngOnInit() {\n this.registerWithPanel();\n }\n\n registerWithPanel(): void {\n this._combobox._registerContent(this.id, this._role);\n }\n\n focusFirstElement() {\n if (this._firstFocusElement) {\n this._firstFocusElement.focus();\n } else {\n this._elementRef.nativeElement.focus();\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 {NgModule} from '@angular/core';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {CdkCombobox} from './combobox';\nimport {CdkComboboxPopup} from './combobox-popup';\n\nconst EXPORTED_DECLARATIONS = [CdkCombobox, CdkComboboxPopup];\n@NgModule({\n imports: [OverlayModule, ...EXPORTED_DECLARATIONS],\n exports: EXPORTED_DECLARATIONS,\n})\nexport class CdkComboboxModule {}\n"],"names":[],"mappings":";;;;;;;;;;AA2CA,MAAM,kBAAkB,GAAG,CAAC,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,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,UAAU,EAAE,IAAI;AAChB,wBAAA,SAAS,EAAE,qBAAqB;AACjC,qBAAA;AACF,iBAAA;8BAMK,IAAI,EAAA,CAAA;sBADP;gBAUG,UAAU,EAAA,CAAA;sBADb;gBASQ,EAAE,EAAA,CAAA;sBAAV;;;AChCH,MAAM,qBAAqB,GAAG,CAAC,WAAW,EAAE,gBAAgB,CAAC;MAKhD,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;+GAAjB,iBAAiB,EAAA,OAAA,EAAA,CAHlB,aAAa,EAFM,WAAW,EAAE,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAA7B,WAAW,EAAE,gBAAgB,CAAA,EAAA,CAAA;AAK/C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,aAAa,CAAA,EAAA,CAAA;;kGAGZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,GAAG,qBAAqB,CAAC;AAClD,oBAAA,OAAO,EAAE,qBAAqB;AAC/B,iBAAA;;;;;"}
|
|
@@ -5,12 +5,12 @@ import { signal, input, Directive, inject, TemplateRef, ViewContainerRef, effect
|
|
|
5
5
|
* A container directive controls the visibility of its content.
|
|
6
6
|
*/
|
|
7
7
|
class DeferredContentAware {
|
|
8
|
-
contentVisible = signal(false);
|
|
9
|
-
preserveContent = input(false);
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DeferredContentAware, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: DeferredContentAware, isStandalone: true, inputs: { preserveContent: { classPropertyName: "preserveContent", publicName: "preserveContent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
8
|
+
contentVisible = signal(false, ...(ngDevMode ? [{ debugName: "contentVisible" }] : []));
|
|
9
|
+
preserveContent = input(false, ...(ngDevMode ? [{ debugName: "preserveContent" }] : []));
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: DeferredContentAware, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-next.0", type: DeferredContentAware, isStandalone: true, inputs: { preserveContent: { classPropertyName: "preserveContent", publicName: "preserveContent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DeferredContentAware, decorators: [{
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: DeferredContentAware, decorators: [{
|
|
14
14
|
type: Directive
|
|
15
15
|
}] });
|
|
16
16
|
/**
|
|
@@ -49,10 +49,10 @@ class DeferredContent {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DeferredContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: DeferredContent, isStandalone: true, ngImport: i0 });
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: DeferredContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: DeferredContent, isStandalone: true, ngImport: i0 });
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DeferredContent, decorators: [{
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: DeferredContent, decorators: [{
|
|
56
56
|
type: Directive
|
|
57
57
|
}], ctorParameters: () => [] });
|
|
58
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferred-content.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/deferred-content/deferred-content.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 Directive,\n effect,\n inject,\n input,\n TemplateRef,\n signal,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * A container directive controls the visibility of its content.\n */\n@Directive()\nexport class DeferredContentAware {\n contentVisible = signal(false);\n readonly preserveContent = input(false);\n}\n\n/**\n * DeferredContent loads/unloads the content based on the visibility.\n * The visibilty signal is sent from a parent directive implements\n * DeferredContentAware.\n *\n * Use this directive as a host directive. For example:\n *\n * ```ts\n * @Directive({\n * selector: 'ng-template[cdkAccordionContent]',\n * hostDirectives: [DeferredContent],\n * })\n * class CdkAccordionContent {}\n * ```\n */\n@Directive()\nexport class DeferredContent {\n private readonly _deferredContentAware = inject(DeferredContentAware);\n private readonly _templateRef = inject(TemplateRef);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private _isRendered = false;\n\n constructor() {\n effect(() => {\n if (\n this._deferredContentAware.preserveContent() ||\n this._deferredContentAware.contentVisible()\n ) {\n if (this._isRendered) return;\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n this._isRendered = true;\n } else {\n this._viewContainerRef.clear();\n this._isRendered = false;\n }\n });\n }\n}\n"],"names":[],"mappings":";;;AAkBA;;AAEG;MAEU,oBAAoB,CAAA;AAC/B,IAAA,cAAc,GAAG,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"deferred-content.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/deferred-content/deferred-content.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 Directive,\n effect,\n inject,\n input,\n TemplateRef,\n signal,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * A container directive controls the visibility of its content.\n */\n@Directive()\nexport class DeferredContentAware {\n contentVisible = signal(false);\n readonly preserveContent = input(false);\n}\n\n/**\n * DeferredContent loads/unloads the content based on the visibility.\n * The visibilty signal is sent from a parent directive implements\n * DeferredContentAware.\n *\n * Use this directive as a host directive. For example:\n *\n * ```ts\n * @Directive({\n * selector: 'ng-template[cdkAccordionContent]',\n * hostDirectives: [DeferredContent],\n * })\n * class CdkAccordionContent {}\n * ```\n */\n@Directive()\nexport class DeferredContent {\n private readonly _deferredContentAware = inject(DeferredContentAware);\n private readonly _templateRef = inject(TemplateRef);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private _isRendered = false;\n\n constructor() {\n effect(() => {\n if (\n this._deferredContentAware.preserveContent() ||\n this._deferredContentAware.contentVisible()\n ) {\n if (this._isRendered) return;\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n this._isRendered = true;\n } else {\n this._viewContainerRef.clear();\n this._isRendered = false;\n }\n });\n }\n}\n"],"names":[],"mappings":";;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AAE5B,SAAC,CAAC;;8GApBO,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;kGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;kGAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;;;"}
|
package/fesm2022/listbox.mjs
CHANGED
|
@@ -26,33 +26,33 @@ class CdkListbox {
|
|
|
26
26
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
27
27
|
_directionality = inject(Directionality);
|
|
28
28
|
/** The CdkOptions nested inside of the CdkListbox. */
|
|
29
|
-
_cdkOptions = contentChildren(CdkOption, { descendants: true });
|
|
29
|
+
_cdkOptions = contentChildren(CdkOption, ...(ngDevMode ? [{ debugName: "_cdkOptions", descendants: true }] : [{ descendants: true }]));
|
|
30
30
|
/** A signal wrapper for directionality. */
|
|
31
31
|
textDirection = toSignal(this._directionality.change, {
|
|
32
32
|
initialValue: this._directionality.value,
|
|
33
33
|
});
|
|
34
34
|
/** The Option UIPatterns of the child CdkOptions. */
|
|
35
|
-
items = computed(() => this._cdkOptions().map(option => option.pattern));
|
|
35
|
+
items = computed(() => this._cdkOptions().map(option => option.pattern), ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
36
36
|
/** Whether the list is vertically or horizontally oriented. */
|
|
37
|
-
orientation = input('vertical');
|
|
37
|
+
orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
38
38
|
/** Whether multiple items in the list can be selected at once. */
|
|
39
|
-
multi = input(false, { transform: booleanAttribute });
|
|
39
|
+
multi = input(false, ...(ngDevMode ? [{ debugName: "multi", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
40
40
|
/** Whether focus should wrap when navigating. */
|
|
41
|
-
wrap = input(true, { transform: booleanAttribute });
|
|
41
|
+
wrap = input(true, ...(ngDevMode ? [{ debugName: "wrap", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
42
42
|
/** Whether disabled items in the list should be skipped when navigating. */
|
|
43
|
-
skipDisabled = input(true, { transform: booleanAttribute });
|
|
43
|
+
skipDisabled = input(true, ...(ngDevMode ? [{ debugName: "skipDisabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
44
44
|
/** The focus strategy used by the list. */
|
|
45
|
-
focusMode = input('roving');
|
|
45
|
+
focusMode = input('roving', ...(ngDevMode ? [{ debugName: "focusMode" }] : []));
|
|
46
46
|
/** The selection strategy used by the list. */
|
|
47
|
-
selectionMode = input('follow');
|
|
47
|
+
selectionMode = input('follow', ...(ngDevMode ? [{ debugName: "selectionMode" }] : []));
|
|
48
48
|
/** The amount of time before the typeahead search is reset. */
|
|
49
|
-
typeaheadDelay = input(0.5); // Picked arbitrarily.
|
|
49
|
+
typeaheadDelay = input(0.5, ...(ngDevMode ? [{ debugName: "typeaheadDelay" }] : [])); // Picked arbitrarily.
|
|
50
50
|
/** Whether the listbox is disabled. */
|
|
51
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
51
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
52
52
|
/** Whether the listbox is readonly. */
|
|
53
|
-
readonly = input(false, { transform: booleanAttribute });
|
|
53
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
54
54
|
/** The values of the current selected items. */
|
|
55
|
-
value = model([]);
|
|
55
|
+
value = model([], ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
56
56
|
/** The Listbox UIPattern. */
|
|
57
57
|
pattern = new ListboxPattern({
|
|
58
58
|
...this,
|
|
@@ -61,7 +61,7 @@ class CdkListbox {
|
|
|
61
61
|
textDirection: this.textDirection,
|
|
62
62
|
});
|
|
63
63
|
/** Whether the listbox has received focus yet. */
|
|
64
|
-
_hasFocused = signal(false);
|
|
64
|
+
_hasFocused = signal(false, ...(ngDevMode ? [{ debugName: "_hasFocused" }] : []));
|
|
65
65
|
constructor() {
|
|
66
66
|
afterRenderEffect(() => {
|
|
67
67
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
@@ -80,10 +80,10 @@ class CdkListbox {
|
|
|
80
80
|
onFocus() {
|
|
81
81
|
this._hasFocused.set(true);
|
|
82
82
|
}
|
|
83
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkListbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.0.0", type: CdkListbox, isStandalone: true, selector: "[cdkListbox]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, skipDisabled: { classPropertyName: "skipDisabled", publicName: "skipDisabled", isSignal: true, isRequired: false, transformFunction: null }, focusMode: { classPropertyName: "focusMode", publicName: "focusMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, typeaheadDelay: { classPropertyName: "typeaheadDelay", publicName: "typeaheadDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "listbox" }, listeners: { "keydown": "pattern.onKeydown($event)", "pointerdown": "pattern.onPointerdown($event)", "focusin": "onFocus()" }, properties: { "attr.tabindex": "pattern.tabindex()", "attr.aria-readonly": "pattern.readonly()", "attr.aria-disabled": "pattern.disabled()", "attr.aria-orientation": "pattern.orientation()", "attr.aria-multiselectable": "pattern.multi()", "attr.aria-activedescendant": "pattern.activedescendant()" }, classAttribute: "cdk-listbox" }, queries: [{ propertyName: "_cdkOptions", predicate: CdkOption, descendants: true, isSignal: true }], exportAs: ["cdkListbox"], ngImport: i0 });
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkListbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.2.0-next.0", type: CdkListbox, isStandalone: true, selector: "[cdkListbox]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, skipDisabled: { classPropertyName: "skipDisabled", publicName: "skipDisabled", isSignal: true, isRequired: false, transformFunction: null }, focusMode: { classPropertyName: "focusMode", publicName: "focusMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, typeaheadDelay: { classPropertyName: "typeaheadDelay", publicName: "typeaheadDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "listbox" }, listeners: { "keydown": "pattern.onKeydown($event)", "pointerdown": "pattern.onPointerdown($event)", "focusin": "onFocus()" }, properties: { "attr.tabindex": "pattern.tabindex()", "attr.aria-readonly": "pattern.readonly()", "attr.aria-disabled": "pattern.disabled()", "attr.aria-orientation": "pattern.orientation()", "attr.aria-multiselectable": "pattern.multi()", "attr.aria-activedescendant": "pattern.activedescendant()" }, classAttribute: "cdk-listbox" }, queries: [{ propertyName: "_cdkOptions", predicate: CdkOption, descendants: true, isSignal: true }], exportAs: ["cdkListbox"], ngImport: i0 });
|
|
85
85
|
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkListbox, decorators: [{
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkListbox, decorators: [{
|
|
87
87
|
type: Directive,
|
|
88
88
|
args: [{
|
|
89
89
|
selector: '[cdkListbox]',
|
|
@@ -113,21 +113,21 @@ class CdkOption {
|
|
|
113
113
|
_generatedId = inject(_IdGenerator).getId('cdk-option-');
|
|
114
114
|
// TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.
|
|
115
115
|
/** A unique identifier for the option. */
|
|
116
|
-
id = computed(() => this._generatedId);
|
|
116
|
+
id = computed(() => this._generatedId, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
117
117
|
/** The value of the option. */
|
|
118
|
-
value = input.required();
|
|
118
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
119
119
|
// TODO(wagnermaciel): See if we want to change how we handle this since textContent is not
|
|
120
120
|
// reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.
|
|
121
121
|
/** The text used by the typeahead search. */
|
|
122
|
-
searchTerm = computed(() => this.label() ?? this.element().textContent);
|
|
122
|
+
searchTerm = computed(() => this.label() ?? this.element().textContent, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
123
123
|
/** The parent Listbox UIPattern. */
|
|
124
|
-
listbox = computed(() => this._cdkListbox.pattern);
|
|
124
|
+
listbox = computed(() => this._cdkListbox.pattern, ...(ngDevMode ? [{ debugName: "listbox" }] : []));
|
|
125
125
|
/** A reference to the option element to be focused on navigation. */
|
|
126
|
-
element = computed(() => this._elementRef.nativeElement);
|
|
126
|
+
element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
127
127
|
/** Whether an item is disabled. */
|
|
128
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
128
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
129
129
|
/** The text used by the typeahead search. */
|
|
130
|
-
label = input();
|
|
130
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
131
131
|
/** The Option UIPattern. */
|
|
132
132
|
pattern = new OptionPattern({
|
|
133
133
|
...this,
|
|
@@ -137,10 +137,10 @@ class CdkOption {
|
|
|
137
137
|
element: this.element,
|
|
138
138
|
searchTerm: this.searchTerm,
|
|
139
139
|
});
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
141
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: CdkOption, isStandalone: true, selector: "[cdkOption]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option" }, properties: { "class.cdk-active": "pattern.active()", "attr.id": "pattern.id()", "attr.tabindex": "pattern.tabindex()", "attr.aria-selected": "pattern.selected()", "attr.aria-disabled": "pattern.disabled()" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
141
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-next.0", type: CdkOption, isStandalone: true, selector: "[cdkOption]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option" }, properties: { "class.cdk-active": "pattern.active()", "attr.id": "pattern.id()", "attr.tabindex": "pattern.tabindex()", "attr.aria-selected": "pattern.selected()", "attr.aria-disabled": "pattern.disabled()" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
|
|
142
142
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkOption, decorators: [{
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkOption, decorators: [{
|
|
144
144
|
type: Directive,
|
|
145
145
|
args: [{
|
|
146
146
|
selector: '[cdkOption]',
|
package/fesm2022/listbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/listbox/listbox.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 contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport {ListboxPattern, OptionPattern} from '../ui-patterns';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {_IdGenerator} from '@angular/cdk/a11y';\n\n/**\n * A listbox container.\n *\n * Listboxes are used to display a list of items for a user to select from. The CdkListbox is meant\n * to be used in conjunction with CdkOption as follows:\n *\n * ```html\n * <ul cdkListbox>\n * <li [value]=\"1\" cdkOption>Item 1</li>\n * <li [value]=\"2\" cdkOption>Item 2</li>\n * <li [value]=\"3\" cdkOption>Item 3</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-readonly]': 'pattern.readonly()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-orientation]': 'pattern.orientation()',\n '[attr.aria-multiselectable]': 'pattern.multi()',\n '[attr.aria-activedescendant]': 'pattern.activedescendant()',\n '(keydown)': 'pattern.onKeydown($event)',\n '(pointerdown)': 'pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n})\nexport class CdkListbox<V> {\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** The CdkOptions nested inside of the CdkListbox. */\n private readonly _cdkOptions = contentChildren(CdkOption, {descendants: true});\n\n /** A signal wrapper for directionality. */\n protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The Option UIPatterns of the child CdkOptions. */\n protected items = computed(() => this._cdkOptions().map(option => option.pattern));\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n wrap = input(true, {transform: booleanAttribute});\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the list. */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The selection strategy used by the list. */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly = input(false, {transform: booleanAttribute});\n\n /** The values of the current selected items. */\n value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n pattern: ListboxPattern<V> = new ListboxPattern<V>({\n ...this,\n items: this.items,\n activeIndex: signal(0), // TODO: Use linkedSignal to ensure this doesn't get fked up.\n textDirection: this.textDirection,\n });\n\n /** Whether the listbox has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const violations = this.pattern.validate();\n for (const violation of violations) {\n console.error(violation);\n }\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this.pattern.setDefaultState();\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n}\n\n/** A selectable option in a CdkListbox. */\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '[class.cdk-active]': 'pattern.active()',\n '[attr.id]': 'pattern.id()',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-selected]': 'pattern.selected()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n },\n})\nexport class CdkOption<V> {\n /** A reference to the option element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent CdkListbox. */\n private readonly _cdkListbox = inject(CdkListbox);\n\n /** A unique identifier for the option. */\n private readonly _generatedId = inject(_IdGenerator).getId('cdk-option-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the option. */\n protected id = computed(() => this._generatedId);\n\n /** The value of the option. */\n protected value = input.required<V>();\n\n // TODO(wagnermaciel): See if we want to change how we handle this since textContent is not\n // reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.\n /** The text used by the typeahead search. */\n protected searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The parent Listbox UIPattern. */\n protected listbox = computed(() => this._cdkListbox.pattern);\n\n /** A reference to the option element to be focused on navigation. */\n protected element = computed(() => this._elementRef.nativeElement);\n\n /** Whether an item is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n label = input<string>();\n\n /** The Option UIPattern. */\n pattern = new OptionPattern<V>({\n ...this,\n id: this.id,\n value: this.value,\n listbox: this.listbox,\n element: this.element,\n searchTerm: this.searchTerm,\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;AAyBA;;;;;;;;;;;;;AAaG;MAkBU,UAAU,CAAA;;AAEJ,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;;IAGxC,WAAW,GAAG,eAAe,CAAC,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;;IAGpE,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;AAC9D,QAAA,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK;AACzC,KAAA,CAAC;;IAGQ,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;;AAGlF,IAAA,WAAW,GAAG,KAAK,CAA4B,UAAU,CAAC;;IAG1D,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,EAAC,SAAS,EAAE,gBAAgB,EAAC,CAAC;;IAGnD,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,EAAC,SAAS,EAAE,gBAAgB,EAAC,CAAC;;IAGjD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,EAAC,SAAS,EAAE,gBAAgB,EAAC,CAAC;;AAGzD,IAAA,SAAS,GAAG,KA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A,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,SAAA,EAAA,cAAA,EAAA,eAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,EAAA,cAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAbrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,QAAQ;AAChB,wBAAA,OAAO,EAAE,YAAY;AACrB,wBAAA,oBAAoB,EAAE,kBAAkB;AACxC,wBAAA,WAAW,EAAE,cAAc;AAC3B,wBAAA,iBAAiB,EAAE,oBAAoB;AACvC,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC7C,qBAAA;AACF,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"listbox.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/listbox/listbox.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 contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport {ListboxPattern, OptionPattern} from '../ui-patterns';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {_IdGenerator} from '@angular/cdk/a11y';\n\n/**\n * A listbox container.\n *\n * Listboxes are used to display a list of items for a user to select from. The CdkListbox is meant\n * to be used in conjunction with CdkOption as follows:\n *\n * ```html\n * <ul cdkListbox>\n * <li [value]=\"1\" cdkOption>Item 1</li>\n * <li [value]=\"2\" cdkOption>Item 2</li>\n * <li [value]=\"3\" cdkOption>Item 3</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-readonly]': 'pattern.readonly()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-orientation]': 'pattern.orientation()',\n '[attr.aria-multiselectable]': 'pattern.multi()',\n '[attr.aria-activedescendant]': 'pattern.activedescendant()',\n '(keydown)': 'pattern.onKeydown($event)',\n '(pointerdown)': 'pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n})\nexport class CdkListbox<V> {\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** The CdkOptions nested inside of the CdkListbox. */\n private readonly _cdkOptions = contentChildren(CdkOption, {descendants: true});\n\n /** A signal wrapper for directionality. */\n protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The Option UIPatterns of the child CdkOptions. */\n protected items = computed(() => this._cdkOptions().map(option => option.pattern));\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n wrap = input(true, {transform: booleanAttribute});\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the list. */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The selection strategy used by the list. */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly = input(false, {transform: booleanAttribute});\n\n /** The values of the current selected items. */\n value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n pattern: ListboxPattern<V> = new ListboxPattern<V>({\n ...this,\n items: this.items,\n activeIndex: signal(0), // TODO: Use linkedSignal to ensure this doesn't get fked up.\n textDirection: this.textDirection,\n });\n\n /** Whether the listbox has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const violations = this.pattern.validate();\n for (const violation of violations) {\n console.error(violation);\n }\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this.pattern.setDefaultState();\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n}\n\n/** A selectable option in a CdkListbox. */\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '[class.cdk-active]': 'pattern.active()',\n '[attr.id]': 'pattern.id()',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-selected]': 'pattern.selected()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n },\n})\nexport class CdkOption<V> {\n /** A reference to the option element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent CdkListbox. */\n private readonly _cdkListbox = inject(CdkListbox);\n\n /** A unique identifier for the option. */\n private readonly _generatedId = inject(_IdGenerator).getId('cdk-option-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the option. */\n protected id = computed(() => this._generatedId);\n\n /** The value of the option. */\n protected value = input.required<V>();\n\n // TODO(wagnermaciel): See if we want to change how we handle this since textContent is not\n // reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.\n /** The text used by the typeahead search. */\n protected searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The parent Listbox UIPattern. */\n protected listbox = computed(() => this._cdkListbox.pattern);\n\n /** A reference to the option element to be focused on navigation. */\n protected element = computed(() => this._elementRef.nativeElement);\n\n /** Whether an item is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n label = input<string>();\n\n /** The Option UIPattern. */\n pattern = new OptionPattern<V>({\n ...this,\n id: this.id,\n value: this.value,\n listbox: this.listbox,\n element: this.element,\n searchTerm: this.searchTerm,\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;AAyBA;;;;;;;;;;;;;AAaG;MAkBU,UAAU,CAAA;;AAEJ,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;;AAGxC,IAAA,WAAW,GAAG,eAAe,CAAC,SAAS,+CAAG,WAAW,EAAE,IAAI,EAAA,CAAA,GAAA,CAAlB,EAAC,WAAW,EAAE,IAAI,EAAC,GAAC;;IAGpE,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;AAC9D,QAAA,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK;AACzC,KAAA,CAAC;;IAGQ,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;;AAGlF,IAAA,WAAW,GAAG,KAAK,CAA4B,UAAU,uDAAC;;AAG1D,IAAA,KAAK,GAAG,KAAK,CAAC,KAAK,yCAAG,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA5B,EAAC,SAAS,EAAE,gBAAgB,EAAC,GAAC;;AAGnD,IAAA,IAAI,GAAG,KAAK,CAAC,IAAI,wCAAG,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA5B,EAAC,SAAS,EAAE,gBAAgB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AAW;AACrB,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,QAAQ;AAChB,wBAAA,OAAO,EAAE,YAAY;AACrB,wBAAA,oBAAoB,EAAE,kBAAkB;AACxC,wBAAA,WAAW,EAAE,cAAc;AAC3B,wBAAA,iBAAiB,EAAE,oBAAoB;AACvC,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC7C,qBAAA;AACF,iBAAA;;;;;"}
|
|
@@ -200,10 +200,10 @@ class EditEventDispatcher {
|
|
|
200
200
|
_mapAllRowsToSingleRow(mapper) {
|
|
201
201
|
return this.allRows.pipe(map(mapper), this._startWithNullDistinct);
|
|
202
202
|
}
|
|
203
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditEventDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
204
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditEventDispatcher });
|
|
203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditEventDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
204
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditEventDispatcher });
|
|
205
205
|
}
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditEventDispatcher, decorators: [{
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditEventDispatcher, decorators: [{
|
|
207
207
|
type: Injectable
|
|
208
208
|
}], ctorParameters: () => [] });
|
|
209
209
|
function computeHoverContentState([firstRow, lastRow, activeRow, hoverRow,]) {
|
|
@@ -302,10 +302,10 @@ class EditRef {
|
|
|
302
302
|
reset(value) {
|
|
303
303
|
this._form.reset(value || this._revertFormValue);
|
|
304
304
|
}
|
|
305
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
306
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditRef });
|
|
305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
306
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditRef });
|
|
307
307
|
}
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditRef, decorators: [{
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditRef, decorators: [{
|
|
309
309
|
type: Injectable
|
|
310
310
|
}], ctorParameters: () => [] });
|
|
311
311
|
|
|
@@ -374,10 +374,10 @@ class FocusDispatcher {
|
|
|
374
374
|
}
|
|
375
375
|
event.preventDefault();
|
|
376
376
|
}
|
|
377
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
378
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusDispatcher, providedIn: 'root' });
|
|
377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: FocusDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
378
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: FocusDispatcher, providedIn: 'root' });
|
|
379
379
|
}
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusDispatcher, decorators: [{
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: FocusDispatcher, decorators: [{
|
|
381
381
|
type: Injectable,
|
|
382
382
|
args: [{ providedIn: 'root' }]
|
|
383
383
|
}], ctorParameters: () => [] });
|
|
@@ -495,10 +495,10 @@ class CdkEditControl {
|
|
|
495
495
|
_triggerFormSubmit() {
|
|
496
496
|
this.elementRef.nativeElement.dispatchEvent(new Event('submit'));
|
|
497
497
|
}
|
|
498
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
499
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkEditControl, isStandalone: true, selector: "form[cdkEditControl]", inputs: { clickOutBehavior: ["cdkEditControlClickOutBehavior", "clickOutBehavior"], preservedFormValue: ["cdkEditControlPreservedFormValue", "preservedFormValue"], ignoreSubmitUnlessValid: ["cdkEditControlIgnoreSubmitUnlessValid", "ignoreSubmitUnlessValid"] }, outputs: { preservedFormValueChange: "cdkEditControlPreservedFormValueChange" }, host: { listeners: { "ngSubmit": "handleFormSubmit()", "document:click": "handlePossibleClickOut($event)", "keydown": "_handleKeydown($event)" } }, providers: [EditRef], ngImport: i0 });
|
|
498
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
499
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkEditControl, isStandalone: true, selector: "form[cdkEditControl]", inputs: { clickOutBehavior: ["cdkEditControlClickOutBehavior", "clickOutBehavior"], preservedFormValue: ["cdkEditControlPreservedFormValue", "preservedFormValue"], ignoreSubmitUnlessValid: ["cdkEditControlIgnoreSubmitUnlessValid", "ignoreSubmitUnlessValid"] }, outputs: { preservedFormValueChange: "cdkEditControlPreservedFormValueChange" }, host: { listeners: { "ngSubmit": "handleFormSubmit()", "document:click": "handlePossibleClickOut($event)", "keydown": "_handleKeydown($event)" } }, providers: [EditRef], ngImport: i0 });
|
|
500
500
|
}
|
|
501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditControl, decorators: [{
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditControl, decorators: [{
|
|
502
502
|
type: Directive,
|
|
503
503
|
args: [{
|
|
504
504
|
selector: 'form[cdkEditControl]',
|
|
@@ -524,10 +524,10 @@ class CdkEditRevert {
|
|
|
524
524
|
revertEdit() {
|
|
525
525
|
this.editRef.reset();
|
|
526
526
|
}
|
|
527
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditRevert, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
528
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkEditRevert, isStandalone: true, selector: "button[cdkEditRevert]", inputs: { type: "type" }, host: { attributes: { "type": "button" }, listeners: { "click": "revertEdit()" } }, ngImport: i0 });
|
|
527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditRevert, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
528
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkEditRevert, isStandalone: true, selector: "button[cdkEditRevert]", inputs: { type: "type" }, host: { attributes: { "type": "button" }, listeners: { "click": "revertEdit()" } }, ngImport: i0 });
|
|
529
529
|
}
|
|
530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditRevert, decorators: [{
|
|
530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditRevert, decorators: [{
|
|
531
531
|
type: Directive,
|
|
532
532
|
args: [{
|
|
533
533
|
selector: 'button[cdkEditRevert]',
|
|
@@ -558,10 +558,10 @@ class CdkEditClose {
|
|
|
558
558
|
// the same event sequence if focus was moved quickly.
|
|
559
559
|
this.editRef.close();
|
|
560
560
|
}
|
|
561
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
562
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkEditClose, isStandalone: true, selector: "[cdkEditClose]", host: { listeners: { "click": "closeEdit()", "keydown.enter": "closeEdit()", "keydown.space": "closeEdit()" } }, ngImport: i0 });
|
|
561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
562
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkEditClose, isStandalone: true, selector: "[cdkEditClose]", host: { listeners: { "click": "closeEdit()", "keydown.enter": "closeEdit()", "keydown.space": "closeEdit()" } }, ngImport: i0 });
|
|
563
563
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditClose, decorators: [{
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditClose, decorators: [{
|
|
565
565
|
type: Directive,
|
|
566
566
|
args: [{
|
|
567
567
|
selector: '[cdkEditClose]',
|
|
@@ -587,10 +587,10 @@ class EditServices {
|
|
|
587
587
|
ngZone = inject(NgZone);
|
|
588
588
|
scrollDispatcher = inject(ScrollDispatcher);
|
|
589
589
|
viewportRuler = inject(ViewportRuler);
|
|
590
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
591
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditServices });
|
|
590
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
591
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditServices });
|
|
592
592
|
}
|
|
593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: EditServices, decorators: [{
|
|
593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: EditServices, decorators: [{
|
|
594
594
|
type: Injectable
|
|
595
595
|
}] });
|
|
596
596
|
|
|
@@ -637,10 +637,10 @@ class FocusEscapeNotifierFactory {
|
|
|
637
637
|
create(element) {
|
|
638
638
|
return new FocusEscapeNotifier(element, this._checker, this._ngZone, this._document);
|
|
639
639
|
}
|
|
640
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusEscapeNotifierFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
641
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusEscapeNotifierFactory, providedIn: 'root' });
|
|
640
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: FocusEscapeNotifierFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
641
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: FocusEscapeNotifierFactory, providedIn: 'root' });
|
|
642
642
|
}
|
|
643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusEscapeNotifierFactory, decorators: [{
|
|
643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: FocusEscapeNotifierFactory, decorators: [{
|
|
644
644
|
type: Injectable,
|
|
645
645
|
args: [{ providedIn: 'root' }]
|
|
646
646
|
}] });
|
|
@@ -753,10 +753,10 @@ class CdkEditable {
|
|
|
753
753
|
.subscribe(this.focusDispatcher.keyObserver);
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
757
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkEditable, isStandalone: true, selector: "table[editable], cdk-table[editable], mat-table[editable]", providers: [EditEventDispatcher, EditServices], ngImport: i0 });
|
|
756
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
757
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkEditable, isStandalone: true, selector: "table[editable], cdk-table[editable], mat-table[editable]", providers: [EditEventDispatcher, EditServices], ngImport: i0 });
|
|
758
758
|
}
|
|
759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditable, decorators: [{
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditable, decorators: [{
|
|
760
760
|
type: Directive,
|
|
761
761
|
args: [{
|
|
762
762
|
selector: 'table[editable], cdk-table[editable], mat-table[editable]',
|
|
@@ -953,10 +953,10 @@ class CdkPopoverEdit {
|
|
|
953
953
|
}
|
|
954
954
|
return { width: lastCell.getBoundingClientRect().right - firstCell.getBoundingClientRect().left };
|
|
955
955
|
}
|
|
956
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEdit, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
957
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkPopoverEdit, isStandalone: true, selector: "[cdkPopoverEdit]:not([cdkPopoverEditTabOut])", inputs: { template: ["cdkPopoverEdit", "template"], context: ["cdkPopoverEditContext", "context"], colspan: ["cdkPopoverEditColspan", "colspan"], disabled: ["cdkPopoverEditDisabled", "disabled"], ariaLabel: ["cdkPopoverEditAriaLabel", "ariaLabel"] }, host: { properties: { "attr.tabindex": "disabled ? null : 0", "attr.aria-haspopup": "!disabled" }, classAttribute: "cdk-popover-edit-cell" }, ngImport: i0 });
|
|
956
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEdit, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
957
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkPopoverEdit, isStandalone: true, selector: "[cdkPopoverEdit]:not([cdkPopoverEditTabOut])", inputs: { template: ["cdkPopoverEdit", "template"], context: ["cdkPopoverEditContext", "context"], colspan: ["cdkPopoverEditColspan", "colspan"], disabled: ["cdkPopoverEditDisabled", "disabled"], ariaLabel: ["cdkPopoverEditAriaLabel", "ariaLabel"] }, host: { properties: { "attr.tabindex": "disabled ? null : 0", "attr.aria-haspopup": "!disabled" }, classAttribute: "cdk-popover-edit-cell" }, ngImport: i0 });
|
|
958
958
|
}
|
|
959
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEdit, decorators: [{
|
|
959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEdit, decorators: [{
|
|
960
960
|
type: Directive,
|
|
961
961
|
args: [{
|
|
962
962
|
selector: '[cdkPopoverEdit]:not([cdkPopoverEditTabOut])',
|
|
@@ -983,10 +983,10 @@ class CdkPopoverEditTabOut extends CdkPopoverEdit {
|
|
|
983
983
|
this.closeEditOverlay();
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEditTabOut, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
987
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkPopoverEditTabOut, isStandalone: true, selector: "[cdkPopoverEdit][cdkPopoverEditTabOut]", inputs: { template: ["cdkPopoverEdit", "template"], context: ["cdkPopoverEditContext", "context"], colspan: ["cdkPopoverEditColspan", "colspan"], disabled: ["cdkPopoverEditDisabled", "disabled"], ariaLabel: ["cdkPopoverEditAriaLabel", "ariaLabel"] }, host: { properties: { "attr.tabindex": "disabled ? null : 0", "attr.aria-haspopup": "!disabled" }, classAttribute: "cdk-popover-edit-cell" }, usesInheritance: true, ngImport: i0 });
|
|
986
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEditTabOut, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
987
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkPopoverEditTabOut, isStandalone: true, selector: "[cdkPopoverEdit][cdkPopoverEditTabOut]", inputs: { template: ["cdkPopoverEdit", "template"], context: ["cdkPopoverEditContext", "context"], colspan: ["cdkPopoverEditColspan", "colspan"], disabled: ["cdkPopoverEditDisabled", "disabled"], ariaLabel: ["cdkPopoverEditAriaLabel", "ariaLabel"] }, host: { properties: { "attr.tabindex": "disabled ? null : 0", "attr.aria-haspopup": "!disabled" }, classAttribute: "cdk-popover-edit-cell" }, usesInheritance: true, ngImport: i0 });
|
|
988
988
|
}
|
|
989
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEditTabOut, decorators: [{
|
|
989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEditTabOut, decorators: [{
|
|
990
990
|
type: Directive,
|
|
991
991
|
args: [{
|
|
992
992
|
selector: '[cdkPopoverEdit][cdkPopoverEditTabOut]',
|
|
@@ -1070,10 +1070,10 @@ class CdkRowHoverContent {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkRowHoverContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1074
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkRowHoverContent, isStandalone: true, selector: "[cdkRowHoverContent]", ngImport: i0 });
|
|
1073
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkRowHoverContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1074
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkRowHoverContent, isStandalone: true, selector: "[cdkRowHoverContent]", ngImport: i0 });
|
|
1075
1075
|
}
|
|
1076
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkRowHoverContent, decorators: [{
|
|
1076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkRowHoverContent, decorators: [{
|
|
1077
1077
|
type: Directive,
|
|
1078
1078
|
args: [{
|
|
1079
1079
|
selector: '[cdkRowHoverContent]',
|
|
@@ -1098,10 +1098,10 @@ class CdkEditOpen {
|
|
|
1098
1098
|
this.editEventDispatcher.editing.next(closest(this.elementRef.nativeElement, CELL_SELECTOR));
|
|
1099
1099
|
evt.stopPropagation();
|
|
1100
1100
|
}
|
|
1101
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1102
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CdkEditOpen, isStandalone: true, selector: "[cdkEditOpen]", host: { listeners: { "click": "openEdit($event)" } }, ngImport: i0 });
|
|
1101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1102
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.0", type: CdkEditOpen, isStandalone: true, selector: "[cdkEditOpen]", host: { listeners: { "click": "openEdit($event)" } }, ngImport: i0 });
|
|
1103
1103
|
}
|
|
1104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkEditOpen, decorators: [{
|
|
1104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkEditOpen, decorators: [{
|
|
1105
1105
|
type: Directive,
|
|
1106
1106
|
args: [{
|
|
1107
1107
|
selector: '[cdkEditOpen]',
|
|
@@ -1122,8 +1122,8 @@ const EXPORTED_DECLARATIONS = [
|
|
|
1122
1122
|
CdkEditOpen,
|
|
1123
1123
|
];
|
|
1124
1124
|
class CdkPopoverEditModule {
|
|
1125
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1126
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEditModule, imports: [OverlayModule, CdkPopoverEdit,
|
|
1125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1126
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEditModule, imports: [OverlayModule, CdkPopoverEdit,
|
|
1127
1127
|
CdkPopoverEditTabOut,
|
|
1128
1128
|
CdkRowHoverContent,
|
|
1129
1129
|
CdkEditControl,
|
|
@@ -1138,9 +1138,9 @@ class CdkPopoverEditModule {
|
|
|
1138
1138
|
CdkEditClose,
|
|
1139
1139
|
CdkEditable,
|
|
1140
1140
|
CdkEditOpen] });
|
|
1141
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEditModule, imports: [OverlayModule] });
|
|
1141
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEditModule, imports: [OverlayModule] });
|
|
1142
1142
|
}
|
|
1143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CdkPopoverEditModule, decorators: [{
|
|
1143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.0", ngImport: i0, type: CdkPopoverEditModule, decorators: [{
|
|
1144
1144
|
type: NgModule,
|
|
1145
1145
|
args: [{
|
|
1146
1146
|
imports: [OverlayModule, ...EXPORTED_DECLARATIONS],
|