@angular/cdk-experimental 19.0.0-next.0 → 19.0.0-next.10
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/column-resize/index.d.ts +5 -13
- package/combobox/index.d.ts +5 -11
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +112 -131
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +38 -49
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +121 -133
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +7 -8
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +43 -81
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +17 -31
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/package.json +2 -16
- package/popover-edit/index.d.ts +11 -19
- package/selection/index.d.ts +6 -10
- package/table-scroll-container/index.d.ts +3 -6
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +0 -43
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +0 -43
- package/esm2022/column-resize/column-resize-directives/constants.mjs +0 -21
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +0 -49
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +0 -49
- package/esm2022/column-resize/column-resize-module.mjs +0 -46
- package/esm2022/column-resize/column-resize-notifier.mjs +0 -52
- package/esm2022/column-resize/column-resize.mjs +0 -82
- package/esm2022/column-resize/column-resize_public_index.mjs +0 -5
- package/esm2022/column-resize/column-size-store.mjs +0 -20
- package/esm2022/column-resize/event-dispatcher.mjs +0 -70
- package/esm2022/column-resize/index.mjs +0 -9
- package/esm2022/column-resize/overlay-handle.mjs +0 -146
- package/esm2022/column-resize/public-api.mjs +0 -21
- package/esm2022/column-resize/resizable.mjs +0 -199
- package/esm2022/column-resize/resize-ref.mjs +0 -17
- package/esm2022/column-resize/resize-strategy.mjs +0 -239
- package/esm2022/column-resize/selectors.mjs +0 -13
- package/esm2022/combobox/combobox-module.mjs +0 -26
- package/esm2022/combobox/combobox-popup.mjs +0 -73
- package/esm2022/combobox/combobox.mjs +0 -281
- package/esm2022/combobox/combobox_public_index.mjs +0 -5
- package/esm2022/combobox/index.mjs +0 -9
- package/esm2022/combobox/public-api.mjs +0 -11
- package/esm2022/index.mjs +0 -9
- package/esm2022/popover-edit/constants.mjs +0 -20
- package/esm2022/popover-edit/edit-event-dispatcher.mjs +0 -227
- package/esm2022/popover-edit/edit-ref.mjs +0 -83
- package/esm2022/popover-edit/edit-services.mjs +0 -45
- package/esm2022/popover-edit/focus-dispatcher.mjs +0 -82
- package/esm2022/popover-edit/focus-escape-notifier.mjs +0 -69
- package/esm2022/popover-edit/form-value-container.mjs +0 -33
- package/esm2022/popover-edit/index.mjs +0 -9
- package/esm2022/popover-edit/lens-directives.mjs +0 -185
- package/esm2022/popover-edit/polyfill.mjs +0 -19
- package/esm2022/popover-edit/popover-edit-module.mjs +0 -49
- package/esm2022/popover-edit/popover-edit_public_index.mjs +0 -5
- package/esm2022/popover-edit/public-api.mjs +0 -18
- package/esm2022/popover-edit/table-directives.mjs +0 -441
- package/esm2022/public-api.mjs +0 -9
- package/esm2022/scrolling/auto-size-virtual-scroll.mjs +0 -422
- package/esm2022/scrolling/index.mjs +0 -9
- package/esm2022/scrolling/public-api.mjs +0 -10
- package/esm2022/scrolling/scrolling-module.mjs +0 -23
- package/esm2022/scrolling/scrolling_public_index.mjs +0 -5
- package/esm2022/selection/index.mjs +0 -9
- package/esm2022/selection/public-api.mjs +0 -15
- package/esm2022/selection/row-selection.mjs +0 -52
- package/esm2022/selection/select-all.mjs +0 -101
- package/esm2022/selection/selection-column.mjs +0 -147
- package/esm2022/selection/selection-module.mjs +0 -44
- package/esm2022/selection/selection-set.mjs +0 -80
- package/esm2022/selection/selection-toggle.mjs +0 -101
- package/esm2022/selection/selection.mjs +0 -187
- package/esm2022/selection/selection_public_index.mjs +0 -5
- package/esm2022/table-scroll-container/index.mjs +0 -9
- package/esm2022/table-scroll-container/public-api.mjs +0 -10
- package/esm2022/table-scroll-container/table-scroll-container-module.mjs +0 -23
- package/esm2022/table-scroll-container/table-scroll-container.mjs +0 -141
- package/esm2022/table-scroll-container/table-scroll-container_public_index.mjs +0 -5
- package/esm2022/version.mjs +0 -11
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, NgZone, Injectable, Injector, afterNextRender, ElementRef, EventEmitter, Directive, Input, afterRender, ViewContainerRef, TemplateRef, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, pipe, combineLatest, Observable, fromEvent, fromEventPattern, merge } from 'rxjs';
|
|
4
4
|
import { distinctUntilChanged, startWith, shareReplay, filter, map, auditTime, audit, debounceTime, skip, takeUntil, mapTo, throttleTime, share, withLatestFrom } from 'rxjs/operators';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import { ControlContainer } from '@angular/forms';
|
|
6
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
7
7
|
import { RIGHT_ARROW, LEFT_ARROW, DOWN_ARROW, UP_ARROW, hasModifierKey } from '@angular/cdk/keycodes';
|
|
8
|
-
import
|
|
9
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
8
|
+
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
10
9
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import * as i6 from '@angular/cdk/scrolling';
|
|
10
|
+
import { FocusTrapFactory, FocusTrap, InteractivityChecker } from '@angular/cdk/a11y';
|
|
11
|
+
import { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';
|
|
14
12
|
import { DOCUMENT } from '@angular/common';
|
|
15
13
|
|
|
16
14
|
/** Selector for finding table cells. */
|
|
@@ -65,8 +63,8 @@ class EditEventDispatcher {
|
|
|
65
63
|
get editRef() {
|
|
66
64
|
return this._editRef;
|
|
67
65
|
}
|
|
68
|
-
constructor(
|
|
69
|
-
this._ngZone =
|
|
66
|
+
constructor() {
|
|
67
|
+
this._ngZone = inject(NgZone);
|
|
70
68
|
/** A subject that indicates which table cell is currently editing (unless it is disabled). */
|
|
71
69
|
this.editing = new Subject();
|
|
72
70
|
/** A subject that indicates which table row is currently hovered. */
|
|
@@ -212,12 +210,12 @@ class EditEventDispatcher {
|
|
|
212
210
|
_mapAllRowsToSingleRow(mapper) {
|
|
213
211
|
return this.allRows.pipe(map(mapper), this._startWithNullDistinct);
|
|
214
212
|
}
|
|
215
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
216
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
213
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditEventDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
214
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditEventDispatcher }); }
|
|
217
215
|
}
|
|
218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditEventDispatcher, decorators: [{
|
|
219
217
|
type: Injectable
|
|
220
|
-
}], ctorParameters: () => [
|
|
218
|
+
}], ctorParameters: () => [] });
|
|
221
219
|
function computeHoverContentState([firstRow, lastRow, activeRow, hoverRow,]) {
|
|
222
220
|
const hoverContentState = new Map();
|
|
223
221
|
// Add focusable rows.
|
|
@@ -257,9 +255,9 @@ function areMapEntriesEqual(a, b) {
|
|
|
257
255
|
* table that launched it. Provided by CdkEditControl within the lens.
|
|
258
256
|
*/
|
|
259
257
|
class EditRef {
|
|
260
|
-
constructor(
|
|
261
|
-
this._form =
|
|
262
|
-
this._editEventDispatcher =
|
|
258
|
+
constructor() {
|
|
259
|
+
this._form = inject(ControlContainer, { self: true });
|
|
260
|
+
this._editEventDispatcher = inject(EditEventDispatcher);
|
|
263
261
|
/** Emits the final value of this edit instance before closing. */
|
|
264
262
|
this._finalValueSubject = new Subject();
|
|
265
263
|
this.finalValue = this._finalValueSubject;
|
|
@@ -312,22 +310,20 @@ class EditRef {
|
|
|
312
310
|
reset(value) {
|
|
313
311
|
this._form.reset(value || this._revertFormValue);
|
|
314
312
|
}
|
|
315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
316
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
314
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditRef }); }
|
|
317
315
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditRef, decorators: [{
|
|
319
317
|
type: Injectable
|
|
320
|
-
}], ctorParameters: () => [
|
|
321
|
-
type: Self
|
|
322
|
-
}] }, { type: EditEventDispatcher }] });
|
|
318
|
+
}], ctorParameters: () => [] });
|
|
323
319
|
|
|
324
320
|
/**
|
|
325
321
|
* Service responsible for moving cell focus around in response to keyboard events.
|
|
326
322
|
* May be overridden to customize the keyboard behavior of popover edit.
|
|
327
323
|
*/
|
|
328
324
|
class FocusDispatcher {
|
|
329
|
-
constructor(
|
|
330
|
-
this.directionality =
|
|
325
|
+
constructor() {
|
|
326
|
+
this.directionality = inject(Directionality);
|
|
331
327
|
this.keyObserver = { next: event => this.handleKeyboardEvent(event) };
|
|
332
328
|
}
|
|
333
329
|
/**
|
|
@@ -381,13 +377,13 @@ class FocusDispatcher {
|
|
|
381
377
|
}
|
|
382
378
|
event.preventDefault();
|
|
383
379
|
}
|
|
384
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
385
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
380
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: FocusDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
381
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: FocusDispatcher, providedIn: 'root' }); }
|
|
386
382
|
}
|
|
387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: FocusDispatcher, decorators: [{
|
|
388
384
|
type: Injectable,
|
|
389
385
|
args: [{ providedIn: 'root' }]
|
|
390
|
-
}], ctorParameters: () => [
|
|
386
|
+
}], ctorParameters: () => [] });
|
|
391
387
|
|
|
392
388
|
/**
|
|
393
389
|
* A convenience class for preserving unsaved form state while an edit lens is closed.
|
|
@@ -422,9 +418,9 @@ class FormValueContainer {
|
|
|
422
418
|
* out.
|
|
423
419
|
*/
|
|
424
420
|
class CdkEditControl {
|
|
425
|
-
constructor(
|
|
426
|
-
this.elementRef =
|
|
427
|
-
this.editRef =
|
|
421
|
+
constructor() {
|
|
422
|
+
this.elementRef = inject(ElementRef);
|
|
423
|
+
this.editRef = inject(EditRef);
|
|
428
424
|
this.destroyed = new Subject();
|
|
429
425
|
/**
|
|
430
426
|
* Specifies what should happen when the user clicks outside of the edit lens.
|
|
@@ -502,10 +498,10 @@ class CdkEditControl {
|
|
|
502
498
|
_triggerFormSubmit() {
|
|
503
499
|
this.elementRef.nativeElement.dispatchEvent(new Event('submit'));
|
|
504
500
|
}
|
|
505
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
506
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
502
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", 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 }); }
|
|
507
503
|
}
|
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditControl, decorators: [{
|
|
509
505
|
type: Directive,
|
|
510
506
|
args: [{
|
|
511
507
|
selector: 'form[cdkEditControl]',
|
|
@@ -521,23 +517,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0-next.2",
|
|
|
521
517
|
'(document:click)': 'handlePossibleClickOut($event)',
|
|
522
518
|
'(keydown)': '_handleKeydown($event)',
|
|
523
519
|
},
|
|
524
|
-
standalone: true,
|
|
525
520
|
}]
|
|
526
|
-
}]
|
|
521
|
+
}] });
|
|
527
522
|
/** Reverts the form to its initial or previously submitted state on click. */
|
|
528
523
|
class CdkEditRevert {
|
|
529
|
-
constructor(
|
|
530
|
-
this.editRef =
|
|
524
|
+
constructor() {
|
|
525
|
+
this.editRef = inject(EditRef);
|
|
531
526
|
/** Type of the button. Defaults to `button` to avoid accident form submits. */
|
|
532
527
|
this.type = 'button';
|
|
533
528
|
}
|
|
534
529
|
revertEdit() {
|
|
535
530
|
this.editRef.reset();
|
|
536
531
|
}
|
|
537
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
538
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
532
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditRevert, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
533
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkEditRevert, isStandalone: true, selector: "button[cdkEditRevert]", inputs: { type: "type" }, host: { attributes: { "type": "button" }, listeners: { "click": "revertEdit()" } }, ngImport: i0 }); }
|
|
539
534
|
}
|
|
540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditRevert, decorators: [{
|
|
541
536
|
type: Directive,
|
|
542
537
|
args: [{
|
|
543
538
|
selector: 'button[cdkEditRevert]',
|
|
@@ -545,17 +540,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0-next.2",
|
|
|
545
540
|
'type': 'button',
|
|
546
541
|
'(click)': 'revertEdit()',
|
|
547
542
|
},
|
|
548
|
-
standalone: true,
|
|
549
543
|
}]
|
|
550
|
-
}],
|
|
544
|
+
}], propDecorators: { type: [{
|
|
551
545
|
type: Input
|
|
552
546
|
}] } });
|
|
553
547
|
/** Closes the lens on click. */
|
|
554
548
|
class CdkEditClose {
|
|
555
|
-
constructor(
|
|
556
|
-
this.elementRef =
|
|
557
|
-
this.editRef =
|
|
558
|
-
const nativeElement = elementRef.nativeElement;
|
|
549
|
+
constructor() {
|
|
550
|
+
this.elementRef = inject(ElementRef);
|
|
551
|
+
this.editRef = inject(EditRef);
|
|
552
|
+
const nativeElement = this.elementRef.nativeElement;
|
|
559
553
|
// Prevent accidental form submits.
|
|
560
554
|
if (nativeElement.nodeName === 'BUTTON' && !nativeElement.getAttribute('type')) {
|
|
561
555
|
nativeElement.setAttribute('type', 'button');
|
|
@@ -569,10 +563,10 @@ class CdkEditClose {
|
|
|
569
563
|
// the same event sequence if focus was moved quickly.
|
|
570
564
|
this.editRef.close();
|
|
571
565
|
}
|
|
572
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
573
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
566
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
567
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkEditClose, isStandalone: true, selector: "[cdkEditClose]", host: { listeners: { "click": "closeEdit()", "keydown.enter": "closeEdit()", "keydown.space": "closeEdit()" } }, ngImport: i0 }); }
|
|
574
568
|
}
|
|
575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditClose, decorators: [{
|
|
576
570
|
type: Directive,
|
|
577
571
|
args: [{
|
|
578
572
|
selector: '[cdkEditClose]',
|
|
@@ -581,9 +575,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0-next.2",
|
|
|
581
575
|
'(keydown.enter)': 'closeEdit()',
|
|
582
576
|
'(keydown.space)': 'closeEdit()',
|
|
583
577
|
},
|
|
584
|
-
standalone: true,
|
|
585
578
|
}]
|
|
586
|
-
}], ctorParameters: () => [
|
|
579
|
+
}], ctorParameters: () => [] });
|
|
587
580
|
|
|
588
581
|
/**
|
|
589
582
|
* Optimization
|
|
@@ -592,22 +585,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0-next.2",
|
|
|
592
585
|
* and 56 bytes of memory per instance.
|
|
593
586
|
*/
|
|
594
587
|
class EditServices {
|
|
595
|
-
constructor(
|
|
596
|
-
this.directionality =
|
|
597
|
-
this.editEventDispatcher =
|
|
598
|
-
this.focusDispatcher =
|
|
599
|
-
this.focusTrapFactory =
|
|
600
|
-
this.ngZone =
|
|
601
|
-
this.overlay =
|
|
602
|
-
this.scrollDispatcher =
|
|
603
|
-
this.viewportRuler =
|
|
604
|
-
}
|
|
605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
606
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
588
|
+
constructor() {
|
|
589
|
+
this.directionality = inject(Directionality);
|
|
590
|
+
this.editEventDispatcher = inject(EditEventDispatcher);
|
|
591
|
+
this.focusDispatcher = inject(FocusDispatcher);
|
|
592
|
+
this.focusTrapFactory = inject(FocusTrapFactory);
|
|
593
|
+
this.ngZone = inject(NgZone);
|
|
594
|
+
this.overlay = inject(Overlay);
|
|
595
|
+
this.scrollDispatcher = inject(ScrollDispatcher);
|
|
596
|
+
this.viewportRuler = inject(ViewportRuler);
|
|
597
|
+
}
|
|
598
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
599
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditServices }); }
|
|
607
600
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: EditServices, decorators: [{
|
|
609
602
|
type: Injectable
|
|
610
|
-
}]
|
|
603
|
+
}] });
|
|
611
604
|
|
|
612
605
|
/** Value indicating whether focus left the target area before or after the enclosed elements. */
|
|
613
606
|
var FocusEscapeNotifierDirection;
|
|
@@ -641,10 +634,10 @@ class FocusEscapeNotifier extends FocusTrap {
|
|
|
641
634
|
}
|
|
642
635
|
/** Factory that allows easy instantiation of focus escape notifiers. */
|
|
643
636
|
class FocusEscapeNotifierFactory {
|
|
644
|
-
constructor(
|
|
645
|
-
this._checker =
|
|
646
|
-
this._ngZone =
|
|
647
|
-
this._document =
|
|
637
|
+
constructor() {
|
|
638
|
+
this._checker = inject(InteractivityChecker);
|
|
639
|
+
this._ngZone = inject(NgZone);
|
|
640
|
+
this._document = inject(DOCUMENT);
|
|
648
641
|
}
|
|
649
642
|
/**
|
|
650
643
|
* Creates a focus escape notifier region around the given element.
|
|
@@ -654,16 +647,13 @@ class FocusEscapeNotifierFactory {
|
|
|
654
647
|
create(element) {
|
|
655
648
|
return new FocusEscapeNotifier(element, this._checker, this._ngZone, this._document);
|
|
656
649
|
}
|
|
657
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
658
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
650
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: FocusEscapeNotifierFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
651
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: FocusEscapeNotifierFactory, providedIn: 'root' }); }
|
|
659
652
|
}
|
|
660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: FocusEscapeNotifierFactory, decorators: [{
|
|
661
654
|
type: Injectable,
|
|
662
655
|
args: [{ providedIn: 'root' }]
|
|
663
|
-
}]
|
|
664
|
-
type: Inject,
|
|
665
|
-
args: [DOCUMENT]
|
|
666
|
-
}] }] });
|
|
656
|
+
}] });
|
|
667
657
|
|
|
668
658
|
/** Used for rate-limiting mousemove events. */
|
|
669
659
|
const MOUSE_MOVE_THROTTLE_TIME_MS = 10;
|
|
@@ -673,11 +663,11 @@ const MOUSE_MOVE_THROTTLE_TIME_MS = 10;
|
|
|
673
663
|
* EditEventDispatcher service for use by the other edit directives.
|
|
674
664
|
*/
|
|
675
665
|
class CdkEditable {
|
|
676
|
-
constructor(
|
|
677
|
-
this.elementRef =
|
|
678
|
-
this.editEventDispatcher =
|
|
679
|
-
this.focusDispatcher =
|
|
680
|
-
this.ngZone =
|
|
666
|
+
constructor() {
|
|
667
|
+
this.elementRef = inject(ElementRef);
|
|
668
|
+
this.editEventDispatcher = inject(EditEventDispatcher);
|
|
669
|
+
this.focusDispatcher = inject(FocusDispatcher);
|
|
670
|
+
this.ngZone = inject(NgZone);
|
|
681
671
|
this.destroyed = new Subject();
|
|
682
672
|
this._rendered = new Subject();
|
|
683
673
|
afterRender(() => {
|
|
@@ -718,6 +708,8 @@ class CdkEditable {
|
|
|
718
708
|
// or below the table.
|
|
719
709
|
this._rendered
|
|
720
710
|
.pipe(
|
|
711
|
+
// Avoid some timing inconsistencies since Angular v19.
|
|
712
|
+
debounceTime(0),
|
|
721
713
|
// Optimization: ignore dom changes while focus is within the table as we already
|
|
722
714
|
// ensure that rows above and below the focused/active row are tabbable.
|
|
723
715
|
withLatestFrom(this.editEventDispatcher.editingOrFocused), filter(([_, activeRow]) => activeRow == null), map(() => element.querySelectorAll(ROW_SELECTOR)), share(), takeUntil(this.destroyed))
|
|
@@ -731,17 +723,16 @@ class CdkEditable {
|
|
|
731
723
|
.subscribe(this.focusDispatcher.keyObserver);
|
|
732
724
|
});
|
|
733
725
|
}
|
|
734
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
735
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
726
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
727
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkEditable, isStandalone: true, selector: "table[editable], cdk-table[editable], mat-table[editable]", providers: [EditEventDispatcher, EditServices], ngImport: i0 }); }
|
|
736
728
|
}
|
|
737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditable, decorators: [{
|
|
738
730
|
type: Directive,
|
|
739
731
|
args: [{
|
|
740
732
|
selector: 'table[editable], cdk-table[editable], mat-table[editable]',
|
|
741
733
|
providers: [EditEventDispatcher, EditServices],
|
|
742
|
-
standalone: true,
|
|
743
734
|
}]
|
|
744
|
-
}], ctorParameters: () => [
|
|
735
|
+
}], ctorParameters: () => [] });
|
|
745
736
|
const POPOVER_EDIT_HOST_BINDINGS = {
|
|
746
737
|
'[attr.tabindex]': 'disabled ? null : 0',
|
|
747
738
|
'class': 'cdk-popover-edit-cell',
|
|
@@ -760,6 +751,16 @@ const POPOVER_EDIT_INPUTS = [
|
|
|
760
751
|
* Makes the cell focusable.
|
|
761
752
|
*/
|
|
762
753
|
class CdkPopoverEdit {
|
|
754
|
+
constructor() {
|
|
755
|
+
this.services = inject(EditServices);
|
|
756
|
+
this.elementRef = inject(ElementRef);
|
|
757
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
758
|
+
/** The edit lens template shown over the cell on edit. */
|
|
759
|
+
this.template = null;
|
|
760
|
+
this._colspan = {};
|
|
761
|
+
this._disabled = false;
|
|
762
|
+
this.destroyed = new Subject();
|
|
763
|
+
}
|
|
763
764
|
/**
|
|
764
765
|
* Specifies that the popup should cover additional table cells before and/or after
|
|
765
766
|
* this one.
|
|
@@ -791,16 +792,6 @@ class CdkPopoverEdit {
|
|
|
791
792
|
this.services.editEventDispatcher.disabledCells.delete(this.elementRef.nativeElement);
|
|
792
793
|
}
|
|
793
794
|
}
|
|
794
|
-
constructor(services, elementRef, viewContainerRef) {
|
|
795
|
-
this.services = services;
|
|
796
|
-
this.elementRef = elementRef;
|
|
797
|
-
this.viewContainerRef = viewContainerRef;
|
|
798
|
-
/** The edit lens template shown over the cell on edit. */
|
|
799
|
-
this.template = null;
|
|
800
|
-
this._colspan = {};
|
|
801
|
-
this._disabled = false;
|
|
802
|
-
this.destroyed = new Subject();
|
|
803
|
-
}
|
|
804
795
|
ngAfterViewInit() {
|
|
805
796
|
this._startListeningToEditEvents();
|
|
806
797
|
}
|
|
@@ -926,27 +917,26 @@ class CdkPopoverEdit {
|
|
|
926
917
|
}
|
|
927
918
|
return { width: lastCell.getBoundingClientRect().right - firstCell.getBoundingClientRect().left };
|
|
928
919
|
}
|
|
929
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
930
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
920
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEdit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
921
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", 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 }); }
|
|
931
922
|
}
|
|
932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEdit, decorators: [{
|
|
933
924
|
type: Directive,
|
|
934
925
|
args: [{
|
|
935
926
|
selector: '[cdkPopoverEdit]:not([cdkPopoverEditTabOut])',
|
|
936
927
|
host: POPOVER_EDIT_HOST_BINDINGS,
|
|
937
928
|
inputs: POPOVER_EDIT_INPUTS,
|
|
938
|
-
standalone: true,
|
|
939
929
|
}]
|
|
940
|
-
}]
|
|
930
|
+
}] });
|
|
941
931
|
/**
|
|
942
932
|
* Attaches an ng-template to a cell and shows it when instructed to by the
|
|
943
933
|
* EditEventDispatcher service.
|
|
944
934
|
* Makes the cell focusable.
|
|
945
935
|
*/
|
|
946
936
|
class CdkPopoverEditTabOut extends CdkPopoverEdit {
|
|
947
|
-
constructor(
|
|
948
|
-
super(
|
|
949
|
-
this.focusEscapeNotifierFactory =
|
|
937
|
+
constructor() {
|
|
938
|
+
super(...arguments);
|
|
939
|
+
this.focusEscapeNotifierFactory = inject(FocusEscapeNotifierFactory);
|
|
950
940
|
this.focusTrap = undefined;
|
|
951
941
|
}
|
|
952
942
|
initFocusTrap() {
|
|
@@ -960,28 +950,27 @@ class CdkPopoverEditTabOut extends CdkPopoverEdit {
|
|
|
960
950
|
this.closeEditOverlay();
|
|
961
951
|
});
|
|
962
952
|
}
|
|
963
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
964
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
953
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEditTabOut, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
954
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", 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 }); }
|
|
965
955
|
}
|
|
966
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEditTabOut, decorators: [{
|
|
967
957
|
type: Directive,
|
|
968
958
|
args: [{
|
|
969
959
|
selector: '[cdkPopoverEdit][cdkPopoverEditTabOut]',
|
|
970
960
|
host: POPOVER_EDIT_HOST_BINDINGS,
|
|
971
961
|
inputs: POPOVER_EDIT_INPUTS,
|
|
972
|
-
standalone: true,
|
|
973
962
|
}]
|
|
974
|
-
}]
|
|
963
|
+
}] });
|
|
975
964
|
/**
|
|
976
965
|
* A structural directive that shows its contents when the table row containing
|
|
977
966
|
* it is hovered or when an element in the row has focus.
|
|
978
967
|
*/
|
|
979
968
|
class CdkRowHoverContent {
|
|
980
|
-
constructor(
|
|
981
|
-
this.services =
|
|
982
|
-
this.elementRef =
|
|
983
|
-
this.templateRef =
|
|
984
|
-
this.viewContainerRef =
|
|
969
|
+
constructor() {
|
|
970
|
+
this.services = inject(EditServices);
|
|
971
|
+
this.elementRef = inject(ElementRef);
|
|
972
|
+
this.templateRef = inject(TemplateRef);
|
|
973
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
985
974
|
this.destroyed = new Subject();
|
|
986
975
|
this.viewRef = null;
|
|
987
976
|
}
|
|
@@ -1049,24 +1038,24 @@ class CdkRowHoverContent {
|
|
|
1049
1038
|
}
|
|
1050
1039
|
});
|
|
1051
1040
|
}
|
|
1052
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1053
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1041
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkRowHoverContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1042
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkRowHoverContent, isStandalone: true, selector: "[cdkRowHoverContent]", ngImport: i0 }); }
|
|
1054
1043
|
}
|
|
1055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkRowHoverContent, decorators: [{
|
|
1056
1045
|
type: Directive,
|
|
1057
1046
|
args: [{
|
|
1058
1047
|
selector: '[cdkRowHoverContent]',
|
|
1059
|
-
standalone: true,
|
|
1060
1048
|
}]
|
|
1061
|
-
}]
|
|
1049
|
+
}] });
|
|
1062
1050
|
/**
|
|
1063
1051
|
* Opens the closest edit popover to this element, whether it's associated with this exact
|
|
1064
1052
|
* element or an ancestor element.
|
|
1065
1053
|
*/
|
|
1066
1054
|
class CdkEditOpen {
|
|
1067
|
-
constructor(
|
|
1068
|
-
this.elementRef =
|
|
1069
|
-
this.editEventDispatcher =
|
|
1055
|
+
constructor() {
|
|
1056
|
+
this.elementRef = inject(ElementRef);
|
|
1057
|
+
this.editEventDispatcher = inject(EditEventDispatcher);
|
|
1058
|
+
const elementRef = this.elementRef;
|
|
1070
1059
|
const nativeElement = elementRef.nativeElement;
|
|
1071
1060
|
// Prevent accidental form submits.
|
|
1072
1061
|
if (nativeElement.nodeName === 'BUTTON' && !nativeElement.getAttribute('type')) {
|
|
@@ -1077,19 +1066,18 @@ class CdkEditOpen {
|
|
|
1077
1066
|
this.editEventDispatcher.editing.next(closest(this.elementRef.nativeElement, CELL_SELECTOR));
|
|
1078
1067
|
evt.stopPropagation();
|
|
1079
1068
|
}
|
|
1080
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1081
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1069
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1070
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkEditOpen, isStandalone: true, selector: "[cdkEditOpen]", host: { listeners: { "click": "openEdit($event)" } }, ngImport: i0 }); }
|
|
1082
1071
|
}
|
|
1083
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkEditOpen, decorators: [{
|
|
1084
1073
|
type: Directive,
|
|
1085
1074
|
args: [{
|
|
1086
1075
|
selector: '[cdkEditOpen]',
|
|
1087
1076
|
host: {
|
|
1088
1077
|
'(click)': 'openEdit($event)',
|
|
1089
1078
|
},
|
|
1090
|
-
standalone: true,
|
|
1091
1079
|
}]
|
|
1092
|
-
}], ctorParameters: () => [
|
|
1080
|
+
}], ctorParameters: () => [] });
|
|
1093
1081
|
|
|
1094
1082
|
const EXPORTED_DECLARATIONS = [
|
|
1095
1083
|
CdkPopoverEdit,
|
|
@@ -1102,8 +1090,8 @@ const EXPORTED_DECLARATIONS = [
|
|
|
1102
1090
|
CdkEditOpen,
|
|
1103
1091
|
];
|
|
1104
1092
|
class CdkPopoverEditModule {
|
|
1105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1106
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1094
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEditModule, imports: [OverlayModule, CdkPopoverEdit,
|
|
1107
1095
|
CdkPopoverEditTabOut,
|
|
1108
1096
|
CdkRowHoverContent,
|
|
1109
1097
|
CdkEditControl,
|
|
@@ -1118,9 +1106,9 @@ class CdkPopoverEditModule {
|
|
|
1118
1106
|
CdkEditClose,
|
|
1119
1107
|
CdkEditable,
|
|
1120
1108
|
CdkEditOpen] }); }
|
|
1121
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1109
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEditModule, imports: [OverlayModule] }); }
|
|
1122
1110
|
}
|
|
1123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkPopoverEditModule, decorators: [{
|
|
1124
1112
|
type: NgModule,
|
|
1125
1113
|
args: [{
|
|
1126
1114
|
imports: [OverlayModule, ...EXPORTED_DECLARATIONS],
|