@salesql/sql_components_vue3 3.14.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.
@@ -1,9 +1,11 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type DsTooltipPlacement } from '../../ui/DsTooltip';
3
- import { type DsPickerAlign, type DsPickerOption, type DsPickerSize } from '../../constants/pickers';
4
- declare function closeForm(): void;
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;
5
6
  declare var __VLS_55: {
6
7
  query: string;
8
+ openCreateForm: typeof openCreateForm;
7
9
  };
8
10
  type __VLS_Slots = {} & {
9
11
  footer?: (props: typeof __VLS_55) => any;
@@ -29,18 +31,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
29
31
  type: PropType<DsPickerOption[]>;
30
32
  required: true;
31
33
  };
32
- searchPlaceholder: {
33
- type: StringConstructor;
34
- default: string;
35
- };
36
- emptyLabel: {
37
- type: StringConstructor;
38
- default: string;
39
- };
40
- createLabel: {
41
- type: StringConstructor;
42
- default: string;
43
- };
44
34
  icon: {
45
35
  type: StringConstructor;
46
36
  default: string;
@@ -65,14 +55,20 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
65
55
  type: BooleanConstructor;
66
56
  default: boolean;
67
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
+ };
68
68
  colors: {
69
69
  type: PropType<string[]>;
70
70
  default: () => never[];
71
71
  };
72
- rowActions: {
73
- type: BooleanConstructor;
74
- default: boolean;
75
- };
76
72
  formLoading: {
77
73
  type: BooleanConstructor;
78
74
  default: boolean;
@@ -81,45 +77,61 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
81
77
  type: StringConstructor;
82
78
  default: string;
83
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
+ };
84
96
  actionsLabel: {
85
97
  type: StringConstructor;
86
- default: string;
98
+ default: undefined;
87
99
  };
88
100
  editLabel: {
89
101
  type: StringConstructor;
90
- default: string;
102
+ default: undefined;
91
103
  };
92
104
  deleteLabel: {
93
105
  type: StringConstructor;
94
- default: string;
106
+ default: undefined;
95
107
  };
96
108
  createFormTitle: {
97
109
  type: StringConstructor;
98
- default: string;
110
+ default: undefined;
99
111
  };
100
112
  editFormTitle: {
101
113
  type: StringConstructor;
102
- default: string;
114
+ default: undefined;
103
115
  };
104
116
  createSubmitLabel: {
105
117
  type: StringConstructor;
106
- default: string;
118
+ default: undefined;
107
119
  };
108
120
  editSubmitLabel: {
109
121
  type: StringConstructor;
110
- default: string;
122
+ default: undefined;
111
123
  };
112
124
  formNamePlaceholder: {
113
125
  type: StringConstructor;
114
- default: string;
126
+ default: undefined;
115
127
  };
116
128
  setColorLabel: {
117
129
  type: StringConstructor;
118
- default: string;
130
+ default: undefined;
119
131
  };
120
132
  backLabel: {
121
133
  type: StringConstructor;
122
- default: string;
134
+ default: undefined;
123
135
  };
124
136
  errorMissingName: {
125
137
  type: StringConstructor;
@@ -130,7 +142,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
130
142
  default: undefined;
131
143
  };
132
144
  }>, {
133
- closeForm: typeof closeForm;
145
+ closeForm: () => void;
134
146
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
135
147
  search: (...args: any[]) => void;
136
148
  edit: (...args: any[]) => void;
@@ -140,6 +152,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
140
152
  delete: (...args: any[]) => void;
141
153
  "create-option": (...args: any[]) => void;
142
154
  "update-option": (...args: any[]) => void;
155
+ "form-close": (...args: any[]) => void;
143
156
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
144
157
  label: {
145
158
  type: StringConstructor;
@@ -161,18 +174,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
161
174
  type: PropType<DsPickerOption[]>;
162
175
  required: true;
163
176
  };
164
- searchPlaceholder: {
165
- type: StringConstructor;
166
- default: string;
167
- };
168
- emptyLabel: {
169
- type: StringConstructor;
170
- default: string;
171
- };
172
- createLabel: {
173
- type: StringConstructor;
174
- default: string;
175
- };
176
177
  icon: {
177
178
  type: StringConstructor;
178
179
  default: string;
@@ -197,14 +198,20 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
197
198
  type: BooleanConstructor;
198
199
  default: boolean;
199
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
+ };
200
211
  colors: {
201
212
  type: PropType<string[]>;
202
213
  default: () => never[];
203
214
  };
204
- rowActions: {
205
- type: BooleanConstructor;
206
- default: boolean;
207
- };
208
215
  formLoading: {
209
216
  type: BooleanConstructor;
210
217
  default: boolean;
@@ -213,45 +220,61 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
213
220
  type: StringConstructor;
214
221
  default: string;
215
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
+ };
216
239
  actionsLabel: {
217
240
  type: StringConstructor;
218
- default: string;
241
+ default: undefined;
219
242
  };
220
243
  editLabel: {
221
244
  type: StringConstructor;
222
- default: string;
245
+ default: undefined;
223
246
  };
224
247
  deleteLabel: {
225
248
  type: StringConstructor;
226
- default: string;
249
+ default: undefined;
227
250
  };
228
251
  createFormTitle: {
229
252
  type: StringConstructor;
230
- default: string;
253
+ default: undefined;
231
254
  };
232
255
  editFormTitle: {
233
256
  type: StringConstructor;
234
- default: string;
257
+ default: undefined;
235
258
  };
236
259
  createSubmitLabel: {
237
260
  type: StringConstructor;
238
- default: string;
261
+ default: undefined;
239
262
  };
240
263
  editSubmitLabel: {
241
264
  type: StringConstructor;
242
- default: string;
265
+ default: undefined;
243
266
  };
244
267
  formNamePlaceholder: {
245
268
  type: StringConstructor;
246
- default: string;
269
+ default: undefined;
247
270
  };
248
271
  setColorLabel: {
249
272
  type: StringConstructor;
250
- default: string;
273
+ default: undefined;
251
274
  };
252
275
  backLabel: {
253
276
  type: StringConstructor;
254
- default: string;
277
+ default: undefined;
255
278
  };
256
279
  errorMissingName: {
257
280
  type: StringConstructor;
@@ -270,8 +293,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
270
293
  onDelete?: ((...args: any[]) => any) | undefined;
271
294
  "onCreate-option"?: ((...args: any[]) => any) | undefined;
272
295
  "onUpdate-option"?: ((...args: any[]) => any) | undefined;
296
+ "onForm-close"?: ((...args: any[]) => any) | undefined;
273
297
  }>, {
274
298
  size: DsPickerSize;
299
+ copy: Partial<DsSavedButtonCopy>;
300
+ create: DsPickerCreateMode;
275
301
  disabled: boolean;
276
302
  pill: boolean;
277
303
  icon: string;
@@ -281,21 +307,21 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
281
307
  emptyLabel: string;
282
308
  searchPlaceholder: string;
283
309
  colors: string[];
310
+ createLabel: string;
284
311
  setColorLabel: string;
285
312
  backLabel: string;
286
313
  errorMissingName: string;
287
314
  errorTooLongName: string;
288
315
  actionsLabel: string;
289
316
  deleteLabel: string;
317
+ createFormTitle: string;
318
+ editFormTitle: string;
290
319
  tooltipPlacement: DsTooltipPlacement;
291
320
  folder: DsPickerOption | null;
292
- createLabel: string;
293
321
  align: DsPickerAlign;
294
- rowActions: boolean;
322
+ rowActions: boolean | DsPickerRowActionsMode;
295
323
  formLoading: boolean;
296
324
  formError: string;
297
- createFormTitle: string;
298
- editFormTitle: string;
299
325
  createSubmitLabel: string;
300
326
  editSubmitLabel: string;
301
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
- /** Swatches (hex) for the create / edit form. Non-empty turns the in-panel form flow on. */
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
- /** Accessible name of each row's ⋮ button. */
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;