mol_time_all 1.1.235 → 1.1.238
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 +6 -4
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +6 -4
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -1093,7 +1093,7 @@ var $;
|
|
|
1093
1093
|
return $mol_jsx("button", { title: props.hint }, target());
|
|
1094
1094
|
};
|
|
1095
1095
|
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
1096
|
-
$mol_assert_equal(dom.outerHTML, '<button title="click me"
|
|
1096
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
1097
1097
|
},
|
|
1098
1098
|
'Nested guid generation'() {
|
|
1099
1099
|
const Foo = () => {
|
|
@@ -1158,7 +1158,7 @@ var $;
|
|
|
1158
1158
|
function $mol_jsx(Elem, props, ...childNodes) {
|
|
1159
1159
|
const id = props && props.id || '';
|
|
1160
1160
|
const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
|
|
1161
|
-
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
|
|
1161
|
+
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
|
|
1162
1162
|
if (Elem && $.$mol_jsx_booked) {
|
|
1163
1163
|
if ($.$mol_jsx_booked.has(id)) {
|
|
1164
1164
|
$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
|
|
@@ -1234,7 +1234,11 @@ var $;
|
|
|
1234
1234
|
$mol_dom_render_children(node, [].concat(...childNodes));
|
|
1235
1235
|
if (!Elem)
|
|
1236
1236
|
return node;
|
|
1237
|
+
if (guid)
|
|
1238
|
+
node.id = guid;
|
|
1237
1239
|
for (const key in props) {
|
|
1240
|
+
if (key === 'id')
|
|
1241
|
+
continue;
|
|
1238
1242
|
if (typeof props[key] === 'string') {
|
|
1239
1243
|
;
|
|
1240
1244
|
node.setAttribute(key, props[key]);
|
|
@@ -1251,8 +1255,6 @@ var $;
|
|
|
1251
1255
|
node[key] = props[key];
|
|
1252
1256
|
}
|
|
1253
1257
|
}
|
|
1254
|
-
if (guid)
|
|
1255
|
-
node.id = guid;
|
|
1256
1258
|
if ($.$mol_jsx_crumbs)
|
|
1257
1259
|
node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
|
|
1258
1260
|
return node;
|