@yelon/util 18.0.1 → 18.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,8 +18,8 @@ export interface YunzaiLodopConfig {
18
18
  /**
19
19
  * Lodop 远程脚本URL地址,**注意**务必使用 `name` 属性指定变量值
20
20
  *
21
- * - http://localhost:18000/CLodopfuncs.js
22
- * - https://localhost:8443/CLodopfuncs.js [默认]
21
+ * - http://localhost:18000/CLodopfuncs.js [默认]
22
+ * - https://localhost:8443/CLodopfuncs.js
23
23
  */
24
24
  url?: string;
25
25
  /**
@@ -1,4 +1,8 @@
1
1
  export interface YunzaiAuthConfig {
2
+ /**
3
+ * 是否自动完成认证流程
4
+ */
5
+ auto?: boolean;
2
6
  /**
3
7
  * 存储KEY值,默认:`_token`
4
8
  */
@@ -1,3 +1,4 @@
1
1
  export * from './http.type';
2
2
  export * from './responsive.type';
3
3
  export * from './i18n.type';
4
+ export * from './pipe.type';
@@ -1,3 +1,7 @@
1
1
  export interface YunzaiThemePipeConfig {
2
2
  dateFormat?: string;
3
+ dateFormatCustom?: YunzaiThemePipeDateFormatCustom;
3
4
  }
5
+ export type YunzaiThemePipeDateFormatCustom = (value: Date, formatString?: string | null, options?: {
6
+ locale?: Locale;
7
+ }) => string;
@@ -1,3 +1,4 @@
1
+ import type { YunzaiThemePipeDateFormatCustom } from '@yelon/util/config';
1
2
  import type { NzSafeAny } from 'ng-zorro-antd/core/types';
2
3
  import { DateLocale } from 'ng-zorro-antd/i18n';
3
4
  /**
@@ -36,4 +37,7 @@ export declare function toDate(value?: Date | string | number | null, options?:
36
37
  * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format
37
38
  * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`
38
39
  */
39
- export declare function formatDate(value: Date | string | number, formatString: string, dateLocale?: DateLocale): string;
40
+ export declare function formatDate(value: Date | string | number, formatString: string, options?: {
41
+ locale?: DateLocale;
42
+ customFormat?: YunzaiThemePipeDateFormatCustom;
43
+ }): string;
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9kb3AudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvY29uZmlnL2FiYy9sb2RvcC50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFl1bnphaUxvZG9wQ29uZmlnIHtcbiAgLyoqXG4gICAqIOazqOWGjOS/oeaBr++8muS4u+azqOWGjOWPt1xuICAgKi9cbiAgbGljZW5zZT86IHN0cmluZztcbiAgLyoqXG4gICAqIOazqOWGjOS/oeaBr++8mumZhOWKoOazqOWGjOWPt0FcbiAgICovXG4gIGxpY2Vuc2VBPzogc3RyaW5nO1xuICAvKipcbiAgICog5rOo5YaM5L+h5oGv77ya6ZmE5Yqg5rOo5YaM5Y+3QlxuICAgKi9cbiAgbGljZW5zZUI/OiBzdHJpbmc7XG4gIC8qKlxuICAgKiDms6jlhozkv6Hmga/vvJrms6jlhozljZXkvY3lkI3np7BcbiAgICovXG4gIGNvbXBhbnlOYW1lPzogc3RyaW5nO1xuICAvKipcbiAgICogTG9kb3Ag6L+c56iL6ISa5pysVVJM5Zyw5Z2A77yMKirms6jmhI8qKuWKoeW/heS9v+eUqCBgbmFtZWAg5bGe5oCn5oyH5a6a5Y+Y6YeP5YC8XG4gICAqXG4gICAqIC0gaHR0cDovL2xvY2FsaG9zdDoxODAwMC9DTG9kb3BmdW5jcy5qc1xuICAgKiAtIGh0dHBzOi8vbG9jYWxob3N0Ojg0NDMvQ0xvZG9wZnVuY3MuanMgW+m7mOiupF1cbiAgICovXG4gIHVybD86IHN0cmluZztcbiAgLyoqXG4gICAqIExvZG9wIOWPmOmHj+WQje+8jOm7mOiupO+8mmBDTE9ET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DovL2xvY2FsaG9zdDoxODAwMC9DTG9kb3BmdW5jcy5qcyBb6buY6K6kXVxuICAgKiAtIGh0dHBzOi8vbG9jYWxob3N0Ojg0NDMvQ0xvZG9wZnVuY3MuanNcbiAgICovXG4gIHVybD86IHN0cmluZztcbiAgLyoqXG4gICAqIExvZG9wIOWPmOmHj+WQje+8jOm7mOiupO+8mmBDTE9ET1BgXG4gICAqL1xuICBuYW1lPzogc3RyaW5nO1xuICAvKipcbiAgICog5qOA5p+l5qyh5pWw77yM6buY6K6kIGAxMDBg77yM5b2T5qOA5p+l6LaF6L+H5pe26KeG5Li65byC5bi477yM6L+Z5piv5Zug5Li6IExvZG9wIOmcgOimgei/nuaOpSBXZWJTb2NrZXRcbiAgICovXG4gIGNoZWNrTWF4Q291bnQ/OiBudW1iZXI7XG59XG4iXX0=
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC50eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9jb25maWcvYXV0aC9hdXRoLnR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgWXVuemFpQXV0aENvbmZpZyB7XG4gIC8qKlxuICAgKiDlrZjlgqhLRVnlgLzvvIzpu5jorqTvvJpgX3Rva2VuYFxuICAgKi9cbiAgc3RvcmVfa2V5Pzogc3RyaW5nO1xuICAvKipcbiAgICog5peg5pWI5pe26Lez6L2s6Iez55m75b2V6aG177yM6buY6K6k77yaYHRydWVg77yM5YyF5ous77yaXG4gICAqIC0g5peg5pWIdG9rZW7lgLxcbiAgICogLSB0b2tlbuW3sui/h+acn++8iOmZkEpXVO+8iVxuICAgKi9cbiAgdG9rZW5faW52YWxpZF9yZWRpcmVjdD86IGJvb2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7vvIzpu5jorqTvvJpgX2FsbG93X2Fub255bW91c2BcbiAgICovXG4gIGFsbG93X2Fub255bW91c19rZXk/OiBzdHJpbmc7XG4gIC8qKlxuICAgKiDliLfmlrDpl7TpmpTml7bplb/vvIjljZXkvY3vvJptc++8ie+8jOm7mOiupO+8mmAzMDAwYFxuICAgKi9cbiAgcmVmcmVzaFRpbWU/OiBudW1iZXI7XG4gIC8qKlxuICAgKiDov4fmnJ/orqHnrpflgY/np7vlgLzvvIjljZXkvY3vvJptc++8ie+8jOm7mOiupO+8mmA2MDAwYFxuICAgKiAtICoq5bu66K6uKirmoLnmja4gYHJlZnJlc2hUaW1lYCDlgI3mlbDmnaXorr7nva5cbiAgICovXG4gIHJlZnJlc2hPZmZzZXQ/OiBudW1iZXI7XG59XG4iXX0=
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC50eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9jb25maWcvYXV0aC9hdXRoLnR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgWXVuemFpQXV0aENvbmZpZyB7XG4gIC8qKlxuICAgKiDmmK/lkKboh6rliqjlrozmiJDorqTor4HmtYHnqItcbiAgICovXG4gIGF1dG8/OiBib29sZWFuO1xuICAvKipcbiAgICog5a2Y5YKoS0VZ5YC877yM6buY6K6k77yaYF90b2tlbmBcbiAgICovXG4gIHN0b3JlX2tleT86IHN0cmluZztcbiAgLyoqXG4gICAqIOaXoOaViOaXtui3s+i9rOiHs+eZu+W9lemhte+8jOm7mOiupO+8mmB0cnVlYO+8jOWMheaLrO+8mlxuICAgKiAtIOaXoOaViHRva2Vu5YC8XG4gICAqIC0gdG9rZW7lt7Lov4fmnJ/vvIjpmZBKV1TvvIlcbi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OS4reW4puacieivpUtFWeihqOekuuW/veeVpVRPS0VO77yM6buY6K6k77yaYF9hbGxvd19hbm9ueW1vdXNgXG4gICAqL1xuICBhbGxvd19hbm9ueW1vdXNfa2V5Pzogc3RyaW5nO1xuICAvKipcbiAgICog5Yi35paw6Ze06ZqU5pe26ZW/77yI5Y2V5L2N77yabXPvvInvvIzpu5jorqTvvJpgMzAwMGBcbiAgICovXG4gIHJlZnJlc2hUaW1lPzogbnVtYmVyO1xuICAvKipcbiAgICog6L+H5pyf6K6h566X5YGP56e75YC877yI5Y2V5L2N77yabXPvvInvvIzpu5jorqTvvJpgNjAwMGBcbiAgICogLSAqKuW7uuiurioq5qC55o2uIGByZWZyZXNoVGltZWAg5YCN5pWw5p2l6K6+572uXG4gICAqL1xuICByZWZyZXNoT2Zmc2V0PzogbnVtYmVyO1xufVxuIl19
@@ -1,4 +1,5 @@
1
1
  export * from './http.type';
2
2
  export * from './responsive.type';
3
3
  export * from './i18n.type';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2NvbmZpZy90aGVtZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsYUFBYSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9odHRwLnR5cGUnO1xuZXhwb3J0ICogZnJvbSAnLi9yZXNwb25zaXZlLnR5cGUnO1xuZXhwb3J0ICogZnJvbSAnLi9pMThuLnR5cGUnO1xuIl19
4
+ export * from './pipe.type';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2NvbmZpZy90aGVtZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsYUFBYSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9odHRwLnR5cGUnO1xuZXhwb3J0ICogZnJvbSAnLi9yZXNwb25zaXZlLnR5cGUnO1xuZXhwb3J0ICogZnJvbSAnLi9pMThuLnR5cGUnO1xuZXhwb3J0ICogZnJvbSAnLi9waXBlLnR5cGUnO1xuIl19
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlwZS50eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9jb25maWcvdGhlbWUvcGlwZS50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFl1bnphaVRoZW1lUGlwZUNvbmZpZyB7XG4gIGRhdGVGb3JtYXQ/OiBzdHJpbmc7XG59XG4iXX0=
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlwZS50eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9jb25maWcvdGhlbWUvcGlwZS50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFl1bnphaVRoZW1lUGlwZUNvbmZpZyB7XG4gIGRhdGVGb3JtYXQ/OiBzdHJpbmc7XG4gIGRhdGVGb3JtYXRDdXN0b20/OiBZdW56YWlUaGVtZVBpcGVEYXRlRm9ybWF0Q3VzdG9tO1xufVxuXG5leHBvcnQgdHlwZSBZdW56YWlUaGVtZVBpcGVEYXRlRm9ybWF0Q3VzdG9tID0gKFxuICB2YWx1ZTogRGF0ZSxcbiAgZm9ybWF0U3RyaW5nPzogc3RyaW5nIHwgbnVsbCxcbiAgb3B0aW9ucz86IHsgbG9jYWxlPzogTG9jYWxlIH1cbikgPT4gc3RyaW5nO1xuIl19
@@ -91,11 +91,13 @@ export function toDate(value, options) {
91
91
  * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format
92
92
  * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`
93
93
  */
94
- export function formatDate(value, formatString, dateLocale) {
94
+ export function formatDate(value, formatString, options) {
95
95
  value = toDate(value);
96
96
  if (isNaN(value))
97
97
  return '';
98
- const langOpt = { locale: dateLocale };
99
- return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);
98
+ const langOpt = { locale: options?.locale };
99
+ return formatString === 'fn'
100
+ ? formatDistanceToNow(value, langOpt)
101
+ : (options?.customFormat ?? format)(value, formatString, langOpt);
100
102
  }
101
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvZGF0ZS10aW1lL3RpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLE9BQU8sRUFDUCxRQUFRLEVBQ1IsVUFBVSxFQUNWLFNBQVMsRUFDVCxTQUFTLEVBQ1QsS0FBSyxFQUNMLFFBQV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RvbUZvcm1hdCA/PyBmb3JtYXQpKHZhbHVlLCBmb3JtYXRTdHJpbmcsIGxhbmdPcHQpO1xufVxuIl19
@@ -5,6 +5,7 @@ export const YZ_HEADER_KEY = '_yz_header';
5
5
  export const YZ_HEADER_TYPE_KEY = '_yz_header_type';
6
6
  export const YZ_DEFAULT_ROUTE_KEY = '_yz_default_route';
7
7
  export const YZ_TENANT_KEY = '_yz_tenant';
8
+ export const YZ_NEED_AUTH_KEY = '_yz_need_auth';
8
9
  // export const YZ_LANGS_KEY = '_yz_langs';
9
10
  // export const YZ_LANG_KEY = '_yz_lang';
10
11
  function get(key) {
@@ -56,4 +57,4 @@ export function useLocalStorageTenant() {
56
57
  const getFn = () => get(YZ_TENANT_KEY);
57
58
  return [setFn, getFn];
58
59
  }
59
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxTdG9yYWdlVXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL21jYWNoZS9sb2NhbFN0b3JhZ2VVdGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUcsVUFBVSxDQUFDO0FBQ3RDLE1BQU0sQ0FBQyxNQUFNLG1CQUFtQixHQUFHLGtCQUFrQixDQUFDO0FBQ3RELE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRyxhQUFhLENBQUM7QUFDNUMsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHLFlBQVksQ0FBQztBQUMxQyxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyxpQkFBaUIsQ0FBQztBQUNwRCxNQUFNLENBQUMsTUFBTSxvQkFBb0IsR0FBRyxtQkFBbUIsQ0FBQztBQUN4RCxNQUFNLENBQUMsTUFBTSxhQUFhLEdBQUcsWUFBWSxDQUFDO0FBQzFDLD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T4gPSAoKSA9PiBnZXQ8WXVuemFpTmF2VG9waWNbXT4oWVpfSEVBREVSX0tFWSk7XG4gIHJldHVybiBbc2V0Rm4sIGdldEZuXTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVzZUxvY2FsU3RvcmFnZURlZmF1bHRSb3V0ZSgpOiBbcmV0dXJuU2V0PHN0cmluZz4sIHJldHVybkdldDxzdHJpbmc+XSB7XG4gIGNvbnN0IHNldEZuOiByZXR1cm5TZXQ8c3RyaW5nPiA9IGRhdGEgPT4gc2V0KFlaX0RFRkFVTFRfUk9VVEVfS0VZLCBkYXRhKTtcbiAgY29uc3QgZ2V0Rm46IHJldHVybkdldDxzdHJpbmc+ID0gKCkgPT4gZ2V0PHN0cmluZz4oWVpfREVGQVVMVF9ST1VURV9LRVkpO1xuICByZXR1cm4gW3NldEZuLCBnZXRGbl07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VMb2NhbFN0b3JhZ2VUZW5hbnQoKTogW3JldHVyblNldDxzdHJpbmc+LCByZXR1cm5HZXQ8c3RyaW5nPl0ge1xuICBjb25zdCBzZXRGbjogcmV0dXJuU2V0PHN0cmluZz4gPSBkYXRhID0+IHNldChZWl9URU5BTlRfS0VZLCBkYXRhKTtcbiAgY29uc3QgZ2V0Rm46IHJldHVybkdldDxzdHJpbmc+ID0gKCkgPT4gZ2V0PHN0cmluZz4oWVpfVEVOQU5UX0tFWSk7XG4gIHJldHVybiBbc2V0Rm4sIGdldEZuXTtcbn1cbiJdfQ==
@@ -92,12 +92,14 @@ function toDate(value, options) {
92
92
  * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format
93
93
  * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`
94
94
  */
95
- function formatDate(value, formatString, dateLocale) {
95
+ function formatDate(value, formatString, options) {
96
96
  value = toDate(value);
97
97
  if (isNaN(value))
98
98
  return '';
99
- const langOpt = { locale: dateLocale };
100
- return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);
99
+ const langOpt = { locale: options?.locale };
100
+ return formatString === 'fn'
101
+ ? formatDistanceToNow(value, langOpt)
102
+ : (options?.customFormat ?? format)(value, formatString, langOpt);
101
103
  }
102
104
 
103
105
  // TODO: timezone process
@@ -1 +1 @@
1
- {"version":3,"file":"date-time.mjs","sources":["../../../../packages/util/date-time/time.ts","../../../../packages/util/date-time/picker.ts","../../../../packages/util/date-time/date-time.ts"],"sourcesContent":["import {\n addDays,\n endOfDay,\n endOfMonth,\n endOfWeek,\n endOfYear,\n parse,\n parseISO,\n startOfDay,\n startOfMonth,\n startOfWeek,\n startOfYear,\n subMonths,\n subWeeks,\n subYears,\n format,\n formatDistanceToNow\n} from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { DateLocale } from 'ng-zorro-antd/i18n';\n\n/**\n * Get the time range, return `[ Date, Date]` for the start and end dates\n *\n * 获取时间范围\n *\n * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数\n * @param time 开始时间\n * @param ignoreMaxTime 忽略追加结束日期的最大时间值\n */\nexport function getTimeDistance(\n type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number,\n time?: Date | string | number,\n options?: { ignoreMaxTime?: boolean }\n): [Date, Date] {\n time = time\n ? typeof time === 'string'\n ? parse(time, 'yyyy-MM-dd HH:mm:ss', new Date())\n : new Date(time)\n : new Date();\n const opt: { weekStartsOn: 1 } = { weekStartsOn: 1 };\n\n let res: [Date, Date];\n switch (type) {\n case 'today':\n res = [time, time];\n break;\n case '-today':\n res = [addDays(time, -1), time];\n break;\n case 'yesterday':\n res = [addDays(time, -1), addDays(time, -1)];\n break;\n case 'week':\n res = [startOfWeek(time, opt), endOfWeek(time, opt)];\n break;\n case '-week':\n res = [startOfWeek(subWeeks(time, 1), opt), endOfWeek(subWeeks(time, 1), opt)];\n break;\n case 'month':\n res = [startOfMonth(time), endOfMonth(time)];\n break;\n case '-month':\n res = [startOfMonth(subMonths(time, 1)), endOfMonth(subMonths(time, 1))];\n break;\n case 'year':\n res = [startOfYear(time), endOfYear(time)];\n break;\n case '-year':\n res = [startOfYear(subYears(time, 1)), endOfYear(subYears(time, 1))];\n break;\n default:\n res = type > 0 ? [time, addDays(time, type)] : [addDays(time, type), time];\n break;\n }\n return options?.ignoreMaxTime ? res : fixEndTimeOfRange(res);\n}\n\n/**\n * fix time is the most, big value\n */\nexport function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date] {\n return [startOfDay(dates[0]), endOfDay(dates[1])];\n}\n\nexport interface ToDateOptions {\n /** If parsing fails try to parse the date by pressing `formatString` */\n formatString?: string;\n /** If parsing fails returned default value, default: `new Date(NaN)` */\n defaultValue?: NzSafeAny;\n timestampSecond?: boolean;\n}\n\n/**\n * Convert to `Date` format\n *\n * @param value When is a number, it's treated as a timestamp; If it's seconds, you need to provide the `options.timestampSecond` parameter.\n */\nexport function toDate(value?: Date | string | number | null, options?: string | ToDateOptions): Date {\n const { formatString, defaultValue, timestampSecond } = {\n formatString: 'yyyy-MM-dd HH:mm:ss',\n defaultValue: new Date(NaN),\n timestampSecond: false,\n ...(typeof options === 'string' ? { formatString: options } : options)\n };\n if (value == null) {\n return defaultValue;\n }\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'number' || (typeof value === 'string' && /^[0-9]+$/.test(value))) {\n const valueNumber = +value;\n return new Date(timestampSecond ? valueNumber * 1000 : valueNumber);\n }\n let tryDate = parseISO(value);\n if (isNaN(tryDate as NzSafeAny)) {\n tryDate = parse(value, formatString!, new Date());\n }\n\n return isNaN(tryDate as NzSafeAny) ? defaultValue : tryDate;\n}\n\n/**\n * Format date, supports `Date, number, string` types\n *\n * @param value When is a number, it is treated as a timestamp (Support seconds and milliseconds timestamp).\n * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format\n * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`\n */\nexport function formatDate(value: Date | string | number, formatString: string, dateLocale?: DateLocale): string {\n value = toDate(value);\n if (isNaN(value as NzSafeAny)) return '';\n\n const langOpt = { locale: dateLocale };\n return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);\n}\n","import { addDays, addSeconds, differenceInCalendarDays, format } from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { DisabledDateFn, DisabledTimeConfig, DisabledTimeFn } from 'ng-zorro-antd/date-picker';\n\n// TODO: timezone process\nexport class DateTimePickerUtil {\n /**\n * Current local time\n *\n * 当前本地时间\n */\n get now(): Date {\n return new Date();\n }\n /**\n * Current local date (not including time part)\n *\n * 当前本地日期(不包含时间部分)\n */\n get date(): Date {\n return this.removeTime(this.now);\n }\n /**\n * Remove the time part of the date\n *\n * 移除日期的时间部分\n */\n removeTime(d: Date): Date {\n return new Date(d.toDateString());\n }\n /**\n * Format date-time\n *\n * 格式化日期\n */\n format(d: number | Date, formatString: string = 'yyyy-MM-dd HH:mm:ss'): string {\n return format(d, formatString);\n }\n private genTick(count: number): number[] {\n return new Array(count).fill(0).map((_, idx) => idx);\n }\n /**\n * Calculate the number of days between two dates, `0` means the same day\n *\n * 计算两个日期相差天数,`0` 表示同一天\n */\n getDiffDays(dateLeft: Date | number, dateRight?: Date | number): number {\n return differenceInCalendarDays(\n dateLeft,\n typeof dateRight === 'number' ? addDays(this.date, dateRight) : dateRight || this.date\n );\n }\n /**\n * Disabled Before date (Default: today), Generally serves `nzDisabledDate`\n *\n * 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`\n */\n disabledBeforeDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n return (d): boolean => this.getDiffDays(d, options?.offsetDays) < 0;\n }\n /**\n * Disabled After date (Default: today), Generally serves `nzDisabledDate`\n *\n * 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`\n */\n disabledAfterDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n return (d): boolean => this.getDiffDays(d, options?.offsetDays) > 0;\n }\n private baseDisabledTime(type: 'before' | 'after', offsetSeconds?: number): DisabledTimeFn {\n const tick24 = this.genTick(24);\n const tick60 = this.genTick(60);\n return (current): DisabledTimeConfig => {\n const cur = current as Date;\n if (cur == null) {\n return {} as NzSafeAny;\n }\n const now = addSeconds(this.now, offsetSeconds || 0);\n const nowHours = now.getHours();\n const nowMinutes = now.getMinutes();\n const curHours = cur.getHours();\n const isToday = this.getDiffDays(this.removeTime(cur)) === 0;\n return {\n nzDisabledHours: () => {\n if (!isToday) return [];\n return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);\n },\n nzDisabledMinutes: () => {\n if (isToday && curHours === nowHours) {\n return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);\n }\n return [];\n },\n nzDisabledSeconds: () => {\n if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {\n const nowSeconds = now.getSeconds();\n return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);\n }\n return [];\n }\n };\n };\n }\n /**\n * Disabled Before time (Default: now), Generally serves `nzDisabledTime`\n *\n * 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`\n */\n disabledBeforeTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n return this.baseDisabledTime('before', options?.offsetSeconds);\n }\n /**\n * Disabled After time (Default: now), Generally serves `nzDisabledTime`\n *\n * 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`\n */\n disabledAfterTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n return this.baseDisabledTime('after', options?.offsetSeconds);\n }\n}\n\nexport const dateTimePickerUtil = new DateTimePickerUtil();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAsBA;;;;;;;;AAQG;SACa,eAAe,CAC7B,IAA0G,EAC1G,IAA6B,EAC7B,OAAqC,EAAA;AA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AACD,oBAAA,OAAO,EAAE,CAAC;iBACX;gBACD,iBAAiB,EAAE,MAAK;AACtB,oBAAA,IAAI,OAAO,IAAI,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,EAAE,KAAK,UAAU,EAAE;AACvE,wBAAA,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;wBACpC,OAAO,IAAI,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;qBACvF;AACD,oBAAA,OAAO,EAAE,CAAC;iBACX;aACF,CAAC;AACJ,SAAC,CAAC;KACH;AACD;;;;AAIG;AACH,IAAA,kBAAkB,CAAC,OAAoC,EAAA;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAChE;AACD;;;;AAIG;AACH,IAAA,iBAAiB,CAAC,OAAoC,EAAA;QACpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAC/D;AACF,CAAA;AAEY,MAAA,kBAAkB,GAAG,IAAI,kBAAkB;;ACzHxD;;AAEG;;;;"}
1
+ {"version":3,"file":"date-time.mjs","sources":["../../../../packages/util/date-time/time.ts","../../../../packages/util/date-time/picker.ts","../../../../packages/util/date-time/date-time.ts"],"sourcesContent":["import {\n addDays,\n endOfDay,\n endOfMonth,\n endOfWeek,\n endOfYear,\n parse,\n parseISO,\n startOfDay,\n startOfMonth,\n startOfWeek,\n startOfYear,\n subMonths,\n subWeeks,\n subYears,\n format,\n formatDistanceToNow\n} from 'date-fns';\n\nimport type { YunzaiThemePipeDateFormatCustom } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { DateLocale } from 'ng-zorro-antd/i18n';\n\n/**\n * Get the time range, return `[ Date, Date]` for the start and end dates\n *\n * 获取时间范围\n *\n * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数\n * @param time 开始时间\n * @param ignoreMaxTime 忽略追加结束日期的最大时间值\n */\nexport function getTimeDistance(\n type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number,\n time?: Date | string | number,\n options?: { ignoreMaxTime?: boolean }\n): [Date, Date] {\n time = time\n ? typeof time === 'string'\n ? parse(time, 'yyyy-MM-dd HH:mm:ss', new Date())\n : new Date(time)\n : new Date();\n const opt: { weekStartsOn: 1 } = { weekStartsOn: 1 };\n\n let res: [Date, Date];\n switch (type) {\n case 'today':\n res = [time, time];\n break;\n case '-today':\n res = [addDays(time, -1), time];\n break;\n case 'yesterday':\n res = [addDays(time, -1), addDays(time, -1)];\n break;\n case 'week':\n res = [startOfWeek(time, opt), endOfWeek(time, opt)];\n break;\n case '-week':\n res = [startOfWeek(subWeeks(time, 1), opt), endOfWeek(subWeeks(time, 1), opt)];\n break;\n case 'month':\n res = [startOfMonth(time), endOfMonth(time)];\n break;\n case '-month':\n res = [startOfMonth(subMonths(time, 1)), endOfMonth(subMonths(time, 1))];\n break;\n case 'year':\n res = [startOfYear(time), endOfYear(time)];\n break;\n case '-year':\n res = [startOfYear(subYears(time, 1)), endOfYear(subYears(time, 1))];\n break;\n default:\n res = type > 0 ? [time, addDays(time, type)] : [addDays(time, type), time];\n break;\n }\n return options?.ignoreMaxTime ? res : fixEndTimeOfRange(res);\n}\n\n/**\n * fix time is the most, big value\n */\nexport function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date] {\n return [startOfDay(dates[0]), endOfDay(dates[1])];\n}\n\nexport interface ToDateOptions {\n /** If parsing fails try to parse the date by pressing `formatString` */\n formatString?: string;\n /** If parsing fails returned default value, default: `new Date(NaN)` */\n defaultValue?: NzSafeAny;\n timestampSecond?: boolean;\n}\n\n/**\n * Convert to `Date` format\n *\n * @param value When is a number, it's treated as a timestamp; If it's seconds, you need to provide the `options.timestampSecond` parameter.\n */\nexport function toDate(value?: Date | string | number | null, options?: string | ToDateOptions): Date {\n const { formatString, defaultValue, timestampSecond } = {\n formatString: 'yyyy-MM-dd HH:mm:ss',\n defaultValue: new Date(NaN),\n timestampSecond: false,\n ...(typeof options === 'string' ? { formatString: options } : options)\n };\n if (value == null) {\n return defaultValue;\n }\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'number' || (typeof value === 'string' && /^[0-9]+$/.test(value))) {\n const valueNumber = +value;\n return new Date(timestampSecond ? valueNumber * 1000 : valueNumber);\n }\n let tryDate = parseISO(value);\n if (isNaN(tryDate as NzSafeAny)) {\n tryDate = parse(value, formatString!, new Date());\n }\n\n return isNaN(tryDate as NzSafeAny) ? defaultValue : tryDate;\n}\n\n/**\n * Format date, supports `Date, number, string` types\n *\n * @param value When is a number, it is treated as a timestamp (Support seconds and milliseconds timestamp).\n * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format\n * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`\n */\nexport function formatDate(\n value: Date | string | number,\n formatString: string,\n options?: { locale?: DateLocale; customFormat?: YunzaiThemePipeDateFormatCustom }\n): string {\n value = toDate(value);\n if (isNaN(value as NzSafeAny)) return '';\n\n const langOpt = { locale: options?.locale };\n return formatString === 'fn'\n ? formatDistanceToNow(value, langOpt)\n : (options?.customFormat ?? format)(value, formatString, langOpt);\n}\n","import { addDays, addSeconds, differenceInCalendarDays, format } from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { DisabledDateFn, DisabledTimeConfig, DisabledTimeFn } from 'ng-zorro-antd/date-picker';\n\n// TODO: timezone process\nexport class DateTimePickerUtil {\n /**\n * Current local time\n *\n * 当前本地时间\n */\n get now(): Date {\n return new Date();\n }\n /**\n * Current local date (not including time part)\n *\n * 当前本地日期(不包含时间部分)\n */\n get date(): Date {\n return this.removeTime(this.now);\n }\n /**\n * Remove the time part of the date\n *\n * 移除日期的时间部分\n */\n removeTime(d: Date): Date {\n return new Date(d.toDateString());\n }\n /**\n * Format date-time\n *\n * 格式化日期\n */\n format(d: number | Date, formatString: string = 'yyyy-MM-dd HH:mm:ss'): string {\n return format(d, formatString);\n }\n private genTick(count: number): number[] {\n return new Array(count).fill(0).map((_, idx) => idx);\n }\n /**\n * Calculate the number of days between two dates, `0` means the same day\n *\n * 计算两个日期相差天数,`0` 表示同一天\n */\n getDiffDays(dateLeft: Date | number, dateRight?: Date | number): number {\n return differenceInCalendarDays(\n dateLeft,\n typeof dateRight === 'number' ? addDays(this.date, dateRight) : dateRight || this.date\n );\n }\n /**\n * Disabled Before date (Default: today), Generally serves `nzDisabledDate`\n *\n * 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`\n */\n disabledBeforeDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n return (d): boolean => this.getDiffDays(d, options?.offsetDays) < 0;\n }\n /**\n * Disabled After date (Default: today), Generally serves `nzDisabledDate`\n *\n * 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`\n */\n disabledAfterDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n return (d): boolean => this.getDiffDays(d, options?.offsetDays) > 0;\n }\n private baseDisabledTime(type: 'before' | 'after', offsetSeconds?: number): DisabledTimeFn {\n const tick24 = this.genTick(24);\n const tick60 = this.genTick(60);\n return (current): DisabledTimeConfig => {\n const cur = current as Date;\n if (cur == null) {\n return {} as NzSafeAny;\n }\n const now = addSeconds(this.now, offsetSeconds || 0);\n const nowHours = now.getHours();\n const nowMinutes = now.getMinutes();\n const curHours = cur.getHours();\n const isToday = this.getDiffDays(this.removeTime(cur)) === 0;\n return {\n nzDisabledHours: () => {\n if (!isToday) return [];\n return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);\n },\n nzDisabledMinutes: () => {\n if (isToday && curHours === nowHours) {\n return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);\n }\n return [];\n },\n nzDisabledSeconds: () => {\n if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {\n const nowSeconds = now.getSeconds();\n return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);\n }\n return [];\n }\n };\n };\n }\n /**\n * Disabled Before time (Default: now), Generally serves `nzDisabledTime`\n *\n * 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`\n */\n disabledBeforeTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n return this.baseDisabledTime('before', options?.offsetSeconds);\n }\n /**\n * Disabled After time (Default: now), Generally serves `nzDisabledTime`\n *\n * 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`\n */\n disabledAfterTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n return this.baseDisabledTime('after', options?.offsetSeconds);\n }\n}\n\nexport const dateTimePickerUtil = new DateTimePickerUtil();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAuBA;;;;;;;;AAQG;SACa,eAAe,CAC7B,IAA0G,EAC1G,IAA6B,EAC7B,OAAqC,EAAA;AAErC,IAAA,IAAI,GAAG,IAAI;AACT,UAAE,OAAO,IAAI,KAAK,QAAQ;cACtB,KAAK,CAAC,IAAI,EAAE,qBAAqB,EAAE,IAAI,IAAI,EAAE,CAAC;AAChD,cAAE,IAAI,IAAI,CAAC,IAAI,CAAC;AAClB,UAAE,IAAI,IAAI,EAAE,CAAC;AACf,IAAA,MAAM,GAAG,GAAwB,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;AAErD,IAAA,IAAI,GAAiB,CAAC;IACtB,QAAQ,IAAI;AACV,QAAA,KAAK,OAAO;AACV,YAAA,GAAG,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnB,MAAM;AACR,QAAA,KAAK,QAAQ;AACX,YAAA,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,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AkB,CAAC,OAAoC,EAAA;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAChE;AACD;;;;AAIG;AACH,IAAA,iBAAiB,CAAC,OAAoC,EAAA;QACpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAC/D;AACF,CAAA;AAEY,MAAA,kBAAkB,GAAG,IAAI,kBAAkB;;ACzHxD;;AAEG;;;;"}
@@ -5,6 +5,7 @@ const YZ_HEADER_KEY = '_yz_header';
5
5
  const YZ_HEADER_TYPE_KEY = '_yz_header_type';
6
6
  const YZ_DEFAULT_ROUTE_KEY = '_yz_default_route';
7
7
  const YZ_TENANT_KEY = '_yz_tenant';
8
+ const YZ_NEED_AUTH_KEY = '_yz_need_auth';
8
9
  // export const YZ_LANGS_KEY = '_yz_langs';
9
10
  // export const YZ_LANG_KEY = '_yz_lang';
10
11
  function get(key) {
@@ -61,5 +62,5 @@ function useLocalStorageTenant() {
61
62
  * Generated bundle index. Do not edit.
62
63
  */
63
64
 
64
- export { YZ_CURRENT_KEY, YZ_DEFAULT_ROUTE_KEY, YZ_HEADER_KEY, YZ_HEADER_TYPE_KEY, YZ_PROJECT_INFO_KEY, YZ_TENANT_KEY, YZ_USER_KEY, useLocalStorageCurrent, useLocalStorageDefaultRoute, useLocalStorageHeader, useLocalStorageHeaderType, useLocalStorageProjectInfo, useLocalStorageTenant, useLocalStorageUser };
65
+ export { YZ_CURRENT_KEY, YZ_DEFAULT_ROUTE_KEY, YZ_HEADER_KEY, YZ_HEADER_TYPE_KEY, YZ_NEED_AUTH_KEY, YZ_PROJECT_INFO_KEY, YZ_TENANT_KEY, YZ_USER_KEY, useLocalStorageCurrent, useLocalStorageDefaultRoute, useLocalStorageHeader, useLocalStorageHeaderType, useLocalStorageProjectInfo, useLocalStorageTenant, useLocalStorageUser };
65
66
  //# sourceMappingURL=mcache.mjs.map
@@ -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';\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,EA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AAK,EAAE,KAAK,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;;;;"}
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';\nexport const YZ_NEED_AUTH_KEY = '_yz_need_auth';\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;AACnC,MAAM,gBAAgB,GAAG,gBAAgB;AAChD;AACA;AAEA,SAAS,GAAG,CAAI,GAAW,EAAA;AACzB,IAAA,IAAI,GAAG,KAAK,kBAAkB,EAAE;AAC9B,QAAA,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,CAAc,CAAC;KAC/C;IACD,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG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AAuB,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;;ACzEA;;AAEG;;;;"}
@@ -6,6 +6,7 @@ export declare const YZ_HEADER_KEY = "_yz_header";
6
6
  export declare const YZ_HEADER_TYPE_KEY = "_yz_header_type";
7
7
  export declare const YZ_DEFAULT_ROUTE_KEY = "_yz_default_route";
8
8
  export declare const YZ_TENANT_KEY = "_yz_tenant";
9
+ export declare const YZ_NEED_AUTH_KEY = "_yz_need_auth";
9
10
  type returnSet<T> = (data: T) => void;
10
11
  type returnGet<T> = () => T | null;
11
12
  export declare function useLocalStorageUser(): [returnSet<YunzaiUser>, returnGet<YunzaiUser>];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yelon/util",
3
- "version": "18.0.1",
3
+ "version": "18.1.1",
4
4
  "author": "yunzai-bot<yunzai-bot@outlook.com>",
5
5
  "license": "MIT",
6
6
  "repository": {