@kahitsan/plugin-sdk 0.7.0 → 0.7.1

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.
@@ -193,7 +193,7 @@ function crudFlow(opts) {
193
193
  title: opts.title,
194
194
  nodes: [
195
195
  {
196
- id: "submit",
196
+ id: opts.triggerId,
197
197
  kind: "trigger",
198
198
  label: opts.triggerLabel,
199
199
  out: [{ id: "o", to: "commit" }]
@@ -241,6 +241,7 @@ function resourceFlows(cfg) {
241
241
  const createFlow = crudFlow({
242
242
  id: `${cfg.id}.create`,
243
243
  title: `Add ${noun}`,
244
+ triggerId: "submit",
244
245
  triggerLabel: `Create ${noun}`,
245
246
  commitLabel: `Create ${lower}`,
246
247
  commitDetail: `POST ${cfg.basePath}`,
@@ -254,6 +255,7 @@ function resourceFlows(cfg) {
254
255
  const editFlow = crudFlow({
255
256
  id: `${cfg.id}.edit`,
256
257
  title: `Edit ${noun}`,
258
+ triggerId: "submit",
257
259
  triggerLabel: "Save Changes",
258
260
  commitLabel: `Update ${lower}`,
259
261
  commitDetail: `PUT ${cfg.basePath}/:id`,
@@ -271,6 +273,7 @@ function resourceFlows(cfg) {
271
273
  const archiveFlow = crudFlow({
272
274
  id: `${cfg.id}.archive`,
273
275
  title: `Archive ${noun}`,
276
+ triggerId: "trigger",
274
277
  triggerLabel: `Archive button (active ${lower})`,
275
278
  commitLabel: `Soft-delete ${lower}`,
276
279
  commitDetail: `DELETE ${cfg.basePath}/:id`,
@@ -284,6 +287,7 @@ function resourceFlows(cfg) {
284
287
  const restoreFlow = crudFlow({
285
288
  id: `${cfg.id}.restore`,
286
289
  title: `Restore ${noun}`,
290
+ triggerId: "trigger",
287
291
  triggerLabel: `Restore button (archived ${lower})`,
288
292
  commitLabel: `Restore ${lower}`,
289
293
  commitDetail: `PATCH ${cfg.basePath}/:id/restore`,