@almadar/ui 6.28.0 → 6.29.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.
- package/dist/{EntityBindingContext-C6FgxdfG.d.cts → EntityBindingContext-UyeCfEBS.d.cts} +13 -0
- package/dist/{EntityBindingContext-C6FgxdfG.d.ts → EntityBindingContext-UyeCfEBS.d.ts} +13 -0
- package/dist/avl/index.cjs +69 -42
- package/dist/avl/index.js +69 -42
- package/dist/components/index.cjs +50 -40
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +50 -40
- package/dist/providers/index.cjs +51 -40
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +51 -40
- package/dist/runtime/index.cjs +69 -42
- package/dist/runtime/index.d.cts +16 -2
- package/dist/runtime/index.d.ts +16 -2
- package/dist/runtime/index.js +69 -42
- package/package.json +5 -5
|
@@ -7058,6 +7058,13 @@ var init_slot_types = __esm({
|
|
|
7058
7058
|
nextRefId = 1;
|
|
7059
7059
|
}
|
|
7060
7060
|
});
|
|
7061
|
+
var SlotContainedContext;
|
|
7062
|
+
var init_slotContained = __esm({
|
|
7063
|
+
"lib/slotContained.ts"() {
|
|
7064
|
+
"use client";
|
|
7065
|
+
SlotContainedContext = React79.createContext(false);
|
|
7066
|
+
}
|
|
7067
|
+
});
|
|
7061
7068
|
exports.ErrorState = void 0;
|
|
7062
7069
|
var init_ErrorState = __esm({
|
|
7063
7070
|
"components/core/molecules/ErrorState.tsx"() {
|
|
@@ -36972,7 +36979,6 @@ function TableView({
|
|
|
36972
36979
|
columns,
|
|
36973
36980
|
fields,
|
|
36974
36981
|
itemActions,
|
|
36975
|
-
maxInlineActions,
|
|
36976
36982
|
itemClickEvent = "",
|
|
36977
36983
|
selectable = false,
|
|
36978
36984
|
selectEvent,
|
|
@@ -37006,8 +37012,7 @@ function TableView({
|
|
|
37006
37012
|
const [localSelected, setLocalSelected] = React79__namespace.default.useState(/* @__PURE__ */ new Set());
|
|
37007
37013
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
37008
37014
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
37009
|
-
const
|
|
37010
|
-
const overflowActions = maxInlineActions != null ? actionDefs.slice(maxInlineActions) : actionDefs;
|
|
37015
|
+
const overflowActions = actionDefs;
|
|
37011
37016
|
const fireAction = (action, row) => eventBus.emit(`UI:${action.event}`, {
|
|
37012
37017
|
id: row.id,
|
|
37013
37018
|
row
|
|
@@ -37189,7 +37194,7 @@ function TableView({
|
|
|
37189
37194
|
}
|
|
37190
37195
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground", children: formatCell(raw, col.format, relationsData?.[col.field ?? col.key]) }) }, col.key);
|
|
37191
37196
|
}),
|
|
37192
|
-
hasActions && /* @__PURE__ */ jsxRuntime.
|
|
37197
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
37193
37198
|
exports.HStack,
|
|
37194
37199
|
{
|
|
37195
37200
|
gap: "xs",
|
|
@@ -37203,38 +37208,20 @@ function TableView({
|
|
|
37203
37208
|
"border-l border-[var(--color-border)]",
|
|
37204
37209
|
lk.striped && index % 2 === 1 ? "bg-[var(--color-surface-subtle)]" : "bg-[var(--color-card)] group-hover:bg-[var(--color-surface-subtle)]"
|
|
37205
37210
|
),
|
|
37206
|
-
children:
|
|
37207
|
-
|
|
37208
|
-
|
|
37209
|
-
|
|
37210
|
-
|
|
37211
|
-
|
|
37212
|
-
|
|
37213
|
-
|
|
37214
|
-
|
|
37215
|
-
|
|
37216
|
-
|
|
37217
|
-
|
|
37218
|
-
|
|
37219
|
-
|
|
37220
|
-
},
|
|
37221
|
-
action.event
|
|
37222
|
-
)),
|
|
37223
|
-
overflowActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
37224
|
-
exports.Menu,
|
|
37225
|
-
{
|
|
37226
|
-
position: "bottom-end",
|
|
37227
|
-
trigger: /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", "data-row-id": String(row.id), children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
37228
|
-
items: overflowActions.map((action) => ({
|
|
37229
|
-
label: action.label,
|
|
37230
|
-
icon: action.icon,
|
|
37231
|
-
event: action.event,
|
|
37232
|
-
variant: action.variant === "danger" ? "danger" : "default",
|
|
37233
|
-
onClick: () => fireAction(action, row)
|
|
37234
|
-
}))
|
|
37235
|
-
}
|
|
37236
|
-
)
|
|
37237
|
-
]
|
|
37211
|
+
children: overflowActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
37212
|
+
exports.Menu,
|
|
37213
|
+
{
|
|
37214
|
+
position: "bottom-end",
|
|
37215
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", "data-row-id": String(row.id), children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
37216
|
+
items: overflowActions.map((action) => ({
|
|
37217
|
+
label: action.label,
|
|
37218
|
+
icon: action.icon,
|
|
37219
|
+
event: action.event,
|
|
37220
|
+
variant: action.variant === "danger" ? "danger" : "default",
|
|
37221
|
+
onClick: () => fireAction(action, row)
|
|
37222
|
+
}))
|
|
37223
|
+
}
|
|
37224
|
+
)
|
|
37238
37225
|
}
|
|
37239
37226
|
)
|
|
37240
37227
|
]
|
|
@@ -46890,6 +46877,7 @@ var init_DetailPanel = __esm({
|
|
|
46890
46877
|
init_EmptyState();
|
|
46891
46878
|
init_cn();
|
|
46892
46879
|
init_portalRoot();
|
|
46880
|
+
init_slotContained();
|
|
46893
46881
|
init_format();
|
|
46894
46882
|
init_getNestedValue();
|
|
46895
46883
|
init_relationLabel();
|
|
@@ -46921,6 +46909,7 @@ var init_DetailPanel = __esm({
|
|
|
46921
46909
|
}) => {
|
|
46922
46910
|
const eventBus = useEventBus();
|
|
46923
46911
|
const { t } = hooks.useTranslate();
|
|
46912
|
+
const contained = React79.useContext(SlotContainedContext);
|
|
46924
46913
|
const [titleDraft, setTitleDraft] = React79__namespace.default.useState(null);
|
|
46925
46914
|
const isFieldDefArray = (arr) => {
|
|
46926
46915
|
if (!arr || arr.length === 0) return false;
|
|
@@ -47308,8 +47297,9 @@ var init_DetailPanel = __esm({
|
|
|
47308
47297
|
if (!slideOver) {
|
|
47309
47298
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className, children: content });
|
|
47310
47299
|
}
|
|
47311
|
-
const panel = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("fixed inset-y-0 right-0 w-full max-w-2xl bg-card shadow-lg z-50 overflow-y-auto p-6", className), children: content });
|
|
47312
|
-
|
|
47300
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn(contained ? "absolute" : "fixed", "inset-y-0 right-0 w-full max-w-2xl bg-card shadow-lg z-50 overflow-y-auto p-6", className), children: content });
|
|
47301
|
+
if (contained || typeof document === "undefined") return panel;
|
|
47302
|
+
return reactDom.createPortal(panel, getOrCreatePortalRoot());
|
|
47313
47303
|
};
|
|
47314
47304
|
exports.DetailPanel.displayName = "DetailPanel";
|
|
47315
47305
|
}
|
|
@@ -53787,6 +53777,7 @@ var init_component_registry_generated = __esm({
|
|
|
53787
53777
|
// components/core/organisms/UISlotRenderer.tsx
|
|
53788
53778
|
var UISlotRenderer_exports = {};
|
|
53789
53779
|
__export(UISlotRenderer_exports, {
|
|
53780
|
+
SlotContainedContext: () => SlotContainedContext,
|
|
53790
53781
|
SlotContentRenderer: () => SlotContentRenderer,
|
|
53791
53782
|
SuspenseConfigProvider: () => SuspenseConfigProvider,
|
|
53792
53783
|
UISlotComponent: () => UISlotComponent,
|
|
@@ -53959,6 +53950,25 @@ function renderContainedPortal(t, slot, content, onDismiss) {
|
|
|
53959
53950
|
}
|
|
53960
53951
|
);
|
|
53961
53952
|
case "drawer":
|
|
53953
|
+
if (content.pattern === "detail-panel" && content.props.slideOver === true) {
|
|
53954
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
53955
|
+
exports.Box,
|
|
53956
|
+
{
|
|
53957
|
+
id: slotId,
|
|
53958
|
+
className: "absolute inset-0 z-50 overflow-hidden",
|
|
53959
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
53960
|
+
onClick: onDismiss,
|
|
53961
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
53962
|
+
exports.Box,
|
|
53963
|
+
{
|
|
53964
|
+
className: "absolute inset-y-0 right-0 pointer-events-auto",
|
|
53965
|
+
onClick: (e) => e.stopPropagation(),
|
|
53966
|
+
children: slotContent
|
|
53967
|
+
}
|
|
53968
|
+
)
|
|
53969
|
+
}
|
|
53970
|
+
);
|
|
53971
|
+
}
|
|
53962
53972
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
53963
53973
|
exports.Box,
|
|
53964
53974
|
{
|
|
@@ -54810,7 +54820,7 @@ function UISlotRenderer({
|
|
|
54810
54820
|
}
|
|
54811
54821
|
return wrapped;
|
|
54812
54822
|
}
|
|
54813
|
-
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext,
|
|
54823
|
+
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SLOT_SKELETON_MAP, CONTENT_NODE_SLOTS, PATTERNS_WITH_CHILDREN, traitRefPresenceCache;
|
|
54814
54824
|
var init_UISlotRenderer = __esm({
|
|
54815
54825
|
"components/core/organisms/UISlotRenderer.tsx"() {
|
|
54816
54826
|
"use client";
|
|
@@ -54825,6 +54835,7 @@ var init_UISlotRenderer = __esm({
|
|
|
54825
54835
|
init_cn();
|
|
54826
54836
|
init_format();
|
|
54827
54837
|
init_portalRoot();
|
|
54838
|
+
init_slotContained();
|
|
54828
54839
|
init_ErrorBoundary();
|
|
54829
54840
|
init_Skeleton();
|
|
54830
54841
|
init_renderer();
|
|
@@ -54834,7 +54845,6 @@ var init_UISlotRenderer = __esm({
|
|
|
54834
54845
|
scopeWrapLog = logger.createLogger("almadar:ui:scope-wrap");
|
|
54835
54846
|
TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
|
|
54836
54847
|
SuspenseConfigContext = React79.createContext({ enabled: false });
|
|
54837
|
-
SlotContainedContext = React79.createContext(false);
|
|
54838
54848
|
SuspenseConfigProvider.displayName = "SuspenseConfigProvider";
|
|
54839
54849
|
SLOT_SKELETON_MAP = {
|
|
54840
54850
|
main: "table",
|
|
@@ -8306,7 +8306,7 @@ interface TableViewProps extends DataDndProps {
|
|
|
8306
8306
|
* column whose field is relation-typed. Same contract DetailPanel takes. */
|
|
8307
8307
|
relationsData?: Record<string, readonly RelationOption[]>;
|
|
8308
8308
|
}
|
|
8309
|
-
declare function TableView({ entity, columns, fields, itemActions,
|
|
8309
|
+
declare function TableView({ entity, columns, fields, itemActions, itemClickEvent, selectable, selectEvent, selectedIds, sortEvent, sortColumn, sortDirection, className, emptyMessage, isLoading, error, groupBy, pageSize, children, renderItem: _schemaRenderItem, look, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, relationsData, }: TableViewProps): React__default.JSX.Element;
|
|
8310
8310
|
declare namespace TableView {
|
|
8311
8311
|
var displayName: string;
|
|
8312
8312
|
}
|
|
@@ -8306,7 +8306,7 @@ interface TableViewProps extends DataDndProps {
|
|
|
8306
8306
|
* column whose field is relation-typed. Same contract DetailPanel takes. */
|
|
8307
8307
|
relationsData?: Record<string, readonly RelationOption[]>;
|
|
8308
8308
|
}
|
|
8309
|
-
declare function TableView({ entity, columns, fields, itemActions,
|
|
8309
|
+
declare function TableView({ entity, columns, fields, itemActions, itemClickEvent, selectable, selectEvent, selectedIds, sortEvent, sortColumn, sortDirection, className, emptyMessage, isLoading, error, groupBy, pageSize, children, renderItem: _schemaRenderItem, look, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, relationsData, }: TableViewProps): React__default.JSX.Element;
|
|
8310
8310
|
declare namespace TableView {
|
|
8311
8311
|
var displayName: string;
|
|
8312
8312
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -6983,6 +6983,13 @@ var init_slot_types = __esm({
|
|
|
6983
6983
|
nextRefId = 1;
|
|
6984
6984
|
}
|
|
6985
6985
|
});
|
|
6986
|
+
var SlotContainedContext;
|
|
6987
|
+
var init_slotContained = __esm({
|
|
6988
|
+
"lib/slotContained.ts"() {
|
|
6989
|
+
"use client";
|
|
6990
|
+
SlotContainedContext = createContext(false);
|
|
6991
|
+
}
|
|
6992
|
+
});
|
|
6986
6993
|
var ErrorState;
|
|
6987
6994
|
var init_ErrorState = __esm({
|
|
6988
6995
|
"components/core/molecules/ErrorState.tsx"() {
|
|
@@ -36897,7 +36904,6 @@ function TableView({
|
|
|
36897
36904
|
columns,
|
|
36898
36905
|
fields,
|
|
36899
36906
|
itemActions,
|
|
36900
|
-
maxInlineActions,
|
|
36901
36907
|
itemClickEvent = "",
|
|
36902
36908
|
selectable = false,
|
|
36903
36909
|
selectEvent,
|
|
@@ -36931,8 +36937,7 @@ function TableView({
|
|
|
36931
36937
|
const [localSelected, setLocalSelected] = React79__default.useState(/* @__PURE__ */ new Set());
|
|
36932
36938
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
36933
36939
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
36934
|
-
const
|
|
36935
|
-
const overflowActions = maxInlineActions != null ? actionDefs.slice(maxInlineActions) : actionDefs;
|
|
36940
|
+
const overflowActions = actionDefs;
|
|
36936
36941
|
const fireAction = (action, row) => eventBus.emit(`UI:${action.event}`, {
|
|
36937
36942
|
id: row.id,
|
|
36938
36943
|
row
|
|
@@ -37114,7 +37119,7 @@ function TableView({
|
|
|
37114
37119
|
}
|
|
37115
37120
|
return /* @__PURE__ */ jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsx("span", { className: "truncate text-foreground", children: formatCell(raw, col.format, relationsData?.[col.field ?? col.key]) }) }, col.key);
|
|
37116
37121
|
}),
|
|
37117
|
-
hasActions && /* @__PURE__ */
|
|
37122
|
+
hasActions && /* @__PURE__ */ jsx(
|
|
37118
37123
|
HStack,
|
|
37119
37124
|
{
|
|
37120
37125
|
gap: "xs",
|
|
@@ -37128,38 +37133,20 @@ function TableView({
|
|
|
37128
37133
|
"border-l border-[var(--color-border)]",
|
|
37129
37134
|
lk.striped && index % 2 === 1 ? "bg-[var(--color-surface-subtle)]" : "bg-[var(--color-card)] group-hover:bg-[var(--color-surface-subtle)]"
|
|
37130
37135
|
),
|
|
37131
|
-
children:
|
|
37132
|
-
|
|
37133
|
-
|
|
37134
|
-
|
|
37135
|
-
|
|
37136
|
-
|
|
37137
|
-
|
|
37138
|
-
|
|
37139
|
-
|
|
37140
|
-
|
|
37141
|
-
|
|
37142
|
-
|
|
37143
|
-
|
|
37144
|
-
|
|
37145
|
-
},
|
|
37146
|
-
action.event
|
|
37147
|
-
)),
|
|
37148
|
-
overflowActions.length > 0 && /* @__PURE__ */ jsx(
|
|
37149
|
-
Menu,
|
|
37150
|
-
{
|
|
37151
|
-
position: "bottom-end",
|
|
37152
|
-
trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", "data-row-id": String(row.id), children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
37153
|
-
items: overflowActions.map((action) => ({
|
|
37154
|
-
label: action.label,
|
|
37155
|
-
icon: action.icon,
|
|
37156
|
-
event: action.event,
|
|
37157
|
-
variant: action.variant === "danger" ? "danger" : "default",
|
|
37158
|
-
onClick: () => fireAction(action, row)
|
|
37159
|
-
}))
|
|
37160
|
-
}
|
|
37161
|
-
)
|
|
37162
|
-
]
|
|
37136
|
+
children: overflowActions.length > 0 && /* @__PURE__ */ jsx(
|
|
37137
|
+
Menu,
|
|
37138
|
+
{
|
|
37139
|
+
position: "bottom-end",
|
|
37140
|
+
trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", "data-row-id": String(row.id), children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
37141
|
+
items: overflowActions.map((action) => ({
|
|
37142
|
+
label: action.label,
|
|
37143
|
+
icon: action.icon,
|
|
37144
|
+
event: action.event,
|
|
37145
|
+
variant: action.variant === "danger" ? "danger" : "default",
|
|
37146
|
+
onClick: () => fireAction(action, row)
|
|
37147
|
+
}))
|
|
37148
|
+
}
|
|
37149
|
+
)
|
|
37163
37150
|
}
|
|
37164
37151
|
)
|
|
37165
37152
|
]
|
|
@@ -46815,6 +46802,7 @@ var init_DetailPanel = __esm({
|
|
|
46815
46802
|
init_EmptyState();
|
|
46816
46803
|
init_cn();
|
|
46817
46804
|
init_portalRoot();
|
|
46805
|
+
init_slotContained();
|
|
46818
46806
|
init_format();
|
|
46819
46807
|
init_getNestedValue();
|
|
46820
46808
|
init_relationLabel();
|
|
@@ -46846,6 +46834,7 @@ var init_DetailPanel = __esm({
|
|
|
46846
46834
|
}) => {
|
|
46847
46835
|
const eventBus = useEventBus();
|
|
46848
46836
|
const { t } = useTranslate();
|
|
46837
|
+
const contained = useContext(SlotContainedContext);
|
|
46849
46838
|
const [titleDraft, setTitleDraft] = React79__default.useState(null);
|
|
46850
46839
|
const isFieldDefArray = (arr) => {
|
|
46851
46840
|
if (!arr || arr.length === 0) return false;
|
|
@@ -47233,8 +47222,9 @@ var init_DetailPanel = __esm({
|
|
|
47233
47222
|
if (!slideOver) {
|
|
47234
47223
|
return /* @__PURE__ */ jsx(Box, { className, children: content });
|
|
47235
47224
|
}
|
|
47236
|
-
const panel = /* @__PURE__ */ jsx(Box, { className: cn("fixed inset-y-0 right-0 w-full max-w-2xl bg-card shadow-lg z-50 overflow-y-auto p-6", className), children: content });
|
|
47237
|
-
|
|
47225
|
+
const panel = /* @__PURE__ */ jsx(Box, { className: cn(contained ? "absolute" : "fixed", "inset-y-0 right-0 w-full max-w-2xl bg-card shadow-lg z-50 overflow-y-auto p-6", className), children: content });
|
|
47226
|
+
if (contained || typeof document === "undefined") return panel;
|
|
47227
|
+
return createPortal(panel, getOrCreatePortalRoot());
|
|
47238
47228
|
};
|
|
47239
47229
|
DetailPanel.displayName = "DetailPanel";
|
|
47240
47230
|
}
|
|
@@ -53712,6 +53702,7 @@ var init_component_registry_generated = __esm({
|
|
|
53712
53702
|
// components/core/organisms/UISlotRenderer.tsx
|
|
53713
53703
|
var UISlotRenderer_exports = {};
|
|
53714
53704
|
__export(UISlotRenderer_exports, {
|
|
53705
|
+
SlotContainedContext: () => SlotContainedContext,
|
|
53715
53706
|
SlotContentRenderer: () => SlotContentRenderer,
|
|
53716
53707
|
SuspenseConfigProvider: () => SuspenseConfigProvider,
|
|
53717
53708
|
UISlotComponent: () => UISlotComponent,
|
|
@@ -53884,6 +53875,25 @@ function renderContainedPortal(t, slot, content, onDismiss) {
|
|
|
53884
53875
|
}
|
|
53885
53876
|
);
|
|
53886
53877
|
case "drawer":
|
|
53878
|
+
if (content.pattern === "detail-panel" && content.props.slideOver === true) {
|
|
53879
|
+
return /* @__PURE__ */ jsx(
|
|
53880
|
+
Box,
|
|
53881
|
+
{
|
|
53882
|
+
id: slotId,
|
|
53883
|
+
className: "absolute inset-0 z-50 overflow-hidden",
|
|
53884
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
53885
|
+
onClick: onDismiss,
|
|
53886
|
+
children: /* @__PURE__ */ jsx(
|
|
53887
|
+
Box,
|
|
53888
|
+
{
|
|
53889
|
+
className: "absolute inset-y-0 right-0 pointer-events-auto",
|
|
53890
|
+
onClick: (e) => e.stopPropagation(),
|
|
53891
|
+
children: slotContent
|
|
53892
|
+
}
|
|
53893
|
+
)
|
|
53894
|
+
}
|
|
53895
|
+
);
|
|
53896
|
+
}
|
|
53887
53897
|
return /* @__PURE__ */ jsx(
|
|
53888
53898
|
Box,
|
|
53889
53899
|
{
|
|
@@ -54735,7 +54745,7 @@ function UISlotRenderer({
|
|
|
54735
54745
|
}
|
|
54736
54746
|
return wrapped;
|
|
54737
54747
|
}
|
|
54738
|
-
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext,
|
|
54748
|
+
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SLOT_SKELETON_MAP, CONTENT_NODE_SLOTS, PATTERNS_WITH_CHILDREN, traitRefPresenceCache;
|
|
54739
54749
|
var init_UISlotRenderer = __esm({
|
|
54740
54750
|
"components/core/organisms/UISlotRenderer.tsx"() {
|
|
54741
54751
|
"use client";
|
|
@@ -54750,6 +54760,7 @@ var init_UISlotRenderer = __esm({
|
|
|
54750
54760
|
init_cn();
|
|
54751
54761
|
init_format();
|
|
54752
54762
|
init_portalRoot();
|
|
54763
|
+
init_slotContained();
|
|
54753
54764
|
init_ErrorBoundary();
|
|
54754
54765
|
init_Skeleton();
|
|
54755
54766
|
init_renderer();
|
|
@@ -54759,7 +54770,6 @@ var init_UISlotRenderer = __esm({
|
|
|
54759
54770
|
scopeWrapLog = createLogger("almadar:ui:scope-wrap");
|
|
54760
54771
|
TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
|
|
54761
54772
|
SuspenseConfigContext = createContext({ enabled: false });
|
|
54762
|
-
SlotContainedContext = createContext(false);
|
|
54763
54773
|
SuspenseConfigProvider.displayName = "SuspenseConfigProvider";
|
|
54764
54774
|
SLOT_SKELETON_MAP = {
|
|
54765
54775
|
main: "table",
|
package/dist/providers/index.cjs
CHANGED
|
@@ -2337,6 +2337,13 @@ var init_slot_types = __esm({
|
|
|
2337
2337
|
nextRefId = 1;
|
|
2338
2338
|
}
|
|
2339
2339
|
});
|
|
2340
|
+
var SlotContainedContext;
|
|
2341
|
+
var init_slotContained = __esm({
|
|
2342
|
+
"lib/slotContained.ts"() {
|
|
2343
|
+
"use client";
|
|
2344
|
+
SlotContainedContext = React89.createContext(false);
|
|
2345
|
+
}
|
|
2346
|
+
});
|
|
2340
2347
|
function buildForkPaths(x, y, branches, scale) {
|
|
2341
2348
|
const inLength = 30 * scale;
|
|
2342
2349
|
const outLength = 30 * scale;
|
|
@@ -35919,7 +35926,6 @@ function TableView({
|
|
|
35919
35926
|
columns,
|
|
35920
35927
|
fields,
|
|
35921
35928
|
itemActions,
|
|
35922
|
-
maxInlineActions,
|
|
35923
35929
|
itemClickEvent = "",
|
|
35924
35930
|
selectable = false,
|
|
35925
35931
|
selectEvent,
|
|
@@ -35953,8 +35959,7 @@ function TableView({
|
|
|
35953
35959
|
const [localSelected, setLocalSelected] = React89__namespace.default.useState(/* @__PURE__ */ new Set());
|
|
35954
35960
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
35955
35961
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
35956
|
-
const
|
|
35957
|
-
const overflowActions = maxInlineActions != null ? actionDefs.slice(maxInlineActions) : actionDefs;
|
|
35962
|
+
const overflowActions = actionDefs;
|
|
35958
35963
|
const fireAction = (action, row) => eventBus.emit(`UI:${action.event}`, {
|
|
35959
35964
|
id: row.id,
|
|
35960
35965
|
row
|
|
@@ -36136,7 +36141,7 @@ function TableView({
|
|
|
36136
36141
|
}
|
|
36137
36142
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground", children: formatCell(raw, col.format, relationsData?.[col.field ?? col.key]) }) }, col.key);
|
|
36138
36143
|
}),
|
|
36139
|
-
hasActions && /* @__PURE__ */ jsxRuntime.
|
|
36144
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
36140
36145
|
HStack,
|
|
36141
36146
|
{
|
|
36142
36147
|
gap: "xs",
|
|
@@ -36150,38 +36155,20 @@ function TableView({
|
|
|
36150
36155
|
"border-l border-[var(--color-border)]",
|
|
36151
36156
|
lk.striped && index % 2 === 1 ? "bg-[var(--color-surface-subtle)]" : "bg-[var(--color-card)] group-hover:bg-[var(--color-surface-subtle)]"
|
|
36152
36157
|
),
|
|
36153
|
-
children:
|
|
36154
|
-
|
|
36155
|
-
|
|
36156
|
-
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
|
|
36160
|
-
|
|
36161
|
-
|
|
36162
|
-
|
|
36163
|
-
|
|
36164
|
-
|
|
36165
|
-
|
|
36166
|
-
|
|
36167
|
-
},
|
|
36168
|
-
action.event
|
|
36169
|
-
)),
|
|
36170
|
-
overflowActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
36171
|
-
Menu,
|
|
36172
|
-
{
|
|
36173
|
-
position: "bottom-end",
|
|
36174
|
-
trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", "data-row-id": String(row.id), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
36175
|
-
items: overflowActions.map((action) => ({
|
|
36176
|
-
label: action.label,
|
|
36177
|
-
icon: action.icon,
|
|
36178
|
-
event: action.event,
|
|
36179
|
-
variant: action.variant === "danger" ? "danger" : "default",
|
|
36180
|
-
onClick: () => fireAction(action, row)
|
|
36181
|
-
}))
|
|
36182
|
-
}
|
|
36183
|
-
)
|
|
36184
|
-
]
|
|
36158
|
+
children: overflowActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
36159
|
+
Menu,
|
|
36160
|
+
{
|
|
36161
|
+
position: "bottom-end",
|
|
36162
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", "data-row-id": String(row.id), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
36163
|
+
items: overflowActions.map((action) => ({
|
|
36164
|
+
label: action.label,
|
|
36165
|
+
icon: action.icon,
|
|
36166
|
+
event: action.event,
|
|
36167
|
+
variant: action.variant === "danger" ? "danger" : "default",
|
|
36168
|
+
onClick: () => fireAction(action, row)
|
|
36169
|
+
}))
|
|
36170
|
+
}
|
|
36171
|
+
)
|
|
36185
36172
|
}
|
|
36186
36173
|
)
|
|
36187
36174
|
]
|
|
@@ -45607,6 +45594,7 @@ var init_DetailPanel = __esm({
|
|
|
45607
45594
|
init_EmptyState();
|
|
45608
45595
|
init_cn();
|
|
45609
45596
|
init_portalRoot();
|
|
45597
|
+
init_slotContained();
|
|
45610
45598
|
init_format();
|
|
45611
45599
|
init_getNestedValue();
|
|
45612
45600
|
init_relationLabel();
|
|
@@ -45638,6 +45626,7 @@ var init_DetailPanel = __esm({
|
|
|
45638
45626
|
}) => {
|
|
45639
45627
|
const eventBus = useEventBus();
|
|
45640
45628
|
const { t } = hooks.useTranslate();
|
|
45629
|
+
const contained = React89.useContext(SlotContainedContext);
|
|
45641
45630
|
const [titleDraft, setTitleDraft] = React89__namespace.default.useState(null);
|
|
45642
45631
|
const isFieldDefArray = (arr) => {
|
|
45643
45632
|
if (!arr || arr.length === 0) return false;
|
|
@@ -46025,8 +46014,9 @@ var init_DetailPanel = __esm({
|
|
|
46025
46014
|
if (!slideOver) {
|
|
46026
46015
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className, children: content });
|
|
46027
46016
|
}
|
|
46028
|
-
const panel = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("fixed inset-y-0 right-0 w-full max-w-2xl bg-card shadow-lg z-50 overflow-y-auto p-6", className), children: content });
|
|
46029
|
-
|
|
46017
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn(contained ? "absolute" : "fixed", "inset-y-0 right-0 w-full max-w-2xl bg-card shadow-lg z-50 overflow-y-auto p-6", className), children: content });
|
|
46018
|
+
if (contained || typeof document === "undefined") return panel;
|
|
46019
|
+
return reactDom.createPortal(panel, getOrCreatePortalRoot());
|
|
46030
46020
|
};
|
|
46031
46021
|
DetailPanel.displayName = "DetailPanel";
|
|
46032
46022
|
}
|
|
@@ -52504,6 +52494,7 @@ var init_component_registry_generated = __esm({
|
|
|
52504
52494
|
// components/core/organisms/UISlotRenderer.tsx
|
|
52505
52495
|
var UISlotRenderer_exports = {};
|
|
52506
52496
|
__export(UISlotRenderer_exports, {
|
|
52497
|
+
SlotContainedContext: () => SlotContainedContext,
|
|
52507
52498
|
SlotContentRenderer: () => SlotContentRenderer,
|
|
52508
52499
|
SuspenseConfigProvider: () => SuspenseConfigProvider,
|
|
52509
52500
|
UISlotComponent: () => UISlotComponent,
|
|
@@ -52676,6 +52667,25 @@ function renderContainedPortal(t, slot, content, onDismiss) {
|
|
|
52676
52667
|
}
|
|
52677
52668
|
);
|
|
52678
52669
|
case "drawer":
|
|
52670
|
+
if (content.pattern === "detail-panel" && content.props.slideOver === true) {
|
|
52671
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52672
|
+
Box,
|
|
52673
|
+
{
|
|
52674
|
+
id: slotId,
|
|
52675
|
+
className: "absolute inset-0 z-50 overflow-hidden",
|
|
52676
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
52677
|
+
onClick: onDismiss,
|
|
52678
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
52679
|
+
Box,
|
|
52680
|
+
{
|
|
52681
|
+
className: "absolute inset-y-0 right-0 pointer-events-auto",
|
|
52682
|
+
onClick: (e) => e.stopPropagation(),
|
|
52683
|
+
children: slotContent
|
|
52684
|
+
}
|
|
52685
|
+
)
|
|
52686
|
+
}
|
|
52687
|
+
);
|
|
52688
|
+
}
|
|
52679
52689
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52680
52690
|
Box,
|
|
52681
52691
|
{
|
|
@@ -53527,7 +53537,7 @@ function UISlotRenderer({
|
|
|
53527
53537
|
}
|
|
53528
53538
|
return wrapped;
|
|
53529
53539
|
}
|
|
53530
|
-
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext,
|
|
53540
|
+
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SLOT_SKELETON_MAP, CONTENT_NODE_SLOTS, PATTERNS_WITH_CHILDREN, traitRefPresenceCache;
|
|
53531
53541
|
var init_UISlotRenderer = __esm({
|
|
53532
53542
|
"components/core/organisms/UISlotRenderer.tsx"() {
|
|
53533
53543
|
"use client";
|
|
@@ -53542,6 +53552,7 @@ var init_UISlotRenderer = __esm({
|
|
|
53542
53552
|
init_cn();
|
|
53543
53553
|
init_format();
|
|
53544
53554
|
init_portalRoot();
|
|
53555
|
+
init_slotContained();
|
|
53545
53556
|
init_ErrorBoundary();
|
|
53546
53557
|
init_Skeleton();
|
|
53547
53558
|
init_renderer();
|
|
@@ -53551,7 +53562,6 @@ var init_UISlotRenderer = __esm({
|
|
|
53551
53562
|
scopeWrapLog = logger.createLogger("almadar:ui:scope-wrap");
|
|
53552
53563
|
TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
|
|
53553
53564
|
SuspenseConfigContext = React89.createContext({ enabled: false });
|
|
53554
|
-
SlotContainedContext = React89.createContext(false);
|
|
53555
53565
|
SuspenseConfigProvider.displayName = "SuspenseConfigProvider";
|
|
53556
53566
|
SLOT_SKELETON_MAP = {
|
|
53557
53567
|
main: "table",
|
|
@@ -54997,6 +55007,7 @@ function ServerBridgeProvider({
|
|
|
54997
55007
|
clientEffects: result.clientEffects?.length ?? 0,
|
|
54998
55008
|
dataEntities,
|
|
54999
55009
|
data: responseData,
|
|
55010
|
+
entityByTrait: result.entityByTrait,
|
|
55000
55011
|
emittedEvents: result.emittedEvents?.map((e) => e.event) ?? [],
|
|
55001
55012
|
emitted: result.emittedEvents?.map((e) => ({ event: e.event, ...e.payload !== void 0 && { payload: e.payload } })) ?? [],
|
|
55002
55013
|
effectResults: result.effectResults,
|
|
@@ -6,7 +6,7 @@ export { a as CurrentPagePathContext, b as CurrentPagePathProvider, c as Current
|
|
|
6
6
|
import { b as UserData } from '../UserContext-D566nfWA.cjs';
|
|
7
7
|
export { U as UserContext, a as UserContextValue, c as UserProvider, d as UserProviderProps, u as useHasPermission, e as useHasRole, f as useUser, g as useUserForEvaluation } from '../UserContext-D566nfWA.cjs';
|
|
8
8
|
import { E as EventBusContextType } from '../event-bus-types-Bl78kokd.cjs';
|
|
9
|
-
export { A as AccessTokenProvider, E as EntityBindingContext, a as EntityBindingSource, b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, S as SendEventResult, e as ServerBridgeContextValue, f as ServerBridgeProvider, g as ServerBridgeProviderProps, h as ServerBridgeTransport, i as ServerClientEffect, j as ServerResponseMeta, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, u as useEntityBindingSnapshot, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-
|
|
9
|
+
export { A as AccessTokenProvider, E as EntityBindingContext, a as EntityBindingSource, b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, S as SendEventResult, e as ServerBridgeContextValue, f as ServerBridgeProvider, g as ServerBridgeProviderProps, h as ServerBridgeTransport, i as ServerClientEffect, j as ServerResponseMeta, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, u as useEntityBindingSnapshot, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-UyeCfEBS.cjs';
|
|
10
10
|
import { i as UseOfflineExecutorResult, U as UseOfflineExecutorOptions } from '../offline-executor-DdV2o0Zu.cjs';
|
|
11
11
|
export { N as NavigationContextValue, c as NavigationProvider, d as NavigationProviderProps, e as NavigationState, j as comparePathSpecificity, l as extractRouteParams, m as findPageByName, n as findPageByPath, o as getAllPages, p as getDefaultPage, q as matchPath, r as matchPathAmong, s as pathMatches, u as useActivePage, t as useInitPayload, v as useNavigateTo, w as useNavigation, x as useNavigationId, y as useNavigationState } from '../offline-executor-DdV2o0Zu.cjs';
|
|
12
12
|
import '../verificationRegistry-DTrKDRoa.cjs';
|
|
@@ -6,7 +6,7 @@ export { a as CurrentPagePathContext, b as CurrentPagePathProvider, c as Current
|
|
|
6
6
|
import { b as UserData } from '../UserContext-D566nfWA.js';
|
|
7
7
|
export { U as UserContext, a as UserContextValue, c as UserProvider, d as UserProviderProps, u as useHasPermission, e as useHasRole, f as useUser, g as useUserForEvaluation } from '../UserContext-D566nfWA.js';
|
|
8
8
|
import { E as EventBusContextType } from '../event-bus-types-Bl78kokd.js';
|
|
9
|
-
export { A as AccessTokenProvider, E as EntityBindingContext, a as EntityBindingSource, b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, S as SendEventResult, e as ServerBridgeContextValue, f as ServerBridgeProvider, g as ServerBridgeProviderProps, h as ServerBridgeTransport, i as ServerClientEffect, j as ServerResponseMeta, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, u as useEntityBindingSnapshot, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-
|
|
9
|
+
export { A as AccessTokenProvider, E as EntityBindingContext, a as EntityBindingSource, b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, S as SendEventResult, e as ServerBridgeContextValue, f as ServerBridgeProvider, g as ServerBridgeProviderProps, h as ServerBridgeTransport, i as ServerClientEffect, j as ServerResponseMeta, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, u as useEntityBindingSnapshot, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-UyeCfEBS.js';
|
|
10
10
|
import { i as UseOfflineExecutorResult, U as UseOfflineExecutorOptions } from '../offline-executor-DdV2o0Zu.js';
|
|
11
11
|
export { N as NavigationContextValue, c as NavigationProvider, d as NavigationProviderProps, e as NavigationState, j as comparePathSpecificity, l as extractRouteParams, m as findPageByName, n as findPageByPath, o as getAllPages, p as getDefaultPage, q as matchPath, r as matchPathAmong, s as pathMatches, u as useActivePage, t as useInitPayload, v as useNavigateTo, w as useNavigation, x as useNavigationId, y as useNavigationState } from '../offline-executor-DdV2o0Zu.js';
|
|
12
12
|
import '../verificationRegistry-Cwa52VyK.js';
|