@xy-planning-network/trees 0.14.1 → 0.15.1-dev-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/README.md +11 -5
- package/config/eslint.mjs +36 -0
- package/config/prettier.js +0 -2
- package/config/tailwind.config.js +0 -1
- package/dist/trees.css +2 -1
- package/dist/trees.es.js +14455 -16154
- package/dist/trees.umd.js +20 -20
- package/package.json +20 -13
- package/src/lib-components/forms/DateRangePicker.vue +1 -1
- package/src/lib-components/forms/NumberInput.vue +3 -3
- package/src/lib-components/layout/DateFilter.vue +15 -10
- package/src/lib-components/lists/DetailList.vue +1 -1
- package/src/lib-components/navigation/ActionsDropdown.vue +11 -11
- package/src/lib-components/overlays/Tooltip.vue +7 -3
- package/types/components.d.ts +0 -1
- package/types/composables/useActionItems.d.ts +12 -0
- package/types/lib-components/layout/DateFilter.vue.d.ts +1 -1
- package/types/lib-components/lists/TableActionButtons.vue.d.ts +8 -0
- package/config/eslint.js +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xy-planning-network/trees",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1-dev-1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:xy-planning-network/trees",
|
|
@@ -26,25 +26,26 @@
|
|
|
26
26
|
"build:docs": "vue-tsc -p dev --noEmit && vite build --config vite.docs.config.mts",
|
|
27
27
|
"copy:types": "copyfiles -f ./src/*.d.ts ./types",
|
|
28
28
|
"format": "prettier --write src dev",
|
|
29
|
-
"lint": "eslint
|
|
30
|
-
"lint:fix": "eslint --fix
|
|
29
|
+
"lint": "eslint .",
|
|
30
|
+
"lint:fix": "eslint --fix .",
|
|
31
31
|
"preview": "vite preview --config vite.docs.config.mts",
|
|
32
32
|
"typecheck": "npm run typecheck:src && npm run typecheck:docs",
|
|
33
33
|
"typecheck:src": "vue-tsc -p src --noEmit",
|
|
34
34
|
"typecheck:docs": "vue-tsc -p dev --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@
|
|
37
|
+
"@eslint/js": "^10.0.1",
|
|
38
38
|
"@tailwindcss/forms": "^0.5.3",
|
|
39
39
|
"@tailwindcss/typography": "^0.5.7",
|
|
40
|
-
"@types/node": "^
|
|
41
|
-
"@vitejs/plugin-vue": "^
|
|
42
|
-
"@vue/eslint-config-prettier": "~
|
|
43
|
-
"@vue/eslint-config-typescript": "~
|
|
40
|
+
"@types/node": "^24.13.3",
|
|
41
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
42
|
+
"@vue/eslint-config-prettier": "~10.2.0",
|
|
43
|
+
"@vue/eslint-config-typescript": "~14.9.0",
|
|
44
44
|
"autoprefixer": "^10.4.14",
|
|
45
45
|
"copyfiles": "^2.4.1",
|
|
46
|
-
"eslint": "
|
|
47
|
-
"eslint-plugin-vue": "
|
|
46
|
+
"eslint": "~10.8.0",
|
|
47
|
+
"eslint-plugin-vue": "~10.10.0",
|
|
48
|
+
"globals": "^17.9.0",
|
|
48
49
|
"markdown-it-prism": "^2.3.0",
|
|
49
50
|
"postcss": "^8.4.21",
|
|
50
51
|
"prettier": "^3.0.3",
|
|
@@ -52,8 +53,8 @@
|
|
|
52
53
|
"tsc-alias": "^1.8.5",
|
|
53
54
|
"typescript": "~5.4.5",
|
|
54
55
|
"unplugin-vue-components": "^0.27.4",
|
|
55
|
-
"unplugin-vue-markdown": "^0.
|
|
56
|
-
"vite": "^
|
|
56
|
+
"unplugin-vue-markdown": "^32.0.0",
|
|
57
|
+
"vite": "^8.2.0",
|
|
57
58
|
"vue-tsc": "^2.1.10"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
@@ -63,13 +64,19 @@
|
|
|
63
64
|
"@maskito/core": "^3.5.0",
|
|
64
65
|
"@maskito/kit": "^3.5.0",
|
|
65
66
|
"@maskito/vue": "^3.5.0",
|
|
66
|
-
"axios": "^1.
|
|
67
|
+
"axios": "^1.19.0",
|
|
67
68
|
"reka-ui": "^2.9.9"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
71
|
+
"@eslint/js": "^10.0.1",
|
|
70
72
|
"@tailwindcss/forms": "^0.5.2",
|
|
71
73
|
"@tailwindcss/typography": "^0.5.2",
|
|
74
|
+
"@vue/eslint-config-prettier": "~10.2.0",
|
|
75
|
+
"@vue/eslint-config-typescript": "~14.9.0",
|
|
72
76
|
"autoprefixer": "^10.4.7",
|
|
77
|
+
"eslint": "~10.8.0",
|
|
78
|
+
"eslint-plugin-vue": "~10.10.0",
|
|
79
|
+
"globals": "^17.7.0",
|
|
73
80
|
"postcss": "^8.4.14",
|
|
74
81
|
"tailwindcss": "^3.1.4",
|
|
75
82
|
"vue": "^3.5.12"
|
|
@@ -140,7 +140,7 @@ const alignment = computed(() => {
|
|
|
140
140
|
:aria-describedby="aria.describedby"
|
|
141
141
|
:aria-errormessage="aria.errormessage"
|
|
142
142
|
:class="[
|
|
143
|
-
'block w-full rounded-md border-0 py-2 pr-
|
|
143
|
+
'block w-full rounded-md border-0 py-2 pr-20 shadow-sm ring-1 ring-inset focus:ring-2 data-[state=open]:ring-2 sm:text-sm sm:leading-6',
|
|
144
144
|
'disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200',
|
|
145
145
|
errorState
|
|
146
146
|
? 'text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700 data-[state=open]:ring-red-700'
|
|
@@ -94,9 +94,9 @@ const masked = computed({
|
|
|
94
94
|
// to avoid approximations from decimal values avoid calling parseFloat and use parseInt on only the dollar
|
|
95
95
|
// portion when converting from string to number.
|
|
96
96
|
if (props.type === "money") {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const parts = number.toString().split(".")
|
|
98
|
+
const dollars = parseInt(parts[0], 10)
|
|
99
|
+
const cents = parts.length > 1 ? parseInt(parts[1].padEnd(2, "0"), 10) : 0
|
|
100
100
|
number = dollars * 100 + cents
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -34,14 +34,19 @@ const dateRangeChanged = (dateRange: DateRange | undefined) => {
|
|
|
34
34
|
}
|
|
35
35
|
</script>
|
|
36
36
|
<template>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
<div class="flex space-x-3">
|
|
38
|
+
<div>
|
|
39
|
+
<Select
|
|
40
|
+
v-model="sortDir"
|
|
41
|
+
:options="sortOptions"
|
|
42
|
+
@update:model-value="sortDirChanged"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="shrink-0 sm:min-w-[17rem]">
|
|
46
|
+
<DateRangePicker
|
|
47
|
+
v-model="dateRange"
|
|
48
|
+
@update:model-value="dateRangeChanged"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
47
52
|
</template>
|
|
@@ -76,15 +76,15 @@ const { floatingStyles } = useFloating(triggerRef, wrapperRef, {
|
|
|
76
76
|
aria-hidden="true"
|
|
77
77
|
/>
|
|
78
78
|
</MenuButton>
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
<div ref="wrapper" class="z-[5]" :style="floatingStyles">
|
|
80
|
+
<transition
|
|
81
|
+
enter-active-class="transition ease-out duration-100"
|
|
82
|
+
enter-from-class="transform opacity-0 scale-95"
|
|
83
|
+
enter-to-class="transform opacity-100 scale-100"
|
|
84
|
+
leave-active-class="transition ease-in duration-75"
|
|
85
|
+
leave-from-class="transform opacity-100 scale-100"
|
|
86
|
+
leave-to-class="transform opacity-0 scale-95"
|
|
87
|
+
>
|
|
88
88
|
<MenuItems
|
|
89
89
|
class="w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-200 focus:outline-none"
|
|
90
90
|
>
|
|
@@ -153,7 +153,7 @@ const { floatingStyles } = useFloating(triggerRef, wrapperRef, {
|
|
|
153
153
|
</template>
|
|
154
154
|
</div>
|
|
155
155
|
</MenuItems>
|
|
156
|
-
</
|
|
157
|
-
</
|
|
156
|
+
</transition>
|
|
157
|
+
</div>
|
|
158
158
|
</Menu>
|
|
159
159
|
</template>
|
|
@@ -16,8 +16,8 @@ withDefaults(
|
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
// data
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
let popoverHover = false
|
|
20
|
+
let popoverTimeout: ReturnType<typeof setTimeout> | null = null
|
|
21
21
|
|
|
22
22
|
// functions
|
|
23
23
|
const closePopover = (close: () => void): void => {
|
|
@@ -32,6 +32,10 @@ const hoverPopover = (e: MouseEvent, open: boolean): void => {
|
|
|
32
32
|
popoverHover = true
|
|
33
33
|
if (!open && e.target) (e.target as HTMLElement).click()
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
const onMouseOver = (): void => {
|
|
37
|
+
popoverHover = true
|
|
38
|
+
}
|
|
35
39
|
</script>
|
|
36
40
|
|
|
37
41
|
<template>
|
|
@@ -52,7 +56,7 @@ const hoverPopover = (e: MouseEvent, open: boolean): void => {
|
|
|
52
56
|
<template #default="{ close }: { close: () => void }">
|
|
53
57
|
<div
|
|
54
58
|
class="sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium"
|
|
55
|
-
@mouseover.prevent="
|
|
59
|
+
@mouseover.prevent="onMouseOver"
|
|
56
60
|
@mouseleave.prevent="closePopover(close)"
|
|
57
61
|
>
|
|
58
62
|
<div class="max-w-xs">
|
package/types/components.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
import { ActionItem } from "./nav";
|
|
3
|
+
export declare const useActionItems: (items: ActionItem[] | Ref<ActionItem[]>) => {
|
|
4
|
+
actions: import("vue").ComputedRef<{
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
show: boolean;
|
|
7
|
+
onClick: (...args: any[]) => void;
|
|
8
|
+
icon?: import("vue").RenderFunction | import("vue").FunctionalComponent<{}, {}, any, {}> | undefined;
|
|
9
|
+
label: string;
|
|
10
|
+
}[]>;
|
|
11
|
+
hasActions: import("vue").ComputedRef<boolean>;
|
|
12
|
+
};
|
|
@@ -10,5 +10,5 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
11
|
"onSort-dir-changed"?: ((val: SortDir) => any) | undefined;
|
|
12
12
|
"onDate-range-changed"?: ((val: DateRange) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
14
|
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TableActionItem } from "../../composables";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
actions?: TableActionItem[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
actions: TableActionItem<import("../../composables").TableRowData>[];
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
package/config/eslint.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
require("@rushstack/eslint-patch/modern-module-resolution")
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
root: true,
|
|
6
|
-
extends: [
|
|
7
|
-
"plugin:vue/vue3-recommended",
|
|
8
|
-
"eslint:recommended",
|
|
9
|
-
"@vue/eslint-config-typescript",
|
|
10
|
-
"@vue/eslint-config-prettier/skip-formatting",
|
|
11
|
-
],
|
|
12
|
-
parserOptions: {
|
|
13
|
-
ecmaVersion: "latest",
|
|
14
|
-
},
|
|
15
|
-
rules: {
|
|
16
|
-
"vue/multi-word-component-names": 0,
|
|
17
|
-
"@typescript-eslint/no-explicit-any": 0,
|
|
18
|
-
"@typescript-eslint/no-empty-interface": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
allowSingleExtends: true,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
}
|