@phis/ui 0.6.4 → 0.6.6

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 (192) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +11 -2
  2. package/components/controls/phi-image-control.js +9 -1
  3. package/components/controls/phi-multi-select-control.js +4 -2
  4. package/components/controls/phi-options-provider.d.ts +1 -0
  5. package/components/controls/phi-options-provider.js +1 -0
  6. package/components/controls/phi-select-control.d.ts +21 -0
  7. package/components/controls/phi-select-control.js +2 -2
  8. package/components/controls/phi-status-dot-control.d.ts +15 -0
  9. package/components/controls/phi-status-dot-control.js +25 -0
  10. package/components/controls/phi-table-control.js +8 -1
  11. package/components/controls/phi-tree-control.js +5 -4
  12. package/components/controls/phi-tree-select-control.js +1 -0
  13. package/components/forms/auth-admin-settings-labels.d.ts +4 -0
  14. package/components/forms/auth-admin-settings-labels.js +11 -3
  15. package/components/forms/form-provider-contract.d.ts +1 -1
  16. package/components/forms/form-provider-contract.js +1 -1
  17. package/components/layouts/clients/phi-split-card-half.d.ts +4 -1
  18. package/components/layouts/clients/phi-split-card-half.js +2 -2
  19. package/components/layouts/clients/phi-split-card-layout-client.d.ts +6 -3
  20. package/components/layouts/clients/phi-split-card-layout-client.js +5 -3
  21. package/components/layouts/clients/phi-three-column-layout-client.d.ts +20 -1
  22. package/components/layouts/clients/phi-three-column-layout-client.js +31 -15
  23. package/components/layouts/layout-definitions.d.ts +96 -0
  24. package/components/layouts/layout-definitions.js +40 -2
  25. package/components/layouts/plugins/split-card-layout-plugin.js +1 -1
  26. package/components/layouts/plugins/three-column-layout-plugin.js +1 -1
  27. package/components/layouts/split-card-geometry.d.ts +9 -4
  28. package/components/layouts/split-card-geometry.js +29 -13
  29. package/components/media/media-folder-options.d.ts +10 -0
  30. package/components/media/media-folder-options.js +14 -0
  31. package/components/navigation/phi-link.d.ts +7 -1
  32. package/components/navigation/phi-link.js +6 -2
  33. package/components/root/phi-root-theme-resolver.js +2 -0
  34. package/components/shell/phi-antd-icon.d.ts +1 -0
  35. package/components/shell/phi-antd-icon.js +3 -0
  36. package/components/widgets/client/shared/phi-rendered-value.js +1 -1
  37. package/components/widgets/inspector-field-row.js +4 -1
  38. package/components/widgets/label-sets/account.js +6 -2
  39. package/components/widgets/label-sets/admin-users.d.ts +3 -0
  40. package/components/widgets/label-sets/admin-users.js +8 -2
  41. package/components/widgets/label-sets/effects.js +5 -1
  42. package/components/widgets/label-sets/gallery.js +2 -2
  43. package/components/widgets/label-sets/inspector.js +4 -0
  44. package/components/widgets/label-sets/observability-logs.js +2 -2
  45. package/components/widgets/label-sets/profile.js +2 -1
  46. package/components/widgets/label-types/gallery.d.ts +2 -3
  47. package/components/widgets/label-types/gallery.js +1 -4
  48. package/components/widgets/label-types/inspector.d.ts +4 -0
  49. package/components/widgets/label-types/inspector.js +2 -0
  50. package/components/widgets/shared/markdown-body-client.js +1 -1
  51. package/components/widgets/shared/markdown-image-vocabulary.js +1 -1
  52. package/constants/cms-layout-proportions.d.ts +6 -0
  53. package/constants/cms-layout-proportions.js +17 -0
  54. package/constants/runtime-module-ownership.js +1 -0
  55. package/helpers/page-reference-tree.js +8 -0
  56. package/helpers/table-action-links.d.ts +11 -0
  57. package/helpers/table-action-links.js +14 -0
  58. package/helpers/table-action-row-link.d.ts +8 -0
  59. package/helpers/table-action-row-link.js +14 -0
  60. package/package.json +2 -2
  61. package/plugins/factories/widget-renderers.d.ts +7 -1
  62. package/plugins/factories/widget-renderers.js +12 -2
  63. package/plugins/runtime-modules/asset/authoring-widgets.js +2 -2
  64. package/plugins/runtime-modules/asset/data-providers.js +1 -1
  65. package/plugins/runtime-modules/asset/services/options.js +7 -11
  66. package/plugins/runtime-modules/asset/widgets/area-upload/plugin.js +0 -2
  67. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/plugin.js +0 -2
  68. package/plugins/runtime-modules/asset/widgets/image-inspector/plugin.js +0 -2
  69. package/plugins/runtime-modules/asset/widgets/media-picker/plugin.js +0 -2
  70. package/plugins/runtime-modules/asset/widgets.js +4 -4
  71. package/plugins/runtime-modules/auth/admin-settings-forms.js +47 -1
  72. package/plugins/runtime-modules/auth/authoring-widgets.js +4 -8
  73. package/plugins/runtime-modules/auth/data-providers.js +2 -0
  74. package/plugins/runtime-modules/auth/widgets/auth-workflow/plugin.js +0 -6
  75. package/plugins/runtime-modules/auth/widgets/logout/plugin.js +0 -2
  76. package/plugins/runtime-modules/auth/widgets/security/plugin.js +0 -2
  77. package/plugins/runtime-modules/auth/widgets.js +5 -3
  78. package/plugins/runtime-modules/avatar/authoring-widgets.js +2 -2
  79. package/plugins/runtime-modules/avatar/widgets/account-avatar/plugin.js +0 -2
  80. package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/plugin.js +0 -2
  81. package/plugins/runtime-modules/avatar/widgets.js +2 -2
  82. package/plugins/runtime-modules/builder/authoring-widgets.js +1 -1
  83. package/plugins/runtime-modules/builder/clients/inspector-choice-cascader.d.ts +28 -0
  84. package/plugins/runtime-modules/builder/clients/inspector-choice-cascader.js +98 -0
  85. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +27 -3
  86. package/plugins/runtime-modules/builder/clients/inspector-record-field-options.d.ts +17 -0
  87. package/plugins/runtime-modules/builder/clients/inspector-record-field-options.js +21 -0
  88. package/plugins/runtime-modules/builder/clients/inspector-translate-switch.d.ts +24 -0
  89. package/plugins/runtime-modules/builder/clients/inspector-translate-switch.js +29 -0
  90. package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
  91. package/plugins/runtime-modules/builder/clients/layout-inspector.js +4 -2
  92. package/plugins/runtime-modules/builder/clients/widget-inspector.d.ts +1 -1
  93. package/plugins/runtime-modules/builder/clients/widget-inspector.js +6 -6
  94. package/plugins/runtime-modules/builder/plugin-meta-labels.js +17 -0
  95. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +12 -2
  96. package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +0 -2
  97. package/plugins/runtime-modules/builder/widgets.js +3 -3
  98. package/plugins/runtime-modules/contracts.js +8 -4
  99. package/plugins/runtime-modules/core/authoring-widgets.js +2 -2
  100. package/plugins/runtime-modules/core/data-providers.d.ts +7 -3
  101. package/plugins/runtime-modules/core/data-providers.js +11 -1
  102. package/plugins/runtime-modules/core/definition.d.ts +8 -4
  103. package/plugins/runtime-modules/core/form-providers.d.ts +1 -1
  104. package/plugins/runtime-modules/core/widgets/breadcrumb/config.js +1 -1
  105. package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +1 -1
  106. package/plugins/runtime-modules/core/widgets/cascader/config.js +1 -1
  107. package/plugins/runtime-modules/core/widgets/draft-status/client.d.ts +2 -1
  108. package/plugins/runtime-modules/core/widgets/draft-status/client.js +4 -3
  109. package/plugins/runtime-modules/core/widgets/gallery/authoring.js +6 -8
  110. package/plugins/runtime-modules/core/widgets/gallery/client.js +4 -0
  111. package/plugins/runtime-modules/core/widgets/gallery/config.js +1 -1
  112. package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +5 -1
  113. package/plugins/runtime-modules/core/widgets/gallery/server.js +8 -4
  114. package/plugins/runtime-modules/core/widgets/image/config.js +1 -1
  115. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +11 -0
  116. package/plugins/runtime-modules/core/widgets/markdown/config.js +24 -22
  117. package/plugins/runtime-modules/core/widgets/record/config.js +1 -1
  118. package/plugins/runtime-modules/core/widgets/simple-text/client.d.ts +9 -5
  119. package/plugins/runtime-modules/core/widgets/simple-text/client.js +5 -7
  120. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +63 -4
  121. package/plugins/runtime-modules/core/widgets/simple-text/config.js +45 -11
  122. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
  123. package/plugins/runtime-modules/core/widgets/simple-text/plugin.d.ts +13 -0
  124. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +23 -4
  125. package/plugins/runtime-modules/core/widgets/simple-text/server.d.ts +4 -2
  126. package/plugins/runtime-modules/core/widgets/simple-text/server.js +7 -6
  127. package/plugins/runtime-modules/core/widgets/table/client.js +4 -4
  128. package/plugins/runtime-modules/core/widgets/table/config.js +12 -4
  129. package/plugins/runtime-modules/core/widgets/table/plugin.js +21 -1
  130. package/plugins/runtime-modules/core/widgets/thread-conversation/plugin.js +0 -2
  131. package/plugins/runtime-modules/core/widgets/tree/config.js +2 -1
  132. package/plugins/runtime-modules/core/widgets/tree/plugin.js +16 -1
  133. package/plugins/runtime-modules/core/widgets.js +1 -1
  134. package/plugins/runtime-modules/observability/data-providers.js +1 -1
  135. package/plugins/runtime-modules/theme/authoring-widgets.js +5 -5
  136. package/plugins/runtime-modules/theme/brand-theme-model.d.ts +4 -1
  137. package/plugins/runtime-modules/theme/brand-theme-model.js +6 -2
  138. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +17 -0
  139. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +0 -5
  140. package/plugins/runtime-modules/theme/widgets.js +4 -4
  141. package/plugins/runtime-modules/threads/labels.js +6 -2
  142. package/plugins/runtime-modules/user-management/addon-roles.d.ts +28 -7
  143. package/plugins/runtime-modules/user-management/addon-roles.js +42 -17
  144. package/plugins/runtime-modules/user-management/client-data-providers.js +6 -0
  145. package/plugins/runtime-modules/user-management/data-providers.js +11 -2
  146. package/plugins/runtime-modules/user-management/forms.js +40 -1
  147. package/plugins/runtime-modules/user-management/ids.d.ts +1 -0
  148. package/plugins/runtime-modules/user-management/ids.js +1 -0
  149. package/plugins/runtime-modules/user-management/services/options.d.ts +14 -3
  150. package/plugins/runtime-modules/user-management/services/options.js +52 -16
  151. package/plugins/runtime-modules/user-management/services/table.js +8 -24
  152. package/plugins/runtime-modules/user-management/services/users-query.d.ts +9 -0
  153. package/plugins/runtime-modules/user-management/services/users-query.js +29 -0
  154. package/plugins/runtime-modules/video/widgets/embed/plugin.js +0 -2
  155. package/plugins/runtime-modules/video/widgets.js +1 -1
  156. package/styles/controls.css +20 -0
  157. package/styles/layout.css +4 -4
  158. package/theme/phi-link-mark.d.ts +26 -0
  159. package/theme/phi-link-mark.js +26 -0
  160. package/theme/phi-theme-tokens.d.ts +3 -2
  161. package/theme/phi-theme-tokens.js +3 -1
  162. package/types/cms-config.d.ts +12 -4
  163. package/types/cms-config.js +3 -0
  164. package/types/cms-plugins.d.ts +26 -4
  165. package/types/core-widget-placements.d.ts +4 -4
  166. package/types/site-config.d.ts +3 -0
  167. package/types/table-widget.d.ts +17 -1
  168. package/types/tree.d.ts +2 -0
  169. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/authoring.d.ts +0 -2
  170. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/authoring.js +0 -6
  171. package/plugins/runtime-modules/asset/widgets/image-inspector/authoring.d.ts +0 -2
  172. package/plugins/runtime-modules/asset/widgets/image-inspector/authoring.js +0 -6
  173. package/plugins/runtime-modules/auth/widgets/auth-methods/authoring.d.ts +0 -7
  174. package/plugins/runtime-modules/auth/widgets/auth-methods/authoring.js +0 -12
  175. package/plugins/runtime-modules/auth/widgets/auth-workflow/authoring.d.ts +0 -7
  176. package/plugins/runtime-modules/auth/widgets/auth-workflow/authoring.js +0 -12
  177. package/plugins/runtime-modules/auth/widgets/logout/authoring.d.ts +0 -3
  178. package/plugins/runtime-modules/auth/widgets/logout/authoring.js +0 -8
  179. package/plugins/runtime-modules/auth/widgets/security/authoring.d.ts +0 -3
  180. package/plugins/runtime-modules/auth/widgets/security/authoring.js +0 -8
  181. package/plugins/runtime-modules/avatar/widgets/account-avatar/authoring.d.ts +0 -2
  182. package/plugins/runtime-modules/avatar/widgets/account-avatar/authoring.js +0 -6
  183. package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/authoring.d.ts +0 -2
  184. package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/authoring.js +0 -6
  185. package/plugins/runtime-modules/builder/widgets/structure-region/internal-builder.d.ts +0 -22
  186. package/plugins/runtime-modules/builder/widgets/structure-region/internal-builder.js +0 -8
  187. package/plugins/runtime-modules/core/widgets/form-preview/authoring.d.ts +0 -10
  188. package/plugins/runtime-modules/core/widgets/form-preview/authoring.js +0 -15
  189. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +0 -3
  190. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +0 -9
  191. package/plugins/runtime-modules/theme/widgets/brand-controls/authoring.d.ts +0 -76
  192. package/plugins/runtime-modules/theme/widgets/brand-controls/authoring.js +0 -30
@@ -1,12 +1,11 @@
1
1
  import type { PhiSequenceControlLabels } from "./sequence";
2
2
  export type PhiGalleryWidgetLabels = PhiSequenceControlLabels & {
3
3
  unavailable: string;
4
+ /** What the Gallery shows where it has no picture to show. */
5
+ empty: string;
4
6
  /** The Builder canvas's hint under a Gallery whose Folder is chosen. */
5
7
  canvasFolder: string;
6
8
  /** The Builder canvas's hint under a Gallery whose Folder is not chosen yet. */
7
9
  canvasNoFolder: string;
8
- /** The Builder canvas's hint under a Gallery bound to a field of the page record, `%1` the field. */
9
- canvasRecordField: string;
10
10
  };
11
11
  export declare const PHI_GALLERY_WIDGET_DEFAULT_LABELS: PhiGalleryWidgetLabels;
12
- export declare function formatPhiGalleryWidgetLabel(template: string, value: string): string;
@@ -7,10 +7,7 @@ export const PHI_GALLERY_WIDGET_DEFAULT_LABELS = {
7
7
  region: "Pictures",
8
8
  pages: "Choose pictures",
9
9
  unavailable: "The pictures could not be read.",
10
+ empty: "No pictures yet",
10
11
  canvasFolder: "The public pictures of the chosen media folder, read when the page is drawn.",
11
12
  canvasNoFolder: "No folder chosen yet. Pick one in the inspector; its public pictures are read when the page is drawn.",
12
- canvasRecordField: 'The pictures of the page record\'s field "%1", read when the page is drawn.',
13
13
  };
14
- export function formatPhiGalleryWidgetLabel(template, value) {
15
- return template.replace("%1", value);
16
- }
@@ -104,6 +104,10 @@ export type PhiInspectorFieldLabels = {
104
104
  selectCalendar: string;
105
105
  selectVideoProvider: string;
106
106
  selectRecordField: string;
107
+ /** The first entry of a record-field select: the Widget shows its own content. */
108
+ recordFieldNone: string;
109
+ /** The switch that leaves a Widget's own words as written (`NoTranslate`). */
110
+ translateText: string;
107
111
  linkTarget: PhiInspectorLinkTargetLabels;
108
112
  };
109
113
  export declare const PHI_INSPECTOR_WIDGET_DEFAULT_LABELS: PhiInspectorWidgetLabels;
@@ -73,6 +73,8 @@ export const PHI_INSPECTOR_WIDGET_DEFAULT_LABELS = {
73
73
  selectCalendar: "Select a calendar",
74
74
  selectVideoProvider: "Select a video provider",
75
75
  selectRecordField: "Select a field of the page's record",
76
+ recordFieldNone: "None",
77
+ translateText: "Translate text",
76
78
  linkTarget: {
77
79
  none: "None",
78
80
  page: "Page",
@@ -77,7 +77,7 @@ function renderInlineNodes(inlines) {
77
77
  case "inline_code":
78
78
  return (_jsx(PhiTypographyControl, { code: true, children: inline.text }, key));
79
79
  case "link":
80
- return (_jsx(PhiLink, { href: inline.href || "#", external: inline.external, newTab: inline.external, children: renderInlineNodes(inline.children) }, key));
80
+ return (_jsx(PhiLink, { href: inline.href || "#", external: inline.external, newTab: inline.external, markExternal: true, children: renderInlineNodes(inline.children) }, key));
81
81
  case "image":
82
82
  return (_jsx("img", { src: inline.src, alt: inline.alt, title: inline.title || undefined, style: { maxWidth: "100%", height: "auto" } }, key));
83
83
  case "break":
@@ -4,7 +4,7 @@
4
4
  * reference of every route.
5
5
  *
6
6
  * Two places say it, and the nearer one wins. The Widget states what every picture in its text does -- the
7
- * Inspector's "Image proportion", "Image Float" and "Image Width" -- and a picture that needs something else
7
+ * Inspector's "Proportion", "Float" and "Width" under "Image" -- and a picture that needs something else
8
8
  * says so in its own address, after the Asset: `![Server](phis:asset/12?ratio=16:9&float=none)`, or
9
9
  * `![Icon](phis:asset/27?float=end&width=small)`. The address stays a
10
10
  * `phis:asset/<id>` reference for everything that reads one (the server's reference index finds the id at
@@ -0,0 +1,6 @@
1
+ export declare const PHI_CMS_THREE_COLUMN_SIDE_SHARES: readonly [10, 20, 25, 30, 33];
2
+ export type PhiCmsThreeColumnSideShare = (typeof PHI_CMS_THREE_COLUMN_SIDE_SHARES)[number];
3
+ export declare const PHI_CMS_THREE_COLUMN_DEFAULT_SIDE_SHARE: PhiCmsThreeColumnSideShare;
4
+ export declare const PHI_CMS_SPLIT_CARD_RATIOS: readonly ["golden", "50-50", "20-80"];
5
+ export type PhiCmsSplitCardRatio = (typeof PHI_CMS_SPLIT_CARD_RATIOS)[number];
6
+ export declare const PHI_CMS_SPLIT_CARD_DEFAULT_RATIO: PhiCmsSplitCardRatio;
@@ -0,0 +1,17 @@
1
+ /*
2
+ * The proportions a Layout's columns can be set to: plain values, without imports, so a parser, a
3
+ * Layout client and a geometry helper read them without pulling in the Layout registry.
4
+ */
5
+ /*
6
+ * What a balanced side of a Three Column Layout takes of the row, in percent; the middle takes the rest.
7
+ * 33 is three equal columns (33 : 34 : 33). 25 is the default and is stored as absent: it is the 1 : 2 : 1
8
+ * the Layout always had, so a row that states nothing reads as before.
9
+ */
10
+ export const PHI_CMS_THREE_COLUMN_SIDE_SHARES = [10, 20, 25, 30, 33];
11
+ export const PHI_CMS_THREE_COLUMN_DEFAULT_SIDE_SHARE = 25;
12
+ /*
13
+ * The ratio a Split Card's two cards stand in. `golden` is the default and is stored as absent: it is the
14
+ * ratio the Split Card always had. `50-50` has no larger card, so `swapRatio` has nothing to swap there.
15
+ */
16
+ export const PHI_CMS_SPLIT_CARD_RATIOS = ["golden", "50-50", "20-80"];
17
+ export const PHI_CMS_SPLIT_CARD_DEFAULT_RATIO = "golden";
@@ -170,6 +170,7 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
170
170
  "options/admin-site-locales": ["localization", "admin-site-locales"],
171
171
  "options/core-site-locales": ["core", "site-locales"],
172
172
  "options/user-management-addon-roles": ["user-management", "addon-roles"],
173
+ "options/user-management-addon-role-choices": ["user-management", "addon-role-choices"],
173
174
  "options/builder-area-root-route": ["builder", "area-root-route"],
174
175
  "options/builder-landing-page": ["builder", "landing-page"],
175
176
  "options/builder-collection-item-renderers": ["builder", "collection-item-renderers"],
@@ -29,6 +29,7 @@ export function buildPhiBuilderPageReferenceTree(area, nodes, allNodes, labels =
29
29
  value: reference ?? node.key,
30
30
  label: node.storagePath === "/" ? labelLanding(node.title, labels) : node.title,
31
31
  description: path,
32
+ ...(isPhiPageContainerNode(node) ? { icon: PHI_PAGE_CONTAINER_ICON } : {}),
32
33
  ...(reference
33
34
  ? { meta: { reference, title: node.title, path } }
34
35
  : { disabled: true }),
@@ -38,6 +39,12 @@ export function buildPhiBuilderPageReferenceTree(area, nodes, allNodes, labels =
38
39
  };
39
40
  });
40
41
  }
42
+ /** What a container stands under in a Page tree: a folder, so it reads apart from the Pages beside it. */
43
+ const PHI_PAGE_CONTAINER_ICON = "antd:folder";
44
+ /** A path with no Page of its own -- a container -- as opposed to a Page, or a Page whose deletion was published. */
45
+ function isPhiPageContainerNode(node) {
46
+ return node.reference == null && node.tombstoned !== true;
47
+ }
41
48
  function labelLanding(title, labels) {
42
49
  const trimmed = title.trim();
43
50
  return trimmed ? `${trimmed} ${labels.landing}` : labels.landing;
@@ -69,6 +76,7 @@ export function buildPhiBuilderPageScopeTree(area, nodes, allNodes, labels = PHI
69
76
  value: reference ?? (folder ? `${PHI_PAGE_SCOPE_FOLDER_VALUE_PREFIX}${folder}` : node.key),
70
77
  label: node.storagePath === "/" ? labelLanding(node.title, labels) : node.title,
71
78
  description: folder ?? resolvePhiBuilderCmsFetchPath(area, node.key, allNodes),
79
+ ...(isPhiPageContainerNode(node) ? { icon: PHI_PAGE_CONTAINER_ICON } : {}),
72
80
  ...(reference == null && folder == null ? { disabled: true } : {}),
73
81
  ...(children ? { children } : {}),
74
82
  };
@@ -0,0 +1,11 @@
1
+ import type { PhiResolvedLinkTargets } from "../types/references";
2
+ import type { PhiTableActionDefinition } from "../types/table-widget";
3
+ /**
4
+ * The actions with where their `linkTarget` leads, for the client to draw.
5
+ *
6
+ * Resolved on the server, in the render that resolved every target of the page in one pass: a Page
7
+ * reference means nothing in a browser, and the address it answers on is the server's to know. An
8
+ * action without a target is handed back as it is; one whose target resolved to nothing carries `null`
9
+ * and draws no link (`REFERENCES.md`).
10
+ */
11
+ export declare function resolvePhiTableActionLinks<TAction extends PhiTableActionDefinition>(actions: readonly TAction[] | undefined, links: PhiResolvedLinkTargets | null | undefined): TAction[] | undefined;
@@ -0,0 +1,14 @@
1
+ import { resolvePhiLinkHref } from "./link-target";
2
+ /**
3
+ * The actions with where their `linkTarget` leads, for the client to draw.
4
+ *
5
+ * Resolved on the server, in the render that resolved every target of the page in one pass: a Page
6
+ * reference means nothing in a browser, and the address it answers on is the server's to know. An
7
+ * action without a target is handed back as it is; one whose target resolved to nothing carries `null`
8
+ * and draws no link (`REFERENCES.md`).
9
+ */
10
+ export function resolvePhiTableActionLinks(actions, links) {
11
+ return actions?.map((action) => (action.linkTarget
12
+ ? { ...action, link: resolvePhiLinkHref(action.linkTarget, links) }
13
+ : action));
14
+ }
@@ -0,0 +1,8 @@
1
+ import type { PhiTableActionDefinition } from "../types/table-widget";
2
+ /**
3
+ * The action with the address one row gives it, where it reads one (`hrefPath`).
4
+ *
5
+ * The row's address is the row's own -- an entry's review page, a ticket's link elsewhere -- and wins
6
+ * over the action's target. A row with nothing at the path leaves the action as it was resolved.
7
+ */
8
+ export declare function resolvePhiTableRowActionLink<TAction extends PhiTableActionDefinition>(action: TAction, rowHref: unknown): TAction;
@@ -0,0 +1,14 @@
1
+ import { isPhiExternalHref } from "./external-href";
2
+ /**
3
+ * The action with the address one row gives it, where it reads one (`hrefPath`).
4
+ *
5
+ * The row's address is the row's own -- an entry's review page, a ticket's link elsewhere -- and wins
6
+ * over the action's target. A row with nothing at the path leaves the action as it was resolved.
7
+ */
8
+ export function resolvePhiTableRowActionLink(action, rowHref) {
9
+ if (!action.hrefPath || typeof rowHref !== "string" || !rowHref.trim())
10
+ return action;
11
+ const newTab = action.newTab === true;
12
+ // A new tab is an anchor's to open: a route of the Site taken in place never opens one.
13
+ return { ...action, link: { href: rowHref, newTab, external: newTab || isPhiExternalHref(rowHref) } };
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phis/ui",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -521,7 +521,7 @@
521
521
  "@lexical/rich-text": "0.50.0",
522
522
  "@lexical/selection": "0.50.0",
523
523
  "@lexical/utils": "0.50.0",
524
- "@phis/contracts": "^0.7.12",
524
+ "@phis/contracts": "^0.7.13",
525
525
  "dayjs": "^1.11.23",
526
526
  "dom-serializer": "^2.0.0",
527
527
  "htmlparser2": "^10.1.0",
@@ -7,4 +7,10 @@ export declare function definePhiPassiveWidgetRenderers<TConfig>(renderer: (args
7
7
  children: ReactNode;
8
8
  }>;
9
9
  };
10
- export declare function renderPhiWidgetPreviewPlaceholder(widget: PhiCmsContentWidgetNode, summary?: string): import("react").FunctionComponentElement<import("../../components/widgets/built-in/widget-preview-client").PhiWidgetPreviewFallbackProps>;
10
+ /**
11
+ * The house placeholder in a Preview: the Widget's name and type, still.
12
+ *
13
+ * Drawn by the renderer for a Widget whose Preview policy is `visualPlaceholder`; a Widget does not
14
+ * call it from a `renderPreview` of its own.
15
+ */
16
+ export declare function renderPhiWidgetPreviewPlaceholder(widget: PhiCmsContentWidgetNode, pluginTitle?: string | null): import("react").FunctionComponentElement<import("../../components/widgets/built-in/widget-preview-client").PhiWidgetPreviewFallbackProps>;
@@ -6,6 +6,16 @@ export function definePhiPassiveWidgetRenderers(renderer) {
6
6
  renderPreview: (args) => createElement(PhiWidgetInertPreview, null, renderer(args)),
7
7
  };
8
8
  }
9
- export function renderPhiWidgetPreviewPlaceholder(widget, summary = "This widget is inactive in preview mode.") {
10
- return createElement(PhiWidgetPreviewFallback, { widget, summary });
9
+ /**
10
+ * The house placeholder in a Preview: the Widget's name and type, still.
11
+ *
12
+ * Drawn by the renderer for a Widget whose Preview policy is `visualPlaceholder`; a Widget does not
13
+ * call it from a `renderPreview` of its own.
14
+ */
15
+ export function renderPhiWidgetPreviewPlaceholder(widget, pluginTitle) {
16
+ return createElement(PhiWidgetPreviewFallback, {
17
+ widget,
18
+ pluginTitle,
19
+ summary: "This widget is inactive in preview mode.",
20
+ });
11
21
  }
@@ -6,7 +6,7 @@ import { PHI_MEDIA_PICKER_WIDGET_DEFINITION, } from "./widgets/media-picker/conf
6
6
  import { createPhiAuthoringWidgetModule, definePhiAuthoringWidgetModuleLoader, } from "../client-authoring-widget-module";
7
7
  export default createPhiAuthoringWidgetModule([
8
8
  definePhiAuthoringWidgetModuleLoader(PHI_AREA_UPLOAD_WIDGET_DEFINITION, () => import("./widgets/area-upload/authoring").then((module) => module.PHI_AREA_UPLOAD_WIDGET_BUILDER_PLUGIN)),
9
- definePhiAuthoringWidgetModuleLoader(PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION, () => import("./widgets/image-inspector/authoring").then((module) => module.PHI_IMAGE_INSPECTOR_WIDGET_BUILDER_PLUGIN)),
10
- definePhiAuthoringWidgetModuleLoader(PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION, () => import("./widgets/asset-focal-rect/authoring").then((module) => module.PHI_ASSET_FOCAL_RECT_WIDGET_BUILDER_PLUGIN)),
9
+ definePhiAuthoringWidgetModuleLoader(PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION, () => Promise.resolve(PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION)),
10
+ definePhiAuthoringWidgetModuleLoader(PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION, () => Promise.resolve(PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION)),
11
11
  definePhiAuthoringWidgetModuleLoader(PHI_MEDIA_PICKER_WIDGET_DEFINITION, () => import("./widgets/media-picker/authoring").then((module) => module.PHI_MEDIA_PICKER_WIDGET_BUILDER_PLUGIN)),
12
12
  ]);
@@ -65,7 +65,7 @@ export const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
65
65
  executionMode: "live",
66
66
  authoringMode: "none",
67
67
  title: "Media folder choices",
68
- description: "Every folder of the Site's media, by its path, for a setting that names one.",
68
+ description: "Every folder of the Site's media, under the folder it stands in, for a setting that names one.",
69
69
  // Named in a record binding's parameters, which the Builder edits on any page.
70
70
  availableToAuthoringChrome: true,
71
71
  },
@@ -5,7 +5,7 @@ import { PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
5
5
  import { readPhiMediaFolders } from "../../../../components/media/phi-image-preview-data";
6
6
  import { PHI_ASSET_CONTROLLER_STORE_KEY } from "../../../../components/media/asset-controller-signals";
7
7
  import { phiImagePreviewStore } from "../../../../components/media/phi-image-preview-store";
8
- import { buildPhiMediaFolderCascaderOptions, buildPhiMediaFolderNamesById, buildPhiMediaFolderValueById, } from "../../../../components/media/media-folder-options";
8
+ import { buildPhiMediaFolderCascaderOptions, buildPhiMediaFolderChoiceOptions, buildPhiMediaFolderNamesById, buildPhiMediaFolderValueById, } from "../../../../components/media/media-folder-options";
9
9
  import { isPhiMediaFolderLocked } from "../../../../components/media/media-folder-lock";
10
10
  export const PhiMediaFoldersOptionsProviderClient = createPhiControlOptionsProviderClient({
11
11
  key: PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS.mediaFolders,
@@ -62,10 +62,11 @@ export const PhiMediaFoldersOptionsProviderClient = createPhiControlOptionsProvi
62
62
  },
63
63
  });
64
64
  /**
65
- * Every Folder of the Site Space, by its path, for a setting that names one on a page that is not the
66
- * Media page. `PhiMediaFoldersOptionsProviderClient` reads the library's store, which only the Media
67
- * page fills; this asks the folders route itself and keeps the whole list, because the list is small
68
- * and a Gallery's author reads it once.
65
+ * Every Folder of the Site Space by its id, each under the Folder it stands in (`parentValue`), for a
66
+ * setting that names one on a page that is not the Media page -- a cascader shows the tree.
67
+ * `PhiMediaFoldersOptionsProviderClient` reads the library's store, which only the Media page fills;
68
+ * this asks the folders route itself and keeps the whole list, because the list is small and a
69
+ * Gallery's author reads it once.
69
70
  */
70
71
  const FOLDERS_PATH = "/api/site/media/folders";
71
72
  async function loadFolders() {
@@ -85,12 +86,7 @@ export const PhiMediaFolderChoicesOptionsProviderClient = createPhiControlOption
85
86
  resolveLoadKey: () => "site-media-folders",
86
87
  resolve: (context) => {
87
88
  const folders = Array.isArray(context.asyncData) ? context.asyncData : [];
88
- const pathOf = (folderId) => buildPhiMediaFolderNamesById(folders, folderId).join(" / ");
89
- return {
90
- options: [...folders]
91
- .sort((left, right) => pathOf(left.id).localeCompare(pathOf(right.id)))
92
- .map((folder) => ({ value: String(folder.id), label: pathOf(folder.id) })),
93
- };
89
+ return { options: buildPhiMediaFolderChoiceOptions(folders) };
94
90
  },
95
91
  });
96
92
  const STORAGE_SETTINGS_PATH = "/api/site/admin/media/storage";
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PhiAreaUploadWidgetServer } from "./server";
4
3
  import { PHI_AREA_UPLOAD_WIDGET_DEFINITION } from "./config";
5
4
  export const PHI_AREA_UPLOAD_WIDGET_PLUGIN = {
6
5
  ...PHI_AREA_UPLOAD_WIDGET_DEFINITION,
7
6
  render: ({ widget, runtime, config }) => (_jsx(PhiAreaUploadWidgetServer, { runtime: runtime, config: config }, `widget-${widget.id}`)),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PhiAssetFocalRectWidgetServer } from "./server";
4
3
  import { PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION, } from "./config";
5
4
  export const PHI_ASSET_FOCAL_RECT_WIDGET_PLUGIN = {
6
5
  ...PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION,
7
6
  render: ({ widget, runtime, config }) => (_jsx(PhiAssetFocalRectWidgetServer, { runtime: runtime, config: config }, `widget-${widget.id}`)),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PhiAssetConfigWidgetServer } from "./server";
4
3
  import { PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION, } from "./config";
5
4
  export const PHI_IMAGE_INSPECTOR_WIDGET_PLUGIN = {
6
5
  ...PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION,
7
6
  render: ({ widget, runtime, config }) => (_jsx(PhiAssetConfigWidgetServer, { runtime: runtime, config: config }, `widget-${widget.id}`)),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PhiMediaPickerWidgetServer } from "../../../../../components/media/phi-media-picker-server";
4
3
  import { PHI_MEDIA_PICKER_WIDGET_DEFINITION } from "./config";
5
4
  export const PHI_MEDIA_PICKER_WIDGET_PLUGIN = {
6
5
  ...PHI_MEDIA_PICKER_WIDGET_DEFINITION,
7
6
  render: ({ widget, runtime, config }) => (_jsx(PhiMediaPickerWidgetServer, { runtime: runtime, config: config }, `widget-${widget.id}`)),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -8,28 +8,28 @@ export const PHI_RUNTIME_MODULE_WIDGETS = [
8
8
  definePhiFirstPartyWidget({
9
9
  definition: PHI_AREA_UPLOAD_WIDGET_DEFINITION,
10
10
  ownerModuleId: PHI_ASSET_RUNTIME_MODULE_ID,
11
- renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
11
+ renderPolicies: { "runtime": "custom", "preview": "visualPlaceholder", "authoring": "custom" },
12
12
  loadRuntime: () => import("./widgets/area-upload/plugin").then((module) => module.PHI_AREA_UPLOAD_WIDGET_PLUGIN),
13
13
  loadPreview: () => import("./widgets/area-upload/plugin").then((module) => module.PHI_AREA_UPLOAD_WIDGET_PLUGIN),
14
14
  }),
15
15
  definePhiFirstPartyWidget({
16
16
  definition: PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION,
17
17
  ownerModuleId: PHI_ASSET_RUNTIME_MODULE_ID,
18
- renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
18
+ renderPolicies: { "runtime": "custom", "preview": "visualPlaceholder", "authoring": "custom" },
19
19
  loadRuntime: () => import("./widgets/image-inspector/plugin").then((module) => module.PHI_IMAGE_INSPECTOR_WIDGET_PLUGIN),
20
20
  loadPreview: () => import("./widgets/image-inspector/plugin").then((module) => module.PHI_IMAGE_INSPECTOR_WIDGET_PLUGIN),
21
21
  }),
22
22
  definePhiFirstPartyWidget({
23
23
  definition: PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION,
24
24
  ownerModuleId: PHI_ASSET_RUNTIME_MODULE_ID,
25
- renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
25
+ renderPolicies: { "runtime": "custom", "preview": "visualPlaceholder", "authoring": "custom" },
26
26
  loadRuntime: () => import("./widgets/asset-focal-rect/plugin").then((module) => module.PHI_ASSET_FOCAL_RECT_WIDGET_PLUGIN),
27
27
  loadPreview: () => import("./widgets/asset-focal-rect/plugin").then((module) => module.PHI_ASSET_FOCAL_RECT_WIDGET_PLUGIN),
28
28
  }),
29
29
  definePhiFirstPartyWidget({
30
30
  definition: PHI_MEDIA_PICKER_WIDGET_DEFINITION,
31
31
  ownerModuleId: PHI_ASSET_RUNTIME_MODULE_ID,
32
- renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
32
+ renderPolicies: { "runtime": "custom", "preview": "visualPlaceholder", "authoring": "custom" },
33
33
  loadRuntime: () => import("./widgets/media-picker/plugin").then((module) => module.PHI_MEDIA_PICKER_WIDGET_PLUGIN),
34
34
  loadPreview: () => import("./widgets/media-picker/plugin").then((module) => module.PHI_MEDIA_PICKER_WIDGET_PLUGIN),
35
35
  }),
@@ -133,6 +133,23 @@ const PROVIDER_OPTIONS = [
133
133
  { value: "github", label: label("providerGithub", "GitHub") },
134
134
  { value: "microsoft", label: label("providerMicrosoft", "Microsoft") },
135
135
  ];
136
+ /*
137
+ * Which settings a provider has, as the Form shows them: a field the chosen provider does not read is
138
+ * not drawn. The provider is the create Form's own select and a hidden field of the edit Form, filled
139
+ * from the row. The server refuses a setting a provider has no use for either way
140
+ * (`buildAuthInstallationConfig`); this only keeps the Form from offering it.
141
+ */
142
+ function forProviders(...providerKeys) {
143
+ return {
144
+ match: "any",
145
+ conditions: providerKeys.map((value) => ({
146
+ source: "form",
147
+ valuePath: "providerKey",
148
+ operator: "equals",
149
+ value,
150
+ })),
151
+ };
152
+ }
136
153
  const INSTALLATION_SHARED_FIELDS = [
137
154
  {
138
155
  key: "clientId",
@@ -148,7 +165,7 @@ const INSTALLATION_SHARED_FIELDS = [
148
165
  key: "clientSecret",
149
166
  fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.password,
150
167
  label: label("installationClientSecret", "Client secret"),
151
- description: label("installationClientSecretHint", "Leave empty to keep the currently stored secret."),
168
+ description: label("installationClientSecretHint", "Leave empty to keep the currently stored secret. For Apple, the contents of the .p8 key file."),
152
169
  autoComplete: "new-password",
153
170
  },
154
171
  {
@@ -158,6 +175,27 @@ const INSTALLATION_SHARED_FIELDS = [
158
175
  description: label("installationTenantHint", "Microsoft only: common, organizations, consumers, or a tenant UUID."),
159
176
  placeholder: label("installationTenantPlaceholder", "common"),
160
177
  autoComplete: "off",
178
+ visibleWhen: forProviders("microsoft"),
179
+ },
180
+ /*
181
+ * Apple issues a signing key instead of a client secret; the client secret is signed from the key,
182
+ * the developer team and the key's id for every token request.
183
+ */
184
+ {
185
+ key: "teamId",
186
+ fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.text,
187
+ label: label("installationTeamId", "Team ID"),
188
+ description: label("installationTeamIdHint", "The ten characters shown at the top right of the Apple Developer account."),
189
+ autoComplete: "off",
190
+ visibleWhen: forProviders("apple"),
191
+ },
192
+ {
193
+ key: "keyId",
194
+ fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.text,
195
+ label: label("installationKeyId", "Key ID"),
196
+ description: label("installationKeyIdHint", "The ten characters of the Sign in with Apple key under Keys."),
197
+ autoComplete: "off",
198
+ visibleWhen: forProviders("apple"),
161
199
  },
162
200
  /*
163
201
  * The provider's own settings, in one field each.
@@ -186,6 +224,7 @@ const INSTALLATION_SHARED_FIELDS = [
186
224
  label: label("installationRestrictions", "Restrict sign-in to"),
187
225
  description: label("installationRestrictionsHint", "Space separated, and empty admits everyone the provider admits. GitHub organizations for GitHub, hosted domains for Google."),
188
226
  autoComplete: "off",
227
+ visibleWhen: forProviders("google", "github"),
189
228
  },
190
229
  {
191
230
  key: "prompt",
@@ -193,6 +232,7 @@ const INSTALLATION_SHARED_FIELDS = [
193
232
  label: label("installationPrompt", "Prompt"),
194
233
  description: label("installationPromptHint", "OpenID providers only: login, consent, or select_account."),
195
234
  autoComplete: "off",
235
+ visibleWhen: forProviders("google", "microsoft"),
196
236
  },
197
237
  {
198
238
  key: "trustedEmailLink",
@@ -255,6 +295,8 @@ const INSTALLATION_EDIT_FORM_DESCRIPTOR = {
255
295
  labelSetKey: LABEL_SET_KEY,
256
296
  fields: [
257
297
  { key: "installationKey", fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.hidden },
298
+ // Read by the fields' conditions only; an installation keeps its provider.
299
+ { key: "providerKey", fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.hidden },
258
300
  ...INSTALLATION_SHARED_FIELDS,
259
301
  {
260
302
  key: "loginEnabled",
@@ -324,6 +366,10 @@ async function loadLabels(context) {
324
366
  installationTenant: labels.providers.tenant,
325
367
  installationTenantHint: labels.installations.tenantHint,
326
368
  installationTenantPlaceholder: labels.providers.tenantPlaceholder,
369
+ installationTeamId: labels.providers.teamId,
370
+ installationTeamIdHint: labels.providers.teamIdHint,
371
+ installationKeyId: labels.providers.keyId,
372
+ installationKeyIdHint: labels.providers.keyIdHint,
327
373
  installationScopes: labels.providers.scopes,
328
374
  installationScopesHint: labels.providers.scopesHint,
329
375
  installationRestrictions: labels.providers.restrictions,
@@ -5,12 +5,8 @@ import { PHI_AUTH_WORKFLOW_WIDGET_DEFINITION } from "./widgets/auth-workflow/con
5
5
  import { PHI_AUTH_METHODS_WIDGET_DEFINITION } from "./widgets/auth-methods/config";
6
6
  import { createPhiAuthoringWidgetModule, definePhiAuthoringWidgetModuleLoader, } from "../client-authoring-widget-module";
7
7
  export default createPhiAuthoringWidgetModule([
8
- definePhiAuthoringWidgetModuleLoader(PHI_AUTH_LOGOUT_WIDGET_DEFINITION, () => import("./widgets/logout/authoring")
9
- .then((module) => module.PHI_AUTH_LOGOUT_WIDGET_BUILDER_PLUGIN)),
10
- definePhiAuthoringWidgetModuleLoader(PHI_AUTH_SECURITY_WIDGET_DEFINITION, () => import("./widgets/security/authoring")
11
- .then((module) => module.PHI_AUTH_SECURITY_WIDGET_BUILDER_PLUGIN)),
12
- definePhiAuthoringWidgetModuleLoader(PHI_AUTH_WORKFLOW_WIDGET_DEFINITION, () => import("./widgets/auth-workflow/authoring")
13
- .then((module) => module.PHI_AUTH_WORKFLOW_WIDGET_BUILDER_PLUGIN)),
14
- definePhiAuthoringWidgetModuleLoader(PHI_AUTH_METHODS_WIDGET_DEFINITION, () => import("./widgets/auth-methods/authoring")
15
- .then((module) => module.PHI_AUTH_METHODS_WIDGET_BUILDER_PLUGIN)),
8
+ definePhiAuthoringWidgetModuleLoader(PHI_AUTH_LOGOUT_WIDGET_DEFINITION, () => Promise.resolve(PHI_AUTH_LOGOUT_WIDGET_DEFINITION)),
9
+ definePhiAuthoringWidgetModuleLoader(PHI_AUTH_SECURITY_WIDGET_DEFINITION, () => Promise.resolve(PHI_AUTH_SECURITY_WIDGET_DEFINITION)),
10
+ definePhiAuthoringWidgetModuleLoader(PHI_AUTH_WORKFLOW_WIDGET_DEFINITION, () => Promise.resolve(PHI_AUTH_WORKFLOW_WIDGET_DEFINITION)),
11
+ definePhiAuthoringWidgetModuleLoader(PHI_AUTH_METHODS_WIDGET_DEFINITION, () => Promise.resolve(PHI_AUTH_METHODS_WIDGET_DEFINITION)),
16
12
  ]);
@@ -23,6 +23,8 @@ export const PHI_AUTH_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
23
23
  { key: "providerKey", title: "Provider", type: "string", required: true },
24
24
  { key: "clientId", title: "Client ID", type: "string" },
25
25
  { key: "tenant", title: "Tenant", type: "string" },
26
+ { key: "teamId", title: "Team ID", type: "string" },
27
+ { key: "keyId", title: "Key ID", type: "string" },
26
28
  { key: "enabled", title: "Installation enabled", type: "boolean", mutable: true },
27
29
  { key: "loginEnabled", title: "Offer on login", type: "boolean", mutable: true },
28
30
  { key: "sortOrder", title: "Order", type: "number" },
@@ -1,13 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PHI_AUTH_WORKFLOW_WIDGET_DEFINITION, } from "./config";
4
3
  import { PhiAuthWorkflowWidget } from "./server";
5
4
  export const PHI_AUTH_WORKFLOW_WIDGET_PLUGIN = {
6
5
  ...PHI_AUTH_WORKFLOW_WIDGET_DEFINITION,
7
6
  render: ({ runtime, config }) => (_jsx(PhiAuthWorkflowWidget, { runtime: runtime, signalRoutes: config.signalRoutes })),
8
- /*
9
- * A placeholder rather than the real body, as the account security Widget does: drawing it would start
10
- * an enrolment against Core from inside the Builder.
11
- */
12
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
13
7
  };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PHI_AUTH_LOGOUT_WIDGET_DEFINITION } from "./config";
4
3
  import { PhiAuthLogoutWidget } from "./server";
5
4
  export const PHI_AUTH_LOGOUT_WIDGET_PLUGIN = {
6
5
  ...PHI_AUTH_LOGOUT_WIDGET_DEFINITION,
7
6
  render: ({ runtime, config }) => _jsx(PhiAuthLogoutWidget, { runtime: runtime, config: config }),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PHI_AUTH_SECURITY_WIDGET_DEFINITION } from "./config";
4
3
  import { PhiAuthSecurityWidget } from "./server";
5
4
  export const PHI_AUTH_SECURITY_WIDGET_PLUGIN = {
6
5
  ...PHI_AUTH_SECURITY_WIDGET_DEFINITION,
7
6
  render: ({ runtime, config }) => _jsx(PhiAuthSecurityWidget, { runtime: runtime, config: config }),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -8,7 +8,7 @@ export const PHI_AUTH_RUNTIME_MODULE_WIDGETS = [
8
8
  definePhiFirstPartyWidget({
9
9
  definition: PHI_AUTH_LOGOUT_WIDGET_DEFINITION,
10
10
  ownerModuleId: PHI_AUTH_RUNTIME_MODULE_ID,
11
- renderPolicies: { runtime: "custom", preview: "custom", authoring: "custom" },
11
+ renderPolicies: { runtime: "custom", preview: "visualPlaceholder", authoring: "custom" },
12
12
  loadRuntime: () => import("./widgets/logout/plugin")
13
13
  .then((module) => module.PHI_AUTH_LOGOUT_WIDGET_PLUGIN),
14
14
  loadPreview: () => import("./widgets/logout/plugin")
@@ -17,7 +17,7 @@ export const PHI_AUTH_RUNTIME_MODULE_WIDGETS = [
17
17
  definePhiFirstPartyWidget({
18
18
  definition: PHI_AUTH_SECURITY_WIDGET_DEFINITION,
19
19
  ownerModuleId: PHI_AUTH_RUNTIME_MODULE_ID,
20
- renderPolicies: { runtime: "custom", preview: "custom", authoring: "custom" },
20
+ renderPolicies: { runtime: "custom", preview: "visualPlaceholder", authoring: "custom" },
21
21
  loadRuntime: () => import("./widgets/security/plugin")
22
22
  .then((module) => module.PHI_AUTH_SECURITY_WIDGET_PLUGIN),
23
23
  loadPreview: () => import("./widgets/security/plugin")
@@ -26,7 +26,9 @@ export const PHI_AUTH_RUNTIME_MODULE_WIDGETS = [
26
26
  definePhiFirstPartyWidget({
27
27
  definition: PHI_AUTH_WORKFLOW_WIDGET_DEFINITION,
28
28
  ownerModuleId: PHI_AUTH_RUNTIME_MODULE_ID,
29
- renderPolicies: { runtime: "custom", preview: "custom", authoring: "custom" },
29
+ // The placeholder rather than the real body, as for account security: drawing it would start an
30
+ // enrolment against Core from inside the Builder.
31
+ renderPolicies: { runtime: "custom", preview: "visualPlaceholder", authoring: "custom" },
30
32
  loadRuntime: () => import("./widgets/auth-workflow/plugin")
31
33
  .then((module) => module.PHI_AUTH_WORKFLOW_WIDGET_PLUGIN),
32
34
  loadPreview: () => import("./widgets/auth-workflow/plugin")
@@ -3,6 +3,6 @@ import { PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION, } from "./widgets/account-avatar/
3
3
  import { PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION, } from "./widgets/account-avatar-picker/config";
4
4
  import { createPhiAuthoringWidgetModule, definePhiAuthoringWidgetModuleLoader, } from "../client-authoring-widget-module";
5
5
  export default createPhiAuthoringWidgetModule([
6
- definePhiAuthoringWidgetModuleLoader(PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION, () => import("./widgets/account-avatar/authoring").then((module) => module.PHI_ACCOUNT_AVATAR_WIDGET_BUILDER_PLUGIN)),
7
- definePhiAuthoringWidgetModuleLoader(PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION, () => import("./widgets/account-avatar-picker/authoring").then((module) => module.PHI_ACCOUNT_AVATAR_PICKER_WIDGET_BUILDER_PLUGIN)),
6
+ definePhiAuthoringWidgetModuleLoader(PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION, () => Promise.resolve(PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION)),
7
+ definePhiAuthoringWidgetModuleLoader(PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION, () => Promise.resolve(PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION)),
8
8
  ]);
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION } from "./config";
4
3
  import { PhiAccountAvatarWidget } from "./server";
5
4
  export const PHI_ACCOUNT_AVATAR_WIDGET_PLUGIN = {
6
5
  ...PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION,
7
6
  render: ({ runtime, config }) => _jsx(PhiAccountAvatarWidget, { runtime: runtime, config: config }),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { renderPhiWidgetPreviewPlaceholder } from "../../../../../plugins/factories/widget-renderers";
3
2
  import { PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION } from "./config";
4
3
  import { PhiAccountAvatarPickerWidget } from "./server";
5
4
  export const PHI_ACCOUNT_AVATAR_PICKER_WIDGET_PLUGIN = {
6
5
  ...PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION,
7
6
  render: ({ runtime, config }) => _jsx(PhiAccountAvatarPickerWidget, { runtime: runtime, config: config }),
8
- renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
9
7
  };