@boxcustodia/library 1.7.4 → 1.7.6
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.es100.js +1 -1
- package/dist/index.es105.js +3 -310
- package/dist/index.es106.js +4 -13
- package/dist/index.es107.js +15 -55
- package/dist/index.es108.js +4 -54
- package/dist/index.es109.js +56 -113
- package/dist/index.es110.js +27 -44
- package/dist/index.es111.js +21 -24
- package/dist/index.es112.js +10 -31
- package/dist/index.es113.js +55 -10
- package/dist/index.es114.js +53 -39
- package/dist/index.es115.js +113 -57
- package/dist/index.es116.js +44 -18
- package/dist/index.es117.js +22 -38
- package/dist/index.es118.js +29 -257
- package/dist/index.es119.js +14 -7
- package/dist/index.es120.js +310 -3
- package/dist/index.es121.js +13 -4
- package/dist/index.es122.js +58 -15
- package/dist/index.es123.js +39 -5
- package/dist/index.es124.js +13 -57
- package/dist/index.es125.js +14 -22
- package/dist/index.es126.js +39 -18
- package/dist/index.es127.js +17 -38
- package/dist/index.es128.js +41 -14
- package/dist/index.es129.js +1 -1
- package/dist/index.es130.js +23 -24
- package/dist/index.es134.js +259 -4
- package/dist/index.es135.js +19 -23
- package/dist/index.es136.js +7 -4
- package/dist/index.es137.js +3 -3
- package/dist/index.es138.js +10 -22
- package/dist/index.es139.js +6 -3
- package/dist/index.es140.js +846 -17
- package/dist/index.es141.js +4 -21
- package/dist/index.es142.js +4 -4
- package/dist/index.es143.js +69 -10
- package/dist/index.es144.js +4 -224
- package/dist/index.es145.js +224 -10
- package/dist/index.es146.js +10 -41
- package/dist/index.es147.js +41 -4
- package/dist/index.es148.js +237 -15
- package/dist/index.es149.js +4 -44
- package/dist/index.es150.js +19 -22
- package/dist/index.es151.js +21 -7
- package/dist/index.es152.js +18 -13
- package/dist/index.es153.js +40 -65
- package/dist/index.es154.js +32 -847
- package/dist/index.es155.js +5 -239
- package/dist/index.es156.js +22 -33
- package/dist/index.es157.js +10 -6
- package/dist/index.es158.js +215 -16
- package/dist/index.es159.js +78 -14
- package/dist/index.es16.js +1 -1
- package/dist/index.es160.js +92 -13
- package/dist/index.es161.js +352 -14
- package/dist/index.es162.js +120 -212
- package/dist/index.es163.js +16 -77
- package/dist/index.es164.js +14 -92
- package/dist/index.es165.js +13 -352
- package/dist/index.es166.js +14 -124
- package/dist/index.es167.js +2 -2
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +18 -14
- package/dist/index.es173.js +35 -32
- package/dist/index.es174.js +3674 -10
- package/dist/index.es175.js +5 -26
- package/dist/index.es176.js +2 -19
- package/dist/index.es177.js +20 -35
- package/dist/index.es178.js +33 -17
- package/dist/index.es179.js +7 -33
- package/dist/index.es18.js +1 -1
- package/dist/index.es180.js +25 -9
- package/dist/index.es181.js +205 -7
- package/dist/index.es182.js +12 -65
- package/dist/index.es183.js +31 -123
- package/dist/index.es184.js +10 -134
- package/dist/index.es185.js +45 -14
- package/dist/index.es186.js +6 -14
- package/dist/index.es187.js +68 -9
- package/dist/index.es188.js +122 -47
- package/dist/index.es189.js +133 -203
- package/dist/index.es190.js +14 -3675
- package/dist/index.es191.js +14 -5
- package/dist/index.es192.js +9 -2
- package/dist/index.es193.js +47 -42
- package/dist/index.es194.js +3 -649
- package/dist/index.es195.js +217 -3
- package/dist/index.es196.js +3 -217
- package/dist/index.es197.js +45 -3
- package/dist/index.es198.js +7 -45
- package/dist/index.es199.js +5 -7
- package/dist/index.es2.js +1 -1
- package/dist/index.es200.js +28 -6
- package/dist/index.es201.js +646 -24
- package/dist/index.es202.js +3 -2
- package/dist/index.es203.js +2 -4
- package/dist/index.es204.js +2052 -23
- package/dist/index.es205.js +26 -17
- package/dist/index.es206.js +2498 -37
- package/dist/index.es207.js +35 -18
- package/dist/index.es208.js +118 -3
- package/dist/index.es209.js +4 -2
- package/dist/index.es210.js +2 -2054
- package/dist/index.es211.js +7 -25
- package/dist/index.es212.js +5 -2498
- package/dist/index.es213.js +6 -35
- package/dist/index.es214.js +18 -118
- package/dist/index.es215.js +5 -5
- package/dist/index.es216.js +7 -84
- package/dist/index.es217.js +5 -5
- package/dist/index.es218.js +13 -17
- package/dist/index.es219.js +15 -9
- package/dist/index.es22.js +1 -1
- package/dist/index.es220.js +8 -6
- package/dist/index.es221.js +6 -5
- package/dist/index.es222.js +2 -2
- package/dist/index.es223.js +5 -11
- package/dist/index.es224.js +15 -19
- package/dist/index.es225.js +6 -14
- package/dist/index.es226.js +6 -6
- package/dist/index.es227.js +6 -6
- package/dist/index.es228.js +5 -53
- package/dist/index.es229.js +580 -10
- package/dist/index.es230.js +50 -7
- package/dist/index.es231.js +17 -10
- package/dist/index.es232.js +6 -7
- package/dist/index.es233.js +18 -16
- package/dist/index.es234.js +8 -6
- package/dist/index.es235.js +5 -5
- package/dist/index.es236.js +6 -7
- package/dist/index.es237.js +5 -10
- package/dist/index.es238.js +6 -11
- package/dist/index.es239.js +9 -7
- package/dist/index.es24.js +1 -1
- package/dist/index.es240.js +5 -5
- package/dist/index.es241.js +8 -5
- package/dist/index.es242.js +13 -7
- package/dist/index.es243.js +9 -5
- package/dist/index.es244.js +8 -13
- package/dist/index.es245.js +10 -15
- package/dist/index.es246.js +14 -8
- package/dist/index.es247.js +5 -5
- package/dist/index.es248.js +11 -4
- package/dist/index.es249.js +10 -580
- package/dist/index.es250.js +11 -50
- package/dist/index.es251.js +6 -17
- package/dist/index.es252.js +9 -6
- package/dist/index.es253.js +83 -18
- package/dist/index.es254.js +38 -8
- package/dist/index.es255.js +65 -7
- package/dist/index.es256.js +9 -7
- package/dist/index.es257.js +8 -5
- package/dist/index.es258.js +7 -6
- package/dist/index.es259.js +10 -9
- package/dist/index.es26.js +2 -2
- package/dist/index.es260.js +7 -5
- package/dist/index.es261.js +7 -8
- package/dist/index.es262.js +6 -12
- package/dist/index.es263.js +5 -9
- package/dist/index.es264.js +15 -10
- package/dist/index.es265.js +25 -15
- package/dist/index.es266.js +17 -39
- package/dist/index.es267.js +38 -65
- package/dist/index.es268.js +18 -10
- package/dist/index.es269.js +11 -8
- package/dist/index.es270.js +204 -7
- package/dist/index.es271.js +22 -8
- package/dist/index.es272.js +24 -15
- package/dist/index.es273.js +385 -170
- package/dist/index.es274.js +17 -29
- package/dist/index.es275.js +51 -203
- package/dist/index.es276.js +17 -22
- package/dist/index.es277.js +30 -24
- package/dist/index.es278.js +7 -392
- package/dist/index.es279.js +2 -8
- package/dist/index.es28.js +2 -2
- package/dist/index.es280.js +23 -2
- package/dist/index.es281.js +11 -11
- package/dist/index.es282.js +20 -22
- package/dist/index.es283.js +2 -21
- package/dist/index.es284.js +9406 -2
- package/dist/index.es285.js +14903 -8997
- package/dist/index.es286.js +3 -15312
- package/dist/index.es287.js +61 -3
- package/dist/index.es288.js +8 -59
- package/dist/index.es289.js +3 -10
- package/dist/index.es290.js +5 -3
- package/dist/index.es291.js +178 -5
- package/dist/index.es292.js +8 -12
- package/dist/index.es293.js +3 -8
- package/dist/index.es294.js +45 -3
- package/dist/index.es295.js +27 -43
- package/dist/index.es296.js +54 -26
- package/dist/index.es297.js +18 -55
- package/dist/index.es298.js +21 -19
- package/dist/index.es299.js +44 -21
- package/dist/index.es30.js +1 -1
- package/dist/index.es300.js +29 -42
- package/dist/index.es301.js +80 -28
- package/dist/index.es302.js +5 -82
- package/dist/index.es303.js +14 -6
- package/dist/index.es304.js +41 -12
- package/dist/index.es305.js +32 -42
- package/dist/index.es306.js +24 -30
- package/dist/index.es307.js +25 -27
- package/dist/index.es308.js +6 -24
- package/dist/index.es309.js +419 -6
- package/dist/index.es310.js +9 -417
- package/dist/index.es311.js +33 -11
- package/dist/index.es312.js +12 -35
- package/dist/index.es313.js +14 -24
- package/dist/index.es314.js +3 -29
- package/dist/index.es315.js +5 -5
- package/dist/index.es316.js +56 -14
- package/dist/index.es317.js +31 -3
- package/dist/index.es318.js +46 -4
- package/dist/index.es319.js +64 -54
- package/dist/index.es32.js +1 -1
- package/dist/index.es320.js +32 -25
- package/dist/index.es321.js +13 -41
- package/dist/index.es322.js +53 -47
- package/dist/index.es323.js +55 -20
- package/dist/index.es324.js +69 -13
- package/dist/index.es325.js +49 -47
- package/dist/index.es326.js +26 -53
- package/dist/index.es327.js +26 -54
- package/dist/index.es328.js +37 -53
- package/dist/index.es329.js +25 -22
- package/dist/index.es33.js +3 -3
- package/dist/index.es330.js +38 -38
- package/dist/index.es331.js +59 -40
- package/dist/index.es332.js +56 -27
- package/dist/index.es333.js +90 -34
- package/dist/index.es334.js +32 -63
- package/dist/index.es335.js +35 -66
- package/dist/index.es336.js +38 -94
- package/dist/index.es337.js +23 -39
- package/dist/index.es338.js +22 -39
- package/dist/index.es339.js +22 -39
- package/dist/index.es34.js +6 -6
- package/dist/index.es340.js +19 -19
- package/dist/index.es341.js +18 -18
- package/dist/index.es342.js +18 -18
- package/dist/index.es343.js +14 -25
- package/dist/index.es344.js +38 -22
- package/dist/index.es345.js +38 -22
- package/dist/index.es346.js +14 -14
- package/dist/index.es347.js +14 -40
- package/dist/index.es348.js +23 -44
- package/dist/index.es349.js +29 -20
- package/dist/index.es350.js +5 -20
- package/dist/index.es353.js +1 -1
- package/dist/index.es354.js +2 -2
- package/dist/index.es355.js +1 -1
- package/dist/index.es367.js +3 -3
- package/dist/index.es38.js +1 -1
- package/dist/index.es39.js +23 -23
- package/dist/index.es391.js +2 -2
- package/dist/index.es394.js +1 -1
- package/dist/index.es395.js +68 -5
- package/dist/index.es396.js +31 -3
- package/dist/index.es397.js +9 -24
- package/dist/index.es398.js +152 -109
- package/dist/index.es399.js +107 -15
- package/dist/index.es40.js +5 -5
- package/dist/index.es400.js +19 -67
- package/dist/index.es401.js +101 -31
- package/dist/index.es402.js +47 -9
- package/dist/index.es403.js +5 -153
- package/dist/index.es404.js +3 -108
- package/dist/index.es405.js +24 -68
- package/dist/index.es406.js +110 -31
- package/dist/index.es407.js +16 -16
- package/dist/index.es408.js +520 -138
- package/dist/index.es409.js +126 -113
- package/dist/index.es41.js +2 -2
- package/dist/index.es410.js +126 -17
- package/dist/index.es411.js +67 -100
- package/dist/index.es412.js +30 -46
- package/dist/index.es413.js +16 -6
- package/dist/index.es414.js +141 -15
- package/dist/index.es415.js +114 -2
- package/dist/index.es416.js +2 -8
- package/dist/index.es417.js +218 -314
- package/dist/index.es418.js +233 -49
- package/dist/index.es419.js +5 -3
- package/dist/index.es420.js +15 -2
- package/dist/index.es421.js +2 -231
- package/dist/index.es422.js +7 -233
- package/dist/index.es423.js +305 -501
- package/dist/index.es424.js +48 -125
- package/dist/index.es425.js +3 -128
- package/dist/index.es44.js +3 -3
- package/dist/index.es449.js +23 -270
- package/dist/index.es45.js +1 -1
- package/dist/index.es450.js +5 -79
- package/dist/index.es451.js +122 -160
- package/dist/index.es452.js +24 -24
- package/dist/index.es453.js +4 -5
- package/dist/index.es454.js +11 -126
- package/dist/index.es455.js +40 -22
- package/dist/index.es456.js +57 -4
- package/dist/index.es457.js +40 -11
- package/dist/index.es458.js +25 -39
- package/dist/index.es459.js +30 -56
- package/dist/index.es460.js +14 -41
- package/dist/index.es461.js +10 -28
- package/dist/index.es462.js +10 -31
- package/dist/index.es463.js +9 -14
- package/dist/index.es464.js +6 -10
- package/dist/index.es465.js +5 -10
- package/dist/index.es466.js +7 -9
- package/dist/index.es467.js +29 -6
- package/dist/index.es468.js +18 -5
- package/dist/index.es469.js +13 -7
- package/dist/index.es47.js +1 -1
- package/dist/index.es470.js +42 -28
- package/dist/index.es471.js +8 -18
- package/dist/index.es472.js +3 -14
- package/dist/index.es473.js +4 -43
- package/dist/index.es474.js +23 -7
- package/dist/index.es475.js +272 -3
- package/dist/index.es476.js +79 -4
- package/dist/index.es477.js +164 -23
- package/dist/index.es478.js +2 -2
- package/dist/index.es479.js +4 -4
- package/dist/index.es480.js +3 -3
- package/dist/index.es481.js +3 -3
- package/dist/index.es484.js +11 -11
- package/dist/index.es485.js +3 -3
- package/dist/index.es49.js +2 -2
- package/dist/index.es490.js +5 -5
- package/dist/index.es491.js +4 -4
- package/dist/index.es492.js +1 -1
- package/dist/index.es496.js +1 -1
- package/dist/index.es497.js +1 -1
- package/dist/index.es498.js +2 -2
- package/dist/index.es499.js +7 -56
- package/dist/index.es50.js +1 -1
- package/dist/index.es500.js +2 -13
- package/dist/index.es501.js +52 -21
- package/dist/index.es502.js +60 -55
- package/dist/index.es503.js +7 -33
- package/dist/index.es504.js +29 -167
- package/dist/index.es505.js +18 -119
- package/dist/index.es506.js +44 -7
- package/dist/index.es507.js +29 -19
- package/dist/index.es508.js +8 -33
- package/dist/index.es509.js +56 -20
- package/dist/index.es510.js +11 -43
- package/dist/index.es511.js +21 -29
- package/dist/index.es512.js +59 -8
- package/dist/index.es513.js +30 -228
- package/dist/index.es514.js +170 -20
- package/dist/index.es515.js +115 -23
- package/dist/index.es516.js +18 -117
- package/dist/index.es517.js +229 -35
- package/dist/index.es518.js +22 -72
- package/dist/index.es519.js +29 -7
- package/dist/index.es52.js +1 -1
- package/dist/index.es520.js +119 -2
- package/dist/index.es521.js +33 -48
- package/dist/index.es522.js +72 -65
- package/dist/index.es526.js +5 -63
- package/dist/index.es527.js +16 -69
- package/dist/index.es528.js +28 -8
- package/dist/index.es529.js +13 -14
- package/dist/index.es53.js +1 -1
- package/dist/index.es530.js +68 -61
- package/dist/index.es531.js +8 -15
- package/dist/index.es532.js +14 -29
- package/dist/index.es533.js +62 -13
- package/dist/index.es534.js +63 -5
- package/dist/index.es535.js +2 -2
- package/dist/index.es536.js +2 -76
- package/dist/index.es537.js +2 -93
- package/dist/index.es538.js +73 -49
- package/dist/index.es539.js +92 -7
- package/dist/index.es54.js +1 -1
- package/dist/index.es540.js +51 -4
- package/dist/index.es541.js +7 -51
- package/dist/index.es542.js +5 -2
- package/dist/index.es543.js +52 -2
- package/dist/index.es56.js +2 -2
- package/dist/index.es57.js +4 -4
- package/dist/index.es58.js +1 -1
- package/dist/index.es59.js +10 -10
- package/dist/index.es60.js +3 -3
- package/dist/index.es61.js +5 -5
- package/dist/index.es62.js +2 -2
- package/dist/index.es63.js +1 -1
- package/dist/index.es66.js +3 -3
- package/dist/index.es67.js +2 -2
- package/dist/index.es699.js +2 -42
- package/dist/index.es70.js +1 -1
- package/dist/index.es700.js +2 -72
- package/dist/index.es701.js +42 -6
- package/dist/index.es702.js +71 -5
- package/dist/index.es703.js +2 -2
- package/dist/index.es704.js +5 -5
- package/dist/index.es705.js +5 -5
- package/dist/index.es706.js +5 -5
- package/dist/index.es707.js +5 -5
- package/dist/index.es708.js +5 -5
- package/dist/index.es709.js +2 -2
- package/dist/index.es710.js +2 -2
- package/dist/index.es711.js +5 -5
- package/dist/index.es712.js +5 -5
- package/dist/index.es713.js +5 -5
- package/dist/index.es714.js +5 -5
- package/dist/index.es715.js +2 -2
- package/dist/index.es716.js +2 -2
- package/dist/index.es717.js +5 -5
- package/dist/index.es718.js +2 -2
- package/dist/index.es719.js +5 -5
- package/dist/index.es72.js +1 -1
- package/dist/index.es720.js +5 -5
- package/dist/index.es721.js +2 -2
- package/dist/index.es722.js +2 -2
- package/dist/index.es723.js +5 -5
- package/dist/index.es724.js +2 -2
- package/dist/index.es725.js +2 -2
- package/dist/index.es726.js +5 -5
- package/dist/index.es727.js +5 -5
- package/dist/index.es728.js +5 -5
- package/dist/index.es729.js +2 -2
- package/dist/index.es730.js +5 -5
- package/dist/index.es731.js +2 -2
- package/dist/index.es732.js +5 -5
- package/dist/index.es733.js +2 -2
- package/dist/index.es734.js +5 -5
- package/dist/index.es735.js +6 -2
- package/dist/index.es736.js +5 -1
- package/dist/index.es74.js +2 -2
- package/dist/index.es76.js +1 -1
- package/dist/index.es77.js +1 -1
- package/dist/index.es78.js +1 -1
- package/dist/index.es80.js +1 -1
- package/dist/index.es81.js +1 -1
- package/dist/index.es82.js +2 -2
- package/dist/index.es83.js +1 -1
- package/dist/index.es85.js +4 -4
- package/dist/index.es86.js +2 -2
- package/dist/index.es88.js +2 -2
- package/dist/index.es89.js +5 -5
- package/dist/index.es99.js +1 -1
- package/package.json +1 -1
package/dist/index.es510.js
CHANGED
|
@@ -1,47 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (!i) throw new Error(`Could not find intl message ${t} in ${r} locale`);
|
|
8
|
-
return i;
|
|
9
|
-
}
|
|
10
|
-
/** Returns all localized strings for the given locale. */
|
|
11
|
-
getStringsForLocale(t) {
|
|
12
|
-
let r = this.strings[t];
|
|
13
|
-
return r || (r = c(t, this.strings, this.defaultLocale), this.strings[t] = r), r;
|
|
14
|
-
}
|
|
15
|
-
static getGlobalDictionaryForPackage(t) {
|
|
16
|
-
if (typeof window > "u") return null;
|
|
17
|
-
let r = window[s];
|
|
18
|
-
if (o === void 0) {
|
|
19
|
-
let i = window[d];
|
|
20
|
-
if (!i) return null;
|
|
21
|
-
o = {};
|
|
22
|
-
for (let a in i) o[a] = new l({
|
|
23
|
-
[r]: i[a]
|
|
24
|
-
}, r);
|
|
25
|
-
}
|
|
26
|
-
let e = o == null ? void 0 : o[t];
|
|
27
|
-
if (!e) throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
|
|
28
|
-
return e;
|
|
29
|
-
}
|
|
30
|
-
constructor(t, r = "en-US") {
|
|
31
|
-
this.strings = Object.fromEntries(Object.entries(t).filter(([, e]) => e)), this.defaultLocale = r;
|
|
32
|
-
}
|
|
1
|
+
const b = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
function o(e, r) {
|
|
3
|
+
var t;
|
|
4
|
+
let { id: a } = (t = b.get(e)) !== null && t !== void 0 ? t : {};
|
|
5
|
+
if (!a) throw new Error("Unknown list");
|
|
6
|
+
return `${a}-${n(r)}`;
|
|
33
7
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
let e = g(n);
|
|
37
|
-
if (t[e]) return t[e];
|
|
38
|
-
for (let i in t)
|
|
39
|
-
if (i.startsWith(e + "-")) return t[i];
|
|
40
|
-
return t[r];
|
|
41
|
-
}
|
|
42
|
-
function g(n) {
|
|
43
|
-
return Intl.Locale ? new Intl.Locale(n).language : n.split("-")[0];
|
|
8
|
+
function n(e) {
|
|
9
|
+
return typeof e == "string" ? e.replace(/\s*/g, "") : "" + e;
|
|
44
10
|
}
|
|
45
11
|
export {
|
|
46
|
-
|
|
12
|
+
o as getRowId,
|
|
13
|
+
b as listMap,
|
|
14
|
+
n as normalizeKey
|
|
47
15
|
};
|
package/dist/index.es511.js
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
select(t, e) {
|
|
23
|
-
let l = t[e] || t.other;
|
|
24
|
-
return typeof l == "function" ? l() : l;
|
|
25
|
-
}
|
|
26
|
-
constructor(t, e) {
|
|
27
|
-
this.locale = t, this.strings = e;
|
|
28
|
-
}
|
|
1
|
+
import s from "./index.es702.js";
|
|
2
|
+
import { useDescription as l } from "./index.es467.js";
|
|
3
|
+
import { useInteractionModality as f } from "./index.es480.js";
|
|
4
|
+
import { useLocalizedStringFormatter as d } from "./index.es505.js";
|
|
5
|
+
import { useMemo as u } from "react";
|
|
6
|
+
function m(e) {
|
|
7
|
+
return e && e.__esModule ? e.default : e;
|
|
8
|
+
}
|
|
9
|
+
function x(e) {
|
|
10
|
+
let o = d(m(s), "@react-aria/grid"), t = f(), i = (t === "pointer" || t === "virtual" || t == null) && typeof window < "u" && "ontouchstart" in window, n = u(() => {
|
|
11
|
+
let a = e.selectionManager.selectionMode, c = e.selectionManager.selectionBehavior, r;
|
|
12
|
+
return i && (r = o.format("longPressToSelect")), c === "replace" && a !== "none" && e.hasItemActions ? r : void 0;
|
|
13
|
+
}, [
|
|
14
|
+
e.selectionManager.selectionMode,
|
|
15
|
+
e.selectionManager.selectionBehavior,
|
|
16
|
+
e.hasItemActions,
|
|
17
|
+
o,
|
|
18
|
+
i
|
|
19
|
+
]);
|
|
20
|
+
return l(n);
|
|
29
21
|
}
|
|
30
22
|
export {
|
|
31
|
-
|
|
23
|
+
x as useHighlightSelectionDescription
|
|
32
24
|
};
|
package/dist/index.es512.js
CHANGED
|
@@ -1,11 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import g from "./index.es702.js";
|
|
2
|
+
import { announce as p } from "./index.es294.js";
|
|
3
|
+
import { useUpdateEffect as $ } from "./index.es461.js";
|
|
4
|
+
import { useEffectEvent as x } from "./index.es469.js";
|
|
5
|
+
import { useLocalizedStringFormatter as v } from "./index.es505.js";
|
|
6
|
+
import { useRef as _ } from "react";
|
|
7
|
+
function y(o) {
|
|
8
|
+
return o && o.__esModule ? o.default : o;
|
|
9
|
+
}
|
|
10
|
+
function F(o, e) {
|
|
11
|
+
let { getRowText: c = (r) => {
|
|
12
|
+
var s, f, u, l;
|
|
13
|
+
return (l = (s = (f = e.collection).getTextValue) === null || s === void 0 ? void 0 : s.call(f, r)) !== null && l !== void 0 ? l : (u = e.collection.getItem(r)) === null || u === void 0 ? void 0 : u.textValue;
|
|
14
|
+
} } = o, n = v(y(g), "@react-aria/grid"), t = e.selectionManager.rawSelection, a = _(t), d = x(() => {
|
|
15
|
+
var r;
|
|
16
|
+
if (!e.selectionManager.isFocused || t === a.current) {
|
|
17
|
+
a.current = t;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
let s = m(t, a.current), f = m(a.current, t), u = e.selectionManager.selectionBehavior === "replace", l = [];
|
|
21
|
+
if (e.selectionManager.selectedKeys.size === 1 && u) {
|
|
22
|
+
if (e.collection.getItem(e.selectionManager.selectedKeys.keys().next().value)) {
|
|
23
|
+
let i = c(e.selectionManager.selectedKeys.keys().next().value);
|
|
24
|
+
i && l.push(n.format("selectedItem", {
|
|
25
|
+
item: i
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
} else if (s.size === 1 && f.size === 0) {
|
|
29
|
+
let i = c(s.keys().next().value);
|
|
30
|
+
i && l.push(n.format("selectedItem", {
|
|
31
|
+
item: i
|
|
32
|
+
}));
|
|
33
|
+
} else if (f.size === 1 && s.size === 0 && e.collection.getItem(f.keys().next().value)) {
|
|
34
|
+
let i = c(f.keys().next().value);
|
|
35
|
+
i && l.push(n.format("deselectedItem", {
|
|
36
|
+
item: i
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
e.selectionManager.selectionMode === "multiple" && (l.length === 0 || t === "all" || t.size > 1 || a.current === "all" || ((r = a.current) === null || r === void 0 ? void 0 : r.size) > 1) && l.push(t === "all" ? n.format("selectedAll") : n.format("selectedCount", {
|
|
40
|
+
count: t.size
|
|
41
|
+
})), l.length > 0 && p(l.join(" ")), a.current = t;
|
|
42
|
+
});
|
|
43
|
+
$(() => {
|
|
44
|
+
if (e.selectionManager.isFocused) d();
|
|
45
|
+
else {
|
|
46
|
+
let r = requestAnimationFrame(d);
|
|
47
|
+
return () => cancelAnimationFrame(r);
|
|
48
|
+
}
|
|
49
|
+
}, [
|
|
50
|
+
t,
|
|
51
|
+
e.selectionManager.isFocused
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
54
|
+
function m(o, e) {
|
|
55
|
+
let c = /* @__PURE__ */ new Set();
|
|
56
|
+
if (o === "all" || e === "all") return c;
|
|
57
|
+
for (let n of o.keys()) e.has(n) || c.add(n);
|
|
58
|
+
return c;
|
|
8
59
|
}
|
|
9
60
|
export {
|
|
10
|
-
|
|
61
|
+
F as useGridSelectionAnnouncement
|
|
11
62
|
};
|
package/dist/index.es513.js
CHANGED
|
@@ -1,234 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
let v = V(i, t), W = e.getItemProps(t);
|
|
30
|
-
v && re.open(v, l, W.href, W.routerOptions);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (e.setFocusedKey(t, p), e.isLink(t) && C === "override") return;
|
|
34
|
-
l.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(t) : b && !H(l) && e.replaceSelection(t);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
switch (l.key) {
|
|
38
|
-
case "ArrowDown":
|
|
39
|
-
if (o.getKeyBelow) {
|
|
40
|
-
var f, u, n;
|
|
41
|
-
let t = e.focusedKey != null ? (f = o.getKeyBelow) === null || f === void 0 ? void 0 : f.call(o, e.focusedKey) : (u = o.getFirstKey) === null || u === void 0 ? void 0 : u.call(o);
|
|
42
|
-
t == null && F && (t = (n = o.getFirstKey) === null || n === void 0 ? void 0 : n.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t));
|
|
43
|
-
}
|
|
44
|
-
break;
|
|
45
|
-
case "ArrowUp":
|
|
46
|
-
if (o.getKeyAbove) {
|
|
47
|
-
var a, d, P;
|
|
48
|
-
let t = e.focusedKey != null ? (a = o.getKeyAbove) === null || a === void 0 ? void 0 : a.call(o, e.focusedKey) : (d = o.getLastKey) === null || d === void 0 ? void 0 : d.call(o);
|
|
49
|
-
t == null && F && (t = (P = o.getLastKey) === null || P === void 0 ? void 0 : P.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t));
|
|
50
|
-
}
|
|
51
|
-
break;
|
|
52
|
-
case "ArrowLeft":
|
|
53
|
-
if (o.getKeyLeftOf) {
|
|
54
|
-
var k, A, I;
|
|
55
|
-
let t = e.focusedKey != null ? (k = o.getKeyLeftOf) === null || k === void 0 ? void 0 : k.call(o, e.focusedKey) : null;
|
|
56
|
-
t == null && F && (t = x === "rtl" ? (A = o.getFirstKey) === null || A === void 0 ? void 0 : A.call(o, e.focusedKey) : (I = o.getLastKey) === null || I === void 0 ? void 0 : I.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t, x === "rtl" ? "first" : "last"));
|
|
57
|
-
}
|
|
58
|
-
break;
|
|
59
|
-
case "ArrowRight":
|
|
60
|
-
if (o.getKeyRightOf) {
|
|
61
|
-
var M, R, O;
|
|
62
|
-
let t = e.focusedKey != null ? (M = o.getKeyRightOf) === null || M === void 0 ? void 0 : M.call(o, e.focusedKey) : null;
|
|
63
|
-
t == null && F && (t = x === "rtl" ? (R = o.getLastKey) === null || R === void 0 ? void 0 : R.call(o, e.focusedKey) : (O = o.getFirstKey) === null || O === void 0 ? void 0 : O.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t, x === "rtl" ? "last" : "first"));
|
|
64
|
-
}
|
|
65
|
-
break;
|
|
66
|
-
case "Home":
|
|
67
|
-
if (o.getFirstKey) {
|
|
68
|
-
if (e.focusedKey === null && l.shiftKey) return;
|
|
69
|
-
l.preventDefault();
|
|
70
|
-
let t = o.getFirstKey(e.focusedKey, $(l));
|
|
71
|
-
e.setFocusedKey(t), t != null && ($(l) && l.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(t) : b && e.replaceSelection(t));
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
case "End":
|
|
75
|
-
if (o.getLastKey) {
|
|
76
|
-
if (e.focusedKey === null && l.shiftKey) return;
|
|
77
|
-
l.preventDefault();
|
|
78
|
-
let t = o.getLastKey(e.focusedKey, $(l));
|
|
79
|
-
e.setFocusedKey(t), t != null && ($(l) && l.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(t) : b && e.replaceSelection(t));
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
case "PageDown":
|
|
83
|
-
if (o.getKeyPageBelow && e.focusedKey != null) {
|
|
84
|
-
let t = o.getKeyPageBelow(e.focusedKey);
|
|
85
|
-
t != null && (l.preventDefault(), c(t));
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
case "PageUp":
|
|
89
|
-
if (o.getKeyPageAbove && e.focusedKey != null) {
|
|
90
|
-
let t = o.getKeyPageAbove(e.focusedKey);
|
|
91
|
-
t != null && (l.preventDefault(), c(t));
|
|
92
|
-
}
|
|
93
|
-
break;
|
|
94
|
-
case "a":
|
|
95
|
-
$(l) && e.selectionMode === "multiple" && ee !== !0 && (l.preventDefault(), e.selectAll());
|
|
96
|
-
break;
|
|
97
|
-
case "Escape":
|
|
98
|
-
le === "clearSelection" && !_ && e.selectedKeys.size !== 0 && (l.stopPropagation(), l.preventDefault(), e.clearSelection());
|
|
99
|
-
break;
|
|
100
|
-
case "Tab":
|
|
101
|
-
if (!te) {
|
|
102
|
-
if (l.shiftKey) i.current.focus();
|
|
103
|
-
else {
|
|
104
|
-
let t = me(i.current, {
|
|
105
|
-
tabbable: !0
|
|
106
|
-
}), p, v;
|
|
107
|
-
do
|
|
108
|
-
v = t.lastChild(), v && (p = v);
|
|
109
|
-
while (v);
|
|
110
|
-
p && !p.contains(document.activeElement) && j(p);
|
|
111
|
-
}
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}, w = K({
|
|
116
|
-
top: 0,
|
|
117
|
-
left: 0
|
|
1
|
+
import { useSelectableCollection as n } from "./index.es517.js";
|
|
2
|
+
import { ListKeyboardDelegate as f } from "./index.es520.js";
|
|
3
|
+
import { useCollator as g } from "./index.es508.js";
|
|
4
|
+
import { useMemo as $ } from "react";
|
|
5
|
+
function D(a) {
|
|
6
|
+
let { selectionManager: l, collection: o, disabledKeys: t, ref: e, keyboardDelegate: r, layoutDelegate: s } = a, i = g({
|
|
7
|
+
usage: "search",
|
|
8
|
+
sensitivity: "base"
|
|
9
|
+
}), c = l.disabledBehavior, d = $(() => r || new f({
|
|
10
|
+
collection: o,
|
|
11
|
+
disabledKeys: t,
|
|
12
|
+
disabledBehavior: c,
|
|
13
|
+
ref: e,
|
|
14
|
+
collator: i,
|
|
15
|
+
layoutDelegate: s
|
|
16
|
+
}), [
|
|
17
|
+
r,
|
|
18
|
+
s,
|
|
19
|
+
o,
|
|
20
|
+
t,
|
|
21
|
+
e,
|
|
22
|
+
i,
|
|
23
|
+
c
|
|
24
|
+
]), { collectionProps: b } = n({
|
|
25
|
+
...a,
|
|
26
|
+
ref: e,
|
|
27
|
+
selectionManager: l,
|
|
28
|
+
keyboardDelegate: d
|
|
118
29
|
});
|
|
119
|
-
S(s, "scroll", B ? void 0 : () => {
|
|
120
|
-
var l, r, c, f;
|
|
121
|
-
w.current = {
|
|
122
|
-
top: (c = (l = s.current) === null || l === void 0 ? void 0 : l.scrollTop) !== null && c !== void 0 ? c : 0,
|
|
123
|
-
left: (f = (r = s.current) === null || r === void 0 ? void 0 : r.scrollLeft) !== null && f !== void 0 ? f : 0
|
|
124
|
-
};
|
|
125
|
-
});
|
|
126
|
-
let ie = (l) => {
|
|
127
|
-
if (e.isFocused) {
|
|
128
|
-
l.currentTarget.contains(l.target) || e.setFocused(!1);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
if (l.currentTarget.contains(l.target)) {
|
|
132
|
-
if (e.setFocused(!0), e.focusedKey == null) {
|
|
133
|
-
var r, c;
|
|
134
|
-
let n = (d) => {
|
|
135
|
-
d != null && (e.setFocusedKey(d), b && !e.isSelected(d) && e.replaceSelection(d));
|
|
136
|
-
}, a = l.relatedTarget;
|
|
137
|
-
var f, u;
|
|
138
|
-
a && l.currentTarget.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_FOLLOWING ? n((f = e.lastSelectedKey) !== null && f !== void 0 ? f : (r = o.getLastKey) === null || r === void 0 ? void 0 : r.call(o)) : n((u = e.firstSelectedKey) !== null && u !== void 0 ? u : (c = o.getFirstKey) === null || c === void 0 ? void 0 : c.call(o));
|
|
139
|
-
} else !B && s.current && (s.current.scrollTop = w.current.top, s.current.scrollLeft = w.current.left);
|
|
140
|
-
if (e.focusedKey != null && s.current) {
|
|
141
|
-
let n = V(i, e.focusedKey);
|
|
142
|
-
n instanceof HTMLElement && (!n.contains(document.activeElement) && !y && j(n), Y() === "keyboard" && J(n, {
|
|
143
|
-
containingElement: i.current
|
|
144
|
-
}));
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}, fe = (l) => {
|
|
148
|
-
l.currentTarget.contains(l.relatedTarget) || e.setFocused(!1);
|
|
149
|
-
}, m = K(!1);
|
|
150
|
-
S(i, ve, y ? (l) => {
|
|
151
|
-
let { detail: r } = l;
|
|
152
|
-
l.stopPropagation(), e.setFocused(!0), (r == null ? void 0 : r.focusStrategy) === "first" && (m.current = !0);
|
|
153
|
-
} : void 0);
|
|
154
|
-
let N = Q(() => {
|
|
155
|
-
var l, r;
|
|
156
|
-
let c = (r = (l = o.getFirstKey) === null || l === void 0 ? void 0 : l.call(o)) !== null && r !== void 0 ? r : null;
|
|
157
|
-
c == null ? ($e(i.current), e.collection.size > 0 && (m.current = !1)) : (e.setFocusedKey(c), m.current = !1);
|
|
158
|
-
});
|
|
159
|
-
q(() => {
|
|
160
|
-
m.current && N();
|
|
161
|
-
}, [
|
|
162
|
-
e.collection,
|
|
163
|
-
N
|
|
164
|
-
]);
|
|
165
|
-
let U = Q(() => {
|
|
166
|
-
e.collection.size > 0 && (m.current = !1);
|
|
167
|
-
});
|
|
168
|
-
q(() => {
|
|
169
|
-
U();
|
|
170
|
-
}, [
|
|
171
|
-
e.focusedKey,
|
|
172
|
-
U
|
|
173
|
-
]), S(i, ye, y ? (l) => {
|
|
174
|
-
var r;
|
|
175
|
-
l.stopPropagation(), e.setFocused(!1), !((r = l.detail) === null || r === void 0) && r.clearFocusKey && e.setFocusedKey(null);
|
|
176
|
-
} : void 0);
|
|
177
|
-
const z = K(h), T = K(!1);
|
|
178
|
-
X(() => {
|
|
179
|
-
if (z.current) {
|
|
180
|
-
var l, r;
|
|
181
|
-
let u = null;
|
|
182
|
-
var c;
|
|
183
|
-
h === "first" && (u = (c = (l = o.getFirstKey) === null || l === void 0 ? void 0 : l.call(o)) !== null && c !== void 0 ? c : null);
|
|
184
|
-
var f;
|
|
185
|
-
h === "last" && (u = (f = (r = o.getLastKey) === null || r === void 0 ? void 0 : r.call(o)) !== null && f !== void 0 ? f : null);
|
|
186
|
-
let n = e.selectedKeys;
|
|
187
|
-
if (n.size) {
|
|
188
|
-
for (let a of n) if (e.canSelectItem(a)) {
|
|
189
|
-
u = a;
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
e.setFocused(!0), e.setFocusedKey(u), u == null && !y && i.current && Z(i.current), e.collection.size > 0 && (z.current = !1, T.current = !0);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
let D = K(e.focusedKey);
|
|
197
|
-
X(() => {
|
|
198
|
-
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== D.current || T.current) && s.current && i.current) {
|
|
199
|
-
let l = Y(), r = V(i, e.focusedKey);
|
|
200
|
-
if (!(r instanceof HTMLElement))
|
|
201
|
-
return;
|
|
202
|
-
(l === "keyboard" || T.current) && (pe(s.current, r), l !== "virtual" && J(r, {
|
|
203
|
-
containingElement: i.current
|
|
204
|
-
}));
|
|
205
|
-
}
|
|
206
|
-
!y && e.isFocused && e.focusedKey == null && D.current != null && i.current && Z(i.current), D.current = e.focusedKey, T.current = !1;
|
|
207
|
-
}), S(i, "react-aria-focus-scope-restore", (l) => {
|
|
208
|
-
l.preventDefault(), e.setFocused(!0);
|
|
209
|
-
});
|
|
210
|
-
let E = {
|
|
211
|
-
onKeyDown: ce,
|
|
212
|
-
onFocus: ie,
|
|
213
|
-
onBlur: fe,
|
|
214
|
-
onMouseDown(l) {
|
|
215
|
-
s.current === l.target && l.preventDefault();
|
|
216
|
-
}
|
|
217
|
-
}, { typeSelectProps: ne } = ae({
|
|
218
|
-
keyboardDelegate: o,
|
|
219
|
-
selectionManager: e
|
|
220
|
-
});
|
|
221
|
-
oe || (E = G(ne, E));
|
|
222
|
-
let L;
|
|
223
|
-
y || (L = e.focusedKey == null ? 0 : -1);
|
|
224
|
-
let ue = se(e.collection);
|
|
225
30
|
return {
|
|
226
|
-
|
|
227
|
-
tabIndex: L,
|
|
228
|
-
"data-collection": ue
|
|
229
|
-
})
|
|
31
|
+
listProps: b
|
|
230
32
|
};
|
|
231
33
|
}
|
|
232
34
|
export {
|
|
233
|
-
|
|
35
|
+
D as useSelectableList
|
|
234
36
|
};
|
package/dist/index.es514.js
CHANGED
|
@@ -1,24 +1,174 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { listMap as X, getRowId as M } from "./index.es510.js";
|
|
2
|
+
import { useSlotId as Y } from "./index.es296.js";
|
|
3
|
+
import { chain as j } from "./index.es450.js";
|
|
4
|
+
import { mergeProps as I } from "./index.es297.js";
|
|
5
|
+
import { useSyntheticLinkProps as q } from "./index.es456.js";
|
|
6
|
+
import { getScrollParent as u } from "./index.es464.js";
|
|
7
|
+
import { scrollIntoViewport as p } from "./index.es470.js";
|
|
8
|
+
import { getFocusableTreeWalker as L } from "./index.es309.js";
|
|
9
|
+
import { isFocusVisible as H } from "./index.es480.js";
|
|
10
|
+
import { focusSafely as c } from "./index.es491.js";
|
|
11
|
+
import { getLastItem as J } from "./index.es495.js";
|
|
12
|
+
import { useRef as Q } from "react";
|
|
13
|
+
import { useSelectableItem as Z } from "./index.es515.js";
|
|
14
|
+
import { useLocale as _ } from "./index.es503.js";
|
|
15
|
+
const D = {
|
|
16
|
+
expand: {
|
|
17
|
+
ltr: "ArrowRight",
|
|
18
|
+
rtl: "ArrowLeft"
|
|
19
|
+
},
|
|
20
|
+
collapse: {
|
|
21
|
+
ltr: "ArrowLeft",
|
|
22
|
+
rtl: "ArrowRight"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function be(b, r, n) {
|
|
26
|
+
var v, m;
|
|
27
|
+
let { node: e, isVirtualized: P, shouldSelectOnPressUp: V } = b, { direction: d } = _(), { onAction: f, linkBehavior: F, keyboardNavigationBehavior: $ } = X.get(r), y = Y(), g = Q(null), z = () => {
|
|
28
|
+
var o;
|
|
29
|
+
n.current !== null && (g.current != null && e.key !== g.current || !(!((o = n.current) === null || o === void 0) && o.contains(document.activeElement))) && c(n.current);
|
|
30
|
+
}, E = {}, s = b.hasChildItems, B = r.selectionManager.isLink(e.key);
|
|
31
|
+
if (e != null && "expandedKeys" in r) {
|
|
32
|
+
var k, K, x;
|
|
33
|
+
let o = (k = (K = r.collection).getChildren) === null || k === void 0 ? void 0 : k.call(K, e.key);
|
|
34
|
+
s = s || [
|
|
35
|
+
...o ?? []
|
|
36
|
+
].length > 1, f == null && !B && r.selectionManager.selectionMode === "none" && s && (f = () => r.toggleKey(e.key));
|
|
37
|
+
let i = s ? r.expandedKeys.has(e.key) : void 0, a = 1;
|
|
38
|
+
var h;
|
|
39
|
+
if (e.level > 0 && (e == null ? void 0 : e.parentKey) != null) {
|
|
40
|
+
let t = r.collection.getItem(e.parentKey);
|
|
41
|
+
if (t) {
|
|
42
|
+
var w, A;
|
|
43
|
+
let l = (w = (A = r.collection).getChildren) === null || w === void 0 ? void 0 : w.call(A, t.key);
|
|
44
|
+
a = J(l).index + 1;
|
|
45
|
+
}
|
|
46
|
+
} else a = ((h = (x = [
|
|
47
|
+
...r.collection
|
|
48
|
+
].filter((t) => t.level === 0).at(-1)) === null || x === void 0 ? void 0 : x.index) !== null && h !== void 0 ? h : 0) + 1;
|
|
49
|
+
E = {
|
|
50
|
+
"aria-expanded": i,
|
|
51
|
+
"aria-level": e.level + 1,
|
|
52
|
+
"aria-posinset": (e == null ? void 0 : e.index) + 1,
|
|
53
|
+
"aria-setsize": a
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
let { itemProps: C, ...N } = Z({
|
|
57
|
+
selectionManager: r.selectionManager,
|
|
58
|
+
key: e.key,
|
|
59
|
+
ref: n,
|
|
60
|
+
isVirtualized: P,
|
|
61
|
+
shouldSelectOnPressUp: V,
|
|
62
|
+
onAction: f || !((v = e.props) === null || v === void 0) && v.onAction ? j((m = e.props) === null || m === void 0 ? void 0 : m.onAction, f ? () => f(e.key) : void 0) : void 0,
|
|
63
|
+
focus: z,
|
|
64
|
+
linkBehavior: F
|
|
65
|
+
}), O = (o) => {
|
|
66
|
+
if (!o.currentTarget.contains(o.target) || !n.current || !document.activeElement) return;
|
|
67
|
+
let i = L(n.current);
|
|
68
|
+
if (i.currentNode = document.activeElement, "expandedKeys" in r && document.activeElement === n.current) {
|
|
69
|
+
if (o.key === D.expand[d] && r.selectionManager.focusedKey === e.key && s && !r.expandedKeys.has(e.key)) {
|
|
70
|
+
r.toggleKey(e.key), o.stopPropagation();
|
|
71
|
+
return;
|
|
72
|
+
} else if (o.key === D.collapse[d] && r.selectionManager.focusedKey === e.key && s && r.expandedKeys.has(e.key)) {
|
|
73
|
+
r.toggleKey(e.key), o.stopPropagation();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
switch (o.key) {
|
|
78
|
+
case "ArrowLeft":
|
|
79
|
+
if ($ === "arrow") {
|
|
80
|
+
let t = d === "rtl" ? i.nextNode() : i.previousNode();
|
|
81
|
+
if (t)
|
|
82
|
+
o.preventDefault(), o.stopPropagation(), c(t), p(t, {
|
|
83
|
+
containingElement: u(n.current)
|
|
84
|
+
});
|
|
85
|
+
else if (o.preventDefault(), o.stopPropagation(), d === "rtl")
|
|
86
|
+
c(n.current), p(n.current, {
|
|
87
|
+
containingElement: u(n.current)
|
|
88
|
+
});
|
|
89
|
+
else {
|
|
90
|
+
i.currentNode = n.current;
|
|
91
|
+
let l = R(i);
|
|
92
|
+
l && (c(l), p(l, {
|
|
93
|
+
containingElement: u(n.current)
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case "ArrowRight":
|
|
99
|
+
if ($ === "arrow") {
|
|
100
|
+
let t = d === "rtl" ? i.previousNode() : i.nextNode();
|
|
101
|
+
if (t)
|
|
102
|
+
o.preventDefault(), o.stopPropagation(), c(t), p(t, {
|
|
103
|
+
containingElement: u(n.current)
|
|
104
|
+
});
|
|
105
|
+
else if (o.preventDefault(), o.stopPropagation(), d === "ltr")
|
|
106
|
+
c(n.current), p(n.current, {
|
|
107
|
+
containingElement: u(n.current)
|
|
108
|
+
});
|
|
109
|
+
else {
|
|
110
|
+
i.currentNode = n.current;
|
|
111
|
+
let l = R(i);
|
|
112
|
+
l && (c(l), p(l, {
|
|
113
|
+
containingElement: u(n.current)
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
case "ArrowUp":
|
|
119
|
+
case "ArrowDown":
|
|
120
|
+
if (!o.altKey && n.current.contains(o.target)) {
|
|
121
|
+
var a;
|
|
122
|
+
o.stopPropagation(), o.preventDefault(), (a = n.current.parentElement) === null || a === void 0 || a.dispatchEvent(new KeyboardEvent(o.nativeEvent.type, o.nativeEvent));
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
case "Tab":
|
|
126
|
+
if ($ === "tab") {
|
|
127
|
+
let t = L(n.current, {
|
|
128
|
+
tabbable: !0
|
|
129
|
+
});
|
|
130
|
+
t.currentNode = document.activeElement, (o.shiftKey ? t.previousNode() : t.nextNode()) && o.stopPropagation();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, U = (o) => {
|
|
134
|
+
if (g.current = e.key, o.target !== n.current) {
|
|
135
|
+
H() || r.selectionManager.setFocusedKey(e.key);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
}, T = q(e.props), G = N.hasAction ? T : {}, S = I(C, G, {
|
|
139
|
+
role: "row",
|
|
140
|
+
onKeyDownCapture: O,
|
|
141
|
+
onFocus: U,
|
|
142
|
+
// 'aria-label': [(node.textValue || undefined), rowAnnouncement].filter(Boolean).join(', '),
|
|
143
|
+
"aria-label": e.textValue || void 0,
|
|
144
|
+
"aria-selected": r.selectionManager.canSelectItem(e.key) ? r.selectionManager.isSelected(e.key) : void 0,
|
|
145
|
+
"aria-disabled": r.selectionManager.isDisabled(e.key) || void 0,
|
|
146
|
+
"aria-labelledby": y && e.textValue ? `${M(r, e.key)} ${y}` : void 0,
|
|
147
|
+
id: M(r, e.key)
|
|
148
|
+
});
|
|
149
|
+
P && (S["aria-rowindex"] = e.index + 1);
|
|
150
|
+
let W = {
|
|
151
|
+
role: "gridcell",
|
|
152
|
+
"aria-colindex": 1
|
|
153
|
+
};
|
|
154
|
+
return {
|
|
155
|
+
rowProps: {
|
|
156
|
+
...I(S, E)
|
|
157
|
+
},
|
|
158
|
+
gridCellProps: W,
|
|
159
|
+
descriptionProps: {
|
|
160
|
+
id: y
|
|
161
|
+
},
|
|
162
|
+
...N
|
|
163
|
+
};
|
|
15
164
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
165
|
+
function R(b) {
|
|
166
|
+
let r = null, n = null;
|
|
167
|
+
do
|
|
168
|
+
n = b.lastChild(), n && (r = n);
|
|
169
|
+
while (n);
|
|
170
|
+
return r;
|
|
18
171
|
}
|
|
19
172
|
export {
|
|
20
|
-
|
|
21
|
-
u as getItemElement,
|
|
22
|
-
d as isNonContiguousSelectionModifier,
|
|
23
|
-
b as useCollectionId
|
|
173
|
+
be as useGridListItem
|
|
24
174
|
};
|