mozrest-sdk-react-dev 0.1.64 → 0.1.66

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.
Files changed (2) hide show
  1. package/mozrest-sdk.es.js +337 -296
  2. package/package.json +1 -1
package/mozrest-sdk.es.js CHANGED
@@ -6308,6 +6308,9 @@ const NOTES = "Notes";
6308
6308
  const CANCELRESERVATION = "Cancel reservation";
6309
6309
  const AREYOUSURECANCELRESERVATION = "Are you sure you want to cancel this reservation?";
6310
6310
  const CANCELREASON = "Cancel reason";
6311
+ const ATMOSPHERE = "Atmosphere";
6312
+ const KITCHEN = "Kitchen";
6313
+ const SERVICE = "Service";
6311
6314
  var en = {
6312
6315
  errors,
6313
6316
  SPECIALCLOSINGDATES,
@@ -6577,7 +6580,10 @@ var en = {
6577
6580
  NOTES,
6578
6581
  CANCELRESERVATION,
6579
6582
  AREYOUSURECANCELRESERVATION,
6580
- CANCELREASON
6583
+ CANCELREASON,
6584
+ ATMOSPHERE,
6585
+ KITCHEN,
6586
+ SERVICE
6581
6587
  };
6582
6588
  instance.use(initReactI18next).init({
6583
6589
  resources: {
@@ -43567,10 +43573,12 @@ const DetailMobile = ({
43567
43573
  createdAt,
43568
43574
  locationName,
43569
43575
  locale: locale2,
43576
+ meta,
43570
43577
  onReload,
43571
43578
  openForm,
43572
43579
  onClick
43573
43580
  }) => {
43581
+ const { t: t2 } = useTranslation();
43574
43582
  const [showTemplates, setShowTemplates] = useState(false);
43575
43583
  const [showTranslation, setShowTranslation] = useState(false);
43576
43584
  const openModal = () => setShowTemplates(true);
@@ -43600,7 +43608,15 @@ const DetailMobile = ({
43600
43608
  locale: locale2
43601
43609
  })), /* @__PURE__ */ React__default.createElement(StartScore, {
43602
43610
  score: rating
43603
- }), /* @__PURE__ */ React__default.createElement("br", null), comment2 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Comment, {
43611
+ }), /* @__PURE__ */ React__default.createElement("br", null), meta && /* @__PURE__ */ React__default.createElement("div", {
43612
+ style: { display: "flex", gap: 10, marginBottom: 20 }
43613
+ }, meta.atmosphere && /* @__PURE__ */ React__default.createElement("p", {
43614
+ style: { fontWeight: "bold" }
43615
+ }, t2("ATMOSPHERE"), ": ", meta.atmosphere), meta.cooking && /* @__PURE__ */ React__default.createElement("p", {
43616
+ style: { fontWeight: "bold" }
43617
+ }, t2("KITCHEN"), ": ", meta.cooking), meta.standing && /* @__PURE__ */ React__default.createElement("p", {
43618
+ style: { fontWeight: "bold" }
43619
+ }, t2("SERVICE"), ": ", meta.standing)), comment2 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Comment, {
43604
43620
  showTranslation,
43605
43621
  setShowTranslation,
43606
43622
  locale: locale2
@@ -43638,16 +43654,26 @@ const DetailDesktop = ({
43638
43654
  reviewer: reviewer2,
43639
43655
  comment: comment2,
43640
43656
  locale: locale2,
43657
+ meta,
43641
43658
  locationName,
43642
43659
  onReload,
43643
43660
  openForm
43644
43661
  }) => {
43662
+ const { t: t2 } = useTranslation();
43645
43663
  const [showTranslation, setShowTranslation] = useState(false);
43646
43664
  return /* @__PURE__ */ React__default.createElement("div", {
43647
43665
  className: classNames$2(styles$1u.detail, {
43648
43666
  [styles$1u.hide]: !openForm
43649
43667
  })
43650
- }, comment2 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Comment, {
43668
+ }, meta && /* @__PURE__ */ React__default.createElement("div", {
43669
+ style: { display: "flex", gap: 10, marginBottom: 20 }
43670
+ }, meta.atmosphere && /* @__PURE__ */ React__default.createElement("p", {
43671
+ style: { fontWeight: "bold" }
43672
+ }, t2("ATMOSPHERE"), ": ", meta.atmosphere), meta.cooking && /* @__PURE__ */ React__default.createElement("p", {
43673
+ style: { fontWeight: "bold" }
43674
+ }, t2("KITCHEN"), ": ", meta.cooking), meta.standing && /* @__PURE__ */ React__default.createElement("p", {
43675
+ style: { fontWeight: "bold" }
43676
+ }, t2("SERVICE"), ": ", meta.standing)), comment2 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Comment, {
43651
43677
  showTranslation,
43652
43678
  setShowTranslation,
43653
43679
  locale: locale2
@@ -43701,6 +43727,8 @@ const Review = ({
43701
43727
  createdAt,
43702
43728
  locationName,
43703
43729
  locale: locale2,
43730
+ module: module2,
43731
+ meta,
43704
43732
  onReload,
43705
43733
  openForm,
43706
43734
  onClick,
@@ -43725,7 +43753,7 @@ const Review = ({
43725
43753
  icon: reply2 ? "mailReplied" : "mailNotReplied"
43726
43754
  })), /* @__PURE__ */ React__default.createElement("img", {
43727
43755
  alt: platform2,
43728
- src: platformImages[platform2],
43756
+ src: module2.logo || platformImages[platform2],
43729
43757
  className: styles$1t.image
43730
43758
  }), /* @__PURE__ */ React__default.createElement(Row$1, null, /* @__PURE__ */ React__default.createElement(Col$1, {
43731
43759
  xs: 0,
@@ -43755,6 +43783,7 @@ const Review = ({
43755
43783
  createdAt,
43756
43784
  locationName,
43757
43785
  locale: locale2,
43786
+ meta,
43758
43787
  onReload,
43759
43788
  openForm,
43760
43789
  onClick
@@ -43768,6 +43797,7 @@ const Review = ({
43768
43797
  createdAt,
43769
43798
  locationName,
43770
43799
  locale: locale2,
43800
+ meta,
43771
43801
  onReload,
43772
43802
  openForm,
43773
43803
  onClick
@@ -49609,8 +49639,285 @@ const DatePicker = ({
49609
49639
  allowClear: false
49610
49640
  }));
49611
49641
  };
49612
- const Header$2 = ({ onChangeFilter, filters: filters2, multiVenue }) => {
49642
+ var countries$1 = [
49643
+ { id: "AF", label: "Afghanistan" },
49644
+ { id: "AX", label: "\xC5land Islands" },
49645
+ { id: "AL", label: "Albania" },
49646
+ { id: "DZ", label: "Algeria" },
49647
+ { id: "AS", label: "American Samoa" },
49648
+ { id: "AD", label: "Andorra" },
49649
+ { id: "AO", label: "Angola" },
49650
+ { id: "AI", label: "Anguilla" },
49651
+ { id: "AQ", label: "Antarctica" },
49652
+ { id: "AG", label: "Antigua and Barbuda" },
49653
+ { id: "AR", label: "Argentina" },
49654
+ { id: "AM", label: "Armenia" },
49655
+ { id: "AW", label: "Aruba" },
49656
+ { id: "AU", label: "Australia" },
49657
+ { id: "AT", label: "Austria" },
49658
+ { id: "AZ", label: "Azerbaijan" },
49659
+ { id: "BS", label: "Bahamas" },
49660
+ { id: "BH", label: "Bahrain" },
49661
+ { id: "BD", label: "Bangladesh" },
49662
+ { id: "BB", label: "Barbados" },
49663
+ { id: "BY", label: "Belarus" },
49664
+ { id: "BE", label: "Belgium" },
49665
+ { id: "BZ", label: "Belize" },
49666
+ { id: "BJ", label: "Benin" },
49667
+ { id: "BM", label: "Bermuda" },
49668
+ { id: "BT", label: "Bhutan" },
49669
+ { id: "BO", label: "Bolivia, Plurinational State of" },
49670
+ { id: "BQ", label: "Bonaire, Sint Eustatius and Saba" },
49671
+ { id: "BA", label: "Bosnia and Herzegovina" },
49672
+ { id: "BW", label: "Botswana" },
49673
+ { id: "BV", label: "Bouvet Island" },
49674
+ { id: "BR", label: "Brazil" },
49675
+ { id: "IO", label: "British Indian Ocean Territory" },
49676
+ { id: "BN", label: "Brunei Darussalam" },
49677
+ { id: "BG", label: "Bulgaria" },
49678
+ { id: "BF", label: "Burkina Faso" },
49679
+ { id: "BI", label: "Burundi" },
49680
+ { id: "KH", label: "Cambodia" },
49681
+ { id: "CM", label: "Cameroon" },
49682
+ { id: "CA", label: "Canada" },
49683
+ { id: "CV", label: "Cape Verde" },
49684
+ { id: "KY", label: "Cayman Islands" },
49685
+ { id: "CF", label: "Central African Republic" },
49686
+ { id: "TD", label: "Chad" },
49687
+ { id: "CL", label: "Chile" },
49688
+ { id: "CN", label: "China" },
49689
+ { id: "CX", label: "Christmas Island" },
49690
+ { id: "CC", label: "Cocos (Keeling) Islands" },
49691
+ { id: "CO", label: "Colombia" },
49692
+ { id: "KM", label: "Comoros" },
49693
+ { id: "CG", label: "Congo" },
49694
+ { id: "CD", label: "Congo, the Democratic Republic of the" },
49695
+ { id: "CK", label: "Cook Islands" },
49696
+ { id: "CR", label: "Costa Rica" },
49697
+ { id: "CI", label: "C\xF4te d'Ivoire" },
49698
+ { id: "HR", label: "Croatia" },
49699
+ { id: "CU", label: "Cuba" },
49700
+ { id: "CW", label: "Cura\xE7ao" },
49701
+ { id: "CY", label: "Cyprus" },
49702
+ { id: "CZ", label: "Czech Republic" },
49703
+ { id: "DK", label: "Denmark" },
49704
+ { id: "DJ", label: "Djibouti" },
49705
+ { id: "DM", label: "Dominica" },
49706
+ { id: "DO", label: "Dominican Republic" },
49707
+ { id: "EC", label: "Ecuador" },
49708
+ { id: "EG", label: "Egypt" },
49709
+ { id: "SV", label: "El Salvador" },
49710
+ { id: "GQ", label: "Equatorial Guinea" },
49711
+ { id: "ER", label: "Eritrea" },
49712
+ { id: "EE", label: "Estonia" },
49713
+ { id: "ET", label: "Ethiopia" },
49714
+ { id: "FK", label: "Falkland Islands (Malvinas)" },
49715
+ { id: "FO", label: "Faroe Islands" },
49716
+ { id: "FJ", label: "Fiji" },
49717
+ { id: "FI", label: "Finland" },
49718
+ { id: "FR", label: "France" },
49719
+ { id: "GF", label: "French Guiana" },
49720
+ { id: "PF", label: "French Polynesia" },
49721
+ { id: "TF", label: "French Southern Territories" },
49722
+ { id: "GA", label: "Gabon" },
49723
+ { id: "GM", label: "Gambia" },
49724
+ { id: "GE", label: "Georgia" },
49725
+ { id: "DE", label: "Germany" },
49726
+ { id: "GH", label: "Ghana" },
49727
+ { id: "GI", label: "Gibraltar" },
49728
+ { id: "GR", label: "Greece" },
49729
+ { id: "GL", label: "Greenland" },
49730
+ { id: "GD", label: "Grenada" },
49731
+ { id: "GP", label: "Guadeloupe" },
49732
+ { id: "GU", label: "Guam" },
49733
+ { id: "GT", label: "Guatemala" },
49734
+ { id: "GG", label: "Guernsey" },
49735
+ { id: "GN", label: "Guinea" },
49736
+ { id: "GW", label: "Guinea-Bissau" },
49737
+ { id: "GY", label: "Guyana" },
49738
+ { id: "HT", label: "Haiti" },
49739
+ { id: "HM", label: "Heard Island and McDonald Islands" },
49740
+ { id: "VA", label: "Holy See (Vatican City State)" },
49741
+ { id: "HN", label: "Honduras" },
49742
+ { id: "HK", label: "Hong Kong" },
49743
+ { id: "HU", label: "Hungary" },
49744
+ { id: "IS", label: "Iceland" },
49745
+ { id: "IN", label: "India" },
49746
+ { id: "ID", label: "Indonesia" },
49747
+ { id: "IR", label: "Iran, Islamic Republic of" },
49748
+ { id: "IQ", label: "Iraq" },
49749
+ { id: "IE", label: "Ireland" },
49750
+ { id: "IM", label: "Isle of Man" },
49751
+ { id: "IL", label: "Israel" },
49752
+ { id: "IT", label: "Italy" },
49753
+ { id: "JM", label: "Jamaica" },
49754
+ { id: "JP", label: "Japan" },
49755
+ { id: "JE", label: "Jersey" },
49756
+ { id: "JO", label: "Jordan" },
49757
+ { id: "KZ", label: "Kazakhstan" },
49758
+ { id: "KE", label: "Kenya" },
49759
+ { id: "KI", label: "Kiribati" },
49760
+ { id: "KP", label: "Korea, Democratic People's Republic of" },
49761
+ { id: "KR", label: "Korea, Republic of" },
49762
+ { id: "KW", label: "Kuwait" },
49763
+ { id: "KG", label: "Kyrgyzstan" },
49764
+ { id: "LA", label: "Lao People's Democratic Republic" },
49765
+ { id: "LV", label: "Latvia" },
49766
+ { id: "LB", label: "Lebanon" },
49767
+ { id: "LS", label: "Lesotho" },
49768
+ { id: "LR", label: "Liberia" },
49769
+ { id: "LY", label: "Libya" },
49770
+ { id: "LI", label: "Liechtenstein" },
49771
+ { id: "LT", label: "Lithuania" },
49772
+ { id: "LU", label: "Luxembourg" },
49773
+ { id: "MO", label: "Macao" },
49774
+ { id: "MK", label: "Macedonia, the Former Yugoslav Republic of" },
49775
+ { id: "MG", label: "Madagascar" },
49776
+ { id: "MW", label: "Malawi" },
49777
+ { id: "MY", label: "Malaysia" },
49778
+ { id: "MV", label: "Maldives" },
49779
+ { id: "ML", label: "Mali" },
49780
+ { id: "MT", label: "Malta" },
49781
+ { id: "MH", label: "Marshall Islands" },
49782
+ { id: "MQ", label: "Martinique" },
49783
+ { id: "MR", label: "Mauritania" },
49784
+ { id: "MU", label: "Mauritius" },
49785
+ { id: "YT", label: "Mayotte" },
49786
+ { id: "MX", label: "Mexico" },
49787
+ { id: "FM", label: "Micronesia, Federated States of" },
49788
+ { id: "MD", label: "Moldova, Republic of" },
49789
+ { id: "MC", label: "Monaco" },
49790
+ { id: "MN", label: "Mongolia" },
49791
+ { id: "ME", label: "Montenegro" },
49792
+ { id: "MS", label: "Montserrat" },
49793
+ { id: "MA", label: "Morocco" },
49794
+ { id: "MZ", label: "Mozambique" },
49795
+ { id: "MM", label: "Myanmar" },
49796
+ { id: "NA", label: "Namibia" },
49797
+ { id: "NR", label: "Nauru" },
49798
+ { id: "NP", label: "Nepal" },
49799
+ { id: "NL", label: "Netherlands" },
49800
+ { id: "NC", label: "New Caledonia" },
49801
+ { id: "NZ", label: "New Zealand" },
49802
+ { id: "NI", label: "Nicaragua" },
49803
+ { id: "NE", label: "Niger" },
49804
+ { id: "NG", label: "Nigeria" },
49805
+ { id: "NU", label: "Niue" },
49806
+ { id: "NF", label: "Norfolk Island" },
49807
+ { id: "MP", label: "Northern Mariana Islands" },
49808
+ { id: "NO", label: "Norway" },
49809
+ { id: "OM", label: "Oman" },
49810
+ { id: "PK", label: "Pakistan" },
49811
+ { id: "PW", label: "Palau" },
49812
+ { id: "PS", label: "Palestine, State of" },
49813
+ { id: "PA", label: "Panama" },
49814
+ { id: "PG", label: "Papua New Guinea" },
49815
+ { id: "PY", label: "Paraguay" },
49816
+ { id: "PE", label: "Peru" },
49817
+ { id: "PH", label: "Philippines" },
49818
+ { id: "PN", label: "Pitcairn" },
49819
+ { id: "PL", label: "Poland" },
49820
+ { id: "PT", label: "Portugal" },
49821
+ { id: "PR", label: "Puerto Rico" },
49822
+ { id: "QA", label: "Qatar" },
49823
+ { id: "RE", label: "R\xE9union" },
49824
+ { id: "RO", label: "Romania" },
49825
+ { id: "RU", label: "Russian Federation" },
49826
+ { id: "RW", label: "Rwanda" },
49827
+ { id: "BL", label: "Saint Barth\xE9lemy" },
49828
+ { id: "SH", label: "Saint Helena, Ascension and Tristan da Cunha" },
49829
+ { id: "KN", label: "Saint Kitts and Nevis" },
49830
+ { id: "LC", label: "Saint Lucia" },
49831
+ { id: "MF", label: "Saint Martin (French part)" },
49832
+ { id: "PM", label: "Saint Pierre and Miquelon" },
49833
+ { id: "VC", label: "Saint Vincent and the Grenadines" },
49834
+ { id: "WS", label: "Samoa" },
49835
+ { id: "SM", label: "San Marino" },
49836
+ { id: "ST", label: "Sao Tome and Principe" },
49837
+ { id: "SA", label: "Saudi Arabia" },
49838
+ { id: "SN", label: "Senegal" },
49839
+ { id: "RS", label: "Serbia" },
49840
+ { id: "SC", label: "Seychelles" },
49841
+ { id: "SL", label: "Sierra Leone" },
49842
+ { id: "SG", label: "Singapore" },
49843
+ { id: "SX", label: "Sint Maarten (Dutch part)" },
49844
+ { id: "SK", label: "Slovakia" },
49845
+ { id: "SI", label: "Slovenia" },
49846
+ { id: "SB", label: "Solomon Islands" },
49847
+ { id: "SO", label: "Somalia" },
49848
+ { id: "ZA", label: "South Africa" },
49849
+ { id: "GS", label: "South Georgia and the South Sandwich Islands" },
49850
+ { id: "SS", label: "South Sudan" },
49851
+ { id: "ES", label: "Spain" },
49852
+ { id: "LK", label: "Sri Lanka" },
49853
+ { id: "SD", label: "Sudan" },
49854
+ { id: "SR", label: "Surilabel" },
49855
+ { id: "SJ", label: "Svalbard and Jan Mayen" },
49856
+ { id: "SZ", label: "Swaziland" },
49857
+ { id: "SE", label: "Sweden" },
49858
+ { id: "CH", label: "Switzerland" },
49859
+ { id: "SY", label: "Syrian Arab Republic" },
49860
+ { id: "TW", label: "Taiwan, Province of China" },
49861
+ { id: "TJ", label: "Tajikistan" },
49862
+ { id: "TZ", label: "Tanzania, United Republic of" },
49863
+ { id: "TH", label: "Thailand" },
49864
+ { id: "TL", label: "Timor-Leste" },
49865
+ { id: "TG", label: "Togo" },
49866
+ { id: "TK", label: "Tokelau" },
49867
+ { id: "TO", label: "Tonga" },
49868
+ { id: "TT", label: "Trinidad and Tobago" },
49869
+ { id: "TN", label: "Tunisia" },
49870
+ { id: "TR", label: "Turkey" },
49871
+ { id: "TM", label: "Turkmenistan" },
49872
+ { id: "TC", label: "Turks and Caicos Islands" },
49873
+ { id: "TV", label: "Tuvalu" },
49874
+ { id: "UG", label: "Uganda" },
49875
+ { id: "UA", label: "Ukraine" },
49876
+ { id: "AE", label: "United Arab Emirates" },
49877
+ { id: "GB", label: "United Kingdom" },
49878
+ { id: "US", label: "United States" },
49879
+ { id: "UM", label: "United States Minor Outlying Islands" },
49880
+ { id: "UY", label: "Uruguay" },
49881
+ { id: "UZ", label: "Uzbekistan" },
49882
+ { id: "VU", label: "Vanuatu" },
49883
+ { id: "VE", label: "Venezuela, Bolivarian Republic of" },
49884
+ { id: "VN", label: "Viet Nam" },
49885
+ { id: "VG", label: "Virgin Islands, British" },
49886
+ { id: "VI", label: "Virgin Islands, U.S." },
49887
+ { id: "WF", label: "Wallis and Futuna" },
49888
+ { id: "EH", label: "Western Sahara" },
49889
+ { id: "YE", label: "Yemen" },
49890
+ { id: "ZM", label: "Zambia" },
49891
+ { id: "ZW", label: "Zimbabwe" }
49892
+ ];
49893
+ const GetVenueListingModule = async ({
49894
+ venueId,
49895
+ accessToken
49896
+ }) => {
49897
+ const data2 = await instance$1.get(`listing/venue/${venueId}/module`, {
49898
+ headers: {
49899
+ Authorization: `Bearer ${accessToken}`
49900
+ }
49901
+ });
49902
+ return formatData$g(data2);
49903
+ };
49904
+ const formatData$g = (values = {}) => {
49905
+ const { country, ...rest } = values;
49906
+ const _country = countries$1 == null ? void 0 : countries$1.find(({ id: id2 }) => id2 === country);
49907
+ return {
49908
+ ...rest,
49909
+ country: {
49910
+ id: _country == null ? void 0 : _country.id,
49911
+ name: _country == null ? void 0 : _country.label
49912
+ }
49913
+ };
49914
+ };
49915
+ const Header$2 = ({ onChangeFilter, filters: filters2, multiVenue, venueId }) => {
49613
49916
  const { t: t2 } = useTranslation();
49917
+ const { data: data2, isLoading, reload } = useFetch(GetVenueListingModule, {
49918
+ cacheId: `module-${venueId}`,
49919
+ venueId
49920
+ });
49614
49921
  const handleChangeFilter = (id2) => (value2) => {
49615
49922
  onChangeFilter({
49616
49923
  ...filters2,
@@ -49648,8 +49955,14 @@ const Header$2 = ({ onChangeFilter, filters: filters2, multiVenue }) => {
49648
49955
  lg: 4
49649
49956
  }, /* @__PURE__ */ React__default.createElement(NewSelect, {
49650
49957
  label: t2("PLATFORM"),
49651
- options: platforms,
49652
- defaultValue: platforms[0],
49958
+ options: data2 && data2.data && data2.data.length ? [...[{ id: "", label: t2("ALL") }], ...data2.data.map((platform2) => {
49959
+ var _a2, _b, _c, _d;
49960
+ return { id: (_b = (_a2 = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _a2.id) != null ? _b : "", label: (_d = (_c = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _c.name) != null ? _d : "" };
49961
+ })] : platforms,
49962
+ defaultValue: data2 && data2.data && data2.data.length ? [...[{ id: "", label: t2("ALL") }], ...data2.data.map((platform2) => {
49963
+ var _a2, _b, _c, _d;
49964
+ return { id: (_b = (_a2 = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _a2.id) != null ? _b : "", label: (_d = (_c = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _c.name) != null ? _d : "" };
49965
+ })][0] : platforms[0],
49653
49966
  onChange: handleChangeFilter("platform"),
49654
49967
  getOptionValue: (item2) => item2.id
49655
49968
  })), /* @__PURE__ */ React__default.createElement(Col$1, {
@@ -49735,7 +50048,8 @@ const ReviewsPage = ({
49735
50048
  header: /* @__PURE__ */ React__default.createElement(Header$2, {
49736
50049
  onChangeFilter: setFilters,
49737
50050
  filters: filter,
49738
- multiVenue
50051
+ multiVenue,
50052
+ venueId
49739
50053
  })
49740
50054
  }, /* @__PURE__ */ React__default.createElement(ContextTemplate.Provider, {
49741
50055
  value: [context, setContext]
@@ -50595,257 +50909,6 @@ const TablePagination = ({
50595
50909
  onClick: changePage("end")
50596
50910
  })));
50597
50911
  };
50598
- var countries$1 = [
50599
- { id: "AF", label: "Afghanistan" },
50600
- { id: "AX", label: "\xC5land Islands" },
50601
- { id: "AL", label: "Albania" },
50602
- { id: "DZ", label: "Algeria" },
50603
- { id: "AS", label: "American Samoa" },
50604
- { id: "AD", label: "Andorra" },
50605
- { id: "AO", label: "Angola" },
50606
- { id: "AI", label: "Anguilla" },
50607
- { id: "AQ", label: "Antarctica" },
50608
- { id: "AG", label: "Antigua and Barbuda" },
50609
- { id: "AR", label: "Argentina" },
50610
- { id: "AM", label: "Armenia" },
50611
- { id: "AW", label: "Aruba" },
50612
- { id: "AU", label: "Australia" },
50613
- { id: "AT", label: "Austria" },
50614
- { id: "AZ", label: "Azerbaijan" },
50615
- { id: "BS", label: "Bahamas" },
50616
- { id: "BH", label: "Bahrain" },
50617
- { id: "BD", label: "Bangladesh" },
50618
- { id: "BB", label: "Barbados" },
50619
- { id: "BY", label: "Belarus" },
50620
- { id: "BE", label: "Belgium" },
50621
- { id: "BZ", label: "Belize" },
50622
- { id: "BJ", label: "Benin" },
50623
- { id: "BM", label: "Bermuda" },
50624
- { id: "BT", label: "Bhutan" },
50625
- { id: "BO", label: "Bolivia, Plurinational State of" },
50626
- { id: "BQ", label: "Bonaire, Sint Eustatius and Saba" },
50627
- { id: "BA", label: "Bosnia and Herzegovina" },
50628
- { id: "BW", label: "Botswana" },
50629
- { id: "BV", label: "Bouvet Island" },
50630
- { id: "BR", label: "Brazil" },
50631
- { id: "IO", label: "British Indian Ocean Territory" },
50632
- { id: "BN", label: "Brunei Darussalam" },
50633
- { id: "BG", label: "Bulgaria" },
50634
- { id: "BF", label: "Burkina Faso" },
50635
- { id: "BI", label: "Burundi" },
50636
- { id: "KH", label: "Cambodia" },
50637
- { id: "CM", label: "Cameroon" },
50638
- { id: "CA", label: "Canada" },
50639
- { id: "CV", label: "Cape Verde" },
50640
- { id: "KY", label: "Cayman Islands" },
50641
- { id: "CF", label: "Central African Republic" },
50642
- { id: "TD", label: "Chad" },
50643
- { id: "CL", label: "Chile" },
50644
- { id: "CN", label: "China" },
50645
- { id: "CX", label: "Christmas Island" },
50646
- { id: "CC", label: "Cocos (Keeling) Islands" },
50647
- { id: "CO", label: "Colombia" },
50648
- { id: "KM", label: "Comoros" },
50649
- { id: "CG", label: "Congo" },
50650
- { id: "CD", label: "Congo, the Democratic Republic of the" },
50651
- { id: "CK", label: "Cook Islands" },
50652
- { id: "CR", label: "Costa Rica" },
50653
- { id: "CI", label: "C\xF4te d'Ivoire" },
50654
- { id: "HR", label: "Croatia" },
50655
- { id: "CU", label: "Cuba" },
50656
- { id: "CW", label: "Cura\xE7ao" },
50657
- { id: "CY", label: "Cyprus" },
50658
- { id: "CZ", label: "Czech Republic" },
50659
- { id: "DK", label: "Denmark" },
50660
- { id: "DJ", label: "Djibouti" },
50661
- { id: "DM", label: "Dominica" },
50662
- { id: "DO", label: "Dominican Republic" },
50663
- { id: "EC", label: "Ecuador" },
50664
- { id: "EG", label: "Egypt" },
50665
- { id: "SV", label: "El Salvador" },
50666
- { id: "GQ", label: "Equatorial Guinea" },
50667
- { id: "ER", label: "Eritrea" },
50668
- { id: "EE", label: "Estonia" },
50669
- { id: "ET", label: "Ethiopia" },
50670
- { id: "FK", label: "Falkland Islands (Malvinas)" },
50671
- { id: "FO", label: "Faroe Islands" },
50672
- { id: "FJ", label: "Fiji" },
50673
- { id: "FI", label: "Finland" },
50674
- { id: "FR", label: "France" },
50675
- { id: "GF", label: "French Guiana" },
50676
- { id: "PF", label: "French Polynesia" },
50677
- { id: "TF", label: "French Southern Territories" },
50678
- { id: "GA", label: "Gabon" },
50679
- { id: "GM", label: "Gambia" },
50680
- { id: "GE", label: "Georgia" },
50681
- { id: "DE", label: "Germany" },
50682
- { id: "GH", label: "Ghana" },
50683
- { id: "GI", label: "Gibraltar" },
50684
- { id: "GR", label: "Greece" },
50685
- { id: "GL", label: "Greenland" },
50686
- { id: "GD", label: "Grenada" },
50687
- { id: "GP", label: "Guadeloupe" },
50688
- { id: "GU", label: "Guam" },
50689
- { id: "GT", label: "Guatemala" },
50690
- { id: "GG", label: "Guernsey" },
50691
- { id: "GN", label: "Guinea" },
50692
- { id: "GW", label: "Guinea-Bissau" },
50693
- { id: "GY", label: "Guyana" },
50694
- { id: "HT", label: "Haiti" },
50695
- { id: "HM", label: "Heard Island and McDonald Islands" },
50696
- { id: "VA", label: "Holy See (Vatican City State)" },
50697
- { id: "HN", label: "Honduras" },
50698
- { id: "HK", label: "Hong Kong" },
50699
- { id: "HU", label: "Hungary" },
50700
- { id: "IS", label: "Iceland" },
50701
- { id: "IN", label: "India" },
50702
- { id: "ID", label: "Indonesia" },
50703
- { id: "IR", label: "Iran, Islamic Republic of" },
50704
- { id: "IQ", label: "Iraq" },
50705
- { id: "IE", label: "Ireland" },
50706
- { id: "IM", label: "Isle of Man" },
50707
- { id: "IL", label: "Israel" },
50708
- { id: "IT", label: "Italy" },
50709
- { id: "JM", label: "Jamaica" },
50710
- { id: "JP", label: "Japan" },
50711
- { id: "JE", label: "Jersey" },
50712
- { id: "JO", label: "Jordan" },
50713
- { id: "KZ", label: "Kazakhstan" },
50714
- { id: "KE", label: "Kenya" },
50715
- { id: "KI", label: "Kiribati" },
50716
- { id: "KP", label: "Korea, Democratic People's Republic of" },
50717
- { id: "KR", label: "Korea, Republic of" },
50718
- { id: "KW", label: "Kuwait" },
50719
- { id: "KG", label: "Kyrgyzstan" },
50720
- { id: "LA", label: "Lao People's Democratic Republic" },
50721
- { id: "LV", label: "Latvia" },
50722
- { id: "LB", label: "Lebanon" },
50723
- { id: "LS", label: "Lesotho" },
50724
- { id: "LR", label: "Liberia" },
50725
- { id: "LY", label: "Libya" },
50726
- { id: "LI", label: "Liechtenstein" },
50727
- { id: "LT", label: "Lithuania" },
50728
- { id: "LU", label: "Luxembourg" },
50729
- { id: "MO", label: "Macao" },
50730
- { id: "MK", label: "Macedonia, the Former Yugoslav Republic of" },
50731
- { id: "MG", label: "Madagascar" },
50732
- { id: "MW", label: "Malawi" },
50733
- { id: "MY", label: "Malaysia" },
50734
- { id: "MV", label: "Maldives" },
50735
- { id: "ML", label: "Mali" },
50736
- { id: "MT", label: "Malta" },
50737
- { id: "MH", label: "Marshall Islands" },
50738
- { id: "MQ", label: "Martinique" },
50739
- { id: "MR", label: "Mauritania" },
50740
- { id: "MU", label: "Mauritius" },
50741
- { id: "YT", label: "Mayotte" },
50742
- { id: "MX", label: "Mexico" },
50743
- { id: "FM", label: "Micronesia, Federated States of" },
50744
- { id: "MD", label: "Moldova, Republic of" },
50745
- { id: "MC", label: "Monaco" },
50746
- { id: "MN", label: "Mongolia" },
50747
- { id: "ME", label: "Montenegro" },
50748
- { id: "MS", label: "Montserrat" },
50749
- { id: "MA", label: "Morocco" },
50750
- { id: "MZ", label: "Mozambique" },
50751
- { id: "MM", label: "Myanmar" },
50752
- { id: "NA", label: "Namibia" },
50753
- { id: "NR", label: "Nauru" },
50754
- { id: "NP", label: "Nepal" },
50755
- { id: "NL", label: "Netherlands" },
50756
- { id: "NC", label: "New Caledonia" },
50757
- { id: "NZ", label: "New Zealand" },
50758
- { id: "NI", label: "Nicaragua" },
50759
- { id: "NE", label: "Niger" },
50760
- { id: "NG", label: "Nigeria" },
50761
- { id: "NU", label: "Niue" },
50762
- { id: "NF", label: "Norfolk Island" },
50763
- { id: "MP", label: "Northern Mariana Islands" },
50764
- { id: "NO", label: "Norway" },
50765
- { id: "OM", label: "Oman" },
50766
- { id: "PK", label: "Pakistan" },
50767
- { id: "PW", label: "Palau" },
50768
- { id: "PS", label: "Palestine, State of" },
50769
- { id: "PA", label: "Panama" },
50770
- { id: "PG", label: "Papua New Guinea" },
50771
- { id: "PY", label: "Paraguay" },
50772
- { id: "PE", label: "Peru" },
50773
- { id: "PH", label: "Philippines" },
50774
- { id: "PN", label: "Pitcairn" },
50775
- { id: "PL", label: "Poland" },
50776
- { id: "PT", label: "Portugal" },
50777
- { id: "PR", label: "Puerto Rico" },
50778
- { id: "QA", label: "Qatar" },
50779
- { id: "RE", label: "R\xE9union" },
50780
- { id: "RO", label: "Romania" },
50781
- { id: "RU", label: "Russian Federation" },
50782
- { id: "RW", label: "Rwanda" },
50783
- { id: "BL", label: "Saint Barth\xE9lemy" },
50784
- { id: "SH", label: "Saint Helena, Ascension and Tristan da Cunha" },
50785
- { id: "KN", label: "Saint Kitts and Nevis" },
50786
- { id: "LC", label: "Saint Lucia" },
50787
- { id: "MF", label: "Saint Martin (French part)" },
50788
- { id: "PM", label: "Saint Pierre and Miquelon" },
50789
- { id: "VC", label: "Saint Vincent and the Grenadines" },
50790
- { id: "WS", label: "Samoa" },
50791
- { id: "SM", label: "San Marino" },
50792
- { id: "ST", label: "Sao Tome and Principe" },
50793
- { id: "SA", label: "Saudi Arabia" },
50794
- { id: "SN", label: "Senegal" },
50795
- { id: "RS", label: "Serbia" },
50796
- { id: "SC", label: "Seychelles" },
50797
- { id: "SL", label: "Sierra Leone" },
50798
- { id: "SG", label: "Singapore" },
50799
- { id: "SX", label: "Sint Maarten (Dutch part)" },
50800
- { id: "SK", label: "Slovakia" },
50801
- { id: "SI", label: "Slovenia" },
50802
- { id: "SB", label: "Solomon Islands" },
50803
- { id: "SO", label: "Somalia" },
50804
- { id: "ZA", label: "South Africa" },
50805
- { id: "GS", label: "South Georgia and the South Sandwich Islands" },
50806
- { id: "SS", label: "South Sudan" },
50807
- { id: "ES", label: "Spain" },
50808
- { id: "LK", label: "Sri Lanka" },
50809
- { id: "SD", label: "Sudan" },
50810
- { id: "SR", label: "Surilabel" },
50811
- { id: "SJ", label: "Svalbard and Jan Mayen" },
50812
- { id: "SZ", label: "Swaziland" },
50813
- { id: "SE", label: "Sweden" },
50814
- { id: "CH", label: "Switzerland" },
50815
- { id: "SY", label: "Syrian Arab Republic" },
50816
- { id: "TW", label: "Taiwan, Province of China" },
50817
- { id: "TJ", label: "Tajikistan" },
50818
- { id: "TZ", label: "Tanzania, United Republic of" },
50819
- { id: "TH", label: "Thailand" },
50820
- { id: "TL", label: "Timor-Leste" },
50821
- { id: "TG", label: "Togo" },
50822
- { id: "TK", label: "Tokelau" },
50823
- { id: "TO", label: "Tonga" },
50824
- { id: "TT", label: "Trinidad and Tobago" },
50825
- { id: "TN", label: "Tunisia" },
50826
- { id: "TR", label: "Turkey" },
50827
- { id: "TM", label: "Turkmenistan" },
50828
- { id: "TC", label: "Turks and Caicos Islands" },
50829
- { id: "TV", label: "Tuvalu" },
50830
- { id: "UG", label: "Uganda" },
50831
- { id: "UA", label: "Ukraine" },
50832
- { id: "AE", label: "United Arab Emirates" },
50833
- { id: "GB", label: "United Kingdom" },
50834
- { id: "US", label: "United States" },
50835
- { id: "UM", label: "United States Minor Outlying Islands" },
50836
- { id: "UY", label: "Uruguay" },
50837
- { id: "UZ", label: "Uzbekistan" },
50838
- { id: "VU", label: "Vanuatu" },
50839
- { id: "VE", label: "Venezuela, Bolivarian Republic of" },
50840
- { id: "VN", label: "Viet Nam" },
50841
- { id: "VG", label: "Virgin Islands, British" },
50842
- { id: "VI", label: "Virgin Islands, U.S." },
50843
- { id: "WF", label: "Wallis and Futuna" },
50844
- { id: "EH", label: "Western Sahara" },
50845
- { id: "YE", label: "Yemen" },
50846
- { id: "ZM", label: "Zambia" },
50847
- { id: "ZW", label: "Zimbabwe" }
50848
- ];
50849
50912
  const Country = ({ id: id2 }) => {
50850
50913
  const country = countries$1.find((country2) => country2.id === id2);
50851
50914
  return /* @__PURE__ */ React__default.createElement("span", null, country == null ? void 0 : country.label);
@@ -52227,10 +52290,10 @@ const GetUserNotificationSettings = async ({}) => {
52227
52290
  const UpdateUserNotificationSettings = async ({
52228
52291
  data: data2
52229
52292
  }) => {
52230
- await instance$1.put(`listing/notification-settings`, formatData$g(data2));
52293
+ await instance$1.put(`listing/notification-settings`, formatData$f(data2));
52231
52294
  return { data: data2 };
52232
52295
  };
52233
- const formatData$g = (data2) => {
52296
+ const formatData$f = (data2) => {
52234
52297
  return {
52235
52298
  dailyReport: data2.dailyReport ? "true" : "false",
52236
52299
  weeklyReport: data2.weeklyReport ? "true" : "false",
@@ -52573,21 +52636,21 @@ const UpsertReplyTemplates = async ({
52573
52636
  accessToken
52574
52637
  }) => {
52575
52638
  if (data2.id) {
52576
- await instance$1.put(`/listing/review-reply-template/${data2.id}`, formatData$f(data2), {
52639
+ await instance$1.put(`/listing/review-reply-template/${data2.id}`, formatData$e(data2), {
52577
52640
  headers: {
52578
52641
  Authorization: `Bearer ${accessToken}`
52579
52642
  }
52580
52643
  });
52581
52644
  return { data: data2 };
52582
52645
  }
52583
- await instance$1.post(`/listing/review-reply-template`, formatData$f(data2), {
52646
+ await instance$1.post(`/listing/review-reply-template`, formatData$e(data2), {
52584
52647
  headers: {
52585
52648
  Authorization: `Bearer ${accessToken}`
52586
52649
  }
52587
52650
  });
52588
52651
  return { data: data2 };
52589
52652
  };
52590
- const formatData$f = (data2) => {
52653
+ const formatData$e = (data2) => {
52591
52654
  return {
52592
52655
  locale: data2.language.value === "gb" ? "en" : data2.language.value,
52593
52656
  comment: data2.reply,
@@ -53384,7 +53447,7 @@ const groupBy = (arr = [], by) => arr.reduce((acc, item2) => ({
53384
53447
  ...acc,
53385
53448
  [item2[by]]: acc[item2[by]] ? [...acc[item2[by]], item2] : [item2]
53386
53449
  }), {});
53387
- const formatData$e = (dataToFormat) => {
53450
+ const formatData$d = (dataToFormat) => {
53388
53451
  const compare2 = groupByDate$1(dataToFormat.compare);
53389
53452
  const inPeriod = groupByDate$1(dataToFormat.data);
53390
53453
  return {
@@ -76954,7 +77017,7 @@ const formatDateChart = (date4, mode) => {
76954
77017
  return formatDate(date4, "DD/MM/YYYY");
76955
77018
  }
76956
77019
  };
76957
- const formatData$d = (data2, mode) => {
77020
+ const formatData$c = (data2, mode) => {
76958
77021
  const formatedData = data2.reduce((acc, { date: _date, ...item2 }) => {
76959
77022
  var _a2, _b, _c;
76960
77023
  const date4 = formatDateChart(_date, mode);
@@ -77022,7 +77085,7 @@ const ReviewsChart = ({
77022
77085
  const handleChanDisplayBy = (ev) => {
77023
77086
  setDisplayBy(ev.target.value);
77024
77087
  };
77025
- const chartData = formatData$d(data2, displayBy);
77088
+ const chartData = formatData$c(data2, displayBy);
77026
77089
  const options2 = limitDisplaByOptions(days2);
77027
77090
  return /* @__PURE__ */ React__default.createElement(Card, {
77028
77091
  header: { title: t2("REVIEWSEVOLUTIION") }
@@ -77331,7 +77394,7 @@ const Analytics$3 = ({ venueListingId, venueId }) => {
77331
77394
  const { data: data2, isLoading, error: error3 } = useFetch(GetReviewAnalytics, {
77332
77395
  cacheId: `reviews-analytics-${venueListingId}`,
77333
77396
  params: filter
77334
- }, { formatData: formatData$e });
77397
+ }, { formatData: formatData$d });
77335
77398
  const { data: venues } = useFetch(GetVenueListingsOptions, {
77336
77399
  cacheId: `venueListing-options`
77337
77400
  });
@@ -77587,7 +77650,7 @@ const formatStats$1 = (stat) => {
77587
77650
  });
77588
77651
  return sum;
77589
77652
  };
77590
- const formatData$c = (dataToFormat) => {
77653
+ const formatData$b = (dataToFormat) => {
77591
77654
  return {
77592
77655
  totals: {
77593
77656
  queries: {
@@ -77687,7 +77750,7 @@ const Analytics$2 = ({ venueListingId, venueId }) => {
77687
77750
  if (data2 && (data2 == null ? void 0 : data2.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.error)) {
77688
77751
  setNotAuthorized(true);
77689
77752
  } else {
77690
- setFormattedStats(formatData$c(data2));
77753
+ setFormattedStats(formatData$b(data2));
77691
77754
  }
77692
77755
  }
77693
77756
  }, [data2]);
@@ -77961,7 +78024,7 @@ const Analytics$1 = ({ venueListingId, venueId }) => {
77961
78024
  ]
77962
78025
  })))))));
77963
78026
  };
77964
- const formatData$b = (dataToFormat) => {
78027
+ const formatData$a = (dataToFormat) => {
77965
78028
  const compare2 = groupByDate(dataToFormat.compare);
77966
78029
  const inPeriod = groupByDate(dataToFormat.data);
77967
78030
  return {
@@ -78100,7 +78163,7 @@ const Analytics = ({ venueListingId, venueId }) => {
78100
78163
  const { data: data2, isLoading, error: error3 } = useFetch(GetReviewAnalytics, {
78101
78164
  cacheId: `reviews-analytics-${venueListingId}`,
78102
78165
  params: filter
78103
- }, { formatData: formatData$b });
78166
+ }, { formatData: formatData$a });
78104
78167
  const comparedPeriod = formatComparedPeriod(filter.compare);
78105
78168
  useState({
78106
78169
  findBy: "venueId",
@@ -79191,9 +79254,9 @@ const GetVenueListing = async ({
79191
79254
  }
79192
79255
  });
79193
79256
  sessionStorage.setItem("sdk_venue_vertical", data2 == null ? void 0 : data2.vertical);
79194
- return formatData$a(data2);
79257
+ return formatData$9(data2);
79195
79258
  };
79196
- const formatData$a = async (values = {}) => {
79259
+ const formatData$9 = async (values = {}) => {
79197
79260
  var _a2;
79198
79261
  const {
79199
79262
  country,
@@ -84409,28 +84472,6 @@ const BingButton$1 = ({
84409
84472
  className: styles$U.connectedText
84410
84473
  }, t2("CONNECT")));
84411
84474
  };
84412
- const GetVenueListingModule = async ({
84413
- venueId,
84414
- accessToken
84415
- }) => {
84416
- const data2 = await instance$1.get(`listing/venue/${venueId}/module`, {
84417
- headers: {
84418
- Authorization: `Bearer ${accessToken}`
84419
- }
84420
- });
84421
- return formatData$9(data2);
84422
- };
84423
- const formatData$9 = (values = {}) => {
84424
- const { country, ...rest } = values;
84425
- const _country = countries$1 == null ? void 0 : countries$1.find(({ id: id2 }) => id2 === country);
84426
- return {
84427
- ...rest,
84428
- country: {
84429
- id: _country == null ? void 0 : _country.id,
84430
- name: _country == null ? void 0 : _country.label
84431
- }
84432
- };
84433
- };
84434
84475
  const useConnect = ({ venueId }) => {
84435
84476
  var _a2;
84436
84477
  const { data: data2, isLoading, reload } = useFetch(GetVenueListingModule, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.1.64",
3
+ "version": "0.1.66",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": ["mozrest"],
6
6
  "author": {