@phis/ui 0.6.3 → 0.6.5
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.
- package/components/cms/phi-cms-layout-renderer.js +11 -2
- package/components/controls/phi-multi-select-control.js +4 -2
- package/components/controls/phi-options-provider.d.ts +1 -0
- package/components/controls/phi-options-provider.js +1 -0
- package/components/controls/phi-segmented-control.js +15 -1
- package/components/controls/phi-select-control.d.ts +21 -0
- package/components/controls/phi-select-control.js +2 -2
- package/components/controls/phi-status-dot-control.d.ts +15 -0
- package/components/controls/phi-status-dot-control.js +25 -0
- package/components/controls/phi-table-control.js +8 -1
- package/components/controls/phi-tree-control.js +5 -4
- package/components/controls/phi-tree-select-control.js +1 -0
- package/components/layouts/clients/phi-split-card-half.d.ts +4 -1
- package/components/layouts/clients/phi-split-card-half.js +2 -2
- package/components/layouts/clients/phi-split-card-layout-client.d.ts +6 -3
- package/components/layouts/clients/phi-split-card-layout-client.js +5 -3
- package/components/layouts/clients/phi-three-column-layout-client.d.ts +20 -1
- package/components/layouts/clients/phi-three-column-layout-client.js +31 -15
- package/components/layouts/layout-definitions.d.ts +96 -0
- package/components/layouts/layout-definitions.js +40 -2
- package/components/layouts/plugins/split-card-layout-plugin.js +1 -1
- package/components/layouts/plugins/three-column-layout-plugin.js +1 -1
- package/components/layouts/split-card-geometry.d.ts +9 -4
- package/components/layouts/split-card-geometry.js +29 -13
- package/components/media/media-folder-options.d.ts +10 -0
- package/components/media/media-folder-options.js +14 -0
- package/components/shell/phi-antd-icon.d.ts +1 -0
- package/components/shell/phi-antd-icon.js +3 -0
- package/components/widgets/inspector-field-row.js +4 -1
- package/components/widgets/label-sets/admin-users.d.ts +3 -0
- package/components/widgets/label-sets/admin-users.js +8 -2
- package/components/widgets/label-sets/gallery.js +2 -2
- package/components/widgets/label-sets/inspector.js +4 -0
- package/components/widgets/label-sets/observability-logs.js +2 -2
- package/components/widgets/label-sets/profile.js +2 -1
- package/components/widgets/label-types/gallery.d.ts +2 -3
- package/components/widgets/label-types/gallery.js +1 -4
- package/components/widgets/label-types/inspector.d.ts +4 -0
- package/components/widgets/label-types/inspector.js +2 -0
- package/components/widgets/shared/markdown-image-vocabulary.js +1 -1
- package/constants/cms-layout-proportions.d.ts +6 -0
- package/constants/cms-layout-proportions.js +17 -0
- package/constants/runtime-module-ownership.js +1 -0
- package/helpers/page-reference-tree.js +8 -0
- package/helpers/table-action-links.d.ts +11 -0
- package/helpers/table-action-links.js +14 -0
- package/helpers/table-action-row-link.d.ts +8 -0
- package/helpers/table-action-row-link.js +14 -0
- package/package.json +2 -2
- package/plugins/factories/widget-renderers.d.ts +7 -1
- package/plugins/factories/widget-renderers.js +12 -2
- package/plugins/runtime-modules/asset/authoring-widgets.js +2 -2
- package/plugins/runtime-modules/asset/data-providers.js +1 -1
- package/plugins/runtime-modules/asset/services/options.js +7 -11
- package/plugins/runtime-modules/asset/widgets/area-upload/plugin.js +0 -2
- package/plugins/runtime-modules/asset/widgets/asset-focal-rect/plugin.js +0 -2
- package/plugins/runtime-modules/asset/widgets/image-inspector/plugin.js +0 -2
- package/plugins/runtime-modules/asset/widgets/media-picker/plugin.js +0 -2
- package/plugins/runtime-modules/asset/widgets.js +4 -4
- package/plugins/runtime-modules/auth/authoring-widgets.js +4 -8
- package/plugins/runtime-modules/auth/services/installations-table.js +3 -1
- package/plugins/runtime-modules/auth/widgets/auth-workflow/plugin.js +0 -6
- package/plugins/runtime-modules/auth/widgets/logout/plugin.js +0 -2
- package/plugins/runtime-modules/auth/widgets/security/plugin.js +0 -2
- package/plugins/runtime-modules/auth/widgets.js +5 -3
- package/plugins/runtime-modules/avatar/authoring-widgets.js +2 -2
- package/plugins/runtime-modules/avatar/widgets/account-avatar/plugin.js +0 -2
- package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/plugin.js +0 -2
- package/plugins/runtime-modules/avatar/widgets.js +2 -2
- package/plugins/runtime-modules/builder/authoring-widgets.js +1 -1
- package/plugins/runtime-modules/builder/clients/inspector-choice-cascader.d.ts +28 -0
- package/plugins/runtime-modules/builder/clients/inspector-choice-cascader.js +98 -0
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +27 -3
- package/plugins/runtime-modules/builder/clients/inspector-record-field-options.d.ts +17 -0
- package/plugins/runtime-modules/builder/clients/inspector-record-field-options.js +21 -0
- package/plugins/runtime-modules/builder/clients/inspector-translate-switch.d.ts +24 -0
- package/plugins/runtime-modules/builder/clients/inspector-translate-switch.js +29 -0
- package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
- package/plugins/runtime-modules/builder/clients/layout-inspector.js +4 -2
- package/plugins/runtime-modules/builder/clients/widget-inspector.d.ts +1 -1
- package/plugins/runtime-modules/builder/clients/widget-inspector.js +6 -6
- package/plugins/runtime-modules/builder/plugin-meta-labels.js +17 -0
- package/plugins/runtime-modules/builder/render-root-node-scaffold.js +12 -2
- package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +0 -2
- package/plugins/runtime-modules/builder/widgets.js +3 -3
- package/plugins/runtime-modules/contracts.js +8 -4
- package/plugins/runtime-modules/core/authoring-widgets.js +2 -2
- package/plugins/runtime-modules/core/data-providers.d.ts +7 -3
- package/plugins/runtime-modules/core/data-providers.js +11 -1
- package/plugins/runtime-modules/core/definition.d.ts +7 -3
- package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/draft-status/client.d.ts +2 -1
- package/plugins/runtime-modules/core/widgets/draft-status/client.js +4 -3
- package/plugins/runtime-modules/core/widgets/gallery/authoring.js +6 -8
- package/plugins/runtime-modules/core/widgets/gallery/client.js +4 -0
- package/plugins/runtime-modules/core/widgets/gallery/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +5 -1
- package/plugins/runtime-modules/core/widgets/gallery/server.js +8 -4
- package/plugins/runtime-modules/core/widgets/image/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +11 -0
- package/plugins/runtime-modules/core/widgets/markdown/config.js +24 -22
- package/plugins/runtime-modules/core/widgets/simple-text/client.d.ts +9 -5
- package/plugins/runtime-modules/core/widgets/simple-text/client.js +5 -7
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +63 -4
- package/plugins/runtime-modules/core/widgets/simple-text/config.js +45 -11
- package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.d.ts +13 -0
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +23 -4
- package/plugins/runtime-modules/core/widgets/simple-text/server.d.ts +4 -2
- package/plugins/runtime-modules/core/widgets/simple-text/server.js +7 -6
- package/plugins/runtime-modules/core/widgets/table/client.js +4 -4
- package/plugins/runtime-modules/core/widgets/table/config.js +11 -3
- package/plugins/runtime-modules/core/widgets/table/plugin.js +21 -1
- package/plugins/runtime-modules/core/widgets/thread-conversation/plugin.js +0 -2
- package/plugins/runtime-modules/core/widgets/tree/config.js +2 -1
- package/plugins/runtime-modules/core/widgets/tree/plugin.js +16 -1
- package/plugins/runtime-modules/core/widgets.js +1 -1
- package/plugins/runtime-modules/editor/services/releases-table.js +4 -1
- package/plugins/runtime-modules/observability/data-providers.js +1 -1
- package/plugins/runtime-modules/observability/services/table.js +3 -1
- package/plugins/runtime-modules/theme/authoring-widgets.js +5 -5
- package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +0 -5
- package/plugins/runtime-modules/theme/widgets.js +4 -4
- package/plugins/runtime-modules/user-management/addon-roles.d.ts +28 -7
- package/plugins/runtime-modules/user-management/addon-roles.js +42 -17
- package/plugins/runtime-modules/user-management/client-data-providers.js +6 -0
- package/plugins/runtime-modules/user-management/data-providers.js +11 -2
- package/plugins/runtime-modules/user-management/forms.js +40 -1
- package/plugins/runtime-modules/user-management/ids.d.ts +1 -0
- package/plugins/runtime-modules/user-management/ids.js +1 -0
- package/plugins/runtime-modules/user-management/services/options.d.ts +14 -3
- package/plugins/runtime-modules/user-management/services/options.js +52 -16
- package/plugins/runtime-modules/user-management/services/table.js +11 -25
- package/plugins/runtime-modules/user-management/services/users-query.d.ts +9 -0
- package/plugins/runtime-modules/user-management/services/users-query.js +29 -0
- package/plugins/runtime-modules/video/widgets/embed/plugin.js +0 -2
- package/plugins/runtime-modules/video/widgets.js +1 -1
- package/styles/layout.css +4 -4
- package/types/cms-config.d.ts +12 -4
- package/types/cms-config.js +3 -0
- package/types/cms-plugins.d.ts +26 -4
- package/types/core-widget-placements.d.ts +4 -4
- package/types/table-widget.d.ts +17 -1
- package/types/tree.d.ts +2 -0
- package/plugins/runtime-modules/asset/widgets/asset-focal-rect/authoring.d.ts +0 -2
- package/plugins/runtime-modules/asset/widgets/asset-focal-rect/authoring.js +0 -6
- package/plugins/runtime-modules/asset/widgets/image-inspector/authoring.d.ts +0 -2
- package/plugins/runtime-modules/asset/widgets/image-inspector/authoring.js +0 -6
- package/plugins/runtime-modules/auth/widgets/auth-methods/authoring.d.ts +0 -7
- package/plugins/runtime-modules/auth/widgets/auth-methods/authoring.js +0 -12
- package/plugins/runtime-modules/auth/widgets/auth-workflow/authoring.d.ts +0 -7
- package/plugins/runtime-modules/auth/widgets/auth-workflow/authoring.js +0 -12
- package/plugins/runtime-modules/auth/widgets/logout/authoring.d.ts +0 -3
- package/plugins/runtime-modules/auth/widgets/logout/authoring.js +0 -8
- package/plugins/runtime-modules/auth/widgets/security/authoring.d.ts +0 -3
- package/plugins/runtime-modules/auth/widgets/security/authoring.js +0 -8
- package/plugins/runtime-modules/avatar/widgets/account-avatar/authoring.d.ts +0 -2
- package/plugins/runtime-modules/avatar/widgets/account-avatar/authoring.js +0 -6
- package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/authoring.d.ts +0 -2
- package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/authoring.js +0 -6
- package/plugins/runtime-modules/builder/widgets/structure-region/internal-builder.d.ts +0 -22
- package/plugins/runtime-modules/builder/widgets/structure-region/internal-builder.js +0 -8
- package/plugins/runtime-modules/core/widgets/form-preview/authoring.d.ts +0 -10
- package/plugins/runtime-modules/core/widgets/form-preview/authoring.js +0 -15
- package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +0 -3
- package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +0 -9
- package/plugins/runtime-modules/theme/widgets/brand-controls/authoring.d.ts +0 -76
- package/plugins/runtime-modules/theme/widgets/brand-controls/authoring.js +0 -30
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { isPhiRecord } from "../../../../helpers/is-record";
|
|
3
3
|
import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
|
|
4
|
-
import { buildPhiAddonRoleTags
|
|
5
|
-
import {
|
|
4
|
+
import { buildPhiAddonRoleTags } from "../addon-roles";
|
|
5
|
+
import { createPhiTableProviderRequestInit, readPhiPositiveInteger, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
|
|
6
|
+
import { buildPhiUserManagementUsersQueryParams } from "./users-query";
|
|
6
7
|
import { PhiTableProviderError, } from "../../../../types/table-widget";
|
|
7
8
|
import { createPhiTableProviderClient } from "../../../../components/widgets/client/shared/phi-table-provider";
|
|
8
9
|
import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../../../../plugins/runtime-modules/user-management/data-providers";
|
|
@@ -10,28 +11,7 @@ import { readPhiTableProviderResponse, } from "../../../../components/widgets/cl
|
|
|
10
11
|
const API_PATH = "/api/site/admin/users";
|
|
11
12
|
const RESPONSE_OPTIONS = { subject: "User Management" };
|
|
12
13
|
async function loadUsers({ query, signal, }) {
|
|
13
|
-
const params =
|
|
14
|
-
const search = query.search?.trim() ?? "";
|
|
15
|
-
const accountType = readPhiTableStringFilter(query, "accountType");
|
|
16
|
-
const addonRole = parsePhiAddonRoleFilter(readPhiTableStringFilter(query, "addonRole"));
|
|
17
|
-
const enabled = readPhiTableStringFilter(query, "enabled");
|
|
18
|
-
if (search)
|
|
19
|
-
params.set("search", search);
|
|
20
|
-
if (accountType)
|
|
21
|
-
params.set("accountType", accountType);
|
|
22
|
-
// The Core's two filters: an Add-on, and optionally one of its roles (`addonRole` needs `addonId`).
|
|
23
|
-
if (addonRole) {
|
|
24
|
-
params.set("addonId", addonRole.addonId);
|
|
25
|
-
if (addonRole.addonRole)
|
|
26
|
-
params.set("addonRole", addonRole.addonRole);
|
|
27
|
-
}
|
|
28
|
-
if (enabled)
|
|
29
|
-
params.set("enabled", enabled);
|
|
30
|
-
const primarySort = query.sorts?.[0];
|
|
31
|
-
if (primarySort) {
|
|
32
|
-
params.set("sortKey", primarySort.key);
|
|
33
|
-
params.set("sortOrder", primarySort.direction === "descending" ? "descend" : "ascend");
|
|
34
|
-
}
|
|
14
|
+
const params = buildPhiUserManagementUsersQueryParams(query);
|
|
35
15
|
const result = await readPhiTableProviderResponse(await fetch(`${API_PATH}?${params.toString()}`, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
|
|
36
16
|
const rows = readPhiTableRows(result?.rows).map((row) => ({ ...row, addonRoleTags: buildPhiAddonRoleTags(row) }));
|
|
37
17
|
if (typeof result?.siteTotal !== "number" || !Number.isFinite(result.siteTotal) || result.siteTotal < 0) {
|
|
@@ -87,6 +67,10 @@ async function readUserRecord({ rowIdentity, signal }) {
|
|
|
87
67
|
...user,
|
|
88
68
|
userId: String(userId),
|
|
89
69
|
roles: Array.isArray(user.roleTags) ? user.roleTags : [],
|
|
70
|
+
// `"<addonId>:<role>"`, the form the save takes back.
|
|
71
|
+
addonRoles: Array.isArray(user.addonRoles)
|
|
72
|
+
? user.addonRoles.filter((entry) => typeof entry === "string")
|
|
73
|
+
: [],
|
|
90
74
|
changePassword: false,
|
|
91
75
|
};
|
|
92
76
|
}
|
|
@@ -165,7 +149,9 @@ async function mutateUser(request) {
|
|
|
165
149
|
}
|
|
166
150
|
return { status: "accepted", invalidation: "view" };
|
|
167
151
|
}
|
|
168
|
-
|
|
152
|
+
// Its own descriptor by key: the list holds the Module's other Providers too, in no promised order.
|
|
153
|
+
const resources = PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS
|
|
154
|
+
.find((descriptor) => descriptor.key === PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.table)?.resources ?? [];
|
|
169
155
|
export const PhiUserManagementTableProviderClient = createPhiTableProviderClient({
|
|
170
156
|
key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.table,
|
|
171
157
|
resources,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PhiTableQuery } from "../../../../types/table-widget";
|
|
2
|
+
/**
|
|
3
|
+
* The users route's query for one Table page: the page, the search, the filters and the sort. Apart from
|
|
4
|
+
* the Provider so what the Table asks the Core can be read without a request.
|
|
5
|
+
*
|
|
6
|
+
* The Add-on role filter holds an Add-on id and is sent as the Core's `addonId` alone: whoever holds any role
|
|
7
|
+
* of that Add-on. The Core's `addonRole` is not asked for.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildPhiUserManagementUsersQueryParams(query: PhiTableQuery): URLSearchParams;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { buildPhiTablePageParams, readPhiTableStringFilter, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
|
|
2
|
+
/**
|
|
3
|
+
* The users route's query for one Table page: the page, the search, the filters and the sort. Apart from
|
|
4
|
+
* the Provider so what the Table asks the Core can be read without a request.
|
|
5
|
+
*
|
|
6
|
+
* The Add-on role filter holds an Add-on id and is sent as the Core's `addonId` alone: whoever holds any role
|
|
7
|
+
* of that Add-on. The Core's `addonRole` is not asked for.
|
|
8
|
+
*/
|
|
9
|
+
export function buildPhiUserManagementUsersQueryParams(query) {
|
|
10
|
+
const params = buildPhiTablePageParams(query, 20);
|
|
11
|
+
const search = query.search?.trim() ?? "";
|
|
12
|
+
const accountType = readPhiTableStringFilter(query, "accountType");
|
|
13
|
+
const addonId = readPhiTableStringFilter(query, "addonRole");
|
|
14
|
+
const enabled = readPhiTableStringFilter(query, "enabled");
|
|
15
|
+
if (search)
|
|
16
|
+
params.set("search", search);
|
|
17
|
+
if (accountType)
|
|
18
|
+
params.set("accountType", accountType);
|
|
19
|
+
if (addonId)
|
|
20
|
+
params.set("addonId", addonId);
|
|
21
|
+
if (enabled)
|
|
22
|
+
params.set("enabled", enabled);
|
|
23
|
+
const primarySort = query.sorts?.[0];
|
|
24
|
+
if (primarySort) {
|
|
25
|
+
params.set("sortKey", primarySort.key);
|
|
26
|
+
params.set("sortOrder", primarySort.direction === "descending" ? "descend" : "ascend");
|
|
27
|
+
}
|
|
28
|
+
return params;
|
|
29
|
+
}
|
|
@@ -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_VIDEO_EMBED_WIDGET_DEFINITION } from "./config";
|
|
4
3
|
import { PhiVideoEmbedWidgetServer } from "./server";
|
|
5
4
|
export const PHI_VIDEO_EMBED_WIDGET_PLUGIN = {
|
|
6
5
|
...PHI_VIDEO_EMBED_WIDGET_DEFINITION,
|
|
7
6
|
render: ({ runtime, config }) => _jsx(PhiVideoEmbedWidgetServer, { runtime: runtime, config: config }),
|
|
8
|
-
renderPreview: ({ widget }) => renderPhiWidgetPreviewPlaceholder(widget),
|
|
9
7
|
};
|
|
@@ -5,7 +5,7 @@ export const PHI_VIDEO_RUNTIME_MODULE_WIDGETS = [
|
|
|
5
5
|
definePhiFirstPartyWidget({
|
|
6
6
|
definition: PHI_VIDEO_EMBED_WIDGET_DEFINITION,
|
|
7
7
|
ownerModuleId: PHI_VIDEO_RUNTIME_MODULE_ID,
|
|
8
|
-
renderPolicies: { runtime: "custom", preview: "
|
|
8
|
+
renderPolicies: { runtime: "custom", preview: "visualPlaceholder", authoring: "custom" },
|
|
9
9
|
loadRuntime: () => import("./widgets/embed/plugin").then((module) => module.PHI_VIDEO_EMBED_WIDGET_PLUGIN),
|
|
10
10
|
loadPreview: () => import("./widgets/embed/plugin").then((module) => module.PHI_VIDEO_EMBED_WIDGET_PLUGIN),
|
|
11
11
|
}),
|
package/styles/layout.css
CHANGED
|
@@ -783,10 +783,10 @@
|
|
|
783
783
|
}
|
|
784
784
|
|
|
785
785
|
/*
|
|
786
|
-
* The Split Card's grid (`phi-split-card-layout-client.tsx`): the two cards side by side in
|
|
787
|
-
*
|
|
788
|
-
* not the screen's, so it stacks in a narrow column on a wide screen as well.
|
|
789
|
-
* the whole shared Background (`resolvePhiSplitCardGroundFrame`).
|
|
786
|
+
* The Split Card's grid (`phi-split-card-layout-client.tsx`): the two cards side by side in their ratio
|
|
787
|
+
* (`--phi-split-card-columns`), and one above the other where the Split Card itself is narrower than
|
|
788
|
+
* 36rem -- its own width, not the screen's, so it stacks in a narrow column on a wide screen as well.
|
|
789
|
+
* Stacked, each card shows the whole shared Background (`resolvePhiSplitCardGroundFrame`).
|
|
790
790
|
*/
|
|
791
791
|
.phi-split-card__grid {
|
|
792
792
|
display: grid;
|
package/types/cms-config.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { PhiResponsiveValue } from "./responsive";
|
|
|
7
7
|
import type { PhiRenderableBlockBase, PhiRenderableBlockAnchor, PhiRenderableBlockResponsiveSize } from "./renderable-block";
|
|
8
8
|
import type { PhiBaseLayoutSlotStates } from "../components/layouts/phi-layout-contract";
|
|
9
9
|
import { type PhiSpacingScaleKey } from "../components/widgets/config/spacing-options";
|
|
10
|
+
import { type PhiCmsSplitCardRatio, type PhiCmsThreeColumnSideShare } from "../constants/cms-layout-proportions";
|
|
10
11
|
export type PhiCmsPluginConfigBase = Record<string, unknown>;
|
|
11
12
|
export type PhiCmsRenderableBlockConfigBase = PhiCmsPluginConfigBase & PhiRenderableBlockBase;
|
|
12
13
|
export type PhiCmsLayerBase = PhiCmsRenderableBlockConfigBase & {
|
|
@@ -166,20 +167,27 @@ export type PhiCmsGridLayoutConfig = PhiCmsLayerBase & {
|
|
|
166
167
|
};
|
|
167
168
|
export type PhiCmsThreeColumnLayoutConfig = PhiCmsDirectionalLayoutConfigBase & {
|
|
168
169
|
balancedSides?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* What each balanced side takes of the row, in percent (10, 20, 25, 30 or 33); the middle takes the
|
|
172
|
+
* rest. Read only while `balancedSides` holds; a side with a fixed width keeps it. Absent is 25.
|
|
173
|
+
*/
|
|
174
|
+
sideShare?: PhiCmsThreeColumnSideShare;
|
|
169
175
|
leftWidth?: PhiCssLength;
|
|
170
176
|
middleWidth?: PhiCssLength;
|
|
171
177
|
rightWidth?: PhiCssLength;
|
|
172
178
|
contentAlign?: CSSProperties["alignItems"];
|
|
173
179
|
};
|
|
174
180
|
/**
|
|
175
|
-
* Two cards on the golden ratio. The Layout's Surface is
|
|
176
|
-
* depth and pane -- and its Background runs once across
|
|
177
|
-
* a half sets its own inset; a half has none of its own.
|
|
181
|
+
* Two cards side by side, on the golden ratio unless `ratio` says otherwise. The Layout's Surface is
|
|
182
|
+
* the cards' -- each half draws its edge, corner, depth and pane -- and its Background runs once across
|
|
183
|
+
* both and shows only inside them. What stands in a half sets its own inset; a half has none of its own.
|
|
178
184
|
*/
|
|
179
185
|
export type PhiCmsSplitCardLayoutConfig = PhiCmsLayerBase & {
|
|
180
186
|
gap?: CSSProperties["gap"];
|
|
181
|
-
/** The
|
|
187
|
+
/** The ratio the other way round: the left card the larger one. Nothing to swap at `50-50`. */
|
|
182
188
|
swapRatio?: boolean;
|
|
189
|
+
/** The ratio the cards stand in: `golden` (φ, absent), `50-50` or `20-80`. */
|
|
190
|
+
ratio?: PhiCmsSplitCardRatio;
|
|
183
191
|
};
|
|
184
192
|
/**
|
|
185
193
|
* Children in columns at their own heights: how many columns at each width, the gap between them, and
|
package/types/cms-config.js
CHANGED
|
@@ -12,6 +12,7 @@ import { isPhiRecord } from "../helpers/is-record";
|
|
|
12
12
|
import { createPhiConfigReader } from "../components/widgets/config/strict-config-reader";
|
|
13
13
|
import { PHI_SPACING_SCALE_KEYS } from "../components/widgets/config/spacing-options";
|
|
14
14
|
import { PHI_GRID_COLUMN_COUNTS, isPhiGridColumnCount } from "../constants/grid-columns";
|
|
15
|
+
import { PHI_CMS_SPLIT_CARD_DEFAULT_RATIO, PHI_CMS_SPLIT_CARD_RATIOS, PHI_CMS_THREE_COLUMN_DEFAULT_SIDE_SHARE, PHI_CMS_THREE_COLUMN_SIDE_SHARES, } from "../constants/cms-layout-proportions";
|
|
15
16
|
const PHI_LAYOUT_SLOT_STATES = ["expanded", "collapsed", "hidden"];
|
|
16
17
|
/** A Layout's starting slot states: a list by slot, gaps allowed, or a record keyed by slot index. */
|
|
17
18
|
function readInitialSlotStates(reader) {
|
|
@@ -393,6 +394,7 @@ export function parsePhiCmsThreeColumnLayoutConfig(config) {
|
|
|
393
394
|
labelEnd: readLayoutLabelEnd(reader),
|
|
394
395
|
...readLayoutPadding(reader),
|
|
395
396
|
balancedSides: reader.boolean("balancedSides") ?? true,
|
|
397
|
+
sideShare: reader.oneOf("sideShare", PHI_CMS_THREE_COLUMN_SIDE_SHARES) ?? PHI_CMS_THREE_COLUMN_DEFAULT_SIDE_SHARE,
|
|
396
398
|
gap: readCssSizeField(reader, "gap"),
|
|
397
399
|
anchor: readLayoutAnchor(reader),
|
|
398
400
|
align: reader.string("align"),
|
|
@@ -411,6 +413,7 @@ export function parsePhiCmsSplitCardLayoutConfig(config) {
|
|
|
411
413
|
labelEnd: readLayoutLabelEnd(reader),
|
|
412
414
|
gap: readCssSizeField(reader, "gap"),
|
|
413
415
|
swapRatio: reader.boolean("swapRatio"),
|
|
416
|
+
ratio: reader.oneOf("ratio", PHI_CMS_SPLIT_CARD_RATIOS) ?? PHI_CMS_SPLIT_CARD_DEFAULT_RATIO,
|
|
414
417
|
padding: readCssSizeField(reader, "padding"),
|
|
415
418
|
paddingTop: readCssSizeField(reader, "paddingTop"),
|
|
416
419
|
paddingBottom: readCssSizeField(reader, "paddingBottom"),
|
package/types/cms-plugins.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ type PhiCmsConfigFieldBase = {
|
|
|
73
73
|
*/
|
|
74
74
|
heading?: string;
|
|
75
75
|
};
|
|
76
|
-
export type PhiCmsConfigFieldChoicePresentation = "select" | "segmented" | "tabs" | "autocomplete" | "radio";
|
|
76
|
+
export type PhiCmsConfigFieldChoicePresentation = "select" | "segmented" | "tabs" | "autocomplete" | "radio" | "cascader";
|
|
77
77
|
/**
|
|
78
78
|
* Where a collection is edited.
|
|
79
79
|
*
|
|
@@ -542,7 +542,15 @@ export type PhiCmsWidgetPlugin<TConfig> = {
|
|
|
542
542
|
fields: PhiCmsConfigField[];
|
|
543
543
|
parseConfig: (raw: Record<string, unknown>) => TConfig;
|
|
544
544
|
render: PhiBivariantCallback<[PhiCmsWidgetPluginRenderArgs<TConfig>], ReactNode>;
|
|
545
|
-
|
|
545
|
+
/**
|
|
546
|
+
* The Widget in a Preview, where its policy (`renderPolicies.preview`) is `custom`.
|
|
547
|
+
*
|
|
548
|
+
* Left out where the policy is `visualPlaceholder`: a Widget with nothing to show there -- its rows are
|
|
549
|
+
* a viewer's, or drawing it would start what only a visitor may start -- is drawn as the house
|
|
550
|
+
* placeholder (`renderPhiWidgetPreviewPlaceholder`), its name and type, and draws no skeleton of its
|
|
551
|
+
* own. A `custom` policy without it is a missing renderer, and the node renders the diagnostic.
|
|
552
|
+
*/
|
|
553
|
+
renderPreview?: PhiBivariantCallback<[PhiCmsWidgetPluginRenderArgs<TConfig>], ReactNode>;
|
|
546
554
|
/**
|
|
547
555
|
* The words this Widget shows a reader, for the Site's search index (SEARCH.md).
|
|
548
556
|
*
|
|
@@ -577,7 +585,16 @@ export type PhiCmsWidgetPluginDefinition<TConfig> = Pick<PhiCmsWidgetPlugin<TCon
|
|
|
577
585
|
export type PhiCmsBuilderWidgetEditorInteraction = "inert" | "authoring";
|
|
578
586
|
export type PhiCmsBuilderWidgetPlugin<TConfig> = PhiCmsWidgetPluginDefinition<TConfig> & {
|
|
579
587
|
editorInteraction?: PhiCmsBuilderWidgetEditorInteraction;
|
|
580
|
-
|
|
588
|
+
/**
|
|
589
|
+
* The Widget on the Builder canvas, drawn by itself.
|
|
590
|
+
*
|
|
591
|
+
* Only where it can show something that means something there: sample values, or the shape of its
|
|
592
|
+
* settings. A Widget that cannot -- its data is the signed-in viewer's own, or it exists only once a
|
|
593
|
+
* visitor arrives with something -- leaves it out, and the canvas draws the house placeholder
|
|
594
|
+
* (`PhiWidgetEditorPlaceholder`): its name, its type and its description. No Widget draws a skeleton
|
|
595
|
+
* of its own in place of content.
|
|
596
|
+
*/
|
|
597
|
+
renderEditor?: PhiBivariantCallback<[PhiCmsBuilderWidgetRenderArgs<TConfig>], ReactNode>;
|
|
581
598
|
renderEditorTools?: PhiBivariantCallback<[PhiCmsBuilderWidgetRenderArgs<TConfig>], ReactNode>;
|
|
582
599
|
};
|
|
583
600
|
export type PhiCmsServerWidgetPlugin<TConfig> = PhiCmsWidgetPluginDefinition<TConfig> & Pick<PhiCmsWidgetPlugin<TConfig>, "render" | "renderPreview" | "searchText">;
|
|
@@ -817,7 +834,12 @@ export type PhiRuntimeModuleAuthoringClientProps = {
|
|
|
817
834
|
children: ReactNode;
|
|
818
835
|
};
|
|
819
836
|
export type PhiRuntimeRenderPolicy = "custom";
|
|
820
|
-
|
|
837
|
+
/**
|
|
838
|
+
* How a Widget or Layout is drawn in a Preview: by its own `renderPreview` (`custom`), by its runtime
|
|
839
|
+
* render (`runtimeReadOnly`), or -- a Widget only -- as the house placeholder (`visualPlaceholder`),
|
|
840
|
+
* which needs no renderer of its own.
|
|
841
|
+
*/
|
|
842
|
+
export type PhiPreviewRenderPolicy = "custom" | "runtimeReadOnly" | "visualPlaceholder";
|
|
821
843
|
export type PhiAuthoringRenderPolicy = "custom" | "usePreview";
|
|
822
844
|
export type PhiRuntimeModuleRenderPolicies = {
|
|
823
845
|
runtime: PhiRuntimeRenderPolicy;
|
|
@@ -85,20 +85,20 @@ export declare const PHI_SIMPLE_TEXT_MARKS: readonly ["bold", "italic", "underli
|
|
|
85
85
|
export type PhiSimpleTextMark = (typeof PHI_SIMPLE_TEXT_MARKS)[number];
|
|
86
86
|
export type PhiSimpleTextWidgetPlacement = PhiWidgetPlacementBase & {
|
|
87
87
|
text?: string;
|
|
88
|
-
|
|
88
|
+
/** Where the text leads: a Page by identity, or an address elsewhere (`REFERENCES.md`). */
|
|
89
|
+
linkTarget?: PhiLinkTarget;
|
|
90
|
+
/** A link field of the page record that is where the text leads instead of `linkTarget`. */
|
|
91
|
+
linkRecordField?: string;
|
|
89
92
|
icon?: string;
|
|
90
93
|
color?: string;
|
|
91
94
|
fontFamily?: PhiWidgetFontFamilyKey;
|
|
92
95
|
fontSize?: PhiWidgetFontSizeKey;
|
|
93
|
-
external?: boolean;
|
|
94
|
-
newTab?: boolean;
|
|
95
96
|
tone?: PhiTextTone;
|
|
96
97
|
marks?: PhiSimpleTextMark[];
|
|
97
98
|
/** Capitals for a label; absent, as written. */
|
|
98
99
|
textTransform?: PhiTextTransform;
|
|
99
100
|
/** A spacing step for a label in capitals; absent, normal. */
|
|
100
101
|
letterSpacing?: PhiLetterSpacingStep;
|
|
101
|
-
disabled?: boolean;
|
|
102
102
|
/** `"preset"` while the words are a Preset's (`helpers/text-source.ts`). */
|
|
103
103
|
textSource?: PhiTextSource;
|
|
104
104
|
/** A text, number or date field of the page record shown instead of the Widget's own text. */
|
package/types/table-widget.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { PhiControlOption, PhiControlOptionsProviderConfig } from "../compo
|
|
|
5
5
|
import type { PhiRuntimeDataProviderKey } from "./runtime-data-provider";
|
|
6
6
|
import type { PhiProviderDropMode, PhiProviderDropTargetCapability, PhiSignalRouteSet } from "./signals";
|
|
7
7
|
import type { PhiRuntimeConditionExpression } from "./runtime-condition";
|
|
8
|
+
import type { PhiLinkTarget } from "./references";
|
|
8
9
|
export type PhiTableRowIdentity = string | number;
|
|
9
10
|
export type PhiTableSortDirection = "ascending" | "descending";
|
|
10
11
|
export declare const PHI_TABLE_TAG_COLORS: readonly ["default", "success", "processing", "warning", "error", "magenta", "red", "volcano", "orange", "gold", "lime", "green", "cyan", "blue", "geekblue", "purple"];
|
|
@@ -180,9 +181,24 @@ export type PhiTableActionDefinition = {
|
|
|
180
181
|
icon?: string;
|
|
181
182
|
display?: "icon" | "label" | "icon-label";
|
|
182
183
|
mode?: "normal" | "primary" | "danger";
|
|
183
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Where a `link` action leads, as every Control that leads somewhere keeps it: a Page by identity, an
|
|
186
|
+
* address elsewhere as a URL with its own new-tab choice (`REFERENCES.md`).
|
|
187
|
+
*/
|
|
188
|
+
linkTarget?: PhiLinkTarget;
|
|
189
|
+
/** A row's own address, read from the row at this path, for a link that differs per row. */
|
|
184
190
|
hrefPath?: string;
|
|
191
|
+
/** Whether a row's own address (`hrefPath`) opens in a new tab; a `linkTarget` says so itself. */
|
|
185
192
|
newTab?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* The address `linkTarget` leads to, resolved by the server for this render and never stored: a Page
|
|
195
|
+
* reference means nothing in a browser. `null` is a target that resolved to nothing, which draws no link.
|
|
196
|
+
*/
|
|
197
|
+
link?: {
|
|
198
|
+
href: string;
|
|
199
|
+
newTab: boolean;
|
|
200
|
+
external: boolean;
|
|
201
|
+
} | null;
|
|
186
202
|
visibleWhen?: PhiRuntimeConditionExpression;
|
|
187
203
|
disabledWhen?: PhiRuntimeConditionExpression;
|
|
188
204
|
confirm?: {
|
package/types/tree.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export type PhiTreeOption<TMeta = unknown> = {
|
|
|
9
9
|
* path and the title stop being one.
|
|
10
10
|
*/
|
|
11
11
|
description?: string;
|
|
12
|
+
/** An icon name drawn before the label, as a control option's is: what kind of node this is, at a glance. */
|
|
13
|
+
icon?: string;
|
|
12
14
|
children?: PhiTreeOption<TMeta>[];
|
|
13
15
|
disabled?: boolean;
|
|
14
16
|
meta?: TMeta;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createPhiCmsBuilderWidgetPlugin } from "../../../../../plugins/factories/widget-builder-plugin";
|
|
4
|
-
import { PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION } from "../../../../../plugins/runtime-modules/asset/widgets/asset-focal-rect/config";
|
|
5
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
6
|
-
export const PHI_ASSET_FOCAL_RECT_WIDGET_BUILDER_PLUGIN = createPhiCmsBuilderWidgetPlugin(PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION, ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_ASSET_FOCAL_RECT_WIDGET_DEFINITION.title, summary: "Authoring preview for the Asset focal rectangle editor." })));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createPhiCmsBuilderWidgetPlugin } from "../../../../../plugins/factories/widget-builder-plugin";
|
|
4
|
-
import { PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION } from "../../../../../plugins/runtime-modules/asset/widgets/image-inspector/config";
|
|
5
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
6
|
-
export const PHI_IMAGE_INSPECTOR_WIDGET_BUILDER_PLUGIN = createPhiCmsBuilderWidgetPlugin(PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION, ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_IMAGE_INSPECTOR_WIDGET_DEFINITION.title, summary: "Builder preview for the asset inspector." })));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PhiCmsBuilderWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import { type PhiCmsAuthMethodsWidgetConfig } from "./config";
|
|
3
|
-
/**
|
|
4
|
-
* A placeholder, because what it offers is read from the Site's own configuration: which identity
|
|
5
|
-
* providers are switched on is an operator's decision in the Admin, not an author's in the Builder.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PHI_AUTH_METHODS_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<PhiCmsAuthMethodsWidgetConfig>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
4
|
-
import { PHI_AUTH_METHODS_WIDGET_DEFINITION, } from "./config";
|
|
5
|
-
/**
|
|
6
|
-
* A placeholder, because what it offers is read from the Site's own configuration: which identity
|
|
7
|
-
* providers are switched on is an operator's decision in the Admin, not an author's in the Builder.
|
|
8
|
-
*/
|
|
9
|
-
export const PHI_AUTH_METHODS_WIDGET_BUILDER_PLUGIN = {
|
|
10
|
-
...PHI_AUTH_METHODS_WIDGET_DEFINITION,
|
|
11
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_AUTH_METHODS_WIDGET_DEFINITION.title, summary: "The identity providers this Site is configured to accept." })),
|
|
12
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PhiCmsBuilderWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import { type PhiCmsAuthWorkflowWidgetConfig } from "./config";
|
|
3
|
-
/**
|
|
4
|
-
* A placeholder: this step exists only once a sign-in has asked for a second factor, so there is no
|
|
5
|
-
* state an author could be shown here that is not invented.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PHI_AUTH_WORKFLOW_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<PhiCmsAuthWorkflowWidgetConfig>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
4
|
-
import { PHI_AUTH_WORKFLOW_WIDGET_DEFINITION, } from "./config";
|
|
5
|
-
/**
|
|
6
|
-
* A placeholder: this step exists only once a sign-in has asked for a second factor, so there is no
|
|
7
|
-
* state an author could be shown here that is not invented.
|
|
8
|
-
*/
|
|
9
|
-
export const PHI_AUTH_WORKFLOW_WIDGET_BUILDER_PLUGIN = {
|
|
10
|
-
...PHI_AUTH_WORKFLOW_WIDGET_DEFINITION,
|
|
11
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_AUTH_WORKFLOW_WIDGET_DEFINITION.title, summary: "Takes over when a sign-in needs a second factor." })),
|
|
12
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PhiCmsBuilderWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import type { PhiCmsPaddingOnlyWidgetConfig } from "../../../../../components/widgets/config/helpers";
|
|
3
|
-
export declare const PHI_AUTH_LOGOUT_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<PhiCmsPaddingOnlyWidgetConfig>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PHI_AUTH_LOGOUT_WIDGET_DEFINITION } from "../../../../../plugins/runtime-modules/auth/widgets/logout/config";
|
|
4
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
5
|
-
export const PHI_AUTH_LOGOUT_WIDGET_BUILDER_PLUGIN = {
|
|
6
|
-
...PHI_AUTH_LOGOUT_WIDGET_DEFINITION,
|
|
7
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_AUTH_LOGOUT_WIDGET_DEFINITION.title, summary: "Builder preview for the logout transition." })),
|
|
8
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PhiCmsBuilderWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import type { PhiCmsPaddingOnlyWidgetConfig } from "../../../../../components/widgets/config/helpers";
|
|
3
|
-
export declare const PHI_AUTH_SECURITY_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<PhiCmsPaddingOnlyWidgetConfig>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PHI_AUTH_SECURITY_WIDGET_DEFINITION } from "../../../../../plugins/runtime-modules/auth/widgets/security/config";
|
|
4
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
5
|
-
export const PHI_AUTH_SECURITY_WIDGET_BUILDER_PLUGIN = {
|
|
6
|
-
...PHI_AUTH_SECURITY_WIDGET_DEFINITION,
|
|
7
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_AUTH_SECURITY_WIDGET_DEFINITION.title, summary: "Builder preview for authenticated account security." })),
|
|
8
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createPhiCmsBuilderWidgetPlugin } from "../../../../../plugins/factories/widget-builder-plugin";
|
|
4
|
-
import { PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION } from "../../../../../plugins/runtime-modules/avatar/widgets/account-avatar/config";
|
|
5
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
6
|
-
export const PHI_ACCOUNT_AVATAR_WIDGET_BUILDER_PLUGIN = createPhiCmsBuilderWidgetPlugin(PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION, ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_ACCOUNT_AVATAR_WIDGET_DEFINITION.title, summary: "The signed-in person's own picture, with a control to change it." })));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createPhiCmsBuilderWidgetPlugin } from "../../../../../plugins/factories/widget-builder-plugin";
|
|
4
|
-
import { PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION } from "../../../../../plugins/runtime-modules/avatar/widgets/account-avatar-picker/config";
|
|
5
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
6
|
-
export const PHI_ACCOUNT_AVATAR_PICKER_WIDGET_BUILDER_PLUGIN = createPhiCmsBuilderWidgetPlugin(PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION, ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_ACCOUNT_AVATAR_PICKER_WIDGET_DEFINITION.title, summary: "Uploads a picture into the viewer's own Media Space." })));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type PhiStructureRegionWidgetConfig } from "./config";
|
|
2
|
-
export declare const PHI_STRUCTURE_REGION_WIDGET_BUILDER_PLUGIN: {
|
|
3
|
-
renderEditor: ({ widget }: import("../../../../../types").PhiCmsBuilderWidgetRenderArgs<PhiStructureRegionWidgetConfig>) => import("react").JSX.Element;
|
|
4
|
-
kind: "widget";
|
|
5
|
-
pluginKey: string;
|
|
6
|
-
typeKey: string;
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
category: "workspace";
|
|
10
|
-
iconFamily: string;
|
|
11
|
-
slotSizePolicy: "fill";
|
|
12
|
-
fields: ({
|
|
13
|
-
key: string;
|
|
14
|
-
type: "string";
|
|
15
|
-
label: string;
|
|
16
|
-
} | {
|
|
17
|
-
key: string;
|
|
18
|
-
type: "boolean";
|
|
19
|
-
label: string;
|
|
20
|
-
})[];
|
|
21
|
-
parseConfig: (raw: Record<string, unknown>) => PhiStructureRegionWidgetConfig;
|
|
22
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PHI_STRUCTURE_REGION_WIDGET_DEFINITION, } from "./config";
|
|
4
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
5
|
-
export const PHI_STRUCTURE_REGION_WIDGET_BUILDER_PLUGIN = {
|
|
6
|
-
...PHI_STRUCTURE_REGION_WIDGET_DEFINITION,
|
|
7
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_STRUCTURE_REGION_WIDGET_DEFINITION.title, summary: "Builder editor placeholder for a structure region." })),
|
|
8
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PhiCmsBuilderWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import { type PhiCmsFormPreviewWidgetConfig } from "./config";
|
|
3
|
-
/**
|
|
4
|
-
* A placeholder, because there is nothing to preview without a token.
|
|
5
|
-
*
|
|
6
|
-
* What this Widget shows is whatever a confirmation link turns out to be about, and a link is something
|
|
7
|
-
* a visitor arrives with -- never something an author has while placing it. Standing in for it with an
|
|
8
|
-
* invented record would show the Builder a page that cannot occur.
|
|
9
|
-
*/
|
|
10
|
-
export declare const PHI_FORM_PREVIEW_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<PhiCmsFormPreviewWidgetConfig>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
4
|
-
import { PHI_FORM_PREVIEW_WIDGET_DEFINITION, } from "./config";
|
|
5
|
-
/**
|
|
6
|
-
* A placeholder, because there is nothing to preview without a token.
|
|
7
|
-
*
|
|
8
|
-
* What this Widget shows is whatever a confirmation link turns out to be about, and a link is something
|
|
9
|
-
* a visitor arrives with -- never something an author has while placing it. Standing in for it with an
|
|
10
|
-
* invented record would show the Builder a page that cannot occur.
|
|
11
|
-
*/
|
|
12
|
-
export const PHI_FORM_PREVIEW_WIDGET_BUILDER_PLUGIN = {
|
|
13
|
-
...PHI_FORM_PREVIEW_WIDGET_DEFINITION,
|
|
14
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_FORM_PREVIEW_WIDGET_DEFINITION.title, summary: "Shows what the token in the address is about, once a visitor arrives with one." })),
|
|
15
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PHI_THREAD_CONVERSATION_WIDGET_DEFINITION } from "./config";
|
|
4
|
-
import { PhiWidgetEditorPlaceholder } from "../../../../../components/widgets/builder/widget-editor-placeholder";
|
|
5
|
-
export const PHI_THREAD_CONVERSATION_WIDGET_BUILDER_PLUGIN = {
|
|
6
|
-
...PHI_THREAD_CONVERSATION_WIDGET_DEFINITION,
|
|
7
|
-
// Nothing to author: which conversation it shows is a runtime answer, not a Builder one.
|
|
8
|
-
renderEditor: ({ widget }) => (_jsx(PhiWidgetEditorPlaceholder, { widget: widget, pluginTitle: PHI_THREAD_CONVERSATION_WIDGET_DEFINITION.title, summary: "Shows the conversation the page has selected." })),
|
|
9
|
-
};
|