bt-core-app 1.4.2 → 1.4.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 +1273 -41
- package/package.json +9 -2
- package/dist/composables/actions-tracker.d.ts +0 -19
- package/dist/composables/actions.d.ts +0 -79
- package/dist/composables/api.d.ts +0 -86
- package/dist/composables/auth.d.ts +0 -70
- package/dist/composables/cosmetics.d.ts +0 -38
- package/dist/composables/csv.d.ts +0 -20
- package/dist/composables/dates.d.ts +0 -15
- package/dist/composables/demo.d.ts +0 -9
- package/dist/composables/dialogs.d.ts +0 -75
- package/dist/composables/document-meta.d.ts +0 -11
- package/dist/composables/draggable.d.ts +0 -56
- package/dist/composables/filters.d.ts +0 -11
- package/dist/composables/forage.d.ts +0 -7
- package/dist/composables/helpers.d.ts +0 -100
- package/dist/composables/id.d.ts +0 -1
- package/dist/composables/list.d.ts +0 -211
- package/dist/composables/navigation.d.ts +0 -89
- package/dist/composables/presets.d.ts +0 -8
- package/dist/composables/pwa.d.ts +0 -14
- package/dist/composables/resizable.d.ts +0 -35
- package/dist/composables/rules.d.ts +0 -7
- package/dist/composables/stores.d.ts +0 -111
- package/dist/composables/track.d.ts +0 -12
- package/dist/composables/urls.d.ts +0 -22
- package/dist/core.d.ts +0 -19
- package/dist/types.d.ts +0 -13
- package/dist/useApi.d.ts +0 -0
- package/src/assets/vue.svg +0 -1
- package/src/components/BT-Btn.vue +0 -41
- package/src/components/BT-Col.vue +0 -36
- package/src/components/BT-Field-Checkbox.vue +0 -70
- package/src/components/BT-Field-Date.vue +0 -108
- package/src/components/BT-Field-Entity.vue +0 -48
- package/src/components/BT-Field-Select.vue +0 -67
- package/src/components/BT-Field-String.vue +0 -78
- package/src/components/BT-Field-Switch.vue +0 -68
- package/src/components/BT-Field-Tags.vue +0 -66
- package/src/components/BT-Field-Textarea.vue +0 -67
- package/src/components/BT-Field-Trigger.vue +0 -315
- package/src/components/BT-Header-Option.vue +0 -39
- package/src/components/BT-Json.vue +0 -67
- package/src/components/BT-Nav-Menu-Item.vue +0 -60
- package/src/components/BT-Nav-Sidebar.vue +0 -78
- package/src/components/BT-Select-List-Box.vue +0 -258
- package/src/components/BT-Select.vue +0 -46
- package/src/components/BT-Snack.vue +0 -31
- package/src/components/BT-Span.vue +0 -21
- package/src/components/Dialog-Confirm.vue +0 -47
- package/src/components/Dialog-Select-Date.vue +0 -89
- package/src/components/Dialog-Select.vue +0 -140
- package/src/components/Dialog-Text.vue +0 -59
- package/src/composables/actions-tracker.ts +0 -99
- package/src/composables/actions.ts +0 -354
- package/src/composables/api.ts +0 -479
- package/src/composables/auth.ts +0 -452
- package/src/composables/cosmetics.ts +0 -177
- package/src/composables/csv.ts +0 -198
- package/src/composables/dates.ts +0 -86
- package/src/composables/demo.ts +0 -33
- package/src/composables/dialogs.ts +0 -114
- package/src/composables/document-meta.ts +0 -44
- package/src/composables/draggable.ts +0 -189
- package/src/composables/filters.ts +0 -264
- package/src/composables/forage.ts +0 -49
- package/src/composables/helpers.ts +0 -647
- package/src/composables/id.ts +0 -20
- package/src/composables/list.ts +0 -604
- package/src/composables/navigation.ts +0 -222
- package/src/composables/presets.ts +0 -28
- package/src/composables/pwa.ts +0 -97
- package/src/composables/resizable.ts +0 -382
- package/src/composables/rules.ts +0 -40
- package/src/composables/stores.ts +0 -818
- package/src/composables/track.ts +0 -55
- package/src/composables/urls.ts +0 -66
- package/src/core.ts +0 -113
- package/src/index.ts +0 -48
- package/src/types.ts +0 -17
- package/src/useApi.ts +0 -68
- package/src/vite-env.d.ts +0 -1
- package/test/api.test.ts +0 -84
- package/test/auth.test.ts +0 -74
- package/test/forage.test.ts +0 -31
- package/test/helpers.test.ts +0 -231
- package/test/navigation.test.ts +0 -99
- package/test/stores-last-update.test.ts +0 -138
- package/test/stores-session.test.ts +0 -118
- package/test/track.test.ts +0 -29
- package/test/urls.test.ts +0 -42
- package/test/utils.ts +0 -15
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -11
- package/vite.config.ts +0 -45
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1,1273 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ComponentPublicInstance } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
import { DateTime } from 'luxon';
|
|
5
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
6
|
+
import { MaybeRefOrGetter as MaybeRefOrGetter_2 } from '@vueuse/core';
|
|
7
|
+
import { Position } from '@vueuse/core';
|
|
8
|
+
import { Ref } from 'vue';
|
|
9
|
+
import { RemovableRef } from '@vueuse/core';
|
|
10
|
+
import { RouteLocationNormalized } from 'vue-router';
|
|
11
|
+
import { ShallowRef } from 'vue';
|
|
12
|
+
import { Store } from 'pinia';
|
|
13
|
+
import { StoreDefinition } from 'pinia';
|
|
14
|
+
|
|
15
|
+
/**adds and sorts the weekday string */
|
|
16
|
+
export declare function addWeekday(weekdays?: string, day?: string): string | undefined;
|
|
17
|
+
|
|
18
|
+
export declare interface ApiActionOptions extends PathOptions, DoActionOptions {
|
|
19
|
+
api: BTApi;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare function appendUrl(originalVal?: string, additionalVal?: string): string;
|
|
23
|
+
|
|
24
|
+
export declare interface AuthItem {
|
|
25
|
+
children?: AuthItem[];
|
|
26
|
+
ignoreSuspension?: boolean;
|
|
27
|
+
permissions?: string[];
|
|
28
|
+
requiresAuth?: boolean;
|
|
29
|
+
subscriptions?: string[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface AuthSubscription {
|
|
33
|
+
code: string;
|
|
34
|
+
value: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export declare interface BaseAuthCredentials {
|
|
38
|
+
expiresOn?: string;
|
|
39
|
+
isGlobalAdmin?: boolean;
|
|
40
|
+
isLoggedIn?: boolean;
|
|
41
|
+
isSuspended?: boolean;
|
|
42
|
+
permissions?: string;
|
|
43
|
+
subscriptionCode?: string;
|
|
44
|
+
timeZone?: string;
|
|
45
|
+
token?: string;
|
|
46
|
+
userID?: string;
|
|
47
|
+
userPermissions?: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare interface BaseCosmeticTheme {
|
|
51
|
+
primary: string;
|
|
52
|
+
secondary: string;
|
|
53
|
+
accent: string;
|
|
54
|
+
error: string;
|
|
55
|
+
info: string;
|
|
56
|
+
success: string;
|
|
57
|
+
warning: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export declare interface BaseModel {
|
|
61
|
+
id?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export declare type BladeDensity = 'default' | 'comfortable' | 'compact';
|
|
65
|
+
|
|
66
|
+
export declare type BladeMode = 'new' | 'view' | 'edit';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
Inline: merges toolbars | much more compact | hides navigation
|
|
70
|
+
Page: shows navigation and page settings
|
|
71
|
+
Blade: shows blade minimize, maximize, close, and pins as a column
|
|
72
|
+
Free-moving: show blade as draggable and resizable with minimize, maximize, and close and pinning
|
|
73
|
+
*/
|
|
74
|
+
export declare type BladeVariant = 'page' | 'blade' | 'freestyle' | 'inline' | 'pane';
|
|
75
|
+
|
|
76
|
+
export declare interface BTActions {
|
|
77
|
+
apiGet: (doOptions: ApiActionOptions) => Promise<any>;
|
|
78
|
+
apiPost: (doOptions: ApiActionOptions) => Promise<any>;
|
|
79
|
+
actionLoadingMsg: ShallowRef<string | undefined>;
|
|
80
|
+
actionErrorMsg: ShallowRef<string | undefined>;
|
|
81
|
+
clearErrors: () => void;
|
|
82
|
+
deleteItem: (doOptions: DeleteOptions) => Promise<any>;
|
|
83
|
+
doAction: (action: any, options?: DoActionOptions) => Promise<any>;
|
|
84
|
+
getAllItems: (doOptions: GetOptions) => Promise<any>;
|
|
85
|
+
getItem: (doOptions: GetOptions) => Promise<any>;
|
|
86
|
+
isLoading: ComputedRef<boolean>;
|
|
87
|
+
logError: (err?: string | Error) => void;
|
|
88
|
+
restoreItem: (doOptions: RestoreOptions) => Promise<any>;
|
|
89
|
+
saveItem: (doOptions: SaveOptions) => Promise<any>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export declare interface BTApi {
|
|
93
|
+
buildHeaders: (options: PathOptions) => HeadersInit;
|
|
94
|
+
buildQuery: (params: any) => string;
|
|
95
|
+
buildUrl: (path: PathOptions) => string;
|
|
96
|
+
deleteItem: (pathOptions: PathOptions) => Promise<string | undefined>;
|
|
97
|
+
get: <T>(pathOptions: PathOptions) => Promise<T>;
|
|
98
|
+
getAll: <T>(pathOptions: PathOptions) => Promise<T>;
|
|
99
|
+
post: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
100
|
+
patch: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare interface BTAuth {
|
|
104
|
+
authState: string;
|
|
105
|
+
canEdit: (navName?: string) => boolean;
|
|
106
|
+
canEditPermit: (permit: string) => boolean;
|
|
107
|
+
canView: (navName?: string) => boolean;
|
|
108
|
+
canViewPermit: (permit: string) => boolean;
|
|
109
|
+
credentials: RemovableRef<any>;
|
|
110
|
+
doShow: (subcodes?: string[], permissions?: string[], action?: 'view' | 'edit') => boolean;
|
|
111
|
+
doShowByNav: (navName?: string | AuthItem, includeChildren?: boolean) => boolean;
|
|
112
|
+
getAuthorizeUrl: (redirectPath?: string) => string;
|
|
113
|
+
getTimeZone: () => string;
|
|
114
|
+
getToken: (code?: string, state?: string) => Promise<void>;
|
|
115
|
+
isLoggedIn: ComputedRef<boolean>;
|
|
116
|
+
login: (redirectPath?: string) => void;
|
|
117
|
+
logout: (navNameRedirect?: string) => void;
|
|
118
|
+
setAuth: (jwtToken?: string) => void;
|
|
119
|
+
timeZone: ComputedRef<string>;
|
|
120
|
+
tryLogin: () => boolean | undefined;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export declare interface BTCosmetics {
|
|
124
|
+
state: RemovableRef<CosmeticData>;
|
|
125
|
+
initiate: () => void;
|
|
126
|
+
resetCosmetics: (toDefault: boolean) => void;
|
|
127
|
+
setTemporaryColor: (color: string) => void;
|
|
128
|
+
toggleDrawer: () => void;
|
|
129
|
+
toggleDrawerStick: () => void;
|
|
130
|
+
toggleLightDark: () => void;
|
|
131
|
+
undoTemporaryColor: () => void;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare interface BTDates {
|
|
135
|
+
getToday: () => string;
|
|
136
|
+
getTomorrow: () => string;
|
|
137
|
+
tzDate: (val?: string, fromFormat?: string) => DateTime;
|
|
138
|
+
tzString: (val?: string, format?: string, fromFormat?: string) => string;
|
|
139
|
+
utcDate: (val?: string, fromFormat?: string) => DateTime;
|
|
140
|
+
utcString: (val?: string, format?: string, fromFormat?: string) => string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare interface BTDemo {
|
|
144
|
+
endDemo: () => void;
|
|
145
|
+
isDemoing: Ref<boolean>;
|
|
146
|
+
startDemo: () => void;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export declare interface BTDocumentMeta {
|
|
150
|
+
updateMeta: (to: RouteLocationNormalized) => void;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare interface BTFilters {
|
|
154
|
+
findFilter: (mFilter: string | undefined) => Function;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export declare interface BTNavigation {
|
|
158
|
+
showAppBar: Ref<boolean>;
|
|
159
|
+
showAppNavigation: Ref<boolean>;
|
|
160
|
+
backgroundName: Ref<string | undefined>;
|
|
161
|
+
hesitate: Ref<boolean>;
|
|
162
|
+
navigationItems: NavigationItem[];
|
|
163
|
+
findArchiveName: (navName?: string) => string | undefined;
|
|
164
|
+
findCacheHours: (navName?: string) => number;
|
|
165
|
+
findDisplay: (navName?: string) => string | undefined;
|
|
166
|
+
findIcon: (navName?: string) => string | undefined;
|
|
167
|
+
findItem: (navName?: string | NavigationItem) => NavigationItem | null;
|
|
168
|
+
findStoreName: (navName?: string) => string;
|
|
169
|
+
findPath: (navName?: string) => string | undefined;
|
|
170
|
+
findSingleDisplay: (navName?: string) => string | undefined;
|
|
171
|
+
updateNavigationProperties: (navName?: string | NavigationItem) => void;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export declare interface BTPresets {
|
|
175
|
+
usePresets(preset?: string): any;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export declare interface BTPWA {
|
|
179
|
+
canInstallApp: Ref<boolean>;
|
|
180
|
+
canUpdateApp: Ref<boolean>;
|
|
181
|
+
installApp: () => void;
|
|
182
|
+
isInstalled: () => boolean;
|
|
183
|
+
updateApp: () => void;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export declare interface BTStore extends Store<any, {}, {}, {
|
|
187
|
+
deleteItem: (dOptions: PathOptions) => Promise<string | undefined>;
|
|
188
|
+
get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>;
|
|
189
|
+
getAll: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetAllReturn<T>>;
|
|
190
|
+
patch: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
191
|
+
post: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
192
|
+
restore: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
193
|
+
}> {
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export declare interface BTStoreDefinition extends StoreDefinition<any, {}, {}, {
|
|
197
|
+
deleteItem: (dOptions: PathOptions) => Promise<string | undefined>;
|
|
198
|
+
get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>;
|
|
199
|
+
getAll: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetAllReturn<T>>;
|
|
200
|
+
patch: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
201
|
+
post: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
202
|
+
restore: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
203
|
+
}> {
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export declare function capitalizeWords(val?: string): string | undefined;
|
|
207
|
+
|
|
208
|
+
export declare function checkImage(url?: string, goodCallback?: any, badCallback?: any): void;
|
|
209
|
+
|
|
210
|
+
/**whether string is contained somewhere in this value */
|
|
211
|
+
export declare function containsSearch(value?: string, str?: string): boolean;
|
|
212
|
+
|
|
213
|
+
/**whether the csv string contains the weekday
|
|
214
|
+
* returns true if either prop is undefined
|
|
215
|
+
*/
|
|
216
|
+
export declare function containsWeekday(weekdays?: string, wkDay?: string): boolean;
|
|
217
|
+
|
|
218
|
+
/**copies object and all descendant properties */
|
|
219
|
+
export declare function copyDeep(aObject: any): any;
|
|
220
|
+
|
|
221
|
+
/**copies object and returns copied object with descendant properties placed in alphabetical order */
|
|
222
|
+
export declare function copyItemByAlphabet(aObject: any): any;
|
|
223
|
+
|
|
224
|
+
export declare interface CoreApp {
|
|
225
|
+
install(app: App): void;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare interface CosmeticData {
|
|
229
|
+
dark?: BaseCosmeticTheme;
|
|
230
|
+
drawer?: boolean;
|
|
231
|
+
drawerStick?: boolean;
|
|
232
|
+
light?: BaseCosmeticTheme;
|
|
233
|
+
theme?: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export declare function createApi(options?: UseApiOptions): BTApi;
|
|
237
|
+
|
|
238
|
+
export declare function createAuth(options: CreateAuthOptions): BTAuth;
|
|
239
|
+
|
|
240
|
+
export declare interface CreateAuthOptions {
|
|
241
|
+
defaultTimeZone?: string;
|
|
242
|
+
demo?: BTDemo;
|
|
243
|
+
/**expiry token date format. Defaults to 'd/MM/yyyy h:mm:ss a' */
|
|
244
|
+
expiryTokenFormat?: string;
|
|
245
|
+
/**OVERRIDES CORE DEFAULT. retrieve the auth item */
|
|
246
|
+
getAuthItem?: (navName?: string | AuthItem) => AuthItem | null;
|
|
247
|
+
/**OVERRIDES DEFAULT. the url to start the OAuth 2.0 process */
|
|
248
|
+
getAuthorizeUrl?: (redirectPath?: string, state?: string) => string;
|
|
249
|
+
/**OVERRIDES DEFAULT. use the given code and generate the url to convert to an access token */
|
|
250
|
+
getTokenUrl?: (code: string, redirect_uri: string, grant_type: string, client_id: string) => string;
|
|
251
|
+
/**OVERRIDES DEFAULT. */
|
|
252
|
+
getToken?: (code?: string, state?: string) => Promise<void>;
|
|
253
|
+
oauthGrantType?: string;
|
|
254
|
+
oauthClientID?: string;
|
|
255
|
+
/**sets current credentials on top of default function
|
|
256
|
+
* for processing the token payload and applying to state
|
|
257
|
+
*/
|
|
258
|
+
processTokenPayload?: (state: RemovableRef<any>, payload: any) => void;
|
|
259
|
+
/**suboptions */
|
|
260
|
+
subscriptionOptions?: AuthSubscription[];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export declare function createCore(options: CreateCoreOptions): CoreApp;
|
|
264
|
+
|
|
265
|
+
export declare interface CreateCoreOptions extends UseCosmeticsOptions<BaseCosmeticTheme> {
|
|
266
|
+
auth: CreateAuthOptions;
|
|
267
|
+
defaultCacheExpiryHours?: number;
|
|
268
|
+
navItems?: NavigationItem[];
|
|
269
|
+
presets: any;
|
|
270
|
+
/**suboptions */
|
|
271
|
+
subscriptionOptions?: AuthSubscription[];
|
|
272
|
+
urls: CreateUrlOptions;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export declare function createCosmetics<T extends BaseCosmeticTheme>(options: UseCosmeticsOptions<T>): void;
|
|
276
|
+
|
|
277
|
+
export declare function createDates(options: CreateDatesOptions): BTDates;
|
|
278
|
+
|
|
279
|
+
export declare interface CreateDatesOptions {
|
|
280
|
+
getTimeZone: () => string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export declare function createDemo(): BTDemo;
|
|
284
|
+
|
|
285
|
+
export declare function createFilters(options: UseFiltersOptions): BTFilters;
|
|
286
|
+
|
|
287
|
+
export declare function createNavigation(options: UseNavigationOptions): BTNavigation;
|
|
288
|
+
|
|
289
|
+
export declare function createPresets(options: CreatePresetsOptions): BTPresets;
|
|
290
|
+
|
|
291
|
+
export declare interface CreatePresetsOptions {
|
|
292
|
+
presets: any;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export declare function createPWA(): BTPWA;
|
|
296
|
+
|
|
297
|
+
export declare function createSessionStoreDefinition(options: UseSessionStoreOptions): BTStoreDefinition;
|
|
298
|
+
|
|
299
|
+
export declare function createStoreBuilder(options: CreateStoreBuilderOptions): (opt: CreateStoreOptions) => BTStoreDefinition;
|
|
300
|
+
|
|
301
|
+
export declare interface CreateStoreBuilderOptions {
|
|
302
|
+
/**ideally required. Otherwise will struggle to find url path */
|
|
303
|
+
api?: BTApi;
|
|
304
|
+
/**ideally required. For setting unique local storage keys */
|
|
305
|
+
auth?: BTAuth;
|
|
306
|
+
/**build a query. Overrides the default */
|
|
307
|
+
builderQuery?: (params: any) => string;
|
|
308
|
+
/**overrides the default */
|
|
309
|
+
buildUrl?: (path: PathOptions) => string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export declare function createStoreDefinition(options: UseStoreOptions): BTStoreDefinition;
|
|
313
|
+
|
|
314
|
+
export declare interface CreateStoreOptions {
|
|
315
|
+
/**particularly what store syle to use */
|
|
316
|
+
storeMode: StoreMode;
|
|
317
|
+
/**whether to store data locally or only for the duration of the session */
|
|
318
|
+
storageMode: StorageMode;
|
|
319
|
+
/**the name of this store */
|
|
320
|
+
storeName: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export declare function createUrl(options: CreateUrlOptions): CreateUrlOptions;
|
|
324
|
+
|
|
325
|
+
declare interface CreateUrlOptions {
|
|
326
|
+
production: UrlSet;
|
|
327
|
+
staging: UrlSet;
|
|
328
|
+
development: UrlSet;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export declare function createWholeLastUpdateStoreDefinition(options: UseWholeLastUpdateStoreOptions): BTStoreDefinition;
|
|
332
|
+
|
|
333
|
+
export declare function csvContains(value?: string, tag?: string): boolean;
|
|
334
|
+
|
|
335
|
+
export declare const csvDefaults: {
|
|
336
|
+
canExportCSV: boolean;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export declare interface CSVItem {
|
|
340
|
+
header: string;
|
|
341
|
+
itemText?: string;
|
|
342
|
+
value: any;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export declare interface CSVProps {
|
|
346
|
+
canExportCSV?: boolean;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export declare interface CustomFilterParam {
|
|
350
|
+
name: string;
|
|
351
|
+
filterFunction: () => string;
|
|
352
|
+
onFilterResult: Function | null;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export declare function DataURIToBlob(dataURI: any): Blob;
|
|
356
|
+
|
|
357
|
+
/**must be an object. Returns a flat map of all items in the prop selector */
|
|
358
|
+
export declare function deepSelect(obj: any, propSelector?: Function): any[];
|
|
359
|
+
|
|
360
|
+
export declare interface DeleteOptions extends PathOptions, DoActionOptions {
|
|
361
|
+
/**Returns a string if cannot */
|
|
362
|
+
onCanDeleteAsync?: OnCanDoAsync;
|
|
363
|
+
/**Will override the default store delete action */
|
|
364
|
+
onDeleteAsync?: OnDoAsync;
|
|
365
|
+
/**Will open a dialog box requesting user confirmation for delete action */
|
|
366
|
+
onDeleteSuccessAsync?: OnDoAsync;
|
|
367
|
+
store?: BTStoreDefinition;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare interface DoActionOptions {
|
|
371
|
+
completionMsg?: string;
|
|
372
|
+
confirmationMsg?: string;
|
|
373
|
+
errorMsg?: string;
|
|
374
|
+
loadingMsg?: string;
|
|
375
|
+
requireConfirmation?: boolean;
|
|
376
|
+
throwError?: boolean;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export declare function extensionExists(elementId?: string): boolean;
|
|
380
|
+
|
|
381
|
+
export declare interface ExternalNavigation {
|
|
382
|
+
canPull?: boolean;
|
|
383
|
+
canPush?: boolean;
|
|
384
|
+
convertFunc?: Function;
|
|
385
|
+
name?: string;
|
|
386
|
+
localNavigation?: string;
|
|
387
|
+
localDisplayPath?: string;
|
|
388
|
+
localComparePath?: string;
|
|
389
|
+
syncComparePath?: string;
|
|
390
|
+
syncDisplayPath?: string;
|
|
391
|
+
syncIDPath?: string;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export declare interface ExternalParty {
|
|
395
|
+
party?: string;
|
|
396
|
+
property?: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export declare function extractErrorDescription(error: any): string;
|
|
400
|
+
|
|
401
|
+
export declare type FieldVariant = 'underlined' | 'outlined' | 'filled' | 'solo' | 'solo-inverted' | 'solo-filled' | 'plain';
|
|
402
|
+
|
|
403
|
+
declare type FindPath = (navName?: string) => string | undefined;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
* @param val Converts string from camel case to every word being capitalized and spaces between
|
|
408
|
+
* @returns
|
|
409
|
+
*/
|
|
410
|
+
export declare function fromCamelCase(val?: string): string | undefined;
|
|
411
|
+
|
|
412
|
+
declare interface GeoCoordinate {
|
|
413
|
+
lat: number;
|
|
414
|
+
lng: number;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* get area around a certain location with a space of the given size
|
|
419
|
+
* @param location
|
|
420
|
+
* @param radius
|
|
421
|
+
* @returns
|
|
422
|
+
*/
|
|
423
|
+
export declare function getAreaAround(location: GeoCoordinate, radius: number): {
|
|
424
|
+
lat: number;
|
|
425
|
+
lng: number;
|
|
426
|
+
}[];
|
|
427
|
+
|
|
428
|
+
/**get square area using the location as the far right line */
|
|
429
|
+
export declare function getAreaToLeft(location: GeoCoordinate, radius: number): {
|
|
430
|
+
lat: number;
|
|
431
|
+
lng: number;
|
|
432
|
+
}[];
|
|
433
|
+
|
|
434
|
+
/**get square area using the location as the far left line */
|
|
435
|
+
export declare function getAreaToRight(location: GeoCoordinate, radius: number): {
|
|
436
|
+
lat: number;
|
|
437
|
+
lng: number;
|
|
438
|
+
}[];
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
*
|
|
442
|
+
* @param value converts location to a single string and standardizes state and road names, etc.
|
|
443
|
+
* @returns
|
|
444
|
+
*/
|
|
445
|
+
export declare function getGoogleMapsLocationLine(value: any): any;
|
|
446
|
+
|
|
447
|
+
export declare function getImageData(url?: string, throwErrorOnFail?: boolean): Promise<unknown>;
|
|
448
|
+
|
|
449
|
+
export declare function getLocationLine(value: any, forGoogle?: boolean): any;
|
|
450
|
+
|
|
451
|
+
export declare function getMinDate(): number;
|
|
452
|
+
|
|
453
|
+
export declare function getMinDateString(): string;
|
|
454
|
+
|
|
455
|
+
export declare interface GetOptions extends PathOptions, DoActionOptions {
|
|
456
|
+
/**returns an error msg if failed */
|
|
457
|
+
onGetAsync?: OnGetAsync;
|
|
458
|
+
/**called after get occurs successfully */
|
|
459
|
+
onGetSuccessAsync?: OnGetSuccessAsync;
|
|
460
|
+
store?: BTStoreDefinition;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export declare function getRandomColor(): string;
|
|
464
|
+
|
|
465
|
+
export declare interface GroupedHeaderOption {
|
|
466
|
+
position: number;
|
|
467
|
+
values: TableColumn[];
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**tests for whether string is contains in any of the given props of the given value */
|
|
471
|
+
export declare function hasSearch(value: any, str?: string, props?: string[]): boolean;
|
|
472
|
+
|
|
473
|
+
export declare function isArrayOfLength(val: any, l: number): boolean;
|
|
474
|
+
|
|
475
|
+
export declare function isLengthyArray(val: any, greaterThan?: number): boolean;
|
|
476
|
+
|
|
477
|
+
export declare function isMinDate(d?: string): boolean;
|
|
478
|
+
|
|
479
|
+
export declare interface ListEvents {
|
|
480
|
+
(e: 'change', item: any): void;
|
|
481
|
+
(e: 'deleted', item: any): void;
|
|
482
|
+
(e: 'input', item: any): void;
|
|
483
|
+
(e: 'select', item: any): void;
|
|
484
|
+
(e: 'mouse-over-item', item: any): void;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export declare interface ListProps {
|
|
488
|
+
additionalUrl?: string;
|
|
489
|
+
bladeName?: string;
|
|
490
|
+
canAdd?: boolean;
|
|
491
|
+
canDelete?: boolean;
|
|
492
|
+
canEdit?: boolean;
|
|
493
|
+
canRestore?: boolean;
|
|
494
|
+
canShowInactive?: boolean;
|
|
495
|
+
canSelect?: boolean;
|
|
496
|
+
canUnselect?: boolean;
|
|
497
|
+
confirmOnDelete?: boolean;
|
|
498
|
+
customFilters?: CustomFilterParam[];
|
|
499
|
+
defaultFilters?: string[];
|
|
500
|
+
dividers?: boolean;
|
|
501
|
+
eager?: boolean;
|
|
502
|
+
errorMsg?: string;
|
|
503
|
+
headers?: TableColumn[];
|
|
504
|
+
hideActions?: boolean;
|
|
505
|
+
hideColumns?: boolean;
|
|
506
|
+
hideFilters?: boolean;
|
|
507
|
+
hideRefresh?: boolean;
|
|
508
|
+
hideSubtoolbarSettings?: boolean;
|
|
509
|
+
includeDetails?: boolean;
|
|
510
|
+
isSingle?: boolean;
|
|
511
|
+
itemBladeName?: string;
|
|
512
|
+
itemID?: string;
|
|
513
|
+
items?: any[];
|
|
514
|
+
itemsPerPage?: number;
|
|
515
|
+
itemText?: string;
|
|
516
|
+
lines?: 'one' | 'two' | 'three';
|
|
517
|
+
loadingMsg?: string;
|
|
518
|
+
localOnly?: boolean;
|
|
519
|
+
nav?: string;
|
|
520
|
+
/**for defining if deletable (show button or not) */
|
|
521
|
+
onCanDelete?: (item: any) => boolean;
|
|
522
|
+
/**when trying to delete in api */
|
|
523
|
+
onCanDeleteAsync?: OnCanDoAsync;
|
|
524
|
+
onGetSaveAsync?: OnDoSuccessAsync;
|
|
525
|
+
onCanRestore?: (item: any) => boolean;
|
|
526
|
+
onCanRestoreAsync?: OnCanDoAsync;
|
|
527
|
+
onCanSaveAsync?: OnCanDoAsync;
|
|
528
|
+
onCanSelectItem?: (item: any) => boolean;
|
|
529
|
+
onDeleteAsync?: OnDoAsync;
|
|
530
|
+
onDeleteSuccessAsync?: OnDoAsync;
|
|
531
|
+
onFilter?: Function;
|
|
532
|
+
onGetAsync?: OnGetAsync;
|
|
533
|
+
onGetSuccessAsync?: OnGetSuccessAsync;
|
|
534
|
+
onRestoreAsync?: OnDoSuccessAsync;
|
|
535
|
+
onRestoreSuccessAsync?: OnDoSuccessAsync;
|
|
536
|
+
onSaveAsync?: OnDoSuccessAsync;
|
|
537
|
+
onSaveSuccessAsync?: OnDoSuccessAsync;
|
|
538
|
+
onSelectItem?: (item: any) => void;
|
|
539
|
+
params?: any;
|
|
540
|
+
proxyID?: string;
|
|
541
|
+
proxyQueryKey?: string;
|
|
542
|
+
refreshToggle?: boolean;
|
|
543
|
+
searchProps?: string[];
|
|
544
|
+
searchQueryKey?: string;
|
|
545
|
+
selectProps?: string[];
|
|
546
|
+
sortBy?: string;
|
|
547
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
548
|
+
showListOnly?: boolean;
|
|
549
|
+
showTableOnly?: boolean;
|
|
550
|
+
showSearch?: boolean;
|
|
551
|
+
startShowingInactive?: boolean;
|
|
552
|
+
storeMode?: StoreMode;
|
|
553
|
+
storageMode?: StorageMode;
|
|
554
|
+
useInterEvents?: boolean;
|
|
555
|
+
useServerPagination?: boolean;
|
|
556
|
+
useBladeSrc?: boolean;
|
|
557
|
+
useRouteSrc?: boolean;
|
|
558
|
+
variant?: BladeVariant;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
declare interface LocalForage extends LocalForageDbMethods {
|
|
562
|
+
LOCALSTORAGE: string;
|
|
563
|
+
WEBSQL: string;
|
|
564
|
+
INDEXEDDB: string;
|
|
565
|
+
/**
|
|
566
|
+
* Set and persist localForage options. This must be called before any other calls to localForage are made, but can be called after localForage is loaded.
|
|
567
|
+
* If you set any config values with this method they will persist after driver changes, so you can call config() then setDriver()
|
|
568
|
+
* @param {LocalForageOptions} options?
|
|
569
|
+
*/
|
|
570
|
+
config(options: LocalForageOptions): boolean;
|
|
571
|
+
config(options: string): any;
|
|
572
|
+
config(): LocalForageOptions;
|
|
573
|
+
/**
|
|
574
|
+
* Create a new instance of localForage to point to a different store.
|
|
575
|
+
* All the configuration options used by config are supported.
|
|
576
|
+
* @param {LocalForageOptions} options
|
|
577
|
+
*/
|
|
578
|
+
createInstance(options: LocalForageOptions): LocalForage;
|
|
579
|
+
driver(): string;
|
|
580
|
+
/**
|
|
581
|
+
* Force usage of a particular driver or drivers, if available.
|
|
582
|
+
* @param {string} driver
|
|
583
|
+
*/
|
|
584
|
+
setDriver(driver: string | string[], callback?: () => void, errorCallback?: (error: any) => void): Promise<void>;
|
|
585
|
+
defineDriver(driver: LocalForageDriver, callback?: () => void, errorCallback?: (error: any) => void): Promise<void>;
|
|
586
|
+
/**
|
|
587
|
+
* Return a particular driver
|
|
588
|
+
* @param {string} driver
|
|
589
|
+
*/
|
|
590
|
+
getDriver(driver: string): Promise<LocalForageDriver>;
|
|
591
|
+
getSerializer(callback?: (serializer: LocalForageSerializer) => void): Promise<LocalForageSerializer>;
|
|
592
|
+
supports(driverName: string): boolean;
|
|
593
|
+
ready(callback?: (error: any) => void): Promise<void>;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
declare interface LocalForageDbInstanceOptions {
|
|
597
|
+
name?: string;
|
|
598
|
+
storeName?: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
declare interface LocalForageDbMethods extends LocalForageDbMethodsCore, LocalForageDbMethodsOptional {
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
declare interface LocalForageDbMethodsCore {
|
|
605
|
+
getItem<T>(key: string, callback?: (err: any, value: T | null) => void): Promise<T | null>;
|
|
606
|
+
setItem<T>(key: string, value: T, callback?: (err: any, value: T) => void): Promise<T>;
|
|
607
|
+
removeItem(key: string, callback?: (err: any) => void): Promise<void>;
|
|
608
|
+
clear(callback?: (err: any) => void): Promise<void>;
|
|
609
|
+
length(callback?: (err: any, numberOfKeys: number) => void): Promise<number>;
|
|
610
|
+
key(keyIndex: number, callback?: (err: any, key: string) => void): Promise<string>;
|
|
611
|
+
keys(callback?: (err: any, keys: string[]) => void): Promise<string[]>;
|
|
612
|
+
iterate<T, U>(iteratee: (value: T, key: string, iterationNumber: number) => U, callback?: (err: any, result: U) => void): Promise<U>;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
declare interface LocalForageDbMethodsOptional {
|
|
616
|
+
dropInstance: LocalForageDropInstanceFn;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
declare interface LocalForageDriver extends LocalForageDriverDbMethods {
|
|
620
|
+
_driver: string;
|
|
621
|
+
_initStorage(options: LocalForageOptions): void;
|
|
622
|
+
_support?: boolean | LocalForageDriverSupportFunc;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
declare interface LocalForageDriverDbMethods extends LocalForageDbMethodsCore, LocalForageDriverMethodsOptional {
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare interface LocalForageDriverMethodsOptional {
|
|
629
|
+
dropInstance?: LocalForageDropInstanceFn;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
declare interface LocalForageDriverSupportFunc {
|
|
633
|
+
(): Promise<boolean>;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
declare interface LocalForageDropInstanceFn {
|
|
637
|
+
(dbInstanceOptions?: LocalForageDbInstanceOptions, callback?: (err: any) => void): Promise<void>;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
declare interface LocalForageOptions extends LocalForageDbInstanceOptions {
|
|
641
|
+
driver?: string | string[];
|
|
642
|
+
size?: number;
|
|
643
|
+
version?: number;
|
|
644
|
+
description?: string;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
declare interface LocalForageSerializer {
|
|
648
|
+
serialize<T>(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => void): void;
|
|
649
|
+
deserialize<T>(value: string): T | ArrayBuffer | Blob;
|
|
650
|
+
stringToBuffer(serializedString: string): ArrayBuffer;
|
|
651
|
+
bufferToString(buffer: ArrayBuffer): string;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export declare interface LocallyStoredItem<T> {
|
|
655
|
+
meta: LocalMeta;
|
|
656
|
+
data: T;
|
|
657
|
+
count?: number;
|
|
658
|
+
filters?: string[];
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export declare interface LocalMeta {
|
|
662
|
+
storedOn: string;
|
|
663
|
+
isDetailed?: boolean;
|
|
664
|
+
earliestData?: string;
|
|
665
|
+
lastUpdate?: string;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export declare interface NavigationItem extends AuthItem {
|
|
669
|
+
/**aliases are other names that could use this navigation item's set of permissions, etc.*/
|
|
670
|
+
aliases?: string[];
|
|
671
|
+
/**potentially the nav that leads to the archive */
|
|
672
|
+
archiveName?: string;
|
|
673
|
+
/**the name of the background img to show when the route opens this nav */
|
|
674
|
+
background?: string;
|
|
675
|
+
/**how long until locally cached data is refreshed */
|
|
676
|
+
cacheExpiryHours?: number;
|
|
677
|
+
/**any children of this nav item */
|
|
678
|
+
children?: NavigationItem[];
|
|
679
|
+
/**the name that will be displayed in the navigation menu */
|
|
680
|
+
displayName?: string;
|
|
681
|
+
/**where credentials can be found for external parties*/
|
|
682
|
+
externalPartyCredentialNavigation?: string;
|
|
683
|
+
/**possible external parties to connect to and sync with */
|
|
684
|
+
externalParties?: ExternalParty[];
|
|
685
|
+
/**possible external party navigation items and how to connect/sync */
|
|
686
|
+
externalNavigations?: ExternalNavigation[];
|
|
687
|
+
/**will hide app bar if set to true when the route opens this nav */
|
|
688
|
+
hideAppBar?: boolean;
|
|
689
|
+
/**will hide the nav sidebar if set to true when the route opens this nav */
|
|
690
|
+
hideNavigation?: boolean;
|
|
691
|
+
/**will open a dialog box to confirm navigating away from this route */
|
|
692
|
+
hesitate?: boolean;
|
|
693
|
+
/**the mdi icon that goes with this nav item. Will show in places like the nav menu */
|
|
694
|
+
icon?: string;
|
|
695
|
+
/**default to false. True will mean that even is account is suspended, this will still allow navigation */
|
|
696
|
+
ignoreSuspension?: boolean;
|
|
697
|
+
/**default to true. When false will hide from nav menu */
|
|
698
|
+
isInNavMenu?: boolean;
|
|
699
|
+
/**the microservice the leads to the default url to obtain data from. Defaults to 'default'. */
|
|
700
|
+
microservice?: string;
|
|
701
|
+
/**the name of this nav item. */
|
|
702
|
+
name?: string;
|
|
703
|
+
/**the url path on top of the base microservice url */
|
|
704
|
+
path?: string;
|
|
705
|
+
/**permissions that are required for this navItem. All these permissions must be met. */
|
|
706
|
+
permissions?: string[];
|
|
707
|
+
/**default to true. When false will allow universal access regardless of permission */
|
|
708
|
+
requiresAuth?: boolean;
|
|
709
|
+
/**the name of the route to access individual items */
|
|
710
|
+
singleName?: string;
|
|
711
|
+
/**this nav item is restricted to these subscriptions. So the user needs to have at least one of these subscription codes. */
|
|
712
|
+
subscriptions?: string[];
|
|
713
|
+
/**this nav item is preferred in this subscription codes. */
|
|
714
|
+
subFilters?: string[];
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export declare function nestedValue(obj: any, path?: string): any;
|
|
718
|
+
|
|
719
|
+
declare type OnCanDoAsync = (item: any) => Promise<string | undefined>;
|
|
720
|
+
|
|
721
|
+
declare type OnDoAsync = (item: any) => Promise<string | undefined>;
|
|
722
|
+
|
|
723
|
+
declare type OnDoSuccessAsync = (item: any) => Promise<any>;
|
|
724
|
+
|
|
725
|
+
declare type OnGetAsync = (opt?: GetOptions) => Promise<any>;
|
|
726
|
+
|
|
727
|
+
declare type OnGetSuccessAsync = (item: any, opt?: GetOptions) => Promise<any>;
|
|
728
|
+
|
|
729
|
+
export declare interface PathOptions {
|
|
730
|
+
/**always added to end before query {url}/{additionalUrl}?{query} */
|
|
731
|
+
additionalUrl?: string;
|
|
732
|
+
/**application/json or other options */
|
|
733
|
+
contentType?: string;
|
|
734
|
+
/**that data to send in the body for POST, PATCH, and DELETE requests */
|
|
735
|
+
data?: any;
|
|
736
|
+
/** resulting url after building {nav | url}/{additionalUrl}?{params} */
|
|
737
|
+
finalUrl?: string;
|
|
738
|
+
/**override default headers */
|
|
739
|
+
headers?: HeadersInit;
|
|
740
|
+
/**id will be added as a url paramter (/{id}?) rather than as a query parameter */
|
|
741
|
+
id?: string;
|
|
742
|
+
/**where to find the url */
|
|
743
|
+
nav?: string;
|
|
744
|
+
/**headers will not be calculated. Only the given headers in these options will be used */
|
|
745
|
+
overrideHeaders?: boolean;
|
|
746
|
+
/**query parameters */
|
|
747
|
+
params?: QueryParams;
|
|
748
|
+
/**attaches a proxyID to the request */
|
|
749
|
+
proxyID?: string;
|
|
750
|
+
/**whether to refresh the store data and go straight to the server */
|
|
751
|
+
refresh?: boolean;
|
|
752
|
+
/**returns result as a json object. Defaults to true. */
|
|
753
|
+
returnJson?: boolean;
|
|
754
|
+
/**returns result as a string */
|
|
755
|
+
returnText?: boolean;
|
|
756
|
+
/**If false, returns response no matter the status code */
|
|
757
|
+
throwError?: boolean;
|
|
758
|
+
/**if exists then overrides default nav */
|
|
759
|
+
url?: string;
|
|
760
|
+
/**whether to preference using the local cache */
|
|
761
|
+
useLocalCache?: boolean;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export declare interface PointerOrTouchEvent extends PointerEvent, TouchEvent {
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export declare interface QueryParams {
|
|
768
|
+
filterBy?: string;
|
|
769
|
+
includeCount?: boolean;
|
|
770
|
+
includeDetails?: boolean;
|
|
771
|
+
includeInactive?: boolean;
|
|
772
|
+
lastUpdate?: string;
|
|
773
|
+
other?: any;
|
|
774
|
+
properties?: string[] | string;
|
|
775
|
+
query?: string;
|
|
776
|
+
searchString?: string;
|
|
777
|
+
sortOrder?: string;
|
|
778
|
+
sortBy?: string;
|
|
779
|
+
takeFrom?: number;
|
|
780
|
+
takeAmount?: number;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
declare interface RefreshOptions {
|
|
784
|
+
deepRefresh?: boolean;
|
|
785
|
+
resetSearch?: boolean;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export declare function removeWeekday(weekdays?: string, day?: string): string | undefined;
|
|
789
|
+
|
|
790
|
+
export declare type ResizeHandle = 't' | 'r' | 'b' | 'l' | 'tr' | 'br' | 'bl' | 'tl';
|
|
791
|
+
|
|
792
|
+
export declare interface RestoreOptions extends PathOptions, DoActionOptions {
|
|
793
|
+
/**Returns a string if cannot */
|
|
794
|
+
onCanRestoreAsync?: OnCanDoAsync;
|
|
795
|
+
/**Will override the default store delete action */
|
|
796
|
+
onRestoreAsync?: OnDoSuccessAsync;
|
|
797
|
+
/**Called after restore succeeds */
|
|
798
|
+
onRestoreSuccessAsync?: OnDoSuccessAsync;
|
|
799
|
+
store?: BTStoreDefinition;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* rounds the given value to a certain number of decimal places
|
|
804
|
+
* @param v
|
|
805
|
+
* @param dPlaces
|
|
806
|
+
* @returns
|
|
807
|
+
*/
|
|
808
|
+
export declare function roundTo(val: number, dPlaces: number): number;
|
|
809
|
+
|
|
810
|
+
export declare interface SaveOptions extends PathOptions, DoActionOptions {
|
|
811
|
+
/**will seek to post if 'new' otherwise will patch */
|
|
812
|
+
mode?: BladeMode;
|
|
813
|
+
/**called to check whether to proceed with save */
|
|
814
|
+
onCanSaveAsync?: OnCanDoAsync;
|
|
815
|
+
/**
|
|
816
|
+
* retrieves item to save
|
|
817
|
+
* called before seeing whether it can save
|
|
818
|
+
*/
|
|
819
|
+
onGetSaveAsync?: OnDoSuccessAsync;
|
|
820
|
+
/**Will override the default store post/patch action */
|
|
821
|
+
onSaveAsync?: OnDoSuccessAsync;
|
|
822
|
+
/**Called after save succeeds */
|
|
823
|
+
onSaveSuccessAsync?: OnDoSuccessAsync;
|
|
824
|
+
store?: BTStoreDefinition;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export declare type StorageMode = 'session' | 'local-cache';
|
|
828
|
+
|
|
829
|
+
export declare interface StoreGetAllReturn<T> {
|
|
830
|
+
data: T[];
|
|
831
|
+
count?: number;
|
|
832
|
+
filters?: string[];
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
export declare interface StoreGetReturn<T> {
|
|
836
|
+
data: T;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export declare type StoreMode = 'whole-last-updated' | 'partial-last-updated' | 'session';
|
|
840
|
+
|
|
841
|
+
export declare interface SWEvent extends Event {
|
|
842
|
+
detail: any;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export declare interface TableColumn {
|
|
846
|
+
align?: 'start' | 'end' | 'center';
|
|
847
|
+
bool?: number;
|
|
848
|
+
csv?: boolean;
|
|
849
|
+
csvArray?: boolean;
|
|
850
|
+
csvFilter?: string;
|
|
851
|
+
csvText?: string;
|
|
852
|
+
hide?: boolean;
|
|
853
|
+
itemText?: string;
|
|
854
|
+
level?: number;
|
|
855
|
+
maxWidth?: string;
|
|
856
|
+
minWidth?: string;
|
|
857
|
+
nav?: string;
|
|
858
|
+
prefix?: string;
|
|
859
|
+
searchable?: boolean;
|
|
860
|
+
single?: boolean;
|
|
861
|
+
sublevel?: number;
|
|
862
|
+
suffix?: string;
|
|
863
|
+
textFilter?: string;
|
|
864
|
+
textFunction?: Function;
|
|
865
|
+
title?: string;
|
|
866
|
+
value?: string;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Converts props to camel casing
|
|
871
|
+
* @param value
|
|
872
|
+
* @returns
|
|
873
|
+
*/
|
|
874
|
+
export declare function toCamelCase(value: any): any;
|
|
875
|
+
|
|
876
|
+
export declare function toCompareString(str?: string): string | null;
|
|
877
|
+
|
|
878
|
+
export declare function toggleCSV(value?: string, tag?: string): string | null;
|
|
879
|
+
|
|
880
|
+
export declare function twiddleThumbs(mSec?: number): Promise<void>;
|
|
881
|
+
|
|
882
|
+
declare interface UrlSet {
|
|
883
|
+
auth?: string;
|
|
884
|
+
data?: string;
|
|
885
|
+
localDbName?: string;
|
|
886
|
+
other?: any;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export declare function useActions(options?: UseActionsOptions): BTActions;
|
|
890
|
+
|
|
891
|
+
export declare interface UseActionsOptions extends DoActionOptions {
|
|
892
|
+
nav?: string;
|
|
893
|
+
proxyID?: string;
|
|
894
|
+
refresh?: boolean;
|
|
895
|
+
store?: BTStoreDefinition;
|
|
896
|
+
throwError?: boolean;
|
|
897
|
+
url?: string;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export declare function useActionsTracker(useOptions?: DoActionOptions): {
|
|
901
|
+
actionErrorMsg: ShallowRef<string | undefined>;
|
|
902
|
+
actionLoadingMsg: ShallowRef<string | undefined>;
|
|
903
|
+
actionCompleteMsg: ShallowRef<string | undefined>;
|
|
904
|
+
clearErrors: () => void;
|
|
905
|
+
doAction: (action: any, options?: DoActionOptions) => Promise<any>;
|
|
906
|
+
isLoading: ComputedRef<boolean>;
|
|
907
|
+
logError: (err?: string | Error) => void;
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
export declare function useApi(): BTApi;
|
|
911
|
+
|
|
912
|
+
export declare interface UseApiOptions {
|
|
913
|
+
auth?: BTAuth;
|
|
914
|
+
/**overrides the default */
|
|
915
|
+
buildHeaders?: (path: PathOptions) => HeadersInit;
|
|
916
|
+
/**build a query. Overrides the default */
|
|
917
|
+
buildQuery?: (params: any) => string;
|
|
918
|
+
/**overrides the default */
|
|
919
|
+
buildUrl?: (path: PathOptions) => string;
|
|
920
|
+
/**defaults to 'application/json' */
|
|
921
|
+
defaultContentType?: string;
|
|
922
|
+
/**returns result as a json object. Defaults to true. */
|
|
923
|
+
defaultReturnJson?: boolean;
|
|
924
|
+
/**returns result as a string */
|
|
925
|
+
defaultReturnText?: boolean;
|
|
926
|
+
/**defaults to true. Will throw an error on fail */
|
|
927
|
+
defaultThrowError?: boolean;
|
|
928
|
+
/**defaults to a function that returns '' */
|
|
929
|
+
findPath?: FindPath;
|
|
930
|
+
/**if true and logged in then will set an authorization header with 'bearer [token]' */
|
|
931
|
+
useBearerToken?: boolean;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export declare function useAuth(): BTAuth;
|
|
935
|
+
|
|
936
|
+
export declare function useAuthUrl(): string;
|
|
937
|
+
|
|
938
|
+
export declare function useCosmetics(): BTCosmetics;
|
|
939
|
+
|
|
940
|
+
export declare interface UseCosmeticsOptions<T extends BaseCosmeticTheme> {
|
|
941
|
+
defaultDarkTheme?: T;
|
|
942
|
+
defaultLightTheme?: T;
|
|
943
|
+
defaultDrawer?: boolean;
|
|
944
|
+
defaultDrawerStick?: boolean;
|
|
945
|
+
defaultTheme?: string;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export declare function useCSV(): UseCSVPropsReturn;
|
|
949
|
+
|
|
950
|
+
export declare interface UseCSVPropsReturn {
|
|
951
|
+
exportToCSV: Function;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
*
|
|
956
|
+
* @param microservice
|
|
957
|
+
* @returns
|
|
958
|
+
*/
|
|
959
|
+
export declare function useDataUrl(microservice?: string): string;
|
|
960
|
+
|
|
961
|
+
export declare function useDates(): BTDates;
|
|
962
|
+
|
|
963
|
+
export declare function useDbName(): string;
|
|
964
|
+
|
|
965
|
+
export declare function useDemo(): BTDemo;
|
|
966
|
+
|
|
967
|
+
/**routes with meta object */
|
|
968
|
+
export declare function useDocumentMeta(options?: UseDocumentMetaOptions): BTDocumentMeta;
|
|
969
|
+
|
|
970
|
+
export declare interface UseDocumentMetaOptions {
|
|
971
|
+
demo?: BTDemo;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
export declare function useDraggable(target: MaybeRefOrGetter<ComponentPublicInstance | null>, //HTMLElement | SVGElement | null | undefined>,
|
|
975
|
+
handle: MaybeRefOrGetter<ComponentPublicInstance | null>, options?: UseDraggableOptions): {
|
|
976
|
+
draggingIsOn: Ref<boolean>;
|
|
977
|
+
turnDraggableOff: () => void;
|
|
978
|
+
turnDraggableOn: () => void;
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
export declare interface UseDraggableOptions {
|
|
982
|
+
/**
|
|
983
|
+
* Only start the dragging when click on the element directly
|
|
984
|
+
*
|
|
985
|
+
* @default false
|
|
986
|
+
*/
|
|
987
|
+
preventDefault?: MaybeRefOrGetter<boolean>;
|
|
988
|
+
stopPropagation?: MaybeRefOrGetter<boolean>;
|
|
989
|
+
/**
|
|
990
|
+
* Whether dispatch events in capturing phase
|
|
991
|
+
*
|
|
992
|
+
* @default true
|
|
993
|
+
*/
|
|
994
|
+
capture?: boolean;
|
|
995
|
+
/**
|
|
996
|
+
* Element to attach `pointermove` and `pointerup` events to.
|
|
997
|
+
*
|
|
998
|
+
* @default window
|
|
999
|
+
*/
|
|
1000
|
+
draggingElement?: MaybeRefOrGetter<HTMLElement | SVGElement | Window | Document | null | undefined>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Element for calculating bounds (If not set, it will use the event's target).
|
|
1003
|
+
*
|
|
1004
|
+
* @default undefined
|
|
1005
|
+
*/
|
|
1006
|
+
/**
|
|
1007
|
+
* Handle that triggers the drag event
|
|
1008
|
+
*
|
|
1009
|
+
* @default target
|
|
1010
|
+
*/
|
|
1011
|
+
handle?: MaybeRefOrGetter<HTMLElement | SVGElement | null | undefined>;
|
|
1012
|
+
/**
|
|
1013
|
+
* Initial position of the element.
|
|
1014
|
+
*
|
|
1015
|
+
* @default { x: 0, y: 0 }
|
|
1016
|
+
*/
|
|
1017
|
+
initialValue?: MaybeRefOrGetter<Position>;
|
|
1018
|
+
onStart?: (position: Position, event: PointerEvent) => void | false;
|
|
1019
|
+
onMove?: (position: Position, event: PointerEvent) => void;
|
|
1020
|
+
onEnd?: (position: Position, event: PointerEvent) => void;
|
|
1021
|
+
/**
|
|
1022
|
+
* Axis to drag on.
|
|
1023
|
+
*
|
|
1024
|
+
* @default 'both'
|
|
1025
|
+
*/
|
|
1026
|
+
axis?: 'x' | 'y' | 'both';
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
export declare function useFilters(): BTFilters;
|
|
1030
|
+
|
|
1031
|
+
export declare interface UseFiltersOptions {
|
|
1032
|
+
dates: BTDates;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export declare function useId(pattern?: string): string;
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* PROPS first
|
|
1039
|
+
* ROUTE second
|
|
1040
|
+
* BLADE third
|
|
1041
|
+
* @param props
|
|
1042
|
+
* @param emit
|
|
1043
|
+
* @param options
|
|
1044
|
+
*/
|
|
1045
|
+
export declare function useList(props: ListProps, emit?: ListEvents, options?: UseListOptions): {
|
|
1046
|
+
add: (variant: BladeVariant) => void;
|
|
1047
|
+
asyncItems: Ref<any[]>;
|
|
1048
|
+
currentPage: Ref<number>;
|
|
1049
|
+
deleteItem: (dItem: MaybeRefOrGetter<any>) => void;
|
|
1050
|
+
displayHeaders: ComputedRef<never[]>;
|
|
1051
|
+
errorMsg: ComputedRef<string | undefined>;
|
|
1052
|
+
exportToCSV: () => void;
|
|
1053
|
+
filteredItems: ShallowRef<any[]>;
|
|
1054
|
+
filters: ComputedRef<string[]>;
|
|
1055
|
+
filtersChanged: ComputedRef<boolean>;
|
|
1056
|
+
headerOptions: Ref< {
|
|
1057
|
+
align?: "start" | "end" | "center" | undefined;
|
|
1058
|
+
bool?: number | undefined;
|
|
1059
|
+
csv?: boolean | undefined;
|
|
1060
|
+
csvArray?: boolean | undefined;
|
|
1061
|
+
csvFilter?: string | undefined;
|
|
1062
|
+
csvText?: string | undefined;
|
|
1063
|
+
hide?: boolean | undefined;
|
|
1064
|
+
itemText?: string | undefined;
|
|
1065
|
+
level?: number | undefined;
|
|
1066
|
+
maxWidth?: string | undefined;
|
|
1067
|
+
minWidth?: string | undefined;
|
|
1068
|
+
nav?: string | undefined;
|
|
1069
|
+
prefix?: string | undefined;
|
|
1070
|
+
searchable?: boolean | undefined;
|
|
1071
|
+
single?: boolean | undefined;
|
|
1072
|
+
sublevel?: number | undefined;
|
|
1073
|
+
suffix?: string | undefined;
|
|
1074
|
+
textFilter?: string | undefined;
|
|
1075
|
+
textFunction?: Function | undefined;
|
|
1076
|
+
title?: string | undefined;
|
|
1077
|
+
value?: string | undefined;
|
|
1078
|
+
}[]>;
|
|
1079
|
+
isDeletable: ComputedRef<(item: any) => boolean>;
|
|
1080
|
+
isLoading: ComputedRef<boolean>;
|
|
1081
|
+
isRestorable: ComputedRef<(item: any) => boolean>;
|
|
1082
|
+
loadingMsg: ComputedRef<string | undefined>;
|
|
1083
|
+
refresh: (options?: RefreshOptions) => Promise<void>;
|
|
1084
|
+
restoreItem: (dItem: MaybeRefOrGetter<any>) => void;
|
|
1085
|
+
searchString: Ref<string | undefined>;
|
|
1086
|
+
selectedFilters: Ref<number[]>;
|
|
1087
|
+
selectItem: (rItem: any, variant: BladeVariant) => void;
|
|
1088
|
+
serverFilters: Ref<string[]>;
|
|
1089
|
+
showError: ShallowRef<boolean>;
|
|
1090
|
+
showInactive: Ref<boolean>;
|
|
1091
|
+
showSearch: ShallowRef<boolean>;
|
|
1092
|
+
sortOrder: Ref<"Ascending" | "Descending" | undefined>;
|
|
1093
|
+
subtitleOptions: ComputedRef<GroupedHeaderOption[]>;
|
|
1094
|
+
tableHeaders: ComputedRef< {
|
|
1095
|
+
align?: "start" | "end" | "center" | undefined;
|
|
1096
|
+
bool?: number | undefined;
|
|
1097
|
+
csv?: boolean | undefined;
|
|
1098
|
+
csvArray?: boolean | undefined;
|
|
1099
|
+
csvFilter?: string | undefined;
|
|
1100
|
+
csvText?: string | undefined;
|
|
1101
|
+
hide?: boolean | undefined;
|
|
1102
|
+
itemText?: string | undefined;
|
|
1103
|
+
level?: number | undefined;
|
|
1104
|
+
maxWidth?: string | undefined;
|
|
1105
|
+
minWidth?: string | undefined;
|
|
1106
|
+
nav?: string | undefined;
|
|
1107
|
+
prefix?: string | undefined;
|
|
1108
|
+
searchable?: boolean | undefined;
|
|
1109
|
+
single?: boolean | undefined;
|
|
1110
|
+
sublevel?: number | undefined;
|
|
1111
|
+
suffix?: string | undefined;
|
|
1112
|
+
textFilter?: string | undefined;
|
|
1113
|
+
textFunction?: Function | undefined;
|
|
1114
|
+
title?: string | undefined;
|
|
1115
|
+
value?: string | undefined;
|
|
1116
|
+
}[]>;
|
|
1117
|
+
titleOptions: ComputedRef<GroupedHeaderOption[]>;
|
|
1118
|
+
toggleSearch: () => void;
|
|
1119
|
+
totalPages: Ref<number>;
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
export declare interface UseListOptions {
|
|
1123
|
+
storeMode?: StoreMode;
|
|
1124
|
+
storageMode?: StorageMode;
|
|
1125
|
+
useBladeSrc?: boolean;
|
|
1126
|
+
useRouteSrc?: boolean;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
export declare function useLocalCache(): {
|
|
1130
|
+
clearAsync: (storeName: string) => Promise<void>;
|
|
1131
|
+
getAsync: <T>(key: string) => Promise<T | null>;
|
|
1132
|
+
removeAsync: (key: string) => Promise<void>;
|
|
1133
|
+
saveAsync: <T_1>(data: T_1, key: string) => Promise<void>;
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
export declare function useLocalDb(): LocalForage;
|
|
1137
|
+
|
|
1138
|
+
export declare function useNavigation(): BTNavigation;
|
|
1139
|
+
|
|
1140
|
+
export declare interface UseNavigationOptions {
|
|
1141
|
+
defaultCacheExpiryHours?: number;
|
|
1142
|
+
navItems?: NavigationItem[];
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
export declare function usePresets(preset?: string): any;
|
|
1146
|
+
|
|
1147
|
+
export declare function usePWA(): BTPWA;
|
|
1148
|
+
|
|
1149
|
+
export declare function useResizable(target: MaybeRefOrGetter_2<ComponentPublicInstance | null>, options?: UseResizeOptions): {
|
|
1150
|
+
resizingIsOn: Ref<boolean>;
|
|
1151
|
+
turnResizingOn: (handles?: ResizeHandle[], variant?: BladeVariant) => void;
|
|
1152
|
+
turnResizingOff: (variant?: BladeVariant | undefined) => void;
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
export declare interface UseResizeOptions {
|
|
1156
|
+
preventDefault?: MaybeRefOrGetter_2<boolean>;
|
|
1157
|
+
stopPropagation?: MaybeRefOrGetter_2<boolean>;
|
|
1158
|
+
handles?: ResizeHandle[];
|
|
1159
|
+
/**
|
|
1160
|
+
* Callback when the dragging starts. Return `false` to prevent dragging.
|
|
1161
|
+
*/
|
|
1162
|
+
onStart?: (position: Position, event: PointerEvent) => void | false;
|
|
1163
|
+
/**
|
|
1164
|
+
* Callback during dragging.
|
|
1165
|
+
*/
|
|
1166
|
+
onMove?: (position: Position, event: PointerEvent) => void;
|
|
1167
|
+
/**
|
|
1168
|
+
* Callback when dragging end.
|
|
1169
|
+
*/
|
|
1170
|
+
onEnd?: (position: Position, event: PointerEvent) => void;
|
|
1171
|
+
minWidth?: number;
|
|
1172
|
+
maxWidth?: number;
|
|
1173
|
+
minHeight?: number;
|
|
1174
|
+
maxHeight?: number;
|
|
1175
|
+
handleWidth?: number;
|
|
1176
|
+
handleZIndex?: number;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
export declare function useRules(options?: UseRulesOptions): any[];
|
|
1180
|
+
|
|
1181
|
+
export declare interface UseRulesOptions {
|
|
1182
|
+
forEmail?: boolean;
|
|
1183
|
+
forPassword?: boolean;
|
|
1184
|
+
otherRules?: any;
|
|
1185
|
+
required?: boolean;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
declare interface UseSessionStoreOptions {
|
|
1189
|
+
/**ideally required. Otherwise will struggle to find url path */
|
|
1190
|
+
api?: BTApi;
|
|
1191
|
+
/**ideally required. For setting unique local storage keys */
|
|
1192
|
+
auth?: BTAuth;
|
|
1193
|
+
/**whether to store data locally or only for the duration of the session */
|
|
1194
|
+
storageMode: 'session' | 'local-cache';
|
|
1195
|
+
/**build a query. Overrides the default */
|
|
1196
|
+
buildQuery?: (params: any) => string;
|
|
1197
|
+
/**overrides the default */
|
|
1198
|
+
buildUrl?: (path: PathOptions) => string;
|
|
1199
|
+
/**the name of this store */
|
|
1200
|
+
storeName: string;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
export declare function useStore(options: CreateStoreOptions): BTStore;
|
|
1204
|
+
|
|
1205
|
+
export declare function useStoreDefinition(options: CreateStoreOptions): BTStoreDefinition;
|
|
1206
|
+
|
|
1207
|
+
export declare interface UseStoreOptions {
|
|
1208
|
+
/**ideally required. Otherwise will struggle to find url path */
|
|
1209
|
+
api?: BTApi;
|
|
1210
|
+
/**ideally required. For setting unique local storage keys */
|
|
1211
|
+
auth?: BTAuth;
|
|
1212
|
+
/**build a query. Overrides the default */
|
|
1213
|
+
builderQuery?: (params: any) => string;
|
|
1214
|
+
/**overrides the default */
|
|
1215
|
+
buildUrl?: (path: PathOptions) => string;
|
|
1216
|
+
/**particularly what store syle to use */
|
|
1217
|
+
storeMode: StoreMode;
|
|
1218
|
+
/**whether to store data locally or only for the duration of the session */
|
|
1219
|
+
storageMode: StorageMode;
|
|
1220
|
+
/**the name of this store */
|
|
1221
|
+
storeName: string;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
export declare function useTracker(data: MaybeRefOrGetter<any>, options?: UseTrackerOptions): {
|
|
1225
|
+
asyncItem: Ref<any>;
|
|
1226
|
+
isChanged: Ref<boolean>;
|
|
1227
|
+
restartTracker: () => void;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
export declare interface UseTrackerOptions {
|
|
1231
|
+
propsToIgnore?: string[];
|
|
1232
|
+
propsToTrack?: string[];
|
|
1233
|
+
useTracker?: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
export declare function useUrls(): CreateUrlOptions;
|
|
1237
|
+
|
|
1238
|
+
declare interface UseWholeLastUpdateStoreOptions {
|
|
1239
|
+
/**ideally required. Otherwise will struggle to find url path */
|
|
1240
|
+
api?: BTApi;
|
|
1241
|
+
/**ideally required. For setting unique local storage keys */
|
|
1242
|
+
auth?: BTAuth;
|
|
1243
|
+
storageMode: 'session' | 'local-cache';
|
|
1244
|
+
storeName: string;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export declare function validEmail(email?: string): boolean;
|
|
1248
|
+
|
|
1249
|
+
export declare const weekdayPairs: {
|
|
1250
|
+
value: number;
|
|
1251
|
+
short: string;
|
|
1252
|
+
values: (string | null | undefined)[];
|
|
1253
|
+
}[];
|
|
1254
|
+
|
|
1255
|
+
/**returns the sort value of the weekday csv string
|
|
1256
|
+
* returns minimum if csv list
|
|
1257
|
+
*/
|
|
1258
|
+
export declare function weekdayShortName(wkDay?: string): string | undefined;
|
|
1259
|
+
|
|
1260
|
+
/**returns the sort value of the weekday csv string
|
|
1261
|
+
* returns minimum if csv list
|
|
1262
|
+
*/
|
|
1263
|
+
export declare function weekdayValue(wkDay?: string): number;
|
|
1264
|
+
|
|
1265
|
+
export { }
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
declare global {
|
|
1269
|
+
interface Navigator {
|
|
1270
|
+
msSaveOrOpenBlob: (blob: Blob, fileName: string) => boolean;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
|