bt-core-app 1.1.8 → 1.2.0

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.
Files changed (57) hide show
  1. package/dist/bt-core-app.js +20837 -14524
  2. package/dist/components/BT-Btn.vue.d.ts +41 -0
  3. package/dist/components/BT-Col.vue.d.ts +49 -0
  4. package/dist/components/Dialog-Confirm.vue.d.ts +2 -2
  5. package/dist/components/Dialog-Select-Date.vue.d.ts +2 -2
  6. package/dist/components/Dialog-Select.vue.d.ts +2 -2
  7. package/dist/components/Dialog-Text.vue.d.ts +2 -2
  8. package/dist/composables/actions.d.ts +6 -6
  9. package/dist/composables/api.d.ts +1 -0
  10. package/dist/composables/auth.d.ts +1 -0
  11. package/dist/composables/cosmetics.d.ts +3 -1
  12. package/dist/composables/dates.d.ts +1 -0
  13. package/dist/composables/demo.d.ts +1 -0
  14. package/dist/composables/filters.d.ts +1 -0
  15. package/dist/composables/list.d.ts +2 -2
  16. package/dist/composables/navigation.d.ts +1 -0
  17. package/dist/composables/presets.d.ts +1 -0
  18. package/dist/composables/pwa.d.ts +1 -0
  19. package/dist/composables/stores.d.ts +17 -6
  20. package/dist/index.d.ts +11 -12
  21. package/dist/style.css +1 -1
  22. package/dist/useApi.d.ts +0 -30
  23. package/package.json +2 -1
  24. package/src/components/BT-Btn.vue +1 -1
  25. package/src/components/BT-Field-Checkbox.vue +70 -0
  26. package/src/components/BT-Field-Date.vue +112 -0
  27. package/src/components/BT-Field-Entity.vue +48 -0
  28. package/src/components/BT-Field-Select.vue +67 -0
  29. package/src/components/BT-Field-String.vue +78 -0
  30. package/src/components/BT-Field-Switch.vue +68 -0
  31. package/src/components/BT-Field-Tags.vue +66 -0
  32. package/src/components/BT-Field-Textarea.vue +67 -0
  33. package/src/components/BT-Field-Trigger.vue +315 -0
  34. package/src/components/BT-Header-Option.vue +39 -0
  35. package/src/components/BT-Json.vue +67 -0
  36. package/src/components/BT-Select-List-Box.vue +258 -0
  37. package/src/components/BT-Select.vue +46 -0
  38. package/src/components/BT-Snack.vue +31 -0
  39. package/src/components/Dialog-Select-Date.vue +1 -1
  40. package/src/composables/actions.ts +6 -6
  41. package/src/composables/api.ts +9 -1
  42. package/src/composables/auth.ts +8 -19
  43. package/src/composables/cosmetics.ts +27 -28
  44. package/src/composables/dates.ts +9 -1
  45. package/src/composables/demo.ts +9 -1
  46. package/src/composables/filters.ts +9 -1
  47. package/src/composables/list.ts +6 -3
  48. package/src/composables/navigation.ts +9 -1
  49. package/src/composables/presets.ts +9 -1
  50. package/src/composables/pwa.ts +9 -1
  51. package/src/composables/stores.ts +32 -11
  52. package/src/core.ts +49 -16
  53. package/src/index.ts +12 -12
  54. package/src/types.ts +5 -1
  55. package/src/useApi.ts +57 -57
  56. package/vite.config.ts +6 -2
  57. package/.vscode/extensions.json +0 -3
@@ -12,7 +12,13 @@ export interface BTDates {
12
12
  export interface CreateDatesOptions {
13
13
  getTimeZone: () => string
14
14
  }
15
+
16
+ let current: BTDates
15
17
 
18
+ export function useDates(): BTDates {
19
+ return current
20
+ }
21
+
16
22
  export function createDates(options: CreateDatesOptions): BTDates {
17
23
 
18
24
  function getToday(): string {
@@ -67,7 +73,7 @@ export function createDates(options: CreateDatesOptions): BTDates {
67
73
  }
68
74
  }
69
75
 
70
- return {
76
+ current = {
71
77
  getToday,
72
78
  getTomorrow,
73
79
  tzDate,
@@ -75,4 +81,6 @@ export function createDates(options: CreateDatesOptions): BTDates {
75
81
  utcDate,
76
82
  utcString
77
83
  }
84
+
85
+ return current
78
86
  }
@@ -6,6 +6,12 @@ export interface BTDemo {
6
6
  startDemo: () => void
7
7
  }
8
8
 
9
+ let current: BTDemo
10
+
11
+ export function useDemo(): BTDemo {
12
+ return current
13
+ }
14
+
9
15
  export function createDemo(): BTDemo {
10
16
  const isDemoing = ref(false)
11
17
 
@@ -17,9 +23,11 @@ export function createDemo(): BTDemo {
17
23
 
18
24
  }
19
25
 
20
- return {
26
+ current = {
21
27
  endDemo,
22
28
  isDemoing,
23
29
  startDemo
24
30
  }
31
+
32
+ return current
25
33
  }
@@ -9,6 +9,12 @@ export interface UseFiltersOptions {
9
9
  dates: BTDates
10
10
  }
11
11
 
12
+ let current: BTFilters
13
+
14
+ export function useFilters(): BTFilters {
15
+ return current
16
+ }
17
+
12
18
  export function createFilters(options: UseFiltersOptions): BTFilters {
13
19
  // const { tzString, tzDate, utcString } = useDates()
14
20
 
@@ -247,10 +253,12 @@ export function createFilters(options: UseFiltersOptions): BTFilters {
247
253
  return (v: any) => v
248
254
  }
249
255
 
250
- return {
256
+ current = {
251
257
  findFilter,
252
258
  ...e
253
259
  }
260
+
261
+ return current
254
262
  }
255
263
 
256
264
  export type Textfilter = 'toLocationLine' | 'toLocationLineNoCommas' | 'toLongDate' | 'toLongDateAndTime' | 'toPercent' | 'toPrettyCSV' | 'toShortDate' | 'toShortDateAndTime' | 'toTime' | 'toTimeOfDay' | 'toCompanyNameAndLocationLine' | 'toCurrency' | 'toDayDate' | 'toDayMonth' | 'toDayOfWeek' | 'toDayShortDate' | 'toDayShortDateAndTime' | 'toDisplayNumber' | 'toDisplayNumberOver' | 'toDisplayNumberSigned' | 'toFormat'
@@ -7,7 +7,7 @@ import { computed, ref, onMounted, toValue, shallowRef, MaybeRefOrGetter, watch
7
7
  import { useRoute, useRouter } from 'vue-router'
8
8
  import { useArrayDifference, useArrayUnique, watchArray, watchDebounced } from '@vueuse/core'
9
9
  import { useActions } from '../composables/actions'
10
- import { StorageMode, StoreMode, useStore } from '../index'
10
+ import { StorageMode, StoreMode, useStoreDefinition } from '../index'
11
11
 
12
12
  export interface RefreshOptions {
13
13
  deepRefresh?: boolean,
@@ -16,6 +16,7 @@ export interface RefreshOptions {
16
16
 
17
17
  export interface TableColumn {
18
18
  align?: 'start' | 'end' | 'center'
19
+ bool?: number
19
20
  csv?: boolean,
20
21
  csvArray?: boolean,
21
22
  csvFilter?: string,
@@ -25,8 +26,10 @@ export interface TableColumn {
25
26
  level?: number
26
27
  maxWidth?: string
27
28
  minWidth?: string
29
+ nav?: string
28
30
  prefix?: string
29
31
  searchable?: boolean
32
+ single?: boolean
30
33
  sublevel?: number,
31
34
  suffix?: string
32
35
  textFilter?: string
@@ -205,7 +208,7 @@ export function useList(props: ListProps, emit?: ListEvents, options?: UseListOp
205
208
  const { actionErrorMsg, actionLoadingMsg, deleteItem, doAction, getItem, getAllItems, restoreItem } = useActions({
206
209
  nav: props.nav ?? props.bladeName ?? props.itemBladeName,
207
210
  proxyID: proxyID.value,
208
- store: useStore()({
211
+ store: useStoreDefinition({
209
212
  storeMode: storeMode,
210
213
  storageMode: storageMode,
211
214
  storeName: nav
@@ -563,7 +566,7 @@ export function useList(props: ListProps, emit?: ListEvents, options?: UseListOp
563
566
 
564
567
  onMounted(async () => {
565
568
  if (props.eager == true)
566
- await refresh({ deepRefresh: route.params?.refresh == 'true' ?? false })
569
+ await refresh({ deepRefresh: route.params?.refresh == 'true' })
567
570
  })
568
571
 
569
572
  return {
@@ -99,6 +99,12 @@ export interface UseNavigationOptions {
99
99
  navItems?: NavigationItem[]
100
100
  }
101
101
 
102
+ let current: BTNavigation
103
+
104
+ export function useNavigation(): BTNavigation {
105
+ return current
106
+ }
107
+
102
108
  export function createNavigation(options: UseNavigationOptions): BTNavigation {
103
109
  const cacheExpiryHours = options.defaultCacheExpiryHours ?? 7
104
110
  const navigationList = options.navItems ?? []
@@ -195,7 +201,7 @@ export function createNavigation(options: UseNavigationOptions): BTNavigation {
195
201
  })
196
202
  }
197
203
 
198
- return {
204
+ current = {
199
205
  showAppBar: appBar,
200
206
  showAppNavigation: appNavigation,
201
207
  backgroundName,
@@ -211,4 +217,6 @@ export function createNavigation(options: UseNavigationOptions): BTNavigation {
211
217
  findSingleDisplay,
212
218
  updateNavigationProperties
213
219
  }
220
+
221
+ return current
214
222
  }
@@ -6,6 +6,12 @@ export interface CreatePresetsOptions {
6
6
  presets: any
7
7
  }
8
8
 
9
+ let current: BTPresets
10
+
11
+ export function usePresets(preset?: string): any {
12
+ return current.usePresets(preset)
13
+ }
14
+
9
15
  export function createPresets(options: CreatePresetsOptions): BTPresets {
10
16
 
11
17
  function usePresets(preset?: string): any {
@@ -14,7 +20,9 @@ export function createPresets(options: CreatePresetsOptions): BTPresets {
14
20
  return options.presets[mPreset] ?? {}
15
21
  }
16
22
 
17
- return {
23
+ current = {
18
24
  usePresets
19
25
  }
26
+
27
+ return current
20
28
  }
@@ -23,6 +23,12 @@ export interface BTPWA {
23
23
  updateApp: () => void
24
24
  }
25
25
 
26
+ let current: BTPWA
27
+
28
+ export function usePWA(): BTPWA {
29
+ return current
30
+ }
31
+
26
32
  export function createPWA(): BTPWA {
27
33
 
28
34
  function notifyUpdateAvailable(e: any) {
@@ -79,11 +85,13 @@ export function createPWA(): BTPWA {
79
85
  promptListener = window.addEventListener('beforeinstallprompt', storePrompt)
80
86
  })
81
87
 
82
- return {
88
+ current = {
83
89
  canInstallApp,
84
90
  canUpdateApp,
85
91
  installApp,
86
92
  isInstalled,
87
93
  updateApp
88
94
  }
95
+
96
+ return current
89
97
  }
@@ -1,4 +1,4 @@
1
- import { defineStore, StoreDefinition } from 'pinia'
1
+ import { defineStore, Store, StoreDefinition } from 'pinia'
2
2
  import { ref, type Ref } from 'vue'
3
3
  import { type PathOptions, type BTApi } from '../composables/api'
4
4
  import { DateTime } from 'luxon'
@@ -36,7 +36,7 @@ export interface StoreGetReturn<T> {
36
36
  data: T
37
37
  }
38
38
 
39
- export interface BTStore extends StoreDefinition<any, {}, {},
39
+ export interface BTStoreDefinition extends StoreDefinition<any, {}, {},
40
40
  {
41
41
  deleteItem: (dOptions: PathOptions) => Promise<string | undefined>
42
42
  get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>
@@ -46,6 +46,15 @@ export interface BTStore extends StoreDefinition<any, {}, {},
46
46
  restore: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>
47
47
  }> {}
48
48
 
49
+ export interface BTStore extends Store<any, {}, {}, {
50
+ deleteItem: (dOptions: PathOptions) => Promise<string | undefined>
51
+ get: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetReturn<T>>
52
+ getAll: <T extends BaseModel>(dOptions: PathOptions) => Promise<StoreGetAllReturn<T>>
53
+ patch: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>
54
+ post: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>
55
+ restore: <T extends BaseModel>(dOptions: PathOptions) => Promise<T | undefined>
56
+ }> {}
57
+
49
58
  export interface ApiError {
50
59
  message: string
51
60
  }
@@ -87,28 +96,40 @@ export interface CreateStoreOptions {
87
96
  storeName: string
88
97
  }
89
98
 
90
- export function createStoreBuilder(options: CreateStoreBuilderOptions): (opt: CreateStoreOptions) => BTStore {
91
- return (opt: CreateStoreOptions) => {
92
- return createStore({
99
+ let currentBuilder: (opt: CreateStoreOptions) => BTStoreDefinition
100
+
101
+ export function useStore(options: CreateStoreOptions): BTStore {
102
+ return currentBuilder(options)()
103
+ }
104
+
105
+ export function useStoreDefinition(options: CreateStoreOptions): BTStoreDefinition {
106
+ return currentBuilder(options)
107
+ }
108
+
109
+ export function createStoreBuilder(options: CreateStoreBuilderOptions): (opt: CreateStoreOptions) => BTStoreDefinition {
110
+ currentBuilder = (opt: CreateStoreOptions) => {
111
+ return createStoreDefinition({
93
112
  ...options,
94
113
  ...opt
95
114
  })
96
115
  }
116
+
117
+ return currentBuilder
97
118
  }
98
119
 
99
- export function createStore(options: UseStoreOptions): BTStore {
120
+ export function createStoreDefinition(options: UseStoreOptions): BTStoreDefinition {
100
121
  if (options.storeMode == 'whole-last-updated') {
101
122
  if (options.api == null) throw new Error('Must supply an api object to use store')
102
123
 
103
- return createWholeLastUpdateStore(options)
124
+ return createWholeLastUpdateStoreDefinition(options)
104
125
  }
105
126
  else if (options.storeMode == 'partial-last-updated') {
106
127
  if (options.api == null) throw new Error('Must supply an api object to use store')
107
128
 
108
- return createWholeLastUpdateStore(options)
129
+ return createWholeLastUpdateStoreDefinition(options)
109
130
  }
110
131
  else { //if (options.storeMode == 'session') {
111
- return createSessionStore(options)
132
+ return createSessionStoreDefinition(options)
112
133
  }
113
134
  }
114
135
 
@@ -161,7 +182,7 @@ interface UseSessionStoreOptions {
161
182
  storeName: string
162
183
  }
163
184
 
164
- export function createSessionStore(options: UseSessionStoreOptions): BTStore {
185
+ export function createSessionStoreDefinition(options: UseSessionStoreOptions): BTStoreDefinition {
165
186
  return defineStore(options.storeName, () => {
166
187
  const currentTimeStampDays = DateTime.utc().toSeconds() / 86400
167
188
  const searchMemory: Ref<any> = ref({})
@@ -476,7 +497,7 @@ interface UseWholeLastUpdateStoreOptions {
476
497
  storeName: string
477
498
  }
478
499
 
479
- export function createWholeLastUpdateStore(options: UseWholeLastUpdateStoreOptions): BTStore {
500
+ export function createWholeLastUpdateStoreDefinition(options: UseWholeLastUpdateStoreOptions): BTStoreDefinition {
480
501
  return defineStore(options.storeName, () => {
481
502
  const dataItems: Ref<any[] | undefined> = ref()
482
503
  const count = ref(0)
package/src/core.ts CHANGED
@@ -11,6 +11,23 @@ import { createPWA } from './composables/pwa'
11
11
  import { createStoreBuilder } from './composables/stores'
12
12
  import { RemovableRef } from '@vueuse/core'
13
13
 
14
+
15
+ import BTBtn from './components/BT-Btn.vue'
16
+ import BTCol from './components/BT-Col.vue'
17
+ import BTFieldCheckbox from './components/BT-Field-Checkbox.vue'
18
+ import BTFieldDate from './components/BT-Field-Date.vue'
19
+ import BTFieldEntity from './components/BT-Field-Entity.vue'
20
+ import BTFieldSelect from './components/BT-Field-Select.vue'
21
+ import BTFieldString from './components/BT-Field-String.vue'
22
+ import BTFieldSwitch from './components/BT-Field-Switch.vue'
23
+ import BTFieldTags from './components/BT-Field-Tags.vue'
24
+ import BTFieldTextarea from './components/BT-Field-Textarea.vue'
25
+ import BTFieldTrigger from './components/BT-Field-Trigger.vue'
26
+ import BTHeaderOption from './components/BT-Header-Option.vue'
27
+ import BTJson from './components/BT-Json.vue'
28
+ import BTSelectListBox from './components/BT-Select-List-Box.vue'
29
+ import BTSelect from './components/BT-Select.vue'
30
+ import BTSnack from './components/BT-Snack.vue'
14
31
  import BTSpan from './components/BT-Span.vue'
15
32
 
16
33
  export interface CoreApp {
@@ -34,18 +51,34 @@ export function createCore(options: CreateCoreOptions): CoreApp {
34
51
  // const core = this
35
52
 
36
53
  //register components
54
+ app.component('bt-btn', BTBtn)
55
+ app.component('bt-col', BTCol)
56
+ app.component('bt-field-checkbox', BTFieldCheckbox)
57
+ app.component('bt-field-date', BTFieldDate)
58
+ app.component('bt-field-entity', BTFieldEntity)
59
+ app.component('bt-field-select', BTFieldSelect)
60
+ app.component('bt-field-string', BTFieldString)
61
+ app.component('bt-field-switch', BTFieldSwitch)
62
+ app.component('bt-field-tags', BTFieldTags)
63
+ app.component('bt-field-text-area', BTFieldTextarea)
64
+ app.component('bt-field-trigger', BTFieldTrigger)
65
+ app.component('bt-header-option', BTHeaderOption)
66
+ app.component('bt-json', BTJson)
67
+ app.component('bt-select-list-box', BTSelectListBox)
68
+ app.component('bt-select', BTSelect)
69
+ app.component('bt-snack', BTSnack)
37
70
  app.component('bt-span', BTSpan)
38
71
 
39
72
  //define globals
40
73
  // app.config.globalProperties.$btcore = core
41
74
 
42
- const cosmetics = createCosmetics(options)
75
+ createCosmetics(options)
43
76
 
44
77
  const demo = createDemo()
45
78
 
46
79
  const navigation = createNavigation(options)
47
80
 
48
- const presets = createPresets(options)
81
+ createPresets(options)
49
82
 
50
83
  const auth = createAuth({
51
84
  demo: demo,
@@ -65,28 +98,28 @@ export function createCore(options: CreateCoreOptions): CoreApp {
65
98
  getTimeZone: auth.getTimeZone
66
99
  })
67
100
 
68
- const filters = createFilters({
101
+ createFilters({
69
102
  dates: dates
70
103
  })
71
104
 
72
- const pwa = createPWA()
105
+ createPWA()
73
106
 
74
- const storeBuilder = createStoreBuilder({
107
+ createStoreBuilder({
75
108
  api,
76
109
  auth
77
110
  })
78
111
 
79
- //provide
80
- app.provide('bt-api', api)
81
- app.provide('bt-auth', auth)
82
- app.provide('bt-cosmetics', cosmetics)
83
- app.provide('bt-dates', dates)
84
- app.provide('bt-demo', demo)
85
- app.provide('bt-filters', filters)
86
- app.provide('bt-navigation', navigation)
87
- app.provide('bt-presets', presets)
88
- app.provide('bt-pwa', pwa)
89
- app.provide('bt-store', storeBuilder)
112
+ // //provide
113
+ // app.provide('bt-api', api)
114
+ // app.provide('bt-auth', auth)
115
+ // // app.provide('bt-cosmetics', cosmetics)
116
+ // app.provide('bt-dates', dates)
117
+ // app.provide('bt-demo', demo)
118
+ // app.provide('bt-filters', filters)
119
+ // app.provide('bt-navigation', navigation)
120
+ // app.provide('bt-presets', presets)
121
+ // app.provide('bt-pwa', pwa)
122
+ // app.provide('bt-store', storeBuilder)
90
123
  }
91
124
  }
92
125
  }
package/src/index.ts CHANGED
@@ -2,42 +2,42 @@ 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, createStore, createWholeLastUpdateStore, createSessionStore } from './composables/stores'
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'
40
+ // export { useApi, useAuth, useDates, useDemo, useFilters, useNavigation, usePresets, usePWA, useStore } from './useApi'
41
41
  export * from './types'
42
42
  export type { CoreApp, CreateCoreOptions } from './core'
43
43
  export { createCore } from './core'
package/src/types.ts CHANGED
@@ -6,8 +6,12 @@
6
6
  */
7
7
  export type BladeVariant = 'page' | 'blade' | 'freestyle' | 'inline' | 'pane'
8
8
 
9
+ export type BladeDensity = 'default' | 'comfortable' | 'compact'
10
+
9
11
  export type BladeMode = 'new' | 'view' | 'edit'
10
12
 
13
+ export type FieldVariant = 'underlined' | 'outlined' | 'filled' | 'solo' | 'solo-inverted' | 'solo-filled' | 'plain'
14
+
11
15
  export interface BaseModel {
12
16
  id?: string
13
- }
17
+ }
package/src/useApi.ts CHANGED
@@ -1,68 +1,68 @@
1
- import { inject } from 'vue'
2
- // import { BTActions } from './composables/actions'
3
- import { BTAuth } from './composables/auth'
4
- import { BTApi } from './composables/api'
5
- import { BTCosmetics } from './composables/cosmetics'
6
- import { BTDates } from './composables/dates'
7
- import { BTDemo } from './composables/demo'
8
- import { BTFilters } from './composables/filters'
9
- import { BTNavigation } from './composables/navigation'
10
- import { BTPresets } from './composables/presets'
11
- import { BTPWA } from './composables/pwa'
12
- import { BTStore, CreateStoreOptions } from './composables/stores'
1
+ // import { inject } from 'vue'
2
+ // // import { BTActions } from './composables/actions'
3
+ // import { BTAuth } from './composables/auth'
4
+ // import { BTApi } from './composables/api'
5
+ // import { BTCosmetics } from './composables/cosmetics'
6
+ // import { BTDates } from './composables/dates'
7
+ // import { BTDemo } from './composables/demo'
8
+ // import { BTFilters } from './composables/filters'
9
+ // import { BTNavigation } from './composables/navigation'
10
+ // import { BTPresets } from './composables/presets'
11
+ // import { BTPWA } from './composables/pwa'
12
+ // import { BTStore, CreateStoreOptions } from './composables/stores'
13
13
 
14
- // /**returns a new instance */
15
- // export function useActions(): BTActions {
16
- // return inject('bt-actions')!
17
- // }
14
+ // // /**returns a new instance */
15
+ // // export function useActions(): BTActions {
16
+ // // return inject('bt-actions')!
17
+ // // }
18
18
 
19
- /**returns a singleton */
20
- export function useApi(): BTApi {
21
- return inject('bt-api')!
22
- }
19
+ // /**returns a singleton */
20
+ // export function useApi(): BTApi {
21
+ // return inject('bt-api')!
22
+ // }
23
23
 
24
- /**returns a singleton */
25
- export function useAuth(): BTAuth {
26
- return inject('bt-auth')!
27
- }
24
+ // /**returns a singleton */
25
+ // export function useAuth(): BTAuth {
26
+ // return inject('bt-auth')!
27
+ // }
28
28
 
29
- /**returns a singleton */
30
- export function useCosmetics(): BTCosmetics {
31
- return inject('bt-cosmetics')!
32
- }
29
+ // /**returns a singleton */
30
+ // export function useCosmetics(): BTCosmetics {
31
+ // return inject('bt-cosmetics')!
32
+ // }
33
33
 
34
- /**returns a singleton */
35
- export function useDates(): BTDates {
36
- return inject('bt-dates')!
37
- }
34
+ // /**returns a singleton */
35
+ // export function useDates(): BTDates {
36
+ // return inject('bt-dates')!
37
+ // }
38
38
 
39
- /**returns a singleton */
40
- export function useDemo(): BTDemo {
41
- return inject('bt-demo')!
42
- }
39
+ // /**returns a singleton */
40
+ // export function useDemo(): BTDemo {
41
+ // return inject('bt-demo')!
42
+ // }
43
43
 
44
- /**returns a singleton */
45
- export function useFilters(): BTFilters {
46
- return inject('bt-filters')!
47
- }
44
+ // /**returns a singleton */
45
+ // export function useFilters(): BTFilters {
46
+ // return inject('bt-filters')!
47
+ // }
48
48
 
49
- /**returns a singleton */
50
- export function useNavigation(): BTNavigation {
51
- return inject('bt-navigation')!
52
- }
49
+ // /**returns a singleton */
50
+ // export function useNavigation(): BTNavigation {
51
+ // return inject('bt-navigation')!
52
+ // }
53
53
 
54
- /**returns a singleton */
55
- export function usePresets(preset?: string): any {
56
- const p = inject('bt-presets')! as BTPresets
57
- return p.usePresets(preset)
58
- }
54
+ // /**returns a singleton */
55
+ // export function usePresets(preset?: string): any {
56
+ // const p = inject('bt-presets')! as BTPresets
57
+ // return p.usePresets(preset)
58
+ // }
59
59
 
60
- /**returns a singleton */
61
- export function usePWA(): BTPWA {
62
- return inject('bt-pwa')!
63
- }
60
+ // /**returns a singleton */
61
+ // export function usePWA(): BTPWA {
62
+ // return inject('bt-pwa')!
63
+ // }
64
64
 
65
- /**returns a new instance */
66
- export function useStore(): (opt: CreateStoreOptions) => BTStore {
67
- return inject('bt-store')!
68
- }
65
+ // /**returns a new instance */
66
+ // export function useStore(): (opt: CreateStoreOptions) => BTStore {
67
+ // return inject('bt-store')!
68
+ // }
package/vite.config.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  import { defineConfig } from 'vite'
3
3
  import path from 'path'
4
4
  import vue from '@vitejs/plugin-vue'
5
+ import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
5
6
  import dts from 'vite-plugin-dts'
6
7
 
7
8
  // https://vitejs.dev/config/
@@ -26,9 +27,12 @@ export default defineConfig({
26
27
  }
27
28
  },
28
29
  plugins: [
30
+ // vue({
31
+ // template: { transformAssetUrls }
32
+ // }),
29
33
  vue(),
30
- dts()
31
- // dts({ rollupTypes: true })
34
+ dts(),
35
+ vuetify()
32
36
  ],
33
37
  resolve: {
34
38
  alias: {
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3
- }