@notmrabhi/flowforge 0.1.42 → 0.1.45
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/{SchemaBuilderDrawer-CiSdfXzJ.js → SchemaBuilderDrawer-CwnowdK9.js} +2 -2
- package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js.map → SchemaBuilderDrawer-CwnowdK9.js.map} +1 -1
- package/dist/{SchemaBuilderDrawer-CUzYWGCN.js → SchemaBuilderDrawer-Dx6Nd6uF.js} +33 -33
- package/dist/{SchemaBuilderDrawer-CUzYWGCN.js.map → SchemaBuilderDrawer-Dx6Nd6uF.js.map} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +131 -1
- package/dist/canvas.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +39 -0
- package/dist/core.js +22 -23
- package/dist/core.js.map +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +121 -0
- package/dist/form.js +36 -33
- package/dist/{index-B8-KKaH_.js → index-C9s5LB8m.js} +2 -2
- package/dist/{index-B8-KKaH_.js.map → index-C9s5LB8m.js.map} +1 -1
- package/dist/{index-Buv1ylwP.js → index-CRQSsrv7.js} +2 -2
- package/dist/{index-Buv1ylwP.js.map → index-CRQSsrv7.js.map} +1 -1
- package/dist/index-CY05DpP5.js +10 -0
- package/dist/index-CY05DpP5.js.map +1 -0
- package/dist/{index-DjKhaaWf.js → index-DX3uS4JK.js} +2 -2
- package/dist/{index-DjKhaaWf.js.map → index-DX3uS4JK.js.map} +1 -1
- package/dist/{index-B74jTc2b.js → index-VUTKHpvC.js} +3134 -3006
- package/dist/index-VUTKHpvC.js.map +1 -0
- package/dist/{index-CiU9_8f1.js → index-ZD8Iiv9S.js} +2 -2
- package/dist/{index-CiU9_8f1.js.map → index-ZD8Iiv9S.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +143 -1
- package/dist/index.js +81 -79
- package/dist/index.js.map +1 -1
- package/dist/nodeRegistry.cjs +1 -1
- package/dist/nodeRegistry.cjs.map +1 -1
- package/dist/nodeRegistry.d.ts +39 -0
- package/dist/nodeRegistry.js +543 -23
- package/dist/nodeRegistry.js.map +1 -1
- package/dist/templateSkeletons-Cm_MIeT0.js +2 -0
- package/dist/templateSkeletons-Cm_MIeT0.js.map +1 -0
- package/dist/{templateSkeletons-CFMb6KIK.js → templateSkeletons-_F-r1-ef.js} +375 -373
- package/dist/templateSkeletons-_F-r1-ef.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B6xrei80.js +0 -87
- package/dist/index-B6xrei80.js.map +0 -1
- package/dist/index-B74jTc2b.js.map +0 -1
- package/dist/index-BrJBVztu.js +0 -2
- package/dist/index-BrJBVztu.js.map +0 -1
- package/dist/index-CXmgrKoe.js +0 -2
- package/dist/index-CXmgrKoe.js.map +0 -1
- package/dist/index-CqMPyOkL.js +0 -10
- package/dist/index-CqMPyOkL.js.map +0 -1
- package/dist/index-Dcur-XJ9.js +0 -36
- package/dist/index-Dcur-XJ9.js.map +0 -1
- package/dist/subWorkflowDescriptor-DYOYgBzX.js +0 -535
- package/dist/subWorkflowDescriptor-DYOYgBzX.js.map +0 -1
- package/dist/subWorkflowDescriptor-JDKi2INh.js +0 -2
- package/dist/subWorkflowDescriptor-JDKi2INh.js.map +0 -1
- package/dist/templateSkeletons-CFMb6KIK.js.map +0 -1
- package/dist/templateSkeletons-DKBMuT6K.js +0 -2
- package/dist/templateSkeletons-DKBMuT6K.js.map +0 -1
package/package.json
CHANGED
package/dist/index-B6xrei80.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
class o {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.templates = /* @__PURE__ */ new Map();
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Register a template. Normalises `allowedTasks` (the backend's name) →
|
|
7
|
-
* `availableTasks` (FlowForge's canonical name) so consumers can pass
|
|
8
|
-
* either without rewriting.
|
|
9
|
-
*/
|
|
10
|
-
register(t) {
|
|
11
|
-
const e = {
|
|
12
|
-
...t,
|
|
13
|
-
availableTasks: t.availableTasks ?? t.allowedTasks
|
|
14
|
-
};
|
|
15
|
-
return this.templates.set(e.triggerKey, e), this;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Register a list of templates fetched from `GET /api/v1/workflow-template`.
|
|
19
|
-
*
|
|
20
|
-
* The API shape is:
|
|
21
|
-
* {
|
|
22
|
-
* key, name, description, allowedTasks, allowedSources,
|
|
23
|
-
* configuration, // runtime BPMN — ignored by the canvas
|
|
24
|
-
* templateUI: { // ← UI bag, spread onto the template
|
|
25
|
-
* triggerCategory, icon, tags, category, author, popularity,
|
|
26
|
-
* source, product, taskLabels, maxTasks, skeletonState, …
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* Anything in `templateUI` overrides the top-level shorthand where there's
|
|
31
|
-
* an overlap. Bad rows (missing `key`) are skipped with a DEV warning
|
|
32
|
-
* rather than throwing, so one broken template doesn't blank the picker.
|
|
33
|
-
*
|
|
34
|
-
* Returns `this` for chaining and the count of templates registered.
|
|
35
|
-
*/
|
|
36
|
-
registerFromApi(t) {
|
|
37
|
-
for (const e of t ?? [])
|
|
38
|
-
e != null && e.key && this.register({
|
|
39
|
-
triggerKey: e.key,
|
|
40
|
-
label: e.name ?? e.key,
|
|
41
|
-
description: e.description,
|
|
42
|
-
availableTasks: e.allowedTasks,
|
|
43
|
-
...e.templateUI ?? {}
|
|
44
|
-
});
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
lookup(t) {
|
|
48
|
-
return this.templates.get(t);
|
|
49
|
-
}
|
|
50
|
-
list() {
|
|
51
|
-
return [...this.templates.values()];
|
|
52
|
-
}
|
|
53
|
-
listByCategory(t) {
|
|
54
|
-
return this.list().filter((e) => e.category === t);
|
|
55
|
-
}
|
|
56
|
-
listByTag(t) {
|
|
57
|
-
return this.list().filter((e) => {
|
|
58
|
-
var s;
|
|
59
|
-
return (s = e.tags) == null ? void 0 : s.includes(t);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
search(t) {
|
|
63
|
-
const e = t.toLowerCase();
|
|
64
|
-
return this.list().filter(
|
|
65
|
-
(s) => {
|
|
66
|
-
var r, a, i;
|
|
67
|
-
return s.label.toLowerCase().includes(e) || ((r = s.description) == null ? void 0 : r.toLowerCase().includes(e)) || ((a = s.tags) == null ? void 0 : a.some((l) => l.toLowerCase().includes(e))) || ((i = s.category) == null ? void 0 : i.toLowerCase().includes(e));
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
categories() {
|
|
72
|
-
const t = /* @__PURE__ */ new Set();
|
|
73
|
-
return this.list().forEach((e) => {
|
|
74
|
-
e.category && t.add(e.category);
|
|
75
|
-
}), Array.from(t);
|
|
76
|
-
}
|
|
77
|
-
/** Remove every template — useful before re-loading from backend. */
|
|
78
|
-
clear() {
|
|
79
|
-
return this.templates.clear(), this;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const c = new o();
|
|
83
|
-
export {
|
|
84
|
-
o as TemplateRegistry,
|
|
85
|
-
c as templateRegistry
|
|
86
|
-
};
|
|
87
|
-
//# sourceMappingURL=index-B6xrei80.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-B6xrei80.js","sources":["../src/templateRegistry/index.ts"],"sourcesContent":["import type { WorkflowTemplate, ApiWorkflowTemplate } from '../WorkflowCanvas/types';\n\nexport class TemplateRegistry {\n private templates = new Map<string, WorkflowTemplate>();\n\n /**\n * Register a template. Normalises `allowedTasks` (the backend's name) →\n * `availableTasks` (FlowForge's canonical name) so consumers can pass\n * either without rewriting.\n */\n register(template: WorkflowTemplate): this {\n const normalised: WorkflowTemplate = {\n ...template,\n availableTasks: template.availableTasks ?? template.allowedTasks,\n };\n this.templates.set(normalised.triggerKey, normalised);\n return this;\n }\n\n /**\n * Register a list of templates fetched from `GET /api/v1/workflow-template`.\n *\n * The API shape is:\n * {\n * key, name, description, allowedTasks, allowedSources,\n * configuration, // runtime BPMN — ignored by the canvas\n * templateUI: { // ← UI bag, spread onto the template\n * triggerCategory, icon, tags, category, author, popularity,\n * source, product, taskLabels, maxTasks, skeletonState, …\n * }\n * }\n *\n * Anything in `templateUI` overrides the top-level shorthand where there's\n * an overlap. Bad rows (missing `key`) are skipped with a DEV warning\n * rather than throwing, so one broken template doesn't blank the picker.\n *\n * Returns `this` for chaining and the count of templates registered.\n */\n registerFromApi(list: ApiWorkflowTemplate[]): this {\n for (const t of list ?? []) {\n if (!t?.key) {\n if (import.meta.env?.DEV) {\n // eslint-disable-next-line no-console\n console.warn('[FlowForge] templateRegistry.registerFromApi: skipped row without `key`', t);\n }\n continue;\n }\n this.register({\n triggerKey: t.key,\n label: t.name ?? t.key,\n description: t.description,\n availableTasks: t.allowedTasks,\n ...(t.templateUI ?? {}),\n } as WorkflowTemplate);\n }\n return this;\n }\n\n lookup(triggerKey: string): WorkflowTemplate | undefined {\n return this.templates.get(triggerKey);\n }\n\n list(): WorkflowTemplate[] {\n return [...this.templates.values()];\n }\n\n listByCategory(category: string): WorkflowTemplate[] {\n return this.list().filter((t) => t.category === category);\n }\n\n listByTag(tag: string): WorkflowTemplate[] {\n return this.list().filter((t) => t.tags?.includes(tag));\n }\n\n search(query: string): WorkflowTemplate[] {\n const q = query.toLowerCase();\n return this.list().filter(\n (t) =>\n t.label.toLowerCase().includes(q) ||\n t.description?.toLowerCase().includes(q) ||\n t.tags?.some((tag) => tag.toLowerCase().includes(q)) ||\n t.category?.toLowerCase().includes(q),\n );\n }\n\n categories(): string[] {\n const cats = new Set<string>();\n this.list().forEach((t) => { if (t.category) cats.add(t.category); });\n return Array.from(cats);\n }\n\n /** Remove every template — useful before re-loading from backend. */\n clear(): this {\n this.templates.clear();\n return this;\n }\n}\n\nexport const templateRegistry = new TemplateRegistry();\nexport type { WorkflowTemplate, ApiWorkflowTemplate };\n"],"names":["TemplateRegistry","template","normalised","list","t","triggerKey","category","tag","_a","query","q","_b","_c","cats","templateRegistry"],"mappings":"AAEO,MAAMA,EAAiB;AAAA,EAAvB,cAAA;AACL,SAAQ,gCAAgB,IAAA;AAAA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtD,SAASC,GAAkC;AACzC,UAAMC,IAA+B;AAAA,MACnC,GAAGD;AAAA,MACH,gBAAgBA,EAAS,kBAAkBA,EAAS;AAAA,IAAA;AAEtD,gBAAK,UAAU,IAAIC,EAAW,YAAYA,CAAU,GAC7C;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBA,gBAAgBC,GAAmC;AACjD,eAAWC,KAAKD,KAAQ;AACtB,MAAKC,KAAA,QAAAA,EAAG,OAOR,KAAK,SAAS;AAAA,QACZ,YAAYA,EAAE;AAAA,QACd,OAAOA,EAAE,QAAQA,EAAE;AAAA,QACnB,aAAaA,EAAE;AAAA,QACf,gBAAgBA,EAAE;AAAA,QAClB,GAAIA,EAAE,cAAc,CAAA;AAAA,MAAC,CACF;AAEvB,WAAO;AAAA,EACT;AAAA,EAEA,OAAOC,GAAkD;AACvD,WAAO,KAAK,UAAU,IAAIA,CAAU;AAAA,EACtC;AAAA,EAEA,OAA2B;AACzB,WAAO,CAAC,GAAG,KAAK,UAAU,QAAQ;AAAA,EACpC;AAAA,EAEA,eAAeC,GAAsC;AACnD,WAAO,KAAK,OAAO,OAAO,CAACF,MAAMA,EAAE,aAAaE,CAAQ;AAAA,EAC1D;AAAA,EAEA,UAAUC,GAAiC;AACzC,WAAO,KAAK,KAAA,EAAO,OAAO,CAACH;AArExB,UAAAI;AAqE8B,cAAAA,IAAAJ,EAAE,SAAF,gBAAAI,EAAQ,SAASD;AAAA,KAAI;AAAA,EACxD;AAAA,EAEA,OAAOE,GAAmC;AACxC,UAAMC,IAAID,EAAM,YAAA;AAChB,WAAO,KAAK,OAAO;AAAA,MACjB,CAACL,MAAA;AA3EA,YAAAI,GAAAG,GAAAC;AA4EC,eAAAR,EAAE,MAAM,cAAc,SAASM,CAAC,OAChCF,IAAAJ,EAAE,gBAAF,gBAAAI,EAAe,cAAc,SAASE,SACtCC,IAAAP,EAAE,SAAF,gBAAAO,EAAQ,KAAK,CAACJ,MAAQA,EAAI,cAAc,SAASG,CAAC,SAClDE,IAAAR,EAAE,aAAF,gBAAAQ,EAAY,cAAc,SAASF;AAAA;AAAA,IAAC;AAAA,EAE1C;AAAA,EAEA,aAAuB;AACrB,UAAMG,wBAAW,IAAA;AACjB,gBAAK,KAAA,EAAO,QAAQ,CAACT,MAAM;AAAE,MAAIA,EAAE,YAAUS,EAAK,IAAIT,EAAE,QAAQ;AAAA,IAAG,CAAC,GAC7D,MAAM,KAAKS,CAAI;AAAA,EACxB;AAAA;AAAA,EAGA,QAAc;AACZ,gBAAK,UAAU,MAAA,GACR;AAAA,EACT;AACF;AAEO,MAAMC,IAAmB,IAAId,EAAA;"}
|