@yelon/util 14.1.1 → 15.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/README.md +2 -6
- package/config/abc/exception.type.d.ts +9 -0
- package/config/abc/index.d.ts +1 -0
- package/config/abc/media.type.d.ts +1 -1
- package/config/abc/st.type.d.ts +8 -0
- package/config/auth/auth.type.d.ts +0 -6
- package/config/config.types.d.ts +6 -7
- package/config/index.d.ts +1 -1
- package/config/socket/socket.type.d.ts +4 -0
- package/date-time/time.d.ts +1 -1
- package/decorator/convert.d.ts +2 -2
- package/decorator/zone-outside.d.ts +1 -1
- package/esm2020/array/array-type.service.mjs +1 -1
- package/esm2020/array/array.service.mjs +4 -5
- package/esm2020/browser/cookie.service.mjs +8 -8
- package/esm2020/browser/scroll.service.mjs +8 -8
- package/esm2020/config/abc/exception.type.mjs +2 -0
- package/esm2020/config/abc/index.mjs +2 -1
- package/esm2020/config/abc/media.type.mjs +1 -1
- package/esm2020/config/abc/st.type.mjs +1 -1
- package/esm2020/config/auth/auth.type.mjs +1 -1
- package/esm2020/config/config.service.mjs +4 -5
- package/esm2020/config/config.types.mjs +1 -1
- package/esm2020/config/index.mjs +2 -2
- package/esm2020/config/socket/socket.type.mjs +2 -0
- package/esm2020/format/currency.service.mjs +3 -3
- package/esm2020/format/validate.mjs +2 -2
- package/esm2020/other/index.mjs +2 -1
- package/esm2020/other/lazy.service.mjs +44 -15
- package/esm2020/other/path-to-regexp.service.mjs +239 -0
- package/esm2020/pipes/currency/cny.pipe.mjs +3 -3
- package/esm2020/pipes/currency/mega.pipe.mjs +3 -3
- package/esm2020/pipes/currency/module.mjs +4 -4
- package/esm2020/pipes/currency/price.pipe.mjs +3 -3
- package/esm2020/pipes/filter/filter.pipe.mjs +3 -3
- package/esm2020/pipes/filter/module.mjs +4 -4
- package/esm2020/pipes/format/mask.pipe.mjs +3 -3
- package/esm2020/pipes/format/module.mjs +4 -4
- package/fesm2015/array.mjs +3 -4
- package/fesm2015/array.mjs.map +1 -1
- package/fesm2015/browser.mjs +14 -14
- package/fesm2015/browser.mjs.map +1 -1
- package/fesm2015/config.mjs +3 -4
- package/fesm2015/config.mjs.map +1 -1
- package/fesm2015/format.mjs +4 -4
- package/fesm2015/format.mjs.map +1 -1
- package/fesm2015/other.mjs +282 -15
- package/fesm2015/other.mjs.map +1 -1
- package/fesm2015/pipe-currency.mjs +13 -13
- package/fesm2015/pipe-filter.mjs +7 -7
- package/fesm2015/pipe-format.mjs +7 -7
- package/fesm2020/array.mjs +3 -4
- package/fesm2020/array.mjs.map +1 -1
- package/fesm2020/browser.mjs +14 -14
- package/fesm2020/browser.mjs.map +1 -1
- package/fesm2020/config.mjs +3 -4
- package/fesm2020/config.mjs.map +1 -1
- package/fesm2020/format.mjs +4 -4
- package/fesm2020/format.mjs.map +1 -1
- package/fesm2020/other.mjs +281 -15
- package/fesm2020/other.mjs.map +1 -1
- package/fesm2020/pipe-currency.mjs +13 -13
- package/fesm2020/pipe-filter.mjs +7 -7
- package/fesm2020/pipe-format.mjs +7 -7
- package/format/currency.types.d.ts +1 -1
- package/other/index.d.ts +1 -0
- package/other/lazy.service.d.ts +26 -3
- package/other/path-to-regexp.service.d.ts +26 -0
- package/package.json +17 -1
- package/config/stomp/stomp.type.d.ts +0 -2
- package/esm2020/config/stomp/stomp.type.mjs +0 -2
@@ -1,4 +1,3 @@
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
1
|
import { Inject, Injectable, Optional } from '@angular/core';
|
3
2
|
import { deepMergeKey } from '@yelon/util/other';
|
4
3
|
import { YUNZAI_CONFIG } from './config.types';
|
@@ -24,9 +23,9 @@ export class YunzaiConfigService {
|
|
24
23
|
this.config[componentName] = { ...this.config[componentName], ...value };
|
25
24
|
}
|
26
25
|
}
|
27
|
-
YunzaiConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
28
|
-
YunzaiConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
26
|
+
YunzaiConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiConfigService, deps: [{ token: YUNZAI_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
27
|
+
YunzaiConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiConfigService, providedIn: 'root' });
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiConfigService, decorators: [{
|
30
29
|
type: Injectable,
|
31
30
|
args: [{ providedIn: 'root' }]
|
32
31
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -35,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.5", ngImpor
|
|
35
34
|
type: Inject,
|
36
35
|
args: [YUNZAI_CONFIG]
|
37
36
|
}] }]; } });
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2NvbmZpZy9jb25maWcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFN0QsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBR2pELE9BQU8sRUFBaUMsYUFBYSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBRzlFLE1BQU0sT0FBTyxtQkFBbUI7SUFHOU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tZTogVCwgdmFsdWU6IFl1bnphaUNvbmZpZ1tUXSk6IHZvaWQge1xuICAgIHRoaXMuY29uZmlnW2NvbXBvbmVudE5hbWVdID0geyAuLi50aGlzLmNvbmZpZ1tjb21wb25lbnROYW1lXSwgLi4udmFsdWUgfTtcbiAgfVxufVxuIl19
|
@@ -6,4 +6,4 @@ export const YUNZAI_CONFIG = new InjectionToken('yunzai-config', {
|
|
6
6
|
export function YUNZAI_CONFIG_FACTORY() {
|
7
7
|
return {};
|
8
8
|
}
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLnR5cGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9jb25maWcvY29uZmlnLnR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFvRS9DLE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBRyxJQUFJLGNBQWMsQ0FBZSxlQUFlLEVBQUU7SUFDN0UsVUFBVSxFQUFFLE1BQU07SUFDbEIsT0FBTyxFQUFFLHFCQUFxQjtDQUMvQixDQUFDLENBQUM7QUFFSCxNQUFNLFVBQVUscUJBQXFCO0lBQ25DLE9BQU8sRUFBRSxDQUFDO0FBQ1osQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGlvblRva2VuIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7XG4gIFl1bnphaURhdGVSYW5nZVBpY2tlckNvbmZpZyxcbiAgWXVuemFpRXJyb3JDb2xsZWN0Q29uZmlnLFxuICBZdW56YWlFeGNlcHRpb25UeXBlLFxuICBZdW56YWlJbWFnZUNvbmZpZyxcbiAgWXVuemFp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pZztcbiAgYXV0aD86IFl1bnphaUF1dGhDb25maWc7XG4gIGNhY2hlPzogWXVuemFpQ2FjaGVDb25maWc7XG4gIGNoYXJ0PzogWXVuemFpQ2hhcnRDb25maWc7XG4gIG1vY2s/OiBZdW56YWlNb2NrQ29uZmlnO1xuICB1dGlsQXJyYXk/OiBZdW56YWlVdGlsQXJyYXlDb25maWc7XG4gIHV0aWxDdXJyZW5jeT86IFl1bnphaVV0aWxDdXJyZW5jeUNvbmZpZztcbiAgdGhlbWVIdHRwPzogWXVuemFpVGhlbWVIdHRwQ2xpZW50Q29uZmlnO1xuICB0aGVtZVJlc3BvbnNpdmU/OiBZdW56YWlUaGVtZVJlc3BvbnNpdmVDb25maWc7XG4gIHRoZW1lSTE4bj86IFl1bnphaVRoZW1lSTE4bkNvbmZpZztcbn1cblxuZXhwb3J0IHR5cGUgWXVuemFpQ29uZmlnS2V5ID0ga2V5b2YgWXVuemFpQ29uZmlnO1xuXG5leHBvcnQgY29uc3QgWVVOWkFJX0NPTkZJRyA9IG5ldyBJbmplY3Rpb25Ub2tlbjxZdW56YWlDb25maWc+KCd5dW56YWktY29uZmlnJywge1xuICBwcm92aWRlZEluOiAncm9vdCcsXG4gIGZhY3Rvcnk6IFlVTlpBSV9DT05GSUdfRkFDVE9SWVxufSk7XG5cbmV4cG9ydCBmdW5jdGlvbiBZVU5aQUlfQ09ORklHX0ZBQ1RPUlkoKTogWXVuemFpQ29uZmlnIHtcbiAgcmV0dXJuIHt9O1xufVxuIl19
|
package/esm2020/config/index.mjs
CHANGED
@@ -9,7 +9,7 @@ export * from './theme/index';
|
|
9
9
|
export * from './mock/mock.type';
|
10
10
|
export * from './sf/sf.type';
|
11
11
|
export * from './bis/bis.type';
|
12
|
-
export * from './
|
12
|
+
export * from './socket/socket.type';
|
13
13
|
export * from './config.types';
|
14
14
|
export * from './config.service';
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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nQgKiBmcm9tICcuL2Jpcy9iaXMudHlwZSc7XG5leHBvcnQgKiBmcm9tICcuL3NvY2tldC9zb2NrZXQudHlwZSc7XG5cbmV4cG9ydCAqIGZyb20gJy4vY29uZmlnLnR5cGVzJztcbmV4cG9ydCAqIGZyb20gJy4vY29uZmlnLnNlcnZpY2UnO1xuIl19
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export {};
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ja2V0LnR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2NvbmZpZy9zb2NrZXQvc29ja2V0LnR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFJ4U3RvbXBDb25maWcgfSBmcm9tICdAc3RvbXAvcngtc3RvbXAnO1xuXG5leHBvcnQgaW50ZXJmYWNlIFl1bnphaVNvY2tldENvbmZpZyBleHRlbmRzIFJ4U3RvbXBDb25maWcge1xuICBiYXNlVXJsOiBzdHJpbmc7XG59XG4iXX0=
|
@@ -223,9 +223,9 @@ export class CurrencyService {
|
|
223
223
|
return ret;
|
224
224
|
}
|
225
225
|
}
|
226
|
-
CurrencyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
227
|
-
CurrencyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
226
|
+
CurrencyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CurrencyService, deps: [{ token: i1.YunzaiConfigService }, { token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Injectable });
|
227
|
+
CurrencyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CurrencyService, providedIn: 'root' });
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CurrencyService, decorators: [{
|
229
229
|
type: Injectable,
|
230
230
|
args: [{ providedIn: 'root' }]
|
231
231
|
}], ctorParameters: function () { return [{ type: i1.YunzaiConfigService }, { type: undefined, decorators: [{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export const REGEX_STR = {
|
2
|
-
num: `((
|
2
|
+
num: `(([-+]?\\d+\\.\\d+)|([-+]?\\d+)|([-+]?\\.\\d+))(?:[eE]([-+]?\\d+))?`,
|
3
3
|
idCard: `(^\\d{15}$)|(^\\d{17}(?:[0-9]|X)$)`,
|
4
4
|
mobile: `^(0|\\+?86|17951)?1[0-9]{10}$`,
|
5
5
|
url: `(((^https?:(?:\/\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+(?::\\d+)?|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)`,
|
@@ -91,4 +91,4 @@ export function isColor(color) {
|
|
91
91
|
export function isChinese(value) {
|
92
92
|
return REGEX.chinese.test(value);
|
93
93
|
}
|
94
|
-
//# sourceMappingURL=data:application/json;base64,
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Zvcm1hdC92YWxpZGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxTQUFTLEdBQUc7SUFDdkIsR0FBRyxFQUFFLHFFQUFxRTtJQUMxRSxNQ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1xuICByZXR1cm4gUkVHRVguY29sb3IudGVzdChjb2xvcik7XG59XG5cbi8qKlxuICogV2hldGVyIGlzIGNoaW5lc2VcbiAqXG4gKiDmmK/lkKbkuK3mlodcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzQ2hpbmVzZSh2YWx1ZTogc3RyaW5nKTogYm9vbGVhbiB7XG4gIHJldHVybiBSRUdFWC5jaGluZXNlLnRlc3QodmFsdWUpO1xufVxuIl19
|
package/esm2020/other/index.mjs
CHANGED
@@ -4,4 +4,5 @@ export * from './lazy.service';
|
|
4
4
|
export * from './assert';
|
5
5
|
export * from './url';
|
6
6
|
export * from './resize';
|
7
|
-
|
7
|
+
export * from './path-to-regexp.service';
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL290aGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsUUFBUSxDQUFDO0FBQ3ZCLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxPQUFPLENBQUM7QUFDdEIsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYywwQkFBMEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZGVlcCc7XG5leHBvcnQgKiBmcm9tICcuL2xvZ2dlcic7XG5leHBvcnQgKiBmcm9tICcuL2xhenkuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2Fzc2VydCc7XG5leHBvcnQgKiBmcm9tICcuL3VybCc7XG5leHBvcnQgKiBmcm9tICcuL3Jlc2l6ZSc7XG5leHBvcnQgKiBmcm9tICcuL3BhdGgtdG8tcmVnZXhwLnNlcnZpY2UnO1xuIl19
|
@@ -3,6 +3,8 @@ import { Inject, Injectable } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject, filter, share } from 'rxjs';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
/**
|
6
|
+
* `LazyService` delay loading JS or CSS files.
|
7
|
+
*
|
6
8
|
* 延迟加载资源(js 或 css)服务
|
7
9
|
*/
|
8
10
|
export class LazyService {
|
@@ -19,17 +21,29 @@ export class LazyService {
|
|
19
21
|
this.list = {};
|
20
22
|
this.cached = {};
|
21
23
|
}
|
24
|
+
attachAttributes(el, attributes) {
|
25
|
+
if (attributes == null)
|
26
|
+
return;
|
27
|
+
Object.entries(attributes).forEach(([key, value]) => {
|
28
|
+
el.setAttribute(key, value);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* Load script or style files
|
33
|
+
*/
|
22
34
|
load(paths) {
|
23
35
|
if (!Array.isArray(paths)) {
|
24
36
|
paths = [paths];
|
25
37
|
}
|
26
38
|
const promises = [];
|
27
|
-
paths
|
28
|
-
|
29
|
-
|
39
|
+
paths
|
40
|
+
.map(v => (typeof v !== 'object' ? { path: v } : v))
|
41
|
+
.forEach(item => {
|
42
|
+
if (item.path.endsWith('.js')) {
|
43
|
+
promises.push(this.loadScript(item.path, item.options));
|
30
44
|
}
|
31
45
|
else {
|
32
|
-
promises.push(this.loadStyle(path));
|
46
|
+
promises.push(this.loadStyle(item.path, item.options));
|
33
47
|
}
|
34
48
|
});
|
35
49
|
return Promise.all(promises).then(res => {
|
@@ -37,7 +51,13 @@ export class LazyService {
|
|
37
51
|
return Promise.resolve(res);
|
38
52
|
});
|
39
53
|
}
|
40
|
-
loadScript(path, innerContent) {
|
54
|
+
loadScript(path, innerContent, attributes) {
|
55
|
+
const options = typeof innerContent === 'object'
|
56
|
+
? innerContent
|
57
|
+
: {
|
58
|
+
innerContent,
|
59
|
+
attributes
|
60
|
+
};
|
41
61
|
return new Promise(resolve => {
|
42
62
|
if (this.list[path] === true) {
|
43
63
|
resolve({ ...this.cached[path], status: 'loading' });
|
@@ -52,8 +72,9 @@ export class LazyService {
|
|
52
72
|
const node = this.doc.createElement('script');
|
53
73
|
node.type = 'text/javascript';
|
54
74
|
node.src = path;
|
55
|
-
|
56
|
-
|
75
|
+
this.attachAttributes(node, options.attributes);
|
76
|
+
if (options.innerContent) {
|
77
|
+
node.innerHTML = options.innerContent;
|
57
78
|
}
|
58
79
|
node.onload = () => onSuccess({
|
59
80
|
path,
|
@@ -67,7 +88,14 @@ export class LazyService {
|
|
67
88
|
this.doc.getElementsByTagName('head')[0].appendChild(node);
|
68
89
|
});
|
69
90
|
}
|
70
|
-
loadStyle(path, rel
|
91
|
+
loadStyle(path, rel, innerContent, attributes) {
|
92
|
+
const options = typeof rel === 'object'
|
93
|
+
? rel
|
94
|
+
: {
|
95
|
+
rel,
|
96
|
+
innerContent,
|
97
|
+
attributes
|
98
|
+
};
|
71
99
|
return new Promise(resolve => {
|
72
100
|
if (this.list[path] === true) {
|
73
101
|
resolve(this.cached[path]);
|
@@ -75,11 +103,12 @@ export class LazyService {
|
|
75
103
|
}
|
76
104
|
this.list[path] = true;
|
77
105
|
const node = this.doc.createElement('link');
|
78
|
-
node.rel = rel;
|
106
|
+
node.rel = options.rel ?? 'stylesheet';
|
79
107
|
node.type = 'text/css';
|
80
108
|
node.href = path;
|
81
|
-
|
82
|
-
|
109
|
+
this.attachAttributes(node, options.attributes);
|
110
|
+
if (options.innerContent) {
|
111
|
+
node.innerHTML = options.innerContent;
|
83
112
|
}
|
84
113
|
this.doc.getElementsByTagName('head')[0].appendChild(node);
|
85
114
|
const item = {
|
@@ -91,13 +120,13 @@ export class LazyService {
|
|
91
120
|
});
|
92
121
|
}
|
93
122
|
}
|
94
|
-
LazyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
95
|
-
LazyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
123
|
+
LazyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LazyService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
124
|
+
LazyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LazyService, providedIn: 'root' });
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LazyService, decorators: [{
|
97
126
|
type: Injectable,
|
98
127
|
args: [{ providedIn: 'root' }]
|
99
128
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
100
129
|
type: Inject,
|
101
130
|
args: [DOCUMENT]
|
102
131
|
}] }]; } });
|
103
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9vdGhlci9sYXp5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxlQUFlLEVBQWMsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFVbEU7O0dBRUc7QUFFSCxNQUFNLE9BQU8sV0FBVztJQUt0QixZQUFzQyxHQUFjO1FBQWQsUUFBRyxHQUFILEdBQUcsQ0FBVztRQUo1QyxTQUFJLEdBQStCLEVBQUUsQ0FBQztRQUN0QyxXQUFNLEdBQWtDLEVBQUUsQ0FBQztRQUMzQyxZQUFPL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iAgICAgIG5vZGUucmVsID0gb3B0aW9ucy5yZWwgPz8gJ3N0eWxlc2hlZXQnO1xuICAgICAgbm9kZS50eXBlID0gJ3RleHQvY3NzJztcbiAgICAgIG5vZGUuaHJlZiA9IHBhdGg7XG4gICAgICB0aGlzLmF0dGFjaEF0dHJpYnV0ZXMobm9kZSwgb3B0aW9ucy5hdHRyaWJ1dGVzKTtcbiAgICAgIGlmIChvcHRpb25zLmlubmVyQ29udGVudCkge1xuICAgICAgICBub2RlLmlubmVySFRNTCA9IG9wdGlvbnMuaW5uZXJDb250ZW50O1xuICAgICAgfVxuICAgICAgdGhpcy5kb2MuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXS5hcHBlbmRDaGlsZChub2RlKTtcbiAgICAgIGNvbnN0IGl0ZW06IExhenlSZXN1bHQgPSB7XG4gICAgICAgIHBhdGgsXG4gICAgICAgIHN0YXR1czogJ29rJ1xuICAgICAgfTtcbiAgICAgIHRoaXMuY2FjaGVkW3BhdGhdID0gaXRlbTtcbiAgICAgIHJlc29sdmUoaXRlbSk7XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
|
@@ -0,0 +1,239 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class PathToRegexpService {
|
5
|
+
constructor() {
|
6
|
+
this.DEFAULT_DELIMITER = '/';
|
7
|
+
this.PATH_REGEXP = new RegExp(['(\\\\.)', '(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?'].join('|'), 'g');
|
8
|
+
}
|
9
|
+
parse(str, options) {
|
10
|
+
const tokens = [];
|
11
|
+
let key = 0;
|
12
|
+
let index = 0;
|
13
|
+
let path = '';
|
14
|
+
const defaultDelimiter = (options && options.delimiter) || this.DEFAULT_DELIMITER;
|
15
|
+
const whitelist = (options && options.whitelist) || undefined;
|
16
|
+
let pathEscaped = false;
|
17
|
+
let res;
|
18
|
+
while ((res = this.PATH_REGEXP.exec(str)) !== null) {
|
19
|
+
const m = res[0];
|
20
|
+
const escaped = res[1];
|
21
|
+
const offset = res.index;
|
22
|
+
path += str.slice(index, offset);
|
23
|
+
index = offset + m.length;
|
24
|
+
// Ignore already escaped sequences.
|
25
|
+
if (escaped) {
|
26
|
+
path += escaped[1];
|
27
|
+
pathEscaped = true;
|
28
|
+
continue;
|
29
|
+
}
|
30
|
+
let prev = '';
|
31
|
+
const name = res[2];
|
32
|
+
const capture = res[3];
|
33
|
+
const group = res[4];
|
34
|
+
const modifier = res[5];
|
35
|
+
if (!pathEscaped && path.length) {
|
36
|
+
const k = path.length - 1;
|
37
|
+
const c = path[k];
|
38
|
+
const matches = whitelist ? whitelist.indexOf(c) > -1 : true;
|
39
|
+
if (matches) {
|
40
|
+
prev = c;
|
41
|
+
path = path.slice(0, k);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
// Push the current path onto the tokens.
|
45
|
+
if (path) {
|
46
|
+
tokens.push(path);
|
47
|
+
path = '';
|
48
|
+
pathEscaped = false;
|
49
|
+
}
|
50
|
+
const repeat = modifier === '+' || modifier === '*';
|
51
|
+
const optional = modifier === '?' || modifier === '*';
|
52
|
+
const pattern = capture || group;
|
53
|
+
const delimiter = prev || defaultDelimiter;
|
54
|
+
tokens.push({
|
55
|
+
name: name || key++,
|
56
|
+
prefix: prev,
|
57
|
+
delimiter: delimiter,
|
58
|
+
optional: optional,
|
59
|
+
repeat: repeat,
|
60
|
+
pattern: pattern
|
61
|
+
? this.escapeGroup(pattern)
|
62
|
+
: `[^${this.escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter)}]+?`
|
63
|
+
});
|
64
|
+
}
|
65
|
+
// Push any remaining characters.
|
66
|
+
if (path || index < str.length) {
|
67
|
+
tokens.push(path + str.substr(index));
|
68
|
+
}
|
69
|
+
return tokens;
|
70
|
+
}
|
71
|
+
compile(str, options) {
|
72
|
+
return this.tokensToFunction(this.parse(str, options), options);
|
73
|
+
}
|
74
|
+
tokensToFunction(tokens, options) {
|
75
|
+
const matches = new Array(tokens.length);
|
76
|
+
for (let i = 0; i < tokens.length; i++) {
|
77
|
+
if (typeof tokens[i] === 'object') {
|
78
|
+
matches[i] = new RegExp(`^(?:${tokens[i].pattern})$`, this.flags(options));
|
79
|
+
}
|
80
|
+
}
|
81
|
+
return function (data, options) {
|
82
|
+
let path = '';
|
83
|
+
const encode = (options && options.encode) || encodeURIComponent;
|
84
|
+
const validate = options ? options.validate !== false : true;
|
85
|
+
for (let i = 0; i < tokens.length; i++) {
|
86
|
+
const token = tokens[i];
|
87
|
+
if (typeof token === 'string') {
|
88
|
+
path += token;
|
89
|
+
continue;
|
90
|
+
}
|
91
|
+
const value = data ? data[token.name] : undefined;
|
92
|
+
let segment;
|
93
|
+
if (Array.isArray(value)) {
|
94
|
+
if (!token.repeat) {
|
95
|
+
throw new TypeError(`Expected "${token.name}" to not repeat, but got array`);
|
96
|
+
}
|
97
|
+
if (value.length === 0) {
|
98
|
+
if (token.optional) {
|
99
|
+
continue;
|
100
|
+
}
|
101
|
+
throw new TypeError(`Expected "${token.name}" to not be empty`);
|
102
|
+
}
|
103
|
+
for (let j = 0; j < value.length; j++) {
|
104
|
+
segment = encode(value[j], token);
|
105
|
+
if (validate && !matches[i].test(segment)) {
|
106
|
+
throw new TypeError(`Expected all "${token.name}" to match "${token.pattern}"`);
|
107
|
+
}
|
108
|
+
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
109
|
+
}
|
110
|
+
continue;
|
111
|
+
}
|
112
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
113
|
+
segment = encode(String(value), token);
|
114
|
+
if (validate && !matches[i].test(segment)) {
|
115
|
+
throw new TypeError(`Expected "${token.name}" to match "${token.pattern}", but got "${segment}"`);
|
116
|
+
}
|
117
|
+
path += token.prefix + segment;
|
118
|
+
continue;
|
119
|
+
}
|
120
|
+
if (token.optional) {
|
121
|
+
continue;
|
122
|
+
}
|
123
|
+
throw new TypeError(`Expected "${token.name}" to be ${token.repeat ? 'an array' : 'a string'}`);
|
124
|
+
}
|
125
|
+
return path;
|
126
|
+
};
|
127
|
+
}
|
128
|
+
escapeString(str) {
|
129
|
+
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1');
|
130
|
+
}
|
131
|
+
escapeGroup(group) {
|
132
|
+
return group.replace(/([=!:$/()])/g, '\\$1');
|
133
|
+
}
|
134
|
+
flags(options) {
|
135
|
+
return options && options.sensitive ? '' : 'i';
|
136
|
+
}
|
137
|
+
regexpToRegexp(path, keys) {
|
138
|
+
if (!keys) {
|
139
|
+
return path;
|
140
|
+
}
|
141
|
+
const groups = path.source.match(/\((?!\?)/g);
|
142
|
+
if (groups) {
|
143
|
+
for (let i = 0; i < groups.length; i++) {
|
144
|
+
keys.push({
|
145
|
+
name: i,
|
146
|
+
prefix: null,
|
147
|
+
delimiter: null,
|
148
|
+
optional: false,
|
149
|
+
repeat: false,
|
150
|
+
pattern: null
|
151
|
+
});
|
152
|
+
}
|
153
|
+
}
|
154
|
+
return path;
|
155
|
+
}
|
156
|
+
arrayToRegexp(path, keys, options) {
|
157
|
+
const parts = [];
|
158
|
+
for (let i = 0; i < path.length; i++) {
|
159
|
+
parts.push(this.pathToRegexp(path[i], keys, options).source);
|
160
|
+
}
|
161
|
+
return new RegExp(`(?:${parts.join('|')})`, this.flags(options));
|
162
|
+
}
|
163
|
+
stringToRegexp(path, keys, options) {
|
164
|
+
return this.tokensToRegExp(this.parse(path, options), keys, options);
|
165
|
+
}
|
166
|
+
tokensToRegExp(tokens, keys, options) {
|
167
|
+
options = options || {};
|
168
|
+
const strict = options.strict;
|
169
|
+
const start = options.start !== false;
|
170
|
+
const end = options.end !== false;
|
171
|
+
const delimiter = options.delimiter || this.DEFAULT_DELIMITER;
|
172
|
+
const endsWith = []
|
173
|
+
.concat(options.endsWith || [])
|
174
|
+
.map(this.escapeString)
|
175
|
+
.concat('$')
|
176
|
+
.join('|');
|
177
|
+
let route = start ? '^' : '';
|
178
|
+
for (let i = 0; i < tokens.length; i++) {
|
179
|
+
const token = tokens[i];
|
180
|
+
if (typeof token === 'string') {
|
181
|
+
route += this.escapeString(token);
|
182
|
+
}
|
183
|
+
else {
|
184
|
+
const capture = token.repeat
|
185
|
+
? `(?:${token.pattern})(?:${this.escapeString(token.delimiter)}(?:${token.pattern}))*`
|
186
|
+
: token.pattern;
|
187
|
+
if (keys) {
|
188
|
+
keys.push(token);
|
189
|
+
}
|
190
|
+
if (token.optional) {
|
191
|
+
if (!token.prefix) {
|
192
|
+
route += `(${capture})?`;
|
193
|
+
}
|
194
|
+
else {
|
195
|
+
route += `(?:${this.escapeString(token.prefix)}(${capture}))?`;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
else {
|
199
|
+
route += `${this.escapeString(token.prefix)}(${capture})`;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
203
|
+
if (end) {
|
204
|
+
if (!strict) {
|
205
|
+
route += `(?:${this.escapeString(delimiter)})?`;
|
206
|
+
}
|
207
|
+
route += endsWith === '$' ? '$' : `(?=${endsWith})`;
|
208
|
+
}
|
209
|
+
else {
|
210
|
+
const endToken = tokens[tokens.length - 1];
|
211
|
+
const isEndDelimited = typeof endToken === 'string' ? endToken[endToken.length - 1] === delimiter : endToken === undefined;
|
212
|
+
if (!strict) {
|
213
|
+
route += `(?:${this.escapeString(delimiter)}(?=${endsWith}))?`;
|
214
|
+
}
|
215
|
+
if (!isEndDelimited) {
|
216
|
+
route += `(?=${this.escapeString(delimiter)}|${endsWith})`;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
return new RegExp(route, this.flags(options));
|
220
|
+
}
|
221
|
+
pathToRegexp(path, keys, options) {
|
222
|
+
if (path instanceof RegExp) {
|
223
|
+
return this.regexpToRegexp(path, keys);
|
224
|
+
}
|
225
|
+
if (Array.isArray(path)) {
|
226
|
+
return this.arrayToRegexp(/** @type {!Array} */ path, keys, options);
|
227
|
+
}
|
228
|
+
return this.stringToRegexp(/** @type {string} */ path, keys, options);
|
229
|
+
}
|
230
|
+
}
|
231
|
+
PathToRegexpService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: PathToRegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
232
|
+
PathToRegexpService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: PathToRegexpService, providedIn: 'root' });
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: PathToRegexpService, decorators: [{
|
234
|
+
type: Injectable,
|
235
|
+
args: [{
|
236
|
+
providedIn: 'root'
|
237
|
+
}]
|
238
|
+
}], ctorParameters: function () { return []; } });
|
239
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aC10by1yZWdleHAuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvb3RoZXIvcGF0aC10by1yZWdleHAuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxRUFBcUU7QUFDckUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLM0MsTUFBTSxPQUFPLG1CQUFtQjtJQUM5QjtRQUNBLHNCQUFpQixHQUFHLEdBQUcsQ0FBQztRQUV4QixnQkFBVyxHQUFHLElBQUksTUFBTSxDQUN0QixDQUFDLFNBQVMsRUFBRSxxRkFBcUYsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFDNUcsR0FBRyxDQUNKLENBQUM7SUFOYSxDQUFDO0lBUWhCLEtBQUssQ0FBQyxHQUFRLE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saW1pdGVkKSB7XG4gICAgICAgIHJvdXRlICs9IGAoPz0ke3RoaXMuZXNjYXBlU3RyaW5nKGRlbGltaXRlcil9fCR7ZW5kc1dpdGh9KWA7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG5ldyBSZWdFeHAocm91dGUsIHRoaXMuZmxhZ3Mob3B0aW9ucykpO1xuICB9XG5cbiAgcGF0aFRvUmVnZXhwKHBhdGg6IGFueSwga2V5czogYW55LCBvcHRpb25zOiBhbnkpIHtcbiAgICBpZiAocGF0aCBpbnN0YW5jZW9mIFJlZ0V4cCkge1xuICAgICAgcmV0dXJuIHRoaXMucmVnZXhwVG9SZWdleHAocGF0aCwga2V5cyk7XG4gICAgfVxuXG4gICAgaWYgKEFycmF5LmlzQXJyYXkocGF0aCkpIHtcbiAgICAgIHJldHVybiB0aGlzLmFycmF5VG9SZWdleHAoLyoqIEB0eXBlIHshQXJyYXl9ICovIHBhdGgsIGtleXMsIG9wdGlvbnMpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLnN0cmluZ1RvUmVnZXhwKC8qKiBAdHlwZSB7c3RyaW5nfSAqLyBwYXRoLCBrZXlzLCBvcHRpb25zKTtcbiAgfVxufVxuIl19
|
@@ -14,9 +14,9 @@ export class CurrencyCNYPipe {
|
|
14
14
|
return this.srv.cny(value, options);
|
15
15
|
}
|
16
16
|
}
|
17
|
-
CurrencyCNYPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
18
|
-
CurrencyCNYPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
17
|
+
CurrencyCNYPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CurrencyCNYPipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
|
18
|
+
CurrencyCNYPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: CurrencyCNYPipe, name: "cny" });
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
|
20
20
|
type: Pipe,
|
21
21
|
args: [{ name: 'cny' }]
|
22
22
|
}], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
|