@symbo.ls/uikit 2.11.210 → 2.11.211
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 +93 -45
- package/dist/index.cjs.js.map +4 -4
- package/index.js +0 -1
- package/package.json +2 -3
package/dist/index.cjs.js
CHANGED
|
@@ -3501,7 +3501,7 @@ var require_object = __commonJS({
|
|
|
3501
3501
|
const elementProp = element[e];
|
|
3502
3502
|
const extendProp = extend[e];
|
|
3503
3503
|
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
3504
|
-
deepMerge2(elementProp, extendProp);
|
|
3504
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
3505
3505
|
} else if (elementProp === void 0) {
|
|
3506
3506
|
element[e] = extendProp;
|
|
3507
3507
|
}
|
|
@@ -3591,8 +3591,8 @@ var require_object = __commonJS({
|
|
|
3591
3591
|
const spaces = " ".repeat(indent);
|
|
3592
3592
|
let str = "{\n";
|
|
3593
3593
|
for (const [key, value] of Object.entries(obj)) {
|
|
3594
|
-
const
|
|
3595
|
-
const stringedKey =
|
|
3594
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["-", ":", "@", ".", "/", "!"]);
|
|
3595
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
3596
3596
|
str += `${spaces} ${stringedKey}: `;
|
|
3597
3597
|
if ((0, import_types.isArray)(value)) {
|
|
3598
3598
|
str += "[\n";
|
|
@@ -3647,7 +3647,7 @@ var require_object = __commonJS({
|
|
|
3647
3647
|
}
|
|
3648
3648
|
return detached;
|
|
3649
3649
|
};
|
|
3650
|
-
var deepDestringify = (obj,
|
|
3650
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
3651
3651
|
for (const prop in obj) {
|
|
3652
3652
|
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
3653
3653
|
if (!hasOwnProperty)
|
|
@@ -3657,52 +3657,50 @@ var require_object = __commonJS({
|
|
|
3657
3657
|
if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
|
|
3658
3658
|
try {
|
|
3659
3659
|
const evalProp = import_globals.window.eval(`(${objProp})`);
|
|
3660
|
-
|
|
3660
|
+
destringified[prop] = evalProp;
|
|
3661
3661
|
} catch (e) {
|
|
3662
3662
|
if (e)
|
|
3663
|
-
|
|
3663
|
+
destringified[prop] = objProp;
|
|
3664
3664
|
}
|
|
3665
3665
|
} else {
|
|
3666
|
-
|
|
3666
|
+
destringified[prop] = objProp;
|
|
3667
3667
|
}
|
|
3668
3668
|
} else if ((0, import_types.isArray)(objProp)) {
|
|
3669
|
-
|
|
3669
|
+
destringified[prop] = [];
|
|
3670
3670
|
objProp.forEach((arrProp) => {
|
|
3671
3671
|
if ((0, import_types.isString)(arrProp)) {
|
|
3672
3672
|
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
3673
3673
|
try {
|
|
3674
3674
|
const evalProp = import_globals.window.eval(`(${arrProp})`);
|
|
3675
|
-
|
|
3675
|
+
destringified[prop].push(evalProp);
|
|
3676
3676
|
} catch (e) {
|
|
3677
3677
|
if (e)
|
|
3678
|
-
|
|
3678
|
+
destringified[prop].push(arrProp);
|
|
3679
3679
|
}
|
|
3680
3680
|
} else {
|
|
3681
|
-
|
|
3681
|
+
destringified[prop].push(arrProp);
|
|
3682
3682
|
}
|
|
3683
3683
|
} else if ((0, import_types.isObject)(arrProp)) {
|
|
3684
|
-
|
|
3684
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
3685
3685
|
} else {
|
|
3686
|
-
|
|
3686
|
+
destringified[prop].push(arrProp);
|
|
3687
3687
|
}
|
|
3688
3688
|
});
|
|
3689
3689
|
} else if ((0, import_types.isObject)(objProp)) {
|
|
3690
|
-
|
|
3690
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
3691
3691
|
} else {
|
|
3692
|
-
|
|
3692
|
+
destringified[prop] = objProp;
|
|
3693
3693
|
}
|
|
3694
3694
|
}
|
|
3695
|
-
return
|
|
3695
|
+
return destringified;
|
|
3696
3696
|
};
|
|
3697
|
-
var stringToObject = (str) => {
|
|
3698
|
-
let obj;
|
|
3697
|
+
var stringToObject = (str, verbose) => {
|
|
3699
3698
|
try {
|
|
3700
|
-
|
|
3699
|
+
return import_globals.window.eval("(" + str + ")");
|
|
3701
3700
|
} catch (e) {
|
|
3702
|
-
|
|
3701
|
+
if (verbose)
|
|
3702
|
+
console.warn(e);
|
|
3703
3703
|
}
|
|
3704
|
-
if (obj)
|
|
3705
|
-
return obj;
|
|
3706
3704
|
};
|
|
3707
3705
|
var diffObjects = (original, objToDiff, cache) => {
|
|
3708
3706
|
for (const e in objToDiff) {
|
|
@@ -3890,11 +3888,29 @@ var require_function = __commonJS({
|
|
|
3890
3888
|
var function_exports = {};
|
|
3891
3889
|
__export2(function_exports, {
|
|
3892
3890
|
debounce: () => debounce,
|
|
3891
|
+
debounceOnContext: () => debounceOnContext,
|
|
3893
3892
|
isStringFunction: () => isStringFunction,
|
|
3894
3893
|
memoize: () => memoize2
|
|
3895
3894
|
});
|
|
3896
3895
|
module2.exports = __toCommonJS2(function_exports);
|
|
3897
|
-
|
|
3896
|
+
function debounce(func, wait, immediate) {
|
|
3897
|
+
let timeout;
|
|
3898
|
+
return function() {
|
|
3899
|
+
const context = this;
|
|
3900
|
+
const args = arguments;
|
|
3901
|
+
const later = function() {
|
|
3902
|
+
timeout = null;
|
|
3903
|
+
if (!immediate)
|
|
3904
|
+
func.apply(context, args);
|
|
3905
|
+
};
|
|
3906
|
+
const callNow = immediate && !timeout;
|
|
3907
|
+
clearTimeout(timeout);
|
|
3908
|
+
timeout = setTimeout(later, wait);
|
|
3909
|
+
if (callNow)
|
|
3910
|
+
func.apply(context, args);
|
|
3911
|
+
};
|
|
3912
|
+
}
|
|
3913
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
3898
3914
|
let timer;
|
|
3899
3915
|
return (...args) => {
|
|
3900
3916
|
clearTimeout(timer);
|
|
@@ -4710,12 +4726,12 @@ var require_inherit = __commonJS({
|
|
|
4710
4726
|
var createInheritedState = (element, parent) => {
|
|
4711
4727
|
const ref = element.__ref;
|
|
4712
4728
|
const inheritedState = findInheritedState(element, parent);
|
|
4713
|
-
if (
|
|
4729
|
+
if ((0, import_utils13.isUndefined)(inheritedState))
|
|
4714
4730
|
return element.state;
|
|
4715
4731
|
if ((0, import_utils13.is)(inheritedState)("object", "array")) {
|
|
4716
4732
|
return (0, import_utils13.deepClone)(inheritedState, import_ignore.IGNORE_STATE_PARAMS);
|
|
4717
|
-
} else if ((0, import_utils13.is)(inheritedState)("string", "number")) {
|
|
4718
|
-
ref.__stateType =
|
|
4733
|
+
} else if ((0, import_utils13.is)(inheritedState)("string", "number", "boolean")) {
|
|
4734
|
+
ref.__stateType = typeof inheritedState;
|
|
4719
4735
|
return { value: inheritedState };
|
|
4720
4736
|
}
|
|
4721
4737
|
console.warn(ref.__state, "is not present. Replacing with", {});
|
|
@@ -4723,9 +4739,9 @@ var require_inherit = __commonJS({
|
|
|
4723
4739
|
var checkIfInherits = (element) => {
|
|
4724
4740
|
const ref = element.__ref;
|
|
4725
4741
|
const stateKey = ref.__state;
|
|
4726
|
-
if (
|
|
4727
|
-
return
|
|
4728
|
-
return
|
|
4742
|
+
if (stateKey && (0, import_utils13.is)(stateKey)("number", "string", "boolean"))
|
|
4743
|
+
return true;
|
|
4744
|
+
return false;
|
|
4729
4745
|
};
|
|
4730
4746
|
var isState2 = function(state) {
|
|
4731
4747
|
if (!(0, import_utils13.isObjectLike)(state))
|
|
@@ -4831,6 +4847,7 @@ var require_updateState = __commonJS({
|
|
|
4831
4847
|
const element = state.__element;
|
|
4832
4848
|
const { parent, __ref: ref } = element;
|
|
4833
4849
|
const stateKey = ref.__state;
|
|
4850
|
+
const stateType = ref.__stateType;
|
|
4834
4851
|
if (!stateKey)
|
|
4835
4852
|
return;
|
|
4836
4853
|
const asksForInherit = (0, import_inherit.checkIfInherits)(element);
|
|
@@ -4838,7 +4855,7 @@ var require_updateState = __commonJS({
|
|
|
4838
4855
|
const shouldPropagateState = asksForInherit && inheritedState && !options.stopStatePropagation;
|
|
4839
4856
|
if (!shouldPropagateState)
|
|
4840
4857
|
return;
|
|
4841
|
-
const isStringState =
|
|
4858
|
+
const isStringState = stateType === "string" || stateType === "number" || stateType === "boolean";
|
|
4842
4859
|
const value = isStringState ? state.value : state.parse();
|
|
4843
4860
|
const passedValue = isStringState ? state.value : obj;
|
|
4844
4861
|
const findGrandParentState = (0, import_inherit.getParentStateInKey)(stateKey, parent.state);
|
|
@@ -4935,7 +4952,7 @@ var require_create = __commonJS({
|
|
|
4935
4952
|
return element.state;
|
|
4936
4953
|
if ((0, import_inherit.checkIfInherits)(element)) {
|
|
4937
4954
|
const inheritedState = (0, import_inherit.createInheritedState)(element, parent);
|
|
4938
|
-
element.state = inheritedState
|
|
4955
|
+
element.state = (0, import_utils13.isUndefined)(inheritedState) ? {} : inheritedState;
|
|
4939
4956
|
}
|
|
4940
4957
|
const dependentState = applyDependentState(element, element.state);
|
|
4941
4958
|
if (dependentState)
|
|
@@ -10238,16 +10255,16 @@ var VerificationCode = {
|
|
|
10238
10255
|
value: state.value[parent.key] || ""
|
|
10239
10256
|
}),
|
|
10240
10257
|
on: {
|
|
10241
|
-
keydown: (event,
|
|
10242
|
-
const { value } =
|
|
10258
|
+
keydown: (event, { node: node2 }) => {
|
|
10259
|
+
const { value } = node2;
|
|
10243
10260
|
if (value.length > 1)
|
|
10244
10261
|
return false;
|
|
10245
10262
|
},
|
|
10246
|
-
keyup: (event,
|
|
10263
|
+
keyup: (event, { parent, state }) => {
|
|
10247
10264
|
const { target, keyCode } = event;
|
|
10248
10265
|
const { value } = target;
|
|
10249
|
-
const next2 =
|
|
10250
|
-
const previous =
|
|
10266
|
+
const next2 = parent.nextElement();
|
|
10267
|
+
const previous = parent.previousElement();
|
|
10251
10268
|
const isNumber = keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105;
|
|
10252
10269
|
const isBackspace = event.keyCode === 8 || event.keyCode === 46;
|
|
10253
10270
|
target.select();
|
|
@@ -10255,9 +10272,9 @@ var VerificationCode = {
|
|
|
10255
10272
|
next2.NumberInput.node.focus();
|
|
10256
10273
|
if ((!value.length || isBackspace) && previous)
|
|
10257
10274
|
previous.NumberInput.node.focus();
|
|
10258
|
-
state.value[
|
|
10275
|
+
state.value[parent.key] = value;
|
|
10259
10276
|
},
|
|
10260
|
-
paste: (event,
|
|
10277
|
+
paste: (event, { state }) => {
|
|
10261
10278
|
event.preventDefault();
|
|
10262
10279
|
const paste = (event.clipboardData || window.clipboardData).getData("text");
|
|
10263
10280
|
if (!paste)
|
|
@@ -10480,12 +10497,16 @@ var GroupListTemplate = {
|
|
|
10480
10497
|
extend: GroupList,
|
|
10481
10498
|
Header: {},
|
|
10482
10499
|
Groups: {
|
|
10500
|
+
props: {},
|
|
10483
10501
|
Flex: {
|
|
10502
|
+
props: {},
|
|
10484
10503
|
...[
|
|
10485
10504
|
{
|
|
10486
10505
|
Title: null,
|
|
10487
10506
|
List: {
|
|
10507
|
+
props: {},
|
|
10488
10508
|
Flex: {
|
|
10509
|
+
props: {},
|
|
10489
10510
|
...[
|
|
10490
10511
|
{ span: { text: "Item" } },
|
|
10491
10512
|
{ span: { text: "Item" } }
|
|
@@ -10496,7 +10517,9 @@ var GroupListTemplate = {
|
|
|
10496
10517
|
{
|
|
10497
10518
|
Title: {},
|
|
10498
10519
|
List: {
|
|
10520
|
+
props: {},
|
|
10499
10521
|
Flex: {
|
|
10522
|
+
props: {},
|
|
10500
10523
|
...[
|
|
10501
10524
|
{ span: { text: "Item" } },
|
|
10502
10525
|
{ span: { text: "Item" } },
|
|
@@ -10508,7 +10531,9 @@ var GroupListTemplate = {
|
|
|
10508
10531
|
{
|
|
10509
10532
|
Title: {},
|
|
10510
10533
|
List: {
|
|
10534
|
+
props: {},
|
|
10511
10535
|
Flex: {
|
|
10536
|
+
props: {},
|
|
10512
10537
|
...[
|
|
10513
10538
|
{ span: { text: "Item" } },
|
|
10514
10539
|
{ span: { text: "Item" } },
|
|
@@ -10706,8 +10731,9 @@ var TimeSwitcher = {
|
|
|
10706
10731
|
".active": { theme: "primary" }
|
|
10707
10732
|
}),
|
|
10708
10733
|
on: {
|
|
10709
|
-
click: (event,
|
|
10710
|
-
|
|
10734
|
+
click: (event, { key, state }) => {
|
|
10735
|
+
console.log(event, key, state);
|
|
10736
|
+
state.update({ activeShift: key });
|
|
10711
10737
|
}
|
|
10712
10738
|
}
|
|
10713
10739
|
},
|
|
@@ -11979,7 +12005,7 @@ var ConvertCard = {
|
|
|
11979
12005
|
}
|
|
11980
12006
|
};
|
|
11981
12007
|
|
|
11982
|
-
//
|
|
12008
|
+
// Card/CurrencyConvertCard.js
|
|
11983
12009
|
var CurrencyConvert = {
|
|
11984
12010
|
extend: Modal,
|
|
11985
12011
|
props: {
|
|
@@ -12019,10 +12045,32 @@ var CurrencyConvert = {
|
|
|
12019
12045
|
margin: "- -X2 -X2"
|
|
12020
12046
|
},
|
|
12021
12047
|
CommonButton: {
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12048
|
+
extend: {
|
|
12049
|
+
extend: "Button",
|
|
12050
|
+
props: {
|
|
12051
|
+
theme: "primary",
|
|
12052
|
+
boxSize: "fit-content",
|
|
12053
|
+
padding: "A A2",
|
|
12054
|
+
round: "Z2",
|
|
12055
|
+
gap: "Y2",
|
|
12056
|
+
position: "relative"
|
|
12057
|
+
},
|
|
12058
|
+
Icon: {
|
|
12059
|
+
props: { fontSize: "C" }
|
|
12060
|
+
},
|
|
12061
|
+
Caption: {
|
|
12062
|
+
props: {
|
|
12063
|
+
text: "Button",
|
|
12064
|
+
line_height: "1em"
|
|
12065
|
+
}
|
|
12066
|
+
}
|
|
12067
|
+
},
|
|
12068
|
+
props: {
|
|
12069
|
+
flex: "1",
|
|
12070
|
+
padding: "Z1 -",
|
|
12071
|
+
round: "Z",
|
|
12072
|
+
Caption: { text: "Convert", fontWeight: "500" }
|
|
12073
|
+
}
|
|
12026
12074
|
}
|
|
12027
12075
|
}
|
|
12028
12076
|
};
|