mol_plot_all 1.2.259 → 1.2.262
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.test.js +33 -4
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +33 -4
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.test.js
CHANGED
|
@@ -161,7 +161,7 @@ var $;
|
|
|
161
161
|
return $mol_jsx("button", { title: props.hint }, target());
|
|
162
162
|
};
|
|
163
163
|
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
164
|
-
$mol_assert_equal(dom.outerHTML, '<button title="click me"
|
|
164
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
165
165
|
},
|
|
166
166
|
'Nested guid generation'() {
|
|
167
167
|
const Foo = () => {
|
|
@@ -226,7 +226,7 @@ var $;
|
|
|
226
226
|
function $mol_jsx(Elem, props, ...childNodes) {
|
|
227
227
|
const id = props && props.id || '';
|
|
228
228
|
const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
|
|
229
|
-
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
|
|
229
|
+
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
|
|
230
230
|
if (Elem && $.$mol_jsx_booked) {
|
|
231
231
|
if ($.$mol_jsx_booked.has(id)) {
|
|
232
232
|
$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
|
|
@@ -302,7 +302,11 @@ var $;
|
|
|
302
302
|
$mol_dom_render_children(node, [].concat(...childNodes));
|
|
303
303
|
if (!Elem)
|
|
304
304
|
return node;
|
|
305
|
+
if (guid)
|
|
306
|
+
node.id = guid;
|
|
305
307
|
for (const key in props) {
|
|
308
|
+
if (key === 'id')
|
|
309
|
+
continue;
|
|
306
310
|
if (typeof props[key] === 'string') {
|
|
307
311
|
;
|
|
308
312
|
node.setAttribute(key, props[key]);
|
|
@@ -319,8 +323,6 @@ var $;
|
|
|
319
323
|
node[key] = props[key];
|
|
320
324
|
}
|
|
321
325
|
}
|
|
322
|
-
if (guid)
|
|
323
|
-
node.id = guid;
|
|
324
326
|
if ($.$mol_jsx_crumbs)
|
|
325
327
|
node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
|
|
326
328
|
return node;
|
|
@@ -1562,6 +1564,33 @@ var $;
|
|
|
1562
1564
|
$mol_assert_equal(Fib.value(4), 8);
|
|
1563
1565
|
$mol_assert_equal(Fib.sums, 6);
|
|
1564
1566
|
},
|
|
1567
|
+
'Unsubscribe from temp pubs on complete'($) {
|
|
1568
|
+
class Random extends $mol_object2 {
|
|
1569
|
+
static $ = $;
|
|
1570
|
+
static seed() {
|
|
1571
|
+
return Math.random();
|
|
1572
|
+
}
|
|
1573
|
+
static resets(next) {
|
|
1574
|
+
return Math.random();
|
|
1575
|
+
}
|
|
1576
|
+
static value() {
|
|
1577
|
+
this.resets();
|
|
1578
|
+
return this.seed();
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
__decorate([
|
|
1582
|
+
$mol_wire_method
|
|
1583
|
+
], Random, "seed", null);
|
|
1584
|
+
__decorate([
|
|
1585
|
+
$mol_wire_mem(0)
|
|
1586
|
+
], Random, "resets", null);
|
|
1587
|
+
__decorate([
|
|
1588
|
+
$mol_wire_mem(0)
|
|
1589
|
+
], Random, "value", null);
|
|
1590
|
+
const first = Random.value();
|
|
1591
|
+
Random.resets(null);
|
|
1592
|
+
$mol_assert_unique(Random.value(), first);
|
|
1593
|
+
},
|
|
1565
1594
|
});
|
|
1566
1595
|
})($ || ($ = {}));
|
|
1567
1596
|
//mol/wire/mem/mem.test.ts
|