bt-core-app 2.0.174 → 2.0.176

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 CHANGED
@@ -120,7 +120,7 @@ export declare function appendUrl(originalVal?: string, additionalVal?: string,
120
120
  export declare interface AuthItem {
121
121
  children?: AuthItem[];
122
122
  ignoreSuspension?: boolean;
123
- permissions?: string[];
123
+ permissions?: PermissionGroup | PermissionGroup[];
124
124
  requiresAuth?: boolean;
125
125
  subscriptions?: string[];
126
126
  }
@@ -210,6 +210,8 @@ export declare interface BTActions {
210
210
  isLoading: ComputedRef<boolean>;
211
211
  iterateThrough: <T>(opt: IterateThroughOptions<T>) => Promise<true | undefined>;
212
212
  logError: (err?: string | Error) => void;
213
+ persistLoading: (startingMsg?: string) => void;
214
+ releaseLoading: () => void;
213
215
  restoreItem: <T>(doOptions: RestoreOptions<T>) => Promise<T | undefined>;
214
216
  saveItem: <T, TSave, TReturn>(doOptions: SaveOptions<T, TSave, TReturn>) => Promise<TReturn | undefined>;
215
217
  syncItem: <T extends BaseIDModel>(syncOptions: SyncOptions<T>) => Promise<BulkActionResult<T>[] | undefined>;
@@ -253,7 +255,7 @@ export declare interface BTAuth {
253
255
  canView: (navName?: string) => boolean;
254
256
  canViewPermit: (permit: string) => boolean;
255
257
  credentials: RemovableRef<any>;
256
- doShow: (subcodes?: string[], permissions?: string[], action?: 'view' | 'edit') => boolean;
258
+ doShow: (subcodes?: string[], permissions?: PermissionGroup | PermissionGroup[], action?: 'view' | 'edit') => boolean;
257
259
  doShowByNav: (navName?: string | AuthItem, includeChildren?: boolean) => boolean;
258
260
  getAuthorizeUrl: (redirectPath?: string) => string;
259
261
  getToken: (code?: string, state?: string) => Promise<void>;
@@ -1419,8 +1421,8 @@ export declare interface NavigationItem extends AuthItem {
1419
1421
  name?: string;
1420
1422
  /**the url path on top of the base microservice url */
1421
1423
  path?: string;
1422
- /**permissions that are required for this navItem. All these permissions must be met. */
1423
- permissions?: string[];
1424
+ /**permissions that are required for this navItem. All these permissions must be met. Must be either all strings or all string arrays */
1425
+ permissions?: PermissionGroup | PermissionGroup[];
1424
1426
  /**for PLU stores only - defining what prop to cal window */
1425
1427
  pluWindowProp?: string;
1426
1428
  /**for PLU stores only - defining how many days to bunch requests in */
@@ -1500,6 +1502,8 @@ export declare interface PathOptions {
1500
1502
  useLocalCache?: boolean;
1501
1503
  }
1502
1504
 
1505
+ declare type PermissionGroup = string[];
1506
+
1503
1507
  export declare interface PointerOrTouchEvent extends PointerEvent, TouchEvent {
1504
1508
  }
1505
1509
 
@@ -1826,6 +1830,8 @@ export declare function useActionsTracker(useOptions?: DoActionOptions): {
1826
1830
  isLoading: ComputedRef<boolean>;
1827
1831
  iterateThrough: <T>(opt: IterateThroughOptions<T>) => Promise<true | undefined>;
1828
1832
  logError: (err?: string | Error) => void;
1833
+ persistLoading: (startingMsg?: string) => void;
1834
+ releaseLoading: () => void;
1829
1835
  };
1830
1836
 
1831
1837
  export declare function useApi(): BTApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "2.0.174",
3
+ "version": "2.0.176",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {