ekm-ui 0.4.78 → 0.4.80
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/.turbo/turbo-build.log +66 -66
- package/CHANGELOG.md +12 -0
- package/dist/account-manager.js +3 -2
- package/dist/card-payment-block.js +6 -6
- package/dist/card.d.ts +10 -8
- package/dist/card.js +2 -1
- package/dist/{chunk-4W4WTADE.js → chunk-GEVKTAHT.js} +2 -2
- package/dist/chunk-IJV4UGKJ.js +11 -0
- package/dist/chunk-IJV4UGKJ.js.map +1 -0
- package/dist/chunk-KVZTQHFG.js +12 -0
- package/dist/chunk-KVZTQHFG.js.map +1 -0
- package/dist/{chunk-7N46B7WB.js → chunk-NQSJ4LIX.js} +2 -2
- package/dist/chunk-P654OT65.js +10 -0
- package/dist/chunk-P654OT65.js.map +1 -0
- package/dist/{chunk-JCKC5HYU.js → chunk-YOAHY5KX.js} +4 -4
- package/dist/country-picker/country-modal.js +6 -6
- package/dist/cross-sell/service-card.js +2 -2
- package/dist/drag-and-drop.js +6 -6
- package/dist/file-picker/file-listing.js +1 -1
- package/dist/file-picker/file-picker.js +6 -6
- package/dist/index.js +6 -6
- package/dist/layout/layout.js +6 -6
- package/dist/product-picker/product-listing.js +1 -1
- package/dist/product-picker/product-modal.js +6 -6
- package/dist/stacked-list-item.js +6 -6
- package/dist/table-result-block.js +6 -6
- package/package.json +1 -1
- package/src/card.tsx +8 -2
- package/src/file-picker/file-listing.tsx +18 -15
- package/src/product-picker/product-listing.tsx +10 -13
- package/dist/chunk-34CKZLNN.js +0 -12
- package/dist/chunk-34CKZLNN.js.map +0 -1
- package/dist/chunk-FAGTVKGV.js +0 -9
- package/dist/chunk-FAGTVKGV.js.map +0 -1
- package/dist/chunk-FPXEE5TC.js +0 -11
- package/dist/chunk-FPXEE5TC.js.map +0 -1
- /package/dist/{chunk-4W4WTADE.js.map → chunk-GEVKTAHT.js.map} +0 -0
- /package/dist/{chunk-7N46B7WB.js.map → chunk-NQSJ4LIX.js.map} +0 -0
- /package/dist/{chunk-JCKC5HYU.js.map → chunk-YOAHY5KX.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as a$i } from './chunk-
|
|
1
|
+
import { a as a$i } from './chunk-KVZTQHFG.js';
|
|
2
2
|
import { a as a$e } from './chunk-PSYIXRU7.js';
|
|
3
3
|
import { a as a$8, b } from './chunk-HVNLAQA6.js';
|
|
4
|
-
import { a as a$j } from './chunk-
|
|
4
|
+
import { a as a$j } from './chunk-IJV4UGKJ.js';
|
|
5
5
|
import { a as a$9 } from './chunk-XXP5K6Y4.js';
|
|
6
6
|
import { a as a$k } from './chunk-Q4MYDT2M.js';
|
|
7
7
|
import { a as a$d } from './chunk-AO5TGD7T.js';
|
|
@@ -14,7 +14,7 @@ import { a as a$b } from './chunk-NDDDT4TO.js';
|
|
|
14
14
|
import { a as a$6 } from './chunk-IPAI4R3G.js';
|
|
15
15
|
import { a as a$5 } from './chunk-F7K7HAXY.js';
|
|
16
16
|
import { a as a$2 } from './chunk-CYOCZEOE.js';
|
|
17
|
-
import { a as a$3 } from './chunk-
|
|
17
|
+
import { a as a$3 } from './chunk-P654OT65.js';
|
|
18
18
|
import { a as a$h } from './chunk-5SEJVYKM.js';
|
|
19
19
|
import { a as a$f } from './chunk-2OPJLYW6.js';
|
|
20
20
|
import { a as a$g } from './chunk-UJ5AEZKA.js';
|
|
@@ -34,4 +34,4 @@ function Xe({cardPayment:r,enablePayPal:e}){return jsxs(a$3,{className:"border-0
|
|
|
34
34
|
|
|
35
35
|
export { nr as a, Nr as b, le as c, Fe as d, K as e, Ye as f, ir as g, Xe as h };
|
|
36
36
|
//# sourceMappingURL=out.js.map
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-YOAHY5KX.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { g as CountryPicker } from '../chunk-
|
|
1
|
+
export { g as CountryPicker } from '../chunk-YOAHY5KX.js';
|
|
2
2
|
import '../chunk-DBTCX3TP.js';
|
|
3
3
|
import '../chunk-YZ2YZSNQ.js';
|
|
4
4
|
import '../chunk-GVNUAH45.js';
|
|
5
5
|
import '../chunk-JAR3LP2K.js';
|
|
6
6
|
import '../chunk-FOWKHGHJ.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-KVZTQHFG.js';
|
|
8
8
|
import '../chunk-PSYIXRU7.js';
|
|
9
9
|
import '../chunk-HVNLAQA6.js';
|
|
10
10
|
import '../chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import '../chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import '../chunk-7Q6OMA2A.js';
|
|
19
19
|
import '../chunk-RTRHNOTP.js';
|
|
20
20
|
import '../chunk-XABECXZS.js';
|
|
21
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-IJV4UGKJ.js';
|
|
22
22
|
import '../chunk-XXP5K6Y4.js';
|
|
23
23
|
import '../chunk-LWTESXND.js';
|
|
24
24
|
import '../chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import '../chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import '../chunk-Q4MYDT2M.js';
|
|
27
27
|
import '../chunk-VE6J42I7.js';
|
|
28
28
|
import '../chunk-DCVOMIPI.js';
|
|
29
|
-
import '../chunk-
|
|
29
|
+
import '../chunk-NQSJ4LIX.js';
|
|
30
30
|
import '../chunk-SBGTFQOD.js';
|
|
31
31
|
import '../chunk-IJMS44H4.js';
|
|
32
32
|
import '../chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import '../chunk-TU4FTVZK.js';
|
|
|
65
65
|
import '../chunk-4FSPYK2A.js';
|
|
66
66
|
import '../chunk-CYOCZEOE.js';
|
|
67
67
|
import '../chunk-WLWG565K.js';
|
|
68
|
-
import '../chunk-
|
|
69
|
-
import '../chunk-
|
|
68
|
+
import '../chunk-GEVKTAHT.js';
|
|
69
|
+
import '../chunk-P654OT65.js';
|
|
70
70
|
import '../chunk-5SEJVYKM.js';
|
|
71
71
|
import '../chunk-2ATHCBLY.js';
|
|
72
72
|
import '../chunk-2OPJLYW6.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as ServiceCard } from '../chunk-
|
|
1
|
+
export { a as ServiceCard } from '../chunk-NQSJ4LIX.js';
|
|
2
2
|
import '../chunk-SBGTFQOD.js';
|
|
3
3
|
import '../chunk-CYOCZEOE.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-P654OT65.js';
|
|
5
5
|
import '../chunk-TJMI4DH2.js';
|
|
6
6
|
import '../chunk-6LHL364H.js';
|
|
7
7
|
import '../chunk-Z4LPO673.js';
|
package/dist/drag-and-drop.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { c as DragAndDrop } from './chunk-
|
|
1
|
+
export { c as DragAndDrop } from './chunk-YOAHY5KX.js';
|
|
2
2
|
import './chunk-DBTCX3TP.js';
|
|
3
3
|
import './chunk-YZ2YZSNQ.js';
|
|
4
4
|
import './chunk-GVNUAH45.js';
|
|
5
5
|
import './chunk-JAR3LP2K.js';
|
|
6
6
|
import './chunk-FOWKHGHJ.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-KVZTQHFG.js';
|
|
8
8
|
import './chunk-PSYIXRU7.js';
|
|
9
9
|
import './chunk-HVNLAQA6.js';
|
|
10
10
|
import './chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import './chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import './chunk-7Q6OMA2A.js';
|
|
19
19
|
import './chunk-RTRHNOTP.js';
|
|
20
20
|
import './chunk-XABECXZS.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-IJV4UGKJ.js';
|
|
22
22
|
import './chunk-XXP5K6Y4.js';
|
|
23
23
|
import './chunk-LWTESXND.js';
|
|
24
24
|
import './chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import './chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import './chunk-Q4MYDT2M.js';
|
|
27
27
|
import './chunk-VE6J42I7.js';
|
|
28
28
|
import './chunk-DCVOMIPI.js';
|
|
29
|
-
import './chunk-
|
|
29
|
+
import './chunk-NQSJ4LIX.js';
|
|
30
30
|
import './chunk-SBGTFQOD.js';
|
|
31
31
|
import './chunk-IJMS44H4.js';
|
|
32
32
|
import './chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import './chunk-TU4FTVZK.js';
|
|
|
65
65
|
import './chunk-4FSPYK2A.js';
|
|
66
66
|
import './chunk-CYOCZEOE.js';
|
|
67
67
|
import './chunk-WLWG565K.js';
|
|
68
|
-
import './chunk-
|
|
69
|
-
import './chunk-
|
|
68
|
+
import './chunk-GEVKTAHT.js';
|
|
69
|
+
import './chunk-P654OT65.js';
|
|
70
70
|
import './chunk-5SEJVYKM.js';
|
|
71
71
|
import './chunk-2ATHCBLY.js';
|
|
72
72
|
import './chunk-2OPJLYW6.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { d as FilePicker } from '../chunk-
|
|
1
|
+
export { d as FilePicker } from '../chunk-YOAHY5KX.js';
|
|
2
2
|
import '../chunk-DBTCX3TP.js';
|
|
3
3
|
import '../chunk-YZ2YZSNQ.js';
|
|
4
4
|
import '../chunk-GVNUAH45.js';
|
|
5
5
|
import '../chunk-JAR3LP2K.js';
|
|
6
6
|
import '../chunk-FOWKHGHJ.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-KVZTQHFG.js';
|
|
8
8
|
import '../chunk-PSYIXRU7.js';
|
|
9
9
|
import '../chunk-HVNLAQA6.js';
|
|
10
10
|
import '../chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import '../chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import '../chunk-7Q6OMA2A.js';
|
|
19
19
|
import '../chunk-RTRHNOTP.js';
|
|
20
20
|
import '../chunk-XABECXZS.js';
|
|
21
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-IJV4UGKJ.js';
|
|
22
22
|
import '../chunk-XXP5K6Y4.js';
|
|
23
23
|
import '../chunk-LWTESXND.js';
|
|
24
24
|
import '../chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import '../chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import '../chunk-Q4MYDT2M.js';
|
|
27
27
|
import '../chunk-VE6J42I7.js';
|
|
28
28
|
import '../chunk-DCVOMIPI.js';
|
|
29
|
-
import '../chunk-
|
|
29
|
+
import '../chunk-NQSJ4LIX.js';
|
|
30
30
|
import '../chunk-SBGTFQOD.js';
|
|
31
31
|
import '../chunk-IJMS44H4.js';
|
|
32
32
|
import '../chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import '../chunk-TU4FTVZK.js';
|
|
|
65
65
|
import '../chunk-4FSPYK2A.js';
|
|
66
66
|
import '../chunk-CYOCZEOE.js';
|
|
67
67
|
import '../chunk-WLWG565K.js';
|
|
68
|
-
import '../chunk-
|
|
69
|
-
import '../chunk-
|
|
68
|
+
import '../chunk-GEVKTAHT.js';
|
|
69
|
+
import '../chunk-P654OT65.js';
|
|
70
70
|
import '../chunk-5SEJVYKM.js';
|
|
71
71
|
import '../chunk-2ATHCBLY.js';
|
|
72
72
|
import '../chunk-2OPJLYW6.js';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { h as CardPaymentBlock, g as CountryPicker, c as DragAndDrop, d as FilePicker, b as Layout, f as ProductPicker, a as StackedListItem, e as TableResultBlock } from './chunk-
|
|
1
|
+
export { h as CardPaymentBlock, g as CountryPicker, c as DragAndDrop, d as FilePicker, b as Layout, f as ProductPicker, a as StackedListItem, e as TableResultBlock } from './chunk-YOAHY5KX.js';
|
|
2
2
|
export { a as TableHeader } from './chunk-DBTCX3TP.js';
|
|
3
3
|
export { b as ToastProvider, c as useToast } from './chunk-YZ2YZSNQ.js';
|
|
4
4
|
export { a as NBUI_Footer } from './chunk-GVNUAH45.js';
|
|
5
5
|
export { a as NBUI_Page_Layout } from './chunk-JAR3LP2K.js';
|
|
6
6
|
export { a as Pagination } from './chunk-FOWKHGHJ.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-KVZTQHFG.js';
|
|
8
8
|
export { a as Search } from './chunk-PSYIXRU7.js';
|
|
9
9
|
export { b as Sidebar } from './chunk-HVNLAQA6.js';
|
|
10
10
|
export { a as Sort } from './chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ export { a as NBUI_Card } from './chunk-XKE3VK6Z.js';
|
|
|
18
18
|
export { a as NBUI_Container } from './chunk-7Q6OMA2A.js';
|
|
19
19
|
export { a as StaffPickCard } from './chunk-RTRHNOTP.js';
|
|
20
20
|
export { a as FeaturePageGroup } from './chunk-XABECXZS.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-IJV4UGKJ.js';
|
|
22
22
|
export { a as Navbar } from './chunk-XXP5K6Y4.js';
|
|
23
23
|
export { a as NBUI_Card_Form } from './chunk-LWTESXND.js';
|
|
24
24
|
export { a as VideoDashboardNotification } from './chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ export { a as VideoModal } from './chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import './chunk-Q4MYDT2M.js';
|
|
27
27
|
export { a as CrossSellCarousel } from './chunk-VE6J42I7.js';
|
|
28
28
|
export { a as ServiceCallbackBanner } from './chunk-DCVOMIPI.js';
|
|
29
|
-
export { a as ServiceCard } from './chunk-
|
|
29
|
+
export { a as ServiceCard } from './chunk-NQSJ4LIX.js';
|
|
30
30
|
import './chunk-SBGTFQOD.js';
|
|
31
31
|
export { a as FeatureCard } from './chunk-IJMS44H4.js';
|
|
32
32
|
export { a as Spinner } from './chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ export { a as DateTimeComponent } from './chunk-TU4FTVZK.js';
|
|
|
65
65
|
import './chunk-4FSPYK2A.js';
|
|
66
66
|
export { a as Button } from './chunk-CYOCZEOE.js';
|
|
67
67
|
export { b as Accordion } from './chunk-WLWG565K.js';
|
|
68
|
-
export { a as AccountManager } from './chunk-
|
|
69
|
-
export { a as Card } from './chunk-
|
|
68
|
+
export { a as AccountManager } from './chunk-GEVKTAHT.js';
|
|
69
|
+
export { a as Card } from './chunk-P654OT65.js';
|
|
70
70
|
export { a as AlertBanner } from './chunk-5SEJVYKM.js';
|
|
71
71
|
export { a as Alert } from './chunk-2ATHCBLY.js';
|
|
72
72
|
export { a as Avatar } from './chunk-2OPJLYW6.js';
|
package/dist/layout/layout.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { b as Layout } from '../chunk-
|
|
1
|
+
export { b as Layout } from '../chunk-YOAHY5KX.js';
|
|
2
2
|
import '../chunk-DBTCX3TP.js';
|
|
3
3
|
import '../chunk-YZ2YZSNQ.js';
|
|
4
4
|
import '../chunk-GVNUAH45.js';
|
|
5
5
|
import '../chunk-JAR3LP2K.js';
|
|
6
6
|
import '../chunk-FOWKHGHJ.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-KVZTQHFG.js';
|
|
8
8
|
import '../chunk-PSYIXRU7.js';
|
|
9
9
|
import '../chunk-HVNLAQA6.js';
|
|
10
10
|
import '../chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import '../chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import '../chunk-7Q6OMA2A.js';
|
|
19
19
|
import '../chunk-RTRHNOTP.js';
|
|
20
20
|
import '../chunk-XABECXZS.js';
|
|
21
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-IJV4UGKJ.js';
|
|
22
22
|
import '../chunk-XXP5K6Y4.js';
|
|
23
23
|
import '../chunk-LWTESXND.js';
|
|
24
24
|
import '../chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import '../chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import '../chunk-Q4MYDT2M.js';
|
|
27
27
|
import '../chunk-VE6J42I7.js';
|
|
28
28
|
import '../chunk-DCVOMIPI.js';
|
|
29
|
-
import '../chunk-
|
|
29
|
+
import '../chunk-NQSJ4LIX.js';
|
|
30
30
|
import '../chunk-SBGTFQOD.js';
|
|
31
31
|
import '../chunk-IJMS44H4.js';
|
|
32
32
|
import '../chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import '../chunk-TU4FTVZK.js';
|
|
|
65
65
|
import '../chunk-4FSPYK2A.js';
|
|
66
66
|
import '../chunk-CYOCZEOE.js';
|
|
67
67
|
import '../chunk-WLWG565K.js';
|
|
68
|
-
import '../chunk-
|
|
69
|
-
import '../chunk-
|
|
68
|
+
import '../chunk-GEVKTAHT.js';
|
|
69
|
+
import '../chunk-P654OT65.js';
|
|
70
70
|
import '../chunk-5SEJVYKM.js';
|
|
71
71
|
import '../chunk-2ATHCBLY.js';
|
|
72
72
|
import '../chunk-2OPJLYW6.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { f as ProductPicker } from '../chunk-
|
|
1
|
+
export { f as ProductPicker } from '../chunk-YOAHY5KX.js';
|
|
2
2
|
import '../chunk-DBTCX3TP.js';
|
|
3
3
|
import '../chunk-YZ2YZSNQ.js';
|
|
4
4
|
import '../chunk-GVNUAH45.js';
|
|
5
5
|
import '../chunk-JAR3LP2K.js';
|
|
6
6
|
import '../chunk-FOWKHGHJ.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-KVZTQHFG.js';
|
|
8
8
|
import '../chunk-PSYIXRU7.js';
|
|
9
9
|
import '../chunk-HVNLAQA6.js';
|
|
10
10
|
import '../chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import '../chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import '../chunk-7Q6OMA2A.js';
|
|
19
19
|
import '../chunk-RTRHNOTP.js';
|
|
20
20
|
import '../chunk-XABECXZS.js';
|
|
21
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-IJV4UGKJ.js';
|
|
22
22
|
import '../chunk-XXP5K6Y4.js';
|
|
23
23
|
import '../chunk-LWTESXND.js';
|
|
24
24
|
import '../chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import '../chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import '../chunk-Q4MYDT2M.js';
|
|
27
27
|
import '../chunk-VE6J42I7.js';
|
|
28
28
|
import '../chunk-DCVOMIPI.js';
|
|
29
|
-
import '../chunk-
|
|
29
|
+
import '../chunk-NQSJ4LIX.js';
|
|
30
30
|
import '../chunk-SBGTFQOD.js';
|
|
31
31
|
import '../chunk-IJMS44H4.js';
|
|
32
32
|
import '../chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import '../chunk-TU4FTVZK.js';
|
|
|
65
65
|
import '../chunk-4FSPYK2A.js';
|
|
66
66
|
import '../chunk-CYOCZEOE.js';
|
|
67
67
|
import '../chunk-WLWG565K.js';
|
|
68
|
-
import '../chunk-
|
|
69
|
-
import '../chunk-
|
|
68
|
+
import '../chunk-GEVKTAHT.js';
|
|
69
|
+
import '../chunk-P654OT65.js';
|
|
70
70
|
import '../chunk-5SEJVYKM.js';
|
|
71
71
|
import '../chunk-2ATHCBLY.js';
|
|
72
72
|
import '../chunk-2OPJLYW6.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { a as StackedListItem } from './chunk-
|
|
1
|
+
export { a as StackedListItem } from './chunk-YOAHY5KX.js';
|
|
2
2
|
import './chunk-DBTCX3TP.js';
|
|
3
3
|
import './chunk-YZ2YZSNQ.js';
|
|
4
4
|
import './chunk-GVNUAH45.js';
|
|
5
5
|
import './chunk-JAR3LP2K.js';
|
|
6
6
|
import './chunk-FOWKHGHJ.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-KVZTQHFG.js';
|
|
8
8
|
import './chunk-PSYIXRU7.js';
|
|
9
9
|
import './chunk-HVNLAQA6.js';
|
|
10
10
|
import './chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import './chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import './chunk-7Q6OMA2A.js';
|
|
19
19
|
import './chunk-RTRHNOTP.js';
|
|
20
20
|
import './chunk-XABECXZS.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-IJV4UGKJ.js';
|
|
22
22
|
import './chunk-XXP5K6Y4.js';
|
|
23
23
|
import './chunk-LWTESXND.js';
|
|
24
24
|
import './chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import './chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import './chunk-Q4MYDT2M.js';
|
|
27
27
|
import './chunk-VE6J42I7.js';
|
|
28
28
|
import './chunk-DCVOMIPI.js';
|
|
29
|
-
import './chunk-
|
|
29
|
+
import './chunk-NQSJ4LIX.js';
|
|
30
30
|
import './chunk-SBGTFQOD.js';
|
|
31
31
|
import './chunk-IJMS44H4.js';
|
|
32
32
|
import './chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import './chunk-TU4FTVZK.js';
|
|
|
65
65
|
import './chunk-4FSPYK2A.js';
|
|
66
66
|
import './chunk-CYOCZEOE.js';
|
|
67
67
|
import './chunk-WLWG565K.js';
|
|
68
|
-
import './chunk-
|
|
69
|
-
import './chunk-
|
|
68
|
+
import './chunk-GEVKTAHT.js';
|
|
69
|
+
import './chunk-P654OT65.js';
|
|
70
70
|
import './chunk-5SEJVYKM.js';
|
|
71
71
|
import './chunk-2ATHCBLY.js';
|
|
72
72
|
import './chunk-2OPJLYW6.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { e as TableResultBlock } from './chunk-
|
|
1
|
+
export { e as TableResultBlock } from './chunk-YOAHY5KX.js';
|
|
2
2
|
import './chunk-DBTCX3TP.js';
|
|
3
3
|
import './chunk-YZ2YZSNQ.js';
|
|
4
4
|
import './chunk-GVNUAH45.js';
|
|
5
5
|
import './chunk-JAR3LP2K.js';
|
|
6
6
|
import './chunk-FOWKHGHJ.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-KVZTQHFG.js';
|
|
8
8
|
import './chunk-PSYIXRU7.js';
|
|
9
9
|
import './chunk-HVNLAQA6.js';
|
|
10
10
|
import './chunk-HW7AZG2V.js';
|
|
@@ -18,7 +18,7 @@ import './chunk-XKE3VK6Z.js';
|
|
|
18
18
|
import './chunk-7Q6OMA2A.js';
|
|
19
19
|
import './chunk-RTRHNOTP.js';
|
|
20
20
|
import './chunk-XABECXZS.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-IJV4UGKJ.js';
|
|
22
22
|
import './chunk-XXP5K6Y4.js';
|
|
23
23
|
import './chunk-LWTESXND.js';
|
|
24
24
|
import './chunk-LIXVY47P.js';
|
|
@@ -26,7 +26,7 @@ import './chunk-Y5DEGGVQ.js';
|
|
|
26
26
|
import './chunk-Q4MYDT2M.js';
|
|
27
27
|
import './chunk-VE6J42I7.js';
|
|
28
28
|
import './chunk-DCVOMIPI.js';
|
|
29
|
-
import './chunk-
|
|
29
|
+
import './chunk-NQSJ4LIX.js';
|
|
30
30
|
import './chunk-SBGTFQOD.js';
|
|
31
31
|
import './chunk-IJMS44H4.js';
|
|
32
32
|
import './chunk-AO5TGD7T.js';
|
|
@@ -65,8 +65,8 @@ import './chunk-TU4FTVZK.js';
|
|
|
65
65
|
import './chunk-4FSPYK2A.js';
|
|
66
66
|
import './chunk-CYOCZEOE.js';
|
|
67
67
|
import './chunk-WLWG565K.js';
|
|
68
|
-
import './chunk-
|
|
69
|
-
import './chunk-
|
|
68
|
+
import './chunk-GEVKTAHT.js';
|
|
69
|
+
import './chunk-P654OT65.js';
|
|
70
70
|
import './chunk-5SEJVYKM.js';
|
|
71
71
|
import './chunk-2ATHCBLY.js';
|
|
72
72
|
import './chunk-2OPJLYW6.js';
|
package/package.json
CHANGED
package/src/card.tsx
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
1
|
import { twMerge } from "tailwind-merge";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type CardProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
paddingClass?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export function Card({ className, paddingClass = undefined, children, ...props }: CardProps) {
|
|
5
11
|
return (
|
|
6
12
|
<div
|
|
7
13
|
className={twMerge(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import { useEffect, useRef } from "react";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { Radio } from "../radio";
|
|
5
5
|
|
|
6
6
|
// FOR USE WITH THE FILE PICKER COMPONENT - ONLY
|
|
@@ -15,25 +15,27 @@ export default function Listing({
|
|
|
15
15
|
callback,
|
|
16
16
|
}) {
|
|
17
17
|
const scrollRef = useRef();
|
|
18
|
+
const [showLoader, setShowLoader] = useState(false);
|
|
18
19
|
|
|
19
20
|
useEffect(() => {
|
|
20
|
-
const element = document.querySelector("#img-file-list");
|
|
21
|
-
if (element && !element.hasAttribute("scroll"))
|
|
22
|
-
scrollRef.current.addEventListener("scroll", handleScroll);
|
|
23
21
|
if (scrollRef.current != null) scrollRef.current.scrollTop = 0;
|
|
24
|
-
return () => {
|
|
25
|
-
const element = document.querySelector("#img-file-list");
|
|
26
|
-
if (element && element.hasAttribute("scroll"))
|
|
27
|
-
scrollRef.current.removeEventListener("scroll", handleScroll);
|
|
28
|
-
};
|
|
29
22
|
}, []);
|
|
30
23
|
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if(showLoader) setShowLoader(false)
|
|
26
|
+
}, [files])
|
|
27
|
+
|
|
28
|
+
const isMoreRef = useRef(isMore);
|
|
29
|
+
const showLoaderRef = useRef(showLoader);
|
|
30
|
+
useEffect(() => { isMoreRef.current = isMore; }, [isMore]);
|
|
31
|
+
useEffect(() => { showLoaderRef.current = showLoader; }, [showLoader]);
|
|
32
|
+
|
|
31
33
|
const handleScroll = () => {
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
if (!isMoreRef.current) return;
|
|
35
|
+
const { scrollHeight, offsetHeight, scrollTop } = scrollRef.current;
|
|
36
|
+
const offset = scrollHeight - offsetHeight;
|
|
37
|
+
if (Math.floor(scrollTop) >= Math.floor(offset) && !showLoaderRef.current) {
|
|
38
|
+
setShowLoader(true);
|
|
37
39
|
callback({ type: "FETCH_DATA", payload: true });
|
|
38
40
|
}
|
|
39
41
|
};
|
|
@@ -49,6 +51,7 @@ export default function Listing({
|
|
|
49
51
|
<div
|
|
50
52
|
id="img-file-list"
|
|
51
53
|
ref={scrollRef}
|
|
54
|
+
onScroll={handleScroll}
|
|
52
55
|
className={`${border} overflow-y-auto overflow-x-auto lg:overflow-x-hidden rounded-md border`}
|
|
53
56
|
>
|
|
54
57
|
{(files || []).map((f) => {
|
|
@@ -61,7 +64,7 @@ export default function Listing({
|
|
|
61
64
|
/>
|
|
62
65
|
);
|
|
63
66
|
})}
|
|
64
|
-
{isMore && page < pages && <InfiniteLoader />}
|
|
67
|
+
{isMore && page < pages && showLoader && <InfiniteLoader />}
|
|
65
68
|
</div>
|
|
66
69
|
);
|
|
67
70
|
}
|
|
@@ -21,27 +21,23 @@ export function Listing({
|
|
|
21
21
|
const [showLoader, setShowLoader] = useState(false);
|
|
22
22
|
|
|
23
23
|
useEffect(() => {
|
|
24
|
-
const element = document.querySelector("#product-list");
|
|
25
|
-
if (element && !element.hasAttribute("scroll"))
|
|
26
|
-
scrollRef.current.addEventListener("scroll", handleScroll);
|
|
27
24
|
if (scrollRef.current != null) scrollRef.current.scrollTop = 0;
|
|
28
|
-
return () => {
|
|
29
|
-
const element = document.querySelector("#product-list");
|
|
30
|
-
if (element && element.hasAttribute("scroll"))
|
|
31
|
-
scrollRef.current.removeEventListener("scroll", handleScroll);
|
|
32
|
-
};
|
|
33
25
|
}, []);
|
|
34
26
|
|
|
35
27
|
useEffect(() => {
|
|
36
28
|
if(showLoader) setShowLoader(false)
|
|
37
29
|
}, [products])
|
|
38
30
|
|
|
31
|
+
const isMoreRef = useRef(isMore);
|
|
32
|
+
const showLoaderRef = useRef(showLoader);
|
|
33
|
+
useEffect(() => { isMoreRef.current = isMore; }, [isMore]);
|
|
34
|
+
useEffect(() => { showLoaderRef.current = showLoader; }, [showLoader]);
|
|
35
|
+
|
|
39
36
|
const handleScroll = () => {
|
|
40
|
-
if (!
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (scroll > offset && !showLoader) {
|
|
37
|
+
if (!isMoreRef.current) return;
|
|
38
|
+
const { scrollHeight, offsetHeight, scrollTop } = scrollRef.current;
|
|
39
|
+
const offset = scrollHeight - offsetHeight;
|
|
40
|
+
if (Math.floor(scrollTop) >= Math.floor(offset) && !showLoaderRef.current) {
|
|
45
41
|
setShowLoader(true);
|
|
46
42
|
callback({ type: "FETCH_DATA", payload: true });
|
|
47
43
|
}
|
|
@@ -55,6 +51,7 @@ export function Listing({
|
|
|
55
51
|
<div
|
|
56
52
|
id="product-list"
|
|
57
53
|
ref={scrollRef}
|
|
54
|
+
onScroll={handleScroll}
|
|
58
55
|
className={`h-[500px] overflow-y-auto rounded-md border`}
|
|
59
56
|
>
|
|
60
57
|
{(products || []).map((p) => {
|
package/dist/chunk-34CKZLNN.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-PGRADSYH.js';
|
|
2
|
-
import { a } from './chunk-6LHL364H.js';
|
|
3
|
-
import { e } from './chunk-Z4LPO673.js';
|
|
4
|
-
import x from 'pluralize';
|
|
5
|
-
import { useRef, useState, useEffect } from 'react';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var s=e(a(),1);function h(e){var o,l;return `${((o=window.resourceSettings)==null?void 0:o.imageBasePath)||""}${e}?v=${((l=window.resourceSettings)==null?void 0:l.version)||""}`}function P({products:e,isMore:o,selected:l,page:g,pages:u,callback:c}){let r=useRef(),[n,d]=useState(!1);useEffect(()=>{let a=document.querySelector("#product-list");return a&&!a.hasAttribute("scroll")&&r.current.addEventListener("scroll",i),r.current!=null&&(r.current.scrollTop=0),()=>{let f=document.querySelector("#product-list");f&&f.hasAttribute("scroll")&&r.current.removeEventListener("scroll",i);}},[]),useEffect(()=>{n&&d(!1);},[e]);let i=()=>{if(!o)return;let a=r.current.scrollHeight-r.current.offsetHeight;Math.floor(r.current.scrollTop)>a&&!n&&(d(!0),c({type:"FETCH_DATA",payload:!0}));},y=a=>{c({type:"SELECTION",payload:a});};return jsxs("div",{id:"product-list",ref:r,className:"h-[500px] overflow-y-auto rounded-md border",children:[(e||[]).map(a=>jsx(p,{product:a,selected:l.has(a.ProductId),callback:y},`product-row-${a.ProductId}`)),o&&g<u&&n&&jsx(k,{})]})}function p({product:e,selected:o,callback:l}){var u,c,r,n,d;let g=i=>{l(e.ProductId);};return jsxs("div",{className:`mb-1 mt-1 flex items-center pb-4 pt-4 ${o&&"bg-blue-50"} cursor-pointer justify-between border-b border-gray-100 st-productRow`,onClick:g,children:[jsxs("div",{className:"ml-3 flex items-center",children:[jsx("div",{className:"flex-shrink-0",children:jsx(a$1,{id:`cb-prod-${e.ProductId}`,name:e.Name,checked:o,onChange:()=>{}})}),jsx("div",{className:"ml-4 st-image",children:e.ImagePath&&e.ImageName!=="[URL-DownloadRequested]"?jsx("img",{className:"h-10 w-10 rounded-sm",src:e.ImagePath,alt:e.Name,onError:i=>{i.target.onerror=null,i.target.src=`${h("/admin/Content/images/no-image-discount.png")}`;}}):jsx("img",{src:h("/admin/Content/images/no-image-discount.png"),alt:e.Name,className:"h-10 w-10 rounded-sm"})}),jsxs("div",{className:"ml-4",children:[jsx("div",{className:" font-medium text-gray-900 st-name",children:e.Name}),((u=e.Categories)==null?void 0:u.length)>0?jsx("div",{className:"text-xs text-gray-500 st-category",children:`${e.CategoryName} & ${x("other",e.Categories.length,!0)}`}):jsx("div",{className:"text-xs text-gray-500 st-category",children:e.CategoryName})]})]}),jsx("div",{className:"ml-4 flex-shrink-0 st-price",children:jsx("span",{className:"mr-3 text-sm text-gray-500",children:`${(r=(c=globalThis.globalSettings)==null?void 0:c.CurrencySymbol)!=null?r:"\xA3"}${e.Price.toFixed((d=(n=globalThis.globalSettings)==null?void 0:n.CurrencyExponent)!=null?d:2)}`})})]})}P.propTypes={products:s.default.array,isMore:s.default.bool,selected:s.default.instanceOf(Set),page:s.default.number,pages:s.default.number,callback:s.default.func};p.propTypes={product:s.default.object,selected:s.default.bool,callback:s.default.func};function k(){return jsx("div",{className:"mb-1 mt-1 flex justify-center pb-4 pt-4",children:jsx("div",{role:"status",children:jsxs("svg",{"aria-hidden":"true",className:"inline-block h-8 w-8 animate-spin fill-gray-600 text-gray-200 dark:fill-gray-300 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})})}
|
|
9
|
-
|
|
10
|
-
export { P as a };
|
|
11
|
-
//# sourceMappingURL=out.js.map
|
|
12
|
-
//# sourceMappingURL=chunk-34CKZLNN.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/product-picker/product-listing.tsx"],"names":["import_prop_types","pluralize","useEffect","useRef","useState","jsx","jsxs","BuildImageUrl","imageUrl","_a","_b","Listing","products","isMore","selected","page","pages","callback","scrollRef","showLoader","setShowLoader","element","handleScroll","offset","handleProductSelection","id","p","ProductRow","InfiniteLoader","product","_c","_d","_e","e","Checkbox","PropTypes"],"mappings":"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","sourcesContent":["// @ts-nocheck\nimport pluralize from \"pluralize\";\nimport PropTypes from \"prop-types\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { Checkbox } from \"../checkbox\";\n// FOR USE WITH THE PRODUCT PICKER COMPONENT - ONLY\n\nfunction BuildImageUrl(imageUrl) {\n return `${window.resourceSettings?.imageBasePath || ''}${imageUrl}?v=${window.resourceSettings?.version || ''}`;\n}\n\nexport function Listing({\n products,\n isMore,\n selected,\n page,\n pages,\n callback,\n}) {\n const scrollRef = useRef();\n const [showLoader, setShowLoader] = useState(false);\n\n useEffect(() => {\n const element = document.querySelector(\"#product-list\");\n if (element && !element.hasAttribute(\"scroll\"))\n scrollRef.current.addEventListener(\"scroll\", handleScroll);\n if (scrollRef.current != null) scrollRef.current.scrollTop = 0;\n return () => {\n const element = document.querySelector(\"#product-list\");\n if (element && element.hasAttribute(\"scroll\"))\n scrollRef.current.removeEventListener(\"scroll\", handleScroll);\n };\n }, []);\n\n useEffect(() => {\n if(showLoader) setShowLoader(false)\n }, [products])\n\n const handleScroll = () => {\n if (!isMore) return;\n const offset =\n scrollRef.current.scrollHeight - scrollRef.current.offsetHeight;\n const scroll = Math.floor(scrollRef.current.scrollTop);\n if (scroll > offset && !showLoader) {\n setShowLoader(true);\n callback({ type: \"FETCH_DATA\", payload: true });\n }\n };\n\n const handleProductSelection = (id) => {\n callback({ type: \"SELECTION\", payload: id });\n };\n\n return (\n <div\n id=\"product-list\"\n ref={scrollRef}\n className={`h-[500px] overflow-y-auto rounded-md border`}\n >\n {(products || []).map((p) => {\n return (\n <ProductRow\n key={`product-row-${p.ProductId}`}\n product={p}\n selected={selected.has(p.ProductId)}\n callback={handleProductSelection}\n />\n );\n })}\n {isMore && page < pages && showLoader && <InfiniteLoader />}\n </div>\n );\n}\n\nfunction ProductRow({ product, selected, callback }) {\n const handleProductSelection = (e) => {\n callback(product.ProductId);\n };\n return (\n <div\n className={`mb-1 mt-1 flex items-center pb-4 pt-4 ${\n selected && \"bg-blue-50\"\n } cursor-pointer justify-between border-b border-gray-100 st-productRow`}\n onClick={handleProductSelection}\n >\n <div className=\"ml-3 flex items-center\">\n <div className=\"flex-shrink-0\">\n <Checkbox\n id={`cb-prod-${product.ProductId}`}\n name={product.Name}\n checked={selected}\n onChange={() => {}}\n />\n </div>\n <div className=\"ml-4 st-image\">\n {product.ImagePath && product.ImageName !== \"[URL-DownloadRequested]\" ? (\n <img\n className=\"h-10 w-10 rounded-sm\"\n src={product.ImagePath}\n alt={product.Name}\n onError={(e) => {\n e.target.onerror = null;\n e.target.src = `${BuildImageUrl(\n \"/admin/Content/images/no-image-discount.png\"\n )}`;\n }}\n />\n ) : (\n <img\n src={BuildImageUrl(\"/admin/Content/images/no-image-discount.png\")}\n alt={product.Name}\n className=\"h-10 w-10 rounded-sm\"\n />\n )}\n </div>\n <div className=\"ml-4\">\n <div className=\" font-medium text-gray-900 st-name\">{product.Name}</div>\n {product.Categories?.length > 0 ? (\n <div className=\"text-xs text-gray-500 st-category\">{`${\n product.CategoryName\n } & ${pluralize(\"other\", product.Categories.length, true)}`}</div>\n ) : (\n <div className=\"text-xs text-gray-500 st-category\">{product.CategoryName}</div>\n )}\n </div>\n </div>\n <div className=\"ml-4 flex-shrink-0 st-price\">\n <span className=\"mr-3 text-sm text-gray-500\">{`${\n globalThis.globalSettings?.CurrencySymbol ?? '£'\n }${product.Price.toFixed(\n globalThis.globalSettings?.CurrencyExponent ?? 2\n )}`}</span>\n </div>\n </div>\n );\n}\n\nListing.propTypes = {\n /** Array of products to list */\n products: PropTypes.array,\n /** Boolean to indicate if there are more products to load */\n isMore: PropTypes.bool,\n /** Set of selected ids */\n selected: PropTypes.instanceOf(Set),\n /** Current page */\n page: PropTypes.number,\n /** Total number of pages */\n pages: PropTypes.number,\n /** Callback function to handle events */\n callback: PropTypes.func,\n};\n\nProductRow.propTypes = {\n /** Product object to display */\n product: PropTypes.object,\n /** Boolean to indicate if the file is selected */\n selected: PropTypes.bool,\n /** Callback function to handle events */\n callback: PropTypes.func,\n};\n\nfunction InfiniteLoader() {\n return (\n <div className=\"mb-1 mt-1 flex justify-center pb-4 pt-4\">\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className=\"inline-block h-8 w-8 animate-spin fill-gray-600 text-gray-200 dark:fill-gray-300 dark:text-gray-600\"\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n </div>\n </div>\n );\n}\n"]}
|
package/dist/chunk-FAGTVKGV.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-TJMI4DH2.js';
|
|
2
|
-
import { c, b, a } from './chunk-Z4LPO673.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
function i(y){var d=y,{className:r,paddingClass:e=void 0,children:g}=d,f=c(d,["className","paddingClass","children"]);return jsx("div",b(a({className:a$1("flex flex-col rounded-lg border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",e||"px-4 py-4",r&&r)},f),{children:jsx("div",{className:"flex h-full flex-col justify-center gap-4",children:g})}))}i.displayName="Card";i.propTypes={className:PropTypes.string,paddingClass:PropTypes.string};
|
|
6
|
-
|
|
7
|
-
export { i as a };
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-FAGTVKGV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/card.tsx"],"names":["jsx","Card","_a","_b","className","paddingClass","children","props","__objRest","__spreadProps","__spreadValues","twMerge"],"mappings":"yFAaM,cAAAA,MAAA,oBAVC,SAASC,EAAKC,EAA6D,CAA7D,IAAAC,EAAAD,EAAE,WAAAE,EAAW,aAAAC,EAAe,OAAW,SAAAC,CAH5D,EAGqBH,EAAoDI,EAAAC,EAApDL,EAAoD,CAAlD,YAAW,eAA0B,aAC1D,OACEH,EAAC,MAAAS,EAAAC,EAAA,CACC,UAAWC,EACT,2GACAN,GAA8B,YAC9BD,GAAaA,CACf,GACIG,GANL,CAQC,SAAAP,EAAC,OAAI,UAAU,4CACZ,SAAAM,EACH,GACF,CAEJ,CAEAL,EAAK,YAAc,OAEnBA,EAAK,UAAY,CAEf,UAAW,UAAU,OAErB,aAAc,UAAU,MAC1B","sourcesContent":["//@ts-nocheck\nimport { twMerge } from \"tailwind-merge\";\n\nexport function Card({ className, paddingClass = undefined, children, ...props }) {\n return (\n <div\n className={twMerge(\n \"flex flex-col rounded-lg border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800\",\n paddingClass ? paddingClass : \"px-4 py-4\",\n className && className\n )}\n {...props}\n >\n <div className=\"flex h-full flex-col justify-center gap-4\">\n {children}\n </div>\n </div>\n );\n}\n\nCard.displayName = \"Card\";\n\nCard.propTypes = {\n /** Additional classes for the card container */\n className: PropTypes.string,\n /** Custom padding classes for the card container */\n paddingClass: PropTypes.string,\n};\n"]}
|
package/dist/chunk-FPXEE5TC.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-R3QJRZTP.js';
|
|
2
|
-
import { a } from './chunk-6LHL364H.js';
|
|
3
|
-
import { e } from './chunk-Z4LPO673.js';
|
|
4
|
-
import { useRef, useEffect } from 'react';
|
|
5
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var l=e(a(),1);function f({border:r,files:s,isMore:o,selected:c,page:v,pages:g,callback:m}){let a=useRef();useEffect(()=>{let t=document.querySelector("#img-file-list");return t&&!t.hasAttribute("scroll")&&a.current.addEventListener("scroll",d),a.current!=null&&(a.current.scrollTop=0),()=>{let n=document.querySelector("#img-file-list");n&&n.hasAttribute("scroll")&&a.current.removeEventListener("scroll",d);}},[]);let d=()=>{if(!o)return;let t=a.current.scrollHeight-a.current.offsetHeight;Math.floor(a.current.scrollTop)>t&&m({type:"FETCH_DATA",payload:!0});},y=t=>{m({type:"SELECTION",payload:c===t?"":t});};return jsxs("div",{id:"img-file-list",ref:a,className:`${r} overflow-y-auto overflow-x-auto lg:overflow-x-hidden rounded-md border`,children:[(s||[]).map(t=>jsx(p,{file:t,selected:c===t.Name,callback:y},`file-row-${t.Name}`)),o&&v<g&&jsx(x,{})]})}function p({file:r,selected:s=!1,callback:o}){return jsxs("div",{className:`mb-1 mt-1 flex items-center pb-4 pt-4 ${s&&"bg-blue-50"} cursor-pointer justify-between border-b border-gray-100`,onClick:()=>{o(r);},children:[jsxs("div",{className:"ml-3 flex items-center",children:[jsx("div",{className:"flex-shrink-0",children:jsx(a$1,{id:r.Name,name:r.Name,checked:s,readOnly:!0})}),jsx("div",{className:"ml-4",children:jsx("img",{className:"h-10 w-10 rounded-md",src:`https://files.ekmcdn.com/${r.Uri}`,alt:""})}),jsxs("div",{className:"ml-4",children:[jsx("div",{className:" font-medium text-gray-900",children:r.Name}),r.Size&&jsx("div",{className:"text-xs text-gray-500",children:r.Size})]})]}),jsx("div",{className:"ml-4 flex-shrink-0",children:jsx("span",{className:"mr-3 text-sm text-gray-500",children:w(r.LastWriteTime)})})]})}f.propTypes={border:l.default.string,files:l.default.array,isMore:l.default.bool,selected:l.default.string,page:l.default.number,pages:l.default.number,callback:l.default.func};p.propTypes={file:l.default.object,selected:l.default.bool,callback:l.default.func};function x(){return jsx("div",{className:"mb-1 mt-1 flex justify-center pb-4 pt-4",children:jsx("div",{role:"status",children:jsxs("svg",{"aria-hidden":"true",className:"inline-block h-8 w-8 animate-spin fill-gray-600 text-gray-200 dark:fill-gray-300 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})})}function w(r){try{let s=new Date(r),o=["January","February","March","April","May","June","July","August","September","October","November","December"];return s.getDate()+" "+o[s.getMonth()]+" "+s.getFullYear()}catch(s){return "Unknown"}}
|
|
8
|
-
|
|
9
|
-
export { f as a };
|
|
10
|
-
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=chunk-FPXEE5TC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/file-picker/file-listing.tsx"],"names":["import_prop_types","useEffect","useRef","jsx","jsxs","Listing","border","files","isMore","selected","page","pages","callback","scrollRef","element","handleScroll","offset","handleImageSelection","fileName","f","FileRow","InfiniteLoader","file","Radio","writeDate","PropTypes","date","d","months","err"],"mappings":"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","sourcesContent":["// @ts-nocheck\nimport PropTypes from \"prop-types\";\nimport { useEffect, useRef } from \"react\";\nimport { Radio } from \"../radio\";\n\n// FOR USE WITH THE FILE PICKER COMPONENT - ONLY\n\nexport default function Listing({\n border,\n files,\n isMore,\n selected,\n page,\n pages,\n callback,\n}) {\n const scrollRef = useRef();\n\n useEffect(() => {\n const element = document.querySelector(\"#img-file-list\");\n if (element && !element.hasAttribute(\"scroll\"))\n scrollRef.current.addEventListener(\"scroll\", handleScroll);\n if (scrollRef.current != null) scrollRef.current.scrollTop = 0;\n return () => {\n const element = document.querySelector(\"#img-file-list\");\n if (element && element.hasAttribute(\"scroll\"))\n scrollRef.current.removeEventListener(\"scroll\", handleScroll);\n };\n }, []);\n\n const handleScroll = () => {\n if (!isMore) return;\n const offset =\n scrollRef.current.scrollHeight - scrollRef.current.offsetHeight;\n const scroll = Math.floor(scrollRef.current.scrollTop);\n if (scroll > offset) {\n callback({ type: \"FETCH_DATA\", payload: true });\n }\n };\n\n const handleImageSelection = (fileName) => {\n callback({\n type: \"SELECTION\",\n payload: selected === fileName ? \"\" : fileName,\n });\n };\n\n return (\n <div\n id=\"img-file-list\"\n ref={scrollRef}\n className={`${border} overflow-y-auto overflow-x-auto lg:overflow-x-hidden rounded-md border`}\n >\n {(files || []).map((f) => {\n return (\n <FileRow\n key={`file-row-${f.Name}`}\n file={f}\n selected={selected === f.Name}\n callback={handleImageSelection}\n />\n );\n })}\n {isMore && page < pages && <InfiniteLoader />}\n </div>\n );\n}\n\nfunction FileRow({ file, selected = false, callback }) {\n return (\n <div\n className={`mb-1 mt-1 flex items-center pb-4 pt-4 ${\n selected && \"bg-blue-50\"\n } cursor-pointer justify-between border-b border-gray-100`}\n onClick={() => {\n callback(file);\n }}\n >\n <div className=\"ml-3 flex items-center\">\n <div className=\"flex-shrink-0\">\n <Radio id={file.Name} name={file.Name} checked={selected} readOnly />\n </div>\n <div className=\"ml-4\">\n <img\n className=\"h-10 w-10 rounded-md\"\n src={`https://files.ekmcdn.com/${file.Uri}`}\n alt=\"\"\n />\n </div>\n <div className=\"ml-4\">\n <div className=\" font-medium text-gray-900\">{file.Name}</div>\n {file.Size && (\n <div className=\"text-xs text-gray-500\">{file.Size}</div>\n )}\n </div>\n </div>\n <div className=\"ml-4 flex-shrink-0\">\n <span className=\"mr-3 text-sm text-gray-500\">\n {writeDate(file.LastWriteTime)}\n </span>\n </div>\n </div>\n );\n}\n\nListing.propTypes = {\n /** Border style to use*/\n border: PropTypes.string,\n /** Array of files to list */\n files: PropTypes.array,\n /** Boolean to indicate if there are more files to load */\n isMore: PropTypes.bool,\n /** Name of the selected file */\n selected: PropTypes.string,\n /** Current page */\n page: PropTypes.number,\n /** Total number of pages */\n pages: PropTypes.number,\n /** Callback function to handle events */\n callback: PropTypes.func,\n};\n\nFileRow.propTypes = {\n /** File object to display */\n file: PropTypes.object,\n /** Boolean to indicate if the file is selected */\n selected: PropTypes.bool,\n /** Callback function to handle events */\n callback: PropTypes.func,\n};\n\nfunction InfiniteLoader() {\n return (\n <div className=\"mb-1 mt-1 flex justify-center pb-4 pt-4\">\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className=\"inline-block h-8 w-8 animate-spin fill-gray-600 text-gray-200 dark:fill-gray-300 dark:text-gray-600\"\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n </div>\n </div>\n );\n}\n\nfunction writeDate(date) {\n try {\n const d = new Date(date);\n const months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ];\n return d.getDate() + \" \" + months[d.getMonth()] + \" \" + d.getFullYear();\n } catch (err) {\n return \"Unknown\";\n }\n}\n"]}
|