@proveanything/smartlinks-utils-ui 0.9.0 → 0.9.2
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/chunk-5UQQYXCX.js +3 -0
- package/dist/chunk-5UQQYXCX.js.map +1 -0
- package/dist/{chunk-UDYVH7QF.js → chunk-CBIKDA3S.js} +34 -3
- package/dist/chunk-CBIKDA3S.js.map +1 -0
- package/dist/components/AssetPicker/index.css +1505 -0
- package/dist/components/AssetPicker/index.css.map +1 -0
- package/dist/components/AssetPicker/index.js +2 -2
- package/dist/components/ConditionsEditor/index.css +1505 -0
- package/dist/components/ConditionsEditor/index.css.map +1 -0
- package/dist/components/ConditionsEditor/index.js +1 -1
- package/dist/components/FontPicker/index.css +1505 -0
- package/dist/components/FontPicker/index.css.map +1 -0
- package/dist/components/FontPicker/index.js +1 -1
- package/dist/components/IconPicker/index.css +1505 -0
- package/dist/components/IconPicker/index.css.map +1 -0
- package/dist/components/IconPicker/index.js +1 -1
- package/dist/components/RecordsAdmin/index.css +3646 -0
- package/dist/components/RecordsAdmin/index.css.map +1 -0
- package/dist/components/RecordsAdmin/index.d.ts +185 -10
- package/dist/components/RecordsAdmin/index.js +1093 -136
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.css +1505 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-NSQRNFT2.js +0 -28
- package/dist/chunk-NSQRNFT2.js.map +0 -1
- package/dist/chunk-UDYVH7QF.js.map +0 -1
|
@@ -19,8 +19,15 @@ import { InfiniteData } from '@tanstack/react-query';
|
|
|
19
19
|
* - `rule` — synthetic UI scope: records that target via a `facetRule`
|
|
20
20
|
* (AND-of-OR over facets) rather than being pinned to a
|
|
21
21
|
* specific node in the chain. Their refs start with `rule:`.
|
|
22
|
+
* - `all` — synthetic UI scope: opt-in flat-list view of every record
|
|
23
|
+
* in the collection (global + ruled + pinned). Skips the
|
|
24
|
+
* framework's scope-as-axis grouping entirely so hosts can
|
|
25
|
+
* drive the rail with their own `rail.groupBy` (e.g.
|
|
26
|
+
* open / upcoming / closed for time-bound records like
|
|
27
|
+
* votes or competitions). Off by default — add `'all'` to
|
|
28
|
+
* the host's `scopes` array to enable.
|
|
22
29
|
*/
|
|
23
|
-
type ScopeKind = 'collection' | 'product' | 'facet' | 'variant' | 'batch' | 'rule';
|
|
30
|
+
type ScopeKind = 'collection' | 'product' | 'facet' | 'variant' | 'batch' | 'rule' | 'all';
|
|
24
31
|
/** Parsed `ref` string — see `data/refs.ts`. Format: `kind:id` or chain. */
|
|
25
32
|
interface ParsedRef {
|
|
26
33
|
/** Most-specific scope this ref points at. */
|
|
@@ -407,6 +414,24 @@ interface RecordsAdminI18n {
|
|
|
407
414
|
subtitleEmpty: string;
|
|
408
415
|
subtitleConfigured: string;
|
|
409
416
|
subtitleInherited: string;
|
|
417
|
+
/**
|
|
418
|
+
* Hover tooltip on the "Rules" scope tab. The label itself stays short
|
|
419
|
+
* for navigation density; this longer string surfaces the audience /
|
|
420
|
+
* targeting vocabulary that explains the feature without needing docs.
|
|
421
|
+
* Apps can override per-domain (e.g. "Show this FAQ to a targeted
|
|
422
|
+
* audience").
|
|
423
|
+
*/
|
|
424
|
+
rulesTabTooltip: string;
|
|
425
|
+
/** Empty-state body shown inside the Rules tab when no rules exist yet. */
|
|
426
|
+
rulesEmptyBody: string;
|
|
427
|
+
/**
|
|
428
|
+
* Lifecycle-hook failure toasts. `{message}` is replaced with the
|
|
429
|
+
* thrown error's message (or a generic fallback when none is provided).
|
|
430
|
+
*/
|
|
431
|
+
hookBeforeSaveFailed: string;
|
|
432
|
+
hookAfterSaveFailed: string;
|
|
433
|
+
hookBeforeDeleteFailed: string;
|
|
434
|
+
hookAfterDeleteFailed: string;
|
|
410
435
|
}
|
|
411
436
|
declare const DEFAULT_I18N: RecordsAdminI18n;
|
|
412
437
|
|
|
@@ -538,6 +563,54 @@ declare function mergeIcons(override?: Partial<RecordsAdminIcons>): RecordsAdmin
|
|
|
538
563
|
* explicit `headerIcon` > `icons.header.byRecordType[type]` > `icons.header.default`. */
|
|
539
564
|
declare function pickHeaderIcon(icons: RecordsAdminIcons, recordType?: string): LucideIcon;
|
|
540
565
|
|
|
566
|
+
/** Common context fields passed to every lifecycle hook. */
|
|
567
|
+
interface RecordHookCtx {
|
|
568
|
+
collectionId: string;
|
|
569
|
+
appId: string;
|
|
570
|
+
recordType?: string;
|
|
571
|
+
/** Editing scope kind (`'global' | 'rule' | 'product' | …`). */
|
|
572
|
+
scope: ScopeKind;
|
|
573
|
+
/** Resolved scope ref string when available (e.g. `product:abc`). Most
|
|
574
|
+
* hosts ignore this; provided for parity with non-shell callers. */
|
|
575
|
+
targetRef?: string;
|
|
576
|
+
/** Always `true` from inside the shell; included for symmetry with
|
|
577
|
+
* future non-shell callers. */
|
|
578
|
+
admin: true;
|
|
579
|
+
}
|
|
580
|
+
interface SaveHookCtx<T = unknown> extends RecordHookCtx {
|
|
581
|
+
isCreate: boolean;
|
|
582
|
+
/** Record as it WILL be (in `beforeSave`) or HAS been (in `afterSave`)
|
|
583
|
+
* written. `id` is the resolved UUID when known, otherwise undefined. */
|
|
584
|
+
record: RecordSummary<T>;
|
|
585
|
+
/** Snapshot of the record's previous server state. Undefined on create. */
|
|
586
|
+
before?: RecordSummary<T>;
|
|
587
|
+
}
|
|
588
|
+
interface DeleteHookCtx<T = unknown> extends RecordHookCtx {
|
|
589
|
+
/** Snapshot of the record taken immediately before deletion. */
|
|
590
|
+
record: RecordSummary<T>;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Opt-in lifecycle hooks for `RecordsAdminShell`. All four are awaited.
|
|
594
|
+
*
|
|
595
|
+
* - `beforeSave` — return `false` (or throw) to cancel the write. Return
|
|
596
|
+
* a `Partial<T>` to merge into the record's `data` payload before it
|
|
597
|
+
* hits the server (e.g. inject computed `status`, normalised dates).
|
|
598
|
+
* - `afterSave` — runs after a successful write. Throwing surfaces a
|
|
599
|
+
* toast but does NOT roll back the server state.
|
|
600
|
+
* - `beforeDelete` — return `false` (or throw) to cancel the delete.
|
|
601
|
+
* - `afterDelete` — runs after a successful delete. Throwing surfaces a
|
|
602
|
+
* toast; the record is already gone.
|
|
603
|
+
*
|
|
604
|
+
* `data` is the only host-shaped portion of the payload — anchors and
|
|
605
|
+
* `facetRule` are owned by the shell, so `beforeSave` returns a partial
|
|
606
|
+
* of the typed `data` shape, not of the full SDK record input.
|
|
607
|
+
*/
|
|
608
|
+
interface RecordsAdminShellHooks<T = unknown> {
|
|
609
|
+
beforeSave?: (ctx: SaveHookCtx<T>) => Promise<Partial<T> | false | void> | Partial<T> | false | void;
|
|
610
|
+
afterSave?: (ctx: SaveHookCtx<T>) => Promise<void> | void;
|
|
611
|
+
beforeDelete?: (ctx: DeleteHookCtx<T>) => Promise<false | void> | false | void;
|
|
612
|
+
afterDelete?: (ctx: DeleteHookCtx<T>) => Promise<void> | void;
|
|
613
|
+
}
|
|
541
614
|
/**
|
|
542
615
|
* Footer / banner action keys whose label and icon can be customised by
|
|
543
616
|
* the host. `save`, `discard`, `delete` are wired today. `saveAll` /
|
|
@@ -697,6 +770,15 @@ interface RecordsAdminShellProps<TData = unknown> {
|
|
|
697
770
|
unsaved?: UnsavedConfig<TData>;
|
|
698
771
|
clipboard?: ClipboardConfig<TData>;
|
|
699
772
|
actions?: ActionsConfig;
|
|
773
|
+
/**
|
|
774
|
+
* Opt-in awaited callbacks fired around record save/delete. See
|
|
775
|
+
* {@link RecordsAdminShellHooks} for the contract.
|
|
776
|
+
*
|
|
777
|
+
* Today these fire on the single-record paths (editor footer Save/Delete
|
|
778
|
+
* and the right-pane item-list trash). Bulk paths (CSV import, paste,
|
|
779
|
+
* Save-all) do NOT fire hooks yet — tracked as a follow-up.
|
|
780
|
+
*/
|
|
781
|
+
hooks?: RecordsAdminShellHooks<TData>;
|
|
700
782
|
/**
|
|
701
783
|
* Mirror the shell's runtime state into URL params. Off by default. The
|
|
702
784
|
* shell only owns `item`, `scope`, `view` — host platform params are
|
|
@@ -931,10 +1013,17 @@ interface Props$g {
|
|
|
931
1013
|
loading?: boolean;
|
|
932
1014
|
/** Optional per-scope counts displayed as tiny badges. */
|
|
933
1015
|
counts?: Partial<Record<ScopeKind, number>>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Optional per-scope hover tooltip (rendered as native `title`). Used by
|
|
1018
|
+
* the shell to surface marketing-friendly explanations on tabs whose
|
|
1019
|
+
* one-word label benefits from a longer gloss — primarily "Rules"
|
|
1020
|
+
* ("Use rules to scope records to a targeted audience…").
|
|
1021
|
+
*/
|
|
1022
|
+
tooltips?: Partial<Record<ScopeKind, string>>;
|
|
934
1023
|
/** Override icons used per scope. Falls back to DEFAULT_ICONS.scope. */
|
|
935
1024
|
icons?: RecordsAdminIcons['scope'];
|
|
936
1025
|
}
|
|
937
|
-
declare const ScopeTabs: ({ scopes, active, onChange, loading, counts, icons, }: Props$g) => react_jsx_runtime.JSX.Element;
|
|
1026
|
+
declare const ScopeTabs: ({ scopes, active, onChange, loading, counts, tooltips, icons, }: Props$g) => react_jsx_runtime.JSX.Element;
|
|
938
1027
|
|
|
939
1028
|
interface Props$f {
|
|
940
1029
|
source?: RecordSource;
|
|
@@ -988,6 +1077,8 @@ interface Props$c {
|
|
|
988
1077
|
* Anchor-based highlight fallback for tabs whose rail rows are not backed
|
|
989
1078
|
* by AppRecords (Products, Facets). Compared against `RecordSummary.ref`
|
|
990
1079
|
* which for those tabs is a synthesised display-only anchor string.
|
|
1080
|
+
* NOTE: framework-owned. Built via `anchorKey(scope)` — does NOT come from
|
|
1081
|
+
* the host's `record.ref` field (which the framework deliberately ignores).
|
|
991
1082
|
*/
|
|
992
1083
|
selectedAnchorKey?: string;
|
|
993
1084
|
onSelect: (item: RecordSummary) => void;
|
|
@@ -1014,6 +1105,18 @@ interface Props$c {
|
|
|
1014
1105
|
label: string;
|
|
1015
1106
|
icon?: ReactNode;
|
|
1016
1107
|
} | null;
|
|
1108
|
+
/**
|
|
1109
|
+
* Optional per-group action slot rendered to the right of the group
|
|
1110
|
+
* header label/count. Used by the shell to surface a "Edit rule for all"
|
|
1111
|
+
* affordance on Rules-tab groups (each group is one shared rule). The
|
|
1112
|
+
* callback receives the group's key + the records in that group so the
|
|
1113
|
+
* caller can target them. Returning `null` hides the slot.
|
|
1114
|
+
*/
|
|
1115
|
+
renderGroupActions?: (group: {
|
|
1116
|
+
key: string;
|
|
1117
|
+
label: string;
|
|
1118
|
+
items: RecordSummary[];
|
|
1119
|
+
}) => ReactNode;
|
|
1017
1120
|
/**
|
|
1018
1121
|
* Optional clipboard wiring per row. When provided the shell's Copy /
|
|
1019
1122
|
* Paste affordance appears in each row's context menu. Returning `null`
|
|
@@ -1029,11 +1132,11 @@ interface Props$c {
|
|
|
1029
1132
|
/** Resolved i18n strings — used by default row/card renderers. */
|
|
1030
1133
|
i18n?: RecordsAdminI18n;
|
|
1031
1134
|
}
|
|
1032
|
-
declare const RecordList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1033
|
-
declare const ProductList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1034
|
-
declare const FacetList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1035
|
-
declare const VariantList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1036
|
-
declare const BatchList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1135
|
+
declare const RecordList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, renderGroupActions, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1136
|
+
declare const ProductList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, renderGroupActions, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1137
|
+
declare const FacetList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, renderGroupActions, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1138
|
+
declare const VariantList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, renderGroupActions, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1139
|
+
declare const BatchList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, dirtyKeys, errorKeys, presentation, renderListRow, groupBy, renderGroupActions, rowClipboard, i18n, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1037
1140
|
|
|
1038
1141
|
interface DefaultRecordRowProps {
|
|
1039
1142
|
record: RecordSummary;
|
|
@@ -1097,6 +1200,13 @@ interface Props$a<T> {
|
|
|
1097
1200
|
* leave it `undefined` and nothing renders.
|
|
1098
1201
|
*/
|
|
1099
1202
|
targeting?: ReactNode;
|
|
1203
|
+
/**
|
|
1204
|
+
* Optional small control rendered in the header's right cluster (next to
|
|
1205
|
+
* the bulk-actions menu). Used for the per-record `TargetingPopover` so
|
|
1206
|
+
* admins can flip between Global / a preset rule / a custom rule from
|
|
1207
|
+
* the editor header without scrolling to the Targeting section.
|
|
1208
|
+
*/
|
|
1209
|
+
targetingControl?: ReactNode;
|
|
1100
1210
|
bulkActions?: React.ComponentProps<typeof BulkActionsMenu>;
|
|
1101
1211
|
/** Extra slot rendered in the footer between the danger actions and Save. */
|
|
1102
1212
|
footerExtra?: ReactNode;
|
|
@@ -1135,7 +1245,7 @@ interface Props$a<T> {
|
|
|
1135
1245
|
/** Host-provided icons rendered before save / discard / delete labels. */
|
|
1136
1246
|
actionIcons?: Partial<Record<RecordsAdminActionKey, RecordsAdminActionIcon>>;
|
|
1137
1247
|
}
|
|
1138
|
-
declare function RecordEditor<T>({ ctx, i18n, children, preview, targeting, bulkActions, footerExtra, onBeforeDelete, headerLabel, headerSubtitle, headerMeta, clipboard, actionLabels, actionIcons, }: Props$a<T>): react_jsx_runtime.JSX.Element;
|
|
1248
|
+
declare function RecordEditor<T>({ ctx, i18n, children, preview, targeting, targetingControl, bulkActions, footerExtra, onBeforeDelete, headerLabel, headerSubtitle, headerMeta, clipboard, actionLabels, actionIcons, }: Props$a<T>): react_jsx_runtime.JSX.Element;
|
|
1139
1249
|
|
|
1140
1250
|
interface InheritanceCtx {
|
|
1141
1251
|
parentValue?: Record<string, unknown> | null;
|
|
@@ -1577,6 +1687,14 @@ interface UseCollectionItemsArgs {
|
|
|
1577
1687
|
* are skipped, since they belong on the Rules tab).
|
|
1578
1688
|
*/
|
|
1579
1689
|
facetRule?: FacetRule | null;
|
|
1690
|
+
/**
|
|
1691
|
+
* When true, return every item-cardinality record across the whole
|
|
1692
|
+
* collection — anchor-pinned, ruled, and global. Used by the 'all' top-
|
|
1693
|
+
* level scope which intentionally bypasses scope-as-axis grouping so
|
|
1694
|
+
* hosts can drive the rail with their own `groupBy` (e.g. lifecycle).
|
|
1695
|
+
* `scope` and `facetRule` are ignored when this is set.
|
|
1696
|
+
*/
|
|
1697
|
+
includeAll?: boolean;
|
|
1580
1698
|
/** Per-page size requested from the SDK (default 100). */
|
|
1581
1699
|
pageSize?: number;
|
|
1582
1700
|
/**
|
|
@@ -1734,6 +1852,32 @@ declare const useScopeProbe: ({ SL, collectionId, admin, enabled }: UseScopeProb
|
|
|
1734
1852
|
error: Error | null;
|
|
1735
1853
|
};
|
|
1736
1854
|
|
|
1855
|
+
interface UseScopeCountsArgs {
|
|
1856
|
+
ctx: RecordsCtx;
|
|
1857
|
+
/** Disable the query (e.g. before SL/collection is ready). */
|
|
1858
|
+
enabled?: boolean;
|
|
1859
|
+
/**
|
|
1860
|
+
* Hard cap on records scanned for counts. Above this we return a
|
|
1861
|
+
* lower-bound count and set `truncated: true`. Default 500.
|
|
1862
|
+
*/
|
|
1863
|
+
maxRecords?: number;
|
|
1864
|
+
/** Page size used for the underlying SDK list calls. Default 100. */
|
|
1865
|
+
pageSize?: number;
|
|
1866
|
+
}
|
|
1867
|
+
interface ScopeCounts extends Partial<Record<ScopeKind, number>> {
|
|
1868
|
+
}
|
|
1869
|
+
interface UseScopeCountsResult {
|
|
1870
|
+
counts: ScopeCounts;
|
|
1871
|
+
total: number;
|
|
1872
|
+
isLoading: boolean;
|
|
1873
|
+
error: Error | null;
|
|
1874
|
+
/** True when we hit `maxRecords` and stopped paginating. */
|
|
1875
|
+
truncated: boolean;
|
|
1876
|
+
}
|
|
1877
|
+
declare const useScopeCounts: (args: UseScopeCountsArgs) => UseScopeCountsResult;
|
|
1878
|
+
/** React Query key factory for cache invalidation from save/delete sites. */
|
|
1879
|
+
declare const scopeCountsQueryKey: (collectionId: string, appId: string, recordType?: string) => (string | null)[];
|
|
1880
|
+
|
|
1737
1881
|
declare const useIntroDismissed: (SL: SmartLinksSDK, collectionId: string, appId: string, recordType?: string) => {
|
|
1738
1882
|
dismissed: boolean;
|
|
1739
1883
|
dismiss: () => Promise<void>;
|
|
@@ -2055,6 +2199,12 @@ interface Props$5<T> {
|
|
|
2055
2199
|
error: Error | null;
|
|
2056
2200
|
ctx: ItemViewContext;
|
|
2057
2201
|
itemNoun: string;
|
|
2202
|
+
/**
|
|
2203
|
+
* Optional one-line rule summary shown beneath the toolbar — used in
|
|
2204
|
+
* collection-mode when an item list is scoped to a specific rule, so the
|
|
2205
|
+
* admin sees which rule's items they're viewing without leaving the pane.
|
|
2206
|
+
*/
|
|
2207
|
+
ruleSummary?: string | null;
|
|
2058
2208
|
view: ItemView;
|
|
2059
2209
|
views: ItemView[];
|
|
2060
2210
|
onViewChange: (view: ItemView) => void;
|
|
@@ -2066,7 +2216,7 @@ interface Props$5<T> {
|
|
|
2066
2216
|
cardSize?: 'sm' | 'md' | 'lg';
|
|
2067
2217
|
i18n: RecordsAdminI18n;
|
|
2068
2218
|
}
|
|
2069
|
-
declare function ItemListView<T>({ items, isLoading, error, ctx, itemNoun, view, views, onViewChange, renderItemList, renderItemCard, renderItemEmpty, itemColumns, cardSize, i18n, }: Props$5<T>): react_jsx_runtime.JSX.Element;
|
|
2219
|
+
declare function ItemListView<T>({ items, isLoading, error, ctx, itemNoun, ruleSummary, view, views, onViewChange, renderItemList, renderItemCard, renderItemEmpty, itemColumns, cardSize, i18n, }: Props$5<T>): react_jsx_runtime.JSX.Element;
|
|
2070
2220
|
|
|
2071
2221
|
interface Props$4 {
|
|
2072
2222
|
options: ItemView[];
|
|
@@ -2234,6 +2384,31 @@ interface ResolveArgs {
|
|
|
2234
2384
|
}
|
|
2235
2385
|
declare const resolveRecord: <T>(args: ResolveArgs) => Promise<ResolvedRecord<T>>;
|
|
2236
2386
|
|
|
2387
|
+
interface NormalisedRule {
|
|
2388
|
+
all: Array<{
|
|
2389
|
+
facetKey: string;
|
|
2390
|
+
anyOf: string[];
|
|
2391
|
+
}>;
|
|
2392
|
+
}
|
|
2393
|
+
/**
|
|
2394
|
+
* Canonicalise a FacetRule so semantically identical rules produce identical
|
|
2395
|
+
* strings. Returns `null` for empty/missing rules so callers can distinguish
|
|
2396
|
+
* "no rule" from "the rule that matches everything".
|
|
2397
|
+
*/
|
|
2398
|
+
declare const normaliseRule: (rule: FacetRule | null | undefined) => NormalisedRule | null;
|
|
2399
|
+
/**
|
|
2400
|
+
* Stable content-addressed hash of a FacetRule. `null`/empty rules return
|
|
2401
|
+
* `null` so the caller can route them to a separate "no rule" bucket.
|
|
2402
|
+
*/
|
|
2403
|
+
declare const ruleHash: (rule: FacetRule | null | undefined) => string | null;
|
|
2404
|
+
/**
|
|
2405
|
+
* Human-readable single-line summary of a rule, used for group headers.
|
|
2406
|
+
* Compact ("country=DE,FR · tier=premium") so it fits a rail-width header.
|
|
2407
|
+
*/
|
|
2408
|
+
declare const summariseRule: (rule: FacetRule | null | undefined) => string;
|
|
2409
|
+
/** Comparator: are two rules semantically identical? */
|
|
2410
|
+
declare const rulesEqual: (a: FacetRule | null | undefined, b: FacetRule | null | undefined) => boolean;
|
|
2411
|
+
|
|
2237
2412
|
interface ImportReport {
|
|
2238
2413
|
total: number;
|
|
2239
2414
|
saved: number;
|
|
@@ -2249,4 +2424,4 @@ declare const exportCsv: <T>(records: RecordSummary<T>[], schema: CsvSchema<T>)
|
|
|
2249
2424
|
declare const importCsv: <T>(file: File, schema: CsvSchema<T>, ctx: RecordsCtx) => Promise<ImportReport>;
|
|
2250
2425
|
declare const downloadBlob: (blob: Blob, filename: string) => void;
|
|
2251
2426
|
|
|
2252
|
-
export { ALL_ITEM_VIEWS, ALL_PRESENTATIONS, BatchList, BulkActionsMenu, type ClipboardEntry, type CollectedRecord, type CollectedSort, type CollectionRailMode, type CsvSchema, type CsvSchemaColumn, DEFAULT_DEEP_LINK_PARAM_NAMES, DEFAULT_I18N, DEFAULT_ICONS, type DeepLinkAdapter, type DeepLinkChangeKind, type DeepLinkHistoryMode, type DeepLinkOptions, type DeepLinkParamNames, type DeepLinkState, DefaultItemCards, DefaultItemTable, DefaultRecordCard, DefaultRecordRow, DeleteButton, type DirtyDraft, DirtyDraftProvider, type DirtyDraftStatus, type DirtyDraftStore, type DirtyStrategy, DrawerPreview, type EditorContext, EditorItemNav, EmptyState, ErrorState, FacetList, InheritanceMarker, InheritanceProvider, InlinePreview, IntroCard, type ItemColumn, ItemListView, type ItemSlotContext, type ItemView, type ItemViewContext, ItemViewSwitcher, LoadingState, type MergeStrategy, type MergedRecord, type NavConfirmI18n, type ParsedRef, type PasteCompatibility, type PasteCompatibilityResult, PresentationSwitcher, type PreviewMode, PreviewScopePicker, PreviewToggleButton, type ProductBrowseItem, type ProductChildItem, ProductDrillDown, ProductList, type RecordBadge, RecordBrowser, type RecordCardinality, RecordEditor, RecordList, type RecordPresentation, type RecordSlotContext, type RecordSource, type RecordStatus, type RecordSummary, type RecordsAdminI18n, type RecordsAdminIcons, RecordsAdminShell, type RecordsAdminShellProps, type ResolvedDeepLinkParamNames, ResolvedPreview, type ResolvedRecord, ScopeBreadcrumb, type ScopeKind, ScopeTabs, SiblingRail, SidePreview, type SmartLinksSDK, StatusDot, StatusFilterPills, StatusIcon, type StatusTone, TabbedPreview, type TelemetryEvent, type UseCollectionItemsArgs, type UseRecordClipboardArgs, type UseRecordClipboardReturn, type UseResolveAllRecordsArgs, type UseResolveAllResult, type UseRulePreviewArgs, type UseRulePreviewResult, UtilityRow, VariantList, buildDraftKey, buildRef, bulkDelete, bulkUpsert, checkPasteCompatibility, cloneValue, createDefaultDeepLinkAdapter, createPostMessageDeepLinkAdapter, createRecord, downloadBlob, exportCsv, getRecordById, importCsv, isInSmartLinksIframe, listRecords, matchRecords, mergeIcons, parseRef, parsedRefToScope, parsedRefToTarget, pickHeaderIcon, removeRecord, resolutionChain, resolveRecord, restoreRecord, scopesEqual, statusToneLabel, upsertRecord, useCollectedRecords, useCollectionItems, useDeepLinkState, useDirtyDraft, useDirtyDraftActions, useDirtyDraftStore, useDirtyDrafts, useDirtyNavigation, useFacetBrowse, useIntroDismissed, useItemViewPref, useMergedRecord, usePresentationPref, useProductBrowse, useProductChildren, useRecordClipboard, useRecordEditor, useRecordList, useResolveAllRecords, useResolvedRecord, useRulePreview, useScopeProbe, useUnsavedGuard };
|
|
2427
|
+
export { ALL_ITEM_VIEWS, ALL_PRESENTATIONS, BatchList, BulkActionsMenu, type ClipboardEntry, type CollectedRecord, type CollectedSort, type CollectionRailMode, type CsvSchema, type CsvSchemaColumn, DEFAULT_DEEP_LINK_PARAM_NAMES, DEFAULT_I18N, DEFAULT_ICONS, type DeepLinkAdapter, type DeepLinkChangeKind, type DeepLinkHistoryMode, type DeepLinkOptions, type DeepLinkParamNames, type DeepLinkState, DefaultItemCards, DefaultItemTable, DefaultRecordCard, DefaultRecordRow, DeleteButton, type DirtyDraft, DirtyDraftProvider, type DirtyDraftStatus, type DirtyDraftStore, type DirtyStrategy, DrawerPreview, type EditorContext, EditorItemNav, EmptyState, ErrorState, FacetList, InheritanceMarker, InheritanceProvider, InlinePreview, IntroCard, type ItemColumn, ItemListView, type ItemSlotContext, type ItemView, type ItemViewContext, ItemViewSwitcher, LoadingState, type MergeStrategy, type MergedRecord, type NavConfirmI18n, type NormalisedRule, type ParsedRef, type PasteCompatibility, type PasteCompatibilityResult, PresentationSwitcher, type PreviewMode, PreviewScopePicker, PreviewToggleButton, type ProductBrowseItem, type ProductChildItem, ProductDrillDown, ProductList, type RecordBadge, RecordBrowser, type RecordCardinality, RecordEditor, RecordList, type RecordPresentation, type RecordSlotContext, type RecordSource, type RecordStatus, type RecordSummary, type RecordsAdminI18n, type RecordsAdminIcons, RecordsAdminShell, type RecordsAdminShellProps, type ResolvedDeepLinkParamNames, ResolvedPreview, type ResolvedRecord, ScopeBreadcrumb, type ScopeCounts, type ScopeKind, ScopeTabs, SiblingRail, SidePreview, type SmartLinksSDK, StatusDot, StatusFilterPills, StatusIcon, type StatusTone, TabbedPreview, type TelemetryEvent, type UseCollectionItemsArgs, type UseRecordClipboardArgs, type UseRecordClipboardReturn, type UseResolveAllRecordsArgs, type UseResolveAllResult, type UseRulePreviewArgs, type UseRulePreviewResult, type UseScopeCountsArgs, type UseScopeCountsResult, UtilityRow, VariantList, buildDraftKey, buildRef, bulkDelete, bulkUpsert, checkPasteCompatibility, cloneValue, createDefaultDeepLinkAdapter, createPostMessageDeepLinkAdapter, createRecord, downloadBlob, exportCsv, getRecordById, importCsv, isInSmartLinksIframe, listRecords, matchRecords, mergeIcons, normaliseRule, parseRef, parsedRefToScope, parsedRefToTarget, pickHeaderIcon, removeRecord, resolutionChain, resolveRecord, restoreRecord, ruleHash, rulesEqual, scopeCountsQueryKey, scopesEqual, statusToneLabel, summariseRule, upsertRecord, useCollectedRecords, useCollectionItems, useDeepLinkState, useDirtyDraft, useDirtyDraftActions, useDirtyDraftStore, useDirtyDrafts, useDirtyNavigation, useFacetBrowse, useIntroDismissed, useItemViewPref, useMergedRecord, usePresentationPref, useProductBrowse, useProductChildren, useRecordClipboard, useRecordEditor, useRecordList, useResolveAllRecords, useResolvedRecord, useRulePreview, useScopeCounts, useScopeProbe, useUnsavedGuard };
|