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
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { StorageMode, StoreMode } from '../composables/stores';
|
|
2
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { BladeVariant } from '../types';
|
|
4
|
-
import { OnCanDoAsync, OnDoAsync, OnDoSuccessAsync, OnGetAsync, OnGetSuccessAsync } from './actions';
|
|
5
|
-
|
|
6
|
-
export interface RefreshOptions {
|
|
7
|
-
deepRefresh?: boolean;
|
|
8
|
-
resetSearch?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface TableColumn {
|
|
11
|
-
align?: 'start' | 'end' | 'center';
|
|
12
|
-
bool?: number;
|
|
13
|
-
csv?: boolean;
|
|
14
|
-
csvArray?: boolean;
|
|
15
|
-
csvFilter?: string;
|
|
16
|
-
csvText?: string;
|
|
17
|
-
hide?: boolean;
|
|
18
|
-
itemText?: string;
|
|
19
|
-
level?: number;
|
|
20
|
-
maxWidth?: string;
|
|
21
|
-
minWidth?: string;
|
|
22
|
-
nav?: string;
|
|
23
|
-
prefix?: string;
|
|
24
|
-
searchable?: boolean;
|
|
25
|
-
single?: boolean;
|
|
26
|
-
sublevel?: number;
|
|
27
|
-
suffix?: string;
|
|
28
|
-
textFilter?: string;
|
|
29
|
-
textFunction?: Function;
|
|
30
|
-
title?: string;
|
|
31
|
-
value?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface CustomFilterParam {
|
|
34
|
-
name: string;
|
|
35
|
-
filterFunction: () => string;
|
|
36
|
-
onFilterResult: Function | null;
|
|
37
|
-
}
|
|
38
|
-
export interface ListEvents {
|
|
39
|
-
(e: 'change', item: any): void;
|
|
40
|
-
(e: 'deleted', item: any): void;
|
|
41
|
-
(e: 'input', item: any): void;
|
|
42
|
-
(e: 'select', item: any): void;
|
|
43
|
-
(e: 'mouse-over-item', item: any): void;
|
|
44
|
-
}
|
|
45
|
-
export interface ListProps {
|
|
46
|
-
additionalUrl?: string;
|
|
47
|
-
bladeName?: string;
|
|
48
|
-
canAdd?: boolean;
|
|
49
|
-
canDelete?: boolean;
|
|
50
|
-
canEdit?: boolean;
|
|
51
|
-
canRestore?: boolean;
|
|
52
|
-
canShowInactive?: boolean;
|
|
53
|
-
canSelect?: boolean;
|
|
54
|
-
canUnselect?: boolean;
|
|
55
|
-
confirmOnDelete?: boolean;
|
|
56
|
-
customFilters?: CustomFilterParam[];
|
|
57
|
-
defaultFilters?: string[];
|
|
58
|
-
dividers?: boolean;
|
|
59
|
-
eager?: boolean;
|
|
60
|
-
errorMsg?: string;
|
|
61
|
-
headers?: TableColumn[];
|
|
62
|
-
hideActions?: boolean;
|
|
63
|
-
hideColumns?: boolean;
|
|
64
|
-
hideFilters?: boolean;
|
|
65
|
-
hideRefresh?: boolean;
|
|
66
|
-
hideSubtoolbarSettings?: boolean;
|
|
67
|
-
includeDetails?: boolean;
|
|
68
|
-
isSingle?: boolean;
|
|
69
|
-
itemBladeName?: string;
|
|
70
|
-
itemID?: string;
|
|
71
|
-
items?: any[];
|
|
72
|
-
itemsPerPage?: number;
|
|
73
|
-
itemText?: string;
|
|
74
|
-
lines?: 'one' | 'two' | 'three';
|
|
75
|
-
loadingMsg?: string;
|
|
76
|
-
localOnly?: boolean;
|
|
77
|
-
nav?: string;
|
|
78
|
-
/**for defining if deletable (show button or not) */
|
|
79
|
-
onCanDelete?: (item: any) => boolean;
|
|
80
|
-
/**when trying to delete in api */
|
|
81
|
-
onCanDeleteAsync?: OnCanDoAsync;
|
|
82
|
-
onGetSaveAsync?: OnDoSuccessAsync;
|
|
83
|
-
onCanRestore?: (item: any) => boolean;
|
|
84
|
-
onCanRestoreAsync?: OnCanDoAsync;
|
|
85
|
-
onCanSaveAsync?: OnCanDoAsync;
|
|
86
|
-
onCanSelectItem?: (item: any) => boolean;
|
|
87
|
-
onDeleteAsync?: OnDoAsync;
|
|
88
|
-
onDeleteSuccessAsync?: OnDoAsync;
|
|
89
|
-
onFilter?: Function;
|
|
90
|
-
onGetAsync?: OnGetAsync;
|
|
91
|
-
onGetSuccessAsync?: OnGetSuccessAsync;
|
|
92
|
-
onRestoreAsync?: OnDoSuccessAsync;
|
|
93
|
-
onRestoreSuccessAsync?: OnDoSuccessAsync;
|
|
94
|
-
onSaveAsync?: OnDoSuccessAsync;
|
|
95
|
-
onSaveSuccessAsync?: OnDoSuccessAsync;
|
|
96
|
-
onSelectItem?: (item: any) => void;
|
|
97
|
-
params?: any;
|
|
98
|
-
proxyID?: string;
|
|
99
|
-
proxyQueryKey?: string;
|
|
100
|
-
refreshToggle?: boolean;
|
|
101
|
-
searchProps?: string[];
|
|
102
|
-
searchQueryKey?: string;
|
|
103
|
-
selectProps?: string[];
|
|
104
|
-
sortBy?: string;
|
|
105
|
-
sortOrder?: 'Ascending' | 'Descending';
|
|
106
|
-
showListOnly?: boolean;
|
|
107
|
-
showTableOnly?: boolean;
|
|
108
|
-
showSearch?: boolean;
|
|
109
|
-
startShowingInactive?: boolean;
|
|
110
|
-
storeMode?: StoreMode;
|
|
111
|
-
storageMode?: StorageMode;
|
|
112
|
-
useInterEvents?: boolean;
|
|
113
|
-
useServerPagination?: boolean;
|
|
114
|
-
useBladeSrc?: boolean;
|
|
115
|
-
useRouteSrc?: boolean;
|
|
116
|
-
variant?: BladeVariant;
|
|
117
|
-
}
|
|
118
|
-
export interface GroupedHeaderOption {
|
|
119
|
-
position: number;
|
|
120
|
-
values: TableColumn[];
|
|
121
|
-
}
|
|
122
|
-
export interface UseListOptions {
|
|
123
|
-
storeMode?: StoreMode;
|
|
124
|
-
storageMode?: StorageMode;
|
|
125
|
-
useBladeSrc?: boolean;
|
|
126
|
-
useRouteSrc?: boolean;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* PROPS first
|
|
130
|
-
* ROUTE second
|
|
131
|
-
* BLADE third
|
|
132
|
-
* @param props
|
|
133
|
-
* @param emit
|
|
134
|
-
* @param options
|
|
135
|
-
*/
|
|
136
|
-
export declare function useList(props: ListProps, emit?: ListEvents, options?: UseListOptions): {
|
|
137
|
-
add: (variant: BladeVariant) => void;
|
|
138
|
-
asyncItems: import('vue').Ref<any[]>;
|
|
139
|
-
currentPage: import('vue').Ref<number>;
|
|
140
|
-
deleteItem: (dItem: MaybeRefOrGetter<any>) => void;
|
|
141
|
-
displayHeaders: import('vue').ComputedRef<never[]>;
|
|
142
|
-
errorMsg: import('vue').ComputedRef<string | undefined>;
|
|
143
|
-
exportToCSV: () => void;
|
|
144
|
-
filteredItems: import('vue').ShallowRef<any[]>;
|
|
145
|
-
filters: import('vue').ComputedRef<string[]>;
|
|
146
|
-
filtersChanged: import('vue').ComputedRef<boolean>;
|
|
147
|
-
headerOptions: import('vue').Ref<{
|
|
148
|
-
align?: "start" | "end" | "center" | undefined;
|
|
149
|
-
bool?: number | undefined;
|
|
150
|
-
csv?: boolean | undefined;
|
|
151
|
-
csvArray?: boolean | undefined;
|
|
152
|
-
csvFilter?: string | undefined;
|
|
153
|
-
csvText?: string | undefined;
|
|
154
|
-
hide?: boolean | undefined;
|
|
155
|
-
itemText?: string | undefined;
|
|
156
|
-
level?: number | undefined;
|
|
157
|
-
maxWidth?: string | undefined;
|
|
158
|
-
minWidth?: string | undefined;
|
|
159
|
-
nav?: string | undefined;
|
|
160
|
-
prefix?: string | undefined;
|
|
161
|
-
searchable?: boolean | undefined;
|
|
162
|
-
single?: boolean | undefined;
|
|
163
|
-
sublevel?: number | undefined;
|
|
164
|
-
suffix?: string | undefined;
|
|
165
|
-
textFilter?: string | undefined;
|
|
166
|
-
textFunction?: Function | undefined;
|
|
167
|
-
title?: string | undefined;
|
|
168
|
-
value?: string | undefined;
|
|
169
|
-
}[]>;
|
|
170
|
-
isDeletable: import('vue').ComputedRef<(item: any) => boolean>;
|
|
171
|
-
isLoading: import('vue').ComputedRef<boolean>;
|
|
172
|
-
isRestorable: import('vue').ComputedRef<(item: any) => boolean>;
|
|
173
|
-
loadingMsg: import('vue').ComputedRef<string | undefined>;
|
|
174
|
-
refresh: (options?: RefreshOptions) => Promise<void>;
|
|
175
|
-
restoreItem: (dItem: MaybeRefOrGetter<any>) => void;
|
|
176
|
-
searchString: import('vue').Ref<string | undefined>;
|
|
177
|
-
selectedFilters: import('vue').Ref<number[]>;
|
|
178
|
-
selectItem: (rItem: any, variant: BladeVariant) => void;
|
|
179
|
-
serverFilters: import('vue').Ref<string[]>;
|
|
180
|
-
showError: import('vue').ShallowRef<boolean>;
|
|
181
|
-
showInactive: import('vue').Ref<boolean>;
|
|
182
|
-
showSearch: import('vue').ShallowRef<boolean>;
|
|
183
|
-
sortOrder: import('vue').Ref<"Ascending" | "Descending" | undefined>;
|
|
184
|
-
subtitleOptions: import('vue').ComputedRef<GroupedHeaderOption[]>;
|
|
185
|
-
tableHeaders: import('vue').ComputedRef<{
|
|
186
|
-
align?: "start" | "end" | "center" | undefined;
|
|
187
|
-
bool?: number | undefined;
|
|
188
|
-
csv?: boolean | undefined;
|
|
189
|
-
csvArray?: boolean | undefined;
|
|
190
|
-
csvFilter?: string | undefined;
|
|
191
|
-
csvText?: string | undefined;
|
|
192
|
-
hide?: boolean | undefined;
|
|
193
|
-
itemText?: string | undefined;
|
|
194
|
-
level?: number | undefined;
|
|
195
|
-
maxWidth?: string | undefined;
|
|
196
|
-
minWidth?: string | undefined;
|
|
197
|
-
nav?: string | undefined;
|
|
198
|
-
prefix?: string | undefined;
|
|
199
|
-
searchable?: boolean | undefined;
|
|
200
|
-
single?: boolean | undefined;
|
|
201
|
-
sublevel?: number | undefined;
|
|
202
|
-
suffix?: string | undefined;
|
|
203
|
-
textFilter?: string | undefined;
|
|
204
|
-
textFunction?: Function | undefined;
|
|
205
|
-
title?: string | undefined;
|
|
206
|
-
value?: string | undefined;
|
|
207
|
-
}[]>;
|
|
208
|
-
titleOptions: import('vue').ComputedRef<GroupedHeaderOption[]>;
|
|
209
|
-
toggleSearch: () => void;
|
|
210
|
-
totalPages: import('vue').Ref<number>;
|
|
211
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { AuthItem } from './auth';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
export interface ExternalParty {
|
|
5
|
-
party?: string;
|
|
6
|
-
property?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ExternalNavigation {
|
|
9
|
-
canPull?: boolean;
|
|
10
|
-
canPush?: boolean;
|
|
11
|
-
convertFunc?: Function;
|
|
12
|
-
name?: string;
|
|
13
|
-
localNavigation?: string;
|
|
14
|
-
localDisplayPath?: string;
|
|
15
|
-
localComparePath?: string;
|
|
16
|
-
syncComparePath?: string;
|
|
17
|
-
syncDisplayPath?: string;
|
|
18
|
-
syncIDPath?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface NavigationItem extends AuthItem {
|
|
21
|
-
/**aliases are other names that could use this navigation item's set of permissions, etc.*/
|
|
22
|
-
aliases?: string[];
|
|
23
|
-
/**potentially the nav that leads to the archive */
|
|
24
|
-
archiveName?: string;
|
|
25
|
-
/**the name of the background img to show when the route opens this nav */
|
|
26
|
-
background?: string;
|
|
27
|
-
/**how long until locally cached data is refreshed */
|
|
28
|
-
cacheExpiryHours?: number;
|
|
29
|
-
/**any children of this nav item */
|
|
30
|
-
children?: NavigationItem[];
|
|
31
|
-
/**the name that will be displayed in the navigation menu */
|
|
32
|
-
displayName?: string;
|
|
33
|
-
/**where credentials can be found for external parties*/
|
|
34
|
-
externalPartyCredentialNavigation?: string;
|
|
35
|
-
/**possible external parties to connect to and sync with */
|
|
36
|
-
externalParties?: ExternalParty[];
|
|
37
|
-
/**possible external party navigation items and how to connect/sync */
|
|
38
|
-
externalNavigations?: ExternalNavigation[];
|
|
39
|
-
/**will hide app bar if set to true when the route opens this nav */
|
|
40
|
-
hideAppBar?: boolean;
|
|
41
|
-
/**will hide the nav sidebar if set to true when the route opens this nav */
|
|
42
|
-
hideNavigation?: boolean;
|
|
43
|
-
/**will open a dialog box to confirm navigating away from this route */
|
|
44
|
-
hesitate?: boolean;
|
|
45
|
-
/**the mdi icon that goes with this nav item. Will show in places like the nav menu */
|
|
46
|
-
icon?: string;
|
|
47
|
-
/**default to false. True will mean that even is account is suspended, this will still allow navigation */
|
|
48
|
-
ignoreSuspension?: boolean;
|
|
49
|
-
/**default to true. When false will hide from nav menu */
|
|
50
|
-
isInNavMenu?: boolean;
|
|
51
|
-
/**the microservice the leads to the default url to obtain data from. Defaults to 'default'. */
|
|
52
|
-
microservice?: string;
|
|
53
|
-
/**the name of this nav item. */
|
|
54
|
-
name?: string;
|
|
55
|
-
/**the url path on top of the base microservice url */
|
|
56
|
-
path?: string;
|
|
57
|
-
/**permissions that are required for this navItem. All these permissions must be met. */
|
|
58
|
-
permissions?: string[];
|
|
59
|
-
/**default to true. When false will allow universal access regardless of permission */
|
|
60
|
-
requiresAuth?: boolean;
|
|
61
|
-
/**the name of the route to access individual items */
|
|
62
|
-
singleName?: string;
|
|
63
|
-
/**this nav item is restricted to these subscriptions. So the user needs to have at least one of these subscription codes. */
|
|
64
|
-
subscriptions?: string[];
|
|
65
|
-
/**this nav item is preferred in this subscription codes. */
|
|
66
|
-
subFilters?: string[];
|
|
67
|
-
}
|
|
68
|
-
export interface BTNavigation {
|
|
69
|
-
showAppBar: Ref<boolean>;
|
|
70
|
-
showAppNavigation: Ref<boolean>;
|
|
71
|
-
backgroundName: Ref<string | undefined>;
|
|
72
|
-
hesitate: Ref<boolean>;
|
|
73
|
-
navigationItems: NavigationItem[];
|
|
74
|
-
findArchiveName: (navName?: string) => string | undefined;
|
|
75
|
-
findCacheHours: (navName?: string) => number;
|
|
76
|
-
findDisplay: (navName?: string) => string | undefined;
|
|
77
|
-
findIcon: (navName?: string) => string | undefined;
|
|
78
|
-
findItem: (navName?: string | NavigationItem) => NavigationItem | null;
|
|
79
|
-
findStoreName: (navName?: string) => string;
|
|
80
|
-
findPath: (navName?: string) => string | undefined;
|
|
81
|
-
findSingleDisplay: (navName?: string) => string | undefined;
|
|
82
|
-
updateNavigationProperties: (navName?: string | NavigationItem) => void;
|
|
83
|
-
}
|
|
84
|
-
export interface UseNavigationOptions {
|
|
85
|
-
defaultCacheExpiryHours?: number;
|
|
86
|
-
navItems?: NavigationItem[];
|
|
87
|
-
}
|
|
88
|
-
export declare function useNavigation(): BTNavigation;
|
|
89
|
-
export declare function createNavigation(options: UseNavigationOptions): BTNavigation;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface BTPresets {
|
|
2
|
-
usePresets(preset?: string): any;
|
|
3
|
-
}
|
|
4
|
-
export interface CreatePresetsOptions {
|
|
5
|
-
presets: any;
|
|
6
|
-
}
|
|
7
|
-
export declare function usePresets(preset?: string): any;
|
|
8
|
-
export declare function createPresets(options: CreatePresetsOptions): BTPresets;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface SWEvent extends Event {
|
|
4
|
-
detail: any;
|
|
5
|
-
}
|
|
6
|
-
export interface BTPWA {
|
|
7
|
-
canInstallApp: Ref<boolean>;
|
|
8
|
-
canUpdateApp: Ref<boolean>;
|
|
9
|
-
installApp: () => void;
|
|
10
|
-
isInstalled: () => boolean;
|
|
11
|
-
updateApp: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function usePWA(): BTPWA;
|
|
14
|
-
export declare function createPWA(): BTPWA;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { BladeVariant } from '../types';
|
|
2
|
-
import { Position, MaybeRefOrGetter } from '@vueuse/core';
|
|
3
|
-
import { ComponentPublicInstance, Ref } from 'vue';
|
|
4
|
-
|
|
5
|
-
export type ResizeHandle = 't' | 'r' | 'b' | 'l' | 'tr' | 'br' | 'bl' | 'tl';
|
|
6
|
-
export interface PointerOrTouchEvent extends PointerEvent, TouchEvent {
|
|
7
|
-
}
|
|
8
|
-
export interface UseResizeOptions {
|
|
9
|
-
preventDefault?: MaybeRefOrGetter<boolean>;
|
|
10
|
-
stopPropagation?: MaybeRefOrGetter<boolean>;
|
|
11
|
-
handles?: ResizeHandle[];
|
|
12
|
-
/**
|
|
13
|
-
* Callback when the dragging starts. Return `false` to prevent dragging.
|
|
14
|
-
*/
|
|
15
|
-
onStart?: (position: Position, event: PointerEvent) => void | false;
|
|
16
|
-
/**
|
|
17
|
-
* Callback during dragging.
|
|
18
|
-
*/
|
|
19
|
-
onMove?: (position: Position, event: PointerEvent) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Callback when dragging end.
|
|
22
|
-
*/
|
|
23
|
-
onEnd?: (position: Position, event: PointerEvent) => void;
|
|
24
|
-
minWidth?: number;
|
|
25
|
-
maxWidth?: number;
|
|
26
|
-
minHeight?: number;
|
|
27
|
-
maxHeight?: number;
|
|
28
|
-
handleWidth?: number;
|
|
29
|
-
handleZIndex?: number;
|
|
30
|
-
}
|
|
31
|
-
export declare function useResizable(target: MaybeRefOrGetter<ComponentPublicInstance | null>, options?: UseResizeOptions): {
|
|
32
|
-
resizingIsOn: Ref<boolean>;
|
|
33
|
-
turnResizingOn: (handles?: ResizeHandle[], variant?: BladeVariant) => void;
|
|
34
|
-
turnResizingOff: (variant?: BladeVariant | undefined) => void;
|
|
35
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { BTAuth } from './auth';
|
|
2
|
-
import { BaseModel } from '../types';
|
|
3
|
-
import { PathOptions, BTApi } from '../composables/api';
|
|
4
|
-
import { Store, StoreDefinition } from 'pinia';
|
|
5
|
-
|
|
6
|
-
export type StoreMode = 'whole-last-updated' | 'partial-last-updated' | 'session';
|
|
7
|
-
export type StorageMode = 'session' | 'local-cache';
|
|
8
|
-
export interface LocalMeta {
|
|
9
|
-
storedOn: string;
|
|
10
|
-
isDetailed?: boolean;
|
|
11
|
-
earliestData?: string;
|
|
12
|
-
lastUpdate?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface LocallyStoredItem<T> {
|
|
15
|
-
meta: LocalMeta;
|
|
16
|
-
data: T;
|
|
17
|
-
count?: number;
|
|
18
|
-
filters?: string[];
|
|
19
|
-
}
|
|
20
|
-
export interface StoreGetAllReturn<T> {
|
|
21
|
-
data: T[];
|
|
22
|
-
count?: number;
|
|
23
|
-
filters?: string[];
|
|
24
|
-
}
|
|
25
|
-
export interface StoreGetReturn<T> {
|
|
26
|
-
data: T;
|
|
27
|
-
}
|
|
28
|
-
export interface BTStoreDefinition extends StoreDefinition<any, {}, {}, {
|
|
29
|
-
deleteItem: (dOptions: PathOptions) => Promise<string | undefined>;
|
|
30
|
-
get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>;
|
|
31
|
-
getAll: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetAllReturn<T>>;
|
|
32
|
-
patch: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
33
|
-
post: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
34
|
-
restore: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
35
|
-
}> {
|
|
36
|
-
}
|
|
37
|
-
export interface BTStore extends Store<any, {}, {}, {
|
|
38
|
-
deleteItem: (dOptions: PathOptions) => Promise<string | undefined>;
|
|
39
|
-
get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>;
|
|
40
|
-
getAll: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetAllReturn<T>>;
|
|
41
|
-
patch: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
42
|
-
post: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
43
|
-
restore: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>;
|
|
44
|
-
}> {
|
|
45
|
-
}
|
|
46
|
-
export interface ApiError {
|
|
47
|
-
message: string;
|
|
48
|
-
}
|
|
49
|
-
export interface UseStoreOptions {
|
|
50
|
-
/**ideally required. Otherwise will struggle to find url path */
|
|
51
|
-
api?: BTApi;
|
|
52
|
-
/**ideally required. For setting unique local storage keys */
|
|
53
|
-
auth?: BTAuth;
|
|
54
|
-
/**build a query. Overrides the default */
|
|
55
|
-
builderQuery?: (params: any) => string;
|
|
56
|
-
/**overrides the default */
|
|
57
|
-
buildUrl?: (path: PathOptions) => string;
|
|
58
|
-
/**particularly what store syle to use */
|
|
59
|
-
storeMode: StoreMode;
|
|
60
|
-
/**whether to store data locally or only for the duration of the session */
|
|
61
|
-
storageMode: StorageMode;
|
|
62
|
-
/**the name of this store */
|
|
63
|
-
storeName: string;
|
|
64
|
-
}
|
|
65
|
-
export interface CreateStoreBuilderOptions {
|
|
66
|
-
/**ideally required. Otherwise will struggle to find url path */
|
|
67
|
-
api?: BTApi;
|
|
68
|
-
/**ideally required. For setting unique local storage keys */
|
|
69
|
-
auth?: BTAuth;
|
|
70
|
-
/**build a query. Overrides the default */
|
|
71
|
-
builderQuery?: (params: any) => string;
|
|
72
|
-
/**overrides the default */
|
|
73
|
-
buildUrl?: (path: PathOptions) => string;
|
|
74
|
-
}
|
|
75
|
-
export interface CreateStoreOptions {
|
|
76
|
-
/**particularly what store syle to use */
|
|
77
|
-
storeMode: StoreMode;
|
|
78
|
-
/**whether to store data locally or only for the duration of the session */
|
|
79
|
-
storageMode: StorageMode;
|
|
80
|
-
/**the name of this store */
|
|
81
|
-
storeName: string;
|
|
82
|
-
}
|
|
83
|
-
export declare function useStore(options: CreateStoreOptions): BTStore;
|
|
84
|
-
export declare function useStoreDefinition(options: CreateStoreOptions): BTStoreDefinition;
|
|
85
|
-
export declare function createStoreBuilder(options: CreateStoreBuilderOptions): (opt: CreateStoreOptions) => BTStoreDefinition;
|
|
86
|
-
export declare function createStoreDefinition(options: UseStoreOptions): BTStoreDefinition;
|
|
87
|
-
interface UseSessionStoreOptions {
|
|
88
|
-
/**ideally required. Otherwise will struggle to find url path */
|
|
89
|
-
api?: BTApi;
|
|
90
|
-
/**ideally required. For setting unique local storage keys */
|
|
91
|
-
auth?: BTAuth;
|
|
92
|
-
/**whether to store data locally or only for the duration of the session */
|
|
93
|
-
storageMode: 'session' | 'local-cache';
|
|
94
|
-
/**build a query. Overrides the default */
|
|
95
|
-
buildQuery?: (params: any) => string;
|
|
96
|
-
/**overrides the default */
|
|
97
|
-
buildUrl?: (path: PathOptions) => string;
|
|
98
|
-
/**the name of this store */
|
|
99
|
-
storeName: string;
|
|
100
|
-
}
|
|
101
|
-
export declare function createSessionStoreDefinition(options: UseSessionStoreOptions): BTStoreDefinition;
|
|
102
|
-
interface UseWholeLastUpdateStoreOptions {
|
|
103
|
-
/**ideally required. Otherwise will struggle to find url path */
|
|
104
|
-
api?: BTApi;
|
|
105
|
-
/**ideally required. For setting unique local storage keys */
|
|
106
|
-
auth?: BTAuth;
|
|
107
|
-
storageMode: 'session' | 'local-cache';
|
|
108
|
-
storeName: string;
|
|
109
|
-
}
|
|
110
|
-
export declare function createWholeLastUpdateStoreDefinition(options: UseWholeLastUpdateStoreOptions): BTStoreDefinition;
|
|
111
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface UseTrackerOptions {
|
|
4
|
-
propsToIgnore?: string[];
|
|
5
|
-
propsToTrack?: string[];
|
|
6
|
-
useTracker?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function useTracker(data: MaybeRefOrGetter<any>, options?: UseTrackerOptions): {
|
|
9
|
-
asyncItem: Ref<any>;
|
|
10
|
-
isChanged: Ref<boolean>;
|
|
11
|
-
restartTracker: () => void;
|
|
12
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type Environment = 'production' | 'staging' | 'development';
|
|
2
|
-
export interface CreateUrlOptions {
|
|
3
|
-
production: UrlSet;
|
|
4
|
-
staging: UrlSet;
|
|
5
|
-
development: UrlSet;
|
|
6
|
-
}
|
|
7
|
-
export interface UrlSet {
|
|
8
|
-
auth?: string;
|
|
9
|
-
data?: string;
|
|
10
|
-
localDbName?: string;
|
|
11
|
-
other?: any;
|
|
12
|
-
}
|
|
13
|
-
export declare function useDbName(): string;
|
|
14
|
-
export declare function useAuthUrl(): string;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param microservice
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
export declare function useDataUrl(microservice?: string): string;
|
|
21
|
-
export declare function useUrls(): CreateUrlOptions;
|
|
22
|
-
export declare function createUrl(options: CreateUrlOptions): CreateUrlOptions;
|
package/dist/core.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CreateUrlOptions } from './composables/urls';
|
|
2
|
-
import { NavigationItem } from './composables/navigation';
|
|
3
|
-
import { BaseCosmeticTheme, UseCosmeticsOptions } from './composables/cosmetics';
|
|
4
|
-
import { CreateAuthOptions, AuthSubscription } from './composables/auth';
|
|
5
|
-
import { App } from 'vue';
|
|
6
|
-
|
|
7
|
-
export interface CoreApp {
|
|
8
|
-
install(app: App): void;
|
|
9
|
-
}
|
|
10
|
-
export interface CreateCoreOptions extends UseCosmeticsOptions<BaseCosmeticTheme> {
|
|
11
|
-
auth: CreateAuthOptions;
|
|
12
|
-
defaultCacheExpiryHours?: number;
|
|
13
|
-
navItems?: NavigationItem[];
|
|
14
|
-
presets: any;
|
|
15
|
-
/**suboptions */
|
|
16
|
-
subscriptionOptions?: AuthSubscription[];
|
|
17
|
-
urls: CreateUrlOptions;
|
|
18
|
-
}
|
|
19
|
-
export declare function createCore(options: CreateCoreOptions): CoreApp;
|
package/dist/types.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Inline: merges toolbars | much more compact | hides navigation
|
|
3
|
-
Page: shows navigation and page settings
|
|
4
|
-
Blade: shows blade minimize, maximize, close, and pins as a column
|
|
5
|
-
Free-moving: show blade as draggable and resizable with minimize, maximize, and close and pinning
|
|
6
|
-
*/
|
|
7
|
-
export type BladeVariant = 'page' | 'blade' | 'freestyle' | 'inline' | 'pane';
|
|
8
|
-
export type BladeDensity = 'default' | 'comfortable' | 'compact';
|
|
9
|
-
export type BladeMode = 'new' | 'view' | 'edit';
|
|
10
|
-
export type FieldVariant = 'underlined' | 'outlined' | 'filled' | 'solo' | 'solo-inverted' | 'solo-filled' | 'plain';
|
|
11
|
-
export interface BaseModel {
|
|
12
|
-
id?: string;
|
|
13
|
-
}
|
package/dist/useApi.d.ts
DELETED
|
File without changes
|
package/src/assets/vue.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-btn
|
|
3
|
-
v-bind="$attrs"
|
|
4
|
-
:disabled="!mIsEditing"
|
|
5
|
-
:icon="mIcon"
|
|
6
|
-
:size="mSize"
|
|
7
|
-
:variant="mVariant" />
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script setup lang="ts">
|
|
11
|
-
import { computed, inject, ref } from 'vue'
|
|
12
|
-
import { usePresets } from '../composables/presets'
|
|
13
|
-
// import { VBtn } from 'vuetify/components'
|
|
14
|
-
|
|
15
|
-
interface BtnProps {
|
|
16
|
-
icon?: string
|
|
17
|
-
isEditing?: boolean
|
|
18
|
-
preset?: string
|
|
19
|
-
size?: string,
|
|
20
|
-
variant?: 'flat' | 'text' | 'elevated' | 'tonal' | 'outlined' | 'plain'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const props = withDefaults(defineProps<BtnProps>(), {
|
|
24
|
-
icon: undefined,
|
|
25
|
-
isEditing: true,
|
|
26
|
-
size: undefined,
|
|
27
|
-
variant: 'text'
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const presets = usePresets(props.preset)
|
|
31
|
-
|
|
32
|
-
const mIcon = computed(() => props.icon ?? presets.icon)
|
|
33
|
-
|
|
34
|
-
const iIsEditing = inject('isEditing', () => ref(false), true)
|
|
35
|
-
const mIsEditing = computed(() => props.isEditing ?? presets.isEditing ?? iIsEditing.value)
|
|
36
|
-
|
|
37
|
-
const iSize = inject('size', () => ref(props.size ?? 'small'), true)
|
|
38
|
-
const mSize = computed(() => props.size ?? presets.size ?? iSize.value)
|
|
39
|
-
|
|
40
|
-
const mVariant = computed(() => props.variant ?? presets.variant)
|
|
41
|
-
</script>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-col
|
|
3
|
-
:lg="mLg"
|
|
4
|
-
:md="mMd"
|
|
5
|
-
:sm="mSm"
|
|
6
|
-
:cols="cols"
|
|
7
|
-
:class="noGutters ? 'px-0' : ''">
|
|
8
|
-
<slot></slot>
|
|
9
|
-
</v-col>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script setup lang="ts">
|
|
13
|
-
import { computed, inject, ref } from 'vue'
|
|
14
|
-
|
|
15
|
-
interface ColProps {
|
|
16
|
-
cols?: string | boolean
|
|
17
|
-
isMobile?: boolean
|
|
18
|
-
lg?: string | boolean
|
|
19
|
-
md?: string | boolean
|
|
20
|
-
sm?: string | boolean
|
|
21
|
-
noGutters?: boolean
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const props = withDefaults(defineProps<ColProps>(), {
|
|
25
|
-
cols: '12',
|
|
26
|
-
lg: false,
|
|
27
|
-
md: false,
|
|
28
|
-
sm: '6'
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const mIsMobile = inject('isMobile', () => ref(false), true)
|
|
32
|
-
|
|
33
|
-
const mLg = computed(() => (props.isMobile ?? mIsMobile.value) ? false : props.lg)
|
|
34
|
-
const mMd = computed(() => (props.isMobile ?? mIsMobile.value) ? false : props.md)
|
|
35
|
-
const mSm = computed(() => (props.isMobile ?? mIsMobile.value) ? false : props.sm)
|
|
36
|
-
</script>
|