@terreno/admin-frontend 57.3.0 → 57.4.0

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 (334) hide show
  1. package/.ai/guidelines/core.md +5 -1
  2. package/README.md +4 -2
  3. package/dist/AdminConflictSheet.d.ts +16 -0
  4. package/dist/AdminConflictSheet.js +52 -0
  5. package/dist/AdminConflictSheet.js.map +1 -0
  6. package/dist/AdminHome.js +2 -1
  7. package/dist/AdminHome.js.map +1 -1
  8. package/dist/AdminMigrations.d.ts +3 -0
  9. package/dist/AdminMigrations.js +19 -0
  10. package/dist/AdminMigrations.js.map +1 -0
  11. package/dist/AdminMigrationsView.d.ts +10 -0
  12. package/dist/AdminMigrationsView.js +94 -0
  13. package/dist/AdminMigrationsView.js.map +1 -0
  14. package/dist/AdminModelForm.js +190 -44
  15. package/dist/AdminModelForm.js.map +1 -1
  16. package/dist/AdminModelTable.js +315 -27
  17. package/dist/AdminModelTable.js.map +1 -1
  18. package/dist/AdminObjectPicker.js +30 -6
  19. package/dist/AdminObjectPicker.js.map +1 -1
  20. package/dist/AdminProvider.d.ts +6 -2
  21. package/dist/AdminProvider.js +29 -7
  22. package/dist/AdminProvider.js.map +1 -1
  23. package/dist/AdminScreenRouter.d.ts +1 -1
  24. package/dist/AdminScreenRouter.js +4 -0
  25. package/dist/AdminScreenRouter.js.map +1 -1
  26. package/dist/AdminShell.d.ts +7 -3
  27. package/dist/AdminShell.js +53 -24
  28. package/dist/AdminShell.js.map +1 -1
  29. package/dist/AdminVersionConfig.js +21 -2
  30. package/dist/AdminVersionConfig.js.map +1 -1
  31. package/dist/AnnouncementEditor.d.ts +45 -0
  32. package/dist/AnnouncementEditor.js +370 -0
  33. package/dist/AnnouncementEditor.js.map +1 -0
  34. package/dist/AnnouncementList.d.ts +15 -0
  35. package/dist/AnnouncementList.js +97 -0
  36. package/dist/AnnouncementList.js.map +1 -0
  37. package/dist/AnnouncementOverview.d.ts +46 -0
  38. package/dist/AnnouncementOverview.js +101 -0
  39. package/dist/AnnouncementOverview.js.map +1 -0
  40. package/dist/AnnouncementOverviewScreenWidget.d.ts +4 -0
  41. package/dist/AnnouncementOverviewScreenWidget.js +28 -0
  42. package/dist/AnnouncementOverviewScreenWidget.js.map +1 -0
  43. package/dist/ConsentFormEditor.js +20 -3
  44. package/dist/ConsentFormEditor.js.map +1 -1
  45. package/dist/DocumentStorageBrowser.js +3 -87
  46. package/dist/DocumentStorageBrowser.js.map +1 -1
  47. package/dist/adminApiQueryParams.d.ts +5 -0
  48. package/dist/adminApiQueryParams.js +25 -0
  49. package/dist/adminApiQueryParams.js.map +1 -0
  50. package/dist/adminConflictSheetStack.d.ts +17 -0
  51. package/dist/adminConflictSheetStack.js +64 -0
  52. package/dist/adminConflictSheetStack.js.map +1 -0
  53. package/dist/adminContext.d.ts +3 -0
  54. package/dist/adminContext.js +6 -0
  55. package/dist/adminContext.js.map +1 -0
  56. package/dist/adminModelListQueryParams.d.ts +3 -2
  57. package/dist/adminModelListQueryParams.js +74 -27
  58. package/dist/adminModelListQueryParams.js.map +1 -1
  59. package/dist/adminRequest.d.ts +51 -0
  60. package/dist/adminRequest.js +161 -0
  61. package/dist/adminRequest.js.map +1 -0
  62. package/dist/adminRpc.d.ts +7 -0
  63. package/dist/adminRpc.js +21 -0
  64. package/dist/adminRpc.js.map +1 -0
  65. package/dist/adminShellNav.d.ts +17 -1
  66. package/dist/adminShellNav.js +41 -9
  67. package/dist/adminShellNav.js.map +1 -1
  68. package/dist/adminWindowRefresh.d.ts +31 -0
  69. package/dist/adminWindowRefresh.js +48 -0
  70. package/dist/adminWindowRefresh.js.map +1 -0
  71. package/dist/adminWindowedTable.d.ts +13 -0
  72. package/dist/adminWindowedTable.js +33 -0
  73. package/dist/adminWindowedTable.js.map +1 -0
  74. package/dist/comms/commsDashboardParams.d.ts +0 -4
  75. package/dist/comms/commsDashboardParams.js +1 -1
  76. package/dist/comms/commsDashboardParams.js.map +1 -1
  77. package/dist/comms/commsMessagePayload.d.ts +2 -1
  78. package/dist/comms/useCommsDashboardApi.d.ts +3 -3
  79. package/dist/comms/useCommsDashboardApi.js +41 -0
  80. package/dist/comms/useCommsDashboardApi.js.map +1 -1
  81. package/dist/index.d.ts +24 -2
  82. package/dist/index.js +23 -1
  83. package/dist/index.js.map +1 -1
  84. package/dist/isAuditLogModel.d.ts +2 -0
  85. package/dist/isAuditLogModel.js +8 -0
  86. package/dist/isAuditLogModel.js.map +1 -0
  87. package/dist/jobs/JobsDashboardScreen.d.ts +10 -0
  88. package/dist/jobs/JobsDashboardScreen.js +155 -0
  89. package/dist/jobs/JobsDashboardScreen.js.map +1 -0
  90. package/dist/jobs/JobsDashboardScreenWidget.d.ts +4 -0
  91. package/dist/jobs/JobsDashboardScreenWidget.js +11 -0
  92. package/dist/jobs/JobsDashboardScreenWidget.js.map +1 -0
  93. package/dist/jobs/JobsHomeWidget.d.ts +4 -0
  94. package/dist/jobs/JobsHomeWidget.js +21 -0
  95. package/dist/jobs/JobsHomeWidget.js.map +1 -0
  96. package/dist/jobs/JobsJobDetail.d.ts +8 -0
  97. package/dist/jobs/JobsJobDetail.js +78 -0
  98. package/dist/jobs/JobsJobDetail.js.map +1 -0
  99. package/dist/jobs/JobsStatusBadge.d.ts +5 -0
  100. package/dist/jobs/JobsStatusBadge.js +16 -0
  101. package/dist/jobs/JobsStatusBadge.js.map +1 -0
  102. package/dist/jobs/jobPayload.d.ts +62 -0
  103. package/dist/jobs/jobPayload.js +54 -0
  104. package/dist/jobs/jobPayload.js.map +1 -0
  105. package/dist/jobs/jobsDashboardParams.d.ts +11 -0
  106. package/dist/jobs/jobsDashboardParams.js +70 -0
  107. package/dist/jobs/jobsDashboardParams.js.map +1 -0
  108. package/dist/jobs/useJobsDashboardApi.d.ts +60 -0
  109. package/dist/jobs/useJobsDashboardApi.js +88 -0
  110. package/dist/jobs/useJobsDashboardApi.js.map +1 -0
  111. package/dist/jobs/useJobsDashboardUrlFilters.d.ts +5 -0
  112. package/dist/jobs/useJobsDashboardUrlFilters.js +16 -0
  113. package/dist/jobs/useJobsDashboardUrlFilters.js.map +1 -0
  114. package/dist/orgs/OrgDirectoryScreen.d.ts +16 -0
  115. package/dist/orgs/OrgDirectoryScreen.js +81 -0
  116. package/dist/orgs/OrgDirectoryScreen.js.map +1 -0
  117. package/dist/orgs/OrgMembersScreen.d.ts +9 -0
  118. package/dist/orgs/OrgMembersScreen.js +115 -0
  119. package/dist/orgs/OrgMembersScreen.js.map +1 -0
  120. package/dist/orgs/OrgSettingsScreen.d.ts +9 -0
  121. package/dist/orgs/OrgSettingsScreen.js +80 -0
  122. package/dist/orgs/OrgSettingsScreen.js.map +1 -0
  123. package/dist/orgs/OrgSwitcher.d.ts +8 -0
  124. package/dist/orgs/OrgSwitcher.js +58 -0
  125. package/dist/orgs/OrgSwitcher.js.map +1 -0
  126. package/dist/orgs/adminModelEndpoints.d.ts +18 -0
  127. package/dist/orgs/adminModelEndpoints.js +73 -0
  128. package/dist/orgs/adminModelEndpoints.js.map +1 -0
  129. package/dist/orgs/normalizeListData.d.ts +9 -0
  130. package/dist/orgs/normalizeListData.js +8 -0
  131. package/dist/orgs/normalizeListData.js.map +1 -0
  132. package/dist/orgs/organizationSettings.d.ts +17 -0
  133. package/dist/orgs/organizationSettings.js +6 -0
  134. package/dist/orgs/organizationSettings.js.map +1 -0
  135. package/dist/orgs/shouldSkipOrgScopedAdminQuery.d.ts +4 -0
  136. package/dist/orgs/shouldSkipOrgScopedAdminQuery.js +2 -0
  137. package/dist/orgs/shouldSkipOrgScopedAdminQuery.js.map +1 -0
  138. package/dist/orgs/sortOrganizations.d.ts +6 -0
  139. package/dist/orgs/sortOrganizations.js +9 -0
  140. package/dist/orgs/sortOrganizations.js.map +1 -0
  141. package/dist/orgs/useOrgContext.d.ts +20 -0
  142. package/dist/orgs/useOrgContext.js +57 -0
  143. package/dist/orgs/useOrgContext.js.map +1 -0
  144. package/dist/orgs/useOrganizationsApi.d.ts +14 -0
  145. package/dist/orgs/useOrganizationsApi.js +103 -0
  146. package/dist/orgs/useOrganizationsApi.js.map +1 -0
  147. package/dist/pdfUtils.d.ts +0 -2
  148. package/dist/pdfUtils.js +2 -2
  149. package/dist/pdfUtils.js.map +1 -1
  150. package/dist/types.d.ts +100 -4
  151. package/dist/types.js.map +1 -1
  152. package/dist/useAdminApi.js +7 -61
  153. package/dist/useAdminApi.js.map +1 -1
  154. package/dist/useAdminBackgroundTask.d.ts +1 -1
  155. package/dist/useAdminBackgroundTask.js +18 -3
  156. package/dist/useAdminBackgroundTask.js.map +1 -1
  157. package/dist/useAdminConfig.js +16 -1
  158. package/dist/useAdminConfig.js.map +1 -1
  159. package/dist/useAdminMigrations.d.ts +40 -0
  160. package/dist/useAdminMigrations.js +43 -0
  161. package/dist/useAdminMigrations.js.map +1 -0
  162. package/dist/useAdminRoles.d.ts +1 -0
  163. package/dist/useAdminRoles.js +34 -0
  164. package/dist/useAdminRoles.js.map +1 -1
  165. package/dist/useAdminRpc.d.ts +28 -0
  166. package/dist/useAdminRpc.js +128 -0
  167. package/dist/useAdminRpc.js.map +1 -0
  168. package/dist/useAdminScripts.js +51 -0
  169. package/dist/useAdminScripts.js.map +1 -1
  170. package/dist/useConfigurationApi.js +23 -0
  171. package/dist/useConfigurationApi.js.map +1 -1
  172. package/dist/useConsentHistory.js +9 -1
  173. package/dist/useConsentHistory.js.map +1 -1
  174. package/dist/useDocumentStorageApi.js +72 -0
  175. package/dist/useDocumentStorageApi.js.map +1 -1
  176. package/dist/widgets/AIRequestsScreenWidget.js +17 -7
  177. package/dist/widgets/AIRequestsScreenWidget.js.map +1 -1
  178. package/dist/widgets/ModelsGridWidget.js +10 -3
  179. package/dist/widgets/ModelsGridWidget.js.map +1 -1
  180. package/dist/widgets/RecentActivityWidget.js +11 -4
  181. package/dist/widgets/RecentActivityWidget.js.map +1 -1
  182. package/dist/widgets/builtInWidgets.js +5 -9
  183. package/dist/widgets/builtInWidgets.js.map +1 -1
  184. package/dist/widgets/homeWidgetUtils.d.ts +0 -1
  185. package/dist/widgets/homeWidgetUtils.js +0 -8
  186. package/dist/widgets/homeWidgetUtils.js.map +1 -1
  187. package/package.json +6 -4
  188. package/src/AdminActionMenu.test.tsx +167 -0
  189. package/src/AdminBreadcrumbs.test.tsx +21 -1
  190. package/src/AdminConflictSheet.test.tsx +173 -0
  191. package/src/AdminConflictSheet.tsx +102 -0
  192. package/src/AdminHome.test.tsx +10 -11
  193. package/src/AdminHome.tsx +2 -4
  194. package/src/AdminMigrations.tsx +45 -0
  195. package/src/AdminMigrationsView.tsx +225 -0
  196. package/src/{AdminModelForm.test.tsx → AdminModelForm.isolated.tsx} +461 -154
  197. package/src/AdminModelForm.orgSkip.test.tsx +81 -0
  198. package/src/AdminModelForm.tsx +227 -56
  199. package/src/AdminModelForm.updateDepth.test.tsx +427 -0
  200. package/src/AdminModelList.test.tsx +12 -2
  201. package/src/AdminModelTable.test.tsx +560 -57
  202. package/src/AdminModelTable.tsx +430 -73
  203. package/src/AdminModelTable.windowed.test.tsx +897 -0
  204. package/src/AdminObjectPicker.tsx +32 -6
  205. package/src/AdminPrimitiveArrayField.test.tsx +178 -0
  206. package/src/AdminProvider.test.tsx +213 -3
  207. package/src/AdminProvider.tsx +39 -7
  208. package/src/AdminRolesList.test.tsx +197 -0
  209. package/src/AdminScreenRouter.test.tsx +393 -36
  210. package/src/AdminScreenRouter.tsx +6 -1
  211. package/src/AdminScriptList.test.tsx +180 -0
  212. package/src/AdminShell.test.tsx +595 -1
  213. package/src/AdminShell.tsx +110 -22
  214. package/src/AdminVersionConfig.tsx +31 -3
  215. package/src/AnnouncementEditor.test.tsx +603 -0
  216. package/src/AnnouncementEditor.tsx +673 -0
  217. package/src/AnnouncementList.test.tsx +198 -0
  218. package/src/AnnouncementList.tsx +214 -0
  219. package/src/AnnouncementOverview.test.tsx +325 -0
  220. package/src/AnnouncementOverview.tsx +325 -0
  221. package/src/AnnouncementOverviewScreenWidget.test.tsx +69 -0
  222. package/src/AnnouncementOverviewScreenWidget.tsx +51 -0
  223. package/src/CheckboxListEditor.test.tsx +8 -1
  224. package/src/ConsentFormEditor.test.tsx +28 -29
  225. package/src/ConsentFormEditor.tsx +27 -3
  226. package/src/ConsentFormList.test.tsx +12 -11
  227. package/src/ConsentResponseViewer.test.tsx +10 -11
  228. package/src/DocumentStorageBrowser.tsx +2 -139
  229. package/src/adminApiQueryParams.ts +33 -0
  230. package/src/adminConflictSheetStack.ts +87 -0
  231. package/src/adminContext.ts +8 -0
  232. package/src/adminModelListQueryParams.test.ts +60 -1
  233. package/src/adminModelListQueryParams.ts +89 -30
  234. package/src/adminRequest.test.ts +216 -0
  235. package/src/adminRequest.ts +213 -0
  236. package/src/adminRpc.test.ts +18 -0
  237. package/src/adminRpc.ts +31 -0
  238. package/src/adminScriptsHarness.test.ts +21 -0
  239. package/src/adminShellNav.test.ts +72 -6
  240. package/src/adminShellNav.ts +55 -10
  241. package/src/adminWindowRefresh.test.ts +65 -0
  242. package/src/adminWindowRefresh.ts +76 -0
  243. package/src/adminWindowedTable.test.ts +90 -0
  244. package/src/adminWindowedTable.ts +55 -0
  245. package/src/comms/CommsDashboardScreen.test.tsx +2 -2
  246. package/src/comms/commsDashboardParams.ts +1 -1
  247. package/src/comms/commsMessagePayload.ts +1 -1
  248. package/src/comms/useCommsDashboardApi.tsx +57 -4
  249. package/src/index.tsx +79 -1
  250. package/src/isAuditLogModel.test.ts +14 -0
  251. package/src/isAuditLogModel.ts +11 -0
  252. package/src/isolated/AIRequestsScreenWidget.isolated.tsx +84 -0
  253. package/src/isolated/AdminFieldRenderer.isolated.tsx +160 -0
  254. package/src/isolated/AdminFilterDrawer.isolated.tsx +215 -2
  255. package/src/isolated/AdminFilterDrawerMobile.isolated.tsx +172 -0
  256. package/src/isolated/AdminHomeWidgets.isolated.tsx +73 -0
  257. package/src/isolated/AdminObjectPicker.isolated.tsx +7 -0
  258. package/src/isolated/AdminScriptList.isolated.tsx +124 -0
  259. package/src/isolated/AdminScriptRunModal.isolated.tsx +274 -4
  260. package/src/isolated/DocumentStorageBrowser.isolated.tsx +13 -0
  261. package/src/isolated/RecentActivityWidget.isolated.tsx +138 -0
  262. package/src/isolated/adminWidgets.isolated.tsx +190 -0
  263. package/src/isolated/generateConsentHistoryPdf.isolated.ts +251 -0
  264. package/src/isolated/generateConsentPdfMobile.isolated.ts +87 -0
  265. package/src/isolated/generateConsentPdfsMobile.isolated.ts +129 -0
  266. package/src/isolated/hooks.isolated.tsx +245 -3
  267. package/src/isolated/rpcDualRun.isolated.tsx +449 -0
  268. package/src/isolated/useAdminScripts.isolated.tsx +156 -0
  269. package/src/isolated/useJobsDashboardApi.isolated.tsx +60 -0
  270. package/src/jobs/JobsDashboardScreen.test.tsx +310 -0
  271. package/src/jobs/JobsDashboardScreen.tsx +461 -0
  272. package/src/jobs/JobsDashboardScreenWidget.test.tsx +83 -0
  273. package/src/jobs/JobsDashboardScreenWidget.tsx +20 -0
  274. package/src/jobs/JobsHomeWidget.test.tsx +92 -0
  275. package/src/jobs/JobsHomeWidget.tsx +53 -0
  276. package/src/jobs/JobsJobDetail.test.tsx +253 -0
  277. package/src/jobs/JobsJobDetail.tsx +278 -0
  278. package/src/jobs/JobsStatusBadge.tsx +16 -0
  279. package/src/jobs/jobPayload.ts +114 -0
  280. package/src/jobs/jobsDashboardParams.test.ts +80 -0
  281. package/src/jobs/jobsDashboardParams.ts +84 -0
  282. package/src/jobs/useJobsDashboardApi.test.tsx +152 -0
  283. package/src/jobs/useJobsDashboardApi.tsx +132 -0
  284. package/src/jobs/useJobsDashboardUrlFilters.test.tsx +31 -0
  285. package/src/jobs/useJobsDashboardUrlFilters.tsx +31 -0
  286. package/src/orgs/OrgDirectoryScreen.test.tsx +184 -0
  287. package/src/orgs/OrgDirectoryScreen.tsx +200 -0
  288. package/src/orgs/OrgManagementScreens.test.tsx +270 -0
  289. package/src/orgs/OrgMembersScreen.tsx +254 -0
  290. package/src/orgs/OrgSettingsScreen.tsx +145 -0
  291. package/src/orgs/OrgSwitcher.test.tsx +145 -0
  292. package/src/orgs/OrgSwitcher.tsx +101 -0
  293. package/src/orgs/adminModelEndpoints.test.ts +156 -0
  294. package/src/orgs/adminModelEndpoints.ts +96 -0
  295. package/src/orgs/normalizeListData.test.ts +17 -0
  296. package/src/orgs/normalizeListData.ts +13 -0
  297. package/src/orgs/orgSwitcherOscillation.test.tsx +107 -0
  298. package/src/orgs/organizationSettings.test.ts +11 -0
  299. package/src/orgs/organizationSettings.ts +22 -0
  300. package/src/orgs/shouldSkipOrgScopedAdminQuery.test.ts +22 -0
  301. package/src/orgs/shouldSkipOrgScopedAdminQuery.ts +7 -0
  302. package/src/orgs/sortOrganizations.test.ts +13 -0
  303. package/src/orgs/sortOrganizations.ts +14 -0
  304. package/src/orgs/useOrgContext.test.tsx +94 -0
  305. package/src/orgs/useOrgContext.tsx +90 -0
  306. package/src/orgs/useOrganizationsApi.test.tsx +165 -0
  307. package/src/orgs/useOrganizationsApi.ts +118 -0
  308. package/src/pdfUtils.test.ts +37 -0
  309. package/src/pdfUtils.ts +2 -2
  310. package/src/testing/useAdminApiDouble.ts +70 -0
  311. package/src/types.ts +92 -4
  312. package/src/useAdminApi.test.ts +88 -0
  313. package/src/useAdminApi.ts +7 -65
  314. package/src/useAdminBackgroundTask.ts +20 -4
  315. package/src/useAdminConfig.ts +20 -2
  316. package/src/useAdminMigrations.test.tsx +75 -0
  317. package/src/useAdminMigrations.ts +77 -0
  318. package/src/useAdminRoles.test.ts +28 -0
  319. package/src/useAdminRoles.ts +40 -0
  320. package/src/useAdminRpc.test.tsx +250 -0
  321. package/src/useAdminRpc.ts +173 -0
  322. package/src/useAdminScripts.ts +67 -0
  323. package/src/useConfigurationApi.ts +24 -0
  324. package/src/useConsentHistory.ts +15 -2
  325. package/src/useDocumentStorageApi.ts +77 -0
  326. package/src/widgets/AIRequestsScreenWidget.test.tsx +154 -0
  327. package/src/widgets/AIRequestsScreenWidget.tsx +21 -7
  328. package/src/widgets/ModelsGridWidget.test.tsx +91 -0
  329. package/src/widgets/ModelsGridWidget.tsx +11 -1
  330. package/src/widgets/RecentActivityWidget.tsx +10 -3
  331. package/src/widgets/builtInFieldWidgets.test.tsx +166 -0
  332. package/src/widgets/builtInWidgets.ts +6 -0
  333. package/src/widgets/homeWidgetUtils.ts +0 -9
  334. package/src/widgets/pluginWidgets.test.tsx +10 -1
@@ -0,0 +1,172 @@
1
+ import {beforeEach, describe, it, mock} from "bun:test";
2
+ import {act, render} from "@testing-library/react-native";
3
+ import {assert} from "chai";
4
+ import React from "react";
5
+ import type {ReactTestInstance} from "react-test-renderer";
6
+
7
+ mock.module("react-native", () => ({
8
+ Platform: {
9
+ OS: "ios",
10
+ select: (options: Record<string, unknown>) => options.ios ?? options.default,
11
+ },
12
+ Pressable: "Pressable",
13
+ StyleSheet: {create: (styles: unknown) => styles, flatten: (styles: unknown) => styles},
14
+ Text: "Text",
15
+ useWindowDimensions: () => ({height: 800, width: 400}),
16
+ View: "View",
17
+ }));
18
+
19
+ mock.module("@terreno/ui", () => {
20
+ const ReactModule = require("react");
21
+ const ReactNative = require("react-native");
22
+ const Container = ({
23
+ children,
24
+ ...props
25
+ }: {children?: React.ReactNode} & Record<string, unknown>) =>
26
+ ReactModule.createElement(ReactNative.View, props, children);
27
+ const Button = ({
28
+ text,
29
+ onClick,
30
+ ...props
31
+ }: {onClick?: () => void; text?: string} & Record<string, unknown>) =>
32
+ ReactModule.createElement(
33
+ ReactNative.Pressable,
34
+ {...props, onPress: onClick},
35
+ ReactModule.createElement(ReactNative.Text, {}, text)
36
+ );
37
+ const Field = ({
38
+ onChange,
39
+ testID,
40
+ title,
41
+ value,
42
+ }: {
43
+ onChange?: (value: unknown) => void;
44
+ testID?: string;
45
+ title?: string;
46
+ value?: unknown;
47
+ }) => ReactModule.createElement(ReactNative.View, {onChange, testID, title, value});
48
+ const Modal = ({
49
+ children,
50
+ onDismiss,
51
+ primaryButtonOnClick,
52
+ secondaryButtonOnClick,
53
+ visible,
54
+ }: {
55
+ children?: React.ReactNode;
56
+ onDismiss?: () => void;
57
+ primaryButtonOnClick?: () => void;
58
+ secondaryButtonOnClick?: () => void;
59
+ visible?: boolean;
60
+ }) =>
61
+ visible
62
+ ? ReactModule.createElement(
63
+ ReactNative.View,
64
+ {
65
+ onDismiss,
66
+ primaryButtonOnClick,
67
+ secondaryButtonOnClick,
68
+ testID: "mobile-filter-modal",
69
+ },
70
+ children
71
+ )
72
+ : null;
73
+ return {
74
+ BooleanField: Field,
75
+ Box: Container,
76
+ Button,
77
+ Card: Container,
78
+ DateTimeField: Field,
79
+ Heading: Container,
80
+ IconButton: Button,
81
+ Modal,
82
+ SelectField: Field,
83
+ Text: Container,
84
+ TextField: Field,
85
+ };
86
+ });
87
+
88
+ mock.module("../AdminRefField", () => ({
89
+ AdminRefField: (props: Record<string, unknown>) => React.createElement("AdminRefField", props),
90
+ }));
91
+
92
+ import {AdminFilterDrawer} from "../AdminFilterDrawer";
93
+
94
+ const findWithCallback = (
95
+ root: ReactTestInstance,
96
+ testID: string,
97
+ callback: string
98
+ ): ReactTestInstance => {
99
+ const node = root.findAll(
100
+ (candidate: ReactTestInstance) =>
101
+ candidate.props.testID === testID && typeof candidate.props[callback] === "function"
102
+ )[0];
103
+ assert.isDefined(node);
104
+ return node;
105
+ };
106
+
107
+ describe("AdminFilterDrawer mobile", () => {
108
+ const onApply = mock(() => {});
109
+
110
+ beforeEach(() => {
111
+ onApply.mockClear();
112
+ });
113
+
114
+ it("opens the sheet, applies a draft, and closes it", () => {
115
+ const {getByTestId, queryByTestId, UNSAFE_root} = render(
116
+ <AdminFilterDrawer
117
+ api={{} as never}
118
+ appliedFilterState={{}}
119
+ fields={{email: {required: false, type: "string"}}}
120
+ filters={[{field: "email", kind: "string"}]}
121
+ onApply={onApply}
122
+ />
123
+ );
124
+
125
+ act(() => {
126
+ findWithCallback(UNSAFE_root, "admin-filter-open", "onPress").props.onPress();
127
+ });
128
+ assert.isDefined(getByTestId("admin-filter-sheet"));
129
+
130
+ act(() => {
131
+ findWithCallback(UNSAFE_root, "admin-filter-email", "onChange").props.onChange(
132
+ "mobile@example.com"
133
+ );
134
+ });
135
+ act(() => {
136
+ getByTestId("mobile-filter-modal").props.primaryButtonOnClick();
137
+ });
138
+
139
+ assert.deepEqual(onApply.mock.calls[0]?.[0], {email: "mobile@example.com"});
140
+ assert.isNull(queryByTestId("admin-filter-sheet"));
141
+ });
142
+
143
+ it("dismisses changes and clears applied filters", () => {
144
+ const {getByTestId, queryByTestId, UNSAFE_root} = render(
145
+ <AdminFilterDrawer
146
+ api={{} as never}
147
+ appliedFilterState={{email: "existing@example.com"}}
148
+ fields={{email: {required: false, type: "string"}}}
149
+ filters={[{field: "email", kind: "string"}]}
150
+ onApply={onApply}
151
+ />
152
+ );
153
+
154
+ act(() => {
155
+ findWithCallback(UNSAFE_root, "admin-filter-open", "onPress").props.onPress();
156
+ });
157
+ act(() => {
158
+ getByTestId("mobile-filter-modal").props.secondaryButtonOnClick();
159
+ });
160
+ assert.isNull(queryByTestId("admin-filter-sheet"));
161
+ assert.equal(onApply.mock.calls.length, 0);
162
+
163
+ act(() => {
164
+ findWithCallback(UNSAFE_root, "admin-filter-open", "onPress").props.onPress();
165
+ });
166
+ act(() => {
167
+ findWithCallback(UNSAFE_root, "admin-filter-clear-all", "onPress").props.onPress();
168
+ });
169
+ assert.deepEqual(onApply.mock.calls[0]?.[0], {});
170
+ assert.isNull(queryByTestId("admin-filter-sheet"));
171
+ });
172
+ });
@@ -0,0 +1,73 @@
1
+ import {describe, expect, it, mock} from "bun:test";
2
+ import {act, fireEvent} from "@testing-library/react-native";
3
+ import React from "react";
4
+ import {renderWithTheme} from "../../../ui/src/test-utils";
5
+ import type {AdminApi, AdminConfigResponse, AdminModelConfig} from "../types";
6
+
7
+ const pushes: string[] = [];
8
+ mock.module("expo-router", () => ({
9
+ router: {push: (href: string) => pushes.push(href)},
10
+ }));
11
+
12
+ mock.module("../useAdminApi", () => ({
13
+ useAdminApi: () => ({
14
+ useListQuery: () => ({data: {total: 3}, isLoading: false}),
15
+ }),
16
+ }));
17
+
18
+ import {FeatureFlagsOverridesWidget} from "../widgets/FeatureFlagsOverridesWidget";
19
+ import {ModelsGridWidget} from "../widgets/ModelsGridWidget";
20
+ import {ScriptRunnerWidget} from "../widgets/ScriptRunnerWidget";
21
+
22
+ const model: AdminModelConfig = {
23
+ displayName: "Todos",
24
+ fields: {title: {required: true, type: "string"}},
25
+ name: "Todo",
26
+ routePath: "/admin/todos",
27
+ };
28
+ const config: AdminConfigResponse = {customScreens: [], models: [model], scripts: []};
29
+ const baseProps = {
30
+ api: {} as AdminApi,
31
+ apiBase: "/admin",
32
+ config,
33
+ models: [model],
34
+ routeBase: "/console/",
35
+ };
36
+
37
+ describe("admin home widgets", () => {
38
+ it("opens a model list and its create form", async () => {
39
+ pushes.length = 0;
40
+ const {getByTestId, getByText} = renderWithTheme(<ModelsGridWidget {...baseProps} />);
41
+
42
+ expect(getByText("3 rows")).toBeDefined();
43
+ await act(async () => {
44
+ fireEvent.press(getByTestId("admin-home-models-grid-Todo-clickable"));
45
+ fireEvent.press(getByTestId("admin-home-model-add-Todo"));
46
+ });
47
+ expect(pushes).toEqual(["/console/Todo", "/console/Todo/create"]);
48
+ });
49
+
50
+ it("opens feature flags and renders the missing-model fallback", async () => {
51
+ pushes.length = 0;
52
+ const rendered = renderWithTheme(
53
+ <FeatureFlagsOverridesWidget {...baseProps} featureFlagModel={model} />
54
+ );
55
+ await act(async () => {
56
+ fireEvent.press(rendered.getByText("Open Todos"));
57
+ });
58
+ expect(pushes).toEqual(["/console/Todo"]);
59
+ rendered.unmount();
60
+
61
+ const missing = renderWithTheme(<FeatureFlagsOverridesWidget {...baseProps} />);
62
+ expect(missing.getByText(/No FeatureFlag model/)).toBeDefined();
63
+ });
64
+
65
+ it("opens the script runner from the home widget", async () => {
66
+ pushes.length = 0;
67
+ const rendered = renderWithTheme(<ScriptRunnerWidget {...baseProps} />);
68
+ await act(async () => {
69
+ fireEvent.press(rendered.getByText("Open scripts"));
70
+ });
71
+ expect(pushes).toEqual(["/console/__scripts"]);
72
+ });
73
+ });
@@ -88,6 +88,13 @@ describe("AdminObjectPicker", () => {
88
88
  const urls = querySpecs.map((s) => s.url).sort();
89
89
  expect(urls).toContain("/admin/users/search");
90
90
  expect(urls).toContain("/admin/users/some-id");
91
+ expect(urls).toContain("/admin/users");
92
+ const listSpec = querySpecs.find(
93
+ (s: unknown) =>
94
+ (s as Record<string, unknown>).url === "/admin/users" &&
95
+ Boolean((s as {params?: {limit?: number}}).params?.limit)
96
+ ) as {params?: {limit?: number; page?: number}} | undefined;
97
+ expect(listSpec?.params).toEqual({limit: 100, page: 1});
91
98
  const searchSpec = querySpecs.find(
92
99
  (s: unknown) => (s as Record<string, unknown>).url === "/admin/users/search"
93
100
  );
@@ -0,0 +1,124 @@
1
+ // noExplicitAny: hook doubles expose dynamic RTK Query results to the component.
2
+ // biome-ignore-all lint/suspicious/noExplicitAny: test mock typing
3
+ import {beforeEach, describe, expect, it, mock} from "bun:test";
4
+ import {act, fireEvent} from "@testing-library/react-native";
5
+ import React from "react";
6
+ import type {ReactTestInstance} from "react-test-renderer";
7
+ import {renderWithTheme} from "../../../ui/src/test-utils";
8
+ import type {AdminApi, AdminConfigResponse, ScriptRun} from "../types";
9
+
10
+ const config: AdminConfigResponse = {
11
+ models: [],
12
+ scripts: [{description: "Migrates records", name: "migrate"}],
13
+ };
14
+
15
+ const run: ScriptRun = {
16
+ _id: "task-123456",
17
+ completedAt: "2026-09-01T10:00:02.000Z",
18
+ created: "2026-09-01T10:00:00.000Z",
19
+ createdByName: "Admin",
20
+ isDryRun: false,
21
+ logs: [
22
+ {
23
+ level: "error",
24
+ message: "failed",
25
+ timestamp: "2026-09-01T10:00:01.000Z",
26
+ },
27
+ ],
28
+ startedAt: "2026-09-01T10:00:00.000Z",
29
+ status: "failed",
30
+ taskType: "migrate",
31
+ updated: "2026-09-01T10:00:02.000Z",
32
+ };
33
+
34
+ const queryResult = {
35
+ data: {data: [run], limit: 25, more: true, page: 1, total: 2},
36
+ isLoading: false,
37
+ };
38
+
39
+ mock.module("../useAdminConfig", () => ({
40
+ useAdminConfig: () => ({config, error: null, isLoading: false}),
41
+ }));
42
+
43
+ mock.module("../useAdminScripts", () => ({
44
+ useAdminScripts: () => ({
45
+ useListScriptRunsQuery: () => queryResult,
46
+ }),
47
+ }));
48
+
49
+ const modalProps: Record<string, unknown> = {};
50
+ mock.module("../AdminScriptRunModal", () => ({
51
+ AdminScriptRunModal: (props: Record<string, unknown>) => {
52
+ Object.assign(modalProps, props);
53
+ return null;
54
+ },
55
+ }));
56
+
57
+ import {AdminScriptList} from "../AdminScriptList";
58
+
59
+ describe("AdminScriptList history", () => {
60
+ beforeEach(() => {
61
+ for (const key of Object.keys(modalProps)) {
62
+ delete modalProps[key];
63
+ }
64
+ });
65
+
66
+ it("renders the latest run and opens per-script history", async () => {
67
+ const {UNSAFE_root, getByTestId, getByText} = renderWithTheme(
68
+ <AdminScriptList api={{} as AdminApi} baseUrl="/admin" />
69
+ );
70
+
71
+ expect(getByText(/Last run/)).toBeDefined();
72
+ expect(getByText("Run history (2)")).toBeDefined();
73
+ await act(async () => {
74
+ fireEvent.press(getByTestId("admin-script-history-migrate-clickable"));
75
+ });
76
+ expect(getByText("Showing runs for migrate. Open a run to review its output.")).toBeDefined();
77
+ expect(getByText("Load more")).toBeDefined();
78
+
79
+ const openButtons = UNSAFE_root.findAll(
80
+ (node: ReactTestInstance) =>
81
+ node.props?.text === "Open" && typeof node.props?.onClick === "function"
82
+ );
83
+ await act(async () => {
84
+ openButtons[0].props.onClick();
85
+ });
86
+ expect(modalProps.historyTaskId).toBe("task-123456");
87
+ expect(modalProps.scriptName).toBe("migrate");
88
+ });
89
+
90
+ it("switches to global history, loads more, and clears a script filter", async () => {
91
+ const {UNSAFE_root, getByTestId, getByText} = renderWithTheme(
92
+ <AdminScriptList api={{} as AdminApi} baseUrl="/admin" />
93
+ );
94
+ const segmentedControls = UNSAFE_root.findAll(
95
+ (node: ReactTestInstance) =>
96
+ Array.isArray(node.props?.items) && typeof node.props?.onChange === "function"
97
+ );
98
+
99
+ await act(async () => {
100
+ segmentedControls[0].props.onChange(1);
101
+ });
102
+ expect(
103
+ getByText("Every dry and live run is logged. Open a run to review its output.")
104
+ ).toBeDefined();
105
+
106
+ const loadMoreButtons = UNSAFE_root.findAll(
107
+ (node: ReactTestInstance) =>
108
+ node.props?.text === "Load more" && typeof node.props?.onClick === "function"
109
+ );
110
+ await act(async () => {
111
+ loadMoreButtons[0].props.onClick();
112
+ segmentedControls[0].props.onChange(0);
113
+ });
114
+ await act(async () => {
115
+ fireEvent.press(getByTestId("admin-script-history-migrate-clickable"));
116
+ });
117
+ await act(async () => {
118
+ fireEvent.press(getByTestId("admin-script-history-clear-filter-clickable"));
119
+ });
120
+ expect(
121
+ getByText("Every dry and live run is logged. Open a run to review its output.")
122
+ ).toBeDefined();
123
+ });
124
+ });
@@ -14,10 +14,10 @@ mock.module("@terreno/ui", () => {
14
14
  const ReactMod = require("react");
15
15
  const Box = ({children, ...rest}: Record<string, unknown>) =>
16
16
  ReactMod.createElement(RN.View, rest, children);
17
- const Button = ({text, onClick, testID}: Record<string, unknown>) =>
17
+ const Button = ({disabled, text, onClick, testID}: Record<string, unknown>) =>
18
18
  ReactMod.createElement(
19
19
  RN.Pressable,
20
- {onPress: onClick, testID},
20
+ {disabled, onPress: onClick, testID},
21
21
  ReactMod.createElement(RN.Text, {}, text)
22
22
  );
23
23
  const Heading = ({children}: Record<string, unknown>) =>
@@ -34,8 +34,13 @@ mock.module("@terreno/ui", () => {
34
34
  ReactMod.createElement(RN.Text, {}, value as string);
35
35
  const Banner = ({text}: Record<string, unknown>) =>
36
36
  ReactMod.createElement(RN.Text, {}, text as string);
37
- const TextField = ({value, placeholder}: Record<string, unknown>) =>
38
- ReactMod.createElement(RN.Text, {}, (value as string) || (placeholder as string) || "");
37
+ const TextField = ({value, placeholder, onChange, testID}: Record<string, unknown>) =>
38
+ ReactMod.createElement(RN.TextInput, {
39
+ onChangeText: onChange,
40
+ placeholder: placeholder as string,
41
+ testID: testID ?? (placeholder === "Search output" ? "mock-output-search" : undefined),
42
+ value: (value as string) || "",
43
+ });
39
44
  return {Badge, Banner, Box, Button, Heading, Icon, Modal, Spinner, Text, TextField};
40
45
  });
41
46
 
@@ -645,6 +650,197 @@ describe("AdminScriptRunModal", () => {
645
650
  expect(cancelCalls.length).toBe(0);
646
651
  });
647
652
 
653
+ it("opens read-only history mode with prior task output and duration", async () => {
654
+ state.task = {
655
+ data: {
656
+ task: {
657
+ completedAt: "2024-06-01T12:00:05Z",
658
+ created: "2024-06-01T12:00:00Z",
659
+ isDryRun: false,
660
+ result: ["ok line", "ERROR: bad row", "another ok"],
661
+ startedAt: "2024-06-01T12:00:00Z",
662
+ status: "completed",
663
+ },
664
+ },
665
+ error: null,
666
+ isLoading: false,
667
+ };
668
+ const {getByText} = renderWithTheme(
669
+ <AdminScriptRunModal
670
+ api={mockApi}
671
+ baseUrl="/admin"
672
+ historyTaskId="hist-99"
673
+ onDismiss={() => {}}
674
+ scriptName="history-script"
675
+ visible={true}
676
+ />
677
+ );
678
+ await waitTicks();
679
+ expect(getByText("history-script")).toBeTruthy();
680
+ expect(getByText(/Completed with 1 error/)).toBeTruthy();
681
+ });
682
+
683
+ it("filters output to errors and searches result lines", async () => {
684
+ state.task = {data: undefined, error: null, isLoading: false};
685
+ const {getByPlaceholderText, getByTestId, getByText, queryByText, rerender} = renderWithTheme(
686
+ <AdminScriptRunModal
687
+ api={mockApi}
688
+ baseUrl="/admin"
689
+ onDismiss={() => {}}
690
+ scriptName="filter-script"
691
+ visible={true}
692
+ />
693
+ );
694
+ await pressDryRun(getByTestId);
695
+ state.task = {
696
+ data: {
697
+ task: {
698
+ isDryRun: true,
699
+ result: ["success row", "failed: bad thing", "success two"],
700
+ status: "completed",
701
+ },
702
+ },
703
+ error: null,
704
+ isLoading: false,
705
+ };
706
+ rerender(
707
+ <AdminScriptRunModal
708
+ api={mockApi}
709
+ baseUrl="/admin"
710
+ onDismiss={() => {}}
711
+ scriptName="filter-script"
712
+ visible={true}
713
+ />
714
+ );
715
+ await waitTicks();
716
+
717
+ await act(async () => {
718
+ fireEvent.press(getByText("Errors (1)"));
719
+ });
720
+ expect(getByText("failed: bad thing")).toBeTruthy();
721
+ expect(queryByText("success row")).toBeNull();
722
+
723
+ await act(async () => {
724
+ fireEvent.press(getByText("All (3)"));
725
+ fireEvent.changeText(getByPlaceholderText("Search output"), "success two");
726
+ });
727
+ expect(getByText("success two")).toBeTruthy();
728
+ expect(queryByText("failed: bad thing")).toBeNull();
729
+ });
730
+
731
+ it("exports CSV and JSON when browser download APIs exist", async () => {
732
+ state.task = {data: undefined, error: null, isLoading: false};
733
+ const click = mock(() => undefined);
734
+ const anchor = {click, download: "", href: ""};
735
+ const createElement = mock((tag: string) => {
736
+ if (tag === "a") {
737
+ return anchor;
738
+ }
739
+ return {};
740
+ });
741
+ const originalDocument = globalThis.document;
742
+ const originalUrl = globalThis.URL;
743
+ Object.defineProperty(globalThis, "document", {
744
+ configurable: true,
745
+ value: {createElement},
746
+ });
747
+ Object.defineProperty(globalThis, "URL", {
748
+ configurable: true,
749
+ value: {
750
+ createObjectURL: () => "blob:test",
751
+ revokeObjectURL: () => undefined,
752
+ },
753
+ });
754
+
755
+ const {getByTestId, getByText, rerender} = renderWithTheme(
756
+ <AdminScriptRunModal
757
+ api={mockApi}
758
+ baseUrl="/admin"
759
+ onDismiss={() => {}}
760
+ scriptName="export-script"
761
+ visible={true}
762
+ />
763
+ );
764
+ await pressDryRun(getByTestId);
765
+ state.task = {
766
+ data: {
767
+ task: {
768
+ isDryRun: true,
769
+ result: ["line one", "line two"],
770
+ status: "completed",
771
+ },
772
+ },
773
+ error: null,
774
+ isLoading: false,
775
+ };
776
+ rerender(
777
+ <AdminScriptRunModal
778
+ api={mockApi}
779
+ baseUrl="/admin"
780
+ onDismiss={() => {}}
781
+ scriptName="export-script"
782
+ visible={true}
783
+ />
784
+ );
785
+ await waitTicks();
786
+
787
+ await act(async () => {
788
+ fireEvent.press(getByText("Export CSV"));
789
+ fireEvent.press(getByText("Export JSON"));
790
+ });
791
+
792
+ expect(createElement).toHaveBeenCalledWith("a");
793
+ expect(click.mock.calls.length).toBeGreaterThan(0);
794
+
795
+ Object.defineProperty(globalThis, "document", {
796
+ configurable: true,
797
+ value: originalDocument,
798
+ });
799
+ Object.defineProperty(globalThis, "URL", {
800
+ configurable: true,
801
+ value: originalUrl,
802
+ });
803
+ });
804
+
805
+ it("re-runs dry from the done view after a completed dry run", async () => {
806
+ state.task = {data: undefined, error: null, isLoading: false};
807
+ const {getByTestId, getByText, rerender} = renderWithTheme(
808
+ <AdminScriptRunModal
809
+ api={mockApi}
810
+ baseUrl="/admin"
811
+ onDismiss={() => {}}
812
+ scriptName="migrate"
813
+ visible={true}
814
+ />
815
+ );
816
+
817
+ await pressDryRun(getByTestId);
818
+
819
+ state.task = {
820
+ data: {task: {isDryRun: true, result: ["all good"], status: "completed"}},
821
+ error: null,
822
+ isLoading: false,
823
+ };
824
+ rerender(
825
+ <AdminScriptRunModal
826
+ api={mockApi}
827
+ baseUrl="/admin"
828
+ onDismiss={() => {}}
829
+ scriptName="migrate"
830
+ visible={true}
831
+ />
832
+ );
833
+ await waitTicks();
834
+
835
+ runCalls.length = 0;
836
+ await act(async () => {
837
+ fireEvent.press(getByText("Re-run dry"));
838
+ });
839
+ await waitTicks();
840
+
841
+ expect(runCalls.some((call) => (call as {wetRun?: boolean}).wetRun === false)).toBe(true);
842
+ });
843
+
648
844
  it("renders without error when visible flips from true→false (reset cycle)", async () => {
649
845
  const {rerender} = renderWithTheme(
650
846
  <AdminScriptRunModal
@@ -666,4 +862,78 @@ describe("AdminScriptRunModal", () => {
666
862
  />
667
863
  );
668
864
  });
865
+
866
+ it("renders, filters, searches, and exports a completed history run", async () => {
867
+ state.task = {
868
+ data: {
869
+ task: {
870
+ _id: "history-1",
871
+ completedAt: "2026-09-01T10:00:02.000Z",
872
+ created: "2026-09-01T10:00:00.000Z",
873
+ isDryRun: true,
874
+ result: ["updated todo", "ERROR failed todo"],
875
+ startedAt: "2026-09-01T10:00:00.000Z",
876
+ status: "completed",
877
+ },
878
+ },
879
+ error: null,
880
+ isLoading: false,
881
+ };
882
+ const clickedDownloads: string[] = [];
883
+ const originalDocument = globalThis.document;
884
+ const originalCreateObjectURL = URL.createObjectURL;
885
+ const originalRevokeObjectURL = URL.revokeObjectURL;
886
+ Object.defineProperty(globalThis, "document", {
887
+ configurable: true,
888
+ value: {
889
+ createElement: () => ({
890
+ click: () => clickedDownloads.push("clicked"),
891
+ download: "",
892
+ href: "",
893
+ }),
894
+ },
895
+ });
896
+ URL.createObjectURL = () => "blob:test";
897
+ URL.revokeObjectURL = () => undefined;
898
+
899
+ const {getByTestId, getByText} = renderWithTheme(
900
+ <AdminScriptRunModal
901
+ api={mockApi}
902
+ baseUrl="/admin"
903
+ historyTaskId="history-1"
904
+ onDismiss={() => undefined}
905
+ scriptDescription="Historical run"
906
+ scriptName="migrate"
907
+ visible
908
+ />
909
+ );
910
+ await waitTicks();
911
+
912
+ expect(getByText("Historical run")).toBeDefined();
913
+ expect(getByText("updated todo")).toBeDefined();
914
+ await act(async () => {
915
+ fireEvent.press(getByText("Errors (1)"));
916
+ });
917
+ expect(getByText("ERROR failed todo")).toBeDefined();
918
+ await act(async () => {
919
+ fireEvent.changeText(getByTestId("mock-output-search"), "missing");
920
+ });
921
+ expect(getByText("No output lines match this filter.")).toBeDefined();
922
+ await act(async () => {
923
+ fireEvent.press(getByText("Export CSV"));
924
+ fireEvent.press(getByText("Export JSON"));
925
+ });
926
+ expect(clickedDownloads).toHaveLength(2);
927
+
928
+ if (originalDocument === undefined) {
929
+ Reflect.deleteProperty(globalThis, "document");
930
+ } else {
931
+ Object.defineProperty(globalThis, "document", {
932
+ configurable: true,
933
+ value: originalDocument,
934
+ });
935
+ }
936
+ URL.createObjectURL = originalCreateObjectURL;
937
+ URL.revokeObjectURL = originalRevokeObjectURL;
938
+ });
669
939
  });