@123usmanhaider321/ui 0.1.8 → 1.0.2

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 (545) hide show
  1. package/README.md +416 -31
  2. package/dist/images/icon/1LINK.svg +50 -0
  3. package/dist/images/icon/CreditCard.svg +83 -0
  4. package/dist/images/icon/Easypaisa.png +0 -0
  5. package/dist/images/icon/MobileWallet.png +0 -0
  6. package/dist/images/icon/Raast-Logo.png +0 -0
  7. package/dist/images/icon/VISA.png +0 -0
  8. package/dist/images/icon/add-circle-1.svg +5 -0
  9. package/dist/images/icon/check-circle-broken.svg +3 -0
  10. package/dist/images/icon/close-circle.svg +5 -0
  11. package/dist/images/icon/jazzcash.png +0 -0
  12. package/dist/images/icon/loading_icon.json +3347 -0
  13. package/dist/images/icon/mastercard-logo.webp +0 -0
  14. package/dist/images/icon/paymo.jpeg +0 -0
  15. package/dist/images/icon/preview-svgrepo-com.svg +36 -0
  16. package/dist/images/icon/trash.svg +7 -0
  17. package/dist/images/icon/unionpay-logo.svg +9 -0
  18. package/dist/index-BLoegwT6.js +60476 -0
  19. package/dist/index-BLoegwT6.js.map +1 -0
  20. package/dist/index-CPnu5V8f.js +11119 -0
  21. package/dist/index-CPnu5V8f.js.map +1 -0
  22. package/dist/index.d.ts +1 -10
  23. package/dist/index.es-C5pDhGOr.js +16734 -0
  24. package/dist/index.es-C5pDhGOr.js.map +1 -0
  25. package/dist/index.js +40 -12
  26. package/dist/index.js.map +1 -1
  27. package/dist/loading_icon-n5H5dQBl.js +3375 -0
  28. package/dist/loading_icon-n5H5dQBl.js.map +1 -0
  29. package/dist/src/components/Alert/ErrorAlert.d.ts +6 -0
  30. package/dist/src/components/Alert/SuccessAlert.d.ts +6 -0
  31. package/dist/{components → src/components}/FormBuilder/DiscountInput.d.ts +3 -6
  32. package/dist/{components → src/components}/FormBuilder/FormBuilder.d.ts +2 -11
  33. package/dist/{components → src/components}/FormBuilder/QuestionCard.d.ts +0 -5
  34. package/dist/{components → src/components}/FormBuilder/QuestionEditor.d.ts +0 -5
  35. package/dist/{components → src/components}/FormBuilder/SortableQuestionList.d.ts +0 -5
  36. package/dist/src/components/FormBuilder/questionIcons.d.ts +5 -0
  37. package/dist/{components/EventAddForm → src/components/NewAddEvent}/AddEventLayout.d.ts +2 -1
  38. package/dist/{components/EventAddForm → src/components/NewAddEvent}/AddEventStepper.d.ts +2 -2
  39. package/dist/{components/EventAddForm → src/components/NewAddEvent}/common/ConfirmationModal.d.ts +1 -1
  40. package/dist/src/components/NewAddEvent/components/EventSubmissionConfirmationModal.d.ts +14 -0
  41. package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/StepTwo/TicketTierSection.d.ts +1 -1
  42. package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/TicketTierForm.d.ts +1 -1
  43. package/dist/{components/EventAddForm → src/components/NewAddEvent}/hooks/useStepperForm.d.ts +22 -22
  44. package/dist/{components/EventAddForm → src/components/NewAddEvent}/hooks/useTicketTierForm.d.ts +63 -15
  45. package/dist/src/components/NewAddEvent/schemas/step1.d.ts +211 -0
  46. package/dist/src/components/NewAddEvent/schemas/step2.d.ts +411 -0
  47. package/dist/{components/EventAddForm → src/components/NewAddEvent}/schemas/utils.d.ts +8 -2
  48. package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/IndividualFormStep.d.ts +1 -1
  49. package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/SocialProfilesStep.d.ts +1 -1
  50. package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/TeamFormStep.d.ts +1 -1
  51. package/dist/src/components/Spinner/spinner.d.ts +4 -0
  52. package/dist/src/components/TicketlyUIProvider.d.ts +35 -0
  53. package/dist/src/components/common/Loader/index.d.ts +8 -0
  54. package/dist/src/components/common/Modals/ConfirmationModal.d.ts +7 -0
  55. package/dist/{components/FormInput → src/components/ui}/FormInput.d.ts +1 -1
  56. package/dist/src/components/ui/Loader.d.ts +4 -0
  57. package/dist/{components/Button/Button.d.ts → src/components/ui/button.d.ts} +1 -1
  58. package/dist/src/index.d.ts +10 -0
  59. package/dist/{lib → src/lib}/actions.d.ts +0 -126
  60. package/dist/src/lib/dom-utils.d.ts +2 -0
  61. package/dist/src/lib/storage-utils.d.ts +5 -0
  62. package/dist/src/lib/types.d.ts +258 -0
  63. package/dist/src/redux/baseQuery.d.ts +16 -0
  64. package/dist/{services → src/redux/features}/eventApi.d.ts +1053 -1745
  65. package/dist/src/redux/features/globalSlice.d.ts +17 -0
  66. package/dist/{services → src/redux/features/single-event}/single-event-api.d.ts +856 -1190
  67. package/dist/src/redux/types.d.ts +2 -0
  68. package/dist/src/services/library-services.d.ts +15 -0
  69. package/dist/src/services/remote-config.d.ts +27 -0
  70. package/dist/{services → src/services}/utils.d.ts +1 -1
  71. package/dist/src/theme/colors.d.ts +127 -0
  72. package/dist/src/theme/typography.d.ts +13 -0
  73. package/dist/src/types/api.d.ts +18 -0
  74. package/dist/style.css +2984 -0
  75. package/dist/styles.css +3760 -4014
  76. package/package.json +78 -68
  77. package/dist/_virtual/_commonjsHelpers.js +0 -9
  78. package/dist/_virtual/_commonjsHelpers.js.map +0 -1
  79. package/dist/_virtual/customParseFormat.js +0 -5
  80. package/dist/_virtual/customParseFormat.js.map +0 -1
  81. package/dist/_virtual/dayjs.min.js +0 -5
  82. package/dist/_virtual/dayjs.min.js.map +0 -1
  83. package/dist/_virtual/duration.js +0 -5
  84. package/dist/_virtual/duration.js.map +0 -1
  85. package/dist/_virtual/index.js +0 -5
  86. package/dist/_virtual/index.js.map +0 -1
  87. package/dist/_virtual/isBetween.js +0 -5
  88. package/dist/_virtual/isBetween.js.map +0 -1
  89. package/dist/_virtual/relativeTime.js +0 -5
  90. package/dist/_virtual/relativeTime.js.map +0 -1
  91. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
  92. package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
  93. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
  94. package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
  95. package/dist/_virtual/with-selector.development.js +0 -5
  96. package/dist/_virtual/with-selector.development.js.map +0 -1
  97. package/dist/_virtual/with-selector.js +0 -5
  98. package/dist/_virtual/with-selector.js.map +0 -1
  99. package/dist/_virtual/with-selector.production.js +0 -5
  100. package/dist/_virtual/with-selector.production.js.map +0 -1
  101. package/dist/components/Alert/Alert.js +0 -51
  102. package/dist/components/Alert/Alert.js.map +0 -1
  103. package/dist/components/Button/Button.js +0 -52
  104. package/dist/components/Button/Button.js.map +0 -1
  105. package/dist/components/Button/Button.test.d.ts +0 -1
  106. package/dist/components/Button/index.d.ts +0 -1
  107. package/dist/components/Checkbox/Checkbox.js +0 -50
  108. package/dist/components/Checkbox/Checkbox.js.map +0 -1
  109. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
  110. package/dist/components/Checkbox/index.d.ts +0 -1
  111. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +0 -25
  112. package/dist/components/CheckboxGroup/CheckboxGroup.js +0 -99
  113. package/dist/components/CheckboxGroup/CheckboxGroup.js.map +0 -1
  114. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +0 -15
  115. package/dist/components/ConfirmationModal/ConfirmationModal.js +0 -136
  116. package/dist/components/ConfirmationModal/ConfirmationModal.js.map +0 -1
  117. package/dist/components/ConfirmationModal/index.d.ts +0 -2
  118. package/dist/components/CustomSelect/CustomSelect.js +0 -259
  119. package/dist/components/CustomSelect/CustomSelect.js.map +0 -1
  120. package/dist/components/EventAddForm/AddEventLayout.js +0 -227
  121. package/dist/components/EventAddForm/AddEventLayout.js.map +0 -1
  122. package/dist/components/EventAddForm/AddEventStepper.js +0 -719
  123. package/dist/components/EventAddForm/AddEventStepper.js.map +0 -1
  124. package/dist/components/EventAddForm/common/ConfirmationModal.js +0 -136
  125. package/dist/components/EventAddForm/common/ConfirmationModal.js.map +0 -1
  126. package/dist/components/EventAddForm/common/DescriptionModal.js +0 -70
  127. package/dist/components/EventAddForm/common/DescriptionModal.js.map +0 -1
  128. package/dist/components/EventAddForm/components/AnimatedBackground.d.ts +0 -8
  129. package/dist/components/EventAddForm/components/ApprovalConfirmationModal.d.ts +0 -7
  130. package/dist/components/EventAddForm/components/CheckboxGroup.js +0 -92
  131. package/dist/components/EventAddForm/components/CheckboxGroup.js.map +0 -1
  132. package/dist/components/EventAddForm/components/CustomMeetingForm.js +0 -237
  133. package/dist/components/EventAddForm/components/CustomMeetingForm.js.map +0 -1
  134. package/dist/components/EventAddForm/components/DateTimeField.js +0 -173
  135. package/dist/components/EventAddForm/components/DateTimeField.js.map +0 -1
  136. package/dist/components/EventAddForm/components/EventSubmissionConfirmationModal.d.ts +0 -33
  137. package/dist/components/EventAddForm/components/EventSubmissionConfirmationModal.js +0 -366
  138. package/dist/components/EventAddForm/components/EventSubmissionConfirmationModal.js.map +0 -1
  139. package/dist/components/EventAddForm/components/FileUpload.js +0 -412
  140. package/dist/components/EventAddForm/components/FileUpload.js.map +0 -1
  141. package/dist/components/EventAddForm/components/FormBuilderProceedModal.js +0 -197
  142. package/dist/components/EventAddForm/components/FormBuilderProceedModal.js.map +0 -1
  143. package/dist/components/EventAddForm/components/GoogleMapsAutocompleteInput.js +0 -1179
  144. package/dist/components/EventAddForm/components/GoogleMapsAutocompleteInput.js.map +0 -1
  145. package/dist/components/EventAddForm/components/InputField.d.ts +0 -15
  146. package/dist/components/EventAddForm/components/RadioGroupButton.d.ts +0 -14
  147. package/dist/components/EventAddForm/components/SelectField.d.ts +0 -19
  148. package/dist/components/EventAddForm/components/SingleDateTimeInput.js +0 -102
  149. package/dist/components/EventAddForm/components/SingleDateTimeInput.js.map +0 -1
  150. package/dist/components/EventAddForm/components/StepTwo/CustomFormSection.js +0 -277
  151. package/dist/components/EventAddForm/components/StepTwo/CustomFormSection.js.map +0 -1
  152. package/dist/components/EventAddForm/components/StepTwo/TicketTierSection.js +0 -148
  153. package/dist/components/EventAddForm/components/StepTwo/TicketTierSection.js.map +0 -1
  154. package/dist/components/EventAddForm/components/TicketTierForm.js +0 -418
  155. package/dist/components/EventAddForm/components/TicketTierForm.js.map +0 -1
  156. package/dist/components/EventAddForm/components/TicketTypeSelection.js +0 -93
  157. package/dist/components/EventAddForm/components/TicketTypeSelection.js.map +0 -1
  158. package/dist/components/EventAddForm/hooks/useStepperForm.js +0 -371
  159. package/dist/components/EventAddForm/hooks/useStepperForm.js.map +0 -1
  160. package/dist/components/EventAddForm/hooks/useTicketTierForm.js +0 -237
  161. package/dist/components/EventAddForm/hooks/useTicketTierForm.js.map +0 -1
  162. package/dist/components/EventAddForm/index.d.ts +0 -3
  163. package/dist/components/EventAddForm/index.js +0 -41
  164. package/dist/components/EventAddForm/index.js.map +0 -1
  165. package/dist/components/EventAddForm/schemas/index.d.ts +0 -2
  166. package/dist/components/EventAddForm/schemas/step1.d.ts +0 -47
  167. package/dist/components/EventAddForm/schemas/step1.js +0 -135
  168. package/dist/components/EventAddForm/schemas/step1.js.map +0 -1
  169. package/dist/components/EventAddForm/schemas/step2.d.ts +0 -138
  170. package/dist/components/EventAddForm/schemas/step2.js +0 -94
  171. package/dist/components/EventAddForm/schemas/step2.js.map +0 -1
  172. package/dist/components/EventAddForm/schemas/utils.js +0 -28
  173. package/dist/components/EventAddForm/schemas/utils.js.map +0 -1
  174. package/dist/components/EventAddForm/steps/IndividualFormStep.js +0 -85
  175. package/dist/components/EventAddForm/steps/IndividualFormStep.js.map +0 -1
  176. package/dist/components/EventAddForm/steps/SocialProfilesStep.js +0 -123
  177. package/dist/components/EventAddForm/steps/SocialProfilesStep.js.map +0 -1
  178. package/dist/components/EventAddForm/steps/StepOne.js +0 -462
  179. package/dist/components/EventAddForm/steps/StepOne.js.map +0 -1
  180. package/dist/components/EventAddForm/steps/StepTwo.js +0 -173
  181. package/dist/components/EventAddForm/steps/StepTwo.js.map +0 -1
  182. package/dist/components/EventAddForm/steps/TeamFormStep.js +0 -13
  183. package/dist/components/EventAddForm/steps/TeamFormStep.js.map +0 -1
  184. package/dist/components/FormBuilder/CategoryList.js +0 -242
  185. package/dist/components/FormBuilder/CategoryList.js.map +0 -1
  186. package/dist/components/FormBuilder/DiscountInput.js +0 -366
  187. package/dist/components/FormBuilder/DiscountInput.js.map +0 -1
  188. package/dist/components/FormBuilder/FormBuilder.js +0 -918
  189. package/dist/components/FormBuilder/FormBuilder.js.map +0 -1
  190. package/dist/components/FormBuilder/OptionList.js +0 -120
  191. package/dist/components/FormBuilder/OptionList.js.map +0 -1
  192. package/dist/components/FormBuilder/PaymentPreview.d.ts +0 -12
  193. package/dist/components/FormBuilder/PaymentPreview.js +0 -70
  194. package/dist/components/FormBuilder/PaymentPreview.js.map +0 -1
  195. package/dist/components/FormBuilder/PreviewInput.d.ts +0 -10
  196. package/dist/components/FormBuilder/PreviewInput.js +0 -143
  197. package/dist/components/FormBuilder/PreviewInput.js.map +0 -1
  198. package/dist/components/FormBuilder/QuestionCard.js +0 -252
  199. package/dist/components/FormBuilder/QuestionCard.js.map +0 -1
  200. package/dist/components/FormBuilder/QuestionEditor.js +0 -166
  201. package/dist/components/FormBuilder/QuestionEditor.js.map +0 -1
  202. package/dist/components/FormBuilder/RequiredToggle.js +0 -43
  203. package/dist/components/FormBuilder/RequiredToggle.js.map +0 -1
  204. package/dist/components/FormBuilder/SortableQuestionList.js +0 -137
  205. package/dist/components/FormBuilder/SortableQuestionList.js.map +0 -1
  206. package/dist/components/FormBuilder/index.d.ts +0 -4
  207. package/dist/components/FormBuilder/utils.js +0 -229
  208. package/dist/components/FormBuilder/utils.js.map +0 -1
  209. package/dist/components/FormInput/FormInput.js +0 -126
  210. package/dist/components/FormInput/FormInput.js.map +0 -1
  211. package/dist/components/FormInput/FormInput.test.d.ts +0 -1
  212. package/dist/components/FormInput/index.d.ts +0 -2
  213. package/dist/components/ImageCropModal/index.js +0 -464
  214. package/dist/components/ImageCropModal/index.js.map +0 -1
  215. package/dist/components/InformationPopover/InformationPopover.d.ts +0 -7
  216. package/dist/components/InformationPopover/InformationPopover.js +0 -19
  217. package/dist/components/InformationPopover/InformationPopover.js.map +0 -1
  218. package/dist/components/InformationPopover.js +0 -19
  219. package/dist/components/InformationPopover.js.map +0 -1
  220. package/dist/components/InputErrorMessage/InputErrorMessage.js +0 -21
  221. package/dist/components/InputErrorMessage/InputErrorMessage.js.map +0 -1
  222. package/dist/components/Modal/Modal.d.ts +0 -15
  223. package/dist/components/Modal/Modal.js +0 -73
  224. package/dist/components/Modal/Modal.js.map +0 -1
  225. package/dist/components/Radio/Radio.js +0 -35
  226. package/dist/components/Radio/Radio.js.map +0 -1
  227. package/dist/components/Spinner/spinner.d.ts +0 -2
  228. package/dist/components/Spinner/spinner.js +0 -22
  229. package/dist/components/Spinner/spinner.js.map +0 -1
  230. package/dist/components/Toggle/Toggle.d.ts +0 -16
  231. package/dist/components/Toggle/index.d.ts +0 -2
  232. package/dist/components/Tooltip/Tooltip.d.ts +0 -12
  233. package/dist/components/Tooltip/Tooltip.js +0 -134
  234. package/dist/components/Tooltip/Tooltip.js.map +0 -1
  235. package/dist/components/common/FallbackImage.js +0 -47
  236. package/dist/components/common/FallbackImage.js.map +0 -1
  237. package/dist/components/ui/Calendar/calendar-utils.js +0 -51
  238. package/dist/components/ui/Calendar/calendar-utils.js.map +0 -1
  239. package/dist/components/ui/Calendar/index.js +0 -142
  240. package/dist/components/ui/Calendar/index.js.map +0 -1
  241. package/dist/components/ui/Checkbox.d.ts +0 -9
  242. package/dist/components/ui/Checkbox.js +0 -50
  243. package/dist/components/ui/Checkbox.js.map +0 -1
  244. package/dist/components/ui/DatePicker/index.js +0 -188
  245. package/dist/components/ui/DatePicker/index.js.map +0 -1
  246. package/dist/components/ui/FormInput.js +0 -129
  247. package/dist/components/ui/FormInput.js.map +0 -1
  248. package/dist/components/ui/InputErrorMessage.d.ts +0 -7
  249. package/dist/components/ui/InputErrorMessage.js +0 -21
  250. package/dist/components/ui/InputErrorMessage.js.map +0 -1
  251. package/dist/components/ui/Modal/index.js +0 -73
  252. package/dist/components/ui/Modal/index.js.map +0 -1
  253. package/dist/components/ui/Radio.d.ts +0 -6
  254. package/dist/components/ui/Radio.js +0 -35
  255. package/dist/components/ui/Radio.js.map +0 -1
  256. package/dist/components/ui/RichTextEditor.js +0 -242
  257. package/dist/components/ui/RichTextEditor.js.map +0 -1
  258. package/dist/components/ui/TimePicker/index.js +0 -215
  259. package/dist/components/ui/TimePicker/index.js.map +0 -1
  260. package/dist/components/ui/TimeSelector/index.js +0 -138
  261. package/dist/components/ui/TimeSelector/index.js.map +0 -1
  262. package/dist/components/ui/Tooltip.d.ts +0 -12
  263. package/dist/components/ui/Tooltip.js +0 -136
  264. package/dist/components/ui/Tooltip.js.map +0 -1
  265. package/dist/hooks/useDropdownPosition.d.ts +0 -11
  266. package/dist/hooks/useFirebaseAuthState.d.ts +0 -6
  267. package/dist/hooks/useFirebaseAuthState.js +0 -23
  268. package/dist/hooks/useFirebaseAuthState.js.map +0 -1
  269. package/dist/hooks/useTicketTierForm.d.ts +0 -61
  270. package/dist/lib/actions.js +0 -32
  271. package/dist/lib/actions.js.map +0 -1
  272. package/dist/lib/cropImage.js +0 -113
  273. package/dist/lib/cropImage.js.map +0 -1
  274. package/dist/lib/imageAnalysis.js +0 -58
  275. package/dist/lib/imageAnalysis.js.map +0 -1
  276. package/dist/lib/utils.js +0 -9
  277. package/dist/lib/utils.js.map +0 -1
  278. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +0 -60
  279. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +0 -1
  280. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +0 -3458
  281. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js.map +0 -1
  282. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +0 -593
  283. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +0 -1
  284. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +0 -302
  285. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +0 -1
  286. package/dist/node_modules/@firebase/app/dist/esm/index.esm.js +0 -768
  287. package/dist/node_modules/@firebase/app/dist/esm/index.esm.js.map +0 -1
  288. package/dist/node_modules/@firebase/component/dist/esm/index.esm.js +0 -340
  289. package/dist/node_modules/@firebase/component/dist/esm/index.esm.js.map +0 -1
  290. package/dist/node_modules/@firebase/logger/dist/esm/index.esm.js +0 -123
  291. package/dist/node_modules/@firebase/logger/dist/esm/index.esm.js.map +0 -1
  292. package/dist/node_modules/@firebase/storage/dist/index.esm.js +0 -2623
  293. package/dist/node_modules/@firebase/storage/dist/index.esm.js.map +0 -1
  294. package/dist/node_modules/@firebase/util/dist/index.esm.js +0 -658
  295. package/dist/node_modules/@firebase/util/dist/index.esm.js.map +0 -1
  296. package/dist/node_modules/@firebase/util/dist/postinstall.js +0 -5
  297. package/dist/node_modules/@firebase/util/dist/postinstall.js.map +0 -1
  298. package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.js +0 -3179
  299. package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.js.map +0 -1
  300. package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.js +0 -60
  301. package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +0 -1
  302. package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js +0 -400
  303. package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js.map +0 -1
  304. package/dist/node_modules/@heroicons/react/20/solid/esm/CheckIcon.js +0 -27
  305. package/dist/node_modules/@heroicons/react/20/solid/esm/CheckIcon.js.map +0 -1
  306. package/dist/node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js +0 -27
  307. package/dist/node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js.map +0 -1
  308. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowRightIcon.js +0 -29
  309. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowRightIcon.js.map +0 -1
  310. package/dist/node_modules/@heroicons/react/24/outline/esm/ClockIcon.js +0 -29
  311. package/dist/node_modules/@heroicons/react/24/outline/esm/ClockIcon.js.map +0 -1
  312. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentDuplicateIcon.js +0 -29
  313. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentDuplicateIcon.js.map +0 -1
  314. package/dist/node_modules/@heroicons/react/24/outline/esm/InformationCircleIcon.js +0 -29
  315. package/dist/node_modules/@heroicons/react/24/outline/esm/InformationCircleIcon.js.map +0 -1
  316. package/dist/node_modules/@heroicons/react/24/outline/esm/LinkIcon.js +0 -29
  317. package/dist/node_modules/@heroicons/react/24/outline/esm/LinkIcon.js.map +0 -1
  318. package/dist/node_modules/@heroicons/react/24/outline/esm/MagnifyingGlassIcon.js +0 -29
  319. package/dist/node_modules/@heroicons/react/24/outline/esm/MagnifyingGlassIcon.js.map +0 -1
  320. package/dist/node_modules/@heroicons/react/24/outline/esm/MapPinIcon.js +0 -33
  321. package/dist/node_modules/@heroicons/react/24/outline/esm/MapPinIcon.js.map +0 -1
  322. package/dist/node_modules/@heroicons/react/24/outline/esm/VideoCameraIcon.js +0 -29
  323. package/dist/node_modules/@heroicons/react/24/outline/esm/VideoCameraIcon.js.map +0 -1
  324. package/dist/node_modules/@heroicons/react/24/outline/esm/XMarkIcon.js +0 -29
  325. package/dist/node_modules/@heroicons/react/24/outline/esm/XMarkIcon.js.map +0 -1
  326. package/dist/node_modules/@tiptap/core/dist/index.js +0 -5446
  327. package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
  328. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -21
  329. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
  330. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -78
  331. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
  332. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -100
  333. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
  334. package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -70
  335. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
  336. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -317
  337. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
  338. package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -16
  339. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
  340. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -66
  341. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
  342. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -86
  343. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
  344. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -80
  345. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
  346. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -98
  347. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
  348. package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -423
  349. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
  350. package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -1039
  351. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
  352. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -61
  353. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
  354. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -7
  355. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
  356. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -79
  357. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
  358. package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -16
  359. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
  360. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -76
  361. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
  362. package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -376
  363. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
  364. package/dist/node_modules/@tiptap/react/dist/index.js +0 -650
  365. package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
  366. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -97
  367. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
  368. package/dist/node_modules/dayjs/dayjs.min.js +0 -283
  369. package/dist/node_modules/dayjs/dayjs.min.js.map +0 -1
  370. package/dist/node_modules/dayjs/plugin/customParseFormat.js +0 -130
  371. package/dist/node_modules/dayjs/plugin/customParseFormat.js.map +0 -1
  372. package/dist/node_modules/dayjs/plugin/duration.js +0 -137
  373. package/dist/node_modules/dayjs/plugin/duration.js.map +0 -1
  374. package/dist/node_modules/dayjs/plugin/isBetween.js +0 -20
  375. package/dist/node_modules/dayjs/plugin/isBetween.js.map +0 -1
  376. package/dist/node_modules/dayjs/plugin/relativeTime.js +0 -49
  377. package/dist/node_modules/dayjs/plugin/relativeTime.js.map +0 -1
  378. package/dist/node_modules/fast-equals/dist/es/index.js +0 -442
  379. package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
  380. package/dist/node_modules/idb/build/index.js +0 -70
  381. package/dist/node_modules/idb/build/index.js.map +0 -1
  382. package/dist/node_modules/idb/build/wrap-idb-value.js +0 -149
  383. package/dist/node_modules/idb/build/wrap-idb-value.js.map +0 -1
  384. package/dist/node_modules/linkifyjs/dist/linkify.js +0 -1159
  385. package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
  386. package/dist/node_modules/orderedmap/dist/index.js +0 -120
  387. package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
  388. package/dist/node_modules/prosemirror-commands/dist/index.js +0 -527
  389. package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
  390. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -137
  391. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
  392. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -221
  393. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
  394. package/dist/node_modules/prosemirror-history/dist/index.js +0 -357
  395. package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
  396. package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -84
  397. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
  398. package/dist/node_modules/prosemirror-model/dist/index.js +0 -3209
  399. package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
  400. package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -131
  401. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
  402. package/dist/node_modules/prosemirror-state/dist/index.js +0 -936
  403. package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
  404. package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1881
  405. package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
  406. package/dist/node_modules/prosemirror-view/dist/index.js +0 -5232
  407. package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
  408. package/dist/node_modules/rope-sequence/dist/index.js +0 -184
  409. package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
  410. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -82
  411. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
  412. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -78
  413. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
  414. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -78
  415. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  416. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -63
  417. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  418. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
  419. package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
  420. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -13
  421. package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
  422. package/dist/node_modules/w3c-keyname/index.js +0 -106
  423. package/dist/node_modules/w3c-keyname/index.js.map +0 -1
  424. package/dist/node_modules/zod/v4/classic/coerce.js +0 -10
  425. package/dist/node_modules/zod/v4/classic/coerce.js.map +0 -1
  426. package/dist/node_modules/zod/v4/classic/compat.js +0 -8
  427. package/dist/node_modules/zod/v4/classic/compat.js.map +0 -1
  428. package/dist/node_modules/zod/v4/classic/errors.js +0 -45
  429. package/dist/node_modules/zod/v4/classic/errors.js.map +0 -1
  430. package/dist/node_modules/zod/v4/classic/iso.js +0 -44
  431. package/dist/node_modules/zod/v4/classic/iso.js.map +0 -1
  432. package/dist/node_modules/zod/v4/classic/parse.js +0 -30
  433. package/dist/node_modules/zod/v4/classic/parse.js.map +0 -1
  434. package/dist/node_modules/zod/v4/classic/schemas.js +0 -711
  435. package/dist/node_modules/zod/v4/classic/schemas.js.map +0 -1
  436. package/dist/node_modules/zod/v4/core/api.js +0 -588
  437. package/dist/node_modules/zod/v4/core/api.js.map +0 -1
  438. package/dist/node_modules/zod/v4/core/checks.js +0 -411
  439. package/dist/node_modules/zod/v4/core/checks.js.map +0 -1
  440. package/dist/node_modules/zod/v4/core/core.js +0 -75
  441. package/dist/node_modules/zod/v4/core/core.js.map +0 -1
  442. package/dist/node_modules/zod/v4/core/doc.js +0 -38
  443. package/dist/node_modules/zod/v4/core/doc.js.map +0 -1
  444. package/dist/node_modules/zod/v4/core/errors.js +0 -73
  445. package/dist/node_modules/zod/v4/core/errors.js.map +0 -1
  446. package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -359
  447. package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +0 -1
  448. package/dist/node_modules/zod/v4/core/parse.js +0 -96
  449. package/dist/node_modules/zod/v4/core/parse.js.map +0 -1
  450. package/dist/node_modules/zod/v4/core/regexes.js +0 -84
  451. package/dist/node_modules/zod/v4/core/regexes.js.map +0 -1
  452. package/dist/node_modules/zod/v4/core/registries.js +0 -52
  453. package/dist/node_modules/zod/v4/core/registries.js.map +0 -1
  454. package/dist/node_modules/zod/v4/core/schemas.js +0 -1391
  455. package/dist/node_modules/zod/v4/core/schemas.js.map +0 -1
  456. package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -363
  457. package/dist/node_modules/zod/v4/core/to-json-schema.js.map +0 -1
  458. package/dist/node_modules/zod/v4/core/util.js +0 -431
  459. package/dist/node_modules/zod/v4/core/util.js.map +0 -1
  460. package/dist/node_modules/zod/v4/core/versions.js +0 -9
  461. package/dist/node_modules/zod/v4/core/versions.js.map +0 -1
  462. package/dist/redux/baseQuery.d.ts +0 -1
  463. package/dist/redux/baseQuery.js +0 -24
  464. package/dist/redux/baseQuery.js.map +0 -1
  465. package/dist/services/eventApi.js +0 -411
  466. package/dist/services/eventApi.js.map +0 -1
  467. package/dist/services/helpers.js +0 -115
  468. package/dist/services/helpers.js.map +0 -1
  469. package/dist/services/initialize-firebase.d.ts +0 -2
  470. package/dist/services/initialize-firebase.js +0 -20
  471. package/dist/services/initialize-firebase.js.map +0 -1
  472. package/dist/services/process-image-on-server.js +0 -30
  473. package/dist/services/process-image-on-server.js.map +0 -1
  474. package/dist/services/remote-config.d.ts +0 -5
  475. package/dist/services/remote-config.js +0 -9
  476. package/dist/services/remote-config.js.map +0 -1
  477. package/dist/services/single-event-api.js +0 -301
  478. package/dist/services/single-event-api.js.map +0 -1
  479. package/dist/services/utils.js +0 -107
  480. package/dist/services/utils.js.map +0 -1
  481. package/dist/setupTests.d.ts +0 -1
  482. package/dist/stories/Alert.stories.d.ts +0 -10
  483. package/dist/stories/Button.stories.d.ts +0 -13
  484. package/dist/types/redux-types.d.ts +0 -15
  485. package/dist/types/types.d.ts +0 -60
  486. package/dist/types/types.js +0 -10
  487. package/dist/types/types.js.map +0 -1
  488. package/dist/utils/cn.d.ts +0 -6
  489. package/dist/utils/cn.js +0 -9
  490. package/dist/utils/cn.js.map +0 -1
  491. package/dist/utils/date-range.d.ts +0 -4
  492. package/dist/utils/date-range.js +0 -13
  493. package/dist/utils/date-range.js.map +0 -1
  494. package/dist/utils/single-event-helpers.d.ts +0 -50
  495. package/dist/utils/single-event-helpers.js +0 -18
  496. package/dist/utils/single-event-helpers.js.map +0 -1
  497. package/dist/utils/social-validation.js +0 -42
  498. package/dist/utils/social-validation.js.map +0 -1
  499. package/dist/utils/utils.js +0 -20
  500. package/dist/utils/utils.js.map +0 -1
  501. /package/dist/{components/Alert/Alert.d.ts → src/components/Alert/index.d.ts} +0 -0
  502. /package/dist/{components → src/components}/FormBuilder/CategoryList.d.ts +0 -0
  503. /package/dist/{components → src/components}/FormBuilder/OptionList.d.ts +0 -0
  504. /package/dist/{components → src/components}/FormBuilder/RequiredToggle.d.ts +0 -0
  505. /package/dist/{components → src/components}/FormBuilder/types.d.ts +0 -0
  506. /package/dist/{components → src/components}/FormBuilder/utils.d.ts +0 -0
  507. /package/dist/{components → src/components}/ImageCropModal/index.d.ts +0 -0
  508. /package/dist/{components → src/components}/InformationPopover.d.ts +0 -0
  509. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/common/DescriptionModal.d.ts +0 -0
  510. /package/dist/{components/ui/FormInput.d.ts → src/components/NewAddEvent/components/AddEventFormInput.d.ts} +0 -0
  511. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/CheckboxGroup.d.ts +0 -0
  512. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/CustomMeetingForm.d.ts +0 -0
  513. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/DateTimeField.d.ts +0 -0
  514. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/FileUpload.d.ts +0 -0
  515. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/FormBuilderProceedModal.d.ts +0 -0
  516. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/GoogleMapsAutocompleteInput.d.ts +0 -0
  517. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/SingleDateTimeInput.d.ts +0 -0
  518. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/StepTwo/CustomFormSection.d.ts +0 -0
  519. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/TicketTypeSelection.d.ts +0 -0
  520. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/StepOne.d.ts +0 -0
  521. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/StepTwo.d.ts +0 -0
  522. /package/dist/{components/EventAddForm → src/components/NewAddEvent}/types.d.ts +0 -0
  523. /package/dist/{components → src/components}/common/FallbackImage.d.ts +0 -0
  524. /package/dist/{components → src/components}/ui/Calendar/calendar-utils.d.ts +0 -0
  525. /package/dist/{components → src/components}/ui/Calendar/index.d.ts +0 -0
  526. /package/dist/{components/Checkbox → src/components/ui}/Checkbox.d.ts +0 -0
  527. /package/dist/{components/CustomSelect → src/components/ui}/CustomSelect.d.ts +0 -0
  528. /package/dist/{components → src/components}/ui/DatePicker/index.d.ts +0 -0
  529. /package/dist/{components/InputErrorMessage → src/components/ui}/InputErrorMessage.d.ts +0 -0
  530. /package/dist/{components → src/components}/ui/Modal/index.d.ts +0 -0
  531. /package/dist/{components/Radio → src/components/ui}/Radio.d.ts +0 -0
  532. /package/dist/{components → src/components}/ui/RichTextEditor.d.ts +0 -0
  533. /package/dist/{components → src/components}/ui/TimePicker/index.d.ts +0 -0
  534. /package/dist/{components → src/components}/ui/TimeSelector/index.d.ts +0 -0
  535. /package/dist/{components → src/components}/ui/Tooltip/index.d.ts +0 -0
  536. /package/dist/{lib → src/lib}/constants.d.ts +0 -0
  537. /package/dist/{lib → src/lib}/cropImage.d.ts +0 -0
  538. /package/dist/{lib → src/lib}/imageAnalysis.d.ts +0 -0
  539. /package/dist/{utils → src/lib}/social-validation.d.ts +0 -0
  540. /package/dist/{lib/utils.d.ts → src/lib/tailwind-merge.d.ts} +0 -0
  541. /package/dist/{utils → src/lib}/utils.d.ts +0 -0
  542. /package/dist/{services → src/redux/features/single-event}/helpers.d.ts +0 -0
  543. /package/dist/{services → src/services}/process-image-on-server.d.ts +0 -0
  544. /package/dist/{types → src/types}/events.d.ts +0 -0
  545. /package/dist/{types → src/types}/question.d.ts +0 -0
@@ -1,366 +0,0 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { faCircleNotch } from "../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
3
- import { FontAwesomeIcon } from "../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
4
- import { motion, AnimatePresence } from "framer-motion";
5
- import { memo, useState, useRef, useMemo } from "react";
6
- import { getDiscountFilePath, truncateMiddle } from "./utils.js";
7
- import { CheckboxGroup } from "../CheckboxGroup/CheckboxGroup.js";
8
- import InputErrorMessage from "../InputErrorMessage/InputErrorMessage.js";
9
- import { cn } from "../../utils/cn.js";
10
- import { Button } from "../Button/Button.js";
11
- const validateCSV = (lines) => {
12
- for (let i = 1; i < lines.length; i++) {
13
- const line = lines[i].trim();
14
- if (line) {
15
- const values = line.split(",");
16
- if (values.length !== 4) {
17
- return { isError: true, message: `Invalid data format in row ${i + 1}` };
18
- }
19
- if (!values[0].trim()) {
20
- return { isError: true, message: `Invalid Code in row ${i + 1}` };
21
- }
22
- if (values[1].trim() !== "CASH" && values[1].trim() !== "PERCENT") {
23
- return { isError: true, message: `Invalid Discount type in row ${i + 1}, the allowed types are CASH and PERCENT` };
24
- }
25
- if (values[1].trim() === "PERCENT" && !values[2].trim().endsWith("%")) {
26
- return { isError: true, message: `Invalid Discount format in row ${i + 1}. Should end with %` };
27
- }
28
- if (values[1].trim() === "PERCENT" && values[2].trim().endsWith("%") && isNaN(Number(values[2].trim().split("%")[0]))) {
29
- return { isError: true, message: `Invalid Discount format in row ${i + 1}. Discount should be a number` };
30
- }
31
- if (values[1].trim() === "CASH" && isNaN(Number(values[2]))) {
32
- return { isError: true, message: `Invalid Discount format in row ${i + 1}. Should be a number` };
33
- }
34
- if (isNaN(Number(values[3]))) {
35
- return { isError: true, message: `Invalid Redeemable time in row ${i + 1}. Should be a number` };
36
- }
37
- }
38
- }
39
- return { isError: false };
40
- };
41
- const arraysEqual = (a, b) => {
42
- if (a.length !== b.length) return false;
43
- return a.every((val, index) => val.trim().toLowerCase() === b[index].trim().toLowerCase());
44
- };
45
- function DiscountInput({
46
- question,
47
- eventId,
48
- userUid,
49
- event,
50
- storageService,
51
- onUpdate,
52
- setDiscountFile,
53
- error: propError,
54
- scope,
55
- participationType,
56
- isSaving
57
- }) {
58
- const [isDiscountFileDownloading, setIsDiscountFileDownloading] = useState(false);
59
- const [error, setError] = useState("");
60
- const fileInputRef = useRef(null);
61
- const [isDragging, setIsDragging] = useState(false);
62
- const discountFilePath = useMemo(() => getDiscountFilePath(eventId, userUid, participationType, scope, question), [eventId, userUid, participationType, scope, question]);
63
- const alreadyExists = useMemo(() => {
64
- const isIndividual = (participationType === "3" || participationType === "BOTH") && scope === "INDIVIDUAL";
65
- const pathExists = isIndividual ? !!(question == null ? void 0 : question.individual_discount_file_path) : !!(question == null ? void 0 : question.discount_file_path);
66
- return !!question.file || !!question.file_name || pathExists;
67
- }, [question, participationType, scope]);
68
- const handleDownload = async (e) => {
69
- e.preventDefault();
70
- if (question.file) {
71
- const url = URL.createObjectURL(question.file);
72
- const link = document.createElement("a");
73
- link.setAttribute("href", url);
74
- link.setAttribute("download", question.file.name);
75
- document.body.appendChild(link);
76
- link.click();
77
- document.body.removeChild(link);
78
- return;
79
- }
80
- if (alreadyExists && discountFilePath && storageService) {
81
- setIsDiscountFileDownloading(true);
82
- try {
83
- const blob = await storageService.downloadFile(discountFilePath);
84
- const url = URL.createObjectURL(blob);
85
- const isIndividual = (participationType === "3" || participationType === "BOTH") && scope === "INDIVIDUAL";
86
- const downloadName = isIndividual ? `${eventId}_individual.csv` : `${eventId}.csv`;
87
- const link = document.createElement("a");
88
- link.setAttribute("href", url);
89
- link.setAttribute("download", downloadName);
90
- document.body.appendChild(link);
91
- link.click();
92
- document.body.removeChild(link);
93
- } catch (err) {
94
- console.error("Download failed", err);
95
- setError("Download failed. File might not exist on server.");
96
- } finally {
97
- setIsDiscountFileDownloading(false);
98
- }
99
- return;
100
- } else {
101
- const csvContent = "data:text/csv;charset=utf-8,Code,Discount_type,Discount,Reedeamble_time\nmYNPuUc7f3W1N8KFZzxZ,PERCENT,5%,1\nnxJRx4Xaua8MG29EIwOR,CASH,100,1";
102
- const encodedUri = encodeURI(csvContent);
103
- const link = document.createElement("a");
104
- link.setAttribute("href", encodedUri);
105
- link.setAttribute("download", "template.csv");
106
- document.body.appendChild(link);
107
- link.click();
108
- document.body.removeChild(link);
109
- }
110
- };
111
- const handleClick = () => {
112
- var _a;
113
- (_a = fileInputRef.current) == null ? void 0 : _a.click();
114
- };
115
- const handleDragOver = (event2) => {
116
- event2.preventDefault();
117
- setIsDragging(true);
118
- };
119
- const handleDragLeave = () => {
120
- setIsDragging(false);
121
- };
122
- const showSuccessPreview = (!!question.file || !!alreadyExists) && !isSaving;
123
- const handleFileSelected = (file) => {
124
- if (!file.name.toLowerCase().endsWith(".csv")) {
125
- setError("Please upload a CSV file");
126
- return;
127
- }
128
- if (file.size > 5 * 1024 * 1024) {
129
- setError("File size should be less than 5MB");
130
- return;
131
- }
132
- const reader = new FileReader();
133
- reader.onload = (e) => {
134
- var _a;
135
- const text = (_a = e.target) == null ? void 0 : _a.result;
136
- const lines = text.split("\n");
137
- const expectedHeaders = ["Code", "Discount_type", "Discount", "Reedeamble_time"];
138
- const headers = lines[0].trim().split(",");
139
- if (!arraysEqual(headers, expectedHeaders)) {
140
- setError("Invalid CSV format. Please use the provided template");
141
- return;
142
- }
143
- const { isError, message } = validateCSV(lines);
144
- if (isError && message) {
145
- setError(message);
146
- return;
147
- }
148
- onUpdate(question.id, { file, file_name: file.name });
149
- setDiscountFile(file);
150
- setError("");
151
- };
152
- reader.onerror = () => {
153
- setError("Error reading file");
154
- };
155
- reader.readAsText(file);
156
- };
157
- const handleFileChange = (e) => {
158
- var _a;
159
- const file = (_a = e.target.files) == null ? void 0 : _a[0];
160
- if (file) {
161
- handleFileSelected(file);
162
- }
163
- };
164
- const handleDrop = (e) => {
165
- e.preventDefault();
166
- setIsDragging(false);
167
- const file = e.dataTransfer.files[0];
168
- if (file) {
169
- handleFileSelected(file);
170
- }
171
- };
172
- const displayFileName = truncateMiddle(question.file ? question.file.name : question.file_name || discountFilePath, 30) || "Uploaded File";
173
- const checkboxOptions = useMemo(() => {
174
- if (!event) return [];
175
- const currentAppliesOn = question.applies_on || [];
176
- const isTotal = currentAppliesOn.includes("Total");
177
- const isOthers = currentAppliesOn.some((val) => val !== "Total");
178
- if (event.ticket_type === "TICKET_TIER") {
179
- return [{
180
- label: `Total`,
181
- value: "Total",
182
- disabled: false,
183
- tooltip: "A discount applied to the overall total amount payable"
184
- }];
185
- }
186
- const options = [];
187
- if (question.scope === "TEAM") {
188
- options.push(
189
- {
190
- value: "Individual Additional Fee",
191
- label: `Individual Registration Fee (${event.per_member_fee || 0} PKR)`,
192
- disabled: false,
193
- tooltip: "Applies only to the additional fee charged for each individual participant."
194
- }
195
- );
196
- options.push(
197
- {
198
- value: "Registration Fee",
199
- label: `Registration Fee (${event.team_price || event.registration_fee || 0} PKR)`,
200
- disabled: false,
201
- tooltip: "Applies to the event's base registration fee."
202
- }
203
- );
204
- } else if (question.scope === "INDIVIDUAL" || !question.scope && (event.participants_type === "1" || event.participation_type === "1")) {
205
- options.push(
206
- {
207
- value: "Registration Fee",
208
- label: `Registration Fee (${event.individual_price || 0} PKR)`,
209
- disabled: false,
210
- tooltip: "Applies to the event's base registration fee."
211
- }
212
- );
213
- } else if (event.participants_type === "2" || event.participants_type === "3" || event.participation_type === "2" || event.participation_type === "3") {
214
- options.push(
215
- {
216
- value: "Registration Fee",
217
- label: `Registration Fee (${event.team_price || event.registration_fee || 0} PKR)`,
218
- disabled: false,
219
- tooltip: "Applies to the event's base registration fee."
220
- }
221
- );
222
- }
223
- return options.map((opt) => ({
224
- ...opt,
225
- disabled: isTotal,
226
- title: isTotal ? "This discount cannot be applied if total discount is applied" : void 0
227
- })).concat([
228
- {
229
- label: `Total`,
230
- value: "Total",
231
- disabled: isOthers,
232
- title: isOthers ? "This discount cannot be applied if specific fee discounts are applied" : void 0,
233
- tooltip: "A discount applied to the overall total amount payable"
234
- }
235
- ]);
236
- }, [question.applies_on, event, question.scope]);
237
- const handleSetFormData = (updater) => {
238
- const currentData = { applies_on: question.applies_on || [] };
239
- const newData = updater(currentData);
240
- onUpdate(question.id, { applies_on: newData.applies_on });
241
- };
242
- const handleRemoveFile = (e) => {
243
- e.stopPropagation();
244
- setDiscountFile(null);
245
- onUpdate(question.id, { file: void 0, file_name: void 0, discount_file_path: "", individual_discount_file_path: "" });
246
- if (fileInputRef.current) fileInputRef.current.value = "";
247
- };
248
- return /* @__PURE__ */ jsxs(Fragment, { children: [
249
- /* @__PURE__ */ jsxs("div", { className: "w-full overflow-y-auto px-1 py-4", children: [
250
- /* @__PURE__ */ jsxs(
251
- Button,
252
- {
253
- onClick: handleDownload,
254
- disabled: isDiscountFileDownloading,
255
- className: "w-full",
256
- children: [
257
- isDiscountFileDownloading ? /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faCircleNotch, spin: true, className: "mr-2" }) : /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5 mr-2", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v16h16V4H4zm4 4h8m-8 4h8m-8 4h8" }) }),
258
- showSuccessPreview ? "Download Existing File" : "Download CSV Template"
259
- ]
260
- }
261
- ),
262
- /* @__PURE__ */ jsxs(
263
- motion.div,
264
- {
265
- onClick: !showSuccessPreview ? handleClick : void 0,
266
- onDragOver: !showSuccessPreview ? handleDragOver : void 0,
267
- onDragLeave: !showSuccessPreview ? handleDragLeave : void 0,
268
- onDrop: !showSuccessPreview ? handleDrop : void 0,
269
- className: cn(
270
- "relative rounded-2xl mt-4 transition-all duration-300",
271
- !showSuccessPreview && "cursor-pointer"
272
- ),
273
- children: [
274
- /* @__PURE__ */ jsx(
275
- "input",
276
- {
277
- type: "file",
278
- ref: fileInputRef,
279
- className: "hidden",
280
- onChange: handleFileChange,
281
- accept: ".csv"
282
- }
283
- ),
284
- /* @__PURE__ */ jsx("div", { className: cn(
285
- "p-4 border-2 rounded-2xl transition-all duration-300",
286
- showSuccessPreview ? "border-green-500 bg-green-50" : `border-dashed ${isDragging ? "border-primaryx-500 bg-primaryx-50" : "border-gray-300 hover:border-primaryx-400 hover:bg-primaryx-50/10"}`
287
- ), children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: showSuccessPreview ? /* @__PURE__ */ jsxs(
288
- motion.div,
289
- {
290
- initial: { opacity: 0, scale: 0.95 },
291
- animate: { opacity: 1, scale: 1 },
292
- exit: { opacity: 0 },
293
- className: "flex items-center justify-between",
294
- children: [
295
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3 min-w-0", children: [
296
- /* @__PURE__ */ jsx("div", { className: "p-2 bg-green-100 rounded-full", children: /* @__PURE__ */ jsx("svg", { className: "w-6 h-6 text-green-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }),
297
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
298
- /* @__PURE__ */ jsx("span", { className: "font-semibold text-green-800 text-sm text-ellipsis whitespace-nowrap overflow-hidden", title: displayFileName, children: displayFileName }),
299
- /* @__PURE__ */ jsx("span", { className: "text-green-600 text-xs", title: displayFileName, children: "To Upload new file, please remove existing" })
300
- ] })
301
- ] }),
302
- /* @__PURE__ */ jsx(
303
- Button,
304
- {
305
- size: "sm",
306
- variant: "ghost",
307
- className: "text-red-500 hover:text-red-700 hover:bg-red-100 p-2 h-auto",
308
- onClick: handleRemoveFile,
309
- children: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
310
- }
311
- )
312
- ]
313
- }
314
- ) : /* @__PURE__ */ jsxs(
315
- motion.div,
316
- {
317
- initial: { opacity: 0 },
318
- animate: { opacity: 1 },
319
- exit: { opacity: 0 },
320
- className: "flex flex-col items-center space-y-4",
321
- children: [
322
- /* @__PURE__ */ jsx("div", { className: "p-3 rounded-full bg-primaryx-100", children: /* @__PURE__ */ jsx("svg", { className: "w-6 h-6 text-primaryx-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) }) }),
323
- /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
324
- /* @__PURE__ */ jsx("span", { className: "text-primaryx-500 font-semibold text-sm", children: "Drag and drop CSV 📁" }),
325
- /* @__PURE__ */ jsx("p", { className: "text-gray-500 text-xs", children: "or tap to choose 👆" })
326
- ] })
327
- ]
328
- }
329
- ) }) })
330
- ]
331
- }
332
- ),
333
- /* @__PURE__ */ jsx(
334
- InputErrorMessage,
335
- {
336
- error: error || (propError && (propError.toLowerCase().includes("file") || propError.toLowerCase().includes("csv")) ? propError : ""),
337
- className: "mt-2"
338
- }
339
- )
340
- ] }),
341
- /* @__PURE__ */ jsxs("div", { className: "pl-1 pr-1 mt-4", children: [
342
- /* @__PURE__ */ jsx(
343
- CheckboxGroup,
344
- {
345
- label: "Applies on",
346
- formData: { applies_on: question.applies_on || [] },
347
- setFormData: handleSetFormData,
348
- field: "applies_on",
349
- options: checkboxOptions
350
- }
351
- ),
352
- /* @__PURE__ */ jsx(
353
- InputErrorMessage,
354
- {
355
- error: propError && propError.toLowerCase().includes("applies on") ? propError : "",
356
- className: "mt-2"
357
- }
358
- )
359
- ] })
360
- ] });
361
- }
362
- const DiscountInput$1 = memo(DiscountInput);
363
- export {
364
- DiscountInput$1 as default
365
- };
366
- //# sourceMappingURL=DiscountInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DiscountInput.js","sources":["../../../src/components/FormBuilder/DiscountInput.tsx"],"sourcesContent":["import { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { motion, AnimatePresence } from \"framer-motion\";\r\nimport React, { memo, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { QuestionDraft } from \"./types\";\r\nimport { getDiscountFilePath, truncateMiddle } from \"./utils\";\r\nimport { Button } from \"../Button\";\r\nimport { CheckboxGroup } from \"../CheckboxGroup/CheckboxGroup\";\r\nimport InputErrorMessage from \"../InputErrorMessage/InputErrorMessage\";\r\nimport { cn } from '../../utils/cn';\r\n\r\nconst validateCSV = (lines: string[]) => {\r\n for (let i = 1; i < lines.length; i++) {\r\n const line = lines[i].trim();\r\n if (line) {\r\n const values = line.split(',');\r\n\r\n if (values.length !== 4) {\r\n return { isError: true, message: `Invalid data format in row ${i + 1}` };\r\n }\r\n\r\n if (!values[0].trim()) {\r\n return { isError: true, message: `Invalid Code in row ${i + 1}` };\r\n }\r\n\r\n if (values[1].trim() !== \"CASH\" && values[1].trim() !== \"PERCENT\") {\r\n return { isError: true, message: `Invalid Discount type in row ${i + 1}, the allowed types are CASH and PERCENT` }\r\n }\r\n\r\n if (values[1].trim() === \"PERCENT\" && !values[2].trim().endsWith('%')) {\r\n return { isError: true, message: `Invalid Discount format in row ${i + 1}. Should end with %` };\r\n }\r\n\r\n if (values[1].trim() === \"PERCENT\" && values[2].trim().endsWith('%') && isNaN(Number(values[2].trim().split(\"%\")[0]))) {\r\n return { isError: true, message: `Invalid Discount format in row ${i + 1}. Discount should be a number` };\r\n }\r\n\r\n if (values[1].trim() === \"CASH\" && isNaN(Number(values[2]))) {\r\n return { isError: true, message: `Invalid Discount format in row ${i + 1}. Should be a number` };\r\n }\r\n\r\n if (isNaN(Number(values[3]))) {\r\n return { isError: true, message: `Invalid Redeemable time in row ${i + 1}. Should be a number` };\r\n }\r\n }\r\n }\r\n\r\n return { isError: false }\r\n};\r\n\r\nconst arraysEqual = (a: string[], b: string[]): boolean => {\r\n if (a.length !== b.length) return false;\r\n return a.every((val, index) => val.trim().toLowerCase() === b[index].trim().toLowerCase());\r\n};\r\n\r\ninterface DiscountInputProps {\r\n question: QuestionDraft;\r\n eventId: string;\r\n userUid?: string;\r\n event?: any;\r\n storageService?: {\r\n downloadFile: (path: string) => Promise<Blob>;\r\n };\r\n onUpdate: (questionId: string, updates: Partial<QuestionDraft>) => void;\r\n setDiscountFile: (file: File | null) => void;\r\n error?: string;\r\n scope?: 'INDIVIDUAL' | 'TEAM';\r\n participationType?: string;\r\n isSaving?: boolean;\r\n}\r\n\r\nfunction DiscountInput({ \r\n question, \r\n eventId, \r\n userUid,\r\n event,\r\n storageService,\r\n onUpdate, \r\n setDiscountFile, \r\n error: propError, \r\n scope, \r\n participationType, \r\n isSaving \r\n}: DiscountInputProps) {\r\n const [isDiscountFileDownloading, setIsDiscountFileDownloading] = useState(false);\r\n const [error, setError] = useState('');\r\n const fileInputRef = useRef<HTMLInputElement>(null);\r\n const [isDragging, setIsDragging] = useState(false);\r\n\r\n const discountFilePath = useMemo(() => getDiscountFilePath(eventId, userUid, participationType, scope, question), [eventId, userUid, participationType, scope, question]);\r\n\r\n const alreadyExists = useMemo(() => {\r\n const isIndividual = (participationType === \"3\" || participationType === \"BOTH\") && scope === \"INDIVIDUAL\";\r\n const pathExists = isIndividual ? !!question?.individual_discount_file_path : !!question?.discount_file_path;\r\n\r\n return !!question.file || !!question.file_name || pathExists;\r\n }, [question, participationType, scope]);\r\n\r\n const handleDownload = async (e: React.MouseEvent<HTMLButtonElement>) => {\r\n e.preventDefault();\r\n\r\n if (question.file) {\r\n const url = URL.createObjectURL(question.file);\r\n const link = document.createElement(\"a\");\r\n link.setAttribute(\"href\", url);\r\n link.setAttribute(\"download\", question.file.name);\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n return;\r\n }\r\n\r\n if (alreadyExists && discountFilePath && storageService) {\r\n setIsDiscountFileDownloading(true);\r\n try {\r\n const blob = await storageService.downloadFile(discountFilePath);\r\n const url = URL.createObjectURL(blob);\r\n\r\n const isIndividual = (participationType === \"3\" || participationType === \"BOTH\") && scope === \"INDIVIDUAL\";\r\n const downloadName = isIndividual ? `${eventId}_individual.csv` : `${eventId}.csv`;\r\n\r\n const link = document.createElement(\"a\");\r\n link.setAttribute(\"href\", url);\r\n link.setAttribute(\"download\", downloadName);\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n } catch (err) {\r\n console.error(\"Download failed\", err);\r\n setError(\"Download failed. File might not exist on server.\");\r\n } finally {\r\n setIsDiscountFileDownloading(false);\r\n }\r\n return;\r\n }\r\n\r\n else {\r\n const csvContent = \"data:text/csv;charset=utf-8,Code,Discount_type,Discount,Reedeamble_time\\nmYNPuUc7f3W1N8KFZzxZ,PERCENT,5%,1\\nnxJRx4Xaua8MG29EIwOR,CASH,100,1\";\r\n const encodedUri = encodeURI(csvContent);\r\n const link = document.createElement(\"a\");\r\n link.setAttribute(\"href\", encodedUri);\r\n link.setAttribute(\"download\", \"template.csv\");\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n };\r\n\r\n const handleClick = () => {\r\n fileInputRef.current?.click();\r\n };\r\n\r\n const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {\r\n event.preventDefault();\r\n setIsDragging(true);\r\n };\r\n\r\n const handleDragLeave = () => {\r\n setIsDragging(false);\r\n };\r\n\r\n const showSuccessPreview = (!!question.file || !!alreadyExists) && !isSaving;\r\n\r\n const handleFileSelected = (file: File) => {\r\n if (!file.name.toLowerCase().endsWith('.csv')) {\r\n setError('Please upload a CSV file');\r\n return;\r\n }\r\n\r\n if (file.size > 5 * 1024 * 1024) {\r\n setError('File size should be less than 5MB');\r\n return;\r\n }\r\n\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const text = e.target?.result as string;\r\n const lines = text.split('\\n');\r\n const expectedHeaders = ['Code', 'Discount_type', 'Discount', 'Reedeamble_time'];\r\n const headers = lines[0].trim().split(',');\r\n\r\n if (!arraysEqual(headers, expectedHeaders)) {\r\n setError('Invalid CSV format. Please use the provided template');\r\n return;\r\n }\r\n\r\n const { isError, message } = validateCSV(lines);\r\n if (isError && message) {\r\n setError(message);\r\n return;\r\n }\r\n\r\n onUpdate(question.id, { file, file_name: file.name } as any);\r\n setDiscountFile(file);\r\n setError('');\r\n };\r\n\r\n reader.onerror = () => {\r\n setError('Error reading file');\r\n };\r\n\r\n reader.readAsText(file);\r\n };\r\n\r\n const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n const file = e.target.files?.[0];\r\n if (file) {\r\n handleFileSelected(file);\r\n }\r\n };\r\n\r\n const handleDrop = (e: React.DragEvent) => {\r\n e.preventDefault();\r\n setIsDragging(false);\r\n const file = e.dataTransfer.files[0];\r\n if (file) {\r\n handleFileSelected(file);\r\n }\r\n };\r\n\r\n const displayFileName = truncateMiddle(question.file ? question.file.name : (question.file_name || discountFilePath), 30) || \"Uploaded File\";\r\n\r\n const checkboxOptions = useMemo(() => {\r\n if (!event) return [];\r\n\r\n const currentAppliesOn = question.applies_on || [];\r\n const isTotal = currentAppliesOn.includes(\"Total\");\r\n const isOthers = currentAppliesOn.some(val => val !== \"Total\");\r\n\r\n if (event.ticket_type === 'TICKET_TIER') {\r\n return [{\r\n label: `Total`,\r\n value: \"Total\",\r\n disabled: false,\r\n tooltip: \"A discount applied to the overall total amount payable\"\r\n }];\r\n }\r\n\r\n const options: any[] = [];\r\n\r\n if (question.scope === 'TEAM') {\r\n options.push(\r\n {\r\n value: \"Individual Additional Fee\",\r\n label: `Individual Registration Fee (${event.per_member_fee || 0} PKR)`,\r\n disabled: false,\r\n tooltip: \"Applies only to the additional fee charged for each individual participant.\"\r\n }\r\n );\r\n\r\n options.push(\r\n {\r\n value: \"Registration Fee\",\r\n label: `Registration Fee (${event.team_price || event.registration_fee || 0} PKR)`,\r\n disabled: false,\r\n tooltip: \"Applies to the event's base registration fee.\"\r\n }\r\n );\r\n }\r\n else if (question.scope === 'INDIVIDUAL' || (!question.scope && (event.participants_type === \"1\" || event.participation_type === \"1\"))) {\r\n options.push(\r\n {\r\n value: \"Registration Fee\",\r\n label: `Registration Fee (${event.individual_price || 0} PKR)`,\r\n disabled: false,\r\n tooltip: \"Applies to the event's base registration fee.\"\r\n }\r\n );\r\n }\r\n else if (event.participants_type === \"2\" || event.participants_type === \"3\" || event.participation_type === \"2\" || event.participation_type === \"3\") {\r\n options.push(\r\n {\r\n value: \"Registration Fee\",\r\n label: `Registration Fee (${event.team_price || event.registration_fee || 0} PKR)`,\r\n disabled: false,\r\n tooltip: \"Applies to the event's base registration fee.\"\r\n }\r\n );\r\n }\r\n\r\n return options.map(opt => ({\r\n ...opt,\r\n disabled: isTotal,\r\n title: isTotal ? \"This discount cannot be applied if total discount is applied\" : undefined\r\n })).concat([\r\n {\r\n label: `Total`,\r\n value: \"Total\",\r\n disabled: isOthers,\r\n title: isOthers ? \"This discount cannot be applied if specific fee discounts are applied\" : undefined,\r\n tooltip: \"A discount applied to the overall total amount payable\"\r\n }\r\n ]);\r\n\r\n }, [question.applies_on, event, question.scope]);\r\n\r\n const handleSetFormData = (updater: any) => {\r\n const currentData = { applies_on: question.applies_on || [] };\r\n const newData = updater(currentData);\r\n onUpdate(question.id, { applies_on: newData.applies_on });\r\n };\r\n\r\n const handleRemoveFile = (e: React.MouseEvent) => {\r\n e.stopPropagation();\r\n setDiscountFile(null);\r\n onUpdate(question.id, { file: undefined, file_name: undefined, discount_file_path: \"\", individual_discount_file_path: \"\" } as any);\r\n if (fileInputRef.current) fileInputRef.current.value = \"\";\r\n };\r\n\r\n return <>\r\n <div className=\"w-full overflow-y-auto px-1 py-4\">\r\n <Button\r\n onClick={handleDownload}\r\n disabled={isDiscountFileDownloading}\r\n className=\"w-full\"\r\n >\r\n {isDiscountFileDownloading ? (\r\n <FontAwesomeIcon icon={faCircleNotch} spin className=\"mr-2\" />\r\n ) : (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-5 w-5 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 4v16h16V4H4zm4 4h8m-8 4h8m-8 4h8\" />\r\n </svg>\r\n )}\r\n {showSuccessPreview ? \"Download Existing File\" : \"Download CSV Template\"}\r\n </Button>\r\n\r\n <motion.div\r\n onClick={!showSuccessPreview ? handleClick : undefined}\r\n onDragOver={!showSuccessPreview ? handleDragOver : undefined}\r\n onDragLeave={!showSuccessPreview ? handleDragLeave : undefined}\r\n onDrop={!showSuccessPreview ? handleDrop : undefined}\r\n className={cn(\r\n \"relative rounded-2xl mt-4 transition-all duration-300\",\r\n !showSuccessPreview && \"cursor-pointer\"\r\n )}\r\n >\r\n <input\r\n type=\"file\"\r\n ref={fileInputRef}\r\n className=\"hidden\"\r\n onChange={handleFileChange}\r\n accept=\".csv\"\r\n />\r\n\r\n <div className={cn(\r\n \"p-4 border-2 rounded-2xl transition-all duration-300\",\r\n showSuccessPreview\r\n ? 'border-green-500 bg-green-50'\r\n : `border-dashed ${isDragging ? 'border-primaryx-500 bg-primaryx-50' : 'border-gray-300 hover:border-primaryx-400 hover:bg-primaryx-50/10'}`\r\n )}>\r\n <AnimatePresence mode=\"wait\">\r\n {showSuccessPreview ? (\r\n <motion.div\r\n initial={{ opacity: 0, scale: 0.95 }}\r\n animate={{ opacity: 1, scale: 1 }}\r\n exit={{ opacity: 0 }}\r\n className=\"flex items-center justify-between\"\r\n >\r\n <div className=\"flex items-center space-x-3 min-w-0\">\r\n <div className=\"p-2 bg-green-100 rounded-full\">\r\n <svg className=\"w-6 h-6 text-green-600\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\r\n </svg>\r\n </div>\r\n <div className=\"flex flex-col min-w-0\">\r\n <span className=\"font-semibold text-green-800 text-sm text-ellipsis whitespace-nowrap overflow-hidden\" title={displayFileName}>\r\n {displayFileName}\r\n </span>\r\n <span className=\"text-green-600 text-xs\" title={displayFileName}>\r\n To Upload new file, please remove existing\r\n </span>\r\n </div>\r\n </div>\r\n <Button\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n className=\"text-red-500 hover:text-red-700 hover:bg-red-100 p-2 h-auto\"\r\n onClick={handleRemoveFile}\r\n >\r\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </Button>\r\n </motion.div>\r\n ) : (\r\n <motion.div\r\n initial={{ opacity: 0 }}\r\n animate={{ opacity: 1 }}\r\n exit={{ opacity: 0 }}\r\n className=\"flex flex-col items-center space-y-4\"\r\n >\r\n <div className=\"p-3 rounded-full bg-primaryx-100\">\r\n <svg className=\"w-6 h-6 text-primaryx-500\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12\" />\r\n </svg>\r\n </div>\r\n <div className=\"text-center space-y-2\">\r\n <span className=\"text-primaryx-500 font-semibold text-sm\">\r\n Drag and drop CSV 📁\r\n </span>\r\n <p className=\"text-gray-500 text-xs\">\r\n or tap to choose 👆\r\n </p>\r\n </div>\r\n </motion.div>\r\n )}\r\n </AnimatePresence>\r\n </div>\r\n </motion.div>\r\n\r\n <InputErrorMessage \r\n error={error || (propError && (propError.toLowerCase().includes(\"file\") || propError.toLowerCase().includes(\"csv\")) ? propError : \"\")} \r\n className=\"mt-2\" \r\n />\r\n </div>\r\n\r\n <div className=\"pl-1 pr-1 mt-4\">\r\n <CheckboxGroup\r\n label=\"Applies on\"\r\n formData={{ applies_on: question.applies_on || [] }}\r\n setFormData={handleSetFormData}\r\n field=\"applies_on\"\r\n options={checkboxOptions}\r\n />\r\n <InputErrorMessage \r\n error={propError && propError.toLowerCase().includes(\"applies on\") ? propError : \"\"} \r\n className=\"mt-2\" \r\n />\r\n </div>\r\n </>\r\n}\r\n\r\nexport default memo(DiscountInput)\r\n"],"names":["event"],"mappings":";;;;;;;;;;AAWA,MAAM,cAAc,CAAC,UAAoB;AACrC,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,UAAM,OAAO,MAAM,CAAC,EAAE,KAAA;AACtB,QAAI,MAAM;AACN,YAAM,SAAS,KAAK,MAAM,GAAG;AAE7B,UAAI,OAAO,WAAW,GAAG;AACrB,eAAO,EAAE,SAAS,MAAM,SAAS,8BAA8B,IAAI,CAAC,GAAA;AAAA,MACxE;AAEA,UAAI,CAAC,OAAO,CAAC,EAAE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