@rolatech/angular-common 17.2.4 → 17.2.5
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/esm2022/lib/angular-common.module.mjs +4 -4
- package/esm2022/lib/directive/decimal.directive.mjs +3 -3
- package/esm2022/lib/pipes/address.pipe.mjs +3 -3
- package/esm2022/lib/pipes/duration.pipe.mjs +3 -3
- package/esm2022/lib/pipes/fixed.pipe.mjs +17 -0
- package/esm2022/lib/pipes/index.mjs +4 -3
- package/esm2022/lib/pipes/options.pipe.mjs +3 -3
- package/esm2022/lib/pipes/prettyjson.pipe.mjs +3 -3
- package/esm2022/lib/pipes/time.pipe.mjs +3 -3
- package/fesm2022/rolatech-angular-common.mjs +39 -24
- package/fesm2022/rolatech-angular-common.mjs.map +1 -1
- package/lib/pipes/fixed.pipe.d.ts +7 -0
- package/lib/pipes/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -4,11 +4,11 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
4
4
|
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class AngularCommonModule {
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
8
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.
|
|
9
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule], exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule] });
|
|
9
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, CommonModule, FormsModule, ReactiveFormsModule] });
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, decorators: [{
|
|
12
12
|
type: NgModule,
|
|
13
13
|
args: [{
|
|
14
14
|
imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],
|
|
@@ -22,10 +22,10 @@ export class DecimalDirective {
|
|
|
22
22
|
event.preventDefault();
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
26
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DecimalDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: DecimalDirective, isStandalone: true, selector: "[rolatechDecimal]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 });
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DecimalDirective, decorators: [{
|
|
29
29
|
type: Directive,
|
|
30
30
|
args: [{
|
|
31
31
|
selector: '[rolatechDecimal]',
|
|
@@ -7,10 +7,10 @@ export class AddressFormatPipe {
|
|
|
7
7
|
}
|
|
8
8
|
return '未设置';
|
|
9
9
|
}
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
11
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AddressFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
11
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: AddressFormatPipe, isStandalone: true, name: "address" });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AddressFormatPipe, decorators: [{
|
|
14
14
|
type: Pipe,
|
|
15
15
|
args: [{
|
|
16
16
|
standalone: true,
|
|
@@ -22,10 +22,10 @@ export class DurationPipe {
|
|
|
22
22
|
return num < 10 ? `0${num}` : `${num}`;
|
|
23
23
|
// return num !== undefined && num !== null && num >= 0 && num < 10 ? `0${num}` : `${num}`;
|
|
24
24
|
}
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
26
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
26
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" });
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DurationPipe, decorators: [{
|
|
29
29
|
type: Pipe,
|
|
30
30
|
args: [{
|
|
31
31
|
standalone: true,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class FixedPipe {
|
|
4
|
+
transform(value, ...args) {
|
|
5
|
+
return (value / 100).toFixed(2);
|
|
6
|
+
}
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FixedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
8
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: FixedPipe, isStandalone: true, name: "fixed" });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FixedPipe, decorators: [{
|
|
11
|
+
type: Pipe,
|
|
12
|
+
args: [{
|
|
13
|
+
name: 'fixed',
|
|
14
|
+
standalone: true,
|
|
15
|
+
}]
|
|
16
|
+
}] });
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4ZWQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1jb21tb24vc3JjL2xpYi9waXBlcy9maXhlZC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQU1wRCxNQUFNLE9BQU8sU0FBUztJQUNwQixTQUFTLENBQUMsS0FBYSxFQUFFLEdBQUcsSUFBZTtRQUN6QyxPQUFPLENBQUMsS0FBSyxHQUFHLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNsQyxDQUFDO3VHQUhVLFNBQVM7cUdBQVQsU0FBUzs7MkZBQVQsU0FBUztrQkFKckIsSUFBSTttQkFBQztvQkFDSixJQUFJLEVBQUUsT0FBTztvQkFDYixVQUFVLEVBQUUsSUFBSTtpQkFDakIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBQaXBlKHtcbiAgbmFtZTogJ2ZpeGVkJyxcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgRml4ZWRQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gIHRyYW5zZm9ybSh2YWx1ZTogbnVtYmVyLCAuLi5hcmdzOiB1bmtub3duW10pOiB1bmtub3duIHtcbiAgICByZXR1cm4gKHZhbHVlIC8gMTAwKS50b0ZpeGVkKDIpO1xuICB9XG59XG4iXX0=
|
|
@@ -3,6 +3,7 @@ import { TimePipe } from '../pipes/time.pipe';
|
|
|
3
3
|
import { DurationPipe } from './duration.pipe';
|
|
4
4
|
import { OptionsFormatPipe } from './options.pipe';
|
|
5
5
|
import { AddressFormatPipe } from './address.pipe';
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
6
|
+
import { FixedPipe } from './fixed.pipe';
|
|
7
|
+
export { PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe, FixedPipe };
|
|
8
|
+
export const COMMON_PIPES = [PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe, FixedPipe];
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZX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IEFkZHJlc3NGb3JtYXRQaXBlIH0gZnJvbSAnLi9hZGRyZXNzLnBpcGUnO1xuaW1wb3J0IHsgRml4ZWRQaXBlIH0gZnJvbSAnLi9maXhlZC5waXBlJztcbmV4cG9ydCB7IFByZXR0eWpzb25QaXBlLCBUaW1lUGlwZSwgRHVyYXRpb25QaXBlLCBPcHRpb25zRm9ybWF0UGlwZSwgQWRkcmVzc0Zvcm1hdFBpcGUsIEZpeGVkUGlwZSB9O1xuZXhwb3J0IGNvbnN0IENPTU1PTl9QSVBFUyA9IFtQcmV0dHlqc29uUGlwZSwgVGltZVBpcGUsIER1cmF0aW9uUGlwZSwgT3B0aW9uc0Zvcm1hdFBpcGUsIEFkZHJlc3NGb3JtYXRQaXBlLCBGaXhlZFBpcGVdO1xuIl19
|
|
@@ -9,10 +9,10 @@ export class OptionsFormatPipe {
|
|
|
9
9
|
});
|
|
10
10
|
return result;
|
|
11
11
|
}
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
13
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OptionsFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
13
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: OptionsFormatPipe, isStandalone: true, name: "options" });
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OptionsFormatPipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
standalone: true,
|
|
@@ -9,10 +9,10 @@ export class PrettyjsonPipe {
|
|
|
9
9
|
return '{}';
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
13
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PrettyjsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
13
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: PrettyjsonPipe, isStandalone: true, name: "prettyjson" });
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PrettyjsonPipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
name: 'prettyjson',
|
|
@@ -8,10 +8,10 @@ export class TimePipe {
|
|
|
8
8
|
format(date) {
|
|
9
9
|
return moment(date).fromNow();
|
|
10
10
|
}
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
12
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
12
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: TimePipe, isStandalone: true, name: "time", pure: false });
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TimePipe, decorators: [{
|
|
15
15
|
type: Pipe,
|
|
16
16
|
args: [{ name: 'time', pure: false, standalone: true }]
|
|
17
17
|
}] });
|
|
@@ -8,11 +8,11 @@ import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
|
|
8
8
|
import { MAT_ICON_DEFAULT_OPTIONS } from '@angular/material/icon';
|
|
9
9
|
|
|
10
10
|
class AngularCommonModule {
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
12
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.
|
|
13
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule], exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule] });
|
|
13
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, CommonModule, FormsModule, ReactiveFormsModule] });
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AngularCommonModule, decorators: [{
|
|
16
16
|
type: NgModule,
|
|
17
17
|
args: [{
|
|
18
18
|
imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],
|
|
@@ -36,10 +36,10 @@ class PrettyjsonPipe {
|
|
|
36
36
|
return '{}';
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
40
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PrettyjsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
40
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: PrettyjsonPipe, isStandalone: true, name: "prettyjson" });
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PrettyjsonPipe, decorators: [{
|
|
43
43
|
type: Pipe,
|
|
44
44
|
args: [{
|
|
45
45
|
name: 'prettyjson',
|
|
@@ -54,10 +54,10 @@ class TimePipe {
|
|
|
54
54
|
format(date) {
|
|
55
55
|
return moment(date).fromNow();
|
|
56
56
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
58
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
58
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: TimePipe, isStandalone: true, name: "time", pure: false });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TimePipe, decorators: [{
|
|
61
61
|
type: Pipe,
|
|
62
62
|
args: [{ name: 'time', pure: false, standalone: true }]
|
|
63
63
|
}] });
|
|
@@ -84,10 +84,10 @@ class DurationPipe {
|
|
|
84
84
|
return num < 10 ? `0${num}` : `${num}`;
|
|
85
85
|
// return num !== undefined && num !== null && num >= 0 && num < 10 ? `0${num}` : `${num}`;
|
|
86
86
|
}
|
|
87
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
88
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
87
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
88
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" });
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DurationPipe, decorators: [{
|
|
91
91
|
type: Pipe,
|
|
92
92
|
args: [{
|
|
93
93
|
standalone: true,
|
|
@@ -104,10 +104,10 @@ class OptionsFormatPipe {
|
|
|
104
104
|
});
|
|
105
105
|
return result;
|
|
106
106
|
}
|
|
107
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
108
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OptionsFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
108
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: OptionsFormatPipe, isStandalone: true, name: "options" });
|
|
109
109
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: OptionsFormatPipe, decorators: [{
|
|
111
111
|
type: Pipe,
|
|
112
112
|
args: [{
|
|
113
113
|
standalone: true,
|
|
@@ -122,10 +122,10 @@ class AddressFormatPipe {
|
|
|
122
122
|
}
|
|
123
123
|
return '未设置';
|
|
124
124
|
}
|
|
125
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
126
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AddressFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
126
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: AddressFormatPipe, isStandalone: true, name: "address" });
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AddressFormatPipe, decorators: [{
|
|
129
129
|
type: Pipe,
|
|
130
130
|
args: [{
|
|
131
131
|
standalone: true,
|
|
@@ -133,7 +133,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
133
133
|
}]
|
|
134
134
|
}] });
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
class FixedPipe {
|
|
137
|
+
transform(value, ...args) {
|
|
138
|
+
return (value / 100).toFixed(2);
|
|
139
|
+
}
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FixedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
141
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: FixedPipe, isStandalone: true, name: "fixed" });
|
|
142
|
+
}
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FixedPipe, decorators: [{
|
|
144
|
+
type: Pipe,
|
|
145
|
+
args: [{
|
|
146
|
+
name: 'fixed',
|
|
147
|
+
standalone: true,
|
|
148
|
+
}]
|
|
149
|
+
}] });
|
|
150
|
+
|
|
151
|
+
const COMMON_PIPES = [PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe, FixedPipe];
|
|
137
152
|
|
|
138
153
|
class DecimalDirective {
|
|
139
154
|
el;
|
|
@@ -157,10 +172,10 @@ class DecimalDirective {
|
|
|
157
172
|
event.preventDefault();
|
|
158
173
|
}
|
|
159
174
|
}
|
|
160
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
161
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DecimalDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
176
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: DecimalDirective, isStandalone: true, selector: "[rolatechDecimal]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 });
|
|
162
177
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DecimalDirective, decorators: [{
|
|
164
179
|
type: Directive,
|
|
165
180
|
args: [{
|
|
166
181
|
selector: '[rolatechDecimal]',
|
|
@@ -233,5 +248,5 @@ function provideAngularCommon(environment) {
|
|
|
233
248
|
* Generated bundle index. Do not edit.
|
|
234
249
|
*/
|
|
235
250
|
|
|
236
|
-
export { APP_CONFIG, AddressFormatPipe, AngularCommonModule, COMMON_DIRECTIVES, COMMON_PIPES, DecimalDirective, DurationPipe, OptionsFormatPipe, PrettyjsonPipe, REQUEST, RESPONSE, TimePipe, UserStatus, UsernameMatcher, WINDOW, provideAngularCommon };
|
|
251
|
+
export { APP_CONFIG, AddressFormatPipe, AngularCommonModule, COMMON_DIRECTIVES, COMMON_PIPES, DecimalDirective, DurationPipe, FixedPipe, OptionsFormatPipe, PrettyjsonPipe, REQUEST, RESPONSE, TimePipe, UserStatus, UsernameMatcher, WINDOW, provideAngularCommon };
|
|
237
252
|
//# sourceMappingURL=rolatech-angular-common.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-common.mjs","sources":["../../../../libs/angular-common/src/lib/angular-common.module.ts","../../../../libs/angular-common/src/lib/interfaces/auth.interface.ts","../../../../libs/angular-common/src/lib/pipes/prettyjson.pipe.ts","../../../../libs/angular-common/src/lib/pipes/time.pipe.ts","../../../../libs/angular-common/src/lib/pipes/duration.pipe.ts","../../../../libs/angular-common/src/lib/pipes/options.pipe.ts","../../../../libs/angular-common/src/lib/pipes/address.pipe.ts","../../../../libs/angular-common/src/lib/pipes/index.ts","../../../../libs/angular-common/src/lib/directive/decimal.directive.ts","../../../../libs/angular-common/src/lib/directive/index.ts","../../../../libs/angular-common/src/lib/router/username-matcher.ts","../../../../libs/angular-common/src/lib/tokens.ts","../../../../libs/angular-common/src/provider.ts","../../../../libs/angular-common/src/rolatech-angular-common.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\n\n@NgModule({\n imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n})\nexport class AngularCommonModule {}\n","export interface User {\n id?: string;\n username?: string;\n roles: [];\n}\nexport interface PasswordChange {\n oldPassword: string;\n newPassword: string;\n ne2Password: string;\n}\nexport enum UserStatus {\n ACTIVE = '正常',\n AWAITING = '审核中',\n DELETED = '已删除',\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'prettyjson',\n standalone: true,\n})\nexport class PrettyjsonPipe implements PipeTransform {\n transform(value: any, ...args: any[]): any {\n if (value) {\n return JSON.stringify(value, null, 4).replace(/ /g, ' ').replace(/\\n/g, '<br/>');\n } else {\n return '{}';\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'time', pure: false, standalone: true })\nexport class TimePipe implements PipeTransform {\n transform(date: string): string {\n return this.format(Date.parse(date));\n }\n\n format(date: number) {\n return moment(date).fromNow();\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'duration',\n})\nexport class DurationPipe implements PipeTransform {\n transform(value: number): string {\n if (!value || isNaN(value) || value < 0) {\n return '00:00';\n }\n const hours = Math.floor(value / 3600);\n const minutes = Math.floor((value % 3600) / 60);\n const seconds = Math.floor(value % 60);\n\n const formattedHours = this.padNumber(hours);\n const formattedMinutes = this.padNumber(minutes);\n const formattedSeconds = this.padNumber(seconds);\n if (formattedHours === '00') {\n return `${formattedMinutes}:${formattedSeconds}`;\n } else {\n return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n }\n }\n private padNumber(num: number): string {\n return num < 10 ? `0${num}` : `${num}`;\n // return num !== undefined && num !== null && num >= 0 && num < 10 ? `0${num}` : `${num}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'options',\n})\nexport class OptionsFormatPipe implements PipeTransform {\n transform(items: any[]): any {\n let result = '';\n items.forEach((item, index) => {\n const tmp = index === items.length - 1 ? '' : ', ';\n result += item.value ? item.value.name + tmp : item.name + tmp;\n });\n return result;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'address',\n})\nexport class AddressFormatPipe implements PipeTransform {\n transform(address: any): any {\n if (address) {\n return address.province + ' ' + address.city + ' ' + address.district + ' ' + address.street + ' ' + address.detail;\n }\n return '未设置';\n }\n}\n","import { PrettyjsonPipe } from './prettyjson.pipe';\nimport { TimePipe } from '../pipes/time.pipe';\nimport { DurationPipe } from './duration.pipe';\nimport { OptionsFormatPipe } from './options.pipe';\nimport { AddressFormatPipe } from './address.pipe';\nexport { PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe };\nexport const COMMON_PIPES = [PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe];\n","import { Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[rolatechDecimal]',\n standalone: true,\n})\nexport class DecimalDirective {\n private regex = new RegExp(/^\\d*\\.?\\d{0,2}$/g);\n\n // Allow decimal numbers and negative values\n // Allow key codes for special events. Reflect :\n // Backspace, tab, end, home\n private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Del', 'Delete'];\n\n constructor(private el: ElementRef) {}\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent) {\n // Allow Backspace, tab, end, and home keys\n if (this.specialKeys.indexOf(event.key) !== -1) {\n return;\n }\n const current: string = this.el.nativeElement.value;\n const position = this.el.nativeElement.selectionStart;\n const next: string = [current.slice(0, position), event.key == 'Decimal' ? '.' : event.key, current.slice(position)].join(\n '',\n );\n if (next && !String(next).match(this.regex)) {\n event.preventDefault();\n }\n }\n}\n","import { Provider } from '@angular/core';\nimport { DecimalDirective } from './decimal.directive';\n\nexport { DecimalDirective };\n\nexport const COMMON_DIRECTIVES: Provider[] = [DecimalDirective];\n","import { UrlSegment, UrlMatchResult } from '@angular/router';\n\nexport function UsernameMatcher(url: UrlSegment[]): UrlMatchResult | null {\n // const regex = /^@(\\w+)$/; // Matches strings like \"@username\"\n // const matched = regex.test(url[0].path);\n const matched = url[0].path.startsWith('@');\n if (!matched) {\n return null;\n }\n if (url.length === 1) {\n return { consumed: url, posParams: { username: new UrlSegment(url[0].path.substring(1), {}) } };\n }\n if (url.length === 2) {\n return {\n consumed: url.slice(0, 1),\n posParams: {\n username: new UrlSegment(url[0].path.substring(1), {}),\n path: url[1],\n },\n };\n }\n return { consumed: url };\n}\n","import { InjectionToken, PLATFORM_ID, inject } from '@angular/core';\nimport { Request, Response } from 'express';\nexport interface AppConfig {\n name: string;\n baseUrl: string;\n clientId: string;\n cookieName: string;\n accountsUrl: string;\n myaccountUrl: string;\n www: string;\n endpoint?: EndpointBasicAuth;\n}\nexport interface EndpointBasicAuth {\n username: string;\n password: string;\n}\nexport const APP_CONFIG = new InjectionToken<AppConfig | any>('@rolatech/angular-common config');\n\nexport const REQUEST = new InjectionToken<Request>('REQUEST');\nexport const RESPONSE = new InjectionToken<Response>('RESPONSE');\n\nexport const WINDOW = new InjectionToken<Window>('@rolatech/angular-common global Window object', {\n providedIn: 'root',\n factory: () => {\n const platform = inject(PLATFORM_ID);\n return platform === 'browser' ? window : ({} as Window);\n },\n});\n","import { APP_ID, EnvironmentProviders, Provider, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';\nimport { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';\nimport { APP_CONFIG } from './lib/tokens';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { COMMON_PIPES } from './lib/pipes';\nimport { COMMON_DIRECTIVES } from './lib/directive';\nimport { CommonModule, IMAGE_CONFIG } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { MAT_ICON_DEFAULT_OPTIONS } from '@angular/material/icon';\n\nexport function provideAngularCommon(environment?: any): EnvironmentProviders {\n const providers: (Provider | EnvironmentProviders)[] = [\n ...COMMON_PIPES,\n ...COMMON_DIRECTIVES,\n {\n provide: APP_CONFIG,\n useValue: environment,\n },\n {\n provide: IMAGE_CONFIG,\n useValue: {\n disableImageSizeWarning: true,\n disableImageLazyLoadWarning: true,\n },\n },\n { provide: APP_ID, useValue: 'serverApp' },\n { provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2000 } },\n { provide: MAT_ICON_DEFAULT_OPTIONS, useValue: { fontSet: 'material-symbols-outlined' } },\n importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),\n ];\n return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MASa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAC1F,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;wGAEzF,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAA8C,WAAW,EAAE,mBAAmB,EAC1F,YAAY,EAA8C,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAEzF,mBAAmB,EAA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kB,iCAAiC,EAAE;MAEpF,OAAO,GAAG,IAAI,cAAc,CAAU,SAAS,EAAE;MACjD,QAAQ,GAAG,IAAI,cAAc,CAAW,UAAU,EAAE;MAEpD,MAAM,GAAG,IAAI,cAAc,CAAS,+CAA+C,EAAE;AAChG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,QAAQ,KAAK,SAAS,GAAG,MAAM,GAAI,EAAa,CAAC;KACzD;AACF,CAAA;;ACjBK,SAAU,oBAAoB,CAAC,WAAiB,EAAA;AACpD,IAAA,MAAM,SAAS,GAAwC;AACrD,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,iBAAiB;AACpB,QAAA;AACE,YAAA,OAAO,EAAE,UAAU;AACnB,YAAA,QAAQ,EAAE,WAAW;AACtB,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,QAAQ,EAAE;AACR,gBAAA,uBAAuB,EAAE,IAAI;AAC7B,gBAAA,2BAA2B,EAAE,IAAI;AAClC,aAAA;AACF,SAAA;AACD,QAAA,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;QAC1C,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACxE,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE;QACzF,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF,CAAC;AACF,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;AAC7C;;AC/BA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rolatech-angular-common.mjs","sources":["../../../../libs/angular-common/src/lib/angular-common.module.ts","../../../../libs/angular-common/src/lib/interfaces/auth.interface.ts","../../../../libs/angular-common/src/lib/pipes/prettyjson.pipe.ts","../../../../libs/angular-common/src/lib/pipes/time.pipe.ts","../../../../libs/angular-common/src/lib/pipes/duration.pipe.ts","../../../../libs/angular-common/src/lib/pipes/options.pipe.ts","../../../../libs/angular-common/src/lib/pipes/address.pipe.ts","../../../../libs/angular-common/src/lib/pipes/fixed.pipe.ts","../../../../libs/angular-common/src/lib/pipes/index.ts","../../../../libs/angular-common/src/lib/directive/decimal.directive.ts","../../../../libs/angular-common/src/lib/directive/index.ts","../../../../libs/angular-common/src/lib/router/username-matcher.ts","../../../../libs/angular-common/src/lib/tokens.ts","../../../../libs/angular-common/src/provider.ts","../../../../libs/angular-common/src/rolatech-angular-common.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\n\n@NgModule({\n imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n})\nexport class AngularCommonModule {}\n","export interface User {\n id?: string;\n username?: string;\n roles: [];\n}\nexport interface PasswordChange {\n oldPassword: string;\n newPassword: string;\n ne2Password: string;\n}\nexport enum UserStatus {\n ACTIVE = '正常',\n AWAITING = '审核中',\n DELETED = '已删除',\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'prettyjson',\n standalone: true,\n})\nexport class PrettyjsonPipe implements PipeTransform {\n transform(value: any, ...args: any[]): any {\n if (value) {\n return JSON.stringify(value, null, 4).replace(/ /g, ' ').replace(/\\n/g, '<br/>');\n } else {\n return '{}';\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'time', pure: false, standalone: true })\nexport class TimePipe implements PipeTransform {\n transform(date: string): string {\n return this.format(Date.parse(date));\n }\n\n format(date: number) {\n return moment(date).fromNow();\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'duration',\n})\nexport class DurationPipe implements PipeTransform {\n transform(value: number): string {\n if (!value || isNaN(value) || value < 0) {\n return '00:00';\n }\n const hours = Math.floor(value / 3600);\n const minutes = Math.floor((value % 3600) / 60);\n const seconds = Math.floor(value % 60);\n\n const formattedHours = this.padNumber(hours);\n const formattedMinutes = this.padNumber(minutes);\n const formattedSeconds = this.padNumber(seconds);\n if (formattedHours === '00') {\n return `${formattedMinutes}:${formattedSeconds}`;\n } else {\n return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n }\n }\n private padNumber(num: number): string {\n return num < 10 ? `0${num}` : `${num}`;\n // return num !== undefined && num !== null && num >= 0 && num < 10 ? `0${num}` : `${num}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'options',\n})\nexport class OptionsFormatPipe implements PipeTransform {\n transform(items: any[]): any {\n let result = '';\n items.forEach((item, index) => {\n const tmp = index === items.length - 1 ? '' : ', ';\n result += item.value ? item.value.name + tmp : item.name + tmp;\n });\n return result;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'address',\n})\nexport class AddressFormatPipe implements PipeTransform {\n transform(address: any): any {\n if (address) {\n return address.province + ' ' + address.city + ' ' + address.district + ' ' + address.street + ' ' + address.detail;\n }\n return '未设置';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'fixed',\n standalone: true,\n})\nexport class FixedPipe implements PipeTransform {\n transform(value: number, ...args: unknown[]): unknown {\n return (value / 100).toFixed(2);\n }\n}\n","import { PrettyjsonPipe } from './prettyjson.pipe';\nimport { TimePipe } from '../pipes/time.pipe';\nimport { DurationPipe } from './duration.pipe';\nimport { OptionsFormatPipe } from './options.pipe';\nimport { AddressFormatPipe } from './address.pipe';\nimport { FixedPipe } from './fixed.pipe';\nexport { PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe, FixedPipe };\nexport const COMMON_PIPES = [PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe, FixedPipe];\n","import { Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[rolatechDecimal]',\n standalone: true,\n})\nexport class DecimalDirective {\n private regex = new RegExp(/^\\d*\\.?\\d{0,2}$/g);\n\n // Allow decimal numbers and negative values\n // Allow key codes for special events. Reflect :\n // Backspace, tab, end, home\n private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Del', 'Delete'];\n\n constructor(private el: ElementRef) {}\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent) {\n // Allow Backspace, tab, end, and home keys\n if (this.specialKeys.indexOf(event.key) !== -1) {\n return;\n }\n const current: string = this.el.nativeElement.value;\n const position = this.el.nativeElement.selectionStart;\n const next: string = [current.slice(0, position), event.key == 'Decimal' ? '.' : event.key, current.slice(position)].join(\n '',\n );\n if (next && !String(next).match(this.regex)) {\n event.preventDefault();\n }\n }\n}\n","import { Provider } from '@angular/core';\nimport { DecimalDirective } from './decimal.directive';\n\nexport { DecimalDirective };\n\nexport const COMMON_DIRECTIVES: Provider[] = [DecimalDirective];\n","import { UrlSegment, UrlMatchResult } from '@angular/router';\n\nexport function UsernameMatcher(url: UrlSegment[]): UrlMatchResult | null {\n // const regex = /^@(\\w+)$/; // Matches strings like \"@username\"\n // const matched = regex.test(url[0].path);\n const matched = url[0].path.startsWith('@');\n if (!matched) {\n return null;\n }\n if (url.length === 1) {\n return { consumed: url, posParams: { username: new UrlSegment(url[0].path.substring(1), {}) } };\n }\n if (url.length === 2) {\n return {\n consumed: url.slice(0, 1),\n posParams: {\n username: new UrlSegment(url[0].path.substring(1), {}),\n path: url[1],\n },\n };\n }\n return { consumed: url };\n}\n","import { InjectionToken, PLATFORM_ID, inject } from '@angular/core';\nimport { Request, Response } from 'express';\nexport interface AppConfig {\n name: string;\n baseUrl: string;\n clientId: string;\n cookieName: string;\n accountsUrl: string;\n myaccountUrl: string;\n www: string;\n endpoint?: EndpointBasicAuth;\n}\nexport interface EndpointBasicAuth {\n username: string;\n password: string;\n}\nexport const APP_CONFIG = new InjectionToken<AppConfig | any>('@rolatech/angular-common config');\n\nexport const REQUEST = new InjectionToken<Request>('REQUEST');\nexport const RESPONSE = new InjectionToken<Response>('RESPONSE');\n\nexport const WINDOW = new InjectionToken<Window>('@rolatech/angular-common global Window object', {\n providedIn: 'root',\n factory: () => {\n const platform = inject(PLATFORM_ID);\n return platform === 'browser' ? window : ({} as Window);\n },\n});\n","import { APP_ID, EnvironmentProviders, Provider, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';\nimport { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';\nimport { APP_CONFIG } from './lib/tokens';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { COMMON_PIPES } from './lib/pipes';\nimport { COMMON_DIRECTIVES } from './lib/directive';\nimport { CommonModule, IMAGE_CONFIG } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { MAT_ICON_DEFAULT_OPTIONS } from '@angular/material/icon';\n\nexport function provideAngularCommon(environment?: any): EnvironmentProviders {\n const providers: (Provider | EnvironmentProviders)[] = [\n ...COMMON_PIPES,\n ...COMMON_DIRECTIVES,\n {\n provide: APP_CONFIG,\n useValue: environment,\n },\n {\n provide: IMAGE_CONFIG,\n useValue: {\n disableImageSizeWarning: true,\n disableImageLazyLoadWarning: true,\n },\n },\n { provide: APP_ID, useValue: 'serverApp' },\n { provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2000 } },\n { provide: MAT_ICON_DEFAULT_OPTIONS, useValue: { fontSet: 'material-symbols-outlined' } },\n importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),\n ];\n return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MASa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAC1F,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;wGAEzF,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAA8C,WAAW,EAAE,mBAAmB,EAC1F,YAAY,EAA8C,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAEzF,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AACrG,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AACtG,iBAAA,CAAA;;;ICEW,WAIX;AAJD,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,cAAa,CAAA;AACb,IAAA,UAAA,CAAA,UAAA,CAAA,GAAA,oBAAgB,CAAA;AAChB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,oBAAe,CAAA;AACjB,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA;;MCRY,cAAc,CAAA;A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AAG,IAAI,cAAc,CAAW,UAAU,EAAE;MAEpD,MAAM,GAAG,IAAI,cAAc,CAAS,+CAA+C,EAAE;AAChG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,QAAQ,KAAK,SAAS,GAAG,MAAM,GAAI,EAAa,CAAC;KACzD;AACF,CAAA;;ACjBK,SAAU,oBAAoB,CAAC,WAAiB,EAAA;AACpD,IAAA,MAAM,SAAS,GAAwC;AACrD,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,iBAAiB;AACpB,QAAA;AACE,YAAA,OAAO,EAAE,UAAU;AACnB,YAAA,QAAQ,EAAE,WAAW;AACtB,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,QAAQ,EAAE;AACR,gBAAA,uBAAuB,EAAE,IAAI;AAC7B,gBAAA,2BAA2B,EAAE,IAAI;AAClC,aAAA;AACF,SAAA;AACD,QAAA,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;QAC1C,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACxE,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE;QACzF,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF,CAAC;AACF,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;AAC7C;;AC/BA;;AAEG;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FixedPipe implements PipeTransform {
|
|
4
|
+
transform(value: number, ...args: unknown[]): unknown;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FixedPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FixedPipe, "fixed", true>;
|
|
7
|
+
}
|
package/lib/pipes/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ import { TimePipe } from '../pipes/time.pipe';
|
|
|
3
3
|
import { DurationPipe } from './duration.pipe';
|
|
4
4
|
import { OptionsFormatPipe } from './options.pipe';
|
|
5
5
|
import { AddressFormatPipe } from './address.pipe';
|
|
6
|
-
|
|
6
|
+
import { FixedPipe } from './fixed.pipe';
|
|
7
|
+
export { PrettyjsonPipe, TimePipe, DurationPipe, OptionsFormatPipe, AddressFormatPipe, FixedPipe };
|
|
7
8
|
export declare const COMMON_PIPES: (typeof PrettyjsonPipe)[];
|