bt-core-app 1.4.45 → 1.4.47

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
@@ -8,6 +8,7 @@ import { Position } from '@vueuse/core';
8
8
  import { Ref } from 'vue';
9
9
  import { RemovableRef } from '@vueuse/core';
10
10
  import { RouteLocationNormalized } from 'vue-router';
11
+ import { Router } from 'vue-router';
11
12
  import { ShallowRef } from 'vue';
12
13
  import { Store } from 'pinia';
13
14
  import { StoreDefinition } from 'pinia';
@@ -69,14 +70,6 @@ export declare type BladeDensity = 'default' | 'comfortable' | 'compact';
69
70
 
70
71
  export declare type BladeMode = 'new' | 'view' | 'edit';
71
72
 
72
- export declare interface BladeProps {
73
- bladeID?: string;
74
- bladeName?: string;
75
- density?: BladeDensity;
76
- mobileBreakpoint?: number;
77
- variant?: BladeVariant;
78
- }
79
-
80
73
  /**
81
74
  Inline: merges toolbars | much more compact | hides navigation
82
75
  Page: shows navigation and page settings
@@ -135,13 +128,19 @@ export declare interface BTAuth {
135
128
  getToken: (code?: string, state?: string) => Promise<void>;
136
129
  isLoggedIn: ComputedRef<boolean>;
137
130
  login: (redirectPath?: string) => void;
138
- logout: (navNameRedirect?: string) => void;
131
+ logout: (navNameRedirect?: string, router?: Router) => void;
139
132
  resetAuthState: () => void;
140
133
  setAuth: (jwtToken?: string) => void;
141
134
  timeZone: ComputedRef<string>;
142
135
  tryLogin: () => boolean | undefined;
143
136
  }
144
137
 
138
+ declare interface BTBlade {
139
+ bladeData: Ref<any>;
140
+ isMobile: Ref<boolean>;
141
+ variant: Ref<BladeVariant>;
142
+ }
143
+
145
144
  export declare interface BTCosmetics {
146
145
  state: Ref<CosmeticData>;
147
146
  resetCosmetics: (toDefault: boolean) => void;
@@ -625,13 +624,9 @@ export declare interface ListProps {
625
624
  onSelectItem?: (item: any) => void;
626
625
  params?: any;
627
626
  proxyID?: string;
628
- proxyQueryKey?: string;
629
627
  refreshToggle?: boolean;
630
628
  searchProps?: string[];
631
- searchQueryKey?: string;
632
629
  selectProps?: string[];
633
- sortBy?: string;
634
- sortOrder?: 'Ascending' | 'Descending';
635
630
  showSearch?: boolean;
636
631
  startShowingInactive?: boolean;
637
632
  storeMode?: StoreMode;
@@ -794,6 +789,8 @@ export declare interface NavigationItem extends AuthItem {
794
789
  singleName?: string;
795
790
  /**what kind of store is needed for this api item */
796
791
  storeMode?: StoreMode;
792
+ /**what kind of storage mode is needed for this api item */
793
+ storageMode?: StorageMode;
797
794
  /**this nav item is restricted to these subscriptions. So the user needs to have at least one of these subscription codes. */
798
795
  subscriptions?: string[];
799
796
  /**this nav item is preferred in this subscription codes. */
@@ -1034,10 +1031,16 @@ export declare function useAuth(): BTAuth;
1034
1031
 
1035
1032
  export declare function useAuthUrl(): string;
1036
1033
 
1037
- export declare function useBladeUI(bladeProps: BladeProps, blade: Ref<ComponentPublicInstance | null>, handle: Ref<ComponentPublicInstance | null>): {
1038
- isMobile: Ref<boolean>;
1039
- variant: Ref<BladeVariant | undefined>;
1040
- };
1034
+ export declare function useBlade(options?: UseBladeOptions): BTBlade;
1035
+
1036
+ declare interface UseBladeOptions {
1037
+ bladeID?: string;
1038
+ bladeName?: string;
1039
+ blade?: Ref<ComponentPublicInstance | null>;
1040
+ defaultVariant?: BladeVariant;
1041
+ handle?: Ref<ComponentPublicInstance | null>;
1042
+ mobileBreakpoint?: number;
1043
+ }
1041
1044
 
1042
1045
  export declare function useCosmetics(): BTCosmetics;
1043
1046
 
@@ -1169,12 +1172,14 @@ export declare interface UseItemOptions {
1169
1172
  /**
1170
1173
  * PROPS first
1171
1174
  * ROUTE second
1175
+ * page=1
1176
+ *
1172
1177
  * BLADE third
1173
1178
  * @param props
1174
1179
  * @param emit
1175
1180
  * @param options
1176
1181
  */
1177
- export declare function useList(props: ListProps, emit?: ListEvents, options?: UseListOptions): {
1182
+ export declare function useList(props: ListProps, emit?: ListEvents): {
1178
1183
  add: (variant: BladeVariant_2) => void;
1179
1184
  asyncItems: Ref<any[]>;
1180
1185
  currentPage: Ref<number>;
@@ -1244,7 +1249,6 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
1244
1249
  showError: ShallowRef<boolean>;
1245
1250
  showInactive: Ref<boolean>;
1246
1251
  showSearch: ShallowRef<boolean>;
1247
- sortOrder: Ref<"Ascending" | "Descending" | undefined>;
1248
1252
  subtitleOptions: ComputedRef<GroupedHeaderOption[]>;
1249
1253
  tableHeaders: ComputedRef< {
1250
1254
  align?: "start" | "end" | "center" | undefined;
@@ -1275,13 +1279,6 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
1275
1279
  totalPages: Ref<number>;
1276
1280
  };
1277
1281
 
1278
- export declare interface UseListOptions {
1279
- storeMode?: StoreMode;
1280
- storageMode?: StorageMode;
1281
- useBladeSrc?: boolean;
1282
- useRouteSrc?: boolean;
1283
- }
1284
-
1285
1282
  export declare function useLocalCache(): {
1286
1283
  clearAsync: (storeName: string) => Promise<void>;
1287
1284
  getAsync: <T>(key: string) => Promise<T | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.45",
3
+ "version": "1.4.47",
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": {
@@ -41,11 +41,11 @@
41
41
  "thenby": "^1.3.4"
42
42
  },
43
43
  "peerDependencies": {
44
+ "@vueuse/core": "^10.4.1",
45
+ "pinia": "^2.1.7",
44
46
  "vue": "^3.4.21",
45
47
  "vue-router": "^4.0.0",
46
- "vuetify": "^3.4.10",
47
- "pinia": "^2.1.7",
48
- "@vueuse/core": "^10.4.1"
48
+ "vuetify": "^3.6.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@testing-library/vue": "^8.0.3",