@proveanything/smartlinks-utils-ui 1.13.11 → 1.13.13
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/ErrorBoundary-J9iKgF_H.d.ts +40 -0
- package/dist/{chunk-7RWLFKHC.js → chunk-I3T36FSI.js} +28 -12
- package/dist/chunk-I3T36FSI.js.map +1 -0
- package/dist/{chunk-A4YZYKWT.js → chunk-JNCRSL2H.js} +6 -6
- package/dist/chunk-JNCRSL2H.js.map +1 -0
- package/dist/{chunk-3RRHM4LP.js → chunk-XASZS7EA.js} +131 -4
- package/dist/chunk-XASZS7EA.js.map +1 -0
- package/dist/components/AssetPicker/index.js +1 -1
- package/dist/components/ConditionsEditor/index.js +1 -1
- package/dist/components/RecordsAdmin/index.d.ts +1 -0
- package/dist/components/RecordsAdmin/index.js +13 -9
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3RRHM4LP.js.map +0 -1
- package/dist/chunk-7RWLFKHC.js.map +0 -1
- package/dist/chunk-A4YZYKWT.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parsedRefToTarget, parsedRefToScope, matchRecords, scopesEqual, getRecordById, listRecords, upsertRecord, updateRecord, createRecord, removeRecord } from '../../chunk-KA4MKRHL.js';
|
|
2
2
|
export { bulkDelete, bulkUpsert, createRecord, getRecordById, listRecords, matchRecords, parsedRefToScope, parsedRefToTarget, removeRecord, restoreRecord, scopesEqual, upsertRecord } from '../../chunk-KA4MKRHL.js';
|
|
3
|
-
import { useIntroState, AdminPageHeader } from '../../chunk-
|
|
3
|
+
import { useIntroState, ErrorBoundary, AdminPageHeader } from '../../chunk-XASZS7EA.js';
|
|
4
|
+
export { ErrorBoundary } from '../../chunk-XASZS7EA.js';
|
|
4
5
|
import { FacetRuleEditor } from '../../chunk-WVCNIX7N.js';
|
|
5
6
|
import { useFacets } from '../../chunk-DH5HG5DW.js';
|
|
6
7
|
import { assertComponentStylesLoaded } from '../../chunk-OLYC54YT.js';
|
|
@@ -4401,6 +4402,7 @@ var DefaultRecordRow = ({ record, ctx, compact = false }) => {
|
|
|
4401
4402
|
}
|
|
4402
4403
|
);
|
|
4403
4404
|
};
|
|
4405
|
+
var RowGuard = ({ recordId, children }) => /* @__PURE__ */ jsx(ErrorBoundary, { label: "row", resetKeys: [recordId], children });
|
|
4404
4406
|
var RecordList = ({
|
|
4405
4407
|
items,
|
|
4406
4408
|
selectedId,
|
|
@@ -4500,7 +4502,7 @@ var RecordList = ({
|
|
|
4500
4502
|
const historyCount = history?.length ?? 0;
|
|
4501
4503
|
const ctxWithHistory = historyCount > 0 && sKey ? { ...ctx, historyCount, historyExpanded: expanded, onToggleHistory: () => toggleSlot(sKey) } : ctx;
|
|
4502
4504
|
return /* @__PURE__ */ jsxs("li", { children: [
|
|
4503
|
-
renderListRow ? renderListRow(item, ctxWithHistory) : /* @__PURE__ */ jsx(DefaultRecordRow, { record: item, ctx: ctxWithHistory, compact }),
|
|
4505
|
+
renderListRow ? /* @__PURE__ */ jsx(RowGuard, { recordId: item.id ?? key, children: renderListRow(item, ctxWithHistory) }) : /* @__PURE__ */ jsx(DefaultRecordRow, { record: item, ctx: ctxWithHistory, compact }),
|
|
4504
4506
|
history && history.length > 0 ? /* @__PURE__ */ jsx("div", { className: "ra-history-block", children: expanded ? /* @__PURE__ */ jsx("ul", { className: "ra-history-rows", "aria-label": "Archived records", children: history.map((h, hIdx) => {
|
|
4505
4507
|
const hCtx = buildCtx(h, groupFacetKeys);
|
|
4506
4508
|
const hKey = h.id ?? `hist:${idx}:${hIdx}`;
|
|
@@ -4511,7 +4513,7 @@ var RecordList = ({
|
|
|
4511
4513
|
{ label: h.lifecycleStatus ?? "archived", tone: "warning" }
|
|
4512
4514
|
]
|
|
4513
4515
|
};
|
|
4514
|
-
return /* @__PURE__ */ jsx("li", { className: "ra-history-row", "data-history": "true", children: renderListRow ? renderListRow(badged, hCtx) : /* @__PURE__ */ jsx(DefaultRecordRow, { record: badged, ctx: hCtx, compact }) }, hKey);
|
|
4516
|
+
return /* @__PURE__ */ jsx("li", { className: "ra-history-row", "data-history": "true", children: renderListRow ? /* @__PURE__ */ jsx(RowGuard, { recordId: hKey, children: renderListRow(badged, hCtx) }) : /* @__PURE__ */ jsx(DefaultRecordRow, { record: badged, ctx: hCtx, compact }) }, hKey);
|
|
4515
4517
|
}) }) : null }) : null
|
|
4516
4518
|
] }, key);
|
|
4517
4519
|
}) });
|
|
@@ -7111,7 +7113,7 @@ function DefaultItemCards({
|
|
|
7111
7113
|
onClick: open,
|
|
7112
7114
|
className: "ra-item-card-wrap",
|
|
7113
7115
|
"data-selected": slotCtx.selected,
|
|
7114
|
-
children: renderCard(item, slotCtx)
|
|
7116
|
+
children: /* @__PURE__ */ jsx(ErrorBoundary, { label: "card", resetKeys: [id], children: renderCard(item, slotCtx) })
|
|
7115
7117
|
},
|
|
7116
7118
|
key
|
|
7117
7119
|
);
|
|
@@ -7303,7 +7305,9 @@ function ItemListView({
|
|
|
7303
7305
|
});
|
|
7304
7306
|
};
|
|
7305
7307
|
const renderBody = (rows) => {
|
|
7306
|
-
if (renderItemList)
|
|
7308
|
+
if (renderItemList) {
|
|
7309
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, { label: "list", resetKeys: [rows.length, guardedCtx.selectedId], children: renderItemList(rows, guardedCtx) });
|
|
7310
|
+
}
|
|
7307
7311
|
if (view === "table") {
|
|
7308
7312
|
return /* @__PURE__ */ jsx(
|
|
7309
7313
|
DefaultItemTable,
|
|
@@ -7425,7 +7429,7 @@ function ItemListView({
|
|
|
7425
7429
|
} else if (error) {
|
|
7426
7430
|
body = /* @__PURE__ */ jsx(ErrorState, { error });
|
|
7427
7431
|
} else if (items.length === 0) {
|
|
7428
|
-
body = renderItemEmpty ? renderItemEmpty(ctx) : /* @__PURE__ */ jsx(
|
|
7432
|
+
body = renderItemEmpty ? /* @__PURE__ */ jsx(ErrorBoundary, { label: "empty state", children: renderItemEmpty(ctx) }) : /* @__PURE__ */ jsx(
|
|
7429
7433
|
EmptyState,
|
|
7430
7434
|
{
|
|
7431
7435
|
title: i18n.noItemsTitle,
|
|
@@ -9212,7 +9216,7 @@ var EditorPoolBody = ({
|
|
|
9212
9216
|
}) => {
|
|
9213
9217
|
const ctx = useEditorSlotContext(editorId);
|
|
9214
9218
|
if (!ctx) return null;
|
|
9215
|
-
return /* @__PURE__ */ jsx(CallbackRenderer, { render: renderEditor, args: ctx });
|
|
9219
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, { label: "editor", resetKeys: [editorId], children: /* @__PURE__ */ jsx(CallbackRenderer, { render: renderEditor, args: ctx }) });
|
|
9216
9220
|
};
|
|
9217
9221
|
var CallbackRenderer = ({
|
|
9218
9222
|
render,
|
|
@@ -10441,13 +10445,13 @@ function RecordsAdminShellInner(props) {
|
|
|
10441
10445
|
renderEditor
|
|
10442
10446
|
}
|
|
10443
10447
|
),
|
|
10444
|
-
fallback: /* @__PURE__ */ jsx(
|
|
10448
|
+
fallback: /* @__PURE__ */ jsx(ErrorBoundary, { label: "editor", resetKeys: [editorCtx?.recordId], children: /* @__PURE__ */ jsx(
|
|
10445
10449
|
CallbackRenderer,
|
|
10446
10450
|
{
|
|
10447
10451
|
render: renderEditor,
|
|
10448
10452
|
args: editorCtx
|
|
10449
10453
|
}
|
|
10450
|
-
)
|
|
10454
|
+
) })
|
|
10451
10455
|
}
|
|
10452
10456
|
)
|
|
10453
10457
|
}
|