@yelon/util 16.0.1 → 16.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/config/auth/auth.type.d.ts +2 -2
- package/esm2022/analysis/global-event.subject.mjs +3 -3
- package/esm2022/array/array.service.mjs +3 -3
- package/esm2022/browser/cookie.service.mjs +3 -3
- package/esm2022/browser/scroll.service.mjs +3 -3
- package/esm2022/config/auth/auth.type.mjs +1 -1
- package/esm2022/config/config.service.mjs +3 -3
- package/esm2022/format/currency.service.mjs +3 -3
- package/esm2022/index.mjs +3 -1
- package/esm2022/mcache/index.mjs +2 -0
- package/esm2022/mcache/localStorageUtils.mjs +62 -0
- package/esm2022/mcache/mcache.mjs +5 -0
- package/esm2022/mtypes/authority.type.mjs +2 -0
- package/esm2022/mtypes/header-menu.type.mjs +2 -0
- package/esm2022/mtypes/index.mjs +10 -0
- package/esm2022/mtypes/menu.type.mjs +2 -0
- package/esm2022/mtypes/mtypes.mjs +5 -0
- package/esm2022/mtypes/nav.types.mjs +7 -0
- package/esm2022/mtypes/page.mjs +42 -0
- package/esm2022/mtypes/project-info.types.mjs +2 -0
- package/esm2022/mtypes/response.mjs +2 -0
- package/esm2022/mtypes/role.type.mjs +2 -0
- package/esm2022/mtypes/user.types.mjs +2 -0
- package/esm2022/other/lazy.service.mjs +3 -3
- package/esm2022/other/path-to-regexp.service.mjs +3 -3
- package/esm2022/pipes/currency/cny.pipe.mjs +3 -3
- package/esm2022/pipes/currency/mega.pipe.mjs +3 -3
- package/esm2022/pipes/currency/module.mjs +4 -4
- package/esm2022/pipes/currency/price.pipe.mjs +3 -3
- package/esm2022/pipes/filter/filter.pipe.mjs +3 -3
- package/esm2022/pipes/filter/module.mjs +4 -4
- package/esm2022/pipes/format/mask.pipe.mjs +3 -3
- package/esm2022/pipes/format/module.mjs +4 -4
- package/fesm2022/analysis.mjs +3 -3
- package/fesm2022/array.mjs +3 -3
- package/fesm2022/browser.mjs +6 -6
- package/fesm2022/config.mjs +3 -3
- package/fesm2022/format.mjs +3 -3
- package/fesm2022/mcache.mjs +68 -0
- package/fesm2022/mcache.mjs.map +1 -0
- package/fesm2022/mtypes.mjs +55 -0
- package/fesm2022/mtypes.mjs.map +1 -0
- package/fesm2022/other.mjs +6 -6
- package/fesm2022/pipe-currency.mjs +13 -13
- package/fesm2022/pipe-filter.mjs +7 -7
- package/fesm2022/pipe-format.mjs +7 -7
- package/fesm2022/yelon-util.mjs +2 -0
- package/fesm2022/yelon-util.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/mcache/index.d.ts +1 -0
- package/mcache/localStorageUtils.d.ts +28 -0
- package/mtypes/authority.type.d.ts +3 -0
- package/mtypes/header-menu.type.d.ts +12 -0
- package/mtypes/index.d.ts +9 -0
- package/mtypes/menu.type.d.ts +40 -0
- package/mtypes/nav.types.d.ts +30 -0
- package/mtypes/page.d.ts +46 -0
- package/mtypes/project-info.types.d.ts +21 -0
- package/mtypes/response.d.ts +7 -0
- package/mtypes/role.type.d.ts +10 -0
- package/mtypes/user.types.d.ts +22 -0
- package/package.json +23 -11
package/fesm2022/config.mjs
CHANGED
@@ -33,10 +33,10 @@ class YunzaiConfigService {
|
|
33
33
|
set(componentName, value) {
|
34
34
|
this.config[componentName] = { ...this.config[componentName], ...value };
|
35
35
|
}
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
37
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: YunzaiConfigService, deps: [{ token: YUNZAI_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: YunzaiConfigService, providedIn: 'root' }); }
|
38
38
|
}
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: YunzaiConfigService, decorators: [{
|
40
40
|
type: Injectable,
|
41
41
|
args: [{ providedIn: 'root' }]
|
42
42
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
package/fesm2022/format.mjs
CHANGED
@@ -409,10 +409,10 @@ class CurrencyService {
|
|
409
409
|
: integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));
|
410
410
|
return ret;
|
411
411
|
}
|
412
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
413
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyService, deps: [{ token: i1.YunzaiConfigService }, { token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
413
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
|
414
414
|
}
|
415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyService, decorators: [{
|
416
416
|
type: Injectable,
|
417
417
|
args: [{ providedIn: 'root' }]
|
418
418
|
}], ctorParameters: function () { return [{ type: i1.YunzaiConfigService }, { type: undefined, decorators: [{
|
@@ -0,0 +1,68 @@
|
|
1
|
+
const YZ_USER_KEY = '_yz_user';
|
2
|
+
const YZ_PROJECT_INFO_KEY = '_yz_project_info';
|
3
|
+
const YZ_CURRENT_KEY = '_yz_current';
|
4
|
+
const YZ_HEADER_KEY = '_yz_header';
|
5
|
+
const YZ_HEADER_TYPE_KEY = '_yz_header_type';
|
6
|
+
const YZ_DEFAULT_ROUTE_KEY = '_yz_default_route';
|
7
|
+
const YZ_TENANT_KEY = '_yz_tenant';
|
8
|
+
const YZ_LANGS_KEY = '_yz_langs';
|
9
|
+
const YZ_LANG_KEY = '_yz_lang';
|
10
|
+
function get(key) {
|
11
|
+
const item = localStorage.getItem(key);
|
12
|
+
return item ? JSON.parse(item) : null;
|
13
|
+
}
|
14
|
+
function set(key, data) {
|
15
|
+
localStorage.setItem(key, JSON.stringify(data));
|
16
|
+
}
|
17
|
+
function useLocalStorageUser() {
|
18
|
+
const setFn = (user) => set(YZ_USER_KEY, user);
|
19
|
+
const getFn = () => get(YZ_USER_KEY);
|
20
|
+
return [setFn, getFn];
|
21
|
+
}
|
22
|
+
function useLocalStorageProjectInfo() {
|
23
|
+
const setFn = (data) => set(YZ_PROJECT_INFO_KEY, data);
|
24
|
+
const getFn = () => get(YZ_PROJECT_INFO_KEY);
|
25
|
+
return [setFn, getFn];
|
26
|
+
}
|
27
|
+
function useLocalStorageCurrent() {
|
28
|
+
const setFn = (data) => set(YZ_CURRENT_KEY, data);
|
29
|
+
const getFn = () => get(YZ_CURRENT_KEY);
|
30
|
+
return [setFn, getFn];
|
31
|
+
}
|
32
|
+
function useLocalStorageHeaderType() {
|
33
|
+
const setFn = (data) => set(YZ_HEADER_TYPE_KEY, data);
|
34
|
+
const getFn = () => get(YZ_HEADER_TYPE_KEY);
|
35
|
+
return [setFn, getFn];
|
36
|
+
}
|
37
|
+
function useLocalStorageHeader() {
|
38
|
+
const setFn = (data) => set(YZ_HEADER_KEY, data);
|
39
|
+
const getFn = () => get(YZ_HEADER_KEY);
|
40
|
+
return [setFn, getFn];
|
41
|
+
}
|
42
|
+
function useLocalStorageDefaultRoute() {
|
43
|
+
const setFn = (data) => set(YZ_DEFAULT_ROUTE_KEY, data);
|
44
|
+
const getFn = () => get(YZ_DEFAULT_ROUTE_KEY);
|
45
|
+
return [setFn, getFn];
|
46
|
+
}
|
47
|
+
function useLocalStorageTenant() {
|
48
|
+
const setFn = (data) => set(YZ_TENANT_KEY, data);
|
49
|
+
const getFn = () => get(YZ_TENANT_KEY);
|
50
|
+
return [setFn, getFn];
|
51
|
+
}
|
52
|
+
function useLocalStorageLangs() {
|
53
|
+
const setFn = (data) => set(YZ_LANGS_KEY, data);
|
54
|
+
const getFn = () => get(YZ_LANGS_KEY);
|
55
|
+
return [setFn, getFn];
|
56
|
+
}
|
57
|
+
function useLocalStorageLang() {
|
58
|
+
const setFn = (key, data) => set(`${YZ_LANG_KEY}_${key}`, data);
|
59
|
+
const getFn = (key) => get(`${YZ_LANG_KEY}_${key}`);
|
60
|
+
return [setFn, getFn];
|
61
|
+
}
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Generated bundle index. Do not edit.
|
65
|
+
*/
|
66
|
+
|
67
|
+
export { YZ_CURRENT_KEY, YZ_DEFAULT_ROUTE_KEY, YZ_HEADER_KEY, YZ_HEADER_TYPE_KEY, YZ_LANGS_KEY, YZ_LANG_KEY, YZ_PROJECT_INFO_KEY, YZ_TENANT_KEY, YZ_USER_KEY, useLocalStorageCurrent, useLocalStorageDefaultRoute, useLocalStorageHeader, useLocalStorageHeaderType, useLocalStorageLang, useLocalStorageLangs, useLocalStorageProjectInfo, useLocalStorageTenant, useLocalStorageUser };
|
68
|
+
//# sourceMappingURL=mcache.mjs.map
|
@@ -0,0 +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';\nexport const YZ_LANGS_KEY = '_yz_langs';\nexport const YZ_LANG_KEY = '_yz_lang';\n\nfunction get<T>(key: string): T | null {\n const item = localStorage.getItem(key);\n return item ? JSON.parse(item) : null;\n}\n\nfunction set<T>(key: string, data: T): void {\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\ninterface Y18NType {\n code: string;\n text: string;\n abbr: string;\n icon?: string;\n}\n\nexport function useLocalStorageLangs(): [returnSet<Y18NType[]>, returnGet<Y18NType[]>] {\n const setFn: returnSet<Y18NType[]> = (data) => set(YZ_LANGS_KEY, data);\n const getFn: returnGet<Y18NType[]> = () => get<Y18NType[]>(YZ_LANGS_KEY);\n return [setFn, getFn];\n}\n\nexport function useLocalStorageLang(): [(key: string, data: Record<string, unknown>) => void, (key: string) => Record<string, unknown> | null] {\n const setFn = (key: string, data: Record<string, unknown>) => set(`${YZ_LANG_KEY}_${key}`, data);\n const getFn = (key: string): Record<string, unknown> | null => get<Record<string, unknown>>(`${YZ_LANG_KEY}_${key}`);\n return [setFn, getFn];\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEO,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,YAAY,GAAG,YAAY;AACjC,MAAM,WAAW,GAAG,WAAW;AAEtC,SAAS,GAAG,CAAI,GAAW,EAAA;IACzB,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACvC,IAAA,OAAO,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACxC,CAAC;AAED,SAAS,GAAG,CAAI,GAAW,EAAE,IAAO,EAAA;AAClC,IAAA,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AAClD,CAAC;SAKe,mBAAmB,GAAA;AACjC,IAAA,MAAM,KAAK,GAA0B,CAAC,IAAI,KAAK,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACtE,MAAM,KAAK,GAA0B,MAAM,GAAG,CAAa,WAAW,CAAC,CAAC;AACxE,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,0BAA0B,GAAA;AACxC,IAAA,MAAM,KAAK,GAAiC,CAAC,IAAI,KAAK,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;IACrF,MAAM,KAAK,GAAiC,MAAM,GAAG,CAAoB,mBAAmB,CAAC,CAAC;AAC9F,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,sBAAsB,GAAA;AACpC,IAAA,MAAM,KAAK,GAAgC,CAAC,IAAI,KAAK,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IAC/E,MAAM,KAAK,GAAgC,MAAM,GAAG,CAAmB,cAAc,CAAC,CAAC;AACvF,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,yBAAyB,GAAA;AACvC,IAAA,MAAM,KAAK,GAAuB,CAAC,IAAI,KAAK,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC1E,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,CAAC,IAAI,KAAK,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC9E,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,CAAC,IAAI,KAAK,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IAC3E,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,CAAC,IAAI,KAAK,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACpE,MAAM,KAAK,GAAsB,MAAM,GAAG,CAAS,aAAa,CAAC,CAAC;AAClE,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SASe,oBAAoB,GAAA;AAClC,IAAA,MAAM,KAAK,GAA0B,CAAC,IAAI,KAAK,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACvE,MAAM,KAAK,GAA0B,MAAM,GAAG,CAAa,YAAY,CAAC,CAAC;AACzE,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC;SAEe,mBAAmB,GAAA;AACjC,IAAA,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,IAA6B,KAAK,GAAG,CAAC,CAAA,EAAG,WAAW,CAAI,CAAA,EAAA,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;AACjG,IAAA,MAAM,KAAK,GAAG,CAAC,GAAW,KAAqC,GAAG,CAA0B,GAAG,WAAW,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,CAAC,CAAC;AACrH,IAAA,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACxB;;ACnFA;;AAEG;;;;"}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
var NavType;
|
2
|
+
(function (NavType) {
|
3
|
+
NavType["APPLICATION"] = "application";
|
4
|
+
NavType["GROUP"] = "group";
|
5
|
+
NavType["TILE"] = "tile";
|
6
|
+
})(NavType || (NavType = {}));
|
7
|
+
|
8
|
+
const YUNZAI_PAGE = {
|
9
|
+
PAGE_NUM: 1,
|
10
|
+
PAGE_SIZE: 1000
|
11
|
+
};
|
12
|
+
class YunzaiPageBuilder {
|
13
|
+
constructor() {
|
14
|
+
this.page = {};
|
15
|
+
}
|
16
|
+
pageNum(pageNum) {
|
17
|
+
this.page.pageNum = pageNum;
|
18
|
+
return this;
|
19
|
+
}
|
20
|
+
pageSize(pageSize) {
|
21
|
+
this.page.pageSize = pageSize;
|
22
|
+
return this;
|
23
|
+
}
|
24
|
+
pageParam(param) {
|
25
|
+
this.page.pageParam = param;
|
26
|
+
return this;
|
27
|
+
}
|
28
|
+
default() {
|
29
|
+
this.page.pageNum = YUNZAI_PAGE.PAGE_NUM;
|
30
|
+
this.page.pageSize = YUNZAI_PAGE.PAGE_SIZE;
|
31
|
+
return this;
|
32
|
+
}
|
33
|
+
build() {
|
34
|
+
return this.page;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
class Page {
|
38
|
+
constructor(pageNum, pageSize, param) {
|
39
|
+
this.pageNum = 1;
|
40
|
+
this.pageSize = 30;
|
41
|
+
this.pageNum = pageNum;
|
42
|
+
this.pageSize = pageSize;
|
43
|
+
this.param = param;
|
44
|
+
}
|
45
|
+
static create() {
|
46
|
+
return new Page(1, 30);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Generated bundle index. Do not edit.
|
52
|
+
*/
|
53
|
+
|
54
|
+
export { NavType, Page, YunzaiPageBuilder };
|
55
|
+
//# sourceMappingURL=mtypes.mjs.map
|
@@ -0,0 +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 {Subject} from \"rxjs\";\nimport {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 destroy$: Subject<any>;\n}\n\nexport interface LayoutNavGroupState {\n topics: YunzaiNavTopic[];\n destroy$: Subject<any>;\n}\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 any | 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\n\nexport class Page<T> {\n\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"IAGY,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;;ACAD,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;MAGY,IAAI,CAAA;AAMf,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,CAAA;AACtB,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACxB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;KACnB;AAED,IAAA,OAAO,MAAM,GAAA;AACX,QAAA,OAAO,IAAI,IAAI,CAAI,CAAC,EAAE,EAAE,CAAC,CAAA;KAC1B;AAEF;;ACvFD;;AAEG;;;;"}
|
package/fesm2022/other.mjs
CHANGED
@@ -231,10 +231,10 @@ class LazyService {
|
|
231
231
|
resolve(item);
|
232
232
|
});
|
233
233
|
}
|
234
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
235
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: LazyService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
235
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: LazyService, providedIn: 'root' }); }
|
236
236
|
}
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: LazyService, decorators: [{
|
238
238
|
type: Injectable,
|
239
239
|
args: [{ providedIn: 'root' }]
|
240
240
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -539,10 +539,10 @@ class PathToRegexpService {
|
|
539
539
|
}
|
540
540
|
return this.stringToRegexp(/** @type {string} */ path, keys, options);
|
541
541
|
}
|
542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
543
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: PathToRegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
543
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: PathToRegexpService, providedIn: 'root' }); }
|
544
544
|
}
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: PathToRegexpService, decorators: [{
|
546
546
|
type: Injectable,
|
547
547
|
args: [{
|
548
548
|
providedIn: 'root'
|
@@ -17,10 +17,10 @@ class CurrencyMegaPipe {
|
|
17
17
|
const res = this.srv.mega(value, options);
|
18
18
|
return res.value + (this.isCN ? res.unitI18n : res.unit);
|
19
19
|
}
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
21
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyMegaPipe, deps: [{ token: i1.CurrencyService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
21
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: CurrencyMegaPipe, name: "mega" }); }
|
22
22
|
}
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
|
24
24
|
type: Pipe,
|
25
25
|
args: [{ name: 'mega' }]
|
26
26
|
}], ctorParameters: function () { return [{ type: i1.CurrencyService }, { type: undefined, decorators: [{
|
@@ -44,10 +44,10 @@ class CurrencyPricePipe {
|
|
44
44
|
transform(value, options) {
|
45
45
|
return this.srv.format(value, options);
|
46
46
|
}
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
48
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPricePipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
48
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPricePipe, name: "price" }); }
|
49
49
|
}
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPricePipe, decorators: [{
|
51
51
|
type: Pipe,
|
52
52
|
args: [{ name: 'price' }]
|
53
53
|
}], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
|
@@ -64,21 +64,21 @@ class CurrencyCNYPipe {
|
|
64
64
|
transform(value, options) {
|
65
65
|
return this.srv.cny(value, options);
|
66
66
|
}
|
67
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
68
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
67
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyCNYPipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
68
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: CurrencyCNYPipe, name: "cny" }); }
|
69
69
|
}
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
|
71
71
|
type: Pipe,
|
72
72
|
args: [{ name: 'cny' }]
|
73
73
|
}], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
|
74
74
|
|
75
75
|
const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];
|
76
76
|
class CurrencyPipeModule {
|
77
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
78
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
79
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
78
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPipeModule, declarations: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] }); }
|
79
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPipeModule }); }
|
80
80
|
}
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CurrencyPipeModule, decorators: [{
|
82
82
|
type: NgModule,
|
83
83
|
args: [{
|
84
84
|
declarations: PIPES,
|
package/fesm2022/pipe-filter.mjs
CHANGED
@@ -10,21 +10,21 @@ class FilterPipe {
|
|
10
10
|
transform(array, matcher, ...args) {
|
11
11
|
return array.filter(i => matcher(i, ...args));
|
12
12
|
}
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
14
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
14
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: FilterPipe, name: "filter" }); }
|
15
15
|
}
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FilterPipe, decorators: [{
|
17
17
|
type: Pipe,
|
18
18
|
args: [{ name: 'filter' }]
|
19
19
|
}] });
|
20
20
|
|
21
21
|
const PIPES = [FilterPipe];
|
22
22
|
class FilterPipeModule {
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
24
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
25
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
24
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: FilterPipeModule, declarations: [FilterPipe], exports: [FilterPipe] }); }
|
25
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FilterPipeModule }); }
|
26
26
|
}
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FilterPipeModule, decorators: [{
|
28
28
|
type: NgModule,
|
29
29
|
args: [{
|
30
30
|
declarations: PIPES,
|
package/fesm2022/pipe-format.mjs
CHANGED
@@ -25,21 +25,21 @@ class FormatMaskPipe {
|
|
25
25
|
transform(value, mask) {
|
26
26
|
return formatMask(value, mask);
|
27
27
|
}
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
29
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
29
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: FormatMaskPipe, name: "mask" }); }
|
30
30
|
}
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FormatMaskPipe, decorators: [{
|
32
32
|
type: Pipe,
|
33
33
|
args: [{ name: 'mask' }]
|
34
34
|
}] });
|
35
35
|
|
36
36
|
const PIPES = [FormatMaskPipe];
|
37
37
|
class FormatPipeModule {
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
39
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
40
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
39
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: FormatPipeModule, declarations: [FormatMaskPipe], exports: [FormatMaskPipe] }); }
|
40
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FormatPipeModule }); }
|
41
41
|
}
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: FormatPipeModule, decorators: [{
|
43
43
|
type: NgModule,
|
44
44
|
args: [{
|
45
45
|
declarations: PIPES,
|
package/fesm2022/yelon-util.mjs
CHANGED
@@ -10,6 +10,8 @@ export * from '@yelon/util/decorator';
|
|
10
10
|
export * from '@yelon/util/other';
|
11
11
|
export * from '@yelon/util/pipes';
|
12
12
|
export * from '@yelon/util/token';
|
13
|
+
export * from '@yelon/util/mtypes';
|
14
|
+
export * from '@yelon/util/mcache';
|
13
15
|
|
14
16
|
/**
|
15
17
|
* Generated bundle index. Do not edit.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"yelon-util.mjs","sources":["../../../../packages/util/yelon-util.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"yelon-util.mjs","sources":["../../../../packages/util/yelon-util.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEG"}
|
package/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./localStorageUtils";
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { LayoutBasicAside, NavType, YunzaiNavTopic, YunzaiProjectInfo, YunzaiUser } from "@yelon/util/mtypes";
|
2
|
+
export declare const YZ_USER_KEY = "_yz_user";
|
3
|
+
export declare const YZ_PROJECT_INFO_KEY = "_yz_project_info";
|
4
|
+
export declare const YZ_CURRENT_KEY = "_yz_current";
|
5
|
+
export declare const YZ_HEADER_KEY = "_yz_header";
|
6
|
+
export declare const YZ_HEADER_TYPE_KEY = "_yz_header_type";
|
7
|
+
export declare const YZ_DEFAULT_ROUTE_KEY = "_yz_default_route";
|
8
|
+
export declare const YZ_TENANT_KEY = "_yz_tenant";
|
9
|
+
export declare const YZ_LANGS_KEY = "_yz_langs";
|
10
|
+
export declare const YZ_LANG_KEY = "_yz_lang";
|
11
|
+
type returnSet<T> = (data: T) => void;
|
12
|
+
type returnGet<T> = () => T | null;
|
13
|
+
export declare function useLocalStorageUser(): [returnSet<YunzaiUser>, returnGet<YunzaiUser>];
|
14
|
+
export declare function useLocalStorageProjectInfo(): [returnSet<YunzaiProjectInfo>, returnGet<YunzaiProjectInfo>];
|
15
|
+
export declare function useLocalStorageCurrent(): [returnSet<LayoutBasicAside>, returnGet<LayoutBasicAside>];
|
16
|
+
export declare function useLocalStorageHeaderType(): [returnSet<NavType>, returnGet<NavType>];
|
17
|
+
export declare function useLocalStorageHeader(): [returnSet<YunzaiNavTopic[]>, returnGet<YunzaiNavTopic[]>];
|
18
|
+
export declare function useLocalStorageDefaultRoute(): [returnSet<string>, returnGet<string>];
|
19
|
+
export declare function useLocalStorageTenant(): [returnSet<string>, returnGet<string>];
|
20
|
+
interface Y18NType {
|
21
|
+
code: string;
|
22
|
+
text: string;
|
23
|
+
abbr: string;
|
24
|
+
icon?: string;
|
25
|
+
}
|
26
|
+
export declare function useLocalStorageLangs(): [returnSet<Y18NType[]>, returnGet<Y18NType[]>];
|
27
|
+
export declare function useLocalStorageLang(): [(key: string, data: Record<string, unknown>) => void, (key: string) => Record<string, unknown> | null];
|
28
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export * from './authority.type';
|
2
|
+
export * from './menu.type';
|
3
|
+
export * from './user.types';
|
4
|
+
export * from './role.type';
|
5
|
+
export * from './project-info.types';
|
6
|
+
export * from './header-menu.type';
|
7
|
+
export * from "./nav.types";
|
8
|
+
export * from "./page";
|
9
|
+
export * from "./response";
|
@@ -0,0 +1,40 @@
|
|
1
|
+
export interface YunzaiMenu {
|
2
|
+
[key: string]: any;
|
3
|
+
appCode: string;
|
4
|
+
appIconUrl: string;
|
5
|
+
appType: string;
|
6
|
+
appUrl: string;
|
7
|
+
attribute: string;
|
8
|
+
badge: number;
|
9
|
+
badge_dot: boolean;
|
10
|
+
badge_status: string;
|
11
|
+
children: YunzaiMenu[];
|
12
|
+
createdDate: string;
|
13
|
+
displayIndex: number;
|
14
|
+
externalLink: string;
|
15
|
+
group: boolean;
|
16
|
+
helpUrl: string;
|
17
|
+
hide: boolean;
|
18
|
+
hideChildren: boolean;
|
19
|
+
hideInBreadcrumb: boolean;
|
20
|
+
i18n: string;
|
21
|
+
icon: string;
|
22
|
+
id: string;
|
23
|
+
intro: string;
|
24
|
+
label: string;
|
25
|
+
link: string;
|
26
|
+
menuAuths: string[];
|
27
|
+
reuse: boolean;
|
28
|
+
shortcut: boolean;
|
29
|
+
shortcut_root: boolean;
|
30
|
+
systemCode: string;
|
31
|
+
target: string;
|
32
|
+
text: string;
|
33
|
+
version: number;
|
34
|
+
}
|
35
|
+
export interface YunzaiMenuAttribute {
|
36
|
+
defaultRoute: any;
|
37
|
+
dataPlatform: any;
|
38
|
+
targetUser: any;
|
39
|
+
starConfig: any;
|
40
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Subject } from "rxjs";
|
2
|
+
import { YunzaiNavTopic } from "./header-menu.type";
|
3
|
+
export declare enum NavType {
|
4
|
+
APPLICATION = "application",
|
5
|
+
GROUP = "group",
|
6
|
+
TILE = "tile"
|
7
|
+
}
|
8
|
+
export interface LayoutBasicAside {
|
9
|
+
name: string;
|
10
|
+
intro: string;
|
11
|
+
icon: string;
|
12
|
+
}
|
13
|
+
export interface LayoutBasicDisplay {
|
14
|
+
nav: boolean;
|
15
|
+
reusetab: boolean;
|
16
|
+
aside: boolean;
|
17
|
+
}
|
18
|
+
export interface LayoutNavApplicationState {
|
19
|
+
active: boolean;
|
20
|
+
type: 'all' | 'mine' | 'other';
|
21
|
+
topic?: YunzaiNavTopic;
|
22
|
+
topics: YunzaiNavTopic[];
|
23
|
+
list: YunzaiNavTopic[];
|
24
|
+
search: string | null;
|
25
|
+
destroy$: Subject<any>;
|
26
|
+
}
|
27
|
+
export interface LayoutNavGroupState {
|
28
|
+
topics: YunzaiNavTopic[];
|
29
|
+
destroy$: Subject<any>;
|
30
|
+
}
|
package/mtypes/page.d.ts
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
export interface YunzaiPageParam<T> {
|
2
|
+
pageNum?: number;
|
3
|
+
pageSize?: number;
|
4
|
+
pageParam?: T;
|
5
|
+
}
|
6
|
+
export interface Pageable {
|
7
|
+
offset: number;
|
8
|
+
pageNumber: number;
|
9
|
+
pageSize: number;
|
10
|
+
paged: boolean;
|
11
|
+
sort: PageableSort;
|
12
|
+
unpaged: boolean;
|
13
|
+
}
|
14
|
+
export interface PageableSort {
|
15
|
+
empty: boolean;
|
16
|
+
sorted: boolean;
|
17
|
+
unsorted: boolean;
|
18
|
+
}
|
19
|
+
export interface YunzaiPageResult<T> {
|
20
|
+
content: T[];
|
21
|
+
empty: boolean;
|
22
|
+
first: boolean;
|
23
|
+
last: boolean;
|
24
|
+
number: number;
|
25
|
+
numberOfElements: number;
|
26
|
+
pageable: Pageable;
|
27
|
+
size: number;
|
28
|
+
sort: PageableSort;
|
29
|
+
totalElements: number;
|
30
|
+
totalPages: number;
|
31
|
+
}
|
32
|
+
export declare class YunzaiPageBuilder<T extends any | unknown> {
|
33
|
+
private page;
|
34
|
+
pageNum(pageNum: number): this;
|
35
|
+
pageSize(pageSize: number): this;
|
36
|
+
pageParam(param: T): this;
|
37
|
+
default(): this;
|
38
|
+
build(): YunzaiPageParam<T>;
|
39
|
+
}
|
40
|
+
export declare class Page<T> {
|
41
|
+
pageNum: number;
|
42
|
+
pageSize: number;
|
43
|
+
param?: Partial<T>;
|
44
|
+
private constructor();
|
45
|
+
static create<T>(): Page<T>;
|
46
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export interface YunzaiHeaderStyle {
|
2
|
+
label: string;
|
3
|
+
value: string;
|
4
|
+
}
|
5
|
+
export interface YunzaiProfile {
|
6
|
+
name: string;
|
7
|
+
url: string;
|
8
|
+
}
|
9
|
+
export interface YunzaiProjectInfo {
|
10
|
+
colorfulLogoUrl: string;
|
11
|
+
copyright: string;
|
12
|
+
faviconUrl: string;
|
13
|
+
gateway: string;
|
14
|
+
headerStyle: YunzaiHeaderStyle[];
|
15
|
+
maxLogoUrl: string;
|
16
|
+
miniLogoUrl: string;
|
17
|
+
profileList: YunzaiProfile[];
|
18
|
+
projectName: string;
|
19
|
+
showAllMenu: boolean;
|
20
|
+
tucaoUrl: string;
|
21
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { YunzaiAuthority } from './authority.type';
|
2
|
+
import { YunzaiMenu } from './menu.type';
|
3
|
+
import { YunzaiRole } from './role.type';
|
4
|
+
export interface YunzaiUser {
|
5
|
+
email: string;
|
6
|
+
accountNonExpired: boolean;
|
7
|
+
accountNonLocked: boolean;
|
8
|
+
authorities: YunzaiAuthority[];
|
9
|
+
avatarId: string;
|
10
|
+
credentialsNonExpired: boolean;
|
11
|
+
deptId: string;
|
12
|
+
deptName: string;
|
13
|
+
enabled: boolean;
|
14
|
+
id: string;
|
15
|
+
menu: YunzaiMenu[];
|
16
|
+
realname: string;
|
17
|
+
roles: YunzaiRole[];
|
18
|
+
userCode: string;
|
19
|
+
userId: string;
|
20
|
+
userType: number;
|
21
|
+
username: string;
|
22
|
+
}
|