@ngutil/aria 0.0.102 → 0.0.105
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/ngutil-aria.mjs +70 -71
- package/fesm2022/ngutil-aria.mjs.map +1 -1
- package/index.d.ts +436 -5
- package/package.json +6 -6
- package/activity/activity.service.d.ts +0 -23
- package/activity/index.d.ts +0 -1
- package/focus/focus-state.directive.d.ts +0 -16
- package/focus/focus-trap.directive.d.ts +0 -8
- package/focus/focus.service.d.ts +0 -22
- package/focus/focusable.directive.d.ts +0 -13
- package/focus/index.d.ts +0 -4
- package/gestures/gesture-drag.d.ts +0 -21
- package/gestures/gesture-event.d.ts +0 -40
- package/gestures/gesture-longtap.d.ts +0 -13
- package/gestures/gesture-tap.d.ts +0 -12
- package/gestures/gesture.d.ts +0 -84
- package/gestures/gesture.service.d.ts +0 -21
- package/gestures/index.d.ts +0 -6
- package/keystroke/index.d.ts +0 -1
- package/keystroke/keystroke.service.d.ts +0 -22
- package/ui-state/abstract.d.ts +0 -19
- package/ui-state/busy.directive.d.ts +0 -9
- package/ui-state/dirty.directive.d.ts +0 -9
- package/ui-state/disabled.directive.d.ts +0 -9
- package/ui-state/index.d.ts +0 -17
- package/ui-state/progress-state.d.ts +0 -71
- package/ui-state/readonly.directive.d.ts +0 -9
- package/ui-state/selector.d.ts +0 -60
- package/ui-state/ui-state.d.ts +0 -36
package/fesm2022/ngutil-aria.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, NgZone, Injectable, ElementRef, computed, Directive, input, signal, untracked, effect, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, NgZone, DOCUMENT, Injectable, ElementRef, computed, Directive, input, signal, untracked, effect, NgModule } from '@angular/core';
|
|
4
3
|
import { merge, fromEvent, map, share, filter, shareReplay, startWith, throttleTime, switchMap, timer, take, distinctUntilChanged, BehaviorSubject, connect, Subject, tap, finalize, scan, of, combineLatest, Observable, EMPTY, from, debounceTime, takeWhile, animationFrames } from 'rxjs';
|
|
5
4
|
import { isEqualStrict, isEqual, coerceElement, Destructible, isElementInput, __zone_symbol__, isFalsy, isTruthy, deepClone, coerceBoolAttr } from '@ngutil/common';
|
|
6
5
|
import { FocusTrapFactory } from '@angular/cdk/a11y';
|
|
@@ -45,10 +44,10 @@ class ActivityService {
|
|
|
45
44
|
watchInactvity(timeout) {
|
|
46
45
|
return this.events$.pipe(startWith(null), throttleTime(timeout / 2), switchMap(() => timer(0, timeout).pipe(take(2))), map(v => v !== 0), distinctUntilChanged(), shareReplay(1));
|
|
47
46
|
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ActivityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ActivityService, providedIn: "root" }); }
|
|
50
49
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ActivityService, decorators: [{
|
|
52
51
|
type: Injectable,
|
|
53
52
|
args: [{ providedIn: "root" }]
|
|
54
53
|
}] });
|
|
@@ -201,10 +200,10 @@ class FocusService {
|
|
|
201
200
|
this.#originOverrides.next(map);
|
|
202
201
|
}
|
|
203
202
|
}
|
|
204
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
205
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FocusService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
204
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FocusService, providedIn: "root" }); }
|
|
206
205
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FocusService, decorators: [{
|
|
208
207
|
type: Injectable,
|
|
209
208
|
args: [{ providedIn: "root" }]
|
|
210
209
|
}] });
|
|
@@ -259,22 +258,22 @@ class FocusState {
|
|
|
259
258
|
this.event$ = combineLatest([this.#self, this.#connEvent]).pipe(
|
|
260
259
|
// debounceTime(100), // TODO: miért volt ez itt?
|
|
261
260
|
map(([self, conn]) => (self.origin !== null ? self : conn.origin !== null ? conn : this.#default)), distinctUntilChanged(isEqual), shareReplay(1));
|
|
262
|
-
this.event = toSignal(this.event$, {
|
|
261
|
+
this.event = toSignal(this.event$, { manualCleanup: true, equal: isEqual });
|
|
263
262
|
this.self = computed(() => {
|
|
264
263
|
const event = this.event();
|
|
265
264
|
if (event == null) {
|
|
266
265
|
return null;
|
|
267
266
|
}
|
|
268
267
|
return event.element === this.#el.nativeElement ? event.origin : null;
|
|
269
|
-
});
|
|
268
|
+
}, ...(ngDevMode ? [{ debugName: "self" }] : []));
|
|
270
269
|
this.within = computed(() => {
|
|
271
270
|
const event = this.event();
|
|
272
271
|
if (event == null) {
|
|
273
272
|
return null;
|
|
274
273
|
}
|
|
275
274
|
return event.element !== this.#el.nativeElement ? event.origin : null;
|
|
276
|
-
});
|
|
277
|
-
this.has = computed(() => this.self() || this.within());
|
|
275
|
+
}, ...(ngDevMode ? [{ debugName: "within" }] : []));
|
|
276
|
+
this.has = computed(() => this.self() || this.within(), ...(ngDevMode ? [{ debugName: "has" }] : []));
|
|
278
277
|
this.#parent?.connect(this).pipe(takeUntilDestroyed()).subscribe();
|
|
279
278
|
// effect(() => {
|
|
280
279
|
// console.log(this.#el.nativeElement, this.has())
|
|
@@ -295,11 +294,11 @@ class FocusState {
|
|
|
295
294
|
};
|
|
296
295
|
});
|
|
297
296
|
}
|
|
298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
299
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FocusState, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
298
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: FocusState, isStandalone: true, host: { properties: { "attr.focus": "self()", "attr.focus-within": "within()", "attr.focus-present": "has()" } }, ngImport: i0 }); }
|
|
300
299
|
}
|
|
301
300
|
_a$1 = FocusState;
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FocusState, decorators: [{
|
|
303
302
|
type: Directive,
|
|
304
303
|
args: [{
|
|
305
304
|
host: {
|
|
@@ -314,8 +313,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
314
313
|
class Focusable {
|
|
315
314
|
constructor() {
|
|
316
315
|
this.state = inject(FocusState);
|
|
317
|
-
this.focusable = input(true, { alias: "nuFocusable" });
|
|
318
|
-
this.tabindex = input(0, { transform: Number });
|
|
316
|
+
this.focusable = input(true, ...(ngDevMode ? [{ debugName: "focusable", alias: "nuFocusable" }] : [{ alias: "nuFocusable" }]));
|
|
317
|
+
this.tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex", transform: Number }] : [{ transform: Number }]));
|
|
319
318
|
this._tabindex = computed(() => {
|
|
320
319
|
const focusable = this.focusable();
|
|
321
320
|
const tabindex = this.tabindex();
|
|
@@ -329,7 +328,7 @@ class Focusable {
|
|
|
329
328
|
return tabindex;
|
|
330
329
|
}
|
|
331
330
|
return 0;
|
|
332
|
-
});
|
|
331
|
+
}, ...(ngDevMode ? [{ debugName: "_tabindex" }] : []));
|
|
333
332
|
}
|
|
334
333
|
connect(value) {
|
|
335
334
|
if (value instanceof FocusState || isElementInput(value)) {
|
|
@@ -339,10 +338,10 @@ class Focusable {
|
|
|
339
338
|
return this.state.connect(value.state);
|
|
340
339
|
}
|
|
341
340
|
}
|
|
342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
343
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
341
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: Focusable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
342
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.13", type: Focusable, isStandalone: true, selector: "[nuFocusable]", inputs: { focusable: { classPropertyName: "focusable", publicName: "nuFocusable", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.tabindex": "_tabindex()" } }, exportAs: ["nuFocusable"], hostDirectives: [{ directive: FocusState }], ngImport: i0 }); }
|
|
344
343
|
}
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: Focusable, decorators: [{
|
|
346
345
|
type: Directive,
|
|
347
346
|
args: [{
|
|
348
347
|
selector: "[nuFocusable]",
|
|
@@ -352,7 +351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
352
351
|
},
|
|
353
352
|
hostDirectives: [FocusState]
|
|
354
353
|
}]
|
|
355
|
-
}] });
|
|
354
|
+
}], propDecorators: { focusable: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuFocusable", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
356
355
|
|
|
357
356
|
class KeystrokeService {
|
|
358
357
|
#document = inject(DOCUMENT);
|
|
@@ -409,10 +408,10 @@ class KeystrokeService {
|
|
|
409
408
|
#focusActivation(element) {
|
|
410
409
|
return this.#focusEvent.pipe(map(focused => focused === element || element.contains(focused)));
|
|
411
410
|
}
|
|
412
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
413
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
411
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KeystrokeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
412
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KeystrokeService, providedIn: "root" }); }
|
|
414
413
|
}
|
|
415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KeystrokeService, decorators: [{
|
|
416
415
|
type: Injectable,
|
|
417
416
|
args: [{ providedIn: "root" }]
|
|
418
417
|
}] });
|
|
@@ -933,10 +932,10 @@ class GestureService {
|
|
|
933
932
|
this.#lastTouchAction = undefined;
|
|
934
933
|
}
|
|
935
934
|
};
|
|
936
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
937
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
935
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: GestureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
936
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: GestureService, providedIn: "root" }); }
|
|
938
937
|
}
|
|
939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
938
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: GestureService, decorators: [{
|
|
940
939
|
type: Injectable,
|
|
941
940
|
args: [{ providedIn: "root" }]
|
|
942
941
|
}], ctorParameters: () => [] });
|
|
@@ -1306,7 +1305,7 @@ var _a;
|
|
|
1306
1305
|
class UiState {
|
|
1307
1306
|
constructor() {
|
|
1308
1307
|
this.#parent = inject(_a, { skipSelf: true, optional: true });
|
|
1309
|
-
this.#self = signal({});
|
|
1308
|
+
this.#self = signal({}, ...(ngDevMode ? [{ debugName: "#self" }] : []));
|
|
1310
1309
|
this.merged = computed(() => {
|
|
1311
1310
|
const parent = this.#parent?.merged();
|
|
1312
1311
|
const self = this.#self();
|
|
@@ -1331,7 +1330,7 @@ class UiState {
|
|
|
1331
1330
|
else {
|
|
1332
1331
|
return self;
|
|
1333
1332
|
}
|
|
1334
|
-
});
|
|
1333
|
+
}, ...(ngDevMode ? [{ debugName: "merged" }] : []));
|
|
1335
1334
|
this.value = computed(() => {
|
|
1336
1335
|
const merged = this.merged();
|
|
1337
1336
|
const result = {};
|
|
@@ -1339,8 +1338,8 @@ class UiState {
|
|
|
1339
1338
|
result[k] = Object.values(v).includes(true);
|
|
1340
1339
|
}
|
|
1341
1340
|
return result;
|
|
1342
|
-
});
|
|
1343
|
-
this.inertSelector = signal("busy || disabled");
|
|
1341
|
+
}, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1342
|
+
this.inertSelector = signal("busy || disabled", ...(ngDevMode ? [{ debugName: "inertSelector" }] : []));
|
|
1344
1343
|
}
|
|
1345
1344
|
#parent;
|
|
1346
1345
|
get root() {
|
|
@@ -1379,11 +1378,11 @@ class UiState {
|
|
|
1379
1378
|
isInert() {
|
|
1380
1379
|
return this.is(this.inertSelector());
|
|
1381
1380
|
}
|
|
1382
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1383
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: UiState, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1382
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: UiState, isStandalone: true, ngImport: i0 }); }
|
|
1384
1383
|
}
|
|
1385
1384
|
_a = UiState;
|
|
1386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: UiState, decorators: [{
|
|
1387
1386
|
type: Directive,
|
|
1388
1387
|
args: [{}]
|
|
1389
1388
|
}] });
|
|
@@ -1400,8 +1399,8 @@ class AbstractUiState {
|
|
|
1400
1399
|
return this.state.is(`${this.name}.self || (${when})`);
|
|
1401
1400
|
}
|
|
1402
1401
|
return this.state.is(this.name);
|
|
1403
|
-
});
|
|
1404
|
-
this.no = computed(() => !this.yes());
|
|
1402
|
+
}, ...(ngDevMode ? [{ debugName: "yes" }] : []));
|
|
1403
|
+
this.no = computed(() => !this.yes(), ...(ngDevMode ? [{ debugName: "no" }] : []));
|
|
1405
1404
|
effect(() => {
|
|
1406
1405
|
const input = this.input();
|
|
1407
1406
|
if (input !== NOTSET) {
|
|
@@ -1418,23 +1417,23 @@ class AbstractUiState {
|
|
|
1418
1417
|
wrap(observable, source) {
|
|
1419
1418
|
return this.state.wrap(observable, this.name, source);
|
|
1420
1419
|
}
|
|
1421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1422
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1420
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AbstractUiState, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1421
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: AbstractUiState, isStandalone: true, ngImport: i0 }); }
|
|
1423
1422
|
}
|
|
1424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AbstractUiState, decorators: [{
|
|
1425
1424
|
type: Directive
|
|
1426
1425
|
}], ctorParameters: () => [{ type: undefined }] });
|
|
1427
1426
|
|
|
1428
1427
|
class BusyDirective extends AbstractUiState {
|
|
1429
1428
|
constructor() {
|
|
1430
1429
|
super("busy");
|
|
1431
|
-
this.input = input(NOTSET, { alias: "nuBusy" });
|
|
1432
|
-
this.when = input(NOTSET, { alias: "nuBusyWhen" });
|
|
1430
|
+
this.input = input(NOTSET, ...(ngDevMode ? [{ debugName: "input", alias: "nuBusy" }] : [{ alias: "nuBusy" }]));
|
|
1431
|
+
this.when = input(NOTSET, ...(ngDevMode ? [{ debugName: "when", alias: "nuBusyWhen" }] : [{ alias: "nuBusyWhen" }]));
|
|
1433
1432
|
}
|
|
1434
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1435
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1433
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: BusyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1434
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.13", type: BusyDirective, isStandalone: true, selector: "[nuBusy], [nuBusyWhen]", inputs: { input: { classPropertyName: "input", publicName: "nuBusy", isSignal: true, isRequired: false, transformFunction: null }, when: { classPropertyName: "when", publicName: "nuBusyWhen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-busy": "yes() ? 'true' : 'false'", "attr.inert": "state.isInert() ? '' : null" } }, providers: [UiState], exportAs: ["busy"], usesInheritance: true, ngImport: i0 }); }
|
|
1436
1435
|
}
|
|
1437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: BusyDirective, decorators: [{
|
|
1438
1437
|
type: Directive,
|
|
1439
1438
|
args: [{
|
|
1440
1439
|
selector: "[nuBusy], [nuBusyWhen]",
|
|
@@ -1445,18 +1444,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1445
1444
|
},
|
|
1446
1445
|
providers: [UiState]
|
|
1447
1446
|
}]
|
|
1448
|
-
}], ctorParameters: () => [] });
|
|
1447
|
+
}], ctorParameters: () => [], propDecorators: { input: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuBusy", required: false }] }], when: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuBusyWhen", required: false }] }] } });
|
|
1449
1448
|
|
|
1450
1449
|
class DirtyDirective extends AbstractUiState {
|
|
1451
1450
|
constructor() {
|
|
1452
1451
|
super("dirty");
|
|
1453
|
-
this.input = input(NOTSET, { alias: "nuDirty" });
|
|
1454
|
-
this.when = input(NOTSET, { alias: "nuDirtyWhen" });
|
|
1452
|
+
this.input = input(NOTSET, ...(ngDevMode ? [{ debugName: "input", alias: "nuDirty" }] : [{ alias: "nuDirty" }]));
|
|
1453
|
+
this.when = input(NOTSET, ...(ngDevMode ? [{ debugName: "when", alias: "nuDirtyWhen" }] : [{ alias: "nuDirtyWhen" }]));
|
|
1455
1454
|
}
|
|
1456
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1457
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DirtyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1456
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.13", type: DirtyDirective, isStandalone: true, selector: "[nuDirty], [nuDirtyWhen]", inputs: { input: { classPropertyName: "input", publicName: "nuDirty", isSignal: true, isRequired: false, transformFunction: null }, when: { classPropertyName: "when", publicName: "nuDirtyWhen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.dirty": "yes() ? '' : null" } }, providers: [UiState], exportAs: ["dirty"], usesInheritance: true, ngImport: i0 }); }
|
|
1458
1457
|
}
|
|
1459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DirtyDirective, decorators: [{
|
|
1460
1459
|
type: Directive,
|
|
1461
1460
|
args: [{
|
|
1462
1461
|
selector: "[nuDirty], [nuDirtyWhen]",
|
|
@@ -1466,18 +1465,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1466
1465
|
},
|
|
1467
1466
|
providers: [UiState]
|
|
1468
1467
|
}]
|
|
1469
|
-
}], ctorParameters: () => [] });
|
|
1468
|
+
}], ctorParameters: () => [], propDecorators: { input: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuDirty", required: false }] }], when: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuDirtyWhen", required: false }] }] } });
|
|
1470
1469
|
|
|
1471
1470
|
class DisabledDirective extends AbstractUiState {
|
|
1472
1471
|
constructor() {
|
|
1473
1472
|
super("disabled");
|
|
1474
|
-
this.input = input(NOTSET, { alias: "nuDisabled" });
|
|
1475
|
-
this.when = input(NOTSET, { alias: "nuDisabledWhen" });
|
|
1473
|
+
this.input = input(NOTSET, ...(ngDevMode ? [{ debugName: "input", alias: "nuDisabled" }] : [{ alias: "nuDisabled" }]));
|
|
1474
|
+
this.when = input(NOTSET, ...(ngDevMode ? [{ debugName: "when", alias: "nuDisabledWhen" }] : [{ alias: "nuDisabledWhen" }]));
|
|
1476
1475
|
}
|
|
1477
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1478
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DisabledDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1477
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.13", type: DisabledDirective, isStandalone: true, selector: "[nuDisabled], [nuDisabledWhen]", inputs: { input: { classPropertyName: "input", publicName: "nuDisabled", isSignal: true, isRequired: false, transformFunction: null }, when: { classPropertyName: "when", publicName: "nuDisabledWhen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-disabled": "yes() ? 'true' : 'false'", "attr.disabled": "yes() ? '' : null", "attr.inert": "state.isInert() ? '' : null" } }, providers: [UiState], exportAs: ["disabled"], usesInheritance: true, ngImport: i0 }); }
|
|
1479
1478
|
}
|
|
1480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DisabledDirective, decorators: [{
|
|
1481
1480
|
type: Directive,
|
|
1482
1481
|
args: [{
|
|
1483
1482
|
selector: "[nuDisabled], [nuDisabledWhen]",
|
|
@@ -1489,18 +1488,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1489
1488
|
},
|
|
1490
1489
|
providers: [UiState]
|
|
1491
1490
|
}]
|
|
1492
|
-
}], ctorParameters: () => [] });
|
|
1491
|
+
}], ctorParameters: () => [], propDecorators: { input: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuDisabled", required: false }] }], when: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuDisabledWhen", required: false }] }] } });
|
|
1493
1492
|
|
|
1494
1493
|
class ReadonlyDirective extends AbstractUiState {
|
|
1495
1494
|
constructor() {
|
|
1496
1495
|
super("readonly");
|
|
1497
|
-
this.input = input(NOTSET, { alias: "nuReadonly" });
|
|
1498
|
-
this.when = input(NOTSET, { alias: "nuReadonlyWhen" });
|
|
1496
|
+
this.input = input(NOTSET, ...(ngDevMode ? [{ debugName: "input", alias: "nuReadonly" }] : [{ alias: "nuReadonly" }]));
|
|
1497
|
+
this.when = input(NOTSET, ...(ngDevMode ? [{ debugName: "when", alias: "nuReadonlyWhen" }] : [{ alias: "nuReadonlyWhen" }]));
|
|
1499
1498
|
}
|
|
1500
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1501
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ReadonlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1500
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.13", type: ReadonlyDirective, isStandalone: true, selector: "[nuReadonly], [nuReadonlyWhen]", inputs: { input: { classPropertyName: "input", publicName: "nuReadonly", isSignal: true, isRequired: false, transformFunction: null }, when: { classPropertyName: "when", publicName: "nuReadonlyWhen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-readonly": "yes() ? 'true' : 'false'", "attr.readonly": "yes() ? '' : null" } }, providers: [UiState], exportAs: ["readonly"], usesInheritance: true, ngImport: i0 }); }
|
|
1502
1501
|
}
|
|
1503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1502
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ReadonlyDirective, decorators: [{
|
|
1504
1503
|
type: Directive,
|
|
1505
1504
|
args: [{
|
|
1506
1505
|
selector: "[nuReadonly], [nuReadonlyWhen]",
|
|
@@ -1511,7 +1510,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1511
1510
|
},
|
|
1512
1511
|
providers: [UiState]
|
|
1513
1512
|
}]
|
|
1514
|
-
}], ctorParameters: () => [] });
|
|
1513
|
+
}], ctorParameters: () => [], propDecorators: { input: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuReadonly", required: false }] }], when: [{ type: i0.Input, args: [{ isSignal: true, alias: "nuReadonlyWhen", required: false }] }] } });
|
|
1515
1514
|
|
|
1516
1515
|
const SEGMENT_REGISTER = { type: "fix", percent: 0 };
|
|
1517
1516
|
const SEGMENT_COMPLETE = { type: "fix", percent: 1 };
|
|
@@ -1610,10 +1609,10 @@ class ProgressState {
|
|
|
1610
1609
|
return res;
|
|
1611
1610
|
}, {});
|
|
1612
1611
|
}
|
|
1613
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1614
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ProgressState, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1613
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: ProgressState, isStandalone: true, ngImport: i0 }); }
|
|
1615
1614
|
}
|
|
1616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ProgressState, decorators: [{
|
|
1617
1616
|
type: Directive
|
|
1618
1617
|
}] });
|
|
1619
1618
|
class ProgressSegmentRef {
|
|
@@ -1654,11 +1653,11 @@ class ProgressSegmentRef {
|
|
|
1654
1653
|
|
|
1655
1654
|
const entries = [BusyDirective, DirtyDirective, DisabledDirective, ReadonlyDirective];
|
|
1656
1655
|
class UiStateModule {
|
|
1657
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1658
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1659
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1656
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: UiStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1657
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.13", ngImport: i0, type: UiStateModule, imports: [BusyDirective, DirtyDirective, DisabledDirective, ReadonlyDirective], exports: [BusyDirective, DirtyDirective, DisabledDirective, ReadonlyDirective] }); }
|
|
1658
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: UiStateModule }); }
|
|
1660
1659
|
}
|
|
1661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: UiStateModule, decorators: [{
|
|
1662
1661
|
type: NgModule,
|
|
1663
1662
|
args: [{
|
|
1664
1663
|
imports: entries,
|