@symbo.ls/uikit 2.11.283 → 2.11.286
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 -29
- 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,7 +6702,7 @@ var beforeClassAssign = (element, s) => {
|
|
|
6685
6702
|
props4.update({
|
|
6686
6703
|
themeModifier: globalTheme
|
|
6687
6704
|
}, {
|
|
6688
|
-
|
|
6705
|
+
preventListeners: true,
|
|
6689
6706
|
preventRecursive: true,
|
|
6690
6707
|
isForced: true,
|
|
6691
6708
|
preventDefineUpdate: true
|
|
@@ -6708,6 +6725,7 @@ var beforeClassAssign = (element, s) => {
|
|
|
6708
6725
|
spacingRatio: parentProps.spacingRatio,
|
|
6709
6726
|
inheritSpacingRatio: true
|
|
6710
6727
|
}, {
|
|
6728
|
+
preventListeners: true,
|
|
6711
6729
|
preventRecursive: true,
|
|
6712
6730
|
isForced: true,
|
|
6713
6731
|
preventDefineUpdate: true
|
|
@@ -6853,13 +6871,13 @@ var Collection = {
|
|
|
6853
6871
|
return;
|
|
6854
6872
|
const { __ref: ref } = el;
|
|
6855
6873
|
if (ref.__collectionCache) {
|
|
6856
|
-
const
|
|
6857
|
-
if (
|
|
6858
|
-
ref.__collectionCache = (0, import_utils4.deepClone)(param);
|
|
6859
|
-
delete ref.__noCollectionDifference;
|
|
6860
|
-
} else {
|
|
6874
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__collectionCache);
|
|
6875
|
+
if (equals) {
|
|
6861
6876
|
ref.__noCollectionDifference = true;
|
|
6862
6877
|
return;
|
|
6878
|
+
} else {
|
|
6879
|
+
ref.__collectionCache = (0, import_utils4.deepClone)(param);
|
|
6880
|
+
delete ref.__noCollectionDifference;
|
|
6863
6881
|
}
|
|
6864
6882
|
} else {
|
|
6865
6883
|
ref.__collectionCache = (0, import_utils4.deepClone)(param);
|
|
@@ -6911,13 +6929,13 @@ var Collection = {
|
|
|
6911
6929
|
return;
|
|
6912
6930
|
const { __ref: ref } = el;
|
|
6913
6931
|
if (ref.__stateCollectionCache) {
|
|
6914
|
-
const
|
|
6915
|
-
if (
|
|
6916
|
-
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6917
|
-
delete ref.__noCollectionDifference;
|
|
6918
|
-
} else {
|
|
6932
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__stateCollectionCache);
|
|
6933
|
+
if (equals) {
|
|
6919
6934
|
ref.__noCollectionDifference = true;
|
|
6920
6935
|
return;
|
|
6936
|
+
} else {
|
|
6937
|
+
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6938
|
+
delete ref.__noCollectionDifference;
|
|
6921
6939
|
}
|
|
6922
6940
|
} else {
|
|
6923
6941
|
ref.__stateCollectionCache = (0, import_utils4.deepClone)(param);
|
|
@@ -6951,13 +6969,13 @@ var Collection = {
|
|
|
6951
6969
|
return;
|
|
6952
6970
|
const { __ref: ref } = el;
|
|
6953
6971
|
if (ref.__propsCollectionCache) {
|
|
6954
|
-
const
|
|
6955
|
-
if (
|
|
6956
|
-
ref.__propsCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6957
|
-
delete ref.__noCollectionDifference;
|
|
6958
|
-
} else {
|
|
6972
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__propsCollectionCache);
|
|
6973
|
+
if (equals) {
|
|
6959
6974
|
ref.__noCollectionDifference = true;
|
|
6960
6975
|
return;
|
|
6976
|
+
} else {
|
|
6977
|
+
ref.__propsCollectionCache = (0, import_utils4.deepClone)(param);
|
|
6978
|
+
delete ref.__noCollectionDifference;
|
|
6961
6979
|
}
|
|
6962
6980
|
} else {
|
|
6963
6981
|
ref.__propsCollectionCache = (0, import_utils4.deepClone)(param);
|
|
@@ -8545,6 +8563,8 @@ var Text = {
|
|
|
8545
8563
|
letterSpacing: ({ props: props4 }) => !(0, import_utils8.isUndefined)(props4.letterSpacing) && { letterSpacing: props4.letterSpacing },
|
|
8546
8564
|
textOverflow: ({ props: props4 }) => !(0, import_utils8.isUndefined)(props4.textOverflow) && { textOverflow: props4.textOverflow },
|
|
8547
8565
|
textAlign: ({ props: props4 }) => !(0, import_utils8.isUndefined)(props4.textAlign) && { textAlign: props4.textAlign },
|
|
8566
|
+
writingMode: ({ props: props4 }) => !(0, import_utils8.isUndefined)(props4.writingMode) && { writingMode: props4.writingMode },
|
|
8567
|
+
textOrientation: ({ props: props4 }) => !(0, import_utils8.isUndefined)(props4.textOrientation) && { textOrientation: props4.textOrientation },
|
|
8548
8568
|
fontWeight: ({ props: props4 }) => !(0, import_utils8.isUndefined)(props4.fontWeight) && {
|
|
8549
8569
|
fontWeight: props4.fontWeight,
|
|
8550
8570
|
fontVariationSettings: '"wght" ' + props4.fontWeight
|