removed unused processesseessess
This commit is contained in:
parent
348f355eb2
commit
4fdc567e08
158 changed files with 1317 additions and 3351 deletions
|
|
@ -5,16 +5,9 @@
|
|||
constructor(defs = {}) { this.defs = new Map(Object.entries(defs || {})); }
|
||||
key(id = "") { return String(id || ""); }
|
||||
get(id = "") { return this.defs.get(this.key(id)) || null; }
|
||||
has(id = "") { return this.defs.has(this.key(id)); }
|
||||
entries() { return [...this.defs.entries()]; }
|
||||
values() { return [...this.defs.values()]; }
|
||||
label(id = "", fallback = "") { return this.get(id)?.label || fallback || id || ""; }
|
||||
color(id = "", fallback = "rgba(255,242,160,0.85)") { return this.get(id)?.color || fallback; }
|
||||
labels() { return Object.fromEntries(this.entries().map(([id, def]) => [id, def.label])); }
|
||||
colors() { return Object.fromEntries(this.entries().map(([id, def]) => [id, def.color]).filter(([, color]) => color)); }
|
||||
debugSnapshot(mapper = null) {
|
||||
return this.entries().map(([id, def]) => mapper ? mapper(id, def) : ({ id, label: def.label || id }));
|
||||
}
|
||||
}
|
||||
global.TarinaiRegistryBase = TarinaiRegistryBase;
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue