@timardex/cluemart-shared 1.5.618 → 1.5.620

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 (43) hide show
  1. package/dist/{auth-Bdlg8CzV.d.mts → auth-CJIbsVCg.d.mts} +1 -1
  2. package/dist/{auth-rRdVyjfK.d.ts → auth-CLKWWsIQ.d.ts} +1 -1
  3. package/dist/{chunk-3KPB5BHC.mjs → chunk-3NBZGJZM.mjs} +26 -20
  4. package/dist/chunk-3NBZGJZM.mjs.map +1 -0
  5. package/dist/{chunk-P52HS2NB.mjs → chunk-A2ZE5RVV.mjs} +2 -1
  6. package/dist/chunk-A2ZE5RVV.mjs.map +1 -0
  7. package/dist/formFields/index.d.mts +1 -1
  8. package/dist/formFields/index.d.ts +1 -1
  9. package/dist/{global-BWpDbvVZ.d.mts → global-J6EFP0wh.d.mts} +1 -0
  10. package/dist/{global-BRdgk2kj.d.ts → global-w94c0MGw.d.ts} +1 -0
  11. package/dist/graphql/index.cjs +1 -0
  12. package/dist/graphql/index.cjs.map +1 -1
  13. package/dist/graphql/index.d.mts +3 -3
  14. package/dist/graphql/index.d.ts +3 -3
  15. package/dist/graphql/index.mjs +1 -1
  16. package/dist/hooks/index.cjs +6 -1
  17. package/dist/hooks/index.cjs.map +1 -1
  18. package/dist/hooks/index.d.mts +3 -3
  19. package/dist/hooks/index.d.ts +3 -3
  20. package/dist/hooks/index.mjs +7 -3
  21. package/dist/hooks/index.mjs.map +1 -1
  22. package/dist/index.cjs +31 -20
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.mts +16 -69
  25. package/dist/index.d.ts +16 -69
  26. package/dist/index.mjs +31 -20
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/{post-C1eNwXYI.d.mts → post-BkgyLFwF.d.mts} +1 -1
  29. package/dist/{post-CO3A1l3d.d.ts → post-BmQ3R3cA.d.ts} +1 -1
  30. package/dist/{resourceActivities-D5KjDO8i.d.ts → resourceActivities-Bnk-1tPS.d.ts} +1 -1
  31. package/dist/{resourceActivities-Ik5hB71G.d.mts → resourceActivities-I3eJPRqW.d.mts} +1 -1
  32. package/dist/sharing/index.cjs +25 -19
  33. package/dist/sharing/index.cjs.map +1 -1
  34. package/dist/sharing/index.d.mts +19 -69
  35. package/dist/sharing/index.d.ts +19 -69
  36. package/dist/sharing/index.mjs +1 -1
  37. package/dist/types/index.d.mts +5 -5
  38. package/dist/types/index.d.ts +5 -5
  39. package/dist/utils/index.d.mts +1 -1
  40. package/dist/utils/index.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/chunk-3KPB5BHC.mjs.map +0 -1
  43. package/dist/chunk-P52HS2NB.mjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -3496,6 +3496,7 @@ var UNREGISTERED_VENDOR = import_client4.gql`
3496
3496
  claimed
3497
3497
  createdAt
3498
3498
  deletedAt
3499
+ email
3499
3500
  invitations {
3500
3501
  ...UnregisteredVendorInvitationFields
3501
3502
  }
@@ -7256,6 +7257,7 @@ var vendorSchema = globalResourceSchema.shape({
7256
7257
  var unregisteredVendorSchema = yup3.object().shape({
7257
7258
  categoryIds: yup3.array().of(yup3.string().defined()).min(1, "Category list must contain at least one item").required("Categories are required"),
7258
7259
  dateTime: yup3.array().of(dateTimeSchema).min(1, "DateTime list must contain at least one item").required("DateTime is required"),
7260
+ email: emailOptionalSchema,
7259
7261
  inviterId: yup3.string().required("Inviter ID is required"),
7260
7262
  name: yup3.string().label("Stallholder Name").trim().min(3, "Name must be at least 3 characters").required("Name is required"),
7261
7263
  region: yup3.string().label("Region").required("Region is required")
@@ -7612,6 +7614,7 @@ var defaultVendorFormValues = {
7612
7614
  var defaultUnregisteredVendorFormValues = {
7613
7615
  categoryIds: [],
7614
7616
  dateTime: [],
7617
+ email: null,
7615
7618
  inviterId: "",
7616
7619
  name: "",
7617
7620
  region: ""
@@ -7840,6 +7843,7 @@ function useUnregisteredVendorForm(data) {
7840
7843
  reset({
7841
7844
  categoryIds: data.categoryIds,
7842
7845
  dateTime: data.dateTime,
7846
+ email: data.email,
7843
7847
  inviterId: data.inviterId,
7844
7848
  name: data.name,
7845
7849
  region: data.region
@@ -7848,12 +7852,13 @@ function useUnregisteredVendorForm(data) {
7848
7852
  reset(defaultUnregisteredVendorFormValues);
7849
7853
  }
7850
7854
  }, [data]);
7851
- const { categoryIds, dateTime, inviterId, name, region } = getValues();
7855
+ const { categoryIds, dateTime, email, inviterId, name, region } = getValues();
7852
7856
  return {
7853
7857
  control,
7854
7858
  fields: {
7855
7859
  categoryIds,
7856
7860
  dateTime,
7861
+ email,
7857
7862
  inviterId,
7858
7863
  name,
7859
7864
  region
@@ -8979,26 +8984,41 @@ function formatShareRainOrShineLine(rainOrShine) {
8979
8984
  function formatShareIsFoodTrueLine(foodTruck) {
8980
8985
  return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;
8981
8986
  }
8982
- function formatShareInvitationRequirementsSection(requirementLabels) {
8983
- const bullets = requirementLabels.map((label) => `- ${label}`);
8987
+ function formatShareInvitationRequirementsSection(requirements) {
8988
+ const bullets = (requirements ?? []).filter((item) => item.value).map((item) => item.label.trim()).filter((label) => label.length > 0).map((label) => `- ${label}`);
8989
+ if (bullets.length === 0) {
8990
+ return null;
8991
+ }
8984
8992
  return `${SHARE_REQUIREMENTS_SECTION_HEADING}
8985
8993
  ${bullets.join("\n")}`;
8986
8994
  }
8987
8995
  function formatShareTagsSection(tags) {
8988
- const bullets = tags.map((tag) => `- ${tag}`);
8996
+ const bullets = tags.map((tag) => tag.trim()).filter((tag) => tag.length > 0).map((tag) => `- ${tag}`);
8997
+ if (bullets.length === 0) {
8998
+ return null;
8999
+ }
8989
9000
  return `${SHARE_TAGS_SECTION_HEADING}
8990
9001
  ${bullets.join("\n")}`;
8991
9002
  }
8992
- function formatShareApplicationCategoriesSection(categoryLabels) {
8993
- const bullets = categoryLabels.map((label) => `- ${label}`);
9003
+ function formatShareApplicationCategoriesSection(categories) {
9004
+ const bullets = categories.map((category) => formatCategoryLabel(category).trim()).filter((label) => label.length > 0).map((label) => `- ${label}`);
9005
+ if (bullets.length === 0) {
9006
+ return null;
9007
+ }
8994
9008
  return `${SHARE_CATEGORIES_SECTION_HEADING}
8995
9009
  ${bullets.join("\n")}`;
8996
9010
  }
8997
9011
  function formatShareApplicationStallSizeLine(size) {
8998
9012
  return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m \xD7 ${size.depth}m`;
8999
9013
  }
9000
- function formatShareApplicationComplianceSection(complianceLabels) {
9001
- const bullets = complianceLabels.map((label) => `- ${label}`);
9014
+ function formatShareApplicationComplianceSection(compliance) {
9015
+ const bullets = [
9016
+ compliance?.liabilityInsurance && "Liability insurance",
9017
+ compliance?.foodBeverageLicense && "Food & beverage licence"
9018
+ ].filter((label) => Boolean(label)).map((label) => `- ${label}`);
9019
+ if (bullets.length === 0) {
9020
+ return null;
9021
+ }
9002
9022
  return `${SHARE_COMPLIANCE_PREFIX}
9003
9023
  ${bullets.join("\n")}`;
9004
9024
  }
@@ -9013,7 +9033,6 @@ function buildInvitationShareDescription(event, eventInfo2) {
9013
9033
  if (!eventInfo2 || stallTypes2.length === 0) {
9014
9034
  return event.description?.trim() || "";
9015
9035
  }
9016
- const requirementLabels = (eventInfo2.requirements ?? []).filter((item) => item.value).map((item) => item.label);
9017
9036
  const sections = [
9018
9037
  event.location.fullAddress,
9019
9038
  formatShareRainOrShineLine(event.rainOrShine),
@@ -9022,28 +9041,20 @@ function buildInvitationShareDescription(event, eventInfo2) {
9022
9041
  formatShareInvitationApplicationDeadlineLine(
9023
9042
  eventInfo2.applicationDeadlineHours
9024
9043
  ),
9025
- requirementLabels.length > 0 && formatShareInvitationRequirementsSection(requirementLabels)
9044
+ formatShareInvitationRequirementsSection(eventInfo2.requirements)
9026
9045
  ];
9027
9046
  return joinShareDescriptionSections(sections);
9028
9047
  }
9029
9048
  function buildApplicationShareDescription(vendor, vendorInfo) {
9030
- const categoryLabels = vendor.categories.map(
9031
- (category) => formatCategoryLabel(category)
9032
- );
9033
9049
  if (!vendorInfo) {
9034
9050
  return vendor.description?.trim() || "";
9035
9051
  }
9036
- const compliance = vendorInfo.compliance;
9037
- const complianceLabels = [
9038
- compliance?.liabilityInsurance && "Liability insurance",
9039
- compliance?.foodBeverageLicense && "Food & beverage licence"
9040
- ].filter((label) => Boolean(label));
9041
9052
  const profileDescription = vendor.description?.trim();
9042
9053
  const sections = [
9043
9054
  formatShareIsFoodTrueLine(vendor.foodTruck),
9044
- categoryLabels.length > 0 && formatShareApplicationCategoriesSection(categoryLabels),
9055
+ formatShareApplicationCategoriesSection(vendor.categories),
9045
9056
  formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),
9046
- complianceLabels.length > 0 && formatShareApplicationComplianceSection(complianceLabels),
9057
+ formatShareApplicationComplianceSection(vendorInfo.compliance),
9047
9058
  formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),
9048
9059
  profileDescription
9049
9060
  ];