@salesql/sql_components_vue3 3.13.0 → 3.15.0
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/dist/composables/usePickerOrganizer.d.ts +36 -0
- package/dist/constants/events.d.ts +2 -0
- package/dist/constants/pickers.d.ts +64 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.es.js +2827 -2592
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsContactCell/DsContactCell.types.d.ts +5 -0
- package/dist/ui/DsContactCell/DsContactCell.vue.d.ts +11 -2
- package/dist/ui/DsNotification/DsNotification.types.d.ts +1 -0
- package/dist/ui/DsNotification/notificationStack.d.ts +2 -0
- package/dist/ui/DsSavedButton/DsSavedButton.story-state.d.ts +29 -0
- package/dist/ui/DsSavedButton/DsSavedButton.types.d.ts +69 -15
- package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +104 -59
- package/dist/ui/DsTagPicker/DsTagPicker.types.d.ts +69 -16
- package/dist/ui/DsTagPicker/DsTagPicker.vue.d.ts +109 -83
- package/llms-full.txt +167 -95
- package/package.json +2 -1
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DsTooltipPlacement } from '../../ui/DsTooltip';
|
|
2
|
+
import type { DsPickerAlign, DsPickerCreateMode, DsPickerOption, DsPickerOrganizerCopy, DsPickerRowActionsMode, DsPickerSize } from '../../constants/pickers';
|
|
3
|
+
/** Every string of the panel, the ⋮ menu and the form. Pass a partial: it overrides only its keys. */
|
|
4
|
+
export interface DsSavedButtonCopy extends DsPickerOrganizerCopy {
|
|
5
|
+
searchPlaceholder: string;
|
|
6
|
+
/** Shown when the search matches nothing. Empty = nothing. */
|
|
7
|
+
empty: string;
|
|
8
|
+
/** The footer action. */
|
|
9
|
+
create: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const DS_SAVED_BUTTON_COPY: DsSavedButtonCopy;
|
|
2
12
|
export interface DsSavedButtonProps {
|
|
3
13
|
/** The neutral label ("Saved", or "Save" before the first save). App copy. */
|
|
4
14
|
label: string;
|
|
5
|
-
/** "Saved in {folder} · change folder"
|
|
15
|
+
/** "Saved in {folder} · change folder". Shown whenever non-empty, and hidden while the panel is open. */
|
|
6
16
|
tooltip?: string;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
/** Every folder the user can pick. */
|
|
10
|
-
folders: DsPickerOption[];
|
|
11
|
-
searchPlaceholder?: string;
|
|
12
|
-
/** Shown when the search matches nothing. Empty = nothing. */
|
|
13
|
-
emptyLabel?: string;
|
|
14
|
-
/** Footer action ("New Folder"). Empty and no `footer` slot = no footer. */
|
|
15
|
-
createLabel?: string;
|
|
17
|
+
/** Side of the trigger the tooltip opens on. */
|
|
18
|
+
tooltipPlacement?: DsTooltipPlacement;
|
|
16
19
|
/** Material Symbols ligature for the folder glyph. */
|
|
17
20
|
icon?: string;
|
|
18
21
|
size?: DsPickerSize;
|
|
@@ -20,28 +23,79 @@ export interface DsSavedButtonProps {
|
|
|
20
23
|
pill?: boolean;
|
|
21
24
|
align?: DsPickerAlign;
|
|
22
25
|
disabled?: boolean;
|
|
23
|
-
/**
|
|
26
|
+
/** Render the picker panel in `<body>` so no ancestor's `overflow` clips it and no sibling stacking context paints over it (a sticky table cell). */
|
|
27
|
+
teleported?: boolean;
|
|
28
|
+
/** The folder the contact lives in; tints the glyph. `null` = not saved yet (no glyph). */
|
|
29
|
+
folder?: DsPickerOption | null;
|
|
30
|
+
/** Every folder the user can pick. */
|
|
31
|
+
folders: DsPickerOption[];
|
|
32
|
+
/** What the footer does: nothing (default), emit `create`, or open the in-panel form (needs `colors`). */
|
|
33
|
+
create?: DsPickerCreateMode;
|
|
34
|
+
/** The ⋮ menu on each row: absent (default), `edit` / `delete` events, or Edit also opens the form (needs `colors`). Accepts the deprecated boolean. */
|
|
35
|
+
rowActions?: DsPickerRowActionsMode | boolean;
|
|
36
|
+
/** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */
|
|
24
37
|
colors?: string[];
|
|
25
|
-
/** Show the ⋮ menu (Edit / Delete) on every option row. */
|
|
26
|
-
rowActions?: boolean;
|
|
27
38
|
/** The app is saving the form: its submit button shows the spinner and is blocked. */
|
|
28
39
|
formLoading?: boolean;
|
|
29
40
|
/** A failed save, shown under the name field. */
|
|
30
41
|
formError?: string;
|
|
31
|
-
|
|
42
|
+
copy?: Partial<DsSavedButtonCopy>;
|
|
43
|
+
/** @deprecated Use `copy.searchPlaceholder`. */
|
|
44
|
+
searchPlaceholder?: string;
|
|
45
|
+
/** @deprecated Use `copy.empty`. */
|
|
46
|
+
emptyLabel?: string;
|
|
47
|
+
/** @deprecated Use `create` and `copy.create`. */
|
|
48
|
+
createLabel?: string;
|
|
49
|
+
/** @deprecated Use `copy.actions`. */
|
|
32
50
|
actionsLabel?: string;
|
|
51
|
+
/** @deprecated Use `copy.edit`. */
|
|
33
52
|
editLabel?: string;
|
|
53
|
+
/** @deprecated Use `copy.delete`. */
|
|
34
54
|
deleteLabel?: string;
|
|
55
|
+
/** @deprecated Use `copy.createFormTitle`. */
|
|
35
56
|
createFormTitle?: string;
|
|
57
|
+
/** @deprecated Use `copy.editFormTitle`. */
|
|
36
58
|
editFormTitle?: string;
|
|
59
|
+
/** @deprecated Use `copy.createSubmit`. */
|
|
37
60
|
createSubmitLabel?: string;
|
|
61
|
+
/** @deprecated Use `copy.editSubmit`. */
|
|
38
62
|
editSubmitLabel?: string;
|
|
63
|
+
/** @deprecated Use `copy.namePlaceholder`. */
|
|
39
64
|
formNamePlaceholder?: string;
|
|
65
|
+
/** @deprecated Use `copy.setColor`. */
|
|
40
66
|
setColorLabel?: string;
|
|
67
|
+
/** @deprecated Use `copy.back`. */
|
|
41
68
|
backLabel?: string;
|
|
69
|
+
/** @deprecated Use `copy.errorMissingName`. */
|
|
42
70
|
errorMissingName?: string;
|
|
71
|
+
/** @deprecated Use `copy.errorTooLongName`. */
|
|
43
72
|
errorTooLongName?: string;
|
|
44
73
|
}
|
|
74
|
+
/** Deprecated prop name → the `copy` key it feeds (see `resolveLegacyPickerProps`). */
|
|
75
|
+
export declare const DS_SAVED_BUTTON_LEGACY_COPY: {
|
|
76
|
+
readonly searchPlaceholder: "searchPlaceholder";
|
|
77
|
+
readonly emptyLabel: "empty";
|
|
78
|
+
readonly createLabel: "create";
|
|
79
|
+
readonly actionsLabel: "actions";
|
|
80
|
+
readonly editLabel: "edit";
|
|
81
|
+
readonly deleteLabel: "delete";
|
|
82
|
+
readonly createFormTitle: "createFormTitle";
|
|
83
|
+
readonly editFormTitle: "editFormTitle";
|
|
84
|
+
readonly createSubmitLabel: "createSubmit";
|
|
85
|
+
readonly editSubmitLabel: "editSubmit";
|
|
86
|
+
readonly formNamePlaceholder: "namePlaceholder";
|
|
87
|
+
readonly setColorLabel: "setColor";
|
|
88
|
+
readonly backLabel: "back";
|
|
89
|
+
readonly errorMissingName: "errorMissingName";
|
|
90
|
+
readonly errorTooLongName: "errorTooLongName";
|
|
91
|
+
};
|
|
92
|
+
/** Slot scope of `footer`. */
|
|
93
|
+
export interface DsSavedButtonFooterSlotProps {
|
|
94
|
+
/** What the user typed in the search. */
|
|
95
|
+
query: string;
|
|
96
|
+
/** Open the in-panel form; the name defaults to the trimmed search text. Needs `colors`. */
|
|
97
|
+
openCreateForm: (name?: string) => void;
|
|
98
|
+
}
|
|
45
99
|
/** Payload of `create-option`. */
|
|
46
100
|
export interface DsSavedButtonCreatePayload {
|
|
47
101
|
name: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
2
|
+
import { type DsTooltipPlacement } from '../../ui/DsTooltip';
|
|
3
|
+
import { isValidCreateMode, isValidRowActionsMode, type DsPickerAlign, type DsPickerCreateMode, type DsPickerOption, type DsPickerRowActionsMode, type DsPickerSize } from '../../constants/pickers';
|
|
4
|
+
import { type DsSavedButtonCopy } from './DsSavedButton.types';
|
|
5
|
+
declare function openCreateForm(name?: string): void;
|
|
4
6
|
declare var __VLS_55: {
|
|
5
7
|
query: string;
|
|
8
|
+
openCreateForm: typeof openCreateForm;
|
|
6
9
|
};
|
|
7
10
|
type __VLS_Slots = {} & {
|
|
8
11
|
footer?: (props: typeof __VLS_55) => any;
|
|
@@ -16,6 +19,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
16
19
|
type: StringConstructor;
|
|
17
20
|
default: string;
|
|
18
21
|
};
|
|
22
|
+
tooltipPlacement: {
|
|
23
|
+
type: PropType<DsTooltipPlacement>;
|
|
24
|
+
default: "bottom";
|
|
25
|
+
};
|
|
19
26
|
folder: {
|
|
20
27
|
type: PropType<DsPickerOption | null>;
|
|
21
28
|
default: null;
|
|
@@ -24,18 +31,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
24
31
|
type: PropType<DsPickerOption[]>;
|
|
25
32
|
required: true;
|
|
26
33
|
};
|
|
27
|
-
searchPlaceholder: {
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
emptyLabel: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
default: string;
|
|
34
|
-
};
|
|
35
|
-
createLabel: {
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
34
|
icon: {
|
|
40
35
|
type: StringConstructor;
|
|
41
36
|
default: string;
|
|
@@ -56,14 +51,24 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
56
51
|
type: BooleanConstructor;
|
|
57
52
|
default: boolean;
|
|
58
53
|
};
|
|
54
|
+
teleported: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
create: {
|
|
59
|
+
type: PropType<DsPickerCreateMode>;
|
|
60
|
+
default: undefined;
|
|
61
|
+
validator: typeof isValidCreateMode;
|
|
62
|
+
};
|
|
63
|
+
rowActions: {
|
|
64
|
+
type: PropType<DsPickerRowActionsMode | boolean>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
validator: typeof isValidRowActionsMode;
|
|
67
|
+
};
|
|
59
68
|
colors: {
|
|
60
69
|
type: PropType<string[]>;
|
|
61
70
|
default: () => never[];
|
|
62
71
|
};
|
|
63
|
-
rowActions: {
|
|
64
|
-
type: BooleanConstructor;
|
|
65
|
-
default: boolean;
|
|
66
|
-
};
|
|
67
72
|
formLoading: {
|
|
68
73
|
type: BooleanConstructor;
|
|
69
74
|
default: boolean;
|
|
@@ -72,45 +77,61 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
72
77
|
type: StringConstructor;
|
|
73
78
|
default: string;
|
|
74
79
|
};
|
|
80
|
+
copy: {
|
|
81
|
+
type: PropType<Partial<DsSavedButtonCopy>>;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
searchPlaceholder: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: undefined;
|
|
87
|
+
};
|
|
88
|
+
emptyLabel: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: undefined;
|
|
91
|
+
};
|
|
92
|
+
createLabel: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
75
96
|
actionsLabel: {
|
|
76
97
|
type: StringConstructor;
|
|
77
|
-
default:
|
|
98
|
+
default: undefined;
|
|
78
99
|
};
|
|
79
100
|
editLabel: {
|
|
80
101
|
type: StringConstructor;
|
|
81
|
-
default:
|
|
102
|
+
default: undefined;
|
|
82
103
|
};
|
|
83
104
|
deleteLabel: {
|
|
84
105
|
type: StringConstructor;
|
|
85
|
-
default:
|
|
106
|
+
default: undefined;
|
|
86
107
|
};
|
|
87
108
|
createFormTitle: {
|
|
88
109
|
type: StringConstructor;
|
|
89
|
-
default:
|
|
110
|
+
default: undefined;
|
|
90
111
|
};
|
|
91
112
|
editFormTitle: {
|
|
92
113
|
type: StringConstructor;
|
|
93
|
-
default:
|
|
114
|
+
default: undefined;
|
|
94
115
|
};
|
|
95
116
|
createSubmitLabel: {
|
|
96
117
|
type: StringConstructor;
|
|
97
|
-
default:
|
|
118
|
+
default: undefined;
|
|
98
119
|
};
|
|
99
120
|
editSubmitLabel: {
|
|
100
121
|
type: StringConstructor;
|
|
101
|
-
default:
|
|
122
|
+
default: undefined;
|
|
102
123
|
};
|
|
103
124
|
formNamePlaceholder: {
|
|
104
125
|
type: StringConstructor;
|
|
105
|
-
default:
|
|
126
|
+
default: undefined;
|
|
106
127
|
};
|
|
107
128
|
setColorLabel: {
|
|
108
129
|
type: StringConstructor;
|
|
109
|
-
default:
|
|
130
|
+
default: undefined;
|
|
110
131
|
};
|
|
111
132
|
backLabel: {
|
|
112
133
|
type: StringConstructor;
|
|
113
|
-
default:
|
|
134
|
+
default: undefined;
|
|
114
135
|
};
|
|
115
136
|
errorMissingName: {
|
|
116
137
|
type: StringConstructor;
|
|
@@ -121,7 +142,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
121
142
|
default: undefined;
|
|
122
143
|
};
|
|
123
144
|
}>, {
|
|
124
|
-
closeForm:
|
|
145
|
+
closeForm: () => void;
|
|
125
146
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
126
147
|
search: (...args: any[]) => void;
|
|
127
148
|
edit: (...args: any[]) => void;
|
|
@@ -131,6 +152,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
131
152
|
delete: (...args: any[]) => void;
|
|
132
153
|
"create-option": (...args: any[]) => void;
|
|
133
154
|
"update-option": (...args: any[]) => void;
|
|
155
|
+
"form-close": (...args: any[]) => void;
|
|
134
156
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
135
157
|
label: {
|
|
136
158
|
type: StringConstructor;
|
|
@@ -140,6 +162,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
140
162
|
type: StringConstructor;
|
|
141
163
|
default: string;
|
|
142
164
|
};
|
|
165
|
+
tooltipPlacement: {
|
|
166
|
+
type: PropType<DsTooltipPlacement>;
|
|
167
|
+
default: "bottom";
|
|
168
|
+
};
|
|
143
169
|
folder: {
|
|
144
170
|
type: PropType<DsPickerOption | null>;
|
|
145
171
|
default: null;
|
|
@@ -148,18 +174,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
148
174
|
type: PropType<DsPickerOption[]>;
|
|
149
175
|
required: true;
|
|
150
176
|
};
|
|
151
|
-
searchPlaceholder: {
|
|
152
|
-
type: StringConstructor;
|
|
153
|
-
default: string;
|
|
154
|
-
};
|
|
155
|
-
emptyLabel: {
|
|
156
|
-
type: StringConstructor;
|
|
157
|
-
default: string;
|
|
158
|
-
};
|
|
159
|
-
createLabel: {
|
|
160
|
-
type: StringConstructor;
|
|
161
|
-
default: string;
|
|
162
|
-
};
|
|
163
177
|
icon: {
|
|
164
178
|
type: StringConstructor;
|
|
165
179
|
default: string;
|
|
@@ -180,14 +194,24 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
180
194
|
type: BooleanConstructor;
|
|
181
195
|
default: boolean;
|
|
182
196
|
};
|
|
197
|
+
teleported: {
|
|
198
|
+
type: BooleanConstructor;
|
|
199
|
+
default: boolean;
|
|
200
|
+
};
|
|
201
|
+
create: {
|
|
202
|
+
type: PropType<DsPickerCreateMode>;
|
|
203
|
+
default: undefined;
|
|
204
|
+
validator: typeof isValidCreateMode;
|
|
205
|
+
};
|
|
206
|
+
rowActions: {
|
|
207
|
+
type: PropType<DsPickerRowActionsMode | boolean>;
|
|
208
|
+
default: undefined;
|
|
209
|
+
validator: typeof isValidRowActionsMode;
|
|
210
|
+
};
|
|
183
211
|
colors: {
|
|
184
212
|
type: PropType<string[]>;
|
|
185
213
|
default: () => never[];
|
|
186
214
|
};
|
|
187
|
-
rowActions: {
|
|
188
|
-
type: BooleanConstructor;
|
|
189
|
-
default: boolean;
|
|
190
|
-
};
|
|
191
215
|
formLoading: {
|
|
192
216
|
type: BooleanConstructor;
|
|
193
217
|
default: boolean;
|
|
@@ -196,45 +220,61 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
196
220
|
type: StringConstructor;
|
|
197
221
|
default: string;
|
|
198
222
|
};
|
|
223
|
+
copy: {
|
|
224
|
+
type: PropType<Partial<DsSavedButtonCopy>>;
|
|
225
|
+
default: undefined;
|
|
226
|
+
};
|
|
227
|
+
searchPlaceholder: {
|
|
228
|
+
type: StringConstructor;
|
|
229
|
+
default: undefined;
|
|
230
|
+
};
|
|
231
|
+
emptyLabel: {
|
|
232
|
+
type: StringConstructor;
|
|
233
|
+
default: undefined;
|
|
234
|
+
};
|
|
235
|
+
createLabel: {
|
|
236
|
+
type: StringConstructor;
|
|
237
|
+
default: undefined;
|
|
238
|
+
};
|
|
199
239
|
actionsLabel: {
|
|
200
240
|
type: StringConstructor;
|
|
201
|
-
default:
|
|
241
|
+
default: undefined;
|
|
202
242
|
};
|
|
203
243
|
editLabel: {
|
|
204
244
|
type: StringConstructor;
|
|
205
|
-
default:
|
|
245
|
+
default: undefined;
|
|
206
246
|
};
|
|
207
247
|
deleteLabel: {
|
|
208
248
|
type: StringConstructor;
|
|
209
|
-
default:
|
|
249
|
+
default: undefined;
|
|
210
250
|
};
|
|
211
251
|
createFormTitle: {
|
|
212
252
|
type: StringConstructor;
|
|
213
|
-
default:
|
|
253
|
+
default: undefined;
|
|
214
254
|
};
|
|
215
255
|
editFormTitle: {
|
|
216
256
|
type: StringConstructor;
|
|
217
|
-
default:
|
|
257
|
+
default: undefined;
|
|
218
258
|
};
|
|
219
259
|
createSubmitLabel: {
|
|
220
260
|
type: StringConstructor;
|
|
221
|
-
default:
|
|
261
|
+
default: undefined;
|
|
222
262
|
};
|
|
223
263
|
editSubmitLabel: {
|
|
224
264
|
type: StringConstructor;
|
|
225
|
-
default:
|
|
265
|
+
default: undefined;
|
|
226
266
|
};
|
|
227
267
|
formNamePlaceholder: {
|
|
228
268
|
type: StringConstructor;
|
|
229
|
-
default:
|
|
269
|
+
default: undefined;
|
|
230
270
|
};
|
|
231
271
|
setColorLabel: {
|
|
232
272
|
type: StringConstructor;
|
|
233
|
-
default:
|
|
273
|
+
default: undefined;
|
|
234
274
|
};
|
|
235
275
|
backLabel: {
|
|
236
276
|
type: StringConstructor;
|
|
237
|
-
default:
|
|
277
|
+
default: undefined;
|
|
238
278
|
};
|
|
239
279
|
errorMissingName: {
|
|
240
280
|
type: StringConstructor;
|
|
@@ -253,30 +293,35 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
253
293
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
254
294
|
"onCreate-option"?: ((...args: any[]) => any) | undefined;
|
|
255
295
|
"onUpdate-option"?: ((...args: any[]) => any) | undefined;
|
|
296
|
+
"onForm-close"?: ((...args: any[]) => any) | undefined;
|
|
256
297
|
}>, {
|
|
257
298
|
size: DsPickerSize;
|
|
299
|
+
copy: Partial<DsSavedButtonCopy>;
|
|
300
|
+
create: DsPickerCreateMode;
|
|
258
301
|
disabled: boolean;
|
|
259
302
|
pill: boolean;
|
|
260
303
|
icon: string;
|
|
261
304
|
tooltip: string;
|
|
305
|
+
teleported: boolean;
|
|
262
306
|
editLabel: string;
|
|
263
307
|
emptyLabel: string;
|
|
264
308
|
searchPlaceholder: string;
|
|
265
309
|
colors: string[];
|
|
310
|
+
createLabel: string;
|
|
266
311
|
setColorLabel: string;
|
|
267
312
|
backLabel: string;
|
|
268
313
|
errorMissingName: string;
|
|
269
314
|
errorTooLongName: string;
|
|
270
315
|
actionsLabel: string;
|
|
271
316
|
deleteLabel: string;
|
|
317
|
+
createFormTitle: string;
|
|
318
|
+
editFormTitle: string;
|
|
319
|
+
tooltipPlacement: DsTooltipPlacement;
|
|
272
320
|
folder: DsPickerOption | null;
|
|
273
|
-
createLabel: string;
|
|
274
321
|
align: DsPickerAlign;
|
|
275
|
-
rowActions: boolean;
|
|
322
|
+
rowActions: boolean | DsPickerRowActionsMode;
|
|
276
323
|
formLoading: boolean;
|
|
277
324
|
formError: string;
|
|
278
|
-
createFormTitle: string;
|
|
279
|
-
editFormTitle: string;
|
|
280
325
|
createSubmitLabel: string;
|
|
281
326
|
editSubmitLabel: string;
|
|
282
327
|
formNamePlaceholder: string;
|
|
@@ -1,49 +1,102 @@
|
|
|
1
|
-
import type { DsPickerAlign, DsPickerOption, DsPickerSize } from '../../constants/pickers';
|
|
1
|
+
import type { DsPickerAlign, DsPickerCreateMode, DsPickerOption, DsPickerOrganizerCopy, DsPickerRowActionsMode, DsPickerSize } from '../../constants/pickers';
|
|
2
|
+
/** Every string of the trigger, the panel, the ⋮ menu and the form. Pass a partial: it overrides only its keys. */
|
|
3
|
+
export interface DsTagPickerCopy extends DsPickerOrganizerCopy {
|
|
4
|
+
/** Prefix once tags exist ("Tagged as"); the first tag's name follows it. */
|
|
5
|
+
taggedAs: string;
|
|
6
|
+
/** The footer confirm. */
|
|
7
|
+
apply: string;
|
|
8
|
+
searchPlaceholder: string;
|
|
9
|
+
/** Shown when nothing matches and there is nothing to create. Empty = nothing. */
|
|
10
|
+
empty: string;
|
|
11
|
+
/** Accessible name for the `+N` chip ("2 more tags"). */
|
|
12
|
+
more: string;
|
|
13
|
+
/** Prefix of the inline create row («Create “{query}”»). */
|
|
14
|
+
createRow: string;
|
|
15
|
+
/** The footer «+ New» button, only with `create: 'form'`. */
|
|
16
|
+
newButton: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const DS_TAG_PICKER_COPY: DsTagPickerCopy;
|
|
2
19
|
export interface DsTagPickerProps {
|
|
3
20
|
/** Trigger label while no tag is applied ("Tag"). App copy. */
|
|
4
21
|
label: string;
|
|
5
|
-
/** Prefix once tags exist ("Tagged as"); the first tag's name follows it. */
|
|
6
|
-
taggedAsLabel: string;
|
|
7
22
|
/** The tags currently applied to the contact. */
|
|
8
23
|
tags?: DsPickerOption[];
|
|
9
24
|
/** Every tag the user can pick from. */
|
|
10
25
|
options: DsPickerOption[];
|
|
11
|
-
/** The footer confirm ("Apply"). */
|
|
12
|
-
applyLabel: string;
|
|
13
|
-
searchPlaceholder?: string;
|
|
14
|
-
/** Shown when nothing matches and there is nothing to create. */
|
|
15
|
-
emptyLabel?: string;
|
|
16
|
-
/** Prefix of the create row («Create “{query}”») and, with `colors`, the text of the footer «+ New» button. Empty = no create affordance. */
|
|
17
|
-
createLabel?: string;
|
|
18
|
-
/** Accessible name for the `+N` chip ("2 more tags"). */
|
|
19
|
-
moreLabel?: string;
|
|
20
26
|
size?: DsPickerSize;
|
|
21
27
|
/** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's row / profile trigger. */
|
|
22
28
|
pill?: boolean;
|
|
23
29
|
align?: DsPickerAlign;
|
|
24
30
|
disabled?: boolean;
|
|
25
|
-
/**
|
|
31
|
+
/** What the create affordance does: nothing (default), emit `create`, or open the in-panel form and show «+ New» (needs `colors`). */
|
|
32
|
+
create?: DsPickerCreateMode;
|
|
33
|
+
/** The ⋮ menu on each row: absent (default), `edit` / `delete` events, or Edit also opens the form (needs `colors`). Accepts the deprecated boolean. */
|
|
34
|
+
rowActions?: DsPickerRowActionsMode | boolean;
|
|
35
|
+
/** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */
|
|
26
36
|
colors?: string[];
|
|
27
|
-
/** Show the ⋮ menu (Edit / Delete) on every option row. */
|
|
28
|
-
rowActions?: boolean;
|
|
29
37
|
/** The app is saving the form: its submit button shows the spinner and is blocked. */
|
|
30
38
|
formLoading?: boolean;
|
|
31
39
|
/** A failed save, shown under the name field. */
|
|
32
40
|
formError?: string;
|
|
33
|
-
|
|
41
|
+
copy?: Partial<DsTagPickerCopy>;
|
|
42
|
+
/** @deprecated Use `copy.taggedAs`. */
|
|
43
|
+
taggedAsLabel?: string;
|
|
44
|
+
/** @deprecated Use `copy.apply`. */
|
|
45
|
+
applyLabel?: string;
|
|
46
|
+
/** @deprecated Use `copy.searchPlaceholder`. */
|
|
47
|
+
searchPlaceholder?: string;
|
|
48
|
+
/** @deprecated Use `copy.empty`. */
|
|
49
|
+
emptyLabel?: string;
|
|
50
|
+
/** @deprecated Use `create`, `copy.createRow` and `copy.newButton`. */
|
|
51
|
+
createLabel?: string;
|
|
52
|
+
/** @deprecated Use `copy.more`. */
|
|
53
|
+
moreLabel?: string;
|
|
54
|
+
/** @deprecated Use `copy.actions`. */
|
|
34
55
|
actionsLabel?: string;
|
|
56
|
+
/** @deprecated Use `copy.edit`. */
|
|
35
57
|
editLabel?: string;
|
|
58
|
+
/** @deprecated Use `copy.delete`. */
|
|
36
59
|
deleteLabel?: string;
|
|
60
|
+
/** @deprecated Use `copy.createFormTitle`. */
|
|
37
61
|
createFormTitle?: string;
|
|
62
|
+
/** @deprecated Use `copy.editFormTitle`. */
|
|
38
63
|
editFormTitle?: string;
|
|
64
|
+
/** @deprecated Use `copy.createSubmit`. */
|
|
39
65
|
createSubmitLabel?: string;
|
|
66
|
+
/** @deprecated Use `copy.editSubmit`. */
|
|
40
67
|
editSubmitLabel?: string;
|
|
68
|
+
/** @deprecated Use `copy.namePlaceholder`. */
|
|
41
69
|
formNamePlaceholder?: string;
|
|
70
|
+
/** @deprecated Use `copy.setColor`. */
|
|
42
71
|
setColorLabel?: string;
|
|
72
|
+
/** @deprecated Use `copy.back`. */
|
|
43
73
|
backLabel?: string;
|
|
74
|
+
/** @deprecated Use `copy.errorMissingName`. */
|
|
44
75
|
errorMissingName?: string;
|
|
76
|
+
/** @deprecated Use `copy.errorTooLongName`. */
|
|
45
77
|
errorTooLongName?: string;
|
|
46
78
|
}
|
|
79
|
+
/** Deprecated prop name → the `copy` key(s) it feeds (see `resolveLegacyPickerProps`). */
|
|
80
|
+
export declare const DS_TAG_PICKER_LEGACY_COPY: {
|
|
81
|
+
readonly taggedAsLabel: "taggedAs";
|
|
82
|
+
readonly applyLabel: "apply";
|
|
83
|
+
readonly searchPlaceholder: "searchPlaceholder";
|
|
84
|
+
readonly emptyLabel: "empty";
|
|
85
|
+
readonly createLabel: readonly ["createRow", "newButton"];
|
|
86
|
+
readonly moreLabel: "more";
|
|
87
|
+
readonly actionsLabel: "actions";
|
|
88
|
+
readonly editLabel: "edit";
|
|
89
|
+
readonly deleteLabel: "delete";
|
|
90
|
+
readonly createFormTitle: "createFormTitle";
|
|
91
|
+
readonly editFormTitle: "editFormTitle";
|
|
92
|
+
readonly createSubmitLabel: "createSubmit";
|
|
93
|
+
readonly editSubmitLabel: "editSubmit";
|
|
94
|
+
readonly formNamePlaceholder: "namePlaceholder";
|
|
95
|
+
readonly setColorLabel: "setColor";
|
|
96
|
+
readonly backLabel: "back";
|
|
97
|
+
readonly errorMissingName: "errorMissingName";
|
|
98
|
+
readonly errorTooLongName: "errorTooLongName";
|
|
99
|
+
};
|
|
47
100
|
/** Payload of `create-option`. */
|
|
48
101
|
export interface DsTagPickerCreatePayload {
|
|
49
102
|
name: string;
|