mol_plot_all 1.2.507 → 1.2.509
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/node.d.ts +3 -1
- package/node.deps.json +1 -1
- package/node.esm.js +34 -22
- package/node.esm.js.map +1 -1
- package/node.js +34 -22
- package/node.js.map +1 -1
- package/node.test.js +34 -22
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +3 -1
- package/web.deps.json +1 -1
- package/web.esm.js +34 -22
- package/web.esm.js.map +1 -1
- package/web.js +34 -22
- package/web.js.map +1 -1
package/web.js
CHANGED
|
@@ -2109,43 +2109,55 @@ var $;
|
|
|
2109
2109
|
let current = proto;
|
|
2110
2110
|
const classes = [];
|
|
2111
2111
|
while (current) {
|
|
2112
|
-
|
|
2112
|
+
if (current.constructor.name !== classes.at(-1)?.name) {
|
|
2113
|
+
classes.push(current.constructor);
|
|
2114
|
+
}
|
|
2113
2115
|
if (!(current instanceof $mol_view))
|
|
2114
2116
|
break;
|
|
2115
2117
|
current = Object.getPrototypeOf(current);
|
|
2116
2118
|
}
|
|
2117
2119
|
return classes;
|
|
2118
2120
|
}
|
|
2121
|
+
static _view_names;
|
|
2122
|
+
static view_names(suffix) {
|
|
2123
|
+
let cache = Reflect.getOwnPropertyDescriptor(this, '_view_names')?.value;
|
|
2124
|
+
if (!cache)
|
|
2125
|
+
cache = this._view_names = new Map;
|
|
2126
|
+
const cached = cache.get(suffix);
|
|
2127
|
+
if (cached)
|
|
2128
|
+
return cached;
|
|
2129
|
+
const names = [];
|
|
2130
|
+
const suffix2 = '_' + suffix[0].toLowerCase() + suffix.substring(1);
|
|
2131
|
+
for (const Class of this.view_classes()) {
|
|
2132
|
+
if (suffix in Class.prototype)
|
|
2133
|
+
names.push(this.$.$mol_func_name(Class) + suffix2);
|
|
2134
|
+
else
|
|
2135
|
+
break;
|
|
2136
|
+
}
|
|
2137
|
+
cache.set(suffix, names);
|
|
2138
|
+
return names;
|
|
2139
|
+
}
|
|
2119
2140
|
view_names_owned() {
|
|
2120
2141
|
const names = [];
|
|
2121
2142
|
let owner = $mol_owning_get(this);
|
|
2122
|
-
if (owner?.host instanceof $mol_view)
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
break;
|
|
2130
|
-
}
|
|
2131
|
-
for (let prefix of owner.host.view_names_owned()) {
|
|
2132
|
-
names.push(prefix + suffix2);
|
|
2133
|
-
}
|
|
2143
|
+
if (!(owner?.host instanceof $mol_view))
|
|
2144
|
+
return names;
|
|
2145
|
+
const suffix = owner.task.name.trim();
|
|
2146
|
+
const suffix2 = '_' + suffix[0].toLowerCase() + suffix.substring(1);
|
|
2147
|
+
names.push(...owner.host.constructor.view_names(suffix));
|
|
2148
|
+
for (let prefix of owner.host.view_names_owned()) {
|
|
2149
|
+
names.push(prefix + suffix2);
|
|
2134
2150
|
}
|
|
2135
2151
|
return names;
|
|
2136
2152
|
}
|
|
2137
2153
|
view_names() {
|
|
2138
|
-
const names =
|
|
2139
|
-
for (let name of this.view_names_owned())
|
|
2140
|
-
|
|
2141
|
-
names.push(name);
|
|
2142
|
-
}
|
|
2154
|
+
const names = new Set();
|
|
2155
|
+
for (let name of this.view_names_owned())
|
|
2156
|
+
names.add(name);
|
|
2143
2157
|
for (let Class of this.constructor.view_classes()) {
|
|
2144
2158
|
const name = this.$.$mol_func_name(Class);
|
|
2145
|
-
if (
|
|
2146
|
-
|
|
2147
|
-
if (names.indexOf(name) < 0)
|
|
2148
|
-
names.push(name);
|
|
2159
|
+
if (name)
|
|
2160
|
+
names.add(name);
|
|
2149
2161
|
}
|
|
2150
2162
|
return names;
|
|
2151
2163
|
}
|