@timardex/cluemart-shared 1.4.8 → 1.4.11

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 (35) hide show
  1. package/dist/{auth-BmpK70hL.d.mts → auth-BNhymOFs.d.mts} +1 -1
  2. package/dist/{auth-CJIGgvus.d.ts → auth-CgzvvFjw.d.ts} +1 -1
  3. package/dist/formFields/index.d.mts +1 -1
  4. package/dist/formFields/index.d.ts +1 -1
  5. package/dist/{global-D8D6TL-I.d.mts → global-D5dNxa5e.d.mts} +6 -3
  6. package/dist/{global-DTSeqbV9.d.ts → global-x5DE08tD.d.ts} +6 -3
  7. package/dist/graphql/index.cjs +14 -18
  8. package/dist/graphql/index.cjs.map +1 -1
  9. package/dist/graphql/index.d.mts +3 -3
  10. package/dist/graphql/index.d.ts +3 -3
  11. package/dist/graphql/index.mjs +14 -18
  12. package/dist/graphql/index.mjs.map +1 -1
  13. package/dist/hooks/index.cjs +21 -16
  14. package/dist/hooks/index.cjs.map +1 -1
  15. package/dist/hooks/index.d.mts +3 -3
  16. package/dist/hooks/index.d.ts +3 -3
  17. package/dist/hooks/index.mjs +21 -16
  18. package/dist/hooks/index.mjs.map +1 -1
  19. package/dist/index.cjs +35 -34
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.mts +8 -8
  22. package/dist/index.d.ts +8 -8
  23. package/dist/index.mjs +35 -34
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/{post-DQtHcwIe.d.mts → post-BnXA5t_U.d.mts} +1 -1
  26. package/dist/{post-BmHp3BkB.d.ts → post-DDDWdbHZ.d.ts} +1 -1
  27. package/dist/{resourceActivities-BBmklkJb.d.ts → resourceActivities-C9XUSb9n.d.ts} +3 -5
  28. package/dist/{resourceActivities-DRMRA617.d.mts → resourceActivities-CtfWc2rd.d.mts} +3 -5
  29. package/dist/types/index.cjs.map +1 -1
  30. package/dist/types/index.d.mts +5 -5
  31. package/dist/types/index.d.ts +5 -5
  32. package/dist/types/index.mjs.map +1 -1
  33. package/dist/utils/index.d.mts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/package.json +1 -1
@@ -133,16 +133,18 @@ var useLocationSearch = (googleApi) => {
133
133
  }, {});
134
134
  const newLocation = {
135
135
  city: address.city ? address.city.toLowerCase() : "",
136
- coordinates: [longitude, latitude],
137
- // [longitude, latitude]
138
136
  country: address.country,
139
137
  fullAddress: formattedAddress,
138
+ geo: {
139
+ coordinates: [longitude, latitude],
140
+ // [longitude, latitude]
141
+ type: "Point"
142
+ // Mongoose GeoJSON type
143
+ },
140
144
  latitude,
141
145
  longitude,
142
- region: address.region ? address.region.replace(/ Region$/, "") : "",
146
+ region: address.region ? address.region.replace(/ Region$/, "") : ""
143
147
  // Remove " Region" suffix
144
- type: "Point"
145
- // Mongoose GeoJSON type
146
148
  };
147
149
  return newLocation;
148
150
  } catch (error) {
@@ -486,16 +488,18 @@ var dateTimeWithPriceSchema = dateTimeSchema.shape({
486
488
  });
487
489
  var locationSchema = yup.object().shape({
488
490
  city: yup.string().label("City").required("City is required"),
489
- coordinates: yup.array().of(yup.number().required("Coordinates must be numbers")).length(
490
- 2,
491
- "Coordinates must contain exactly two numbers (longitude, latitude)"
492
- ).required("Coordinates are required"),
493
491
  country: yup.string().label("Country").required("Country is required"),
494
492
  fullAddress: yup.string().label("Address").required("Address is required"),
493
+ geo: yup.object().shape({
494
+ coordinates: yup.array().of(yup.number().required("Coordinates must be numbers")).length(
495
+ 2,
496
+ "Coordinates must contain exactly two numbers (longitude, latitude)"
497
+ ).required("Coordinates are required"),
498
+ type: yup.string().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
499
+ }),
495
500
  latitude: yup.number().label("Latitude").required("Latitude is required"),
496
501
  longitude: yup.number().label("Longitude").required("Longitude is required"),
497
- region: yup.string().label("Region").required("Region is required"),
498
- type: yup.string().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
502
+ region: yup.string().label("Region").required("Region is required")
499
503
  });
500
504
  var passwordSchema = yup.string().trim().label("Password").min(8, "Password must be at least 8 characters long").required("Password is required");
501
505
  var socialMediaSchema = yup.object({
@@ -1015,15 +1019,16 @@ var appSettingsSchema = yup10.object({
1015
1019
  // src/hooks/utils.ts
1016
1020
  var defaultLocation = {
1017
1021
  city: "",
1018
- coordinates: [0, 0],
1019
- // [longitude, latitude]
1020
1022
  country: "",
1021
1023
  fullAddress: "",
1024
+ geo: {
1025
+ coordinates: [0, 0],
1026
+ // [longitude, latitude]
1027
+ type: "Point"
1028
+ },
1022
1029
  latitude: 0,
1023
1030
  longitude: 0,
1024
- region: "",
1025
- type: "Point"
1026
- // Default type for GeoJSON
1031
+ region: ""
1027
1032
  };
1028
1033
  var globalDefaultValues = {
1029
1034
  active: false,