@xy-planning-network/trees 0.9.4 → 0.9.6-rc1

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 (33) hide show
  1. package/dist/trees.es.js +1605 -1596
  2. package/dist/trees.umd.js +9 -9
  3. package/package.json +1 -1
  4. package/src/lib-components/layout/DateFilter.vue +19 -30
  5. package/src/lib-components/lists/DataTable.vue +10 -6
  6. package/src/lib-components/lists/DetailList.vue +98 -42
  7. package/src/lib-components/lists/DynamicTable.vue +57 -52
  8. package/src/lib-components/navigation/ActionsDropdown.vue +1 -1
  9. package/types/components.d.ts +1 -1
  10. package/types/composables/index.d.ts +2 -1
  11. package/types/composables/list.d.ts +13 -0
  12. package/types/composables/table.d.ts +1 -1
  13. package/types/entry.d.ts +9 -9
  14. package/types/helpers/Slots.d.ts +2 -0
  15. package/types/lib-components/forms/MultiCheckboxes.vue.d.ts +2 -2
  16. package/types/lib-components/forms/Radio.vue.d.ts +2 -2
  17. package/types/lib-components/forms/RadioCards.vue.d.ts +1 -1
  18. package/types/lib-components/forms/Select.vue.d.ts +2 -2
  19. package/types/lib-components/layout/DateFilter.vue.d.ts +6 -13
  20. package/types/lib-components/layout/SidebarLayout.vue.d.ts +1 -1
  21. package/types/lib-components/layout/StackedLayout.vue.d.ts +2 -2
  22. package/types/lib-components/lists/DataTable.vue.d.ts +1 -1
  23. package/types/lib-components/lists/DetailList.vue.d.ts +49 -17
  24. package/types/lib-components/lists/DynamicTable.vue.d.ts +1 -1
  25. package/types/lib-components/lists/StaticTable.vue.d.ts +21 -0
  26. package/types/lib-components/lists/StaticTableActionSlot.vue.d.ts +27 -0
  27. package/types/lib-components/lists/Table.vue.d.ts +39 -0
  28. package/types/lib-components/lists/TableActionButtons.vue.d.ts +3 -3
  29. package/types/lib-components/navigation/ActionsDropdown.vue.d.ts +1 -1
  30. package/types/lib-components/navigation/ActionsDropdownCallback.vue.d.ts +18 -0
  31. package/types/lib-components/navigation/ActionsDropdownEmit.vue.d.ts +22 -0
  32. package/types/lib-components/navigation/Paginator.vue.d.ts +1 -1
  33. package/types/lib-components/overlays/AlertModal.vue.d.ts +68 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.9.4",
3
+ "version": "0.9.6-rc1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -1,27 +1,27 @@
1
1
  <script setup lang="ts">
2
- import { DateRange } from "@/composables/date"
3
2
  import { ref } from "vue"
3
+ import { DateRange } from "@/composables/date"
4
+ import { SortDir } from "@/composables/list"
4
5
  import DateRangePicker from "../forms/DateRangePicker.vue"
5
6
  import Select from "@/lib-components/forms/Select.vue"
6
7
 
7
8
  const props = defineProps<{
8
9
  dateRange: DateRange
9
- sortDir: string
10
- title: string
10
+ sortDir: SortDir
11
11
  }>()
12
12
  const dateRange = ref<DateRange>(props.dateRange)
13
- const sortDir = ref<string>(props.sortDir)
14
- const sortOptions = [
15
- { label: "Newest-Oldest", value: "DESC" },
16
- { label: "Oldest-Newest", value: "ASC" },
13
+ const sortDir = ref<SortDir>(props.sortDir)
14
+ const sortOptions: { label: string; value: SortDir }[] = [
15
+ { label: "Newest-Oldest", value: "desc" },
16
+ { label: "Oldest-Newest", value: "asc" },
17
17
  ]
18
18
 
19
19
  const emits = defineEmits<{
20
- (e: "sort-dir-changed", val: string): void
20
+ (e: "sort-dir-changed", val: SortDir): void
21
21
  (e: "date-range-changed", val: DateRange): void
22
22
  }>()
23
23
 
24
- const sortDirChanged = (sortDir: string) => {
24
+ const sortDirChanged = (sortDir: SortDir) => {
25
25
  emits("sort-dir-changed", sortDir)
26
26
  }
27
27
 
@@ -30,25 +30,14 @@ const dateRangeChanged = (dateRange: DateRange) => {
30
30
  }
31
31
  </script>
32
32
  <template>
33
- <div
34
- class="md:flex md:items-center md:justify-between bg-white mx-auto py-4 border-t border-gray-100"
35
- >
36
- <div class="flex-1 min-w-0">
37
- <h1 class="text-lg leading-6 font-semibold text-gray-900">
38
- {{ title }}
39
- </h1>
40
- </div>
41
- <div class="mt-4 flex md:mt-0 md:ml-4">
42
- <Select
43
- v-model="sortDir"
44
- :options="sortOptions"
45
- @update:model-value="sortDirChanged"
46
- ></Select>
47
- <DateRangePicker
48
- v-model="dateRange"
49
- class="ml-3"
50
- @update:model-value="dateRangeChanged"
51
- />
52
- </div>
53
- </div>
33
+ <Select
34
+ v-model="sortDir"
35
+ :options="sortOptions"
36
+ @update:model-value="sortDirChanged"
37
+ ></Select>
38
+ <DateRangePicker
39
+ v-model="dateRange"
40
+ class="ml-3"
41
+ @update:model-value="dateRangeChanged"
42
+ />
54
43
  </template>
@@ -34,12 +34,12 @@ const { columns, hasActions, isEmptyCellValue, rows } = useTable(
34
34
  class="overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"
35
35
  >
36
36
  <table class="min-w-full divide-y divide-gray-200">
37
- <thead>
37
+ <thead class="bg-gray-100">
38
38
  <tr>
39
39
  <th
40
40
  v-for="(col, idx) in columns"
41
41
  :key="idx"
42
- class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"
42
+ class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"
43
43
  :class="col.alignment"
44
44
  >
45
45
  {{ col.title }}
@@ -48,12 +48,16 @@ const { columns, hasActions, isEmptyCellValue, rows } = useTable(
48
48
  <!--Table Actions Header-->
49
49
  <th
50
50
  v-if="hasActions"
51
- class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"
51
+ class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"
52
52
  />
53
53
  </tr>
54
54
  </thead>
55
- <tbody class="bg-white divide-y divide-gray-200">
56
- <tr v-for="(row, rowIdx) in rows" :key="rowIdx">
55
+ <tbody class="bg-white">
56
+ <tr
57
+ v-for="(row, rowIdx) in rows"
58
+ :key="rowIdx"
59
+ class="even:bg-gray-50"
60
+ >
57
61
  <template v-for="(cell, cellIdx) in row.cells" :key="cellIdx">
58
62
  <component
59
63
  :is="'td'"
@@ -87,7 +91,7 @@ const { columns, hasActions, isEmptyCellValue, rows } = useTable(
87
91
 
88
92
  <tr v-if="rows.length === 0">
89
93
  <td
90
- :colspan="columns.length"
94
+ :colspan="columns.length + (hasActions ? 1 : 0)"
91
95
  class="px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"
92
96
  >
93
97
  No items were found!
@@ -1,20 +1,58 @@
1
1
  <script setup lang="ts">
2
+ import { computed, ref, watch } from "vue"
2
3
  import { useAppFlasher } from "@/composables"
3
- import { ref, watch } from "vue"
4
+ import { SortDir, DetailListAPI } from "@/composables/list"
4
5
  import BaseAPI from "../../api/base"
5
6
  import DateFilter from "../layout/DateFilter.vue"
6
7
  import Paginator from "../navigation/Paginator.vue"
7
8
 
8
9
  const props = withDefaults(
9
10
  defineProps<{
10
- refreshTrigger?: number
11
- reloadTrigger?: number
12
- title: string
11
+ /**
12
+ * borderless removes the default border styling applied around list items.
13
+ * This is useful when filters or pagination navigation components show,
14
+ * but less helpful when this component is dialed back in functionality.
15
+ */
16
+ borderless?: boolean
17
+
18
+ /**
19
+ * defaultSort overrides the default field to sort items on.
20
+ */
21
+ defaultSort?: string
22
+
23
+ /**
24
+ * defaultSortDir overrides the default order to sort items with.
25
+ */
26
+ defaultSortDir?: SortDir
27
+
28
+ /**
29
+ * disableDate turns off the date-range filter input.
30
+ */
31
+ disableDate?: boolean
32
+
33
+ /**
34
+ * disableNavigation hides navigation components from displaying.
35
+ * This makes the List as a "single-page" limiting the number of results via perPage.
36
+ */
37
+ disableNavigation?: boolean
38
+
39
+ /**
40
+ * perPage overrides the default number of items per page to retrieve.
41
+ */
42
+ perPage?: number
43
+
44
+ /**
45
+ * url is the endpoint to retrieve list data from
46
+ */
13
47
  url: string
14
48
  }>(),
15
49
  {
16
- refreshTrigger: 0,
17
- reloadTrigger: 0,
50
+ borderless: false,
51
+ disableNavigation: false,
52
+ disableDate: false,
53
+ defaultSort: "created_at",
54
+ defaultSortDir: "desc",
55
+ perPage: 10,
18
56
  }
19
57
  )
20
58
 
@@ -22,24 +60,31 @@ const dateRange = ref<{ minDate: number; maxDate: number }>({
22
60
  minDate: 0,
23
61
  maxDate: 0,
24
62
  })
25
- const hasContent = ref(true)
63
+
26
64
  const items = ref<any[]>([])
65
+
27
66
  const pagination = ref({
28
67
  page: 1,
29
- perPage: 10,
68
+ perPage: props.perPage,
30
69
  totalItems: 0,
31
70
  totalPages: 0,
32
71
  })
33
- const sortDir = ref("DESC")
34
72
 
35
- const loadAndRender = (checkForContent: boolean): void => {
36
- const params = {
73
+ const sort = ref(props.defaultSort)
74
+ const sortDir = ref(props.defaultSortDir)
75
+
76
+ const loadAndRender = (): void => {
77
+ const params: Record<string, unknown> = {
78
+ maxDate: dateRange.value.maxDate,
79
+ minDate: dateRange.value.minDate,
37
80
  page: pagination.value.page,
38
81
  perPage: pagination.value.perPage,
82
+ q: "",
83
+ sort: sort.value,
39
84
  sortDir: sortDir.value,
40
85
  }
41
86
 
42
- BaseAPI.get(props.url, {}, Object.assign(params, dateRange.value)).then(
87
+ BaseAPI.get(props.url, {}, params).then(
43
88
  (success: any) => {
44
89
  pagination.value = {
45
90
  page: success.data.page,
@@ -48,7 +93,6 @@ const loadAndRender = (checkForContent: boolean): void => {
48
93
  totalPages: success.data.totalPages,
49
94
  }
50
95
  items.value = success.data.items
51
- if (checkForContent) hasContent.value = items.value.length != 0
52
96
  },
53
97
  () => {
54
98
  useAppFlasher.genericError()
@@ -56,39 +100,51 @@ const loadAndRender = (checkForContent: boolean): void => {
56
100
  )
57
101
  }
58
102
 
59
- watch([sortDir, dateRange], () => {
60
- loadAndRender(false)
103
+ const hasContent = computed((): boolean => {
104
+ return items.value.length ? true : false
61
105
  })
62
106
 
63
- watch(
64
- () => props.refreshTrigger,
65
- () => {
66
- loadAndRender(false)
67
- }
68
- )
107
+ const filtersAreConfigured = computed(() => {
108
+ return !props.disableDate
109
+ })
69
110
 
70
- watch(
71
- () => props.reloadTrigger,
72
- () => {
73
- // This lets parent components trigger a refresh of the current page depending on external actions.
74
- pagination.value.page = 1
75
- loadAndRender(true)
76
- }
77
- )
111
+ const showPaginator = computed(() => {
112
+ return !props.disableNavigation && hasContent
113
+ })
114
+
115
+ const reloadTable = (): void => {
116
+ pagination.value.page = 1
117
+ loadAndRender()
118
+ }
78
119
 
79
- loadAndRender(true)
120
+ const publicMethods: DetailListAPI = {
121
+ refresh: loadAndRender,
122
+ reset: reloadTable,
123
+ }
124
+
125
+ watch([sortDir, dateRange], () => {
126
+ loadAndRender()
127
+ })
128
+
129
+ defineExpose(publicMethods)
130
+ loadAndRender()
80
131
  </script>
81
132
  <template>
82
- <div>
83
- <DateFilter
84
- :date-range="dateRange"
85
- :sort-dir="sortDir"
86
- :title="title"
87
- @sort-dir-changed="sortDir = $event"
88
- @date-range-changed="dateRange = $event"
89
- />
133
+ <div :class="{ 'mt-4 space-y-2': filtersAreConfigured }">
134
+ <div v-if="!disableDate" class="flex">
135
+ <DateFilter
136
+ :date-range="dateRange"
137
+ :sort-dir="sortDir"
138
+ @sort-dir-changed="sortDir = $event"
139
+ @date-range-changed="dateRange = $event"
140
+ />
141
+ </div>
90
142
 
91
- <div v-if="hasContent" class="shadow overflow-hidden sm:rounded-md border">
143
+ <div
144
+ v-if="hasContent"
145
+ class="overflow-hidden"
146
+ :class="{ 'shadow sm:rounded-md border': !borderless }"
147
+ >
92
148
  <ul>
93
149
  <li
94
150
  v-for="(item, idx) in items"
@@ -100,12 +156,12 @@ loadAndRender(true)
100
156
  </ul>
101
157
  </div>
102
158
 
103
- <slot v-else name="empty"></slot>
159
+ <slot v-else name="empty"> No items were found! </slot>
104
160
 
105
161
  <Paginator
106
- v-if="hasContent"
162
+ v-if="showPaginator"
107
163
  v-model="pagination"
108
- @update:model-value="loadAndRender(false)"
164
+ @update:model-value="loadAndRender()"
109
165
  />
110
166
  </div>
111
167
  </template>
@@ -236,76 +236,81 @@ loadAndRender()
236
236
  class="relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"
237
237
  >
238
238
  <table class="min-w-full divide-y divide-gray-200">
239
- <thead>
239
+ <thead class="bg-gray-100">
240
240
  <tr>
241
241
  <th
242
242
  v-for="(col, idx) in columns"
243
243
  :key="idx"
244
- class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"
244
+ class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"
245
245
  :class="col.alignment"
246
246
  >
247
- <span v-if="col.title">{{ col.title }}</span>
248
- <span
249
- v-if="col.sort"
250
- class="cursor-pointer"
251
- @click.prevent="handleSort(col.sort as string)"
247
+ <div
248
+ class="inline-flex items-center gap-2"
249
+ :class="{ 'cursor-pointer': col.sort }"
250
+ @click.prevent="
251
+ col.sort ? handleSort(col.sort as string) : undefined
252
+ "
252
253
  >
253
- <svg
254
- v-if="currentSort !== col.sort"
255
- xmlns="http://www.w3.org/2000/svg"
256
- fill="none"
257
- viewBox="0 0 24 24"
258
- stroke="currentColor"
259
- class="h-5 inline"
260
- >
261
- <path
262
- stroke-linecap="round"
263
- stroke-linejoin="round"
264
- stroke-width="2"
265
- d="M8 9l4-4 4 4m0 6l-4 4-4-4"
266
- />
267
- </svg>
268
- <svg
269
- v-else-if="currentSortDirection == 'desc'"
270
- xmlns="http://www.w3.org/2000/svg"
271
- viewBox="0 0 20 20"
272
- fill="currentColor"
273
- class="h-5 inline"
274
- >
275
- <path
276
- fill-rule="evenodd"
277
- d="M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z"
278
- clip-rule="evenodd"
279
- />
280
- </svg>
281
- <svg
282
- v-else
283
- xmlns="http://www.w3.org/2000/svg"
284
- viewBox="0 0 20 20"
285
- fill="currentColor"
286
- class="h-5 inline"
287
- >
288
- <path
289
- fill-rule="evenodd"
290
- d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
291
- clip-rule="evenodd"
292
- />
293
- </svg>
294
- </span>
254
+ <span v-if="col.title">{{ col.title }}</span>
255
+ <span v-if="col.sort">
256
+ <svg
257
+ v-if="currentSort !== col.sort"
258
+ xmlns="http://www.w3.org/2000/svg"
259
+ fill="none"
260
+ viewBox="0 0 24 24"
261
+ stroke="currentColor"
262
+ class="h-5 inline"
263
+ >
264
+ <path
265
+ stroke-linecap="round"
266
+ stroke-linejoin="round"
267
+ stroke-width="2"
268
+ d="M8 9l4-4 4 4m0 6l-4 4-4-4"
269
+ />
270
+ </svg>
271
+ <svg
272
+ v-else-if="currentSortDirection == 'desc'"
273
+ xmlns="http://www.w3.org/2000/svg"
274
+ viewBox="0 0 20 20"
275
+ fill="currentColor"
276
+ class="h-5 inline"
277
+ >
278
+ <path
279
+ fill-rule="evenodd"
280
+ d="M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z"
281
+ clip-rule="evenodd"
282
+ />
283
+ </svg>
284
+ <svg
285
+ v-else
286
+ xmlns="http://www.w3.org/2000/svg"
287
+ viewBox="0 0 20 20"
288
+ fill="currentColor"
289
+ class="h-5 inline"
290
+ >
291
+ <path
292
+ fill-rule="evenodd"
293
+ d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
294
+ clip-rule="evenodd"
295
+ />
296
+ </svg>
297
+ </span>
298
+ </div>
295
299
  </th>
296
300
 
297
301
  <!--Table Actions Header-->
298
302
  <th
299
303
  v-if="hasActions"
300
- class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"
304
+ class="px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"
301
305
  />
302
306
  </tr>
303
307
  </thead>
304
308
 
305
- <tbody class="bg-white divide-y divide-gray-200">
309
+ <tbody class="bg-white">
306
310
  <tr
307
311
  v-for="(row, rowIdx) in rows"
308
312
  :key="rowIdx"
313
+ class="even:bg-gray-50"
309
314
  @click="$emit('click:row', row.rowData)"
310
315
  >
311
316
  <template v-for="(cell, cellIdx) in row.cells" :key="cellIdx">
@@ -341,7 +346,7 @@ loadAndRender()
341
346
 
342
347
  <tr v-if="!hasContent">
343
348
  <td
344
- :colspan="rows.length"
349
+ :colspan="columns.length + (hasActions ? 1 : 0)"
345
350
  class="px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"
346
351
  >
347
352
  No items were found!
@@ -29,7 +29,7 @@ const { floatingStyles } = useFloating(trigger, wrapper, {
29
29
  <Menu as="div" class="relative flex justify-end items-center">
30
30
  <MenuButton
31
31
  ref="trigger"
32
- class="w-8 h-8 bg-white inline-flex items-center justify-center text-gray-700 rounded-full hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
32
+ class="w-8 h-8 inline-flex items-center justify-center text-gray-700 rounded-full hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
33
33
  :disabled="!hasActions"
34
34
  >
35
35
  <span class="sr-only">Open options</span>
@@ -1,4 +1,4 @@
1
- import { TreesComponents } from "./lib-components"
1
+ import { TreesComponents } from "@/lib-components"
2
2
 
3
3
  /**
4
4
  * When using App.use(Trees) include a
@@ -1,7 +1,8 @@
1
1
  import { default as useBaseAPI, useBaseAPIGet, useBaseAPIPatch, useBaseAPIPut, useBaseAPIPost, useBaseAPIDelete } from "./useBaseAPI";
2
2
  import type { UseBaseAPIOptions, UseBaseAPI } from "./useBaseAPI";
3
3
  import type { DynamicTableOptions, DynamicTableAPI, TableActionItem, TableColumn, TableActions, TableCellAlignment, TableRowData, TableColumns, TableRowsData } from "./table";
4
- export type { UseBaseAPIOptions, UseBaseAPI, DynamicTableOptions, DynamicTableAPI, TableActionItem, TableColumn, TableActions, TableCellAlignment, TableRowData, TableColumns, TableRowsData, };
4
+ import type { DetailListAPI, SortDir } from "./list";
5
+ export type { UseBaseAPIOptions, UseBaseAPI, DetailListAPI, DynamicTableOptions, DynamicTableAPI, SortDir, TableActionItem, TableColumn, TableActions, TableCellAlignment, TableRowData, TableColumns, TableRowsData, };
5
6
  export { useBaseAPI, useBaseAPIGet, useBaseAPIPatch, useBaseAPIPut, useBaseAPIPost, useBaseAPIDelete, };
6
7
  import { useFlashes, useAppFlashes, useAppFlasher } from "./useFlashes";
7
8
  import type { FlashMessage, FlashType, FlashStore, Flasher } from "./useFlashes";
@@ -0,0 +1,13 @@
1
+ export interface DetailListAPI {
2
+ /**
3
+ * Force refresh the table data with the current api params state
4
+ * @returns void
5
+ */
6
+ refresh: () => void;
7
+ /**
8
+ * Reset the table data back to page 1 and load
9
+ * @returns void
10
+ */
11
+ reset: () => void;
12
+ }
13
+ export type SortDir = "asc" | "desc";
@@ -1,5 +1,5 @@
1
1
  import { VNodeChild } from "vue";
2
- import { ActionItem } from "../composables/nav";
2
+ import { ActionItem } from "@/composables/nav";
3
3
  import { DateRangeProps } from "./date";
4
4
  export interface DynamicTableOptions {
5
5
  dateSearch?: boolean | DateRangeProps;
package/types/entry.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { Plugin } from "vue";
2
- import BaseAPI, { isHttpCancel, isHttpError, setBaseAPIDefaults } from "./api/base";
3
- import type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged } from "./api/client";
4
- import { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField } from "./composables/forms";
5
- import { useModel } from "./composables/setupHelpers";
6
- import { debounce as debounceFn, debounceLeading } from "./helpers/Debounce";
7
- import { throttle as throttleFn } from "./helpers/Throttle";
2
+ import BaseAPI, { isHttpCancel, isHttpError, setBaseAPIDefaults } from "@/api/base";
3
+ import type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged } from "@/api/client";
4
+ import { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField } from "@/composables/forms";
5
+ import { useModel } from "@/composables/setupHelpers";
6
+ import { debounce as debounceFn, debounceLeading } from "@/helpers/Debounce";
7
+ import { throttle as throttleFn } from "@/helpers/Throttle";
8
8
  declare const install: Exclude<Plugin["install"], undefined>;
9
9
  export default install;
10
- export * from "./composables/index";
11
- export * from "./lib-components/index";
10
+ export * from "@/composables/index";
11
+ export * from "@/lib-components/index";
12
12
  export { BaseAPI, isHttpCancel, isHttpError, setBaseAPIDefaults };
13
13
  export type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged, };
14
- export type * from "./composables/forms";
14
+ export type * from "@/composables/forms";
15
15
  export { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField, };
16
16
  export { useModel };
17
17
  export { debounceFn, debounceLeading, throttleFn };
@@ -0,0 +1,2 @@
1
+ import { Slot } from "vue";
2
+ export declare function hasSlotContent(slot: Slot | undefined, slotProps?: {}): boolean;
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
22
22
  default: string;
23
23
  };
24
24
  options: {
25
- type: import("vue").PropType<import("../../composables/forms").InputOption[]>;
25
+ type: import("vue").PropType<import("@/composables/forms").InputOption[]>;
26
26
  required: true;
27
27
  };
28
28
  columns: {
@@ -55,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
55
55
  default: string;
56
56
  };
57
57
  options: {
58
- type: import("vue").PropType<import("../../composables/forms").InputOption[]>;
58
+ type: import("vue").PropType<import("@/composables/forms").InputOption[]>;
59
59
  required: true;
60
60
  };
61
61
  columns: {
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  default: string;
17
17
  };
18
18
  options: {
19
- type: import("vue").PropType<import("../../composables/forms").InputOption[]>;
19
+ type: import("vue").PropType<import("@/composables/forms").InputOption[]>;
20
20
  required: true;
21
21
  };
22
22
  columns: {
@@ -43,7 +43,7 @@ declare const _default: import("vue").DefineComponent<{
43
43
  default: string;
44
44
  };
45
45
  options: {
46
- type: import("vue").PropType<import("../../composables/forms").InputOption[]>;
46
+ type: import("vue").PropType<import("@/composables/forms").InputOption[]>;
47
47
  required: true;
48
48
  };
49
49
  columns: {
@@ -1,4 +1,4 @@
1
- import type { InputOption } from "../../composables/forms";
1
+ import type { InputOption } from "@/composables/forms";
2
2
  declare const _default: <T extends InputOption>(__VLS_props: {
3
3
  label?: string | undefined;
4
4
  modelValue?: string | number | null | undefined;
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  default: string;
17
17
  };
18
18
  options: {
19
- type: import("vue").PropType<import("../../composables/forms").InputOption[]>;
19
+ type: import("vue").PropType<import("@/composables/forms").InputOption[]>;
20
20
  required: true;
21
21
  };
22
22
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
40
40
  default: string;
41
41
  };
42
42
  options: {
43
- type: import("vue").PropType<import("../../composables/forms").InputOption[]>;
43
+ type: import("vue").PropType<import("@/composables/forms").InputOption[]>;
44
44
  required: true;
45
45
  };
46
46
  }>> & {