@symbo.ls/uikit 2.11.281 → 2.11.284
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/index.cjs.js +49 -30
- package/dist/index.cjs.js.map +3 -3
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -481,7 +481,7 @@ var require_object = __commonJS({
|
|
|
481
481
|
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
482
482
|
deepContains: () => deepContains,
|
|
483
483
|
deepDestringify: () => deepDestringify,
|
|
484
|
-
deepDiff: () =>
|
|
484
|
+
deepDiff: () => deepDiff,
|
|
485
485
|
deepMerge: () => deepMerge2,
|
|
486
486
|
deepStringify: () => deepStringify,
|
|
487
487
|
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
@@ -812,7 +812,7 @@ var require_object = __commonJS({
|
|
|
812
812
|
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
813
813
|
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
814
814
|
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
815
|
-
var
|
|
815
|
+
var deepDiff = (lhs, rhs) => {
|
|
816
816
|
if (lhs === rhs)
|
|
817
817
|
return {};
|
|
818
818
|
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
@@ -1837,7 +1837,7 @@ var require_cjs2 = __commonJS({
|
|
|
1837
1837
|
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
1838
1838
|
deepContains: () => deepContains,
|
|
1839
1839
|
deepDestringify: () => deepDestringify,
|
|
1840
|
-
deepDiff: () =>
|
|
1840
|
+
deepDiff: () => deepDiff,
|
|
1841
1841
|
deepMerge: () => deepMerge3,
|
|
1842
1842
|
deepStringify: () => deepStringify,
|
|
1843
1843
|
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
@@ -2168,7 +2168,7 @@ var require_cjs2 = __commonJS({
|
|
|
2168
2168
|
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2169
2169
|
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2170
2170
|
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2171
|
-
var
|
|
2171
|
+
var deepDiff = (lhs, rhs) => {
|
|
2172
2172
|
if (lhs === rhs)
|
|
2173
2173
|
return {};
|
|
2174
2174
|
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
@@ -5056,7 +5056,7 @@ var require_methods = __commonJS({
|
|
|
5056
5056
|
const state = this;
|
|
5057
5057
|
if ((0, import_utils17.isArray)(state)) {
|
|
5058
5058
|
state.push(value);
|
|
5059
|
-
state.update(state.parse(), { overwrite:
|
|
5059
|
+
state.update(state.parse(), { overwrite: true, ...options });
|
|
5060
5060
|
} else if ((0, import_utils17.isObject)(state)) {
|
|
5061
5061
|
const key = Object.keys(state).length;
|
|
5062
5062
|
state.update({ [key]: value }, options);
|
|
@@ -5118,16 +5118,24 @@ var require_inherit = __commonJS({
|
|
|
5118
5118
|
var inherit_exports = {};
|
|
5119
5119
|
__export2(inherit_exports, {
|
|
5120
5120
|
checkIfInherits: () => checkIfInherits,
|
|
5121
|
-
createChangesByKey: () => createChangesByKey,
|
|
5122
5121
|
createInheritedState: () => createInheritedState,
|
|
5122
|
+
createNestedObjectByKeyPath: () => createNestedObjectByKeyPath,
|
|
5123
5123
|
findInheritedState: () => findInheritedState,
|
|
5124
5124
|
getChildStateInKey: () => getChildStateInKey2,
|
|
5125
5125
|
getParentStateInKey: () => getParentStateInKey,
|
|
5126
|
+
getRootStateInKey: () => getRootStateInKey,
|
|
5126
5127
|
isState: () => isState2
|
|
5127
5128
|
});
|
|
5128
5129
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
5129
5130
|
var import_utils17 = require_cjs();
|
|
5130
5131
|
var import_ignore = require_ignore();
|
|
5132
|
+
var getRootStateInKey = (stateKey, parentState) => {
|
|
5133
|
+
if (!stateKey.includes("~/"))
|
|
5134
|
+
return;
|
|
5135
|
+
const arr = stateKey.split("~/");
|
|
5136
|
+
if (arr.length > 1)
|
|
5137
|
+
return parentState.__root;
|
|
5138
|
+
};
|
|
5131
5139
|
var getParentStateInKey = (stateKey, parentState) => {
|
|
5132
5140
|
if (!stateKey.includes("../"))
|
|
5133
5141
|
return;
|
|
@@ -5165,11 +5173,17 @@ var require_inherit = __commonJS({
|
|
|
5165
5173
|
let stateKey = ref.__state;
|
|
5166
5174
|
if (!checkIfInherits(element))
|
|
5167
5175
|
return;
|
|
5176
|
+
const rootState = getRootStateInKey(stateKey, parent.state);
|
|
5168
5177
|
let parentState = parent.state;
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5178
|
+
if (rootState) {
|
|
5179
|
+
parentState = rootState;
|
|
5180
|
+
stateKey = stateKey.replaceAll("~/", "");
|
|
5181
|
+
} else {
|
|
5182
|
+
const findGrandParentState = getParentStateInKey(stateKey, parent.state);
|
|
5183
|
+
if (findGrandParentState) {
|
|
5184
|
+
parentState = findGrandParentState;
|
|
5185
|
+
stateKey = stateKey.replaceAll("../", "");
|
|
5186
|
+
}
|
|
5173
5187
|
}
|
|
5174
5188
|
if (!parentState)
|
|
5175
5189
|
return;
|
|
@@ -5200,7 +5214,7 @@ var require_inherit = __commonJS({
|
|
|
5200
5214
|
return false;
|
|
5201
5215
|
return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.toggle && state.add && state.apply && state.__element && state.__children;
|
|
5202
5216
|
};
|
|
5203
|
-
var
|
|
5217
|
+
var createNestedObjectByKeyPath = (path, value) => {
|
|
5204
5218
|
if (!path) {
|
|
5205
5219
|
return value || {};
|
|
5206
5220
|
}
|
|
@@ -5311,9 +5325,10 @@ var require_updateState = __commonJS({
|
|
|
5311
5325
|
const isStringState = stateType === "string" || stateType === "number" || stateType === "boolean";
|
|
5312
5326
|
const value = isStringState ? state.value : state.parse();
|
|
5313
5327
|
const passedValue = isStringState ? state.value : obj;
|
|
5328
|
+
const findRootState = (0, import_inherit.getRootStateInKey)(stateKey, parent.state);
|
|
5314
5329
|
const findGrandParentState = (0, import_inherit.getParentStateInKey)(stateKey, parent.state);
|
|
5315
|
-
const changesValue = (0, import_inherit.
|
|
5316
|
-
const targetParent = findGrandParentState || parent.state;
|
|
5330
|
+
const changesValue = (0, import_inherit.createNestedObjectByKeyPath)(stateKey, passedValue);
|
|
5331
|
+
const targetParent = findRootState || findGrandParentState || parent.state;
|
|
5317
5332
|
if (options.replace)
|
|
5318
5333
|
(0, import_utils17.overwriteDeep)(targetParent, changesValue || value);
|
|
5319
5334
|
targetParent.update(changesValue, {
|
|
@@ -5545,6 +5560,7 @@ var require_cjs6 = __commonJS({
|
|
|
5545
5560
|
router: () => router
|
|
5546
5561
|
});
|
|
5547
5562
|
module2.exports = __toCommonJS2(router_exports);
|
|
5563
|
+
var import_event = require_cjs4();
|
|
5548
5564
|
var import_utils17 = require_cjs();
|
|
5549
5565
|
var getActiveRoute = (level = 0, route = import_utils17.window.location.pathname) => {
|
|
5550
5566
|
const routeArray = route.split("/");
|
|
@@ -5621,6 +5637,7 @@ var require_cjs6 = __commonJS({
|
|
|
5621
5637
|
});
|
|
5622
5638
|
}
|
|
5623
5639
|
}
|
|
5640
|
+
(0, import_event.triggerEventOn)("routeChanged", element, options);
|
|
5624
5641
|
};
|
|
5625
5642
|
var router_default = router;
|
|
5626
5643
|
}
|
|
@@ -6685,6 +6702,7 @@ var beforeClassAssign = (element, s) => {
|
|
|
6685
6702
|
props4.update({
|
|
6686
6703
|
themeModifier: globalTheme
|
|
6687
6704
|
}, {
|
|
6705
|
+
preventListeners: true,
|
|
6688
6706
|
preventRecursive: true,
|
|
6689
6707
|
isForced: true,
|
|
6690
6708
|
preventDefineUpdate: true
|
|
@@ -6707,6 +6725,7 @@ var beforeClassAssign = (element, s) => {
|
|
|
6707
6725
|
spacingRatio: parentProps.spacingRatio,
|
|
6708
6726
|
inheritSpacingRatio: true
|
|
6709
6727
|
}, {
|
|
6728
|
+
preventListeners: true,
|
|
6710
6729
|
preventRecursive: true,
|
|
6711
6730
|
isForced: true,
|
|
6712
6731
|
preventDefineUpdate: true
|
|
@@ -6851,17 +6870,17 @@ var Collection = {
|
|
|
6851
6870
|
if ((0, import_utils4.isNot)(param)("array", "object"))
|
|
6852
6871
|
return;
|
|
6853
6872
|
const { __ref: ref } = el;
|
|
6854
|
-
if (ref.
|
|
6855
|
-
const
|
|
6856
|
-
if (
|
|
6857
|
-
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6858
|
-
delete ref.__noCollectionDifference;
|
|
6859
|
-
} else {
|
|
6873
|
+
if (ref.__collectionCache) {
|
|
6874
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__collectionCache);
|
|
6875
|
+
if (equals) {
|
|
6860
6876
|
ref.__noCollectionDifference = true;
|
|
6861
6877
|
return;
|
|
6878
|
+
} else {
|
|
6879
|
+
ref.__collectionCache = (0, import_utils4.deepClone)(param);
|
|
6880
|
+
delete ref.__noCollectionDifference;
|
|
6862
6881
|
}
|
|
6863
6882
|
} else {
|
|
6864
|
-
ref.
|
|
6883
|
+
ref.__collectionCache = (0, import_utils4.deepClone)(param);
|
|
6865
6884
|
}
|
|
6866
6885
|
const obj = {
|
|
6867
6886
|
tag: "fragment",
|
|
@@ -6910,13 +6929,13 @@ var Collection = {
|
|
|
6910
6929
|
return;
|
|
6911
6930
|
const { __ref: ref } = el;
|
|
6912
6931
|
if (ref.__stateCollectionCache) {
|
|
6913
|
-
const
|
|
6914
|
-
if (
|
|
6915
|
-
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6916
|
-
delete ref.__noCollectionDifference;
|
|
6917
|
-
} else {
|
|
6932
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__stateCollectionCache);
|
|
6933
|
+
if (equals) {
|
|
6918
6934
|
ref.__noCollectionDifference = true;
|
|
6919
6935
|
return;
|
|
6936
|
+
} else {
|
|
6937
|
+
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6938
|
+
delete ref.__noCollectionDifference;
|
|
6920
6939
|
}
|
|
6921
6940
|
} else {
|
|
6922
6941
|
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
@@ -6950,13 +6969,13 @@ var Collection = {
|
|
|
6950
6969
|
return;
|
|
6951
6970
|
const { __ref: ref } = el;
|
|
6952
6971
|
if (ref.__propsCollectionCache) {
|
|
6953
|
-
const
|
|
6954
|
-
if (
|
|
6955
|
-
ref.__propsCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6956
|
-
delete ref.__noCollectionDifference;
|
|
6957
|
-
} else {
|
|
6972
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__propsCollectionCache);
|
|
6973
|
+
if (equals) {
|
|
6958
6974
|
ref.__noCollectionDifference = true;
|
|
6959
6975
|
return;
|
|
6976
|
+
} else {
|
|
6977
|
+
ref.__propsCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6978
|
+
delete ref.__noCollectionDifference;
|
|
6960
6979
|
}
|
|
6961
6980
|
} else {
|
|
6962
6981
|
ref.__propsCollectionCache = (0, import_utils4.deepClone)(param);
|