@symbo.ls/create 2.11.453 → 2.11.454
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 +40 -13
- package/package.json +4 -4
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -769,10 +769,10 @@ var require_object = __commonJS({
|
|
|
769
769
|
return o;
|
|
770
770
|
};
|
|
771
771
|
var deepStringify = (obj, stringified = {}) => {
|
|
772
|
-
var _a;
|
|
772
|
+
var _a, _b;
|
|
773
773
|
if (obj.node || obj.__ref || obj.parent || obj.__element || obj.parse) {
|
|
774
|
-
|
|
775
|
-
obj = (
|
|
774
|
+
(obj.__element || ((_a = obj.parent) == null ? void 0 : _a.__element)).warn("Trying to clone element or state at", obj);
|
|
775
|
+
obj = (_b = obj.parse) == null ? void 0 : _b.call(obj);
|
|
776
776
|
}
|
|
777
777
|
for (const prop in obj) {
|
|
778
778
|
const objProp = obj[prop];
|
|
@@ -1412,9 +1412,11 @@ var require_cookie = __commonJS({
|
|
|
1412
1412
|
var cookie_exports = {};
|
|
1413
1413
|
__export2(cookie_exports, {
|
|
1414
1414
|
getCookie: () => getCookie,
|
|
1415
|
+
getLocalStorage: () => getLocalStorage,
|
|
1415
1416
|
isMobile: () => isMobile,
|
|
1416
1417
|
removeCookie: () => removeCookie,
|
|
1417
|
-
setCookie: () => setCookie
|
|
1418
|
+
setCookie: () => setCookie,
|
|
1419
|
+
setLocalStorage: () => setLocalStorage
|
|
1418
1420
|
});
|
|
1419
1421
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1420
1422
|
var import_types = require_types();
|
|
@@ -1448,6 +1450,27 @@ var require_cookie = __commonJS({
|
|
|
1448
1450
|
return;
|
|
1449
1451
|
import_utils32.document.cookie = cname + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
|
1450
1452
|
};
|
|
1453
|
+
function getLocalStorage(key) {
|
|
1454
|
+
let savedJSON;
|
|
1455
|
+
if (window.localStorage) {
|
|
1456
|
+
try {
|
|
1457
|
+
savedJSON = JSON.parse(window.localStorage.getItem(key));
|
|
1458
|
+
} catch (e) {
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
if (typeof savedJSON !== "undefined") {
|
|
1462
|
+
return savedJSON;
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
function setLocalStorage(key, data) {
|
|
1466
|
+
if (data && window.localStorage) {
|
|
1467
|
+
if (typeof data === "object") {
|
|
1468
|
+
window.localStorage.setItem(key, JSON.stringify(data));
|
|
1469
|
+
} else {
|
|
1470
|
+
window.localStorage.setItem(key, data);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1451
1474
|
}
|
|
1452
1475
|
});
|
|
1453
1476
|
|
|
@@ -1700,14 +1723,14 @@ var require_component = __commonJS({
|
|
|
1700
1723
|
} = element;
|
|
1701
1724
|
const hasComponentAttrs = extend || childExtend || props2 || on2 || $collection || $stateCollection || $propsCollection;
|
|
1702
1725
|
if (hasComponentAttrs && (childProps || extendProps || children || childrenExtends)) {
|
|
1703
|
-
|
|
1726
|
+
parent.error("Sugar component includes params for builtin components", { verbose: true });
|
|
1704
1727
|
}
|
|
1705
1728
|
return !hasComponentAttrs || childProps || extendProps || children || childrenExtends;
|
|
1706
1729
|
};
|
|
1707
1730
|
var extendizeByKey = (element, parent, key) => {
|
|
1708
1731
|
const { context } = parent;
|
|
1709
1732
|
const { tag, extend, childrenExtends } = element;
|
|
1710
|
-
const isSugar = checkIfSugar(element);
|
|
1733
|
+
const isSugar = checkIfSugar(element, parent, key);
|
|
1711
1734
|
const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent2(key.split(".")[1]) ? [key.split(".")[0]] : [key];
|
|
1712
1735
|
const isExtendKeyComponent = context && context.components[extendFromKey];
|
|
1713
1736
|
if (element === isExtendKeyComponent)
|
|
@@ -1753,7 +1776,7 @@ var require_component = __commonJS({
|
|
|
1753
1776
|
if (!childElem)
|
|
1754
1777
|
element[childKey] = (0, import__.deepCloneWithExtend)(newChild);
|
|
1755
1778
|
else {
|
|
1756
|
-
const isSugar = checkIfSugar(childElem);
|
|
1779
|
+
const isSugar = checkIfSugar(childElem, parent, key);
|
|
1757
1780
|
if (!isSugar)
|
|
1758
1781
|
continue;
|
|
1759
1782
|
const inheritedChildElem = element[childKey].props;
|
|
@@ -13370,11 +13393,13 @@ var require_methods2 = __commonJS({
|
|
|
13370
13393
|
}
|
|
13371
13394
|
}
|
|
13372
13395
|
function error(...params) {
|
|
13373
|
-
var _a;
|
|
13396
|
+
var _a, _b;
|
|
13374
13397
|
if (ENV3 === "test" || ENV3 === "development") {
|
|
13375
13398
|
if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger)
|
|
13376
13399
|
debugger;
|
|
13377
13400
|
console.error(...params);
|
|
13401
|
+
if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose)
|
|
13402
|
+
this.verbose();
|
|
13378
13403
|
}
|
|
13379
13404
|
}
|
|
13380
13405
|
function nextElement() {
|
|
@@ -19789,12 +19814,14 @@ var Input = {
|
|
|
19789
19814
|
name: ({ props: props2 }) => props2.name,
|
|
19790
19815
|
autocomplete: ({ props: props2 }) => props2.autocomplete,
|
|
19791
19816
|
placeholder: ({ props: props2 }) => props2.placeholder,
|
|
19792
|
-
value: (
|
|
19793
|
-
const {
|
|
19794
|
-
|
|
19795
|
-
|
|
19817
|
+
value: (el, s) => {
|
|
19818
|
+
const { props: props2, state, deps } = el;
|
|
19819
|
+
const { isString: isString13, exec: exec7, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3 } = deps;
|
|
19820
|
+
const val = exec7(props2.value, el);
|
|
19821
|
+
if (isString13(val) && val.includes("{{")) {
|
|
19822
|
+
return replaceLiteralsWithObjectFields3(val, state);
|
|
19796
19823
|
}
|
|
19797
|
-
return
|
|
19824
|
+
return val;
|
|
19798
19825
|
},
|
|
19799
19826
|
disabled: ({ props: props2 }) => props2.disabled || null,
|
|
19800
19827
|
readonly: ({ props: props2 }) => props2.readonly,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.454",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "c00f58d1f3abb27367daa3a488580d7a82221e6d",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
8
|
"dist"
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@symbo.ls/fetch": "^2.11.453",
|
|
38
38
|
"@symbo.ls/init": "^2.11.453",
|
|
39
39
|
"@symbo.ls/scratch": "^2.11.453",
|
|
40
|
-
"@symbo.ls/sync": "^2.11.
|
|
41
|
-
"@symbo.ls/uikit": "^2.11.
|
|
40
|
+
"@symbo.ls/sync": "^2.11.454",
|
|
41
|
+
"@symbo.ls/uikit": "^2.11.454",
|
|
42
42
|
"@symbo.ls/utils": "^2.11.453",
|
|
43
43
|
"domql": "^2.5.0"
|
|
44
44
|
},
|