@phis/ui 0.7.8 → 0.8.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 (311) hide show
  1. package/components/controls/phi-address-control.d.ts +23 -0
  2. package/components/controls/phi-address-control.js +43 -0
  3. package/components/controls/phi-color-control.d.ts +3 -1
  4. package/components/controls/phi-color-control.js +2 -2
  5. package/components/controls/phi-country-select-control.d.ts +22 -0
  6. package/components/controls/phi-country-select-control.js +16 -0
  7. package/components/controls/phi-dialog-control.d.ts +1 -1
  8. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  9. package/components/controls/phi-drawer-control-adapter.js +5 -3
  10. package/components/controls/phi-drawer-control.d.ts +7 -5
  11. package/components/controls/phi-float-button-control.d.ts +8 -1
  12. package/components/controls/phi-float-button-control.js +19 -3
  13. package/components/controls/phi-form-control.js +52 -8
  14. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  15. package/components/controls/phi-modal-control-adapter.js +14 -37
  16. package/components/controls/phi-modal-control.d.ts +5 -5
  17. package/components/controls/phi-options-provider.d.ts +1 -0
  18. package/components/controls/phi-options-provider.js +1 -0
  19. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  20. package/components/controls/phi-overlay-control-contract.js +55 -30
  21. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  22. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  23. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  24. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  25. package/components/forms/flags-field.d.ts +22 -0
  26. package/components/forms/flags-field.js +58 -0
  27. package/components/forms/form-option-flags.d.ts +20 -0
  28. package/components/forms/form-option-flags.js +38 -0
  29. package/components/forms/form-provider-contract.d.ts +23 -0
  30. package/components/forms/form-provider-contract.js +36 -0
  31. package/components/forms/form-provider-registry.d.ts +5 -1
  32. package/components/forms/shared-form-provider-registry.js +13 -0
  33. package/components/forms/structured-field-labels.d.ts +24 -0
  34. package/components/forms/structured-field-labels.js +43 -0
  35. package/components/forms/structured-form-field-controls.d.ts +12 -0
  36. package/components/forms/structured-form-field-controls.js +65 -0
  37. package/components/overlays/phi-overlay-container-client.js +2 -2
  38. package/components/regions/phi-cms-region-shell.js +2 -2
  39. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  40. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
  41. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  42. package/components/root/phi-root-theme-resolver.js +3 -0
  43. package/components/shell/phi-antd-icon.d.ts +1 -8
  44. package/components/shell/phi-antd-icon.js +1 -227
  45. package/components/shell/phi-icon-names.d.ts +19 -0
  46. package/components/shell/phi-icon-names.js +264 -0
  47. package/components/shell/phi-icon.d.ts +2 -11
  48. package/components/shell/phi-icon.js +4 -32
  49. package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
  50. package/components/widgets/client/shared/phi-command-buttons.js +10 -4
  51. package/components/widgets/client/shared/phi-rendered-value.js +27 -3
  52. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  53. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  54. package/components/widgets/config/background.d.ts +3 -2
  55. package/components/widgets/config/choice-shared.d.ts +10 -1
  56. package/components/widgets/config/choice-shared.js +8 -2
  57. package/components/widgets/label-sets/admin-locales.js +1 -1
  58. package/components/widgets/label-sets/admin-users.d.ts +2 -5
  59. package/components/widgets/label-sets/admin-users.js +4 -10
  60. package/components/widgets/label-sets/effects.js +2 -4
  61. package/components/widgets/label-sets/profile.d.ts +13 -0
  62. package/components/widgets/label-sets/profile.js +28 -0
  63. package/components/widgets/label-sets/search-results.js +2 -4
  64. package/components/widgets/label-sets/table.js +9 -0
  65. package/components/widgets/label-types/effects.d.ts +3 -2
  66. package/components/widgets/label-types/effects.js +1 -2
  67. package/components/widgets/label-types/search-results.d.ts +2 -2
  68. package/components/widgets/label-types/search-results.js +1 -2
  69. package/components/widgets/label-types/table.d.ts +3 -0
  70. package/components/widgets/label-types/table.js +2 -0
  71. package/components/widgets/server/builder-chrome.d.ts +4 -1
  72. package/components/widgets/server/builder-chrome.js +2 -2
  73. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  74. package/components/widgets/shared/markdown-body-client.js +31 -1
  75. package/components/widgets/shared/markdown-render.d.ts +10 -2
  76. package/components/widgets/shared/markdown-render.js +35 -13
  77. package/constants/countries.d.ts +9 -0
  78. package/constants/countries.js +28 -0
  79. package/constants/customer-file.d.ts +25 -0
  80. package/constants/customer-file.js +26 -0
  81. package/constants/record-field-kinds.d.ts +15 -0
  82. package/constants/record-field-kinds.js +13 -0
  83. package/constants/runtime-module-ownership.js +12 -0
  84. package/constants/runtime-render-client-types.d.ts +5 -0
  85. package/constants/runtime-render-client-types.js +5 -0
  86. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  87. package/constants.d.ts +1 -0
  88. package/constants.js +2 -0
  89. package/gateway/form-handler-request.d.ts +22 -0
  90. package/gateway/form-handler-request.js +40 -0
  91. package/gateway/label-set.d.ts +15 -2
  92. package/gateway/label-set.js +60 -22
  93. package/gateway/site-form-route.js +11 -2
  94. package/helpers/address-field.d.ts +43 -0
  95. package/helpers/address-field.js +68 -0
  96. package/helpers/cms-dialog.d.ts +5 -20
  97. package/helpers/cms-dialog.js +8 -13
  98. package/helpers/cms-page-catalog.d.ts +10 -0
  99. package/helpers/cms-page-catalog.js +19 -0
  100. package/helpers/cms-preset-nodes.d.ts +4 -4
  101. package/helpers/cms-preset-nodes.js +1 -1
  102. package/helpers/cms-region-keys.d.ts +1 -1
  103. package/helpers/country-names.d.ts +12 -0
  104. package/helpers/country-names.js +14 -0
  105. package/helpers/phi-metadata.d.ts +33 -1
  106. package/helpers/phi-metadata.js +62 -1
  107. package/helpers/preset-table-check.d.ts +34 -0
  108. package/helpers/preset-table-check.js +124 -0
  109. package/helpers/preset-text-source-check.d.ts +4 -1
  110. package/helpers/preset-text-source-check.js +6 -1
  111. package/helpers/preset-tree-contract-check.d.ts +3 -2
  112. package/helpers/preset-tree-contract-check.js +30 -5
  113. package/helpers/public-route-claims.d.ts +9 -1
  114. package/helpers/public-route-claims.js +23 -3
  115. package/helpers/record-fields.d.ts +1 -5
  116. package/helpers/record-fields.js +15 -6
  117. package/helpers/route-address-check.d.ts +22 -2
  118. package/helpers/route-address-check.js +29 -8
  119. package/helpers/site-address-row.d.ts +23 -0
  120. package/helpers/site-address-row.js +36 -0
  121. package/helpers/surface-style.d.ts +8 -1
  122. package/helpers/surface-style.js +12 -2
  123. package/helpers/thread-inbox-row.d.ts +20 -0
  124. package/helpers/thread-inbox-row.js +26 -0
  125. package/helpers/translation-format.d.ts +26 -0
  126. package/helpers/translation-format.js +31 -0
  127. package/module-labels.d.ts +1 -1
  128. package/module-labels.js +1 -1
  129. package/module-page-check.d.ts +1 -0
  130. package/module-page-check.js +1 -0
  131. package/module-records.d.ts +2 -2
  132. package/module-records.js +1 -0
  133. package/next/area-route.js +34 -1
  134. package/next/root-route.js +4 -5
  135. package/package.json +2 -2
  136. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  137. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  138. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  139. package/plugins/runtime-modules/accounting/ids.d.ts +11 -0
  140. package/plugins/runtime-modules/accounting/ids.js +23 -0
  141. package/plugins/runtime-modules/accounting/presets.js +32 -5
  142. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
  143. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -0
  144. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  145. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +26 -0
  146. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -0
  147. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  148. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  149. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  150. package/plugins/runtime-modules/app/data-providers.d.ts +98 -0
  151. package/plugins/runtime-modules/app/data-providers.js +80 -0
  152. package/plugins/runtime-modules/app/definition.d.ts +131 -0
  153. package/plugins/runtime-modules/app/definition.js +2 -0
  154. package/plugins/runtime-modules/app/forms.d.ts +46 -1
  155. package/plugins/runtime-modules/app/forms.js +195 -1
  156. package/plugins/runtime-modules/app/ids.d.ts +7 -0
  157. package/plugins/runtime-modules/app/ids.js +8 -0
  158. package/plugins/runtime-modules/app/module.d.ts +131 -0
  159. package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
  160. package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
  161. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
  162. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
  163. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
  164. package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
  165. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
  166. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
  167. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
  168. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  169. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  170. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  171. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  172. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  173. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  174. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  175. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  176. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  177. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  178. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  179. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
  180. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  181. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  182. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  183. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  184. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  185. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  186. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
  187. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  188. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  189. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  190. package/plugins/runtime-modules/builder/persistence.js +4 -0
  191. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  192. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
  193. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
  194. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  195. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  196. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  197. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  198. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  199. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  200. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  201. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  202. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  203. package/plugins/runtime-modules/contracts.js +31 -1
  204. package/plugins/runtime-modules/core/definition.d.ts +23 -0
  205. package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
  206. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  207. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  208. package/plugins/runtime-modules/core/widgets/card/config.d.ts +0 -1
  209. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  210. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  211. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  212. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  213. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  214. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  215. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  216. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  217. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  218. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  219. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  220. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  221. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  222. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  223. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  224. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  225. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  226. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  227. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  228. package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
  229. package/plugins/runtime-modules/core/widgets/table/config.js +6 -0
  230. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  231. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  232. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  233. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  234. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  235. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  236. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  237. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  238. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  239. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  240. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  241. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -2
  242. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  243. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  244. package/plugins/runtime-modules/resolver.js +17 -0
  245. package/plugins/runtime-modules/revisions/controller/client.js +13 -11
  246. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  247. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  248. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  249. package/plugins/runtime-modules/revisions/services/table.js +13 -4
  250. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
  251. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  252. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  253. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
  254. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  255. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  256. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  257. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  258. package/plugins/runtime-modules/threads/controller/definition.js +1 -1
  259. package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
  260. package/plugins/runtime-modules/threads/data-providers.js +85 -0
  261. package/plugins/runtime-modules/threads/definition.d.ts +115 -2
  262. package/plugins/runtime-modules/threads/definition.js +1 -1
  263. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  264. package/plugins/runtime-modules/threads/ids.js +3 -0
  265. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
  266. package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -0
  267. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  268. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  269. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  270. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  271. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  272. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  273. package/plugins/runtime-modules/user-management/ids.js +9 -0
  274. package/plugins/runtime-modules/user-management/presets.js +17 -1
  275. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  276. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  277. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +86 -0
  278. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -0
  279. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  280. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +166 -0
  281. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -18
  282. package/server-helpers/cms-page-record.d.ts +9 -1
  283. package/server-helpers/cms-page-record.js +11 -1
  284. package/server-helpers/cms-request.js +8 -5
  285. package/server-helpers/link-preview-image.d.ts +30 -0
  286. package/server-helpers/link-preview-image.js +57 -0
  287. package/server-helpers/search-text.js +3 -0
  288. package/server-helpers.d.ts +1 -1
  289. package/server-helpers.js +1 -1
  290. package/styles/shell.css +30 -6
  291. package/theme/phi-theme-composition.js +9 -0
  292. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  293. package/theme/phi-theme-inverse-ground.js +103 -0
  294. package/theme/phi-theme-tokens.d.ts +2 -1
  295. package/theme/phi-theme-tokens.js +2 -0
  296. package/types/cms-module-descriptors.d.ts +14 -0
  297. package/types/cms-overlay.d.ts +13 -6
  298. package/types/cms-overlay.js +6 -22
  299. package/types/cms-plugins.d.ts +14 -2
  300. package/types/cms.d.ts +10 -0
  301. package/types/core-widget-placements.d.ts +3 -3
  302. package/types/link-preview.d.ts +19 -0
  303. package/types/link-preview.js +19 -0
  304. package/types/record-provider.d.ts +22 -1
  305. package/types/site-theme.d.ts +27 -0
  306. package/types/table-embed.d.ts +48 -0
  307. package/types/table-embed.js +1 -0
  308. package/types/table-widget.d.ts +14 -0
  309. package/types/widget-runtime.d.ts +3 -0
  310. package/types.d.ts +1 -0
  311. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
2
+ import { createPhiSharedRuntimeDataProviderKey } from "../../../constants/runtime-data-provider-key";
2
3
  export const PHI_APP_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/app`;
3
4
  /**
4
5
  * The Module's identity as its Label Sets inherit it (`definePhiRuntimeModuleLabelSet`): the id and,
@@ -9,3 +10,10 @@ export const PHI_APP_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/app
9
10
  export const PHI_APP_RUNTIME_MODULE_IDENTITY = {
10
11
  moduleId: PHI_APP_RUNTIME_MODULE_ID,
11
12
  };
13
+ /**
14
+ * The signed-in person's own addresses on this Site (phis-server `GET /api/site/account/addresses`,
15
+ * `users:v1`), as the account lists, adds, changes and removes them.
16
+ */
17
+ export const PHI_APP_ADDRESSES_DATA_PROVIDER_KEY = createPhiSharedRuntimeDataProviderKey("tables", "app-addresses");
18
+ /** The one resource the addresses Provider answers. */
19
+ export const PHI_APP_ADDRESSES_RESOURCE_KEY = "addresses";
@@ -9,6 +9,95 @@ export declare const PHI_APP_RUNTIME_MODULE: {
9
9
  description: string;
10
10
  icon: string;
11
11
  serverBinding: import("../../../types").PhiRuntimeModuleServerBinding;
12
+ dataProviders: {
13
+ key: `${string}/${string}`;
14
+ ownerModuleId: "@phis/ui/modules/app";
15
+ kind: "table";
16
+ executionMode: "live";
17
+ authoringMode: "none";
18
+ title: string;
19
+ description: string;
20
+ resources: {
21
+ resourceKey: string;
22
+ title: string;
23
+ rowIdentityPath: string;
24
+ recordRead: true;
25
+ fields: ({
26
+ key: string;
27
+ title: string;
28
+ type: "number";
29
+ required: true;
30
+ options?: undefined;
31
+ } | {
32
+ key: string;
33
+ title: string;
34
+ type: "string";
35
+ required?: undefined;
36
+ options?: undefined;
37
+ } | {
38
+ key: string;
39
+ title: string;
40
+ type: "enum[]";
41
+ options: {
42
+ value: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
43
+ label: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
44
+ }[];
45
+ required?: undefined;
46
+ } | {
47
+ key: string;
48
+ title: string;
49
+ type: "boolean";
50
+ required?: undefined;
51
+ options?: undefined;
52
+ } | {
53
+ key: string;
54
+ title: string;
55
+ type: "datetime";
56
+ required?: undefined;
57
+ options?: undefined;
58
+ } | {
59
+ key: string;
60
+ title: string;
61
+ type: "json";
62
+ required?: undefined;
63
+ options?: undefined;
64
+ } | {
65
+ key: string;
66
+ title: string;
67
+ type: "number";
68
+ required?: undefined;
69
+ options?: undefined;
70
+ })[];
71
+ query: {
72
+ search: false;
73
+ filterFields: never[];
74
+ sorting: "none";
75
+ pagination: "none";
76
+ };
77
+ actions: ({
78
+ key: string;
79
+ title: string;
80
+ scope: "row";
81
+ intent: "write";
82
+ disabledWhen: {
83
+ match: "any";
84
+ conditions: {
85
+ source: "row";
86
+ valuePath: string;
87
+ operator: "truthy";
88
+ }[];
89
+ };
90
+ confirmation?: undefined;
91
+ } | {
92
+ key: string;
93
+ title: string;
94
+ scope: "row";
95
+ intent: "destructive";
96
+ confirmation: "required";
97
+ disabledWhen?: undefined;
98
+ })[];
99
+ }[];
100
+ }[];
12
101
  formProviders: {
13
102
  handlers: ({
14
103
  key: `${string}/${string}`;
@@ -24,6 +113,48 @@ export declare const PHI_APP_RUNTIME_MODULE: {
24
113
  csrfPath: string;
25
114
  requiresCsrf: true;
26
115
  credentialPolicy: "site-session";
116
+ } | {
117
+ key: `${string}/${string}`;
118
+ ownerModuleId: "@phis/ui/modules/app";
119
+ title: string;
120
+ phase: "submit";
121
+ handlerKey: "site.app.profile-phone";
122
+ category: "site";
123
+ transport: "relay";
124
+ method: "PATCH";
125
+ endpointKey: null;
126
+ upstreamPath: string;
127
+ csrfPath: string;
128
+ requiresCsrf: true;
129
+ credentialPolicy: "site-session";
130
+ } | {
131
+ key: `${string}/${string}`;
132
+ ownerModuleId: "@phis/ui/modules/app";
133
+ title: string;
134
+ phase: "submit";
135
+ handlerKey: "site.app.address-create";
136
+ category: "site";
137
+ transport: "relay";
138
+ method: "POST";
139
+ endpointKey: null;
140
+ upstreamPath: string;
141
+ csrfPath: null;
142
+ requiresCsrf: false;
143
+ credentialPolicy: "site-session";
144
+ } | {
145
+ key: `${string}/${string}`;
146
+ ownerModuleId: "@phis/ui/modules/app";
147
+ title: string;
148
+ phase: "submit";
149
+ handlerKey: "site.app.address-edit";
150
+ category: "site";
151
+ transport: "relay";
152
+ method: "PUT";
153
+ endpointKey: null;
154
+ upstreamPath: string;
155
+ csrfPath: null;
156
+ requiresCsrf: false;
157
+ credentialPolicy: "site-session";
27
158
  } | {
28
159
  key: `${string}/${string}`;
29
160
  ownerModuleId: "@phis/ui/modules/app";
@@ -0,0 +1,135 @@
1
+ import { type PhiTableProviderMutationRequest, type PhiTableProviderQueryRequest, type PhiTableProviderRecordRequest } from "../../../../types/table-widget";
2
+ /** The account's own address book (phis-server `/api/site/account/addresses`). */
3
+ export declare const PHI_APP_ADDRESSES_PATH = "/api/site/account/addresses";
4
+ declare function queryAddresses({ resourceKey, signal }: PhiTableProviderQueryRequest): Promise<{
5
+ rows: {
6
+ createdAt: {} | null;
7
+ flags: number;
8
+ billing: boolean;
9
+ shipping: boolean;
10
+ defaultBilling: boolean;
11
+ defaultShipping: boolean;
12
+ address: {
13
+ [k: string]: string | null;
14
+ };
15
+ lines: string;
16
+ purposes: ("billing" | "shipping" | "defaultBilling" | "defaultShipping")[];
17
+ id: unknown;
18
+ }[];
19
+ total: number;
20
+ }>;
21
+ declare function readAddressRecord({ resourceKey, rowIdentity, signal }: PhiTableProviderRecordRequest): Promise<{
22
+ createdAt: {} | null;
23
+ flags: number;
24
+ billing: boolean;
25
+ shipping: boolean;
26
+ defaultBilling: boolean;
27
+ defaultShipping: boolean;
28
+ address: {
29
+ [k: string]: string | null;
30
+ };
31
+ lines: string;
32
+ purposes: ("billing" | "shipping" | "defaultBilling" | "defaultShipping")[];
33
+ id: unknown;
34
+ }>;
35
+ /** The request that gives a listed address the default it asks for, or throws where it has none listed. */
36
+ export declare function buildPhiAppAddressDefaultRequest(address: Record<string, unknown>, actionKey: "makeDefaultBilling" | "makeDefaultShipping"): {
37
+ address: {
38
+ [k: string]: {} | null;
39
+ };
40
+ flags: number;
41
+ };
42
+ declare function mutateAddresses(request: PhiTableProviderMutationRequest): Promise<{
43
+ status: "accepted";
44
+ invalidation: "view";
45
+ }>;
46
+ export declare const PHI_APP_ADDRESSES_TABLE_PROVIDER_REGISTRATION: {
47
+ key: `${string}/${string}`;
48
+ resources: {
49
+ resourceKey: string;
50
+ title: string;
51
+ rowIdentityPath: string;
52
+ recordRead: true;
53
+ fields: ({
54
+ key: string;
55
+ title: string;
56
+ type: "number";
57
+ required: true;
58
+ options?: undefined;
59
+ } | {
60
+ key: string;
61
+ title: string;
62
+ type: "string";
63
+ required?: undefined;
64
+ options?: undefined;
65
+ } | {
66
+ key: string;
67
+ title: string;
68
+ type: "enum[]";
69
+ options: {
70
+ value: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
71
+ label: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
72
+ }[];
73
+ required?: undefined;
74
+ } | {
75
+ key: string;
76
+ title: string;
77
+ type: "boolean";
78
+ required?: undefined;
79
+ options?: undefined;
80
+ } | {
81
+ key: string;
82
+ title: string;
83
+ type: "datetime";
84
+ required?: undefined;
85
+ options?: undefined;
86
+ } | {
87
+ key: string;
88
+ title: string;
89
+ type: "json";
90
+ required?: undefined;
91
+ options?: undefined;
92
+ } | {
93
+ key: string;
94
+ title: string;
95
+ type: "number";
96
+ required?: undefined;
97
+ options?: undefined;
98
+ })[];
99
+ query: {
100
+ search: false;
101
+ filterFields: never[];
102
+ sorting: "none";
103
+ pagination: "none";
104
+ };
105
+ actions: ({
106
+ key: string;
107
+ title: string;
108
+ scope: "row";
109
+ intent: "write";
110
+ disabledWhen: {
111
+ match: "any";
112
+ conditions: {
113
+ source: "row";
114
+ valuePath: string;
115
+ operator: "truthy";
116
+ }[];
117
+ };
118
+ confirmation?: undefined;
119
+ } | {
120
+ key: string;
121
+ title: string;
122
+ scope: "row";
123
+ intent: "destructive";
124
+ confirmation: "required";
125
+ disabledWhen?: undefined;
126
+ })[];
127
+ }[];
128
+ query: typeof queryAddresses;
129
+ readRecord: typeof readAddressRecord;
130
+ mutate: typeof mutateAddresses;
131
+ };
132
+ export declare const PhiAppAddressesTableProviderClient: import("react").ComponentType<{
133
+ children: import("react").ReactNode;
134
+ }>;
135
+ export {};
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { PhisSiteAddressFlags } from "@phis/contracts/users";
3
+ import { isPhiRecord } from "../../../../helpers/is-record";
4
+ import { createPhiTableProviderRequestInit, readPhiPositiveInteger, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
5
+ import { readPhiTableProviderResponse, } from "../../../../components/widgets/client/shared/phi-table-provider-response";
6
+ import { createPhiTableProviderClient, } from "../../../../components/widgets/client/shared/phi-table-provider";
7
+ import { PhiTableProviderError, } from "../../../../types/table-widget";
8
+ import { PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../data-providers";
9
+ import { PHI_APP_ADDRESSES_DATA_PROVIDER_KEY, PHI_APP_ADDRESSES_RESOURCE_KEY } from "../ids";
10
+ import { PHI_SITE_ADDRESS_TEXT_KEYS, toPhiSiteAddressRow } from "../../../../helpers/site-address-row";
11
+ /** The account's own address book (phis-server `/api/site/account/addresses`). */
12
+ export const PHI_APP_ADDRESSES_PATH = "/api/site/account/addresses";
13
+ const RESPONSE_OPTIONS = { subject: "Addresses" };
14
+ /*
15
+ * The addresses as the last list answered them, which a default is set from: Core takes an address equal in
16
+ * every part to a current one as that one, given the purposes and defaults asked besides, so setting a
17
+ * default sends the address again rather than writing a new version of it.
18
+ */
19
+ const listed = new Map();
20
+ function requireResource(resourceKey) {
21
+ if (resourceKey !== PHI_APP_ADDRESSES_RESOURCE_KEY) {
22
+ throw new PhiTableProviderError("resource-not-found", `Unknown addresses resource "${resourceKey}".`);
23
+ }
24
+ }
25
+ async function readAddresses(signal) {
26
+ const result = await readPhiTableProviderResponse(await fetch(PHI_APP_ADDRESSES_PATH, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
27
+ const items = readPhiTableRows(result?.items);
28
+ listed.clear();
29
+ for (const item of items) {
30
+ const id = readPhiPositiveInteger(item.id);
31
+ if (id)
32
+ listed.set(id, item);
33
+ }
34
+ return items;
35
+ }
36
+ async function queryAddresses({ resourceKey, signal }) {
37
+ requireResource(resourceKey);
38
+ const rows = (await readAddresses(signal)).map(toPhiSiteAddressRow);
39
+ return { rows, total: rows.length };
40
+ }
41
+ async function readAddressRecord({ resourceKey, rowIdentity, signal }) {
42
+ requireResource(resourceKey);
43
+ const id = readPhiPositiveInteger(rowIdentity);
44
+ const address = (await readAddresses(signal)).find((item) => item.id === id);
45
+ if (!id || !address) {
46
+ throw new PhiTableProviderError("record-not-found", "This address is no longer one of yours.");
47
+ }
48
+ return toPhiSiteAddressRow(address);
49
+ }
50
+ /** The request that gives a listed address the default it asks for, or throws where it has none listed. */
51
+ export function buildPhiAppAddressDefaultRequest(address, actionKey) {
52
+ const flags = typeof address.flags === "number" ? address.flags : 0;
53
+ const added = actionKey === "makeDefaultBilling"
54
+ ? PhisSiteAddressFlags.Billing | PhisSiteAddressFlags.DefaultBilling
55
+ : PhisSiteAddressFlags.Shipping | PhisSiteAddressFlags.DefaultShipping;
56
+ const writable = PhisSiteAddressFlags.Billing | PhisSiteAddressFlags.Shipping |
57
+ PhisSiteAddressFlags.DefaultBilling | PhisSiteAddressFlags.DefaultShipping;
58
+ return {
59
+ address: Object.fromEntries(PHI_SITE_ADDRESS_TEXT_KEYS.map((key) => [key, address[key] ?? null])),
60
+ flags: (flags & writable) | added,
61
+ };
62
+ }
63
+ async function mutateAddresses(request) {
64
+ requireResource(request.resourceKey);
65
+ if (request.kind !== "action") {
66
+ throw new PhiTableProviderError("mutation-not-supported", "Addresses are changed through their dialog, never in a cell.");
67
+ }
68
+ const id = readPhiPositiveInteger(request.rowIdentity);
69
+ if (!id)
70
+ throw new PhiTableProviderError("invalid-query", "An address id is required.");
71
+ const init = createPhiTableProviderRequestInit(request.signal);
72
+ if (request.actionKey === "delete") {
73
+ await readPhiTableProviderResponse(await fetch(`${PHI_APP_ADDRESSES_PATH}/${id}`, { ...init, method: "DELETE" }), RESPONSE_OPTIONS);
74
+ }
75
+ else if (request.actionKey === "makeDefaultBilling" || request.actionKey === "makeDefaultShipping") {
76
+ const address = listed.get(id);
77
+ if (!isPhiRecord(address))
78
+ throw new PhiTableProviderError("record-not-found", "This address is no longer listed.");
79
+ await readPhiTableProviderResponse(await fetch(PHI_APP_ADDRESSES_PATH, {
80
+ ...init,
81
+ method: "POST",
82
+ headers: { ...init.headers, "content-type": "application/json" },
83
+ body: JSON.stringify(buildPhiAppAddressDefaultRequest(address, request.actionKey)),
84
+ }), RESPONSE_OPTIONS);
85
+ }
86
+ else {
87
+ throw new PhiTableProviderError("action-not-supported", `Unsupported addresses action "${request.actionKey}".`);
88
+ }
89
+ // A default moves from the address that held it, and a removal takes a row: the view is read again.
90
+ return { status: "accepted", invalidation: "view" };
91
+ }
92
+ const resources = PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS
93
+ .find((descriptor) => descriptor.key === PHI_APP_ADDRESSES_DATA_PROVIDER_KEY)?.resources ?? [];
94
+ export const PHI_APP_ADDRESSES_TABLE_PROVIDER_REGISTRATION = {
95
+ key: PHI_APP_ADDRESSES_DATA_PROVIDER_KEY,
96
+ resources,
97
+ query: queryAddresses,
98
+ readRecord: readAddressRecord,
99
+ mutate: mutateAddresses,
100
+ };
101
+ export const PhiAppAddressesTableProviderClient = createPhiTableProviderClient(PHI_APP_ADDRESSES_TABLE_PROVIDER_REGISTRATION);
@@ -0,0 +1,17 @@
1
+ import type { PhiSettingsPageShellOverlay, PhiSettingsPageShellPanel } from "../../../../components/regions/presets/phi-settings-page-shell-tree";
2
+ import type { getPhiAppAddressesLabels } from "./addresses-label-set";
3
+ type Labels = Awaited<ReturnType<typeof getPhiAppAddressesLabels>>;
4
+ /**
5
+ * The account's addresses on the Profile page: one panel holding the Table, and the two dialogs it opens.
6
+ *
7
+ * Arranged as the Admin's provider installations are (the Settings shell's overlays): `+` in the Table's
8
+ * toolbar opens the add dialog, the row's pencil the change dialog, whose Form reads the row it was opened
9
+ * on; either Form's success reads the Table again. Removing and the two defaults are the Table's own
10
+ * Provider acts. An address is a row of a list somebody keeps, not a part of the page, so a panel per
11
+ * Form would describe things nobody is looking at.
12
+ */
13
+ export declare function buildPhiAccountAddressesPanel(labels: Labels, presetKey: string): {
14
+ panel: PhiSettingsPageShellPanel;
15
+ overlays: PhiSettingsPageShellOverlay[];
16
+ };
17
+ export {};
@@ -0,0 +1,179 @@
1
+ import { PHI_APP_ADDRESSES_DATA_PROVIDER_KEY, PHI_APP_ADDRESSES_RESOURCE_KEY, PHI_APP_RUNTIME_MODULE_ID } from "../ids";
2
+ import { PHI_APP_FORM_IDS } from "../forms";
3
+ import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-id";
4
+ import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress } from "../../../../types/signals";
5
+ import { PHI_DIALOG_WIDTH_SINGLE_COLUMN } from "../../../../helpers/cms-dialog";
6
+ /**
7
+ * The account's addresses on the Profile page: one panel holding the Table, and the two dialogs it opens.
8
+ *
9
+ * Arranged as the Admin's provider installations are (the Settings shell's overlays): `+` in the Table's
10
+ * toolbar opens the add dialog, the row's pencil the change dialog, whose Form reads the row it was opened
11
+ * on; either Form's success reads the Table again. Removing and the two defaults are the Table's own
12
+ * Provider acts. An address is a row of a list somebody keeps, not a part of the page, so a panel per
13
+ * Form would describe things nobody is looking at.
14
+ */
15
+ export function buildPhiAccountAddressesPanel(labels, presetKey) {
16
+ // The shell derives the instance ids from the node keys; the same derivation gives the addresses here.
17
+ const ids = createPhiPresetCmsInstanceIdMap({ domain: "page", ownerModuleId: PHI_APP_RUNTIME_MODULE_ID, presetKey }, ["widgetAddresses", "overlayAddressCreate", "overlayAddressEdit", "overlayAddressEditForm"]);
18
+ const tableAddress = createPhiSignalAddress("cms", ids.widgetAddresses);
19
+ const editFormAddress = createPhiSignalAddress("cms", ids.overlayAddressEditForm);
20
+ const source = { providerKey: PHI_APP_ADDRESSES_DATA_PROVIDER_KEY, resourceKey: PHI_APP_ADDRESSES_RESOURCE_KEY };
21
+ const actionTo = (routeKey, receiver) => ({
22
+ routeKey,
23
+ capabilityId: "actionActivate",
24
+ scope: "page",
25
+ channel: "action",
26
+ action: "activate",
27
+ valueType: "json",
28
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.tableAction,
29
+ receiver,
30
+ });
31
+ // The Table's reload takes no value, and a listener matches on the value type too.
32
+ const reloadTable = (routeKey) => ({
33
+ routeKey,
34
+ capabilityId: "submitSuccess",
35
+ scope: "page",
36
+ channel: "reload",
37
+ action: "activate",
38
+ valueType: "none",
39
+ receiver: tableAddress,
40
+ });
41
+ return {
42
+ panel: {
43
+ nodeKey: "panelAddresses",
44
+ title: labels.panel.title,
45
+ description: labels.panel.description,
46
+ sections: [{
47
+ nodeKey: "widgetAddresses",
48
+ typeKey: "table",
49
+ label: labels.tableLabel,
50
+ config: {
51
+ source,
52
+ presentation: {
53
+ controlSize: "small",
54
+ layout: { mode: "auto", overflowX: "auto" },
55
+ columns: [
56
+ { key: "name", fieldKey: "name", title: labels.columns.name, sizing: { mode: "content" } },
57
+ { key: "lines", fieldKey: "lines", title: labels.columns.address, sizing: { mode: "fill" } },
58
+ {
59
+ key: "purposes",
60
+ fieldKey: "purposes",
61
+ title: labels.columns.purposes,
62
+ renderer: "tags",
63
+ sizing: { mode: "content" },
64
+ valueMap: labels.purposes,
65
+ tagColorMap: { billing: "default", shipping: "default", defaultBilling: "processing", defaultShipping: "processing" },
66
+ },
67
+ ],
68
+ emptyState: { title: labels.empty.title, description: labels.empty.text },
69
+ },
70
+ features: {
71
+ pagination: { enabled: false },
72
+ sorting: { mode: "none" },
73
+ tools: { mode: "self-contained", reset: false, reload: false },
74
+ actions: {
75
+ rowLayout: "compact",
76
+ toolbar: [{
77
+ key: "create",
78
+ label: labels.actions.add,
79
+ icon: "plus",
80
+ display: "icon",
81
+ mode: "primary",
82
+ execution: "signal",
83
+ }],
84
+ row: [
85
+ { key: "edit", label: labels.actions.edit, icon: "edit", display: "icon", execution: "signal" },
86
+ {
87
+ key: "makeDefaultBilling",
88
+ label: labels.actions.defaultBilling,
89
+ icon: "antd:file-text",
90
+ display: "icon",
91
+ execution: "provider",
92
+ },
93
+ {
94
+ key: "makeDefaultShipping",
95
+ label: labels.actions.defaultShipping,
96
+ icon: "antd:shopping",
97
+ display: "icon",
98
+ execution: "provider",
99
+ },
100
+ {
101
+ key: "delete",
102
+ label: labels.actions.remove,
103
+ icon: "antd:delete",
104
+ display: "icon",
105
+ mode: "danger",
106
+ execution: "provider",
107
+ confirm: {
108
+ title: labels.remove.title,
109
+ description: labels.remove.text,
110
+ okText: labels.remove.ok,
111
+ cancelText: labels.cancel,
112
+ },
113
+ },
114
+ ],
115
+ },
116
+ },
117
+ signalRoutes: {
118
+ // One announcement, three listeners; each decides by the action key whether it was meant.
119
+ emits: [
120
+ actionTo("app-addresses-action-edit-form", editFormAddress),
121
+ actionTo("app-addresses-action-create-dialog", createPhiSignalAddress("cms", ids.overlayAddressCreate)),
122
+ actionTo("app-addresses-action-edit-dialog", createPhiSignalAddress("cms", ids.overlayAddressEdit)),
123
+ ],
124
+ listens: [{
125
+ routeKey: "app-addresses-reload",
126
+ capabilityId: "reload",
127
+ scope: "page",
128
+ channel: "reload",
129
+ action: "activate",
130
+ valueType: "none",
131
+ receiver: tableAddress,
132
+ }],
133
+ },
134
+ },
135
+ }],
136
+ },
137
+ overlays: [
138
+ {
139
+ nodeKey: "overlayAddressCreate",
140
+ title: labels.addTitle,
141
+ openActionKey: "create",
142
+ formId: PHI_APP_FORM_IDS.addressCreate,
143
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
144
+ label: labels.addTitle,
145
+ submitLabel: labels.save,
146
+ cancelLabel: labels.cancel,
147
+ configOverrides: { signalRoutes: { emits: [reloadTable("app-address-create-success")] } },
148
+ },
149
+ {
150
+ nodeKey: "overlayAddressEdit",
151
+ title: labels.editTitle,
152
+ openActionKey: "edit",
153
+ formId: PHI_APP_FORM_IDS.addressEdit,
154
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
155
+ label: labels.editTitle,
156
+ submitLabel: labels.save,
157
+ cancelLabel: labels.cancel,
158
+ configOverrides: {
159
+ // The Form reads the row the same action opened the dialog with; both filter on this key.
160
+ source,
161
+ openActionKey: "edit",
162
+ signalRoutes: {
163
+ emits: [reloadTable("app-address-edit-success")],
164
+ listens: [{
165
+ routeKey: "app-address-edit-open",
166
+ capabilityId: "recordOpen",
167
+ scope: "page",
168
+ channel: "action",
169
+ action: "activate",
170
+ valueType: "json",
171
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.tableAction,
172
+ receiver: editFormAddress,
173
+ }],
174
+ },
175
+ },
176
+ },
177
+ ],
178
+ };
179
+ }
@@ -0,0 +1,62 @@
1
+ import "server-only";
2
+ import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
3
+ export declare function getPhiAppAddressesLabels(options: PhiGlobalTranslatorOptions): Promise<{
4
+ panel: {
5
+ title: string;
6
+ description: string;
7
+ };
8
+ tableLabel: string;
9
+ columns: {
10
+ name: string;
11
+ address: string;
12
+ purposes: string;
13
+ };
14
+ purposes: {
15
+ billing: string;
16
+ shipping: string;
17
+ defaultBilling: string;
18
+ defaultShipping: string;
19
+ };
20
+ empty: {
21
+ title: string;
22
+ text: string;
23
+ };
24
+ actions: {
25
+ add: string;
26
+ edit: string;
27
+ defaultBilling: string;
28
+ defaultShipping: string;
29
+ remove: string;
30
+ };
31
+ remove: {
32
+ title: string;
33
+ text: string;
34
+ ok: string;
35
+ };
36
+ cancel: string;
37
+ save: string;
38
+ addTitle: string;
39
+ editTitle: string;
40
+ form: {
41
+ addressName: string;
42
+ addressNameRequired: string;
43
+ addressCompanyName: string;
44
+ addressLine1: string;
45
+ addressLine1Required: string;
46
+ addressLine2: string;
47
+ addressPostalCode: string;
48
+ addressCity: string;
49
+ addressCityRequired: string;
50
+ addressRegion: string;
51
+ addressCountry: string;
52
+ addressCountryRequired: string;
53
+ addressTooLong: string;
54
+ purposes: string;
55
+ billing: string;
56
+ shipping: string;
57
+ defaultBilling: string;
58
+ defaultShipping: string;
59
+ successTitle: string;
60
+ successText: string;
61
+ };
62
+ }>;