@oneblink/apps-react 9.0.0-beta.2 → 9.0.0-beta.4

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 (368) hide show
  1. package/dist/OneBlinkForm.d.ts +6 -10
  2. package/dist/OneBlinkForm.js +0 -4
  3. package/dist/OneBlinkForm.js.map +1 -1
  4. package/dist/OneBlinkFormBase.d.ts +1 -1
  5. package/dist/OneBlinkFormBase.js +2 -1
  6. package/dist/OneBlinkFormBase.js.map +1 -1
  7. package/dist/OneBlinkReadOnlyForm.d.ts +1 -1
  8. package/dist/OneBlinkReadOnlyForm.js +1 -1
  9. package/dist/OneBlinkReadOnlyForm.js.map +1 -1
  10. package/dist/PaymentReceipt.d.ts +1 -1
  11. package/dist/PaymentReceipt.js +1 -1
  12. package/dist/PaymentReceipt.js.map +1 -1
  13. package/dist/apps/Sentry.d.ts +7 -0
  14. package/dist/apps/Sentry.js +16 -0
  15. package/dist/apps/Sentry.js.map +1 -0
  16. package/dist/apps/approvals-service.d.ts +390 -0
  17. package/dist/apps/approvals-service.js +987 -0
  18. package/dist/apps/approvals-service.js.map +1 -0
  19. package/dist/apps/attachments-service.d.ts +49 -0
  20. package/dist/apps/attachments-service.js +134 -0
  21. package/dist/apps/attachments-service.js.map +1 -0
  22. package/dist/apps/auth-service.d.ts +114 -0
  23. package/dist/apps/auth-service.js +194 -0
  24. package/dist/apps/auth-service.js.map +1 -0
  25. package/dist/apps/auto-save-service.d.ts +82 -0
  26. package/dist/apps/auto-save-service.js +105 -0
  27. package/dist/apps/auto-save-service.js.map +1 -0
  28. package/dist/apps/draft-service.d.ts +148 -0
  29. package/dist/apps/draft-service.js +583 -0
  30. package/dist/apps/draft-service.js.map +1 -0
  31. package/dist/apps/form-service.d.ts +204 -0
  32. package/dist/apps/form-service.js +718 -0
  33. package/dist/apps/form-service.js.map +1 -0
  34. package/dist/apps/form-store-service.d.ts +141 -0
  35. package/dist/apps/form-store-service.js +114 -0
  36. package/dist/apps/form-store-service.js.map +1 -0
  37. package/dist/apps/forms-app-environment-service.d.ts +19 -0
  38. package/dist/apps/forms-app-environment-service.js +55 -0
  39. package/dist/apps/forms-app-environment-service.js.map +1 -0
  40. package/dist/apps/forms-app-service.d.ts +18 -0
  41. package/dist/apps/forms-app-service.js +53 -0
  42. package/dist/apps/forms-app-service.js.map +1 -0
  43. package/dist/apps/index.d.ts +252 -0
  44. package/dist/apps/index.js +254 -0
  45. package/dist/apps/index.js.map +1 -0
  46. package/dist/apps/job-service.d.ts +20 -0
  47. package/dist/apps/job-service.js +95 -0
  48. package/dist/apps/job-service.js.map +1 -0
  49. package/dist/apps/localisation-service.d.ts +207 -0
  50. package/dist/apps/localisation-service.js +321 -0
  51. package/dist/apps/localisation-service.js.map +1 -0
  52. package/dist/apps/notification-service.d.ts +83 -0
  53. package/dist/apps/notification-service.js +315 -0
  54. package/dist/apps/notification-service.js.map +1 -0
  55. package/dist/apps/offline-service.d.ts +18 -0
  56. package/dist/apps/offline-service.js +25 -0
  57. package/dist/apps/offline-service.js.map +1 -0
  58. package/dist/apps/payment-service.d.ts +110 -0
  59. package/dist/apps/payment-service.js +182 -0
  60. package/dist/apps/payment-service.js.map +1 -0
  61. package/dist/apps/prefill-service.d.ts +14 -0
  62. package/dist/apps/prefill-service.js +19 -0
  63. package/dist/apps/prefill-service.js.map +1 -0
  64. package/dist/apps/scheduled-tasks-service.d.ts +127 -0
  65. package/dist/apps/scheduled-tasks-service.js +240 -0
  66. package/dist/apps/scheduled-tasks-service.js.map +1 -0
  67. package/dist/apps/scheduling-service.d.ts +101 -0
  68. package/dist/apps/scheduling-service.js +171 -0
  69. package/dist/apps/scheduling-service.js.map +1 -0
  70. package/dist/apps/services/AWSCognitoClient.d.ts +55 -0
  71. package/dist/apps/services/AWSCognitoClient.js +436 -0
  72. package/dist/apps/services/AWSCognitoClient.js.map +1 -0
  73. package/dist/apps/services/api/drafts.d.ts +7 -0
  74. package/dist/apps/services/api/drafts.js +236 -0
  75. package/dist/apps/services/api/drafts.js.map +1 -0
  76. package/dist/apps/services/api/notifications.d.ts +3 -0
  77. package/dist/apps/services/api/notifications.js +60 -0
  78. package/dist/apps/services/api/notifications.js.map +1 -0
  79. package/dist/apps/services/api/payment.d.ts +23 -0
  80. package/dist/apps/services/api/payment.js +235 -0
  81. package/dist/apps/services/api/payment.js.map +1 -0
  82. package/dist/apps/services/api/post-submission-attachment-urls.d.ts +7 -0
  83. package/dist/apps/services/api/post-submission-attachment-urls.js +19 -0
  84. package/dist/apps/services/api/post-submission-attachment-urls.js.map +1 -0
  85. package/dist/apps/services/api/prefill.d.ts +1 -0
  86. package/dist/apps/services/api/prefill.js +70 -0
  87. package/dist/apps/services/api/prefill.js.map +1 -0
  88. package/dist/apps/services/api/receipt-id.d.ts +2 -0
  89. package/dist/apps/services/api/receipt-id.js +54 -0
  90. package/dist/apps/services/api/receipt-id.js.map +1 -0
  91. package/dist/apps/services/api/scheduling.d.ts +38 -0
  92. package/dist/apps/services/api/scheduling.js +142 -0
  93. package/dist/apps/services/api/scheduling.js.map +1 -0
  94. package/dist/apps/services/api/submissions.d.ts +18 -0
  95. package/dist/apps/services/api/submissions.js +166 -0
  96. package/dist/apps/services/api/submissions.js.map +1 -0
  97. package/dist/apps/services/cognito.d.ts +302 -0
  98. package/dist/apps/services/cognito.js +441 -0
  99. package/dist/apps/services/cognito.js.map +1 -0
  100. package/dist/apps/services/draft-data-store.d.ts +16 -0
  101. package/dist/apps/services/draft-data-store.js +115 -0
  102. package/dist/apps/services/draft-data-store.js.map +1 -0
  103. package/dist/apps/services/errors/oneBlinkAppsError.d.ts +35 -0
  104. package/dist/apps/services/errors/oneBlinkAppsError.js +32 -0
  105. package/dist/apps/services/errors/oneBlinkAppsError.js.map +1 -0
  106. package/dist/apps/services/external-id-generation.d.ts +4 -0
  107. package/dist/apps/services/external-id-generation.js +59 -0
  108. package/dist/apps/services/external-id-generation.js.map +1 -0
  109. package/dist/apps/services/fetch.d.ts +12 -0
  110. package/dist/apps/services/fetch.js +95 -0
  111. package/dist/apps/services/fetch.js.map +1 -0
  112. package/dist/apps/services/forms-key.d.ts +51 -0
  113. package/dist/apps/services/forms-key.js +83 -0
  114. package/dist/apps/services/forms-key.js.map +1 -0
  115. package/dist/apps/services/generate-generic-error.d.ts +3 -0
  116. package/dist/apps/services/generate-generic-error.js +52 -0
  117. package/dist/apps/services/generate-generic-error.js.map +1 -0
  118. package/dist/apps/services/generateOneBlinkDownloader.d.ts +2 -0
  119. package/dist/apps/services/generateOneBlinkDownloader.js +11 -0
  120. package/dist/apps/services/generateOneBlinkDownloader.js.map +1 -0
  121. package/dist/apps/services/generateOneBlinkUploader.d.ts +2 -0
  122. package/dist/apps/services/generateOneBlinkUploader.js +11 -0
  123. package/dist/apps/services/generateOneBlinkUploader.js.map +1 -0
  124. package/dist/apps/services/getDeviceInformation.d.ts +17 -0
  125. package/dist/apps/services/getDeviceInformation.js +38 -0
  126. package/dist/apps/services/getDeviceInformation.js.map +1 -0
  127. package/dist/apps/services/integration-elements.d.ts +383 -0
  128. package/dist/apps/services/integration-elements.js +761 -0
  129. package/dist/apps/services/integration-elements.js.map +1 -0
  130. package/dist/apps/services/job-prefill.d.ts +40 -0
  131. package/dist/apps/services/job-prefill.js +78 -0
  132. package/dist/apps/services/job-prefill.js.map +1 -0
  133. package/dist/apps/services/payment-providers/BPOINTPaymentProvider.d.ts +29 -0
  134. package/dist/apps/services/payment-providers/BPOINTPaymentProvider.js +59 -0
  135. package/dist/apps/services/payment-providers/BPOINTPaymentProvider.js.map +1 -0
  136. package/dist/apps/services/payment-providers/CPPayPaymentProvider.d.ts +27 -0
  137. package/dist/apps/services/payment-providers/CPPayPaymentProvider.js +63 -0
  138. package/dist/apps/services/payment-providers/CPPayPaymentProvider.js.map +1 -0
  139. package/dist/apps/services/payment-providers/NSWGovPayPaymentProvider.d.ts +30 -0
  140. package/dist/apps/services/payment-providers/NSWGovPayPaymentProvider.js +116 -0
  141. package/dist/apps/services/payment-providers/NSWGovPayPaymentProvider.js.map +1 -0
  142. package/dist/apps/services/payment-providers/WestpacQuickStreamPaymentProvider.d.ts +49 -0
  143. package/dist/apps/services/payment-providers/WestpacQuickStreamPaymentProvider.js +116 -0
  144. package/dist/apps/services/payment-providers/WestpacQuickStreamPaymentProvider.js.map +1 -0
  145. package/dist/apps/services/payment-providers/receipt-items.d.ts +8 -0
  146. package/dist/apps/services/payment-providers/receipt-items.js +58 -0
  147. package/dist/apps/services/payment-providers/receipt-items.js.map +1 -0
  148. package/dist/apps/services/pending-queue.d.ts +150 -0
  149. package/dist/apps/services/pending-queue.js +316 -0
  150. package/dist/apps/services/pending-queue.js.map +1 -0
  151. package/dist/apps/services/prepareSubmissionData.d.ts +2 -0
  152. package/dist/apps/services/prepareSubmissionData.js +113 -0
  153. package/dist/apps/services/prepareSubmissionData.js.map +1 -0
  154. package/dist/apps/services/query-string.d.ts +1 -0
  155. package/dist/apps/services/query-string.js +16 -0
  156. package/dist/apps/services/query-string.js.map +1 -0
  157. package/dist/apps/services/replaceInjectablesWithSubmissionValues.d.ts +3 -0
  158. package/dist/apps/services/replaceInjectablesWithSubmissionValues.js +18 -0
  159. package/dist/apps/services/replaceInjectablesWithSubmissionValues.js.map +1 -0
  160. package/dist/apps/services/schedulingHandlers.d.ts +36 -0
  161. package/dist/apps/services/schedulingHandlers.js +76 -0
  162. package/dist/apps/services/schedulingHandlers.js.map +1 -0
  163. package/dist/apps/services/server-validation.d.ts +2 -0
  164. package/dist/apps/services/server-validation.js +36 -0
  165. package/dist/apps/services/server-validation.js.map +1 -0
  166. package/dist/apps/services/serverRequest.d.ts +5 -0
  167. package/dist/apps/services/serverRequest.js +24 -0
  168. package/dist/apps/services/serverRequest.js.map +1 -0
  169. package/dist/apps/services/submit.d.ts +19 -0
  170. package/dist/apps/services/submit.js +219 -0
  171. package/dist/apps/services/submit.js.map +1 -0
  172. package/dist/apps/services/uploadAttachment.d.ts +52 -0
  173. package/dist/apps/services/uploadAttachment.js +73 -0
  174. package/dist/apps/services/uploadAttachment.js.map +1 -0
  175. package/dist/apps/services/user-token.d.ts +27 -0
  176. package/dist/apps/services/user-token.js +33 -0
  177. package/dist/apps/services/user-token.js.map +1 -0
  178. package/dist/apps/services/utils.d.ts +12 -0
  179. package/dist/apps/services/utils.js +100 -0
  180. package/dist/apps/services/utils.js.map +1 -0
  181. package/dist/apps/submission-service.d.ts +226 -0
  182. package/dist/apps/submission-service.js +425 -0
  183. package/dist/apps/submission-service.js.map +1 -0
  184. package/dist/apps/tenants.d.ts +29 -0
  185. package/dist/apps/tenants.js +127 -0
  186. package/dist/apps/tenants.js.map +1 -0
  187. package/dist/apps/types/form.d.ts +4 -0
  188. package/dist/apps/types/form.js +2 -0
  189. package/dist/apps/types/form.js.map +1 -0
  190. package/dist/apps/types/payments.d.ts +45 -0
  191. package/dist/apps/types/payments.js +2 -0
  192. package/dist/apps/types/payments.js.map +1 -0
  193. package/dist/apps/types/scheduling.d.ts +5 -0
  194. package/dist/apps/types/scheduling.js +2 -0
  195. package/dist/apps/types/scheduling.js.map +1 -0
  196. package/dist/apps/types/submissions.d.ts +175 -0
  197. package/dist/apps/types/submissions.js +2 -0
  198. package/dist/apps/types/submissions.js.map +1 -0
  199. package/dist/components/ArcGISWebMap.js +1 -1
  200. package/dist/components/ArcGISWebMap.js.map +1 -1
  201. package/dist/components/CustomAccordion.d.ts +3 -3
  202. package/dist/components/Lists.d.ts +4 -1
  203. package/dist/components/calendar-bookings/CalendarBookingsCancelForm.js +1 -1
  204. package/dist/components/calendar-bookings/CalendarBookingsCancelForm.js.map +1 -1
  205. package/dist/components/calendar-bookings/CalendarBookingsForm.d.ts +1 -1
  206. package/dist/components/calendar-bookings/CalendarBookingsForm.js +1 -1
  207. package/dist/components/calendar-bookings/CalendarBookingsForm.js.map +1 -1
  208. package/dist/components/calendar-bookings/CalendarBookingsReschedulingForm.js +1 -1
  209. package/dist/components/calendar-bookings/CalendarBookingsReschedulingForm.js.map +1 -1
  210. package/dist/components/calendar-bookings/ErrorModal.d.ts +1 -1
  211. package/dist/components/calendar-bookings/ErrorModal.js +1 -1
  212. package/dist/components/calendar-bookings/ErrorModal.js.map +1 -1
  213. package/dist/components/downloadable-files/index.d.ts +1 -1
  214. package/dist/components/downloadable-files/index.js +1 -1
  215. package/dist/components/downloadable-files/index.js.map +1 -1
  216. package/dist/components/downloadable-files/resource-components.d.ts +1 -1
  217. package/dist/components/downloadable-files/resource-components.js +1 -1
  218. package/dist/components/downloadable-files/resource-components.js.map +1 -1
  219. package/dist/components/formStore/FormStoreTableProvider.js +1 -1
  220. package/dist/components/formStore/FormStoreTableProvider.js.map +1 -1
  221. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js.map +1 -1
  222. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js +1 -1
  223. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js.map +1 -1
  224. package/dist/components/formStore/OneBlinkFormStoreProvider.js +1 -1
  225. package/dist/components/formStore/OneBlinkFormStoreProvider.js.map +1 -1
  226. package/dist/components/formStore/OneBlinkFormStoreTable.js.map +1 -1
  227. package/dist/components/formStore/display/ElementDisplay.js +2 -2
  228. package/dist/components/formStore/display/ElementDisplay.js.map +1 -1
  229. package/dist/components/formStore/table/ColumnFilters.js +1 -1
  230. package/dist/components/formStore/table/ColumnFilters.js.map +1 -1
  231. package/dist/components/formStore/table/FormElementTableCell.js +1 -1
  232. package/dist/components/formStore/table/FormElementTableCell.js.map +1 -1
  233. package/dist/components/formStore/table/Pickers.js +1 -1
  234. package/dist/components/formStore/table/Pickers.js.map +1 -1
  235. package/dist/components/formStore/table/generateColumns.d.ts +1 -1
  236. package/dist/components/formStore/table/generateColumns.js.map +1 -1
  237. package/dist/components/formStore/table/useFormStoreTable.d.ts +1 -1
  238. package/dist/components/formStore/table/useFormStoreTable.js +1 -1
  239. package/dist/components/formStore/table/useFormStoreTable.js.map +1 -1
  240. package/dist/components/formStore/useFormStoreTableContext.d.ts +2 -2
  241. package/dist/components/mfa/MfaDialog.d.ts +1 -1
  242. package/dist/components/mfa/MfaDialog.js +1 -1
  243. package/dist/components/mfa/MfaDialog.js.map +1 -1
  244. package/dist/components/mfa/MultiFactorAuthentication.d.ts +1 -1
  245. package/dist/components/payments/PaymentForm.js +1 -1
  246. package/dist/components/payments/PaymentForm.js.map +1 -1
  247. package/dist/components/payments/WestpacQuickStreamPaymentForm.d.ts +1 -1
  248. package/dist/components/payments/WestpacQuickStreamPaymentForm.js +1 -1
  249. package/dist/components/payments/WestpacQuickStreamPaymentForm.js.map +1 -1
  250. package/dist/components/renderer/AutocompleteDropdown.js +1 -1
  251. package/dist/components/renderer/AutocompleteDropdown.js.map +1 -1
  252. package/dist/components/renderer/LookupNotification.js +2 -2
  253. package/dist/components/renderer/LookupNotification.js.map +1 -1
  254. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.js +1 -1
  255. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.js.map +1 -1
  256. package/dist/components/renderer/OneBlinkFormElements.js.map +1 -1
  257. package/dist/components/renderer/ReverseGeocode.js +1 -1
  258. package/dist/components/renderer/ReverseGeocode.js.map +1 -1
  259. package/dist/form-elements/FormElementAPINSWLiquorLicence.js +1 -1
  260. package/dist/form-elements/FormElementAPINSWLiquorLicence.js.map +1 -1
  261. package/dist/form-elements/FormElementArcGISWebMap.js.map +1 -1
  262. package/dist/form-elements/FormElementAutocomplete.js +1 -1
  263. package/dist/form-elements/FormElementAutocomplete.js.map +1 -1
  264. package/dist/form-elements/FormElementBSB.js +1 -1
  265. package/dist/form-elements/FormElementBSB.js.map +1 -1
  266. package/dist/form-elements/FormElementCalculation.js +2 -2
  267. package/dist/form-elements/FormElementCalculation.js.map +1 -1
  268. package/dist/form-elements/FormElementCivicaNameRecord.js +1 -1
  269. package/dist/form-elements/FormElementCivicaNameRecord.js.map +1 -1
  270. package/dist/form-elements/FormElementCivicaStreetName.js +1 -1
  271. package/dist/form-elements/FormElementCivicaStreetName.js.map +1 -1
  272. package/dist/form-elements/FormElementCompliance.d.ts +1 -1
  273. package/dist/form-elements/FormElementCompliance.js.map +1 -1
  274. package/dist/form-elements/FormElementDate.js +1 -1
  275. package/dist/form-elements/FormElementDate.js.map +1 -1
  276. package/dist/form-elements/FormElementDateTime.js +1 -1
  277. package/dist/form-elements/FormElementDateTime.js.map +1 -1
  278. package/dist/form-elements/FormElementFile.d.ts +1 -1
  279. package/dist/form-elements/FormElementFile.js.map +1 -1
  280. package/dist/form-elements/FormElementFiles.d.ts +1 -1
  281. package/dist/form-elements/FormElementFiles.js.map +1 -1
  282. package/dist/form-elements/FormElementGeoscapeAddress.js +1 -1
  283. package/dist/form-elements/FormElementGeoscapeAddress.js.map +1 -1
  284. package/dist/form-elements/FormElementGoogleAddress.js +1 -1
  285. package/dist/form-elements/FormElementGoogleAddress.js.map +1 -1
  286. package/dist/form-elements/FormElementLocation.js +1 -1
  287. package/dist/form-elements/FormElementLocation.js.map +1 -1
  288. package/dist/form-elements/FormElementNumber.js +1 -1
  289. package/dist/form-elements/FormElementNumber.js.map +1 -1
  290. package/dist/form-elements/FormElementPointAddress.js +1 -1
  291. package/dist/form-elements/FormElementPointAddress.js.map +1 -1
  292. package/dist/form-elements/FormElementPointAddressV3.js +1 -1
  293. package/dist/form-elements/FormElementPointAddressV3.js.map +1 -1
  294. package/dist/form-elements/FormElementPointCadastralParcel.js +1 -1
  295. package/dist/form-elements/FormElementPointCadastralParcel.js.map +1 -1
  296. package/dist/form-elements/FormElementSummary.js +1 -1
  297. package/dist/form-elements/FormElementSummary.js.map +1 -1
  298. package/dist/form-elements/FormElementTime.js +1 -1
  299. package/dist/form-elements/FormElementTime.js.map +1 -1
  300. package/dist/hooks/attachments/useAttachment.d.ts +1 -1
  301. package/dist/hooks/attachments/useAttachment.js +1 -1
  302. package/dist/hooks/attachments/useAttachment.js.map +1 -1
  303. package/dist/hooks/attachments/useAttachments.d.ts +1 -1
  304. package/dist/hooks/attachments/useAttachments.js.map +1 -1
  305. package/dist/hooks/useAuth.js +1 -1
  306. package/dist/hooks/useAuth.js.map +1 -1
  307. package/dist/hooks/useConditionalLogic.js +1 -1
  308. package/dist/hooks/useConditionalLogic.js.map +1 -1
  309. package/dist/hooks/useDrafts.d.ts +1 -1
  310. package/dist/hooks/useDrafts.js +1 -1
  311. package/dist/hooks/useDrafts.js.map +1 -1
  312. package/dist/hooks/useDynamicOptionsLoaderState.d.ts +1 -1
  313. package/dist/hooks/useDynamicOptionsLoaderState.js +1 -1
  314. package/dist/hooks/useDynamicOptionsLoaderState.js.map +1 -1
  315. package/dist/hooks/useFormElementLookups.d.ts +1 -1
  316. package/dist/hooks/useFormElementLookups.js +1 -1
  317. package/dist/hooks/useFormElementLookups.js.map +1 -1
  318. package/dist/hooks/useFormSubmissionAutoSaveState.d.ts +1 -1
  319. package/dist/hooks/useFormSubmissionAutoSaveState.js +1 -1
  320. package/dist/hooks/useFormSubmissionAutoSaveState.js.map +1 -1
  321. package/dist/hooks/useIsOffline.js +1 -1
  322. package/dist/hooks/useIsOffline.js.map +1 -1
  323. package/dist/hooks/useLogin.js +1 -1
  324. package/dist/hooks/useLogin.js.map +1 -1
  325. package/dist/hooks/useMfa.d.ts +1 -1
  326. package/dist/hooks/useMfa.js +1 -1
  327. package/dist/hooks/useMfa.js.map +1 -1
  328. package/dist/hooks/useOnUploadAttachment.d.ts +1 -1
  329. package/dist/hooks/useOnUploadAttachment.js +1 -1
  330. package/dist/hooks/useOnUploadAttachment.js.map +1 -1
  331. package/dist/hooks/usePendingSubmissions.d.ts +1 -1
  332. package/dist/hooks/usePendingSubmissions.js +1 -1
  333. package/dist/hooks/usePendingSubmissions.js.map +1 -1
  334. package/dist/hooks/useReplaceableText.js +1 -1
  335. package/dist/hooks/useReplaceableText.js.map +1 -1
  336. package/dist/hooks/useSignUp.js +1 -1
  337. package/dist/hooks/useSignUp.js.map +1 -1
  338. package/dist/index.d.ts +1 -0
  339. package/dist/index.js +2 -0
  340. package/dist/index.js.map +1 -1
  341. package/dist/services/attachments.d.ts +1 -1
  342. package/dist/services/attachments.js +1 -1
  343. package/dist/services/attachments.js.map +1 -1
  344. package/dist/services/blob-utils.js +1 -1
  345. package/dist/services/blob-utils.js.map +1 -1
  346. package/dist/services/checkIfAttachmentsExist.d.ts +1 -1
  347. package/dist/services/checkIfAttachmentsExist.js.map +1 -1
  348. package/dist/services/defaultCoordinates.js +1 -1
  349. package/dist/services/defaultCoordinates.js.map +1 -1
  350. package/dist/services/download-file.d.ts +1 -1
  351. package/dist/services/download-file.js +2 -2
  352. package/dist/services/download-file.js.map +1 -1
  353. package/dist/services/drawTimestampOnCanvas.js +1 -1
  354. package/dist/services/drawTimestampOnCanvas.js.map +1 -1
  355. package/dist/services/form-validation/validateSubmission.js +1 -1
  356. package/dist/services/form-validation/validateSubmission.js.map +1 -1
  357. package/dist/services/form-validation/validators.d.ts +1 -1
  358. package/dist/services/form-validation/validators.js.map +1 -1
  359. package/dist/services/generate-default-data.js +1 -1
  360. package/dist/services/generate-default-data.js.map +1 -1
  361. package/dist/services/injectableOptions.js +1 -1
  362. package/dist/services/injectableOptions.js.map +1 -1
  363. package/dist/styles.css +208 -204
  364. package/dist/types/attachments.d.ts +1 -1
  365. package/dist/types/attachments.js.map +1 -1
  366. package/dist/utils/sendGoogleAnalyticsEvent.js +1 -1
  367. package/dist/utils/sendGoogleAnalyticsEvent.js.map +1 -1
  368. package/package.json +42 -34
@@ -0,0 +1,45 @@
1
+ import { SubmissionEventTypes } from '@oneblink/types';
2
+ import { FormSubmissionResult } from './submissions';
3
+ import { SchedulingBooking } from '../scheduling-service';
4
+ export type PaymentReceiptItem = {
5
+ /** The label to represent the value */
6
+ label: string;
7
+ /** The value to display */
8
+ value: string;
9
+ /** A CSS class to add to the HTML element container */
10
+ className?: string;
11
+ /** A CSS class to add to the HTML element containing the value */
12
+ valueClassName?: string;
13
+ /** A [material icon](https://fonts.google.com/icons) */
14
+ icon?: string;
15
+ /** Display a button on the receipt item to copy the value to the clipboard */
16
+ allowCopyToClipboard: boolean;
17
+ };
18
+ export type VerifiedPaymentTransaction = {
19
+ receiptItems: PaymentReceiptItem[];
20
+ transaction: {
21
+ /** `true` if the transaction was successful */
22
+ isSuccess: boolean;
23
+ /** The error message to display if `isSuccess` is `false` */
24
+ errorMessage: string | undefined | null;
25
+ };
26
+ submissionResult: FormSubmissionResult;
27
+ };
28
+ export type HandlePaymentResult = VerifiedPaymentTransaction & {
29
+ schedulingBooking: SchedulingBooking | undefined;
30
+ };
31
+ export type BasePaymentConfigurationPayload = {
32
+ amount: number;
33
+ redirectUrl: string;
34
+ submissionId: string | null;
35
+ paymentFormUrl?: string;
36
+ };
37
+ export interface PaymentProvider<T extends SubmissionEventTypes.FormPaymentEvent> {
38
+ formSubmissionResult: FormSubmissionResult;
39
+ paymentSubmissionEvent: T;
40
+ preparePaymentConfiguration(basePayload: BasePaymentConfigurationPayload): {
41
+ path: string;
42
+ payload: BasePaymentConfigurationPayload;
43
+ };
44
+ verifyPaymentTransaction(query: Record<string, unknown>): Promise<VerifiedPaymentTransaction>;
45
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=payments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments.js","sourceRoot":"","sources":["../../../src/apps/types/payments.ts"],"names":[],"mappings":"","sourcesContent":["import { SubmissionEventTypes } from '@oneblink/types'\nimport { FormSubmissionResult } from './submissions'\nimport { SchedulingBooking } from '../scheduling-service'\n\nexport type PaymentReceiptItem = {\n /** The label to represent the value */\n label: string\n /** The value to display */\n value: string\n /** A CSS class to add to the HTML element container */\n className?: string\n /** A CSS class to add to the HTML element containing the value */\n valueClassName?: string\n /** A [material icon](https://fonts.google.com/icons) */\n icon?: string\n /** Display a button on the receipt item to copy the value to the clipboard */\n allowCopyToClipboard: boolean\n}\n\nexport type VerifiedPaymentTransaction = {\n receiptItems: PaymentReceiptItem[]\n transaction: {\n /** `true` if the transaction was successful */\n isSuccess: boolean\n /** The error message to display if `isSuccess` is `false` */\n errorMessage: string | undefined | null\n }\n submissionResult: FormSubmissionResult\n}\n\nexport type HandlePaymentResult = VerifiedPaymentTransaction & {\n schedulingBooking: SchedulingBooking | undefined\n}\n\nexport type BasePaymentConfigurationPayload = {\n amount: number\n redirectUrl: string\n submissionId: string | null\n paymentFormUrl?: string\n}\n\nexport interface PaymentProvider<\n T extends SubmissionEventTypes.FormPaymentEvent,\n> {\n formSubmissionResult: FormSubmissionResult\n paymentSubmissionEvent: T\n\n preparePaymentConfiguration(basePayload: BasePaymentConfigurationPayload): {\n path: string\n payload: BasePaymentConfigurationPayload\n }\n\n verifyPaymentTransaction(\n query: Record<string, unknown>,\n ): Promise<VerifiedPaymentTransaction>\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export type SchedulingUrlConfiguration = {
2
+ schedulingBookingUrl: string;
3
+ schedulingCancelUrl: string;
4
+ schedulingRescheduleUrl?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scheduling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduling.js","sourceRoot":"","sources":["../../../src/apps/types/scheduling.ts"],"names":[],"mappings":"","sourcesContent":["export type SchedulingUrlConfiguration = {\n schedulingBookingUrl: string\n schedulingCancelUrl: string\n schedulingRescheduleUrl?: string\n}\n"]}
@@ -0,0 +1,175 @@
1
+ import { FormTypes, SubmissionEventTypes, SubmissionTypes, ScheduledTasksTypes } from '@oneblink/types';
2
+ import { FormElement } from '@oneblink/types/typescript/forms';
3
+ export { ProgressListener, ProgressListenerEvent } from '@oneblink/storage';
4
+ export type BaseNewFormSubmission = {
5
+ /** The submission data */
6
+ submission: SubmissionTypes.S3SubmissionData['submission'];
7
+ /** The form definition when the draft was saved */
8
+ definition: FormTypes.Form;
9
+ };
10
+ export type NewDraftSubmission = BaseNewFormSubmission & {
11
+ /**
12
+ * Set to true if the submission should be uploaded in the background, false
13
+ * or undefined if the submission should be uploaded immediately
14
+ */
15
+ backgroundUpload?: boolean;
16
+ /** The element that was last updated before the draft was saved */
17
+ lastElementUpdated?: FormElement;
18
+ /** The state of sections before the draft was saved */
19
+ sectionState?: SubmissionTypes.NewS3SubmissionData['sectionState'];
20
+ /**
21
+ * The elapsed duration in seconds the user took to complete the submission
22
+ * before the draft was saved
23
+ */
24
+ previousElapsedDurationSeconds?: SubmissionTypes.NewS3SubmissionData['previousElapsedDurationSeconds'];
25
+ };
26
+ export type NewFormSubmission = BaseNewFormSubmission & {
27
+ /** The reCAPTCHA tokens to validate the submission */
28
+ recaptchas?: Array<{
29
+ /** The site key that was used to generate the reCAPTCHA token */
30
+ siteKey: string;
31
+ /** A reCAPTCHA token */
32
+ token: string;
33
+ }>;
34
+ };
35
+ export type BaseFormSubmission = {
36
+ /** The id of the job to submit */
37
+ jobId?: string;
38
+ /** The id of the Forms App submitting for */
39
+ externalId?: string;
40
+ /**
41
+ * The id of the previous form submission approval id. Only used when the form
42
+ * submission is in response to `CLARIFICATION_REQUIRED` approval.
43
+ */
44
+ previousFormSubmissionApprovalId?: string;
45
+ /**
46
+ * Will have a value if the user was attempting to complete a scheduled task
47
+ * via a form submission
48
+ */
49
+ taskCompletion?: {
50
+ /** The task */
51
+ task: ScheduledTasksTypes.Task;
52
+ /** The task action */
53
+ taskAction: ScheduledTasksTypes.TaskAction;
54
+ /** The task group */
55
+ taskGroup: ScheduledTasksTypes.TaskGroup | undefined;
56
+ /** The task group instance */
57
+ taskGroupInstance: ScheduledTasksTypes.TaskGroupInstance | undefined;
58
+ /**
59
+ * The URL to redirect the user to after completing the task via form
60
+ * submission
61
+ */
62
+ redirectUrl: string;
63
+ };
64
+ };
65
+ export type DraftSubmissionInput = NewDraftSubmission & BaseFormSubmission & {
66
+ /** The id of the Forms App submitting for */
67
+ formsAppId: number;
68
+ /** The title input by a user to identify the draft. */
69
+ title: string;
70
+ };
71
+ export type DraftSubmission = DraftSubmissionInput & {
72
+ /**
73
+ * The date and time (in ISO format) when this version of the draft was
74
+ * created.
75
+ */
76
+ createdAt: string;
77
+ /**
78
+ * The identifier for the parent draft record. Created client side to store
79
+ * the draft locally for offline capability
80
+ */
81
+ formSubmissionDraftId: string;
82
+ };
83
+ export type LocalFormSubmissionDraft = Omit<SubmissionTypes.FormSubmissionDraft, 'id' | 'versions'> & {
84
+ /**
85
+ * The versions of the draft data. `undefined` if it has not been uploaded
86
+ * remotely yet.
87
+ */
88
+ versions: SubmissionTypes.FormSubmissionDraftVersion[] | undefined;
89
+ /**
90
+ * The draft submission data. `undefined` if it has not been downloaded
91
+ * locally yet.
92
+ */
93
+ draftSubmission: DraftSubmission | undefined;
94
+ /** `true` if the draft was created by a public user (not logged in). */
95
+ isPublic?: boolean;
96
+ };
97
+ export type FormSubmission = NewFormSubmission & BaseFormSubmission & {
98
+ /** The id of the Forms App submitting for */
99
+ formsAppId?: number;
100
+ /** The id of the draft to clean up after successful submission */
101
+ formSubmissionDraftId?: string;
102
+ /** The id of the prefill data to clean up after successful submission */
103
+ preFillFormDataId: string | null;
104
+ };
105
+ export type FormSubmissionResult = FormSubmission & {
106
+ /**
107
+ * The identifier that represents the submission. `null` if the form
108
+ * submission was unsuccessful
109
+ */
110
+ submissionId: string | null;
111
+ /**
112
+ * The timestamp the form was submitted, `null` if the form submission was
113
+ * unsuccessful
114
+ */
115
+ submissionTimestamp: string | null;
116
+ /** `null` if the form submission does not require a payment */
117
+ payment: {
118
+ /** The amount required to pay */
119
+ amount: number;
120
+ /** The URL to redirect the user to after payment to display a receipt */
121
+ paymentReceiptUrl: string;
122
+ /**
123
+ * The URL to redirect the user to to make a payment for a form hosted by
124
+ * customer instead of payment provider
125
+ */
126
+ paymentFormUrl: string | undefined;
127
+ /** The URL to redirect the user to to complete the payment process */
128
+ hostedFormUrl: string;
129
+ /** The payment submission event */
130
+ submissionEvent: SubmissionEventTypes.FormPaymentEvent;
131
+ } | null;
132
+ /** `null` if the form submission does not require a booking */
133
+ scheduling: {
134
+ /** The URL to redirect the user to to complete the booking process */
135
+ bookingUrl: string;
136
+ /** The scheduling submission event */
137
+ submissionEvent: SubmissionEventTypes.FormSchedulingEvent;
138
+ } | null;
139
+ /**
140
+ * `true` if the submission was not submitted yet and was added to the pending
141
+ * queue
142
+ */
143
+ isInPendingQueue: boolean;
144
+ /** `true` if the submission was attempted offline */
145
+ isOffline: boolean;
146
+ /** True if the submission was attempted whilst attachments were uploading */
147
+ isUploadingAttachments: boolean;
148
+ /** Exists if the form allows PDF download */
149
+ /**
150
+ * @deprecated Only returned when legacy post submission download
151
+ * configuration is in use. For non legacy configured forms, use
152
+ * `downloadSubmissionPdfs` instead.
153
+ */
154
+ downloadSubmissionPdfUrl?: string;
155
+ downloadSubmissionPdfs?: Array<{
156
+ id: string;
157
+ configuration: SubmissionEventTypes.PDFConfiguration;
158
+ url: string;
159
+ }>;
160
+ /** The access token to download post-submission attachment urls and metadata. */
161
+ attachmentsAccessToken?: string;
162
+ };
163
+ export type PendingFormSubmission = FormSubmission & {
164
+ /** The date and time (in ISO format) the submission was attempted */
165
+ pendingTimestamp: string;
166
+ /** `true` if the submission is currently being processed by the pending queue */
167
+ isSubmitting?: boolean;
168
+ /** `true` if the submission is currently being edited */
169
+ isEditing?: boolean;
170
+ /**
171
+ * An error message that might be set while attempting to process the
172
+ * submission in the pending queue
173
+ */
174
+ error?: string;
175
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=submissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submissions.js","sourceRoot":"","sources":["../../../src/apps/types/submissions.ts"],"names":[],"mappings":"","sourcesContent":["import {\n FormTypes,\n SubmissionEventTypes,\n SubmissionTypes,\n ScheduledTasksTypes,\n} from '@oneblink/types'\nimport { FormElement } from '@oneblink/types/typescript/forms'\n\nexport { ProgressListener, ProgressListenerEvent } from '@oneblink/storage'\n\nexport type BaseNewFormSubmission = {\n /** The submission data */\n submission: SubmissionTypes.S3SubmissionData['submission']\n /** The form definition when the draft was saved */\n definition: FormTypes.Form\n}\n\nexport type NewDraftSubmission = BaseNewFormSubmission & {\n /**\n * Set to true if the submission should be uploaded in the background, false\n * or undefined if the submission should be uploaded immediately\n */\n backgroundUpload?: boolean\n /** The element that was last updated before the draft was saved */\n lastElementUpdated?: FormElement\n /** The state of sections before the draft was saved */\n sectionState?: SubmissionTypes.NewS3SubmissionData['sectionState']\n /**\n * The elapsed duration in seconds the user took to complete the submission\n * before the draft was saved\n */\n\n previousElapsedDurationSeconds?: SubmissionTypes.NewS3SubmissionData['previousElapsedDurationSeconds']\n}\n\nexport type NewFormSubmission = BaseNewFormSubmission & {\n /** The reCAPTCHA tokens to validate the submission */\n recaptchas?: Array<{\n /** The site key that was used to generate the reCAPTCHA token */\n siteKey: string\n /** A reCAPTCHA token */\n token: string\n }>\n}\n\nexport type BaseFormSubmission = {\n /** The id of the job to submit */\n jobId?: string\n /** The id of the Forms App submitting for */\n externalId?: string\n /**\n * The id of the previous form submission approval id. Only used when the form\n * submission is in response to `CLARIFICATION_REQUIRED` approval.\n */\n previousFormSubmissionApprovalId?: string\n /**\n * Will have a value if the user was attempting to complete a scheduled task\n * via a form submission\n */\n taskCompletion?: {\n /** The task */\n task: ScheduledTasksTypes.Task\n /** The task action */\n taskAction: ScheduledTasksTypes.TaskAction\n /** The task group */\n taskGroup: ScheduledTasksTypes.TaskGroup | undefined\n /** The task group instance */\n taskGroupInstance: ScheduledTasksTypes.TaskGroupInstance | undefined\n /**\n * The URL to redirect the user to after completing the task via form\n * submission\n */\n redirectUrl: string\n }\n}\n\nexport type DraftSubmissionInput = NewDraftSubmission &\n BaseFormSubmission & {\n /** The id of the Forms App submitting for */\n formsAppId: number\n /** The title input by a user to identify the draft. */\n title: string\n }\n\nexport type DraftSubmission = DraftSubmissionInput & {\n /**\n * The date and time (in ISO format) when this version of the draft was\n * created.\n */\n createdAt: string\n /**\n * The identifier for the parent draft record. Created client side to store\n * the draft locally for offline capability\n */\n formSubmissionDraftId: string\n}\n\nexport type LocalFormSubmissionDraft = Omit<\n SubmissionTypes.FormSubmissionDraft,\n 'id' | 'versions'\n> & {\n /**\n * The versions of the draft data. `undefined` if it has not been uploaded\n * remotely yet.\n */\n versions: SubmissionTypes.FormSubmissionDraftVersion[] | undefined\n /**\n * The draft submission data. `undefined` if it has not been downloaded\n * locally yet.\n */\n draftSubmission: DraftSubmission | undefined\n /** `true` if the draft was created by a public user (not logged in). */\n isPublic?: boolean\n}\n\nexport type FormSubmission = NewFormSubmission &\n BaseFormSubmission & {\n /** The id of the Forms App submitting for */\n formsAppId?: number\n /** The id of the draft to clean up after successful submission */\n formSubmissionDraftId?: string\n /** The id of the prefill data to clean up after successful submission */\n preFillFormDataId: string | null\n }\n\nexport type FormSubmissionResult = FormSubmission & {\n /**\n * The identifier that represents the submission. `null` if the form\n * submission was unsuccessful\n */\n submissionId: string | null\n /**\n * The timestamp the form was submitted, `null` if the form submission was\n * unsuccessful\n */\n submissionTimestamp: string | null\n /** `null` if the form submission does not require a payment */\n payment: {\n /** The amount required to pay */\n amount: number\n /** The URL to redirect the user to after payment to display a receipt */\n paymentReceiptUrl: string\n /**\n * The URL to redirect the user to to make a payment for a form hosted by\n * customer instead of payment provider\n */\n paymentFormUrl: string | undefined\n /** The URL to redirect the user to to complete the payment process */\n hostedFormUrl: string\n /** The payment submission event */\n submissionEvent: SubmissionEventTypes.FormPaymentEvent\n } | null\n /** `null` if the form submission does not require a booking */\n scheduling: {\n /** The URL to redirect the user to to complete the booking process */\n bookingUrl: string\n /** The scheduling submission event */\n submissionEvent: SubmissionEventTypes.FormSchedulingEvent\n } | null\n /**\n * `true` if the submission was not submitted yet and was added to the pending\n * queue\n */\n isInPendingQueue: boolean\n /** `true` if the submission was attempted offline */\n isOffline: boolean\n /** True if the submission was attempted whilst attachments were uploading */\n isUploadingAttachments: boolean\n /** Exists if the form allows PDF download */\n /**\n * @deprecated Only returned when legacy post submission download\n * configuration is in use. For non legacy configured forms, use\n * `downloadSubmissionPdfs` instead.\n */\n downloadSubmissionPdfUrl?: string\n\n downloadSubmissionPdfs?: Array<{\n id: string\n configuration: SubmissionEventTypes.PDFConfiguration\n url: string\n }>\n /** The access token to download post-submission attachment urls and metadata. */\n attachmentsAccessToken?: string\n}\n\nexport type PendingFormSubmission = FormSubmission & {\n /** The date and time (in ISO format) the submission was attempted */\n pendingTimestamp: string\n /** `true` if the submission is currently being processed by the pending queue */\n isSubmitting?: boolean\n /** `true` if the submission is currently being edited */\n isEditing?: boolean\n /**\n * An error message that might be set while attempting to process the\n * submission in the pending queue\n */\n error?: string\n}\n"]}
@@ -17,7 +17,7 @@ import TextSymbol from '@arcgis/core/symbols/TextSymbol';
17
17
  import * as geometryEngine from '@arcgis/core/geometry/geometryEngine';
18
18
  import { Box, Divider, IconButton } from '@mui/material';
19
19
  import throttle from 'lodash.throttle';
20
- import { localisationService } from '@oneblink/apps';
20
+ import { localisationService } from '../apps';
21
21
  import { v4 as uuid } from 'uuid';
22
22
  import OnLoading from '../components/renderer/OnLoading';
23
23
  import MaterialIcon from './MaterialIcon';
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGISWebMap.js","sourceRoot":"","sources":["../../src/components/ArcGISWebMap.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAChD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,SAAS,MAAM,gCAAgC,CAAA;AACtD,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,cAAc,MAAM,qCAAqC,CAAA;AAChE,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,OAAO,MAAM,sBAAsB,CAAA;AAC1C,OAAO,KAAK,MAAM,4BAA4B,CAAA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,CAAC,oBAAoB,IAAI,aAAa,CAAC,OAAO,IAAI,CAClD,KAAC,kBAAkB,IACjB,OAAO,EACL,CAAA,MAAA,MAAA,OAAO,CAAC,mBAAmB,0CAAE,IAAI,CAC/B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,oBAAoB,CAC7C,0CAAE,uBAAuB,KAAI,EAAE,EAElC,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,EACjD,4BAA4B,EAAE,CAAC,GAAG,EAAE,EAAE;wBACpC,4BAA4B,CAAC,GAAG,CAAC,CAAA;oBACnC,CAAC,EACD,cAAc,EAAE,oBAAoB,EACpC,UAAU,EAAE,aAAa,CAAC,OAAO,GACjC,CACH,GACG,IACL,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { ArcGISTypes, FormTypes } from '@oneblink/types'\nimport MapView from '@arcgis/core/views/MapView'\nimport WebMap from '@arcgis/core/WebMap'\nimport Home from '@arcgis/core/widgets/Home'\nimport Search from '@arcgis/core/widgets/Search'\nimport Zoom from '@arcgis/core/widgets/Zoom'\nimport LayerList from '@arcgis/core/widgets/LayerList'\nimport Expand from '@arcgis/core/widgets/Expand'\nimport BaseMapGallery from '@arcgis/core/widgets/BasemapGallery'\nimport Sketch from '@arcgis/core/widgets/Sketch'\nimport GraphicsLayer from '@arcgis/core/layers/GraphicsLayer'\nimport Graphic from '@arcgis/core/Graphic'\nimport Popup from '@arcgis/core/widgets/Popup'\nimport {\n Point,\n Polygon,\n SpatialReference,\n Polyline,\n} from '@arcgis/core/geometry'\nimport TextSymbol from '@arcgis/core/symbols/TextSymbol'\nimport * as geometryEngine from '@arcgis/core/geometry/geometryEngine'\nimport { Box, Divider, IconButton } from '@mui/material'\nimport throttle from 'lodash.throttle'\nimport { localisationService } from '@oneblink/apps'\nimport { v4 as uuid } from 'uuid'\n\nimport OnLoading from '../components/renderer/OnLoading'\nimport MaterialIcon from './MaterialIcon'\n\nimport useIsPageVisible from '../hooks/useIsPageVisible'\nimport { ArcGISWebMapElementValue } from '@oneblink/types/typescript/arcgis'\nimport { FormElementValueChangeHandler } from '../types/form'\nimport '../styles/arcgis-external.css'\nimport Layer from '@arcgis/core/layers/Layer'\n\ntype Props = {\n element: FormTypes.ArcGISWebMapElement\n id: string\n value: ArcGISWebMapElementValue | undefined\n onChange: FormElementValueChangeHandler<ArcGISWebMapElementValue>\n automatedSnapshotFileName: string\n 'aria-describedby'?: string\n takeScreenShotRef: React.RefObject<\n | ((view?: ArcGISTypes.ArcGISWebMapElementValue['view']) => Promise<{\n dataUrl: string\n }>)\n | null\n >\n}\n\ntype SketchCreateTool = Parameters<Sketch['create']>[0]\n\nfunction DrawingOptionsList({\n options,\n sketchTool,\n onClose,\n sketchToolType,\n setSelectedGraphicAttributes,\n}: {\n options: { id: string; label: string; value: string; description?: string }[]\n onClose: () => void\n sketchTool: Sketch\n sketchToolType: SketchCreateTool\n setSelectedGraphicAttributes: (opt: {\n label: string\n value: string\n description?: string\n }) => void\n}) {\n return (\n <div className=\"esri-widget\">\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <b style={{ padding: '0.5rem' }}>Select an option</b>\n <IconButton\n onClick={(e) => {\n e.stopPropagation()\n onClose()\n }}\n size=\"small\"\n data-cypress=\"copy-to-clip-board-button\"\n >\n <MaterialIcon fontSize=\"small\">close</MaterialIcon>\n </IconButton>\n </Box>\n <Divider sx={{ backgroundColor: 'unset', margin: '0px 8px' }} />\n <Box sx={{ maxHeight: '200px', overflowY: 'auto' }}>\n {options?.map(({ id, value, label, description }) => (\n <div\n key={id}\n className=\"ob-list__item is-clickable\"\n style={{ alignItems: 'center' }}\n onClick={() => {\n onClose()\n sketchTool?.create(sketchToolType)\n setSelectedGraphicAttributes({ value, label, description })\n }}\n >\n {label}\n </div>\n ))}\n </Box>\n </div>\n )\n}\n\nfunction FormElementArcGISWebMap({\n element,\n id,\n value,\n onChange,\n takeScreenShotRef,\n automatedSnapshotFileName,\n ...props\n}: Props) {\n const ref = React.useRef<HTMLDivElement | null>(null)\n const layerPanelRef = React.useRef<Expand>(null)\n const mapGalleryPanelRef = React.useRef<Expand>(null)\n const sketchToolRef = React.useRef<Sketch>(null)\n const drawingLayerRef = React.useRef<GraphicsLayer>(null)\n const selectedGraphicForUpdate = React.useRef<string | undefined>(undefined)\n const mapViewRef = React.useRef<MapView>(null)\n const measurementLayerRef = React.useRef<GraphicsLayer>(null)\n const defaultLayersRef = React.useRef<Layer[]>(null)\n\n const [loadError, setLoadError] = React.useState<Error>()\n const [isLoading, setIsLoading] = React.useState<boolean>(false)\n const isPageVisible = useIsPageVisible()\n const [selectedGraphicAttributes, setSelectedGraphicAttributes] =\n React.useState<{\n value: string\n label: string\n description?: string\n }>()\n // only used when an allowed drawing tool also has a list of graphic attribute options to display to the user\n const [activeSketchToolMenu, setActiveSketchToolMenu] =\n React.useState<SketchCreateTool>()\n\n const updateDrawingInputSubmissionValue = React.useCallback(() => {\n const updatedGraphics = drawingLayerRef.current?.graphics\n .toArray()\n .map((graphic) => graphic.toJSON())\n\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n drawingLayer: updatedGraphics,\n userInput: updatedGraphics,\n // Remove automated snapshot images when drawing again\n snapshotImages: existingValue?.snapshotImages?.filter(\n (snapshotImage) =>\n snapshotImage.fileName !== automatedSnapshotFileName,\n ),\n }),\n })\n }, [automatedSnapshotFileName, element, onChange])\n\n const updateMapViewSubmissionValue = React.useCallback(() => {\n const zoom = mapViewRef.current?.zoom\n const latitude = mapViewRef.current?.center.latitude\n const longitude = mapViewRef.current?.center.longitude\n if (zoom && latitude && longitude) {\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n view: {\n zoom,\n latitude,\n longitude,\n },\n }),\n })\n }\n }, [element, onChange])\n\n const getGeometryPoints = (\n geom: __esri.Geometry,\n spatialRef: SpatialReference,\n ) => {\n if (geom.type === 'polygon') {\n const polygon = geom as Polygon\n return polygon.rings[0].map(\n (ring) =>\n new Point({\n x: ring[0],\n y: ring[1],\n spatialReference: spatialRef,\n }),\n )\n } else if (geom.type === 'polyline') {\n const polyline = geom as Polyline\n return polyline.paths[0].map(\n (path) =>\n new Point({\n x: path[0],\n y: path[1],\n spatialReference: spatialRef,\n }),\n )\n }\n }\n\n const addMeasurementLabels = React.useCallback(\n (graphics: __esri.Graphic[]) => {\n if (!element.measurementDimensionsEnabled) return\n const spatialRef = new SpatialReference({ wkid: 3857 })\n const measurementLayer = measurementLayerRef.current\n const mapView = mapViewRef.current\n if (!measurementLayer || !mapView) return\n measurementLayer.removeAll()\n\n for (const graphic of graphics) {\n const geom = graphic.geometry\n if (!geom || (geom.type !== 'polygon' && geom.type !== 'polyline'))\n continue\n\n const points = getGeometryPoints(geom, spatialRef)\n if (!points) continue\n\n const { distanceUnit, distanceUnitShortName } =\n localisationService.getDistanceUnits()\n if (distanceUnit !== 'meters' && distanceUnit !== 'feet') {\n console.warn(\n 'Unsupported distance unit provided in tenant configuration: ',\n distanceUnit,\n )\n return\n }\n const graphics: Graphic[] = []\n\n for (let i = 1; i < points.length; i++) {\n const x1 = points[i].x\n const x2 = points[i - 1].x\n const y1 = points[i].y\n const y2 = points[i - 1].y\n\n const midpoint = new Point({\n x: (x1 + x2) / 2,\n y: (y1 + y2) / 2,\n spatialReference: spatialRef,\n })\n\n // Angle of the measurement label - this will be rotated to be parallel with the polygon or polyline edge\n const dx = x2 - x1\n const dy = y2 - y1\n const radians = Math.atan2(dy, dx)\n let angle = radians * (-180 / Math.PI)\n if (angle > 90 || angle < -90) {\n angle += 180\n }\n\n // offset of the measurement label against the edge of the polygon/polyline it's measuring\n const pixelOffset = 10\n const normalAngle = radians + Math.PI / 2\n const offsetScreenX = pixelOffset * Math.cos(normalAngle)\n const offsetScreenY = pixelOffset * Math.sin(normalAngle)\n\n const screenPoint = mapView.toScreen(midpoint)\n screenPoint.x += offsetScreenX\n screenPoint.y -= offsetScreenY\n const offsetMapPoint = mapView.toMap(screenPoint)\n\n const polyline = new Polyline({\n paths: [\n [\n [points[i].longitude, points[i].latitude],\n [points[i - 1].longitude, points[i - 1].latitude],\n ],\n ],\n spatialReference: { wkid: 4326 },\n })\n const distance = geometryEngine.geodesicLength(polyline, distanceUnit)\n graphics.push(\n new Graphic({\n geometry: offsetMapPoint,\n symbol: new TextSymbol({\n text: distance.toFixed(0) + distanceUnitShortName,\n color: 'black',\n haloColor: 'white',\n haloSize: 1,\n angle,\n }),\n }),\n )\n }\n\n measurementLayer.addMany(graphics)\n mapViewRef.current?.map.reorder(\n measurementLayer,\n mapViewRef.current?.map.layers.length,\n )\n }\n },\n [element],\n )\n\n const clearMeasurementLabels = React.useCallback(() => {\n if (measurementLayerRef.current) {\n measurementLayerRef.current.removeAll()\n }\n }, [])\n\n React.useEffect(() => {\n if (element.readOnly) return\n // event listeners for drawing tool creates/updates/deletes\n // these need to be removed and recreated when the submission value changes\n // to ensure they always have access to the latest submission value\n const createListener = sketchToolRef.current?.on(\n 'create',\n throttle((sketchEvent: __esri.SketchCreateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels([sketchEvent.graphic])\n }\n if (sketchEvent.state === 'complete') {\n if (selectedGraphicAttributes) {\n sketchEvent.graphic.attributes = {\n name: selectedGraphicAttributes.value,\n label: selectedGraphicAttributes.label,\n description: selectedGraphicAttributes.description,\n }\n setSelectedGraphicAttributes(undefined)\n }\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'cancel') {\n setSelectedGraphicAttributes(undefined)\n clearMeasurementLabels()\n }\n }, 100),\n )\n\n const updateListener = sketchToolRef.current?.on(\n 'update',\n throttle((sketchEvent: __esri.SketchUpdateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels(sketchEvent.graphics)\n }\n if (sketchEvent.state === 'complete') {\n // only update the submission value if the graphic's geometry was actually changed\n if (\n JSON.stringify(sketchEvent.graphics[0].geometry.toJSON()) !==\n selectedGraphicForUpdate.current\n ) {\n updateDrawingInputSubmissionValue()\n }\n selectedGraphicForUpdate.current = undefined\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'start') {\n selectedGraphicForUpdate.current = JSON.stringify(\n sketchEvent.graphics[0].geometry.clone().toJSON(),\n )\n addMeasurementLabels(sketchEvent.graphics)\n }\n }, 100),\n )\n\n const deleteListener = sketchToolRef.current?.on('delete', () => {\n mapViewRef.current?.closePopup()\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n })\n\n const mapViewChangeListener = mapViewRef.current?.watch(\n 'stationary',\n () => {\n const mapView = mapViewRef.current\n if (mapView && mapView.stationary) {\n const hasViewChanged =\n mapView.zoom !== value?.view?.zoom ||\n mapView.center.longitude !== value?.view?.longitude ||\n mapView.center.latitude !== value?.view?.latitude\n if (hasViewChanged) {\n updateMapViewSubmissionValue()\n }\n }\n },\n )\n\n const sketchToolListener = sketchToolRef.current?.viewModel.watch(\n 'activeTool',\n () => {\n if (selectedGraphicAttributes) {\n return\n }\n const activeTool = sketchToolRef.current?.activeTool\n const hasGraphicAttributeOptions = !!element.allowedDrawingTools?.find(\n (tool) => tool.type === activeTool,\n )?.graphicAttributeOptions?.length\n\n if (activeTool) {\n if (\n hasGraphicAttributeOptions &&\n (activeTool === 'point' ||\n activeTool === 'polygon' ||\n activeTool === 'circle' ||\n activeTool === 'rectangle' ||\n activeTool === 'polyline')\n ) {\n // the sketch.create() fn only allows active tools of the above 5 types\n // hence we must check above to keep the types happy further down the line\n sketchToolRef.current?.cancel()\n setActiveSketchToolMenu(activeTool)\n } else {\n setActiveSketchToolMenu(undefined)\n }\n }\n },\n )\n\n mapViewRef.current?.on('click', (event) => {\n mapViewRef.current?.hitTest(event).then((response) => {\n // the \"hit test\" will typically yield the graphic we want to display the popup for,\n // and an ArcGIS built-in graphic which highlights the selected graphic.\n // By filtering for the graphic with the \"label\" attribute, we're able to reliably\n // get the graphic we want to display the popup for.\n const result = response.results\n .filter((r) => r.type === 'graphic')\n .find((r) => !!r.graphic.attributes?.label)\n\n if (result) {\n mapViewRef.current?.openPopup({\n title: result.graphic.attributes.label,\n content: result.graphic.attributes.description,\n })\n }\n })\n })\n\n return () => {\n createListener?.remove()\n updateListener?.remove()\n deleteListener?.remove()\n mapViewChangeListener?.remove()\n sketchToolListener?.remove()\n }\n }, [\n isLoading,\n value,\n updateDrawingInputSubmissionValue,\n updateMapViewSubmissionValue,\n element,\n selectedGraphicAttributes,\n addMeasurementLabels,\n clearMeasurementLabels,\n ])\n\n const stringifedLayersRef = React.useRef<string>('')\n\n const onSubmissionValueChange = React.useCallback(() => {\n const view = mapViewRef.current\n const map = mapViewRef.current?.map\n if (!view || !map) return\n\n // if the layers have changed or if the map has no layers, remove all layers and repaint\n const currentStringifedLayers = JSON.stringify(value?.layers)\n if (\n stringifedLayersRef.current !== currentStringifedLayers ||\n !map.layers.length\n ) {\n stringifedLayersRef.current = currentStringifedLayers\n // remove all layers and repaint\n map.layers.removeAll()\n if (defaultLayersRef.current) {\n // redraw default layers first\n defaultLayersRef.current.forEach((layer) => {\n map.add(layer)\n })\n }\n\n if (value?.layers) {\n for (const layer of value.layers) {\n const newLayer = new GraphicsLayer({\n title: layer.title as string,\n id: layer.id,\n })\n newLayer.addMany(layer.graphics.map((g) => Graphic.fromJSON(g)))\n newLayer.visible =\n typeof layer.visible === 'boolean' ? layer.visible : true\n map.layers.add(newLayer)\n }\n }\n }\n\n // add the web map's drawing and measurement layers back\n const drawingLayer = drawingLayerRef.current\n if (value?.drawingLayer && drawingLayer) {\n drawingLayer.removeAll()\n drawingLayer.addMany(value.drawingLayer.map((g) => Graphic.fromJSON(g)))\n map.layers.add(drawingLayer)\n map.layers.reorder(drawingLayer, map.layers.length - 1)\n }\n if (measurementLayerRef.current) {\n map.layers.add(measurementLayerRef.current)\n map.layers.reorder(measurementLayerRef.current, map.layers.length - 1)\n }\n if (value?.view) {\n view.zoom = value.view.zoom\n view.center = new Point({\n latitude: value.view.latitude,\n longitude: value.view.longitude,\n })\n }\n }, [value])\n\n React.useEffect(() => {\n if (!isLoading && mapViewRef.current) {\n onSubmissionValueChange()\n }\n // only run the above when the submission value changes or the map finishes loading\n }, [onSubmissionValueChange, isLoading])\n\n const drawingOptionsContainerId = `OneBlinkDrawingOptionsSelector-${element.id}`\n\n React.useEffect(() => {\n const loadMap = async () => {\n try {\n const map = new WebMap({\n portalItem: {\n id: element.webMapId,\n },\n basemap: element.basemapId || 'streets',\n })\n await map.load()\n\n const view = new MapView({\n map,\n container: ref.current || undefined,\n popup: new Popup({\n dockEnabled: true,\n dockOptions: {\n buttonEnabled: false,\n breakpoint: false,\n position: 'bottom-left',\n },\n }),\n })\n\n // remove default widgets\n const components = view.ui.getComponents()\n for (const component of components) {\n view.ui.remove(component)\n }\n\n if (element.addressSearchWidgetEnabled) {\n view.ui.add(\n new Search({\n view,\n }),\n 'top-left',\n )\n }\n\n if (element.homeWidgetEnabled) {\n view.ui.add(\n new Home({\n view,\n }),\n 'top-left',\n )\n }\n\n view.ui.add(\n new Zoom({\n view,\n }),\n 'bottom-right',\n )\n\n const layerList = new LayerList({\n view,\n })\n\n layerPanelRef.current = new Expand({\n expandIcon: 'layers',\n view,\n content: layerList,\n expanded: element.showLayerPanel,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(layerPanelRef.current, 'top-right')\n\n const baseMapGallery = new BaseMapGallery({ view })\n\n mapGalleryPanelRef.current = new Expand({\n expandIcon: 'basemap',\n view,\n content: baseMapGallery,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(mapGalleryPanelRef.current, 'top-left')\n\n let drawingLayerId: string | undefined\n let measurementLayerId: string | undefined\n if (!element.readOnly && element.allowedDrawingTools?.length) {\n drawingLayerId = uuid()\n const drawingLayer = new GraphicsLayer({\n id: drawingLayerId,\n title: 'Drawing',\n })\n drawingLayerRef.current = drawingLayer\n map.layers.add(drawingLayer)\n\n // Add measurement layer above drawing layer\n if (element.measurementDimensionsEnabled) {\n measurementLayerId = uuid()\n const measurementLayer = new GraphicsLayer({\n id: measurementLayerId,\n title: 'Measurements',\n listMode: 'hide',\n })\n measurementLayerRef.current = measurementLayer\n map.layers.add(measurementLayer)\n }\n\n const sketch = new Sketch({\n view,\n layer: drawingLayer,\n creationMode: 'single',\n layout: 'vertical',\n availableCreateTools: [\n 'point',\n 'polyline',\n 'polygon',\n 'rectangle',\n 'circle',\n ].filter((createTool) =>\n element.allowedDrawingTools?.find(\n (tool) => tool.type === createTool,\n ),\n ),\n // hiding the below by default\n visibleElements: {\n duplicateButton: false,\n settingsMenu: false,\n undoRedoMenu: false,\n selectionTools: {\n 'lasso-selection': false,\n 'rectangle-selection': false,\n },\n },\n })\n sketchToolRef.current = sketch\n view.ui.add(sketch, 'bottom-right')\n view.ui.add(drawingOptionsContainerId, 'bottom-right')\n }\n\n // once the view has loaded\n view.when(() => {\n mapViewRef.current = view\n\n // when updating the map on submission value change,\n // we completely wipe all layers and redraw from scratch.\n // The below caters for web maps that load in with pre-existing layers,\n // which is usually the case when a web map id is provided.\n // We will store these pre-existing layers and ensure they're passed\n // to any redraw logic. We take layers from map.layers (as opposed to map.allLayers)\n // as this omits system generated layers like the basemap, which aren't removed when\n // we redraw regardless.\n defaultLayersRef.current = map.layers\n .toArray()\n .filter(\n (l) => l.id !== measurementLayerId && l.id !== drawingLayerId,\n )\n\n takeScreenShotRef.current = async (\n viewToScreenShot?: ArcGISTypes.ArcGISWebMapElementValue['view'],\n ) => {\n if (viewToScreenShot) {\n await view.goTo(\n {\n center: [\n viewToScreenShot.longitude,\n viewToScreenShot.latitude,\n ],\n zoom: viewToScreenShot.zoom,\n },\n {\n animate: true,\n },\n )\n console.log('waiting for view to render visible')\n await new Promise((resolve) => {\n if (!view.updating) {\n resolve(undefined)\n } else {\n const handle = view.watch('updating', (updating) => {\n if (!updating) {\n handle.remove()\n resolve(undefined)\n }\n })\n }\n })\n }\n const screenshot = await view.takeScreenshot()\n return {\n dataUrl: screenshot.dataUrl,\n }\n }\n setIsLoading(false)\n })\n } catch (e) {\n console.warn('Error while trying to load arcgis web map ', e)\n setLoadError(e as Error)\n setIsLoading(false)\n }\n }\n\n if (!mapViewRef.current && !isLoading) {\n setIsLoading(true)\n loadMap()\n }\n }, [drawingOptionsContainerId, element, isLoading, takeScreenShotRef, value])\n\n React.useEffect(() => {\n if (!isLoading) {\n if (isPageVisible) {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = true\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = true\n }\n } else {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = false\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = false\n }\n }\n }\n }, [isPageVisible, isLoading])\n\n if (loadError) {\n return (\n <figure className=\"ob-figure\">\n <div className=\"figure-content has-text-centered\">\n <MaterialIcon className=\"icon-large has-margin-bottom-6 has-text-warning\">\n error\n </MaterialIcon>\n <h4 className=\"title is-4\">We were unable to display your web map</h4>\n <p>{loadError.message}</p>\n </div>\n </figure>\n )\n }\n\n return (\n <>\n {isLoading && (\n <div className=\"figure-content-absolute-center\">\n <OnLoading small />\n </div>\n )}\n <div\n className=\"arcgis-web-map\"\n ref={ref}\n id={id}\n aria-describedby={props['aria-describedby']}\n />\n <div id={drawingOptionsContainerId}>\n {!!activeSketchToolMenu && sketchToolRef.current && (\n <DrawingOptionsList\n options={\n element.allowedDrawingTools?.find(\n (tool) => tool.type === activeSketchToolMenu,\n )?.graphicAttributeOptions || []\n }\n onClose={() => setActiveSketchToolMenu(undefined)}\n setSelectedGraphicAttributes={(opt) => {\n setSelectedGraphicAttributes(opt)\n }}\n sketchToolType={activeSketchToolMenu}\n sketchTool={sketchToolRef.current}\n />\n )}\n </div>\n </>\n )\n}\n\nexport default React.memo(FormElementArcGISWebMap)\n"]}
1
+ {"version":3,"file":"ArcGISWebMap.js","sourceRoot":"","s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,CAAA;IAE9B,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,iBAAQ,SAAS,EAAC,WAAW,YAC3B,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,SAAS,EAAC,iDAAiD,sBAE1D,EACf,aAAI,SAAS,EAAC,YAAY,uDAA4C,EACtE,sBAAI,SAAS,CAAC,OAAO,GAAK,IACtB,GACC,CACV,CAAA;IACH,CAAC;IAED,OAAO,CACL,8BACG,SAAS,IAAI,CACZ,cAAK,SAAS,EAAC,gCAAgC,YAC7C,KAAC,SAAS,IAAC,KAAK,SAAG,GACf,CACP,EACD,cACE,SAAS,EAAC,gBAAgB,EAC1B,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,sBACY,KAAK,CAAC,kBAAkB,CAAC,GAC3C,EACF,cAAK,EAAE,EAAE,yBAAyB,YAC/B,CAAC,CAAC,oBAAoB,IAAI,aAAa,CAAC,OAAO,IAAI,CAClD,KAAC,kBAAkB,IACjB,OAAO,EACL,CAAA,MAAA,MAAA,OAAO,CAAC,mBAAmB,0CAAE,IAAI,CAC/B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,oBAAoB,CAC7C,0CAAE,uBAAuB,KAAI,EAAE,EAElC,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,EACjD,4BAA4B,EAAE,CAAC,GAAG,EAAE,EAAE;wBACpC,4BAA4B,CAAC,GAAG,CAAC,CAAA;oBACnC,CAAC,EACD,cAAc,EAAE,oBAAoB,EACpC,UAAU,EAAE,aAAa,CAAC,OAAO,GACjC,CACH,GACG,IACL,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { ArcGISTypes, FormTypes } from '@oneblink/types'\nimport MapView from '@arcgis/core/views/MapView'\nimport WebMap from '@arcgis/core/WebMap'\nimport Home from '@arcgis/core/widgets/Home'\nimport Search from '@arcgis/core/widgets/Search'\nimport Zoom from '@arcgis/core/widgets/Zoom'\nimport LayerList from '@arcgis/core/widgets/LayerList'\nimport Expand from '@arcgis/core/widgets/Expand'\nimport BaseMapGallery from '@arcgis/core/widgets/BasemapGallery'\nimport Sketch from '@arcgis/core/widgets/Sketch'\nimport GraphicsLayer from '@arcgis/core/layers/GraphicsLayer'\nimport Graphic from '@arcgis/core/Graphic'\nimport Popup from '@arcgis/core/widgets/Popup'\nimport {\n Point,\n Polygon,\n SpatialReference,\n Polyline,\n} from '@arcgis/core/geometry'\nimport TextSymbol from '@arcgis/core/symbols/TextSymbol'\nimport * as geometryEngine from '@arcgis/core/geometry/geometryEngine'\nimport { Box, Divider, IconButton } from '@mui/material'\nimport throttle from 'lodash.throttle'\nimport { localisationService } from '../apps'\nimport { v4 as uuid } from 'uuid'\n\nimport OnLoading from '../components/renderer/OnLoading'\nimport MaterialIcon from './MaterialIcon'\n\nimport useIsPageVisible from '../hooks/useIsPageVisible'\nimport { ArcGISWebMapElementValue } from '@oneblink/types/typescript/arcgis'\nimport { FormElementValueChangeHandler } from '../types/form'\nimport '../styles/arcgis-external.css'\nimport Layer from '@arcgis/core/layers/Layer'\n\ntype Props = {\n element: FormTypes.ArcGISWebMapElement\n id: string\n value: ArcGISWebMapElementValue | undefined\n onChange: FormElementValueChangeHandler<ArcGISWebMapElementValue>\n automatedSnapshotFileName: string\n 'aria-describedby'?: string\n takeScreenShotRef: React.RefObject<\n | ((view?: ArcGISTypes.ArcGISWebMapElementValue['view']) => Promise<{\n dataUrl: string\n }>)\n | null\n >\n}\n\ntype SketchCreateTool = Parameters<Sketch['create']>[0]\n\nfunction DrawingOptionsList({\n options,\n sketchTool,\n onClose,\n sketchToolType,\n setSelectedGraphicAttributes,\n}: {\n options: { id: string; label: string; value: string; description?: string }[]\n onClose: () => void\n sketchTool: Sketch\n sketchToolType: SketchCreateTool\n setSelectedGraphicAttributes: (opt: {\n label: string\n value: string\n description?: string\n }) => void\n}) {\n return (\n <div className=\"esri-widget\">\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <b style={{ padding: '0.5rem' }}>Select an option</b>\n <IconButton\n onClick={(e) => {\n e.stopPropagation()\n onClose()\n }}\n size=\"small\"\n data-cypress=\"copy-to-clip-board-button\"\n >\n <MaterialIcon fontSize=\"small\">close</MaterialIcon>\n </IconButton>\n </Box>\n <Divider sx={{ backgroundColor: 'unset', margin: '0px 8px' }} />\n <Box sx={{ maxHeight: '200px', overflowY: 'auto' }}>\n {options?.map(({ id, value, label, description }) => (\n <div\n key={id}\n className=\"ob-list__item is-clickable\"\n style={{ alignItems: 'center' }}\n onClick={() => {\n onClose()\n sketchTool?.create(sketchToolType)\n setSelectedGraphicAttributes({ value, label, description })\n }}\n >\n {label}\n </div>\n ))}\n </Box>\n </div>\n )\n}\n\nfunction FormElementArcGISWebMap({\n element,\n id,\n value,\n onChange,\n takeScreenShotRef,\n automatedSnapshotFileName,\n ...props\n}: Props) {\n const ref = React.useRef<HTMLDivElement | null>(null)\n const layerPanelRef = React.useRef<Expand>(null)\n const mapGalleryPanelRef = React.useRef<Expand>(null)\n const sketchToolRef = React.useRef<Sketch>(null)\n const drawingLayerRef = React.useRef<GraphicsLayer>(null)\n const selectedGraphicForUpdate = React.useRef<string | undefined>(undefined)\n const mapViewRef = React.useRef<MapView>(null)\n const measurementLayerRef = React.useRef<GraphicsLayer>(null)\n const defaultLayersRef = React.useRef<Layer[]>(null)\n\n const [loadError, setLoadError] = React.useState<Error>()\n const [isLoading, setIsLoading] = React.useState<boolean>(false)\n const isPageVisible = useIsPageVisible()\n const [selectedGraphicAttributes, setSelectedGraphicAttributes] =\n React.useState<{\n value: string\n label: string\n description?: string\n }>()\n // only used when an allowed drawing tool also has a list of graphic attribute options to display to the user\n const [activeSketchToolMenu, setActiveSketchToolMenu] =\n React.useState<SketchCreateTool>()\n\n const updateDrawingInputSubmissionValue = React.useCallback(() => {\n const updatedGraphics = drawingLayerRef.current?.graphics\n .toArray()\n .map((graphic) => graphic.toJSON())\n\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n drawingLayer: updatedGraphics,\n userInput: updatedGraphics,\n // Remove automated snapshot images when drawing again\n snapshotImages: existingValue?.snapshotImages?.filter(\n (snapshotImage) =>\n snapshotImage.fileName !== automatedSnapshotFileName,\n ),\n }),\n })\n }, [automatedSnapshotFileName, element, onChange])\n\n const updateMapViewSubmissionValue = React.useCallback(() => {\n const zoom = mapViewRef.current?.zoom\n const latitude = mapViewRef.current?.center.latitude\n const longitude = mapViewRef.current?.center.longitude\n if (zoom && latitude && longitude) {\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n view: {\n zoom,\n latitude,\n longitude,\n },\n }),\n })\n }\n }, [element, onChange])\n\n const getGeometryPoints = (\n geom: __esri.Geometry,\n spatialRef: SpatialReference,\n ) => {\n if (geom.type === 'polygon') {\n const polygon = geom as Polygon\n return polygon.rings[0].map(\n (ring) =>\n new Point({\n x: ring[0],\n y: ring[1],\n spatialReference: spatialRef,\n }),\n )\n } else if (geom.type === 'polyline') {\n const polyline = geom as Polyline\n return polyline.paths[0].map(\n (path) =>\n new Point({\n x: path[0],\n y: path[1],\n spatialReference: spatialRef,\n }),\n )\n }\n }\n\n const addMeasurementLabels = React.useCallback(\n (graphics: __esri.Graphic[]) => {\n if (!element.measurementDimensionsEnabled) return\n const spatialRef = new SpatialReference({ wkid: 3857 })\n const measurementLayer = measurementLayerRef.current\n const mapView = mapViewRef.current\n if (!measurementLayer || !mapView) return\n measurementLayer.removeAll()\n\n for (const graphic of graphics) {\n const geom = graphic.geometry\n if (!geom || (geom.type !== 'polygon' && geom.type !== 'polyline'))\n continue\n\n const points = getGeometryPoints(geom, spatialRef)\n if (!points) continue\n\n const { distanceUnit, distanceUnitShortName } =\n localisationService.getDistanceUnits()\n if (distanceUnit !== 'meters' && distanceUnit !== 'feet') {\n console.warn(\n 'Unsupported distance unit provided in tenant configuration: ',\n distanceUnit,\n )\n return\n }\n const graphics: Graphic[] = []\n\n for (let i = 1; i < points.length; i++) {\n const x1 = points[i].x\n const x2 = points[i - 1].x\n const y1 = points[i].y\n const y2 = points[i - 1].y\n\n const midpoint = new Point({\n x: (x1 + x2) / 2,\n y: (y1 + y2) / 2,\n spatialReference: spatialRef,\n })\n\n // Angle of the measurement label - this will be rotated to be parallel with the polygon or polyline edge\n const dx = x2 - x1\n const dy = y2 - y1\n const radians = Math.atan2(dy, dx)\n let angle = radians * (-180 / Math.PI)\n if (angle > 90 || angle < -90) {\n angle += 180\n }\n\n // offset of the measurement label against the edge of the polygon/polyline it's measuring\n const pixelOffset = 10\n const normalAngle = radians + Math.PI / 2\n const offsetScreenX = pixelOffset * Math.cos(normalAngle)\n const offsetScreenY = pixelOffset * Math.sin(normalAngle)\n\n const screenPoint = mapView.toScreen(midpoint)\n screenPoint.x += offsetScreenX\n screenPoint.y -= offsetScreenY\n const offsetMapPoint = mapView.toMap(screenPoint)\n\n const polyline = new Polyline({\n paths: [\n [\n [points[i].longitude, points[i].latitude],\n [points[i - 1].longitude, points[i - 1].latitude],\n ],\n ],\n spatialReference: { wkid: 4326 },\n })\n const distance = geometryEngine.geodesicLength(polyline, distanceUnit)\n graphics.push(\n new Graphic({\n geometry: offsetMapPoint,\n symbol: new TextSymbol({\n text: distance.toFixed(0) + distanceUnitShortName,\n color: 'black',\n haloColor: 'white',\n haloSize: 1,\n angle,\n }),\n }),\n )\n }\n\n measurementLayer.addMany(graphics)\n mapViewRef.current?.map.reorder(\n measurementLayer,\n mapViewRef.current?.map.layers.length,\n )\n }\n },\n [element],\n )\n\n const clearMeasurementLabels = React.useCallback(() => {\n if (measurementLayerRef.current) {\n measurementLayerRef.current.removeAll()\n }\n }, [])\n\n React.useEffect(() => {\n if (element.readOnly) return\n // event listeners for drawing tool creates/updates/deletes\n // these need to be removed and recreated when the submission value changes\n // to ensure they always have access to the latest submission value\n const createListener = sketchToolRef.current?.on(\n 'create',\n throttle((sketchEvent: __esri.SketchCreateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels([sketchEvent.graphic])\n }\n if (sketchEvent.state === 'complete') {\n if (selectedGraphicAttributes) {\n sketchEvent.graphic.attributes = {\n name: selectedGraphicAttributes.value,\n label: selectedGraphicAttributes.label,\n description: selectedGraphicAttributes.description,\n }\n setSelectedGraphicAttributes(undefined)\n }\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'cancel') {\n setSelectedGraphicAttributes(undefined)\n clearMeasurementLabels()\n }\n }, 100),\n )\n\n const updateListener = sketchToolRef.current?.on(\n 'update',\n throttle((sketchEvent: __esri.SketchUpdateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels(sketchEvent.graphics)\n }\n if (sketchEvent.state === 'complete') {\n // only update the submission value if the graphic's geometry was actually changed\n if (\n JSON.stringify(sketchEvent.graphics[0].geometry.toJSON()) !==\n selectedGraphicForUpdate.current\n ) {\n updateDrawingInputSubmissionValue()\n }\n selectedGraphicForUpdate.current = undefined\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'start') {\n selectedGraphicForUpdate.current = JSON.stringify(\n sketchEvent.graphics[0].geometry.clone().toJSON(),\n )\n addMeasurementLabels(sketchEvent.graphics)\n }\n }, 100),\n )\n\n const deleteListener = sketchToolRef.current?.on('delete', () => {\n mapViewRef.current?.closePopup()\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n })\n\n const mapViewChangeListener = mapViewRef.current?.watch(\n 'stationary',\n () => {\n const mapView = mapViewRef.current\n if (mapView && mapView.stationary) {\n const hasViewChanged =\n mapView.zoom !== value?.view?.zoom ||\n mapView.center.longitude !== value?.view?.longitude ||\n mapView.center.latitude !== value?.view?.latitude\n if (hasViewChanged) {\n updateMapViewSubmissionValue()\n }\n }\n },\n )\n\n const sketchToolListener = sketchToolRef.current?.viewModel.watch(\n 'activeTool',\n () => {\n if (selectedGraphicAttributes) {\n return\n }\n const activeTool = sketchToolRef.current?.activeTool\n const hasGraphicAttributeOptions = !!element.allowedDrawingTools?.find(\n (tool) => tool.type === activeTool,\n )?.graphicAttributeOptions?.length\n\n if (activeTool) {\n if (\n hasGraphicAttributeOptions &&\n (activeTool === 'point' ||\n activeTool === 'polygon' ||\n activeTool === 'circle' ||\n activeTool === 'rectangle' ||\n activeTool === 'polyline')\n ) {\n // the sketch.create() fn only allows active tools of the above 5 types\n // hence we must check above to keep the types happy further down the line\n sketchToolRef.current?.cancel()\n setActiveSketchToolMenu(activeTool)\n } else {\n setActiveSketchToolMenu(undefined)\n }\n }\n },\n )\n\n mapViewRef.current?.on('click', (event) => {\n mapViewRef.current?.hitTest(event).then((response) => {\n // the \"hit test\" will typically yield the graphic we want to display the popup for,\n // and an ArcGIS built-in graphic which highlights the selected graphic.\n // By filtering for the graphic with the \"label\" attribute, we're able to reliably\n // get the graphic we want to display the popup for.\n const result = response.results\n .filter((r) => r.type === 'graphic')\n .find((r) => !!r.graphic.attributes?.label)\n\n if (result) {\n mapViewRef.current?.openPopup({\n title: result.graphic.attributes.label,\n content: result.graphic.attributes.description,\n })\n }\n })\n })\n\n return () => {\n createListener?.remove()\n updateListener?.remove()\n deleteListener?.remove()\n mapViewChangeListener?.remove()\n sketchToolListener?.remove()\n }\n }, [\n isLoading,\n value,\n updateDrawingInputSubmissionValue,\n updateMapViewSubmissionValue,\n element,\n selectedGraphicAttributes,\n addMeasurementLabels,\n clearMeasurementLabels,\n ])\n\n const stringifedLayersRef = React.useRef<string>('')\n\n const onSubmissionValueChange = React.useCallback(() => {\n const view = mapViewRef.current\n const map = mapViewRef.current?.map\n if (!view || !map) return\n\n // if the layers have changed or if the map has no layers, remove all layers and repaint\n const currentStringifedLayers = JSON.stringify(value?.layers)\n if (\n stringifedLayersRef.current !== currentStringifedLayers ||\n !map.layers.length\n ) {\n stringifedLayersRef.current = currentStringifedLayers\n // remove all layers and repaint\n map.layers.removeAll()\n if (defaultLayersRef.current) {\n // redraw default layers first\n defaultLayersRef.current.forEach((layer) => {\n map.add(layer)\n })\n }\n\n if (value?.layers) {\n for (const layer of value.layers) {\n const newLayer = new GraphicsLayer({\n title: layer.title as string,\n id: layer.id,\n })\n newLayer.addMany(layer.graphics.map((g) => Graphic.fromJSON(g)))\n newLayer.visible =\n typeof layer.visible === 'boolean' ? layer.visible : true\n map.layers.add(newLayer)\n }\n }\n }\n\n // add the web map's drawing and measurement layers back\n const drawingLayer = drawingLayerRef.current\n if (value?.drawingLayer && drawingLayer) {\n drawingLayer.removeAll()\n drawingLayer.addMany(value.drawingLayer.map((g) => Graphic.fromJSON(g)))\n map.layers.add(drawingLayer)\n map.layers.reorder(drawingLayer, map.layers.length - 1)\n }\n if (measurementLayerRef.current) {\n map.layers.add(measurementLayerRef.current)\n map.layers.reorder(measurementLayerRef.current, map.layers.length - 1)\n }\n if (value?.view) {\n view.zoom = value.view.zoom\n view.center = new Point({\n latitude: value.view.latitude,\n longitude: value.view.longitude,\n })\n }\n }, [value])\n\n React.useEffect(() => {\n if (!isLoading && mapViewRef.current) {\n onSubmissionValueChange()\n }\n // only run the above when the submission value changes or the map finishes loading\n }, [onSubmissionValueChange, isLoading])\n\n const drawingOptionsContainerId = `OneBlinkDrawingOptionsSelector-${element.id}`\n\n React.useEffect(() => {\n const loadMap = async () => {\n try {\n const map = new WebMap({\n portalItem: {\n id: element.webMapId,\n },\n basemap: element.basemapId || 'streets',\n })\n await map.load()\n\n const view = new MapView({\n map,\n container: ref.current || undefined,\n popup: new Popup({\n dockEnabled: true,\n dockOptions: {\n buttonEnabled: false,\n breakpoint: false,\n position: 'bottom-left',\n },\n }),\n })\n\n // remove default widgets\n const components = view.ui.getComponents()\n for (const component of components) {\n view.ui.remove(component)\n }\n\n if (element.addressSearchWidgetEnabled) {\n view.ui.add(\n new Search({\n view,\n }),\n 'top-left',\n )\n }\n\n if (element.homeWidgetEnabled) {\n view.ui.add(\n new Home({\n view,\n }),\n 'top-left',\n )\n }\n\n view.ui.add(\n new Zoom({\n view,\n }),\n 'bottom-right',\n )\n\n const layerList = new LayerList({\n view,\n })\n\n layerPanelRef.current = new Expand({\n expandIcon: 'layers',\n view,\n content: layerList,\n expanded: element.showLayerPanel,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(layerPanelRef.current, 'top-right')\n\n const baseMapGallery = new BaseMapGallery({ view })\n\n mapGalleryPanelRef.current = new Expand({\n expandIcon: 'basemap',\n view,\n content: baseMapGallery,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(mapGalleryPanelRef.current, 'top-left')\n\n let drawingLayerId: string | undefined\n let measurementLayerId: string | undefined\n if (!element.readOnly && element.allowedDrawingTools?.length) {\n drawingLayerId = uuid()\n const drawingLayer = new GraphicsLayer({\n id: drawingLayerId,\n title: 'Drawing',\n })\n drawingLayerRef.current = drawingLayer\n map.layers.add(drawingLayer)\n\n // Add measurement layer above drawing layer\n if (element.measurementDimensionsEnabled) {\n measurementLayerId = uuid()\n const measurementLayer = new GraphicsLayer({\n id: measurementLayerId,\n title: 'Measurements',\n listMode: 'hide',\n })\n measurementLayerRef.current = measurementLayer\n map.layers.add(measurementLayer)\n }\n\n const sketch = new Sketch({\n view,\n layer: drawingLayer,\n creationMode: 'single',\n layout: 'vertical',\n availableCreateTools: [\n 'point',\n 'polyline',\n 'polygon',\n 'rectangle',\n 'circle',\n ].filter((createTool) =>\n element.allowedDrawingTools?.find(\n (tool) => tool.type === createTool,\n ),\n ),\n // hiding the below by default\n visibleElements: {\n duplicateButton: false,\n settingsMenu: false,\n undoRedoMenu: false,\n selectionTools: {\n 'lasso-selection': false,\n 'rectangle-selection': false,\n },\n },\n })\n sketchToolRef.current = sketch\n view.ui.add(sketch, 'bottom-right')\n view.ui.add(drawingOptionsContainerId, 'bottom-right')\n }\n\n // once the view has loaded\n view.when(() => {\n mapViewRef.current = view\n\n // when updating the map on submission value change,\n // we completely wipe all layers and redraw from scratch.\n // The below caters for web maps that load in with pre-existing layers,\n // which is usually the case when a web map id is provided.\n // We will store these pre-existing layers and ensure they're passed\n // to any redraw logic. We take layers from map.layers (as opposed to map.allLayers)\n // as this omits system generated layers like the basemap, which aren't removed when\n // we redraw regardless.\n defaultLayersRef.current = map.layers\n .toArray()\n .filter(\n (l) => l.id !== measurementLayerId && l.id !== drawingLayerId,\n )\n\n takeScreenShotRef.current = async (\n viewToScreenShot?: ArcGISTypes.ArcGISWebMapElementValue['view'],\n ) => {\n if (viewToScreenShot) {\n await view.goTo(\n {\n center: [\n viewToScreenShot.longitude,\n viewToScreenShot.latitude,\n ],\n zoom: viewToScreenShot.zoom,\n },\n {\n animate: true,\n },\n )\n console.log('waiting for view to render visible')\n await new Promise((resolve) => {\n if (!view.updating) {\n resolve(undefined)\n } else {\n const handle = view.watch('updating', (updating) => {\n if (!updating) {\n handle.remove()\n resolve(undefined)\n }\n })\n }\n })\n }\n const screenshot = await view.takeScreenshot()\n return {\n dataUrl: screenshot.dataUrl,\n }\n }\n setIsLoading(false)\n })\n } catch (e) {\n console.warn('Error while trying to load arcgis web map ', e)\n setLoadError(e as Error)\n setIsLoading(false)\n }\n }\n\n if (!mapViewRef.current && !isLoading) {\n setIsLoading(true)\n loadMap()\n }\n }, [drawingOptionsContainerId, element, isLoading, takeScreenShotRef, value])\n\n React.useEffect(() => {\n if (!isLoading) {\n if (isPageVisible) {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = true\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = true\n }\n } else {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = false\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = false\n }\n }\n }\n }, [isPageVisible, isLoading])\n\n if (loadError) {\n return (\n <figure className=\"ob-figure\">\n <div className=\"figure-content has-text-centered\">\n <MaterialIcon className=\"icon-large has-margin-bottom-6 has-text-warning\">\n error\n </MaterialIcon>\n <h4 className=\"title is-4\">We were unable to display your web map</h4>\n <p>{loadError.message}</p>\n </div>\n </figure>\n )\n }\n\n return (\n <>\n {isLoading && (\n <div className=\"figure-content-absolute-center\">\n <OnLoading small />\n </div>\n )}\n <div\n className=\"arcgis-web-map\"\n ref={ref}\n id={id}\n aria-describedby={props['aria-describedby']}\n />\n <div id={drawingOptionsContainerId}>\n {!!activeSketchToolMenu && sketchToolRef.current && (\n <DrawingOptionsList\n options={\n element.allowedDrawingTools?.find(\n (tool) => tool.type === activeSketchToolMenu,\n )?.graphicAttributeOptions || []\n }\n onClose={() => setActiveSketchToolMenu(undefined)}\n setSelectedGraphicAttributes={(opt) => {\n setSelectedGraphicAttributes(opt)\n }}\n sketchToolType={activeSketchToolMenu}\n sketchTool={sketchToolRef.current}\n />\n )}\n </div>\n </>\n )\n}\n\nexport default React.memo(FormElementArcGISWebMap)\n"]}
@@ -1,3 +1,3 @@
1
- export declare const CustomAccordion: import("@emotion/styled").StyledComponent<any, {}, {}>;
2
- export declare const CustomAccordionSummary: import("@emotion/styled").StyledComponent<any, {}, {}>;
3
- export declare const CustomAccordionDetails: import("@emotion/styled").StyledComponent<any, {}, {}>;
1
+ export declare const CustomAccordion: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionOwnProps & import("@mui/material").AccordionSlotsAndSlotProps & Omit<import("@mui/material").PaperOwnProps, "classes" | "onChange"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "children" | "style" | "classes" | "slots" | "slotProps" | "sx" | "onChange" | "TransitionComponent" | "TransitionProps" | "disabled" | "variant" | "disableGutters" | "elevation" | "square" | "defaultExpanded" | "expanded"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
2
+ export declare const CustomAccordionSummary: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionSummaryOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "children" | "style" | "classes" | "slots" | "slotProps" | "sx" | "tabIndex" | "action" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
3
+ export declare const CustomAccordionDetails: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionDetailsProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -6,5 +6,8 @@ type ListItemsProps = {
6
6
  };
7
7
  export declare const OrderedList: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & ListItemsProps, React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, {}>;
8
8
  export declare const UnorderedList: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & ListItemsProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
9
- export declare const ListItem: import("@emotion/styled").StyledComponent<any, {}, {}>;
9
+ type ListProps = {
10
+ spaced?: boolean;
11
+ };
12
+ export declare const ListItem: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "className" | "children" | "style" | "classes" | "sx" | "p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "gutterBottom" | "align" | "noWrap" | "paragraph" | "variantMapping">, "ref"> & import("@mui/system").MUIStyledCommonProps<Theme> & ListProps, {}, {}>;
10
13
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { NylasScheduling } from '@nylas/react';
4
- import { schedulingService } from '@oneblink/apps';
4
+ import { schedulingService } from '../../apps';
5
5
  import ErrorMessage from '../messages/ErrorMessage';
6
6
  import CalendarBookingsContainer from './CalendarBookingsContainer';
7
7
  import useCalendarBookings from './CalendarBookingsProvider';
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarBookingsCancelForm.js","sourceRoot":"","sources":["../../../src/components/calendar-bookings/CalendarBookingsCancelForm.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,YAAY,MAAM,0BAA0B,CAAA;AACnD,OAAO,yBAAyB,MAAM,6BAA6B,CAAA;AACnE,OAAO,mBAAmB,MAAM,4BAA4B,CAAA;AAE5D,SAAS,eAAe,CAAC,EACvB,SAAS,EACT,UAAU,GAKX;IACC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAE9D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,CACL,KAAC,YAAY,IAAC,KAAK,EAAC,uBAAuB,EAAC,SAAS,kBACnD,eAAM,SAAS,EAAC,6CAA6C,4DAEtD,GACM,CAChB,CAAA;IACH,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,4BAA4B,YACzC,KAAC,eAAe,IACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE;gBACd,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;;oBAC/B,KAAK,CAAC,cAAc,EAAE,CAAA;oBACtB,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;wBACvB,eAAe,CACb,MAAA,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,mCAAI,wBAAwB,CACvD,CAAA;oBACH,CAAC;gBACH,CAAC;aACF,EACD,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,UAAU,EAC5B,kBAAkB,EAAE,KAAK,EACzB,aAAa,EAAE,KAAK,GACpB,GACE,CACP,CAAA;AACH,CAAC;AAED,SAAS,0BAA0B;IACjC,OAAO,CACL,KAAC,yBAAyB,IACxB,kBAAkB,EAAE,iBAAiB,CAAC,iCAAiC,YAEtE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,eAAe,OAAK,KAAK,GAAI,GAChB,CAC7B,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { NylasScheduling } from '@nylas/react'\nimport { schedulingService } from '@oneblink/apps'\nimport ErrorMessage from '../messages/ErrorMessage'\nimport CalendarBookingsContainer from './CalendarBookingsContainer'\nimport useCalendarBookings from './CalendarBookingsProvider'\n\nfunction NylasCancelForm({\n sessionId,\n bookingRef,\n}: Awaited<\n ReturnType<typeof schedulingService.createNylasExistingBookingSession>\n> & {\n submissionId: string\n}) {\n const { setBookingError, themeConfig } = useCalendarBookings()\n\n if (!bookingRef) {\n return (\n <ErrorMessage title=\"Error Retrieving Data\" gutterTop>\n <span className=\"cypress-booking-ref-not-found-error-message\">\n Could not find a calendar booking to cancel\n </span>\n </ErrorMessage>\n )\n }\n\n return (\n <div className=\"ob-scheduling-booking-form\">\n <NylasScheduling\n sessionId={sessionId}\n eventOverrides={{\n bookedEventInfo: async (event) => {\n event.preventDefault()\n if (event.detail.error) {\n setBookingError(\n event.detail.error.message ?? 'Calendar Booking Error',\n )\n }\n },\n }}\n themeConfig={themeConfig}\n cancelBookingRef={bookingRef}\n enableUserFeedback={false}\n nylasBranding={false}\n />\n </div>\n )\n}\n\nfunction CalendarBookingsCancelForm() {\n return (\n <CalendarBookingsContainer\n fetchConfiguration={schedulingService.createNylasExistingBookingSession}\n >\n {(props) => <NylasCancelForm {...props} />}\n </CalendarBookingsContainer>\n )\n}\n\nexport default React.memo(CalendarBookingsCancelForm)\n"]}
1
+ {"version":3,"file":"CalendarBookingsCancelForm.js","sourceRoot":"","sources":["../../../src/components/calendar-bookings/CalendarBookingsCancelForm.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,YAAY,MAAM,0BAA0B,CAAA;AACnD,OAAO,yBAAyB,MAAM,6BAA6B,CAAA;AACnE,OAAO,mBAAmB,MAAM,4BAA4B,CAAA;AAE5D,SAAS,eAAe,CAAC,EACvB,SAAS,EACT,UAAU,GAKX;IACC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAE9D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,CACL,KAAC,YAAY,IAAC,KAAK,EAAC,uBAAuB,EAAC,SAAS,kBACnD,eAAM,SAAS,EAAC,6CAA6C,4DAEtD,GACM,CAChB,CAAA;IACH,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,4BAA4B,YACzC,KAAC,eAAe,IACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE;gBACd,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;;oBAC/B,KAAK,CAAC,cAAc,EAAE,CAAA;oBACtB,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;wBACvB,eAAe,CACb,MAAA,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,mCAAI,wBAAwB,CACvD,CAAA;oBACH,CAAC;gBACH,CAAC;aACF,EACD,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,UAAU,EAC5B,kBAAkB,EAAE,KAAK,EACzB,aAAa,EAAE,KAAK,GACpB,GACE,CACP,CAAA;AACH,CAAC;AAED,SAAS,0BAA0B;IACjC,OAAO,CACL,KAAC,yBAAyB,IACxB,kBAAkB,EAAE,iBAAiB,CAAC,iCAAiC,YAEtE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,eAAe,OAAK,KAAK,GAAI,GAChB,CAC7B,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { NylasScheduling } from '@nylas/react'\nimport { schedulingService } from '../../apps'\nimport ErrorMessage from '../messages/ErrorMessage'\nimport CalendarBookingsContainer from './CalendarBookingsContainer'\nimport useCalendarBookings from './CalendarBookingsProvider'\n\nfunction NylasCancelForm({\n sessionId,\n bookingRef,\n}: Awaited<\n ReturnType<typeof schedulingService.createNylasExistingBookingSession>\n> & {\n submissionId: string\n}) {\n const { setBookingError, themeConfig } = useCalendarBookings()\n\n if (!bookingRef) {\n return (\n <ErrorMessage title=\"Error Retrieving Data\" gutterTop>\n <span className=\"cypress-booking-ref-not-found-error-message\">\n Could not find a calendar booking to cancel\n </span>\n </ErrorMessage>\n )\n }\n\n return (\n <div className=\"ob-scheduling-booking-form\">\n <NylasScheduling\n sessionId={sessionId}\n eventOverrides={{\n bookedEventInfo: async (event) => {\n event.preventDefault()\n if (event.detail.error) {\n setBookingError(\n event.detail.error.message ?? 'Calendar Booking Error',\n )\n }\n },\n }}\n themeConfig={themeConfig}\n cancelBookingRef={bookingRef}\n enableUserFeedback={false}\n nylasBranding={false}\n />\n </div>\n )\n}\n\nfunction CalendarBookingsCancelForm() {\n return (\n <CalendarBookingsContainer\n fetchConfiguration={schedulingService.createNylasExistingBookingSession}\n >\n {(props) => <NylasCancelForm {...props} />}\n </CalendarBookingsContainer>\n )\n}\n\nexport default React.memo(CalendarBookingsCancelForm)\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { submissionService } from '@oneblink/apps';
2
+ import { submissionService } from '../../apps';
3
3
  declare function CalendarBookingsForm({ onDone, }: {
4
4
  onDone: (formSubmissionResult: submissionService.FormSubmissionResult) => Promise<void>;
5
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import * as React from 'react';
3
3
  import { NylasScheduling } from '@nylas/react';
4
4
  import { Collapse, Fade } from '@mui/material';
5
- import { schedulingService, } from '@oneblink/apps';
5
+ import { schedulingService, } from '../../apps';
6
6
  import clsx from 'clsx';
7
7
  import { Receipt } from '../receipts';
8
8
  import ErrorModal from './ErrorModal';