@hubspot/ui-extensions 0.11.1 → 0.11.3

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 (236) hide show
  1. package/dist/__tests__/crm/hooks/useAssociations.spec.js +36 -32
  2. package/dist/__tests__/crm/hooks/useCrmProperties.spec.js +20 -19
  3. package/dist/__tests__/crm/utils/fetchAssociations.spec.js +13 -12
  4. package/dist/__tests__/crm/utils/fetchCrmProperties.spec.js +38 -37
  5. package/dist/clientTypes.d.ts +1 -0
  6. package/dist/clientTypes.js +1 -1
  7. package/dist/crm/hooks/useAssociations.d.ts +5 -3
  8. package/dist/crm/hooks/useAssociations.js +4 -2
  9. package/dist/crm/hooks/useCrmProperties.d.ts +4 -2
  10. package/dist/crm/hooks/useCrmProperties.js +4 -2
  11. package/dist/crm/index.d.ts +4 -4
  12. package/dist/crm/index.js +3 -3
  13. package/dist/crm/utils/fetchAssociations.d.ts +1 -1
  14. package/dist/experimental/index.d.ts +4 -4
  15. package/dist/experimental/index.js +3 -3
  16. package/dist/experimental/testing/__tests__/createRenderer.spec.js +23 -0
  17. package/dist/experimental/testing/__tests__/debug.spec.js +57 -0
  18. package/dist/experimental/testing/__tests__/find.spec.js +48 -0
  19. package/dist/experimental/testing/__tests__/findAll.spec.js +13 -0
  20. package/dist/experimental/testing/__tests__/findAllChildren.spec.js +54 -0
  21. package/dist/experimental/testing/__tests__/findByTestId.spec.js +126 -0
  22. package/dist/experimental/testing/__tests__/findChild.spec.js +33 -0
  23. package/dist/experimental/testing/__tests__/fragments.spec.js +66 -0
  24. package/dist/experimental/testing/__tests__/invalid-components.spec.js +96 -0
  25. package/dist/experimental/testing/__tests__/isMatch.spec.js +113 -0
  26. package/dist/experimental/testing/__tests__/logger.spec.js +10 -0
  27. package/dist/experimental/testing/__tests__/maybeFind.spec.js +67 -0
  28. package/dist/experimental/testing/__tests__/maybeFindByTestId.spec.js +65 -0
  29. package/dist/experimental/testing/__tests__/maybeFindChild.spec.js +75 -0
  30. package/dist/experimental/testing/__tests__/mocks.actions.spec.js +19 -0
  31. package/dist/experimental/testing/__tests__/mocks.context.spec.js +24 -0
  32. package/dist/experimental/testing/__tests__/mocks.runServerlessFunction.spec.js +35 -0
  33. package/dist/experimental/testing/__tests__/mocks.useAssociations.spec.js +47 -0
  34. package/dist/experimental/testing/__tests__/mocks.useCrmProperties.spec.js +58 -0
  35. package/dist/experimental/testing/__tests__/props.spec.js +13 -0
  36. package/dist/experimental/testing/__tests__/testId.spec.js +18 -0
  37. package/dist/experimental/testing/__tests__/trigger.spec.js +43 -0
  38. package/dist/experimental/testing/__tests__/type-utils.spec.js +165 -0
  39. package/dist/experimental/testing/__tests__/waitFor.spec.js +57 -0
  40. package/dist/experimental/testing/index.d.ts +4 -0
  41. package/dist/experimental/testing/index.js +4 -0
  42. package/dist/experimental/testing/internal/constants.d.ts +2 -2
  43. package/dist/experimental/testing/internal/constants.js +1 -1
  44. package/dist/experimental/testing/internal/convert.d.ts +10 -0
  45. package/dist/experimental/testing/internal/convert.js +149 -0
  46. package/dist/experimental/testing/internal/debug.d.ts +3 -3
  47. package/dist/experimental/testing/internal/debug.js +12 -4
  48. package/dist/experimental/testing/internal/document.d.ts +14 -0
  49. package/dist/experimental/testing/internal/document.js +40 -0
  50. package/dist/experimental/testing/internal/element.d.ts +4 -3
  51. package/dist/experimental/testing/internal/element.js +15 -10
  52. package/dist/experimental/testing/internal/errors.d.ts +57 -2
  53. package/dist/experimental/testing/internal/errors.js +62 -2
  54. package/dist/experimental/testing/internal/fragment.d.ts +3 -2
  55. package/dist/experimental/testing/internal/fragment.js +13 -9
  56. package/dist/experimental/testing/internal/match.d.ts +10 -0
  57. package/dist/experimental/testing/internal/match.js +19 -0
  58. package/dist/experimental/testing/internal/mocks/index.d.ts +17 -0
  59. package/dist/experimental/testing/internal/mocks/index.js +46 -0
  60. package/dist/experimental/testing/internal/mocks/mock-extension-point-api.d.ts +2 -0
  61. package/dist/experimental/testing/internal/mocks/mock-extension-point-api.js +166 -0
  62. package/dist/experimental/testing/internal/mocks/mock-hooks.d.ts +2 -0
  63. package/dist/experimental/testing/internal/mocks/mock-hooks.js +59 -0
  64. package/dist/experimental/testing/internal/print.d.ts +2 -2
  65. package/dist/experimental/testing/internal/print.js +17 -11
  66. package/dist/experimental/testing/internal/query.d.ts +19 -9
  67. package/dist/experimental/testing/internal/query.js +91 -46
  68. package/dist/experimental/testing/internal/root.d.ts +1 -1
  69. package/dist/experimental/testing/internal/root.js +12 -8
  70. package/dist/experimental/testing/internal/text.d.ts +3 -2
  71. package/dist/experimental/testing/internal/text.js +12 -3
  72. package/dist/experimental/testing/internal/type-utils-internal.d.ts +44 -0
  73. package/dist/experimental/testing/internal/type-utils-internal.js +54 -0
  74. package/dist/experimental/testing/internal/types-internal.d.ts +20 -2
  75. package/dist/experimental/testing/internal/utils/promise-utils.d.ts +14 -0
  76. package/dist/experimental/testing/internal/utils/promise-utils.js +14 -0
  77. package/dist/experimental/testing/render.d.ts +35 -0
  78. package/dist/experimental/testing/render.js +219 -0
  79. package/dist/experimental/testing/type-utils.d.ts +2 -2
  80. package/dist/experimental/testing/type-utils.js +1 -1
  81. package/dist/experimental/testing/types.d.ts +127 -9
  82. package/dist/experimental/testing/utils.d.ts +11 -0
  83. package/dist/experimental/testing/utils.js +24 -0
  84. package/dist/hubspot.d.ts +2 -4
  85. package/dist/hubspot.js +3 -3
  86. package/dist/index.d.ts +5 -5
  87. package/dist/index.js +5 -5
  88. package/dist/internal/global-utils.d.ts +6 -0
  89. package/dist/internal/global-utils.js +37 -0
  90. package/dist/internal/hook-utils.d.ts +19 -0
  91. package/dist/internal/hook-utils.js +34 -0
  92. package/dist/logger.d.ts +1 -8
  93. package/dist/logger.js +3 -2
  94. package/dist/pages/home/index.d.ts +1 -1
  95. package/dist/pages/home/index.js +1 -1
  96. package/dist/{__synced__/remoteComponents.synced.d.ts → shared/remoteComponents.d.ts} +159 -77
  97. package/dist/{__synced__/remoteComponents.synced.js → shared/remoteComponents.js} +99 -1
  98. package/dist/{__synced__/types/components/accordion.synced.d.ts → shared/types/components/accordion.d.ts} +2 -2
  99. package/dist/{__synced__/types/components/alert.synced.d.ts → shared/types/components/alert.d.ts} +2 -1
  100. package/dist/{__synced__/types/components/app-home-header-actions.synced.d.ts → shared/types/components/app-home-header-actions.d.ts} +4 -4
  101. package/dist/{__synced__/types/components/button-row.synced.d.ts → shared/types/components/button-row.d.ts} +2 -2
  102. package/dist/{__synced__/types/components/button.synced.d.ts → shared/types/components/button.d.ts} +9 -3
  103. package/dist/{__synced__/types/components/card.synced.d.ts → shared/types/components/card.d.ts} +2 -1
  104. package/dist/{__synced__/types/components/chart.synced.d.ts → shared/types/components/chart.d.ts} +2 -1
  105. package/dist/{__synced__/types/components/description-list.synced.d.ts → shared/types/components/description-list.d.ts} +3 -2
  106. package/dist/{__synced__/types/components/divider.synced.d.ts → shared/types/components/divider.d.ts} +2 -2
  107. package/dist/{__synced__/types/components/dropdown.synced.d.ts → shared/types/components/dropdown.d.ts} +5 -5
  108. package/dist/{__synced__/types/components/empty-state.synced.d.ts → shared/types/components/empty-state.d.ts} +2 -1
  109. package/dist/{__synced__/types/components/error-state.synced.d.ts → shared/types/components/error-state.d.ts} +2 -1
  110. package/dist/{__synced__/types/components/form.synced.d.ts → shared/types/components/form.d.ts} +3 -3
  111. package/dist/{__synced__/types/components/heading.synced.d.ts → shared/types/components/heading.d.ts} +2 -1
  112. package/dist/{__synced__/types/components/icon.synced.d.ts → shared/types/components/icon.d.ts} +2 -2
  113. package/dist/{__synced__/types/components/iframe.synced.d.ts → shared/types/components/iframe.d.ts} +2 -2
  114. package/dist/{__synced__/types/components/illustration.synced.d.ts → shared/types/components/illustration.d.ts} +2 -1
  115. package/dist/{__synced__/types/components/image.synced.d.ts → shared/types/components/image.d.ts} +3 -3
  116. package/dist/shared/types/components/index.d.ts +38 -0
  117. package/dist/shared/types/components/index.js +1 -0
  118. package/dist/{__synced__/types/components/inputs.synced.d.ts → shared/types/components/inputs.d.ts} +2 -1
  119. package/dist/shared/types/components/inputs.js +1 -0
  120. package/dist/{__synced__/types/components/layouts.synced.d.ts → shared/types/components/layouts.d.ts} +6 -6
  121. package/dist/shared/types/components/layouts.js +1 -0
  122. package/dist/{__synced__/types/components/link.synced.d.ts → shared/types/components/link.d.ts} +3 -3
  123. package/dist/shared/types/components/link.js +1 -0
  124. package/dist/{__synced__/types/components/list.synced.d.ts → shared/types/components/list.d.ts} +2 -1
  125. package/dist/shared/types/components/list.js +1 -0
  126. package/dist/{__synced__/types/components/loading-spinner.synced.d.ts → shared/types/components/loading-spinner.d.ts} +2 -2
  127. package/dist/shared/types/components/loading-spinner.js +1 -0
  128. package/dist/{__synced__/types/components/modal.synced.d.ts → shared/types/components/modal.d.ts} +4 -4
  129. package/dist/shared/types/components/modal.js +1 -0
  130. package/dist/{__synced__/types/components/panel.synced.d.ts → shared/types/components/panel.d.ts} +5 -5
  131. package/dist/shared/types/components/panel.js +1 -0
  132. package/dist/{__synced__/types/components/progress-bar.synced.d.ts → shared/types/components/progress-bar.d.ts} +2 -1
  133. package/dist/shared/types/components/progress-bar.js +1 -0
  134. package/dist/{__synced__/types/components/selects.synced.d.ts → shared/types/components/selects.d.ts} +2 -1
  135. package/dist/shared/types/components/selects.js +1 -0
  136. package/dist/{__synced__/types/components/statistics.synced.d.ts → shared/types/components/statistics.d.ts} +4 -3
  137. package/dist/shared/types/components/statistics.js +1 -0
  138. package/dist/{__synced__/types/components/status-tag.synced.d.ts → shared/types/components/status-tag.d.ts} +2 -1
  139. package/dist/shared/types/components/status-tag.js +1 -0
  140. package/dist/{__synced__/types/components/step-indicator.synced.d.ts → shared/types/components/step-indicator.d.ts} +2 -2
  141. package/dist/shared/types/components/step-indicator.js +1 -0
  142. package/dist/{__synced__/types/components/table.synced.d.ts → shared/types/components/table.d.ts} +5 -4
  143. package/dist/shared/types/components/table.js +1 -0
  144. package/dist/{__synced__/types/components/tabs.synced.d.ts → shared/types/components/tabs.d.ts} +3 -2
  145. package/dist/shared/types/components/tabs.js +1 -0
  146. package/dist/{__synced__/types/components/tag.synced.d.ts → shared/types/components/tag.d.ts} +3 -3
  147. package/dist/shared/types/components/tag.js +1 -0
  148. package/dist/{__synced__/types/components/text.synced.d.ts → shared/types/components/text.d.ts} +2 -1
  149. package/dist/shared/types/components/text.js +1 -0
  150. package/dist/{__synced__/types/components/tile.synced.d.ts → shared/types/components/tile.d.ts} +2 -1
  151. package/dist/shared/types/components/tile.js +1 -0
  152. package/dist/{__synced__/types/components/toggle.synced.d.ts → shared/types/components/toggle.d.ts} +2 -2
  153. package/dist/shared/types/components/toggle.js +1 -0
  154. package/dist/{__synced__/types/components/toggleInputs.synced.d.ts → shared/types/components/toggleInputs.d.ts} +4 -4
  155. package/dist/shared/types/components/toggleInputs.js +1 -0
  156. package/dist/{__synced__/types/components/tooltip.synced.d.ts → shared/types/components/tooltip.d.ts} +2 -1
  157. package/dist/shared/types/components/tooltip.js +1 -0
  158. package/dist/{__synced__/types/context.synced.d.ts → shared/types/context.d.ts} +1 -1
  159. package/dist/shared/types/context.js +1 -0
  160. package/dist/{__synced__/types/crm.synced.d.ts → shared/types/crm.d.ts} +13 -13
  161. package/dist/shared/types/crm.js +1 -0
  162. package/dist/{__synced__/experimental/types.synced.d.ts → shared/types/experimental.d.ts} +12 -17
  163. package/dist/shared/types/experimental.js +1 -0
  164. package/dist/shared/types/extend.d.ts +4 -0
  165. package/dist/shared/types/extend.js +1 -0
  166. package/dist/{__synced__/types/extension-points.synced.d.ts → shared/types/extension-points.d.ts} +18 -10
  167. package/dist/{__synced__/types/http-requests.synced.d.ts → shared/types/http-requests.d.ts} +1 -1
  168. package/dist/shared/types/index.d.ts +8 -0
  169. package/dist/shared/types/index.js +1 -0
  170. package/dist/shared/types/logger.d.ts +7 -0
  171. package/dist/shared/types/logger.js +1 -0
  172. package/dist/shared/types/reactions.js +1 -0
  173. package/dist/{__synced__/types/shared.synced.d.ts → shared/types/shared.d.ts} +3 -0
  174. package/dist/shared/types/worker-globals.d.ts +17 -0
  175. package/dist/shared/types/worker-globals.js +1 -0
  176. package/dist/{__synced__/utils/remote-component-registry.synced.d.ts → shared/utils/remote-component-registry.d.ts} +1 -1
  177. package/dist/{__synced__/utils/remote-component-registry.synced.js → shared/utils/remote-component-registry.js} +0 -1
  178. package/package.json +13 -14
  179. package/dist/__synced__/appHomeRemoteComponents.synced.d.ts +0 -28
  180. package/dist/__synced__/appHomeRemoteComponents.synced.js +0 -21
  181. package/dist/__synced__/crmRemoteComponents.synced.d.ts +0 -66
  182. package/dist/__synced__/crmRemoteComponents.synced.js +0 -15
  183. package/dist/__synced__/experimental/types.synced.js +0 -5
  184. package/dist/__synced__/experimentalRemoteComponents.synced.d.ts +0 -94
  185. package/dist/__synced__/experimentalRemoteComponents.synced.js +0 -56
  186. package/dist/__synced__/types/components/index.synced.d.ts +0 -38
  187. package/dist/__synced__/types/index.synced.d.ts +0 -8
  188. package/dist/__synced__/types/index.synced.js +0 -1
  189. /package/dist/{__synced__/types/actions.synced.js → experimental/testing/__tests__/createRenderer.spec.d.ts} +0 -0
  190. /package/dist/{__synced__/types/components/accordion.synced.js → experimental/testing/__tests__/debug.spec.d.ts} +0 -0
  191. /package/dist/{__synced__/types/components/alert.synced.js → experimental/testing/__tests__/find.spec.d.ts} +0 -0
  192. /package/dist/{__synced__/types/components/app-home-header-actions.synced.js → experimental/testing/__tests__/findAll.spec.d.ts} +0 -0
  193. /package/dist/{__synced__/types/components/button-row.synced.js → experimental/testing/__tests__/findAllChildren.spec.d.ts} +0 -0
  194. /package/dist/{__synced__/types/components/button.synced.js → experimental/testing/__tests__/findByTestId.spec.d.ts} +0 -0
  195. /package/dist/{__synced__/types/components/card.synced.js → experimental/testing/__tests__/findChild.spec.d.ts} +0 -0
  196. /package/dist/{__synced__/types/components/description-list.synced.js → experimental/testing/__tests__/fragments.spec.d.ts} +0 -0
  197. /package/dist/{__synced__/types/components/divider.synced.js → experimental/testing/__tests__/invalid-components.spec.d.ts} +0 -0
  198. /package/dist/{__synced__/types/components/dropdown.synced.js → experimental/testing/__tests__/isMatch.spec.d.ts} +0 -0
  199. /package/dist/{__synced__/types/components/empty-state.synced.js → experimental/testing/__tests__/logger.spec.d.ts} +0 -0
  200. /package/dist/{__synced__/types/components/error-state.synced.js → experimental/testing/__tests__/maybeFind.spec.d.ts} +0 -0
  201. /package/dist/{__synced__/types/components/form.synced.js → experimental/testing/__tests__/maybeFindByTestId.spec.d.ts} +0 -0
  202. /package/dist/{__synced__/types/components/heading.synced.js → experimental/testing/__tests__/maybeFindChild.spec.d.ts} +0 -0
  203. /package/dist/{__synced__/types/components/icon.synced.js → experimental/testing/__tests__/mocks.actions.spec.d.ts} +0 -0
  204. /package/dist/{__synced__/types/components/iframe.synced.js → experimental/testing/__tests__/mocks.context.spec.d.ts} +0 -0
  205. /package/dist/{__synced__/types/components/image.synced.js → experimental/testing/__tests__/mocks.runServerlessFunction.spec.d.ts} +0 -0
  206. /package/dist/{__synced__/types/components/index.synced.js → experimental/testing/__tests__/mocks.useAssociations.spec.d.ts} +0 -0
  207. /package/dist/{__synced__/types/components/inputs.synced.js → experimental/testing/__tests__/mocks.useCrmProperties.spec.d.ts} +0 -0
  208. /package/dist/{__synced__/types/components/layouts.synced.js → experimental/testing/__tests__/props.spec.d.ts} +0 -0
  209. /package/dist/{__synced__/types/components/link.synced.js → experimental/testing/__tests__/testId.spec.d.ts} +0 -0
  210. /package/dist/{__synced__/types/components/list.synced.js → experimental/testing/__tests__/trigger.spec.d.ts} +0 -0
  211. /package/dist/{__synced__/types/components/loading-spinner.synced.js → experimental/testing/__tests__/type-utils.spec.d.ts} +0 -0
  212. /package/dist/{__synced__/types/components/modal.synced.js → experimental/testing/__tests__/waitFor.spec.d.ts} +0 -0
  213. /package/dist/{__synced__/types/actions.synced.d.ts → shared/types/actions.d.ts} +0 -0
  214. /package/dist/{__synced__/types/components/panel.synced.js → shared/types/actions.js} +0 -0
  215. /package/dist/{__synced__/types/components/progress-bar.synced.js → shared/types/components/accordion.js} +0 -0
  216. /package/dist/{__synced__/types/components/selects.synced.js → shared/types/components/alert.js} +0 -0
  217. /package/dist/{__synced__/types/components/statistics.synced.js → shared/types/components/app-home-header-actions.js} +0 -0
  218. /package/dist/{__synced__/types/components/status-tag.synced.js → shared/types/components/button-row.js} +0 -0
  219. /package/dist/{__synced__/types/components/step-indicator.synced.js → shared/types/components/button.js} +0 -0
  220. /package/dist/{__synced__/types/components/table.synced.js → shared/types/components/card.js} +0 -0
  221. /package/dist/{__synced__/types/components/chart.synced.js → shared/types/components/chart.js} +0 -0
  222. /package/dist/{__synced__/types/components/tabs.synced.js → shared/types/components/description-list.js} +0 -0
  223. /package/dist/{__synced__/types/components/tag.synced.js → shared/types/components/divider.js} +0 -0
  224. /package/dist/{__synced__/types/components/text.synced.js → shared/types/components/dropdown.js} +0 -0
  225. /package/dist/{__synced__/types/components/tile.synced.js → shared/types/components/empty-state.js} +0 -0
  226. /package/dist/{__synced__/types/components/toggle.synced.js → shared/types/components/error-state.js} +0 -0
  227. /package/dist/{__synced__/types/components/toggleInputs.synced.js → shared/types/components/form.js} +0 -0
  228. /package/dist/{__synced__/types/components/tooltip.synced.js → shared/types/components/heading.js} +0 -0
  229. /package/dist/{__synced__/types/context.synced.js → shared/types/components/icon.js} +0 -0
  230. /package/dist/{__synced__/types/crm.synced.js → shared/types/components/iframe.js} +0 -0
  231. /package/dist/{__synced__/types/components/illustration.synced.js → shared/types/components/illustration.js} +0 -0
  232. /package/dist/{__synced__/types/reactions.synced.js → shared/types/components/image.js} +0 -0
  233. /package/dist/{__synced__/types/extension-points.synced.js → shared/types/extension-points.js} +0 -0
  234. /package/dist/{__synced__/types/http-requests.synced.js → shared/types/http-requests.js} +0 -0
  235. /package/dist/{__synced__/types/reactions.synced.d.ts → shared/types/reactions.d.ts} +0 -0
  236. /package/dist/{__synced__/types/shared.synced.js → shared/types/shared.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { TShirtSizes } from '../shared.synced';
3
- export interface PanelProps {
2
+ import { TShirtSizes, BaseComponentProps } from '../shared.ts';
3
+ export interface PanelProps extends BaseComponentProps {
4
4
  /**
5
5
  * Accessibility label.
6
6
  *
@@ -44,7 +44,7 @@ export interface PanelProps {
44
44
  */
45
45
  variant?: 'modal' | 'default';
46
46
  }
47
- export interface PanelSectionProps {
47
+ export interface PanelSectionProps extends BaseComponentProps {
48
48
  /**
49
49
  * When set to `true`, the section will have no bottom margin
50
50
  *
@@ -57,14 +57,14 @@ export interface PanelSectionProps {
57
57
  */
58
58
  children: ReactNode;
59
59
  }
60
- export interface PanelBodyProps {
60
+ export interface PanelBodyProps extends BaseComponentProps {
61
61
  /**
62
62
  * The main content of the body
63
63
  *
64
64
  */
65
65
  children: ReactNode;
66
66
  }
67
- export interface PanelFooterProps {
67
+ export interface PanelFooterProps extends BaseComponentProps {
68
68
  /**
69
69
  * The main content of the footer
70
70
  *
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,10 @@
1
+ import { BaseComponentProps } from '../shared.ts';
1
2
  /**
2
3
  * The props type for {@link !components.ProgressBar}.
3
4
  *
4
5
  * @category Component Props
5
6
  */
6
- export interface ProgressBarProps {
7
+ export interface ProgressBarProps extends BaseComponentProps {
7
8
  /**
8
9
  * The text that displays above the progress bar.
9
10
  *
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,9 @@
1
+ import { BaseComponentProps } from '../shared.ts';
1
2
  /**
2
3
  * Generic collection of props for select components
3
4
  * @internal
4
5
  * */
5
- export interface BaseSelectProps {
6
+ export interface BaseSelectProps extends BaseComponentProps {
6
7
  /**
7
8
  * The text that displays above to the dropdown menu.
8
9
  *
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
+ import { BaseComponentProps } from '../shared.ts';
2
3
  /**
3
4
  * The props type for {@link !components.StatisticsTrend}.
4
5
  *
5
6
  * @category Component Props
6
7
  */
7
- export interface StatisticsTrendProps {
8
+ export interface StatisticsTrendProps extends BaseComponentProps {
8
9
  /**
9
10
  * The text to be displayed as the trend value.
10
11
  */
@@ -25,7 +26,7 @@ export interface StatisticsTrendProps {
25
26
  *
26
27
  * @category Component Props
27
28
  */
28
- export interface StatisticsItemProps {
29
+ export interface StatisticsItemProps extends BaseComponentProps {
29
30
  /**
30
31
  * The unique identifier.
31
32
  */
@@ -48,7 +49,7 @@ export interface StatisticsItemProps {
48
49
  *
49
50
  * @category Component Props
50
51
  */
51
- export interface StatisticsProps {
52
+ export interface StatisticsProps extends BaseComponentProps {
52
53
  /**
53
54
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsItem}.
54
55
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
+ import { BaseComponentProps } from '../shared.ts';
2
3
  /**
3
4
  * The props type for {@link !components.StatusTag}.
4
5
  *
5
6
  * @category Component Props
6
7
  */
7
- export interface StatusTagProps {
8
+ export interface StatusTagProps extends BaseComponentProps {
8
9
  /**
9
10
  * The status tag's indicator color.
10
11
  *
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,10 @@
1
- import { AllSizes } from '../shared.synced';
1
+ import { AllSizes, BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for {@link !components.StepIndicator}.
4
4
  *
5
5
  * @category Component Props
6
6
  */
7
- export interface StepIndicatorProps {
7
+ export interface StepIndicatorProps extends BaseComponentProps {
8
8
  /**
9
9
  * An array containing the name of each step.
10
10
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,11 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
+ import { BaseComponentProps } from '../shared.ts';
2
3
  export interface AlignmentProps {
3
4
  align?: 'left' | 'center' | 'right';
4
5
  }
5
6
  export interface WidthProps {
6
7
  width?: 'min' | 'max' | 'auto' | number;
7
8
  }
8
- export interface TableElementProps {
9
+ export interface TableElementProps extends BaseComponentProps {
9
10
  children: ReactNode;
10
11
  }
11
12
  /**
@@ -14,10 +15,10 @@ export interface TableElementProps {
14
15
  *
15
16
  * @interface
16
17
  */
17
- export type BaseTableHeaderProps = TableElementProps & AlignmentProps & WidthProps;
18
+ export type BaseTableHeaderProps = TableElementProps & AlignmentProps & WidthProps & BaseComponentProps;
18
19
  export type TableCellProps = TableElementProps & AlignmentProps & WidthProps & {
19
20
  colSpan?: number;
20
- };
21
+ } & BaseComponentProps;
21
22
  /**
22
23
  * The props type for {@link !components.TableHeader} when sorted === never.
23
24
  *
@@ -59,7 +60,7 @@ export interface SortedTableHeaderProps extends BaseTableHeaderProps {
59
60
  * @category Component Props
60
61
  */
61
62
  export type TableHeaderProps = SortedTableHeaderProps | UnSortedTableHeaderProps;
62
- interface BaseTableProps {
63
+ interface BaseTableProps extends BaseComponentProps {
63
64
  /**
64
65
  * When set to false, the table will not have borders.
65
66
  *
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- export interface TabsProps {
2
+ import { BaseComponentProps } from '../shared.ts';
3
+ export interface TabsProps extends BaseComponentProps {
3
4
  /**
4
5
  * Sets the content that will render inside the component.
5
6
  */
@@ -26,7 +27,7 @@ export interface TabsProps {
26
27
  */
27
28
  fill?: boolean;
28
29
  }
29
- export interface TabProps {
30
+ export interface TabProps extends BaseComponentProps {
30
31
  /**
31
32
  * Whether the tab is disabled.
32
33
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
- import { OverlayComponentProps, ExtensionEvent } from '../shared.synced';
3
- import { ReactionsHandler } from '../reactions.synced';
2
+ import { OverlayComponentProps, ExtensionEvent, BaseComponentProps } from '../shared.ts';
3
+ import { ReactionsHandler } from '../reactions.ts';
4
4
  /**
5
5
  * The props type for {@link !components.Tag}.
6
6
  *
7
7
  * @category Component Props
8
8
  */
9
- export interface TagProps extends OverlayComponentProps {
9
+ export interface TagProps extends OverlayComponentProps, BaseComponentProps {
10
10
  /**
11
11
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
12
12
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { BaseComponentProps } from '../shared.ts';
2
3
  /**
3
4
  * @internal
4
5
  * Format options for text component.
@@ -90,4 +91,4 @@ export type TextProps = {
90
91
  * @defaultValue `false`
91
92
  */
92
93
  truncate?: boolean | TruncateOptions;
93
- };
94
+ } & BaseComponentProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
+ import { BaseComponentProps } from '../shared.ts';
2
3
  /**
3
4
  * The props type for {@link !components.Tile}.
4
5
  *
5
6
  * @category Component Props
6
7
  */
7
- export interface TileProps {
8
+ export interface TileProps extends BaseComponentProps {
8
9
  /**
9
10
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
10
11
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,10 @@
1
- import { TShirtSizes } from '../shared.synced';
1
+ import { TShirtSizes, BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for {@link !components.Toggle}.
4
4
  *
5
5
  * @category Component Props
6
6
  */
7
- export interface ToggleProps {
7
+ export interface ToggleProps extends BaseComponentProps {
8
8
  /**
9
9
  * The current status of the input.
10
10
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
1
+ import { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for {@link !components.Checkbox}.
4
4
  *
5
5
  * @category Component Props
6
6
  */
7
- export interface CheckboxProps {
7
+ export interface CheckboxProps extends BaseComponentProps {
8
8
  /**
9
9
  * A string representing the value of the input. This is not displayed on the client-side,
10
10
  * but on the server this is the value given to the data submitted with the checkbox's name.
@@ -74,7 +74,7 @@ export type ToggleGroupOption = {
74
74
  /** The string that displays below the toggle. */
75
75
  description?: string;
76
76
  };
77
- interface ToggleGroupListBaseProps {
77
+ interface ToggleGroupListBaseProps extends BaseComponentProps {
78
78
  name: ToggleGroupProps['name'];
79
79
  options: ToggleGroupProps['options'];
80
80
  variant: ToggleGroupProps['variant'];
@@ -89,7 +89,7 @@ export interface RadioButtonListProps extends ToggleGroupListBaseProps {
89
89
  onChange?: RadioButtonGroupProps['onChange'];
90
90
  }
91
91
  type ToggleType = 'checkboxList' | 'radioButtonList';
92
- export interface CommonGroupProps {
92
+ export interface CommonGroupProps extends BaseComponentProps {
93
93
  /**
94
94
  * Denotes the type of list to render.
95
95
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- export interface TooltipProps {
2
+ import { BaseComponentProps } from '../shared.ts';
3
+ export interface TooltipProps extends BaseComponentProps {
3
4
  /**
4
5
  * Sets the content to render on the screen, and serves as the trigger for the tooltip. This prop is passed implicitly by providing sub-components.
5
6
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import type { ExtensionPoints } from './extension-points.synced';
1
+ import type { ExtensionPoints } from './extension-points.ts';
2
2
  /** @ignore */
3
3
  interface Team {
4
4
  id: number;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,18 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
- import { TShirtSizes } from './shared.synced';
2
+ import { TShirtSizes, BaseComponentProps } from './shared.ts';
3
3
  /** @ignore */
4
- export interface CrmDataHighlightProps {
4
+ export interface CrmDataHighlightProps extends BaseComponentProps {
5
5
  properties: Array<string>;
6
6
  objectTypeId?: string;
7
7
  objectId?: number;
8
8
  }
9
9
  /** @ignore */
10
- export interface CrmReportProps {
10
+ export interface CrmReportProps extends BaseComponentProps {
11
11
  reportId: string;
12
12
  use?: 'associations' | 'subject' | 'unfiltered';
13
13
  }
14
14
  /** @ignore */
15
- export interface CrmPropertyListProps {
15
+ export interface CrmPropertyListProps extends BaseComponentProps {
16
16
  properties: Array<string>;
17
17
  direction?: string;
18
18
  objectTypeId?: string;
@@ -32,7 +32,7 @@ interface CrmSearchFilter {
32
32
  property: string;
33
33
  }
34
34
  /** @ignore */
35
- export interface CrmAssociationTableProps {
35
+ export interface CrmAssociationTableProps extends BaseComponentProps {
36
36
  objectTypeId: string;
37
37
  propertyColumns: Array<string>;
38
38
  quickFilterProperties?: Array<string>;
@@ -44,7 +44,7 @@ export interface CrmAssociationTableProps {
44
44
  sort?: Array<CrmSortDescriptor>;
45
45
  }
46
46
  /** @ignore */
47
- export interface CrmAssociationPivotProps {
47
+ export interface CrmAssociationPivotProps extends BaseComponentProps {
48
48
  objectTypeId: string;
49
49
  associationLabels?: Array<string>;
50
50
  maxAssociations?: number;
@@ -52,7 +52,7 @@ export interface CrmAssociationPivotProps {
52
52
  sort?: Array<CrmSortDescriptor>;
53
53
  }
54
54
  /** @ignore */
55
- export interface CrmAssociationStageTrackerProps {
55
+ export interface CrmAssociationStageTrackerProps extends BaseComponentProps {
56
56
  objectTypeId: string;
57
57
  properties: Array<string>;
58
58
  associationLabels?: Array<string>;
@@ -61,7 +61,7 @@ export interface CrmAssociationStageTrackerProps {
61
61
  sort?: Array<CrmSortDescriptor>;
62
62
  }
63
63
  /** @ignore */
64
- export interface CrmSimpleDeadlineProps {
64
+ export interface CrmSimpleDeadlineProps extends BaseComponentProps {
65
65
  endDatePropertyName: string;
66
66
  properties: Array<string>;
67
67
  progressTheme?: ProgressTheme;
@@ -100,7 +100,7 @@ interface PercentileMetricItem extends BaseCrmStatisticItem {
100
100
  /** @ignore */
101
101
  type CrmStatisticItem = BasicMetricItem | PercentileMetricItem;
102
102
  /** @ignore */
103
- export interface CrmStatisticsProps {
103
+ export interface CrmStatisticsProps extends BaseComponentProps {
104
104
  objectTypeId: string;
105
105
  statistics: Array<CrmStatisticItem>;
106
106
  }
@@ -116,14 +116,14 @@ interface Gradient {
116
116
  endColor: string;
117
117
  }
118
118
  /** @ignore */
119
- export interface CrmStageTrackerProps {
119
+ export interface CrmStageTrackerProps extends BaseComponentProps {
120
120
  objectId?: number;
121
121
  objectTypeId?: string;
122
122
  properties: Array<string>;
123
123
  showProperties?: boolean;
124
124
  }
125
125
  /** @ignore */
126
- export interface CrmAssociationPropertyListProps {
126
+ export interface CrmAssociationPropertyListProps extends BaseComponentProps {
127
127
  objectTypeId: string;
128
128
  properties: Array<string>;
129
129
  associationLabels?: Array<string>;
@@ -197,7 +197,7 @@ interface ActionArgs {
197
197
  export type ArgsFor<SpecificActionType extends ActionType> = ActionArgs[SpecificActionType];
198
198
  export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'ADD_TASK' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_CREATOR_FORM' | 'OPEN_RECORD_ASSOCIATION_FORM' | 'ENGAGEMENT_APP_LINK' | 'RECORD_APP_LINK' | 'PAGE_APP_LINK' | 'EXTERNAL_URL' | 'OPEN_WORKFLOW_ENROLLMENT_MODAL';
199
199
  /** @ignore */
200
- interface BaseActionComponent {
200
+ interface BaseActionComponent extends BaseComponentProps {
201
201
  children: ReactNode;
202
202
  actionType: ActionType;
203
203
  actionContext: ArgsFor<ActionType>;
@@ -241,7 +241,7 @@ type ErrorHandler = (errors: string[]) => void;
241
241
  /** @ignore */
242
242
  type CardActionConfig = ActionLibraryButtonCardActionConfig | DropdownCardActionConfig;
243
243
  /** @ignore */
244
- export type CrmCardActionsProps = {
244
+ export type CrmCardActionsProps = BaseComponentProps & {
245
245
  actionConfigs: Array<CardActionConfig>;
246
246
  onError?: ErrorHandler;
247
247
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { RemoteFragment } from '@remote-ui/core';
3
- import type { AllDistances, ExtensionEvent } from '../types/shared.synced';
4
- import type { ReactionsHandler } from '../types/reactions.synced';
2
+ import type { ReactionsHandler } from './reactions.ts';
3
+ import type { AllDistances, ExtensionEvent, BaseComponentProps } from './shared.ts';
5
4
  /**
6
5
  * @ignore
7
6
  * @experimental do not use in production
8
7
  */
9
- interface BaseLayout {
8
+ interface BaseLayout extends BaseComponentProps {
10
9
  fullWidth?: boolean;
11
10
  fullHeight?: boolean;
12
11
  }
@@ -42,21 +41,21 @@ export interface CenterProps extends BaseLayout {
42
41
  * @ignore
43
42
  * @experimental
44
43
  */
45
- export interface MediaObjectProps {
44
+ export interface MediaObjectProps extends BaseComponentProps {
46
45
  align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
47
46
  spacing?: 'none' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
48
47
  children?: ReactNode;
49
- itemLeft?: RemoteFragment;
50
- itemRight?: RemoteFragment;
48
+ itemLeft?: ReactNode;
49
+ itemRight?: ReactNode;
51
50
  }
52
- export interface GridProps {
51
+ export interface GridProps extends BaseComponentProps {
53
52
  justify?: FlexJustify;
54
53
  align?: FlexAlign;
55
54
  gap?: AllDistances;
56
55
  size?: number;
57
56
  children?: ReactNode;
58
57
  }
59
- export interface GridItemProps {
58
+ export interface GridItemProps extends BaseComponentProps {
60
59
  size?: number;
61
60
  children?: ReactNode;
62
61
  offset?: number;
@@ -65,7 +64,7 @@ export interface GridItemProps {
65
64
  * @ignore
66
65
  * @experimental do not use in production
67
66
  */
68
- export interface SettingsViewProps {
67
+ export interface SettingsViewProps extends BaseComponentProps {
69
68
  /**
70
69
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
71
70
  */
@@ -97,7 +96,7 @@ export interface SettingsViewProps {
97
96
  * @ignore
98
97
  * @experimental do not use in production
99
98
  */
100
- export interface ExpandableTextProps {
99
+ export interface ExpandableTextProps extends BaseComponentProps {
101
100
  children: ReactNode;
102
101
  maxHeight?: number;
103
102
  expandButtonText?: string;
@@ -108,7 +107,7 @@ export interface ExpandableTextProps {
108
107
  * @ignore
109
108
  * @experimental do not use in production
110
109
  */
111
- export interface PopoverProps {
110
+ export interface PopoverProps extends BaseComponentProps {
112
111
  /**
113
112
  * A unique ID for the popover. Used to identify the popover in the overlay system.
114
113
  *
@@ -147,7 +146,7 @@ export interface PopoverProps {
147
146
  * @ignore
148
147
  * @experimental do not use in production
149
148
  */
150
- export interface FileInputProps {
149
+ export interface FileInputProps extends BaseComponentProps {
151
150
  value?: File | {
152
151
  name: string;
153
152
  };
@@ -235,7 +234,3 @@ export interface BaseInputProps<T = string, V = string> {
235
234
  onFocus?: (value: V) => void;
236
235
  }
237
236
  export {};
238
- /**
239
- * @ignore
240
- * @experimental do not use in production
241
- */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ReactElement } from 'react';
2
+ import { ExtensionPointApi, ExtensionPoints } from './extension-points.ts';
3
+ export type RenderExtensionCallback<TExtensionPointName extends keyof ExtensionPoints> = (api: ExtensionPointApi<TExtensionPointName>) => ReactElement<any>;
4
+ export type HubspotExtendFunction = <TExtensionPointName extends keyof ExtensionPoints>(renderExtensionCallback: RenderExtensionCallback<TExtensionPointName>) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,10 @@
1
1
  import { ComponentType } from 'react';
2
- import { TypesOfReadOnlyArray } from './shared.synced';
3
- import type { AppHomeContext, BaseContext, CrmContext } from './context.synced';
4
- import type { AppHomeActions, CrmHostActions, SettingsActions, UiePlatformActions } from './actions.synced';
5
- import type { CrmPropertyListProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmReportProps, CrmAssociationPivotProps, CrmAssociationPropertyListProps, CrmAssociationStageTrackerProps, CrmSimpleDeadlineProps, CrmRelativeTimelineProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from './crm.synced';
6
- import type { SettingsContext, GenericContext } from './context.synced';
7
- import type { ServerlessFuncRunner } from './http-requests.synced';
2
+ import { TypesOfReadOnlyArray } from './shared.ts';
3
+ import type { AppHomeContext, BaseContext, CrmContext } from './context.ts';
4
+ import type { AppHomeActions, CrmHostActions, SettingsActions, UiePlatformActions } from './actions.ts';
5
+ import type { CrmPropertyListProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmReportProps, CrmAssociationPivotProps, CrmAssociationPropertyListProps, CrmAssociationStageTrackerProps, CrmSimpleDeadlineProps, CrmRelativeTimelineProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from './crm.ts';
6
+ import type { SettingsContext, GenericContext } from './context.ts';
7
+ import type { ServerlessFuncRunner } from './http-requests.ts';
8
8
  /** @ignore */
9
9
  export type ExtensionPointAction = (...args: any[]) => Promise<any> | void;
10
10
  /** @ignore */
@@ -109,14 +109,22 @@ interface LocationToExtensionPoint {
109
109
  * the single source of truth for defining all locations.
110
110
  */
111
111
  type _ExtensionPoints = {
112
- [key in ExtensionPointLocation]: LocationToExtensionPoint[key];
112
+ [TExtensionPointLocation in ExtensionPointLocation]: LocationToExtensionPoint[TExtensionPointLocation];
113
113
  };
114
114
  export interface ExtensionPoints extends _ExtensionPoints {
115
115
  }
116
116
  /** @ignore */
117
- export interface ExtensionPointApi<ExtensionPointName extends keyof ExtensionPoints> {
117
+ export interface ExtensionPointApi<TExtensionPointLocation extends ExtensionPointLocation> {
118
118
  runServerlessFunction: ServerlessFuncRunner;
119
- actions: ExtensionPoints[ExtensionPointName]['actions'];
120
- context: ExtensionPoints[ExtensionPointName]['context'];
119
+ actions: ExtensionPoints[TExtensionPointLocation]['actions'];
120
+ context: ExtensionPoints[TExtensionPointLocation]['context'];
121
121
  }
122
+ /**
123
+ * The actions of the extension point API.
124
+ */
125
+ export type ExtensionPointApiActions<TExtensionPointLocation extends ExtensionPointLocation> = ExtensionPointApi<TExtensionPointLocation>['actions'];
126
+ /**
127
+ * The context of the extension point API.
128
+ */
129
+ export type ExtensionPointApiContext<TExtensionPointLocation extends ExtensionPointLocation> = ExtensionPointApi<TExtensionPointLocation>['context'];
122
130
  export {};
@@ -1,4 +1,4 @@
1
- import type { ExtensionPoints } from './extension-points.synced';
1
+ import type { ExtensionPoints } from './extension-points.ts';
2
2
  export interface HubSpotFetchOptions {
3
3
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
4
4
  timeout?: number;
@@ -0,0 +1,8 @@
1
+ export type * from './components/index.ts';
2
+ export type * from './actions.ts';
3
+ export type * from './context.ts';
4
+ export type * from './crm.ts';
5
+ export type * from './extension-points.ts';
6
+ export type * from './http-requests.ts';
7
+ export type * from './reactions.ts';
8
+ export * from './shared.ts';
@@ -0,0 +1 @@
1
+ export * from "./shared.js"; // NOTE: `shared.ts` has some exported classes so we can't use `export type` for now
@@ -0,0 +1,7 @@
1
+ export type LogData = string | number;
2
+ export interface Logger {
3
+ debug: (data: LogData) => void;
4
+ info: (data: LogData) => void;
5
+ warn: (data: LogData) => void;
6
+ error: (data: LogData) => void;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -194,3 +194,6 @@ export declare class RemoteEvent<V> {
194
194
  targetValue: V;
195
195
  constructor(value: V, event: Event);
196
196
  }
197
+ export interface BaseComponentProps {
198
+ testId?: string;
199
+ }
@@ -0,0 +1,17 @@
1
+ import { Logger } from './logger.ts';
2
+ import { HubspotExtendFunction } from './extend.ts';
3
+ export interface WorkerGlobalsInternal {
4
+ /**
5
+ * A marker that the current global is a HubSpot extension worker.
6
+ */
7
+ __HUBSPOT_EXTENSION_WORKER__?: boolean;
8
+ /**
9
+ * A logger for the current worker.
10
+ */
11
+ logger: Logger;
12
+ /**
13
+ * A global function in worker globals that is used to extend the current worker with a new extension point.
14
+ * NOTE: `extend_V2` is used internally by `hubspot.extend` (where `hubspot` is imported from `@hubspot/ui-extensions`).
15
+ */
16
+ extend_V2: HubspotExtendFunction;
17
+ }
@@ -0,0 +1 @@
1
+ export {};