@phis/ui 0.8.1 → 0.8.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 (223) hide show
  1. package/README.md +9 -2
  2. package/components/calendar/gregory-calendar-adapter-client.js +1 -0
  3. package/components/controls/phi-accordion-control.d.ts +6 -0
  4. package/components/controls/phi-accordion-control.js +8 -13
  5. package/components/controls/phi-background-control.js +2 -5
  6. package/components/controls/phi-builder-insert-picker-control-labels.d.ts +2 -0
  7. package/components/controls/phi-builder-insert-picker-control-labels.js +1 -0
  8. package/components/controls/phi-builder-insert-picker-control.js +10 -11
  9. package/components/controls/phi-cascader-control.d.ts +9 -3
  10. package/components/controls/phi-cascader-control.js +38 -10
  11. package/components/controls/phi-checkbox-group-control.d.ts +3 -1
  12. package/components/controls/phi-checkbox-group-control.js +2 -2
  13. package/components/controls/phi-collapse-control.d.ts +9 -2
  14. package/components/controls/phi-collapse-control.js +14 -2
  15. package/components/controls/phi-color-control.d.ts +3 -1
  16. package/components/controls/phi-color-control.js +2 -2
  17. package/components/controls/phi-color-field-control.d.ts +6 -1
  18. package/components/controls/phi-color-field-control.js +2 -2
  19. package/components/controls/phi-confirm-control.d.ts +1 -1
  20. package/components/controls/phi-confirm-control.js +71 -2
  21. package/components/controls/phi-confirm-dialog.js +2 -1
  22. package/components/controls/phi-date-picker-control.js +1 -1
  23. package/components/controls/phi-dimension-control.d.ts +3 -1
  24. package/components/controls/phi-dimension-control.js +2 -2
  25. package/components/controls/phi-geometry-control.js +1 -1
  26. package/components/controls/phi-length-control.d.ts +6 -1
  27. package/components/controls/phi-length-control.js +3 -2
  28. package/components/controls/phi-multi-select-control.d.ts +6 -1
  29. package/components/controls/phi-multi-select-control.js +3 -3
  30. package/components/controls/phi-segmented-control.d.ts +6 -1
  31. package/components/controls/phi-segmented-control.js +3 -3
  32. package/components/controls/phi-switch-control.d.ts +3 -1
  33. package/components/controls/phi-switch-control.js +3 -3
  34. package/components/controls/phi-table-control.d.ts +8 -1
  35. package/components/controls/phi-table-control.js +11 -5
  36. package/components/forms/compound-form-controls.js +16 -1
  37. package/components/layouts/clients/phi-collapsible-layout-client.js +2 -6
  38. package/components/media/media-upload-flow.d.ts +62 -5
  39. package/components/media/media-upload-flow.js +62 -24
  40. package/components/media/media-widget-labels.d.ts +2 -0
  41. package/components/media/media-widget-labels.js +2 -0
  42. package/components/media/phi-area-upload-widget.d.ts +44 -1
  43. package/components/media/phi-area-upload-widget.js +32 -7
  44. package/components/media/phi-asset-inspector-section.js +19 -1
  45. package/components/media/phi-media-upload.d.ts +10 -3
  46. package/components/media/phi-media-upload.js +11 -8
  47. package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -0
  48. package/components/shell/phi-builder-icon.js +9 -1
  49. package/components/shell/phi-widget-icon.js +1 -0
  50. package/components/tables/phi-table-surface.d.ts +25 -0
  51. package/components/tables/phi-table-surface.js +25 -0
  52. package/components/widgets/builder/phi-static-rows-editor.js +4 -1
  53. package/components/widgets/client/html-editor-link-node.d.ts +12 -0
  54. package/components/widgets/client/html-editor-link-node.js +60 -0
  55. package/components/widgets/client/html-editor.js +10 -6
  56. package/components/widgets/client/shared/phi-choice-controller.d.ts +8 -1
  57. package/components/widgets/client/shared/phi-choice-controller.js +16 -1
  58. package/components/widgets/client/shared/phi-collection-view-binding.js +33 -26
  59. package/components/widgets/config/choice-shared.d.ts +2 -0
  60. package/components/widgets/config/choice-shared.js +1 -0
  61. package/components/widgets/config/image-variant-options.d.ts +4 -1
  62. package/components/widgets/config/image-variant-options.js +27 -14
  63. package/components/widgets/inspector-field-row.d.ts +14 -1
  64. package/components/widgets/inspector-field-row.js +21 -1
  65. package/components/widgets/label-sets/builder-chrome.js +2 -0
  66. package/components/widgets/label-sets/inspector.js +10 -0
  67. package/components/widgets/label-sets/security.js +2 -0
  68. package/components/widgets/label-types/inspector.d.ts +5 -0
  69. package/components/widgets/label-types/inspector.js +5 -0
  70. package/components/widgets/label-types/security.d.ts +2 -0
  71. package/components/widgets/signals/signal-endpoint-list.js +4 -1
  72. package/constants/cms-widget-types.d.ts +1 -0
  73. package/constants/cms-widget-types.js +3 -0
  74. package/constants/runtime-module-ownership.js +1 -0
  75. package/gateway/site-proxy.d.ts +12 -0
  76. package/gateway/site-proxy.js +20 -0
  77. package/helpers/cms-inspector-drawer.d.ts +15 -0
  78. package/helpers/cms-inspector-drawer.js +37 -0
  79. package/helpers/cms-layout-defaults.js +1 -1
  80. package/helpers/preset-tree-contract-check.js +56 -0
  81. package/helpers/text-source.js +2 -0
  82. package/net/phi-next-proxy.d.ts +7 -0
  83. package/net/phi-next-proxy.js +1 -1
  84. package/package.json +27 -14
  85. package/plugins/runtime-modules/accounting/definition.d.ts +1 -1
  86. package/plugins/runtime-modules/accounting/definition.js +0 -1
  87. package/plugins/runtime-modules/accounting/ids.d.ts +4 -4
  88. package/plugins/runtime-modules/accounting/ids.js +4 -2
  89. package/plugins/runtime-modules/accounting/module.d.ts +1 -1
  90. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +2 -1
  91. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +5 -4
  92. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +80 -38
  93. package/plugins/runtime-modules/admin/definition.d.ts +1 -1
  94. package/plugins/runtime-modules/admin/definition.js +0 -1
  95. package/plugins/runtime-modules/admin/module.d.ts +1 -1
  96. package/plugins/runtime-modules/app/definition.d.ts +1 -1
  97. package/plugins/runtime-modules/app/definition.js +0 -1
  98. package/plugins/runtime-modules/app/module.d.ts +1 -1
  99. package/plugins/runtime-modules/area-base-definition.d.ts +19 -1
  100. package/plugins/runtime-modules/area-base-definition.js +18 -0
  101. package/plugins/runtime-modules/area-contributions/admin.d.ts +1 -1
  102. package/plugins/runtime-modules/area-contributions/admin.js +2 -0
  103. package/plugins/runtime-modules/area-definitions.d.ts +8 -8
  104. package/plugins/runtime-modules/area-definitions.js +4 -3
  105. package/plugins/runtime-modules/area-root-route.d.ts +8 -0
  106. package/plugins/runtime-modules/area-root-route.js +11 -1
  107. package/plugins/runtime-modules/asset/labels.js +4 -0
  108. package/plugins/runtime-modules/asset/metadata-form.d.ts +0 -28
  109. package/plugins/runtime-modules/asset/metadata-form.js +6 -10
  110. package/plugins/runtime-modules/asset/services/options.d.ts +3 -2
  111. package/plugins/runtime-modules/asset/services/options.js +4 -3
  112. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -1
  113. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +3 -3
  114. package/plugins/runtime-modules/auth/widgets/security/client.js +2 -2
  115. package/plugins/runtime-modules/avatar/addresses.d.ts +1 -1
  116. package/plugins/runtime-modules/builder/addresses.d.ts +1 -1
  117. package/plugins/runtime-modules/builder/addresses.js +1 -1
  118. package/plugins/runtime-modules/builder/area-settings-form.js +1 -1
  119. package/plugins/runtime-modules/builder/clients/inspector-condition-group.d.ts +16 -0
  120. package/plugins/runtime-modules/builder/clients/inspector-condition-group.js +9 -0
  121. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +97 -10
  122. package/plugins/runtime-modules/builder/clients/pages-header.js +7 -6
  123. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  124. package/plugins/runtime-modules/builder/controller/workspace-controller.js +7 -4
  125. package/plugins/runtime-modules/builder/definition.d.ts +1 -1
  126. package/plugins/runtime-modules/builder/definition.js +0 -1
  127. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +10 -4
  128. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -8
  129. package/plugins/runtime-modules/builder/page-meta-form.js +5 -2
  130. package/plugins/runtime-modules/builder/plugin-meta-labels.js +8 -0
  131. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +4 -2
  132. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +20 -13
  133. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +8 -1
  134. package/plugins/runtime-modules/cdn/authoring-widgets.d.ts +3 -0
  135. package/plugins/runtime-modules/cdn/authoring-widgets.js +7 -0
  136. package/plugins/runtime-modules/cdn/authoring.d.ts +1 -0
  137. package/plugins/runtime-modules/cdn/authoring.js +8 -0
  138. package/plugins/runtime-modules/cdn/bytes.d.ts +5 -0
  139. package/plugins/runtime-modules/cdn/bytes.js +17 -0
  140. package/plugins/runtime-modules/cdn/client-data-providers.d.ts +7 -0
  141. package/plugins/runtime-modules/cdn/client-data-providers.js +9 -0
  142. package/plugins/runtime-modules/cdn/data-providers.d.ts +134 -0
  143. package/plugins/runtime-modules/cdn/data-providers.js +117 -0
  144. package/plugins/runtime-modules/cdn/definition.d.ts +140 -0
  145. package/plugins/runtime-modules/cdn/definition.js +23 -0
  146. package/plugins/runtime-modules/cdn/ids.d.ts +18 -0
  147. package/plugins/runtime-modules/cdn/ids.js +20 -0
  148. package/plugins/runtime-modules/cdn/module.d.ts +131 -0
  149. package/plugins/runtime-modules/cdn/module.js +4 -0
  150. package/plugins/runtime-modules/cdn/platform.d.ts +25 -0
  151. package/plugins/runtime-modules/cdn/platform.js +73 -0
  152. package/plugins/runtime-modules/cdn/presets.d.ts +2 -0
  153. package/plugins/runtime-modules/cdn/presets.js +20 -0
  154. package/plugins/runtime-modules/cdn/server.d.ts +1 -0
  155. package/plugins/runtime-modules/cdn/server.js +14 -0
  156. package/plugins/runtime-modules/cdn/services/table.d.ts +11 -0
  157. package/plugins/runtime-modules/cdn/services/table.js +296 -0
  158. package/plugins/runtime-modules/cdn/services/upload.d.ts +20 -0
  159. package/plugins/runtime-modules/cdn/services/upload.js +146 -0
  160. package/plugins/runtime-modules/cdn/table-params.d.ts +10 -0
  161. package/plugins/runtime-modules/cdn/table-params.js +10 -0
  162. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.d.ts +95 -0
  163. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.js +156 -0
  164. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.d.ts +18 -0
  165. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +491 -0
  166. package/plugins/runtime-modules/cdn/widgets/upload/client.d.ts +12 -0
  167. package/plugins/runtime-modules/cdn/widgets/upload/client.js +138 -0
  168. package/plugins/runtime-modules/cdn/widgets/upload/config.d.ts +29 -0
  169. package/plugins/runtime-modules/cdn/widgets/upload/config.js +43 -0
  170. package/plugins/runtime-modules/cdn/widgets/upload/label-types.d.ts +24 -0
  171. package/plugins/runtime-modules/cdn/widgets/upload/label-types.js +1 -0
  172. package/plugins/runtime-modules/cdn/widgets/upload/labels.d.ts +4 -0
  173. package/plugins/runtime-modules/cdn/widgets/upload/labels.js +72 -0
  174. package/plugins/runtime-modules/cdn/widgets/upload/plugin.d.ts +3 -0
  175. package/plugins/runtime-modules/cdn/widgets/upload/plugin.js +7 -0
  176. package/plugins/runtime-modules/cdn/widgets/upload/server.d.ts +8 -0
  177. package/plugins/runtime-modules/cdn/widgets/upload/server.js +17 -0
  178. package/plugins/runtime-modules/cdn/widgets.d.ts +2 -0
  179. package/plugins/runtime-modules/cdn/widgets.js +13 -0
  180. package/plugins/runtime-modules/client-authoring-providers/admin.d.ts +1 -1
  181. package/plugins/runtime-modules/client-authoring-providers/admin.js +6 -0
  182. package/plugins/runtime-modules/client-manifests/admin.js +11 -1
  183. package/plugins/runtime-modules/core/authoring-widgets.js +2 -1
  184. package/plugins/runtime-modules/core/messaging/label-defaults.d.ts +49 -0
  185. package/plugins/runtime-modules/core/messaging/label-defaults.js +48 -0
  186. package/plugins/runtime-modules/core/messaging/labels.d.ts +2 -28
  187. package/plugins/runtime-modules/core/messaging/labels.js +52 -23
  188. package/plugins/runtime-modules/core/widgets/card/config.d.ts +14 -0
  189. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  190. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +3 -1
  191. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +14 -0
  192. package/plugins/runtime-modules/core/widgets/description/config.d.ts +14 -0
  193. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +14 -0
  194. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +14 -0
  195. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +14 -0
  196. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +14 -0
  197. package/plugins/runtime-modules/core/widgets/result/config.d.ts +14 -0
  198. package/plugins/runtime-modules/core/widgets/select-box/client.js +13 -4
  199. package/plugins/runtime-modules/core/widgets/select-box/config.js +1 -0
  200. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +14 -0
  201. package/plugins/runtime-modules/core/widgets/table/client.js +17 -8
  202. package/plugins/runtime-modules/core/widgets/table/config.d.ts +1 -1143
  203. package/plugins/runtime-modules/core/widgets/table/config.js +144 -125
  204. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +2 -0
  205. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +76 -0
  206. package/plugins/runtime-modules/core/widgets/thread-conversation/client.d.ts +44 -1
  207. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +28 -13
  208. package/plugins/runtime-modules/editor/definition.d.ts +1 -1
  209. package/plugins/runtime-modules/editor/definition.js +0 -1
  210. package/plugins/runtime-modules/editor/module.d.ts +1 -1
  211. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +16 -8
  212. package/plugins/runtime-modules/public/definition.d.ts +1 -1
  213. package/plugins/runtime-modules/public/definition.js +0 -1
  214. package/plugins/runtime-modules/public/module.d.ts +1 -1
  215. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +109 -86
  216. package/plugins/runtime-modules/threads/controller/client.js +10 -12
  217. package/plugins/runtime-modules/threads/controller/definition.d.ts +6 -0
  218. package/plugins/runtime-modules/threads/controller/definition.js +17 -6
  219. package/styles/controls.css +49 -1
  220. package/styles/layout.css +3 -2
  221. package/types/calendar.d.ts +5 -0
  222. package/types/cms-plugins.d.ts +30 -10
  223. package/types/table-widget.d.ts +8 -2
@@ -2,6 +2,7 @@ import "server-only";
2
2
  import { PHI_TR_CTX_WEB_UI_LABEL } from "../../../../gateway/tr";
3
3
  import { definePhiRuntimeModuleLabelSet, definePhiMessageLabel, getPhiLabelSet } from "../../../../gateway/label-set";
4
4
  import { PHI_CORE_RUNTIME_MODULE_IDENTITY } from "../ids";
5
+ import { PHI_THREAD_CONVERSATION_DEFAULT_LABELS } from "./label-defaults";
5
6
  /*
6
7
  * What a conversation and the reply to it say, wherever they are placed.
7
8
  *
@@ -9,26 +10,27 @@ import { PHI_CORE_RUNTIME_MODULE_IDENTITY } from "../ids";
9
10
  * a group's, Support's, an add-on's -- places the same conversation and the same reply, and reads them
10
11
  * in the same words. A Module says what its own Page is called; it does not say "Reply" again.
11
12
  */
13
+ const D = PHI_THREAD_CONVERSATION_DEFAULT_LABELS;
12
14
  const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_CORE_RUNTIME_MODULE_IDENTITY, {
13
15
  key: "widget:thread-conversation",
14
16
  ctx: PHI_TR_CTX_WEB_UI_LABEL,
15
17
  labels: {
16
- no_thread_text: definePhiMessageLabel("Choose a conversation to read."),
17
- loading_text: definePhiMessageLabel("Loading the conversation."),
18
- empty_text: definePhiMessageLabel("Nothing has been said here yet."),
19
- subject_fallback: "Conversation",
20
- older_label: "Show earlier messages",
21
- archived_label: "Archived",
22
- locked_label: "Locked",
18
+ no_thread_text: definePhiMessageLabel(D.noThreadText),
19
+ loading_text: definePhiMessageLabel(D.loadingText),
20
+ empty_text: definePhiMessageLabel(D.emptyText),
21
+ subject_fallback: D.subjectFallback,
22
+ older_label: D.olderLabel,
23
+ archived_label: D.archivedLabel,
24
+ locked_label: D.lockedLabel,
23
25
  /*
24
26
  * Where the Reply would have been. A locked conversation takes no new message from anybody, so the
25
27
  * way to write one is not offered at all rather than offered and then refused.
26
28
  */
27
- locked_text: definePhiMessageLabel("This conversation is locked. Nobody can write in it until it is unlocked."),
29
+ locked_text: definePhiMessageLabel(D.lockedText),
28
30
  /* The action in the conversation's heading that opens a reply. */
29
- reply_label: "Reply",
31
+ reply_label: D.replyLabel,
30
32
  /* Before the names of who is in it, beneath a heading that is the subject. */
31
- participants_label: "In this conversation",
33
+ participants_label: D.participantsLabel,
32
34
  /*
33
35
  * Said on the note itself rather than in a legend somewhere.
34
36
  *
@@ -36,7 +38,7 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
36
38
  * must never be in doubt is which of the two a message is. A marker on the message is the only
37
39
  * place a person actually looks while writing the next one.
38
40
  */
39
- internal_label: "Internal note",
41
+ internal_label: D.internalLabel,
40
42
  /*
41
43
  * One word for the control, because there is one control.
42
44
  *
@@ -44,8 +46,8 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
44
46
  * only appears where that language can actually be produced. A picker beside every message would have
45
47
  * been a second control on every row for the sake of reading one message in a third language.
46
48
  */
47
- translate_label: "Translate",
48
- original_label: "Show the original",
49
+ translate_label: D.translateLabel,
50
+ original_label: D.originalLabel,
49
51
  /*
50
52
  * Said on the translation, because an unmarked one reads as what the person wrote.
51
53
  *
@@ -54,17 +56,30 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
54
56
  * beside it as its own name, where the provider reported one -- not woven into a sentence, which would
55
57
  * fix a word order that only holds in English.
56
58
  */
57
- machine_translation_label: "Machine translation",
58
- translation_error_text: definePhiMessageLabel("The translation could not be fetched."),
59
- redacted_text: definePhiMessageLabel("This message was withdrawn."),
60
- withheld_text: definePhiMessageLabel("This message is not shown to you."),
61
- system_author_label: "System",
59
+ machine_translation_label: D.machineTranslationLabel,
60
+ translation_error_text: definePhiMessageLabel(D.feedback.errorTranslation),
61
+ redacted_text: definePhiMessageLabel(D.redactedText),
62
+ withheld_text: definePhiMessageLabel(D.withheldText),
63
+ system_author_label: D.systemAuthorLabel,
62
64
  /* A projection carries a display name or nothing; nothing is still somebody. */
63
- unnamed_author_label: "Someone",
64
- error_title: "That did not work",
65
- error_generic: definePhiMessageLabel("The conversation could not be loaded."),
66
- error_network: definePhiMessageLabel("The site could not be reached."),
67
- error_not_found: definePhiMessageLabel("This conversation is not there, or is not yours to read."),
65
+ unnamed_author_label: D.unnamedAuthorLabel,
66
+ error_title: D.feedback.errorTitle,
67
+ error_generic: definePhiMessageLabel(D.feedback.errorGeneric),
68
+ error_network: definePhiMessageLabel(D.feedback.errorNetwork),
69
+ error_not_found: definePhiMessageLabel(D.feedback.errorNotFound),
70
+ // The Builder canvas's made-up conversation (`label-defaults.ts`, `sample`).
71
+ sample_tag: D.sample.tag,
72
+ sample_subject: D.sample.subject,
73
+ sample_member_name: D.sample.memberName,
74
+ sample_staff_name: D.sample.staffName,
75
+ sample_question: definePhiMessageLabel(D.sample.question),
76
+ sample_note: definePhiMessageLabel(D.sample.note),
77
+ sample_answer: definePhiMessageLabel(D.sample.answer),
78
+ sample_answer_attachment: D.sample.answerAttachment,
79
+ sample_file_call: definePhiMessageLabel(D.sample.fileCall),
80
+ sample_file_address: definePhiMessageLabel(D.sample.fileAddress),
81
+ sample_file_contract: definePhiMessageLabel(D.sample.fileContract),
82
+ sample_file_attachment: D.sample.fileAttachment,
68
83
  },
69
84
  });
70
85
  /**
@@ -129,5 +144,19 @@ export async function getPhiThreadConversationLabels(options) {
129
144
  errorNotFound: labels.error_not_found,
130
145
  errorTranslation: labels.translation_error_text,
131
146
  },
147
+ sample: {
148
+ tag: labels.sample_tag,
149
+ subject: labels.sample_subject,
150
+ memberName: labels.sample_member_name,
151
+ staffName: labels.sample_staff_name,
152
+ question: labels.sample_question,
153
+ note: labels.sample_note,
154
+ answer: labels.sample_answer,
155
+ answerAttachment: labels.sample_answer_attachment,
156
+ fileCall: labels.sample_file_call,
157
+ fileAddress: labels.sample_file_address,
158
+ fileContract: labels.sample_file_contract,
159
+ fileAttachment: labels.sample_file_attachment,
160
+ },
132
161
  };
133
162
  }
@@ -474,6 +474,20 @@ export declare const PHI_CARD_WIDGET_DEFINITION: {
474
474
  editorPlacement?: "inspector" | "geometry" | "toolbar";
475
475
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
476
476
  heading?: string;
477
+ } & {
478
+ type: "condition-group";
479
+ conditionFields: PhiCmsConfigField[];
480
+ defaultCondition: Record<string, unknown>;
481
+ addLabel?: string;
482
+ emptyLabel?: string;
483
+ }) | ({
484
+ key: string;
485
+ label: string;
486
+ description?: string;
487
+ required?: boolean;
488
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
489
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
490
+ heading?: string;
477
491
  } & {
478
492
  type: "surface";
479
493
  tone?: false;
@@ -381,7 +381,7 @@ export function PhiAssetCollectionViewBinding({ config, binding, labels: rawLabe
381
381
  pageSize: config.initialQuery?.pageSize ?? features.pagination?.pageSize ?? 20,
382
382
  filters: { ...(config.initialQuery?.filters ?? {}) },
383
383
  }) })) : null, features.tools.reload ? (_jsx(PhiButtonControl, { ariaLabel: labels.tool.reloadLabel, tooltip: labels.tool.reloadLabel, icon: resolvePhiButtonIcon("reload"), size: controlSize, onClick: binding.reload })) : null] })) : null;
384
- const awaitingInitialPayload = binding.data == null && !state.error;
384
+ const awaitingInitialPayload = binding.loading && binding.data == null && !state.error;
385
385
  const body = state.error ? null : awaitingInitialPayload ? (_jsx(PhiMediaAssetCollectionSkeletonControl, { mode: mode, gap: gap, minColumnWidth: minColumnWidth })) : state.assets.length === 0 ? (_jsx(PhiEmptyControl, { description: presentation.emptyDescription ?? labels.grid.emptyDescription })) : undefined;
386
386
  /*
387
387
  * The upload panel: the Media library's wall, into the resolved Folder path where the placement names
@@ -168,6 +168,8 @@ export function PhiSiteAddressCollectionViewBinding({ config, binding, widgetId,
168
168
  const emptyDescription = typeof binding.data?.meta?.emptyDescription === "string" && binding.data.meta.emptyDescription.trim()
169
169
  ? binding.data.meta.emptyDescription
170
170
  : presentation.emptyDescription ?? labels.empty;
171
- const body = binding.data == null ? (binding.error ? null : _jsx(PhiCollectionViewSkeletonControl, { mode: mode, gap: gap, minColumnWidth: minColumnWidth, count: 2 })) : tiles.length === 0 ? (_jsx(PhiEmptyControl, { description: emptyDescription })) : undefined;
171
+ const body = binding.data == null ? (binding.loading && !binding.error
172
+ ? _jsx(PhiCollectionViewSkeletonControl, { mode: mode, gap: gap, minColumnWidth: minColumnWidth, count: 3 })
173
+ : null) : tiles.length === 0 ? (_jsx(PhiEmptyControl, { description: emptyDescription })) : undefined;
172
174
  return (_jsx(PhiCollectionViewControl, { title: presentation.title, description: presentation.description, toolbar: features.tools.mode === "external" ? null : toolbar, diagnostics: binding.error && binding.data != null ? _jsx(PhiAlertControl, { level: "error", title: binding.error }) : null, body: body, items: items, mode: mode, ...(gap ? { gap } : {}), minColumnWidth: minColumnWidth, pagination: null }));
173
175
  }
@@ -359,6 +359,20 @@ export declare const PHI_COMMAND_TOOLBAR_WIDGET_DEFINITION: {
359
359
  editorPlacement?: "inspector" | "geometry" | "toolbar";
360
360
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
361
361
  heading?: string;
362
+ } & {
363
+ type: "condition-group";
364
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
365
+ defaultCondition: Record<string, unknown>;
366
+ addLabel?: string;
367
+ emptyLabel?: string;
368
+ }) | ({
369
+ key: string;
370
+ label: string;
371
+ description?: string;
372
+ required?: boolean;
373
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
374
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
375
+ heading?: string;
362
376
  } & {
363
377
  type: "surface";
364
378
  tone?: false;
@@ -325,6 +325,20 @@ export declare const PHI_DESCRIPTION_WIDGET_DEFINITION: {
325
325
  editorPlacement?: "inspector" | "geometry" | "toolbar";
326
326
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
327
327
  heading?: string;
328
+ } & {
329
+ type: "condition-group";
330
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
331
+ defaultCondition: Record<string, unknown>;
332
+ addLabel?: string;
333
+ emptyLabel?: string;
334
+ }) | ({
335
+ key: string;
336
+ label: string;
337
+ description?: string;
338
+ required?: boolean;
339
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
340
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
341
+ heading?: string;
328
342
  } & {
329
343
  type: "surface";
330
344
  tone?: false;
@@ -368,6 +368,20 @@ export declare const PHI_ENTRY_LIST_WIDGET_DEFINITION: {
368
368
  editorPlacement?: "inspector" | "geometry" | "toolbar";
369
369
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
370
370
  heading?: string;
371
+ } & {
372
+ type: "condition-group";
373
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
374
+ defaultCondition: Record<string, unknown>;
375
+ addLabel?: string;
376
+ emptyLabel?: string;
377
+ }) | ({
378
+ key: string;
379
+ label: string;
380
+ description?: string;
381
+ required?: boolean;
382
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
383
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
384
+ heading?: string;
371
385
  } & {
372
386
  type: "surface";
373
387
  tone?: false;
@@ -372,6 +372,20 @@ export declare const PHI_FLOAT_BUTTON_WIDGET_DEFINITION: {
372
372
  editorPlacement?: "inspector" | "geometry" | "toolbar";
373
373
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
374
374
  heading?: string;
375
+ } & {
376
+ type: "condition-group";
377
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
378
+ defaultCondition: Record<string, unknown>;
379
+ addLabel?: string;
380
+ emptyLabel?: string;
381
+ }) | ({
382
+ key: string;
383
+ label: string;
384
+ description?: string;
385
+ required?: boolean;
386
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
387
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
388
+ heading?: string;
375
389
  } & {
376
390
  type: "surface";
377
391
  tone?: false;
@@ -339,6 +339,20 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
339
339
  editorPlacement?: "inspector" | "geometry" | "toolbar";
340
340
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
341
341
  heading?: string;
342
+ } & {
343
+ type: "condition-group";
344
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
345
+ defaultCondition: Record<string, unknown>;
346
+ addLabel?: string;
347
+ emptyLabel?: string;
348
+ }) | ({
349
+ key: string;
350
+ label: string;
351
+ description?: string;
352
+ required?: boolean;
353
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
354
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
355
+ heading?: string;
342
356
  } & {
343
357
  type: "surface";
344
358
  tone?: false;
@@ -390,6 +390,20 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
390
390
  editorPlacement?: "inspector" | "geometry" | "toolbar";
391
391
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
392
392
  heading?: string;
393
+ } & {
394
+ type: "condition-group";
395
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
396
+ defaultCondition: Record<string, unknown>;
397
+ addLabel?: string;
398
+ emptyLabel?: string;
399
+ }) | ({
400
+ key: string;
401
+ label: string;
402
+ description?: string;
403
+ required?: boolean;
404
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
405
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
406
+ heading?: string;
393
407
  } & {
394
408
  type: "surface";
395
409
  tone?: false;
@@ -333,6 +333,20 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
333
333
  editorPlacement?: "inspector" | "geometry" | "toolbar";
334
334
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
335
335
  heading?: string;
336
+ } & {
337
+ type: "condition-group";
338
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
339
+ defaultCondition: Record<string, unknown>;
340
+ addLabel?: string;
341
+ emptyLabel?: string;
342
+ }) | ({
343
+ key: string;
344
+ label: string;
345
+ description?: string;
346
+ required?: boolean;
347
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
348
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
349
+ heading?: string;
336
350
  } & {
337
351
  type: "surface";
338
352
  tone?: false;
@@ -20,14 +20,23 @@ export function PhiSelectBoxWidget({ config, sender, signalsEnabled = true, valu
20
20
  sender,
21
21
  });
22
22
  const fill = mode === "control" || mode === "config";
23
+ /*
24
+ * As wide as the box it stands in. On a Page that box is the Widget's slot frame, which is as wide as
25
+ * its content unless the placement gives it a width (`size`) -- so an unsized select keeps its own
26
+ * width, at least four control heights, and a sized one fills what it was given, label included.
27
+ */
23
28
  const controlStyle = {
24
29
  minWidth: fill ? 0 : minWidth,
25
- width: fill ? "100%" : undefined,
30
+ width: "100%",
26
31
  };
32
+ // Cleared, the select answers nothing; the Control holds and announces that as the empty value.
27
33
  const handleChange = (nextValue) => {
28
- choice.publish(nextValue);
29
- onChange?.(nextValue);
34
+ const held = nextValue ?? "";
35
+ choice.publish(held);
36
+ onChange?.(held);
30
37
  };
31
- const control = (_jsx(PhiSelectControl, { label: resolvedConfig.label, description: resolvedConfig.description, value: choice.value, placeholder: resolvedConfig.placeholder, disabled: choice.disabled, readOnly: choice.readOnly, size: resolvedConfig.controlSize, presentation: resolvedConfig.presentation, allowCustom: resolvedConfig.allowCustom, options: choice.options, onFocus: choice.emitFocus, onBlur: choice.emitBlur, onChange: handleChange, style: controlStyle }));
38
+ const control = (_jsx(PhiSelectControl, { label: resolvedConfig.label, description: resolvedConfig.description,
39
+ // Nothing chosen shows the placeholder, not an empty choice.
40
+ value: choice.value === "" ? undefined : choice.value, placeholder: resolvedConfig.placeholder, disabled: choice.disabled, readOnly: choice.readOnly, size: resolvedConfig.controlSize, presentation: resolvedConfig.presentation, allowCustom: resolvedConfig.allowCustom, allowClear: resolvedConfig.allowClear, options: choice.options, onSearch: choice.onSearch, filterOptionsLocally: choice.filterOptionsLocally, onFocus: choice.emitFocus, onBlur: choice.emitBlur, onChange: handleChange, style: controlStyle }));
32
41
  return control;
33
42
  }
@@ -32,6 +32,7 @@ export const PHI_SELECT_BOX_WIDGET_DEFINITION = {
32
32
  ],
33
33
  },
34
34
  { key: "allowCustom", type: "boolean", label: "Allow Custom Values" },
35
+ { key: "allowClear", type: "boolean", label: "Allow Clear" },
35
36
  ...buildPhiChoiceControlOptionFields("toolbar"),
36
37
  ...PHI_CHOICE_CONTROL_CONFIG_FIELDS,
37
38
  ],
@@ -349,6 +349,20 @@ export declare const PHI_SIMPLE_TEXT_WIDGET_DEFINITION: {
349
349
  editorPlacement?: "inspector" | "geometry" | "toolbar";
350
350
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
351
351
  heading?: string;
352
+ } & {
353
+ type: "condition-group";
354
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
355
+ defaultCondition: Record<string, unknown>;
356
+ addLabel?: string;
357
+ emptyLabel?: string;
358
+ }) | ({
359
+ key: string;
360
+ label: string;
361
+ description?: string;
362
+ required?: boolean;
363
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
364
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
365
+ heading?: string;
352
366
  } & {
353
367
  type: "surface";
354
368
  tone?: false;
@@ -685,17 +685,19 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
685
685
  return pageSize > 0 ? Math.ceil(total / pageSize) : 0;
686
686
  }, [resolvedQuery.page, resolvedQuery.pageSize, rows.length, selectedRowIdentities.length, summary, total]);
687
687
  const footer = useMemo(() => {
688
- if (!presentation.footer)
688
+ if (presentation.header === false || presentation.footerOmitted)
689
689
  return undefined;
690
+ if (!presentation.footer)
691
+ return { content: "" };
690
692
  // The first variant whose value holds says the line instead; see `PhiTableFooterVariant`.
691
693
  const variant = presentation.footer.variants?.find(({ when }) => {
692
694
  const held = Boolean(resolveSummaryValue({ key: "when", value: when.value }));
693
695
  return when.operator === "truthy" ? held : !held;
694
696
  });
695
697
  const template = variant?.template ?? presentation.footer.template;
696
- // A variant with an empty template takes the footer away rather than drawing an empty bar.
698
+ // An empty line keeps the Table's closing bar; only footerOmitted removes it.
697
699
  if (!template.trim())
698
- return undefined;
700
+ return { align: presentation.footer.align, content: "" };
699
701
  const values = variant ? variant.values ?? [] : presentation.footer.values;
700
702
  return {
701
703
  align: presentation.footer.align,
@@ -704,7 +706,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
704
706
  return typeof value === "number" ? value : value == null ? "—" : String(value);
705
707
  })),
706
708
  };
707
- }, [presentation.footer, resolveSummaryValue]);
709
+ }, [presentation.footer, presentation.footerOmitted, presentation.header, resolveSummaryValue]);
708
710
  const tableSummary = useMemo(() => presentation.summary ? {
709
711
  ...presentation.summary,
710
712
  rows: presentation.summary.rows.map((row) => ({
@@ -942,7 +944,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
942
944
  afterRowIdentity: null,
943
945
  }).catch(() => undefined).finally(clearPhiDataDragPayload);
944
946
  }
945
- : undefined, loading: effectiveLoading, loadingRows: presentation.loadingRows, bordered: presentation.borders, striped: presentation.row?.striped, showHeader: presentation.header, stickyHeader: presentation.stickyHeader !== false, size: resolvedControlSize, emptyText: (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [_jsx(PhiTypographyControl, { strong: true, children: refusal?.message ?? presentation.emptyState?.title ?? labels.emptyTitle }), emptyDescription && !refusal ? _jsx(PhiTypographyControl, { type: "secondary", children: emptyDescription }) : null] })), layout: presentation.layout, footer: footer, summary: tableSummary })] }));
947
+ : undefined, loading: effectiveLoading, loadingRows: presentation.loadingRows, bordered: presentation.borders, surface: presentation.surface, striped: presentation.row?.striped, showHeader: presentation.header, stickyHeader: presentation.stickyHeader !== false, size: resolvedControlSize, emptyText: (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [_jsx(PhiTypographyControl, { strong: true, children: refusal?.message ?? presentation.emptyState?.title ?? labels.emptyTitle }), emptyDescription && !refusal ? _jsx(PhiTypographyControl, { type: "secondary", children: emptyDescription }) : null] })), layout: presentation.layout, footer: footer, summary: tableSummary })] }));
946
948
  }
947
949
  function TableAction({ action, disabled = false, disabledReason, templateValue, size, onActivate }) {
948
950
  const icon = action.icon ? resolvePhiButtonIcon(action.icon) : null;
@@ -969,7 +971,13 @@ function TableAction({ action, disabled = false, disabledReason, templateValue,
969
971
  if (action.execution === "link" && action.link) {
970
972
  return disabled ? content : _jsx(PhiLink, { href: action.link.href, external: action.link.external, newTab: action.link.newTab, children: content });
971
973
  }
972
- return action.confirm && !disabled ? (_jsx(PhiConfirmControl, { title: formatTableActionTemplate(action.confirm.title, templateValue), description: action.confirm.alert ? (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [action.confirm.description ? (_jsx("span", { children: formatTableActionTemplate(action.confirm.description, templateValue) })) : null, _jsx(PhiAlertControl, { level: action.confirm.alert.level, title: formatTableActionTemplate(action.confirm.alert.title, templateValue), description: formatTableActionTemplate(action.confirm.alert.description, templateValue) })] })) : formatTableActionTemplate(action.confirm.description, templateValue), confirmLabel: action.confirm.okText, cancelLabel: action.confirm.cancelText, danger: danger, placement: "left", onConfirm: onActivate, children: content })) : content;
974
+ /*
975
+ * Below the button, its right edge on the button's: the actions stand at a Table's right end, and a
976
+ * confirmation beside them had nowhere to go on a phone -- placed to the left it ran past the window's
977
+ * left edge, and Ant Design neither moves such a box sideways nor finds room for it on the right. Above
978
+ * or below, it is flipped to where there is room and shifted along the edge into the window.
979
+ */
980
+ return action.confirm && !disabled ? (_jsx(PhiConfirmControl, { title: formatTableActionTemplate(action.confirm.title, templateValue), description: action.confirm.alert ? (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [action.confirm.description ? (_jsx("span", { children: formatTableActionTemplate(action.confirm.description, templateValue) })) : null, _jsx(PhiAlertControl, { level: action.confirm.alert.level, title: formatTableActionTemplate(action.confirm.alert.title, templateValue), description: formatTableActionTemplate(action.confirm.alert.description, templateValue) })] })) : formatTableActionTemplate(action.confirm.description, templateValue), confirmLabel: action.confirm.okText, cancelLabel: action.confirm.cancelText, danger: danger, placement: "bottomRight", onConfirm: onActivate, children: content })) : content;
973
981
  }
974
982
  function TableBindingTool({ field, tool, sourceConfig, value, size, onChange, onCreate }) {
975
983
  const [popoverOpen, setPopoverOpen] = useState(false);
@@ -1037,8 +1045,9 @@ function TableFilter({ filter, field, sourceConfig, value, size, onChange, label
1037
1045
  }
1038
1046
  if (filter.type === "boolean") {
1039
1047
  if (filter.control === "switch") {
1040
- // A switch answers yes or no and nothing else, so an absent value reads as off.
1041
- return _jsx(PhiSwitchControl, { checked: value === true, size: size === "large" ? undefined : size, onChange: (next) => onChange(next) });
1048
+ // A switch answers yes or no and nothing else, so an absent value reads as off. Its label stands
1049
+ // beside it as text, not as its name -- so the filter's label is also its accessible name.
1050
+ return _jsx(PhiSwitchControl, { checked: value === true, size: size === "large" ? undefined : size, ariaLabel: filter.label, onChange: (next) => onChange(next) });
1042
1051
  }
1043
1052
  return _jsx(PhiSelectControl, { allowClear: true, value: typeof value === "boolean" ? String(value) : undefined, options: [{ value: "true", label: labels.yes }, { value: "false", label: labels.no }], size: size, placeholder: hiddenLabelPlaceholder, onChange: (next) => onChange(next === undefined ? undefined : next === "true"), style: { minWidth: 140 } });
1044
1053
  }