@symbo.ls/create 2.11.447 → 2.11.449
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/cjs/bundle/index.js +46 -28
- package/dist/cjs/prepare.js +2 -1
- package/package.json +4 -4
- package/src/prepare.js +1 -1
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -732,20 +732,28 @@ var require_object = __commonJS({
|
|
|
732
732
|
}
|
|
733
733
|
return clone2;
|
|
734
734
|
};
|
|
735
|
-
var deepCloneWithExtend3 = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend3 = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
736
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
737
743
|
for (const prop in obj) {
|
|
738
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
739
745
|
continue;
|
|
740
746
|
const objProp = obj[prop];
|
|
741
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
742
748
|
continue;
|
|
749
|
+
}
|
|
743
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
744
|
-
o[prop] = deepCloneWithExtend3(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend3(objProp, excludeFrom, options, visited);
|
|
745
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
746
753
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
747
|
-
} else
|
|
754
|
+
} else {
|
|
748
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
749
757
|
}
|
|
750
758
|
return o;
|
|
751
759
|
};
|
|
@@ -13614,6 +13622,9 @@ var require_update2 = __commonJS({
|
|
|
13614
13622
|
if (!canUpdate)
|
|
13615
13623
|
continue;
|
|
13616
13624
|
const lazyLoad = element.props.lazyLoad || options.lazyLoad;
|
|
13625
|
+
if (options.onEachUpdate) {
|
|
13626
|
+
options.onEachUpdate(param, element, element.state, element.context);
|
|
13627
|
+
}
|
|
13617
13628
|
const childUpdateCall = () => update.call(prop, params[prop], {
|
|
13618
13629
|
...options,
|
|
13619
13630
|
currentSnapshot: snapshotOnCallee,
|
|
@@ -13779,31 +13790,31 @@ var require_set2 = __commonJS({
|
|
|
13779
13790
|
var import_update = __toESM2(require_update2(), 1);
|
|
13780
13791
|
var import__ = require_methods2();
|
|
13781
13792
|
var import_content = require_content();
|
|
13782
|
-
var addMethods = (element, parent) => {
|
|
13793
|
+
var addMethods = (element, parent, options) => {
|
|
13783
13794
|
const proto = {
|
|
13784
|
-
set: import_set.default
|
|
13785
|
-
reset: import_set.reset
|
|
13786
|
-
update: import_update.default
|
|
13787
|
-
variables: import__.variables
|
|
13788
|
-
remove: import__.remove
|
|
13789
|
-
updateContent: import_content.updateContent
|
|
13790
|
-
removeContent: import_content.removeContent
|
|
13791
|
-
setProps: import__.setProps
|
|
13792
|
-
lookup: import__.lookup
|
|
13793
|
-
lookdown: import__.lookdown
|
|
13794
|
-
lookdownAll: import__.lookdownAll
|
|
13795
|
-
setNodeStyles: import__.setNodeStyles
|
|
13796
|
-
spotByPath: import__.spotByPath
|
|
13797
|
-
parse: import__.parse
|
|
13798
|
-
parseDeep: import__.parseDeep
|
|
13799
|
-
keys: import__.keys
|
|
13800
|
-
nextElement: import__.nextElement
|
|
13801
|
-
previousElement: import__.previousElement
|
|
13795
|
+
set: import_set.default,
|
|
13796
|
+
reset: import_set.reset,
|
|
13797
|
+
update: import_update.default,
|
|
13798
|
+
variables: import__.variables,
|
|
13799
|
+
remove: import__.remove,
|
|
13800
|
+
updateContent: import_content.updateContent,
|
|
13801
|
+
removeContent: import_content.removeContent,
|
|
13802
|
+
setProps: import__.setProps,
|
|
13803
|
+
lookup: import__.lookup,
|
|
13804
|
+
lookdown: import__.lookdown,
|
|
13805
|
+
lookdownAll: import__.lookdownAll,
|
|
13806
|
+
setNodeStyles: import__.setNodeStyles,
|
|
13807
|
+
spotByPath: import__.spotByPath,
|
|
13808
|
+
parse: import__.parse,
|
|
13809
|
+
parseDeep: import__.parseDeep,
|
|
13810
|
+
keys: import__.keys,
|
|
13811
|
+
nextElement: import__.nextElement,
|
|
13812
|
+
previousElement: import__.previousElement
|
|
13802
13813
|
};
|
|
13803
13814
|
if (element.context.methods)
|
|
13804
13815
|
(0, import_utils32.merge)(proto, element.context.methods);
|
|
13805
13816
|
if ((0, import_utils32.isDevelopment)())
|
|
13806
|
-
proto.log = import__.log
|
|
13817
|
+
proto.log = import__.log;
|
|
13807
13818
|
Object.setPrototypeOf(element, proto);
|
|
13808
13819
|
};
|
|
13809
13820
|
}
|
|
@@ -14268,7 +14279,7 @@ var require_cjs13 = __commonJS({
|
|
|
14268
14279
|
module2.exports = __toCommonJS2(domql_exports);
|
|
14269
14280
|
var import_element = require_cjs12();
|
|
14270
14281
|
var create2 = (element, parent, key, options) => {
|
|
14271
|
-
var _a, _b, _c;
|
|
14282
|
+
var _a, _b, _c, _d, _e;
|
|
14272
14283
|
const domqlElement = (0, import_element.create)(element, parent, key, options);
|
|
14273
14284
|
const complete = (_a = domqlElement.on) == null ? void 0 : _a.complete;
|
|
14274
14285
|
if (complete)
|
|
@@ -14276,6 +14287,12 @@ var require_cjs13 = __commonJS({
|
|
|
14276
14287
|
const onComplete = (_b = domqlElement.props) == null ? void 0 : _b.onComplete;
|
|
14277
14288
|
if (onComplete)
|
|
14278
14289
|
(_c = domqlElement.props) == null ? void 0 : _c.onComplete(element, element.state, element.context, options);
|
|
14290
|
+
const initInspect = (_d = domqlElement.on) == null ? void 0 : _d.initInspect;
|
|
14291
|
+
if (initInspect)
|
|
14292
|
+
domqlElement.on.initInspect(element, element.state, element.context, options);
|
|
14293
|
+
const initSync = (_e = domqlElement.on) == null ? void 0 : _e.initSync;
|
|
14294
|
+
if (initSync)
|
|
14295
|
+
domqlElement.on.initSync(element, element.state, element.context, options);
|
|
14279
14296
|
return domqlElement;
|
|
14280
14297
|
};
|
|
14281
14298
|
var domql_default = {
|
|
@@ -17310,10 +17327,10 @@ var Block = {
|
|
|
17310
17327
|
display: ({ props: props2, deps }) => !deps.isUndefined(props2.display) && {
|
|
17311
17328
|
display: props2.display
|
|
17312
17329
|
},
|
|
17313
|
-
show: (el, s, ctx) => ctx.utils.exec(el.props.show, el, s) === false && {
|
|
17330
|
+
show: (el, s, ctx) => !!(ctx.utils.exec(el.props.show, el, s) === false) && {
|
|
17314
17331
|
display: "none !important"
|
|
17315
17332
|
},
|
|
17316
|
-
hide: (el, s, ctx) => ctx.utils.exec(el.props.hide, el, s) && {
|
|
17333
|
+
hide: (el, s, ctx) => !!ctx.utils.exec(el.props.hide, el, s) && {
|
|
17317
17334
|
display: "none !important"
|
|
17318
17335
|
},
|
|
17319
17336
|
height: ({ props: props2, deps }) => deps.transformSizeRatio("height", props2),
|
|
@@ -27909,7 +27926,8 @@ var prepareMethods = (context) => {
|
|
|
27909
27926
|
require: context.utils.require,
|
|
27910
27927
|
requireOnDemand: context.utils.requireOnDemand,
|
|
27911
27928
|
call: function(fnKey, ...args) {
|
|
27912
|
-
|
|
27929
|
+
var _a;
|
|
27930
|
+
return (_a = context.utils[fnKey] || context.methods[fnKey]) == null ? void 0 : _a.call(this, ...args);
|
|
27913
27931
|
}
|
|
27914
27932
|
};
|
|
27915
27933
|
};
|
package/dist/cjs/prepare.js
CHANGED
|
@@ -85,7 +85,8 @@ const prepareMethods = (context) => {
|
|
|
85
85
|
require: context.utils.require,
|
|
86
86
|
requireOnDemand: context.utils.requireOnDemand,
|
|
87
87
|
call: function(fnKey, ...args) {
|
|
88
|
-
|
|
88
|
+
var _a;
|
|
89
|
+
return (_a = context.utils[fnKey] || context.methods[fnKey]) == null ? void 0 : _a.call(this, ...args);
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
92
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.449",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "4b7f8173844a92575be87e42a3e93bb71ccf4a19",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
8
|
"dist"
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@symbo.ls/fetch": "^2.11.446",
|
|
38
38
|
"@symbo.ls/init": "^2.11.446",
|
|
39
39
|
"@symbo.ls/scratch": "^2.11.446",
|
|
40
|
-
"@symbo.ls/sync": "^2.11.
|
|
41
|
-
"@symbo.ls/uikit": "^2.11.
|
|
40
|
+
"@symbo.ls/sync": "^2.11.448",
|
|
41
|
+
"@symbo.ls/uikit": "^2.11.448",
|
|
42
42
|
"@symbo.ls/utils": "^2.11.446",
|
|
43
43
|
"domql": "^2.5.0"
|
|
44
44
|
},
|
package/src/prepare.js
CHANGED
|
@@ -56,7 +56,7 @@ export const prepareMethods = (context) => {
|
|
|
56
56
|
require: context.utils.require,
|
|
57
57
|
requireOnDemand: context.utils.requireOnDemand,
|
|
58
58
|
call: function (fnKey, ...args) {
|
|
59
|
-
return (context.utils[fnKey] || context.methods[fnKey])
|
|
59
|
+
return (context.utils[fnKey] || context.methods[fnKey])?.call(this, ...args)
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|