@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260926063530 → 0.8.1-dev.20260930053845
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/{InputControlClient-K6GXQEJD.mjs → InputControlClient-QMFSUGTK.mjs} +1 -1
- package/dist/{chunk-LDS5ZLVG.mjs → chunk-JT7G3DNR.mjs} +391 -30
- package/dist/index.d.mts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +1140 -676
- package/dist/index.mjs +500 -398
- package/dist/server.js +553 -465
- package/dist/server.mjs +272 -184
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2586,16 +2586,339 @@ var init_PercentageInput = __esm({
|
|
|
2586
2586
|
}
|
|
2587
2587
|
});
|
|
2588
2588
|
|
|
2589
|
+
// src/components/utilities/CountryCodes.tsx
|
|
2590
|
+
var COUNTRY_CODES, PRIMARY_COUNTRY_BY_DIAL_CODE, findCountryByDialCode, findCountryByIso2, getDialCodeByCountryCode, resolveCountry, getCountryFlag, splitPhoneNumber;
|
|
2591
|
+
var init_CountryCodes = __esm({
|
|
2592
|
+
"src/components/utilities/CountryCodes.tsx"() {
|
|
2593
|
+
"use strict";
|
|
2594
|
+
COUNTRY_CODES = [
|
|
2595
|
+
{ name: "Afghanistan", iso2: "AF", dialCode: "+93" },
|
|
2596
|
+
{ name: "\xC5land Islands", iso2: "AX", dialCode: "+358" },
|
|
2597
|
+
{ name: "Albania", iso2: "AL", dialCode: "+355" },
|
|
2598
|
+
{ name: "Algeria", iso2: "DZ", dialCode: "+213" },
|
|
2599
|
+
{ name: "American Samoa", iso2: "AS", dialCode: "+1684" },
|
|
2600
|
+
{ name: "Andorra", iso2: "AD", dialCode: "+376" },
|
|
2601
|
+
{ name: "Angola", iso2: "AO", dialCode: "+244" },
|
|
2602
|
+
{ name: "Anguilla", iso2: "AI", dialCode: "+1264" },
|
|
2603
|
+
{ name: "Antigua and Barbuda", iso2: "AG", dialCode: "+1268" },
|
|
2604
|
+
{ name: "Argentina", iso2: "AR", dialCode: "+54" },
|
|
2605
|
+
{ name: "Armenia", iso2: "AM", dialCode: "+374" },
|
|
2606
|
+
{ name: "Aruba", iso2: "AW", dialCode: "+297" },
|
|
2607
|
+
{ name: "Australia", iso2: "AU", dialCode: "+61" },
|
|
2608
|
+
{ name: "Austria", iso2: "AT", dialCode: "+43" },
|
|
2609
|
+
{ name: "Azerbaijan", iso2: "AZ", dialCode: "+994" },
|
|
2610
|
+
{ name: "Bahamas", iso2: "BS", dialCode: "+1242" },
|
|
2611
|
+
{ name: "Bahrain", iso2: "BH", dialCode: "+973" },
|
|
2612
|
+
{ name: "Bangladesh", iso2: "BD", dialCode: "+880" },
|
|
2613
|
+
{ name: "Barbados", iso2: "BB", dialCode: "+1246" },
|
|
2614
|
+
{ name: "Belarus", iso2: "BY", dialCode: "+375" },
|
|
2615
|
+
{ name: "Belgium", iso2: "BE", dialCode: "+32" },
|
|
2616
|
+
{ name: "Belize", iso2: "BZ", dialCode: "+501" },
|
|
2617
|
+
{ name: "Benin", iso2: "BJ", dialCode: "+229" },
|
|
2618
|
+
{ name: "Bermuda", iso2: "BM", dialCode: "+1441" },
|
|
2619
|
+
{ name: "Bhutan", iso2: "BT", dialCode: "+975" },
|
|
2620
|
+
{ name: "Bolivia", iso2: "BO", dialCode: "+591" },
|
|
2621
|
+
{ name: "Bosnia and Herzegovina", iso2: "BA", dialCode: "+387" },
|
|
2622
|
+
{ name: "Botswana", iso2: "BW", dialCode: "+267" },
|
|
2623
|
+
{ name: "Brazil", iso2: "BR", dialCode: "+55" },
|
|
2624
|
+
{ name: "British Indian Ocean Territory", iso2: "IO", dialCode: "+246" },
|
|
2625
|
+
{ name: "British Virgin Islands", iso2: "VG", dialCode: "+1284" },
|
|
2626
|
+
{ name: "Brunei", iso2: "BN", dialCode: "+673" },
|
|
2627
|
+
{ name: "Bulgaria", iso2: "BG", dialCode: "+359" },
|
|
2628
|
+
{ name: "Burkina Faso", iso2: "BF", dialCode: "+226" },
|
|
2629
|
+
{ name: "Burundi", iso2: "BI", dialCode: "+257" },
|
|
2630
|
+
{ name: "Cambodia", iso2: "KH", dialCode: "+855" },
|
|
2631
|
+
{ name: "Cameroon", iso2: "CM", dialCode: "+237" },
|
|
2632
|
+
{ name: "Canada", iso2: "CA", dialCode: "+1" },
|
|
2633
|
+
{ name: "Cape Verde", iso2: "CV", dialCode: "+238" },
|
|
2634
|
+
{ name: "Caribbean Netherlands", iso2: "BQ", dialCode: "+599" },
|
|
2635
|
+
{ name: "Cayman Islands", iso2: "KY", dialCode: "+1345" },
|
|
2636
|
+
{ name: "Central African Republic", iso2: "CF", dialCode: "+236" },
|
|
2637
|
+
{ name: "Chad", iso2: "TD", dialCode: "+235" },
|
|
2638
|
+
{ name: "Chile", iso2: "CL", dialCode: "+56" },
|
|
2639
|
+
{ name: "China", iso2: "CN", dialCode: "+86" },
|
|
2640
|
+
{ name: "Christmas Island", iso2: "CX", dialCode: "+61" },
|
|
2641
|
+
{ name: "Cocos (Keeling) Islands", iso2: "CC", dialCode: "+61" },
|
|
2642
|
+
{ name: "Colombia", iso2: "CO", dialCode: "+57" },
|
|
2643
|
+
{ name: "Comoros", iso2: "KM", dialCode: "+269" },
|
|
2644
|
+
{ name: "Congo", iso2: "CG", dialCode: "+242" },
|
|
2645
|
+
{ name: "Congo (DRC)", iso2: "CD", dialCode: "+243" },
|
|
2646
|
+
{ name: "Cook Islands", iso2: "CK", dialCode: "+682" },
|
|
2647
|
+
{ name: "Costa Rica", iso2: "CR", dialCode: "+506" },
|
|
2648
|
+
{ name: "C\xF4te d'Ivoire", iso2: "CI", dialCode: "+225" },
|
|
2649
|
+
{ name: "Croatia", iso2: "HR", dialCode: "+385" },
|
|
2650
|
+
{ name: "Cuba", iso2: "CU", dialCode: "+53" },
|
|
2651
|
+
{ name: "Cura\xE7ao", iso2: "CW", dialCode: "+599" },
|
|
2652
|
+
{ name: "Cyprus", iso2: "CY", dialCode: "+357" },
|
|
2653
|
+
{ name: "Czech Republic", iso2: "CZ", dialCode: "+420" },
|
|
2654
|
+
{ name: "Denmark", iso2: "DK", dialCode: "+45" },
|
|
2655
|
+
{ name: "Djibouti", iso2: "DJ", dialCode: "+253" },
|
|
2656
|
+
{ name: "Dominica", iso2: "DM", dialCode: "+1767" },
|
|
2657
|
+
{ name: "Dominican Republic", iso2: "DO", dialCode: "+1" },
|
|
2658
|
+
{ name: "Ecuador", iso2: "EC", dialCode: "+593" },
|
|
2659
|
+
{ name: "Egypt", iso2: "EG", dialCode: "+20" },
|
|
2660
|
+
{ name: "El Salvador", iso2: "SV", dialCode: "+503" },
|
|
2661
|
+
{ name: "Equatorial Guinea", iso2: "GQ", dialCode: "+240" },
|
|
2662
|
+
{ name: "Eritrea", iso2: "ER", dialCode: "+291" },
|
|
2663
|
+
{ name: "Estonia", iso2: "EE", dialCode: "+372" },
|
|
2664
|
+
{ name: "Eswatini", iso2: "SZ", dialCode: "+268" },
|
|
2665
|
+
{ name: "Ethiopia", iso2: "ET", dialCode: "+251" },
|
|
2666
|
+
{ name: "Falkland Islands", iso2: "FK", dialCode: "+500" },
|
|
2667
|
+
{ name: "Faroe Islands", iso2: "FO", dialCode: "+298" },
|
|
2668
|
+
{ name: "Fiji", iso2: "FJ", dialCode: "+679" },
|
|
2669
|
+
{ name: "Finland", iso2: "FI", dialCode: "+358" },
|
|
2670
|
+
{ name: "France", iso2: "FR", dialCode: "+33" },
|
|
2671
|
+
{ name: "French Guiana", iso2: "GF", dialCode: "+594" },
|
|
2672
|
+
{ name: "French Polynesia", iso2: "PF", dialCode: "+689" },
|
|
2673
|
+
{ name: "Gabon", iso2: "GA", dialCode: "+241" },
|
|
2674
|
+
{ name: "Gambia", iso2: "GM", dialCode: "+220" },
|
|
2675
|
+
{ name: "Georgia", iso2: "GE", dialCode: "+995" },
|
|
2676
|
+
{ name: "Germany", iso2: "DE", dialCode: "+49" },
|
|
2677
|
+
{ name: "Ghana", iso2: "GH", dialCode: "+233" },
|
|
2678
|
+
{ name: "Gibraltar", iso2: "GI", dialCode: "+350" },
|
|
2679
|
+
{ name: "Greece", iso2: "GR", dialCode: "+30" },
|
|
2680
|
+
{ name: "Greenland", iso2: "GL", dialCode: "+299" },
|
|
2681
|
+
{ name: "Grenada", iso2: "GD", dialCode: "+1473" },
|
|
2682
|
+
{ name: "Guadeloupe", iso2: "GP", dialCode: "+590" },
|
|
2683
|
+
{ name: "Guam", iso2: "GU", dialCode: "+1671" },
|
|
2684
|
+
{ name: "Guatemala", iso2: "GT", dialCode: "+502" },
|
|
2685
|
+
{ name: "Guernsey", iso2: "GG", dialCode: "+44" },
|
|
2686
|
+
{ name: "Guinea", iso2: "GN", dialCode: "+224" },
|
|
2687
|
+
{ name: "Guinea-Bissau", iso2: "GW", dialCode: "+245" },
|
|
2688
|
+
{ name: "Guyana", iso2: "GY", dialCode: "+592" },
|
|
2689
|
+
{ name: "Haiti", iso2: "HT", dialCode: "+509" },
|
|
2690
|
+
{ name: "Honduras", iso2: "HN", dialCode: "+504" },
|
|
2691
|
+
{ name: "Hong Kong", iso2: "HK", dialCode: "+852" },
|
|
2692
|
+
{ name: "Hungary", iso2: "HU", dialCode: "+36" },
|
|
2693
|
+
{ name: "Iceland", iso2: "IS", dialCode: "+354" },
|
|
2694
|
+
{ name: "India", iso2: "IN", dialCode: "+91" },
|
|
2695
|
+
{ name: "Indonesia", iso2: "ID", dialCode: "+62" },
|
|
2696
|
+
{ name: "Iran", iso2: "IR", dialCode: "+98" },
|
|
2697
|
+
{ name: "Iraq", iso2: "IQ", dialCode: "+964" },
|
|
2698
|
+
{ name: "Ireland", iso2: "IE", dialCode: "+353" },
|
|
2699
|
+
{ name: "Isle of Man", iso2: "IM", dialCode: "+44" },
|
|
2700
|
+
{ name: "Israel", iso2: "IL", dialCode: "+972" },
|
|
2701
|
+
{ name: "Italy", iso2: "IT", dialCode: "+39" },
|
|
2702
|
+
{ name: "Jamaica", iso2: "JM", dialCode: "+1876" },
|
|
2703
|
+
{ name: "Japan", iso2: "JP", dialCode: "+81" },
|
|
2704
|
+
{ name: "Jersey", iso2: "JE", dialCode: "+44" },
|
|
2705
|
+
{ name: "Jordan", iso2: "JO", dialCode: "+962" },
|
|
2706
|
+
{ name: "Kazakhstan", iso2: "KZ", dialCode: "+7" },
|
|
2707
|
+
{ name: "Kenya", iso2: "KE", dialCode: "+254" },
|
|
2708
|
+
{ name: "Kiribati", iso2: "KI", dialCode: "+686" },
|
|
2709
|
+
{ name: "Kosovo", iso2: "XK", dialCode: "+383" },
|
|
2710
|
+
{ name: "Kuwait", iso2: "KW", dialCode: "+965" },
|
|
2711
|
+
{ name: "Kyrgyzstan", iso2: "KG", dialCode: "+996" },
|
|
2712
|
+
{ name: "Laos", iso2: "LA", dialCode: "+856" },
|
|
2713
|
+
{ name: "Latvia", iso2: "LV", dialCode: "+371" },
|
|
2714
|
+
{ name: "Lebanon", iso2: "LB", dialCode: "+961" },
|
|
2715
|
+
{ name: "Lesotho", iso2: "LS", dialCode: "+266" },
|
|
2716
|
+
{ name: "Liberia", iso2: "LR", dialCode: "+231" },
|
|
2717
|
+
{ name: "Libya", iso2: "LY", dialCode: "+218" },
|
|
2718
|
+
{ name: "Liechtenstein", iso2: "LI", dialCode: "+423" },
|
|
2719
|
+
{ name: "Lithuania", iso2: "LT", dialCode: "+370" },
|
|
2720
|
+
{ name: "Luxembourg", iso2: "LU", dialCode: "+352" },
|
|
2721
|
+
{ name: "Macau", iso2: "MO", dialCode: "+853" },
|
|
2722
|
+
{ name: "Madagascar", iso2: "MG", dialCode: "+261" },
|
|
2723
|
+
{ name: "Malawi", iso2: "MW", dialCode: "+265" },
|
|
2724
|
+
{ name: "Malaysia", iso2: "MY", dialCode: "+60" },
|
|
2725
|
+
{ name: "Maldives", iso2: "MV", dialCode: "+960" },
|
|
2726
|
+
{ name: "Mali", iso2: "ML", dialCode: "+223" },
|
|
2727
|
+
{ name: "Malta", iso2: "MT", dialCode: "+356" },
|
|
2728
|
+
{ name: "Marshall Islands", iso2: "MH", dialCode: "+692" },
|
|
2729
|
+
{ name: "Martinique", iso2: "MQ", dialCode: "+596" },
|
|
2730
|
+
{ name: "Mauritania", iso2: "MR", dialCode: "+222" },
|
|
2731
|
+
{ name: "Mauritius", iso2: "MU", dialCode: "+230" },
|
|
2732
|
+
{ name: "Mayotte", iso2: "YT", dialCode: "+262" },
|
|
2733
|
+
{ name: "Mexico", iso2: "MX", dialCode: "+52" },
|
|
2734
|
+
{ name: "Micronesia", iso2: "FM", dialCode: "+691" },
|
|
2735
|
+
{ name: "Moldova", iso2: "MD", dialCode: "+373" },
|
|
2736
|
+
{ name: "Monaco", iso2: "MC", dialCode: "+377" },
|
|
2737
|
+
{ name: "Mongolia", iso2: "MN", dialCode: "+976" },
|
|
2738
|
+
{ name: "Montenegro", iso2: "ME", dialCode: "+382" },
|
|
2739
|
+
{ name: "Montserrat", iso2: "MS", dialCode: "+1664" },
|
|
2740
|
+
{ name: "Morocco", iso2: "MA", dialCode: "+212" },
|
|
2741
|
+
{ name: "Mozambique", iso2: "MZ", dialCode: "+258" },
|
|
2742
|
+
{ name: "Myanmar", iso2: "MM", dialCode: "+95" },
|
|
2743
|
+
{ name: "Namibia", iso2: "NA", dialCode: "+264" },
|
|
2744
|
+
{ name: "Nauru", iso2: "NR", dialCode: "+674" },
|
|
2745
|
+
{ name: "Nepal", iso2: "NP", dialCode: "+977" },
|
|
2746
|
+
{ name: "Netherlands", iso2: "NL", dialCode: "+31" },
|
|
2747
|
+
{ name: "New Caledonia", iso2: "NC", dialCode: "+687" },
|
|
2748
|
+
{ name: "New Zealand", iso2: "NZ", dialCode: "+64" },
|
|
2749
|
+
{ name: "Nicaragua", iso2: "NI", dialCode: "+505" },
|
|
2750
|
+
{ name: "Niger", iso2: "NE", dialCode: "+227" },
|
|
2751
|
+
{ name: "Nigeria", iso2: "NG", dialCode: "+234" },
|
|
2752
|
+
{ name: "Niue", iso2: "NU", dialCode: "+683" },
|
|
2753
|
+
{ name: "Norfolk Island", iso2: "NF", dialCode: "+672" },
|
|
2754
|
+
{ name: "North Korea", iso2: "KP", dialCode: "+850" },
|
|
2755
|
+
{ name: "North Macedonia", iso2: "MK", dialCode: "+389" },
|
|
2756
|
+
{ name: "Northern Mariana Islands", iso2: "MP", dialCode: "+1670" },
|
|
2757
|
+
{ name: "Norway", iso2: "NO", dialCode: "+47" },
|
|
2758
|
+
{ name: "Oman", iso2: "OM", dialCode: "+968" },
|
|
2759
|
+
{ name: "Pakistan", iso2: "PK", dialCode: "+92" },
|
|
2760
|
+
{ name: "Palau", iso2: "PW", dialCode: "+680" },
|
|
2761
|
+
{ name: "Palestine", iso2: "PS", dialCode: "+970" },
|
|
2762
|
+
{ name: "Panama", iso2: "PA", dialCode: "+507" },
|
|
2763
|
+
{ name: "Papua New Guinea", iso2: "PG", dialCode: "+675" },
|
|
2764
|
+
{ name: "Paraguay", iso2: "PY", dialCode: "+595" },
|
|
2765
|
+
{ name: "Peru", iso2: "PE", dialCode: "+51" },
|
|
2766
|
+
{ name: "Philippines", iso2: "PH", dialCode: "+63" },
|
|
2767
|
+
{ name: "Poland", iso2: "PL", dialCode: "+48" },
|
|
2768
|
+
{ name: "Portugal", iso2: "PT", dialCode: "+351" },
|
|
2769
|
+
{ name: "Puerto Rico", iso2: "PR", dialCode: "+1" },
|
|
2770
|
+
{ name: "Qatar", iso2: "QA", dialCode: "+974" },
|
|
2771
|
+
{ name: "R\xE9union", iso2: "RE", dialCode: "+262" },
|
|
2772
|
+
{ name: "Romania", iso2: "RO", dialCode: "+40" },
|
|
2773
|
+
{ name: "Russia", iso2: "RU", dialCode: "+7" },
|
|
2774
|
+
{ name: "Rwanda", iso2: "RW", dialCode: "+250" },
|
|
2775
|
+
{ name: "Saint Barth\xE9lemy", iso2: "BL", dialCode: "+590" },
|
|
2776
|
+
{ name: "Saint Helena", iso2: "SH", dialCode: "+290" },
|
|
2777
|
+
{ name: "Saint Kitts and Nevis", iso2: "KN", dialCode: "+1869" },
|
|
2778
|
+
{ name: "Saint Lucia", iso2: "LC", dialCode: "+1758" },
|
|
2779
|
+
{ name: "Saint Martin", iso2: "MF", dialCode: "+590" },
|
|
2780
|
+
{ name: "Saint Pierre and Miquelon", iso2: "PM", dialCode: "+508" },
|
|
2781
|
+
{ name: "Saint Vincent and the Grenadines", iso2: "VC", dialCode: "+1784" },
|
|
2782
|
+
{ name: "Samoa", iso2: "WS", dialCode: "+685" },
|
|
2783
|
+
{ name: "San Marino", iso2: "SM", dialCode: "+378" },
|
|
2784
|
+
{ name: "S\xE3o Tom\xE9 and Pr\xEDncipe", iso2: "ST", dialCode: "+239" },
|
|
2785
|
+
{ name: "Saudi Arabia", iso2: "SA", dialCode: "+966" },
|
|
2786
|
+
{ name: "Senegal", iso2: "SN", dialCode: "+221" },
|
|
2787
|
+
{ name: "Serbia", iso2: "RS", dialCode: "+381" },
|
|
2788
|
+
{ name: "Seychelles", iso2: "SC", dialCode: "+248" },
|
|
2789
|
+
{ name: "Sierra Leone", iso2: "SL", dialCode: "+232" },
|
|
2790
|
+
{ name: "Singapore", iso2: "SG", dialCode: "+65" },
|
|
2791
|
+
{ name: "Sint Maarten", iso2: "SX", dialCode: "+1721" },
|
|
2792
|
+
{ name: "Slovakia", iso2: "SK", dialCode: "+421" },
|
|
2793
|
+
{ name: "Slovenia", iso2: "SI", dialCode: "+386" },
|
|
2794
|
+
{ name: "Solomon Islands", iso2: "SB", dialCode: "+677" },
|
|
2795
|
+
{ name: "Somalia", iso2: "SO", dialCode: "+252" },
|
|
2796
|
+
{ name: "South Africa", iso2: "ZA", dialCode: "+27" },
|
|
2797
|
+
{ name: "South Korea", iso2: "KR", dialCode: "+82" },
|
|
2798
|
+
{ name: "South Sudan", iso2: "SS", dialCode: "+211" },
|
|
2799
|
+
{ name: "Spain", iso2: "ES", dialCode: "+34" },
|
|
2800
|
+
{ name: "Sri Lanka", iso2: "LK", dialCode: "+94" },
|
|
2801
|
+
{ name: "Sudan", iso2: "SD", dialCode: "+249" },
|
|
2802
|
+
{ name: "Suriname", iso2: "SR", dialCode: "+597" },
|
|
2803
|
+
{ name: "Svalbard and Jan Mayen", iso2: "SJ", dialCode: "+47" },
|
|
2804
|
+
{ name: "Sweden", iso2: "SE", dialCode: "+46" },
|
|
2805
|
+
{ name: "Switzerland", iso2: "CH", dialCode: "+41" },
|
|
2806
|
+
{ name: "Syria", iso2: "SY", dialCode: "+963" },
|
|
2807
|
+
{ name: "Taiwan", iso2: "TW", dialCode: "+886" },
|
|
2808
|
+
{ name: "Tajikistan", iso2: "TJ", dialCode: "+992" },
|
|
2809
|
+
{ name: "Tanzania", iso2: "TZ", dialCode: "+255" },
|
|
2810
|
+
{ name: "Thailand", iso2: "TH", dialCode: "+66" },
|
|
2811
|
+
{ name: "Timor-Leste", iso2: "TL", dialCode: "+670" },
|
|
2812
|
+
{ name: "Togo", iso2: "TG", dialCode: "+228" },
|
|
2813
|
+
{ name: "Tokelau", iso2: "TK", dialCode: "+690" },
|
|
2814
|
+
{ name: "Tonga", iso2: "TO", dialCode: "+676" },
|
|
2815
|
+
{ name: "Trinidad and Tobago", iso2: "TT", dialCode: "+1868" },
|
|
2816
|
+
{ name: "Tunisia", iso2: "TN", dialCode: "+216" },
|
|
2817
|
+
{ name: "Turkey", iso2: "TR", dialCode: "+90" },
|
|
2818
|
+
{ name: "Turkmenistan", iso2: "TM", dialCode: "+993" },
|
|
2819
|
+
{ name: "Turks and Caicos Islands", iso2: "TC", dialCode: "+1649" },
|
|
2820
|
+
{ name: "Tuvalu", iso2: "TV", dialCode: "+688" },
|
|
2821
|
+
{ name: "Uganda", iso2: "UG", dialCode: "+256" },
|
|
2822
|
+
{ name: "Ukraine", iso2: "UA", dialCode: "+380" },
|
|
2823
|
+
{ name: "United Arab Emirates", iso2: "AE", dialCode: "+971" },
|
|
2824
|
+
{ name: "United Kingdom", iso2: "GB", dialCode: "+44" },
|
|
2825
|
+
{ name: "United States", iso2: "US", dialCode: "+1" },
|
|
2826
|
+
{ name: "U.S. Virgin Islands", iso2: "VI", dialCode: "+1340" },
|
|
2827
|
+
{ name: "Uruguay", iso2: "UY", dialCode: "+598" },
|
|
2828
|
+
{ name: "Uzbekistan", iso2: "UZ", dialCode: "+998" },
|
|
2829
|
+
{ name: "Vanuatu", iso2: "VU", dialCode: "+678" },
|
|
2830
|
+
{ name: "Vatican City", iso2: "VA", dialCode: "+39" },
|
|
2831
|
+
{ name: "Venezuela", iso2: "VE", dialCode: "+58" },
|
|
2832
|
+
{ name: "Vietnam", iso2: "VN", dialCode: "+84" },
|
|
2833
|
+
{ name: "Wallis and Futuna", iso2: "WF", dialCode: "+681" },
|
|
2834
|
+
{ name: "Western Sahara", iso2: "EH", dialCode: "+212" },
|
|
2835
|
+
{ name: "Yemen", iso2: "YE", dialCode: "+967" },
|
|
2836
|
+
{ name: "Zambia", iso2: "ZM", dialCode: "+260" },
|
|
2837
|
+
{ name: "Zimbabwe", iso2: "ZW", dialCode: "+263" }
|
|
2838
|
+
];
|
|
2839
|
+
PRIMARY_COUNTRY_BY_DIAL_CODE = {
|
|
2840
|
+
"+1": "US",
|
|
2841
|
+
"+7": "RU",
|
|
2842
|
+
"+39": "IT",
|
|
2843
|
+
"+44": "GB",
|
|
2844
|
+
"+47": "NO",
|
|
2845
|
+
"+61": "AU",
|
|
2846
|
+
"+212": "MA",
|
|
2847
|
+
"+262": "RE",
|
|
2848
|
+
"+358": "FI",
|
|
2849
|
+
"+590": "GP",
|
|
2850
|
+
"+599": "CW"
|
|
2851
|
+
};
|
|
2852
|
+
findCountryByDialCode = (dialCode) => {
|
|
2853
|
+
const primaryIso2 = PRIMARY_COUNTRY_BY_DIAL_CODE[dialCode];
|
|
2854
|
+
return primaryIso2 && COUNTRY_CODES.find((c) => c.iso2 === primaryIso2) || COUNTRY_CODES.find((c) => c.dialCode === dialCode);
|
|
2855
|
+
};
|
|
2856
|
+
findCountryByIso2 = (iso2) => {
|
|
2857
|
+
if (!iso2) return void 0;
|
|
2858
|
+
const normalized = iso2.trim().toUpperCase();
|
|
2859
|
+
return COUNTRY_CODES.find((c) => c.iso2 === normalized);
|
|
2860
|
+
};
|
|
2861
|
+
getDialCodeByCountryCode = (iso2) => findCountryByIso2(iso2)?.dialCode;
|
|
2862
|
+
resolveCountry = (codeOrDialCode) => {
|
|
2863
|
+
const value = codeOrDialCode?.trim();
|
|
2864
|
+
if (!value) return void 0;
|
|
2865
|
+
return value.startsWith("+") ? findCountryByDialCode(value) : findCountryByIso2(value);
|
|
2866
|
+
};
|
|
2867
|
+
getCountryFlag = (iso2) => iso2.toUpperCase().replace(/./g, (char) => String.fromCodePoint(127397 + char.charCodeAt(0)));
|
|
2868
|
+
splitPhoneNumber = (value) => {
|
|
2869
|
+
const trimmed = (value ?? "").trim();
|
|
2870
|
+
if (!trimmed.startsWith("+")) {
|
|
2871
|
+
return { number: trimmed };
|
|
2872
|
+
}
|
|
2873
|
+
const [head, ...rest] = trimmed.split(/\s+/);
|
|
2874
|
+
const digits = trimmed.replace(/[^\d+]/g, "");
|
|
2875
|
+
const prefixMatch = [...COUNTRY_CODES].sort((a, b) => b.dialCode.length - a.dialCode.length).find((c) => digits.startsWith(c.dialCode));
|
|
2876
|
+
const country = (rest.length > 0 ? findCountryByDialCode(head) : void 0) ?? (prefixMatch ? findCountryByDialCode(prefixMatch.dialCode) : void 0);
|
|
2877
|
+
if (!country) {
|
|
2878
|
+
return { number: trimmed };
|
|
2879
|
+
}
|
|
2880
|
+
const number = rest.length > 0 && head === country.dialCode ? rest.join(" ") : digits.slice(country.dialCode.length);
|
|
2881
|
+
return { country, number };
|
|
2882
|
+
};
|
|
2883
|
+
}
|
|
2884
|
+
});
|
|
2885
|
+
|
|
2589
2886
|
// src/components/controls/edit/PhoneInput.tsx
|
|
2590
|
-
var import_react28, import_jsx_runtime35, PhoneInput, PhoneInput_default;
|
|
2887
|
+
var import_react28, import_jsx_runtime35, DEFAULT_DIAL_CODE, PhoneInput, PhoneInput_default;
|
|
2591
2888
|
var init_PhoneInput = __esm({
|
|
2592
2889
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
2593
2890
|
"use strict";
|
|
2594
2891
|
import_react28 = __toESM(require("react"));
|
|
2892
|
+
init_CountryCodes();
|
|
2595
2893
|
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2894
|
+
DEFAULT_DIAL_CODE = "+91";
|
|
2596
2895
|
PhoneInput = (props) => {
|
|
2597
|
-
const
|
|
2598
|
-
|
|
2896
|
+
const hasFixedPrefix = props.prefix !== void 0 && props.prefix !== null;
|
|
2897
|
+
let value = "";
|
|
2898
|
+
if (props.value !== void 0 && props.value !== null) {
|
|
2899
|
+
value = props.value;
|
|
2900
|
+
}
|
|
2901
|
+
const parsed = (0, import_react28.useMemo)(
|
|
2902
|
+
() => hasFixedPrefix ? { number: value } : splitPhoneNumber(String(value)),
|
|
2903
|
+
[hasFixedPrefix, value]
|
|
2904
|
+
);
|
|
2905
|
+
const defaultCountry = resolveCountry(props?.attributes?.defaultCountryCode) ?? findCountryByDialCode(DEFAULT_DIAL_CODE);
|
|
2906
|
+
const hasUserPickedCountry = (0, import_react28.useRef)(false);
|
|
2907
|
+
const [selectedIso2, setSelectedIso2] = (0, import_react28.useState)(
|
|
2908
|
+
parsed.country?.iso2 ?? defaultCountry.iso2
|
|
2909
|
+
);
|
|
2910
|
+
const selectedCountry = COUNTRY_CODES.find((c) => c.iso2 === selectedIso2) ?? defaultCountry;
|
|
2911
|
+
(0, import_react28.useEffect)(() => {
|
|
2912
|
+
if (parsed.country && parsed.country.dialCode !== selectedCountry.dialCode) {
|
|
2913
|
+
setSelectedIso2(parsed.country.iso2);
|
|
2914
|
+
}
|
|
2915
|
+
}, [parsed.country, selectedCountry.dialCode]);
|
|
2916
|
+
(0, import_react28.useEffect)(() => {
|
|
2917
|
+
if (!parsed.country && !parsed.number && !hasUserPickedCountry.current) {
|
|
2918
|
+
setSelectedIso2(defaultCountry.iso2);
|
|
2919
|
+
}
|
|
2920
|
+
}, [defaultCountry.iso2, parsed.country, parsed.number]);
|
|
2921
|
+
const emit = (text) => {
|
|
2599
2922
|
if (props.callback !== void 0) {
|
|
2600
2923
|
props.callback(
|
|
2601
2924
|
{
|
|
@@ -2607,31 +2930,69 @@ var init_PhoneInput = __esm({
|
|
|
2607
2930
|
);
|
|
2608
2931
|
}
|
|
2609
2932
|
};
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2933
|
+
const combine = (dialCode, number) => number ? `${dialCode} ${number}` : "";
|
|
2934
|
+
const textChangeHandler = (event) => {
|
|
2935
|
+
const text = event.target.value;
|
|
2936
|
+
if (hasFixedPrefix) {
|
|
2937
|
+
emit(text);
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
emit(combine(selectedCountry.dialCode, text.replace(/\D/g, "")));
|
|
2941
|
+
};
|
|
2942
|
+
const countryChangeHandler = (event) => {
|
|
2943
|
+
const country = COUNTRY_CODES.find((c) => c.iso2 === event.target.value);
|
|
2944
|
+
if (!country) return;
|
|
2945
|
+
hasUserPickedCountry.current = true;
|
|
2946
|
+
setSelectedIso2(country.iso2);
|
|
2947
|
+
if (parsed.number) {
|
|
2948
|
+
emit(combine(country.dialCode, parsed.number));
|
|
2949
|
+
}
|
|
2950
|
+
};
|
|
2951
|
+
const isReadOnly = props?.attributes?.readOnly;
|
|
2614
2952
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react28.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "block mb-1", children: [
|
|
2615
2953
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2616
2954
|
" ",
|
|
2617
2955
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2618
2956
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center rounded border ", children: [
|
|
2619
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
2957
|
+
hasFixedPrefix ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "px-3", children: props.prefix }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "relative flex items-center gap-1 self-stretch px-3 border-r whitespace-nowrap", children: [
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { "aria-hidden": "true", children: getCountryFlag(selectedCountry.iso2) }),
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: selectedCountry.dialCode }),
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { "aria-hidden": "true", className: "w-3 h-3 opacity-60", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fillRule: "evenodd", d: "M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z", clipRule: "evenodd" }) }),
|
|
2961
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2962
|
+
"select",
|
|
2963
|
+
{
|
|
2964
|
+
"aria-label": "Country code",
|
|
2965
|
+
value: selectedCountry.iso2,
|
|
2966
|
+
onChange: countryChangeHandler,
|
|
2967
|
+
disabled: isReadOnly,
|
|
2968
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed",
|
|
2969
|
+
children: COUNTRY_CODES.map((country) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("option", { value: country.iso2, children: [
|
|
2970
|
+
getCountryFlag(country.iso2),
|
|
2971
|
+
" ",
|
|
2972
|
+
country.name,
|
|
2973
|
+
" (",
|
|
2974
|
+
country.dialCode,
|
|
2975
|
+
")"
|
|
2976
|
+
] }, country.iso2))
|
|
2977
|
+
}
|
|
2978
|
+
)
|
|
2979
|
+
] }),
|
|
2620
2980
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2621
2981
|
"input",
|
|
2622
2982
|
{
|
|
2623
|
-
type: "text",
|
|
2983
|
+
type: hasFixedPrefix ? "text" : "tel",
|
|
2984
|
+
inputMode: hasFixedPrefix ? void 0 : "numeric",
|
|
2624
2985
|
name: props.name,
|
|
2625
2986
|
id: props.name,
|
|
2626
|
-
value,
|
|
2987
|
+
value: parsed.number,
|
|
2627
2988
|
onChange: textChangeHandler,
|
|
2628
2989
|
required: props?.attributes?.required,
|
|
2629
2990
|
placeholder: props?.attributes?.placeholder,
|
|
2630
2991
|
maxLength: props?.attributes?.maxLength,
|
|
2631
2992
|
pattern: props?.attributes?.pattern,
|
|
2632
|
-
disabled:
|
|
2993
|
+
disabled: isReadOnly,
|
|
2633
2994
|
minLength: props?.attributes?.minLength,
|
|
2634
|
-
className:
|
|
2995
|
+
className: `py-1.5 block w-full outline-none border-0 mr-0.5 ${hasFixedPrefix ? "" : "pl-3"}`
|
|
2635
2996
|
}
|
|
2636
2997
|
)
|
|
2637
2998
|
] }),
|
|
@@ -5074,9 +5435,9 @@ __export(CopyButton_exports, {
|
|
|
5074
5435
|
default: () => CopyButton
|
|
5075
5436
|
});
|
|
5076
5437
|
function CopyButton({ text }) {
|
|
5077
|
-
const [copied, setCopied] = (0,
|
|
5078
|
-
const timeoutRef = (0,
|
|
5079
|
-
(0,
|
|
5438
|
+
const [copied, setCopied] = (0, import_react54.useState)(false);
|
|
5439
|
+
const timeoutRef = (0, import_react54.useRef)(null);
|
|
5440
|
+
(0, import_react54.useEffect)(() => {
|
|
5080
5441
|
return () => {
|
|
5081
5442
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5082
5443
|
};
|
|
@@ -5091,13 +5452,13 @@ function CopyButton({ text }) {
|
|
|
5091
5452
|
console.error("Failed to copy: ", err);
|
|
5092
5453
|
}
|
|
5093
5454
|
};
|
|
5094
|
-
return /* @__PURE__ */ (0,
|
|
5455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
5095
5456
|
"button",
|
|
5096
5457
|
{
|
|
5097
5458
|
onClick: handleCopy,
|
|
5098
5459
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
5099
5460
|
children: [
|
|
5100
|
-
/* @__PURE__ */ (0,
|
|
5461
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5101
5462
|
"svg",
|
|
5102
5463
|
{
|
|
5103
5464
|
width: "16",
|
|
@@ -5105,7 +5466,7 @@ function CopyButton({ text }) {
|
|
|
5105
5466
|
viewBox: "0 0 24 24",
|
|
5106
5467
|
className: "w-4 h-4",
|
|
5107
5468
|
fill: "currentColor",
|
|
5108
|
-
children: /* @__PURE__ */ (0,
|
|
5469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5109
5470
|
"path",
|
|
5110
5471
|
{
|
|
5111
5472
|
fillRule: "evenodd",
|
|
@@ -5120,54 +5481,54 @@ function CopyButton({ text }) {
|
|
|
5120
5481
|
}
|
|
5121
5482
|
);
|
|
5122
5483
|
}
|
|
5123
|
-
var
|
|
5484
|
+
var import_react54, import_jsx_runtime74;
|
|
5124
5485
|
var init_CopyButton = __esm({
|
|
5125
5486
|
"src/components/CopyButton.tsx"() {
|
|
5126
5487
|
"use strict";
|
|
5127
5488
|
"use client";
|
|
5128
|
-
|
|
5129
|
-
|
|
5489
|
+
import_react54 = require("react");
|
|
5490
|
+
import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5130
5491
|
}
|
|
5131
5492
|
});
|
|
5132
5493
|
|
|
5133
5494
|
// src/components/IFrameLoaderView.tsx
|
|
5134
|
-
var
|
|
5495
|
+
var import_react57, import_jsx_runtime78, IFrameLoaderView, IFrameLoaderView_default;
|
|
5135
5496
|
var init_IFrameLoaderView = __esm({
|
|
5136
5497
|
"src/components/IFrameLoaderView.tsx"() {
|
|
5137
5498
|
"use strict";
|
|
5138
|
-
|
|
5139
|
-
|
|
5499
|
+
import_react57 = __toESM(require("react"));
|
|
5500
|
+
import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5140
5501
|
IFrameLoaderView = (props) => {
|
|
5141
|
-
return /* @__PURE__ */ (0,
|
|
5142
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5143
|
-
/* @__PURE__ */ (0,
|
|
5144
|
-
/* @__PURE__ */ (0,
|
|
5145
|
-
/* @__PURE__ */ (0,
|
|
5146
|
-
/* @__PURE__ */ (0,
|
|
5147
|
-
/* @__PURE__ */ (0,
|
|
5502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react57.default.Fragment, { children: [
|
|
5503
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
5504
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
5505
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
5506
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ml-2", children: [
|
|
5507
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
5508
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5148
5509
|
] })
|
|
5149
5510
|
] }),
|
|
5150
|
-
/* @__PURE__ */ (0,
|
|
5151
|
-
/* @__PURE__ */ (0,
|
|
5152
|
-
/* @__PURE__ */ (0,
|
|
5153
|
-
/* @__PURE__ */ (0,
|
|
5154
|
-
/* @__PURE__ */ (0,
|
|
5155
|
-
/* @__PURE__ */ (0,
|
|
5156
|
-
/* @__PURE__ */ (0,
|
|
5511
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
5512
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
5513
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5514
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5515
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5516
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5517
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5157
5518
|
] }),
|
|
5158
|
-
/* @__PURE__ */ (0,
|
|
5159
|
-
/* @__PURE__ */ (0,
|
|
5160
|
-
/* @__PURE__ */ (0,
|
|
5161
|
-
/* @__PURE__ */ (0,
|
|
5162
|
-
/* @__PURE__ */ (0,
|
|
5163
|
-
/* @__PURE__ */ (0,
|
|
5519
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
5520
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5521
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5522
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5523
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5524
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5164
5525
|
] }),
|
|
5165
|
-
/* @__PURE__ */ (0,
|
|
5166
|
-
/* @__PURE__ */ (0,
|
|
5167
|
-
/* @__PURE__ */ (0,
|
|
5168
|
-
/* @__PURE__ */ (0,
|
|
5169
|
-
/* @__PURE__ */ (0,
|
|
5170
|
-
/* @__PURE__ */ (0,
|
|
5526
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
5527
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5528
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5529
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5530
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5531
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5171
5532
|
] })
|
|
5172
5533
|
] })
|
|
5173
5534
|
] }) }),
|
|
@@ -5183,23 +5544,23 @@ var IframeClient_exports = {};
|
|
|
5183
5544
|
__export(IframeClient_exports, {
|
|
5184
5545
|
default: () => IframeClient_default
|
|
5185
5546
|
});
|
|
5186
|
-
var
|
|
5547
|
+
var import_react58, import_jsx_runtime79, IframeClient, IframeClient_default;
|
|
5187
5548
|
var init_IframeClient = __esm({
|
|
5188
5549
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
5189
5550
|
"use strict";
|
|
5190
5551
|
"use client";
|
|
5191
|
-
|
|
5552
|
+
import_react58 = __toESM(require("react"));
|
|
5192
5553
|
init_IFrameLoaderView();
|
|
5193
|
-
|
|
5554
|
+
import_jsx_runtime79 = require("react/jsx-runtime");
|
|
5194
5555
|
IframeClient = ({
|
|
5195
5556
|
src,
|
|
5196
5557
|
width,
|
|
5197
5558
|
height
|
|
5198
5559
|
}) => {
|
|
5199
|
-
const iframeRef = (0,
|
|
5200
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
5201
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5202
|
-
(0,
|
|
5560
|
+
const iframeRef = (0, import_react58.useRef)(null);
|
|
5561
|
+
const [iframeHeight, setIframeHeight] = (0, import_react58.useState)("100%");
|
|
5562
|
+
const [isDataFound, setIsDataFound] = (0, import_react58.useState)(null);
|
|
5563
|
+
(0, import_react58.useEffect)(() => {
|
|
5203
5564
|
const handleReceiveMessage = (event) => {
|
|
5204
5565
|
const eventName = event?.data?.eventName;
|
|
5205
5566
|
const payload = event?.data?.payload;
|
|
@@ -5214,7 +5575,7 @@ var init_IframeClient = __esm({
|
|
|
5214
5575
|
window.addEventListener("message", handleReceiveMessage);
|
|
5215
5576
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
5216
5577
|
}, []);
|
|
5217
|
-
(0,
|
|
5578
|
+
(0, import_react58.useEffect)(() => {
|
|
5218
5579
|
const handleResize = () => {
|
|
5219
5580
|
if (iframeRef.current) {
|
|
5220
5581
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -5229,7 +5590,7 @@ var init_IframeClient = __esm({
|
|
|
5229
5590
|
const handleIframeLoad = () => {
|
|
5230
5591
|
setIsDataFound(true);
|
|
5231
5592
|
};
|
|
5232
|
-
return /* @__PURE__ */ (0,
|
|
5593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5233
5594
|
"iframe",
|
|
5234
5595
|
{
|
|
5235
5596
|
ref: iframeRef,
|
|
@@ -5489,21 +5850,21 @@ var Pagination_exports = {};
|
|
|
5489
5850
|
__export(Pagination_exports, {
|
|
5490
5851
|
default: () => Pagination_default
|
|
5491
5852
|
});
|
|
5492
|
-
var
|
|
5853
|
+
var import_react59, import_jsx_runtime86, Pagination, Pagination_default;
|
|
5493
5854
|
var init_Pagination = __esm({
|
|
5494
5855
|
"src/components/Pagination.tsx"() {
|
|
5495
5856
|
"use strict";
|
|
5496
5857
|
"use client";
|
|
5497
|
-
|
|
5858
|
+
import_react59 = require("react");
|
|
5498
5859
|
init_OdataBuilder();
|
|
5499
5860
|
init_Icon();
|
|
5500
5861
|
init_StyleTypes();
|
|
5501
5862
|
init_InputControlType();
|
|
5502
5863
|
init_Hyperlink();
|
|
5503
|
-
|
|
5864
|
+
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5504
5865
|
Pagination = (props) => {
|
|
5505
5866
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
5506
|
-
const builder = (0,
|
|
5867
|
+
const builder = (0, import_react59.useMemo)(() => {
|
|
5507
5868
|
const b = new OdataBuilder(path);
|
|
5508
5869
|
if (query) b.setQuery(query);
|
|
5509
5870
|
return b;
|
|
@@ -5544,7 +5905,7 @@ var init_Pagination = __esm({
|
|
|
5544
5905
|
return range;
|
|
5545
5906
|
};
|
|
5546
5907
|
const paginationRange = getPaginationRange();
|
|
5547
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
5908
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5548
5909
|
Hyperlink,
|
|
5549
5910
|
{
|
|
5550
5911
|
linkType: "Link" /* Link */,
|
|
@@ -5559,9 +5920,9 @@ var init_Pagination = __esm({
|
|
|
5559
5920
|
);
|
|
5560
5921
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
5561
5922
|
if (disabled) {
|
|
5562
|
-
return /* @__PURE__ */ (0,
|
|
5923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
5563
5924
|
}
|
|
5564
|
-
return /* @__PURE__ */ (0,
|
|
5925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5565
5926
|
Hyperlink,
|
|
5566
5927
|
{
|
|
5567
5928
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -5571,35 +5932,35 @@ var init_Pagination = __esm({
|
|
|
5571
5932
|
);
|
|
5572
5933
|
};
|
|
5573
5934
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
5574
|
-
return /* @__PURE__ */ (0,
|
|
5575
|
-
/* @__PURE__ */ (0,
|
|
5576
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "py-6 border-t mt-6", children: [
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
5937
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "text-sm", children: [
|
|
5577
5938
|
"Showing ",
|
|
5578
|
-
/* @__PURE__ */ (0,
|
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "font-semibold", children: [
|
|
5579
5940
|
startItem,
|
|
5580
5941
|
"-",
|
|
5581
5942
|
endItem
|
|
5582
5943
|
] }),
|
|
5583
5944
|
" ",
|
|
5584
5945
|
"out of ",
|
|
5585
|
-
/* @__PURE__ */ (0,
|
|
5946
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
5586
5947
|
" results"
|
|
5587
5948
|
] }),
|
|
5588
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
5589
|
-
/* @__PURE__ */ (0,
|
|
5949
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5590
5951
|
NavigationButton,
|
|
5591
5952
|
{
|
|
5592
5953
|
page: activePageNumber - 1,
|
|
5593
5954
|
disabled: activePageNumber === 1,
|
|
5594
5955
|
children: [
|
|
5595
|
-
/* @__PURE__ */ (0,
|
|
5596
|
-
/* @__PURE__ */ (0,
|
|
5956
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
5957
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
5597
5958
|
]
|
|
5598
5959
|
}
|
|
5599
5960
|
),
|
|
5600
5961
|
paginationRange.map((item, index) => {
|
|
5601
5962
|
if (item === "...") {
|
|
5602
|
-
return /* @__PURE__ */ (0,
|
|
5963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5603
5964
|
"span",
|
|
5604
5965
|
{
|
|
5605
5966
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -5609,23 +5970,23 @@ var init_Pagination = __esm({
|
|
|
5609
5970
|
);
|
|
5610
5971
|
}
|
|
5611
5972
|
const page = item;
|
|
5612
|
-
return /* @__PURE__ */ (0,
|
|
5973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PageButton, { page, children: page }, page);
|
|
5613
5974
|
}),
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5975
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5615
5976
|
NavigationButton,
|
|
5616
5977
|
{
|
|
5617
5978
|
page: activePageNumber + 1,
|
|
5618
5979
|
disabled: activePageNumber === totalPages,
|
|
5619
5980
|
children: [
|
|
5620
|
-
/* @__PURE__ */ (0,
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
5622
5983
|
]
|
|
5623
5984
|
}
|
|
5624
5985
|
)
|
|
5625
5986
|
] }),
|
|
5626
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
5627
|
-
/* @__PURE__ */ (0,
|
|
5628
|
-
/* @__PURE__ */ (0,
|
|
5987
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
5988
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
5989
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5629
5990
|
"input",
|
|
5630
5991
|
{
|
|
5631
5992
|
type: "number",
|
|
@@ -5646,9 +6007,9 @@ var init_Pagination = __esm({
|
|
|
5646
6007
|
) })
|
|
5647
6008
|
] })
|
|
5648
6009
|
] }),
|
|
5649
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
5650
|
-
/* @__PURE__ */ (0,
|
|
5651
|
-
/* @__PURE__ */ (0,
|
|
6010
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
6011
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5652
6013
|
Hyperlink,
|
|
5653
6014
|
{
|
|
5654
6015
|
className: `
|
|
@@ -5660,7 +6021,7 @@ var init_Pagination = __esm({
|
|
|
5660
6021
|
},
|
|
5661
6022
|
size
|
|
5662
6023
|
)) }),
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "per page" })
|
|
5664
6025
|
] }) })
|
|
5665
6026
|
] });
|
|
5666
6027
|
};
|
|
@@ -5673,16 +6034,16 @@ var DataBindingControls_exports = {};
|
|
|
5673
6034
|
__export(DataBindingControls_exports, {
|
|
5674
6035
|
default: () => DataBindingControls_default
|
|
5675
6036
|
});
|
|
5676
|
-
var
|
|
6037
|
+
var import_react60, import_navigation, import_jsx_runtime87, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, SearchIcon, ResetIcon, FilterSlidersIcon, ChevronDownIcon, CheckIcon, CloseIcon, MapPinIcon, BriefcaseIcon, FileTextIcon, TagIcon, getCategoryIcon, normalizeSortOption, DataBindingControls, DataBindingControls_default;
|
|
5677
6038
|
var init_DataBindingControls = __esm({
|
|
5678
6039
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
5679
6040
|
"use strict";
|
|
5680
6041
|
"use client";
|
|
5681
|
-
|
|
6042
|
+
import_react60 = require("react");
|
|
5682
6043
|
import_navigation = require("next/navigation");
|
|
5683
6044
|
init_Button();
|
|
5684
6045
|
init_StyleTypes();
|
|
5685
|
-
|
|
6046
|
+
import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5686
6047
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
5687
6048
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
5688
6049
|
parseFacetSelections = (filter) => {
|
|
@@ -5705,7 +6066,7 @@ var init_DataBindingControls = __esm({
|
|
|
5705
6066
|
}
|
|
5706
6067
|
return trimmedValue;
|
|
5707
6068
|
};
|
|
5708
|
-
SearchIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6069
|
+
SearchIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
5709
6070
|
"svg",
|
|
5710
6071
|
{
|
|
5711
6072
|
"aria-hidden": "true",
|
|
@@ -5715,12 +6076,12 @@ var init_DataBindingControls = __esm({
|
|
|
5715
6076
|
stroke: "currentColor",
|
|
5716
6077
|
strokeWidth: "2",
|
|
5717
6078
|
children: [
|
|
5718
|
-
/* @__PURE__ */ (0,
|
|
5719
|
-
/* @__PURE__ */ (0,
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "11", cy: "11", r: "7" }),
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", d: "m20 20-4-4" })
|
|
5720
6081
|
]
|
|
5721
6082
|
}
|
|
5722
6083
|
);
|
|
5723
|
-
ResetIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6084
|
+
ResetIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
5724
6085
|
"svg",
|
|
5725
6086
|
{
|
|
5726
6087
|
"aria-hidden": "true",
|
|
@@ -5730,8 +6091,8 @@ var init_DataBindingControls = __esm({
|
|
|
5730
6091
|
stroke: "currentColor",
|
|
5731
6092
|
strokeWidth: "2",
|
|
5732
6093
|
children: [
|
|
5733
|
-
/* @__PURE__ */ (0,
|
|
5734
|
-
/* @__PURE__ */ (0,
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 4v6h6" }),
|
|
6095
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5735
6096
|
"path",
|
|
5736
6097
|
{
|
|
5737
6098
|
strokeLinecap: "round",
|
|
@@ -5742,7 +6103,7 @@ var init_DataBindingControls = __esm({
|
|
|
5742
6103
|
]
|
|
5743
6104
|
}
|
|
5744
6105
|
);
|
|
5745
|
-
FilterSlidersIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6106
|
+
FilterSlidersIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
5746
6107
|
"svg",
|
|
5747
6108
|
{
|
|
5748
6109
|
"aria-hidden": "true",
|
|
@@ -5752,14 +6113,14 @@ var init_DataBindingControls = __esm({
|
|
|
5752
6113
|
stroke: "currentColor",
|
|
5753
6114
|
strokeWidth: "2",
|
|
5754
6115
|
children: [
|
|
5755
|
-
/* @__PURE__ */ (0,
|
|
5756
|
-
/* @__PURE__ */ (0,
|
|
5757
|
-
/* @__PURE__ */ (0,
|
|
5758
|
-
/* @__PURE__ */ (0,
|
|
6116
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 4h18M3 12h18M3 20h18" }),
|
|
6117
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "8", cy: "4", r: "2", fill: "currentColor" }),
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "16", cy: "12", r: "2", fill: "currentColor" }),
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "10", cy: "20", r: "2", fill: "currentColor" })
|
|
5759
6120
|
]
|
|
5760
6121
|
}
|
|
5761
6122
|
);
|
|
5762
|
-
ChevronDownIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6123
|
+
ChevronDownIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5763
6124
|
"svg",
|
|
5764
6125
|
{
|
|
5765
6126
|
"aria-hidden": "true",
|
|
@@ -5768,10 +6129,10 @@ var init_DataBindingControls = __esm({
|
|
|
5768
6129
|
viewBox: "0 0 24 24",
|
|
5769
6130
|
stroke: "currentColor",
|
|
5770
6131
|
strokeWidth: "2",
|
|
5771
|
-
children: /* @__PURE__ */ (0,
|
|
6132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19 9-7 7-7-7" })
|
|
5772
6133
|
}
|
|
5773
6134
|
);
|
|
5774
|
-
CheckIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6135
|
+
CheckIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5775
6136
|
"svg",
|
|
5776
6137
|
{
|
|
5777
6138
|
"aria-hidden": "true",
|
|
@@ -5780,10 +6141,10 @@ var init_DataBindingControls = __esm({
|
|
|
5780
6141
|
viewBox: "0 0 24 24",
|
|
5781
6142
|
stroke: "currentColor",
|
|
5782
6143
|
strokeWidth: "2.5",
|
|
5783
|
-
children: /* @__PURE__ */ (0,
|
|
6144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
5784
6145
|
}
|
|
5785
6146
|
);
|
|
5786
|
-
CloseIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6147
|
+
CloseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5787
6148
|
"svg",
|
|
5788
6149
|
{
|
|
5789
6150
|
"aria-hidden": "true",
|
|
@@ -5792,10 +6153,10 @@ var init_DataBindingControls = __esm({
|
|
|
5792
6153
|
viewBox: "0 0 24 24",
|
|
5793
6154
|
stroke: "currentColor",
|
|
5794
6155
|
strokeWidth: "2",
|
|
5795
|
-
children: /* @__PURE__ */ (0,
|
|
6156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
5796
6157
|
}
|
|
5797
6158
|
);
|
|
5798
|
-
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6159
|
+
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
5799
6160
|
"svg",
|
|
5800
6161
|
{
|
|
5801
6162
|
"aria-hidden": "true",
|
|
@@ -5805,7 +6166,7 @@ var init_DataBindingControls = __esm({
|
|
|
5805
6166
|
stroke: "currentColor",
|
|
5806
6167
|
strokeWidth: "2",
|
|
5807
6168
|
children: [
|
|
5808
|
-
/* @__PURE__ */ (0,
|
|
6169
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5809
6170
|
"path",
|
|
5810
6171
|
{
|
|
5811
6172
|
strokeLinecap: "round",
|
|
@@ -5813,7 +6174,7 @@ var init_DataBindingControls = __esm({
|
|
|
5813
6174
|
d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
5814
6175
|
}
|
|
5815
6176
|
),
|
|
5816
|
-
/* @__PURE__ */ (0,
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5817
6178
|
"path",
|
|
5818
6179
|
{
|
|
5819
6180
|
strokeLinecap: "round",
|
|
@@ -5824,7 +6185,7 @@ var init_DataBindingControls = __esm({
|
|
|
5824
6185
|
]
|
|
5825
6186
|
}
|
|
5826
6187
|
);
|
|
5827
|
-
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6188
|
+
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5828
6189
|
"svg",
|
|
5829
6190
|
{
|
|
5830
6191
|
"aria-hidden": "true",
|
|
@@ -5833,7 +6194,7 @@ var init_DataBindingControls = __esm({
|
|
|
5833
6194
|
viewBox: "0 0 24 24",
|
|
5834
6195
|
stroke: "currentColor",
|
|
5835
6196
|
strokeWidth: "2",
|
|
5836
|
-
children: /* @__PURE__ */ (0,
|
|
6197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5837
6198
|
"path",
|
|
5838
6199
|
{
|
|
5839
6200
|
strokeLinecap: "round",
|
|
@@ -5843,7 +6204,7 @@ var init_DataBindingControls = __esm({
|
|
|
5843
6204
|
)
|
|
5844
6205
|
}
|
|
5845
6206
|
);
|
|
5846
|
-
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6207
|
+
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5847
6208
|
"svg",
|
|
5848
6209
|
{
|
|
5849
6210
|
"aria-hidden": "true",
|
|
@@ -5852,7 +6213,7 @@ var init_DataBindingControls = __esm({
|
|
|
5852
6213
|
viewBox: "0 0 24 24",
|
|
5853
6214
|
stroke: "currentColor",
|
|
5854
6215
|
strokeWidth: "2",
|
|
5855
|
-
children: /* @__PURE__ */ (0,
|
|
6216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5856
6217
|
"path",
|
|
5857
6218
|
{
|
|
5858
6219
|
strokeLinecap: "round",
|
|
@@ -5862,7 +6223,7 @@ var init_DataBindingControls = __esm({
|
|
|
5862
6223
|
)
|
|
5863
6224
|
}
|
|
5864
6225
|
);
|
|
5865
|
-
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6226
|
+
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5866
6227
|
"svg",
|
|
5867
6228
|
{
|
|
5868
6229
|
"aria-hidden": "true",
|
|
@@ -5871,7 +6232,7 @@ var init_DataBindingControls = __esm({
|
|
|
5871
6232
|
viewBox: "0 0 24 24",
|
|
5872
6233
|
stroke: "currentColor",
|
|
5873
6234
|
strokeWidth: "2",
|
|
5874
|
-
children: /* @__PURE__ */ (0,
|
|
6235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5875
6236
|
"path",
|
|
5876
6237
|
{
|
|
5877
6238
|
strokeLinecap: "round",
|
|
@@ -5884,15 +6245,15 @@ var init_DataBindingControls = __esm({
|
|
|
5884
6245
|
getCategoryIcon = (category) => {
|
|
5885
6246
|
const lower = category.toLowerCase();
|
|
5886
6247
|
if (lower.includes("location") || lower.includes("city") || lower.includes("country") || lower.includes("state") || lower.includes("address")) {
|
|
5887
|
-
return /* @__PURE__ */ (0,
|
|
6248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MapPinIcon, { className: "h-4 w-4" });
|
|
5888
6249
|
}
|
|
5889
6250
|
if (lower.includes("type") || lower.includes("work") || lower.includes("employment") || lower.includes("experience")) {
|
|
5890
|
-
return /* @__PURE__ */ (0,
|
|
6251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(BriefcaseIcon, { className: "h-4 w-4" });
|
|
5891
6252
|
}
|
|
5892
6253
|
if (lower.includes("department") || lower.includes("category") || lower.includes("role") || lower.includes("industry")) {
|
|
5893
|
-
return /* @__PURE__ */ (0,
|
|
6254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FileTextIcon, { className: "h-4 w-4" });
|
|
5894
6255
|
}
|
|
5895
|
-
return /* @__PURE__ */ (0,
|
|
6256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TagIcon, { className: "h-4 w-4" });
|
|
5896
6257
|
};
|
|
5897
6258
|
normalizeSortOption = (option) => {
|
|
5898
6259
|
const direction = option.direction.trim();
|
|
@@ -5914,13 +6275,13 @@ var init_DataBindingControls = __esm({
|
|
|
5914
6275
|
}) => {
|
|
5915
6276
|
const router = (0, import_navigation.useRouter)();
|
|
5916
6277
|
const searchParams = (0, import_navigation.useSearchParams)();
|
|
5917
|
-
const [collapsedCategories, setCollapsedCategories] = (0,
|
|
5918
|
-
const [isSortOpen, setIsSortOpen] = (0,
|
|
5919
|
-
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0,
|
|
5920
|
-
const [facetCategorySearch, setFacetCategorySearch] = (0,
|
|
5921
|
-
const desktopSortDropdownRef = (0,
|
|
5922
|
-
const mobileSortDropdownRef = (0,
|
|
5923
|
-
(0,
|
|
6278
|
+
const [collapsedCategories, setCollapsedCategories] = (0, import_react60.useState)({});
|
|
6279
|
+
const [isSortOpen, setIsSortOpen] = (0, import_react60.useState)(false);
|
|
6280
|
+
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0, import_react60.useState)(false);
|
|
6281
|
+
const [facetCategorySearch, setFacetCategorySearch] = (0, import_react60.useState)({});
|
|
6282
|
+
const desktopSortDropdownRef = (0, import_react60.useRef)(null);
|
|
6283
|
+
const mobileSortDropdownRef = (0, import_react60.useRef)(null);
|
|
6284
|
+
(0, import_react60.useEffect)(() => {
|
|
5924
6285
|
const handleClickOutside = (event) => {
|
|
5925
6286
|
const target = event.target;
|
|
5926
6287
|
const clickedInsideDesktop = desktopSortDropdownRef.current?.contains(target);
|
|
@@ -5946,15 +6307,15 @@ var init_DataBindingControls = __esm({
|
|
|
5946
6307
|
const currentSearch = parseODataSearch(
|
|
5947
6308
|
searchParamsSearch !== void 0 && searchParamsSearch !== null ? searchParamsSearch : query?.["$search"]
|
|
5948
6309
|
);
|
|
5949
|
-
const [searchText, setSearchText] = (0,
|
|
5950
|
-
(0,
|
|
6310
|
+
const [searchText, setSearchText] = (0, import_react60.useState)(currentSearch);
|
|
6311
|
+
(0, import_react60.useEffect)(() => {
|
|
5951
6312
|
setSearchText(currentSearch);
|
|
5952
6313
|
}, [currentSearch]);
|
|
5953
|
-
const selectedFacetValues = (0,
|
|
6314
|
+
const selectedFacetValues = (0, import_react60.useMemo)(
|
|
5954
6315
|
() => parseFacetSelections(currentFilter),
|
|
5955
6316
|
[currentFilter]
|
|
5956
6317
|
);
|
|
5957
|
-
(0,
|
|
6318
|
+
(0, import_react60.useEffect)(() => {
|
|
5958
6319
|
if (isMobileFiltersOpen) {
|
|
5959
6320
|
document.body.style.overflow = "hidden";
|
|
5960
6321
|
} else {
|
|
@@ -5964,7 +6325,7 @@ var init_DataBindingControls = __esm({
|
|
|
5964
6325
|
document.body.style.overflow = "";
|
|
5965
6326
|
};
|
|
5966
6327
|
}, [isMobileFiltersOpen]);
|
|
5967
|
-
const activeFacets = (0,
|
|
6328
|
+
const activeFacets = (0, import_react60.useMemo)(() => {
|
|
5968
6329
|
const facetMap = /* @__PURE__ */ new Map();
|
|
5969
6330
|
if (facets) {
|
|
5970
6331
|
Object.entries(facets).forEach(([field, values]) => {
|
|
@@ -5989,11 +6350,11 @@ var init_DataBindingControls = __esm({
|
|
|
5989
6350
|
});
|
|
5990
6351
|
return Array.from(facetMap.entries());
|
|
5991
6352
|
}, [facets, selectedFacetValues]);
|
|
5992
|
-
const normalizedSortOptions = (0,
|
|
6353
|
+
const normalizedSortOptions = (0, import_react60.useMemo)(
|
|
5993
6354
|
() => (sortOptions ?? []).filter((option) => option?.name && option?.direction).map(normalizeSortOption).filter((option) => option.value),
|
|
5994
6355
|
[sortOptions]
|
|
5995
6356
|
);
|
|
5996
|
-
const selectedSortOption = (0,
|
|
6357
|
+
const selectedSortOption = (0, import_react60.useMemo)(() => {
|
|
5997
6358
|
if (!normalizedSortOptions.length) return null;
|
|
5998
6359
|
const trimmedCurrentSort = currentSort.trim().toLowerCase();
|
|
5999
6360
|
if (!trimmedCurrentSort) return normalizedSortOptions[0];
|
|
@@ -6002,7 +6363,7 @@ var init_DataBindingControls = __esm({
|
|
|
6002
6363
|
) || normalizedSortOptions[0];
|
|
6003
6364
|
}, [normalizedSortOptions, currentSort]);
|
|
6004
6365
|
const selectedSortLabel = selectedSortOption?.label || "";
|
|
6005
|
-
const getQueryUrl = (0,
|
|
6366
|
+
const getQueryUrl = (0, import_react60.useCallback)(
|
|
6006
6367
|
(updates) => {
|
|
6007
6368
|
const initialParams = searchParams ? searchParams.toString() : "";
|
|
6008
6369
|
const params = new URLSearchParams(initialParams || query || {});
|
|
@@ -6020,7 +6381,7 @@ var init_DataBindingControls = __esm({
|
|
|
6020
6381
|
},
|
|
6021
6382
|
[path, query, searchParams]
|
|
6022
6383
|
);
|
|
6023
|
-
const navigateWithoutReload = (0,
|
|
6384
|
+
const navigateWithoutReload = (0, import_react60.useCallback)(
|
|
6024
6385
|
(url) => {
|
|
6025
6386
|
if (typeof window !== "undefined") {
|
|
6026
6387
|
const targetUrl = new URL(url, window.location.origin);
|
|
@@ -6032,7 +6393,7 @@ var init_DataBindingControls = __esm({
|
|
|
6032
6393
|
},
|
|
6033
6394
|
[router]
|
|
6034
6395
|
);
|
|
6035
|
-
const handleSelectSort = (0,
|
|
6396
|
+
const handleSelectSort = (0, import_react60.useCallback)(
|
|
6036
6397
|
(sortValue) => {
|
|
6037
6398
|
setIsSortOpen(false);
|
|
6038
6399
|
navigateWithoutReload(
|
|
@@ -6072,7 +6433,7 @@ var init_DataBindingControls = __esm({
|
|
|
6072
6433
|
})
|
|
6073
6434
|
);
|
|
6074
6435
|
};
|
|
6075
|
-
const handleSearch = (0,
|
|
6436
|
+
const handleSearch = (0, import_react60.useCallback)(async () => {
|
|
6076
6437
|
const trimmedSearchText = searchText.trim();
|
|
6077
6438
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
6078
6439
|
return { isSuccessful: true };
|
|
@@ -6084,7 +6445,7 @@ var init_DataBindingControls = __esm({
|
|
|
6084
6445
|
);
|
|
6085
6446
|
return { isSuccessful: true };
|
|
6086
6447
|
}, [currentSearch, getQueryUrl, navigateWithoutReload, searchText]);
|
|
6087
|
-
const handleClearAll = (0,
|
|
6448
|
+
const handleClearAll = (0, import_react60.useCallback)(async () => {
|
|
6088
6449
|
navigateWithoutReload(
|
|
6089
6450
|
getQueryUrl({
|
|
6090
6451
|
$filter: void 0,
|
|
@@ -6107,9 +6468,9 @@ var init_DataBindingControls = __esm({
|
|
|
6107
6468
|
if (!shouldShowToolbar && !shouldShowFacets) {
|
|
6108
6469
|
return null;
|
|
6109
6470
|
}
|
|
6110
|
-
const renderFacetItems = (field, values) => /* @__PURE__ */ (0,
|
|
6471
|
+
const renderFacetItems = (field, values) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col gap-1 pt-1 pb-1", children: values.map((facet) => {
|
|
6111
6472
|
const isSelected = selectedFacetValues.get(field) === facet.value;
|
|
6112
|
-
return /* @__PURE__ */ (0,
|
|
6473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6113
6474
|
"button",
|
|
6114
6475
|
{
|
|
6115
6476
|
type: "button",
|
|
@@ -6117,17 +6478,17 @@ var init_DataBindingControls = __esm({
|
|
|
6117
6478
|
"aria-pressed": isSelected,
|
|
6118
6479
|
className: `group flex w-full cursor-pointer items-center justify-between gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base ${isSelected ? "bg-neutral-soft font-medium border border-neutral-soft" : "hover:bg-neutral-weak border border-transparent"}`,
|
|
6119
6480
|
children: [
|
|
6120
|
-
/* @__PURE__ */ (0,
|
|
6121
|
-
/* @__PURE__ */ (0,
|
|
6481
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
6482
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6122
6483
|
"span",
|
|
6123
6484
|
{
|
|
6124
6485
|
className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-[3px] border transition-colors duration-150 ${isSelected ? "bg-primary-base border-primary-base" : " group-hover:border-neutral-strong bg-default border-neutral-soft"}`,
|
|
6125
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
6486
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-3 w-3" })
|
|
6126
6487
|
}
|
|
6127
6488
|
),
|
|
6128
|
-
/* @__PURE__ */ (0,
|
|
6489
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
6129
6490
|
] }),
|
|
6130
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6131
6492
|
"span",
|
|
6132
6493
|
{
|
|
6133
6494
|
className: `shrink-0 rounded px-1.5 py-0.5 text-xs transition-colors ml-2 ${isSelected ? "bg-neutral-weak font-semibold" : "bg-neutral-weak font-normal"}`,
|
|
@@ -6139,14 +6500,14 @@ var init_DataBindingControls = __esm({
|
|
|
6139
6500
|
`${field}-${facet.value}`
|
|
6140
6501
|
);
|
|
6141
6502
|
}) });
|
|
6142
|
-
return /* @__PURE__ */ (0,
|
|
6503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6143
6504
|
"div",
|
|
6144
6505
|
{
|
|
6145
6506
|
className: mode === "toolbar" ? "my-4 sm:my-6" : "flex flex-col rounded-md border border-neutral-soft bg-default p-4 shadow-sm",
|
|
6146
6507
|
children: [
|
|
6147
|
-
shouldShowToolbar && /* @__PURE__ */ (0,
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6149
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
6508
|
+
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
6509
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "hidden lg:flex lg:items-center lg:justify-between lg:gap-4", children: [
|
|
6510
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6150
6511
|
"form",
|
|
6151
6512
|
{
|
|
6152
6513
|
role: "search",
|
|
@@ -6156,9 +6517,9 @@ var init_DataBindingControls = __esm({
|
|
|
6156
6517
|
void handleSearch();
|
|
6157
6518
|
},
|
|
6158
6519
|
children: [
|
|
6159
|
-
/* @__PURE__ */ (0,
|
|
6160
|
-
/* @__PURE__ */ (0,
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6520
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
|
|
6521
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-60" }),
|
|
6522
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6162
6523
|
"input",
|
|
6163
6524
|
{
|
|
6164
6525
|
type: "text",
|
|
@@ -6170,23 +6531,23 @@ var init_DataBindingControls = __esm({
|
|
|
6170
6531
|
}
|
|
6171
6532
|
)
|
|
6172
6533
|
] }),
|
|
6173
|
-
/* @__PURE__ */ (0,
|
|
6534
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6174
6535
|
Button_default,
|
|
6175
6536
|
{
|
|
6176
6537
|
ButtonType: "Primary" /* Solid */,
|
|
6177
6538
|
onClick: handleSearch,
|
|
6178
6539
|
className: "!h-10 !rounded-md !px-5 !py-0 flex items-center justify-center gap-1.5 shrink-0",
|
|
6179
6540
|
children: [
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "h-4 w-4" }),
|
|
6542
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: "Search" })
|
|
6182
6543
|
]
|
|
6183
6544
|
}
|
|
6184
6545
|
)
|
|
6185
6546
|
]
|
|
6186
6547
|
}
|
|
6187
6548
|
),
|
|
6188
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
6189
|
-
/* @__PURE__ */ (0,
|
|
6549
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative shrink-0", ref: desktopSortDropdownRef, children: [
|
|
6550
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6190
6551
|
"button",
|
|
6191
6552
|
{
|
|
6192
6553
|
type: "button",
|
|
@@ -6194,11 +6555,11 @@ var init_DataBindingControls = __esm({
|
|
|
6194
6555
|
"aria-expanded": isSortOpen,
|
|
6195
6556
|
className: "inline-flex h-10 items-center justify-between gap-2.5 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-normal shadow-sm transition-all hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-base cursor-pointer whitespace-nowrap",
|
|
6196
6557
|
children: [
|
|
6197
|
-
/* @__PURE__ */ (0,
|
|
6198
|
-
/* @__PURE__ */ (0,
|
|
6199
|
-
/* @__PURE__ */ (0,
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "whitespace-nowrap", children: [
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "opacity-70", children: "Sort by: " }),
|
|
6560
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-semibold", children: selectedSortLabel })
|
|
6200
6561
|
] }),
|
|
6201
|
-
/* @__PURE__ */ (0,
|
|
6562
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6202
6563
|
ChevronDownIcon,
|
|
6203
6564
|
{
|
|
6204
6565
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
@@ -6207,17 +6568,17 @@ var init_DataBindingControls = __esm({
|
|
|
6207
6568
|
]
|
|
6208
6569
|
}
|
|
6209
6570
|
),
|
|
6210
|
-
isSortOpen && /* @__PURE__ */ (0,
|
|
6571
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-full max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-lg", children: normalizedSortOptions.map((option) => {
|
|
6211
6572
|
const isSelected = selectedSortOption?.value === option.value;
|
|
6212
|
-
return /* @__PURE__ */ (0,
|
|
6573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6213
6574
|
"button",
|
|
6214
6575
|
{
|
|
6215
6576
|
type: "button",
|
|
6216
6577
|
onClick: () => handleSelectSort(option.value),
|
|
6217
6578
|
className: `flex w-full items-center justify-between gap-4 rounded-md px-3 py-1.5 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6218
6579
|
children: [
|
|
6219
|
-
/* @__PURE__ */ (0,
|
|
6220
|
-
isSelected && /* @__PURE__ */ (0,
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
6581
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6221
6582
|
]
|
|
6222
6583
|
},
|
|
6223
6584
|
option.value
|
|
@@ -6225,8 +6586,8 @@ var init_DataBindingControls = __esm({
|
|
|
6225
6586
|
}) })
|
|
6226
6587
|
] })
|
|
6227
6588
|
] }),
|
|
6228
|
-
/* @__PURE__ */ (0,
|
|
6229
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-2.5 lg:hidden", children: [
|
|
6590
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6230
6591
|
"form",
|
|
6231
6592
|
{
|
|
6232
6593
|
role: "search",
|
|
@@ -6236,8 +6597,8 @@ var init_DataBindingControls = __esm({
|
|
|
6236
6597
|
void handleSearch();
|
|
6237
6598
|
},
|
|
6238
6599
|
children: [
|
|
6239
|
-
/* @__PURE__ */ (0,
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6600
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-50" }),
|
|
6601
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6241
6602
|
"input",
|
|
6242
6603
|
{
|
|
6243
6604
|
type: "text",
|
|
@@ -6251,28 +6612,28 @@ var init_DataBindingControls = __esm({
|
|
|
6251
6612
|
]
|
|
6252
6613
|
}
|
|
6253
6614
|
),
|
|
6254
|
-
/* @__PURE__ */ (0,
|
|
6255
|
-
showFacets && /* @__PURE__ */ (0,
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center justify-between gap-2.5 pt-0.5", children: [
|
|
6616
|
+
showFacets && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6256
6617
|
"button",
|
|
6257
6618
|
{
|
|
6258
6619
|
type: "button",
|
|
6259
6620
|
onClick: () => setIsMobileFiltersOpen(true),
|
|
6260
6621
|
className: "inline-flex h-10 items-center justify-center gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer active:scale-95",
|
|
6261
6622
|
children: [
|
|
6262
|
-
/* @__PURE__ */ (0,
|
|
6263
|
-
/* @__PURE__ */ (0,
|
|
6623
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
6624
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { children: [
|
|
6264
6625
|
"Filters",
|
|
6265
6626
|
selectedFacetCount > 0 ? ` (${selectedFacetCount})` : ""
|
|
6266
6627
|
] }),
|
|
6267
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6268
|
-
/* @__PURE__ */ (0,
|
|
6269
|
-
/* @__PURE__ */ (0,
|
|
6628
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "relative flex h-2 w-2", children: [
|
|
6629
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary-base opacity-75" }),
|
|
6630
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary-base" })
|
|
6270
6631
|
] })
|
|
6271
6632
|
]
|
|
6272
6633
|
}
|
|
6273
6634
|
),
|
|
6274
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
6275
|
-
/* @__PURE__ */ (0,
|
|
6635
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative shrink-0 ml-auto", ref: mobileSortDropdownRef, children: [
|
|
6636
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6276
6637
|
"button",
|
|
6277
6638
|
{
|
|
6278
6639
|
type: "button",
|
|
@@ -6280,8 +6641,8 @@ var init_DataBindingControls = __esm({
|
|
|
6280
6641
|
"aria-expanded": isSortOpen,
|
|
6281
6642
|
className: "inline-flex h-10 items-center justify-between gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer whitespace-nowrap",
|
|
6282
6643
|
children: [
|
|
6283
|
-
/* @__PURE__ */ (0,
|
|
6284
|
-
/* @__PURE__ */ (0,
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "whitespace-nowrap font-medium", children: selectedSortLabel }),
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6285
6646
|
ChevronDownIcon,
|
|
6286
6647
|
{
|
|
6287
6648
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
@@ -6290,17 +6651,17 @@ var init_DataBindingControls = __esm({
|
|
|
6290
6651
|
]
|
|
6291
6652
|
}
|
|
6292
6653
|
),
|
|
6293
|
-
isSortOpen && /* @__PURE__ */ (0,
|
|
6654
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-[160px] max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-xl", children: normalizedSortOptions.map((option) => {
|
|
6294
6655
|
const isSelected = selectedSortOption?.value === option.value;
|
|
6295
|
-
return /* @__PURE__ */ (0,
|
|
6656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6296
6657
|
"button",
|
|
6297
6658
|
{
|
|
6298
6659
|
type: "button",
|
|
6299
6660
|
onClick: () => handleSelectSort(option.value),
|
|
6300
6661
|
className: `flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6301
6662
|
children: [
|
|
6302
|
-
/* @__PURE__ */ (0,
|
|
6303
|
-
isSelected && /* @__PURE__ */ (0,
|
|
6663
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
6664
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6304
6665
|
]
|
|
6305
6666
|
},
|
|
6306
6667
|
option.value
|
|
@@ -6308,8 +6669,8 @@ var init_DataBindingControls = __esm({
|
|
|
6308
6669
|
}) })
|
|
6309
6670
|
] })
|
|
6310
6671
|
] }),
|
|
6311
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6312
|
-
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0,
|
|
6672
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 pt-1", children: [
|
|
6673
|
+
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6313
6674
|
"button",
|
|
6314
6675
|
{
|
|
6315
6676
|
type: "button",
|
|
@@ -6317,13 +6678,13 @@ var init_DataBindingControls = __esm({
|
|
|
6317
6678
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6318
6679
|
title: `Remove filter: ${value}`,
|
|
6319
6680
|
children: [
|
|
6320
|
-
/* @__PURE__ */ (0,
|
|
6321
|
-
/* @__PURE__ */ (0,
|
|
6681
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-medium truncate max-w-[140px]", children: value }),
|
|
6682
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseIcon, { className: "h-3 w-3 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
6322
6683
|
]
|
|
6323
6684
|
},
|
|
6324
6685
|
`mobile-chip-${field}`
|
|
6325
6686
|
)),
|
|
6326
|
-
/* @__PURE__ */ (0,
|
|
6687
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6327
6688
|
"button",
|
|
6328
6689
|
{
|
|
6329
6690
|
type: "button",
|
|
@@ -6334,8 +6695,8 @@ var init_DataBindingControls = __esm({
|
|
|
6334
6695
|
)
|
|
6335
6696
|
] })
|
|
6336
6697
|
] }),
|
|
6337
|
-
isMobileFiltersOpen && /* @__PURE__ */ (0,
|
|
6338
|
-
/* @__PURE__ */ (0,
|
|
6698
|
+
isMobileFiltersOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "fixed inset-0 z-50 flex flex-col justify-end lg:hidden", children: [
|
|
6699
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6339
6700
|
"div",
|
|
6340
6701
|
{
|
|
6341
6702
|
className: "fixed inset-0 bg-neutral-stronger/60 backdrop-blur-xs transition-opacity duration-300",
|
|
@@ -6343,12 +6704,12 @@ var init_DataBindingControls = __esm({
|
|
|
6343
6704
|
"aria-hidden": "true"
|
|
6344
6705
|
}
|
|
6345
6706
|
),
|
|
6346
|
-
/* @__PURE__ */ (0,
|
|
6347
|
-
/* @__PURE__ */ (0,
|
|
6348
|
-
/* @__PURE__ */ (0,
|
|
6349
|
-
/* @__PURE__ */ (0,
|
|
6350
|
-
/* @__PURE__ */ (0,
|
|
6351
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6707
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative z-10 flex h-[85vh] max-h-[85vh] w-full flex-col rounded-t-xl border-t border-neutral-soft bg-default shadow-2xl transition-transform duration-300 animate-in slide-in-from-bottom", children: [
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt-2.5 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "mx-auto h-1.5 w-12 rounded-full bg-neutral-soft" }) }),
|
|
6709
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center justify-between px-5 py-3 border-b border-neutral-soft", children: [
|
|
6710
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "text-lg font-bold tracking-tight", children: "Filters" }),
|
|
6711
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6712
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6352
6713
|
"button",
|
|
6353
6714
|
{
|
|
6354
6715
|
type: "button",
|
|
@@ -6357,38 +6718,38 @@ var init_DataBindingControls = __esm({
|
|
|
6357
6718
|
children: "Clear all"
|
|
6358
6719
|
}
|
|
6359
6720
|
),
|
|
6360
|
-
/* @__PURE__ */ (0,
|
|
6721
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6361
6722
|
"button",
|
|
6362
6723
|
{
|
|
6363
6724
|
type: "button",
|
|
6364
6725
|
onClick: () => setIsMobileFiltersOpen(false),
|
|
6365
6726
|
className: "p-1 rounded-full hover:bg-neutral-weak transition-colors cursor-pointer",
|
|
6366
6727
|
"aria-label": "Close filters",
|
|
6367
|
-
children: /* @__PURE__ */ (0,
|
|
6728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseIcon, { className: "h-5 w-5 opacity-70" })
|
|
6368
6729
|
}
|
|
6369
6730
|
)
|
|
6370
6731
|
] })
|
|
6371
6732
|
] }),
|
|
6372
|
-
/* @__PURE__ */ (0,
|
|
6733
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex-1 overflow-y-auto px-5 py-3 space-y-3 divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
6373
6734
|
const isOpen = !collapsedCategories[field];
|
|
6374
6735
|
const selectedValue = selectedFacetValues.get(field);
|
|
6375
6736
|
const categorySearch = facetCategorySearch[field]?.toLowerCase() || "";
|
|
6376
6737
|
const filteredValues = categorySearch ? values.filter((v) => v.value.toLowerCase().includes(categorySearch)) : values;
|
|
6377
|
-
return /* @__PURE__ */ (0,
|
|
6378
|
-
/* @__PURE__ */ (0,
|
|
6738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "pt-3 first:pt-0", children: [
|
|
6739
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6379
6740
|
"button",
|
|
6380
6741
|
{
|
|
6381
6742
|
type: "button",
|
|
6382
6743
|
onClick: () => toggleCategory(field),
|
|
6383
6744
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md py-2 text-left transition-colors",
|
|
6384
6745
|
children: [
|
|
6385
|
-
/* @__PURE__ */ (0,
|
|
6386
|
-
/* @__PURE__ */ (0,
|
|
6387
|
-
/* @__PURE__ */ (0,
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
6747
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
6748
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-semibold text-sm", children: humanize(field) })
|
|
6388
6749
|
] }),
|
|
6389
|
-
/* @__PURE__ */ (0,
|
|
6390
|
-
selectedValue && /* @__PURE__ */ (0,
|
|
6391
|
-
/* @__PURE__ */ (0,
|
|
6750
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6751
|
+
selectedValue && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary-base text-xs font-bold leading-none", children: "1" }),
|
|
6752
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6392
6753
|
ChevronDownIcon,
|
|
6393
6754
|
{
|
|
6394
6755
|
className: `h-4 w-4 transition-transform duration-200 ${isOpen ? "rotate-180" : ""}`
|
|
@@ -6398,10 +6759,10 @@ var init_DataBindingControls = __esm({
|
|
|
6398
6759
|
]
|
|
6399
6760
|
}
|
|
6400
6761
|
),
|
|
6401
|
-
isOpen && /* @__PURE__ */ (0,
|
|
6402
|
-
values.length > 5 && /* @__PURE__ */ (0,
|
|
6403
|
-
/* @__PURE__ */ (0,
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6762
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "pt-2 pb-1 pl-1 pr-1 space-y-1.5", children: [
|
|
6763
|
+
values.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative mb-2", children: [
|
|
6764
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 opacity-50" }),
|
|
6765
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6405
6766
|
"input",
|
|
6406
6767
|
{
|
|
6407
6768
|
type: "text",
|
|
@@ -6415,9 +6776,9 @@ var init_DataBindingControls = __esm({
|
|
|
6415
6776
|
}
|
|
6416
6777
|
)
|
|
6417
6778
|
] }),
|
|
6418
|
-
filteredValues.length === 0 ? /* @__PURE__ */ (0,
|
|
6779
|
+
filteredValues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "py-2 text-center text-xs opacity-60", children: "No matching options" }) : filteredValues.map((facet) => {
|
|
6419
6780
|
const isChecked = selectedValue === facet.value;
|
|
6420
|
-
return /* @__PURE__ */ (0,
|
|
6781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6421
6782
|
"button",
|
|
6422
6783
|
{
|
|
6423
6784
|
type: "button",
|
|
@@ -6427,17 +6788,17 @@ var init_DataBindingControls = __esm({
|
|
|
6427
6788
|
"aria-pressed": isChecked,
|
|
6428
6789
|
className: `flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2.5 py-2 text-left text-sm transition-colors ${isChecked ? "bg-neutral-soft font-medium" : "hover:bg-neutral-weak"}`,
|
|
6429
6790
|
children: [
|
|
6430
|
-
/* @__PURE__ */ (0,
|
|
6431
|
-
/* @__PURE__ */ (0,
|
|
6791
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
6792
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6432
6793
|
"span",
|
|
6433
6794
|
{
|
|
6434
6795
|
className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-md border transition-colors ${isChecked ? "bg-primary-base border-primary-base" : "border-neutral-soft bg-default"}`,
|
|
6435
|
-
children: isChecked && /* @__PURE__ */ (0,
|
|
6796
|
+
children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-3.5 w-3.5" })
|
|
6436
6797
|
}
|
|
6437
6798
|
),
|
|
6438
|
-
/* @__PURE__ */ (0,
|
|
6799
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
6439
6800
|
] }),
|
|
6440
|
-
/* @__PURE__ */ (0,
|
|
6801
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "shrink-0 text-xs opacity-60 ml-2", children: facet.count })
|
|
6441
6802
|
]
|
|
6442
6803
|
},
|
|
6443
6804
|
`drawer-${field}-${facet.value}`
|
|
@@ -6446,8 +6807,8 @@ var init_DataBindingControls = __esm({
|
|
|
6446
6807
|
] })
|
|
6447
6808
|
] }, `drawer-cat-${field}`);
|
|
6448
6809
|
}) }),
|
|
6449
|
-
/* @__PURE__ */ (0,
|
|
6450
|
-
/* @__PURE__ */ (0,
|
|
6810
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-3 border-t border-neutral-soft bg-default p-4", children: [
|
|
6811
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6451
6812
|
"button",
|
|
6452
6813
|
{
|
|
6453
6814
|
type: "button",
|
|
@@ -6456,7 +6817,7 @@ var init_DataBindingControls = __esm({
|
|
|
6456
6817
|
children: "Close"
|
|
6457
6818
|
}
|
|
6458
6819
|
),
|
|
6459
|
-
/* @__PURE__ */ (0,
|
|
6820
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6460
6821
|
"button",
|
|
6461
6822
|
{
|
|
6462
6823
|
type: "button",
|
|
@@ -6472,14 +6833,14 @@ var init_DataBindingControls = __esm({
|
|
|
6472
6833
|
] })
|
|
6473
6834
|
] })
|
|
6474
6835
|
] }),
|
|
6475
|
-
shouldShowFacets && /* @__PURE__ */ (0,
|
|
6476
|
-
/* @__PURE__ */ (0,
|
|
6477
|
-
/* @__PURE__ */ (0,
|
|
6478
|
-
/* @__PURE__ */ (0,
|
|
6479
|
-
/* @__PURE__ */ (0,
|
|
6480
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6836
|
+
shouldShowFacets && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
6837
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center justify-between border-b border-neutral-soft pb-3", children: [
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6839
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "text-base font-semibold tracking-tight", children: "Filters" }),
|
|
6841
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-5 items-center justify-center rounded-full bg-primary-base px-2 text-xs font-semibold", children: selectedFacetCount })
|
|
6481
6842
|
] }),
|
|
6482
|
-
hasActiveFiltersOrSort && /* @__PURE__ */ (0,
|
|
6843
|
+
hasActiveFiltersOrSort && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6483
6844
|
"button",
|
|
6484
6845
|
{
|
|
6485
6846
|
type: "button",
|
|
@@ -6487,13 +6848,13 @@ var init_DataBindingControls = __esm({
|
|
|
6487
6848
|
className: "group inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors duration-150 hover:bg-neutral-soft focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
6488
6849
|
"aria-label": "Clear all filters and sorting",
|
|
6489
6850
|
children: [
|
|
6490
|
-
/* @__PURE__ */ (0,
|
|
6491
|
-
/* @__PURE__ */ (0,
|
|
6851
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ResetIcon, { className: "h-3.5 w-3.5 transition-transform duration-200 group-hover:-rotate-45" }),
|
|
6852
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: "Clear all" })
|
|
6492
6853
|
]
|
|
6493
6854
|
}
|
|
6494
6855
|
)
|
|
6495
6856
|
] }),
|
|
6496
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6857
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-wrap gap-1.5 pb-2.5 border-b border-neutral-soft", children: Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6497
6858
|
"button",
|
|
6498
6859
|
{
|
|
6499
6860
|
type: "button",
|
|
@@ -6501,35 +6862,35 @@ var init_DataBindingControls = __esm({
|
|
|
6501
6862
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6502
6863
|
title: `Remove filter: ${value}`,
|
|
6503
6864
|
children: [
|
|
6504
|
-
/* @__PURE__ */ (0,
|
|
6505
|
-
/* @__PURE__ */ (0,
|
|
6865
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-medium truncate max-w-[150px]", children: value }),
|
|
6866
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseIcon, { className: "h-3.5 w-3.5 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
6506
6867
|
]
|
|
6507
6868
|
},
|
|
6508
6869
|
`chip-${field}`
|
|
6509
6870
|
)) }),
|
|
6510
|
-
activeFacets.length === 1 && /* @__PURE__ */ (0,
|
|
6511
|
-
/* @__PURE__ */ (0,
|
|
6871
|
+
activeFacets.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("nav", { "aria-label": `${humanize(activeFacets[0][0])} filters`, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "py-1", children: [
|
|
6872
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "px-1 pb-2 font-medium text-sm", children: humanize(activeFacets[0][0]) }),
|
|
6512
6873
|
renderFacetItems(activeFacets[0][0], activeFacets[0][1])
|
|
6513
6874
|
] }) }),
|
|
6514
|
-
activeFacets.length > 1 && /* @__PURE__ */ (0,
|
|
6875
|
+
activeFacets.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
6515
6876
|
const isOpen = !collapsedCategories[field];
|
|
6516
|
-
return /* @__PURE__ */ (0,
|
|
6877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6517
6878
|
"div",
|
|
6518
6879
|
{
|
|
6519
6880
|
className: "py-2 first:pt-0 last:pb-0",
|
|
6520
6881
|
children: [
|
|
6521
|
-
/* @__PURE__ */ (0,
|
|
6882
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6522
6883
|
"button",
|
|
6523
6884
|
{
|
|
6524
6885
|
type: "button",
|
|
6525
6886
|
onClick: () => toggleCategory(field),
|
|
6526
6887
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md px-1.5 py-1.5 text-sm font-semibold transition-colors duration-150 hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
6527
6888
|
children: [
|
|
6528
|
-
/* @__PURE__ */ (0,
|
|
6529
|
-
/* @__PURE__ */ (0,
|
|
6530
|
-
/* @__PURE__ */ (0,
|
|
6889
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6890
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
6891
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: humanize(field) })
|
|
6531
6892
|
] }),
|
|
6532
|
-
/* @__PURE__ */ (0,
|
|
6893
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6533
6894
|
ChevronDownIcon,
|
|
6534
6895
|
{
|
|
6535
6896
|
className: `h-4 w-4 transition-transform duration-200 ease-out ${isOpen ? "rotate-180" : ""}`
|
|
@@ -6538,7 +6899,7 @@ var init_DataBindingControls = __esm({
|
|
|
6538
6899
|
]
|
|
6539
6900
|
}
|
|
6540
6901
|
),
|
|
6541
|
-
isOpen && /* @__PURE__ */ (0,
|
|
6902
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt-1", children: renderFacetItems(field, values) })
|
|
6542
6903
|
]
|
|
6543
6904
|
},
|
|
6544
6905
|
field
|
|
@@ -6558,13 +6919,13 @@ var Slider_exports = {};
|
|
|
6558
6919
|
__export(Slider_exports, {
|
|
6559
6920
|
default: () => Slider_default
|
|
6560
6921
|
});
|
|
6561
|
-
var
|
|
6922
|
+
var import_react61, import_jsx_runtime88, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
6562
6923
|
var init_Slider = __esm({
|
|
6563
6924
|
"src/components/Slider.tsx"() {
|
|
6564
6925
|
"use strict";
|
|
6565
6926
|
"use client";
|
|
6566
|
-
|
|
6567
|
-
|
|
6927
|
+
import_react61 = __toESM(require("react"));
|
|
6928
|
+
import_jsx_runtime88 = require("react/jsx-runtime");
|
|
6568
6929
|
Slider = ({
|
|
6569
6930
|
children,
|
|
6570
6931
|
columns,
|
|
@@ -6585,17 +6946,17 @@ var init_Slider = __esm({
|
|
|
6585
6946
|
progressPosition = "bottom",
|
|
6586
6947
|
scrollByColumns = false
|
|
6587
6948
|
}) => {
|
|
6588
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
6589
|
-
const [transition, setTransition] = (0,
|
|
6949
|
+
const [currentSlide, setCurrentSlide] = (0, import_react61.useState)(0);
|
|
6950
|
+
const [transition, setTransition] = (0, import_react61.useState)(true);
|
|
6590
6951
|
const initialSlidesToShow = slidesToShow ?? columns ?? 4;
|
|
6591
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
6952
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react61.useState)(
|
|
6592
6953
|
typeof initialSlidesToShow === "number" ? initialSlidesToShow : initialSlidesToShow.large
|
|
6593
6954
|
);
|
|
6594
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
6595
|
-
const trackRef = (0,
|
|
6955
|
+
const [isPlaying, setIsPlaying] = (0, import_react61.useState)(autoplay);
|
|
6956
|
+
const trackRef = (0, import_react61.useRef)(null);
|
|
6596
6957
|
console.log("trackRef:", trackRef);
|
|
6597
|
-
const [videoProgress, setVideoProgress] = (0,
|
|
6598
|
-
(0,
|
|
6958
|
+
const [videoProgress, setVideoProgress] = (0, import_react61.useState)(null);
|
|
6959
|
+
(0, import_react61.useEffect)(() => {
|
|
6599
6960
|
if (typeof initialSlidesToShow === "number") {
|
|
6600
6961
|
setSlidesToShowState(initialSlidesToShow);
|
|
6601
6962
|
return;
|
|
@@ -6613,7 +6974,7 @@ var init_Slider = __esm({
|
|
|
6613
6974
|
window.addEventListener("resize", handleResize);
|
|
6614
6975
|
return () => window.removeEventListener("resize", handleResize);
|
|
6615
6976
|
}, [initialSlidesToShow]);
|
|
6616
|
-
(0,
|
|
6977
|
+
(0, import_react61.useEffect)(() => {
|
|
6617
6978
|
if (!autoplay) return;
|
|
6618
6979
|
const activeSlideElement = trackRef.current?.children[currentSlide];
|
|
6619
6980
|
const videoElement = activeSlideElement?.querySelector("video");
|
|
@@ -6658,7 +7019,7 @@ var init_Slider = __esm({
|
|
|
6658
7019
|
}, autoplay_speed);
|
|
6659
7020
|
return () => clearInterval(timer);
|
|
6660
7021
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
6661
|
-
const totalSlides =
|
|
7022
|
+
const totalSlides = import_react61.Children.count(children);
|
|
6662
7023
|
const numColumns = columns ?? slidesToShowState;
|
|
6663
7024
|
const slideWidthPercentage = (() => {
|
|
6664
7025
|
if (typeof lastColPercentage !== "number") {
|
|
@@ -6718,24 +7079,24 @@ var init_Slider = __esm({
|
|
|
6718
7079
|
}
|
|
6719
7080
|
};
|
|
6720
7081
|
const translateX = -currentSlide * slideWidthPercentage;
|
|
6721
|
-
const slides =
|
|
6722
|
-
if (!
|
|
7082
|
+
const slides = import_react61.Children.map(children, (child, index) => {
|
|
7083
|
+
if (!import_react61.default.isValidElement(child)) return null;
|
|
6723
7084
|
const childProps = child.props;
|
|
6724
7085
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
6725
|
-
return /* @__PURE__ */ (0,
|
|
7086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6726
7087
|
"div",
|
|
6727
7088
|
{
|
|
6728
7089
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
6729
7090
|
style: { width: `calc(${slideWidthPercentage}%)`, paddingRight: gap },
|
|
6730
|
-
children: (0,
|
|
7091
|
+
children: (0, import_react61.cloneElement)(child, {
|
|
6731
7092
|
className: mergedClassName
|
|
6732
7093
|
})
|
|
6733
7094
|
},
|
|
6734
7095
|
index
|
|
6735
7096
|
);
|
|
6736
7097
|
});
|
|
6737
|
-
return /* @__PURE__ */ (0,
|
|
6738
|
-
show_dots && progressPosition === "top" && /* @__PURE__ */ (0,
|
|
7098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "w-full", children: [
|
|
7099
|
+
show_dots && progressPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex justify-center space-x-1.5 mb-4", children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6739
7100
|
ProgressPill,
|
|
6740
7101
|
{
|
|
6741
7102
|
active: index === currentSlide,
|
|
@@ -6752,14 +7113,14 @@ var init_Slider = __esm({
|
|
|
6752
7113
|
},
|
|
6753
7114
|
index
|
|
6754
7115
|
)) }),
|
|
6755
|
-
/* @__PURE__ */ (0,
|
|
7116
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
6756
7117
|
"div",
|
|
6757
7118
|
{
|
|
6758
7119
|
className: `relative w-full overflow-hidden ${className}`,
|
|
6759
7120
|
onMouseEnter: handleMouseEnter,
|
|
6760
7121
|
onMouseLeave: handleMouseLeave,
|
|
6761
7122
|
children: [
|
|
6762
|
-
/* @__PURE__ */ (0,
|
|
7123
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6763
7124
|
"div",
|
|
6764
7125
|
{
|
|
6765
7126
|
ref: trackRef,
|
|
@@ -6771,32 +7132,32 @@ var init_Slider = __esm({
|
|
|
6771
7132
|
children: slides
|
|
6772
7133
|
}
|
|
6773
7134
|
),
|
|
6774
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
6775
|
-
/* @__PURE__ */ (0,
|
|
7135
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
7136
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6776
7137
|
ArrowButton,
|
|
6777
7138
|
{
|
|
6778
7139
|
direction: "left",
|
|
6779
7140
|
onClick: prevSlide,
|
|
6780
7141
|
visible: infinite_scroll || currentSlide > 0,
|
|
6781
7142
|
className: arrowClassName,
|
|
6782
|
-
children: /* @__PURE__ */ (0,
|
|
7143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
6783
7144
|
}
|
|
6784
7145
|
),
|
|
6785
|
-
/* @__PURE__ */ (0,
|
|
7146
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6786
7147
|
ArrowButton,
|
|
6787
7148
|
{
|
|
6788
7149
|
direction: "right",
|
|
6789
7150
|
onClick: nextSlide,
|
|
6790
7151
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
6791
7152
|
className: arrowClassName,
|
|
6792
|
-
children: /* @__PURE__ */ (0,
|
|
7153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) })
|
|
6793
7154
|
}
|
|
6794
7155
|
)
|
|
6795
7156
|
] })
|
|
6796
7157
|
]
|
|
6797
7158
|
}
|
|
6798
7159
|
),
|
|
6799
|
-
show_dots && progressPosition !== "top" && /* @__PURE__ */ (0,
|
|
7160
|
+
show_dots && progressPosition !== "top" && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex justify-center space-x-1.5 mt-5", children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6800
7161
|
ProgressPill,
|
|
6801
7162
|
{
|
|
6802
7163
|
active: index === currentSlide,
|
|
@@ -6821,7 +7182,7 @@ var init_Slider = __esm({
|
|
|
6821
7182
|
visible,
|
|
6822
7183
|
children,
|
|
6823
7184
|
className = ""
|
|
6824
|
-
}) => /* @__PURE__ */ (0,
|
|
7185
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6825
7186
|
"button",
|
|
6826
7187
|
{
|
|
6827
7188
|
className: `
|
|
@@ -6848,13 +7209,13 @@ var init_Slider = __esm({
|
|
|
6848
7209
|
totalSlides,
|
|
6849
7210
|
customProgress = null
|
|
6850
7211
|
}) => {
|
|
6851
|
-
const [progress, setProgress] = (0,
|
|
6852
|
-
(0,
|
|
7212
|
+
const [progress, setProgress] = (0, import_react61.useState)(0);
|
|
7213
|
+
(0, import_react61.useEffect)(() => {
|
|
6853
7214
|
if (active) {
|
|
6854
7215
|
setProgress(0);
|
|
6855
7216
|
}
|
|
6856
7217
|
}, [active, index]);
|
|
6857
|
-
(0,
|
|
7218
|
+
(0, import_react61.useEffect)(() => {
|
|
6858
7219
|
if (!active || !isPlaying || customProgress !== null) {
|
|
6859
7220
|
if (!active) {
|
|
6860
7221
|
setProgress(0);
|
|
@@ -6909,7 +7270,7 @@ var init_Slider = __esm({
|
|
|
6909
7270
|
const renderProgressBar = () => {
|
|
6910
7271
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
6911
7272
|
const displayProgress = style === "cumulative" && isFilled ? 100 : customProgress !== null && customProgress !== void 0 ? customProgress : progress;
|
|
6912
|
-
return /* @__PURE__ */ (0,
|
|
7273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6913
7274
|
"div",
|
|
6914
7275
|
{
|
|
6915
7276
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -6921,7 +7282,7 @@ var init_Slider = __esm({
|
|
|
6921
7282
|
};
|
|
6922
7283
|
const renderCumulativeFill = () => {
|
|
6923
7284
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
6924
|
-
return /* @__PURE__ */ (0,
|
|
7285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6925
7286
|
"div",
|
|
6926
7287
|
{
|
|
6927
7288
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -6931,7 +7292,7 @@ var init_Slider = __esm({
|
|
|
6931
7292
|
}
|
|
6932
7293
|
return null;
|
|
6933
7294
|
};
|
|
6934
|
-
return /* @__PURE__ */ (0,
|
|
7295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
6935
7296
|
"button",
|
|
6936
7297
|
{
|
|
6937
7298
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -6953,6 +7314,7 @@ var init_Slider = __esm({
|
|
|
6953
7314
|
var index_exports = {};
|
|
6954
7315
|
__export(index_exports, {
|
|
6955
7316
|
Button: () => Button_default,
|
|
7317
|
+
COUNTRY_CODES: () => COUNTRY_CODES,
|
|
6956
7318
|
CheckboxInput: () => CheckboxInput_default,
|
|
6957
7319
|
ColorInput: () => ColorInput_default,
|
|
6958
7320
|
DataFormRenderer: () => DataFormRenderer_default,
|
|
@@ -6979,7 +7341,13 @@ __export(index_exports, {
|
|
|
6979
7341
|
Toast: () => Toast_default,
|
|
6980
7342
|
ToastService: () => ToastService_default,
|
|
6981
7343
|
ViewControl: () => ViewControl_default,
|
|
6982
|
-
ViewControlTypes: () => ViewControlTypes_default
|
|
7344
|
+
ViewControlTypes: () => ViewControlTypes_default,
|
|
7345
|
+
findCountryByDialCode: () => findCountryByDialCode,
|
|
7346
|
+
findCountryByIso2: () => findCountryByIso2,
|
|
7347
|
+
getCountryFlag: () => getCountryFlag,
|
|
7348
|
+
getDialCodeByCountryCode: () => getDialCodeByCountryCode,
|
|
7349
|
+
resolveCountry: () => resolveCountry,
|
|
7350
|
+
splitPhoneNumber: () => splitPhoneNumber
|
|
6983
7351
|
});
|
|
6984
7352
|
module.exports = __toCommonJS(index_exports);
|
|
6985
7353
|
|
|
@@ -7409,10 +7777,10 @@ var InputControl_default = InputControl2;
|
|
|
7409
7777
|
init_InputControlType();
|
|
7410
7778
|
|
|
7411
7779
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
7412
|
-
var
|
|
7780
|
+
var import_react63 = __toESM(require("react"));
|
|
7413
7781
|
|
|
7414
7782
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
7415
|
-
var
|
|
7783
|
+
var import_react49 = __toESM(require("react"));
|
|
7416
7784
|
|
|
7417
7785
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
7418
7786
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
@@ -7567,7 +7935,7 @@ var ImageNode = (props) => {
|
|
|
7567
7935
|
...props.node.borderRadius && { borderRadius: props.node.borderRadius },
|
|
7568
7936
|
...props.node.width && { width: props.node.width }
|
|
7569
7937
|
};
|
|
7570
|
-
const
|
|
7938
|
+
const FORMAT_CLASSES3 = {
|
|
7571
7939
|
center: "justify-center",
|
|
7572
7940
|
left: "justify-start",
|
|
7573
7941
|
right: "justify-end"
|
|
@@ -7599,7 +7967,7 @@ var ImageNode = (props) => {
|
|
|
7599
7967
|
}
|
|
7600
7968
|
);
|
|
7601
7969
|
if (props.node.width) {
|
|
7602
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `flex ${
|
|
7970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `flex ${FORMAT_CLASSES3[props.node.format] ?? ""}`, children: renderMedia() });
|
|
7603
7971
|
}
|
|
7604
7972
|
return renderMedia();
|
|
7605
7973
|
};
|
|
@@ -7892,8 +8260,89 @@ var DatafieldNode = (props) => {
|
|
|
7892
8260
|
};
|
|
7893
8261
|
var DatafieldNode_default = DatafieldNode;
|
|
7894
8262
|
|
|
7895
|
-
// src/components/pageRenderingEngine/nodes/
|
|
8263
|
+
// src/components/pageRenderingEngine/nodes/CounterNode.tsx
|
|
8264
|
+
var import_react48 = require("react");
|
|
7896
8265
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8266
|
+
var FORMAT_CLASSES2 = {
|
|
8267
|
+
center: "justify-center text-center",
|
|
8268
|
+
right: "justify-end text-right",
|
|
8269
|
+
left: "justify-start text-left",
|
|
8270
|
+
justify: "justify-between text-justify"
|
|
8271
|
+
};
|
|
8272
|
+
var CounterNode = ({ node }) => {
|
|
8273
|
+
const ref = (0, import_react48.useRef)(null);
|
|
8274
|
+
const startValue = typeof node?.startValue === "number" ? node.startValue : Number(node?.startValue) || 0;
|
|
8275
|
+
const endValue = typeof node?.endValue === "number" ? node.endValue : Number(node?.endValue) || 0;
|
|
8276
|
+
const duration = Math.max(Number(node?.duration) || 2e3, 300);
|
|
8277
|
+
const prefix = node?.prefix ?? "";
|
|
8278
|
+
const suffix = node?.suffix ?? "";
|
|
8279
|
+
const format = node?.format;
|
|
8280
|
+
const [displayValue, setDisplayValue] = (0, import_react48.useState)(startValue);
|
|
8281
|
+
const hasAnimatedRef = (0, import_react48.useRef)(false);
|
|
8282
|
+
const runAnimation = (0, import_react48.useCallback)(() => {
|
|
8283
|
+
let startTime = null;
|
|
8284
|
+
let animationFrameId;
|
|
8285
|
+
const step = (timestamp) => {
|
|
8286
|
+
if (!startTime) startTime = timestamp;
|
|
8287
|
+
const progress = Math.min((timestamp - startTime) / duration, 1);
|
|
8288
|
+
const easeOutProgress = 1 - Math.pow(1 - progress, 3);
|
|
8289
|
+
const currentVal = Math.round(startValue + (endValue - startValue) * easeOutProgress);
|
|
8290
|
+
setDisplayValue(currentVal);
|
|
8291
|
+
if (progress < 1) {
|
|
8292
|
+
animationFrameId = requestAnimationFrame(step);
|
|
8293
|
+
} else {
|
|
8294
|
+
setDisplayValue(endValue);
|
|
8295
|
+
}
|
|
8296
|
+
};
|
|
8297
|
+
animationFrameId = requestAnimationFrame(step);
|
|
8298
|
+
return () => {
|
|
8299
|
+
if (animationFrameId) {
|
|
8300
|
+
cancelAnimationFrame(animationFrameId);
|
|
8301
|
+
}
|
|
8302
|
+
};
|
|
8303
|
+
}, [startValue, endValue, duration]);
|
|
8304
|
+
(0, import_react48.useEffect)(() => {
|
|
8305
|
+
const currentRef = ref.current;
|
|
8306
|
+
if (!currentRef) return;
|
|
8307
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
8308
|
+
return runAnimation();
|
|
8309
|
+
}
|
|
8310
|
+
const observer = new IntersectionObserver(
|
|
8311
|
+
(entries) => {
|
|
8312
|
+
entries.forEach((entry) => {
|
|
8313
|
+
if (entry.isIntersecting && !hasAnimatedRef.current) {
|
|
8314
|
+
hasAnimatedRef.current = true;
|
|
8315
|
+
runAnimation();
|
|
8316
|
+
observer.unobserve(entry.target);
|
|
8317
|
+
}
|
|
8318
|
+
});
|
|
8319
|
+
},
|
|
8320
|
+
{ threshold: 0.1 }
|
|
8321
|
+
);
|
|
8322
|
+
observer.observe(currentRef);
|
|
8323
|
+
return () => {
|
|
8324
|
+
observer.disconnect();
|
|
8325
|
+
};
|
|
8326
|
+
}, [runAnimation]);
|
|
8327
|
+
if (!node) return null;
|
|
8328
|
+
const alignClass = format && FORMAT_CLASSES2[format] || "justify-center text-center";
|
|
8329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8330
|
+
"div",
|
|
8331
|
+
{
|
|
8332
|
+
ref,
|
|
8333
|
+
className: `counter-node inline-flex items-center ${alignClass}`,
|
|
8334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "counter-display text-3xl font-bold tracking-tight", children: [
|
|
8335
|
+
prefix,
|
|
8336
|
+
displayValue.toLocaleString(),
|
|
8337
|
+
suffix
|
|
8338
|
+
] })
|
|
8339
|
+
}
|
|
8340
|
+
);
|
|
8341
|
+
};
|
|
8342
|
+
var CounterNode_default = CounterNode;
|
|
8343
|
+
|
|
8344
|
+
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
8345
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
7897
8346
|
var ParagraphNode = (props) => {
|
|
7898
8347
|
const NodeTypes2 = {
|
|
7899
8348
|
["text"]: TextNode_default,
|
|
@@ -7901,7 +8350,8 @@ var ParagraphNode = (props) => {
|
|
|
7901
8350
|
["link"]: LinkNode_default,
|
|
7902
8351
|
["datafield"]: DatafieldNode_default,
|
|
7903
8352
|
["equation"]: EquationNode_default,
|
|
7904
|
-
["svg-icon"]: SVGIconNode_default
|
|
8353
|
+
["svg-icon"]: SVGIconNode_default,
|
|
8354
|
+
["counter"]: CounterNode_default
|
|
7905
8355
|
};
|
|
7906
8356
|
const FormatClass = {
|
|
7907
8357
|
"center": "text-center",
|
|
@@ -7913,9 +8363,9 @@ var ParagraphNode = (props) => {
|
|
|
7913
8363
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
7914
8364
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
7915
8365
|
if (isInlineOnlyParent) {
|
|
7916
|
-
return /* @__PURE__ */ (0,
|
|
8366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
7917
8367
|
const SelectedNode = NodeTypes2[node.type];
|
|
7918
|
-
return /* @__PURE__ */ (0,
|
|
8368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7919
8369
|
SelectedNode,
|
|
7920
8370
|
{
|
|
7921
8371
|
node,
|
|
@@ -7928,10 +8378,10 @@ var ParagraphNode = (props) => {
|
|
|
7928
8378
|
) }, index);
|
|
7929
8379
|
}) });
|
|
7930
8380
|
}
|
|
7931
|
-
return /* @__PURE__ */ (0,
|
|
8381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: " " + formatClasses, children: [
|
|
7932
8382
|
hasChildren && props.node.children.map((node, index) => {
|
|
7933
8383
|
const SelectedNode = NodeTypes2[node.type];
|
|
7934
|
-
return /* @__PURE__ */ (0,
|
|
8384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7935
8385
|
SelectedNode,
|
|
7936
8386
|
{
|
|
7937
8387
|
node,
|
|
@@ -7943,21 +8393,22 @@ var ParagraphNode = (props) => {
|
|
|
7943
8393
|
}
|
|
7944
8394
|
) }, index);
|
|
7945
8395
|
}),
|
|
7946
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
8396
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
7947
8397
|
] });
|
|
7948
8398
|
};
|
|
7949
8399
|
var ParagraphNode_default = ParagraphNode;
|
|
7950
8400
|
|
|
7951
8401
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
7952
|
-
var
|
|
7953
|
-
var
|
|
8402
|
+
var import_react50 = __toESM(require("react"));
|
|
8403
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7954
8404
|
var HeadingNode = (props) => {
|
|
7955
8405
|
const NodeTypes2 = {
|
|
7956
8406
|
["text"]: TextNode_default,
|
|
7957
8407
|
["link"]: LinkNode_default,
|
|
7958
8408
|
["svg-icon"]: SVGIconNode_default,
|
|
7959
8409
|
["linebreak"]: LineBreakNode_default,
|
|
7960
|
-
["datafield"]: DatafieldNode_default
|
|
8410
|
+
["datafield"]: DatafieldNode_default,
|
|
8411
|
+
["counter"]: CounterNode_default
|
|
7961
8412
|
};
|
|
7962
8413
|
const HeadingTag = `${props.node.tag}`;
|
|
7963
8414
|
const FormatClass = {
|
|
@@ -7966,23 +8417,23 @@ var HeadingNode = (props) => {
|
|
|
7966
8417
|
{
|
|
7967
8418
|
}
|
|
7968
8419
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
7969
|
-
return /* @__PURE__ */ (0,
|
|
8420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: import_react50.default.createElement(
|
|
7970
8421
|
HeadingTag,
|
|
7971
8422
|
{ className: formatClasses },
|
|
7972
8423
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
7973
8424
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
7974
|
-
return /* @__PURE__ */ (0,
|
|
8425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7975
8426
|
})
|
|
7976
8427
|
) });
|
|
7977
8428
|
};
|
|
7978
8429
|
var HeadingNode_default = HeadingNode;
|
|
7979
8430
|
|
|
7980
8431
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7981
|
-
var
|
|
8432
|
+
var import_react52 = __toESM(require("react"));
|
|
7982
8433
|
|
|
7983
8434
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
7984
|
-
var
|
|
7985
|
-
var
|
|
8435
|
+
var import_react51 = __toESM(require("react"));
|
|
8436
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
7986
8437
|
var ListItemNode = (props) => {
|
|
7987
8438
|
const NodeTypes2 = {
|
|
7988
8439
|
text: TextNode_default,
|
|
@@ -7999,66 +8450,66 @@ var ListItemNode = (props) => {
|
|
|
7999
8450
|
liStyle.fontSize = match[1].trim();
|
|
8000
8451
|
}
|
|
8001
8452
|
}
|
|
8002
|
-
return /* @__PURE__ */ (0,
|
|
8453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
8003
8454
|
const SelectedNode = NodeTypes2[node.type];
|
|
8004
8455
|
if (node.type === "linebreak") {
|
|
8005
8456
|
if (!foundFirstBreak) {
|
|
8006
8457
|
foundFirstBreak = true;
|
|
8007
|
-
return /* @__PURE__ */ (0,
|
|
8458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", {}, index);
|
|
8008
8459
|
} else {
|
|
8009
|
-
return /* @__PURE__ */ (0,
|
|
8460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
8010
8461
|
}
|
|
8011
8462
|
} else {
|
|
8012
8463
|
foundFirstBreak = false;
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8014
8465
|
}
|
|
8015
8466
|
}) });
|
|
8016
8467
|
};
|
|
8017
8468
|
var ListItemNode_default = ListItemNode;
|
|
8018
8469
|
|
|
8019
8470
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
8020
|
-
var
|
|
8471
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8021
8472
|
var ListNode = (props) => {
|
|
8022
8473
|
const NodeTypes2 = {
|
|
8023
8474
|
listitem: ListItemNode_default
|
|
8024
8475
|
};
|
|
8025
|
-
return /* @__PURE__ */ (0,
|
|
8026
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
8476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react52.default.Fragment, { children: [
|
|
8477
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8027
8478
|
const SelectedNode = NodeTypes2[node.type];
|
|
8028
|
-
return /* @__PURE__ */ (0,
|
|
8479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8029
8480
|
}) }),
|
|
8030
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
8481
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8031
8482
|
const SelectedNode = NodeTypes2[node.type];
|
|
8032
|
-
return /* @__PURE__ */ (0,
|
|
8483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8033
8484
|
}) })
|
|
8034
8485
|
] });
|
|
8035
8486
|
};
|
|
8036
8487
|
var ListNode_default = ListNode;
|
|
8037
8488
|
|
|
8038
8489
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
8039
|
-
var
|
|
8040
|
-
var
|
|
8490
|
+
var import_react53 = __toESM(require("react"));
|
|
8491
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8041
8492
|
var QuoteNode = (props) => {
|
|
8042
8493
|
const NodeTypes2 = {
|
|
8043
8494
|
["text"]: TextNode_default,
|
|
8044
8495
|
["linebreak"]: LineBreakNode_default,
|
|
8045
8496
|
["link"]: LinkNode_default
|
|
8046
8497
|
};
|
|
8047
|
-
return /* @__PURE__ */ (0,
|
|
8498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8048
8499
|
const SelectedNode = NodeTypes2[node.type];
|
|
8049
|
-
return /* @__PURE__ */ (0,
|
|
8500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
8050
8501
|
}) });
|
|
8051
8502
|
};
|
|
8052
8503
|
var QuoteNode_default = QuoteNode;
|
|
8053
8504
|
|
|
8054
8505
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
8055
|
-
var
|
|
8506
|
+
var import_react55 = __toESM(require("react"));
|
|
8056
8507
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
8057
|
-
var
|
|
8508
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8058
8509
|
var CopyButton2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
8059
8510
|
ssr: false,
|
|
8060
8511
|
// optional: fallback UI while loading
|
|
8061
|
-
loading: () => /* @__PURE__ */ (0,
|
|
8512
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
8062
8513
|
});
|
|
8063
8514
|
var CodeNode = (props) => {
|
|
8064
8515
|
const NodeTypes2 = {
|
|
@@ -8072,14 +8523,14 @@ var CodeNode = (props) => {
|
|
|
8072
8523
|
if (node.type === "link") return node.text || node.url || "";
|
|
8073
8524
|
return "";
|
|
8074
8525
|
}).join("") ?? "";
|
|
8075
|
-
return /* @__PURE__ */ (0,
|
|
8076
|
-
/* @__PURE__ */ (0,
|
|
8077
|
-
/* @__PURE__ */ (0,
|
|
8078
|
-
/* @__PURE__ */ (0,
|
|
8526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { children: [
|
|
8527
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
8528
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: "Code Snippet" }),
|
|
8529
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CopyButton2, { text: textContent })
|
|
8079
8530
|
] }),
|
|
8080
|
-
/* @__PURE__ */ (0,
|
|
8531
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
8081
8532
|
const SelectedNode = NodeTypes2[node.type];
|
|
8082
|
-
return /* @__PURE__ */ (0,
|
|
8533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react55.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8083
8534
|
SelectedNode,
|
|
8084
8535
|
{
|
|
8085
8536
|
node,
|
|
@@ -8094,15 +8545,15 @@ var CodeNode = (props) => {
|
|
|
8094
8545
|
var CodeNode_default = CodeNode;
|
|
8095
8546
|
|
|
8096
8547
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
8097
|
-
var
|
|
8548
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8098
8549
|
var HorizontalRuleNode = () => {
|
|
8099
|
-
return /* @__PURE__ */ (0,
|
|
8550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("hr", {});
|
|
8100
8551
|
};
|
|
8101
8552
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
8102
8553
|
|
|
8103
8554
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
8104
|
-
var
|
|
8105
|
-
var
|
|
8555
|
+
var import_react56 = __toESM(require("react"));
|
|
8556
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8106
8557
|
var WidgetNode = (props) => {
|
|
8107
8558
|
const getWidgetParameters = () => {
|
|
8108
8559
|
const widgetInputParameters = {
|
|
@@ -8166,7 +8617,7 @@ var WidgetNode = (props) => {
|
|
|
8166
8617
|
};
|
|
8167
8618
|
const widgetCode = props.node?.widgetCode;
|
|
8168
8619
|
if (!widgetCode) {
|
|
8169
|
-
return /* @__PURE__ */ (0,
|
|
8620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_jsx_runtime77.Fragment, { children: "Invalid widget" });
|
|
8170
8621
|
}
|
|
8171
8622
|
const widgetParams = getWidgetParameters();
|
|
8172
8623
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -8175,7 +8626,7 @@ var WidgetNode = (props) => {
|
|
|
8175
8626
|
}
|
|
8176
8627
|
return (
|
|
8177
8628
|
// eslint-disable-next-line react-hooks/static-components
|
|
8178
|
-
/* @__PURE__ */ (0,
|
|
8629
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8179
8630
|
WidgetRenderer,
|
|
8180
8631
|
{
|
|
8181
8632
|
params: widgetParams,
|
|
@@ -8193,11 +8644,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
8193
8644
|
|
|
8194
8645
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
8195
8646
|
var import_dynamic14 = __toESM(require("next/dynamic"));
|
|
8196
|
-
var
|
|
8647
|
+
var import_react62 = __toESM(require("react"));
|
|
8197
8648
|
|
|
8198
8649
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
8199
8650
|
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
8200
|
-
var
|
|
8651
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
8201
8652
|
var IframeClient2 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
8202
8653
|
ssr: false
|
|
8203
8654
|
});
|
|
@@ -8210,7 +8661,7 @@ var EmbedNode = (props) => {
|
|
|
8210
8661
|
} else {
|
|
8211
8662
|
src = props.node.embedSrc;
|
|
8212
8663
|
}
|
|
8213
|
-
return /* @__PURE__ */ (0,
|
|
8664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IframeClient2, { src }) });
|
|
8214
8665
|
};
|
|
8215
8666
|
var EmbedNode_default = EmbedNode;
|
|
8216
8667
|
|
|
@@ -8453,10 +8904,10 @@ var PathUtility = class {
|
|
|
8453
8904
|
var PathUtility_default = new PathUtility();
|
|
8454
8905
|
|
|
8455
8906
|
// src/components/NoDataFound.tsx
|
|
8456
|
-
var
|
|
8907
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8457
8908
|
var NoDataFound = () => {
|
|
8458
|
-
return /* @__PURE__ */ (0,
|
|
8459
|
-
/* @__PURE__ */ (0,
|
|
8909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
8910
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8460
8911
|
"svg",
|
|
8461
8912
|
{
|
|
8462
8913
|
className: "w-10 h-10",
|
|
@@ -8464,7 +8915,7 @@ var NoDataFound = () => {
|
|
|
8464
8915
|
stroke: "currentColor",
|
|
8465
8916
|
viewBox: "0 0 24 24",
|
|
8466
8917
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8467
|
-
children: /* @__PURE__ */ (0,
|
|
8918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8468
8919
|
"path",
|
|
8469
8920
|
{
|
|
8470
8921
|
strokeLinecap: "round",
|
|
@@ -8475,17 +8926,17 @@ var NoDataFound = () => {
|
|
|
8475
8926
|
)
|
|
8476
8927
|
}
|
|
8477
8928
|
) }) }),
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8479
|
-
/* @__PURE__ */ (0,
|
|
8929
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
8930
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
8480
8931
|
] });
|
|
8481
8932
|
};
|
|
8482
8933
|
var NoDataFound_default = NoDataFound;
|
|
8483
8934
|
|
|
8484
8935
|
// src/components/NoFilterResultsFound.tsx
|
|
8485
|
-
var
|
|
8936
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8486
8937
|
var NoFilterResultsFound = () => {
|
|
8487
|
-
return /* @__PURE__ */ (0,
|
|
8488
|
-
/* @__PURE__ */ (0,
|
|
8938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
8939
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8489
8940
|
"svg",
|
|
8490
8941
|
{
|
|
8491
8942
|
className: "w-10 h-10",
|
|
@@ -8493,7 +8944,7 @@ var NoFilterResultsFound = () => {
|
|
|
8493
8944
|
stroke: "currentColor",
|
|
8494
8945
|
viewBox: "0 0 24 24",
|
|
8495
8946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8496
|
-
children: /* @__PURE__ */ (0,
|
|
8947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8497
8948
|
"path",
|
|
8498
8949
|
{
|
|
8499
8950
|
strokeLinecap: "round",
|
|
@@ -8504,8 +8955,8 @@ var NoFilterResultsFound = () => {
|
|
|
8504
8955
|
)
|
|
8505
8956
|
}
|
|
8506
8957
|
) }) }),
|
|
8507
|
-
/* @__PURE__ */ (0,
|
|
8508
|
-
/* @__PURE__ */ (0,
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No Results Found" }),
|
|
8959
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "max-w-sm mb-0", children: "No data matches the current search query and configured parameters. Try adjusting your search criteria or filters to view available results." })
|
|
8509
8960
|
] });
|
|
8510
8961
|
};
|
|
8511
8962
|
var NoFilterResultsFound_default = NoFilterResultsFound;
|
|
@@ -8513,7 +8964,7 @@ var NoFilterResultsFound_default = NoFilterResultsFound;
|
|
|
8513
8964
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
8514
8965
|
init_AssetUtility();
|
|
8515
8966
|
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
8516
|
-
var
|
|
8967
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8517
8968
|
var HlsPlayer4 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
8518
8969
|
var deviceToMediaQuery = (device) => {
|
|
8519
8970
|
switch (device) {
|
|
@@ -8669,8 +9120,8 @@ var ImageGalleryNode = (props) => {
|
|
|
8669
9120
|
right: "justify-end"
|
|
8670
9121
|
};
|
|
8671
9122
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
8672
|
-
return /* @__PURE__ */ (0,
|
|
8673
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
9123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
9124
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8674
9125
|
HlsPlayer4,
|
|
8675
9126
|
{
|
|
8676
9127
|
sources: hlsSources,
|
|
@@ -8685,7 +9136,7 @@ var ImageGalleryNode = (props) => {
|
|
|
8685
9136
|
styles: hlsStyles
|
|
8686
9137
|
}
|
|
8687
9138
|
) }),
|
|
8688
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
9139
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("picture", { children: [
|
|
8689
9140
|
DEVICE_ORDER.map((deviceKey) => {
|
|
8690
9141
|
const match = staticSources.find(
|
|
8691
9142
|
(img) => img.device === deviceKey
|
|
@@ -8701,7 +9152,7 @@ var ImageGalleryNode = (props) => {
|
|
|
8701
9152
|
if (!srcUrl) {
|
|
8702
9153
|
return null;
|
|
8703
9154
|
}
|
|
8704
|
-
return /* @__PURE__ */ (0,
|
|
9155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8705
9156
|
"source",
|
|
8706
9157
|
{
|
|
8707
9158
|
media: deviceToMediaQuery(match.device),
|
|
@@ -8726,7 +9177,7 @@ var ImageGalleryNode = (props) => {
|
|
|
8726
9177
|
if (img.borderRadius) {
|
|
8727
9178
|
styles.borderRadius = img.borderRadius;
|
|
8728
9179
|
}
|
|
8729
|
-
return /* @__PURE__ */ (0,
|
|
9180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8730
9181
|
"img",
|
|
8731
9182
|
{
|
|
8732
9183
|
loading: "lazy",
|
|
@@ -8741,7 +9192,7 @@ var ImageGalleryNode = (props) => {
|
|
|
8741
9192
|
})()
|
|
8742
9193
|
] }) : (
|
|
8743
9194
|
/* Case 2: Only device-specific images exist */
|
|
8744
|
-
/* @__PURE__ */ (0,
|
|
9195
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: staticSources.map((img, index) => {
|
|
8745
9196
|
const resolved = resolveImage(img);
|
|
8746
9197
|
const imageUrl = resolved?.imageUrl;
|
|
8747
9198
|
if (!imageUrl) {
|
|
@@ -8768,7 +9219,7 @@ var ImageGalleryNode = (props) => {
|
|
|
8768
9219
|
default:
|
|
8769
9220
|
display = "block";
|
|
8770
9221
|
}
|
|
8771
|
-
return /* @__PURE__ */ (0,
|
|
9222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8772
9223
|
"img",
|
|
8773
9224
|
{
|
|
8774
9225
|
loading: "lazy",
|
|
@@ -8909,7 +9360,7 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
8909
9360
|
|
|
8910
9361
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
8911
9362
|
init_AssetUtility();
|
|
8912
|
-
var
|
|
9363
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
8913
9364
|
var getNestedValue5 = (obj, path) => {
|
|
8914
9365
|
if (!obj || !path) return void 0;
|
|
8915
9366
|
return path.split(".").reduce((current, key) => {
|
|
@@ -8940,21 +9391,21 @@ var parseDocuments = (value) => {
|
|
|
8940
9391
|
}
|
|
8941
9392
|
return [];
|
|
8942
9393
|
};
|
|
8943
|
-
var PdfIcon2 = () => /* @__PURE__ */ (0,
|
|
9394
|
+
var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
8944
9395
|
"svg",
|
|
8945
9396
|
{
|
|
8946
9397
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8947
9398
|
viewBox: "0 0 48 48",
|
|
8948
9399
|
className: "w-10 h-10",
|
|
8949
9400
|
children: [
|
|
8950
|
-
/* @__PURE__ */ (0,
|
|
9401
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8951
9402
|
"path",
|
|
8952
9403
|
{
|
|
8953
9404
|
fill: "#e53935",
|
|
8954
9405
|
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
8955
9406
|
}
|
|
8956
9407
|
),
|
|
8957
|
-
/* @__PURE__ */ (0,
|
|
9408
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8958
9409
|
"path",
|
|
8959
9410
|
{
|
|
8960
9411
|
fill: "#fff",
|
|
@@ -8964,55 +9415,55 @@ var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
8964
9415
|
]
|
|
8965
9416
|
}
|
|
8966
9417
|
);
|
|
8967
|
-
var ExcelIcon2 = () => /* @__PURE__ */ (0,
|
|
9418
|
+
var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
8968
9419
|
"svg",
|
|
8969
9420
|
{
|
|
8970
9421
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8971
9422
|
viewBox: "0 0 48 48",
|
|
8972
9423
|
className: "w-10 h-10",
|
|
8973
9424
|
children: [
|
|
8974
|
-
/* @__PURE__ */ (0,
|
|
9425
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8975
9426
|
"path",
|
|
8976
9427
|
{
|
|
8977
9428
|
fill: "#169154",
|
|
8978
9429
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
8979
9430
|
}
|
|
8980
9431
|
),
|
|
8981
|
-
/* @__PURE__ */ (0,
|
|
9432
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8982
9433
|
"path",
|
|
8983
9434
|
{
|
|
8984
9435
|
fill: "#18482a",
|
|
8985
9436
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
8986
9437
|
}
|
|
8987
9438
|
),
|
|
8988
|
-
/* @__PURE__ */ (0,
|
|
8989
|
-
/* @__PURE__ */ (0,
|
|
8990
|
-
/* @__PURE__ */ (0,
|
|
8991
|
-
/* @__PURE__ */ (0,
|
|
9439
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
9440
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
9441
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("g", { children: [
|
|
9442
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8992
9443
|
"path",
|
|
8993
9444
|
{
|
|
8994
9445
|
fill: "#29c27f",
|
|
8995
9446
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
8996
9447
|
}
|
|
8997
9448
|
),
|
|
8998
|
-
/* @__PURE__ */ (0,
|
|
9449
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8999
9450
|
"path",
|
|
9000
9451
|
{
|
|
9001
9452
|
fill: "#27663f",
|
|
9002
9453
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
9003
9454
|
}
|
|
9004
9455
|
),
|
|
9005
|
-
/* @__PURE__ */ (0,
|
|
9006
|
-
/* @__PURE__ */ (0,
|
|
9456
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
9457
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
9007
9458
|
] }),
|
|
9008
|
-
/* @__PURE__ */ (0,
|
|
9459
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9009
9460
|
"path",
|
|
9010
9461
|
{
|
|
9011
9462
|
fill: "#0c7238",
|
|
9012
9463
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
9013
9464
|
}
|
|
9014
9465
|
),
|
|
9015
|
-
/* @__PURE__ */ (0,
|
|
9466
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9016
9467
|
"path",
|
|
9017
9468
|
{
|
|
9018
9469
|
fill: "#fff",
|
|
@@ -9022,7 +9473,7 @@ var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9022
9473
|
]
|
|
9023
9474
|
}
|
|
9024
9475
|
);
|
|
9025
|
-
var WordIcon2 = () => /* @__PURE__ */ (0,
|
|
9476
|
+
var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9026
9477
|
"svg",
|
|
9027
9478
|
{
|
|
9028
9479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9030,14 +9481,14 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9030
9481
|
className: "w-10 h-10",
|
|
9031
9482
|
baseProfile: "basic",
|
|
9032
9483
|
children: [
|
|
9033
|
-
/* @__PURE__ */ (0,
|
|
9484
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9034
9485
|
"path",
|
|
9035
9486
|
{
|
|
9036
9487
|
fill: "#283593",
|
|
9037
9488
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
9038
9489
|
}
|
|
9039
9490
|
),
|
|
9040
|
-
/* @__PURE__ */ (0,
|
|
9491
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9041
9492
|
"linearGradient",
|
|
9042
9493
|
{
|
|
9043
9494
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -9048,19 +9499,19 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9048
9499
|
gradientTransform: "translate(0 -339.89)",
|
|
9049
9500
|
gradientUnits: "userSpaceOnUse",
|
|
9050
9501
|
children: [
|
|
9051
|
-
/* @__PURE__ */ (0,
|
|
9052
|
-
/* @__PURE__ */ (0,
|
|
9502
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
9053
9504
|
]
|
|
9054
9505
|
}
|
|
9055
9506
|
),
|
|
9056
|
-
/* @__PURE__ */ (0,
|
|
9507
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9057
9508
|
"path",
|
|
9058
9509
|
{
|
|
9059
9510
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
9060
9511
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
9061
9512
|
}
|
|
9062
9513
|
),
|
|
9063
|
-
/* @__PURE__ */ (0,
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9064
9515
|
"path",
|
|
9065
9516
|
{
|
|
9066
9517
|
fill: "#1e88e5",
|
|
@@ -9068,21 +9519,21 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9068
9519
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
9069
9520
|
}
|
|
9070
9521
|
),
|
|
9071
|
-
/* @__PURE__ */ (0,
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9072
9523
|
"path",
|
|
9073
9524
|
{
|
|
9074
9525
|
fill: "#00e5ff",
|
|
9075
9526
|
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
9076
9527
|
}
|
|
9077
9528
|
),
|
|
9078
|
-
/* @__PURE__ */ (0,
|
|
9529
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9079
9530
|
"path",
|
|
9080
9531
|
{
|
|
9081
9532
|
fill: "#1565c0",
|
|
9082
9533
|
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
9083
9534
|
}
|
|
9084
9535
|
),
|
|
9085
|
-
/* @__PURE__ */ (0,
|
|
9536
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9086
9537
|
"path",
|
|
9087
9538
|
{
|
|
9088
9539
|
fill: "#fff",
|
|
@@ -9092,42 +9543,42 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9092
9543
|
]
|
|
9093
9544
|
}
|
|
9094
9545
|
);
|
|
9095
|
-
var StandardIcon2 = () => /* @__PURE__ */ (0,
|
|
9546
|
+
var StandardIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9096
9547
|
"svg",
|
|
9097
9548
|
{
|
|
9098
9549
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9099
9550
|
viewBox: "0 0 48 48",
|
|
9100
9551
|
className: "w-10 h-10",
|
|
9101
9552
|
children: [
|
|
9102
|
-
/* @__PURE__ */ (0,
|
|
9103
|
-
/* @__PURE__ */ (0,
|
|
9553
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
9554
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
9104
9555
|
]
|
|
9105
9556
|
}
|
|
9106
9557
|
);
|
|
9107
|
-
var PowerPointIcon2 = () => /* @__PURE__ */ (0,
|
|
9558
|
+
var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9108
9559
|
"svg",
|
|
9109
9560
|
{
|
|
9110
9561
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9111
9562
|
viewBox: "0 0 48 48",
|
|
9112
9563
|
className: "w-10 h-10",
|
|
9113
9564
|
children: [
|
|
9114
|
-
/* @__PURE__ */ (0,
|
|
9565
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9115
9566
|
"path",
|
|
9116
9567
|
{
|
|
9117
9568
|
fill: "#dc4c2c",
|
|
9118
9569
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
9119
9570
|
}
|
|
9120
9571
|
),
|
|
9121
|
-
/* @__PURE__ */ (0,
|
|
9122
|
-
/* @__PURE__ */ (0,
|
|
9123
|
-
/* @__PURE__ */ (0,
|
|
9572
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
9573
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
9574
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9124
9575
|
"path",
|
|
9125
9576
|
{
|
|
9126
9577
|
fill: "#9b341f",
|
|
9127
9578
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
9128
9579
|
}
|
|
9129
9580
|
),
|
|
9130
|
-
/* @__PURE__ */ (0,
|
|
9581
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9131
9582
|
"path",
|
|
9132
9583
|
{
|
|
9133
9584
|
fill: "#fff",
|
|
@@ -9137,16 +9588,16 @@ var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9137
9588
|
]
|
|
9138
9589
|
}
|
|
9139
9590
|
);
|
|
9140
|
-
var TextIcon2 = () => /* @__PURE__ */ (0,
|
|
9591
|
+
var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9141
9592
|
"svg",
|
|
9142
9593
|
{
|
|
9143
9594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9144
9595
|
viewBox: "0 0 48 48",
|
|
9145
9596
|
className: "w-10 h-10",
|
|
9146
9597
|
children: [
|
|
9147
|
-
/* @__PURE__ */ (0,
|
|
9148
|
-
/* @__PURE__ */ (0,
|
|
9149
|
-
/* @__PURE__ */ (0,
|
|
9598
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
9599
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
9600
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9150
9601
|
"path",
|
|
9151
9602
|
{
|
|
9152
9603
|
fill: "#1976D2",
|
|
@@ -9156,7 +9607,7 @@ var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9156
9607
|
]
|
|
9157
9608
|
}
|
|
9158
9609
|
);
|
|
9159
|
-
var ArchiveIcon2 = () => /* @__PURE__ */ (0,
|
|
9610
|
+
var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9160
9611
|
"svg",
|
|
9161
9612
|
{
|
|
9162
9613
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9166,14 +9617,14 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9166
9617
|
version: "1.0",
|
|
9167
9618
|
className: "w-10 h-10",
|
|
9168
9619
|
children: [
|
|
9169
|
-
/* @__PURE__ */ (0,
|
|
9620
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9170
9621
|
"path",
|
|
9171
9622
|
{
|
|
9172
9623
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
9173
9624
|
"clip-rule": "nonzero"
|
|
9174
9625
|
}
|
|
9175
9626
|
) }) }),
|
|
9176
|
-
/* @__PURE__ */ (0,
|
|
9627
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9177
9628
|
"path",
|
|
9178
9629
|
{
|
|
9179
9630
|
fill: "#ff9100",
|
|
@@ -9182,7 +9633,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9182
9633
|
"fill-rule": "nonzero"
|
|
9183
9634
|
}
|
|
9184
9635
|
) }),
|
|
9185
|
-
/* @__PURE__ */ (0,
|
|
9636
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9186
9637
|
"path",
|
|
9187
9638
|
{
|
|
9188
9639
|
fill: "#fbe9e7",
|
|
@@ -9191,7 +9642,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9191
9642
|
"fill-rule": "nonzero"
|
|
9192
9643
|
}
|
|
9193
9644
|
),
|
|
9194
|
-
/* @__PURE__ */ (0,
|
|
9645
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9195
9646
|
"path",
|
|
9196
9647
|
{
|
|
9197
9648
|
fill: "#ffe0b2",
|
|
@@ -9200,7 +9651,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9200
9651
|
"fill-rule": "nonzero"
|
|
9201
9652
|
}
|
|
9202
9653
|
),
|
|
9203
|
-
/* @__PURE__ */ (0,
|
|
9654
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9204
9655
|
"path",
|
|
9205
9656
|
{
|
|
9206
9657
|
fill: "#ffe0b2",
|
|
@@ -9209,7 +9660,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9209
9660
|
"fill-rule": "nonzero"
|
|
9210
9661
|
}
|
|
9211
9662
|
),
|
|
9212
|
-
/* @__PURE__ */ (0,
|
|
9663
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9213
9664
|
"path",
|
|
9214
9665
|
{
|
|
9215
9666
|
fill: "#ffe0b2",
|
|
@@ -9259,8 +9710,8 @@ var DocumentNode = (props) => {
|
|
|
9259
9710
|
documents = parseDocuments(props.node.documentAsset);
|
|
9260
9711
|
}
|
|
9261
9712
|
if (documents.length === 0) {
|
|
9262
|
-
return /* @__PURE__ */ (0,
|
|
9263
|
-
/* @__PURE__ */ (0,
|
|
9713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
9714
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9264
9715
|
"svg",
|
|
9265
9716
|
{
|
|
9266
9717
|
className: "w-5 h-5",
|
|
@@ -9268,7 +9719,7 @@ var DocumentNode = (props) => {
|
|
|
9268
9719
|
stroke: "currentColor",
|
|
9269
9720
|
viewBox: "0 0 24 24",
|
|
9270
9721
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9271
|
-
children: /* @__PURE__ */ (0,
|
|
9722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9272
9723
|
"path",
|
|
9273
9724
|
{
|
|
9274
9725
|
strokeLinecap: "round",
|
|
@@ -9279,11 +9730,11 @@ var DocumentNode = (props) => {
|
|
|
9279
9730
|
)
|
|
9280
9731
|
}
|
|
9281
9732
|
) }),
|
|
9282
|
-
/* @__PURE__ */ (0,
|
|
9283
|
-
/* @__PURE__ */ (0,
|
|
9733
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
9734
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
9284
9735
|
] }) });
|
|
9285
9736
|
}
|
|
9286
|
-
return /* @__PURE__ */ (0,
|
|
9737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
9287
9738
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
9288
9739
|
props.assetBaseUrl,
|
|
9289
9740
|
doc.assetUrl
|
|
@@ -9301,16 +9752,16 @@ var DocumentNode = (props) => {
|
|
|
9301
9752
|
}
|
|
9302
9753
|
}
|
|
9303
9754
|
const { Icon: Icon2, extLabel } = getFileDetails2(documentUrl);
|
|
9304
|
-
return /* @__PURE__ */ (0,
|
|
9755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9305
9756
|
"div",
|
|
9306
9757
|
{
|
|
9307
9758
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
9308
9759
|
children: [
|
|
9309
|
-
/* @__PURE__ */ (0,
|
|
9310
|
-
/* @__PURE__ */ (0,
|
|
9311
|
-
/* @__PURE__ */ (0,
|
|
9760
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center space-x-4 min-w-0", children: [
|
|
9761
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon2, {}) }),
|
|
9762
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-baseline space-x-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h4", { className: "text-base font-semibold truncate", title: documentTitle, children: documentTitle }) })
|
|
9312
9763
|
] }),
|
|
9313
|
-
/* @__PURE__ */ (0,
|
|
9764
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9314
9765
|
"a",
|
|
9315
9766
|
{
|
|
9316
9767
|
href: documentUrl,
|
|
@@ -9318,7 +9769,7 @@ var DocumentNode = (props) => {
|
|
|
9318
9769
|
rel: "noopener noreferrer",
|
|
9319
9770
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors shrink-0",
|
|
9320
9771
|
children: [
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9772
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9322
9773
|
"svg",
|
|
9323
9774
|
{
|
|
9324
9775
|
className: "w-4 h-4 mr-2",
|
|
@@ -9326,7 +9777,7 @@ var DocumentNode = (props) => {
|
|
|
9326
9777
|
stroke: "currentColor",
|
|
9327
9778
|
viewBox: "0 0 24 24",
|
|
9328
9779
|
children: [
|
|
9329
|
-
/* @__PURE__ */ (0,
|
|
9780
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9330
9781
|
"path",
|
|
9331
9782
|
{
|
|
9332
9783
|
strokeLinecap: "round",
|
|
@@ -9335,7 +9786,7 @@ var DocumentNode = (props) => {
|
|
|
9335
9786
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
9336
9787
|
}
|
|
9337
9788
|
),
|
|
9338
|
-
/* @__PURE__ */ (0,
|
|
9789
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9339
9790
|
"path",
|
|
9340
9791
|
{
|
|
9341
9792
|
strokeLinecap: "round",
|
|
@@ -9361,13 +9812,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
9361
9812
|
|
|
9362
9813
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
9363
9814
|
var import_dynamic13 = __toESM(require("next/dynamic"));
|
|
9364
|
-
var
|
|
9815
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9365
9816
|
var IframeClient3 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
9366
9817
|
ssr: false
|
|
9367
9818
|
});
|
|
9368
9819
|
var GoogleMapNode = (props) => {
|
|
9369
9820
|
let src = props.node.embedUrl;
|
|
9370
|
-
return /* @__PURE__ */ (0,
|
|
9821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "google-map-container", children: src && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9371
9822
|
IframeClient3,
|
|
9372
9823
|
{
|
|
9373
9824
|
src,
|
|
@@ -9379,7 +9830,7 @@ var GoogleMapNode = (props) => {
|
|
|
9379
9830
|
var GoogleMapNode_default = GoogleMapNode;
|
|
9380
9831
|
|
|
9381
9832
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
9382
|
-
var
|
|
9833
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9383
9834
|
var Pagination2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
9384
9835
|
var DataBindingControls2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
9385
9836
|
ssr: true
|
|
@@ -9566,7 +10017,8 @@ var DivContainer = async (props) => {
|
|
|
9566
10017
|
datafield: DatafieldNode_default,
|
|
9567
10018
|
"svg-icon": SVGIconNode_default,
|
|
9568
10019
|
document: DocumentNode_default,
|
|
9569
|
-
"google-map": GoogleMapNode_default
|
|
10020
|
+
"google-map": GoogleMapNode_default,
|
|
10021
|
+
counter: CounterNode_default
|
|
9570
10022
|
};
|
|
9571
10023
|
const styles = props.node.cssProperties;
|
|
9572
10024
|
const mobileStyles = props.node.mobileCssProperties;
|
|
@@ -9664,7 +10116,7 @@ var DivContainer = async (props) => {
|
|
|
9664
10116
|
}
|
|
9665
10117
|
const SelectedNode = NodeTypes2[node.type];
|
|
9666
10118
|
if (!SelectedNode) return null;
|
|
9667
|
-
return /* @__PURE__ */ (0,
|
|
10119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9668
10120
|
SelectedNode,
|
|
9669
10121
|
{
|
|
9670
10122
|
node,
|
|
@@ -9756,7 +10208,7 @@ var DivContainer = async (props) => {
|
|
|
9756
10208
|
item,
|
|
9757
10209
|
idx,
|
|
9758
10210
|
props.href ? void 0 : item?.links?.view
|
|
9759
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
10211
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react62.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
9760
10212
|
);
|
|
9761
10213
|
}
|
|
9762
10214
|
return props.node.children.flatMap((node, childIndex) => {
|
|
@@ -9874,17 +10326,17 @@ var DivContainer = async (props) => {
|
|
|
9874
10326
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
9875
10327
|
);
|
|
9876
10328
|
const WrapperComponent = Wrapper;
|
|
9877
|
-
const renderedContainer = /* @__PURE__ */ (0,
|
|
10329
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9878
10330
|
WrapperComponent,
|
|
9879
10331
|
{
|
|
9880
10332
|
id: guid,
|
|
9881
10333
|
style: combinedStyles,
|
|
9882
10334
|
className: classNames || void 0,
|
|
9883
10335
|
...wrapperProps,
|
|
9884
|
-
children: shouldShowNoDataMessage ? hasActiveFilter ? /* @__PURE__ */ (0,
|
|
10336
|
+
children: shouldShowNoDataMessage ? hasActiveFilter ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NoFilterResultsFound_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NoDataFound_default, {}) : renderContainerChildren()
|
|
9885
10337
|
}
|
|
9886
10338
|
);
|
|
9887
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0,
|
|
10339
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9888
10340
|
Pagination2,
|
|
9889
10341
|
{
|
|
9890
10342
|
path: props.path,
|
|
@@ -9892,15 +10344,15 @@ var DivContainer = async (props) => {
|
|
|
9892
10344
|
dataset: response
|
|
9893
10345
|
}
|
|
9894
10346
|
) : null;
|
|
9895
|
-
return /* @__PURE__ */ (0,
|
|
9896
|
-
/* @__PURE__ */ (0,
|
|
10347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react62.default.Fragment, { children: [
|
|
10348
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9897
10349
|
"style",
|
|
9898
10350
|
{
|
|
9899
10351
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
9900
10352
|
}
|
|
9901
10353
|
),
|
|
9902
|
-
showDataBindingControls ? /* @__PURE__ */ (0,
|
|
9903
|
-
/* @__PURE__ */ (0,
|
|
10354
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react62.default.Fragment, { children: [
|
|
10355
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9904
10356
|
DataBindingControls2,
|
|
9905
10357
|
{
|
|
9906
10358
|
mode: "toolbar",
|
|
@@ -9913,16 +10365,16 @@ var DivContainer = async (props) => {
|
|
|
9913
10365
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
9914
10366
|
}
|
|
9915
10367
|
),
|
|
9916
|
-
/* @__PURE__ */ (0,
|
|
10368
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
9917
10369
|
"div",
|
|
9918
10370
|
{
|
|
9919
10371
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
9920
10372
|
children: [
|
|
9921
|
-
/* @__PURE__ */ (0,
|
|
10373
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "min-w-0", children: [
|
|
9922
10374
|
renderedContainer,
|
|
9923
10375
|
paginationControl
|
|
9924
10376
|
] }),
|
|
9925
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0,
|
|
10377
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("aside", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9926
10378
|
DataBindingControls2,
|
|
9927
10379
|
{
|
|
9928
10380
|
mode: "facets",
|
|
@@ -9935,16 +10387,16 @@ var DivContainer = async (props) => {
|
|
|
9935
10387
|
]
|
|
9936
10388
|
}
|
|
9937
10389
|
)
|
|
9938
|
-
] }) : /* @__PURE__ */ (0,
|
|
10390
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react62.default.Fragment, { children: [
|
|
9939
10391
|
renderedContainer,
|
|
9940
|
-
paginationControl && /* @__PURE__ */ (0,
|
|
10392
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { children: paginationControl })
|
|
9941
10393
|
] })
|
|
9942
10394
|
] });
|
|
9943
10395
|
};
|
|
9944
10396
|
var DivContainer_default = DivContainer;
|
|
9945
10397
|
|
|
9946
10398
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
9947
|
-
var
|
|
10399
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9948
10400
|
var NodeTypes = {
|
|
9949
10401
|
["paragraph"]: ParagraphNode_default,
|
|
9950
10402
|
["heading"]: HeadingNode_default,
|
|
@@ -9960,7 +10412,8 @@ var NodeTypes = {
|
|
|
9960
10412
|
["svg-icon"]: SVGIconNode_default,
|
|
9961
10413
|
["embed"]: EmbedNode_default,
|
|
9962
10414
|
["document"]: DocumentNode_default,
|
|
9963
|
-
["google-map"]: GoogleMapNode_default
|
|
10415
|
+
["google-map"]: GoogleMapNode_default,
|
|
10416
|
+
["counter"]: CounterNode_default
|
|
9964
10417
|
};
|
|
9965
10418
|
var PageBodyRenderer = (props) => {
|
|
9966
10419
|
let pageBodyTree;
|
|
@@ -9982,54 +10435,57 @@ var PageBodyRenderer = (props) => {
|
|
|
9982
10435
|
}
|
|
9983
10436
|
return true;
|
|
9984
10437
|
};
|
|
9985
|
-
return /* @__PURE__ */ (0,
|
|
10438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
9986
10439
|
{
|
|
9987
10440
|
}
|
|
9988
10441
|
const SelectedNode = NodeTypes[node.type];
|
|
9989
10442
|
if (!shouldRenderNode(node)) {
|
|
9990
10443
|
return null;
|
|
9991
10444
|
}
|
|
9992
|
-
return /* @__PURE__ */ (0,
|
|
9993
|
-
|
|
9994
|
-
{
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
{
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_react63.default.Fragment, { children: [
|
|
10446
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { children: "xncbvcxmn" }),
|
|
10447
|
+
node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10448
|
+
SelectedNode,
|
|
10449
|
+
{
|
|
10450
|
+
node,
|
|
10451
|
+
firstNode: true,
|
|
10452
|
+
routeParameters: props.routeParameters,
|
|
10453
|
+
query: props.query,
|
|
10454
|
+
session: props.session,
|
|
10455
|
+
host: props.host,
|
|
10456
|
+
path: props.path,
|
|
10457
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
10458
|
+
serviceClient: props.serviceClient,
|
|
10459
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
10460
|
+
device: props.device,
|
|
10461
|
+
widgetRenderer: props.widgetRenderer
|
|
10462
|
+
}
|
|
10463
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10464
|
+
SelectedNode,
|
|
10465
|
+
{
|
|
10466
|
+
node,
|
|
10467
|
+
routeParameters: props.routeParameters,
|
|
10468
|
+
query: props.query,
|
|
10469
|
+
session: props.session,
|
|
10470
|
+
host: props.host,
|
|
10471
|
+
path: props.path,
|
|
10472
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
10473
|
+
serviceClient: props.serviceClient,
|
|
10474
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
10475
|
+
device: props.device,
|
|
10476
|
+
widgetRenderer: props.widgetRenderer
|
|
10477
|
+
}
|
|
10478
|
+
) })
|
|
10479
|
+
] }) }, index);
|
|
10024
10480
|
}) });
|
|
10025
10481
|
};
|
|
10026
10482
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
10027
10483
|
|
|
10028
10484
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
10029
|
-
var
|
|
10485
|
+
var import_react64 = require("react");
|
|
10030
10486
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
10031
10487
|
function EnterAnimationHydrator() {
|
|
10032
|
-
(0,
|
|
10488
|
+
(0, import_react64.useEffect)(() => {
|
|
10033
10489
|
let observer;
|
|
10034
10490
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
10035
10491
|
const revealAnimatedElements = () => {
|
|
@@ -10074,22 +10530,22 @@ function EnterAnimationHydrator() {
|
|
|
10074
10530
|
}
|
|
10075
10531
|
|
|
10076
10532
|
// src/components/Toast.tsx
|
|
10077
|
-
var
|
|
10533
|
+
var import_react65 = require("react");
|
|
10078
10534
|
init_ToastService();
|
|
10079
|
-
var
|
|
10535
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
10080
10536
|
var Toast = () => {
|
|
10081
|
-
const [showToast, setShowToast] = (0,
|
|
10082
|
-
const [message, setMessage] = (0,
|
|
10083
|
-
const [messageType, setMessageType] = (0,
|
|
10084
|
-
const timeoutRef = (0,
|
|
10085
|
-
const closeToast = (0,
|
|
10537
|
+
const [showToast, setShowToast] = (0, import_react65.useState)(false);
|
|
10538
|
+
const [message, setMessage] = (0, import_react65.useState)("");
|
|
10539
|
+
const [messageType, setMessageType] = (0, import_react65.useState)("error");
|
|
10540
|
+
const timeoutRef = (0, import_react65.useRef)(null);
|
|
10541
|
+
const closeToast = (0, import_react65.useCallback)(() => {
|
|
10086
10542
|
if (timeoutRef.current) {
|
|
10087
10543
|
clearTimeout(timeoutRef.current);
|
|
10088
10544
|
timeoutRef.current = null;
|
|
10089
10545
|
}
|
|
10090
10546
|
setShowToast(false);
|
|
10091
10547
|
}, []);
|
|
10092
|
-
const showMessage = (0,
|
|
10548
|
+
const showMessage = (0, import_react65.useCallback)((message2, messageType2) => {
|
|
10093
10549
|
if (timeoutRef.current) {
|
|
10094
10550
|
clearTimeout(timeoutRef.current);
|
|
10095
10551
|
}
|
|
@@ -10101,7 +10557,7 @@ var Toast = () => {
|
|
|
10101
10557
|
timeoutRef.current = null;
|
|
10102
10558
|
}, 4e3);
|
|
10103
10559
|
}, []);
|
|
10104
|
-
(0,
|
|
10560
|
+
(0, import_react65.useEffect)(() => {
|
|
10105
10561
|
ToastService_default.initialize(showMessage, closeToast);
|
|
10106
10562
|
return () => {
|
|
10107
10563
|
closeToast();
|
|
@@ -10110,8 +10566,8 @@ var Toast = () => {
|
|
|
10110
10566
|
});
|
|
10111
10567
|
};
|
|
10112
10568
|
}, [closeToast, showMessage]);
|
|
10113
|
-
return /* @__PURE__ */ (0,
|
|
10114
|
-
/* @__PURE__ */ (0,
|
|
10569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
10570
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10115
10571
|
"span",
|
|
10116
10572
|
{
|
|
10117
10573
|
className: "font-medium text-inherit text-sm",
|
|
@@ -10119,7 +10575,7 @@ var Toast = () => {
|
|
|
10119
10575
|
children: message
|
|
10120
10576
|
}
|
|
10121
10577
|
),
|
|
10122
|
-
/* @__PURE__ */ (0,
|
|
10578
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10123
10579
|
"svg",
|
|
10124
10580
|
{
|
|
10125
10581
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10127,7 +10583,7 @@ var Toast = () => {
|
|
|
10127
10583
|
fill: "none",
|
|
10128
10584
|
viewBox: "0 0 24 24",
|
|
10129
10585
|
stroke: "currentColor",
|
|
10130
|
-
children: /* @__PURE__ */ (0,
|
|
10586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
10131
10587
|
}
|
|
10132
10588
|
) })
|
|
10133
10589
|
] }) }) });
|
|
@@ -10142,6 +10598,7 @@ init_Button();
|
|
|
10142
10598
|
init_MoneyInput();
|
|
10143
10599
|
init_PercentageInput();
|
|
10144
10600
|
init_PhoneInput();
|
|
10601
|
+
init_CountryCodes();
|
|
10145
10602
|
init_NumberInput();
|
|
10146
10603
|
init_CheckboxInput();
|
|
10147
10604
|
init_OtpInput();
|
|
@@ -10156,7 +10613,7 @@ init_RadioInput();
|
|
|
10156
10613
|
// src/components/NavigationTabsV2.tsx
|
|
10157
10614
|
var import_link3 = __toESM(require("next/link"));
|
|
10158
10615
|
var import_navigation2 = require("next/navigation");
|
|
10159
|
-
var
|
|
10616
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10160
10617
|
function resolveRoutePlaceholders(route, params) {
|
|
10161
10618
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
10162
10619
|
const value = params[key];
|
|
@@ -10181,8 +10638,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
10181
10638
|
isActive: tab.isActive
|
|
10182
10639
|
})) || [];
|
|
10183
10640
|
if (mappedTabs.length === 0) return null;
|
|
10184
|
-
return /* @__PURE__ */ (0,
|
|
10185
|
-
return /* @__PURE__ */ (0,
|
|
10641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
10642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10186
10643
|
"div",
|
|
10187
10644
|
{
|
|
10188
10645
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -10195,14 +10652,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
10195
10652
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
10196
10653
|
|
|
10197
10654
|
// src/components/dataForm/DataList.tsx
|
|
10198
|
-
var
|
|
10655
|
+
var import_react68 = __toESM(require("react"));
|
|
10199
10656
|
var import_navigation3 = require("next/navigation");
|
|
10200
10657
|
|
|
10201
10658
|
// src/components/dataForm/NoContentView.tsx
|
|
10202
|
-
var
|
|
10203
|
-
var
|
|
10659
|
+
var import_react66 = __toESM(require("react"));
|
|
10660
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10204
10661
|
var NoContentView = (props) => {
|
|
10205
|
-
return /* @__PURE__ */ (0,
|
|
10662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
10206
10663
|
};
|
|
10207
10664
|
var NoContentView_default = NoContentView;
|
|
10208
10665
|
|
|
@@ -10210,39 +10667,39 @@ var NoContentView_default = NoContentView;
|
|
|
10210
10667
|
init_InputControlType();
|
|
10211
10668
|
|
|
10212
10669
|
// src/components/dataForm/ContentView.tsx
|
|
10213
|
-
var
|
|
10214
|
-
var
|
|
10670
|
+
var import_react67 = __toESM(require("react"));
|
|
10671
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
10215
10672
|
var ContentView = (props) => {
|
|
10216
|
-
return /* @__PURE__ */ (0,
|
|
10217
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
10218
|
-
/* @__PURE__ */ (0,
|
|
10219
|
-
/* @__PURE__ */ (0,
|
|
10220
|
-
/* @__PURE__ */ (0,
|
|
10221
|
-
/* @__PURE__ */ (0,
|
|
10222
|
-
/* @__PURE__ */ (0,
|
|
10673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react67.default.Fragment, { children: [
|
|
10674
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
10675
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
10676
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
10677
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ml-2", children: [
|
|
10678
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
10679
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
10223
10680
|
] })
|
|
10224
10681
|
] }),
|
|
10225
|
-
/* @__PURE__ */ (0,
|
|
10226
|
-
/* @__PURE__ */ (0,
|
|
10227
|
-
/* @__PURE__ */ (0,
|
|
10228
|
-
/* @__PURE__ */ (0,
|
|
10229
|
-
/* @__PURE__ */ (0,
|
|
10230
|
-
/* @__PURE__ */ (0,
|
|
10231
|
-
/* @__PURE__ */ (0,
|
|
10682
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
10683
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "animate-pulse", children: [
|
|
10684
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
10685
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
10686
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
10687
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
10688
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
10232
10689
|
] }),
|
|
10233
|
-
/* @__PURE__ */ (0,
|
|
10234
|
-
/* @__PURE__ */ (0,
|
|
10235
|
-
/* @__PURE__ */ (0,
|
|
10236
|
-
/* @__PURE__ */ (0,
|
|
10237
|
-
/* @__PURE__ */ (0,
|
|
10238
|
-
/* @__PURE__ */ (0,
|
|
10690
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "animate-pulse", children: [
|
|
10691
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
10692
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
10693
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
10694
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
10239
10696
|
] }),
|
|
10240
|
-
/* @__PURE__ */ (0,
|
|
10241
|
-
/* @__PURE__ */ (0,
|
|
10242
|
-
/* @__PURE__ */ (0,
|
|
10243
|
-
/* @__PURE__ */ (0,
|
|
10244
|
-
/* @__PURE__ */ (0,
|
|
10245
|
-
/* @__PURE__ */ (0,
|
|
10697
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "animate-pulse", children: [
|
|
10698
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
10699
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
10700
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
10701
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
10702
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
10246
10703
|
] })
|
|
10247
10704
|
] })
|
|
10248
10705
|
] }) }),
|
|
@@ -10302,7 +10759,7 @@ function FormReducer(state, action) {
|
|
|
10302
10759
|
var FormReducer_default = FormReducer;
|
|
10303
10760
|
|
|
10304
10761
|
// src/components/dataForm/DataList.tsx
|
|
10305
|
-
var
|
|
10762
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
10306
10763
|
var DataList = (props) => {
|
|
10307
10764
|
const router = (0, import_navigation3.useRouter)();
|
|
10308
10765
|
let builder = new OdataBuilder(props.path);
|
|
@@ -10310,12 +10767,12 @@ var DataList = (props) => {
|
|
|
10310
10767
|
let activePageNumber = 0;
|
|
10311
10768
|
let pages = 0;
|
|
10312
10769
|
console.log(props.addLinkText);
|
|
10313
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
10314
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
10315
|
-
(0,
|
|
10770
|
+
const [isDataFound, setIsDataFound] = (0, import_react68.useState)(null);
|
|
10771
|
+
const [searchTerm, setSearchTerm] = (0, import_react68.useState)(props.query?.searchTerm ?? "");
|
|
10772
|
+
(0, import_react68.useEffect)(() => {
|
|
10316
10773
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
10317
10774
|
}, [props.query?.searchTerm]);
|
|
10318
|
-
(0,
|
|
10775
|
+
(0, import_react68.useEffect)(() => {
|
|
10319
10776
|
if (props?.dataset) {
|
|
10320
10777
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
10321
10778
|
setIsDataFound(true);
|
|
@@ -10324,7 +10781,7 @@ var DataList = (props) => {
|
|
|
10324
10781
|
}
|
|
10325
10782
|
}
|
|
10326
10783
|
}, [props.dataset]);
|
|
10327
|
-
(0,
|
|
10784
|
+
(0, import_react68.useEffect)(() => {
|
|
10328
10785
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
10329
10786
|
const filterQuery = props.query["$filter"];
|
|
10330
10787
|
props.filters.forEach((filter) => {
|
|
@@ -10343,7 +10800,7 @@ var DataList = (props) => {
|
|
|
10343
10800
|
if (path.includes(".")) {
|
|
10344
10801
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
10345
10802
|
} else if (Array.isArray(obj[path])) {
|
|
10346
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
10803
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: item }, index));
|
|
10347
10804
|
} else {
|
|
10348
10805
|
return obj[path];
|
|
10349
10806
|
}
|
|
@@ -10352,11 +10809,11 @@ var DataList = (props) => {
|
|
|
10352
10809
|
inputValues: {},
|
|
10353
10810
|
lastPropertyChanged: ""
|
|
10354
10811
|
};
|
|
10355
|
-
const [formState, dispatch] = (0,
|
|
10812
|
+
const [formState, dispatch] = (0, import_react68.useReducer)(FormReducer_default, initialState);
|
|
10356
10813
|
const getSearchableColumns = () => {
|
|
10357
10814
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
10358
10815
|
};
|
|
10359
|
-
const handleFilterChange = (0,
|
|
10816
|
+
const handleFilterChange = (0, import_react68.useCallback)(
|
|
10360
10817
|
(updatedValues) => {
|
|
10361
10818
|
dispatch({
|
|
10362
10819
|
type: FORM_INPUT_UPDATE,
|
|
@@ -10387,7 +10844,7 @@ var DataList = (props) => {
|
|
|
10387
10844
|
},
|
|
10388
10845
|
[dispatch, props, router]
|
|
10389
10846
|
);
|
|
10390
|
-
(0,
|
|
10847
|
+
(0, import_react68.useEffect)(() => {
|
|
10391
10848
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
10392
10849
|
return;
|
|
10393
10850
|
}
|
|
@@ -10425,30 +10882,30 @@ var DataList = (props) => {
|
|
|
10425
10882
|
const renderPageNumbers = () => {
|
|
10426
10883
|
if (pages <= 10) {
|
|
10427
10884
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
10428
|
-
(page) => /* @__PURE__ */ (0,
|
|
10885
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10429
10886
|
Hyperlink,
|
|
10430
10887
|
{
|
|
10431
10888
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10432
10889
|
href: builder.getNewPageUrl(page),
|
|
10433
10890
|
children: page
|
|
10434
10891
|
}
|
|
10435
|
-
) : /* @__PURE__ */ (0,
|
|
10892
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
10436
10893
|
);
|
|
10437
10894
|
} else {
|
|
10438
10895
|
const showFirstPages = activePageNumber <= 5;
|
|
10439
10896
|
const showLastPages = activePageNumber > pages - 5;
|
|
10440
10897
|
if (showFirstPages) {
|
|
10441
|
-
return /* @__PURE__ */ (0,
|
|
10442
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
10898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10899
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10443
10900
|
Hyperlink,
|
|
10444
10901
|
{
|
|
10445
10902
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10446
10903
|
href: builder.getNewPageUrl(page),
|
|
10447
10904
|
children: page
|
|
10448
10905
|
}
|
|
10449
|
-
) : /* @__PURE__ */ (0,
|
|
10450
|
-
/* @__PURE__ */ (0,
|
|
10451
|
-
/* @__PURE__ */ (0,
|
|
10906
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
10907
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
10908
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10452
10909
|
Hyperlink,
|
|
10453
10910
|
{
|
|
10454
10911
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10456,7 +10913,7 @@ var DataList = (props) => {
|
|
|
10456
10913
|
children: pages - 1
|
|
10457
10914
|
}
|
|
10458
10915
|
),
|
|
10459
|
-
/* @__PURE__ */ (0,
|
|
10916
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10460
10917
|
Hyperlink,
|
|
10461
10918
|
{
|
|
10462
10919
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10464,7 +10921,7 @@ var DataList = (props) => {
|
|
|
10464
10921
|
children: pages
|
|
10465
10922
|
}
|
|
10466
10923
|
),
|
|
10467
|
-
/* @__PURE__ */ (0,
|
|
10924
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10468
10925
|
"select",
|
|
10469
10926
|
{
|
|
10470
10927
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -10476,18 +10933,18 @@ var DataList = (props) => {
|
|
|
10476
10933
|
}
|
|
10477
10934
|
},
|
|
10478
10935
|
children: [
|
|
10479
|
-
/* @__PURE__ */ (0,
|
|
10936
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
10480
10937
|
Array.from(
|
|
10481
10938
|
{ length: Math.max(0, pages - 10) },
|
|
10482
10939
|
(_, index) => index + 9
|
|
10483
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
10940
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: page, children: page }, page))
|
|
10484
10941
|
]
|
|
10485
10942
|
}
|
|
10486
10943
|
) })
|
|
10487
10944
|
] });
|
|
10488
10945
|
} else if (showLastPages) {
|
|
10489
|
-
return /* @__PURE__ */ (0,
|
|
10490
|
-
/* @__PURE__ */ (0,
|
|
10946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10947
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10491
10948
|
Hyperlink,
|
|
10492
10949
|
{
|
|
10493
10950
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10495,7 +10952,7 @@ var DataList = (props) => {
|
|
|
10495
10952
|
children: "1"
|
|
10496
10953
|
}
|
|
10497
10954
|
),
|
|
10498
|
-
/* @__PURE__ */ (0,
|
|
10955
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10499
10956
|
Hyperlink,
|
|
10500
10957
|
{
|
|
10501
10958
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10503,21 +10960,21 @@ var DataList = (props) => {
|
|
|
10503
10960
|
children: "2"
|
|
10504
10961
|
}
|
|
10505
10962
|
),
|
|
10506
|
-
/* @__PURE__ */ (0,
|
|
10963
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
10507
10964
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
10508
|
-
(page) => /* @__PURE__ */ (0,
|
|
10965
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10509
10966
|
Hyperlink,
|
|
10510
10967
|
{
|
|
10511
10968
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10512
10969
|
href: builder.getNewPageUrl(page),
|
|
10513
10970
|
children: page
|
|
10514
10971
|
}
|
|
10515
|
-
) : /* @__PURE__ */ (0,
|
|
10972
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
10516
10973
|
)
|
|
10517
10974
|
] });
|
|
10518
10975
|
} else {
|
|
10519
|
-
return /* @__PURE__ */ (0,
|
|
10520
|
-
/* @__PURE__ */ (0,
|
|
10976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10977
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10521
10978
|
Hyperlink,
|
|
10522
10979
|
{
|
|
10523
10980
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10525,7 +10982,7 @@ var DataList = (props) => {
|
|
|
10525
10982
|
children: "1"
|
|
10526
10983
|
}
|
|
10527
10984
|
),
|
|
10528
|
-
/* @__PURE__ */ (0,
|
|
10985
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10529
10986
|
Hyperlink,
|
|
10530
10987
|
{
|
|
10531
10988
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10533,20 +10990,20 @@ var DataList = (props) => {
|
|
|
10533
10990
|
children: "2"
|
|
10534
10991
|
}
|
|
10535
10992
|
),
|
|
10536
|
-
/* @__PURE__ */ (0,
|
|
10993
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
10537
10994
|
Array.from(
|
|
10538
10995
|
{ length: 5 },
|
|
10539
10996
|
(_, index) => activePageNumber - 2 + index
|
|
10540
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
10997
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10541
10998
|
Hyperlink,
|
|
10542
10999
|
{
|
|
10543
11000
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10544
11001
|
href: builder.getNewPageUrl(page),
|
|
10545
11002
|
children: page
|
|
10546
11003
|
}
|
|
10547
|
-
) : /* @__PURE__ */ (0,
|
|
10548
|
-
/* @__PURE__ */ (0,
|
|
10549
|
-
/* @__PURE__ */ (0,
|
|
11004
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
11005
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
11006
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10550
11007
|
Hyperlink,
|
|
10551
11008
|
{
|
|
10552
11009
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10554,7 +11011,7 @@ var DataList = (props) => {
|
|
|
10554
11011
|
children: pages - 1
|
|
10555
11012
|
}
|
|
10556
11013
|
),
|
|
10557
|
-
/* @__PURE__ */ (0,
|
|
11014
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10558
11015
|
Hyperlink,
|
|
10559
11016
|
{
|
|
10560
11017
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10562,7 +11019,7 @@ var DataList = (props) => {
|
|
|
10562
11019
|
children: pages
|
|
10563
11020
|
}
|
|
10564
11021
|
),
|
|
10565
|
-
/* @__PURE__ */ (0,
|
|
11022
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10566
11023
|
"select",
|
|
10567
11024
|
{
|
|
10568
11025
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -10574,8 +11031,8 @@ var DataList = (props) => {
|
|
|
10574
11031
|
}
|
|
10575
11032
|
},
|
|
10576
11033
|
children: [
|
|
10577
|
-
/* @__PURE__ */ (0,
|
|
10578
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
11034
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: "", children: "Jump to" }),
|
|
11035
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: page, children: page }, page))
|
|
10579
11036
|
]
|
|
10580
11037
|
}
|
|
10581
11038
|
) })
|
|
@@ -10583,16 +11040,16 @@ var DataList = (props) => {
|
|
|
10583
11040
|
}
|
|
10584
11041
|
}
|
|
10585
11042
|
};
|
|
10586
|
-
return /* @__PURE__ */ (0,
|
|
10587
|
-
/* @__PURE__ */ (0,
|
|
10588
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
11043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_react68.default.Fragment, { children: [
|
|
11044
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(ContentView_default, { isDataFound, children: [
|
|
11045
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10589
11046
|
"div",
|
|
10590
11047
|
{
|
|
10591
11048
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
10592
11049
|
children: [
|
|
10593
|
-
props.title ? /* @__PURE__ */ (0,
|
|
10594
|
-
/* @__PURE__ */ (0,
|
|
10595
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
11050
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", {}),
|
|
11051
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11052
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10596
11053
|
InputControl_default,
|
|
10597
11054
|
{
|
|
10598
11055
|
name: "Search_input",
|
|
@@ -10605,7 +11062,7 @@ var DataList = (props) => {
|
|
|
10605
11062
|
}
|
|
10606
11063
|
}
|
|
10607
11064
|
),
|
|
10608
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
11065
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10609
11066
|
InputControl_default,
|
|
10610
11067
|
{
|
|
10611
11068
|
name: filter.name,
|
|
@@ -10620,15 +11077,15 @@ var DataList = (props) => {
|
|
|
10620
11077
|
},
|
|
10621
11078
|
filter.name
|
|
10622
11079
|
)),
|
|
10623
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
11080
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10624
11081
|
Hyperlink,
|
|
10625
11082
|
{
|
|
10626
11083
|
className: "gap-1",
|
|
10627
11084
|
linkType: "Primary" /* Solid */,
|
|
10628
11085
|
href: props.addLinkHref,
|
|
10629
11086
|
children: [
|
|
10630
|
-
/* @__PURE__ */ (0,
|
|
10631
|
-
/* @__PURE__ */ (0,
|
|
11087
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
11088
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
10632
11089
|
]
|
|
10633
11090
|
}
|
|
10634
11091
|
)
|
|
@@ -10636,8 +11093,8 @@ var DataList = (props) => {
|
|
|
10636
11093
|
]
|
|
10637
11094
|
}
|
|
10638
11095
|
),
|
|
10639
|
-
/* @__PURE__ */ (0,
|
|
10640
|
-
/* @__PURE__ */ (0,
|
|
11096
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
11097
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("tr", { children: [
|
|
10641
11098
|
props?.columns?.map((column) => {
|
|
10642
11099
|
let url = builder.getNewOrderByUrl(column.name);
|
|
10643
11100
|
let icon = "chevronUpDown";
|
|
@@ -10648,18 +11105,18 @@ var DataList = (props) => {
|
|
|
10648
11105
|
icon = "chevronUp";
|
|
10649
11106
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
10650
11107
|
}
|
|
10651
|
-
return /* @__PURE__ */ (0,
|
|
11108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10652
11109
|
"th",
|
|
10653
11110
|
{
|
|
10654
11111
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
10655
|
-
children: /* @__PURE__ */ (0,
|
|
11112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10656
11113
|
Hyperlink,
|
|
10657
11114
|
{
|
|
10658
11115
|
href: column.enableSorting ? url : void 0,
|
|
10659
11116
|
className: "!text-neutral-contrast ",
|
|
10660
|
-
children: /* @__PURE__ */ (0,
|
|
10661
|
-
/* @__PURE__ */ (0,
|
|
10662
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
11117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
11118
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-black", children: column.label }),
|
|
11119
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
10663
11120
|
] })
|
|
10664
11121
|
}
|
|
10665
11122
|
)
|
|
@@ -10667,25 +11124,25 @@ var DataList = (props) => {
|
|
|
10667
11124
|
column.name
|
|
10668
11125
|
);
|
|
10669
11126
|
}),
|
|
10670
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
11127
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("th", { className: "px-6 py-3 text-right font-medium bg-neutral-soft w-32 text-black", children: "Action" })
|
|
10671
11128
|
] }) }),
|
|
10672
|
-
/* @__PURE__ */ (0,
|
|
11129
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
10673
11130
|
let validityClass = "";
|
|
10674
11131
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
10675
11132
|
validityClass = "bg-alert-200";
|
|
10676
11133
|
}
|
|
10677
|
-
return /* @__PURE__ */ (0,
|
|
11134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("tr", { className: validityClass, children: [
|
|
10678
11135
|
props?.columns?.map((column, colindex) => {
|
|
10679
|
-
return /* @__PURE__ */ (0,
|
|
11136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10680
11137
|
"td",
|
|
10681
11138
|
{
|
|
10682
11139
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
10683
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
11140
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10684
11141
|
Hyperlink,
|
|
10685
11142
|
{
|
|
10686
11143
|
className: "",
|
|
10687
11144
|
href: `https://${dataitem[column.name]}`,
|
|
10688
|
-
children: /* @__PURE__ */ (0,
|
|
11145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10689
11146
|
ViewControl_default,
|
|
10690
11147
|
{
|
|
10691
11148
|
controlType: column.controlType,
|
|
@@ -10698,11 +11155,11 @@ var DataList = (props) => {
|
|
|
10698
11155
|
}
|
|
10699
11156
|
)
|
|
10700
11157
|
}
|
|
10701
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
11158
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10702
11159
|
Hyperlink,
|
|
10703
11160
|
{
|
|
10704
11161
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
10705
|
-
children: /* @__PURE__ */ (0,
|
|
11162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10706
11163
|
ViewControl_default,
|
|
10707
11164
|
{
|
|
10708
11165
|
controlType: column.controlType,
|
|
@@ -10712,7 +11169,7 @@ var DataList = (props) => {
|
|
|
10712
11169
|
}
|
|
10713
11170
|
)
|
|
10714
11171
|
}
|
|
10715
|
-
) : /* @__PURE__ */ (0,
|
|
11172
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10716
11173
|
ViewControl_default,
|
|
10717
11174
|
{
|
|
10718
11175
|
controlType: column.controlType,
|
|
@@ -10724,7 +11181,7 @@ var DataList = (props) => {
|
|
|
10724
11181
|
}
|
|
10725
11182
|
) }, colindex);
|
|
10726
11183
|
}),
|
|
10727
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
11184
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("td", { className: "px-6 py-2 text-right whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10728
11185
|
"button",
|
|
10729
11186
|
{
|
|
10730
11187
|
type: "button",
|
|
@@ -10734,7 +11191,7 @@ var DataList = (props) => {
|
|
|
10734
11191
|
},
|
|
10735
11192
|
className: "inline-flex items-center gap-1.5 px-3 py-1 text-xs font-semibold rounded-md border border-neutral-300 bg-white hover:bg-neutral-100 text-neutral-800 transition-colors shadow-xs",
|
|
10736
11193
|
children: [
|
|
10737
|
-
/* @__PURE__ */ (0,
|
|
11194
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10738
11195
|
"svg",
|
|
10739
11196
|
{
|
|
10740
11197
|
className: "w-3.5 h-3.5",
|
|
@@ -10745,22 +11202,22 @@ var DataList = (props) => {
|
|
|
10745
11202
|
strokeLinecap: "round",
|
|
10746
11203
|
strokeLinejoin: "round",
|
|
10747
11204
|
children: [
|
|
10748
|
-
/* @__PURE__ */ (0,
|
|
10749
|
-
/* @__PURE__ */ (0,
|
|
11205
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
11206
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
10750
11207
|
]
|
|
10751
11208
|
}
|
|
10752
11209
|
),
|
|
10753
|
-
/* @__PURE__ */ (0,
|
|
11210
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: props.quickViewLabel || "Quick View" })
|
|
10754
11211
|
]
|
|
10755
11212
|
}
|
|
10756
11213
|
) })
|
|
10757
11214
|
] }, index);
|
|
10758
11215
|
}) })
|
|
10759
11216
|
] }) }),
|
|
10760
|
-
/* @__PURE__ */ (0,
|
|
10761
|
-
/* @__PURE__ */ (0,
|
|
10762
|
-
/* @__PURE__ */ (0,
|
|
10763
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
11217
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
11218
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "text-gray-700", children: label }),
|
|
11219
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
11220
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10764
11221
|
Hyperlink,
|
|
10765
11222
|
{
|
|
10766
11223
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -10768,9 +11225,9 @@ var DataList = (props) => {
|
|
|
10768
11225
|
children: "Prev"
|
|
10769
11226
|
}
|
|
10770
11227
|
),
|
|
10771
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
11228
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
10772
11229
|
renderPageNumbers(),
|
|
10773
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
11230
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10774
11231
|
Hyperlink,
|
|
10775
11232
|
{
|
|
10776
11233
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -10778,19 +11235,19 @@ var DataList = (props) => {
|
|
|
10778
11235
|
children: "Next"
|
|
10779
11236
|
}
|
|
10780
11237
|
),
|
|
10781
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
11238
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
10782
11239
|
] })
|
|
10783
11240
|
] }) })
|
|
10784
11241
|
] }),
|
|
10785
|
-
/* @__PURE__ */ (0,
|
|
10786
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
11242
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
11243
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10787
11244
|
"div",
|
|
10788
11245
|
{
|
|
10789
11246
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
10790
11247
|
children: [
|
|
10791
|
-
props.title ? /* @__PURE__ */ (0,
|
|
10792
|
-
/* @__PURE__ */ (0,
|
|
10793
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
11248
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", {}),
|
|
11249
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11250
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10794
11251
|
InputControl_default,
|
|
10795
11252
|
{
|
|
10796
11253
|
name: "Search_input",
|
|
@@ -10803,7 +11260,7 @@ var DataList = (props) => {
|
|
|
10803
11260
|
}
|
|
10804
11261
|
}
|
|
10805
11262
|
),
|
|
10806
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
11263
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10807
11264
|
InputControl_default,
|
|
10808
11265
|
{
|
|
10809
11266
|
name: filter.name,
|
|
@@ -10818,15 +11275,15 @@ var DataList = (props) => {
|
|
|
10818
11275
|
},
|
|
10819
11276
|
filter.name
|
|
10820
11277
|
)),
|
|
10821
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
11278
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10822
11279
|
Hyperlink,
|
|
10823
11280
|
{
|
|
10824
11281
|
className: "gap-1",
|
|
10825
11282
|
linkType: "Primary" /* Solid */,
|
|
10826
11283
|
href: props.addLinkHref,
|
|
10827
11284
|
children: [
|
|
10828
|
-
/* @__PURE__ */ (0,
|
|
10829
|
-
/* @__PURE__ */ (0,
|
|
11285
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
11286
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
10830
11287
|
]
|
|
10831
11288
|
}
|
|
10832
11289
|
)
|
|
@@ -10834,8 +11291,8 @@ var DataList = (props) => {
|
|
|
10834
11291
|
]
|
|
10835
11292
|
}
|
|
10836
11293
|
),
|
|
10837
|
-
/* @__PURE__ */ (0,
|
|
10838
|
-
/* @__PURE__ */ (0,
|
|
11294
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
11295
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
10839
11296
|
let url = builder.getNewOrderByUrl(column.name);
|
|
10840
11297
|
let icon = "chevronUpDown";
|
|
10841
11298
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -10845,18 +11302,18 @@ var DataList = (props) => {
|
|
|
10845
11302
|
icon = "chevronUp";
|
|
10846
11303
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
10847
11304
|
}
|
|
10848
|
-
return /* @__PURE__ */ (0,
|
|
11305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10849
11306
|
"th",
|
|
10850
11307
|
{
|
|
10851
11308
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
10852
|
-
children: /* @__PURE__ */ (0,
|
|
11309
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10853
11310
|
Hyperlink,
|
|
10854
11311
|
{
|
|
10855
11312
|
href: column.enableSorting ? url : void 0,
|
|
10856
11313
|
className: "text-body-950",
|
|
10857
|
-
children: /* @__PURE__ */ (0,
|
|
10858
|
-
/* @__PURE__ */ (0,
|
|
10859
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
11314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
11315
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: column.label }),
|
|
11316
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
10860
11317
|
] })
|
|
10861
11318
|
}
|
|
10862
11319
|
)
|
|
@@ -10864,7 +11321,7 @@ var DataList = (props) => {
|
|
|
10864
11321
|
column.name
|
|
10865
11322
|
);
|
|
10866
11323
|
}) }) }) }) }),
|
|
10867
|
-
/* @__PURE__ */ (0,
|
|
11324
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
10868
11325
|
] })
|
|
10869
11326
|
] })
|
|
10870
11327
|
] });
|
|
@@ -10872,12 +11329,12 @@ var DataList = (props) => {
|
|
|
10872
11329
|
var DataList_default = DataList;
|
|
10873
11330
|
|
|
10874
11331
|
// src/components/dataForm/DataListRenderer.tsx
|
|
10875
|
-
var
|
|
11332
|
+
var import_react69 = __toESM(require("react"));
|
|
10876
11333
|
init_ServiceClient();
|
|
10877
11334
|
init_OdataBuilder();
|
|
10878
11335
|
init_SelectWithSearchInput();
|
|
10879
11336
|
var import_navigation4 = require("next/navigation");
|
|
10880
|
-
var
|
|
11337
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
10881
11338
|
var viewControlMap = {
|
|
10882
11339
|
number: ViewControlTypes.number,
|
|
10883
11340
|
lineText: ViewControlTypes.lineText,
|
|
@@ -10932,14 +11389,14 @@ var DataListRenderer = ({
|
|
|
10932
11389
|
widgetProps
|
|
10933
11390
|
}) => {
|
|
10934
11391
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
10935
|
-
const [columns, setColumns] = (0,
|
|
10936
|
-
const [dataset, setDataset] = (0,
|
|
10937
|
-
const [filter, setFilters] = (0,
|
|
10938
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
10939
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
10940
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
11392
|
+
const [columns, setColumns] = (0, import_react69.useState)([]);
|
|
11393
|
+
const [dataset, setDataset] = (0, import_react69.useState)();
|
|
11394
|
+
const [filter, setFilters] = (0, import_react69.useState)([]);
|
|
11395
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react69.useState)("");
|
|
11396
|
+
const [addLinkText, setAddLinkText] = (0, import_react69.useState)("");
|
|
11397
|
+
const [serviceRoute, setServiceRoute] = (0, import_react69.useState)("");
|
|
10941
11398
|
const pathname = (0, import_navigation4.usePathname)();
|
|
10942
|
-
(0,
|
|
11399
|
+
(0, import_react69.useEffect)(() => {
|
|
10943
11400
|
if (!formDefinition) return;
|
|
10944
11401
|
setColumns(mapApiToColumns(formDefinition));
|
|
10945
11402
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -10952,7 +11409,7 @@ var DataListRenderer = ({
|
|
|
10952
11409
|
setAddLinkHref(resolvedAddLinkHref);
|
|
10953
11410
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
10954
11411
|
}, [formDefinition, params]);
|
|
10955
|
-
(0,
|
|
11412
|
+
(0, import_react69.useEffect)(() => {
|
|
10956
11413
|
const fetchData = async () => {
|
|
10957
11414
|
if (!serviceRoute) return;
|
|
10958
11415
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -10972,13 +11429,13 @@ var DataListRenderer = ({
|
|
|
10972
11429
|
isActive: landingPageUrl === pathname
|
|
10973
11430
|
};
|
|
10974
11431
|
});
|
|
10975
|
-
return /* @__PURE__ */ (0,
|
|
11432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_react69.default.Fragment, { children: [
|
|
10976
11433
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
10977
11434
|
// tabs={resolvedTabs}
|
|
10978
11435
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
10979
11436
|
// />
|
|
10980
|
-
/* @__PURE__ */ (0,
|
|
10981
|
-
/* @__PURE__ */ (0,
|
|
11437
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
11438
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10982
11439
|
DataList_default,
|
|
10983
11440
|
{
|
|
10984
11441
|
addLinkHref,
|
|
@@ -11000,13 +11457,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
11000
11457
|
init_InputControlType();
|
|
11001
11458
|
|
|
11002
11459
|
// src/components/dataForm/DataForm.tsx
|
|
11003
|
-
var
|
|
11460
|
+
var import_react71 = __toESM(require("react"));
|
|
11004
11461
|
init_Icon();
|
|
11005
11462
|
init_Button();
|
|
11006
11463
|
init_StyleTypes();
|
|
11007
11464
|
|
|
11008
11465
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
11009
|
-
var
|
|
11466
|
+
var import_react70 = __toESM(require("react"));
|
|
11010
11467
|
|
|
11011
11468
|
// src/components/dataForm/StyleTypes.tsx
|
|
11012
11469
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -11033,7 +11490,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
11033
11490
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
11034
11491
|
|
|
11035
11492
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
11036
|
-
var
|
|
11493
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
11037
11494
|
var DataFormChildSection = (props) => {
|
|
11038
11495
|
const { section } = props;
|
|
11039
11496
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -11045,7 +11502,7 @@ var DataFormChildSection = (props) => {
|
|
|
11045
11502
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
11046
11503
|
};
|
|
11047
11504
|
const childItemsToRender = getChildItemsForRendering();
|
|
11048
|
-
const handleChildInputChange = (0,
|
|
11505
|
+
const handleChildInputChange = (0, import_react70.useCallback)(
|
|
11049
11506
|
(updatedValues) => {
|
|
11050
11507
|
if (isOneToOne) {
|
|
11051
11508
|
props.callback({
|
|
@@ -11072,7 +11529,7 @@ var DataFormChildSection = (props) => {
|
|
|
11072
11529
|
},
|
|
11073
11530
|
[props, isOneToOne, childItemsToRender]
|
|
11074
11531
|
);
|
|
11075
|
-
const onAddRow = (0,
|
|
11532
|
+
const onAddRow = (0, import_react70.useCallback)(() => {
|
|
11076
11533
|
props.callback({
|
|
11077
11534
|
sectionName: props.section.name,
|
|
11078
11535
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -11081,7 +11538,7 @@ var DataFormChildSection = (props) => {
|
|
|
11081
11538
|
rowIndex: -1
|
|
11082
11539
|
});
|
|
11083
11540
|
}, [props]);
|
|
11084
|
-
const onDeleteRow = (0,
|
|
11541
|
+
const onDeleteRow = (0, import_react70.useCallback)(
|
|
11085
11542
|
(filteredIndex) => {
|
|
11086
11543
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
11087
11544
|
if (visibleItem) {
|
|
@@ -11101,14 +11558,14 @@ var DataFormChildSection = (props) => {
|
|
|
11101
11558
|
childItemsToRender,
|
|
11102
11559
|
allChildItems: childItems
|
|
11103
11560
|
});
|
|
11104
|
-
return /* @__PURE__ */ (0,
|
|
11105
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
11106
|
-
/* @__PURE__ */ (0,
|
|
11107
|
-
/* @__PURE__ */ (0,
|
|
11108
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
11109
|
-
return /* @__PURE__ */ (0,
|
|
11561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react70.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
11562
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
11563
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
11564
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
11565
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
11566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("tr", { className: "", children: [
|
|
11110
11567
|
sectionRow.elements.map((field, index) => {
|
|
11111
|
-
return /* @__PURE__ */ (0,
|
|
11568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11112
11569
|
"th",
|
|
11113
11570
|
{
|
|
11114
11571
|
className: "py-3 font-normal text-left",
|
|
@@ -11117,21 +11574,21 @@ var DataFormChildSection = (props) => {
|
|
|
11117
11574
|
field.name
|
|
11118
11575
|
);
|
|
11119
11576
|
}),
|
|
11120
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
11577
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
11121
11578
|
] }, sectionRowIndex);
|
|
11122
11579
|
}) }),
|
|
11123
|
-
/* @__PURE__ */ (0,
|
|
11580
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
11124
11581
|
const { item, originalIndex } = visibleItem;
|
|
11125
11582
|
const rowKey = originalIndex;
|
|
11126
|
-
return /* @__PURE__ */ (0,
|
|
11583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react70.default.Fragment, { children: section.sectionRows.map(
|
|
11127
11584
|
(sectionRow, sectionRowIndex) => {
|
|
11128
|
-
return /* @__PURE__ */ (0,
|
|
11585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
11129
11586
|
"tr",
|
|
11130
11587
|
{
|
|
11131
11588
|
className: "",
|
|
11132
11589
|
children: [
|
|
11133
11590
|
sectionRow.elements.map((field, index) => {
|
|
11134
|
-
return /* @__PURE__ */ (0,
|
|
11591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11135
11592
|
InputControl_default,
|
|
11136
11593
|
{
|
|
11137
11594
|
index: filteredIndex,
|
|
@@ -11151,7 +11608,7 @@ var DataFormChildSection = (props) => {
|
|
|
11151
11608
|
}
|
|
11152
11609
|
) }) }) }, field.name);
|
|
11153
11610
|
}),
|
|
11154
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
11611
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11155
11612
|
ClientButton_default,
|
|
11156
11613
|
{
|
|
11157
11614
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -11160,7 +11617,7 @@ var DataFormChildSection = (props) => {
|
|
|
11160
11617
|
},
|
|
11161
11618
|
dataRole: "delete",
|
|
11162
11619
|
tabIndex: -1,
|
|
11163
|
-
children: /* @__PURE__ */ (0,
|
|
11620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11164
11621
|
Icon_default,
|
|
11165
11622
|
{
|
|
11166
11623
|
className: "w-4 h-4",
|
|
@@ -11177,7 +11634,7 @@ var DataFormChildSection = (props) => {
|
|
|
11177
11634
|
) }, rowKey);
|
|
11178
11635
|
}) })
|
|
11179
11636
|
] }) }),
|
|
11180
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
11637
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11181
11638
|
ClientButton_default,
|
|
11182
11639
|
{
|
|
11183
11640
|
ButtonType: "Link" /* Link */,
|
|
@@ -11192,9 +11649,9 @@ var DataFormChildSection = (props) => {
|
|
|
11192
11649
|
var DataFormChildSection_default = DataFormChildSection;
|
|
11193
11650
|
|
|
11194
11651
|
// src/components/dataForm/DataForm.tsx
|
|
11195
|
-
var
|
|
11652
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
11196
11653
|
var DataForm = (props) => {
|
|
11197
|
-
const formRef = (0,
|
|
11654
|
+
const formRef = (0, import_react71.useRef)(null);
|
|
11198
11655
|
console.log(props.dataItem, "dssads");
|
|
11199
11656
|
const initialState = {
|
|
11200
11657
|
inputValues: {},
|
|
@@ -11203,9 +11660,9 @@ var DataForm = (props) => {
|
|
|
11203
11660
|
const childInitialState = {
|
|
11204
11661
|
inputValues: []
|
|
11205
11662
|
};
|
|
11206
|
-
const [formState, dispatch] = (0,
|
|
11663
|
+
const [formState, dispatch] = (0, import_react71.useReducer)(FormReducer_default, initialState);
|
|
11207
11664
|
console.log(props.sections, "sections");
|
|
11208
|
-
const clearHiddenChildSections = (0,
|
|
11665
|
+
const clearHiddenChildSections = (0, import_react71.useCallback)(
|
|
11209
11666
|
(changedProperty, newValues) => {
|
|
11210
11667
|
if (!props.sections) return;
|
|
11211
11668
|
const allChildSections = [];
|
|
@@ -11243,7 +11700,7 @@ var DataForm = (props) => {
|
|
|
11243
11700
|
},
|
|
11244
11701
|
[props.sections, formState.inputValues]
|
|
11245
11702
|
);
|
|
11246
|
-
const handleInputChange = (0,
|
|
11703
|
+
const handleInputChange = (0, import_react71.useCallback)(
|
|
11247
11704
|
async (updatedValues) => {
|
|
11248
11705
|
dispatch({
|
|
11249
11706
|
type: FORM_INPUT_UPDATE,
|
|
@@ -11258,7 +11715,7 @@ var DataForm = (props) => {
|
|
|
11258
11715
|
},
|
|
11259
11716
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
11260
11717
|
);
|
|
11261
|
-
const fetchData = (0,
|
|
11718
|
+
const fetchData = (0, import_react71.useCallback)(async () => {
|
|
11262
11719
|
if (!props.rules) return;
|
|
11263
11720
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
11264
11721
|
return;
|
|
@@ -11289,7 +11746,7 @@ var DataForm = (props) => {
|
|
|
11289
11746
|
console.error("Error fetching data:", error);
|
|
11290
11747
|
}
|
|
11291
11748
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
11292
|
-
(0,
|
|
11749
|
+
(0, import_react71.useEffect)(() => {
|
|
11293
11750
|
fetchData();
|
|
11294
11751
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
11295
11752
|
function replacePlaceholders(template, context, params) {
|
|
@@ -11309,7 +11766,7 @@ var DataForm = (props) => {
|
|
|
11309
11766
|
}
|
|
11310
11767
|
);
|
|
11311
11768
|
}
|
|
11312
|
-
const handleChildSectionChangeCallback = (0,
|
|
11769
|
+
const handleChildSectionChangeCallback = (0, import_react71.useCallback)(
|
|
11313
11770
|
(params) => {
|
|
11314
11771
|
dispatch({
|
|
11315
11772
|
type: params.actionType,
|
|
@@ -11354,7 +11811,7 @@ var DataForm = (props) => {
|
|
|
11354
11811
|
});
|
|
11355
11812
|
return cloned;
|
|
11356
11813
|
}
|
|
11357
|
-
const onClick = (0,
|
|
11814
|
+
const onClick = (0, import_react71.useCallback)(async () => {
|
|
11358
11815
|
if (props.onClick) {
|
|
11359
11816
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
11360
11817
|
const normalizedValues = normalizeChildSections(
|
|
@@ -11370,21 +11827,21 @@ var DataForm = (props) => {
|
|
|
11370
11827
|
return { isSuccessful: true };
|
|
11371
11828
|
}
|
|
11372
11829
|
}, [formState, props]);
|
|
11373
|
-
const handleAdditionalOnClick = (0,
|
|
11830
|
+
const handleAdditionalOnClick = (0, import_react71.useCallback)(async () => {
|
|
11374
11831
|
if (props.additionalActions?.onClick) {
|
|
11375
11832
|
return await props.additionalActions.onClick(formState);
|
|
11376
11833
|
} else {
|
|
11377
11834
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
11378
11835
|
}
|
|
11379
11836
|
}, [formState, props]);
|
|
11380
|
-
const onDelete = (0,
|
|
11837
|
+
const onDelete = (0, import_react71.useCallback)(async () => {
|
|
11381
11838
|
if (props.onDelete) {
|
|
11382
11839
|
return await props.onDelete(formState);
|
|
11383
11840
|
} else {
|
|
11384
11841
|
return { isSuccessful: true };
|
|
11385
11842
|
}
|
|
11386
11843
|
}, [formState, props]);
|
|
11387
|
-
(0,
|
|
11844
|
+
(0, import_react71.useEffect)(() => {
|
|
11388
11845
|
if (props.dataItem) {
|
|
11389
11846
|
dispatch({
|
|
11390
11847
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -11412,19 +11869,19 @@ var DataForm = (props) => {
|
|
|
11412
11869
|
return false;
|
|
11413
11870
|
}
|
|
11414
11871
|
}
|
|
11415
|
-
return /* @__PURE__ */ (0,
|
|
11416
|
-
props.title && /* @__PURE__ */ (0,
|
|
11872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react71.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
11873
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
11417
11874
|
"div",
|
|
11418
11875
|
{
|
|
11419
11876
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
11420
11877
|
onClick: () => window.history.back(),
|
|
11421
11878
|
children: [
|
|
11422
|
-
/* @__PURE__ */ (0,
|
|
11423
|
-
/* @__PURE__ */ (0,
|
|
11879
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
11880
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
11424
11881
|
]
|
|
11425
11882
|
}
|
|
11426
11883
|
) }),
|
|
11427
|
-
/* @__PURE__ */ (0,
|
|
11884
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11428
11885
|
"form",
|
|
11429
11886
|
{
|
|
11430
11887
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -11445,8 +11902,8 @@ var DataForm = (props) => {
|
|
|
11445
11902
|
}
|
|
11446
11903
|
}
|
|
11447
11904
|
},
|
|
11448
|
-
children: /* @__PURE__ */ (0,
|
|
11449
|
-
return /* @__PURE__ */ (0,
|
|
11905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
11906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react71.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
11450
11907
|
section.sectionRows?.map(
|
|
11451
11908
|
(sectionRow, sectionRowIndex) => {
|
|
11452
11909
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -11457,14 +11914,14 @@ var DataForm = (props) => {
|
|
|
11457
11914
|
sectionRow.visible
|
|
11458
11915
|
);
|
|
11459
11916
|
}
|
|
11460
|
-
return /* @__PURE__ */ (0,
|
|
11461
|
-
return /* @__PURE__ */ (0,
|
|
11917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react71.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
11918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
11462
11919
|
"div",
|
|
11463
11920
|
{
|
|
11464
11921
|
className: sectionRow.grow ? "grow" : "",
|
|
11465
11922
|
children: [
|
|
11466
|
-
/* @__PURE__ */ (0,
|
|
11467
|
-
/* @__PURE__ */ (0,
|
|
11923
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: field.controlType }),
|
|
11924
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11468
11925
|
InputControl_default,
|
|
11469
11926
|
{
|
|
11470
11927
|
name: field.name,
|
|
@@ -11494,12 +11951,12 @@ var DataForm = (props) => {
|
|
|
11494
11951
|
}) }) }, sectionRowIndex);
|
|
11495
11952
|
}
|
|
11496
11953
|
),
|
|
11497
|
-
/* @__PURE__ */ (0,
|
|
11954
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: section.childSections?.map(
|
|
11498
11955
|
(childSection, childSectionIndex) => {
|
|
11499
|
-
return /* @__PURE__ */ (0,
|
|
11956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
11500
11957
|
formState.inputValues,
|
|
11501
11958
|
childSection.visible
|
|
11502
|
-
) && /* @__PURE__ */ (0,
|
|
11959
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11503
11960
|
DataFormChildSection_default,
|
|
11504
11961
|
{
|
|
11505
11962
|
section: childSection,
|
|
@@ -11514,8 +11971,8 @@ var DataForm = (props) => {
|
|
|
11514
11971
|
}) })
|
|
11515
11972
|
}
|
|
11516
11973
|
),
|
|
11517
|
-
/* @__PURE__ */ (0,
|
|
11518
|
-
/* @__PURE__ */ (0,
|
|
11974
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
11975
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11519
11976
|
Button_default,
|
|
11520
11977
|
{
|
|
11521
11978
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -11523,7 +11980,7 @@ var DataForm = (props) => {
|
|
|
11523
11980
|
children: props.additionalActions.title
|
|
11524
11981
|
}
|
|
11525
11982
|
) }),
|
|
11526
|
-
/* @__PURE__ */ (0,
|
|
11983
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11527
11984
|
Button_default,
|
|
11528
11985
|
{
|
|
11529
11986
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -11534,7 +11991,7 @@ var DataForm = (props) => {
|
|
|
11534
11991
|
children: "Delete"
|
|
11535
11992
|
}
|
|
11536
11993
|
) }),
|
|
11537
|
-
/* @__PURE__ */ (0,
|
|
11994
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11538
11995
|
Button_default,
|
|
11539
11996
|
{
|
|
11540
11997
|
onValidate,
|
|
@@ -11552,7 +12009,7 @@ var DataForm_default = DataForm;
|
|
|
11552
12009
|
|
|
11553
12010
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
11554
12011
|
init_ServiceClient();
|
|
11555
|
-
var
|
|
12012
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
11556
12013
|
function getAction(actions, code) {
|
|
11557
12014
|
return actions?.find((a) => a.actionCode === code);
|
|
11558
12015
|
}
|
|
@@ -11578,9 +12035,9 @@ var DataFormRenderer = ({
|
|
|
11578
12035
|
"Delete"
|
|
11579
12036
|
);
|
|
11580
12037
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
11581
|
-
return /* @__PURE__ */ (0,
|
|
11582
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
11583
|
-
/* @__PURE__ */ (0,
|
|
12038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
12039
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
12040
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11584
12041
|
DataForm_default,
|
|
11585
12042
|
{
|
|
11586
12043
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|
|
@@ -11602,6 +12059,7 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
11602
12059
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11603
12060
|
0 && (module.exports = {
|
|
11604
12061
|
Button,
|
|
12062
|
+
COUNTRY_CODES,
|
|
11605
12063
|
CheckboxInput,
|
|
11606
12064
|
ColorInput,
|
|
11607
12065
|
DataFormRenderer,
|
|
@@ -11628,5 +12086,11 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
11628
12086
|
Toast,
|
|
11629
12087
|
ToastService,
|
|
11630
12088
|
ViewControl,
|
|
11631
|
-
ViewControlTypes
|
|
12089
|
+
ViewControlTypes,
|
|
12090
|
+
findCountryByDialCode,
|
|
12091
|
+
findCountryByIso2,
|
|
12092
|
+
getCountryFlag,
|
|
12093
|
+
getDialCodeByCountryCode,
|
|
12094
|
+
resolveCountry,
|
|
12095
|
+
splitPhoneNumber
|
|
11632
12096
|
});
|