@salesql/sql_components_vue3 3.26.0 → 3.27.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.
@@ -6,6 +6,8 @@ export interface PickerOrganizerOptions {
6
6
  colors: () => readonly string[];
7
7
  rowActions: () => DsPickerRowActionsMode;
8
8
  formError: () => string;
9
+ /** The colour a new option (or one without colour) starts at; empty / unset = the first of `colors`. */
10
+ defaultColor?: () => string;
9
11
  emit: (event: PickerOrganizerEvent, payload?: unknown) => void;
10
12
  focusSearch: () => void;
11
13
  }
@@ -16,10 +18,18 @@ export declare function usePickerOrganizer(options: PickerOrganizerOptions): {
16
18
  id: string | number;
17
19
  name: string;
18
20
  color?: string | undefined;
21
+ deleteDisabled?: {
22
+ hint: string;
23
+ tooltip?: string | undefined;
24
+ } | undefined;
19
25
  } | null, DsPickerOption | {
20
26
  id: string | number;
21
27
  name: string;
22
28
  color?: string | undefined;
29
+ deleteDisabled?: {
30
+ hint: string;
31
+ tooltip?: string | undefined;
32
+ } | undefined;
23
33
  } | null>;
24
34
  formName: import("vue").Ref<string, string>;
25
35
  formColor: import("vue").Ref<string, string>;
@@ -76,6 +76,8 @@ export declare const UPDATE_COLOR: "update:color";
76
76
  export type UpdateColorEventName = typeof UPDATE_COLOR;
77
77
  export declare const FORM_CLOSE: "form-close";
78
78
  export type FormCloseEventName = typeof FORM_CLOSE;
79
+ export declare const ROW_ACTIONS_OPEN: "row-actions-open";
80
+ export type RowActionsOpenEventName = typeof ROW_ACTIONS_OPEN;
79
81
  export declare const CANCEL: "cancel";
80
82
  export type CancelEventName = typeof CANCEL;
81
83
  export declare const SAVE: "save";
@@ -1,9 +1,18 @@
1
1
  import { type DsPopoverPlacement } from '../ui/DsPopover';
2
+ /** Why a row's Delete is blocked: the app sets it on the option, the ⋮ menu shows it. */
3
+ export interface DsPickerDeleteDisabled {
4
+ /** Short text after the Delete label («Protected», «Not empty»). App copy. */
5
+ hint: string;
6
+ /** Longer reason, in a tooltip on the Delete item. */
7
+ tooltip?: string;
8
+ }
2
9
  /** One selectable thing: a folder, a tag, a campaign. `color` tints the row glyph / dot. */
3
10
  export interface DsPickerOption {
4
11
  id: string | number;
5
12
  name: string;
6
13
  color?: string;
14
+ /** Delete stays visible but blocked, with its reason. Unset = Delete works. */
15
+ deleteDisabled?: DsPickerDeleteDisabled;
7
16
  }
8
17
  /** Trigger height — `medium` for rows and the full profile, `large` for action / bulk bars. */
9
18
  export declare const DS_PICKER_SIZES: {