x-essential-lib 0.11.3 → 0.11.4
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/dist/index.d.ts +6 -0
- package/dist/index.js +17 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -178,6 +178,12 @@ export interface PermissionMeta {
|
|
|
178
178
|
layers: Layer[];
|
|
179
179
|
}
|
|
180
180
|
//#endregion
|
|
181
|
+
//#region src/utils/permission/category.d.ts
|
|
182
|
+
export declare const funcPlaneCategories: Category[];
|
|
183
|
+
export declare const dataPlaneCategories: Category[];
|
|
184
|
+
export declare const permissionCategories: Category[];
|
|
185
|
+
export declare function getCategoryPlane(category: Category): Plane | undefined;
|
|
186
|
+
//#endregion
|
|
181
187
|
//#region src/utils/permission/meta.d.ts
|
|
182
188
|
export declare const allPermissionMetas: PermissionMeta[];
|
|
183
189
|
export declare function getCategoryPermissionMetas(category: Category): PermissionMeta[];
|
package/dist/index.js
CHANGED
|
@@ -173,6 +173,22 @@ function onUnauthorized() {
|
|
|
173
173
|
router.replace({ path: `/passport/login` });
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/utils/permission/category.ts
|
|
178
|
+
const funcPlaneCategories = [
|
|
179
|
+
"app",
|
|
180
|
+
"compute",
|
|
181
|
+
"data",
|
|
182
|
+
"resource",
|
|
183
|
+
"org"
|
|
184
|
+
];
|
|
185
|
+
const dataPlaneCategories = ["filter"];
|
|
186
|
+
const permissionCategories = [...funcPlaneCategories, ...dataPlaneCategories];
|
|
187
|
+
function getCategoryPlane(category) {
|
|
188
|
+
if (funcPlaneCategories.find((entry) => entry === category) !== void 0) return "func";
|
|
189
|
+
if (dataPlaneCategories.find((entry) => entry === category) !== void 0) return "data";
|
|
190
|
+
}
|
|
191
|
+
|
|
176
192
|
//#endregion
|
|
177
193
|
//#region src/pb/orgbase/v1/permission.ts
|
|
178
194
|
let Permission = /* @__PURE__ */ function(Permission) {
|
|
@@ -2747,4 +2763,4 @@ async function loadLocaleMessageEssential(locale) {
|
|
|
2747
2763
|
var src_default = { install };
|
|
2748
2764
|
|
|
2749
2765
|
//#endregion
|
|
2750
|
-
export { Permission, addView, allPermissionMetas, appAppear, categories, clearViews, closeWaitDlg, createAxios, src_default as default, delView, email, eventBus, fetchObjectNames, getCategoryPermissionMetas, getErrorMessage, getLayerObjects, getPermissionMeta, getTypeColor, getTypeDefault, globalObjects, groups, hasView, initObjects, injectDark, injectLocale, injectPermissionObjects, injectViews, isEmpty, isExist, lastView, layers, length, loadLocaleMessageEssential, matchRouteMeta, maxLength, messageError, messageInfo, messageSuccess, messageWarning, minLength, onBeforeEnter, openConfirmDlg, openNumberDlg, openPromptDlg, openWaitDlg, planes, popView, provideDark, provideLocale, providePermissionObjects, provideViews, required, routeTransName, toPermissionObjects, types, useColor, useGlobalStates, useMicroApp, usePageRoute, usePermission, useSystem, useViewStack, verifyPermission, waitMs, waitUtil };
|
|
2766
|
+
export { Permission, addView, allPermissionMetas, appAppear, categories, clearViews, closeWaitDlg, createAxios, dataPlaneCategories, src_default as default, delView, email, eventBus, fetchObjectNames, funcPlaneCategories, getCategoryPermissionMetas, getCategoryPlane, getErrorMessage, getLayerObjects, getPermissionMeta, getTypeColor, getTypeDefault, globalObjects, groups, hasView, initObjects, injectDark, injectLocale, injectPermissionObjects, injectViews, isEmpty, isExist, lastView, layers, length, loadLocaleMessageEssential, matchRouteMeta, maxLength, messageError, messageInfo, messageSuccess, messageWarning, minLength, onBeforeEnter, openConfirmDlg, openNumberDlg, openPromptDlg, openWaitDlg, permissionCategories, planes, popView, provideDark, provideLocale, providePermissionObjects, provideViews, required, routeTransName, toPermissionObjects, types, useColor, useGlobalStates, useMicroApp, usePageRoute, usePermission, useSystem, useViewStack, verifyPermission, waitMs, waitUtil };
|