@naptics/vue-collection 0.0.5 → 0.0.7
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 +1 -1
- package/components/NAlert.d.ts +20 -20
- package/components/NAlert.js +3 -3
- package/components/NBadge.d.ts +87 -87
- package/components/NBadge.js +3 -3
- package/components/NBreadcrub.d.ts +57 -57
- package/components/NBreadcrub.js +3 -3
- package/components/NButton.d.ts +69 -69
- package/components/NButton.js +3 -3
- package/components/NCheckbox.d.ts +20 -20
- package/components/NCheckbox.js +3 -3
- package/components/NCheckboxLabel.d.ts +30 -30
- package/components/NCheckboxLabel.js +3 -3
- package/components/NCrudModal.d.ts +238 -203
- package/components/NCrudModal.js +17 -4
- package/components/NDialog.d.ts +1 -1
- package/components/NDialog.js +3 -3
- package/components/NDropdown.d.ts +25 -25
- package/components/NDropdown.js +3 -3
- package/components/NDropzone.d.ts +52 -52
- package/components/NDropzone.js +3 -3
- package/components/NForm.d.ts +6 -6
- package/components/NForm.js +3 -3
- package/components/NFormModal.d.ts +136 -136
- package/components/NFormModal.js +3 -3
- package/components/NIconButton.d.ts +94 -94
- package/components/NIconButton.js +3 -3
- package/components/NIconCircle.d.ts +46 -46
- package/components/NIconCircle.js +3 -3
- package/components/NInput.d.ts +94 -94
- package/components/NInput.js +3 -3
- package/components/NInputPhone.d.ts +125 -125
- package/components/NInputPhone.js +2 -2
- package/components/NInputSelect.d.ts +131 -131
- package/components/NInputSelect.js +3 -3
- package/components/NInputSuggestion.d.ts +179 -167
- package/components/NInputSuggestion.js +3 -3
- package/components/NLink.d.ts +32 -32
- package/components/NLink.js +3 -3
- package/components/NList.d.ts +10 -10
- package/components/NList.js +3 -3
- package/components/NLoadingIndicator.d.ts +30 -30
- package/components/NLoadingIndicator.js +3 -3
- package/components/NModal.d.ts +118 -118
- package/components/NModal.js +3 -3
- package/components/NPagination.d.ts +30 -30
- package/components/NPagination.js +3 -3
- package/components/NSearchbar.d.ts +29 -29
- package/components/NSearchbar.js +3 -3
- package/components/NSearchbarList.d.ts +53 -62
- package/components/NSearchbarList.js +3 -3
- package/components/NSelect.d.ts +64 -64
- package/components/NSelect.js +3 -3
- package/components/NSuggestionList.d.ts +84 -84
- package/components/NSuggestionList.js +7 -7
- package/components/NTable.d.ts +29 -29
- package/components/NTable.js +3 -3
- package/components/NTableAction.d.ts +19 -19
- package/components/NTableAction.js +3 -3
- package/components/NTextArea.d.ts +118 -118
- package/components/NTextArea.js +5 -5
- package/components/NTooltip.d.ts +42 -42
- package/components/NTooltip.js +3 -3
- package/components/NValInput.d.ts +134 -134
- package/components/NValInput.js +5 -5
- package/index.d.ts +2 -66
- package/index.js +2 -67
- package/package.json +3 -1
- package/utils/breakpoints.d.ts +3 -0
- package/utils/breakpoints.js +3 -0
- package/utils/component.d.ts +0 -8
- package/utils/component.js +0 -10
- package/utils/identifiable.d.ts +8 -8
- package/utils/identifiable.js +4 -2
- package/utils/tailwind.d.ts +2 -0
- package/utils/utils.d.ts +25 -12
- package/utils/utils.js +30 -9
package/components/NSelect.d.ts
CHANGED
|
@@ -2,51 +2,51 @@ import type { Identifiable } from '../utils/identifiable';
|
|
|
2
2
|
import { type PropType } from 'vue';
|
|
3
3
|
import { type NValInputExposed } from './NValInput';
|
|
4
4
|
export declare const nSelectProps: {
|
|
5
|
-
tooltipText: StringConstructor;
|
|
6
|
-
tooltipContent: PropType<() => void>;
|
|
7
|
-
tooltipHide: BooleanConstructor;
|
|
8
|
-
tooltipShow: BooleanConstructor;
|
|
9
|
-
tooltipPlacement: {
|
|
10
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
11
|
-
default:
|
|
5
|
+
readonly tooltipText: StringConstructor;
|
|
6
|
+
readonly tooltipContent: PropType<() => void>;
|
|
7
|
+
readonly tooltipHide: BooleanConstructor;
|
|
8
|
+
readonly tooltipShow: BooleanConstructor;
|
|
9
|
+
readonly tooltipPlacement: {
|
|
10
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
11
|
+
readonly default: "auto";
|
|
12
12
|
};
|
|
13
|
-
tooltipMaxWidth: {
|
|
14
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
15
|
-
default:
|
|
13
|
+
readonly tooltipMaxWidth: {
|
|
14
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
15
|
+
readonly default: "max-w-xs";
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* The id of the currently selected option of this input.
|
|
19
19
|
*/
|
|
20
|
-
value: StringConstructor;
|
|
20
|
+
readonly value: StringConstructor;
|
|
21
21
|
/**
|
|
22
22
|
* This is called with the newly selected id when the selection has changed.
|
|
23
23
|
* If no id is selected, the empty string is passed, in order to
|
|
24
24
|
* match the API of all other inputs who never pass `undefined`.
|
|
25
25
|
*/
|
|
26
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
26
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
27
27
|
/**
|
|
28
28
|
* The different options which can be selected.
|
|
29
29
|
*/
|
|
30
|
-
options: {
|
|
31
|
-
type: PropType<SelectionOption[]>;
|
|
32
|
-
default: () => never[];
|
|
30
|
+
readonly options: {
|
|
31
|
+
readonly type: PropType<SelectionOption[]>;
|
|
32
|
+
readonly default: () => never[];
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* @see {@link nValInputProps.name}
|
|
36
36
|
*/
|
|
37
|
-
name: StringConstructor;
|
|
37
|
+
readonly name: StringConstructor;
|
|
38
38
|
/**
|
|
39
39
|
* @see {@link nValInputProps.optional}
|
|
40
40
|
*/
|
|
41
|
-
optional: BooleanConstructor;
|
|
41
|
+
readonly optional: BooleanConstructor;
|
|
42
42
|
/**
|
|
43
43
|
* @see {@link nValInputProps.disabled}
|
|
44
44
|
*/
|
|
45
|
-
disabled: BooleanConstructor;
|
|
45
|
+
readonly disabled: BooleanConstructor;
|
|
46
46
|
/**
|
|
47
47
|
* @see {@link nValInputProps.form}
|
|
48
48
|
*/
|
|
49
|
-
form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
49
|
+
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
50
50
|
};
|
|
51
51
|
export type SelectionOption = Identifiable & {
|
|
52
52
|
label: string;
|
|
@@ -56,104 +56,104 @@ export type NSelectExposed = NValInputExposed;
|
|
|
56
56
|
* The `NSelect` is a styled html select-input.
|
|
57
57
|
*/
|
|
58
58
|
declare const _default: import("vue").DefineComponent<{
|
|
59
|
-
tooltipText: StringConstructor;
|
|
60
|
-
tooltipContent: PropType<() => void>;
|
|
61
|
-
tooltipHide: BooleanConstructor;
|
|
62
|
-
tooltipShow: BooleanConstructor;
|
|
63
|
-
tooltipPlacement: {
|
|
64
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
65
|
-
default:
|
|
59
|
+
readonly tooltipText: StringConstructor;
|
|
60
|
+
readonly tooltipContent: PropType<() => void>;
|
|
61
|
+
readonly tooltipHide: BooleanConstructor;
|
|
62
|
+
readonly tooltipShow: BooleanConstructor;
|
|
63
|
+
readonly tooltipPlacement: {
|
|
64
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
65
|
+
readonly default: "auto";
|
|
66
66
|
};
|
|
67
|
-
tooltipMaxWidth: {
|
|
68
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
69
|
-
default:
|
|
67
|
+
readonly tooltipMaxWidth: {
|
|
68
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
69
|
+
readonly default: "max-w-xs";
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
72
72
|
* The id of the currently selected option of this input.
|
|
73
73
|
*/
|
|
74
|
-
value: StringConstructor;
|
|
74
|
+
readonly value: StringConstructor;
|
|
75
75
|
/**
|
|
76
76
|
* This is called with the newly selected id when the selection has changed.
|
|
77
77
|
* If no id is selected, the empty string is passed, in order to
|
|
78
78
|
* match the API of all other inputs who never pass `undefined`.
|
|
79
79
|
*/
|
|
80
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
80
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
81
81
|
/**
|
|
82
82
|
* The different options which can be selected.
|
|
83
83
|
*/
|
|
84
|
-
options: {
|
|
85
|
-
type: PropType<SelectionOption[]>;
|
|
86
|
-
default: () => never[];
|
|
84
|
+
readonly options: {
|
|
85
|
+
readonly type: PropType<SelectionOption[]>;
|
|
86
|
+
readonly default: () => never[];
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* @see {@link nValInputProps.name}
|
|
90
90
|
*/
|
|
91
|
-
name: StringConstructor;
|
|
91
|
+
readonly name: StringConstructor;
|
|
92
92
|
/**
|
|
93
93
|
* @see {@link nValInputProps.optional}
|
|
94
94
|
*/
|
|
95
|
-
optional: BooleanConstructor;
|
|
95
|
+
readonly optional: BooleanConstructor;
|
|
96
96
|
/**
|
|
97
97
|
* @see {@link nValInputProps.disabled}
|
|
98
98
|
*/
|
|
99
|
-
disabled: BooleanConstructor;
|
|
99
|
+
readonly disabled: BooleanConstructor;
|
|
100
100
|
/**
|
|
101
101
|
* @see {@link nValInputProps.form}
|
|
102
102
|
*/
|
|
103
|
-
form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
103
|
+
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
104
104
|
}, import("vue").RenderFunction, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
105
|
-
tooltipText: StringConstructor;
|
|
106
|
-
tooltipContent: PropType<() => void>;
|
|
107
|
-
tooltipHide: BooleanConstructor;
|
|
108
|
-
tooltipShow: BooleanConstructor;
|
|
109
|
-
tooltipPlacement: {
|
|
110
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
111
|
-
default:
|
|
105
|
+
readonly tooltipText: StringConstructor;
|
|
106
|
+
readonly tooltipContent: PropType<() => void>;
|
|
107
|
+
readonly tooltipHide: BooleanConstructor;
|
|
108
|
+
readonly tooltipShow: BooleanConstructor;
|
|
109
|
+
readonly tooltipPlacement: {
|
|
110
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
111
|
+
readonly default: "auto";
|
|
112
112
|
};
|
|
113
|
-
tooltipMaxWidth: {
|
|
114
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
115
|
-
default:
|
|
113
|
+
readonly tooltipMaxWidth: {
|
|
114
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
115
|
+
readonly default: "max-w-xs";
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
118
|
* The id of the currently selected option of this input.
|
|
119
119
|
*/
|
|
120
|
-
value: StringConstructor;
|
|
120
|
+
readonly value: StringConstructor;
|
|
121
121
|
/**
|
|
122
122
|
* This is called with the newly selected id when the selection has changed.
|
|
123
123
|
* If no id is selected, the empty string is passed, in order to
|
|
124
124
|
* match the API of all other inputs who never pass `undefined`.
|
|
125
125
|
*/
|
|
126
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
126
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
127
127
|
/**
|
|
128
128
|
* The different options which can be selected.
|
|
129
129
|
*/
|
|
130
|
-
options: {
|
|
131
|
-
type: PropType<SelectionOption[]>;
|
|
132
|
-
default: () => never[];
|
|
130
|
+
readonly options: {
|
|
131
|
+
readonly type: PropType<SelectionOption[]>;
|
|
132
|
+
readonly default: () => never[];
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
135
135
|
* @see {@link nValInputProps.name}
|
|
136
136
|
*/
|
|
137
|
-
name: StringConstructor;
|
|
137
|
+
readonly name: StringConstructor;
|
|
138
138
|
/**
|
|
139
139
|
* @see {@link nValInputProps.optional}
|
|
140
140
|
*/
|
|
141
|
-
optional: BooleanConstructor;
|
|
141
|
+
readonly optional: BooleanConstructor;
|
|
142
142
|
/**
|
|
143
143
|
* @see {@link nValInputProps.disabled}
|
|
144
144
|
*/
|
|
145
|
-
disabled: BooleanConstructor;
|
|
145
|
+
readonly disabled: BooleanConstructor;
|
|
146
146
|
/**
|
|
147
147
|
* @see {@link nValInputProps.form}
|
|
148
148
|
*/
|
|
149
|
-
form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
149
|
+
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
150
150
|
}>> & {}, {
|
|
151
|
-
tooltipHide: boolean;
|
|
152
|
-
tooltipShow: boolean;
|
|
153
|
-
tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
154
|
-
tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
155
|
-
options: SelectionOption[];
|
|
156
|
-
disabled: boolean;
|
|
157
|
-
optional: boolean;
|
|
151
|
+
readonly tooltipHide: boolean;
|
|
152
|
+
readonly tooltipShow: boolean;
|
|
153
|
+
readonly tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
154
|
+
readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
155
|
+
readonly options: SelectionOption[];
|
|
156
|
+
readonly disabled: boolean;
|
|
157
|
+
readonly optional: boolean;
|
|
158
158
|
}>;
|
|
159
159
|
export default _default;
|
package/components/NSelect.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
2
|
import { trsl } from '../i18n';
|
|
3
|
-
import { createComponent
|
|
3
|
+
import { createComponent } from '../utils/component';
|
|
4
4
|
import { ref } from 'vue';
|
|
5
5
|
import NTooltip, { mapTooltipProps, nToolTipPropsForImplementor } from './NTooltip';
|
|
6
6
|
import NValInput, { nValInputProps } from './NValInput';
|
|
7
|
-
export const nSelectProps =
|
|
7
|
+
export const nSelectProps = {
|
|
8
8
|
/**
|
|
9
9
|
* The id of the currently selected option of this input.
|
|
10
10
|
*/
|
|
@@ -39,7 +39,7 @@ export const nSelectProps = createProps({
|
|
|
39
39
|
*/
|
|
40
40
|
form: nValInputProps.form,
|
|
41
41
|
...nToolTipPropsForImplementor
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
/**
|
|
44
44
|
* The `NSelect` is a styled html select-input.
|
|
45
45
|
*/
|
|
@@ -4,123 +4,123 @@ export declare const nSuggestionListPropsForConfig: {
|
|
|
4
4
|
/**
|
|
5
5
|
* The items which are available to show in the list. The first `maxItems` will be displayed.
|
|
6
6
|
*/
|
|
7
|
-
items: {
|
|
8
|
-
type: PropType<SuggestionItem[]>;
|
|
9
|
-
default: () => never[];
|
|
7
|
+
readonly items: {
|
|
8
|
+
readonly type: PropType<SuggestionItem[]>;
|
|
9
|
+
readonly default: () => never[];
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* The maximum items which are displayed in the list.
|
|
13
13
|
*/
|
|
14
|
-
maxItems: {
|
|
15
|
-
type: NumberConstructor;
|
|
16
|
-
default: () =>
|
|
14
|
+
readonly maxItems: {
|
|
15
|
+
readonly type: NumberConstructor;
|
|
16
|
+
readonly default: () => number;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* If set to `true` the list is hidden.
|
|
20
20
|
*/
|
|
21
|
-
hideList: BooleanConstructor;
|
|
21
|
+
readonly hideList: BooleanConstructor;
|
|
22
22
|
/**
|
|
23
23
|
* If set to `true` the list shows a loading indicator when the `items` array is empty.
|
|
24
24
|
*/
|
|
25
|
-
loading: BooleanConstructor;
|
|
25
|
+
readonly loading: BooleanConstructor;
|
|
26
26
|
/**
|
|
27
27
|
* This is called with the id of the selected item.
|
|
28
28
|
*/
|
|
29
|
-
onSelect: PropType<(id: string) => void>;
|
|
29
|
+
readonly onSelect: PropType<(id: string) => void>;
|
|
30
30
|
/**
|
|
31
31
|
* The slot for every item of the list.
|
|
32
32
|
*/
|
|
33
|
-
listItem: PropType<(props: ItemSlotProps) => JSX.Element>;
|
|
33
|
+
readonly listItem: PropType<(props: ItemSlotProps) => JSX.Element>;
|
|
34
34
|
/**
|
|
35
35
|
* This function is called, when the input and the suggestion list are really blurred.
|
|
36
36
|
* This means, it's not just the input temporarly beeing blurred because the user clicks on the item list,
|
|
37
37
|
* but the focus has completely disappeared from the input and the list.
|
|
38
38
|
*/
|
|
39
|
-
onRealBlur: PropType<() => void>;
|
|
39
|
+
readonly onRealBlur: PropType<() => void>;
|
|
40
40
|
};
|
|
41
41
|
export declare const nSuggestionListPropsForInput: {
|
|
42
42
|
/**
|
|
43
43
|
* The slot for the input, which will be enhanced with the suggestion list.
|
|
44
44
|
*/
|
|
45
|
-
input: {
|
|
46
|
-
type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
47
|
-
required: true;
|
|
45
|
+
readonly input: {
|
|
46
|
+
readonly type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
47
|
+
readonly required: true;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* When this function is called, the parent is required to call focus() on the input element.
|
|
51
51
|
* It won't work properly if the parent does not request focus on the input.
|
|
52
52
|
*/
|
|
53
|
-
onRequestInputFocus: {
|
|
54
|
-
type: PropType<() => void>;
|
|
55
|
-
required: true;
|
|
53
|
+
readonly onRequestInputFocus: {
|
|
54
|
+
readonly type: PropType<() => void>;
|
|
55
|
+
readonly required: true;
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
* The current value of the input. This is just needed to display the «No results found for {value}» message.
|
|
59
59
|
*/
|
|
60
|
-
inputValue: {
|
|
61
|
-
type: StringConstructor;
|
|
62
|
-
required: true;
|
|
60
|
+
readonly inputValue: {
|
|
61
|
+
readonly type: StringConstructor;
|
|
62
|
+
readonly required: true;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
export declare const nSuggestionListProps: {
|
|
66
66
|
/**
|
|
67
67
|
* The slot for the input, which will be enhanced with the suggestion list.
|
|
68
68
|
*/
|
|
69
|
-
input: {
|
|
70
|
-
type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
71
|
-
required: true;
|
|
69
|
+
readonly input: {
|
|
70
|
+
readonly type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
71
|
+
readonly required: true;
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
74
74
|
* When this function is called, the parent is required to call focus() on the input element.
|
|
75
75
|
* It won't work properly if the parent does not request focus on the input.
|
|
76
76
|
*/
|
|
77
|
-
onRequestInputFocus: {
|
|
78
|
-
type: PropType<() => void>;
|
|
79
|
-
required: true;
|
|
77
|
+
readonly onRequestInputFocus: {
|
|
78
|
+
readonly type: PropType<() => void>;
|
|
79
|
+
readonly required: true;
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
82
|
* The current value of the input. This is just needed to display the «No results found for {value}» message.
|
|
83
83
|
*/
|
|
84
|
-
inputValue: {
|
|
85
|
-
type: StringConstructor;
|
|
86
|
-
required: true;
|
|
84
|
+
readonly inputValue: {
|
|
85
|
+
readonly type: StringConstructor;
|
|
86
|
+
readonly required: true;
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* The items which are available to show in the list. The first `maxItems` will be displayed.
|
|
90
90
|
*/
|
|
91
|
-
items: {
|
|
92
|
-
type: PropType<SuggestionItem[]>;
|
|
93
|
-
default: () => never[];
|
|
91
|
+
readonly items: {
|
|
92
|
+
readonly type: PropType<SuggestionItem[]>;
|
|
93
|
+
readonly default: () => never[];
|
|
94
94
|
};
|
|
95
95
|
/**
|
|
96
96
|
* The maximum items which are displayed in the list.
|
|
97
97
|
*/
|
|
98
|
-
maxItems: {
|
|
99
|
-
type: NumberConstructor;
|
|
100
|
-
default: () =>
|
|
98
|
+
readonly maxItems: {
|
|
99
|
+
readonly type: NumberConstructor;
|
|
100
|
+
readonly default: () => number;
|
|
101
101
|
};
|
|
102
102
|
/**
|
|
103
103
|
* If set to `true` the list is hidden.
|
|
104
104
|
*/
|
|
105
|
-
hideList: BooleanConstructor;
|
|
105
|
+
readonly hideList: BooleanConstructor;
|
|
106
106
|
/**
|
|
107
107
|
* If set to `true` the list shows a loading indicator when the `items` array is empty.
|
|
108
108
|
*/
|
|
109
|
-
loading: BooleanConstructor;
|
|
109
|
+
readonly loading: BooleanConstructor;
|
|
110
110
|
/**
|
|
111
111
|
* This is called with the id of the selected item.
|
|
112
112
|
*/
|
|
113
|
-
onSelect: PropType<(id: string) => void>;
|
|
113
|
+
readonly onSelect: PropType<(id: string) => void>;
|
|
114
114
|
/**
|
|
115
115
|
* The slot for every item of the list.
|
|
116
116
|
*/
|
|
117
|
-
listItem: PropType<(props: ItemSlotProps) => JSX.Element>;
|
|
117
|
+
readonly listItem: PropType<(props: ItemSlotProps) => JSX.Element>;
|
|
118
118
|
/**
|
|
119
119
|
* This function is called, when the input and the suggestion list are really blurred.
|
|
120
120
|
* This means, it's not just the input temporarly beeing blurred because the user clicks on the item list,
|
|
121
121
|
* but the focus has completely disappeared from the input and the list.
|
|
122
122
|
*/
|
|
123
|
-
onRealBlur: PropType<() => void>;
|
|
123
|
+
readonly onRealBlur: PropType<() => void>;
|
|
124
124
|
};
|
|
125
125
|
export type InputSlotProps = {
|
|
126
126
|
/**
|
|
@@ -152,124 +152,124 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
152
|
/**
|
|
153
153
|
* The slot for the input, which will be enhanced with the suggestion list.
|
|
154
154
|
*/
|
|
155
|
-
input: {
|
|
156
|
-
type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
157
|
-
required: true;
|
|
155
|
+
readonly input: {
|
|
156
|
+
readonly type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
157
|
+
readonly required: true;
|
|
158
158
|
};
|
|
159
159
|
/**
|
|
160
160
|
* When this function is called, the parent is required to call focus() on the input element.
|
|
161
161
|
* It won't work properly if the parent does not request focus on the input.
|
|
162
162
|
*/
|
|
163
|
-
onRequestInputFocus: {
|
|
164
|
-
type: PropType<() => void>;
|
|
165
|
-
required: true;
|
|
163
|
+
readonly onRequestInputFocus: {
|
|
164
|
+
readonly type: PropType<() => void>;
|
|
165
|
+
readonly required: true;
|
|
166
166
|
};
|
|
167
167
|
/**
|
|
168
168
|
* The current value of the input. This is just needed to display the «No results found for {value}» message.
|
|
169
169
|
*/
|
|
170
|
-
inputValue: {
|
|
171
|
-
type: StringConstructor;
|
|
172
|
-
required: true;
|
|
170
|
+
readonly inputValue: {
|
|
171
|
+
readonly type: StringConstructor;
|
|
172
|
+
readonly required: true;
|
|
173
173
|
};
|
|
174
174
|
/**
|
|
175
175
|
* The items which are available to show in the list. The first `maxItems` will be displayed.
|
|
176
176
|
*/
|
|
177
|
-
items: {
|
|
178
|
-
type: PropType<SuggestionItem[]>;
|
|
179
|
-
default: () => never[];
|
|
177
|
+
readonly items: {
|
|
178
|
+
readonly type: PropType<SuggestionItem[]>;
|
|
179
|
+
readonly default: () => never[];
|
|
180
180
|
};
|
|
181
181
|
/**
|
|
182
182
|
* The maximum items which are displayed in the list.
|
|
183
183
|
*/
|
|
184
|
-
maxItems: {
|
|
185
|
-
type: NumberConstructor;
|
|
186
|
-
default: () =>
|
|
184
|
+
readonly maxItems: {
|
|
185
|
+
readonly type: NumberConstructor;
|
|
186
|
+
readonly default: () => number;
|
|
187
187
|
};
|
|
188
188
|
/**
|
|
189
189
|
* If set to `true` the list is hidden.
|
|
190
190
|
*/
|
|
191
|
-
hideList: BooleanConstructor;
|
|
191
|
+
readonly hideList: BooleanConstructor;
|
|
192
192
|
/**
|
|
193
193
|
* If set to `true` the list shows a loading indicator when the `items` array is empty.
|
|
194
194
|
*/
|
|
195
|
-
loading: BooleanConstructor;
|
|
195
|
+
readonly loading: BooleanConstructor;
|
|
196
196
|
/**
|
|
197
197
|
* This is called with the id of the selected item.
|
|
198
198
|
*/
|
|
199
|
-
onSelect: PropType<(id: string) => void>;
|
|
199
|
+
readonly onSelect: PropType<(id: string) => void>;
|
|
200
200
|
/**
|
|
201
201
|
* The slot for every item of the list.
|
|
202
202
|
*/
|
|
203
|
-
listItem: PropType<(props: ItemSlotProps<SuggestionItem>) => JSX.Element>;
|
|
203
|
+
readonly listItem: PropType<(props: ItemSlotProps<SuggestionItem>) => JSX.Element>;
|
|
204
204
|
/**
|
|
205
205
|
* This function is called, when the input and the suggestion list are really blurred.
|
|
206
206
|
* This means, it's not just the input temporarly beeing blurred because the user clicks on the item list,
|
|
207
207
|
* but the focus has completely disappeared from the input and the list.
|
|
208
208
|
*/
|
|
209
|
-
onRealBlur: PropType<() => void>;
|
|
209
|
+
readonly onRealBlur: PropType<() => void>;
|
|
210
210
|
}, import("vue").RenderFunction, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
211
211
|
/**
|
|
212
212
|
* The slot for the input, which will be enhanced with the suggestion list.
|
|
213
213
|
*/
|
|
214
|
-
input: {
|
|
215
|
-
type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
216
|
-
required: true;
|
|
214
|
+
readonly input: {
|
|
215
|
+
readonly type: PropType<(props: InputSlotProps) => JSX.Element>;
|
|
216
|
+
readonly required: true;
|
|
217
217
|
};
|
|
218
218
|
/**
|
|
219
219
|
* When this function is called, the parent is required to call focus() on the input element.
|
|
220
220
|
* It won't work properly if the parent does not request focus on the input.
|
|
221
221
|
*/
|
|
222
|
-
onRequestInputFocus: {
|
|
223
|
-
type: PropType<() => void>;
|
|
224
|
-
required: true;
|
|
222
|
+
readonly onRequestInputFocus: {
|
|
223
|
+
readonly type: PropType<() => void>;
|
|
224
|
+
readonly required: true;
|
|
225
225
|
};
|
|
226
226
|
/**
|
|
227
227
|
* The current value of the input. This is just needed to display the «No results found for {value}» message.
|
|
228
228
|
*/
|
|
229
|
-
inputValue: {
|
|
230
|
-
type: StringConstructor;
|
|
231
|
-
required: true;
|
|
229
|
+
readonly inputValue: {
|
|
230
|
+
readonly type: StringConstructor;
|
|
231
|
+
readonly required: true;
|
|
232
232
|
};
|
|
233
233
|
/**
|
|
234
234
|
* The items which are available to show in the list. The first `maxItems` will be displayed.
|
|
235
235
|
*/
|
|
236
|
-
items: {
|
|
237
|
-
type: PropType<SuggestionItem[]>;
|
|
238
|
-
default: () => never[];
|
|
236
|
+
readonly items: {
|
|
237
|
+
readonly type: PropType<SuggestionItem[]>;
|
|
238
|
+
readonly default: () => never[];
|
|
239
239
|
};
|
|
240
240
|
/**
|
|
241
241
|
* The maximum items which are displayed in the list.
|
|
242
242
|
*/
|
|
243
|
-
maxItems: {
|
|
244
|
-
type: NumberConstructor;
|
|
245
|
-
default: () =>
|
|
243
|
+
readonly maxItems: {
|
|
244
|
+
readonly type: NumberConstructor;
|
|
245
|
+
readonly default: () => number;
|
|
246
246
|
};
|
|
247
247
|
/**
|
|
248
248
|
* If set to `true` the list is hidden.
|
|
249
249
|
*/
|
|
250
|
-
hideList: BooleanConstructor;
|
|
250
|
+
readonly hideList: BooleanConstructor;
|
|
251
251
|
/**
|
|
252
252
|
* If set to `true` the list shows a loading indicator when the `items` array is empty.
|
|
253
253
|
*/
|
|
254
|
-
loading: BooleanConstructor;
|
|
254
|
+
readonly loading: BooleanConstructor;
|
|
255
255
|
/**
|
|
256
256
|
* This is called with the id of the selected item.
|
|
257
257
|
*/
|
|
258
|
-
onSelect: PropType<(id: string) => void>;
|
|
258
|
+
readonly onSelect: PropType<(id: string) => void>;
|
|
259
259
|
/**
|
|
260
260
|
* The slot for every item of the list.
|
|
261
261
|
*/
|
|
262
|
-
listItem: PropType<(props: ItemSlotProps<SuggestionItem>) => JSX.Element>;
|
|
262
|
+
readonly listItem: PropType<(props: ItemSlotProps<SuggestionItem>) => JSX.Element>;
|
|
263
263
|
/**
|
|
264
264
|
* This function is called, when the input and the suggestion list are really blurred.
|
|
265
265
|
* This means, it's not just the input temporarly beeing blurred because the user clicks on the item list,
|
|
266
266
|
* but the focus has completely disappeared from the input and the list.
|
|
267
267
|
*/
|
|
268
|
-
onRealBlur: PropType<() => void>;
|
|
268
|
+
readonly onRealBlur: PropType<() => void>;
|
|
269
269
|
}>> & {}, {
|
|
270
|
-
loading: boolean;
|
|
271
|
-
items: SuggestionItem[];
|
|
272
|
-
maxItems: number;
|
|
273
|
-
hideList: boolean;
|
|
270
|
+
readonly loading: boolean;
|
|
271
|
+
readonly items: SuggestionItem[];
|
|
272
|
+
readonly maxItems: number;
|
|
273
|
+
readonly hideList: boolean;
|
|
274
274
|
}>;
|
|
275
275
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
|
|
2
2
|
import { trsl } from '../i18n';
|
|
3
|
-
import { createComponent
|
|
3
|
+
import { createComponent } from '../utils/component';
|
|
4
4
|
import { computed, ref } from 'vue';
|
|
5
5
|
import NLoadingIndicator from './NLoadingIndicator';
|
|
6
|
-
export const nSuggestionListPropsForConfig =
|
|
6
|
+
export const nSuggestionListPropsForConfig = {
|
|
7
7
|
/**
|
|
8
8
|
* The items which are available to show in the list. The first `maxItems` will be displayed.
|
|
9
9
|
*/
|
|
@@ -40,8 +40,8 @@ export const nSuggestionListPropsForConfig = createProps({
|
|
|
40
40
|
* but the focus has completely disappeared from the input and the list.
|
|
41
41
|
*/
|
|
42
42
|
onRealBlur: Function
|
|
43
|
-
}
|
|
44
|
-
export const nSuggestionListPropsForInput =
|
|
43
|
+
};
|
|
44
|
+
export const nSuggestionListPropsForInput = {
|
|
45
45
|
/**
|
|
46
46
|
* The slot for the input, which will be enhanced with the suggestion list.
|
|
47
47
|
*/
|
|
@@ -64,11 +64,11 @@ export const nSuggestionListPropsForInput = createProps({
|
|
|
64
64
|
type: String,
|
|
65
65
|
required: true
|
|
66
66
|
}
|
|
67
|
-
}
|
|
68
|
-
export const nSuggestionListProps =
|
|
67
|
+
};
|
|
68
|
+
export const nSuggestionListProps = {
|
|
69
69
|
...nSuggestionListPropsForConfig,
|
|
70
70
|
...nSuggestionListPropsForInput
|
|
71
|
-
}
|
|
71
|
+
};
|
|
72
72
|
/**
|
|
73
73
|
* The `NSuggestionList` can be added to an input and adds a list below it which is shown when the input is focused.
|
|
74
74
|
*/
|