@almadar/std 3.7.0 → 3.9.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 +2 -2
- package/dist/behaviors/exports/organisms/std-ecommerce.orb +131 -104
- package/dist/behaviors/exports/validation-report.json +2 -2
- 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 +2 -2
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "std-
|
|
3
|
+
"name": "std-ecommerce",
|
|
4
4
|
"errors": 0,
|
|
5
5
|
"warnings": 0,
|
|
6
6
|
"output": [
|
|
7
7
|
"Loaded 22 services from packages/almadar-patterns/src/services-registry.json",
|
|
8
|
-
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/
|
|
8
|
+
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/organisms/std-ecommerce.orb"
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
]
|
|
@@ -175,7 +175,7 @@ function buildTrait(c) {
|
|
|
175
175
|
if (isRefresh) {
|
|
176
176
|
return { key: e, name: e, payload: [{ name: "data", type: "object", required: true }] };
|
|
177
177
|
}
|
|
178
|
-
return needsId ? { key: e, name: e, payload: [{ name: "id", type: "string", required: true }] } : { key: e, name: e };
|
|
178
|
+
return needsId ? { key: e, name: e, payload: [{ name: "id", type: "string", required: true }, { name: "row", type: "object" }] } : { key: e, name: e };
|
|
179
179
|
})
|
|
180
180
|
];
|
|
181
181
|
const listensDecl = c.refreshEvents.length > 0 ? c.refreshEvents.map((evt) => ({ event: evt, triggers: evt })) : void 0;
|
|
@@ -2939,14 +2939,14 @@ function buildStepUI(c, stepIndex) {
|
|
|
2939
2939
|
};
|
|
2940
2940
|
}
|
|
2941
2941
|
function buildReviewUI(c) {
|
|
2942
|
-
const
|
|
2942
|
+
const reviewRows = c.nonIdFields.map((field) => ({
|
|
2943
2943
|
type: "stack",
|
|
2944
2944
|
direction: "horizontal",
|
|
2945
2945
|
gap: "md",
|
|
2946
2946
|
justify: "space-between",
|
|
2947
2947
|
children: [
|
|
2948
|
-
{ type: "typography", variant: "caption", content: field.name.charAt(0).toUpperCase() + field.name.slice(1) },
|
|
2949
|
-
{ type: "typography", variant: "body", content: `@
|
|
2948
|
+
{ type: "typography", variant: "caption", content: field.name.charAt(0).toUpperCase() + field.name.slice(1).replace(/([A-Z])/g, " $1") },
|
|
2949
|
+
{ type: "typography", variant: "body", content: `@entity.${field.name}` }
|
|
2950
2950
|
]
|
|
2951
2951
|
}));
|
|
2952
2952
|
return {
|
|
@@ -2968,14 +2968,11 @@ function buildReviewUI(c) {
|
|
|
2968
2968
|
{ type: "wizard-progress", steps: c.wizardProgressSteps, currentStep: c.totalSteps },
|
|
2969
2969
|
{ type: "divider" },
|
|
2970
2970
|
{
|
|
2971
|
-
type: "
|
|
2971
|
+
type: "stack",
|
|
2972
|
+
direction: "vertical",
|
|
2973
|
+
gap: "sm",
|
|
2972
2974
|
entity: c.entityName,
|
|
2973
|
-
|
|
2974
|
-
type: "stack",
|
|
2975
|
-
direction: "vertical",
|
|
2976
|
-
gap: "sm",
|
|
2977
|
-
children: reviewDetailChildren
|
|
2978
|
-
}]
|
|
2975
|
+
children: reviewRows
|
|
2979
2976
|
},
|
|
2980
2977
|
{
|
|
2981
2978
|
type: "wizard-navigation",
|
|
@@ -8322,7 +8319,7 @@ function resolve51(params) {
|
|
|
8322
8319
|
createButtonLabel: params.createButtonLabel ?? `Create ${entityName}`,
|
|
8323
8320
|
createFormTitle: params.createFormTitle ?? `Create ${entityName}`,
|
|
8324
8321
|
editFormTitle: params.editFormTitle ?? `Edit ${entityName}`,
|
|
8325
|
-
deleteMessage: params.deleteMessage ?? `
|
|
8322
|
+
deleteMessage: params.deleteMessage ?? `This action cannot be undone.`,
|
|
8326
8323
|
emptyTitle: params.emptyTitle ?? `No ${p.toLowerCase()} yet`,
|
|
8327
8324
|
emptyDescription: params.emptyDescription ?? `Create your first ${entityName.toLowerCase()} to get started.`,
|
|
8328
8325
|
headerIcon: params.headerIcon ?? "list",
|
|
@@ -8474,6 +8471,10 @@ function stdList(params) {
|
|
|
8474
8471
|
}));
|
|
8475
8472
|
const sm = browseTrait.stateMachine;
|
|
8476
8473
|
sm.states.push({ name: "deleting" });
|
|
8474
|
+
const deleteEvent = sm.events.find((e) => e.key === "DELETE");
|
|
8475
|
+
if (deleteEvent && !deleteEvent.payload) {
|
|
8476
|
+
deleteEvent.payload = [{ name: "id", type: "string" }, { name: "row", type: "object" }];
|
|
8477
|
+
}
|
|
8477
8478
|
const existingKeys = new Set(sm.events.map((e) => e.key));
|
|
8478
8479
|
if (!existingKeys.has("CONFIRM_DELETE")) sm.events.push({ key: "CONFIRM_DELETE", name: "Confirm Delete" });
|
|
8479
8480
|
if (!existingKeys.has("CANCEL")) sm.events.push({ key: "CANCEL", name: "Cancel" });
|
|
@@ -8497,6 +8498,7 @@ function stdList(params) {
|
|
|
8497
8498
|
{ type: "typography", content: `Delete ${entityName}`, variant: "h3" }
|
|
8498
8499
|
] },
|
|
8499
8500
|
{ type: "divider" },
|
|
8501
|
+
{ type: "typography", content: `@entity.${c.nonIdFields[0]?.name ?? "name"}`, variant: "h4" },
|
|
8500
8502
|
{ type: "typography", content: c.deleteMessage, variant: "body" },
|
|
8501
8503
|
{ type: "stack", direction: "horizontal", gap: "sm", justify: "end", children: [
|
|
8502
8504
|
{ type: "button", label: "Cancel", event: "CANCEL", variant: "ghost" },
|