mol_jsx_lib 0.0.60 → 0.0.63
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.deps.json +1 -1
- package/node.esm.js +5 -3
- package/node.esm.js.map +1 -1
- package/node.js +5 -3
- package/node.js.map +1 -1
- package/node.test.js +5 -3
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.esm.js +5 -3
- package/web.esm.js.map +1 -1
- package/web.js +5 -3
- package/web.js.map +1 -1
package/web.js
CHANGED
|
@@ -153,7 +153,7 @@ var $;
|
|
|
153
153
|
function $mol_jsx(Elem, props, ...childNodes) {
|
|
154
154
|
const id = props && props.id || '';
|
|
155
155
|
const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
|
|
156
|
-
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
|
|
156
|
+
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
|
|
157
157
|
if (Elem && $.$mol_jsx_booked) {
|
|
158
158
|
if ($.$mol_jsx_booked.has(id)) {
|
|
159
159
|
$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
|
|
@@ -229,7 +229,11 @@ var $;
|
|
|
229
229
|
$mol_dom_render_children(node, [].concat(...childNodes));
|
|
230
230
|
if (!Elem)
|
|
231
231
|
return node;
|
|
232
|
+
if (guid)
|
|
233
|
+
node.id = guid;
|
|
232
234
|
for (const key in props) {
|
|
235
|
+
if (key === 'id')
|
|
236
|
+
continue;
|
|
233
237
|
if (typeof props[key] === 'string') {
|
|
234
238
|
;
|
|
235
239
|
node.setAttribute(key, props[key]);
|
|
@@ -246,8 +250,6 @@ var $;
|
|
|
246
250
|
node[key] = props[key];
|
|
247
251
|
}
|
|
248
252
|
}
|
|
249
|
-
if (guid)
|
|
250
|
-
node.id = guid;
|
|
251
253
|
if ($.$mol_jsx_crumbs)
|
|
252
254
|
node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
|
|
253
255
|
return node;
|