@reskin/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/bundles/reskin-core-classes.umd.js +48 -0
- package/bundles/reskin-core-classes.umd.js.map +1 -0
- package/bundles/reskin-core-directives.umd.js +147 -0
- package/bundles/reskin-core-directives.umd.js.map +1 -0
- package/bundles/reskin-core-entity-dictionary.umd.js +11 -0
- package/bundles/reskin-core-entity-dictionary.umd.js.map +1 -0
- package/bundles/reskin-core-entity-field.umd.js +49 -0
- package/bundles/reskin-core-entity-field.umd.js.map +1 -0
- package/bundles/reskin-core-entity-file.umd.js +11 -0
- package/bundles/reskin-core-entity-file.umd.js.map +1 -0
- package/bundles/reskin-core-entity-menu.umd.js +40 -0
- package/bundles/reskin-core-entity-menu.umd.js.map +1 -0
- package/bundles/reskin-core-entity-org.umd.js +50 -0
- package/bundles/reskin-core-entity-org.umd.js.map +1 -0
- package/bundles/reskin-core-entity-scheme.umd.js +63 -0
- package/bundles/reskin-core-entity-scheme.umd.js.map +1 -0
- package/bundles/reskin-core-entity-user.umd.js +11 -0
- package/bundles/reskin-core-entity-user.umd.js.map +1 -0
- package/bundles/reskin-core-entity.umd.js +11 -0
- package/bundles/reskin-core-entity.umd.js.map +1 -0
- package/bundles/reskin-core-guards.umd.js +89 -0
- package/bundles/reskin-core-guards.umd.js.map +1 -0
- package/bundles/reskin-core-interceptors.umd.js +702 -0
- package/bundles/reskin-core-interceptors.umd.js.map +1 -0
- package/bundles/reskin-core-services.umd.js +1188 -0
- package/bundles/reskin-core-services.umd.js.map +1 -0
- package/bundles/reskin-core-utils.umd.js +130 -0
- package/bundles/reskin-core-utils.umd.js.map +1 -0
- package/bundles/reskin-core.umd.js +13 -0
- package/bundles/reskin-core.umd.js.map +1 -0
- package/classes/package.json +10 -0
- package/classes/public-api.d.ts +1 -0
- package/classes/reskin-core-classes.d.ts +5 -0
- package/classes/table.helper.d.ts +23 -0
- package/directives/auth.directive.d.ts +27 -0
- package/directives/directives.module.d.ts +7 -0
- package/directives/package.json +10 -0
- package/directives/public-api.d.ts +2 -0
- package/directives/reskin-core-directives.d.ts +5 -0
- package/entity/Env.d.ts +66 -0
- package/entity/IPage.d.ts +35 -0
- package/entity/R.d.ts +25 -0
- package/entity/WC.d.ts +51 -0
- package/entity/dictionary/IDictionaryBaseInfo.d.ts +29 -0
- package/entity/dictionary/IDictionaryItem.d.ts +50 -0
- package/entity/dictionary/package.json +10 -0
- package/entity/dictionary/public-api.d.ts +2 -0
- package/entity/dictionary/reskin-core-entity-dictionary.d.ts +5 -0
- package/entity/field/ColumnTypeEnum.d.ts +33 -0
- package/entity/field/ITableField.d.ts +27 -0
- package/entity/field/package.json +10 -0
- package/entity/field/public-api.d.ts +2 -0
- package/entity/field/reskin-core-entity-field.d.ts +5 -0
- package/entity/file/IUploadFileData.d.ts +25 -0
- package/entity/file/package.json +10 -0
- package/entity/file/public-api.d.ts +1 -0
- package/entity/file/reskin-core-entity-file.d.ts +5 -0
- package/entity/menu/IMenu.d.ts +57 -0
- package/entity/menu/MenuTypeEnum.d.ts +24 -0
- package/entity/menu/package.json +10 -0
- package/entity/menu/public-api.d.ts +2 -0
- package/entity/menu/reskin-core-entity-menu.d.ts +5 -0
- package/entity/org/IOrgTreeNode.d.ts +58 -0
- package/entity/org/OrgTypeEnum.d.ts +31 -0
- package/entity/org/package.json +10 -0
- package/entity/org/public-api.d.ts +2 -0
- package/entity/org/reskin-core-entity-org.d.ts +5 -0
- package/entity/package.json +10 -0
- package/entity/public-api.d.ts +4 -0
- package/entity/reskin-core-entity.d.ts +5 -0
- package/entity/scheme/IFieldScheme.d.ts +97 -0
- package/entity/scheme/IScheme.d.ts +200 -0
- package/entity/scheme/SchemeEditTypeEnum.d.ts +25 -0
- package/entity/scheme/package.json +10 -0
- package/entity/scheme/public-api.d.ts +3 -0
- package/entity/scheme/reskin-core-entity-scheme.d.ts +5 -0
- package/entity/user/IAuth.d.ts +13 -0
- package/entity/user/IAuthAccount.d.ts +126 -0
- package/entity/user/package.json +10 -0
- package/entity/user/public-api.d.ts +2 -0
- package/entity/user/reskin-core-entity-user.d.ts +5 -0
- package/esm2015/classes/public-api.js +2 -0
- package/esm2015/classes/reskin-core-classes.js +5 -0
- package/esm2015/classes/table.helper.js +32 -0
- package/esm2015/directives/auth.directive.js +83 -0
- package/esm2015/directives/directives.module.js +16 -0
- package/esm2015/directives/public-api.js +3 -0
- package/esm2015/directives/reskin-core-directives.js +5 -0
- package/esm2015/entity/Env.js +2 -0
- package/esm2015/entity/IPage.js +2 -0
- package/esm2015/entity/R.js +2 -0
- package/esm2015/entity/WC.js +2 -0
- package/esm2015/entity/dictionary/IDictionaryBaseInfo.js +2 -0
- package/esm2015/entity/dictionary/IDictionaryItem.js +2 -0
- package/esm2015/entity/dictionary/public-api.js +3 -0
- package/esm2015/entity/dictionary/reskin-core-entity-dictionary.js +5 -0
- package/esm2015/entity/field/ColumnTypeEnum.js +35 -0
- package/esm2015/entity/field/ITableField.js +2 -0
- package/esm2015/entity/field/public-api.js +3 -0
- package/esm2015/entity/field/reskin-core-entity-field.js +5 -0
- package/esm2015/entity/file/IUploadFileData.js +2 -0
- package/esm2015/entity/file/public-api.js +2 -0
- package/esm2015/entity/file/reskin-core-entity-file.js +5 -0
- package/esm2015/entity/menu/IMenu.js +2 -0
- package/esm2015/entity/menu/MenuTypeEnum.js +26 -0
- package/esm2015/entity/menu/public-api.js +3 -0
- package/esm2015/entity/menu/reskin-core-entity-menu.js +5 -0
- package/esm2015/entity/org/IOrgTreeNode.js +2 -0
- package/esm2015/entity/org/OrgTypeEnum.js +33 -0
- package/esm2015/entity/org/public-api.js +3 -0
- package/esm2015/entity/org/reskin-core-entity-org.js +5 -0
- package/esm2015/entity/public-api.js +5 -0
- package/esm2015/entity/reskin-core-entity.js +5 -0
- package/esm2015/entity/scheme/IFieldScheme.js +2 -0
- package/esm2015/entity/scheme/IScheme.js +22 -0
- package/esm2015/entity/scheme/SchemeEditTypeEnum.js +27 -0
- package/esm2015/entity/scheme/public-api.js +4 -0
- package/esm2015/entity/scheme/reskin-core-entity-scheme.js +5 -0
- package/esm2015/entity/user/IAuth.js +2 -0
- package/esm2015/entity/user/IAuthAccount.js +2 -0
- package/esm2015/entity/user/public-api.js +3 -0
- package/esm2015/entity/user/reskin-core-entity-user.js +5 -0
- package/esm2015/guards/auth.guard.js +53 -0
- package/esm2015/guards/public-api.js +2 -0
- package/esm2015/guards/reskin-core-guards.js +5 -0
- package/esm2015/interceptors/blob.interceptor.js +66 -0
- package/esm2015/interceptors/cache.interceptor.js +36 -0
- package/esm2015/interceptors/error.interceptor.js +35 -0
- package/esm2015/interceptors/public-api.js +5 -0
- package/esm2015/interceptors/reskin-core-interceptors.js +5 -0
- package/esm2015/interceptors/token.interceptor.js +48 -0
- package/esm2015/public-api.js +2 -0
- package/esm2015/reskin-core.js +5 -0
- package/esm2015/services/account.service.js +58 -0
- package/esm2015/services/app.config.js +60 -0
- package/esm2015/services/auth.service.js +56 -0
- package/esm2015/services/cache.http.service.js +58 -0
- package/esm2015/services/destroy.service.js +15 -0
- package/esm2015/services/dictionary.service.js +107 -0
- package/esm2015/services/down.file.service.js +79 -0
- package/esm2015/services/field.scheme.service.js +37 -0
- package/esm2015/services/file.service.js +57 -0
- package/esm2015/services/menu.service.js +36 -0
- package/esm2015/services/org.service.js +46 -0
- package/esm2015/services/public-api.js +13 -0
- package/esm2015/services/reskin-core-services.js +5 -0
- package/esm2015/services/scheme.service.js +37 -0
- package/esm2015/utils/array.js +29 -0
- package/esm2015/utils/dom.js +18 -0
- package/esm2015/utils/public-api.js +4 -0
- package/esm2015/utils/reskin-core-utils.js +5 -0
- package/esm2015/utils/store.js +64 -0
- package/fesm2015/reskin-core-classes.js +39 -0
- package/fesm2015/reskin-core-classes.js.map +1 -0
- package/fesm2015/reskin-core-directives.js +103 -0
- package/fesm2015/reskin-core-directives.js.map +1 -0
- package/fesm2015/reskin-core-entity-dictionary.js +4 -0
- package/fesm2015/reskin-core-entity-dictionary.js.map +1 -0
- package/fesm2015/reskin-core-entity-field.js +41 -0
- package/fesm2015/reskin-core-entity-field.js.map +1 -0
- package/fesm2015/reskin-core-entity-file.js +4 -0
- package/fesm2015/reskin-core-entity-file.js.map +1 -0
- package/fesm2015/reskin-core-entity-menu.js +32 -0
- package/fesm2015/reskin-core-entity-menu.js.map +1 -0
- package/fesm2015/reskin-core-entity-org.js +39 -0
- package/fesm2015/reskin-core-entity-org.js.map +1 -0
- package/fesm2015/reskin-core-entity-scheme.js +55 -0
- package/fesm2015/reskin-core-entity-scheme.js.map +1 -0
- package/fesm2015/reskin-core-entity-user.js +4 -0
- package/fesm2015/reskin-core-entity-user.js.map +1 -0
- package/fesm2015/reskin-core-entity.js +4 -0
- package/fesm2015/reskin-core-entity.js.map +1 -0
- package/fesm2015/reskin-core-guards.js +60 -0
- package/fesm2015/reskin-core-guards.js.map +1 -0
- package/fesm2015/reskin-core-interceptors.js +179 -0
- package/fesm2015/reskin-core-interceptors.js.map +1 -0
- package/fesm2015/reskin-core-services.js +605 -0
- package/fesm2015/reskin-core-services.js.map +1 -0
- package/fesm2015/reskin-core-utils.js +118 -0
- package/fesm2015/reskin-core-utils.js.map +1 -0
- package/fesm2015/reskin-core.js +6 -0
- package/fesm2015/reskin-core.js.map +1 -0
- package/guards/auth.guard.d.ts +15 -0
- package/guards/package.json +10 -0
- package/guards/public-api.d.ts +1 -0
- package/guards/reskin-core-guards.d.ts +5 -0
- package/interceptors/blob.interceptor.d.ts +20 -0
- package/interceptors/cache.interceptor.d.ts +19 -0
- package/interceptors/error.interceptor.d.ts +19 -0
- package/interceptors/package.json +10 -0
- package/interceptors/public-api.d.ts +4 -0
- package/interceptors/reskin-core-interceptors.d.ts +5 -0
- package/interceptors/token.interceptor.d.ts +28 -0
- package/package.json +22 -0
- package/public-api.d.ts +2 -0
- package/reskin-core.d.ts +5 -0
- package/services/account.service.d.ts +33 -0
- package/services/app.config.d.ts +40 -0
- package/services/auth.service.d.ts +26 -0
- package/services/cache.http.service.d.ts +37 -0
- package/services/destroy.service.d.ts +8 -0
- package/services/dictionary.service.d.ts +57 -0
- package/services/down.file.service.d.ts +29 -0
- package/services/field.scheme.service.d.ts +17 -0
- package/services/file.service.d.ts +33 -0
- package/services/menu.service.d.ts +16 -0
- package/services/org.service.d.ts +31 -0
- package/services/package.json +10 -0
- package/services/public-api.d.ts +12 -0
- package/services/reskin-core-services.d.ts +5 -0
- package/services/scheme.service.d.ts +17 -0
- package/utils/array.d.ts +5 -0
- package/utils/dom.d.ts +6 -0
- package/utils/package.json +10 -0
- package/utils/public-api.d.ts +3 -0
- package/utils/reskin-core-utils.d.ts +5 -0
- package/utils/store.d.ts +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Core
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project core` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project core`.
|
|
8
|
+
|
|
9
|
+
> Note: Don't forget to add `--project core` or else it will be added to the default project in your `angular.json` file.
|
|
10
|
+
|
|
11
|
+
## Build
|
|
12
|
+
|
|
13
|
+
Run `ng build core` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
14
|
+
|
|
15
|
+
## Publishing
|
|
16
|
+
|
|
17
|
+
After building your library with `ng build core`, go to the dist folder `cd dist/core` and run `npm publish`.
|
|
18
|
+
|
|
19
|
+
## Running unit tests
|
|
20
|
+
|
|
21
|
+
Run `ng test core` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
22
|
+
|
|
23
|
+
## Further help
|
|
24
|
+
|
|
25
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reskin/core/services')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/classes', ['exports', '@reskin/core/services'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.classes = {}), global.reskin.core.services));
|
|
5
|
+
})(this, (function (exports, services) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 通过短表名构造完整表名;主要用于区分不同项目
|
|
9
|
+
*/
|
|
10
|
+
var RkTableHelper = /** @class */ (function () {
|
|
11
|
+
/**
|
|
12
|
+
* 构造完整表名
|
|
13
|
+
* @param shortCode 短表名(A01,B02...)
|
|
14
|
+
*/
|
|
15
|
+
function RkTableHelper(shortCode) {
|
|
16
|
+
this.shortCode = shortCode;
|
|
17
|
+
var TABLE_CODE = services.AppConfig.settings.servers.TABLE_CODE;
|
|
18
|
+
var type = '';
|
|
19
|
+
var firstChar = this.shortCode.charAt(0);
|
|
20
|
+
var isNotEmpty = Boolean(this.shortCode);
|
|
21
|
+
if (isNotEmpty && ['A', 'B'].includes(firstChar)) {
|
|
22
|
+
type = firstChar === 'A' ? 'PERSON' : 'UNIT';
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
throw 'new TableCode() 参数非A,B开头';
|
|
26
|
+
}
|
|
27
|
+
// 构造表名
|
|
28
|
+
this.name = "DATA_" + TABLE_CODE + "_" + type + "_" + this.shortCode;
|
|
29
|
+
// 构造主键
|
|
30
|
+
this.key = this.name + "_ID";
|
|
31
|
+
// 构造外键
|
|
32
|
+
if (isNotEmpty && this.shortCode !== firstChar + "01") {
|
|
33
|
+
this.fKey = this.name + "_" + firstChar + "01_ID";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return RkTableHelper;
|
|
37
|
+
}());
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generated bundle index. Do not edit.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
exports.RkTableHelper = RkTableHelper;
|
|
44
|
+
|
|
45
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
46
|
+
|
|
47
|
+
}));
|
|
48
|
+
//# sourceMappingURL=reskin-core-classes.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-classes.umd.js","sources":["../../../library/core/classes/table.helper.ts","../../../library/core/classes/reskin-core-classes.ts"],"sourcesContent":["import { AppConfig } from '@reskin/core/services';\r\n\r\n/**\r\n * 通过短表名构造完整表名;主要用于区分不同项目\r\n */\r\nexport class RkTableHelper {\r\n /**\r\n * 表名\r\n */\r\n name!: string;\r\n /**\r\n * 对应主键\r\n */\r\n key!: string;\r\n /**\r\n * 对应外键\r\n */\r\n fKey!: string;\r\n\r\n /**\r\n * 构造完整表名\r\n * @param shortCode 短表名(A01,B02...)\r\n */\r\n constructor(private shortCode: string) {\r\n const { TABLE_CODE } = AppConfig.settings.servers;\r\n let type = '';\r\n\r\n const firstChar = this.shortCode.charAt(0);\r\n const isNotEmpty = Boolean(this.shortCode);\r\n if (isNotEmpty && ['A', 'B'].includes(firstChar)) {\r\n type = firstChar === 'A' ? 'PERSON' : 'UNIT';\r\n } else {\r\n throw 'new TableCode() 参数非A,B开头';\r\n }\r\n\r\n // 构造表名\r\n this.name = `DATA_${TABLE_CODE}_${type}_${this.shortCode}`;\r\n\r\n // 构造主键\r\n this.key = `${this.name}_ID`;\r\n\r\n // 构造外键\r\n if (isNotEmpty && this.shortCode !== `${firstChar}01`) {\r\n this.fKey = `${this.name}_${firstChar}01_ID`;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["AppConfig"],"mappings":";;;;;;IAEA;;IAEG;AACH,QAAA,aAAA,kBAAA,YAAA;IAcI;;;IAGG;IACH,IAAA,SAAA,aAAA,CAAoB,SAAiB,EAAA;IAAjB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;YACzB,IAAA,UAAU,GAAKA,kBAAS,CAAC,QAAQ,CAAC,OAAO,WAA/B,CAAgC;YAClD,IAAI,IAAI,GAAG,EAAE,CAAC;YAEd,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3C,IAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3C,QAAA,IAAI,UAAU,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;IAC9C,YAAA,IAAI,GAAG,SAAS,KAAK,GAAG,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD,SAAA;IAAM,aAAA;IACH,YAAA,MAAM,0BAA0B,CAAC;IACpC,SAAA;;YAGD,IAAI,CAAC,IAAI,GAAG,OAAQ,GAAA,UAAU,GAAI,GAAA,GAAA,IAAI,GAAI,GAAA,GAAA,IAAI,CAAC,SAAW,CAAC;;IAG3D,QAAA,IAAI,CAAC,GAAG,GAAM,IAAI,CAAC,IAAI,QAAK,CAAC;;YAG7B,IAAI,UAAU,IAAI,IAAI,CAAC,SAAS,KAAQ,SAAS,OAAI,EAAE;gBACnD,IAAI,CAAC,IAAI,GAAM,IAAI,CAAC,IAAI,GAAA,GAAA,GAAI,SAAS,GAAA,OAAO,CAAC;IAChD,SAAA;SACJ;QACJ,OAAA,aAAA,CAAA;IAAA,CAAA,EAAA;;IC9CD;;IAEG;;;;;;;;;;"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('@reskin/core/services')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/directives', ['exports', '@angular/core', 'rxjs/operators', '@reskin/core/services'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.directives = {}), global.ng.core, global.rxjs.operators, global.reskin.core.services));
|
|
5
|
+
})(this, (function (exports, i0, operators, i1) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
|
|
28
|
+
var RkAuthDirective = /** @class */ (function () {
|
|
29
|
+
function RkAuthDirective(menu, viewContainerRef, templateRef) {
|
|
30
|
+
this.menu = menu;
|
|
31
|
+
this.viewContainerRef = viewContainerRef;
|
|
32
|
+
this.templateRef = templateRef;
|
|
33
|
+
this.condition = '';
|
|
34
|
+
this.thenTemplateRef = null;
|
|
35
|
+
this.elseTemplateRef = null;
|
|
36
|
+
this.thenViewRef = null;
|
|
37
|
+
this.elseViewRef = null;
|
|
38
|
+
this.thenTemplateRef = templateRef;
|
|
39
|
+
}
|
|
40
|
+
Object.defineProperty(RkAuthDirective.prototype, "auth", {
|
|
41
|
+
/**
|
|
42
|
+
* 传递多个标识符时,逗号分隔,匹配按"或者"运算
|
|
43
|
+
* @param condition
|
|
44
|
+
*/
|
|
45
|
+
set: function (condition) {
|
|
46
|
+
this.condition = condition;
|
|
47
|
+
this.updateView();
|
|
48
|
+
},
|
|
49
|
+
enumerable: false,
|
|
50
|
+
configurable: true
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(RkAuthDirective.prototype, "authThen", {
|
|
53
|
+
set: function (templateRef) {
|
|
54
|
+
this.thenTemplateRef = templateRef;
|
|
55
|
+
this.thenViewRef = null;
|
|
56
|
+
this.updateView();
|
|
57
|
+
},
|
|
58
|
+
enumerable: false,
|
|
59
|
+
configurable: true
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(RkAuthDirective.prototype, "authElse", {
|
|
62
|
+
set: function (templateRef) {
|
|
63
|
+
this.elseTemplateRef = templateRef;
|
|
64
|
+
this.elseViewRef = null;
|
|
65
|
+
this.updateView();
|
|
66
|
+
},
|
|
67
|
+
enumerable: false,
|
|
68
|
+
configurable: true
|
|
69
|
+
});
|
|
70
|
+
RkAuthDirective.prototype.ngOnDestroy = function () {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = this.authSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
73
|
+
};
|
|
74
|
+
RkAuthDirective.prototype.updateView = function () {
|
|
75
|
+
var _this = this;
|
|
76
|
+
var _a;
|
|
77
|
+
(_a = this.authSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
78
|
+
this.authSubscription = this.hasAuth(this.condition).subscribe(function (context) {
|
|
79
|
+
_this.viewContainerRef.clear();
|
|
80
|
+
if (context.status) {
|
|
81
|
+
if (_this.thenTemplateRef) {
|
|
82
|
+
_this.thenViewRef = _this.viewContainerRef.createEmbeddedView(_this.thenTemplateRef, context);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
if (_this.elseTemplateRef) {
|
|
87
|
+
_this.elseViewRef = _this.viewContainerRef.createEmbeddedView(_this.elseTemplateRef, context);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
RkAuthDirective.prototype.hasAuth = function (tags) {
|
|
93
|
+
var tagList = typeof tags === 'string' ? [tags] : tags;
|
|
94
|
+
return this.menu.requestData().pipe(operators.map(function (json) {
|
|
95
|
+
var menus = json.data.filter(function (menu) { return tagList.includes(menu.SYSTEM_RESOURCE_GUARD_ID); });
|
|
96
|
+
if (!menus.length)
|
|
97
|
+
return { $implicit: [], status: false };
|
|
98
|
+
return {
|
|
99
|
+
$implicit: typeof tags === 'string' ? menus[0] : menus,
|
|
100
|
+
status: !!menus.length,
|
|
101
|
+
};
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
104
|
+
return RkAuthDirective;
|
|
105
|
+
}());
|
|
106
|
+
RkAuthDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkAuthDirective, deps: [{ token: i1__namespace.RkMenuService }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
107
|
+
RkAuthDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: RkAuthDirective, selector: "[auth]", inputs: { auth: "auth", authThen: "authThen", authElse: "authElse" }, ngImport: i0__namespace });
|
|
108
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkAuthDirective, decorators: [{
|
|
109
|
+
type: i0.Directive,
|
|
110
|
+
args: [{
|
|
111
|
+
selector: '[auth]',
|
|
112
|
+
}]
|
|
113
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.RkMenuService }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.TemplateRef }]; }, propDecorators: { auth: [{
|
|
114
|
+
type: i0.Input
|
|
115
|
+
}], authThen: [{
|
|
116
|
+
type: i0.Input
|
|
117
|
+
}], authElse: [{
|
|
118
|
+
type: i0.Input
|
|
119
|
+
}] } });
|
|
120
|
+
|
|
121
|
+
var RkDirectivesModule = /** @class */ (function () {
|
|
122
|
+
function RkDirectivesModule() {
|
|
123
|
+
}
|
|
124
|
+
return RkDirectivesModule;
|
|
125
|
+
}());
|
|
126
|
+
RkDirectivesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkDirectivesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
127
|
+
RkDirectivesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkDirectivesModule, declarations: [RkAuthDirective], exports: [RkAuthDirective] });
|
|
128
|
+
RkDirectivesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkDirectivesModule });
|
|
129
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkDirectivesModule, decorators: [{
|
|
130
|
+
type: i0.NgModule,
|
|
131
|
+
args: [{
|
|
132
|
+
declarations: [RkAuthDirective],
|
|
133
|
+
exports: [RkAuthDirective],
|
|
134
|
+
}]
|
|
135
|
+
}] });
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Generated bundle index. Do not edit.
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
exports.RkAuthDirective = RkAuthDirective;
|
|
142
|
+
exports.RkDirectivesModule = RkDirectivesModule;
|
|
143
|
+
|
|
144
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
145
|
+
|
|
146
|
+
}));
|
|
147
|
+
//# sourceMappingURL=reskin-core-directives.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-directives.umd.js","sources":["../../../library/core/directives/auth.directive.ts","../../../library/core/directives/directives.module.ts","../../../library/core/directives/reskin-core-directives.ts"],"sourcesContent":["import { Directive, EmbeddedViewRef, Input, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\nimport { RkMenuService } from '@reskin/core/services';\r\n\r\n@Directive({\r\n selector: '[auth]',\r\n})\r\nexport class RkAuthDirective implements OnDestroy {\r\n /**\r\n * 传递多个标识符时,逗号分隔,匹配按\"或者\"运算\r\n * @param condition\r\n */\r\n @Input()\r\n set auth(condition: string | string[]) {\r\n this.condition = condition;\r\n this.updateView();\r\n }\r\n\r\n @Input()\r\n set authThen(templateRef: TemplateRef<any> | null) {\r\n this.thenTemplateRef = templateRef;\r\n this.thenViewRef = null;\r\n this.updateView();\r\n }\r\n\r\n @Input()\r\n set authElse(templateRef: TemplateRef<any> | null) {\r\n this.elseTemplateRef = templateRef;\r\n this.elseViewRef = null;\r\n this.updateView();\r\n }\r\n\r\n constructor(\r\n private menu: RkMenuService,\r\n private viewContainerRef: ViewContainerRef,\r\n public templateRef: TemplateRef<any>,\r\n ) {\r\n this.thenTemplateRef = templateRef;\r\n }\r\n\r\n private condition: string | string[] = '';\r\n private thenTemplateRef: TemplateRef<any> | null = null;\r\n private elseTemplateRef: TemplateRef<any> | null = null;\r\n private thenViewRef: EmbeddedViewRef<any> | null = null;\r\n private elseViewRef: EmbeddedViewRef<any> | null = null;\r\n private authSubscription?: Subscription;\r\n\r\n ngOnDestroy() {\r\n this.authSubscription?.unsubscribe();\r\n }\r\n\r\n private updateView() {\r\n this.authSubscription?.unsubscribe();\r\n this.authSubscription = this.hasAuth(this.condition).subscribe((context) => {\r\n this.viewContainerRef.clear();\r\n if (context.status) {\r\n if (this.thenTemplateRef) {\r\n this.thenViewRef = this.viewContainerRef.createEmbeddedView(this.thenTemplateRef, context);\r\n }\r\n } else {\r\n if (this.elseTemplateRef) {\r\n this.elseViewRef = this.viewContainerRef.createEmbeddedView(this.elseTemplateRef, context);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private hasAuth(tags: string | string[]) {\r\n const tagList: string[] = typeof tags === 'string' ? [tags] : tags;\r\n return this.menu.requestData().pipe(\r\n map((json) => {\r\n const menus = json.data.filter((menu) => tagList.includes(menu.SYSTEM_RESOURCE_GUARD_ID));\r\n if (!menus.length) return { $implicit: [], status: false };\r\n return {\r\n $implicit: typeof tags === 'string' ? menus[0] : menus,\r\n status: !!menus.length,\r\n };\r\n }),\r\n );\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { RkAuthDirective } from './auth.directive';\r\n\r\n@NgModule({\r\n declarations: [RkAuthDirective],\r\n exports: [RkAuthDirective],\r\n})\r\nexport class RkDirectivesModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map","i1","i0","Directive","Input","NgModule"],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/dictionary', factory) :
|
|
3
|
+
factory();
|
|
4
|
+
})((function () { 'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generated bundle index. Do not edit.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
}));
|
|
11
|
+
//# sourceMappingURL=reskin-core-entity-dictionary.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-dictionary.umd.js","sources":["../../../library/core/entity/dictionary/reskin-core-entity-dictionary.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;CAAA;;CAEG;;;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/field', ['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.entity = global.reskin.core.entity || {}, global.reskin.core.entity.field = {})));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 字段类型状态
|
|
9
|
+
*/
|
|
10
|
+
exports.ColumnTypeEnum = void 0;
|
|
11
|
+
(function (ColumnTypeEnum) {
|
|
12
|
+
/**
|
|
13
|
+
* 主键ID类型
|
|
14
|
+
*/
|
|
15
|
+
ColumnTypeEnum[ColumnTypeEnum["ID"] = 0] = "ID";
|
|
16
|
+
/**
|
|
17
|
+
* 不可变字符串
|
|
18
|
+
*/
|
|
19
|
+
ColumnTypeEnum[ColumnTypeEnum["CHAR"] = 1] = "CHAR";
|
|
20
|
+
/**
|
|
21
|
+
* 可变字符串
|
|
22
|
+
*/
|
|
23
|
+
ColumnTypeEnum[ColumnTypeEnum["VARCHAR"] = 2] = "VARCHAR";
|
|
24
|
+
/**
|
|
25
|
+
* 数字型
|
|
26
|
+
*/
|
|
27
|
+
ColumnTypeEnum[ColumnTypeEnum["NUMBER"] = 3] = "NUMBER";
|
|
28
|
+
/**
|
|
29
|
+
* 时间日期
|
|
30
|
+
*/
|
|
31
|
+
ColumnTypeEnum[ColumnTypeEnum["DATE"] = 4] = "DATE";
|
|
32
|
+
/**
|
|
33
|
+
* 是否
|
|
34
|
+
*/
|
|
35
|
+
ColumnTypeEnum[ColumnTypeEnum["BOOLEAN"] = 5] = "BOOLEAN";
|
|
36
|
+
/**
|
|
37
|
+
* 备注
|
|
38
|
+
*/
|
|
39
|
+
ColumnTypeEnum[ColumnTypeEnum["CLOB"] = 6] = "CLOB";
|
|
40
|
+
})(exports.ColumnTypeEnum || (exports.ColumnTypeEnum = {}));
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Generated bundle index. Do not edit.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
47
|
+
|
|
48
|
+
}));
|
|
49
|
+
//# sourceMappingURL=reskin-core-entity-field.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-field.umd.js","sources":["../../../library/core/entity/field/ColumnTypeEnum.ts","../../../library/core/entity/field/reskin-core-entity-field.ts"],"sourcesContent":["/**\r\n * 字段类型状态\r\n */\r\nexport enum ColumnTypeEnum {\r\n /**\r\n * 主键ID类型\r\n */\r\n ID = 0,\r\n /**\r\n * 不可变字符串\r\n */\r\n CHAR = 1,\r\n /**\r\n * 可变字符串\r\n */\r\n VARCHAR = 2,\r\n /**\r\n * 数字型\r\n */\r\n NUMBER = 3,\r\n /**\r\n * 时间日期\r\n */\r\n DATE = 4,\r\n /**\r\n * 是否\r\n */\r\n BOOLEAN = 5,\r\n /**\r\n * 备注\r\n */\r\n CLOB = 6,\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ColumnTypeEnum"],"mappings":";;;;;;IAAA;;IAEG;AACSA,oCA6BX;IA7BD,CAAA,UAAY,cAAc,EAAA;IACtB;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAM,CAAA;IACN;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;IACX;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;IACV;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;IACX;;IAEG;QACH,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACZ,CAAC,EA7BWA,sBAAc,KAAdA,sBAAc,GA6BzB,EAAA,CAAA,CAAA;;IChCD;;IAEG;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/file', factory) :
|
|
3
|
+
factory();
|
|
4
|
+
})((function () { 'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generated bundle index. Do not edit.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
}));
|
|
11
|
+
//# sourceMappingURL=reskin-core-entity-file.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-file.umd.js","sources":["../../../library/core/entity/file/reskin-core-entity-file.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;CAAA;;CAEG;;;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/menu', ['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.entity = global.reskin.core.entity || {}, global.reskin.core.entity.menu = {})));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 系统菜单
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @enum {number}
|
|
12
|
+
*/
|
|
13
|
+
exports.MenuTypeEnum = void 0;
|
|
14
|
+
(function (MenuTypeEnum) {
|
|
15
|
+
/**
|
|
16
|
+
* 目录
|
|
17
|
+
*/
|
|
18
|
+
MenuTypeEnum[MenuTypeEnum["CATALOG"] = 0] = "CATALOG";
|
|
19
|
+
/**
|
|
20
|
+
* 菜单
|
|
21
|
+
*/
|
|
22
|
+
MenuTypeEnum[MenuTypeEnum["MENU"] = 1] = "MENU";
|
|
23
|
+
/**
|
|
24
|
+
* 按钮
|
|
25
|
+
*/
|
|
26
|
+
MenuTypeEnum[MenuTypeEnum["BUTTON"] = 2] = "BUTTON";
|
|
27
|
+
/**
|
|
28
|
+
* 元素
|
|
29
|
+
*/
|
|
30
|
+
MenuTypeEnum[MenuTypeEnum["ELEMENT"] = 3] = "ELEMENT";
|
|
31
|
+
})(exports.MenuTypeEnum || (exports.MenuTypeEnum = {}));
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Generated bundle index. Do not edit.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
|
|
39
|
+
}));
|
|
40
|
+
//# sourceMappingURL=reskin-core-entity-menu.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-menu.umd.js","sources":["../../../library/core/entity/menu/MenuTypeEnum.ts","../../../library/core/entity/menu/reskin-core-entity-menu.ts"],"sourcesContent":["/**\r\n * 系统菜单\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nexport enum MenuTypeEnum {\r\n /**\r\n * 目录\r\n */\r\n CATALOG = 0,\r\n /**\r\n * 菜单\r\n */\r\n MENU = 1,\r\n /**\r\n * 按钮\r\n */\r\n BUTTON = 2,\r\n /**\r\n * 元素\r\n */\r\n ELEMENT = 3,\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MenuTypeEnum"],"mappings":";;;;;;IAAA;;;;;IAKG;AACSA,kCAiBX;IAjBD,CAAA,UAAY,YAAY,EAAA;IACpB;;IAEG;QACH,YAAA,CAAA,YAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;IACX;;IAEG;QACH,YAAA,CAAA,YAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,YAAA,CAAA,YAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;IACV;;IAEG;QACH,YAAA,CAAA,YAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;IACf,CAAC,EAjBWA,oBAAY,KAAZA,oBAAY,GAiBvB,EAAA,CAAA,CAAA;;ICvBD;;IAEG;;;;;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/org', ['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.entity = global.reskin.core.entity || {}, global.reskin.core.entity.org = {})));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
var _a;
|
|
8
|
+
/**
|
|
9
|
+
* 机构类型
|
|
10
|
+
*/
|
|
11
|
+
exports.OrgTypeEnum = void 0;
|
|
12
|
+
(function (OrgTypeEnum) {
|
|
13
|
+
/**
|
|
14
|
+
* 虚拟节点
|
|
15
|
+
*/
|
|
16
|
+
OrgTypeEnum[OrgTypeEnum["VIRTUAL_NODE"] = 0] = "VIRTUAL_NODE";
|
|
17
|
+
/**
|
|
18
|
+
* 单位
|
|
19
|
+
*/
|
|
20
|
+
OrgTypeEnum[OrgTypeEnum["UNIT"] = 1] = "UNIT";
|
|
21
|
+
/**
|
|
22
|
+
* 部门
|
|
23
|
+
*/
|
|
24
|
+
OrgTypeEnum[OrgTypeEnum["DEPARTMENT"] = 2] = "DEPARTMENT";
|
|
25
|
+
})(exports.OrgTypeEnum || (exports.OrgTypeEnum = {}));
|
|
26
|
+
/**
|
|
27
|
+
* 机构类型对应中文
|
|
28
|
+
*/
|
|
29
|
+
var OrgTypeCName = (_a = {},
|
|
30
|
+
_a[exports.OrgTypeEnum.VIRTUAL_NODE] = {
|
|
31
|
+
label: '虚拟节点',
|
|
32
|
+
},
|
|
33
|
+
_a[exports.OrgTypeEnum.UNIT] = {
|
|
34
|
+
label: '单位',
|
|
35
|
+
},
|
|
36
|
+
_a[exports.OrgTypeEnum.DEPARTMENT] = {
|
|
37
|
+
label: '部门',
|
|
38
|
+
},
|
|
39
|
+
_a);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Generated bundle index. Do not edit.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
exports.OrgTypeCName = OrgTypeCName;
|
|
46
|
+
|
|
47
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
48
|
+
|
|
49
|
+
}));
|
|
50
|
+
//# sourceMappingURL=reskin-core-entity-org.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-org.umd.js","sources":["../../../library/core/entity/org/OrgTypeEnum.ts","../../../library/core/entity/org/reskin-core-entity-org.ts"],"sourcesContent":["/**\r\n * 机构类型\r\n */\r\nexport enum OrgTypeEnum {\r\n /**\r\n * 虚拟节点\r\n */\r\n VIRTUAL_NODE = 0,\r\n /**\r\n * 单位\r\n */\r\n UNIT = 1,\r\n /**\r\n * 部门\r\n */\r\n DEPARTMENT = 2,\r\n}\r\n\r\n/**\r\n * 机构类型对应中文\r\n */\r\nexport const OrgTypeCName = {\r\n [OrgTypeEnum.VIRTUAL_NODE]: {\r\n label: '虚拟节点',\r\n },\r\n [OrgTypeEnum.UNIT]: {\r\n label: '单位',\r\n },\r\n [OrgTypeEnum.DEPARTMENT]: {\r\n label: '部门',\r\n },\r\n};\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["OrgTypeEnum"],"mappings":";;;;;;;IAAA;;IAEG;AACSA,iCAaX;IAbD,CAAA,UAAY,WAAW,EAAA;IACnB;;IAEG;QACH,WAAA,CAAA,WAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAgB,CAAA;IAChB;;IAEG;QACH,WAAA,CAAA,WAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,WAAA,CAAA,WAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc,CAAA;IAClB,CAAC,EAbWA,mBAAW,KAAXA,mBAAW,GAatB,EAAA,CAAA,CAAA,CAAA;IAED;;IAEG;QACU,YAAY,IAAA,EAAA,GAAA,EAAA;QACrB,EAAC,CAAAA,mBAAW,CAAC,YAAY,CAAG,GAAA;IACxB,QAAA,KAAK,EAAE,MAAM;IAChB,KAAA;QACD,EAAC,CAAAA,mBAAW,CAAC,IAAI,CAAG,GAAA;IAChB,QAAA,KAAK,EAAE,IAAI;IACd,KAAA;QACD,EAAC,CAAAA,mBAAW,CAAC,UAAU,CAAG,GAAA;IACtB,QAAA,KAAK,EAAE,IAAI;IACd,KAAA;;;IC9BL;;IAEG;;;;;;;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/scheme', ['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.entity = global.reskin.core.entity || {}, global.reskin.core.entity.scheme = {})));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 对齐方式
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @enum {number}
|
|
12
|
+
*/
|
|
13
|
+
exports.AlignTypeEnum = void 0;
|
|
14
|
+
(function (AlignTypeEnum) {
|
|
15
|
+
/**
|
|
16
|
+
* 左对齐
|
|
17
|
+
*/
|
|
18
|
+
AlignTypeEnum[AlignTypeEnum["LEFT"] = 0] = "LEFT";
|
|
19
|
+
/**
|
|
20
|
+
* 居中对齐
|
|
21
|
+
*/
|
|
22
|
+
AlignTypeEnum[AlignTypeEnum["CENTER"] = 1] = "CENTER";
|
|
23
|
+
/**
|
|
24
|
+
* 右对齐
|
|
25
|
+
*/
|
|
26
|
+
AlignTypeEnum[AlignTypeEnum["RIGHT"] = 2] = "RIGHT";
|
|
27
|
+
})(exports.AlignTypeEnum || (exports.AlignTypeEnum = {}));
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 字段显示类型
|
|
31
|
+
*/
|
|
32
|
+
exports.SchemeEditTypeEnum = void 0;
|
|
33
|
+
(function (SchemeEditTypeEnum) {
|
|
34
|
+
/**
|
|
35
|
+
* 文本
|
|
36
|
+
*/
|
|
37
|
+
SchemeEditTypeEnum[SchemeEditTypeEnum["TEXT"] = 1] = "TEXT";
|
|
38
|
+
/**
|
|
39
|
+
* 数字
|
|
40
|
+
*/
|
|
41
|
+
SchemeEditTypeEnum[SchemeEditTypeEnum["INT"] = 2] = "INT";
|
|
42
|
+
/**
|
|
43
|
+
* 时间
|
|
44
|
+
*/
|
|
45
|
+
SchemeEditTypeEnum[SchemeEditTypeEnum["DATE"] = 3] = "DATE";
|
|
46
|
+
/**
|
|
47
|
+
* 备注
|
|
48
|
+
*/
|
|
49
|
+
SchemeEditTypeEnum[SchemeEditTypeEnum["MEMO"] = 4] = "MEMO";
|
|
50
|
+
/**
|
|
51
|
+
* 下拉代码
|
|
52
|
+
*/
|
|
53
|
+
SchemeEditTypeEnum[SchemeEditTypeEnum["SELECT"] = 5] = "SELECT";
|
|
54
|
+
})(exports.SchemeEditTypeEnum || (exports.SchemeEditTypeEnum = {}));
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Generated bundle index. Do not edit.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
61
|
+
|
|
62
|
+
}));
|
|
63
|
+
//# sourceMappingURL=reskin-core-entity-scheme.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-scheme.umd.js","sources":["../../../library/core/entity/scheme/IScheme.ts","../../../library/core/entity/scheme/SchemeEditTypeEnum.ts","../../../library/core/entity/scheme/reskin-core-entity-scheme.ts"],"sourcesContent":["import { SchemeEditTypeEnum } from './SchemeEditTypeEnum';\r\nimport { ITableField } from '@reskin/core/entity/field';\r\n\r\n/**\r\n * 界面方案\r\n */\r\nexport interface IScheme {\r\n /**\r\n * 界面方案基本信息\r\n */\r\n sysPageScheme: IPageScheme;\r\n /**\r\n * 界面方案配置内容\r\n */\r\n systemSchemeList: ISchemeListItem[];\r\n}\r\n\r\n/**\r\n * 界面方案基本信息\r\n */\r\nexport interface IPageScheme {\r\n /**\r\n * 列数\r\n */\r\n SCHEME_COLUMN_COUNT: number;\r\n /**\r\n * 说明\r\n */\r\n SCHEME_DESC: string;\r\n /**\r\n * 说明\r\n */\r\n SCHEME_NAME: string;\r\n /**\r\n * 标识符\r\n */\r\n SCHEME_PERMISSION: string;\r\n /**\r\n * 方案类型\r\n */\r\n SCHEME_TYPE: number;\r\n}\r\n\r\n/**\r\n * 界面方案配置内容项\r\n */\r\nexport interface ISchemeListItem {\r\n /**\r\n * 界面方案字段编辑配置\r\n */\r\n systemSchemeEdit: ISchemeEditItem[];\r\n /**\r\n * 界面方案字段列头配置\r\n */\r\n systemSchemeHeader: ISchemeHeaderItem[];\r\n /**\r\n * 界面方案指标集信息\r\n */\r\n systemSchemeTable: ISchemeTable;\r\n}\r\n\r\n/**\r\n * 界面方案字段编辑配置项\r\n */\r\nexport interface ISchemeEditItem extends ITableField {\r\n /**\r\n * 校验脚本\r\n */\r\n SCHEME_EDIT_CHECK_SCRIPT: string;\r\n /**\r\n * 触发脚本\r\n */\r\n SCHEME_EDIT_TRIGGER_SCRIPT: string;\r\n /**\r\n * 列编码\r\n */\r\n SCHEME_EDIT_COLUMN_ID: string;\r\n /**\r\n * 显示标题\r\n */\r\n SCHEME_EDIT_DISPLAY_NAME: string;\r\n /**\r\n * 编辑框宽度\r\n */\r\n SCHEME_EDIT_EDIT_WIDTH: number;\r\n /**\r\n * 是否必录\r\n */\r\n SCHEME_EDIT_IS_MUST_INPUT: boolean;\r\n /**\r\n * 是否只读\r\n */\r\n SCHEME_EDIT_IS_READONLY: boolean;\r\n /**\r\n * 标题宽度\r\n */\r\n SCHEME_EDIT_LABEL_WIDTH: number;\r\n /**\r\n * 界面方案ID\r\n */\r\n SCHEME_EDIT_SCHEME_ID: string;\r\n /**\r\n * 表编码\r\n */\r\n SCHEME_EDIT_TABLE_ID: string;\r\n /**\r\n * 显示类型\r\n */\r\n SCHEME_EDIT_VIEW_TYPE: SchemeEditTypeEnum;\r\n /**\r\n * 配置信息\r\n */\r\n SCHEME_EDIT_CONFIG: string;\r\n /**\r\n * 主键ID\r\n */\r\n SYSTEM_SCHEME_EDIT_ID: string;\r\n}\r\n\r\n/**\r\n * 界面方案字段列头配置项\r\n */\r\nexport interface ISchemeHeaderItem extends ITableField {\r\n /**\r\n * 对齐方式\r\n */\r\n SCHEME_HEADER_ALIGN_TYPE: AlignTypeEnum;\r\n /**\r\n * 列编码\r\n */\r\n SCHEME_HEADER_COLUMN_ID: string;\r\n /**\r\n * 显示名称\r\n */\r\n SCHEME_HEADER_DISPLAY_NAME: string;\r\n /**\r\n * 显示宽度\r\n */\r\n SCHEME_HEADER_DISPLAY_WIDTH: number;\r\n /**\r\n * 界面方案ID\r\n */\r\n SCHEME_HEADER_SCHEME_ID: string;\r\n /**\r\n * 表编码\r\n */\r\n SCHEME_HEADER_TABLE_ID: string;\r\n}\r\n\r\n/**\r\n * 界面方案指标集信息\r\n */\r\nexport interface ISchemeTable {\r\n /**\r\n * 备注\r\n */\r\n SCHEME_TABLE_DESC: string;\r\n /**\r\n * 显示名称\r\n */\r\n SCHEME_TABLE_DISPLAY_NAME: string;\r\n /**\r\n * 显示方式\r\n */\r\n SCHEME_TABLE_DISPLAY_TYPE: number;\r\n /**\r\n * 界面方案ID\r\n */\r\n SCHEME_TABLE_SCHEME_ID: string;\r\n /**\r\n * 表编码\r\n */\r\n SCHEME_TABLE_TABLE_ID: string;\r\n /**\r\n * 指标集编码\r\n */\r\n TABLE_CODE: string;\r\n /**\r\n * 指标集名称\r\n */\r\n TABLE_NAME: string;\r\n /**\r\n * 指标集对应主集\r\n */\r\n TABLE_PARENT_CODES: string;\r\n}\r\n\r\n/**\r\n * 对齐方式\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nexport enum AlignTypeEnum {\r\n /**\r\n * 左对齐\r\n */\r\n LEFT,\r\n /**\r\n * 居中对齐\r\n */\r\n CENTER,\r\n /**\r\n * 右对齐\r\n */\r\n RIGHT,\r\n}\r\n","/**\r\n * 字段显示类型\r\n */\r\nexport enum SchemeEditTypeEnum {\r\n /**\r\n * 文本\r\n */\r\n TEXT = 1,\r\n /**\r\n * 数字\r\n */\r\n INT = 2,\r\n /**\r\n * 时间\r\n */\r\n DATE = 3,\r\n /**\r\n * 备注\r\n */\r\n MEMO = 4,\r\n /**\r\n * 下拉代码\r\n */\r\n SELECT = 5,\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["AlignTypeEnum","SchemeEditTypeEnum"],"mappings":";;;;;;IA2LA;;;;;IAKG;AACSA,mCAaX;IAbD,CAAA,UAAY,aAAa,EAAA;IACrB;;IAEG;QACH,aAAA,CAAA,aAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;IACJ;;IAEG;QACH,aAAA,CAAA,aAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;IACN;;IAEG;QACH,aAAA,CAAA,aAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;IACT,CAAC,EAbWA,qBAAa,KAAbA,qBAAa,GAaxB,EAAA,CAAA,CAAA;;IC9MD;;IAEG;AACSC,wCAqBX;IArBD,CAAA,UAAY,kBAAkB,EAAA;IAC1B;;IAEG;QACH,kBAAA,CAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,kBAAA,CAAA,kBAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAO,CAAA;IACP;;IAEG;QACH,kBAAA,CAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,kBAAA,CAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;IACR;;IAEG;QACH,kBAAA,CAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;IACd,CAAC,EArBWA,0BAAkB,KAAlBA,0BAAkB,GAqB7B,EAAA,CAAA,CAAA;;ICxBD;;IAEG;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity/user', factory) :
|
|
3
|
+
factory();
|
|
4
|
+
})((function () { 'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generated bundle index. Do not edit.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
}));
|
|
11
|
+
//# sourceMappingURL=reskin-core-entity-user.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity-user.umd.js","sources":["../../../library/core/entity/user/reskin-core-entity-user.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;CAAA;;CAEG;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/entity', factory) :
|
|
3
|
+
factory();
|
|
4
|
+
})((function () { 'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generated bundle index. Do not edit.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
}));
|
|
11
|
+
//# sourceMappingURL=reskin-core-entity.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reskin-core-entity.umd.js","sources":["../../../library/core/entity/reskin-core-entity.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;CAAA;;CAEG;;;;;;"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('@reskin/core/services'), require('@angular/router')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@reskin/core/guards', ['exports', '@angular/core', 'rxjs/operators', '@reskin/core/services', '@angular/router'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.reskin = global.reskin || {}, global.reskin.core = global.reskin.core || {}, global.reskin.core.guards = {}), global.ng.core, global.rxjs.operators, global.reskin.core.services, global.ng.router));
|
|
5
|
+
})(this, (function (exports, i0, operators, i1, i2) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
+
|
|
29
|
+
var RkAuthGuard = /** @class */ (function () {
|
|
30
|
+
function RkAuthGuard(menu, router) {
|
|
31
|
+
this.menu = menu;
|
|
32
|
+
this.router = router;
|
|
33
|
+
}
|
|
34
|
+
RkAuthGuard.prototype.canActivateChild = function (childRoute, state) {
|
|
35
|
+
var _this = this;
|
|
36
|
+
return this.menu.requestData().pipe(operators.filter(function (json) { return json.code === 0; }), operators.map(function (json) { return json.data; }), operators.map(function (menus) { return _this.checkAccess(menus, childRoute, state.url); }), operators.catchError(function () {
|
|
37
|
+
_this.handleNoAccess(state.url);
|
|
38
|
+
return [false];
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
41
|
+
RkAuthGuard.prototype.checkAccess = function (menus, childRoute, url) {
|
|
42
|
+
var _this = this;
|
|
43
|
+
if (!menus.length) {
|
|
44
|
+
throw new Error("\u6B64\u8D26\u53F7\u65E0\u4EFB\u4F55\u529F\u80FD\u6743\u9650.");
|
|
45
|
+
}
|
|
46
|
+
var cleanUrl = url.replace(/\?.*/, '');
|
|
47
|
+
var authRoutes = new Set(menus.map(function (m) { return m.SYSTEM_RESOURCE_URL; }));
|
|
48
|
+
if (authRoutes.has(cleanUrl)) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
var _a = childRoute.data, extendAuth = _a.extendAuth, extendRoutes = _a.extendRoutes;
|
|
52
|
+
if (extendAuth && extendRoutes) {
|
|
53
|
+
var hasWildcardMatch = extendRoutes.some(function (route) { return route.includes('**') ? _this.match(route, cleanUrl) : route === cleanUrl; });
|
|
54
|
+
if (hasWildcardMatch) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
this.handleNoAccess(url);
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
RkAuthGuard.prototype.match = function (pattern, path) {
|
|
62
|
+
var regexPattern = pattern.replace(/\*\*/g, '.*');
|
|
63
|
+
return new RegExp("^" + regexPattern + "$").test(path);
|
|
64
|
+
};
|
|
65
|
+
RkAuthGuard.prototype.handleNoAccess = function (url) {
|
|
66
|
+
console.error("\u65E0\u6743\u9650\u8BBF\u95EE\u8DEF\u7531\u5730\u5740: " + url);
|
|
67
|
+
this.router.navigate(['/errors/401']).then();
|
|
68
|
+
};
|
|
69
|
+
return RkAuthGuard;
|
|
70
|
+
}());
|
|
71
|
+
RkAuthGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkAuthGuard, deps: [{ token: i1__namespace.RkMenuService }, { token: i2__namespace.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
72
|
+
RkAuthGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkAuthGuard, providedIn: 'root' });
|
|
73
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RkAuthGuard, decorators: [{
|
|
74
|
+
type: i0.Injectable,
|
|
75
|
+
args: [{
|
|
76
|
+
providedIn: 'root',
|
|
77
|
+
}]
|
|
78
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.RkMenuService }, { type: i2__namespace.Router }]; } });
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Generated bundle index. Do not edit.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
exports.RkAuthGuard = RkAuthGuard;
|
|
85
|
+
|
|
86
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
87
|
+
|
|
88
|
+
}));
|
|
89
|
+
//# sourceMappingURL=reskin-core-guards.umd.js.map
|