app-devtools 0.9.0 → 0.10.0
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/dist/main.js +12 -62
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -527,55 +527,6 @@ function mergeProps(...sources) {
|
|
|
527
527
|
}
|
|
528
528
|
return target;
|
|
529
529
|
}
|
|
530
|
-
function splitProps(props, ...keys) {
|
|
531
|
-
const blocked = new Set(keys.flat());
|
|
532
|
-
if ($PROXY in props) {
|
|
533
|
-
const res = keys.map(k => {
|
|
534
|
-
return new Proxy({
|
|
535
|
-
get(property) {
|
|
536
|
-
return k.includes(property) ? props[property] : undefined;
|
|
537
|
-
},
|
|
538
|
-
has(property) {
|
|
539
|
-
return k.includes(property) && property in props;
|
|
540
|
-
},
|
|
541
|
-
keys() {
|
|
542
|
-
return k.filter(property => property in props);
|
|
543
|
-
}
|
|
544
|
-
}, propTraps);
|
|
545
|
-
});
|
|
546
|
-
res.push(new Proxy({
|
|
547
|
-
get(property) {
|
|
548
|
-
return blocked.has(property) ? undefined : props[property];
|
|
549
|
-
},
|
|
550
|
-
has(property) {
|
|
551
|
-
return blocked.has(property) ? false : property in props;
|
|
552
|
-
},
|
|
553
|
-
keys() {
|
|
554
|
-
return Object.keys(props).filter(k => !blocked.has(k));
|
|
555
|
-
}
|
|
556
|
-
}, propTraps));
|
|
557
|
-
return res;
|
|
558
|
-
}
|
|
559
|
-
const descriptors = Object.getOwnPropertyDescriptors(props);
|
|
560
|
-
keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
|
|
561
|
-
return keys.map(k => {
|
|
562
|
-
const clone = {};
|
|
563
|
-
for (let i = 0; i < k.length; i++) {
|
|
564
|
-
const key = k[i];
|
|
565
|
-
if (!(key in props)) continue;
|
|
566
|
-
Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
|
|
567
|
-
get() {
|
|
568
|
-
return props[key];
|
|
569
|
-
},
|
|
570
|
-
set() {
|
|
571
|
-
return true;
|
|
572
|
-
},
|
|
573
|
-
enumerable: true
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
return clone;
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
530
|
|
|
580
531
|
function For(props) {
|
|
581
532
|
const fallback = "fallback" in props && {
|
|
@@ -1614,11 +1565,10 @@ const menuItemStyle = u`
|
|
|
1614
1565
|
}
|
|
1615
1566
|
`;
|
|
1616
1567
|
const ApiExplorerMenuItem = props => {
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1619
|
-
splitProps(props, ["item", "currentCallId"])[1];
|
|
1568
|
+
const _item = createMemo(() => props.item);
|
|
1569
|
+
const _currentCallId = createMemo(() => props.currentCallId);
|
|
1620
1570
|
const showSubitems = createSignalRef(props.item.subitemsWithAlias.length < 4);
|
|
1621
|
-
const typeIcon = getTypeIcon(
|
|
1571
|
+
const typeIcon = getTypeIcon(_item().type, _item().subType);
|
|
1622
1572
|
return (() => {
|
|
1623
1573
|
const _el$ = _tmpl$3$5.cloneNode(true),
|
|
1624
1574
|
_el$2 = _el$.firstChild;
|
|
@@ -1626,7 +1576,7 @@ const ApiExplorerMenuItem = props => {
|
|
|
1626
1576
|
insert(_el$2, createComponent(ButtonElement, {
|
|
1627
1577
|
onClick: () => {
|
|
1628
1578
|
setUiStore({
|
|
1629
|
-
selectedCall:
|
|
1579
|
+
selectedCall: _item().id,
|
|
1630
1580
|
selectedSubitem: null
|
|
1631
1581
|
});
|
|
1632
1582
|
},
|
|
@@ -1635,7 +1585,7 @@ const ApiExplorerMenuItem = props => {
|
|
|
1635
1585
|
const _el$3 = _tmpl$$9.cloneNode(true);
|
|
1636
1586
|
insert(_el$3, () => typeIcon.icon);
|
|
1637
1587
|
createRenderEffect(_p$ => {
|
|
1638
|
-
const _v$ = `${
|
|
1588
|
+
const _v$ = `${_item().type}${_item().subType ? ` (${_item().subType})` : ''}`,
|
|
1639
1589
|
_v$2 = typeIcon.color;
|
|
1640
1590
|
_v$ !== _p$._v$ && setAttribute(_el$3, "title", _p$._v$ = _v$);
|
|
1641
1591
|
_v$2 !== _p$._v$2 && _el$3.style.setProperty("color", _p$._v$2 = _v$2);
|
|
@@ -1647,14 +1597,14 @@ const ApiExplorerMenuItem = props => {
|
|
|
1647
1597
|
return _el$3;
|
|
1648
1598
|
})(), (() => {
|
|
1649
1599
|
const _el$4 = _tmpl$2$7.cloneNode(true);
|
|
1650
|
-
insert(_el$4, () =>
|
|
1651
|
-
createRenderEffect(() => setAttribute(_el$4, "title",
|
|
1600
|
+
insert(_el$4, () => _item().name);
|
|
1601
|
+
createRenderEffect(() => setAttribute(_el$4, "title", _item().name));
|
|
1652
1602
|
return _el$4;
|
|
1653
1603
|
})()];
|
|
1654
1604
|
}
|
|
1655
1605
|
}), null);
|
|
1656
1606
|
insert(_el$2, (() => {
|
|
1657
|
-
const _c$ = createMemo(() =>
|
|
1607
|
+
const _c$ = createMemo(() => _item().subitemsWithAlias.length > 0);
|
|
1658
1608
|
return () => _c$() && createComponent(ButtonElement, {
|
|
1659
1609
|
"class": "expand-button",
|
|
1660
1610
|
get classList() {
|
|
@@ -1679,18 +1629,18 @@ const ApiExplorerMenuItem = props => {
|
|
|
1679
1629
|
get children() {
|
|
1680
1630
|
return createComponent(For, {
|
|
1681
1631
|
get each() {
|
|
1682
|
-
return
|
|
1632
|
+
return _item().subitemsWithAlias;
|
|
1683
1633
|
},
|
|
1684
1634
|
children: subitem => createComponent(ButtonElement, {
|
|
1685
1635
|
"class": "subitem",
|
|
1686
1636
|
get classList() {
|
|
1687
1637
|
return {
|
|
1688
|
-
selected:
|
|
1638
|
+
selected: _currentCallId() === _item().id && uiStore.selectedSubitem === subitem
|
|
1689
1639
|
};
|
|
1690
1640
|
},
|
|
1691
1641
|
onClick: () => {
|
|
1692
1642
|
setUiStore({
|
|
1693
|
-
selectedCall:
|
|
1643
|
+
selectedCall: _item().id,
|
|
1694
1644
|
selectedSubitem: subitem
|
|
1695
1645
|
});
|
|
1696
1646
|
},
|
|
@@ -1703,7 +1653,7 @@ const ApiExplorerMenuItem = props => {
|
|
|
1703
1653
|
});
|
|
1704
1654
|
}
|
|
1705
1655
|
}), null);
|
|
1706
|
-
createRenderEffect(() => _el$2.classList.toggle("selected", !!(
|
|
1656
|
+
createRenderEffect(() => _el$2.classList.toggle("selected", !!(_currentCallId() ? _currentCallId() === _item().id : props.index === 0)));
|
|
1707
1657
|
return _el$;
|
|
1708
1658
|
})();
|
|
1709
1659
|
};
|