@almadar/ui 2.30.0 → 2.31.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/components/index.cjs +13 -1
- package/dist/components/index.js +13 -1
- package/dist/runtime/index.cjs +13 -1
- package/dist/runtime/index.js +13 -1
- package/package.json +1 -1
|
@@ -35095,7 +35095,19 @@ function SlotContentRenderer({
|
|
|
35095
35095
|
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id) : void 0;
|
|
35096
35096
|
const { children: _childrenConfig, ...restProps } = content.props;
|
|
35097
35097
|
const renderedProps = renderPatternProps(restProps, onDismiss);
|
|
35098
|
-
|
|
35098
|
+
let finalProps;
|
|
35099
|
+
if (entityType) {
|
|
35100
|
+
finalProps = { ...renderedProps, entity: storeData };
|
|
35101
|
+
if (!finalProps.fields && !finalProps.columns && storeData.length > 0) {
|
|
35102
|
+
const sample = storeData[0];
|
|
35103
|
+
if (sample && typeof sample === "object") {
|
|
35104
|
+
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
35105
|
+
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
35106
|
+
}
|
|
35107
|
+
}
|
|
35108
|
+
} else {
|
|
35109
|
+
finalProps = renderedProps;
|
|
35110
|
+
}
|
|
35099
35111
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35100
35112
|
Box,
|
|
35101
35113
|
{
|
package/dist/components/index.js
CHANGED
|
@@ -35065,7 +35065,19 @@ function SlotContentRenderer({
|
|
|
35065
35065
|
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id) : void 0;
|
|
35066
35066
|
const { children: _childrenConfig, ...restProps } = content.props;
|
|
35067
35067
|
const renderedProps = renderPatternProps(restProps, onDismiss);
|
|
35068
|
-
|
|
35068
|
+
let finalProps;
|
|
35069
|
+
if (entityType) {
|
|
35070
|
+
finalProps = { ...renderedProps, entity: storeData };
|
|
35071
|
+
if (!finalProps.fields && !finalProps.columns && storeData.length > 0) {
|
|
35072
|
+
const sample = storeData[0];
|
|
35073
|
+
if (sample && typeof sample === "object") {
|
|
35074
|
+
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
35075
|
+
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
35076
|
+
}
|
|
35077
|
+
}
|
|
35078
|
+
} else {
|
|
35079
|
+
finalProps = renderedProps;
|
|
35080
|
+
}
|
|
35069
35081
|
return /* @__PURE__ */ jsx(
|
|
35070
35082
|
Box,
|
|
35071
35083
|
{
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -32358,7 +32358,19 @@ function SlotContentRenderer({
|
|
|
32358
32358
|
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id) : void 0;
|
|
32359
32359
|
const { children: _childrenConfig, ...restProps } = content.props;
|
|
32360
32360
|
const renderedProps = renderPatternProps(restProps, onDismiss);
|
|
32361
|
-
|
|
32361
|
+
let finalProps;
|
|
32362
|
+
if (entityType) {
|
|
32363
|
+
finalProps = { ...renderedProps, entity: storeData };
|
|
32364
|
+
if (!finalProps.fields && !finalProps.columns && storeData.length > 0) {
|
|
32365
|
+
const sample = storeData[0];
|
|
32366
|
+
if (sample && typeof sample === "object") {
|
|
32367
|
+
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
32368
|
+
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
32369
|
+
}
|
|
32370
|
+
}
|
|
32371
|
+
} else {
|
|
32372
|
+
finalProps = renderedProps;
|
|
32373
|
+
}
|
|
32362
32374
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32363
32375
|
Box,
|
|
32364
32376
|
{
|
package/dist/runtime/index.js
CHANGED
|
@@ -32328,7 +32328,19 @@ function SlotContentRenderer({
|
|
|
32328
32328
|
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id) : void 0;
|
|
32329
32329
|
const { children: _childrenConfig, ...restProps } = content.props;
|
|
32330
32330
|
const renderedProps = renderPatternProps(restProps, onDismiss);
|
|
32331
|
-
|
|
32331
|
+
let finalProps;
|
|
32332
|
+
if (entityType) {
|
|
32333
|
+
finalProps = { ...renderedProps, entity: storeData };
|
|
32334
|
+
if (!finalProps.fields && !finalProps.columns && storeData.length > 0) {
|
|
32335
|
+
const sample = storeData[0];
|
|
32336
|
+
if (sample && typeof sample === "object") {
|
|
32337
|
+
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
32338
|
+
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
32339
|
+
}
|
|
32340
|
+
}
|
|
32341
|
+
} else {
|
|
32342
|
+
finalProps = renderedProps;
|
|
32343
|
+
}
|
|
32332
32344
|
return /* @__PURE__ */ jsx(
|
|
32333
32345
|
Box,
|
|
32334
32346
|
{
|