mozrest-sdk-react-dev 0.1.3 → 0.1.5

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 +40 -42
  2. package/package.json +3 -3
package/mozrest-sdk.es.js CHANGED
@@ -15011,7 +15011,7 @@ var enUS$1 = {
15011
15011
  next_3: "Next 3 Pages",
15012
15012
  page_size: "Page Size"
15013
15013
  };
15014
- var locale$6 = {
15014
+ var locale$5 = {
15015
15015
  locale: "en_US",
15016
15016
  today: "Today",
15017
15017
  now: "Now",
@@ -15040,12 +15040,12 @@ var locale$6 = {
15040
15040
  previousCentury: "Last century",
15041
15041
  nextCentury: "Next century"
15042
15042
  };
15043
- var locale$5 = {
15043
+ var locale$4 = {
15044
15044
  placeholder: "Select time",
15045
15045
  rangePlaceholder: ["Start time", "End time"]
15046
15046
  };
15047
- var TimePicker = locale$5;
15048
- var locale$4 = {
15047
+ var TimePicker = locale$4;
15048
+ var locale$3 = {
15049
15049
  lang: _extends$O({
15050
15050
  placeholder: "Select date",
15051
15051
  yearPlaceholder: "Select year",
@@ -15057,10 +15057,10 @@ var locale$4 = {
15057
15057
  rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
15058
15058
  rangeMonthPlaceholder: ["Start month", "End month"],
15059
15059
  rangeWeekPlaceholder: ["Start week", "End week"]
15060
- }, locale$6),
15060
+ }, locale$5),
15061
15061
  timePickerLocale: _extends$O({}, TimePicker)
15062
15062
  };
15063
- var enUS = locale$4;
15063
+ var enUS = locale$3;
15064
15064
  var typeTemplate = "${label} is not a valid ${type}";
15065
15065
  var localeValues = {
15066
15066
  locale: "en",
@@ -25665,7 +25665,7 @@ function to(time2, withoutSuffix) {
25665
25665
  function toNow(withoutSuffix) {
25666
25666
  return this.to(createLocal(), withoutSuffix);
25667
25667
  }
25668
- function locale$3(key2) {
25668
+ function locale$2(key2) {
25669
25669
  var newLocaleData;
25670
25670
  if (key2 === void 0) {
25671
25671
  return this._locale._abbr;
@@ -26231,7 +26231,7 @@ proto.isSameOrAfter = isSameOrAfter;
26231
26231
  proto.isSameOrBefore = isSameOrBefore;
26232
26232
  proto.isValid = isValid$2;
26233
26233
  proto.lang = lang;
26234
- proto.locale = locale$3;
26234
+ proto.locale = locale$2;
26235
26235
  proto.localeData = localeData;
26236
26236
  proto.max = prototypeMax;
26237
26237
  proto.min = prototypeMin;
@@ -26683,7 +26683,7 @@ proto$2.humanize = humanize;
26683
26683
  proto$2.toISOString = toISOString$1;
26684
26684
  proto$2.toString = toISOString$1;
26685
26685
  proto$2.toJSON = toISOString$1;
26686
- proto$2.locale = locale$3;
26686
+ proto$2.locale = locale$2;
26687
26687
  proto$2.localeData = localeData;
26688
26688
  proto$2.toIsoString = deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", toISOString$1);
26689
26689
  proto$2.lang = lang;
@@ -42358,27 +42358,27 @@ const StaticMap = ({
42358
42358
  size: "400x200",
42359
42359
  apiKey: config$1.maps_key
42360
42360
  }, /* @__PURE__ */ React__default.createElement(Marker$1, {
42361
- location: `${latitude},${longitude}`,
42361
+ location: { lat: latitude, lng: longitude },
42362
42362
  color: "red"
42363
42363
  }));
42364
42364
  const formatAddres = (data2) => {
42365
- let addres = "";
42365
+ let address = "";
42366
42366
  if (data2.address) {
42367
- addres += data2.address;
42367
+ address += data2.address;
42368
42368
  }
42369
42369
  if (data2.city) {
42370
- addres += ", " + data2.city;
42370
+ address += ", " + data2.city;
42371
42371
  }
42372
42372
  if (data2.postalCode) {
42373
- addres += ", " + data2.postalCode;
42373
+ address += ", " + data2.postalCode;
42374
42374
  }
42375
42375
  if (data2.country) {
42376
- addres += ", " + data2.country.label;
42376
+ address += ", " + data2.country.label;
42377
42377
  }
42378
42378
  if (data2.addressComplement) {
42379
- addres += ` (${data2.addressComplement})`;
42379
+ address += ` (${data2.addressComplement})`;
42380
42380
  }
42381
- return addres;
42381
+ return address;
42382
42382
  };
42383
42383
  const CardLocation = ({
42384
42384
  onClickEdit,
@@ -47704,12 +47704,7 @@ const MapContainer = ({ google: google2, position: position2, onChangePosition }
47704
47704
  const [center, setCenter] = useState(position2 || defaultPosition);
47705
47705
  const [currentPosition, setCurrentPosition] = useState(position2 || defaultPosition);
47706
47706
  const getInitialCenter = () => {
47707
- if (position2) {
47708
- return;
47709
- }
47710
- navigator == null ? void 0 : navigator.geolocation.getCurrentPosition(({ coords: { latitude: lat, longitude: lng } }) => {
47711
- setCenter({ lat, lng });
47712
- });
47707
+ onChangePosition(position2);
47713
47708
  };
47714
47709
  const onSelectPosition = (value2) => {
47715
47710
  setCurrentPosition(value2);
@@ -47819,7 +47814,9 @@ const AddressAutoComplete = () => {
47819
47814
  const clearSuggestions = () => setSuggestions([]);
47820
47815
  useOutsideClick(ref, clearSuggestions);
47821
47816
  const handelChandeAddress = async (e3) => {
47822
- const textAddr = e3.target.value;
47817
+ var _a2;
47818
+ console.log("textAddr", e3.target);
47819
+ const textAddr = (_a2 = e3.target) == null ? void 0 : _a2.value;
47823
47820
  setFieldValue("address", textAddr);
47824
47821
  if (textAddr.length < 5) {
47825
47822
  return;
@@ -55285,11 +55282,10 @@ const findLanguage = ({
55285
55282
  languageOptions,
55286
55283
  locale: locale2
55287
55284
  }) => {
55288
- console.log("locale languageOptions", languageOptions);
55289
55285
  if (languageOptions.length === 0) {
55290
55286
  return void 0;
55291
55287
  }
55292
- const getLocale2 = (locale22) => locale22 === "en" ? "gb" : locale22 || "gb";
55288
+ const getLocale2 = (locale22) => locale22 === "en" ? "gb" : locale22;
55293
55289
  const languageOption = languageOptions.find(({ value: value2 }) => value2 == getLocale2(locale2));
55294
55290
  return languageOption || { id: "en", value: "gb", label: t$3("English") };
55295
55291
  };
@@ -55437,6 +55433,7 @@ const DetailMobile = ({
55437
55433
  platform: platform2,
55438
55434
  createdAt,
55439
55435
  locationName,
55436
+ locale: locale2,
55440
55437
  onReload,
55441
55438
  openForm,
55442
55439
  onClick
@@ -55463,9 +55460,9 @@ const DetailMobile = ({
55463
55460
  alt: platform2,
55464
55461
  src: platformImages[platform2],
55465
55462
  className: styles$A.platform
55466
- })), /* @__PURE__ */ React__default.createElement("div", null, createdAt)), /* @__PURE__ */ React__default.createElement("strong", null, reviewer.name, " ", " ", locale && /* @__PURE__ */ React__default.createElement("img", {
55467
- alt: locale,
55468
- src: `https://countryflagsapi.com/png/${locale === "en" ? "gb" : locale}`,
55463
+ })), /* @__PURE__ */ React__default.createElement("div", null, createdAt)), /* @__PURE__ */ React__default.createElement("strong", null, reviewer.name, " ", " ", locale2 && /* @__PURE__ */ React__default.createElement("img", {
55464
+ alt: locale2,
55465
+ src: `https://countryflagsapi.com/png/${locale2 === "en" ? "gb" : locale2}`,
55469
55466
  className: styles$A.flag
55470
55467
  })), /* @__PURE__ */ React__default.createElement(StartScore, {
55471
55468
  score: rating
@@ -55803,6 +55800,7 @@ const Templates = () => {
55803
55800
  setSelectedTemplate((current) => current === id ? "" : id);
55804
55801
  };
55805
55802
  useEffect(() => {
55803
+ console.log("effect");
55806
55804
  if (review && typeOptions) {
55807
55805
  setTemplateType(findTemplateByRating({
55808
55806
  options: typeOptions,
@@ -55813,7 +55811,7 @@ const Templates = () => {
55813
55811
  locale: review.locale
55814
55812
  }));
55815
55813
  }
55816
- }, [review, typeOptions]);
55814
+ }, [review]);
55817
55815
  return /* @__PURE__ */ React__default.createElement(Card, {
55818
55816
  header: /* @__PURE__ */ React__default.createElement(Header$3, {
55819
55817
  title: t2("REPLYTEMPLATES")
@@ -69624,7 +69622,7 @@ function formatLocale$1(locale2) {
69624
69622
  formatPrefix: formatPrefix2
69625
69623
  };
69626
69624
  }
69627
- var locale$2;
69625
+ var locale$1;
69628
69626
  var format2;
69629
69627
  var formatPrefix;
69630
69628
  defaultLocale$1({
@@ -69633,10 +69631,10 @@ defaultLocale$1({
69633
69631
  currency: ["$", ""]
69634
69632
  });
69635
69633
  function defaultLocale$1(definition) {
69636
- locale$2 = formatLocale$1(definition);
69637
- format2 = locale$2.format;
69638
- formatPrefix = locale$2.formatPrefix;
69639
- return locale$2;
69634
+ locale$1 = formatLocale$1(definition);
69635
+ format2 = locale$1.format;
69636
+ formatPrefix = locale$1.formatPrefix;
69637
+ return locale$1;
69640
69638
  }
69641
69639
  function precisionFixed(step2) {
69642
69640
  return Math.max(0, -exponent(Math.abs(step2)));
@@ -70946,7 +70944,7 @@ function formatUnixTimestamp(d2) {
70946
70944
  function formatUnixTimestampSeconds(d2) {
70947
70945
  return Math.floor(+d2 / 1e3);
70948
70946
  }
70949
- var locale$1;
70947
+ var locale;
70950
70948
  var timeFormat;
70951
70949
  var utcFormat;
70952
70950
  defaultLocale({
@@ -70960,12 +70958,12 @@ defaultLocale({
70960
70958
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
70961
70959
  });
70962
70960
  function defaultLocale(definition) {
70963
- locale$1 = formatLocale(definition);
70964
- timeFormat = locale$1.format;
70965
- locale$1.parse;
70966
- utcFormat = locale$1.utcFormat;
70967
- locale$1.utcParse;
70968
- return locale$1;
70961
+ locale = formatLocale(definition);
70962
+ timeFormat = locale.format;
70963
+ locale.parse;
70964
+ utcFormat = locale.utcFormat;
70965
+ locale.utcParse;
70966
+ return locale;
70969
70967
  }
70970
70968
  function date3(t2) {
70971
70969
  return new Date(t2);
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": ["mozrest"],
6
6
  "author": {
7
- "name": "Henry Villavicencio",
8
- "email": "henry.villavicencio.dev@gmail.com"
7
+ "name": "Alberto Lopez",
8
+ "email": "alberto@mozrest.com"
9
9
  },
10
10
  "repository": "https://github.com/mozrest/mozrest-sdk-js.git",
11
11
  "license": "UNLICENSED",