@infinite-table/infinite-react 3.3.2 → 3.3.3
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/index.dev.js +35 -5
- package/index.dev.mjs +35 -5
- package/index.js +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
package/index.dev.js
CHANGED
|
@@ -18800,7 +18800,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18800
18800
|
}
|
|
18801
18801
|
let valid2 = isValidLicense(licenseKey, {
|
|
18802
18802
|
publishedAt: 1624970570587,
|
|
18803
|
-
version: "3.3.
|
|
18803
|
+
version: "3.3.3"
|
|
18804
18804
|
});
|
|
18805
18805
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18806
18806
|
return true;
|
|
@@ -19576,6 +19576,12 @@ function handleBrowserFocusChangeOnKeyboardNavigation(context, event) {
|
|
|
19576
19576
|
var KeyModifierAliases = {
|
|
19577
19577
|
control: "ctrl"
|
|
19578
19578
|
};
|
|
19579
|
+
var CmdOrCtrlAliases = {
|
|
19580
|
+
"control|cmd": "ctrl",
|
|
19581
|
+
"cmd|control": "ctrl",
|
|
19582
|
+
"ctrl|cmd": "ctrl",
|
|
19583
|
+
"cmd|ctrl": "ctrl"
|
|
19584
|
+
};
|
|
19579
19585
|
var KeyAliases = {
|
|
19580
19586
|
esc: "escape"
|
|
19581
19587
|
};
|
|
@@ -19587,6 +19593,7 @@ var keyModifierChecker = {
|
|
|
19587
19593
|
};
|
|
19588
19594
|
var keyModifierNames = Object.keys(keyModifierChecker);
|
|
19589
19595
|
var keyModifierSet = new Set(keyModifierNames);
|
|
19596
|
+
var allowedStarModifiers = /* @__PURE__ */ new Set(["shift", "alt"]);
|
|
19590
19597
|
function eventMatchesKeyboardShortcut(event, keyDescriptors) {
|
|
19591
19598
|
if (!Array.isArray(keyDescriptors)) {
|
|
19592
19599
|
return eventMatchesSingleShortcut(event, keyDescriptors);
|
|
@@ -19597,7 +19604,13 @@ function eventMatchesKeyboardShortcut(event, keyDescriptors) {
|
|
|
19597
19604
|
}
|
|
19598
19605
|
function eventMatchesSingleShortcut(event, keyDescriptor) {
|
|
19599
19606
|
const keyLowercase = event.key.toLowerCase();
|
|
19600
|
-
const
|
|
19607
|
+
const splitPartsLowercase = keyDescriptor.split("+").map((part) => part.toLowerCase().trim());
|
|
19608
|
+
const hasCmdOrCtrlAlias = splitPartsLowercase.find(
|
|
19609
|
+
(part) => CmdOrCtrlAliases[part]
|
|
19610
|
+
);
|
|
19611
|
+
const parts = splitPartsLowercase.map(
|
|
19612
|
+
(part) => KeyModifierAliases[part] || CmdOrCtrlAliases[part] || KeyAliases[part] || part
|
|
19613
|
+
);
|
|
19601
19614
|
const expectedModifiers = parts.filter(
|
|
19602
19615
|
(part) => keyModifierSet.has(part)
|
|
19603
19616
|
);
|
|
@@ -19608,6 +19621,10 @@ function eventMatchesSingleShortcut(event, keyDescriptor) {
|
|
|
19608
19621
|
acc[modifier] = keyModifierChecker[modifier](event);
|
|
19609
19622
|
return acc;
|
|
19610
19623
|
}, {});
|
|
19624
|
+
if (hasCmdOrCtrlAlias && currentModifierMatches.cmd) {
|
|
19625
|
+
currentModifierMatches.cmd = false;
|
|
19626
|
+
currentModifierMatches.ctrl = true;
|
|
19627
|
+
}
|
|
19611
19628
|
const currentModifierMatchesList = Object.keys(currentModifierMatches).filter(
|
|
19612
19629
|
(key) => currentModifierMatches[key]
|
|
19613
19630
|
);
|
|
@@ -19617,13 +19634,26 @@ function eventMatchesSingleShortcut(event, keyDescriptor) {
|
|
|
19617
19634
|
if (!hasAllModifiers) {
|
|
19618
19635
|
return false;
|
|
19619
19636
|
}
|
|
19620
|
-
|
|
19621
|
-
|
|
19637
|
+
const hasStar = nonModifierParts.includes("*");
|
|
19638
|
+
if (!hasStar) {
|
|
19639
|
+
if (expectedModifiers.length != currentModifierMatchesList.length) {
|
|
19640
|
+
return false;
|
|
19641
|
+
}
|
|
19642
|
+
} else {
|
|
19643
|
+
if (currentModifierMatchesList.length < expectedModifiers.length) {
|
|
19644
|
+
return false;
|
|
19645
|
+
}
|
|
19646
|
+
const nonAllowedModifiers = currentModifierMatchesList.filter(
|
|
19647
|
+
(modifier) => !allowedStarModifiers.has(modifier)
|
|
19648
|
+
);
|
|
19649
|
+
if (nonAllowedModifiers.length) {
|
|
19650
|
+
return false;
|
|
19651
|
+
}
|
|
19622
19652
|
}
|
|
19623
19653
|
if (!nonModifierParts.length) {
|
|
19624
19654
|
return false;
|
|
19625
19655
|
}
|
|
19626
|
-
if (keyModifierSet.has(keyLowercase)) {
|
|
19656
|
+
if (keyModifierSet.has(keyLowercase) || keyLowercase === "meta" || KeyModifierAliases[keyLowercase]) {
|
|
19627
19657
|
return false;
|
|
19628
19658
|
}
|
|
19629
19659
|
return nonModifierParts.reduce((acc, part) => {
|
package/index.dev.mjs
CHANGED
|
@@ -18773,7 +18773,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18773
18773
|
}
|
|
18774
18774
|
let valid2 = isValidLicense(licenseKey, {
|
|
18775
18775
|
publishedAt: 1624970570587,
|
|
18776
|
-
version: "3.3.
|
|
18776
|
+
version: "3.3.3"
|
|
18777
18777
|
});
|
|
18778
18778
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18779
18779
|
return true;
|
|
@@ -19549,6 +19549,12 @@ function handleBrowserFocusChangeOnKeyboardNavigation(context, event) {
|
|
|
19549
19549
|
var KeyModifierAliases = {
|
|
19550
19550
|
control: "ctrl"
|
|
19551
19551
|
};
|
|
19552
|
+
var CmdOrCtrlAliases = {
|
|
19553
|
+
"control|cmd": "ctrl",
|
|
19554
|
+
"cmd|control": "ctrl",
|
|
19555
|
+
"ctrl|cmd": "ctrl",
|
|
19556
|
+
"cmd|ctrl": "ctrl"
|
|
19557
|
+
};
|
|
19552
19558
|
var KeyAliases = {
|
|
19553
19559
|
esc: "escape"
|
|
19554
19560
|
};
|
|
@@ -19560,6 +19566,7 @@ var keyModifierChecker = {
|
|
|
19560
19566
|
};
|
|
19561
19567
|
var keyModifierNames = Object.keys(keyModifierChecker);
|
|
19562
19568
|
var keyModifierSet = new Set(keyModifierNames);
|
|
19569
|
+
var allowedStarModifiers = /* @__PURE__ */ new Set(["shift", "alt"]);
|
|
19563
19570
|
function eventMatchesKeyboardShortcut(event, keyDescriptors) {
|
|
19564
19571
|
if (!Array.isArray(keyDescriptors)) {
|
|
19565
19572
|
return eventMatchesSingleShortcut(event, keyDescriptors);
|
|
@@ -19570,7 +19577,13 @@ function eventMatchesKeyboardShortcut(event, keyDescriptors) {
|
|
|
19570
19577
|
}
|
|
19571
19578
|
function eventMatchesSingleShortcut(event, keyDescriptor) {
|
|
19572
19579
|
const keyLowercase = event.key.toLowerCase();
|
|
19573
|
-
const
|
|
19580
|
+
const splitPartsLowercase = keyDescriptor.split("+").map((part) => part.toLowerCase().trim());
|
|
19581
|
+
const hasCmdOrCtrlAlias = splitPartsLowercase.find(
|
|
19582
|
+
(part) => CmdOrCtrlAliases[part]
|
|
19583
|
+
);
|
|
19584
|
+
const parts = splitPartsLowercase.map(
|
|
19585
|
+
(part) => KeyModifierAliases[part] || CmdOrCtrlAliases[part] || KeyAliases[part] || part
|
|
19586
|
+
);
|
|
19574
19587
|
const expectedModifiers = parts.filter(
|
|
19575
19588
|
(part) => keyModifierSet.has(part)
|
|
19576
19589
|
);
|
|
@@ -19581,6 +19594,10 @@ function eventMatchesSingleShortcut(event, keyDescriptor) {
|
|
|
19581
19594
|
acc[modifier] = keyModifierChecker[modifier](event);
|
|
19582
19595
|
return acc;
|
|
19583
19596
|
}, {});
|
|
19597
|
+
if (hasCmdOrCtrlAlias && currentModifierMatches.cmd) {
|
|
19598
|
+
currentModifierMatches.cmd = false;
|
|
19599
|
+
currentModifierMatches.ctrl = true;
|
|
19600
|
+
}
|
|
19584
19601
|
const currentModifierMatchesList = Object.keys(currentModifierMatches).filter(
|
|
19585
19602
|
(key) => currentModifierMatches[key]
|
|
19586
19603
|
);
|
|
@@ -19590,13 +19607,26 @@ function eventMatchesSingleShortcut(event, keyDescriptor) {
|
|
|
19590
19607
|
if (!hasAllModifiers) {
|
|
19591
19608
|
return false;
|
|
19592
19609
|
}
|
|
19593
|
-
|
|
19594
|
-
|
|
19610
|
+
const hasStar = nonModifierParts.includes("*");
|
|
19611
|
+
if (!hasStar) {
|
|
19612
|
+
if (expectedModifiers.length != currentModifierMatchesList.length) {
|
|
19613
|
+
return false;
|
|
19614
|
+
}
|
|
19615
|
+
} else {
|
|
19616
|
+
if (currentModifierMatchesList.length < expectedModifiers.length) {
|
|
19617
|
+
return false;
|
|
19618
|
+
}
|
|
19619
|
+
const nonAllowedModifiers = currentModifierMatchesList.filter(
|
|
19620
|
+
(modifier) => !allowedStarModifiers.has(modifier)
|
|
19621
|
+
);
|
|
19622
|
+
if (nonAllowedModifiers.length) {
|
|
19623
|
+
return false;
|
|
19624
|
+
}
|
|
19595
19625
|
}
|
|
19596
19626
|
if (!nonModifierParts.length) {
|
|
19597
19627
|
return false;
|
|
19598
19628
|
}
|
|
19599
|
-
if (keyModifierSet.has(keyLowercase)) {
|
|
19629
|
+
if (keyModifierSet.has(keyLowercase) || keyLowercase === "meta" || KeyModifierAliases[keyLowercase]) {
|
|
19600
19630
|
return false;
|
|
19601
19631
|
}
|
|
19602
19632
|
return nonModifierParts.reduce((acc, part) => {
|