@phis/ui 0.8.0 → 0.8.1

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 (233) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +15 -7
  2. package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
  3. package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
  4. package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
  5. package/components/cms/phi-cms-render-diagnostic.js +12 -2
  6. package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
  7. package/components/cms/phi-cms-render-error-boundary.js +1 -1
  8. package/components/cms/phi-cms-root-layout.js +3 -1
  9. package/components/controls/phi-media-picker-control.d.ts +9 -0
  10. package/components/controls/phi-media-picker-control.js +1 -1
  11. package/components/controls/phi-popover-control.js +4 -1
  12. package/components/controls/phi-table-control.d.ts +7 -1
  13. package/components/controls/phi-table-control.js +23 -8
  14. package/components/forms/form-descriptor-field-check.d.ts +18 -0
  15. package/components/forms/form-descriptor-field-check.js +41 -0
  16. package/components/forms/form-descriptor-runtime-client.js +11 -10
  17. package/components/forms/form-record-source.d.ts +38 -0
  18. package/components/forms/form-record-source.js +48 -0
  19. package/components/forms/shared-form-descriptors.d.ts +0 -34
  20. package/components/forms/shared-form-descriptors.js +0 -6
  21. package/components/forms/shared-form-ids.d.ts +1 -1
  22. package/components/forms/shared-form-ids.js +1 -1
  23. package/components/media/media-settings-labels.d.ts +1 -0
  24. package/components/media/media-settings-labels.js +2 -0
  25. package/components/media/phi-media-picker-binding.d.ts +41 -33
  26. package/components/media/phi-media-picker-binding.js +2 -1
  27. package/components/media/use-media-library-add-picker.d.ts +33 -32
  28. package/components/overlays/phi-overlay-container-client.js +11 -9
  29. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +7 -0
  30. package/components/regions/presets/phi-settings-page-shell-tree.js +3 -3
  31. package/components/shell/phi-icon-names.d.ts +3 -0
  32. package/components/shell/phi-icon-names.js +3 -0
  33. package/components/shell/phi-icon.d.ts +5 -7
  34. package/components/shell/phi-icon.js +8 -21
  35. package/components/tables/client/phi-table-binding-params.d.ts +24 -0
  36. package/components/tables/client/phi-table-binding-params.js +39 -0
  37. package/components/tables/client/phi-table-binding.d.ts +1 -3
  38. package/components/tables/client/phi-table-binding.js +5 -9
  39. package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
  40. package/components/widgets/client/shared/phi-button-icons.js +8 -12
  41. package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
  42. package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
  43. package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
  44. package/components/widgets/client/shared/phi-collection-provider.js +5 -0
  45. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  46. package/components/widgets/client/shared/phi-command-buttons.d.ts +16 -0
  47. package/components/widgets/client/shared/phi-command-buttons.js +9 -1
  48. package/components/widgets/label-sets/admin-users.d.ts +1 -0
  49. package/components/widgets/label-sets/admin-users.js +2 -0
  50. package/components/widgets/label-sets/builder-modules.js +4 -0
  51. package/components/widgets/label-sets/profile.d.ts +0 -16
  52. package/components/widgets/label-sets/profile.js +0 -37
  53. package/components/widgets/label-sets/registration.d.ts +0 -1
  54. package/components/widgets/label-sets/registration.js +0 -2
  55. package/components/widgets/label-sets/revisions.js +2 -0
  56. package/components/widgets/label-sets/signals.js +2 -0
  57. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  58. package/components/widgets/label-types/builder-modules.js +2 -0
  59. package/components/widgets/label-types/revisions.d.ts +2 -0
  60. package/components/widgets/label-types/revisions.js +2 -1
  61. package/components/widgets/label-types/signals.d.ts +2 -0
  62. package/components/widgets/label-types/signals.js +1 -0
  63. package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
  64. package/components/widgets/shared/widget-failure-audience.js +21 -0
  65. package/components/widgets/shared/widget-failure-client.js +5 -2
  66. package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
  67. package/components/widgets/shared/widget-failure-notice-client.js +10 -0
  68. package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
  69. package/components/widgets/shared/widget-failure-notice.js +17 -0
  70. package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
  71. package/components/widgets/shared/widget-failure-staff.js +18 -0
  72. package/components/widgets/shared/widget-failure.d.ts +9 -6
  73. package/components/widgets/shared/widget-failure.js +0 -9
  74. package/components/widgets/shared/widget-failure.server.d.ts +4 -2
  75. package/components/widgets/shared/widget-failure.server.js +8 -3
  76. package/constants/customer-file.d.ts +12 -3
  77. package/constants/customer-file.js +12 -3
  78. package/constants/runtime-module-ownership.js +4 -3
  79. package/constants/site-address.d.ts +9 -0
  80. package/constants/site-address.js +10 -0
  81. package/constants/table-loading.d.ts +14 -0
  82. package/constants/table-loading.js +14 -0
  83. package/constants.d.ts +2 -1
  84. package/constants.js +3 -1
  85. package/gateway/site-cms-write-validation.js +19 -3
  86. package/helpers/announced-action.d.ts +17 -0
  87. package/helpers/announced-action.js +29 -0
  88. package/helpers/phi-metadata.d.ts +0 -8
  89. package/helpers/phi-metadata.js +1 -10
  90. package/helpers/phi-site-description.d.ts +11 -0
  91. package/helpers/phi-site-description.js +13 -0
  92. package/helpers/preset-form-check.d.ts +14 -0
  93. package/helpers/preset-form-check.js +12 -0
  94. package/helpers/preset-table-check.d.ts +19 -15
  95. package/helpers/preset-table-check.js +33 -39
  96. package/helpers/record-widget-binding.d.ts +10 -0
  97. package/helpers/record-widget-binding.js +35 -0
  98. package/helpers/record-widget.d.ts +1 -10
  99. package/helpers/record-widget.js +4 -33
  100. package/helpers/table-widget-binding.d.ts +12 -0
  101. package/helpers/table-widget-binding.js +296 -0
  102. package/helpers/tree-widget-binding.d.ts +19 -0
  103. package/helpers/tree-widget-binding.js +72 -0
  104. package/helpers/typed-confirmation.d.ts +9 -0
  105. package/helpers/typed-confirmation.js +13 -0
  106. package/helpers/widget-binding-check.d.ts +22 -0
  107. package/helpers/widget-binding-check.js +91 -0
  108. package/module-page-check.d.ts +2 -0
  109. package/module-page-check.js +2 -0
  110. package/next/root-route.js +2 -1
  111. package/package.json +1 -1
  112. package/plugins/runtime-modules/accounting/ids.d.ts +7 -4
  113. package/plugins/runtime-modules/accounting/ids.js +14 -3
  114. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +21 -9
  115. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +29 -15
  116. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +11 -8
  117. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +206 -137
  118. package/plugins/runtime-modules/app/client-data-providers.js +1 -1
  119. package/plugins/runtime-modules/app/data-providers.d.ts +14 -69
  120. package/plugins/runtime-modules/app/data-providers.js +19 -54
  121. package/plugins/runtime-modules/app/definition.d.ts +8 -80
  122. package/plugins/runtime-modules/app/forms.d.ts +1 -16
  123. package/plugins/runtime-modules/app/forms.js +0 -59
  124. package/plugins/runtime-modules/app/ids.d.ts +2 -1
  125. package/plugins/runtime-modules/app/ids.js +3 -2
  126. package/plugins/runtime-modules/app/module.d.ts +8 -80
  127. package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
  128. package/plugins/runtime-modules/app/services/{addresses-table.js → addresses-collection.js} +23 -19
  129. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +10 -6
  130. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +37 -73
  131. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +0 -5
  132. package/plugins/runtime-modules/app/trees/addresses-label-set.js +2 -6
  133. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
  134. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +1 -17
  135. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +0 -2
  136. package/plugins/runtime-modules/app/trees/profile-label-set.js +2 -14
  137. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
  138. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
  139. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -1
  140. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
  141. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
  142. package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
  143. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +5 -0
  144. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +14 -1
  145. package/plugins/runtime-modules/client-manifests/common.js +6 -0
  146. package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -1
  147. package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
  148. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
  149. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
  150. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +173 -0
  151. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
  152. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
  153. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +1 -1
  154. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
  155. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  156. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +1 -1
  157. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  158. package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
  159. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
  160. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
  161. package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
  162. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  163. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
  164. package/plugins/runtime-modules/core/widgets/table/client.js +30 -48
  165. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
  166. package/plugins/runtime-modules/core/widgets/table/config.js +3 -0
  167. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
  168. package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
  169. package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
  170. package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
  171. package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
  172. package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
  173. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  174. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
  175. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +5 -0
  176. package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
  177. package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
  178. package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
  179. package/plugins/runtime-modules/revisions/controller/client.js +74 -50
  180. package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
  181. package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
  182. package/plugins/runtime-modules/revisions/forms.js +1 -1
  183. package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
  184. package/plugins/runtime-modules/revisions/page-ids.js +4 -1
  185. package/plugins/runtime-modules/revisions/services/options.js +14 -4
  186. package/plugins/runtime-modules/revisions/services/table.js +41 -21
  187. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +76 -3
  188. package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
  189. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +39 -13
  190. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  191. package/plugins/runtime-modules/threads/controller/client.js +62 -2
  192. package/plugins/runtime-modules/threads/controller/definition.js +48 -0
  193. package/plugins/runtime-modules/threads/data-providers.d.ts +22 -37
  194. package/plugins/runtime-modules/threads/data-providers.js +35 -24
  195. package/plugins/runtime-modules/threads/definition.d.ts +22 -37
  196. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  197. package/plugins/runtime-modules/threads/ids.js +2 -0
  198. package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
  199. package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
  200. package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
  201. package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
  202. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +14 -80
  203. package/plugins/runtime-modules/threads/services/customer-file-table.js +27 -112
  204. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +4 -0
  205. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +4 -0
  206. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +15 -0
  207. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +5 -0
  208. package/server-helpers/runtime.js +0 -1
  209. package/styles/controls.css +4 -2
  210. package/styles/layout.css +7 -0
  211. package/theme/phi-antd-token-resolver.d.ts +8 -0
  212. package/theme/phi-antd-token-resolver.js +10 -0
  213. package/theme/phi-theme-color.d.ts +19 -0
  214. package/theme/phi-theme-color.js +42 -0
  215. package/theme/phi-theme-gradients.js +4 -22
  216. package/theme/phi-theme-palette-defaults.d.ts +16 -0
  217. package/theme/phi-theme-palette-defaults.js +103 -0
  218. package/types/cms-plugins.d.ts +6 -1
  219. package/types/collection-provider.d.ts +27 -0
  220. package/types/collection-signal-values.d.ts +2 -0
  221. package/types/collection-signal-values.js +23 -0
  222. package/types/collection-view-widget.d.ts +9 -0
  223. package/types/core-widget-placements.d.ts +6 -0
  224. package/types/signals.d.ts +2 -0
  225. package/types/signals.js +2 -0
  226. package/types/table-widget.d.ts +15 -1
  227. package/types/table-widget.js +0 -282
  228. package/types/tree-widget.d.ts +0 -1
  229. package/types/tree-widget.js +0 -60
  230. package/types/widget-runtime.d.ts +0 -1
  231. package/types.d.ts +1 -1
  232. package/types.js +1 -1
  233. package/plugins/runtime-modules/app/services/addresses-table.d.ts +0 -135
@@ -0,0 +1,22 @@
1
+ /** The page size the customer file is read at; the Page's conversations Table names the same, Core takes up to 100. */
2
+ export declare const PHI_CUSTOMER_FILE_THREADS_PAGE_SIZE = 25;
3
+ /** The member's file, a page of the conversations they take part in included. */
4
+ export declare function buildPhiCustomerFilePath(userId: number, page: URLSearchParams | null): string;
5
+ /**
6
+ * The first page, as every reader of one choice asks for it: the person, their addresses, the file panel
7
+ * and the conversations Table on a new choice all name this path, so they share one request.
8
+ */
9
+ export declare function buildPhiCustomerFileFirstPagePath(userId: number): string;
10
+ export declare class PhiCustomerFileOwnFileRefusal extends Error {
11
+ }
12
+ /**
13
+ * The route's answer for this caller. A caller that aborts leaves the request to the others; the request
14
+ * itself is aborted only when the last of them has gone, and is then no longer joined.
15
+ */
16
+ export declare function readPhiCustomerFile(path: string, signal: AbortSignal | undefined): Promise<Record<string, unknown> | null>;
17
+ /**
18
+ * The id of the member's file, from the same first-page read the Page's Tables make for the choice, or
19
+ * null where there is none to show: Core refused the reader's own file, or answered no file. Anything
20
+ * else that goes wrong is thrown, as the Tables are told.
21
+ */
22
+ export declare function readPhiCustomerFileThreadId(userId: number, signal: AbortSignal | undefined): Promise<number | null>;
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { readPhiJsonError, readPhiJsonPayload } from "../../../../helpers/client-json-request";
3
+ import { buildPhiTablePageParams, createPhiTableProviderRequestInit, readPhiPositiveInteger, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
4
+ import { readPhiTableProviderResponse, } from "../../../../components/widgets/client/shared/phi-table-provider-response";
5
+ import { isPhiRecord } from "../../../../helpers/is-record";
6
+ const RESPONSE_OPTIONS = { subject: "Customer file" };
7
+ /** The page size the customer file is read at; the Page's conversations Table names the same, Core takes up to 100. */
8
+ export const PHI_CUSTOMER_FILE_THREADS_PAGE_SIZE = 25;
9
+ /** The member's file, a page of the conversations they take part in included. */
10
+ export function buildPhiCustomerFilePath(userId, page) {
11
+ const path = `/api/site/members/${userId}/file`;
12
+ return page ? `${path}?${page}` : path;
13
+ }
14
+ /**
15
+ * The first page, as every reader of one choice asks for it: the person, their addresses, the file panel
16
+ * and the conversations Table on a new choice all name this path, so they share one request.
17
+ */
18
+ export function buildPhiCustomerFileFirstPagePath(userId) {
19
+ return buildPhiCustomerFilePath(userId, buildPhiTablePageParams({}, PHI_CUSTOMER_FILE_THREADS_PAGE_SIZE));
20
+ }
21
+ /*
22
+ * Core's refusal of the reader's own file (`403`): the route answers that and nothing else to someone who
23
+ * may open files at all, and nobody else reaches this Page or its member picker.
24
+ */
25
+ export class PhiCustomerFileOwnFileRefusal extends Error {
26
+ }
27
+ /*
28
+ * The reads of one route in flight, by its path. The Page's Tables and the Conversations Controller, which
29
+ * opens the file, ask for the same member at the same time -- the person Table's choice reaches all of them
30
+ * at once -- and one request answers them all, so one choice is one entry in the access log. Nothing
31
+ * outlives the request: once it settles its entry is gone, and the next read, a reload or another member
32
+ * asks again.
33
+ */
34
+ const customerFileReads = new Map();
35
+ function abortReason(signal) {
36
+ return signal.reason ?? new DOMException("The read was aborted.", "AbortError");
37
+ }
38
+ /**
39
+ * The route's answer for this caller. A caller that aborts leaves the request to the others; the request
40
+ * itself is aborted only when the last of them has gone, and is then no longer joined.
41
+ */
42
+ export function readPhiCustomerFile(path, signal) {
43
+ if (signal?.aborted)
44
+ return Promise.reject(abortReason(signal));
45
+ let read = customerFileReads.get(path);
46
+ if (!read) {
47
+ const controller = new AbortController();
48
+ const entry = {
49
+ controller,
50
+ waiters: 0,
51
+ promise: (async () => {
52
+ const response = await fetch(path, createPhiTableProviderRequestInit(controller.signal));
53
+ if (response.status === 403) {
54
+ const refused = await readPhiJsonPayload(response);
55
+ throw new PhiCustomerFileOwnFileRefusal(readPhiJsonError(refused, "Nobody reaches their own file."));
56
+ }
57
+ return readPhiTableProviderResponse(response, RESPONSE_OPTIONS);
58
+ })().finally(() => {
59
+ if (customerFileReads.get(path) === entry)
60
+ customerFileReads.delete(path);
61
+ }),
62
+ };
63
+ // A request every caller left rejects with nobody listening.
64
+ entry.promise.catch(() => undefined);
65
+ customerFileReads.set(path, entry);
66
+ read = entry;
67
+ }
68
+ const shared = read;
69
+ shared.waiters += 1;
70
+ if (!signal)
71
+ return shared.promise;
72
+ return new Promise((resolve, reject) => {
73
+ const leave = () => {
74
+ shared.waiters -= 1;
75
+ reject(abortReason(signal));
76
+ if (shared.waiters > 0)
77
+ return;
78
+ if (customerFileReads.get(path) === shared)
79
+ customerFileReads.delete(path);
80
+ shared.controller.abort(abortReason(signal));
81
+ };
82
+ signal.addEventListener("abort", leave, { once: true });
83
+ shared.promise.then(resolve, reject).finally(() => signal.removeEventListener("abort", leave));
84
+ });
85
+ }
86
+ /**
87
+ * The id of the member's file, from the same first-page read the Page's Tables make for the choice, or
88
+ * null where there is none to show: Core refused the reader's own file, or answered no file. Anything
89
+ * else that goes wrong is thrown, as the Tables are told.
90
+ */
91
+ export async function readPhiCustomerFileThreadId(userId, signal) {
92
+ try {
93
+ const result = await readPhiCustomerFile(buildPhiCustomerFileFirstPagePath(userId), signal);
94
+ return isPhiRecord(result) ? readPhiPositiveInteger(result.fileThreadId) ?? null : null;
95
+ }
96
+ catch (error) {
97
+ if (error instanceof PhiCustomerFileOwnFileRefusal)
98
+ return null;
99
+ throw error;
100
+ }
101
+ }
@@ -1,6 +1,5 @@
1
1
  import { type PhiTableProviderQueryRequest } from "../../../../types/table-widget";
2
- /** The member's file, a page of the threads they take part in included. */
3
- export declare function buildPhiCustomerFilePath(userId: number, page: URLSearchParams | null): string;
2
+ export { buildPhiCustomerFilePath } from "./customer-file-read";
4
3
  /** The person as Core answered them, one row; a field the actor may not read stays empty. */
5
4
  export declare function toPhiCustomerFilePersonRow(person: Record<string, unknown>): {
6
5
  userId: unknown;
@@ -12,26 +11,17 @@ export declare function toPhiCustomerFilePersonRow(person: Record<string, unknow
12
11
  mobile: string;
13
12
  };
14
13
  /**
15
- * The threads as the listing shows them: the person's file first, on the first page only -- Core answers
16
- * its id beside the list, not in it -- then the conversations the actor sees that the person is in, as the
17
- * inbox reads its rows.
14
+ * The person's conversations as the listing shows them, read as the inbox reads its rows. Their file is
15
+ * not one of them: Core answers its id beside the list, and the Page reads the file in a panel of its own
16
+ * (THREADS.md, section 10), so a row of it that the list carries is left out.
18
17
  */
19
- export declare function toPhiCustomerFileThreadRows(result: Record<string, unknown>, page: number, fileSubject: string): ({
18
+ export declare function toPhiCustomerFileThreadRows(result: Record<string, unknown>): {
20
19
  kind: string;
21
20
  status: string;
22
21
  archived: boolean;
23
22
  locked: boolean;
24
23
  state: string;
25
- } | {
26
- id: number;
27
- subject: string;
28
- kind: string;
29
- status: string;
30
- archived: boolean;
31
- locked: boolean;
32
- state: string;
33
- latestMessageAt: null;
34
- })[];
24
+ }[];
35
25
  declare function queryCustomerFile({ resourceKey, query, params, signal }: PhiTableProviderQueryRequest): Promise<{
36
26
  rows: {
37
27
  userId: unknown;
@@ -43,40 +33,19 @@ declare function queryCustomerFile({ resourceKey, query, params, signal }: PhiTa
43
33
  mobile: string;
44
34
  }[];
45
35
  total: number;
36
+ summary: {
37
+ userId: number | null;
38
+ };
46
39
  } | {
47
40
  rows: {
48
- createdAt: {} | null;
49
- flags: number;
50
- billing: boolean;
51
- shipping: boolean;
52
- defaultBilling: boolean;
53
- defaultShipping: boolean;
54
- address: {
55
- [k: string]: string | null;
56
- };
57
- lines: string;
58
- purposes: ("billing" | "shipping" | "defaultBilling" | "defaultShipping")[];
59
- id: unknown;
60
- }[];
61
- total: number;
62
- } | {
63
- rows: ({
64
41
  kind: string;
65
42
  status: string;
66
43
  archived: boolean;
67
44
  locked: boolean;
68
45
  state: string;
69
- } | {
70
- id: number;
71
- subject: string;
72
- kind: string;
73
- status: string;
74
- archived: boolean;
75
- locked: boolean;
76
- state: string;
77
- latestMessageAt: null;
78
- })[];
46
+ }[];
79
47
  total?: undefined;
48
+ summary?: undefined;
80
49
  }>;
81
50
  export declare const PHI_THREADS_CUSTOMER_FILE_TABLE_PROVIDER_REGISTRATION: {
82
51
  key: `${string}/${string}`;
@@ -95,46 +64,11 @@ export declare const PHI_THREADS_CUSTOMER_FILE_TABLE_PROVIDER_REGISTRATION: {
95
64
  type: "string";
96
65
  required?: undefined;
97
66
  })[];
98
- query: {
99
- search: false;
100
- filterFields: string[];
101
- sorting: "none";
102
- pagination: "none";
103
- total?: undefined;
104
- };
105
- rowActivation?: undefined;
106
- } | {
107
- resourceKey: "addresses";
108
- title: string;
109
- rowIdentityPath: string;
110
- fields: ({
67
+ summaryFields: {
111
68
  key: string;
112
69
  title: string;
113
70
  type: "number";
114
- required: true;
115
- options?: undefined;
116
- } | {
117
- key: string;
118
- title: string;
119
- type: "string";
120
- required?: undefined;
121
- options?: undefined;
122
- } | {
123
- key: string;
124
- title: string;
125
- type: "enum[]";
126
- options: {
127
- value: string;
128
- label: string;
129
- }[];
130
- required?: undefined;
131
- } | {
132
- key: string;
133
- title: string;
134
- type: "datetime";
135
- required?: undefined;
136
- options?: undefined;
137
- })[];
71
+ }[];
138
72
  query: {
139
73
  search: false;
140
74
  filterFields: string[];
@@ -183,10 +117,10 @@ export declare const PHI_THREADS_CUSTOMER_FILE_TABLE_PROVIDER_REGISTRATION: {
183
117
  pagination: "offset";
184
118
  total: false;
185
119
  };
120
+ summaryFields?: undefined;
186
121
  })[];
187
122
  query: typeof queryCustomerFile;
188
123
  };
189
124
  export declare const PhiThreadsCustomerFileTableProviderClient: import("react").ComponentType<{
190
125
  children: import("react").ReactNode;
191
126
  }>;
192
- export {};
@@ -1,25 +1,15 @@
1
1
  "use client";
2
2
  import { isPhiRecord } from "../../../../helpers/is-record";
3
- import { readPhiJsonError, readPhiJsonPayload } from "../../../../helpers/client-json-request";
4
- import { buildPhiTablePageParams, createPhiTableProviderRequestInit, readPhiPositiveInteger, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
5
- import { readPhiTableProviderResponse, } from "../../../../components/widgets/client/shared/phi-table-provider-response";
3
+ import { buildPhiTablePageParams, readPhiPositiveInteger, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
6
4
  import { createPhiTableProviderClient, } from "../../../../components/widgets/client/shared/phi-table-provider";
7
5
  import { PhiTableProviderError } from "../../../../types/table-widget";
8
- import { PhisThreadKind, PhisThreadStatus } from "../../../../constants/threads";
9
- import { toPhiSiteAddressRow } from "../../../../helpers/site-address-row";
10
6
  import { readPhiThreadInboxRow } from "../../../../helpers/thread-inbox-row";
11
7
  import { PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../data-providers";
12
- import { PHI_CUSTOMER_FILE_OWN_FILE_PARAM, PHI_CUSTOMER_FILE_RESOURCE_KEYS as RESOURCES, PHI_CUSTOMER_FILE_SUBJECT_PARAM, } from "../../../../constants/customer-file";
8
+ import { PHI_CUSTOMER_FILE_OWN_FILE_PARAM, PHI_CUSTOMER_FILE_RESOURCE_KEYS as RESOURCES, } from "../../../../constants/customer-file";
13
9
  import { PHI_TABLE_PROVIDER_REFUSED_CODE } from "../../../../components/widgets/client/shared/phi-table-provider-refusal";
14
10
  import { PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
15
- const RESPONSE_OPTIONS = { subject: "Customer file" };
16
- // The Page names the same size; Core takes up to 100.
17
- const THREADS_PAGE_SIZE = 25;
18
- /** The member's file, a page of the threads they take part in included. */
19
- export function buildPhiCustomerFilePath(userId, page) {
20
- const path = `/api/site/members/${userId}/file`;
21
- return page ? `${path}?${page}` : path;
22
- }
11
+ import { buildPhiCustomerFilePath, PHI_CUSTOMER_FILE_THREADS_PAGE_SIZE, PhiCustomerFileOwnFileRefusal, readPhiCustomerFile, } from "./customer-file-read";
12
+ export { buildPhiCustomerFilePath } from "./customer-file-read";
23
13
  function text(value) {
24
14
  return typeof value === "string" ? value.trim() : "";
25
15
  }
@@ -38,102 +28,31 @@ export function toPhiCustomerFilePersonRow(person) {
38
28
  };
39
29
  }
40
30
  /**
41
- * The threads as the listing shows them: the person's file first, on the first page only -- Core answers
42
- * its id beside the list, not in it -- then the conversations the actor sees that the person is in, as the
43
- * inbox reads its rows.
31
+ * The person's conversations as the listing shows them, read as the inbox reads its rows. Their file is
32
+ * not one of them: Core answers its id beside the list, and the Page reads the file in a panel of its own
33
+ * (THREADS.md, section 10), so a row of it that the list carries is left out.
44
34
  */
45
- export function toPhiCustomerFileThreadRows(result, page, fileSubject) {
35
+ export function toPhiCustomerFileThreadRows(result) {
46
36
  const fileThreadId = readPhiPositiveInteger(result.fileThreadId);
47
- const threads = readPhiTableRows(result.threads).map(readPhiThreadInboxRow);
48
- if (page !== 1 || !fileThreadId)
49
- return threads;
50
- return [{
51
- id: fileThreadId,
52
- subject: fileSubject,
53
- kind: String(PhisThreadKind.File),
54
- status: String(PhisThreadStatus.Open),
55
- archived: false,
56
- locked: false,
57
- state: "open",
58
- latestMessageAt: null,
59
- }, ...threads.filter((row) => row.id !== fileThreadId)];
60
- }
61
- /*
62
- * Core's refusal of the reader's own file (`403`): the route answers that and nothing else to someone who
63
- * may open files at all, and nobody else reaches this Page or its member picker.
64
- */
65
- class PhiCustomerFileOwnFileRefusal extends Error {
66
- }
67
- /*
68
- * The reads of one route in flight, by its path. The Page's three Tables ask for the same member at the
69
- * same time -- the person Table's choice reaches the other two as their query -- and one request answers
70
- * them all, so one choice is one entry in the access log. Nothing outlives the request: once it settles
71
- * its entry is gone, and the next read, a reload or another member asks again.
72
- */
73
- const customerFileReads = new Map();
74
- function abortReason(signal) {
75
- return signal.reason ?? new DOMException("The read was aborted.", "AbortError");
76
- }
77
- /**
78
- * The route's answer for this caller. A caller that aborts leaves the request to the others; the request
79
- * itself is aborted only when the last of them has gone, and is then no longer joined.
80
- */
81
- function readCustomerFile(path, signal) {
82
- if (signal?.aborted)
83
- return Promise.reject(abortReason(signal));
84
- let read = customerFileReads.get(path);
85
- if (!read) {
86
- const controller = new AbortController();
87
- const entry = {
88
- controller,
89
- waiters: 0,
90
- promise: (async () => {
91
- const response = await fetch(path, createPhiTableProviderRequestInit(controller.signal));
92
- if (response.status === 403) {
93
- const refused = await readPhiJsonPayload(response);
94
- throw new PhiCustomerFileOwnFileRefusal(readPhiJsonError(refused, "Nobody reaches their own file."));
95
- }
96
- return readPhiTableProviderResponse(response, RESPONSE_OPTIONS);
97
- })().finally(() => {
98
- if (customerFileReads.get(path) === entry)
99
- customerFileReads.delete(path);
100
- }),
101
- };
102
- // A request every caller left rejects with nobody listening.
103
- entry.promise.catch(() => undefined);
104
- customerFileReads.set(path, entry);
105
- read = entry;
106
- }
107
- const shared = read;
108
- shared.waiters += 1;
109
- if (!signal)
110
- return shared.promise;
111
- return new Promise((resolve, reject) => {
112
- const leave = () => {
113
- shared.waiters -= 1;
114
- reject(abortReason(signal));
115
- if (shared.waiters > 0)
116
- return;
117
- if (customerFileReads.get(path) === shared)
118
- customerFileReads.delete(path);
119
- shared.controller.abort(abortReason(signal));
120
- };
121
- signal.addEventListener("abort", leave, { once: true });
122
- shared.promise.then(resolve, reject).finally(() => signal.removeEventListener("abort", leave));
123
- });
37
+ return readPhiTableRows(result.threads)
38
+ .map(readPhiThreadInboxRow)
39
+ .filter((row) => row.id !== fileThreadId);
124
40
  }
125
41
  async function queryCustomerFile({ resourceKey, query, params, signal }) {
126
- if (!Object.values(RESOURCES).includes(resourceKey)) {
42
+ if (resourceKey !== RESOURCES.person && resourceKey !== RESOURCES.threads) {
127
43
  throw new PhiTableProviderError("resource-not-found", `Unknown customer file resource "${resourceKey}".`);
128
44
  }
129
45
  // Nobody chosen yet: nothing is asked for, so nothing is written to the access log.
130
46
  const userId = readPhiPositiveInteger(query.filters?.userId);
131
- if (!userId)
132
- return resourceKey === RESOURCES.threads ? { rows: [] } : { rows: [], total: 0 };
133
- // The person and their addresses are the same on every page; they ask for the first, as the threads
134
- // Table does on a choice, so the three reads are one route.
135
- const paged = buildPhiTablePageParams(resourceKey === RESOURCES.threads ? query : {}, THREADS_PAGE_SIZE);
136
- const result = await readCustomerFile(buildPhiCustomerFilePath(userId, paged), signal).catch((error) => {
47
+ if (!userId) {
48
+ if (resourceKey === RESOURCES.threads)
49
+ return { rows: [] };
50
+ return { rows: [], total: 0, summary: { userId: null } };
51
+ }
52
+ // The person is the same on every page; it asks for the first, as the conversations Table, the
53
+ // addresses Collection and the Controller opening the file do on a choice, so the reads are one route.
54
+ const paged = buildPhiTablePageParams(resourceKey === RESOURCES.threads ? query : {}, PHI_CUSTOMER_FILE_THREADS_PAGE_SIZE);
55
+ const result = await readPhiCustomerFile(buildPhiCustomerFilePath(userId, paged), signal).catch((error) => {
137
56
  if (!(error instanceof PhiCustomerFileOwnFileRefusal))
138
57
  throw error;
139
58
  // Said where the rows would be, in the Page's words where it gave them, and the picker stays.
@@ -144,18 +63,14 @@ async function queryCustomerFile({ resourceKey, query, params, signal }) {
144
63
  throw new PhiTableProviderError("invalid-response", "The customer file answer is invalid.");
145
64
  }
146
65
  if (resourceKey === RESOURCES.person) {
147
- return { rows: [toPhiCustomerFilePersonRow(result.person)], total: 1 };
148
- }
149
- if (resourceKey === RESOURCES.addresses) {
150
- const rows = readPhiTableRows(result.person.addresses).map(toPhiSiteAddressRow);
151
- return { rows, total: rows.length };
66
+ const row = toPhiCustomerFilePersonRow(result.person);
67
+ return { rows: [row], total: 1, summary: { userId: typeof row.userId === "number" ? row.userId : null } };
152
68
  }
153
- const page = Number(paged.get("page")) || 1;
154
- const subject = typeof params?.[PHI_CUSTOMER_FILE_SUBJECT_PARAM] === "string" ? params[PHI_CUSTOMER_FILE_SUBJECT_PARAM] : "";
155
- return { rows: toPhiCustomerFileThreadRows(result, page, subject) };
69
+ return { rows: toPhiCustomerFileThreadRows(result) };
156
70
  }
157
- const resources = PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS
158
- .find((descriptor) => descriptor.key === PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFile)?.resources ?? [];
71
+ const descriptor = PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS
72
+ .find((candidate) => candidate.key === PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFile);
73
+ const resources = descriptor?.kind === "table" ? descriptor.resources : [];
159
74
  export const PHI_THREADS_CUSTOMER_FILE_TABLE_PROVIDER_REGISTRATION = {
160
75
  key: PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFile,
161
76
  resources,
@@ -77,6 +77,10 @@ export declare function getPhiAdminUsersAccessLabels(options: PhiGlobalTranslato
77
77
  addons: string;
78
78
  log: string;
79
79
  };
80
+ footers: {
81
+ addons: string;
82
+ log: string;
83
+ };
80
84
  filters: {
81
85
  subject: string;
82
86
  subjectPlaceholder: string;
@@ -60,6 +60,9 @@ const PHI_ADMIN_USERS_ACCESS_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_USER
60
60
  cancel: "Cancel",
61
61
  addons_empty: definePhiMessageLabel("No installed Add-on reads people."),
62
62
  log_empty: definePhiMessageLabel("Nothing was read, or the filters leave nothing."),
63
+ addons_footer: "%1 Add-ons",
64
+ // The log pages without a count: what a page holds, and which page it is.
65
+ log_footer: "%1 entries on page %2",
63
66
  filter_subject: "Person",
64
67
  filter_subject_placeholder: "Subject",
65
68
  filter_addon: "Add-on",
@@ -108,6 +111,7 @@ export async function getPhiAdminUsersAccessLabels(options) {
108
111
  revoke: { title: labels.revoke_title, text: labels.revoke_text, ok: labels.confirm_revoke },
109
112
  cancel: labels.cancel,
110
113
  empty: { addons: labels.addons_empty, log: labels.log_empty },
114
+ footers: { addons: labels.addons_footer, log: labels.log_footer },
111
115
  filters: {
112
116
  subject: labels.filter_subject,
113
117
  subjectPlaceholder: labels.filter_subject_placeholder,
@@ -53,6 +53,11 @@ export async function buildPhiDefaultAdminUsersAccessPageTree({ page, runtime, }
53
53
  { key: "grantedAt", fieldKey: "grantedAt", title: labels.columns.grantedAt, renderer: "datetime", sizing: { mode: "content" } },
54
54
  ],
55
55
  emptyState: { title: labels.empty.addons },
56
+ footer: {
57
+ template: labels.footers.addons,
58
+ values: [{ key: "addons", value: { source: "core", fieldKey: "totalRows" } }],
59
+ align: "start",
60
+ },
56
61
  },
57
62
  features: {
58
63
  pagination: { enabled: false },
@@ -97,6 +102,8 @@ export async function buildPhiDefaultAdminUsersAccessPageTree({ page, runtime, }
97
102
  source: { providerKey: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess, resourceKey: RESOURCES.retention },
98
103
  presentation: {
99
104
  controlSize: "small",
105
+ // The heading names the one value; the panel says what it is for.
106
+ footerOmitted: "One setting edited in its cell: there is nothing to count.",
100
107
  layout: { mode: "auto", overflowX: "auto" },
101
108
  columns: [{
102
109
  key: "days",
@@ -140,6 +147,14 @@ export async function buildPhiDefaultAdminUsersAccessPageTree({ page, runtime, }
140
147
  { key: "fields", fieldKey: "fields", title: labels.columns.logFields, ...fieldTags },
141
148
  ],
142
149
  emptyState: { title: labels.empty.log },
150
+ footer: {
151
+ template: labels.footers.log,
152
+ values: [
153
+ { key: "entries", value: { source: "core", fieldKey: "pageRows" } },
154
+ { key: "page", value: { source: "core", fieldKey: "page" } },
155
+ ],
156
+ align: "start",
157
+ },
143
158
  },
144
159
  features: {
145
160
  pagination: { enabled: true, pageSize: 25, pageSizes: [25, 50, 100] },
@@ -619,6 +619,11 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
619
619
  { key: "userAgent", fieldKey: "userAgent", title: widgetLabels.columns.userAgent, sizing: { mode: "fill" } },
620
620
  ],
621
621
  emptyState: { title: widgetLabels.history.empty, description: "" },
622
+ footer: {
623
+ template: widgetLabels.history.footer,
624
+ values: [{ key: "logins", value: { source: "core", fieldKey: "totalRows" } }],
625
+ align: "start",
626
+ },
622
627
  },
623
628
  features: {
624
629
  pagination: { enabled: false, pageSize: 25 },
@@ -156,7 +156,6 @@ async function getPhiCmsRuntimeInfo({ apiBaseUrl, internalToken, siteKey, cookie
156
156
  (payload.user?.authorizationRevision ?? 0) >= 0
157
157
  ? payload.user?.authorizationRevision
158
158
  : 0,
159
- newsletterOptIn: payload.user?.newsletterOptIn ?? null,
160
159
  themeMode: viewerThemeMode,
161
160
  userName: payload.user?.name ?? null,
162
161
  userEmail: payload.user?.email ?? null,
@@ -594,9 +594,11 @@ h5.phi-typography, .phi-typography h5 {
594
594
  * Not while the table is empty. With no rows Ant Design has measured nothing and leaves the header's
595
595
  * `<colgroup>` without widths, so fixed layout took them from the header cells instead: every `content`
596
596
  * column got its 1% -- a dozen pixels, its title cut to one letter -- and the `fill` column the rest.
597
- * Without rows there is nothing to line up with, and `auto` gives each title its own width.
597
+ * Without rows there is nothing to line up with, and `auto` gives each title its own width. The same
598
+ * holds while the skeleton rows stand in for the rows (`--loading`): Ant Design measures no column of
599
+ * them either, and the header kept one title of a dozen.
598
600
  */
599
- .phi-table-control.phi-table-control--sticky-header:not(.phi-table-control--empty) [class~="ant-table-sticky-holder"] > table {
601
+ .phi-table-control.phi-table-control--sticky-header:not(.phi-table-control--empty):not(.phi-table-control--loading) [class~="ant-table-sticky-holder"] > table {
600
602
  table-layout: fixed !important;
601
603
  }
602
604
 
package/styles/layout.css CHANGED
@@ -353,11 +353,18 @@
353
353
  min-width: 0;
354
354
  }
355
355
 
356
+ /*
357
+ * A label breaks inside a word rather than run past its cell. The cell keeps to its tracks (`min-width:
358
+ * 0`), but the label's words are a flex item of their own, which is never narrower than its longest
359
+ * word: in the label column of a one-column dialog -- a third of 377px -- "Type the Area key to
360
+ * confirm" left the input a few pixels, and a longer word of a translation ran under the input.
361
+ */
356
362
  .phi-form-cell--label {
357
363
  display: flex;
358
364
  align-items: center;
359
365
  min-height: var(--phi-form-label-slot-height-compact);
360
366
  padding-inline-end: var(--phi-form-label-pad-compact);
367
+ overflow-wrap: anywhere;
361
368
  }
362
369
 
363
370
  .phi-form-cell--control {
@@ -1,4 +1,12 @@
1
1
  import type { AliasToken } from "antd/es/theme/interface";
2
2
  import type { PhiThemeMode } from "./phi-theme-presets";
3
3
  export declare function createPhiAntdThemeCssVarKey(scope: string, identity: unknown): string;
4
+ /**
5
+ * Ant Design's default seed for a token key, or `undefined` where the key is no seed. What a seed is put
6
+ * in place of when nobody states it, read here so the deep import into Ant Design's theme stays in this
7
+ * file.
8
+ */
9
+ export declare function readPhiAntdDefaultSeedToken(key: string): {
10
+ value: unknown;
11
+ } | undefined;
4
12
  export declare function resolvePhiAntdAliasTokens(mode: PhiThemeMode, token: Record<string, unknown>): AliasToken & Record<string, unknown>;
@@ -53,6 +53,16 @@ function withPhiDarkHoverSteps(seed, derived) {
53
53
  ...(seed.colorInfo ? { colorInfoHover: generateDarkColorPalettes(seed.colorInfo)[5] } : {}),
54
54
  };
55
55
  }
56
+ /**
57
+ * Ant Design's default seed for a token key, or `undefined` where the key is no seed. What a seed is put
58
+ * in place of when nobody states it, read here so the deep import into Ant Design's theme stays in this
59
+ * file.
60
+ */
61
+ export function readPhiAntdDefaultSeedToken(key) {
62
+ return Object.prototype.hasOwnProperty.call(seedToken, key)
63
+ ? { value: seedToken[key] }
64
+ : undefined;
65
+ }
56
66
  export function resolvePhiAntdAliasTokens(mode, token) {
57
67
  const mergedSeedToken = {
58
68
  ...seedToken,
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A colour as a palette states it, read into numbers so two spellings of one colour compare equal.
3
+ *
4
+ * A palette is written by hand, by a picker and by a Module, and each spells a colour its own way:
5
+ * `#1677FF` and `#1677ff`, `#fff` and `#ffffff`, `rgb(22, 119, 255)`. Comparing the strings told the
6
+ * Theme workspace that a colour the author had not changed was theirs.
7
+ */
8
+ export type PhiThemeRgba = {
9
+ r: number;
10
+ g: number;
11
+ b: number;
12
+ a: number;
13
+ };
14
+ export declare function parsePhiThemeColor(value: string): PhiThemeRgba | null;
15
+ /**
16
+ * Whether two values name the same colour: the same channels to the unit and the same alpha to the step
17
+ * an eight-digit hex can say. What does not read as a colour compares as text.
18
+ */
19
+ export declare function isSamePhiThemeColor(left: unknown, right: unknown): boolean;