bt-core-app 1.1.9 → 1.2.1
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/bt-core-app.js +25270 -15306
- package/dist/components/BT-Btn.vue.d.ts +41 -0
- package/dist/components/BT-Col.vue.d.ts +49 -0
- package/dist/components/BT-Field-Checkbox.vue.d.ts +56 -0
- package/dist/components/BT-Field-Date.vue.d.ts +64 -0
- package/dist/components/BT-Field-Entity.vue.d.ts +46 -0
- package/dist/components/BT-Field-Select.vue.d.ts +54 -0
- package/dist/components/BT-Field-String.vue.d.ts +53 -0
- package/dist/components/BT-Field-Switch.vue.d.ts +51 -0
- package/dist/components/BT-Field-Tags.vue.d.ts +51 -0
- package/dist/components/BT-Field-Textarea.vue.d.ts +52 -0
- package/dist/components/BT-Field-Trigger.vue.d.ts +79 -0
- package/dist/components/BT-Header-Option.vue.d.ts +18 -0
- package/dist/components/BT-Json.vue.d.ts +8 -0
- package/dist/components/BT-Select-List-Box.vue.d.ts +108 -0
- package/dist/components/BT-Select.vue.d.ts +53 -0
- package/dist/components/BT-Snack.vue.d.ts +33 -0
- package/dist/components/Dialog-Confirm.vue.d.ts +2 -2
- package/dist/components/Dialog-Select-Date.vue.d.ts +2 -2
- package/dist/components/Dialog-Select.vue.d.ts +2 -2
- package/dist/components/Dialog-Text.vue.d.ts +2 -2
- package/dist/composables/actions.d.ts +6 -6
- package/dist/composables/api.d.ts +1 -0
- package/dist/composables/auth.d.ts +1 -0
- package/dist/composables/cosmetics.d.ts +3 -1
- package/dist/composables/dates.d.ts +1 -0
- package/dist/composables/demo.d.ts +1 -0
- package/dist/composables/filters.d.ts +1 -0
- package/dist/composables/list.d.ts +11 -2
- package/dist/composables/navigation.d.ts +1 -0
- package/dist/composables/presets.d.ts +1 -0
- package/dist/composables/pwa.d.ts +1 -0
- package/dist/composables/stores.d.ts +17 -6
- package/dist/index.d.ts +11 -12
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/useApi.d.ts +0 -30
- package/package.json +2 -1
- package/src/components/BT-Btn.vue +1 -1
- package/src/components/BT-Field-Checkbox.vue +70 -0
- package/src/components/BT-Field-Date.vue +108 -0
- package/src/components/BT-Field-Entity.vue +48 -0
- package/src/components/BT-Field-Select.vue +67 -0
- package/src/components/BT-Field-String.vue +78 -0
- package/src/components/BT-Field-Switch.vue +68 -0
- package/src/components/BT-Field-Tags.vue +66 -0
- package/src/components/BT-Field-Textarea.vue +67 -0
- package/src/components/BT-Field-Trigger.vue +315 -0
- package/src/components/BT-Header-Option.vue +39 -0
- package/src/components/BT-Json.vue +67 -0
- package/src/components/BT-Select-List-Box.vue +258 -0
- package/src/components/BT-Select.vue +46 -0
- package/src/components/BT-Snack.vue +31 -0
- package/src/components/Dialog-Select-Date.vue +1 -1
- package/src/composables/actions.ts +6 -6
- package/src/composables/api.ts +9 -1
- package/src/composables/auth.ts +15 -21
- package/src/composables/cosmetics.ts +27 -28
- package/src/composables/dates.ts +9 -1
- package/src/composables/demo.ts +9 -1
- package/src/composables/filters.ts +9 -1
- package/src/composables/list.ts +5 -2
- package/src/composables/navigation.ts +9 -1
- package/src/composables/presets.ts +9 -1
- package/src/composables/pwa.ts +9 -1
- package/src/composables/stores.ts +32 -11
- package/src/core.ts +49 -16
- package/src/index.ts +12 -12
- package/src/types.ts +5 -1
- package/src/useApi.ts +57 -57
- package/test/auth.test.ts +63 -0
- package/test/stores-last-update.test.ts +4 -4
- package/vite.config.ts +6 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ListProps } from '../composables/list';
|
|
2
|
+
|
|
3
|
+
interface SelectProps extends ListProps {
|
|
4
|
+
alwaysOpen?: boolean;
|
|
5
|
+
canRefresh?: boolean;
|
|
6
|
+
canSearch?: boolean;
|
|
7
|
+
canSelectNone?: boolean;
|
|
8
|
+
colClass?: string;
|
|
9
|
+
cols?: string | boolean;
|
|
10
|
+
height?: string;
|
|
11
|
+
isMobile?: boolean;
|
|
12
|
+
isEditing?: boolean;
|
|
13
|
+
isSelecting?: boolean;
|
|
14
|
+
items?: [];
|
|
15
|
+
itemSubtext?: string;
|
|
16
|
+
itemText?: string;
|
|
17
|
+
itemValue?: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
lg?: string | boolean;
|
|
20
|
+
modelValue?: any;
|
|
21
|
+
md?: string | boolean;
|
|
22
|
+
nav?: string;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
showSettings?: boolean;
|
|
25
|
+
sm?: string | boolean;
|
|
26
|
+
subtextFilter?: string;
|
|
27
|
+
subtextFunction?: Function;
|
|
28
|
+
textFilter?: string;
|
|
29
|
+
textFunction?: Function;
|
|
30
|
+
transparent?: boolean;
|
|
31
|
+
useVirtualScroller?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare function openList(): void;
|
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
35
|
+
canRefresh: boolean;
|
|
36
|
+
height: string;
|
|
37
|
+
isEditing: undefined;
|
|
38
|
+
sortOrder: string;
|
|
39
|
+
cols: string;
|
|
40
|
+
lg: boolean;
|
|
41
|
+
md: boolean;
|
|
42
|
+
sm: string;
|
|
43
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
"update:modelValue": (...args: any[]) => void;
|
|
45
|
+
change: (...args: any[]) => void;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
47
|
+
canRefresh: boolean;
|
|
48
|
+
height: string;
|
|
49
|
+
isEditing: undefined;
|
|
50
|
+
sortOrder: string;
|
|
51
|
+
cols: string;
|
|
52
|
+
lg: boolean;
|
|
53
|
+
md: boolean;
|
|
54
|
+
sm: string;
|
|
55
|
+
}>>> & {
|
|
56
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
isEditing: boolean;
|
|
60
|
+
height: string;
|
|
61
|
+
cols: string | boolean;
|
|
62
|
+
lg: string | boolean;
|
|
63
|
+
md: string | boolean;
|
|
64
|
+
sm: string | boolean;
|
|
65
|
+
sortOrder: "Ascending" | "Descending";
|
|
66
|
+
canRefresh: boolean;
|
|
67
|
+
}, {}>, {
|
|
68
|
+
actions?(_: {}): any;
|
|
69
|
+
actionsRight?(_: {}): any;
|
|
70
|
+
settings?(_: {}): any;
|
|
71
|
+
item?(_: {
|
|
72
|
+
items: any;
|
|
73
|
+
index: number;
|
|
74
|
+
size: string;
|
|
75
|
+
}): any;
|
|
76
|
+
default?(_: {
|
|
77
|
+
item: any;
|
|
78
|
+
index: number;
|
|
79
|
+
size: string;
|
|
80
|
+
}): any;
|
|
81
|
+
selected?(_: {
|
|
82
|
+
item: any;
|
|
83
|
+
open: typeof openList;
|
|
84
|
+
}): any;
|
|
85
|
+
}>;
|
|
86
|
+
export default _default;
|
|
87
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
88
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
89
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
90
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
91
|
+
} : {
|
|
92
|
+
type: import('vue').PropType<T[K]>;
|
|
93
|
+
required: true;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
type __VLS_WithDefaults<P, D> = {
|
|
97
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
98
|
+
default: D[K];
|
|
99
|
+
}> : P[K];
|
|
100
|
+
};
|
|
101
|
+
type __VLS_Prettify<T> = {
|
|
102
|
+
[K in keyof T]: T[K];
|
|
103
|
+
} & {};
|
|
104
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
105
|
+
new (): {
|
|
106
|
+
$slots: S;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FieldVariant } from '../types';
|
|
2
|
+
import { ListProps } from '../composables/list';
|
|
3
|
+
|
|
4
|
+
interface SelectProps extends ListProps {
|
|
5
|
+
additionalUrl?: string;
|
|
6
|
+
canRefresh?: boolean;
|
|
7
|
+
canSelectNone?: boolean;
|
|
8
|
+
fieldVariant?: FieldVariant;
|
|
9
|
+
items?: [];
|
|
10
|
+
itemText?: string;
|
|
11
|
+
itemValue?: string;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
nav?: string;
|
|
14
|
+
onFilter?: Function;
|
|
15
|
+
textFilter?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
18
|
+
sortOrder: string;
|
|
19
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
change: (item: any) => void;
|
|
21
|
+
deleted: (item: any) => void;
|
|
22
|
+
input: (item: any) => void;
|
|
23
|
+
select: (item: any) => void;
|
|
24
|
+
"mouse-over-item": (item: any) => void;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
26
|
+
sortOrder: string;
|
|
27
|
+
}>>> & {
|
|
28
|
+
onChange?: ((item: any) => any) | undefined;
|
|
29
|
+
onInput?: ((item: any) => any) | undefined;
|
|
30
|
+
onSelect?: ((item: any) => any) | undefined;
|
|
31
|
+
onDeleted?: ((item: any) => any) | undefined;
|
|
32
|
+
"onMouse-over-item"?: ((item: any) => any) | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
sortOrder: "Ascending" | "Descending";
|
|
35
|
+
}, {}>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
38
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
39
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
40
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
41
|
+
} : {
|
|
42
|
+
type: import('vue').PropType<T[K]>;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
type __VLS_WithDefaults<P, D> = {
|
|
47
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
48
|
+
default: D[K];
|
|
49
|
+
}> : P[K];
|
|
50
|
+
};
|
|
51
|
+
type __VLS_Prettify<T> = {
|
|
52
|
+
[K in keyof T]: T[K];
|
|
53
|
+
} & {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface SnackProps {
|
|
2
|
+
isTimed?: boolean;
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
timeout?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SnackProps>, {
|
|
7
|
+
isTimed: boolean;
|
|
8
|
+
timeout: string;
|
|
9
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SnackProps>, {
|
|
10
|
+
isTimed: boolean;
|
|
11
|
+
timeout: string;
|
|
12
|
+
}>>>, {
|
|
13
|
+
isTimed: boolean;
|
|
14
|
+
timeout: string;
|
|
15
|
+
}, {}>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_WithDefaults<P, D> = {
|
|
27
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
+
default: D[K];
|
|
29
|
+
}> : P[K];
|
|
30
|
+
};
|
|
31
|
+
type __VLS_Prettify<T> = {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} & {};
|
|
@@ -5,15 +5,15 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
5
5
|
confirmValue: boolean;
|
|
6
6
|
startIncludeDetails: boolean;
|
|
7
7
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
-
cancel: (...args: any[]) => void;
|
|
9
8
|
confirm: (...args: any[]) => void;
|
|
9
|
+
cancel: (...args: any[]) => void;
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ConfirmDialogProps>, {
|
|
11
11
|
cancelValue: boolean;
|
|
12
12
|
confirmValue: boolean;
|
|
13
13
|
startIncludeDetails: boolean;
|
|
14
14
|
}>>> & {
|
|
15
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
16
15
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
cancelValue: any;
|
|
19
19
|
confirmValue: any;
|
|
@@ -4,14 +4,14 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
4
4
|
cancelValue: boolean;
|
|
5
5
|
height: string;
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
cancel: (...args: any[]) => void;
|
|
8
7
|
confirm: (...args: any[]) => void;
|
|
8
|
+
cancel: (...args: any[]) => void;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectDateProps>, {
|
|
10
10
|
cancelValue: boolean;
|
|
11
11
|
height: string;
|
|
12
12
|
}>>> & {
|
|
13
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
14
13
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
height: string;
|
|
17
17
|
cancelValue: any;
|
|
@@ -5,15 +5,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
|
|
|
5
5
|
height: string;
|
|
6
6
|
showSearch: boolean;
|
|
7
7
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
-
cancel: (...args: any[]) => void;
|
|
9
8
|
confirm: (...args: any[]) => void;
|
|
9
|
+
cancel: (...args: any[]) => void;
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectDialogProps>, {
|
|
11
11
|
cancelValue: boolean;
|
|
12
12
|
height: string;
|
|
13
13
|
showSearch: boolean;
|
|
14
14
|
}>>> & {
|
|
15
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
16
15
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
height: string;
|
|
19
19
|
cancelValue: any;
|
|
@@ -3,13 +3,13 @@ import { TextDialogProps } from '../composables/dialogs';
|
|
|
3
3
|
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextDialogProps>, {
|
|
4
4
|
height: string;
|
|
5
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
cancel: (...args: any[]) => void;
|
|
7
6
|
confirm: (...args: any[]) => void;
|
|
7
|
+
cancel: (...args: any[]) => void;
|
|
8
8
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextDialogProps>, {
|
|
9
9
|
height: string;
|
|
10
10
|
}>>> & {
|
|
11
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
12
11
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
height: string;
|
|
15
15
|
}, {}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShallowRef, ComputedRef } from 'vue';
|
|
2
2
|
import { DoActionOptions } from '../composables/actions-tracker';
|
|
3
3
|
import { BTApi, PathOptions } from '../composables/api';
|
|
4
|
-
import {
|
|
4
|
+
import { BTStoreDefinition } from '../composables/stores';
|
|
5
5
|
import { BladeMode } from '../types';
|
|
6
6
|
|
|
7
7
|
export type OnCanDoAsync = (item: any) => Promise<string | undefined>;
|
|
@@ -14,7 +14,7 @@ export interface GetOptions extends PathOptions, DoActionOptions {
|
|
|
14
14
|
onGetAsync?: OnGetAsync;
|
|
15
15
|
/**called after get occurs successfully */
|
|
16
16
|
onGetSuccessAsync?: OnGetSuccessAsync;
|
|
17
|
-
store?:
|
|
17
|
+
store?: BTStoreDefinition;
|
|
18
18
|
}
|
|
19
19
|
export interface DeleteOptions extends PathOptions, DoActionOptions {
|
|
20
20
|
/**Returns a string if cannot */
|
|
@@ -23,7 +23,7 @@ export interface DeleteOptions extends PathOptions, DoActionOptions {
|
|
|
23
23
|
onDeleteAsync?: OnDoAsync;
|
|
24
24
|
/**Will open a dialog box requesting user confirmation for delete action */
|
|
25
25
|
onDeleteSuccessAsync?: OnDoAsync;
|
|
26
|
-
store?:
|
|
26
|
+
store?: BTStoreDefinition;
|
|
27
27
|
}
|
|
28
28
|
export interface RestoreOptions extends PathOptions, DoActionOptions {
|
|
29
29
|
/**Returns a string if cannot */
|
|
@@ -32,7 +32,7 @@ export interface RestoreOptions extends PathOptions, DoActionOptions {
|
|
|
32
32
|
onRestoreAsync?: OnDoSuccessAsync;
|
|
33
33
|
/**Called after restore succeeds */
|
|
34
34
|
onRestoreSuccessAsync?: OnDoSuccessAsync;
|
|
35
|
-
store?:
|
|
35
|
+
store?: BTStoreDefinition;
|
|
36
36
|
}
|
|
37
37
|
export interface SaveOptions extends PathOptions, DoActionOptions {
|
|
38
38
|
/**will seek to post if 'new' otherwise will patch */
|
|
@@ -48,7 +48,7 @@ export interface SaveOptions extends PathOptions, DoActionOptions {
|
|
|
48
48
|
onSaveAsync?: OnDoSuccessAsync;
|
|
49
49
|
/**Called after save succeeds */
|
|
50
50
|
onSaveSuccessAsync?: OnDoSuccessAsync;
|
|
51
|
-
store?:
|
|
51
|
+
store?: BTStoreDefinition;
|
|
52
52
|
}
|
|
53
53
|
export interface ApiActionOptions extends PathOptions, DoActionOptions {
|
|
54
54
|
api: BTApi;
|
|
@@ -57,7 +57,7 @@ export interface UseActionsOptions extends DoActionOptions {
|
|
|
57
57
|
nav?: string;
|
|
58
58
|
proxyID?: string;
|
|
59
59
|
refresh?: boolean;
|
|
60
|
-
store?:
|
|
60
|
+
store?: BTStoreDefinition;
|
|
61
61
|
throwError?: boolean;
|
|
62
62
|
url?: string;
|
|
63
63
|
}
|
|
@@ -81,5 +81,6 @@ export interface BTApi {
|
|
|
81
81
|
post: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
82
82
|
patch: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
83
83
|
}
|
|
84
|
+
export declare function useApi(): BTApi;
|
|
84
85
|
export declare function createApi(options?: UseApiOptions): BTApi;
|
|
85
86
|
export {};
|
|
@@ -23,6 +23,7 @@ export interface UseCosmeticsOptions<T extends BaseCosmeticTheme> {
|
|
|
23
23
|
}
|
|
24
24
|
export interface BTCosmetics {
|
|
25
25
|
state: CosmeticData;
|
|
26
|
+
initiate: () => void;
|
|
26
27
|
resetCosmetics: (toDefault: boolean) => void;
|
|
27
28
|
setTemporaryColor: (color: string) => void;
|
|
28
29
|
toggleDrawer: () => void;
|
|
@@ -30,5 +31,6 @@ export interface BTCosmetics {
|
|
|
30
31
|
toggleLightDark: () => void;
|
|
31
32
|
undoTemporaryColor: () => void;
|
|
32
33
|
}
|
|
33
|
-
export declare function
|
|
34
|
+
export declare function useCosmetics(): BTCosmetics;
|
|
35
|
+
export declare function createCosmetics<T extends BaseCosmeticTheme>(options: UseCosmeticsOptions<T>): void;
|
|
34
36
|
export {};
|
|
@@ -6,5 +6,6 @@ export interface BTFilters {
|
|
|
6
6
|
export interface UseFiltersOptions {
|
|
7
7
|
dates: BTDates;
|
|
8
8
|
}
|
|
9
|
+
export declare function useFilters(): BTFilters;
|
|
9
10
|
export declare function createFilters(options: UseFiltersOptions): BTFilters;
|
|
10
11
|
export type Textfilter = 'toLocationLine' | 'toLocationLineNoCommas' | 'toLongDate' | 'toLongDateAndTime' | 'toPercent' | 'toPrettyCSV' | 'toShortDate' | 'toShortDateAndTime' | 'toTime' | 'toTimeOfDay' | 'toCompanyNameAndLocationLine' | 'toCurrency' | 'toDayDate' | 'toDayMonth' | 'toDayOfWeek' | 'toDayShortDate' | 'toDayShortDateAndTime' | 'toDisplayNumber' | 'toDisplayNumberOver' | 'toDisplayNumberSigned' | 'toFormat';
|
|
@@ -9,6 +9,7 @@ export interface RefreshOptions {
|
|
|
9
9
|
}
|
|
10
10
|
export interface TableColumn {
|
|
11
11
|
align?: 'start' | 'end' | 'center';
|
|
12
|
+
bool?: number;
|
|
12
13
|
csv?: boolean;
|
|
13
14
|
csvArray?: boolean;
|
|
14
15
|
csvFilter?: string;
|
|
@@ -18,8 +19,10 @@ export interface TableColumn {
|
|
|
18
19
|
level?: number;
|
|
19
20
|
maxWidth?: string;
|
|
20
21
|
minWidth?: string;
|
|
22
|
+
nav?: string;
|
|
21
23
|
prefix?: string;
|
|
22
24
|
searchable?: boolean;
|
|
25
|
+
single?: boolean;
|
|
23
26
|
sublevel?: number;
|
|
24
27
|
suffix?: string;
|
|
25
28
|
textFilter?: string;
|
|
@@ -142,7 +145,8 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
|
|
|
142
145
|
filters: import('vue').ComputedRef<string[]>;
|
|
143
146
|
filtersChanged: import('vue').ComputedRef<boolean>;
|
|
144
147
|
headerOptions: import('vue').Ref<{
|
|
145
|
-
align?: "
|
|
148
|
+
align?: "start" | "end" | "center" | undefined;
|
|
149
|
+
bool?: number | undefined;
|
|
146
150
|
csv?: boolean | undefined;
|
|
147
151
|
csvArray?: boolean | undefined;
|
|
148
152
|
csvFilter?: string | undefined;
|
|
@@ -152,8 +156,10 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
|
|
|
152
156
|
level?: number | undefined;
|
|
153
157
|
maxWidth?: string | undefined;
|
|
154
158
|
minWidth?: string | undefined;
|
|
159
|
+
nav?: string | undefined;
|
|
155
160
|
prefix?: string | undefined;
|
|
156
161
|
searchable?: boolean | undefined;
|
|
162
|
+
single?: boolean | undefined;
|
|
157
163
|
sublevel?: number | undefined;
|
|
158
164
|
suffix?: string | undefined;
|
|
159
165
|
textFilter?: string | undefined;
|
|
@@ -177,7 +183,8 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
|
|
|
177
183
|
sortOrder: import('vue').Ref<"Ascending" | "Descending" | undefined>;
|
|
178
184
|
subtitleOptions: import('vue').ComputedRef<GroupedHeaderOption[]>;
|
|
179
185
|
tableHeaders: import('vue').ComputedRef<{
|
|
180
|
-
align?: "
|
|
186
|
+
align?: "start" | "end" | "center" | undefined;
|
|
187
|
+
bool?: number | undefined;
|
|
181
188
|
csv?: boolean | undefined;
|
|
182
189
|
csvArray?: boolean | undefined;
|
|
183
190
|
csvFilter?: string | undefined;
|
|
@@ -187,8 +194,10 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
|
|
|
187
194
|
level?: number | undefined;
|
|
188
195
|
maxWidth?: string | undefined;
|
|
189
196
|
minWidth?: string | undefined;
|
|
197
|
+
nav?: string | undefined;
|
|
190
198
|
prefix?: string | undefined;
|
|
191
199
|
searchable?: boolean | undefined;
|
|
200
|
+
single?: boolean | undefined;
|
|
192
201
|
sublevel?: number | undefined;
|
|
193
202
|
suffix?: string | undefined;
|
|
194
203
|
textFilter?: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BTAuth } from './auth';
|
|
2
2
|
import { BaseModel } from '../types';
|
|
3
3
|
import { PathOptions, BTApi } from '../composables/api';
|
|
4
|
-
import { StoreDefinition } from 'pinia';
|
|
4
|
+
import { Store, StoreDefinition } from 'pinia';
|
|
5
5
|
|
|
6
6
|
export type StoreMode = 'whole-last-updated' | 'partial-last-updated' | 'session';
|
|
7
7
|
export type StorageMode = 'session' | 'local-cache';
|
|
@@ -25,7 +25,16 @@ export interface StoreGetAllReturn<T> {
|
|
|
25
25
|
export interface StoreGetReturn<T> {
|
|
26
26
|
data: T;
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
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, {}, {}, {
|
|
29
38
|
deleteItem: (dOptions: PathOptions) => Promise<string | undefined>;
|
|
30
39
|
get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>;
|
|
31
40
|
getAll: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetAllReturn<T>>;
|
|
@@ -71,8 +80,10 @@ export interface CreateStoreOptions {
|
|
|
71
80
|
/**the name of this store */
|
|
72
81
|
storeName: string;
|
|
73
82
|
}
|
|
74
|
-
export declare function
|
|
75
|
-
export declare function
|
|
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;
|
|
76
87
|
interface UseSessionStoreOptions {
|
|
77
88
|
/**ideally required. Otherwise will struggle to find url path */
|
|
78
89
|
api?: BTApi;
|
|
@@ -87,7 +98,7 @@ interface UseSessionStoreOptions {
|
|
|
87
98
|
/**the name of this store */
|
|
88
99
|
storeName: string;
|
|
89
100
|
}
|
|
90
|
-
export declare function
|
|
101
|
+
export declare function createSessionStoreDefinition(options: UseSessionStoreOptions): BTStoreDefinition;
|
|
91
102
|
interface UseWholeLastUpdateStoreOptions {
|
|
92
103
|
/**ideally required. Otherwise will struggle to find url path */
|
|
93
104
|
api?: BTApi;
|
|
@@ -96,5 +107,5 @@ interface UseWholeLastUpdateStoreOptions {
|
|
|
96
107
|
storageMode: 'session' | 'local-cache';
|
|
97
108
|
storeName: string;
|
|
98
109
|
}
|
|
99
|
-
export declare function
|
|
110
|
+
export declare function createWholeLastUpdateStoreDefinition(options: UseWholeLastUpdateStoreOptions): BTStoreDefinition;
|
|
100
111
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,42 +2,41 @@ export { useActionsTracker } from './composables/actions-tracker';
|
|
|
2
2
|
export type { BTActions, GetOptions, DeleteOptions, RestoreOptions, SaveOptions, ApiActionOptions, UseActionsOptions } from './composables/actions';
|
|
3
3
|
export { useActions } from './composables/actions';
|
|
4
4
|
export type { BTApi, UseApiOptions, PathOptions, QueryParams } from './composables/api';
|
|
5
|
-
export { createApi } from './composables/api';
|
|
5
|
+
export { createApi, useApi } from './composables/api';
|
|
6
6
|
export type { BTAuth, AuthItem, AuthSubscription, BaseAuthCredentials, CreateAuthOptions } from './composables/auth';
|
|
7
|
-
export { createAuth } from './composables/auth';
|
|
7
|
+
export { createAuth, useAuth } from './composables/auth';
|
|
8
8
|
export type { BTCosmetics, BaseCosmeticTheme, UseCosmeticsOptions } from './composables/cosmetics';
|
|
9
|
-
export { createCosmetics } from './composables/cosmetics';
|
|
9
|
+
export { createCosmetics, useCosmetics } from './composables/cosmetics';
|
|
10
10
|
export * from './composables/csv';
|
|
11
11
|
export type { BTDates, CreateDatesOptions } from './composables/dates';
|
|
12
|
-
export { createDates } from './composables/dates';
|
|
12
|
+
export { createDates, useDates } from './composables/dates';
|
|
13
13
|
export type { BTDemo } from './composables/demo';
|
|
14
|
-
export { createDemo } from './composables/demo';
|
|
14
|
+
export { createDemo, useDemo } from './composables/demo';
|
|
15
15
|
export * from './composables/dialogs';
|
|
16
16
|
export type { BTDocumentMeta, UseDocumentMetaOptions } from './composables/document-meta';
|
|
17
17
|
export { useDocumentMeta } from './composables/document-meta';
|
|
18
18
|
export * from './composables/draggable';
|
|
19
19
|
export type { BTFilters, UseFiltersOptions } from './composables/filters';
|
|
20
|
-
export { createFilters } from './composables/filters';
|
|
20
|
+
export { createFilters, useFilters } from './composables/filters';
|
|
21
21
|
export { useLocalDb, useLocalCache } from './composables/forage';
|
|
22
22
|
export * from './composables/helpers';
|
|
23
23
|
export { useId } from './composables/id';
|
|
24
24
|
export type { TableColumn, CustomFilterParam, ListEvents, ListProps, GroupedHeaderOption, UseListOptions } from './composables/list';
|
|
25
25
|
export { useList } from './composables/list';
|
|
26
26
|
export type { BTNavigation, ExternalParty, ExternalNavigation, NavigationItem, UseNavigationOptions } from './composables/navigation';
|
|
27
|
-
export { createNavigation } from './composables/navigation';
|
|
27
|
+
export { createNavigation, useNavigation } from './composables/navigation';
|
|
28
28
|
export type { BTPresets, CreatePresetsOptions } from './composables/presets';
|
|
29
|
-
export { createPresets } from './composables/presets';
|
|
29
|
+
export { createPresets, usePresets } from './composables/presets';
|
|
30
30
|
export type { BTPWA, SWEvent } from './composables/pwa';
|
|
31
|
-
export { createPWA } from './composables/pwa';
|
|
31
|
+
export { createPWA, usePWA } from './composables/pwa';
|
|
32
32
|
export * from './composables/resizable';
|
|
33
33
|
export type { UseRulesOptions } from './composables/rules';
|
|
34
34
|
export { useRules } from './composables/rules';
|
|
35
|
-
export type { BTStore, StoreMode, StorageMode, LocalMeta, LocallyStoredItem, StoreGetAllReturn, StoreGetReturn, UseStoreOptions, CreateStoreBuilderOptions, CreateStoreOptions } from './composables/stores';
|
|
36
|
-
export { createStoreBuilder,
|
|
35
|
+
export type { BTStoreDefinition, BTStore, StoreMode, StorageMode, LocalMeta, LocallyStoredItem, StoreGetAllReturn, StoreGetReturn, UseStoreOptions, CreateStoreBuilderOptions, CreateStoreOptions } from './composables/stores';
|
|
36
|
+
export { createStoreBuilder, createStoreDefinition, useStore, useStoreDefinition, createWholeLastUpdateStoreDefinition, createSessionStoreDefinition } from './composables/stores';
|
|
37
37
|
export type { UseTrackerOptions } from './composables/track';
|
|
38
38
|
export { useTracker } from './composables/track';
|
|
39
39
|
export { useUrl } from './composables/urls';
|
|
40
|
-
export { useApi, useAuth, useCosmetics, useDates, useDemo, useFilters, useNavigation, usePresets, usePWA, useStore } from './useApi';
|
|
41
40
|
export * from './types';
|
|
42
41
|
export type { CoreApp, CreateCoreOptions } from './core';
|
|
43
42
|
export { createCore } from './core';
|