@timardex/cluemart-shared 1.0.15 → 1.0.17
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.
- package/dist/auth-CAeHx-BM.d.mts +84 -0
- package/dist/auth-gmfsaSPo.d.ts +84 -0
- package/dist/chat-BUVCf9Tu.d.mts +27 -0
- package/dist/chat-BUVCf9Tu.d.ts +27 -0
- package/dist/chunk-K5NK2CK5.mjs +133 -0
- package/dist/chunk-K5NK2CK5.mjs.map +1 -0
- package/dist/chunk-L2H5WFGC.mjs +100 -0
- package/dist/chunk-L2H5WFGC.mjs.map +1 -0
- package/dist/enums/index.cjs +134 -0
- package/dist/enums/index.cjs.map +1 -0
- package/dist/enums/index.d.mts +75 -0
- package/dist/enums/index.d.ts +75 -0
- package/dist/enums/index.mjs +27 -0
- package/dist/enums/index.mjs.map +1 -0
- package/dist/formFields/index.cjs +890 -0
- package/dist/formFields/index.cjs.map +1 -0
- package/dist/formFields/index.d.mts +61 -0
- package/dist/formFields/index.d.ts +61 -0
- package/dist/formFields/index.mjs +756 -0
- package/dist/formFields/index.mjs.map +1 -0
- package/dist/global-B6OE9jjE.d.mts +349 -0
- package/dist/global-Diphaotm.d.ts +349 -0
- package/dist/graphql/index.cjs +1712 -0
- package/dist/graphql/index.cjs.map +1 -0
- package/dist/graphql/index.d.mts +315 -0
- package/dist/graphql/index.d.ts +315 -0
- package/dist/graphql/index.mjs +1633 -0
- package/dist/graphql/index.mjs.map +1 -0
- package/dist/hooks/index.cjs +1167 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.mts +87 -0
- package/dist/hooks/index.d.ts +87 -0
- package/dist/hooks/index.mjs +1045 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index.cjs +312 -193
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +48 -297
- package/dist/index.d.ts +48 -297
- package/dist/index.mjs +305 -171
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.mts +12 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/utils/index.cjs +215 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.mts +66 -0
- package/dist/utils/index.d.ts +66 -0
- package/dist/utils/index.mjs +38 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +37 -4
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/formFields/stallholder/stallholder.ts","../../src/formFields/stallholder/stallholderApplyForm.ts","../../src/formFields/market/market.ts","../../src/formFields/market/marketInfo.ts","../../src/formFields/auth.ts","../../src/formFields/user.ts","../../src/formFields/categories.ts"],"sourcesContent":["import { FormDateField, FormField, OptionItem } from \"../../types/global\";\nimport { mapArrayToOptions } from \"../../utils\";\n\nexport const stallholderBasicInfoFields: FormField[] = [\n {\n helperText: \"Business Name of the Stallholder *\",\n name: \"name\",\n placeholder: \"Business Name\",\n },\n {\n helperText: \"Description of the Stallholder *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n {\n helperText: \"Enter Promo code if you have one.\",\n name: \"promoCode\",\n placeholder: \"Promo code\",\n },\n];\n\nexport const stallholderMultiLocation: FormField = {\n helperText:\n \"Usefull when you are not only selling products on Markets but also providing services at other locations.\",\n name: \"multiLocation\",\n placeholder: \"Enable multi location\",\n};\n\nexport const stallholderFullAddress: FormField = {\n helperText: \"Enter address\",\n name: \"fullAddress\",\n placeholder: \"Start typing to find address\",\n};\n\nexport const stallholderStartDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"Start Date\",\n name: \"startDate\",\n placeholder: \"Start Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"Start Time\",\n name: \"startTime\",\n placeholder: \"Start Time\",\n },\n];\n\nexport const stallholderEndDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"End Date\",\n name: \"endDate\",\n placeholder: \"End Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"End Time\",\n name: \"endTime\",\n placeholder: \"End Time\",\n },\n];\n\nexport const stallholderLocationDescription: FormField = {\n helperText: \"Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n};\n\nconst availableCityTypes = [\n \"Auckland\",\n \"Christchurch\",\n \"Hamilton\",\n \"Wellington\",\n];\n\nconst nzRegionsWithCities = [\n {\n cities: [\"Auckland\"],\n region: \"Auckland\",\n },\n {\n cities: [\"Tauranga\", \"Whakatāne\", \"Rotorua\"],\n region: \"Bay of Plenty\",\n },\n {\n cities: [\"Christchurch\", \"Timaru\", \"Ashburton\"],\n region: \"Canterbury\",\n },\n {\n cities: [\"Gisborne\"],\n region: \"Gisborne\",\n },\n {\n cities: [\"Napier\", \"Hastings\"],\n region: \"Hawke's Bay\",\n },\n {\n cities: [\"Palmerston North\", \"Whanganui\", \"Levin\"],\n region: \"Manawatū-Whanganui\",\n },\n {\n cities: [\"Blenheim\", \"Picton\"],\n region: \"Marlborough\",\n },\n {\n cities: [\"Nelson\"],\n region: \"Nelson Tasman\",\n },\n {\n cities: [\"Whangārei\", \"Kerikeri\", \"Kaitaia\"],\n region: \"Northland\",\n },\n {\n cities: [\"Dunedin\", \"Queenstown\"],\n region: \"Otago\",\n },\n {\n cities: [\"Invercargill\", \"Gore\"],\n region: \"Southland\",\n },\n {\n cities: [\"New Plymouth\", \"Hāwera\"],\n region: \"Taranaki\",\n },\n {\n cities: [\"Hamilton\", \"Taupō\", \"Cambridge\"],\n region: \"Waikato\",\n },\n {\n cities: [\"Wellington\", \"Lower Hutt\", \"Upper Hutt\", \"Porirua\"],\n region: \"Wellington\",\n },\n];\n\nexport const availableCityOptions: OptionItem[] =\n mapArrayToOptions(availableCityTypes);\n","import { FormField, OptionItem } from \"../../types\";\nimport { mapArrayToOptions } from \"../../utils\";\n\nexport const stallholderElectricity: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. amps, voltage, etc.\",\n isTextArea: true,\n name: \"electricity.details\",\n placeholder: \"Electricity requirements\",\n },\n isRequired: {\n name: \"electricity.isRequired\",\n placeholder: \"Do you require electricity?\",\n },\n};\n\nexport const stallholderGazebo: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. size, etc.\",\n isTextArea: true,\n name: \"gazebo.details\",\n placeholder: \"Gazebo requirements\",\n },\n isRequired: {\n name: \"gazebo.isRequired\",\n placeholder: \"Do you require Gazebo?\",\n },\n};\n\nexport const stallholderTable: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. size, etc.\",\n isTextArea: true,\n name: \"table.details\",\n placeholder: \"Table requirements\",\n },\n isRequired: {\n name: \"table.isRequired\",\n placeholder: \"Do you require Table?\",\n },\n};\n\nexport const stallholderPriceRange: {\n max: FormField;\n min: FormField;\n} = {\n max: {\n helperText: \"Product maximum price\",\n name: \"priceRange.max\",\n placeholder: \"Maximum price: \",\n },\n min: {\n helperText: \"Product minimum price\",\n name: \"priceRange.min\",\n placeholder: \"Minimum price: \",\n },\n};\n\nexport const stallholderStallSize: {\n depth: FormField;\n width: FormField;\n} = {\n depth: {\n helperText: \"Stall size in depth\",\n name: \"stallSize.depth\",\n placeholder: \"Stall Depth: \",\n },\n width: {\n helperText: \"Stall size in width\",\n name: \"stallSize.width\",\n placeholder: \"Stall Width: \",\n },\n};\n\nexport const stallholderPackaging: FormField = {\n helperText: \"Select packaging type, you can select more than one\",\n name: \"packaging\",\n placeholder: \"Packaging type\",\n};\n\nexport const stallholderPaymentMethod: FormField = {\n helperText: \"Select payment method\",\n name: \"paymentMethod\",\n placeholder: \"Payment Method type\",\n};\n\nexport const stallholderProducedIn: FormField = {\n helperText:\n \"Select where the product is produced, you can select more than one\",\n name: \"producedIn\",\n placeholder: \"Produced type\",\n};\n\nconst packagingTypes = [\n \"Biodegradable\",\n \"Compostable\",\n \"Recyclable\",\n \"Reusable\",\n \"Single-use\",\n \"Glass\",\n \"Paper\",\n \"Plastic\",\n \"Wood\",\n \"Other\",\n];\n\nconst producedIngTypes = [\n \"Commercial Kitchen\",\n \"Home Premises\",\n \"Factory\",\n \"Farm\",\n \"Other\",\n];\n\nexport const packagingOptions: OptionItem[] = mapArrayToOptions(packagingTypes);\nexport const producedIngOptions: OptionItem[] =\n mapArrayToOptions(producedIngTypes);\n","import { FormDateField, FormField, OptionItem } from \"../../types/global\";\nimport { mapArrayToOptions } from \"../../utils\";\n\nexport const marketBasicInfoFields: FormField[] = [\n {\n helperText: \"Name of the Market *\",\n name: \"name\",\n placeholder: \"Name\",\n },\n {\n helperText: \"Name of the Provider *\",\n name: \"provider\",\n placeholder: \"Provider\",\n },\n {\n helperText: \"Description of the Market *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n {\n helperText: \"Enter Promo code if you have one.\",\n name: \"promoCode\",\n placeholder: \"Promo code\",\n },\n];\n\nexport const marketStartDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"Start Date of the Market *\",\n name: \"startDate\",\n placeholder: \"Start Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"Start Time of the Market *\",\n name: \"startTime\",\n placeholder: \"Start Time\",\n },\n];\n\nexport const marketEndDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"End Date of the Market *\",\n name: \"endDate\",\n placeholder: \"End Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"End Time of the Market *\",\n name: \"endTime\",\n placeholder: \"End Time\",\n },\n];\n\nexport const availableTagTypes = [\n \"All Ages\",\n \"Day Market\",\n \"Family Friendly\",\n \"Free Entry\",\n \"Indoor Market\",\n \"Live Music\",\n \"Night Market\",\n \"Outdoor Market\",\n \"Pet Friendly\",\n \"Near Bustop\",\n \"Near Train Station\",\n \"Parking Available\",\n \"Toilet Available\",\n \"Wheelchair Accessible\",\n \"Near Playground\",\n \"Port Nearby\",\n];\n\nexport const tagOptions: OptionItem[] = mapArrayToOptions(availableTagTypes);\n","import { EnumRejectionPolicy } from \"../../enums\";\nimport { FormField, OptionItem } from \"../../types/global\";\nimport { mapArrayToOptions } from \"../../utils\";\n\nexport const stallApplicationInfo: FormField[] = [\n {\n helperText: \"Application Deadline of the Market *\",\n keyboardType: \"number-pad\",\n name: \"stallApplicationInfo.applicationDeadlineHours\",\n placeholder: \"Application Deadline Hours\",\n },\n {\n helperText: \"Stall Capacity of the Market *\",\n keyboardType: \"number-pad\",\n name: \"stallApplicationInfo.stallCapacity\",\n placeholder: \"Stall Capacity\",\n },\n {\n helperText: \"Payment Due Hours of the Market *\",\n keyboardType: \"number-pad\",\n name: \"stallApplicationInfo.paymentDueHours\",\n placeholder: \"Payment Due Hours\",\n },\n];\n\nexport const stallApplicationInfoPaymentTarget: FormField[] = [\n {\n helperText: \"Account holder name *\",\n name: \"stallApplicationInfo.paymentTarget.accountHolderName\",\n placeholder: \"Account holder name\",\n },\n {\n helperText: \"Account number *\",\n name: \"stallApplicationInfo.paymentTarget.accountNumber\",\n placeholder: \"Account number\",\n },\n {\n helperText: \"Link to payment target *\",\n name: \"stallApplicationInfo.paymentTarget.link\",\n placeholder: \"Link to payment target\",\n },\n];\n\nexport const marketPriceByDateFields: FormField[] = [\n {\n helperText: \"Market Price for this date *\",\n keyboardType: \"number-pad\",\n name: \"marketPrice\",\n placeholder: \"Market Price\",\n },\n];\n\nexport const rejectionPolicyOptions: OptionItem[] = mapArrayToOptions(\n Object.values(EnumRejectionPolicy),\n);\n","import { FormField } from \"../types/global\";\n\nexport const loginFields: FormField[] = [\n {\n helperText: \"Enter your email address\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n },\n {\n helperText: \"Enter your password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n];\n\nexport const registerFields: FormField[] = [\n {\n helperText: \"Enter your first name\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n },\n {\n helperText: \"Enter your last name\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n helperText: \"Enter your email address\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n },\n {\n helperText: \"Enter your password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n];\n\nexport const requestPasswordResetFields: FormField[] = [\n {\n helperText: \"Enter your email address\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n },\n];\n\nexport const resetPasswordFields: FormField[] = [\n {\n helperText: \"Enter your new password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n {\n helperText: \"Confirm your new password\",\n keyboardType: \"default\",\n name: \"confirmPassword\",\n placeholder: \"Confirm Password\",\n secureTextEntry: true,\n },\n];\n\nexport const validateTokenFields: FormField[] = [\n {\n disabled: true,\n helperText: \"Your email address\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n },\n {\n helperText: \"Enter the Verification code sent to your email\",\n keyboardType: \"number-pad\",\n name: \"token\",\n placeholder: \"Verification code\",\n },\n];\n","import { FormField } from \"../types/global\";\n\nexport const profileFields: FormField[] = [\n {\n disabled: true,\n helperText: \"Email cannot be changed\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n },\n {\n helperText: \"Enter your first name\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n },\n {\n helperText: \"Enter your last name\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n helperText: \"Enter your new password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n {\n helperText: \"Confirm your new password\",\n keyboardType: \"default\",\n name: \"confirmPassword\",\n placeholder: \"Confirm Password\",\n secureTextEntry: true,\n },\n];\n","import { Category } from \"../types/global\";\n\nexport const availableCategories: Category[] = [\n {\n id: \"food-drinks\",\n name: \"Food & Drinks\",\n subcategories: [\n {\n id: \"fresh-food-groceries\",\n items: [\n \"Fruits & Vegetables\",\n \"Meat & Seafood\",\n \"Dairy & Eggs\",\n \"Bakery & Desserts\",\n \"Spices & Condiments\",\n \"Packaged & Specialty Foods\",\n \"Other\",\n ],\n name: \"Fresh Food & Groceries\",\n },\n {\n id: \"beverages-specialty-drinks\",\n items: [\n \"Fresh Juices & Smoothies\",\n \"Coffee & Teas\",\n \"Dairy & Plant-Based Drinks\",\n \"Alcoholic Beverages\",\n \"Other\",\n ],\n name: \"Beverages & Specialty Drinks\",\n },\n {\n id: \"prepared-street-foods\",\n items: [\n \"Local & International Specialties\",\n \"Vegan & Vegetarian Options\",\n \"Candies & Sweets\",\n \"BBQ & Grilled Foods\",\n \"Other\",\n ],\n name: \"Prepared & Street Foods\",\n },\n ],\n },\n {\n id: \"handmade-local-products\",\n name: \"Handmade & Local Products\",\n subcategories: [\n {\n id: \"home-lifestyle\",\n items: [\n \"Textiles & Home Decor\",\n \"Pottery & Ceramics\",\n \"Woodwork & Carving\",\n \"Handwoven Baskets & Bags\",\n \"Other\",\n ],\n name: \"Home & Lifestyle\",\n },\n {\n id: \"fashion-accessories\",\n items: [\n \"Leather & Hand-Stitched Items\",\n \"Handcrafted Jewelry & Accessories\",\n \"Traditional & Cultural Clothing\",\n \"Other\",\n ],\n name: \"Fashion & Accessories\",\n },\n {\n id: \"eco-friendly-products\",\n items: [\n \"Recycled Goods\",\n \"Eco-Packaging\",\n \"Sustainable Fashion & Accessories\",\n \"Other\",\n ],\n name: \"Eco-Friendly & Sustainable Products\",\n },\n {\n id: \"arts-crafts\",\n items: [\"Art & Crafts\", \"Traditional & Cultural Items\", \"Other\"],\n name: \"Arts & Crafts\",\n },\n ],\n },\n {\n id: \"clothing-fashion\",\n name: \"Clothing & Fashion\",\n subcategories: [\n {\n id: \"casual-modern-wear\",\n items: [\n \"Modern & Casual Clothes\",\n \"Jackets & Outerwear\",\n \"Baby & Kids Clothing\",\n \"Scarves & Shawls\",\n \"Second-Hand Designer Clothes\",\n \"Underwear\",\n \"Other\",\n ],\n name: \"Casual & Modern Wear\",\n },\n {\n id: \"footwear\",\n items: [\n \"Everyday Shoes\",\n \"Formal Shoes\",\n \"Handmade & Leather Shoes\",\n \"Other\",\n ],\n name: \"Footwear\",\n },\n {\n id: \"bags-accessories\",\n items: [\n \"Bags, Belts, Hats, Sunglasses, Watches\",\n \"Retro and Vintage Accessories\",\n \"Other\",\n ],\n name: \"Bags & Accessories\",\n },\n {\n id: \"luxury-designer-brands\",\n items: [\n \"Luxury Clothing\",\n \"Designer Shoes\",\n \"Exclusive Accessories\",\n \"Other\",\n ],\n name: \"Luxury & Designer Brands\",\n },\n ],\n },\n {\n id: \"home-garden-household\",\n name: \"Home, Garden & Household Goods\",\n subcategories: [\n {\n id: \"home-essentials-kitchenware\",\n items: [\n \"Kitchenware & Dining\",\n \"Sustainable & Eco-Friendly Items\",\n \"Handmade & Artisan Home Goods\",\n \"Other\",\n ],\n name: \"Home Essentials & Kitchenware\",\n },\n {\n id: \"furniture-decor-organization\",\n items: [\n \"Furniture & Home Decor\",\n \"Textiles & Bedding\",\n \"Storage & Organization\",\n \"Other\",\n ],\n name: \"Furniture, Decor & Organization\",\n },\n {\n id: \"outdoor-cleaning-essentials\",\n items: [\n \"Garden, Plants & Decorations\",\n \"DIY & Home Improvement\",\n \"Cleaning Supplies & Household Essentials\",\n \"Other\",\n ],\n name: \"Outdoor & Cleaning Essentials\",\n },\n ],\n },\n {\n id: \"toys-pets\",\n name: \"Toys & Pets\",\n subcategories: [\n {\n id: \"handmade-eco-friendly-kids\",\n items: [\"Handmade & Local Toys\", \"Eco-Friendly Kids Products\", \"Other\"],\n name: \"Handmade & Eco-Friendly Kids Products\",\n },\n {\n id: \"toys-all-ages\",\n items: [\n \"Classic & Interactive Toys\",\n \"Building Blocks & Board Games\",\n \"Balloons & Party Accessories\",\n \"Other\",\n ],\n name: \"Toys for All Ages\",\n },\n {\n id: \"pet-products-animal-goods\",\n items: [\n \"Natural Pet Foods\",\n \"Handmade Pet Accessories\",\n \"Livestock & Farm Supplies\",\n \"Other\",\n ],\n name: \"Pet Products & Animal Goods\",\n },\n ],\n },\n {\n id: \"health-wellness-selfcare\",\n name: \"Health, Wellness & Self-Care\",\n subcategories: [\n {\n id: \"natural-remedies-supplements\",\n items: [\n \"Vitamins, Minerals & Herbal Remedies\",\n \"Superfoods, Probiotics & Detox Teas\",\n \"Other\",\n ],\n name: \"Natural Remedies & Supplements\",\n },\n {\n id: \"organic-natural-products\",\n items: [\n \"Organic Produce, Honey, Nuts & Seeds\",\n \"Gluten-Free & Specialty Items\",\n \"Other\",\n ],\n name: \"Organic & Natural Products\",\n },\n {\n id: \"fitness-sports-nutrition\",\n items: [\"Protein Powders & Bars\", \"Sports & Energy Drinks\", \"Other\"],\n name: \"Fitness & Sports Nutrition\",\n },\n {\n id: \"mental-wellbeing-relaxation\",\n items: [\n \"Yoga, Meditation & Stress-Relief Tools\",\n \"Massage & Muscle Relaxers\",\n \"Motivational Books & Tools\",\n \"Other\",\n ],\n name: \"Mental Wellbeing & Relaxation\",\n },\n ],\n },\n {\n id: \"electronics-technology\",\n name: \"Electronics & Technology\",\n subcategories: [\n {\n id: \"electronic-devices-accessories\",\n items: [\n \"Refurbished & Used Electronics\",\n \"Smartphones & Gadgets\",\n \"Computers & Gaming Gear\",\n \"Photography & Audio Equipment\",\n \"Other\",\n ],\n name: \"Electronic Devices & Accessories\",\n },\n ],\n },\n {\n id: \"antiques-collectibles\",\n name: \"Antiques & Collectibles\",\n subcategories: [\n {\n id: \"antiques-vintage-furniture\",\n items: [\n \"Old Clocks, Paintings & Sculptures\",\n \"Coins, Stamps & Rare Books\",\n \"Antique & Vintage Furniture & Home Decor\",\n \"Other\",\n ],\n name: \"Antiques & Vintage Furniture\",\n },\n {\n id: \"historical-rare-items\",\n items: [\n \"War Relics & Military Medals\",\n \"Limited Edition Artworks & Memorabilia\",\n \"Other\",\n ],\n name: \"Historical & Rare Items\",\n },\n {\n id: \"collectible-toys-games\",\n items: [\n \"Limited Edition Figures & Retro Board Games\",\n \"Pop Culture & Sports Memorabilia\",\n \"Other\",\n ],\n name: \"Collectible Toys & Games\",\n },\n ],\n },\n];\n\nexport const categoryColors: Record<string, string> = {\n \"antiques-collectibles\": \"#DE630A\",\n \"clothing-fashion\": \"#6A08C5\",\n \"electronics-technology\": \"#0303BE\",\n \"food-drinks\": \"#FF004D\",\n \"handmade-local-products\": \"#8E4827\",\n \"health-wellness-selfcare\": \"#7DFB03\",\n \"home-garden-household\": \"#006400\",\n \"toys-pets\": \"#3357FF\",\n};\n"],"mappings":";;;;;;;;AAGO,IAAM,6BAA0C;AAAA,EACrD;AAAA,IACE,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AACF;AAEO,IAAM,2BAAsC;AAAA,EACjD,YACE;AAAA,EACF,MAAM;AAAA,EACN,aAAa;AACf;AAEO,IAAM,yBAAoC;AAAA,EAC/C,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AACf;AAEO,IAAM,6BAA8C;AAAA,EACzD;AAAA,IACE,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AACF;AAEO,IAAM,2BAA4C;AAAA,EACvD;AAAA,IACE,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,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ACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,eAAe;AAAA,MACb;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,MAAM;AAAA,MACR;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,MAAM;AAAA,MACR;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,iBAAyC;AAAA,EACpD,yBAAyB;AAAA,EACzB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,eAAe;AAAA,EACf,2BAA2B;AAAA,EAC3B,4BAA4B;AAAA,EAC5B,yBAAyB;AAAA,EACzB,aAAa;AACf;","names":[]}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumRejectionPolicy, EnumUserLicence, EnumUserRole, EnumNotification } from './enums/index.mjs';
|
|
2
|
+
import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
|
|
4
|
+
type RelationLog = {
|
|
5
|
+
createdAt?: string;
|
|
6
|
+
updatedAt?: string;
|
|
7
|
+
updatedBy: {
|
|
8
|
+
resourceId: string;
|
|
9
|
+
resourceName: string;
|
|
10
|
+
resourceType: EnumResourceType;
|
|
11
|
+
startDate: string;
|
|
12
|
+
toStatus: EnumInviteStatus;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type RelationDate = {
|
|
16
|
+
lastUpdateBy: string;
|
|
17
|
+
marketPrice: number;
|
|
18
|
+
startDate: string;
|
|
19
|
+
status: EnumInviteStatus;
|
|
20
|
+
};
|
|
21
|
+
interface RelationType {
|
|
22
|
+
_id?: string;
|
|
23
|
+
apiMessage?: string;
|
|
24
|
+
createdAt?: string;
|
|
25
|
+
lastUpdateBy: EnumResourceType;
|
|
26
|
+
marketId: string;
|
|
27
|
+
relationDates: RelationDate[];
|
|
28
|
+
relationLogs?: RelationLog[] | null;
|
|
29
|
+
relationType: EnumRelationResource;
|
|
30
|
+
stallholderId: string;
|
|
31
|
+
updatedAt?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface DateTimeWithPriceType extends DateTimeType {
|
|
35
|
+
marketPrice: number;
|
|
36
|
+
}
|
|
37
|
+
interface MarketInfoType {
|
|
38
|
+
_id?: string;
|
|
39
|
+
applicationDeadlineHours: number;
|
|
40
|
+
dateTime: DateTimeWithPriceType[];
|
|
41
|
+
paymentDueHours: number;
|
|
42
|
+
paymentMethod: EnumPaymentMethod;
|
|
43
|
+
paymentTarget: {
|
|
44
|
+
accountHolderName?: string;
|
|
45
|
+
accountNumber?: string;
|
|
46
|
+
link?: string;
|
|
47
|
+
};
|
|
48
|
+
rejectionPolicy: EnumRejectionPolicy;
|
|
49
|
+
stallCapacity: number;
|
|
50
|
+
}
|
|
51
|
+
interface MarketFormData extends BaseResourceTypeFormData {
|
|
52
|
+
dateTime: DateTimeType[];
|
|
53
|
+
location: LocationType;
|
|
54
|
+
provider: string;
|
|
55
|
+
tags?: string[] | null;
|
|
56
|
+
}
|
|
57
|
+
interface CreateMarketInfoFormData {
|
|
58
|
+
control: Control<MarketInfoType, any>;
|
|
59
|
+
fields: MarketInfoType;
|
|
60
|
+
formState: {
|
|
61
|
+
errors: FieldErrors<MarketInfoType>;
|
|
62
|
+
};
|
|
63
|
+
handleSubmit: UseFormHandleSubmit<MarketInfoType, any>;
|
|
64
|
+
reset: UseFormReset<MarketInfoType>;
|
|
65
|
+
setValue: UseFormSetValue<MarketInfoType>;
|
|
66
|
+
watch: UseFormWatch<MarketInfoType>;
|
|
67
|
+
}
|
|
68
|
+
interface CreateMarketFormData {
|
|
69
|
+
control: Control<MarketFormData, any>;
|
|
70
|
+
fields: MarketFormData;
|
|
71
|
+
formState: {
|
|
72
|
+
errors: FieldErrors<MarketFormData>;
|
|
73
|
+
};
|
|
74
|
+
handleSubmit: UseFormHandleSubmit<MarketFormData, any>;
|
|
75
|
+
reset: UseFormReset<MarketFormData>;
|
|
76
|
+
setValue: UseFormSetValue<MarketFormData>;
|
|
77
|
+
watch: UseFormWatch<MarketFormData>;
|
|
78
|
+
}
|
|
79
|
+
interface MarketType extends BaseResourceType {
|
|
80
|
+
dateTime: MarketFormData["dateTime"];
|
|
81
|
+
location: MarketFormData["location"];
|
|
82
|
+
provider: string;
|
|
83
|
+
tags: string[] | null;
|
|
84
|
+
}
|
|
85
|
+
interface MarketWithConnectionDatesType extends MarketType {
|
|
86
|
+
relationDates: RelationDate[] | undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
type StallholderLocation = {
|
|
90
|
+
dateTime: Nullable<DateTimeType> | null;
|
|
91
|
+
description?: string | null;
|
|
92
|
+
location: Nullable<LocationType> | null;
|
|
93
|
+
resourceId?: MapMultiLocation["resourceId"];
|
|
94
|
+
resourceName?: MapMultiLocation["resourceName"];
|
|
95
|
+
resourceType?: MapMultiLocation["resourceType"];
|
|
96
|
+
};
|
|
97
|
+
interface StallholderFormData extends BaseResourceTypeFormData {
|
|
98
|
+
categories: Category[];
|
|
99
|
+
locations?: StallholderLocation[] | null;
|
|
100
|
+
multiLocation: boolean;
|
|
101
|
+
products: string[];
|
|
102
|
+
specialities?: string[] | null;
|
|
103
|
+
}
|
|
104
|
+
interface CreateStallholderFormData {
|
|
105
|
+
control: Control<StallholderFormData, any>;
|
|
106
|
+
fields: StallholderFormData;
|
|
107
|
+
formState: {
|
|
108
|
+
errors: FieldErrors<StallholderFormData>;
|
|
109
|
+
};
|
|
110
|
+
handleSubmit: UseFormHandleSubmit<StallholderFormData, any>;
|
|
111
|
+
reset: UseFormReset<StallholderFormData>;
|
|
112
|
+
setValue: UseFormSetValue<StallholderFormData>;
|
|
113
|
+
watch: UseFormWatch<StallholderFormData>;
|
|
114
|
+
}
|
|
115
|
+
type StallholderAttributes = {
|
|
116
|
+
details?: string | null;
|
|
117
|
+
isRequired: boolean;
|
|
118
|
+
};
|
|
119
|
+
type StallholderApplyFormFormData = {
|
|
120
|
+
_id?: string;
|
|
121
|
+
active: boolean;
|
|
122
|
+
electricity: StallholderAttributes;
|
|
123
|
+
foodSafetyGradeFiles?: string[] | null;
|
|
124
|
+
foodSafetyGradeFilesUpload?: string[] | null;
|
|
125
|
+
gazebo: StallholderAttributes;
|
|
126
|
+
packaging: string[];
|
|
127
|
+
paymentMethod: EnumPaymentMethod;
|
|
128
|
+
priceRange: {
|
|
129
|
+
max: number;
|
|
130
|
+
min: number;
|
|
131
|
+
};
|
|
132
|
+
producedIn: string[];
|
|
133
|
+
stallSize: {
|
|
134
|
+
depth: number;
|
|
135
|
+
width: number;
|
|
136
|
+
};
|
|
137
|
+
table: StallholderAttributes;
|
|
138
|
+
};
|
|
139
|
+
interface CreateStallholderApplyFormFormData {
|
|
140
|
+
control: Control<StallholderApplyFormFormData, any>;
|
|
141
|
+
fields: StallholderApplyFormFormData;
|
|
142
|
+
formState: {
|
|
143
|
+
errors: FieldErrors<StallholderApplyFormFormData>;
|
|
144
|
+
};
|
|
145
|
+
handleSubmit: UseFormHandleSubmit<StallholderApplyFormFormData, any>;
|
|
146
|
+
reset: UseFormReset<StallholderApplyFormFormData>;
|
|
147
|
+
setValue: UseFormSetValue<StallholderApplyFormFormData>;
|
|
148
|
+
watch: UseFormWatch<StallholderApplyFormFormData>;
|
|
149
|
+
}
|
|
150
|
+
interface StallholderType extends BaseResourceType {
|
|
151
|
+
applyFormId: string;
|
|
152
|
+
categories: StallholderFormData["categories"];
|
|
153
|
+
locations: StallholderLocation[] | null;
|
|
154
|
+
multiLocation: boolean;
|
|
155
|
+
products: StallholderFormData["products"];
|
|
156
|
+
specialities: string[] | null;
|
|
157
|
+
}
|
|
158
|
+
interface StallholderApplyFormType {
|
|
159
|
+
_id: string;
|
|
160
|
+
active: boolean;
|
|
161
|
+
electricity: {
|
|
162
|
+
details: string | null;
|
|
163
|
+
isRequired: boolean;
|
|
164
|
+
};
|
|
165
|
+
foodSafetyGradeFiles: string[] | null;
|
|
166
|
+
gazebo: {
|
|
167
|
+
details: string | null;
|
|
168
|
+
isRequired: boolean;
|
|
169
|
+
};
|
|
170
|
+
packaging: string[];
|
|
171
|
+
paymentMethod: EnumPaymentMethod;
|
|
172
|
+
priceRange: {
|
|
173
|
+
max: number;
|
|
174
|
+
min: number;
|
|
175
|
+
};
|
|
176
|
+
producedIn: string[];
|
|
177
|
+
stallholderId: string;
|
|
178
|
+
stallSize: {
|
|
179
|
+
depth: number;
|
|
180
|
+
width: number;
|
|
181
|
+
};
|
|
182
|
+
table: {
|
|
183
|
+
details: string | null;
|
|
184
|
+
isRequired: boolean;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
interface SatllholderWithConnectionDatesType extends StallholderType {
|
|
188
|
+
relationDates: RelationDate[] | undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
type UserFormData = {
|
|
192
|
+
_id?: string;
|
|
193
|
+
active: boolean;
|
|
194
|
+
avatar?: ResourceImageType | null;
|
|
195
|
+
avatarUpload?: ResourceImageType | null;
|
|
196
|
+
confirmPassword: string;
|
|
197
|
+
email: string;
|
|
198
|
+
firstName: string;
|
|
199
|
+
lastName: string;
|
|
200
|
+
password: string;
|
|
201
|
+
preferredRegion: string;
|
|
202
|
+
role: EnumUserRole;
|
|
203
|
+
};
|
|
204
|
+
interface CreateUserFormData {
|
|
205
|
+
control: Control<UserFormData, any>;
|
|
206
|
+
fields: UserFormData;
|
|
207
|
+
formState: {
|
|
208
|
+
errors: FieldErrors<UserFormData>;
|
|
209
|
+
};
|
|
210
|
+
handleSubmit: UseFormHandleSubmit<UserFormData, any>;
|
|
211
|
+
reset: UseFormReset<UserFormData>;
|
|
212
|
+
setValue: UseFormSetValue<UserFormData>;
|
|
213
|
+
watch: UseFormWatch<UserFormData>;
|
|
214
|
+
}
|
|
215
|
+
interface UserType {
|
|
216
|
+
_id: string;
|
|
217
|
+
active: boolean;
|
|
218
|
+
avatar: ResourceImageType | null;
|
|
219
|
+
createdAt: string;
|
|
220
|
+
email: string;
|
|
221
|
+
favourites: {
|
|
222
|
+
markets: string[];
|
|
223
|
+
stallholders: string[];
|
|
224
|
+
};
|
|
225
|
+
firstName: string;
|
|
226
|
+
lastName: string;
|
|
227
|
+
licences: EnumUserLicence[] | null;
|
|
228
|
+
markets: string[] | null;
|
|
229
|
+
password: string;
|
|
230
|
+
preferredRegion: string;
|
|
231
|
+
role: EnumUserRole;
|
|
232
|
+
stallholder: string | null;
|
|
233
|
+
updatedAt: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
type Nullable<T> = {
|
|
237
|
+
[K in keyof T]: T[K] | null | undefined;
|
|
238
|
+
};
|
|
239
|
+
type ResourceImageType = {
|
|
240
|
+
source: string;
|
|
241
|
+
title: string;
|
|
242
|
+
};
|
|
243
|
+
interface BaseResourceTypeFormData {
|
|
244
|
+
_id?: string;
|
|
245
|
+
active: boolean;
|
|
246
|
+
cover: ResourceImageType;
|
|
247
|
+
coverUpload?: ResourceImageType | null;
|
|
248
|
+
description: string;
|
|
249
|
+
images?: ResourceImageType[] | null;
|
|
250
|
+
imagesUpload?: ResourceImageType[] | null;
|
|
251
|
+
logo?: ResourceImageType | null;
|
|
252
|
+
logoUpload?: ResourceImageType | null;
|
|
253
|
+
name: string;
|
|
254
|
+
promoCode?: string | null;
|
|
255
|
+
region: string;
|
|
256
|
+
}
|
|
257
|
+
interface BaseResourceType {
|
|
258
|
+
_id: string;
|
|
259
|
+
active: boolean;
|
|
260
|
+
cover: ResourceImageType;
|
|
261
|
+
createdAt: string;
|
|
262
|
+
description: string;
|
|
263
|
+
images: ResourceImageType[] | null;
|
|
264
|
+
logo: ResourceImageType | null;
|
|
265
|
+
name: string;
|
|
266
|
+
owner: Pick<UserType, "_id" | "email" | "licences">;
|
|
267
|
+
promoCode: string | null;
|
|
268
|
+
region: string;
|
|
269
|
+
relationIds: string[] | null;
|
|
270
|
+
updatedAt: string;
|
|
271
|
+
}
|
|
272
|
+
type LocationType = {
|
|
273
|
+
city: string;
|
|
274
|
+
coordinates: number[];
|
|
275
|
+
country: string;
|
|
276
|
+
fullAddress: string;
|
|
277
|
+
latitude: number;
|
|
278
|
+
longitude: number;
|
|
279
|
+
region: string;
|
|
280
|
+
type: "Point";
|
|
281
|
+
};
|
|
282
|
+
type DateTimeType = {
|
|
283
|
+
endDate: string;
|
|
284
|
+
endTime: string;
|
|
285
|
+
startDate: string;
|
|
286
|
+
startTime: string;
|
|
287
|
+
};
|
|
288
|
+
type Region = {
|
|
289
|
+
latitude: number;
|
|
290
|
+
latitudeDelta: number;
|
|
291
|
+
longitude: number;
|
|
292
|
+
longitudeDelta: number;
|
|
293
|
+
};
|
|
294
|
+
type GeocodeLocation = Pick<LocationType, "latitude" | "longitude">;
|
|
295
|
+
type MapMultiLocation = {
|
|
296
|
+
dateTime: DateTimeType | null;
|
|
297
|
+
location: LocationType | null;
|
|
298
|
+
resourceId?: string;
|
|
299
|
+
resourceName?: string;
|
|
300
|
+
resourceType?: EnumResourceType;
|
|
301
|
+
};
|
|
302
|
+
interface FormField {
|
|
303
|
+
disabled?: boolean;
|
|
304
|
+
helperText?: string;
|
|
305
|
+
isTextArea?: boolean;
|
|
306
|
+
keyboardType?: "default" | "email-address" | "number-pad";
|
|
307
|
+
name: string;
|
|
308
|
+
placeholder: string;
|
|
309
|
+
secureTextEntry?: boolean;
|
|
310
|
+
}
|
|
311
|
+
interface FormDateField {
|
|
312
|
+
dateMode: "date" | "time";
|
|
313
|
+
helperText?: string;
|
|
314
|
+
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
315
|
+
placeholder: string;
|
|
316
|
+
}
|
|
317
|
+
interface Subcategory {
|
|
318
|
+
id: string;
|
|
319
|
+
name: string;
|
|
320
|
+
items?: string[] | null;
|
|
321
|
+
}
|
|
322
|
+
interface Category {
|
|
323
|
+
id: string;
|
|
324
|
+
name: string;
|
|
325
|
+
subcategories?: Subcategory[] | null;
|
|
326
|
+
}
|
|
327
|
+
type OptionItem = {
|
|
328
|
+
value: string;
|
|
329
|
+
label: string;
|
|
330
|
+
};
|
|
331
|
+
type ImageObjectType = {
|
|
332
|
+
uri: string;
|
|
333
|
+
type: string;
|
|
334
|
+
name: string;
|
|
335
|
+
};
|
|
336
|
+
type NotificationType = {
|
|
337
|
+
createdBy: string;
|
|
338
|
+
important: boolean;
|
|
339
|
+
message: string;
|
|
340
|
+
notifyUser: string | null;
|
|
341
|
+
resourceId: string;
|
|
342
|
+
resourceType: EnumNotification;
|
|
343
|
+
};
|
|
344
|
+
interface ResourceConnectionsType {
|
|
345
|
+
markets: MarketWithConnectionDatesType[] | null;
|
|
346
|
+
stallholders: SatllholderWithConnectionDatesType[] | null;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export type { BaseResourceTypeFormData as B, Category as C, DateTimeType as D, FormField as F, GeocodeLocation as G, ImageObjectType as I, LocationType as L, MarketType as M, NotificationType as N, OptionItem as O, RelationType as R, StallholderType as S, UserType as U, FormDateField as a, MarketInfoType as b, ResourceConnectionsType as c, StallholderApplyFormType as d, StallholderFormData as e, CreateStallholderFormData as f, StallholderApplyFormFormData as g, CreateStallholderApplyFormFormData as h, MarketFormData as i, CreateMarketFormData as j, CreateMarketInfoFormData as k, UserFormData as l, CreateUserFormData as m, Nullable as n, ResourceImageType as o, BaseResourceType as p, Region as q, MapMultiLocation as r, Subcategory as s, MarketWithConnectionDatesType as t, RelationLog as u, RelationDate as v, StallholderLocation as w, StallholderAttributes as x, SatllholderWithConnectionDatesType as y };
|