@proveanything/smartlinks-utils-ui 0.12.2 → 0.12.5

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.
@@ -455,6 +455,14 @@ interface RecordsAdminI18n {
455
455
  duplicateAction: string;
456
456
  /** Toast shown after a successful Duplicate. `{name}` = source label. */
457
457
  duplicateToast: string;
458
+ /** Duplicate-to picker labels. */
459
+ duplicateDialogTitle: string;
460
+ duplicateTargetGlobal: string;
461
+ duplicateTargetSameRule: string;
462
+ duplicateTargetExistingRules: string;
463
+ duplicateTargetNewRule: string;
464
+ duplicateConfirm: string;
465
+ duplicateCancel: string;
458
466
  /**
459
467
  * Row-menu label for the "Copy and start new rule" action — shown on
460
468
  * the rules tab in singleton mode. One-click flow: copies the row to
@@ -1689,6 +1697,14 @@ interface Props$c<T> {
1689
1697
  onCopyAndNewRule?: () => void;
1690
1698
  /** Label for the "Copy and start new rule" button. */
1691
1699
  copyAndNewRuleLabel?: string;
1700
+ /**
1701
+ * Collection-cardinality affordance — clone the current editor value
1702
+ * into a fresh draft item under the same scope. Mirrors the row menu
1703
+ * Duplicate action.
1704
+ */
1705
+ onDuplicate?: () => void;
1706
+ /** Optional label override for the Duplicate button. */
1707
+ duplicateLabel?: string;
1692
1708
  };
1693
1709
  /** Host-provided labels for save / discard / delete (resting state only). */
1694
1710
  actionLabels?: Partial<Record<RecordsAdminActionKey, string>>;
@@ -2885,9 +2901,22 @@ interface Props$1<T> {
2885
2901
  hasNextPage?: boolean;
2886
2902
  isFetchingNextPage?: boolean;
2887
2903
  onLoadMore?: () => void;
2888
- i18n: Pick<RecordsAdminI18n, 'backToScopes' | 'siblingsHeading' | 'noItemsTitle' | 'noItemsBody' | 'backToList' | 'newItem'>;
2904
+ /**
2905
+ * Per-row clipboard actions (Copy / Duplicate / Copy and start new
2906
+ * rule). Mirrors the menu surfaced by `ItemListView` so the open-item
2907
+ * sibling rail offers the same affordances without bouncing back to
2908
+ * the list. Hidden when omitted.
2909
+ */
2910
+ rowClipboard?: (record: RecordSummary<T>) => {
2911
+ onCopy?: () => void;
2912
+ onDuplicate?: () => void;
2913
+ onCopyAndNewRule?: () => void;
2914
+ } | null | undefined;
2915
+ /** Host-defined extra row actions, surfaced below the built-ins. */
2916
+ rowActions?: (record: RecordSummary<T>) => RecordAction[] | null | undefined;
2917
+ i18n: Pick<RecordsAdminI18n, 'backToScopes' | 'siblingsHeading' | 'noItemsTitle' | 'noItemsBody' | 'backToList' | 'newItem' | 'copy' | 'duplicateAction' | 'copyAndNewRuleAction'>;
2889
2918
  }
2890
- declare function SiblingRail<T>({ items, selectedItemId, isLoading, error, onBack, onSelect, contextKind, contextSummary, onCreate, itemNoun, dirtyKeys, errorKeys, i18n, total, hasNextPage, isFetchingNextPage, onLoadMore, }: Props$1<T>): react_jsx_runtime.JSX.Element;
2919
+ declare function SiblingRail<T>({ items, selectedItemId, isLoading, error, onBack, onSelect, contextKind, contextSummary, onCreate, itemNoun, dirtyKeys, errorKeys, i18n, total, hasNextPage, isFetchingNextPage, onLoadMore, rowClipboard, rowActions, }: Props$1<T>): react_jsx_runtime.JSX.Element;
2891
2920
 
2892
2921
  interface ClipboardEntry<T = unknown> {
2893
2922
  value: T;
@@ -2974,7 +3003,7 @@ interface Props {
2974
3003
  /** Optional veto hook — return false / throw to abort the change. */
2975
3004
  beforeChange?: (ctx: LifecycleChangeCtx) => boolean | Promise<boolean>;
2976
3005
  /** Fires after a successful flip with the new value. */
2977
- onChanged?: (next: string) => void;
3006
+ onChanged?: (next: string, record?: AppRecord) => void;
2978
3007
  /** Telemetry hook — receives `{ from, to }`. */
2979
3008
  onTelemetry?: (event: {
2980
3009
  from: string | undefined;