@xy-planning-network/trees 0.4.0-rc-7 → 0.4.2

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 (61) hide show
  1. package/README.md +236 -53
  2. package/dist/trees.es.js +1069 -330
  3. package/dist/trees.umd.js +6 -6
  4. package/package.json +6 -4
  5. package/src/lib-components/forms/BaseInput.vue +83 -0
  6. package/src/lib-components/forms/Checkbox.vue +46 -0
  7. package/src/lib-components/forms/DateRangePicker.vue +65 -0
  8. package/src/lib-components/forms/InputHelp.vue +24 -0
  9. package/src/lib-components/forms/InputLabel.vue +23 -0
  10. package/src/lib-components/forms/MultiCheckboxes.vue +55 -0
  11. package/src/lib-components/forms/Radio.vue +58 -0
  12. package/src/lib-components/forms/Select.vue +65 -0
  13. package/src/lib-components/forms/TextArea.vue +50 -0
  14. package/src/lib-components/forms/Toggle.vue +25 -0
  15. package/src/lib-components/forms/YesOrNoRadio.vue +70 -0
  16. package/src/lib-components/layout/DateFilter.vue +54 -0
  17. package/src/lib-components/layout/SidebarLayout.vue +239 -0
  18. package/src/lib-components/layout/StackedLayout.vue +172 -0
  19. package/src/lib-components/lists/Cards.vue +33 -0
  20. package/src/lib-components/lists/DetailList.vue +114 -0
  21. package/src/lib-components/lists/DownloadCell.vue +12 -0
  22. package/src/lib-components/lists/StaticTable.vue +83 -0
  23. package/src/lib-components/lists/Table.vue +291 -0
  24. package/src/lib-components/navigation/ActionsDropdown.vue +78 -0
  25. package/src/lib-components/navigation/Paginator.vue +111 -0
  26. package/src/lib-components/navigation/Steps.vue +83 -0
  27. package/src/lib-components/navigation/Tabs.vue +92 -0
  28. package/src/lib-components/overlays/ContentModal.vue +95 -0
  29. package/src/lib-components/overlays/Flash.vue +131 -0
  30. package/src/lib-components/overlays/Modal.vue +133 -0
  31. package/src/lib-components/overlays/Popover/Popover.vue +229 -0
  32. package/src/lib-components/overlays/Popover/PopoverContent.vue +8 -0
  33. package/src/lib-components/overlays/Slideover.vue +87 -0
  34. package/src/lib-components/overlays/Spinner.vue +149 -0
  35. package/src/lib-components/overlays/Tooltip.vue +34 -0
  36. package/types/components.d.ts +6 -2
  37. package/types/composables/date.d.ts +4 -0
  38. package/types/composables/nav.d.ts +13 -0
  39. package/types/composables/overlay.d.ts +4 -0
  40. package/types/composables/table.d.ts +32 -0
  41. package/types/composables/user.d.ts +6 -0
  42. package/types/global.d.ts +5 -2
  43. package/types/helpers/Debounce.d.ts +1 -0
  44. package/types/helpers/Throttle.d.ts +1 -0
  45. package/types/lib-components/forms/Select.vue.d.ts +2 -2
  46. package/types/lib-components/index.d.ts +9 -9
  47. package/types/lib-components/layout/DateFilter.vue.d.ts +1 -4
  48. package/types/lib-components/layout/SidebarLayout.vue.d.ts +1 -1
  49. package/types/lib-components/layout/StackedLayout.vue.d.ts +2 -2
  50. package/types/lib-components/lists/StaticTable.vue.d.ts +1 -1
  51. package/types/lib-components/lists/Table.vue.d.ts +1 -1
  52. package/types/lib-components/navigation/ActionsDropdown.vue.d.ts +2 -2
  53. package/types/lib-components/navigation/Paginator.vue.d.ts +1 -6
  54. package/types/lib-components/overlays/Flash.vue.d.ts +0 -4
  55. package/types/lib-components/overlays/Popover/Popover.vue.d.ts +23 -0
  56. package/types/lib-components/overlays/Popover/PopoverContent.vue.d.ts +2 -0
  57. package/types/lib-components/overlays/Tooltip.vue.d.ts +23 -0
  58. package/types/index.d.ts +0 -3
  59. package/types/nav.d.ts +0 -8
  60. package/types/table.d.ts +0 -36
  61. package/types/users.d.ts +0 -10
@@ -0,0 +1,149 @@
1
+ <script setup lang="ts">
2
+ import { onMounted, ref } from "vue"
3
+ // TODO: spk this may benefit from composition api
4
+
5
+ const idx = ref(0)
6
+ const loading = ref(false)
7
+ const maxIdx = ref(0)
8
+ const messages = ref<string[]>([])
9
+ const msg = ref("")
10
+ const showMsg = ref(false)
11
+
12
+ const fadeIn = (): void => {
13
+ idx.value++
14
+ if (idx.value > maxIdx.value) {
15
+ idx.value = 0
16
+ }
17
+ if (messages.value) {
18
+ msg.value = messages.value[idx.value]
19
+ }
20
+ showMsg.value = true
21
+ }
22
+
23
+ const fadeOut = (): void => {
24
+ window.setTimeout(() => {
25
+ showMsg.value = false
26
+ }, 2500)
27
+ }
28
+
29
+ onMounted(() => {
30
+ window.VueBus.on("Spinner-show", (spinMessages) => {
31
+ if (spinMessages) {
32
+ messages.value = spinMessages
33
+ maxIdx.value = spinMessages.length - 1
34
+ msg.value = messages.value[idx.value]
35
+ showMsg.value = true
36
+ }
37
+ loading.value = true
38
+ })
39
+
40
+ window.VueBus.on("Spinner-hide", () => {
41
+ idx.value = 0
42
+ maxIdx.value = 0
43
+ messages.value = []
44
+ msg.value = ""
45
+ loading.value = false
46
+ })
47
+ })
48
+ </script>
49
+ <template>
50
+ <div
51
+ class="fixed top-0 left-0 flex items-center justify-center w-full h-full cursor-not-allowed z-50 bg-gray-50 bg-opacity-50"
52
+ v-if="loading"
53
+ >
54
+ <div>
55
+ <div class="flex justify-center">
56
+ <div class="animate-spin-gear">
57
+ <svg
58
+ width="129px"
59
+ height="129px"
60
+ viewBox="0 0 129 129"
61
+ version="1.1"
62
+ xmlns="http://www.w3.org/2000/svg"
63
+ xmlns:xlink="http://www.w3.org/1999/xlink"
64
+ >
65
+ <title>Group 6 Copy 3</title>
66
+ <defs>
67
+ <polygon
68
+ id="path-1"
69
+ points="0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"
70
+ ></polygon>
71
+ </defs>
72
+ <g
73
+ id="Page-1"
74
+ stroke="none"
75
+ stroke-width="1"
76
+ fill="none"
77
+ fill-rule="evenodd"
78
+ >
79
+ <g id="Group-6-Copy-3">
80
+ <g id="Group-3">
81
+ <mask id="mask-2" fill="white">
82
+ <use xlink:href="#path-1"></use>
83
+ </mask>
84
+ <g id="Clip-2"></g>
85
+ <path
86
+ d="M86.3955173,100.279324 C86.3955173,100.279324 79.4778923,106.213874 64.2360462,106.755809 C48.9954404,106.213874 42.0778154,100.279324 42.0778154,100.279324 C11.8756904,81.4963011 25.2309115,49.088357 25.2309115,49.088357 C36.5680269,24.1350542 59.1839596,22.5554236 63.8105942,22.4983139 L63.8105942,22.5043894 C63.8105942,22.5043894 63.9681231,22.4983139 64.2360462,22.4958837 C64.5052096,22.4983139 64.6627385,22.5043894 64.6627385,22.5043894 L64.6627385,22.4983139 C69.2881327,22.5554236 91.9053058,24.1350542 103.241181,49.088357 C103.241181,49.088357 116.596402,81.4963011 86.3955173,100.279324 L86.3955173,100.279324 Z M128.473085,68.8191581 L128.473085,60.4677727 L117.036738,58.80187 L115.10794,49.3726905 L124.970238,43.4186983 L121.675777,35.7307578 L110.49619,38.6214817 L106.161046,32.1486416 L113.220075,23.080347 L107.361738,17.0716753 L97.9645846,23.7437918 L89.14545,17.842049 L91.8693346,6.72144964 L84.04995,3.59378109 L78.2114596,13.4628269 L69.5907865,11.8127205 L67.908825,0.48676924 L64.6627385,0.48676924 L63.8105942,0.48676924 L60.5645077,0.48676924 L58.8813058,11.8127205 L50.2618731,13.4628269 L44.4233827,3.59378109 L36.6039981,6.72144964 L39.3278827,17.842049 L30.5087481,23.7437918 L21.1103538,17.0716753 L15.2520173,23.080347 L22.3122865,32.1486416 L17.9771423,38.6214817 L6.79755577,35.7307578 L3.50185385,43.4186983 L13.3641519,49.3726905 L11.4365942,58.80187 L0.000248076923,60.4677727 L0.000248076923,68.8191581 L11.4365942,70.4850608 L13.1036712,79.0223566 L3.13718077,84.8050196 L6.29644038,92.5488548 L17.5244019,89.8513318 L23.4832096,98.5854738 L16.7466808,107.893143 L22.8134019,113.695248 L31.9699212,106.70356 L38.5067481,110.99651 L35.5881231,122.068505 L43.35045,125.332265 L49.3625942,115.565287 L58.8813058,117.47421 L60.5645077,128.801377 L63.6927577,128.801377 L64.780575,128.801377 L67.908825,128.801377 L69.5907865,117.47421 L79.1107385,115.565287 L85.1228827,125.332265 L92.8852096,122.068505 L89.9665846,110.99651 L96.5034115,106.70356 L105.659931,113.695248 L111.725412,107.893143 L104.988883,98.5854738 L110.94769,89.8513318 L122.175652,92.5488548 L125.334912,84.8050196 L115.369662,79.0223566 L117.035498,70.4850608 L128.473085,68.8191581 Z"
87
+ id="Fill-1"
88
+ fill="#51A749"
89
+ mask="url(#mask-2)"
90
+ ></path>
91
+ </g>
92
+ </g>
93
+ </g>
94
+ </svg>
95
+ </div>
96
+ <div class="absolute">
97
+ <svg
98
+ class="mt-8"
99
+ width="70px"
100
+ height="70px"
101
+ viewBox="0 0 53 32"
102
+ version="1.1"
103
+ xmlns="http://www.w3.org/2000/svg"
104
+ xmlns:xlink="http://www.w3.org/1999/xlink"
105
+ >
106
+ <title>Group 3 Copy</title>
107
+ <g
108
+ id="Page-1"
109
+ stroke="none"
110
+ stroke-width="1"
111
+ fill="none"
112
+ fill-rule="evenodd"
113
+ >
114
+ <g id="Group-3-Copy">
115
+ <polygon
116
+ id="Fill-1"
117
+ fill="#1F6DF4"
118
+ points="0.7994 0.3999 11.2214 16.0009 0.7994 31.5999 11.2214 31.5999 16.4004 24.0149 21.1934 31.5999 31.9994 31.5999 21.4254 15.7449 26.0064 9.1719 20.6194 1.3729 16.1554 7.9149 11.2214 0.3999"
119
+ ></polygon>
120
+ <polygon
121
+ id="Fill-2"
122
+ fill="#51A749"
123
+ points="41.978 0.3999 36.799 7.6269 32.006 0.3999 21.2 0.3999 31.775 15.5069 27.194 21.7689 32.27 29.1999 52.4 0.3999"
124
+ ></polygon>
125
+ </g>
126
+ </g>
127
+ </svg>
128
+ </div>
129
+ </div>
130
+ <div v-show="messages">
131
+ <transition
132
+ appear
133
+ enter-active-class="ease-out duration-1000"
134
+ enter-from-class="opacity-0"
135
+ enter-to-class="opacity-100"
136
+ leave-active-class="ease-in duration-500"
137
+ leave-from-class="opacity-100"
138
+ leave-to-class="opacity-0"
139
+ @after-enter="fadeOut"
140
+ @after-leave="fadeIn"
141
+ >
142
+ <div class="text-center transition-opacity" v-show="showMsg">
143
+ {{ msg }}
144
+ </div>
145
+ </transition>
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </template>
@@ -0,0 +1,34 @@
1
+ <script lang="ts" setup>
2
+ import Popover, { PopoverPosition } from "./Popover/Popover.vue"
3
+ import { InformationCircleIcon } from "@heroicons/vue/outline"
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ as?: string
8
+ position?: PopoverPosition
9
+ }>(),
10
+ {
11
+ as: "span",
12
+ position: "auto",
13
+ }
14
+ )
15
+ </script>
16
+
17
+ <template>
18
+ <Popover :position="position" :as="as">
19
+ <template #button>
20
+ <div class="leading-none w-4 h-4">
21
+ <InformationCircleIcon />
22
+ <!--creates a larger clickable surface area 40 x 40-->
23
+ <div
24
+ class="p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
25
+ ></div>
26
+ </div>
27
+ </template>
28
+ <div
29
+ class="w-full max-w-xs bg-white rounded-md px-3 py-2 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium"
30
+ >
31
+ <slot></slot>
32
+ </div>
33
+ </Popover>
34
+ </template>
@@ -1,7 +1,11 @@
1
1
  import { TreesComponents } from "./lib-components"
2
2
 
3
- export default TreesComponents
4
-
3
+ /**
4
+ * When using App.use(Trees) include a
5
+ * /// <reference types="@xy-planning-network/trees/types/components" /> or
6
+ * import GlobalComponents from "@xy-planning-network/trees/types/components"
7
+ * in the project.
8
+ */
5
9
  declare module "@vue/runtime-core" {
6
10
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
7
11
  interface GlobalComponents extends TreesComponents {}
@@ -0,0 +1,4 @@
1
+ export interface DateRange {
2
+ minDate: number;
3
+ maxDate: number;
4
+ }
@@ -0,0 +1,13 @@
1
+ import { Component, RenderFunction } from "vue";
2
+ export interface Item {
3
+ icon?: Component | RenderFunction;
4
+ name: string;
5
+ openInTab?: boolean;
6
+ url: string;
7
+ }
8
+ export interface Pagination {
9
+ page: number;
10
+ perPage: number;
11
+ totalItems: number;
12
+ totalPages: number;
13
+ }
@@ -0,0 +1,4 @@
1
+ export interface Flash {
2
+ type?: string;
3
+ message: string;
4
+ }
@@ -0,0 +1,32 @@
1
+ import { Component, ComponentPublicInstance } from "vue";
2
+ import User from "../composables/user";
3
+ export interface Column {
4
+ display: string;
5
+ class?: string;
6
+ key?: string;
7
+ presenter?(row: any, instance: ComponentPublicInstance): any;
8
+ component?: Component;
9
+ items?: Array<MenuItem>;
10
+ sort?: string;
11
+ }
12
+ export interface Dynamic {
13
+ currentUser: User;
14
+ columns: Array<Column>;
15
+ dateSearch?: boolean;
16
+ defaultSort?: string;
17
+ defaultSortDirection?: string;
18
+ refreshTrigger: number;
19
+ reloadTrigger?: number;
20
+ search?: boolean;
21
+ url: string;
22
+ }
23
+ export interface MenuItem {
24
+ label: string;
25
+ event: string;
26
+ show?(propsData: any, currentUser: User): boolean;
27
+ }
28
+ export interface Static {
29
+ currentUser: User;
30
+ columns: Array<Column>;
31
+ items: Record<string, unknown>[];
32
+ }
@@ -0,0 +1,6 @@
1
+ export interface User {
2
+ id: number;
3
+ email: string;
4
+ name?: string;
5
+ }
6
+ export default User;
package/types/global.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { Emitter } from "mitt"
2
2
 
3
- export {}
4
-
3
+ /**
4
+ * When using window.VueBus.emit("Flash-show-generic-error", "support@trees.com") include
5
+ * /// <reference types="@xy-planning-network/trees/types/global" />
6
+ * in the project.
7
+ */
5
8
  declare global {
6
9
  interface Window {
7
10
  Flashes: Array<{ type?: string; message: string }>
@@ -0,0 +1 @@
1
+ export declare function debounce(func: () => void, timeout?: number): () => void;
@@ -0,0 +1 @@
1
+ export declare function throttle(func: () => void, timeout?: number): (...args: any[]) => void;
@@ -41,12 +41,12 @@ declare const _default: import("vue").DefineComponent<{
41
41
  modelValue: string | number | undefined;
42
42
  label: string;
43
43
  help: string;
44
+ design: "standard" | "compressed";
45
+ placeholder: string;
44
46
  options: {
45
47
  label: string;
46
48
  value: string | number;
47
49
  }[];
48
- design: "standard" | "compressed";
49
- placeholder: string;
50
50
  } & {}> & {
51
51
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
52
52
  }, {
@@ -7,7 +7,11 @@ import { default as DownloadCell } from "./lists/DownloadCell.vue";
7
7
  import { default as Flash } from "./overlays/Flash.vue";
8
8
  import { default as Modal } from "./overlays/Modal.vue";
9
9
  import { default as SidebarLayout } from "./layout/SidebarLayout.vue";
10
+ import { default as Popover } from "./overlays/Popover/Popover.vue";
11
+ import { default as PopoverPosition } from "./overlays/Popover/Popover.vue";
12
+ import { default as PopoverContent } from "./overlays/Popover/PopoverContent.vue";
10
13
  import { default as Slideover } from "./overlays/Slideover.vue";
14
+ import { default as Tooltip } from "./overlays/Tooltip.vue";
11
15
  import { default as StackedLayout } from "./layout/StackedLayout.vue";
12
16
  import { default as Paginator } from "./navigation/Paginator.vue";
13
17
  import { default as Spinner } from "./overlays/Spinner.vue";
@@ -26,17 +30,10 @@ import { default as Radio } from "./forms/Radio.vue";
26
30
  import { default as Select } from "./forms/Select.vue";
27
31
  import { default as TextArea } from "./forms/TextArea.vue";
28
32
  import { default as YesOrNoRadio } from "./forms/YesOrNoRadio.vue";
29
- export { ActionsDropdown, Cards, ContentModal, DateFilter, DetailList, DownloadCell, Flash, Modal, SidebarLayout, Slideover, StackedLayout, Paginator, Spinner, StaticTable, Steps, Table, Tabs, Toggle, BaseInput, Checkbox, DateRangePicker, InputHelp, InputLabel, MultiCheckboxes, Radio, Select, TextArea, YesOrNoRadio, };
33
+ export { ActionsDropdown, Cards, ContentModal, DateFilter, DetailList, DownloadCell, Flash, Modal, SidebarLayout, Slideover, StackedLayout, Popover, PopoverContent, PopoverPosition, // Type export
34
+ Paginator, Spinner, StaticTable, Steps, Table, Tabs, Toggle, Tooltip, BaseInput, Checkbox, DateRangePicker, InputHelp, InputLabel, MultiCheckboxes, Radio, Select, TextArea, YesOrNoRadio, };
30
35
  /**
31
36
  * declare global component types for App.use(Trees)
32
- *
33
- * apply to project with the following
34
- import { TreesComponents } from "@xy-planning-network/trees"
35
-
36
- declare module "@vue/runtime-core" {
37
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
38
- interface GlobalComponents extends TreesComponents {}
39
- }
40
37
  */
41
38
  export interface TreesComponents {
42
39
  ActionsDropdown: typeof ActionsDropdown;
@@ -49,6 +46,8 @@ export interface TreesComponents {
49
46
  Modal: typeof Modal;
50
47
  SidebarLayout: typeof SidebarLayout;
51
48
  Slideover: typeof Slideover;
49
+ Popover: typeof Popover;
50
+ PopoverContent: typeof PopoverContent;
52
51
  StackedLayout: typeof StackedLayout;
53
52
  Paginator: typeof Paginator;
54
53
  Spinner: typeof Spinner;
@@ -57,6 +56,7 @@ export interface TreesComponents {
57
56
  Table: typeof Table;
58
57
  Tabs: typeof Tabs;
59
58
  Toggle: typeof Toggle;
59
+ Tooltip: typeof Tooltip;
60
60
  BaseInput: typeof BaseInput;
61
61
  Checkbox: typeof Checkbox;
62
62
  DateRangePicker: typeof DateRangePicker;
@@ -1,7 +1,4 @@
1
- export interface DateRange {
2
- minDate: number;
3
- maxDate: number;
4
- }
1
+ import { DateRange } from "../../composables/date";
5
2
  declare const _default: import("vue").DefineComponent<__VLS_DefinePropsToOptions<{
6
3
  dateRange: DateRange;
7
4
  sortDir: string;
@@ -1,4 +1,4 @@
1
- import * as NavTypes from "../../types/nav";
1
+ import * as NavTypes from "../../composables/nav";
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  activeURL: {
4
4
  type: import("vue").PropType<string>;
@@ -1,5 +1,5 @@
1
- import * as NavTypes from "../../types/nav";
2
- import User from "../../types/users";
1
+ import * as NavTypes from "../../composables/nav";
2
+ import User from "../../composables/user";
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  activeURL: {
5
5
  type: import("vue").PropType<string>;
@@ -1,4 +1,4 @@
1
- import * as TableTypes from "../../types/table";
1
+ import * as TableTypes from "../../composables/table";
2
2
  declare const _default: import("vue").DefineComponent<__VLS_DefinePropsToOptions<{
3
3
  tableData: TableTypes.Static;
4
4
  }>, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
@@ -1,4 +1,4 @@
1
- import * as TableTypes from "../../types/table";
1
+ import * as TableTypes from "../../composables/table";
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  clickable: {
4
4
  type: import("vue").PropType<boolean>;
@@ -1,6 +1,6 @@
1
1
  import { MenuItem } from "@headlessui/vue";
2
- import * as TableTypes from "../../types/table";
3
- import User from "../../types/users";
2
+ import * as TableTypes from "../../composables/table";
3
+ import User from "../../composables/user";
4
4
  declare const _default: import("vue").DefineComponent<__VLS_DefinePropsToOptions<{
5
5
  currentUser: User;
6
6
  items: TableTypes.MenuItem[];
@@ -1,9 +1,4 @@
1
- export interface Pagination {
2
- page: number;
3
- perPage: number;
4
- totalItems: number;
5
- totalPages: number;
6
- }
1
+ import { Pagination } from "../../composables/nav";
7
2
  declare const _default: import("vue").DefineComponent<__VLS_DefinePropsToOptions<{
8
3
  modelValue: Pagination;
9
4
  }>, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1,6 +1,2 @@
1
- export interface Flash {
2
- type?: string;
3
- message: string;
4
- }
5
1
  declare const _default: import("vue").DefineComponent<{}, () => void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
6
2
  export default _default;
@@ -0,0 +1,23 @@
1
+ export declare type PopoverPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left" | "right" | "auto" | "none";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ as: {
4
+ type: import("vue").PropType<string>;
5
+ } & {
6
+ default: string;
7
+ };
8
+ position: {
9
+ type: import("vue").PropType<PopoverPosition>;
10
+ } & {
11
+ default: string;
12
+ };
13
+ }, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
14
+ as?: unknown;
15
+ position?: unknown;
16
+ } & {
17
+ as: string;
18
+ position: PopoverPosition;
19
+ } & {}>, {
20
+ as: string;
21
+ position: PopoverPosition;
22
+ }>;
23
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { PopoverPosition } from "./Popover/Popover.vue";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ as: {
4
+ type: import("vue").PropType<string>;
5
+ } & {
6
+ default: string;
7
+ };
8
+ position: {
9
+ type: import("vue").PropType<PopoverPosition>;
10
+ } & {
11
+ default: string;
12
+ };
13
+ }, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
14
+ as?: unknown;
15
+ position?: unknown;
16
+ } & {
17
+ as: string;
18
+ position: PopoverPosition;
19
+ } & {}>, {
20
+ as: string;
21
+ position: PopoverPosition;
22
+ }>;
23
+ export default _default;
package/types/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * as NavTypes from "./nav"
2
- export * as TableTypes from "./table"
3
- export * as UserTypes from "./users"
package/types/nav.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { DefineComponent, RenderFunction } from "vue"
2
-
3
- export interface Item {
4
- icon?: DefineComponent<unknown, unknown, any> | RenderFunction
5
- name: string
6
- openInTab?: boolean
7
- url: string
8
- }
package/types/table.d.ts DELETED
@@ -1,36 +0,0 @@
1
- import { ComponentPublicInstance, DefineComponent } from "vue"
2
- import User from "./users"
3
-
4
- export interface Column {
5
- display: string
6
- class?: string
7
- key?: string
8
- presenter?(row: any, instance: ComponentPublicInstance): any
9
- component?: DefineComponent<unknown, unknown, any>
10
- items?: Array<MenuItem>
11
- sort?: string
12
- }
13
-
14
- export interface Dynamic {
15
- currentUser: User
16
- columns: Array<Column>
17
- dateSearch?: boolean
18
- defaultSort?: string
19
- defaultSortDirection?: string
20
- refreshTrigger: number
21
- reloadTrigger?: number
22
- search?: boolean
23
- url: string
24
- }
25
-
26
- export interface MenuItem {
27
- label: string
28
- event: string
29
- show?(propsData: any, currentUser: User): boolean
30
- }
31
-
32
- export interface Static {
33
- currentUser: User
34
- columns: Array<Column>
35
- items: Record<string, unknown>[]
36
- }
package/types/users.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export interface User {
2
- accountID: number
3
- accountOwner: boolean
4
- archived: boolean
5
- id: number
6
- email: string
7
- name: string
8
- }
9
-
10
- export default User