bt-core-app 2.0.46 → 2.0.48

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
@@ -1016,7 +1016,6 @@ export declare function isNullOrEmpty(val: string | undefined): boolean;
1016
1016
  export declare function isSameDownToHour(firstDate?: string, secondDate?: string): boolean;
1017
1017
 
1018
1018
  export declare interface ItemEvents {
1019
- (e: 'edit', item: any): void;
1020
1019
  (e: 'fetched', item: any): void;
1021
1020
  (e: 'saved', item: any): void;
1022
1021
  }
@@ -1042,6 +1041,8 @@ export declare interface ItemProps<T, TSave, TReturn> {
1042
1041
  localPredicate?: (item: any) => boolean;
1043
1042
  nav?: string;
1044
1043
  navSuffix?: string;
1044
+ onBeforeEditAsync?: (item: TReturn | TReturn[] | undefined) => Promise<TReturn | TReturn[] | undefined>;
1045
+ onBeforeViewAsync?: (item: TReturn | TReturn[] | undefined) => Promise<TReturn | TReturn[] | undefined>;
1045
1046
  onCanDelete?: (item: TReturn) => boolean;
1046
1047
  onCanDeleteAsync?: OnCanDoAsync<TReturn>;
1047
1048
  onCanEdit?: (item: TReturn) => boolean;
@@ -1051,7 +1052,6 @@ export declare interface ItemProps<T, TSave, TReturn> {
1051
1052
  onCanSaveAsync?: OnCanDoAsync<TReturn | TSave>;
1052
1053
  onDeleteAsync?: OnDoActionAsync<TReturn>;
1053
1054
  onDeleteSuccessAsync?: OnDoMaybeSuccessAsync<TReturn, TReturn>;
1054
- onEditAsync?: (item?: TReturn | TReturn[]) => Promise<TReturn | TReturn[] | undefined>;
1055
1055
  onError?: (err: any) => void;
1056
1056
  onGetAsync?: OnGetAsync<T>;
1057
1057
  onGetListAsync?: OnGetAllAsync<T>;
@@ -1066,7 +1066,6 @@ export declare interface ItemProps<T, TSave, TReturn> {
1066
1066
  onSaveAsync?: (item: TSave | TReturn) => Promise<TReturn | undefined>;
1067
1067
  onSaveSuccessAsync?: OnDoSuccessAsync<TReturn, TReturn>;
1068
1068
  onUpdateAsyncItem?: (asyncItem: TReturn | TReturn[] | undefined, newVersionItem: T) => void;
1069
- onViewAsync?: (item?: TReturn | TReturn[]) => Promise<TReturn | TReturn[] | undefined>;
1070
1069
  params?: any;
1071
1070
  proxyID?: string;
1072
1071
  proxyKey?: string;
@@ -2281,7 +2280,7 @@ export declare function useItem<T, TSave, TReturn>(props: ItemProps<T, TSave, TR
2281
2280
  restoreItem: (dItem: any) => Promise<TReturn | undefined>;
2282
2281
  saveItem: (dItem: any, options?: SaveItemOptions) => Promise<TReturn | undefined>;
2283
2282
  showError: ShallowRef<boolean, boolean>;
2284
- toggleMode: () => void;
2283
+ toggleMode: () => Promise<void>;
2285
2284
  };
2286
2285
 
2287
2286
  export declare interface UseItemOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "2.0.46",
3
+ "version": "2.0.48",
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": {