@illinois-grad/grad-vue 3.0.14 → 3.0.15
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/custom-elements.json +20 -0
- package/dist/components/GMultiSelect.vue.d.ts +19 -1
- package/dist/components/GSelect.vue.d.ts +20 -2
- package/dist/components/table/TableColumn.d.ts +13 -0
- package/dist/compose/useSelectDropdown.d.ts +6 -0
- package/dist/{grad-vue-CpcX2lGW.js → grad-vue-N0uyBUx2.js} +258 -234
- package/dist/grad-vue-N0uyBUx2.js.map +1 -0
- package/dist/grad-vue-elements.css +28 -28
- package/dist/grad-vue-elements.js +238 -214
- package/dist/grad-vue-elements.js.map +1 -1
- package/dist/grad-vue.css +1 -1
- package/dist/grad-vue.js +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +1 -1
- package/dist/grad-vue-CpcX2lGW.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -1274,6 +1274,16 @@
|
|
|
1274
1274
|
"optional": true,
|
|
1275
1275
|
"description": "Name for form registration"
|
|
1276
1276
|
},
|
|
1277
|
+
{
|
|
1278
|
+
"kind": "field",
|
|
1279
|
+
"name": "searchDescription",
|
|
1280
|
+
"type": {
|
|
1281
|
+
"text": "boolean"
|
|
1282
|
+
},
|
|
1283
|
+
"optional": true,
|
|
1284
|
+
"description": "Include the option `description` in the searchable text match. Enabled by default; set to `false` to match on the label only.",
|
|
1285
|
+
"default": "true"
|
|
1286
|
+
},
|
|
1277
1287
|
{
|
|
1278
1288
|
"kind": "field",
|
|
1279
1289
|
"name": "errors",
|
|
@@ -1628,6 +1638,16 @@
|
|
|
1628
1638
|
"description": "Searchable",
|
|
1629
1639
|
"default": "false"
|
|
1630
1640
|
},
|
|
1641
|
+
{
|
|
1642
|
+
"kind": "field",
|
|
1643
|
+
"name": "searchDescription",
|
|
1644
|
+
"type": {
|
|
1645
|
+
"text": "boolean"
|
|
1646
|
+
},
|
|
1647
|
+
"optional": true,
|
|
1648
|
+
"description": "Include the option `description` in the searchable text match. Enabled by default; set to `false` to match on the label only.",
|
|
1649
|
+
"default": "true"
|
|
1650
|
+
},
|
|
1631
1651
|
{
|
|
1632
1652
|
"kind": "field",
|
|
1633
1653
|
"name": "clearButton",
|
|
@@ -8,7 +8,12 @@ import { type SelectOption } from "../compose/useSelectDropdown.ts";
|
|
|
8
8
|
* next to each selected option.
|
|
9
9
|
*
|
|
10
10
|
* The `options` prop accepts an array of strings or `{ label, value }`
|
|
11
|
-
* objects.
|
|
11
|
+
* objects. Options may also include an optional `description`, which renders
|
|
12
|
+
* as a smaller second line beneath the label in the dropdown. Selected chips
|
|
13
|
+
* only show the `label` (first part) to keep the control compact. The search
|
|
14
|
+
* filter matches both the label and the `description`; set `searchDescription`
|
|
15
|
+
* to `false` to match on the label only. The `v-model` binds to an array of
|
|
16
|
+
* `string | number` values.
|
|
12
17
|
*
|
|
13
18
|
* In standard Vue usage, this registers with the nearest parent `GForm` via
|
|
14
19
|
* injection. In custom-elements mode, use matching `form-key` values to pair
|
|
@@ -58,6 +63,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
58
63
|
* Name for form registration
|
|
59
64
|
*/
|
|
60
65
|
name?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Include the option `description` in the searchable text match.
|
|
68
|
+
* Enabled by default; set to `false` to match on the label only.
|
|
69
|
+
* @demo
|
|
70
|
+
*/
|
|
71
|
+
searchDescription?: boolean;
|
|
61
72
|
/**
|
|
62
73
|
* Error messages array (supports multiple validation errors)
|
|
63
74
|
*/
|
|
@@ -110,6 +121,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
110
121
|
* Name for form registration
|
|
111
122
|
*/
|
|
112
123
|
name?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Include the option `description` in the searchable text match.
|
|
126
|
+
* Enabled by default; set to `false` to match on the label only.
|
|
127
|
+
* @demo
|
|
128
|
+
*/
|
|
129
|
+
searchDescription?: boolean;
|
|
113
130
|
/**
|
|
114
131
|
* Error messages array (supports multiple validation errors)
|
|
115
132
|
*/
|
|
@@ -133,4 +150,5 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
133
150
|
required: boolean;
|
|
134
151
|
disabled: boolean;
|
|
135
152
|
hiddenLabel: boolean;
|
|
153
|
+
searchDescription: boolean;
|
|
136
154
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -9,10 +9,15 @@ import { type SelectOption } from "../compose/useSelectDropdown.ts";
|
|
|
9
9
|
*
|
|
10
10
|
* The component can be marked `searchable` to enable search functionality.
|
|
11
11
|
* This turns it into a text input that filters the options. Filtering is
|
|
12
|
-
* done with a simple lower-case string search
|
|
12
|
+
* done with a simple lower-case string search that matches both the option
|
|
13
|
+
* label and its `description`. Set `searchDescription` to `false` to match
|
|
14
|
+
* on the label only.
|
|
13
15
|
*
|
|
14
16
|
* The `options` prop can be an array of strings or objects with `label`
|
|
15
|
-
* and `value` properties.
|
|
17
|
+
* and `value` properties. Options may also include an optional
|
|
18
|
+
* `description`, which renders as a smaller second line beneath the label
|
|
19
|
+
* in the dropdown to give extra context (for example a code and its full
|
|
20
|
+
* name).
|
|
16
21
|
*/
|
|
17
22
|
declare const _default: typeof __VLS_export;
|
|
18
23
|
export default _default;
|
|
@@ -57,6 +62,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
57
62
|
* @demo
|
|
58
63
|
*/
|
|
59
64
|
searchable?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Include the option `description` in the searchable text match.
|
|
67
|
+
* Enabled by default; set to `false` to match on the label only.
|
|
68
|
+
* @demo
|
|
69
|
+
*/
|
|
70
|
+
searchDescription?: boolean;
|
|
60
71
|
/**
|
|
61
72
|
* Show clear button
|
|
62
73
|
* @demo
|
|
@@ -120,6 +131,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
120
131
|
* @demo
|
|
121
132
|
*/
|
|
122
133
|
searchable?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Include the option `description` in the searchable text match.
|
|
136
|
+
* Enabled by default; set to `false` to match on the label only.
|
|
137
|
+
* @demo
|
|
138
|
+
*/
|
|
139
|
+
searchDescription?: boolean;
|
|
123
140
|
/**
|
|
124
141
|
* Show clear button
|
|
125
142
|
* @demo
|
|
@@ -146,6 +163,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
146
163
|
errors: string[];
|
|
147
164
|
required: boolean;
|
|
148
165
|
disabled: boolean;
|
|
166
|
+
searchDescription: boolean;
|
|
149
167
|
searchable: boolean;
|
|
150
168
|
compact: boolean;
|
|
151
169
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -5,8 +5,14 @@ export interface SelectColumnFilter {
|
|
|
5
5
|
options: Array<{
|
|
6
6
|
label: string;
|
|
7
7
|
value: any;
|
|
8
|
+
description?: string;
|
|
8
9
|
}>;
|
|
9
10
|
placeholder?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Include the option `description` in the searchable text match.
|
|
13
|
+
* Enabled by default; set to `false` to match on the label only.
|
|
14
|
+
*/
|
|
15
|
+
searchDescription?: boolean;
|
|
10
16
|
}
|
|
11
17
|
export interface SearchColumnFilter {
|
|
12
18
|
type: 'search';
|
|
@@ -20,6 +26,7 @@ export interface MultiSelectColumnFilter {
|
|
|
20
26
|
options: Array<{
|
|
21
27
|
label: string;
|
|
22
28
|
value: any;
|
|
29
|
+
description?: string;
|
|
23
30
|
}>;
|
|
24
31
|
placeholder?: string;
|
|
25
32
|
/**
|
|
@@ -27,6 +34,12 @@ export interface MultiSelectColumnFilter {
|
|
|
27
34
|
* list of checkboxes. Recommended when there are many options.
|
|
28
35
|
*/
|
|
29
36
|
searchable?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Include the option `description` in the searchable text match.
|
|
39
|
+
* Only applies when `searchable` is true. Enabled by default; set to
|
|
40
|
+
* `false` to match on the label only.
|
|
41
|
+
*/
|
|
42
|
+
searchDescription?: boolean;
|
|
30
43
|
}
|
|
31
44
|
export interface ToggleColumnFilter {
|
|
32
45
|
type: 'toggle';
|
|
@@ -3,10 +3,16 @@ import { type Ref } from "vue";
|
|
|
3
3
|
* A normalized select option with a label and a value.
|
|
4
4
|
* Both GSelect and GMultiSelect accept `Array<string | SelectOption>` and
|
|
5
5
|
* normalize the strings to this shape internally.
|
|
6
|
+
*
|
|
7
|
+
* An optional `description` renders as a smaller second line beneath the
|
|
8
|
+
* label in the dropdown, useful for adding context to short codes (for
|
|
9
|
+
* example a college code `KP` with the description
|
|
10
|
+
* `Grainger College of Engineering`).
|
|
6
11
|
*/
|
|
7
12
|
export type SelectOption = {
|
|
8
13
|
label: string;
|
|
9
14
|
value: string | number;
|
|
15
|
+
description?: string;
|
|
10
16
|
};
|
|
11
17
|
/**
|
|
12
18
|
* Normalizes a mixed `Array<string | SelectOption>` into a uniform
|