@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
package/dist/index.cjs CHANGED
@@ -2741,17 +2741,25 @@ var CONTACT_DETAILS_FIELDS_FRAGMENT = import_client2.gql`
2741
2741
  mobilePhone
2742
2742
  }
2743
2743
  `;
2744
+ var LOCATION_GEO_FIELDS_FRAGMENT = import_client2.gql`
2745
+ fragment LocationGeoFields on LocationGeoType {
2746
+ coordinates
2747
+ type
2748
+ }
2749
+ `;
2744
2750
  var LOCATION_FIELDS_FRAGMENT = import_client2.gql`
2745
2751
  fragment LocationFields on LocationType {
2746
2752
  city
2747
- coordinates
2748
2753
  country
2749
2754
  fullAddress
2755
+ geo {
2756
+ ...LocationGeoFields
2757
+ }
2750
2758
  latitude
2751
2759
  longitude
2752
2760
  region
2753
- type
2754
2761
  }
2762
+ ${LOCATION_GEO_FIELDS_FRAGMENT}
2755
2763
  `;
2756
2764
  var EVENT_LIST_ITEM = import_client2.gql`
2757
2765
  fragment EventListItemFields on EventListItemType {
@@ -3059,18 +3067,6 @@ var GET_TESTER = import_client4.gql`
3059
3067
 
3060
3068
  // src/graphql/queries/vendor.ts
3061
3069
  var import_client5 = require("@apollo/client");
3062
- var VENDOR_LOCATION_FIELDS_FRAGMENT = import_client5.gql`
3063
- fragment VendorLocationFields on VendorLocationType {
3064
- city
3065
- coordinates
3066
- country
3067
- fullAddress
3068
- latitude
3069
- longitude
3070
- region
3071
- type
3072
- }
3073
- `;
3074
3070
  var VENDOR_DATETIME_FIELDS_FRAGMENT = import_client5.gql`
3075
3071
  fragment VendorDateTimeFields on VendorDateTimeType {
3076
3072
  dateStatus
@@ -3124,7 +3120,7 @@ var VENDOR = import_client5.gql`
3124
3120
  }
3125
3121
  description
3126
3122
  location {
3127
- ...VendorLocationFields
3123
+ ...LocationFields
3128
3124
  }
3129
3125
  }
3130
3126
  logo {
@@ -3162,7 +3158,7 @@ var VENDOR = import_client5.gql`
3162
3158
  }
3163
3159
  ${CATEGORY_FIELDS_FRAGMENT}
3164
3160
  ${VENDOR_DATETIME_FIELDS_FRAGMENT}
3165
- ${VENDOR_LOCATION_FIELDS_FRAGMENT}
3161
+ ${LOCATION_FIELDS_FRAGMENT}
3166
3162
  ${OWNER_FIELDS_FRAGMENT}
3167
3163
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
3168
3164
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
@@ -5452,8 +5448,7 @@ var RESOURCE_ACTIVITY_FIELDS_FRAGMENT = import_client50.gql`
5452
5448
  activity {
5453
5449
  activityType
5454
5450
  location {
5455
- type
5456
- coordinates
5451
+ ...LocationGeoFields
5457
5452
  }
5458
5453
  dateStatus
5459
5454
  startDate
@@ -5463,6 +5458,7 @@ var RESOURCE_ACTIVITY_FIELDS_FRAGMENT = import_client50.gql`
5463
5458
  userId
5464
5459
  }
5465
5460
  }
5461
+ ${LOCATION_GEO_FIELDS_FRAGMENT}
5466
5462
  `;
5467
5463
  var GET_RESOURCE_ACTIVITY = import_client50.gql`
5468
5464
  query getResourceActivity(
@@ -6063,16 +6059,18 @@ var useLocationSearch = (googleApi) => {
6063
6059
  }, {});
6064
6060
  const newLocation = {
6065
6061
  city: address.city ? address.city.toLowerCase() : "",
6066
- coordinates: [longitude, latitude],
6067
- // [longitude, latitude]
6068
6062
  country: address.country,
6069
6063
  fullAddress: formattedAddress,
6064
+ geo: {
6065
+ coordinates: [longitude, latitude],
6066
+ // [longitude, latitude]
6067
+ type: "Point"
6068
+ // Mongoose GeoJSON type
6069
+ },
6070
6070
  latitude,
6071
6071
  longitude,
6072
- region: address.region ? address.region.replace(/ Region$/, "") : "",
6072
+ region: address.region ? address.region.replace(/ Region$/, "") : ""
6073
6073
  // Remove " Region" suffix
6074
- type: "Point"
6075
- // Mongoose GeoJSON type
6076
6074
  };
6077
6075
  return newLocation;
6078
6076
  } catch (error) {
@@ -6236,16 +6234,18 @@ var dateTimeWithPriceSchema = dateTimeSchema.shape({
6236
6234
  });
6237
6235
  var locationSchema = yup.object().shape({
6238
6236
  city: yup.string().label("City").required("City is required"),
6239
- coordinates: yup.array().of(yup.number().required("Coordinates must be numbers")).length(
6240
- 2,
6241
- "Coordinates must contain exactly two numbers (longitude, latitude)"
6242
- ).required("Coordinates are required"),
6243
6237
  country: yup.string().label("Country").required("Country is required"),
6244
6238
  fullAddress: yup.string().label("Address").required("Address is required"),
6239
+ geo: yup.object().shape({
6240
+ coordinates: yup.array().of(yup.number().required("Coordinates must be numbers")).length(
6241
+ 2,
6242
+ "Coordinates must contain exactly two numbers (longitude, latitude)"
6243
+ ).required("Coordinates are required"),
6244
+ type: yup.string().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
6245
+ }),
6245
6246
  latitude: yup.number().label("Latitude").required("Latitude is required"),
6246
6247
  longitude: yup.number().label("Longitude").required("Longitude is required"),
6247
- region: yup.string().label("Region").required("Region is required"),
6248
- type: yup.string().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
6248
+ region: yup.string().label("Region").required("Region is required")
6249
6249
  });
6250
6250
  var passwordSchema = yup.string().trim().label("Password").min(8, "Password must be at least 8 characters long").required("Password is required");
6251
6251
  var socialMediaSchema = yup.object({
@@ -6765,15 +6765,16 @@ var appSettingsSchema = yup10.object({
6765
6765
  // src/hooks/utils.ts
6766
6766
  var defaultLocation = {
6767
6767
  city: "",
6768
- coordinates: [0, 0],
6769
- // [longitude, latitude]
6770
6768
  country: "",
6771
6769
  fullAddress: "",
6770
+ geo: {
6771
+ coordinates: [0, 0],
6772
+ // [longitude, latitude]
6773
+ type: "Point"
6774
+ },
6772
6775
  latitude: 0,
6773
6776
  longitude: 0,
6774
- region: "",
6775
- type: "Point"
6776
- // Default type for GeoJSON
6777
+ region: ""
6777
6778
  };
6778
6779
  var globalDefaultValues = {
6779
6780
  active: false,