@firestitch/common 13.0.0 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/directives/auto-focus.directive.d.ts +15 -0
- package/app/directives/auto-select.directive.d.ts +11 -0
- package/app/directives/index.d.ts +2 -1
- package/app/fs-common.module.d.ts +2 -2
- package/esm2020/app/directives/auto-focus.directive.mjs +59 -0
- package/esm2020/app/directives/auto-select.directive.mjs +31 -0
- package/esm2020/app/directives/index.mjs +3 -2
- package/esm2020/app/directives/model-change.directive.mjs +2 -2
- package/esm2020/app/fs-common.module.mjs +6 -7
- package/esm2020/public_api.mjs +2 -1
- package/fesm2015/firestitch-common.mjs +52 -12
- package/fesm2015/firestitch-common.mjs.map +1 -1
- package/fesm2020/firestitch-common.mjs +49 -12
- package/fesm2020/firestitch-common.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/app/directives/autofocus.directive.d.ts +0 -13
- package/esm2020/app/directives/autofocus.directive.mjs +0 -51
|
@@ -6,14 +6,18 @@ import * as i1$1 from '@angular/forms';
|
|
|
6
6
|
import { Subject, Observable, of, combineLatest, iif, throwError, timer, fromEvent, merge } from 'rxjs';
|
|
7
7
|
import { debounceTime, takeUntil, take, map, delay, finalize, shareReplay, retryWhen, tap, concatMap, distinctUntilChanged, share, filter as filter$1 } from 'rxjs/operators';
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class FsAutoFocusDirective {
|
|
10
10
|
constructor(_matInput, _el) {
|
|
11
11
|
this._matInput = _matInput;
|
|
12
12
|
this._el = _el;
|
|
13
13
|
this.fsAutofocus = true;
|
|
14
|
+
this.fsAutoFocus = true;
|
|
15
|
+
this.autofocus = true;
|
|
14
16
|
}
|
|
15
17
|
ngAfterViewInit() {
|
|
16
|
-
if (this.fsAutofocus
|
|
18
|
+
if ((this.fsAutofocus ?? true) === true &&
|
|
19
|
+
(this.fsAutofocus ?? true) === true &&
|
|
20
|
+
(this.autofocus ?? true) === true) {
|
|
17
21
|
this.focus();
|
|
18
22
|
}
|
|
19
23
|
}
|
|
@@ -38,12 +42,12 @@ class FsAutofocusDirective {
|
|
|
38
42
|
}, 50);
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
45
|
+
FsAutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsAutoFocusDirective, deps: [{ token: i1.MatInput, host: true, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
46
|
+
FsAutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsAutoFocusDirective, selector: "[fsAutofocus],[fsAutoFocus],[autofocus]", inputs: { fsAutofocus: "fsAutofocus", fsAutoFocus: "fsAutoFocus", autofocus: "autofocus" }, ngImport: i0 });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsAutoFocusDirective, decorators: [{
|
|
44
48
|
type: Directive,
|
|
45
49
|
args: [{
|
|
46
|
-
selector: '[fsAutofocus],[autofocus]',
|
|
50
|
+
selector: '[fsAutofocus],[fsAutoFocus],[autofocus]',
|
|
47
51
|
}]
|
|
48
52
|
}], ctorParameters: function () { return [{ type: i1.MatInput, decorators: [{
|
|
49
53
|
type: Optional
|
|
@@ -51,6 +55,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
51
55
|
type: Host
|
|
52
56
|
}] }, { type: i0.ElementRef }]; }, propDecorators: { fsAutofocus: [{
|
|
53
57
|
type: Input
|
|
58
|
+
}], fsAutoFocus: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], autofocus: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}] } });
|
|
63
|
+
|
|
64
|
+
class FsAutoSelectDirective {
|
|
65
|
+
constructor(_el) {
|
|
66
|
+
this._el = _el;
|
|
67
|
+
this.fsAutoSelect = true;
|
|
68
|
+
}
|
|
69
|
+
ngAfterViewInit() {
|
|
70
|
+
if ((this.fsAutoSelect ?? true) === true) {
|
|
71
|
+
this.select();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
select() {
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
if (this._el.nativeElement.focus) {
|
|
77
|
+
this._el.nativeElement.select();
|
|
78
|
+
}
|
|
79
|
+
}, 50);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
FsAutoSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsAutoSelectDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
83
|
+
FsAutoSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsAutoSelectDirective, selector: "[fsAutoSelect]", inputs: { fsAutoSelect: "fsAutoSelect" }, ngImport: i0 });
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsAutoSelectDirective, decorators: [{
|
|
85
|
+
type: Directive,
|
|
86
|
+
args: [{
|
|
87
|
+
selector: '[fsAutoSelect]',
|
|
88
|
+
}]
|
|
89
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fsAutoSelect: [{
|
|
90
|
+
type: Input
|
|
54
91
|
}] } });
|
|
55
92
|
|
|
56
93
|
class FsModelChangeDirective {
|
|
@@ -61,7 +98,7 @@ class FsModelChangeDirective {
|
|
|
61
98
|
}
|
|
62
99
|
ngOnInit() {
|
|
63
100
|
this._ngModel.update
|
|
64
|
-
.pipe(debounceTime(this.fsModelChangeOptions
|
|
101
|
+
.pipe(debounceTime(this.fsModelChangeOptions?.debounce || 500), takeUntil(this._destroy$))
|
|
65
102
|
.subscribe((value) => {
|
|
66
103
|
this.fsModelChange.emit(value);
|
|
67
104
|
});
|
|
@@ -1617,7 +1654,7 @@ class FsCommonModule {
|
|
|
1617
1654
|
FsCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1618
1655
|
FsCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsCommonModule, declarations: [FsStopPropagationDirective,
|
|
1619
1656
|
FsPreventDefaultDirective,
|
|
1620
|
-
|
|
1657
|
+
FsAutoFocusDirective,
|
|
1621
1658
|
FsUtilGuidPipe,
|
|
1622
1659
|
FsUtilIsEmptyPipe,
|
|
1623
1660
|
FsUtilIsNotEmptyPipe,
|
|
@@ -1629,7 +1666,7 @@ FsCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
1629
1666
|
FsFormatOrdinalNumberPipe,
|
|
1630
1667
|
FsModelChangeDirective], imports: [CommonModule], exports: [FsStopPropagationDirective,
|
|
1631
1668
|
FsPreventDefaultDirective,
|
|
1632
|
-
|
|
1669
|
+
FsAutoFocusDirective,
|
|
1633
1670
|
FsUtilGuidPipe,
|
|
1634
1671
|
FsUtilStringifyPipe,
|
|
1635
1672
|
FsFormatNumberPipe,
|
|
@@ -1652,7 +1689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
1652
1689
|
declarations: [
|
|
1653
1690
|
FsStopPropagationDirective,
|
|
1654
1691
|
FsPreventDefaultDirective,
|
|
1655
|
-
|
|
1692
|
+
FsAutoFocusDirective,
|
|
1656
1693
|
FsUtilGuidPipe,
|
|
1657
1694
|
FsUtilIsEmptyPipe,
|
|
1658
1695
|
FsUtilIsNotEmptyPipe,
|
|
@@ -1667,7 +1704,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
1667
1704
|
exports: [
|
|
1668
1705
|
FsStopPropagationDirective,
|
|
1669
1706
|
FsPreventDefaultDirective,
|
|
1670
|
-
|
|
1707
|
+
FsAutoFocusDirective,
|
|
1671
1708
|
FsUtilGuidPipe,
|
|
1672
1709
|
FsUtilStringifyPipe,
|
|
1673
1710
|
FsFormatNumberPipe,
|
|
@@ -1704,5 +1741,5 @@ const keyboardShortcut = (shortcut) => {
|
|
|
1704
1741
|
* Generated bundle index. Do not edit.
|
|
1705
1742
|
*/
|
|
1706
1743
|
|
|
1707
|
-
export { FsArray,
|
|
1744
|
+
export { FsArray, FsAutoFocusDirective, FsAutoSelectDirective, FsCommonModule, FsFormatBytesPipe, FsFormatCurrencyPipe, FsFormatNumberPipe, FsFormatOrdinalNumberPipe, FsFormatTruncatePipe, FsMath, FsModelChangeDirective, FsPreventDefaultDirective, FsStopPropagationDirective, FsUtil, FsUtilGuidPipe, FsUtilIsEmptyPipe, FsUtilIsNotEmptyPipe, FsUtilStringifyPipe, FsValidate, KEY_0$1 as KEY_0, KEY_1$1 as KEY_1, KEY_2$1 as KEY_2, KEY_3$1 as KEY_3, KEY_4$1 as KEY_4, KEY_5$1 as KEY_5, KEY_6$1 as KEY_6, KEY_7$1 as KEY_7, KEY_8$1 as KEY_8, KEY_9$1 as KEY_9, KEY_ALT$1 as KEY_ALT, KEY_BACKSPACE$1 as KEY_BACKSPACE, KEY_CANCEL$1 as KEY_CANCEL, KEY_CAPS_LOCK$1 as KEY_CAPS_LOCK, KEY_CLEAR$1 as KEY_CLEAR, KEY_CONTROL$1 as KEY_CONTROL, KEY_DELETE$1 as KEY_DELETE, KEY_DOWN$1 as KEY_DOWN, KEY_END$1 as KEY_END, KEY_ENTER$1 as KEY_ENTER, KEY_EQUALS$1 as KEY_EQUALS, KEY_ESCAPE$1 as KEY_ESCAPE, KEY_HELP$1 as KEY_HELP, KEY_HOME$1 as KEY_HOME, KEY_INSERT$1 as KEY_INSERT, KEY_LEFT$1 as KEY_LEFT, KEY_PAGE_DOWN$1 as KEY_PAGE_DOWN, KEY_PAGE_UP$1 as KEY_PAGE_UP, KEY_PAUSE$1 as KEY_PAUSE, KEY_PRINTSCREEN$1 as KEY_PRINTSCREEN, KEY_RETURN$1 as KEY_RETURN, KEY_RIGHT$1 as KEY_RIGHT, KEY_SEMICOLON$1 as KEY_SEMICOLON, KEY_SHIFT$1 as KEY_SHIFT, KEY_SPACE$1 as KEY_SPACE, KEY_TAB$1 as KEY_TAB, KEY_UP$1 as KEY_UP, Queue, QueueState, acronym, boolean, bytes, clone, compare, currency, debounce, delayedRetry, email, filter, find, fsSourceLoader, getNormalizedPath, guid, inArray, index, indexOf, isArrayEqual, isClass, isEmpty, isNumeric, isObject, keyExists, keyboardShortcut, ksort, length, list, loadJs, loadStyles, nameValue, number, ordinalNumber, phone, remove, removeQueryParams, resolve, round, rsort, sort, stringify, throttle, toString, truncate, url, uuid, value };
|
|
1708
1745
|
//# sourceMappingURL=firestitch-common.mjs.map
|