Skip to content

Commit 832bc82

Browse files
committed
update package-lock.json etc
1 parent 14b3063 commit 832bc82

File tree

3 files changed

+37
-32
lines changed

3 files changed

+37
-32
lines changed

docs/source/_static/custom.js

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,33 @@ function Element({ model }) {
16321632
}
16331633
}
16341634

1635+
function elementChildren(modelChildren) {
1636+
if (!modelChildren) {
1637+
return [];
1638+
} else {
1639+
return modelChildren.map((child) => {
1640+
switch (typeof child) {
1641+
case "object":
1642+
return html`<${Element} key=${child.key} model=${child} />`;
1643+
case "string":
1644+
return child;
1645+
}
1646+
});
1647+
}
1648+
}
1649+
1650+
function elementAttributes(model, sendEvent) {
1651+
const attributes = Object.assign({}, model.attributes);
1652+
1653+
if (model.eventHandlers) {
1654+
for (const [eventName, eventSpec] of Object.entries(model.eventHandlers)) {
1655+
attributes[eventName] = eventHandler(sendEvent, eventSpec);
1656+
}
1657+
}
1658+
1659+
return attributes;
1660+
}
1661+
16351662
function StandardElement({ model }) {
16361663
const config = react.useContext(LayoutConfigContext);
16371664
const children = elementChildren(model.children);
@@ -1691,33 +1718,6 @@ function RenderImportedElement({ model, importSource }) {
16911718
return html`<div ref=${mountPoint} />`;
16921719
}
16931720

1694-
function elementChildren(modelChildren) {
1695-
if (!modelChildren) {
1696-
return [];
1697-
} else {
1698-
return modelChildren.map((child) => {
1699-
switch (typeof child) {
1700-
case "object":
1701-
return html`<${Element} key=${child.key} model=${child} />`;
1702-
case "string":
1703-
return child;
1704-
}
1705-
});
1706-
}
1707-
}
1708-
1709-
function elementAttributes(model, sendEvent) {
1710-
const attributes = Object.assign({}, model.attributes);
1711-
1712-
if (model.eventHandlers) {
1713-
for (const [eventName, eventSpec] of Object.entries(model.eventHandlers)) {
1714-
attributes[eventName] = eventHandler(sendEvent, eventSpec);
1715-
}
1716-
}
1717-
1718-
return attributes;
1719-
}
1720-
17211721
function eventHandler(sendEvent, eventSpec) {
17221722
return function () {
17231723
const data = Array.from(arguments).map((value) => {
@@ -1748,7 +1748,11 @@ function loadImportSource$1(config, importSource) {
17481748
return {
17491749
data: importSource,
17501750
bind: (node) => {
1751-
const binding = module.bind(node, config);
1751+
const shortImportSource = {
1752+
source: importSource.source,
1753+
sourceType: importSource.sourceType,
1754+
};
1755+
const binding = module.bind(node, config, shortImportSource);
17521756
if (
17531757
typeof binding.render == "function" &&
17541758
typeof binding.unmount == "function"

docs/source/custom_js/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)