@xy-planning-network/trees 0.9.7 → 0.9.8-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.9.7",
3
+ "version": "0.9.8-rc1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -61,6 +61,10 @@ const onInput = (e: Event) => {
61
61
  val = looseToNumber(val)
62
62
  }
63
63
 
64
+ if (typeof val === "string") {
65
+ val = val.trim()
66
+ }
67
+
64
68
  modelState.value = val
65
69
 
66
70
  inputValidation(e)
@@ -26,8 +26,17 @@ const {
26
26
  } = useInputField(props)
27
27
 
28
28
  const onChange = (e: Event) => {
29
- modelState.value = (e.target as HTMLInputElement).value
30
- validate(e)
29
+ // NOTE(spk): The selectedIndex references the list of options in tree order
30
+ // https://html.spec.whatwg.org/multipage/form-elements.html#dom-select-selectedindex
31
+ const selectedIndex = (e.target as HTMLSelectElement).selectedIndex
32
+
33
+ // NOTE(spk): we disable the 0 index option in the list, so there's
34
+ // no expectation it will trigger a change event. Likewise, dynamic updates to
35
+ // a modelValue prop in a parent do not trigger the change event.
36
+ if (selectedIndex > 0) {
37
+ modelState.value = props.options[selectedIndex - 1].value
38
+ validate(e)
39
+ }
31
40
  }
32
41
  </script>
33
42
 
@@ -22,7 +22,7 @@ const {
22
22
  } = useInputField(props)
23
23
 
24
24
  const onInput = (e: Event) => {
25
- modelState.value = (e.target as HTMLInputElement).value
25
+ modelState.value = (e.target as HTMLInputElement).value.trim()
26
26
  inputValidation(e)
27
27
  }
28
28
  </script>
@@ -0,0 +1,2 @@
1
+ import { Slot } from "vue";
2
+ export declare function hasSlotContent(slot: Slot | undefined, slotProps?: {}): boolean;
@@ -0,0 +1,21 @@
1
+ import type { TableColumn, TableRow } from "../../composables/table";
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ columns: TableColumn<TableRow>[];
4
+ rows: TableRow[];
5
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
6
+ columns?: unknown;
7
+ rows?: unknown;
8
+ } & {
9
+ columns: TableColumn<TableRow>[];
10
+ rows: TableRow[];
11
+ } & {}>, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToRuntimeProps<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
@@ -0,0 +1,27 @@
1
+ import * as TableTypes from "../../composables/table";
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ tableData: Omit<TableTypes.Static, "currentUser">;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
5
+ tableData?: unknown;
6
+ } & {
7
+ tableData: Omit<TableTypes.Static, "currentUser">;
8
+ } & {}>, {}>, {
9
+ actions: (_: {
10
+ row: Record<string, unknown>;
11
+ }) => any;
12
+ }>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToRuntimeProps<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: import('vue').PropType<T[K]>;
20
+ required: true;
21
+ };
22
+ };
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,39 @@
1
+ import * as TableTypes from "../../composables/table";
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ clickable?: boolean | undefined;
4
+ loader?: boolean | undefined;
5
+ tableData: TableTypes.Dynamic;
6
+ }>, {
7
+ clickable: boolean;
8
+ loader: boolean;
9
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ handleClick: (v: any) => void;
11
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
12
+ tableData?: unknown;
13
+ clickable?: unknown;
14
+ loader?: unknown;
15
+ } & {
16
+ tableData: TableTypes.Dynamic;
17
+ clickable: boolean;
18
+ loader: boolean;
19
+ } & {}> & {
20
+ onHandleClick?: ((v: any) => any) | undefined;
21
+ }, {
22
+ clickable: boolean;
23
+ loader: boolean;
24
+ }>;
25
+ export default _default;
26
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
+ type __VLS_TypePropsToRuntimeProps<T> = {
28
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
29
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
+ } : {
31
+ type: import('vue').PropType<T[K]>;
32
+ required: true;
33
+ };
34
+ };
35
+ type __VLS_WithDefaults<P, D> = {
36
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
37
+ default: D[K];
38
+ } : P[K];
39
+ };
@@ -0,0 +1,18 @@
1
+ import type { ActionMenuItemCallback } from "../../composables/nav";
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ items: ActionMenuItemCallback[];
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
5
+ items?: unknown;
6
+ } & {
7
+ items: ActionMenuItemCallback[];
8
+ } & {}>, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToRuntimeProps<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: import('vue').PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -0,0 +1,22 @@
1
+ import type { ActionMenuEmit } from "../../composables/nav";
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ items: ActionMenuEmit[];
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ click: (v: string) => void;
6
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
7
+ items?: unknown;
8
+ } & {
9
+ items: ActionMenuEmit[];
10
+ } & {}> & {
11
+ onClick?: ((v: string) => any) | undefined;
12
+ }, {}>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToRuntimeProps<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: import('vue').PropType<T[K]>;
20
+ required: true;
21
+ };
22
+ };
@@ -0,0 +1,68 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ title: {
3
+ type: import("vue").PropType<string>;
4
+ default: string;
5
+ };
6
+ modelValue: {
7
+ type: import("vue").PropType<boolean>;
8
+ required: true;
9
+ };
10
+ content: {
11
+ type: import("vue").PropType<string | string[]>;
12
+ required: true;
13
+ };
14
+ kind: {
15
+ type: import("vue").PropType<"alert" | "warn" | "info" | "success">;
16
+ required: true;
17
+ };
18
+ sticky: {
19
+ type: import("vue").PropType<boolean>;
20
+ default: boolean;
21
+ };
22
+ cancelText: {
23
+ type: import("vue").PropType<string>;
24
+ default: string;
25
+ };
26
+ submitText: {
27
+ type: import("vue").PropType<string>;
28
+ required: true;
29
+ };
30
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ submit: (e?: void | undefined) => void;
32
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
+ title: {
34
+ type: import("vue").PropType<string>;
35
+ default: string;
36
+ };
37
+ modelValue: {
38
+ type: import("vue").PropType<boolean>;
39
+ required: true;
40
+ };
41
+ content: {
42
+ type: import("vue").PropType<string | string[]>;
43
+ required: true;
44
+ };
45
+ kind: {
46
+ type: import("vue").PropType<"alert" | "warn" | "info" | "success">;
47
+ required: true;
48
+ };
49
+ sticky: {
50
+ type: import("vue").PropType<boolean>;
51
+ default: boolean;
52
+ };
53
+ cancelText: {
54
+ type: import("vue").PropType<string>;
55
+ default: string;
56
+ };
57
+ submitText: {
58
+ type: import("vue").PropType<string>;
59
+ required: true;
60
+ };
61
+ }>> & {
62
+ onSubmit?: ((e?: void | undefined) => any) | undefined;
63
+ }, {
64
+ title: string;
65
+ sticky: boolean;
66
+ cancelText: string;
67
+ }, {}>;
68
+ export default _default;