@almadar/std 3.6.2 → 3.8.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/behaviors/exports/organisms/std-ecommerce.orb +131 -104
- package/behaviors/exports/validation-report.json +0 -1097
- package/dist/behaviors/exports/organisms/std-ecommerce.orb +131 -104
- package/dist/behaviors/exports/validation-report.json +0 -1097
- package/dist/behaviors/functions/index.js +14 -12
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.js +14 -12
- package/dist/behaviors/index.js.map +1 -1
- package/dist/exports/organisms/std-ecommerce.orb +131 -104
- package/dist/exports/validation-report.json +0 -1097
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3940,7 +3940,7 @@ function buildTrait(c) {
|
|
|
3940
3940
|
if (isRefresh) {
|
|
3941
3941
|
return { key: e, name: e, payload: [{ name: "data", type: "object", required: true }] };
|
|
3942
3942
|
}
|
|
3943
|
-
return needsId ? { key: e, name: e, payload: [{ name: "id", type: "string", required: true }] } : { key: e, name: e };
|
|
3943
|
+
return needsId ? { key: e, name: e, payload: [{ name: "id", type: "string", required: true }, { name: "row", type: "object" }] } : { key: e, name: e };
|
|
3944
3944
|
})
|
|
3945
3945
|
];
|
|
3946
3946
|
const listensDecl = c.refreshEvents.length > 0 ? c.refreshEvents.map((evt) => ({ event: evt, triggers: evt })) : void 0;
|
|
@@ -6704,14 +6704,14 @@ function buildStepUI(c, stepIndex) {
|
|
|
6704
6704
|
};
|
|
6705
6705
|
}
|
|
6706
6706
|
function buildReviewUI(c) {
|
|
6707
|
-
const
|
|
6707
|
+
const reviewRows = c.nonIdFields.map((field) => ({
|
|
6708
6708
|
type: "stack",
|
|
6709
6709
|
direction: "horizontal",
|
|
6710
6710
|
gap: "md",
|
|
6711
6711
|
justify: "space-between",
|
|
6712
6712
|
children: [
|
|
6713
|
-
{ type: "typography", variant: "caption", content: field.name.charAt(0).toUpperCase() + field.name.slice(1) },
|
|
6714
|
-
{ type: "typography", variant: "body", content: `@
|
|
6713
|
+
{ type: "typography", variant: "caption", content: field.name.charAt(0).toUpperCase() + field.name.slice(1).replace(/([A-Z])/g, " $1") },
|
|
6714
|
+
{ type: "typography", variant: "body", content: `@entity.${field.name}` }
|
|
6715
6715
|
]
|
|
6716
6716
|
}));
|
|
6717
6717
|
return {
|
|
@@ -6733,14 +6733,11 @@ function buildReviewUI(c) {
|
|
|
6733
6733
|
{ type: "wizard-progress", steps: c.wizardProgressSteps, currentStep: c.totalSteps },
|
|
6734
6734
|
{ type: "divider" },
|
|
6735
6735
|
{
|
|
6736
|
-
type: "
|
|
6736
|
+
type: "stack",
|
|
6737
|
+
direction: "vertical",
|
|
6738
|
+
gap: "sm",
|
|
6737
6739
|
entity: c.entityName,
|
|
6738
|
-
|
|
6739
|
-
type: "stack",
|
|
6740
|
-
direction: "vertical",
|
|
6741
|
-
gap: "sm",
|
|
6742
|
-
children: reviewDetailChildren
|
|
6743
|
-
}]
|
|
6740
|
+
children: reviewRows
|
|
6744
6741
|
},
|
|
6745
6742
|
{
|
|
6746
6743
|
type: "wizard-navigation",
|
|
@@ -12087,7 +12084,7 @@ function resolve52(params) {
|
|
|
12087
12084
|
createButtonLabel: params.createButtonLabel ?? `Create ${entityName}`,
|
|
12088
12085
|
createFormTitle: params.createFormTitle ?? `Create ${entityName}`,
|
|
12089
12086
|
editFormTitle: params.editFormTitle ?? `Edit ${entityName}`,
|
|
12090
|
-
deleteMessage: params.deleteMessage ?? `
|
|
12087
|
+
deleteMessage: params.deleteMessage ?? `This action cannot be undone.`,
|
|
12091
12088
|
emptyTitle: params.emptyTitle ?? `No ${p.toLowerCase()} yet`,
|
|
12092
12089
|
emptyDescription: params.emptyDescription ?? `Create your first ${entityName.toLowerCase()} to get started.`,
|
|
12093
12090
|
headerIcon: params.headerIcon ?? "list",
|
|
@@ -12239,6 +12236,10 @@ function stdList(params) {
|
|
|
12239
12236
|
}));
|
|
12240
12237
|
const sm = browseTrait.stateMachine;
|
|
12241
12238
|
sm.states.push({ name: "deleting" });
|
|
12239
|
+
const deleteEvent = sm.events.find((e) => e.key === "DELETE");
|
|
12240
|
+
if (deleteEvent && !deleteEvent.payload) {
|
|
12241
|
+
deleteEvent.payload = [{ name: "id", type: "string" }, { name: "row", type: "object" }];
|
|
12242
|
+
}
|
|
12242
12243
|
const existingKeys = new Set(sm.events.map((e) => e.key));
|
|
12243
12244
|
if (!existingKeys.has("CONFIRM_DELETE")) sm.events.push({ key: "CONFIRM_DELETE", name: "Confirm Delete" });
|
|
12244
12245
|
if (!existingKeys.has("CANCEL")) sm.events.push({ key: "CANCEL", name: "Cancel" });
|
|
@@ -12262,6 +12263,7 @@ function stdList(params) {
|
|
|
12262
12263
|
{ type: "typography", content: `Delete ${entityName}`, variant: "h3" }
|
|
12263
12264
|
] },
|
|
12264
12265
|
{ type: "divider" },
|
|
12266
|
+
{ type: "typography", content: `@entity.${c.nonIdFields[0]?.name ?? "name"}`, variant: "h4" },
|
|
12265
12267
|
{ type: "typography", content: c.deleteMessage, variant: "body" },
|
|
12266
12268
|
{ type: "stack", direction: "horizontal", gap: "sm", justify: "end", children: [
|
|
12267
12269
|
{ type: "button", label: "Cancel", event: "CANCEL", variant: "ghost" },
|