@yelon/util 16.4.6 → 17.2.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 +6 -2
- package/browser/cookie.service.d.ts +2 -5
- package/browser/is-empty.d.ts +2 -2
- package/browser/scroll.service.d.ts +3 -6
- package/config/auth/auth.type.d.ts +2 -10
- package/config/cache/cache.type.d.ts +26 -0
- package/config/config.types.d.ts +5 -2
- package/config/index.d.ts +2 -2
- package/config/mock/mock.type.d.ts +0 -4
- package/config/theme/http.type.d.ts +3 -2
- package/config/theme/pipe.type.d.ts +3 -0
- package/date-time/time.d.ts +16 -8
- package/decorator/convert.d.ts +8 -0
- package/decorator/zone-outside.d.ts +2 -2
- package/esm2022/array/array-type.service.mjs +1 -1
- package/esm2022/array/array.service.mjs +6 -5
- package/esm2022/browser/cookie.service.mjs +11 -14
- package/esm2022/browser/copy.mjs +1 -1
- package/esm2022/browser/is-empty.mjs +3 -3
- package/esm2022/browser/scroll.service.mjs +11 -14
- package/esm2022/browser/style.mjs +1 -1
- package/esm2022/config/auth/auth.type.mjs +1 -1
- package/esm2022/config/cache/cache.type.mjs +1 -1
- package/esm2022/config/config.service.mjs +7 -6
- package/esm2022/config/config.types.mjs +5 -2
- package/esm2022/config/index.mjs +3 -3
- package/esm2022/config/mock/mock.type.mjs +1 -1
- package/esm2022/config/theme/http.type.mjs +1 -1
- package/esm2022/config/theme/pipe.type.mjs +2 -0
- package/esm2022/date-time/picker.mjs +1 -1
- package/esm2022/date-time/time.mjs +16 -11
- package/esm2022/decorator/convert.mjs +9 -1
- package/esm2022/decorator/zone-outside.mjs +3 -3
- package/esm2022/form/match-control.mjs +1 -1
- package/esm2022/format/currency.service.mjs +10 -15
- package/esm2022/format/string.mjs +1 -1
- package/esm2022/index.mjs +1 -2
- package/esm2022/math/in-range.mjs +1 -1
- package/esm2022/math/round.mjs +1 -1
- package/esm2022/mcache/localStorageUtils.mjs +1 -1
- package/esm2022/mtypes/header-menu.type.mjs +1 -1
- package/esm2022/mtypes/menu.type.mjs +1 -1
- package/esm2022/mtypes/page.mjs +1 -1
- package/esm2022/other/assert.mjs +2 -2
- package/esm2022/other/deep.mjs +1 -1
- package/esm2022/other/favicon.mjs +1 -1
- package/esm2022/other/index.mjs +2 -2
- package/esm2022/other/lazy.service.mjs +8 -11
- package/esm2022/other/logger.mjs +1 -1
- package/esm2022/other/path-to-regexp.service.mjs +6 -6
- package/esm2022/pipes/currency/cny.pipe.mjs +15 -15
- package/esm2022/pipes/currency/mega.pipe.mjs +16 -20
- package/esm2022/pipes/currency/module.mjs +6 -6
- package/esm2022/pipes/currency/price.pipe.mjs +19 -19
- package/esm2022/pipes/filter/filter.pipe.mjs +11 -10
- package/esm2022/pipes/filter/module.mjs +6 -6
- package/esm2022/pipes/format/mask.pipe.mjs +24 -24
- package/esm2022/pipes/format/module.mjs +6 -6
- package/esm2022/token/window.mjs +1 -1
- package/fesm2022/array.mjs +5 -4
- package/fesm2022/array.mjs.map +1 -1
- package/fesm2022/browser.mjs +20 -26
- package/fesm2022/browser.mjs.map +1 -1
- package/fesm2022/config.mjs +11 -7
- package/fesm2022/config.mjs.map +1 -1
- package/fesm2022/date-time.mjs +15 -10
- package/fesm2022/date-time.mjs.map +1 -1
- package/fesm2022/decorator.mjs +10 -2
- package/fesm2022/decorator.mjs.map +1 -1
- package/fesm2022/form.mjs.map +1 -1
- package/fesm2022/format.mjs +9 -14
- package/fesm2022/format.mjs.map +1 -1
- package/fesm2022/math.mjs.map +1 -1
- package/fesm2022/mcache.mjs.map +1 -1
- package/fesm2022/mtypes.mjs.map +1 -1
- package/fesm2022/other.mjs +17 -20
- package/fesm2022/other.mjs.map +1 -1
- package/fesm2022/pipe-currency.mjs +48 -52
- package/fesm2022/pipe-currency.mjs.map +1 -1
- package/fesm2022/pipe-filter.mjs +15 -14
- package/fesm2022/pipe-filter.mjs.map +1 -1
- package/fesm2022/pipe-format.mjs +28 -28
- package/fesm2022/pipe-format.mjs.map +1 -1
- package/fesm2022/token.mjs.map +1 -1
- package/fesm2022/yelon-util.mjs +0 -1
- package/fesm2022/yelon-util.mjs.map +1 -1
- package/format/currency.service.d.ts +3 -2
- package/index.d.ts +0 -1
- package/mtypes/header-menu.type.d.ts +3 -2
- package/mtypes/menu.type.d.ts +6 -5
- package/mtypes/page.d.ts +2 -1
- package/other/index.d.ts +1 -1
- package/other/lazy.service.d.ts +1 -2
- package/other/path-to-regexp.service.d.ts +12 -11
- package/package.json +14 -20
- package/pipes/currency/cny.pipe.d.ts +8 -9
- package/pipes/currency/mega.pipe.d.ts +8 -9
- package/pipes/currency/module.d.ts +1 -1
- package/pipes/currency/price.pipe.d.ts +12 -13
- package/pipes/filter/filter.pipe.d.ts +6 -6
- package/pipes/filter/module.d.ts +1 -1
- package/pipes/format/mask.pipe.d.ts +20 -20
- package/pipes/format/module.d.ts +1 -1
- package/analysis/global-event.subject.d.ts +0 -7
- package/analysis/index.d.ts +0 -1
- package/esm2022/analysis/analysis.mjs +0 -5
- package/esm2022/analysis/global-event.subject.mjs +0 -17
- package/esm2022/analysis/index.mjs +0 -2
- package/fesm2022/analysis.mjs +0 -24
- package/fesm2022/analysis.mjs.map +0 -1
package/fesm2022/format.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { deepGet } from '@yelon/util/other';
|
2
2
|
import { CurrencyPipe, formatNumber } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { LOCALE_ID, DEFAULT_CURRENCY_CODE, Injectable
|
4
|
+
import { inject, LOCALE_ID, DEFAULT_CURRENCY_CODE, Injectable } from '@angular/core';
|
5
5
|
import * as i1 from '@yelon/util/config';
|
6
6
|
|
7
7
|
/**
|
@@ -191,9 +191,10 @@ const CurrencyMega_Powers = [
|
|
191
191
|
];
|
192
192
|
|
193
193
|
class CurrencyService {
|
194
|
-
constructor(cog
|
195
|
-
this.locale =
|
196
|
-
this.
|
194
|
+
constructor(cog) {
|
195
|
+
this.locale = inject(LOCALE_ID);
|
196
|
+
this.defCurrencyCode = inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? 'USD';
|
197
|
+
this.currencyPipe = new CurrencyPipe(this.locale, this.defCurrencyCode);
|
197
198
|
this.c = cog.merge('utilCurrency', {
|
198
199
|
startingUnit: 'yuan',
|
199
200
|
megaUnit: { Q: '京', T: '兆', B: '亿', M: '万', K: '千' },
|
@@ -409,19 +410,13 @@ class CurrencyService {
|
|
409
410
|
: integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));
|
410
411
|
return ret;
|
411
412
|
}
|
412
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
413
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
413
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
414
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
|
414
415
|
}
|
415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyService, decorators: [{
|
416
417
|
type: Injectable,
|
417
418
|
args: [{ providedIn: 'root' }]
|
418
|
-
}], ctorParameters:
|
419
|
-
type: Inject,
|
420
|
-
args: [LOCALE_ID]
|
421
|
-
}] }, { type: undefined, decorators: [{
|
422
|
-
type: Inject,
|
423
|
-
args: [DEFAULT_CURRENCY_CODE]
|
424
|
-
}] }]; } });
|
419
|
+
}], ctorParameters: () => [{ type: i1.YunzaiConfigService }] });
|
425
420
|
|
426
421
|
/**
|
427
422
|
* Generated bundle index. Do not edit.
|
package/fesm2022/format.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"format.mjs","sources":["../../../../packages/util/format/string.ts","../../../../packages/util/format/validate.ts","../../../../packages/util/format/currency.types.ts","../../../../packages/util/format/currency.service.ts","../../../../packages/util/format/format.ts"],"sourcesContent":["import { deepGet } from '@yelon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * String formatting\n *\n * 字符串格式化\n * ```\n * format('this is ${name}', { name: 'asdf' })\n * // output: this is asdf\n * format('this is ${user.name}', { user: { name: 'asdf' } }, true)\n * // output: this is asdf\n * ```\n */\nexport function format(\n str: string | null | undefined,\n obj: NzSafeAny | null | undefined,\n needDeepGet: boolean = false\n): string {\n return (str || '').replace(/\\${([^}]+)}/g, (_work: string, key: string) =>\n needDeepGet ? deepGet(obj, key.split('.'), '') : (obj || {})[key] || ''\n );\n}\n\nexport interface FormatMaskOption {\n mask: string;\n tokens?: { [key: string]: FormatMaskToken };\n}\n\nexport interface FormatMaskToken {\n pattern: RegExp;\n default?: NzSafeAny;\n transform?: (char: string) => string;\n}\n\n/**\n * Format mask\n *\n * 格式化掩码\n *\n * | 字符 | 描述 |\n * | --- | --- |\n * | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |\n * | `9` | 任意数字 |\n * | `#` | 任意字符 |\n * | `U` | 转换大写 |\n * | `L` | 转换小写 |\n * | `*` | 转换为 `*` 字符 |\n *\n * ```ts\n * formatMask('123', '(###)') => (123)\n * formatMask('15900000000', '999****9999') => 159****0000\n * ```\n */\nexport function formatMask(value: string, option: string | FormatMaskOption): string {\n if (!value) {\n return '';\n }\n const opt: FormatMaskOption = {\n ...(typeof option === 'string' ? { mask: option } : option)\n };\n const tokens: { [key: string]: FormatMaskToken } = {\n '0': { pattern: /\\d/, default: '0' },\n '9': { pattern: /\\d/ },\n '#': { pattern: /[a-zA-Z0-9]/ },\n U: {\n pattern: /[a-zA-Z]/,\n transform: char => char.toLocaleUpperCase()\n },\n L: {\n pattern: /[a-zA-Z]/,\n transform: char => char.toLocaleLowerCase()\n },\n '*': {\n pattern: /.*/,\n transform: _ => `*`\n },\n ...opt.tokens\n };\n\n const splitValue = value.split('');\n return opt.mask\n .split('')\n .reduce((res, cur) => {\n const token = tokens[cur];\n if (!token) {\n res.push(cur);\n return res;\n }\n\n const value = splitValue.shift() ?? '';\n if (!token.pattern.test(value)) {\n if (token.default) res.push(token.default);\n return res;\n }\n\n if (typeof token.transform === 'function') {\n res.push(token.transform(value));\n } else {\n res.push(value);\n }\n return res;\n }, [] as string[])\n .join('');\n}\n","export const REGEX_STR = {\n num: `(([-+]?\\\\d+\\\\.\\\\d+)|([-+]?\\\\d+)|([-+]?\\\\.\\\\d+))(?:[eE]([-+]?\\\\d+))?`,\n idCard: `(^\\\\d{15}$)|(^\\\\d{17}(?:[0-9]|X)$)`,\n mobile: `^(0|\\\\+?86|17951)?1[0-9]{10}$`,\n url: `(((^https?:(?:\\/\\/)?)(?:[-;:&=\\\\+\\\\$,\\\\w]+@)?[A-Za-z0-9.-]+(?::\\\\d+)?|(?:www.|[-;:&=\\\\+\\\\$,\\\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\\\+~%\\\\/.\\\\w-_]*)?\\\\??(?:[-\\\\+=&;%@.\\\\w_]*)#?(?:[\\\\w]*))?)`,\n ip: `(?:^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$)|(?:^(?:(?:[a-fA-F\\\\d]{1,4}:){7}(?:[a-fA-F\\\\d]{1,4}|:)|(?:[a-fA-F\\\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|:[a-fA-F\\\\d]{1,4}|:)|(?:[a-fA-F\\\\d]{1,4}:){5}(?::(?:25[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\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)`,\n color: `(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\\\\b|(?:rgb|hsl)a?\\\\([^\\\\)]*\\\\)`,\n chinese: `[\\u4e00-\\u9fa5]+`\n};\n\nfunction genRegex(str: string, flags?: string): RegExp {\n return new RegExp(`^${str}$`, flags);\n}\n\nexport const REGEX = {\n num: genRegex(REGEX_STR.num),\n idCard: genRegex(REGEX_STR.idCard, 'i'),\n mobile: genRegex(REGEX_STR.mobile),\n url: genRegex(REGEX_STR.url),\n ip: genRegex(REGEX_STR.ip),\n color: genRegex(REGEX_STR.color),\n chinese: genRegex(REGEX_STR.chinese)\n};\n\n/**\n * Wheter is number\n *\n * 是否为数字\n */\nexport function isNum(value: string | number): boolean {\n return REGEX.num.test(value.toString());\n}\n\n/**\n * Wheter is integer\n *\n * 是否为整数\n */\nexport function isInt(value: string | number): boolean {\n return isNum(value) && parseInt(value.toString(), 10).toString() === value.toString();\n}\n\n/**\n * Wheter is decimal\n *\n * 是否为小数点数值\n */\nexport function isDecimal(value: string | number): boolean {\n return isNum(value) && !isInt(value);\n}\n\n/**\n * Wheter is People's Republic of China identity card\n *\n * 是否为中华人民共和国居民身份证\n */\nexport function isIdCard(value: string): boolean {\n return REGEX.idCard.test(value);\n}\n\n/**\n * Wheter is china mobile (China)\n *\n * 是否为手机号(中国)\n */\nexport function isMobile(value: string): boolean {\n return REGEX.mobile.test(value);\n}\n\n/**\n * Wheter is url address\n *\n * 是否URL地址\n */\nexport function isUrl(url: string): boolean {\n return REGEX.url.test(url);\n}\n\n/**\n * Wheter is IPv4 address (Support v4, v6)\n *\n * 是否IP4地址(支持v4、v6)\n */\nexport function isIp(ip: string): boolean {\n return REGEX.ip.test(ip);\n}\n\n/**\n * Wheter is color\n *\n * 是否颜色代码值\n */\nexport function isColor(color: string): boolean {\n return REGEX.color.test(color);\n}\n\n/**\n * Wheter is chinese\n *\n * 是否中文\n */\nexport function isChinese(value: string): boolean {\n return REGEX.chinese.test(value);\n}\n","export type CurrencyStartingUnit = 'yuan' | 'cent';\n\nexport interface CurrencyStartingUnitOptions {\n /**\n * The starting unit of the value, `yuan` means 元, `cent` means 分, default: `yuan`\n *\n * 值的起始单位,`yuan` 元,`cent` 分,默认:`yuan`\n */\n startingUnit?: CurrencyStartingUnit;\n}\n\nexport interface CurrencyFormatOptions extends CurrencyStartingUnitOptions {\n /**\n * Using `DEFAULT_CURRENCY_CODE` when value is `true\n *\n * 是否使用 `CurrencyPipe` 来替代\n */\n useAngular?: boolean;\n /**\n * 精度,默认:`2`\n */\n precision?: number;\n /**\n * 是否忽略精度 `.0` 或 `.00` 结尾的字符,默认:`true`\n */\n ignoreZeroPrecision?: boolean;\n\n /**\n * Use anguar `currency` pipe parse when is set, pls refer to [document](https://angular.io/api/common/CurrencyPipe)\n *\n * 若指定则表示使用 Angular 自带的 `currency` 管道来解析,见[文档](https://angular.cn/api/common/CurrencyPipe)\n */\n ngCurrency?: {\n display: 'code' | 'symbol' | 'symbol-narrow';\n currencyCode?: string;\n digitsInfo?: string;\n locale?: string;\n };\n}\n\n/**\n * Large number format filter, [Document](https://ng.yunzainfo.com/util/format/en#mega)\n *\n * 大数据格式化,[文档](https://ng.yunzainfo.com/util/format/en#mega)\n */\nexport interface CurrencyMegaOptions extends CurrencyStartingUnitOptions {\n /**\n * 精度,默认:`2`\n */\n precision?: number;\n\n /**\n * 单位国际化,默认:`{Q: '京', T: '兆', B: '亿', M: '万', K: '千',}`\n */\n unitI18n?: CurrencyMegaUnitI18n;\n}\n\nexport interface CurrencyMegaResult {\n raw: number | string;\n value: string;\n unit: string;\n unitI18n: string;\n}\n\nexport const CurrencyMega_Powers = [\n { unit: 'Q', value: Math.pow(10, 15) },\n { unit: 'T', value: Math.pow(10, 12) },\n { unit: 'B', value: Math.pow(10, 9) },\n { unit: 'M', value: Math.pow(10, 6) },\n { unit: 'K', value: 1000 }\n];\n\nexport interface CurrencyMegaUnitI18n {\n Q: string;\n T: string;\n B: string;\n M: string;\n K: string;\n}\n\nexport interface CurrencyCNYOptions extends CurrencyStartingUnitOptions {\n /**\n * Whether to return to uppercase notation, default: `true`\n *\n * 是否返回大写表示法,默认:`true`\n */\n inWords?: boolean;\n /**\n * Specify negative sign, default: `negative`\n *\n * 指定负数符号,默认:`负`\n */\n minusSymbol?: string;\n}\n","import { CurrencyPipe, formatNumber } from '@angular/common';\nimport { DEFAULT_CURRENCY_CODE, Inject, Injectable, LOCALE_ID } from '@angular/core';\n\nimport { YunzaiConfigService, YunzaiUtilCurrencyConfig } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport {\n CurrencyCNYOptions,\n CurrencyFormatOptions,\n CurrencyMegaOptions,\n CurrencyMegaResult,\n CurrencyMega_Powers\n} from './currency.types';\n\n@Injectable({ providedIn: 'root' })\nexport class CurrencyService {\n private c: YunzaiUtilCurrencyConfig;\n private readonly currencyPipe: CurrencyPipe;\n\n constructor(\n cog: YunzaiConfigService,\n @Inject(LOCALE_ID) private locale: string,\n @Inject(DEFAULT_CURRENCY_CODE) _defaultCurrencyCode: string = 'USD'\n ) {\n this.currencyPipe = new CurrencyPipe(locale, _defaultCurrencyCode);\n this.c = cog.merge('utilCurrency', {\n startingUnit: 'yuan',\n megaUnit: { Q: '京', T: '兆', B: '亿', M: '万', K: '千' },\n precision: 2,\n ignoreZeroPrecision: true\n })!;\n }\n\n /**\n * Format a number with commas as thousands separators\n *\n * 格式化货币,用逗号将数字格式化为千位分隔符\n * ```ts\n * 10000 => `10,000`\n * 10000.567 => `10,000.57`\n * ```\n */\n format(value: number | string, options?: CurrencyFormatOptions): string {\n options = {\n startingUnit: this.c.startingUnit,\n precision: this.c.precision,\n ignoreZeroPrecision: this.c.ignoreZeroPrecision,\n ngCurrency: this.c.ngCurrency,\n ...options\n };\n let truthValue = Number(value);\n if (value == null || isNaN(truthValue)) {\n return '';\n }\n if (options.startingUnit === 'cent') {\n truthValue = truthValue / 100;\n }\n if (options.ngCurrency != null) {\n const cur = options.ngCurrency!;\n return this.currencyPipe.transform(\n truthValue,\n cur.currencyCode,\n cur.display,\n cur.digitsInfo,\n cur.locale || this.locale\n )!;\n }\n const res = formatNumber(\n truthValue,\n this.locale,\n `.${options.ignoreZeroPrecision ? 1 : options.precision}-${options.precision}`\n );\n return options.ignoreZeroPrecision ? res.replace(/(?:\\.[0]+)$/g, '') : res;\n }\n\n /**\n * Large number format filter\n *\n * 大数据格式化\n * ```ts\n * 1000 => { value: '1', unit: 'K', unitI18n: '千' }\n * 12456 => { value: '12.46', unit: 'K', unitI18n: '千' }\n * ```\n */\n mega(value: number | string, options?: CurrencyMegaOptions): CurrencyMegaResult {\n options = { precision: this.c.precision, unitI18n: this.c.megaUnit, startingUnit: this.c.startingUnit, ...options };\n let num = Number(value);\n const res: CurrencyMegaResult = { raw: value, value: '', unit: '', unitI18n: '' };\n if (isNaN(num) || num === 0) {\n res.value = value.toString();\n return res;\n }\n if (options.startingUnit === 'cent') {\n num = num / 100;\n }\n let abs = Math.abs(+num);\n const rounder = Math.pow(10, options.precision!);\n const isNegative = num < 0;\n for (const p of CurrencyMega_Powers) {\n let reduced = abs / p.value;\n\n reduced = Math.round(reduced * rounder) / rounder;\n\n if (reduced >= 1) {\n abs = reduced;\n res.unit = p.unit;\n break;\n }\n }\n\n res.value = (isNegative ? '-' : '') + abs;\n res.unitI18n = (options.unitI18n as { [key: string]: NzSafeAny })[res.unit];\n return res;\n }\n\n /**\n * Converted into RMB notation.\n *\n * 转化成人民币表示法\n */\n cny(value: number | string, options?: CurrencyCNYOptions): string {\n options = {\n inWords: true,\n minusSymbol: '负',\n startingUnit: this.c.startingUnit,\n ...options\n };\n\n value = Number(value);\n if (isNaN(value)) {\n return '';\n }\n if (options.startingUnit === 'cent') {\n value = value / 100;\n }\n value = value.toString();\n let integer: number | string;\n let decimal: number | string | null;\n [integer, decimal] = value.split('.');\n let symbol = '';\n if (integer.startsWith('-')) {\n symbol = options.minusSymbol!;\n integer = integer.substring(1);\n }\n if (/^-?\\d+$/.test(value)) {\n decimal = null;\n }\n integer = (+integer).toString();\n const inWords = options.inWords;\n const unit: { [key: string]: string[] } = {\n num: inWords\n ? ['', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '点']\n : ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '点'],\n radice: inWords\n ? [\n '',\n '拾',\n '佰',\n '仟',\n '万',\n '拾',\n '佰',\n '仟',\n '亿',\n '拾',\n '佰',\n '仟',\n '万亿',\n '拾',\n '佰',\n '仟',\n '兆',\n '拾',\n '佰',\n '仟'\n ]\n : [\n '',\n '十',\n '百',\n '千',\n '万',\n '十',\n '百',\n '千',\n '亿',\n '十',\n '百',\n '千',\n '万亿',\n '十',\n '百',\n '千',\n '兆',\n '十',\n '百',\n '千'\n ],\n dec: ['角', '分', '厘', '毫']\n };\n if (inWords) {\n value = (+value).toFixed(5).toString();\n }\n let integerRes = '';\n const integerCount = integer.length;\n if (integer === '0' || integerCount === 0) {\n integerRes = '零';\n } else {\n let cnDesc = '';\n for (let i = 0; i < integerCount; i++) {\n const n = +integer[i];\n const j = integerCount - i - 1;\n const isZero = i > 1 && n !== 0 && integer[i - 1] === '0';\n const cnZero = isZero ? '零' : '';\n const isEmpptyUnit = (n === 0 && j % 4 !== 0) || integer.substring(i - 3, i - 3 + 4) === '0000';\n const descMark = cnDesc;\n let cnNum = unit.num[n];\n\n cnDesc = isEmpptyUnit ? '' : unit.radice[j];\n // 第一位是一十\n if (i === 0 && cnNum === '一' && cnDesc === '十') cnNum = '';\n const isChangeEr =\n n > 1 &&\n cnNum === '二' && // 去除首位\n ['', '十', '百'].indexOf(cnDesc) === -1 && // 不读两\\两十\\两百\n descMark !== '十'; // 不读十两\n if (isChangeEr) cnNum = '两';\n integerRes += cnZero + cnNum + cnDesc;\n }\n }\n\n // 小数部分拼接\n let decimalRes = '';\n const decimalCount = decimal ? decimal.toString().length : 0;\n if (decimal === null) {\n decimalRes = inWords ? '整' : '';\n } else if (decimal === '0') {\n decimalRes = '零';\n } else {\n for (let i = 0; i < decimalCount; i++) {\n if (inWords && i > unit.dec.length - 1) break;\n const n = decimal[i];\n const cnZero = n === '0' ? '零' : '';\n const cnNum = unit.num[+n];\n const cnDesc = inWords ? unit.dec[i] : '';\n decimalRes += cnZero + cnNum + cnDesc;\n }\n }\n const ret =\n symbol +\n (inWords\n ? integerRes + (decimalRes === '零' ? '元整' : `元${decimalRes}`)\n : integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));\n return ret;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;;AAUG;AACG,SAAU,MAAM,CACpB,GAA8B,EAC9B,GAAiC,EACjC,cAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,KAAa,EAAE,GAAW,KACpE,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,CACxE,CAAC;AACJ,CAAC;AAaD;;;;;;;;;;;;;;;;;;AAkBG;AACa,SAAA,UAAU,CAAC,KAAa,EAAE,MAAiC,EAAA;IACzE,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AACD,IAAA,MAAM,GAAG,GAAqB;AAC5B,QAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;KAC5D,CAAC;AACF,IAAA,MAAM,MAAM,GAAuC;QACjD,GAAG,EAAE,EAAE,OAAO,EA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,KAAK,GAAG,MAAM,CAAC;AACvC,aAAA;AACF,SAAA;QACD,MAAM,GAAG,GACP,MAAM;AACN,aAAC,OAAO;AACN,kBAAE,UAAU,IAAI,UAAU,KAAK,GAAG,GAAG,IAAI,GAAG,CAAI,CAAA,EAAA,UAAU,EAAE,CAAC;AAC7D,kBAAE,UAAU,IAAI,UAAU,KAAK,EAAE,GAAG,EAAE,GAAG,CAAA,CAAA,EAAI,UAAU,CAAE,CAAA,CAAC,CAAC,CAAC;AAChE,QAAA,OAAO,GAAG,CAAC;KACZ;+GA/OU,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,KAAA,EAMhB,SAAS,EAAA,EAAA,EAAA,KAAA,EACT,qBAAqB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAPpB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA,EAAA;;4FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;0BAO7B,MAAM;2BAAC,SAAS,CAAA;;0BAChB,MAAM;2BAAC,qBAAqB,CAAA;;;ACtBjC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"format.mjs","sources":["../../../../packages/util/format/string.ts","../../../../packages/util/format/validate.ts","../../../../packages/util/format/currency.types.ts","../../../../packages/util/format/currency.service.ts","../../../../packages/util/format/format.ts"],"sourcesContent":["import { deepGet } from '@yelon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * String formatting\n *\n * 字符串格式化\n * ```\n * format('this is ${name}', { name: 'asdf' })\n * // output: this is asdf\n * format('this is ${user.name}', { user: { name: 'asdf' } }, true)\n * // output: this is asdf\n * ```\n */\nexport function format(\n str: string | null | undefined,\n obj: NzSafeAny | null | undefined,\n needDeepGet: boolean = false\n): string {\n return (str || '').replace(/\\${([^}]+)}/g, (_work: string, key: string) =>\n needDeepGet ? deepGet(obj, key.split('.'), '') : (obj || {})[key] || ''\n );\n}\n\nexport interface FormatMaskOption {\n mask: string;\n tokens?: { [key: string]: FormatMaskToken };\n}\n\nexport interface FormatMaskToken {\n pattern: RegExp;\n default?: NzSafeAny;\n transform?: (char: string) => string;\n}\n\n/**\n * Format mask\n *\n * 格式化掩码\n *\n * | 字符 | 描述 |\n * | --- | --- |\n * | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |\n * | `9` | 任意数字 |\n * | `#` | 任意字符 |\n * | `U` | 转换大写 |\n * | `L` | 转换小写 |\n * | `*` | 转换为 `*` 字符 |\n *\n * ```ts\n * formatMask('123', '(###)') => (123)\n * formatMask('15900000000', '999****9999') => 159****0000\n * ```\n */\nexport function formatMask(value: string, option: string | FormatMaskOption): string {\n if (!value) {\n return '';\n }\n const opt: FormatMaskOption = {\n ...(typeof option === 'string' ? { mask: option } : option)\n };\n const tokens: { [key: string]: FormatMaskToken } = {\n '0': { pattern: /\\d/, default: '0' },\n '9': { pattern: /\\d/ },\n '#': { pattern: /[a-zA-Z0-9]/ },\n U: {\n pattern: /[a-zA-Z]/,\n transform: char => char.toLocaleUpperCase()\n },\n L: {\n pattern: /[a-zA-Z]/,\n transform: char => char.toLocaleLowerCase()\n },\n '*': {\n pattern: /.*/,\n transform: _ => `*`\n },\n ...opt.tokens\n };\n\n const splitValue = value.split('');\n return opt.mask\n .split('')\n .reduce((res, cur) => {\n const token = tokens[cur];\n if (!token) {\n res.push(cur);\n return res;\n }\n\n const value = splitValue.shift() ?? '';\n if (!token.pattern.test(value)) {\n if (token.default) res.push(token.default);\n return res;\n }\n\n if (typeof token.transform === 'function') {\n res.push(token.transform(value));\n } else {\n res.push(value);\n }\n return res;\n }, [] as string[])\n .join('');\n}\n","export const REGEX_STR = {\n num: `(([-+]?\\\\d+\\\\.\\\\d+)|([-+]?\\\\d+)|([-+]?\\\\.\\\\d+))(?:[eE]([-+]?\\\\d+))?`,\n idCard: `(^\\\\d{15}$)|(^\\\\d{17}(?:[0-9]|X)$)`,\n mobile: `^(0|\\\\+?86|17951)?1[0-9]{10}$`,\n url: `(((^https?:(?:\\/\\/)?)(?:[-;:&=\\\\+\\\\$,\\\\w]+@)?[A-Za-z0-9.-]+(?::\\\\d+)?|(?:www.|[-;:&=\\\\+\\\\$,\\\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\\\+~%\\\\/.\\\\w-_]*)?\\\\??(?:[-\\\\+=&;%@.\\\\w_]*)#?(?:[\\\\w]*))?)`,\n ip: `(?:^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$)|(?:^(?:(?:[a-fA-F\\\\d]{1,4}:){7}(?:[a-fA-F\\\\d]{1,4}|:)|(?:[a-fA-F\\\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|:[a-fA-F\\\\d]{1,4}|:)|(?:[a-fA-F\\\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\\\d]{1,4}:){4}(?:(?::[a-fA-F\\\\d]{1,4}){0,1}:(?:25[0-5]|2[0-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u9fa5]+`\n};\n\nfunction genRegex(str: string, flags?: string): RegExp {\n return new RegExp(`^${str}$`, flags);\n}\n\nexport const REGEX = {\n num: genRegex(REGEX_STR.num),\n idCard: genRegex(REGEX_STR.idCard, 'i'),\n mobile: genRegex(REGEX_STR.mobile),\n url: genRegex(REGEX_STR.url),\n ip: genRegex(REGEX_STR.ip),\n color: genRegex(REGEX_STR.color),\n chinese: genRegex(REGEX_STR.chinese)\n};\n\n/**\n * Wheter is number\n *\n * 是否为数字\n */\nexport function isNum(value: string | number): boolean {\n return REGEX.num.test(value.toString());\n}\n\n/**\n * Wheter is integer\n *\n * 是否为整数\n */\nexport function isInt(value: string | number): boolean {\n return isNum(value) && parseInt(value.toString(), 10).toString() === value.toString();\n}\n\n/**\n * Wheter is decimal\n *\n * 是否为小数点数值\n */\nexport function isDecimal(value: string | number): boolean {\n return isNum(value) && !isInt(value);\n}\n\n/**\n * Wheter is People's Republic of China identity card\n *\n * 是否为中华人民共和国居民身份证\n */\nexport function isIdCard(value: string): boolean {\n return REGEX.idCard.test(value);\n}\n\n/**\n * Wheter is china mobile (China)\n *\n * 是否为手机号(中国)\n */\nexport function isMobile(value: string): boolean {\n return REGEX.mobile.test(value);\n}\n\n/**\n * Wheter is url address\n *\n * 是否URL地址\n */\nexport function isUrl(url: string): boolean {\n return REGEX.url.test(url);\n}\n\n/**\n * Wheter is IPv4 address (Support v4, v6)\n *\n * 是否IP4地址(支持v4、v6)\n */\nexport function isIp(ip: string): boolean {\n return REGEX.ip.test(ip);\n}\n\n/**\n * Wheter is color\n *\n * 是否颜色代码值\n */\nexport function isColor(color: string): boolean {\n return REGEX.color.test(color);\n}\n\n/**\n * Wheter is chinese\n *\n * 是否中文\n */\nexport function isChinese(value: string): boolean {\n return REGEX.chinese.test(value);\n}\n","export type CurrencyStartingUnit = 'yuan' | 'cent';\n\nexport interface CurrencyStartingUnitOptions {\n /**\n * The starting unit of the value, `yuan` means 元, `cent` means 分, default: `yuan`\n *\n * 值的起始单位,`yuan` 元,`cent` 分,默认:`yuan`\n */\n startingUnit?: CurrencyStartingUnit;\n}\n\nexport interface CurrencyFormatOptions extends CurrencyStartingUnitOptions {\n /**\n * Using `DEFAULT_CURRENCY_CODE` when value is `true\n *\n * 是否使用 `CurrencyPipe` 来替代\n */\n useAngular?: boolean;\n /**\n * 精度,默认:`2`\n */\n precision?: number;\n /**\n * 是否忽略精度 `.0` 或 `.00` 结尾的字符,默认:`true`\n */\n ignoreZeroPrecision?: boolean;\n\n /**\n * Use anguar `currency` pipe parse when is set, pls refer to [document](https://angular.io/api/common/CurrencyPipe)\n *\n * 若指定则表示使用 Angular 自带的 `currency` 管道来解析,见[文档](https://angular.cn/api/common/CurrencyPipe)\n */\n ngCurrency?: {\n display: 'code' | 'symbol' | 'symbol-narrow';\n currencyCode?: string;\n digitsInfo?: string;\n locale?: string;\n };\n}\n\n/**\n * Large number format filter, [Document](https://ng.yunzainfo.com/util/format/en#mega)\n *\n * 大数据格式化,[文档](https://ng.yunzainfo.com/util/format/en#mega)\n */\nexport interface CurrencyMegaOptions extends CurrencyStartingUnitOptions {\n /**\n * 精度,默认:`2`\n */\n precision?: number;\n\n /**\n * 单位国际化,默认:`{Q: '京', T: '兆', B: '亿', M: '万', K: '千',}`\n */\n unitI18n?: CurrencyMegaUnitI18n;\n}\n\nexport interface CurrencyMegaResult {\n raw: number | string;\n value: string;\n unit: string;\n unitI18n: string;\n}\n\nexport const CurrencyMega_Powers = [\n { unit: 'Q', value: Math.pow(10, 15) },\n { unit: 'T', value: Math.pow(10, 12) },\n { unit: 'B', value: Math.pow(10, 9) },\n { unit: 'M', value: Math.pow(10, 6) },\n { unit: 'K', value: 1000 }\n];\n\nexport interface CurrencyMegaUnitI18n {\n Q: string;\n T: string;\n B: string;\n M: string;\n K: string;\n}\n\nexport interface CurrencyCNYOptions extends CurrencyStartingUnitOptions {\n /**\n * Whether to return to uppercase notation, default: `true`\n *\n * 是否返回大写表示法,默认:`true`\n */\n inWords?: boolean;\n /**\n * Specify negative sign, default: `negative`\n *\n * 指定负数符号,默认:`负`\n */\n minusSymbol?: string;\n}\n","import { CurrencyPipe, formatNumber } from '@angular/common';\nimport { DEFAULT_CURRENCY_CODE, Injectable, LOCALE_ID, inject } from '@angular/core';\n\nimport { YunzaiConfigService, YunzaiUtilCurrencyConfig } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport {\n CurrencyCNYOptions,\n CurrencyFormatOptions,\n CurrencyMegaOptions,\n CurrencyMegaResult,\n CurrencyMega_Powers\n} from './currency.types';\n\n@Injectable({ providedIn: 'root' })\nexport class CurrencyService {\n private readonly locale = inject(LOCALE_ID);\n private readonly defCurrencyCode = inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? 'USD';\n\n private c: YunzaiUtilCurrencyConfig;\n private readonly currencyPipe: CurrencyPipe;\n\n constructor(cog: YunzaiConfigService) {\n this.currencyPipe = new CurrencyPipe(this.locale, this.defCurrencyCode);\n this.c = cog.merge('utilCurrency', {\n startingUnit: 'yuan',\n megaUnit: { Q: '京', T: '兆', B: '亿', M: '万', K: '千' },\n precision: 2,\n ignoreZeroPrecision: true\n })!;\n }\n\n /**\n * Format a number with commas as thousands separators\n *\n * 格式化货币,用逗号将数字格式化为千位分隔符\n * ```ts\n * 10000 => `10,000`\n * 10000.567 => `10,000.57`\n * ```\n */\n format(value: number | string, options?: CurrencyFormatOptions): string {\n options = {\n startingUnit: this.c.startingUnit,\n precision: this.c.precision,\n ignoreZeroPrecision: this.c.ignoreZeroPrecision,\n ngCurrency: this.c.ngCurrency,\n ...options\n };\n let truthValue = Number(value);\n if (value == null || isNaN(truthValue)) {\n return '';\n }\n if (options.startingUnit === 'cent') {\n truthValue = truthValue / 100;\n }\n if (options.ngCurrency != null) {\n const cur = options.ngCurrency!;\n return this.currencyPipe.transform(\n truthValue,\n cur.currencyCode,\n cur.display,\n cur.digitsInfo,\n cur.locale || this.locale\n )!;\n }\n const res = formatNumber(\n truthValue,\n this.locale,\n `.${options.ignoreZeroPrecision ? 1 : options.precision}-${options.precision}`\n );\n return options.ignoreZeroPrecision ? res.replace(/(?:\\.[0]+)$/g, '') : res;\n }\n\n /**\n * Large number format filter\n *\n * 大数据格式化\n * ```ts\n * 1000 => { value: '1', unit: 'K', unitI18n: '千' }\n * 12456 => { value: '12.46', unit: 'K', unitI18n: '千' }\n * ```\n */\n mega(value: number | string, options?: CurrencyMegaOptions): CurrencyMegaResult {\n options = { precision: this.c.precision, unitI18n: this.c.megaUnit, startingUnit: this.c.startingUnit, ...options };\n let num = Number(value);\n const res: CurrencyMegaResult = { raw: value, value: '', unit: '', unitI18n: '' };\n if (isNaN(num) || num === 0) {\n res.value = value.toString();\n return res;\n }\n if (options.startingUnit === 'cent') {\n num = num / 100;\n }\n let abs = Math.abs(+num);\n const rounder = Math.pow(10, options.precision!);\n const isNegative = num < 0;\n for (const p of CurrencyMega_Powers) {\n let reduced = abs / p.value;\n\n reduced = Math.round(reduced * rounder) / rounder;\n\n if (reduced >= 1) {\n abs = reduced;\n res.unit = p.unit;\n break;\n }\n }\n\n res.value = (isNegative ? '-' : '') + abs;\n res.unitI18n = (options.unitI18n as { [key: string]: NzSafeAny })[res.unit];\n return res;\n }\n\n /**\n * Converted into RMB notation.\n *\n * 转化成人民币表示法\n */\n cny(value: number | string, options?: CurrencyCNYOptions): string {\n options = {\n inWords: true,\n minusSymbol: '负',\n startingUnit: this.c.startingUnit,\n ...options\n };\n\n value = Number(value);\n if (isNaN(value)) {\n return '';\n }\n if (options.startingUnit === 'cent') {\n value = value / 100;\n }\n value = value.toString();\n let integer: number | string;\n let decimal: number | string | null;\n [integer, decimal] = value.split('.');\n let symbol = '';\n if (integer.startsWith('-')) {\n symbol = options.minusSymbol!;\n integer = integer.substring(1);\n }\n if (/^-?\\d+$/.test(value)) {\n decimal = null;\n }\n integer = (+integer).toString();\n const inWords = options.inWords;\n const unit: { [key: string]: string[] } = {\n num: inWords\n ? ['', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '点']\n : ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '点'],\n radice: inWords\n ? [\n '',\n '拾',\n '佰',\n '仟',\n '万',\n '拾',\n '佰',\n '仟',\n '亿',\n '拾',\n '佰',\n '仟',\n '万亿',\n '拾',\n '佰',\n '仟',\n '兆',\n '拾',\n '佰',\n '仟'\n ]\n : [\n '',\n '十',\n '百',\n '千',\n '万',\n '十',\n '百',\n '千',\n '亿',\n '十',\n '百',\n '千',\n '万亿',\n '十',\n '百',\n '千',\n '兆',\n '十',\n '百',\n '千'\n ],\n dec: ['角', '分', '厘', '毫']\n };\n if (inWords) {\n value = (+value).toFixed(5).toString();\n }\n let integerRes = '';\n const integerCount = integer.length;\n if (integer === '0' || integerCount === 0) {\n integerRes = '零';\n } else {\n let cnDesc = '';\n for (let i = 0; i < integerCount; i++) {\n const n = +integer[i];\n const j = integerCount - i - 1;\n const isZero = i > 1 && n !== 0 && integer[i - 1] === '0';\n const cnZero = isZero ? '零' : '';\n const isEmpptyUnit = (n === 0 && j % 4 !== 0) || integer.substring(i - 3, i - 3 + 4) === '0000';\n const descMark = cnDesc;\n let cnNum = unit.num[n];\n\n cnDesc = isEmpptyUnit ? '' : unit.radice[j];\n // 第一位是一十\n if (i === 0 && cnNum === '一' && cnDesc === '十') cnNum = '';\n const isChangeEr =\n n > 1 &&\n cnNum === '二' && // 去除首位\n ['', '十', '百'].indexOf(cnDesc) === -1 && // 不读两\\两十\\两百\n descMark !== '十'; // 不读十两\n if (isChangeEr) cnNum = '两';\n integerRes += cnZero + cnNum + cnDesc;\n }\n }\n\n // 小数部分拼接\n let decimalRes = '';\n const decimalCount = decimal ? decimal.toString().length : 0;\n if (decimal === null) {\n decimalRes = inWords ? '整' : '';\n } else if (decimal === '0') {\n decimalRes = '零';\n } else {\n for (let i = 0; i < decimalCount; i++) {\n if (inWords && i > unit.dec.length - 1) break;\n const n = decimal[i];\n const cnZero = n === '0' ? '零' : '';\n const cnNum = unit.num[+n];\n const cnDesc = inWords ? unit.dec[i] : '';\n decimalRes += cnZero + cnNum + cnDesc;\n }\n }\n const ret =\n symbol +\n (inWords\n ? integerRes + (decimalRes === '零' ? '元整' : `元${decimalRes}`)\n : integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));\n return ret;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;;AAUG;AACG,SAAU,MAAM,CACpB,GAA8B,EAC9B,GAAiC,EACjC,cAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,KAAa,EAAE,GAAW,KACpE,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,CACxE,CAAC;AACJ,CAAC;AAaD;;;;;;;;;;;;;;;;;;AAkBG;AACa,SAAA,UAAU,CAAC,KAAa,EAAE,MAAiC,EAAA;IACzE,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,EAAE,CAAC;KACX;AACD,IAAA,MAAM,GAAG,GAAqB;AAC5B,QAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;KAC3D,CAAC;AACF,IAAA,MAAM,MAAM,GAAuC;QACjD,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;AACpC,QAAA,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AACtB,QAAA,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;AAC/B,QAAA,CAAC,EAAE;AACD,YAAA,OAAO,EAAE,UAAU;YACnB,SAAS,EAAE,IAAI,IAAI,IAAI,CAAC,iBAAiB,EAAE;A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CAAA,EAAI,UAAU,CAAE,CAAA,CAAC,CAAC,CAAC;AAChE,QAAA,OAAO,GAAG,CAAC;KACZ;8GA9OU,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACdlC;;AAEG;;;;"}
|
package/fesm2022/math.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"math.mjs","sources":["../../../../packages/util/math/in-range.ts","../../../../packages/util/math/round.ts","../../../../packages/util/math/math.ts"],"sourcesContent":["import { assertNumber } from '@yelon/util/other';\n\n/**\n * Checks if `value` is between `start` and `end` to, but not including `end`. If `end` is not specified, it's set to start with `start` then set to `0`. If `start` is greater than `end` the params are swapped to support negative ranges.\n *\n * 检查 `value` 是否在 `start` 与 `end` 之间,但不包括 `end`。 如果 `end` 没有指定,那么 `start` 设置为 `0`。 如果 `start` 大于 `end`,那么参数会交换以便支持负范围。\n * ```ts\n * inRange(3, 2, 4); // true\n * inRange(4, 8); // true\n * inRange(4, 2); // false\n * inRange(2, 2); // false\n * inRange(1.2, 2); // true\n * inRange(-3, -2, -6); // true\n * ```\n */\nexport function inRange(value: number, start: number, end?: number): boolean {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n assertNumber(value);\n assertNumber(start);\n assertNumber(end);\n return value >= Math.min(start, end) && value < Math.max(start, end);\n}\n","/**\n * Computes `number` rounded up to `precision`.\n *\n * 根据 `precision`(精度) 向上舍入 `number`。\n * ```ts\n * ceil(4.006); // 5\n * ceil(6.004, 2); // 6.01\n * ceil(6040, -2); // 6100\n * ```\n */\nexport function ceil(number: number, precision: number = 0): number {\n return createRound(number, precision, 'ceil');\n}\n\n/**\n * Computes `number` rounded down to `precision`.\n *\n * 根据 `precision`(精度) 向下舍入 `number`。\n * ```ts\n * floor(4.006); // 4\n * floor(0.046, 2); // 0.04\n * floor(4060, -2); // 4000\n * ```\n */\nexport function floor(number: number, precision: number = 0): number {\n return createRound(number, precision, 'floor');\n}\n\n/**\n * Computes `number` rounded to `precision`.\n *\n * 根据 `precision`(精度) 四舍五入 `number`。\n * ```ts\n * round(4.006); // 4\n * round(4.006, 2); // 4.01\n * round(4060, -2); // 4100\n * ```\n */\nexport function round(number: number, precision: number = 0): number {\n return createRound(number, precision, 'round');\n}\n\nfunction createRound(number: number, precision: number, methodName: keyof Math): number {\n const func = Math[methodName] as (x: number) => number;\n\n precision = precision == null ? 0 : Math.min(precision, 292);\n if (!precision) {\n return func(number);\n }\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n let pair = `${number}e`.split('e');\n const value = func(Number(`${pair[0]}e${Number(pair[1]) + precision}`));\n pair = `${value}e`.split('e');\n return Number(`${pair[0]}e${Number(pair[1]) - precision}`);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;AAYG;SACa,OAAO,CAAC,KAAa,EAAE,KAAa,EAAE,GAAY,EAAA;
|
1
|
+
{"version":3,"file":"math.mjs","sources":["../../../../packages/util/math/in-range.ts","../../../../packages/util/math/round.ts","../../../../packages/util/math/math.ts"],"sourcesContent":["import { assertNumber } from '@yelon/util/other';\n\n/**\n * Checks if `value` is between `start` and `end` to, but not including `end`. If `end` is not specified, it's set to start with `start` then set to `0`. If `start` is greater than `end` the params are swapped to support negative ranges.\n *\n * 检查 `value` 是否在 `start` 与 `end` 之间,但不包括 `end`。 如果 `end` 没有指定,那么 `start` 设置为 `0`。 如果 `start` 大于 `end`,那么参数会交换以便支持负范围。\n * ```ts\n * inRange(3, 2, 4); // true\n * inRange(4, 8); // true\n * inRange(4, 2); // false\n * inRange(2, 2); // false\n * inRange(1.2, 2); // true\n * inRange(-3, -2, -6); // true\n * ```\n */\nexport function inRange(value: number, start: number, end?: number): boolean {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n assertNumber(value);\n assertNumber(start);\n assertNumber(end);\n return value >= Math.min(start, end) && value < Math.max(start, end);\n}\n","/**\n * Computes `number` rounded up to `precision`.\n *\n * 根据 `precision`(精度) 向上舍入 `number`。\n * ```ts\n * ceil(4.006); // 5\n * ceil(6.004, 2); // 6.01\n * ceil(6040, -2); // 6100\n * ```\n */\nexport function ceil(number: number, precision: number = 0): number {\n return createRound(number, precision, 'ceil');\n}\n\n/**\n * Computes `number` rounded down to `precision`.\n *\n * 根据 `precision`(精度) 向下舍入 `number`。\n * ```ts\n * floor(4.006); // 4\n * floor(0.046, 2); // 0.04\n * floor(4060, -2); // 4000\n * ```\n */\nexport function floor(number: number, precision: number = 0): number {\n return createRound(number, precision, 'floor');\n}\n\n/**\n * Computes `number` rounded to `precision`.\n *\n * 根据 `precision`(精度) 四舍五入 `number`。\n * ```ts\n * round(4.006); // 4\n * round(4.006, 2); // 4.01\n * round(4060, -2); // 4100\n * ```\n */\nexport function round(number: number, precision: number = 0): number {\n return createRound(number, precision, 'round');\n}\n\nfunction createRound(number: number, precision: number, methodName: keyof Math): number {\n const func = Math[methodName] as (x: number) => number;\n\n precision = precision == null ? 0 : Math.min(precision, 292);\n if (!precision) {\n return func(number);\n }\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n let pair = `${number}e`.split('e');\n const value = func(Number(`${pair[0]}e${Number(pair[1]) + precision}`));\n pair = `${value}e`.split('e');\n return Number(`${pair[0]}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S,EAAE;AACd,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;;;IAGD,IAAI,IAAI,GAAG,CAAA,EAAG,MAAM,CAAA,CAAA,CAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAG,EAAA,IAAI,CAAC,CAAC,CAAC,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA,CAAE,CAAC,CAAC,CAAC;IACxE,IAAI,GAAG,GAAG,KAAK,CAAA,CAAA,CAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC9B,IAAA,OAAO,MAAM,CAAC,CAAA,EAAG,IAAI,CAAC,CAAC,CAAC,CAAI,CAAA,EAAA,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA,CAAE,CAAC,CAAC;AAC7D;;ACvDA;;AAEG;;;;"}
|
package/fesm2022/mcache.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mcache.mjs","sources":["../../../../packages/util/mcache/localStorageUtils.ts","../../../../packages/util/mcache/mcache.ts"],"sourcesContent":["import { LayoutBasicAside, NavType, YunzaiNavTopic, YunzaiProjectInfo, YunzaiUser } from '@yelon/util/mtypes';\n\nexport const YZ_USER_KEY = '_yz_user';\nexport const YZ_PROJECT_INFO_KEY = '_yz_project_info';\nexport const YZ_CURRENT_KEY = '_yz_current';\nexport const YZ_HEADER_KEY = '_yz_header';\nexport const YZ_HEADER_TYPE_KEY = '_yz_header_type';\nexport const YZ_DEFAULT_ROUTE_KEY = '_yz_default_route';\nexport const YZ_TENANT_KEY = '_yz_tenant';\n// export const YZ_LANGS_KEY = '_yz_langs';\n// export const YZ_LANG_KEY = '_yz_lang';\n\nfunction get<T>(key: string): T | null {\n if (key === YZ_HEADER_TYPE_KEY) {\n return localStorage.getItem(key) as
|
1
|
+
{"version":3,"file":"mcache.mjs","sources":["../../../../packages/util/mcache/localStorageUtils.ts","../../../../packages/util/mcache/mcache.ts"],"sourcesContent":["import { LayoutBasicAside, NavType, YunzaiNavTopic, YunzaiProjectInfo, YunzaiUser } from '@yelon/util/mtypes';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport const YZ_USER_KEY = '_yz_user';\nexport const YZ_PROJECT_INFO_KEY = '_yz_project_info';\nexport const YZ_CURRENT_KEY = '_yz_current';\nexport const YZ_HEADER_KEY = '_yz_header';\nexport const YZ_HEADER_TYPE_KEY = '_yz_header_type';\nexport const YZ_DEFAULT_ROUTE_KEY = '_yz_default_route';\nexport const YZ_TENANT_KEY = '_yz_tenant';\n// export const YZ_LANGS_KEY = '_yz_langs';\n// export const YZ_LANG_KEY = '_yz_lang';\n\nfunction get<T>(key: string): T | null {\n if (key === YZ_HEADER_TYPE_KEY) {\n return localStorage.getItem(key) as NzSafeAny;\n }\n const item = localStorage.getItem(key);\n return item ? JSON.parse(item) : null;\n}\n\nfunction set<T>(key: string, data: T): void {\n if (key === YZ_HEADER_TYPE_KEY) {\n localStorage.setItem(YZ_HEADER_TYPE_KEY, data as string);\n return;\n }\n localStorage.setItem(key, JSON.stringify(data));\n}\n\ntype returnSet<T> = (data: T) => void;\ntype returnGet<T> = () => T | null;\n\nexport function useLocalStorageUser(): [returnSet<YunzaiUser>, returnGet<YunzaiUser>] {\n const setFn: returnSet<YunzaiUser> = user => set(YZ_USER_KEY, user);\n const getFn: returnGet<YunzaiUser> = () => get<YunzaiUser>(YZ_USER_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageProjectInfo(): [returnSet<YunzaiProjectInfo>, returnGet<YunzaiProjectInfo>] {\n const setFn: returnSet<YunzaiProjectInfo> = data => set(YZ_PROJECT_INFO_KEY, data);\n const getFn: returnGet<YunzaiProjectInfo> = () => get<YunzaiProjectInfo>(YZ_PROJECT_INFO_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageCurrent(): [returnSet<LayoutBasicAside>, returnGet<LayoutBasicAside>] {\n const setFn: returnSet<LayoutBasicAside> = data => set(YZ_CURRENT_KEY, data);\n const getFn: returnGet<LayoutBasicAside> = () => get<LayoutBasicAside>(YZ_CURRENT_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageHeaderType(): [returnSet<NavType>, returnGet<NavType>] {\n const setFn: returnSet<NavType> = data => set(YZ_HEADER_TYPE_KEY, data);\n const getFn: returnGet<NavType> = () => get<NavType>(YZ_HEADER_TYPE_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageHeader(): [returnSet<YunzaiNavTopic[]>, returnGet<YunzaiNavTopic[]>] {\n const setFn: returnSet<YunzaiNavTopic[]> = data => set(YZ_HEADER_KEY, data);\n const getFn: returnGet<YunzaiNavTopic[]> = () => get<YunzaiNavTopic[]>(YZ_HEADER_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageDefaultRoute(): [returnSet<string>, returnGet<string>] {\n const setFn: returnSet<string> = data => set(YZ_DEFAULT_ROUTE_KEY, data);\n const getFn: returnGet<string> = () => get<string>(YZ_DEFAULT_ROUTE_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageTenant(): [returnSet<string>, returnGet<string>] {\n const setFn: returnSet<string> = data => set(YZ_TENANT_KEY, data);\n const getFn: returnGet<string> = () => get<string>(YZ_TENANT_KEY);\n return [setFn, getFn];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAGO,MAAM,WAAW,GAAG,WAAW;AAC/B,MAAM,mBAAmB,GAAG,mBAAmB;AAC/C,MAAM,cAAc,GAAG,cAAc;AACrC,MAAM,aAAa,GAAG,aAAa;AACnC,MAAM,kBAAkB,GAAG,kBAAkB;AAC7C,MAAM,oBAAoB,GAAG,oBAAoB;AACjD,MAAM,aAAa,GAAG,aAAa;AAC1C;AACA;AAEA,SAAS,GAAG,CAAI,GAAW,EAAA;AACzB,IAAA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K,CAAC,CAAC;AACxB,CAAC;SAEe,yBAAyB,GAAA;AACvC,IAAA,MAAM,KAAK,GAAuB,IAAI,IAAI,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACxE,MAAM,KAAK,GAAuB,MAAM,GAAG,CAAU,kBAAkB,CAAC,CAAC;AACzE,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,qBAAqB,GAAA;AACnC,IAAA,MAAM,KAAK,GAAgC,IAAI,IAAI,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC5E,MAAM,KAAK,GAAgC,MAAM,GAAG,CAAmB,aAAa,CAAC,CAAC;AACtF,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,2BAA2B,GAAA;AACzC,IAAA,MAAM,KAAK,GAAsB,IAAI,IAAI,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACzE,MAAM,KAAK,GAAsB,MAAM,GAAG,CAAS,oBAAoB,CAAC,CAAC;AACzE,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,qBAAqB,GAAA;AACnC,IAAA,MAAM,KAAK,GAAsB,IAAI,IAAI,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAClE,MAAM,KAAK,GAAsB,MAAM,GAAG,CAAS,aAAa,CAAC,CAAC;AAClE,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB;;ACxEA;;AAEG;;;;"}
|
package/fesm2022/mtypes.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mtypes.mjs","sources":["../../../../packages/util/mtypes/nav.types.ts","../../../../packages/util/mtypes/page.ts","../../../../packages/util/mtypes/mtypes.ts"],"sourcesContent":["import { YunzaiNavTopic } from './header-menu.type';\n\nexport enum NavType {\n APPLICATION = 'application',\n GROUP = 'group',\n TILE = 'tile'\n}\n\nexport interface LayoutBasicAside {\n name: string;\n intro: string;\n icon: string;\n}\n\nexport interface LayoutBasicDisplay {\n nav: boolean;\n reusetab: boolean;\n aside: boolean;\n}\n\nexport interface LayoutNavApplicationState {\n active: boolean;\n type: 'all' | 'mine' | 'other';\n topic?: YunzaiNavTopic;\n topics: YunzaiNavTopic[];\n list: YunzaiNavTopic[];\n search: string | null;\n}\n\nexport interface LayoutNavGroupState {\n topics: YunzaiNavTopic[];\n}\n","
|
1
|
+
{"version":3,"file":"mtypes.mjs","sources":["../../../../packages/util/mtypes/nav.types.ts","../../../../packages/util/mtypes/page.ts","../../../../packages/util/mtypes/mtypes.ts"],"sourcesContent":["import { YunzaiNavTopic } from './header-menu.type';\n\nexport enum NavType {\n APPLICATION = 'application',\n GROUP = 'group',\n TILE = 'tile'\n}\n\nexport interface LayoutBasicAside {\n name: string;\n intro: string;\n icon: string;\n}\n\nexport interface LayoutBasicDisplay {\n nav: boolean;\n reusetab: boolean;\n aside: boolean;\n}\n\nexport interface LayoutNavApplicationState {\n active: boolean;\n type: 'all' | 'mine' | 'other';\n topic?: YunzaiNavTopic;\n topics: YunzaiNavTopic[];\n list: YunzaiNavTopic[];\n search: string | null;\n}\n\nexport interface LayoutNavGroupState {\n topics: YunzaiNavTopic[];\n}\n","import { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface YunzaiPageParam<T> {\n pageNum?: number;\n pageSize?: number;\n pageParam?: T;\n}\n\nconst YUNZAI_PAGE = {\n PAGE_NUM: 1,\n PAGE_SIZE: 1000\n};\n\nexport interface Pageable {\n offset: number;\n pageNumber: number;\n pageSize: number;\n paged: boolean;\n sort: PageableSort;\n unpaged: boolean;\n}\n\nexport interface PageableSort {\n empty: boolean;\n sorted: boolean;\n unsorted: boolean;\n}\n\nexport interface YunzaiPageResult<T> {\n content: T[];\n empty: boolean;\n first: boolean;\n last: boolean;\n number: number;\n numberOfElements: number;\n pageable: Pageable;\n size: number;\n sort: PageableSort;\n totalElements: number;\n totalPages: number;\n}\n\nexport class YunzaiPageBuilder<T extends NzSafeAny | unknown> {\n private page: YunzaiPageParam<T> = {};\n\n public pageNum(pageNum: number): this {\n this.page.pageNum = pageNum;\n return this;\n }\n\n public pageSize(pageSize: number): this {\n this.page.pageSize = pageSize;\n return this;\n }\n\n public pageParam(param: T): this {\n this.page.pageParam = param;\n return this;\n }\n\n public default(): this {\n this.page.pageNum = YUNZAI_PAGE.PAGE_NUM;\n this.page.pageSize = YUNZAI_PAGE.PAGE_SIZE;\n return this;\n }\n\n public build(): YunzaiPageParam<T> {\n return this.page;\n }\n}\n\nexport class Page<T> {\n pageNum = 1;\n pageSize = 30;\n param?: Partial<T>;\n\n private constructor(pageNum: number, pageSize: number, param?: Partial<T>) {\n this.pageNum = pageNum;\n this.pageSize = pageSize;\n this.param = param;\n }\n\n static create<T>(): Page<T> {\n return new Page<T>(1, 30);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"IAEY,QAIX;AAJD,CAAA,UAAY,OAAO,EAAA;AACjB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,OAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACf,CAAC,EAJW,OAAO,KAAP,OAAO,GAIlB,EAAA,CAAA,CAAA;;ACED,MAAM,WAAW,GAAG;AAClB,IAAA,QAAQ,EAAE,CAAC;AACX,IAAA,SAAS,EAAE,IAAI;CAChB,CAAC;MA+BW,iBAAiB,CAAA;AAA9B,IAAA,WAAA,GAAA;QACU,IAAI,CAAA,IAAA,GAAuB,EAAE,CAAC;KA0BvC;AAxBQ,IAAA,OAAO,CAAC,OAAe,EAAA;AAC5B,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC5B,QAAA,OAAO,IAAI,CAAC;KACb;AAEM,IAAA,QAAQ,CAAC,QAAgB,EAAA;AAC9B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,QAAA,OAAO,IAAI,CAAC;KACb;AAEM,IAAA,SAAS,CAAC,KAAQ,EAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;AAC5B,QAAA,OAAO,IAAI,CAAC;KACb;IAEM,OAAO,GAAA;QACZ,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC;AAC3C,QAAA,OAAO,IAAI,CAAC;KACb;IAEM,KAAK,GAAA;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;AACF,CAAA;MAEY,IAAI,CAAA;AAKf,IAAA,WAAA,CAAoB,OAAe,EAAE,QAAgB,EAAE,KAAkB,EAAA;QAJzE,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;QACZ,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;AAIZ,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;KACpB;AAED,IAAA,OAAO,MAAM,GAAA;AACX,QAAA,OAAO,IAAI,IAAI,CAAI,CAAC,EAAE,EAAE,CAAC,CAAC;KAC3B;AACF;;ACrFD;;AAEG;;;;"}
|
package/fesm2022/other.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import extend from 'extend';
|
2
2
|
import { DOCUMENT } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import {
|
4
|
+
import { inject, Injectable } from '@angular/core';
|
5
5
|
import { BehaviorSubject, share, filter, isObservable } from 'rxjs';
|
6
6
|
|
7
7
|
/**
|
@@ -120,8 +120,8 @@ const log = (...args) => {
|
|
120
120
|
* 延迟加载资源(js 或 css)服务
|
121
121
|
*/
|
122
122
|
class LazyService {
|
123
|
-
constructor(
|
124
|
-
this.doc =
|
123
|
+
constructor() {
|
124
|
+
this.doc = inject(DOCUMENT);
|
125
125
|
this.list = {};
|
126
126
|
this.cached = {};
|
127
127
|
this._notify = new BehaviorSubject([]);
|
@@ -231,19 +231,16 @@ class LazyService {
|
|
231
231
|
resolve(item);
|
232
232
|
});
|
233
233
|
}
|
234
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
235
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LazyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
235
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LazyService, providedIn: 'root' }); }
|
236
236
|
}
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LazyService, decorators: [{
|
238
238
|
type: Injectable,
|
239
239
|
args: [{ providedIn: 'root' }]
|
240
|
-
}]
|
241
|
-
type: Inject,
|
242
|
-
args: [DOCUMENT]
|
243
|
-
}] }]; } });
|
240
|
+
}] });
|
244
241
|
|
245
242
|
function throwError(msg, actual, expected, comparison) {
|
246
|
-
if (ngDevMode) {
|
243
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
247
244
|
throw new Error(`ASSERTION ERROR: ${msg}${comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`}`);
|
248
245
|
}
|
249
246
|
}
|
@@ -308,10 +305,6 @@ function assertObservable(obj, msg) {
|
|
308
305
|
}
|
309
306
|
}
|
310
307
|
|
311
|
-
const resizeWindow = () => {
|
312
|
-
window.dispatchEvent(new Event('resize'));
|
313
|
-
};
|
314
|
-
|
315
308
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
316
309
|
class PathToRegexpService {
|
317
310
|
constructor() {
|
@@ -374,7 +367,7 @@ class PathToRegexpService {
|
|
374
367
|
: `[^${this.escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter)}]+?`
|
375
368
|
});
|
376
369
|
}
|
377
|
-
// Push
|
370
|
+
// Push NzSafeAny remaining characters.
|
378
371
|
if (path || index < str.length) {
|
379
372
|
tokens.push(path + str.substr(index));
|
380
373
|
}
|
@@ -539,15 +532,19 @@ class PathToRegexpService {
|
|
539
532
|
}
|
540
533
|
return this.stringToRegexp(/** @type {string} */ path, keys, options);
|
541
534
|
}
|
542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
543
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
535
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PathToRegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
536
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PathToRegexpService, providedIn: 'root' }); }
|
544
537
|
}
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PathToRegexpService, decorators: [{
|
546
539
|
type: Injectable,
|
547
540
|
args: [{
|
548
541
|
providedIn: 'root'
|
549
542
|
}]
|
550
|
-
}], ctorParameters:
|
543
|
+
}], ctorParameters: () => [] });
|
544
|
+
|
545
|
+
const resizeWindow = () => {
|
546
|
+
window.dispatchEvent(new Event('resize'));
|
547
|
+
};
|
551
548
|
|
552
549
|
function setFavicon(path) {
|
553
550
|
const link = document.querySelector("link[rel*='icon']") || document.createElement('link');
|
package/fesm2022/other.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"other.mjs","sources":["../../../../packages/util/other/deep.ts","../../../../packages/util/other/logger.ts","../../../../packages/util/other/lazy.service.ts","../../../../packages/util/other/assert.ts","../../../../packages/util/other/resize.ts","../../../../packages/util/other/path-to-regexp.service.ts","../../../../packages/util/other/favicon.ts","../../../../packages/util/other/other.ts"],"sourcesContent":["import extend from 'extend';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * Gets the value at `path` of `object`, like `_.get` in lodash.\n *\n * 类似 `_.get`,根据 `path` 获取安全值\n */\nexport function deepGet(obj: NzSafeAny, path: string | string[] | null | undefined, defaultValue?: unknown): NzSafeAny {\n if (!obj || path == null || path.length === 0) return defaultValue;\n if (!Array.isArray(path)) {\n path = ~path.indexOf('.') ? path.split('.') : [path];\n }\n if (path.length === 1) {\n const checkObj = obj[path[0]];\n return typeof checkObj === 'undefined' ? defaultValue : checkObj;\n }\n const res = path.reduce((o, k) => (o || {})[k], obj);\n return typeof res === 'undefined' ? defaultValue : res;\n}\n\n/**\n * Base on [extend](https://github.com/justmoon/node-extend) deep copy.\n *\n * 基于 [extend](https://github.com/justmoon/node-extend) 的深度拷贝\n *\n * NOTE: Don't a lot of recursion, maybe performance issues\n */\nexport function deepCopy<T extends { [key: string]: NzSafeAny } = NzSafeAny>(obj: T | null | undefined): T {\n const result = extend(true, {}, { _: obj });\n return result._ as T;\n}\n\n/**\n * Deep merge object.\n *\n * 深度合并对象\n *\n * @param original 原始对象\n * @param arrayProcessMethod 数组处理方式\n * - `true` 表示替换新值,不管新值为哪种类型\n * - `false` 表示会合并整个数组(将旧数据与新数据合并成新数组)\n * @param objects 要合并的对象\n */\nexport function deepMergeKey(original: unknown, arrayProcessMethod: boolean, ...objects: NzSafeAny[]): NzSafeAny {\n if (Array.isArray(original) || typeof original !== 'object') return original;\n\n const isObject = (v: unknown): boolean => typeof v === 'object';\n\n const merge = (target: NzSafeAny, obj: NzSafeAny): NzSafeAny => {\n Object.keys(obj)\n .filter(key => key !== '__proto__' && Object.prototype.hasOwnProperty.call(obj, key))\n .forEach(key => {\n const fromValue = obj[key];\n const toValue = target[key];\n if (Array.isArray(toValue)) {\n target[key] = arrayProcessMethod ? fromValue : [...toValue, ...fromValue];\n } else if (typeof fromValue === 'function') {\n target[key] = fromValue;\n } else if (fromValue != null && isObject(fromValue) && toValue != null && isObject(toValue)) {\n target[key] = merge(toValue, fromValue);\n } else {\n target[key] = deepCopy(fromValue);\n }\n });\n return target;\n };\n\n objects.filter(v => v != null && isObject(v)).forEach(v => merge(original, v));\n\n return original;\n}\n\n/**\n * Deep merge object.\n *\n * 深度合并对象\n */\nexport function deepMerge(original: unknown, ...objects: unknown[]): NzSafeAny {\n return deepMergeKey(original, false, ...objects);\n}\n","import type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\ndeclare const ngDevMode: boolean;\n\nconst record: Record<string, boolean> = {};\n\nexport const PREFIX = '[@YELON]:';\n\nfunction notRecorded(...args: NzSafeAny[]): boolean {\n const asRecord = args.reduce((acc, c) => acc + c.toString(), '');\n\n if (record[asRecord]) {\n return false;\n } else {\n record[asRecord] = true;\n return true;\n }\n}\n\nfunction consoleCommonBehavior(consoleFunc: (...args: NzSafeAny) => void, ...args: NzSafeAny[]): void {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && notRecorded(...args)) {\n consoleFunc(...args);\n }\n}\n\n// Warning should only be printed in dev mode and only once.\nexport const warn = (...args: NzSafeAny[]): void =>\n consoleCommonBehavior((...arg: NzSafeAny[]) => console.warn(PREFIX, ...arg), ...args);\n\nexport const warnDeprecation = (...args: NzSafeAny[]): NzSafeAny => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return () => {};\n }\n const stack = new Error().stack;\n return consoleCommonBehavior((...arg: NzSafeAny[]) => console.warn(PREFIX, 'deprecated:', ...arg, stack), ...args);\n};\n\n// Log should only be printed in dev mode.\nexport const log = (...args: NzSafeAny[]): void => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.log(PREFIX, ...args);\n }\n};\n","import { DOCUMENT } from '@angular/common';\nimport { Inject, Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, filter, share } from 'rxjs';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface LazyResult {\n path: string;\n status: 'ok' | 'error' | 'loading';\n error?: NzSafeAny;\n}\n\nexport interface LazyLoadItem {\n path: string;\n options?: LazyLoadOptions;\n}\n\nexport interface LazyLoadOptions {\n innerContent?: string;\n attributes?: { [qualifiedName: string]: string };\n rel?: string;\n}\n\n/**\n * `LazyService` delay loading JS or CSS files.\n *\n * 延迟加载资源(js 或 css)服务\n */\n@Injectable({ providedIn: 'root' })\nexport class LazyService {\n private list: { [key: string]: boolean } = {};\n private cached: { [key: string]: LazyResult } = {};\n private _notify: BehaviorSubject<LazyResult[]> = new BehaviorSubject<LazyResult[]>([]);\n\n constructor(@Inject(DOCUMENT) private doc: NzSafeAny) {}\n\n get change(): Observable<LazyResult[]> {\n return this._notify.asObservable().pipe(\n share(),\n filter(ls => ls.length !== 0)\n );\n }\n\n clear(): void {\n this.list = {};\n this.cached = {};\n }\n\n private attachAttributes(el: HTMLElement, attributes?: { [qualifiedName: string]: string }): void {\n if (attributes == null) return;\n\n Object.entries(attributes).forEach(([key, value]) => {\n el.setAttribute(key, value);\n });\n }\n\n /**\n * Load script or style files\n */\n load(paths: string | LazyLoadItem | Array<string | LazyLoadItem>): Promise<LazyResult[]> {\n if (!Array.isArray(paths)) {\n paths = [paths];\n }\n\n const promises: Array<Promise<LazyResult>> = [];\n paths\n .map(v => (typeof v !== 'object' ? ({ path: v } as LazyLoadItem) : v))\n .forEach(item => {\n if (item.path.endsWith('.js')) {\n promises.push(this.loadScript(item.path, item.options));\n } else {\n promises.push(this.loadStyle(item.path, item.options));\n }\n });\n\n return Promise.all(promises).then(res => {\n this._notify.next(res);\n return Promise.resolve(res);\n });\n }\n\n /**\n * Load a script file\n */\n loadScript(path: string, options?: LazyLoadOptions): Promise<LazyResult>;\n loadScript(\n path: string,\n innerContent?: string | LazyLoadOptions,\n attributes?: { [qualifiedName: string]: string }\n ): Promise<LazyResult> {\n const options: LazyLoadOptions =\n typeof innerContent === 'object'\n ? innerContent\n : {\n innerContent,\n attributes\n };\n return new Promise(resolve => {\n if (this.list[path] === true) {\n resolve({ ...this.cached[path], status: 'loading' });\n return;\n }\n\n this.list[path] = true;\n const onSuccess = (item: LazyResult): void => {\n this.cached[path] = item;\n resolve(item);\n this._notify.next([item]);\n };\n\n const node = this.doc.createElement('script') as HTMLScriptElement;\n node.type = 'text/javascript';\n node.src = path;\n this.attachAttributes(node, options.attributes);\n if (options.innerContent) {\n node.innerHTML = options.innerContent;\n }\n node.onload = () =>\n onSuccess({\n path,\n status: 'ok'\n });\n node.onerror = error =>\n onSuccess({\n path,\n status: 'error',\n error\n });\n this.doc.getElementsByTagName('head')[0].appendChild(node);\n });\n }\n\n /**\n * Load a style file\n */\n loadStyle(path: string, options?: LazyLoadOptions): Promise<LazyResult>;\n loadStyle(\n path: string,\n rel?: string | LazyLoadOptions,\n innerContent?: string,\n attributes?: { [qualifiedName: string]: string }\n ): Promise<LazyResult> {\n const options: LazyLoadOptions =\n typeof rel === 'object'\n ? rel\n : {\n rel,\n innerContent,\n attributes\n };\n return new Promise(resolve => {\n if (this.list[path] === true) {\n resolve(this.cached[path]);\n return;\n }\n\n this.list[path] = true;\n\n const node = this.doc.createElement('link') as HTMLLinkElement;\n node.rel = options.rel ?? 'stylesheet';\n node.type = 'text/css';\n node.href = path;\n this.attachAttributes(node, options.attributes);\n if (options.innerContent) {\n node.innerHTML = options.innerContent;\n }\n this.doc.getElementsByTagName('head')[0].appendChild(node);\n const item: LazyResult = {\n path,\n status: 'ok'\n };\n this.cached[path] = item;\n resolve(item);\n });\n }\n}\n","import { isObservable } from 'rxjs';\n\ndeclare const ngDevMode: boolean;\n\nfunction throwError(msg: string | null | undefined): void;\nfunction throwError(msg: string | null | undefined, actual: unknown, expected: unknown, comparison: string): void;\nfunction throwError(msg: string | null | undefined, actual?: unknown, expected?: unknown, comparison?: string): void {\n if (ngDevMode) {\n throw new Error(\n `ASSERTION ERROR: ${msg}${comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`}`\n );\n }\n}\n\n/**\n * Assert whether the expression and throw an error into console in dev mode\n *\n * 断言表达式是否符合预期,并在开发模式下会在控制台抛出一个错误\n */\nexport function assert(expression: boolean, msg?: string): void {\n if (!expression) {\n throwError(msg);\n }\n}\n\n/**\n * Assert whether empty (`null` or `undefined`)\n *\n * 断言是否空值(`null` 或 `undefined`)\n */\nexport function assertEmpty(actual: unknown, msg?: string): void {\n if (actual == null) {\n throwError(msg, typeof actual, 'NULL', '==');\n }\n}\n\n/**\n * Assert whether `number` type\n *\n * 断言是否 `number` 类型\n */\nexport function assertNumber(actual: unknown, msg?: string): void {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\n\n/**\n * Assert whether `string` type\n *\n * 断言是否 `string` 类型\n */\nexport function assertString(actual: unknown, msg?: string): void {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\n/**\n * Assert whether `array` type\n *\n * 断言是否 `array` 类型\n */\nexport function assertArray(actual: unknown, msg?: string): void {\n if (!Array.isArray(actual)) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'array', '===');\n }\n}\n\n/**\n * Assert whether `Observable` type\n *\n * 断言是否 `Observable` 类型\n */\nexport function assertObservable(obj: unknown, msg?: string): void {\n if (!isObservable(obj)) {\n throwError(msg, obj === null ? 'null' : typeof obj, 'Observable', '===');\n }\n}\n","export const resizeWindow = (): void => {\n window.dispatchEvent(new Event('resize'));\n};\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PathToRegexpService {\n constructor() {}\n DEFAULT_DELIMITER = '/';\n\n PATH_REGEXP = new RegExp(\n ['(\\\\\\\\.)', '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'].join('|'),\n 'g'\n );\n\n parse(str: any, options: any) {\n const tokens = [];\n let key = 0;\n let index = 0;\n let path = '';\n const defaultDelimiter = (options && options.delimiter) || this.DEFAULT_DELIMITER;\n const whitelist = (options && options.whitelist) || undefined;\n let pathEscaped = false;\n let res;\n\n while ((res = this.PATH_REGEXP.exec(str)) !== null) {\n const m = res[0];\n const escaped = res[1];\n const offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n pathEscaped = true;\n continue;\n }\n\n let prev = '';\n const name = res[2];\n const capture = res[3];\n const group = res[4];\n const modifier = res[5];\n\n if (!pathEscaped && path.length) {\n const k = path.length - 1;\n const c = path[k];\n const matches = whitelist ? whitelist.indexOf(c) > -1 : true;\n\n if (matches) {\n prev = c;\n path = path.slice(0, k);\n }\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n pathEscaped = false;\n }\n\n const repeat = modifier === '+' || modifier === '*';\n const optional = modifier === '?' || modifier === '*';\n const pattern = capture || group;\n const delimiter = prev || defaultDelimiter;\n\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: pattern\n ? this.escapeGroup(pattern)\n : `[^${this.escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter)}]+?`\n });\n }\n\n // Push any remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index));\n }\n\n return tokens;\n }\n compile(str: any, options: any) {\n return this.tokensToFunction(this.parse(str, options), options);\n }\n\n tokensToFunction(tokens: any, options: any) {\n const matches = new Array(tokens.length);\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp(`^(?:${tokens[i].pattern})$`, this.flags(options));\n }\n }\n\n return function (data: any, options: any) {\n let path = '';\n const encode = (options && options.encode) || encodeURIComponent;\n const validate = options ? options.validate !== false : true;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data ? data[token.name] : undefined;\n let segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError(`Expected \"${token.name}\" to not repeat, but got array`);\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n }\n\n throw new TypeError(`Expected \"${token.name}\" to not be empty`);\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j], token);\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(`Expected all \"${token.name}\" to match \"${token.pattern}\"`);\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token);\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(`Expected \"${token.name}\" to match \"${token.pattern}\", but got \"${segment}\"`);\n }\n\n path += token.prefix + segment;\n continue;\n }\n\n if (token.optional) {\n continue;\n }\n\n throw new TypeError(`Expected \"${token.name}\" to be ${token.repeat ? 'an array' : 'a string'}`);\n }\n\n return path;\n };\n }\n\n escapeString(str: any) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1');\n }\n\n escapeGroup(group: any) {\n return group.replace(/([=!:$/()])/g, '\\\\$1');\n }\n\n flags(options: any) {\n return options && options.sensitive ? '' : 'i';\n }\n\n regexpToRegexp(path: any, keys: any) {\n if (!keys) {\n return path;\n }\n\n const groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (let i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n });\n }\n }\n\n return path;\n }\n\n arrayToRegexp(path: any, keys: any, options: any): RegExp {\n const parts = [];\n\n for (let i = 0; i < path.length; i++) {\n parts.push(this.pathToRegexp(path[i], keys, options).source);\n }\n\n return new RegExp(`(?:${parts.join('|')})`, this.flags(options));\n }\n\n stringToRegexp(path: any, keys: any, options: any) {\n return this.tokensToRegExp(this.parse(path, options), keys, options);\n }\n\n tokensToRegExp(tokens: any, keys: any, options: any) {\n options = options || {};\n\n const strict = options.strict;\n const start = options.start !== false;\n const end = options.end !== false;\n const delimiter = options.delimiter || this.DEFAULT_DELIMITER;\n const endsWith = []\n .concat(options.endsWith || [])\n .map(this.escapeString)\n .concat('$')\n .join('|');\n let route = start ? '^' : '';\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n route += this.escapeString(token);\n } else {\n const capture = token.repeat\n ? `(?:${token.pattern})(?:${this.escapeString(token.delimiter)}(?:${token.pattern}))*`\n : token.pattern;\n\n if (keys) {\n keys.push(token);\n }\n\n if (token.optional) {\n if (!token.prefix) {\n route += `(${capture})?`;\n } else {\n route += `(?:${this.escapeString(token.prefix)}(${capture}))?`;\n }\n } else {\n route += `${this.escapeString(token.prefix)}(${capture})`;\n }\n }\n }\n\n if (end) {\n if (!strict) {\n route += `(?:${this.escapeString(delimiter)})?`;\n }\n\n route += endsWith === '$' ? '$' : `(?=${endsWith})`;\n } else {\n const endToken = tokens[tokens.length - 1];\n const isEndDelimited =\n typeof endToken === 'string' ? endToken[endToken.length - 1] === delimiter : endToken === undefined;\n\n if (!strict) {\n route += `(?:${this.escapeString(delimiter)}(?=${endsWith}))?`;\n }\n if (!isEndDelimited) {\n route += `(?=${this.escapeString(delimiter)}|${endsWith})`;\n }\n }\n\n return new RegExp(route, this.flags(options));\n }\n\n pathToRegexp(path: any, keys: any, options: any) {\n if (path instanceof RegExp) {\n return this.regexpToRegexp(path, keys);\n }\n\n if (Array.isArray(path)) {\n return this.arrayToRegexp(/** @type {!Array} */ path, keys, options);\n }\n\n return this.stringToRegexp(/** @type {string} */ path, keys, options);\n }\n}\n","export function setFavicon(path: string): void {\n const link: any = document.querySelector(\"link[rel*='icon']\") || document.createElement('link');\n link.type = 'image/x-icon';\n link.rel = 'shortcut icon';\n link.href = path;\n document.getElementsByTagName('head')[0].appendChild(link);\n}\n\nexport function hasFavicon(url: string): Promise<boolean> {\n return new Promise(resolve => {\n let xmlHttp;\n if (window['XMLHttpRequest']) {\n xmlHttp = new XMLHttpRequest();\n }\n if (xmlHttp) {\n xmlHttp.open('Get', url, false);\n xmlHttp.send();\n if (xmlHttp.status == 404) {\n resolve(false);\n } else {\n resolve(true);\n }\n } else {\n resolve(false);\n }\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;SACa,OAAO,CAAC,GAAc,EAAE,IAA0C,EAAE,YAAsB,EAAA;IACxG,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,YAAY,CAAC;AACnE,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtD,KAAA;AACD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,QAAA,OAAO,OAAO,QAAQ,KAAK,WAAW,GAAG,YAAY,GAAG,QAA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U,CAAC,IAAY,EAAA;AACrC,IAAA,MAAM,IAAI,GAAQ,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAChG,IAAA,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;AAC3B,IAAA,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC;AAC3B,IAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjB,IAAA,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAEK,SAAU,UAAU,CAAC,GAAW,EAAA;AACpC,IAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;AAC3B,QAAA,IAAI,OAAO,CAAC;AACZ,QAAA,IAAI,MAAM,CAAC,gBAAgB,CAAC,EAAE;AAC5B,YAAA,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;AAChC,SAAA;AACD,QAAA,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YAChC,OAAO,CAAC,IAAI,EAAE,CAAC;AACf,YAAA,IAAI,OAAO,CAAC,MAAM,IAAI,GAAG,EAAE;gBACzB,OAAO,CAAC,KAAK,CAAC,CAAC;AAChB,aAAA;AAAM,iBAAA;gBACL,OAAO,CAAC,IAAI,CAAC,CAAC;AACf,aAAA;AACF,SAAA;AAAM,aAAA;YACL,OAAO,CAAC,KAAK,CAAC,CAAC;AAChB,SAAA;AACH,KAAC,CAAC,CAAC;AACL;;AC1BA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"other.mjs","sources":["../../../../packages/util/other/deep.ts","../../../../packages/util/other/logger.ts","../../../../packages/util/other/lazy.service.ts","../../../../packages/util/other/assert.ts","../../../../packages/util/other/path-to-regexp.service.ts","../../../../packages/util/other/resize.ts","../../../../packages/util/other/favicon.ts","../../../../packages/util/other/other.ts"],"sourcesContent":["import extend from 'extend';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * Gets the value at `path` of `object`, like `_.get` in lodash.\n *\n * 类似 `_.get`,根据 `path` 获取安全值\n */\nexport function deepGet(obj: NzSafeAny, path: string | string[] | null | undefined, defaultValue?: unknown): NzSafeAny {\n if (!obj || path == null || path.length === 0) return defaultValue;\n if (!Array.isArray(path)) {\n path = ~path.indexOf('.') ? path.split('.') : [path];\n }\n if (path.length === 1) {\n const checkObj = obj[path[0]];\n return typeof checkObj === 'undefined' ? defaultValue : checkObj;\n }\n const res = path.reduce((o, k) => (o || {})[k], obj);\n return typeof res === 'undefined' ? defaultValue : res;\n}\n\n/**\n * Base on [extend](https://github.com/justmoon/node-extend) deep copy.\n *\n * 基于 [extend](https://github.com/justmoon/node-extend) 的深度拷贝\n *\n * NOTE: Don't a lot of recursion, maybe performance issues\n */\nexport function deepCopy<T extends { [key: string]: NzSafeAny } = NzSafeAny>(obj: T | null | undefined): T {\n const result = extend(true, {}, { _: obj });\n return result._ as T;\n}\n\n/**\n * Deep merge object.\n *\n * 深度合并对象\n *\n * @param original 原始对象\n * @param arrayProcessMethod 数组处理方式\n * - `true` 表示替换新值,不管新值为哪种类型\n * - `false` 表示会合并整个数组(将旧数据与新数据合并成新数组)\n * @param objects 要合并的对象\n */\nexport function deepMergeKey(original: unknown, arrayProcessMethod: boolean, ...objects: NzSafeAny[]): NzSafeAny {\n if (Array.isArray(original) || typeof original !== 'object') return original;\n\n const isObject = (v: unknown): boolean => typeof v === 'object';\n\n const merge = (target: NzSafeAny, obj: NzSafeAny): NzSafeAny => {\n Object.keys(obj)\n .filter(key => key !== '__proto__' && Object.prototype.hasOwnProperty.call(obj, key))\n .forEach(key => {\n const fromValue = obj[key];\n const toValue = target[key];\n if (Array.isArray(toValue)) {\n target[key] = arrayProcessMethod ? fromValue : [...toValue, ...fromValue];\n } else if (typeof fromValue === 'function') {\n target[key] = fromValue;\n } else if (fromValue != null && isObject(fromValue) && toValue != null && isObject(toValue)) {\n target[key] = merge(toValue, fromValue);\n } else {\n target[key] = deepCopy(fromValue);\n }\n });\n return target;\n };\n\n objects.filter(v => v != null && isObject(v)).forEach(v => merge(original, v));\n\n return original;\n}\n\n/**\n * Deep merge object.\n *\n * 深度合并对象\n */\nexport function deepMerge(original: unknown, ...objects: unknown[]): NzSafeAny {\n return deepMergeKey(original, false, ...objects);\n}\n","import type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\ndeclare const ngDevMode: boolean;\n\nconst record: Record<string, boolean> = {};\n\nexport const PREFIX = '[@YELON]:';\n\nfunction notRecorded(...args: NzSafeAny[]): boolean {\n const asRecord = args.reduce((acc, c) => acc + c.toString(), '');\n\n if (record[asRecord]) {\n return false;\n } else {\n record[asRecord] = true;\n return true;\n }\n}\n\nfunction consoleCommonBehavior(consoleFunc: (...args: NzSafeAny) => void, ...args: NzSafeAny[]): void {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && notRecorded(...args)) {\n consoleFunc(...args);\n }\n}\n\n// Warning should only be printed in dev mode and only once.\nexport const warn = (...args: NzSafeAny[]): void =>\n consoleCommonBehavior((...arg: NzSafeAny[]) => console.warn(PREFIX, ...arg), ...args);\n\nexport const warnDeprecation = (...args: NzSafeAny[]): NzSafeAny => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return () => {};\n }\n const stack = new Error().stack;\n return consoleCommonBehavior((...arg: NzSafeAny[]) => console.warn(PREFIX, 'deprecated:', ...arg, stack), ...args);\n};\n\n// Log should only be printed in dev mode.\nexport const log = (...args: NzSafeAny[]): void => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.log(PREFIX, ...args);\n }\n};\n","import { DOCUMENT } from '@angular/common';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, filter, share } from 'rxjs';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface LazyResult {\n path: string;\n status: 'ok' | 'error' | 'loading';\n error?: NzSafeAny;\n}\n\nexport interface LazyLoadItem {\n path: string;\n options?: LazyLoadOptions;\n}\n\nexport interface LazyLoadOptions {\n innerContent?: string;\n attributes?: { [qualifiedName: string]: string };\n rel?: string;\n}\n\n/**\n * `LazyService` delay loading JS or CSS files.\n *\n * 延迟加载资源(js 或 css)服务\n */\n@Injectable({ providedIn: 'root' })\nexport class LazyService {\n private readonly doc = inject(DOCUMENT);\n\n private list: { [key: string]: boolean } = {};\n private cached: { [key: string]: LazyResult } = {};\n private _notify: BehaviorSubject<LazyResult[]> = new BehaviorSubject<LazyResult[]>([]);\n\n get change(): Observable<LazyResult[]> {\n return this._notify.asObservable().pipe(\n share(),\n filter(ls => ls.length !== 0)\n );\n }\n\n clear(): void {\n this.list = {};\n this.cached = {};\n }\n\n private attachAttributes(el: HTMLElement, attributes?: { [qualifiedName: string]: string }): void {\n if (attributes == null) return;\n\n Object.entries(attributes).forEach(([key, value]) => {\n el.setAttribute(key, value);\n });\n }\n\n /**\n * Load script or style files\n */\n load(paths: string | LazyLoadItem | Array<string | LazyLoadItem>): Promise<LazyResult[]> {\n if (!Array.isArray(paths)) {\n paths = [paths];\n }\n\n const promises: Array<Promise<LazyResult>> = [];\n paths\n .map(v => (typeof v !== 'object' ? ({ path: v } as LazyLoadItem) : v))\n .forEach(item => {\n if (item.path.endsWith('.js')) {\n promises.push(this.loadScript(item.path, item.options));\n } else {\n promises.push(this.loadStyle(item.path, item.options));\n }\n });\n\n return Promise.all(promises).then(res => {\n this._notify.next(res);\n return Promise.resolve(res);\n });\n }\n\n /**\n * Load a script file\n */\n loadScript(path: string, options?: LazyLoadOptions): Promise<LazyResult>;\n loadScript(\n path: string,\n innerContent?: string | LazyLoadOptions,\n attributes?: { [qualifiedName: string]: string }\n ): Promise<LazyResult> {\n const options: LazyLoadOptions =\n typeof innerContent === 'object'\n ? innerContent\n : {\n innerContent,\n attributes\n };\n return new Promise(resolve => {\n if (this.list[path] === true) {\n resolve({ ...this.cached[path], status: 'loading' });\n return;\n }\n\n this.list[path] = true;\n const onSuccess = (item: LazyResult): void => {\n this.cached[path] = item;\n resolve(item);\n this._notify.next([item]);\n };\n\n const node = this.doc.createElement('script') as HTMLScriptElement;\n node.type = 'text/javascript';\n node.src = path;\n this.attachAttributes(node, options.attributes);\n if (options.innerContent) {\n node.innerHTML = options.innerContent;\n }\n node.onload = () =>\n onSuccess({\n path,\n status: 'ok'\n });\n node.onerror = error =>\n onSuccess({\n path,\n status: 'error',\n error\n });\n this.doc.getElementsByTagName('head')[0].appendChild(node);\n });\n }\n\n /**\n * Load a style file\n */\n loadStyle(path: string, options?: LazyLoadOptions): Promise<LazyResult>;\n loadStyle(\n path: string,\n rel?: string | LazyLoadOptions,\n innerContent?: string,\n attributes?: { [qualifiedName: string]: string }\n ): Promise<LazyResult> {\n const options: LazyLoadOptions =\n typeof rel === 'object'\n ? rel\n : {\n rel,\n innerContent,\n attributes\n };\n return new Promise(resolve => {\n if (this.list[path] === true) {\n resolve(this.cached[path]);\n return;\n }\n\n this.list[path] = true;\n\n const node = this.doc.createElement('link') as HTMLLinkElement;\n node.rel = options.rel ?? 'stylesheet';\n node.type = 'text/css';\n node.href = path;\n this.attachAttributes(node, options.attributes);\n if (options.innerContent) {\n node.innerHTML = options.innerContent;\n }\n this.doc.getElementsByTagName('head')[0].appendChild(node);\n const item: LazyResult = {\n path,\n status: 'ok'\n };\n this.cached[path] = item;\n resolve(item);\n });\n }\n}\n","import { isObservable } from 'rxjs';\n\ndeclare const ngDevMode: boolean;\n\nfunction throwError(msg: string | null | undefined): void;\nfunction throwError(msg: string | null | undefined, actual: unknown, expected: unknown, comparison: string): void;\nfunction throwError(msg: string | null | undefined, actual?: unknown, expected?: unknown, comparison?: string): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw new Error(\n `ASSERTION ERROR: ${msg}${comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`}`\n );\n }\n}\n\n/**\n * Assert whether the expression and throw an error into console in dev mode\n *\n * 断言表达式是否符合预期,并在开发模式下会在控制台抛出一个错误\n */\nexport function assert(expression: boolean, msg?: string): void {\n if (!expression) {\n throwError(msg);\n }\n}\n\n/**\n * Assert whether empty (`null` or `undefined`)\n *\n * 断言是否空值(`null` 或 `undefined`)\n */\nexport function assertEmpty(actual: unknown, msg?: string): void {\n if (actual == null) {\n throwError(msg, typeof actual, 'NULL', '==');\n }\n}\n\n/**\n * Assert whether `number` type\n *\n * 断言是否 `number` 类型\n */\nexport function assertNumber(actual: unknown, msg?: string): void {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\n\n/**\n * Assert whether `string` type\n *\n * 断言是否 `string` 类型\n */\nexport function assertString(actual: unknown, msg?: string): void {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\n/**\n * Assert whether `array` type\n *\n * 断言是否 `array` 类型\n */\nexport function assertArray(actual: unknown, msg?: string): void {\n if (!Array.isArray(actual)) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'array', '===');\n }\n}\n\n/**\n * Assert whether `Observable` type\n *\n * 断言是否 `Observable` 类型\n */\nexport function assertObservable(obj: unknown, msg?: string): void {\n if (!isObservable(obj)) {\n throwError(msg, obj === null ? 'null' : typeof obj, 'Observable', '===');\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { Injectable } from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PathToRegexpService {\n constructor() {}\n DEFAULT_DELIMITER = '/';\n\n PATH_REGEXP = new RegExp(\n ['(\\\\\\\\.)', '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'].join('|'),\n 'g'\n );\n\n parse(str: NzSafeAny, options: NzSafeAny) {\n const tokens = [];\n let key = 0;\n let index = 0;\n let path = '';\n const defaultDelimiter = (options && options.delimiter) || this.DEFAULT_DELIMITER;\n const whitelist = (options && options.whitelist) || undefined;\n let pathEscaped = false;\n let res;\n\n while ((res = this.PATH_REGEXP.exec(str)) !== null) {\n const m = res[0];\n const escaped = res[1];\n const offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n pathEscaped = true;\n continue;\n }\n\n let prev = '';\n const name = res[2];\n const capture = res[3];\n const group = res[4];\n const modifier = res[5];\n\n if (!pathEscaped && path.length) {\n const k = path.length - 1;\n const c = path[k];\n const matches = whitelist ? whitelist.indexOf(c) > -1 : true;\n\n if (matches) {\n prev = c;\n path = path.slice(0, k);\n }\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n pathEscaped = false;\n }\n\n const repeat = modifier === '+' || modifier === '*';\n const optional = modifier === '?' || modifier === '*';\n const pattern = capture || group;\n const delimiter = prev || defaultDelimiter;\n\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: pattern\n ? this.escapeGroup(pattern)\n : `[^${this.escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter)}]+?`\n });\n }\n\n // Push NzSafeAny remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index));\n }\n\n return tokens;\n }\n compile(str: NzSafeAny, options: NzSafeAny) {\n return this.tokensToFunction(this.parse(str, options), options);\n }\n\n tokensToFunction(tokens: NzSafeAny, options: NzSafeAny) {\n const matches = new Array(tokens.length);\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp(`^(?:${tokens[i].pattern})$`, this.flags(options));\n }\n }\n\n return function (data: NzSafeAny, options: NzSafeAny) {\n let path = '';\n const encode = (options && options.encode) || encodeURIComponent;\n const validate = options ? options.validate !== false : true;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data ? data[token.name] : undefined;\n let segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError(`Expected \"${token.name}\" to not repeat, but got array`);\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n }\n\n throw new TypeError(`Expected \"${token.name}\" to not be empty`);\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j], token);\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(`Expected all \"${token.name}\" to match \"${token.pattern}\"`);\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token);\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(`Expected \"${token.name}\" to match \"${token.pattern}\", but got \"${segment}\"`);\n }\n\n path += token.prefix + segment;\n continue;\n }\n\n if (token.optional) {\n continue;\n }\n\n throw new TypeError(`Expected \"${token.name}\" to be ${token.repeat ? 'an array' : 'a string'}`);\n }\n\n return path;\n };\n }\n\n escapeString(str: NzSafeAny) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1');\n }\n\n escapeGroup(group: NzSafeAny) {\n return group.replace(/([=!:$/()])/g, '\\\\$1');\n }\n\n flags(options: NzSafeAny) {\n return options && options.sensitive ? '' : 'i';\n }\n\n regexpToRegexp(path: NzSafeAny, keys: NzSafeAny) {\n if (!keys) {\n return path;\n }\n\n const groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (let i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n });\n }\n }\n\n return path;\n }\n\n arrayToRegexp(path: NzSafeAny, keys: NzSafeAny, options: NzSafeAny): RegExp {\n const parts = [];\n\n for (let i = 0; i < path.length; i++) {\n parts.push(this.pathToRegexp(path[i], keys, options).source);\n }\n\n return new RegExp(`(?:${parts.join('|')})`, this.flags(options));\n }\n\n stringToRegexp(path: NzSafeAny, keys: NzSafeAny, options: NzSafeAny) {\n return this.tokensToRegExp(this.parse(path, options), keys, options);\n }\n\n tokensToRegExp(tokens: NzSafeAny, keys: NzSafeAny, options: NzSafeAny) {\n options = options || {};\n\n const strict = options.strict;\n const start = options.start !== false;\n const end = options.end !== false;\n const delimiter = options.delimiter || this.DEFAULT_DELIMITER;\n const endsWith = []\n .concat(options.endsWith || [])\n .map(this.escapeString)\n .concat('$')\n .join('|');\n let route = start ? '^' : '';\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n route += this.escapeString(token);\n } else {\n const capture = token.repeat\n ? `(?:${token.pattern})(?:${this.escapeString(token.delimiter)}(?:${token.pattern}))*`\n : token.pattern;\n\n if (keys) {\n keys.push(token);\n }\n\n if (token.optional) {\n if (!token.prefix) {\n route += `(${capture})?`;\n } else {\n route += `(?:${this.escapeString(token.prefix)}(${capture}))?`;\n }\n } else {\n route += `${this.escapeString(token.prefix)}(${capture})`;\n }\n }\n }\n\n if (end) {\n if (!strict) {\n route += `(?:${this.escapeString(delimiter)})?`;\n }\n\n route += endsWith === '$' ? '$' : `(?=${endsWith})`;\n } else {\n const endToken = tokens[tokens.length - 1];\n const isEndDelimited =\n typeof endToken === 'string' ? endToken[endToken.length - 1] === delimiter : endToken === undefined;\n\n if (!strict) {\n route += `(?:${this.escapeString(delimiter)}(?=${endsWith}))?`;\n }\n if (!isEndDelimited) {\n route += `(?=${this.escapeString(delimiter)}|${endsWith})`;\n }\n }\n\n return new RegExp(route, this.flags(options));\n }\n\n pathToRegexp(path: NzSafeAny, keys: NzSafeAny, options: NzSafeAny) {\n if (path instanceof RegExp) {\n return this.regexpToRegexp(path, keys);\n }\n\n if (Array.isArray(path)) {\n return this.arrayToRegexp(/** @type {!Array} */ path, keys, options);\n }\n\n return this.stringToRegexp(/** @type {string} */ path, keys, options);\n }\n}\n","export const resizeWindow = (): void => {\n window.dispatchEvent(new Event('resize'));\n};\n","import { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport function setFavicon(path: string): void {\n const link: NzSafeAny = document.querySelector(\"link[rel*='icon']\") || document.createElement('link');\n link.type = 'image/x-icon';\n link.rel = 'shortcut icon';\n link.href = path;\n document.getElementsByTagName('head')[0].appendChild(link);\n}\n\nexport function hasFavicon(url: string): Promise<boolean> {\n return new Promise(resolve => {\n let xmlHttp;\n if (window['XMLHttpRequest']) {\n xmlHttp = new XMLHttpRequest();\n }\n if (xmlHttp) {\n xmlHttp.open('Get', url, false);\n xmlHttp.send();\n if (xmlHttp.status == 404) {\n resolve(false);\n } else {\n resolve(true);\n }\n } else {\n resolve(false);\n }\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;SACa,OAAO,CAAC,GAAc,EAAE,IAA0C,EAAE,YAAsB,EAAA;IACxG,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,YAAY,CAAC;IACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACtD;AACD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,QAAA,OAAO,OAAO,QAAQ,KAAK,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;KAClE;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,C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