@phis/ui 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/cms/phi-cms-root-layout.js +2 -0
- package/components/controls/phi-mask-picker-control.d.ts +7 -1
- package/components/controls/phi-mask-picker-control.js +18 -16
- package/components/controls/phi-media-picker-control.d.ts +30 -1
- package/components/controls/phi-media-picker-control.js +15 -2
- package/components/controls/phi-media-source-item-tile-control.d.ts +22 -0
- package/components/controls/phi-media-source-item-tile-control.js +65 -0
- package/components/forms/form-field-labels.d.ts +19 -0
- package/components/forms/form-field-labels.js +78 -0
- package/components/forms/form-provider-contract.d.ts +1 -17
- package/components/forms/form-provider-contract.js +4 -18
- package/components/forms/media-asset-field-keys.d.ts +27 -0
- package/components/forms/media-asset-field-keys.js +27 -0
- package/components/forms/phi-form-widget.js +5 -1
- package/components/forms/upload-field-keys.d.ts +27 -0
- package/components/forms/upload-field-keys.js +27 -0
- package/components/forms/upload-form-control.js +11 -5
- package/components/media/asset-controller-requirement.d.ts +9 -0
- package/components/media/asset-controller-requirement.js +42 -0
- package/components/media/label-sets/media-upload.d.ts +10 -0
- package/components/media/label-sets/media-upload.js +85 -0
- package/components/media/label-sets/media.js +31 -135
- package/components/media/media-upload-labels.d.ts +43 -0
- package/components/media/media-upload-labels.js +23 -0
- package/components/media/media-upload-refusals.d.ts +12 -0
- package/components/media/media-upload-refusals.js +28 -0
- package/components/media/media-widget-labels.d.ts +33 -26
- package/components/media/media-widget-labels.js +27 -36
- package/components/media/phi-area-upload-widget.js +3 -4
- package/components/media/phi-asset-inspector-section.d.ts +2 -2
- package/components/media/phi-image-inspector-widget.d.ts +2 -5
- package/components/media/phi-media-picker-binding.d.ts +17 -0
- package/components/media/phi-media-picker-binding.js +199 -4
- package/components/media/phi-media-picker-labels.d.ts +7 -0
- package/components/media/phi-media-picker-labels.js +25 -0
- package/components/media/phi-media-sources.d.ts +69 -0
- package/components/media/phi-media-sources.js +254 -0
- package/components/media/phi-media-upload.d.ts +1 -27
- package/components/media/phi-media-upload.js +4 -48
- package/components/runtime/runtime-controller-materialization.d.ts +5 -4
- package/components/runtime/runtime-controller-materialization.js +5 -4
- package/components/runtime/runtime-module-context.d.ts +5 -1
- package/components/runtime/runtime-module-context.js +4 -1
- package/components/runtime/runtime-module-media-source-client-manifest.d.ts +17 -0
- package/components/runtime/runtime-module-media-source-client-manifest.js +53 -0
- package/components/widgets/client/shared/phi-mask-picker.js +23 -13
- package/components/widgets/client/shared/phi-widget-image-tool-button.d.ts +7 -5
- package/components/widgets/client/shared/phi-widget-image-tool-button.js +11 -7
- package/components/widgets/client/shared/phi-widget-tool-buttons.js +2 -2
- package/components/widgets/config/mask.d.ts +6 -8
- package/components/widgets/config/mask.js +14 -12
- package/components/widgets/label-sets/authoring-tools.js +55 -1
- package/components/widgets/label-sets/history.js +0 -2
- package/components/widgets/label-sets/slot-upload.js +4 -4
- package/components/widgets/label-types/authoring-tools.d.ts +10 -0
- package/components/widgets/label-types/authoring-tools.js +6 -0
- package/components/widgets/label-types/history.d.ts +1 -1
- package/components/widgets/label-types/history.js +0 -1
- package/components/widgets/label-types/mask-picker.d.ts +31 -0
- package/components/widgets/label-types/mask-picker.js +30 -0
- package/components/widgets/label-types/slot-upload.d.ts +2 -2
- package/controls.d.ts +2 -0
- package/controls.js +1 -0
- package/helpers/cms-region-keys.d.ts +1 -1
- package/module-client.d.ts +5 -1
- package/module-projection-client.js +1 -0
- package/next/areas/accounting-client.js +3 -2
- package/next/areas/admin-client.js +3 -2
- package/next/areas/app-client.js +3 -2
- package/next/areas/builder-client.js +3 -2
- package/next/areas/editor-client.js +3 -2
- package/next/areas/public-client.js +3 -2
- package/next/runtime-module-client-boundary.d.ts +3 -1
- package/next/runtime-module-client-boundary.js +3 -2
- package/package.json +7 -2
- package/plugins/runtime-modules/area-module-defaults.js +4 -3
- package/plugins/runtime-modules/asset/controller/definition.d.ts +2 -2
- package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
- package/plugins/runtime-modules/asset/definition.d.ts +3 -2
- package/plugins/runtime-modules/asset/definition.js +11 -3
- package/plugins/runtime-modules/asset/ids.d.ts +8 -0
- package/plugins/runtime-modules/asset/ids.js +8 -0
- package/plugins/runtime-modules/asset/labels.d.ts +4 -0
- package/plugins/runtime-modules/asset/labels.js +94 -0
- package/plugins/runtime-modules/asset/media-asset-form-control.js +32 -7
- package/plugins/runtime-modules/asset/metadata-form.js +27 -18
- package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +14 -11
- package/plugins/runtime-modules/asset/widgets/area-upload/config.d.ts +2 -0
- package/plugins/runtime-modules/asset/widgets/area-upload/config.js +3 -0
- package/plugins/runtime-modules/asset/widgets/area-upload/server.js +3 -3
- package/plugins/runtime-modules/asset/widgets/asset-focal-rect/config.d.ts +2 -0
- package/plugins/runtime-modules/asset/widgets/asset-focal-rect/config.js +3 -0
- package/plugins/runtime-modules/asset/widgets/image-inspector/config.d.ts +2 -0
- package/plugins/runtime-modules/asset/widgets/image-inspector/config.js +3 -0
- package/plugins/runtime-modules/asset/widgets/image-inspector/server.js +2 -2
- package/plugins/runtime-modules/asset/widgets/media-picker/config.d.ts +1 -0
- package/plugins/runtime-modules/asset/widgets/media-picker/config.js +3 -0
- package/plugins/runtime-modules/auth/presets.d.ts +11 -0
- package/plugins/runtime-modules/auth/presets.js +17 -8
- package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +1 -4
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +2 -2
- package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +1 -3
- package/plugins/runtime-modules/builder/clients/inspector-image-field.js +4 -5
- package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -8
- package/plugins/runtime-modules/builder/clients/pages-header.js +2 -0
- package/plugins/runtime-modules/builder/clients/pages-workspace.js +4 -4
- package/plugins/runtime-modules/builder/clients/widget-inspector.js +0 -1
- package/plugins/runtime-modules/builder/controller/draft-command-controller.js +2 -2
- package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -1
- package/plugins/runtime-modules/builder/controller/page-controller.js +8 -8
- package/plugins/runtime-modules/builder/controller/workspace-controller.js +4 -1
- package/plugins/runtime-modules/builder/inspector-section-widget.js +5 -2
- package/plugins/runtime-modules/builder/module-authoring-catalog.server.js +3 -1
- package/plugins/runtime-modules/builder/navigation-catalog.server.js +3 -0
- package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +1 -1
- package/plugins/runtime-modules/builder/offered-page-catalog.js +8 -3
- package/plugins/runtime-modules/builder/options-providers.js +2 -2
- package/plugins/runtime-modules/builder/page-address-rule.d.ts +7 -0
- package/plugins/runtime-modules/builder/page-address-rule.js +12 -0
- package/plugins/runtime-modules/builder/page-presets.server.js +4 -0
- package/plugins/runtime-modules/builder/persistence.js +6 -7
- package/plugins/runtime-modules/builder/public-route-collisions.d.ts +1 -1
- package/plugins/runtime-modules/builder/public-route-collisions.js +6 -1
- package/plugins/runtime-modules/builder/region-keys.d.ts +10 -0
- package/plugins/runtime-modules/builder/region-keys.js +10 -0
- package/plugins/runtime-modules/builder/runtime-module-sandbox.server.js +8 -1
- package/plugins/runtime-modules/builder/runtime-module-selection.js +5 -5
- package/plugins/runtime-modules/builder/services/runtime-modules-table.js +24 -6
- package/plugins/runtime-modules/builder/signal-endpoints.js +2 -1
- package/plugins/runtime-modules/builder/use-offered-page-catalog.d.ts +2 -2
- package/plugins/runtime-modules/builder/use-offered-page-catalog.js +5 -3
- package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +19 -12
- package/plugins/runtime-modules/client-manifests/accounting.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/accounting.js +1 -0
- package/plugins/runtime-modules/client-manifests/admin.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/admin.js +1 -0
- package/plugins/runtime-modules/client-manifests/app.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/app.js +1 -0
- package/plugins/runtime-modules/client-manifests/builder.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/builder.js +1 -0
- package/plugins/runtime-modules/client-manifests/common.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/common.js +3 -0
- package/plugins/runtime-modules/client-manifests/editor.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/editor.js +1 -0
- package/plugins/runtime-modules/client-manifests/public.d.ts +1 -0
- package/plugins/runtime-modules/client-manifests/public.js +1 -0
- package/plugins/runtime-modules/contracts.js +61 -0
- package/plugins/runtime-modules/core/client-media-sources.d.ts +5 -0
- package/plugins/runtime-modules/core/client-media-sources.js +6 -0
- package/plugins/runtime-modules/core/messaging/forms.js +2 -15
- package/plugins/runtime-modules/core/messaging/labels.d.ts +0 -12
- package/plugins/runtime-modules/core/messaging/labels.js +0 -24
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +10 -6
- package/plugins/runtime-modules/core/widgets/collection-view/config.d.ts +1 -0
- package/plugins/runtime-modules/core/widgets/collection-view/config.js +7 -0
- package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.d.ts +8 -2
- package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.js +2 -2
- package/plugins/runtime-modules/core/widgets/collection-view/server.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/collection-view/server.js +14 -2
- package/plugins/runtime-modules/core/widgets/image/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/image/editor.d.ts +1 -4
- package/plugins/runtime-modules/core/widgets/image/editor.js +2 -2
- package/plugins/runtime-modules/core/widgets/slot-upload/client.js +2 -3
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +4 -25
- package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
- package/plugins/runtime-modules/preset-contracts/pub-area.js +0 -1
- package/plugins/runtime-modules/resolver.js +27 -1
- package/plugins/runtime-modules/settings.d.ts +20 -3
- package/plugins/runtime-modules/settings.js +35 -5
- package/plugins/runtime-modules/site-module-client-manifests.d.ts +2 -0
- package/plugins/runtime-modules/site-module-client-manifests.js +2 -0
- package/plugins/runtime-modules/site-modules-client.d.ts +5 -0
- package/plugins/runtime-modules/site-modules-client.js +1 -0
- package/plugins/runtime-modules/theme/brand-theme-model.js +0 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +97 -192
- package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +6 -2
- package/runtime-client-manifests-accounting.d.ts +1 -1
- package/runtime-client-manifests-accounting.js +1 -1
- package/runtime-client-manifests-admin.d.ts +1 -1
- package/runtime-client-manifests-admin.js +1 -1
- package/runtime-client-manifests-app.d.ts +1 -1
- package/runtime-client-manifests-app.js +1 -1
- package/runtime-client-manifests-builder.d.ts +1 -1
- package/runtime-client-manifests-builder.js +1 -1
- package/runtime-client-manifests-editor.d.ts +1 -1
- package/runtime-client-manifests-editor.js +1 -1
- package/runtime-client-manifests-public.d.ts +2 -1
- package/runtime-client-manifests-public.js +1 -1
- package/runtime-media-source-client.d.ts +3 -0
- package/runtime-media-source-client.js +2 -0
- package/server-helpers/cms-request.js +10 -4
- package/server-helpers/search-index.js +7 -6
- package/server-helpers/site-build-id.d.ts +25 -0
- package/server-helpers/site-build-id.js +27 -0
- package/theme/phi-theme-presets.d.ts +13 -3
- package/theme/phi-theme-presets.js +20 -3
- package/theme/phi-theme-seed-derivation.d.ts +240 -0
- package/theme/phi-theme-seed-derivation.js +126 -0
- package/types/cms-plugins.d.ts +29 -0
- package/types/media-source.d.ts +48 -0
- package/types/media-source.js +1 -0
- package/types/site-config.d.ts +1 -2
- package/types/site-theme.d.ts +0 -6
- package/types.d.ts +1 -0
- package/components/media/asset-controller-routes.d.ts +0 -8
- package/components/media/asset-controller-routes.js +0 -31
- package/helpers/brand-contact.d.ts +0 -14
- package/helpers/brand-contact.js +0 -26
|
@@ -14,6 +14,7 @@ export const PHI_APP_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST = extendPhiRun
|
|
|
14
14
|
...PHI_GROUPS_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS,
|
|
15
15
|
]);
|
|
16
16
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_APP_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
17
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_APP_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
17
18
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_APP_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
18
19
|
export const PHI_APP_RUNTIME_MODULE_CONTROLLER_CLIENT_MANIFEST = createPhiRuntimeModuleControllerClientManifestFromAreaContributions(PHI_APP_RUNTIME_MODULE_CONTROLLER_CLIENT_AREA_CONTRIBUTIONS);
|
|
19
20
|
export const PHI_APP_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST = extendPhiRuntimeModuleRenderClientManifest(PHI_COMMON_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST, [PHI_AUTH_SECURITY_RENDER_CLIENT_LOADER]);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_BUILDER_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
2
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_BUILDER_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
2
3
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_BUILDER_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
3
4
|
export declare const PHI_BUILDER_RUNTIME_MODULE_CONTROLLER_CLIENT_MANIFEST: import("../../../runtime-client-manifests-public").PhiRuntimeModuleControllerClientManifest;
|
|
4
5
|
export declare const PHI_BUILDER_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST: import("../../../runtime-render-client").PhiRuntimeModuleRenderClientManifest;
|
|
@@ -14,6 +14,7 @@ import { PHI_REVISIONS_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS } from "../revis
|
|
|
14
14
|
import { PHI_THEME_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS } from "../theme/client-data-providers";
|
|
15
15
|
import { PHI_AUTH_RUNTIME_MODULE_RENDER_CLIENT_LOADERS, } from "./auth-render-clients";
|
|
16
16
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_BUILDER_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
17
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_BUILDER_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
17
18
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_BUILDER_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
18
19
|
export const PHI_BUILDER_RUNTIME_MODULE_CONTROLLER_CLIENT_MANIFEST = createPhiRuntimeModuleControllerClientManifestFromAreaContributions(PHI_BUILDER_RUNTIME_MODULE_CONTROLLER_CLIENT_AREA_CONTRIBUTIONS);
|
|
19
20
|
export const PHI_BUILDER_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST = extendPhiRuntimeModuleRenderClientManifest(PHI_COMMON_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST, [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../../../components/shell/phi-icon";
|
|
2
2
|
export declare const PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST: import("../../../runtime-calendar-adapter-client").PhiRuntimeModuleCalendarAdapterClientManifest;
|
|
3
|
+
export declare const PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST: import("../../../runtime-client-manifests-public").PhiRuntimeModuleMediaSourceClientManifest;
|
|
3
4
|
/**
|
|
4
5
|
* The first-party Module UI providers, loaded where a node of their Module renders.
|
|
5
6
|
*
|
|
@@ -12,10 +12,13 @@ import { PHI_MEDIA_LIBRARY_ITEM_RENDERER_KEY } from "../../../constants/media-li
|
|
|
12
12
|
import { PHI_DASHBOARD_CARD_ITEM_RENDERER_KEY } from "../../../constants/dashboard-card-provider-keys";
|
|
13
13
|
import { createPhiRuntimeModuleCalendarAdapterClientManifest } from "../../../components/runtime/runtime-module-calendar-adapter-client-manifest";
|
|
14
14
|
import { PHI_CORE_CALENDAR_ADAPTER_CLIENT_DEFINITIONS } from "../core/client-calendar-adapters";
|
|
15
|
+
import { createPhiRuntimeModuleMediaSourceClientManifest } from "../../../components/runtime/runtime-module-media-source-client-manifest";
|
|
16
|
+
import { PHI_CORE_MEDIA_SOURCE_CLIENT_DEFINITIONS } from "../core/client-media-sources";
|
|
15
17
|
import { PhiLazyAssetRuntimeControllerClient } from "../asset/client";
|
|
16
18
|
import { createPhiRuntimeModuleUiProviderClientManifest, } from "../../../components/runtime/runtime-module-ui-provider-client-manifest";
|
|
17
19
|
import { PHI_AUTH_RUNTIME_MODULE_ID } from "../auth/ids";
|
|
18
20
|
export const PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST = createPhiRuntimeModuleCalendarAdapterClientManifest(PHI_CORE_CALENDAR_ADAPTER_CLIENT_DEFINITIONS);
|
|
21
|
+
export const PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST = createPhiRuntimeModuleMediaSourceClientManifest(PHI_CORE_MEDIA_SOURCE_CLIENT_DEFINITIONS);
|
|
19
22
|
/**
|
|
20
23
|
* The first-party Module UI providers, loaded where a node of their Module renders.
|
|
21
24
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_EDITOR_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
2
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_EDITOR_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
2
3
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_EDITOR_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
3
4
|
export declare const PHI_EDITOR_RUNTIME_MODULE_CONTROLLER_CLIENT_MANIFEST: import("../../../runtime-client-manifests-public").PhiRuntimeModuleControllerClientManifest;
|
|
4
5
|
export declare const PHI_EDITOR_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST: import("../../../runtime-render-client").PhiRuntimeModuleRenderClientManifest;
|
|
@@ -3,6 +3,7 @@ import { createPhiRuntimeModuleControllerClientManifestFromAreaContributions } f
|
|
|
3
3
|
import { PHI_EDITOR_RUNTIME_MODULE_CONTROLLER_CLIENT_AREA_CONTRIBUTIONS } from "../client-area-contributions/editor";
|
|
4
4
|
import { PHI_COMMON_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST } from "./common";
|
|
5
5
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_EDITOR_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
6
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_EDITOR_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
6
7
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_EDITOR_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
7
8
|
import { extendPhiRuntimeModuleDataProviderClientManifest } from "../../../components/runtime/runtime-module-data-provider-client-manifest";
|
|
8
9
|
import { PHI_COMMON_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST } from "./common-data-providers";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { PHI_COMMON_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST } from "./common-data-providers";
|
|
2
2
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
3
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
3
4
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
4
5
|
export declare const PHI_PUBLIC_RUNTIME_MODULE_CONTROLLER_CLIENT_MANIFEST: import("../../../runtime-client-manifests-public").PhiRuntimeModuleControllerClientManifest;
|
|
5
6
|
export declare const PHI_PUBLIC_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST: import("../../../runtime-render-client").PhiRuntimeModuleRenderClientManifest;
|
|
@@ -6,6 +6,7 @@ import { extendPhiRuntimeModuleRenderClientManifest } from "../../../components/
|
|
|
6
6
|
import { PHI_AUTH_RUNTIME_MODULE_RENDER_CLIENT_LOADERS, } from "./auth-render-clients";
|
|
7
7
|
export { PHI_COMMON_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST } from "./common-data-providers";
|
|
8
8
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
9
|
+
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
9
10
|
export { PHI_COMMON_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST as PHI_PUBLIC_RUNTIME_MODULE_UI_PROVIDER_CLIENT_MANIFEST } from "./common";
|
|
10
11
|
export const PHI_PUBLIC_RUNTIME_MODULE_CONTROLLER_CLIENT_MANIFEST = createPhiRuntimeModuleControllerClientManifestFromAreaContributions(PHI_PUBLIC_RUNTIME_MODULE_CONTROLLER_CLIENT_AREA_CONTRIBUTIONS);
|
|
11
12
|
export const PHI_PUBLIC_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST = extendPhiRuntimeModuleRenderClientManifest(PHI_COMMON_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST, [
|
|
@@ -456,6 +456,46 @@ function assertNavigationItemAccessPolicies(moduleId, ownerProviderId, items) {
|
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* What `activation: "always"` may be declared with (`PhiRuntimeModuleDefinition.activation`).
|
|
461
|
+
*
|
|
462
|
+
* The declarations it refuses are the ones read from an Area's stored selection, which an always-active
|
|
463
|
+
* Module is never in: they would be accepted here and then dropped by every reader.
|
|
464
|
+
*/
|
|
465
|
+
const PHI_SELECTION_DERIVED_DECLARATIONS = [
|
|
466
|
+
"mediaSpaces",
|
|
467
|
+
"threadKinds",
|
|
468
|
+
"seed",
|
|
469
|
+
"userState",
|
|
470
|
+
"authUiProvider",
|
|
471
|
+
];
|
|
472
|
+
function assertPhiRuntimeModuleActivation(definition, areaDefinitions) {
|
|
473
|
+
const activation = definition.activation;
|
|
474
|
+
if (activation === undefined) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
if (activation !== "always") {
|
|
478
|
+
throw new Error(`${definition.moduleId}: activation must be "always" or absent.`);
|
|
479
|
+
}
|
|
480
|
+
if (definition.kind !== "module") {
|
|
481
|
+
throw new Error(`${definition.moduleId}: the Platform Module is active everywhere already and must not declare activation.`);
|
|
482
|
+
}
|
|
483
|
+
if (areaDefinitions.some(({ baseModuleId }) => baseModuleId === definition.moduleId)) {
|
|
484
|
+
throw new Error(`${definition.moduleId}: an Area's Base Module is active in its own Area and must not declare activation.`);
|
|
485
|
+
}
|
|
486
|
+
if (!definition.moduleId.startsWith(`${PHI_SHARED_PACKAGE_NAME}/${PHI_MODULE_MARKER}/`)) {
|
|
487
|
+
throw new Error(`${definition.moduleId}: only a Module of ${PHI_SHARED_PACKAGE_NAME} may declare activation "always"; ` +
|
|
488
|
+
`installing a package must not switch a Module on.`);
|
|
489
|
+
}
|
|
490
|
+
if (definition.eligibleAreas.length === 0) {
|
|
491
|
+
throw new Error(`${definition.moduleId}: an always-active Module must be eligible for at least one Area.`);
|
|
492
|
+
}
|
|
493
|
+
const declared = PHI_SELECTION_DERIVED_DECLARATIONS.filter((key) => definition[key] !== undefined);
|
|
494
|
+
if (declared.length > 0) {
|
|
495
|
+
throw new Error(`${definition.moduleId}: an always-active Module must not declare ${declared.join(", ")}. ` +
|
|
496
|
+
`They are derived from an Area's stored Module selection, which an always-active Module is never part of.`);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
459
499
|
export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
460
500
|
const catalog = new Map();
|
|
461
501
|
const ownerModuleIdByControllerType = new Map();
|
|
@@ -463,6 +503,7 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
463
503
|
const ownerModuleIdByLayoutType = new Map();
|
|
464
504
|
const ownerModuleIdByDataProviderKey = new Map();
|
|
465
505
|
const ownerModuleIdByCalendarAdapterKey = new Map();
|
|
506
|
+
const ownerModuleIdByMediaSourceKey = new Map();
|
|
466
507
|
const ownerModuleIdByVideoProviderKey = new Map();
|
|
467
508
|
const ownerModuleIdByFormFieldTypeKey = new Map();
|
|
468
509
|
const ownerModuleIdByFormValidationKey = new Map();
|
|
@@ -479,6 +520,7 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
479
520
|
}
|
|
480
521
|
assertPhiRuntimeModuleMetadata(definition);
|
|
481
522
|
assertPhiRuntimeModuleServerBinding(definition);
|
|
523
|
+
assertPhiRuntimeModuleActivation(definition, areaDefinitions);
|
|
482
524
|
const ownerProviderId = definition.serverBinding.providerId;
|
|
483
525
|
const hasController = hasPhiRuntimeModuleController(definition);
|
|
484
526
|
if (hasController) {
|
|
@@ -572,6 +614,19 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
572
614
|
}
|
|
573
615
|
ownerModuleIdByCalendarAdapterKey.set(adapter.key, definition.moduleId);
|
|
574
616
|
}
|
|
617
|
+
for (const source of definition.mediaSources ?? []) {
|
|
618
|
+
if (!isPhiNamespacedRuntimeKey(source.key)) {
|
|
619
|
+
throw new Error(`${definition.moduleId}: invalid media source key "${source.key}".`);
|
|
620
|
+
}
|
|
621
|
+
if (source.ownerModuleId !== definition.moduleId) {
|
|
622
|
+
throw new Error(`${definition.moduleId}: media source "${source.key}" has a different owner module id.`);
|
|
623
|
+
}
|
|
624
|
+
const currentSourceOwner = ownerModuleIdByMediaSourceKey.get(source.key);
|
|
625
|
+
if (currentSourceOwner) {
|
|
626
|
+
throw new Error(`Media source "${source.key}" is owned by both "${currentSourceOwner}" and "${definition.moduleId}".`);
|
|
627
|
+
}
|
|
628
|
+
ownerModuleIdByMediaSourceKey.set(source.key, definition.moduleId);
|
|
629
|
+
}
|
|
575
630
|
for (const provider of definition.videoProviders ?? []) {
|
|
576
631
|
if (!isPhiVideoProviderKey(provider.key)) {
|
|
577
632
|
throw new Error(`${definition.moduleId}: invalid video provider key "${provider.key}".`);
|
|
@@ -691,6 +746,7 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
691
746
|
(entry.themes?.length ?? 0) + (entry.themeBlocks?.length ?? 0) +
|
|
692
747
|
(entry.dashboardCards ? 1 : 0) +
|
|
693
748
|
(definition.dataProviders?.length ?? 0) + (definition.calendarAdapters?.length ?? 0) +
|
|
749
|
+
(definition.mediaSources?.length ?? 0) +
|
|
694
750
|
(definition.videoProviders?.length ?? 0) + (definition.collectionItemRenderers?.length ?? 0) +
|
|
695
751
|
(definition.icons?.length ?? 0) +
|
|
696
752
|
Object.values(definition.formProviders ?? {}).reduce((count, providers) => count + (providers?.length ?? 0), 0);
|
|
@@ -901,6 +957,11 @@ export function assertPhiRuntimeModule(module) {
|
|
|
901
957
|
throw new Error(`${module.moduleId}: Calendar adapter "${descriptor.key}" has a different owner module id.`);
|
|
902
958
|
}
|
|
903
959
|
}
|
|
960
|
+
for (const descriptor of module.mediaSources ?? []) {
|
|
961
|
+
if (descriptor.ownerModuleId !== module.moduleId) {
|
|
962
|
+
throw new Error(`${module.moduleId}: media source "${descriptor.key}" has a different owner module id.`);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
904
965
|
for (const descriptor of module.videoProviders ?? []) {
|
|
905
966
|
if (descriptor.ownerModuleId !== module.moduleId) {
|
|
906
967
|
throw new Error(`${module.moduleId}: video provider "${descriptor.key}" has a different owner module id.`);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first-party media sources: none. No Module of ours offers a source; one comes from a Module
|
|
3
|
+
* package of a Site (`mediaSources` of its client contributions) or from an Add-on on the server.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PHI_CORE_MEDIA_SOURCE_CLIENT_DEFINITIONS: readonly [];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* The first-party media sources: none. No Module of ours offers a source; one comes from a Module
|
|
4
|
+
* package of a Site (`mediaSources` of its client contributions) or from an Add-on on the server.
|
|
5
|
+
*/
|
|
6
|
+
export const PHI_CORE_MEDIA_SOURCE_CLIENT_DEFINITIONS = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPhiFormLabelSetLoader } from "../../../../components/forms/shared-form-loaders";
|
|
2
|
-
import { PHI_FORM_FIELD_PROVIDER_KEYS,
|
|
2
|
+
import { PHI_FORM_FIELD_PROVIDER_KEYS, PHI_FORM_VALIDATION_PROVIDER_KEYS, createPhiSharedFormProviderKey, } from "../../../../components/forms/form-provider-contract";
|
|
3
3
|
import { PHI_FORM_GRID_LAST_LINE } from "../../../../components/forms/form-descriptor-contract";
|
|
4
4
|
import { definePhiRuntimeModuleForm } from "../../../../components/forms/form-registry";
|
|
5
5
|
import { PHI_SHARED_FORM_IDS } from "../../../../components/forms/shared-form-ids";
|
|
@@ -71,12 +71,11 @@ const PHI_THREAD_REPLY_FORM_DESCRIPTOR = {
|
|
|
71
71
|
/*
|
|
72
72
|
* The attachment narrows nothing the Site has not narrowed already: the kinds are what the writer's
|
|
73
73
|
* own Space accepts, which the control plane answers for. An area rather than a button, because a
|
|
74
|
-
* file is part of what a reply says.
|
|
74
|
+
* file is part of what a reply says. What it says is the upload field's own (`widget:upload`).
|
|
75
75
|
*/
|
|
76
76
|
{
|
|
77
77
|
key: "assetIds",
|
|
78
78
|
fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.upload,
|
|
79
|
-
placeholder: label("replyAttach", "Attach a file"),
|
|
80
79
|
config: { space: PHI_THREAD_REPLY_SPACE, presentation: "area" },
|
|
81
80
|
},
|
|
82
81
|
],
|
|
@@ -91,19 +90,7 @@ const loadLabels = createPhiFormLabelSetLoader(() => import("./labels").then((mo
|
|
|
91
90
|
replyThreadRequired: labels.replyThreadRequired,
|
|
92
91
|
audienceEveryone: labels.audienceEveryone,
|
|
93
92
|
audienceInternal: labels.audienceInternal,
|
|
94
|
-
replyAttach: labels.replyAttachLabel,
|
|
95
93
|
replySend: labels.replySendLabel,
|
|
96
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.dropHint]: labels.replyAttachDropHint,
|
|
97
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.tooMany]: labels.replyAttachTooMany,
|
|
98
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.pending]: labels.replyAttachPending,
|
|
99
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorGeneric]: labels.replyErrorGeneric,
|
|
100
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorNetwork]: labels.replyErrorNetwork,
|
|
101
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorTooLarge]: labels.replyErrorTooLarge,
|
|
102
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorDuplicate]: labels.replyErrorDuplicate,
|
|
103
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorTypeNotAllowed]: labels.replyErrorTypeNotAllowed,
|
|
104
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorQuotaExceeded]: labels.replyErrorQuotaExceeded,
|
|
105
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorSpaceUnavailable]: labels.replyErrorSpaceUnavailable,
|
|
106
|
-
[PHI_FORM_UPLOAD_LABEL_KEYS.errorStorageUnreachable]: labels.replyErrorStorageUnreachable,
|
|
107
94
|
}));
|
|
108
95
|
// Every Area: a conversation may be placed wherever a Site runs one.
|
|
109
96
|
export const PHI_CORE_MESSAGING_FORMS = [
|
|
@@ -7,19 +7,7 @@ export declare function getPhiThreadReplyFormLabels(options: PhiGlobalTranslator
|
|
|
7
7
|
replyThreadRequired: string;
|
|
8
8
|
audienceEveryone: string;
|
|
9
9
|
audienceInternal: string;
|
|
10
|
-
replyAttachLabel: string;
|
|
11
|
-
replyAttachDropHint: string;
|
|
12
10
|
replySendLabel: string;
|
|
13
|
-
replyAttachTooMany: string;
|
|
14
|
-
replyAttachPending: string;
|
|
15
|
-
replyErrorGeneric: string;
|
|
16
|
-
replyErrorNetwork: string;
|
|
17
|
-
replyErrorTooLarge: string;
|
|
18
|
-
replyErrorDuplicate: string;
|
|
19
|
-
replyErrorTypeNotAllowed: string;
|
|
20
|
-
replyErrorQuotaExceeded: string;
|
|
21
|
-
replyErrorSpaceUnavailable: string;
|
|
22
|
-
replyErrorStorageUnreachable: string;
|
|
23
11
|
}>;
|
|
24
12
|
export declare function getPhiThreadConversationLabels(options: PhiGlobalTranslatorOptions): Promise<{
|
|
25
13
|
noThreadText: string;
|
|
@@ -86,19 +86,7 @@ const PHI_THREAD_REPLY_FORM_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_CORE_
|
|
|
86
86
|
*/
|
|
87
87
|
audience_everyone: "To everyone in it",
|
|
88
88
|
audience_internal: "Internal note",
|
|
89
|
-
reply_attach_label: "Attach a file",
|
|
90
|
-
reply_attach_drop_hint: "or drop it here",
|
|
91
89
|
reply_send_label: "Send",
|
|
92
|
-
reply_attach_too_many: definePhiMessageLabel("No more files fit here."),
|
|
93
|
-
reply_attach_pending: definePhiMessageLabel("Wait until the file has arrived, then send."),
|
|
94
|
-
reply_error_generic: definePhiMessageLabel("The file could not be attached."),
|
|
95
|
-
reply_error_network: definePhiMessageLabel("The site could not be reached."),
|
|
96
|
-
reply_error_too_large: definePhiMessageLabel("That file is too large."),
|
|
97
|
-
reply_error_duplicate: definePhiMessageLabel("That file is already attached."),
|
|
98
|
-
reply_error_type_not_allowed: definePhiMessageLabel("That kind of file cannot be attached."),
|
|
99
|
-
reply_error_quota_exceeded: definePhiMessageLabel("There is no room left in your space."),
|
|
100
|
-
reply_error_space_unavailable: definePhiMessageLabel("Files cannot be attached on this site."),
|
|
101
|
-
reply_error_storage_unreachable: definePhiMessageLabel("The file storage could not be reached."),
|
|
102
90
|
},
|
|
103
91
|
});
|
|
104
92
|
export async function getPhiThreadReplyFormLabels(options) {
|
|
@@ -110,19 +98,7 @@ export async function getPhiThreadReplyFormLabels(options) {
|
|
|
110
98
|
replyThreadRequired: labels.reply_thread_required,
|
|
111
99
|
audienceEveryone: labels.audience_everyone,
|
|
112
100
|
audienceInternal: labels.audience_internal,
|
|
113
|
-
replyAttachLabel: labels.reply_attach_label,
|
|
114
|
-
replyAttachDropHint: labels.reply_attach_drop_hint,
|
|
115
101
|
replySendLabel: labels.reply_send_label,
|
|
116
|
-
replyAttachTooMany: labels.reply_attach_too_many,
|
|
117
|
-
replyAttachPending: labels.reply_attach_pending,
|
|
118
|
-
replyErrorGeneric: labels.reply_error_generic,
|
|
119
|
-
replyErrorNetwork: labels.reply_error_network,
|
|
120
|
-
replyErrorTooLarge: labels.reply_error_too_large,
|
|
121
|
-
replyErrorDuplicate: labels.reply_error_duplicate,
|
|
122
|
-
replyErrorTypeNotAllowed: labels.reply_error_type_not_allowed,
|
|
123
|
-
replyErrorQuotaExceeded: labels.reply_error_quota_exceeded,
|
|
124
|
-
replyErrorSpaceUnavailable: labels.reply_error_space_unavailable,
|
|
125
|
-
replyErrorStorageUnreachable: labels.reply_error_storage_unreachable,
|
|
126
102
|
};
|
|
127
103
|
}
|
|
128
104
|
export async function getPhiThreadConversationLabels(options) {
|
|
@@ -63,7 +63,11 @@ function overlayPhiAssetLabels(base, override) {
|
|
|
63
63
|
return result;
|
|
64
64
|
}
|
|
65
65
|
export function PhiAssetCollectionViewBinding({ config, binding, labels: rawLabels, widgetId, renderMode, }) {
|
|
66
|
-
|
|
66
|
+
/*
|
|
67
|
+
* The English defaults, under what the server half loaded for this Widget (`rawLabels`, the Media Label
|
|
68
|
+
* Set in the reader's language), under what the Widget's own configuration says.
|
|
69
|
+
*/
|
|
70
|
+
const labels = useMemo(() => overlayPhiAssetLabels(overlayPhiAssetLabels(PHI_MEDIA_WIDGET_DEFAULT_LABELS, rawLabels), config.presentation.labels), [config.presentation.labels, rawLabels]);
|
|
67
71
|
const { token } = usePhiConfig();
|
|
68
72
|
const { showMessage } = usePhiApplicationFeedback();
|
|
69
73
|
const selectionState = usePhiImagePreviewStore(PHI_ASSET_CONTROLLER_STORE_KEY);
|
|
@@ -251,10 +255,10 @@ export function PhiAssetCollectionViewBinding({ config, binding, labels: rawLabe
|
|
|
251
255
|
}
|
|
252
256
|
if (filter.key === "presentationFlags" && filter.control === "multi-select") {
|
|
253
257
|
return (_jsx(PhiMultiSelectControl, { value: readAssetFlagValues(state.presentationFlags), placeholder: filter.placeholder ?? labels.tool.flagPlaceholder, options: [
|
|
254
|
-
{ value: PhiMediaAssetFlags.Featured, label: labels.
|
|
255
|
-
{ value: PhiMediaAssetFlags.Locked, label: labels.
|
|
256
|
-
{ value: PhiMediaAssetFlags.Mask, label: labels.
|
|
257
|
-
{ value: PhiMediaAssetFlags.Background, label: labels.
|
|
258
|
+
{ value: PhiMediaAssetFlags.Featured, label: labels.tool.featuredFlagLabel },
|
|
259
|
+
{ value: PhiMediaAssetFlags.Locked, label: labels.tool.lockedFlagLabel },
|
|
260
|
+
{ value: PhiMediaAssetFlags.Mask, label: labels.tool.maskFlagLabel },
|
|
261
|
+
{ value: PhiMediaAssetFlags.Background, label: labels.tool.backgroundFlagLabel },
|
|
258
262
|
], allowClear: true, maxTagCount: 1, size: controlSize, style: { ...style, minWidth: style.minWidth ?? 128 }, onChange: (value) => binding.setQuery((current) => ({
|
|
259
263
|
...current,
|
|
260
264
|
page: 1,
|
|
@@ -289,7 +293,7 @@ export function PhiAssetCollectionViewBinding({ config, binding, labels: rawLabe
|
|
|
289
293
|
}), features.search?.enabled ? (_jsx(PhiTextControl, { inputType: "search", value: searchDraft, placeholder: features.search.placeholder ?? labels.tool.searchPlaceholder, ariaLabel: features.search.placeholder ?? labels.tool.searchPlaceholder, size: controlSize, style: { flex: "1 1 12rem", minWidth: normalizePhiCssSize(features.search.minWidth) ?? "10rem" }, onChange: (value) => setSearchDraft(value ?? "") })) : null] })) : null;
|
|
290
294
|
const toolbar = selfContained && ((features.actions?.toolbar?.length ?? 0) > 0 || features.tools.reset || features.tools.reload) ? (_jsxs(PhiToolbarControl, { compact: true, size: controlSize, children: [(features.actions?.toolbar ?? []).map((action) => {
|
|
291
295
|
const display = action.display ?? "icon";
|
|
292
|
-
const label = action.label ?? (action.key === "upload" ? labels.
|
|
296
|
+
const label = action.label ?? (action.key === "upload" ? labels.upload.uploadToggleLabel : action.key);
|
|
293
297
|
return (_jsx(PhiButtonControl, { label: display === "icon" ? undefined : label, ariaLabel: label, tooltip: action.description, icon: display === "label" || !action.icon ? undefined : resolvePhiButtonIcon(action.icon), type: action.mode === "primary" ? "primary" : "default", danger: action.mode === "danger", size: controlSize, disabled: action.key === "upload" && currentFolderLocked, onClick: action.key === "upload" ? () => binding.setOpenPanelKey(state.uploadPanelOpen ? null : "upload") : undefined }, action.key));
|
|
294
298
|
}), features.tools.reset ? (_jsx(PhiButtonControl, { ariaLabel: labels.tool.resetLabel, tooltip: labels.tool.resetLabel, icon: resolvePhiButtonIcon("antd:rollback-outlined"), size: controlSize, onClick: () => binding.setQuery({
|
|
295
299
|
...(config.initialQuery ?? {}),
|
|
@@ -8,6 +8,7 @@ export declare const PHI_COLLECTION_VIEW_WIDGET_DEFINITION: {
|
|
|
8
8
|
kind: "widget";
|
|
9
9
|
pluginKey: string;
|
|
10
10
|
typeKey: string;
|
|
11
|
+
requiredRuntimeControllers: ({ config }: import("../../../../../types").PhiCmsWidgetRuntimeControllerRequirementArgs<PhiCmsCollectionViewWidgetConfig>) => import("../../../../../types").PhiRuntimeControllerRequirement[];
|
|
11
12
|
title: string;
|
|
12
13
|
description: string;
|
|
13
14
|
category: "data";
|
|
@@ -3,6 +3,7 @@ import { PHI_CARD_VARIANTS, readPhiCardBillingPeriod } from "../../../../../comp
|
|
|
3
3
|
import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
|
|
4
4
|
import { readPhiProviderResourceSource } from "../../../../../types/runtime-data-provider";
|
|
5
5
|
import { PHI_SIGNAL_VALUE_SCHEMAS, readPhiSignalRouteSet } from "../../../../../types/signals";
|
|
6
|
+
import { resolvePhiAssetControllerRouteRequirements } from "../../../../../components/media/asset-controller-requirement";
|
|
6
7
|
import { isPhiNamespacedRuntimeKey } from "../../../../../types/runtime-data-provider";
|
|
7
8
|
import { PHI_AUTHORING_OPTION_PROVIDER_KEYS } from "../../../../../constants/authoring-option-provider-keys";
|
|
8
9
|
import { readPhiLengthValue } from "../../../../../types/length";
|
|
@@ -153,6 +154,12 @@ export const PHI_COLLECTION_VIEW_WIDGET_DEFINITION = {
|
|
|
153
154
|
kind: "widget",
|
|
154
155
|
pluginKey: resolvePhiCmsWidgetPluginKey("collection-view"),
|
|
155
156
|
typeKey: "collection-view",
|
|
157
|
+
/*
|
|
158
|
+
* The Media collection is drawn here (`asset-binding.tsx`), and where its placement sends a selection
|
|
159
|
+
* or an action to the Asset Controller, that Controller is mounted with it -- it mounts on demand. A
|
|
160
|
+
* collection that only lists asks for nothing.
|
|
161
|
+
*/
|
|
162
|
+
requiredRuntimeControllers: ({ config }) => resolvePhiAssetControllerRouteRequirements(config.signalRoutes),
|
|
156
163
|
title: "Collection View",
|
|
157
164
|
description: "Provider-backed visual collection with generic tools and pagination.",
|
|
158
165
|
category: "data",
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { PhiCmsAssetPreviewGridWidgetConfig } from "./config";
|
|
2
|
-
import type { PhiAssetPreviewGridWidgetLabels } from "../../../../../components/media/media-widget-labels";
|
|
2
|
+
import type { PhiAssetPreviewGridWidgetLabels, PhiAssetWidgetLabels } from "../../../../../components/media/media-widget-labels";
|
|
3
3
|
import type { PhiRenderableBlockRenderMode } from "../../../../../types/renderable-block";
|
|
4
4
|
export type PhiAssetPreviewGridWidgetProps = {
|
|
5
5
|
config?: PhiCmsAssetPreviewGridWidgetConfig | null;
|
|
6
6
|
labels: PhiAssetPreviewGridWidgetLabels;
|
|
7
|
+
/**
|
|
8
|
+
* The Media Label Set in full (`getPhiMediaWidgetLabels`), for a caller that has it. It replaces the
|
|
9
|
+
* English defaults the widget spreads around `labels`, so the toolbar, upload and picker words are
|
|
10
|
+
* the reader's language too; `labels` is still the grid's own.
|
|
11
|
+
*/
|
|
12
|
+
mediaLabels?: PhiAssetWidgetLabels;
|
|
7
13
|
/** Who reads a failure of the asset source: the author outside "live", the log on a live page. */
|
|
8
14
|
renderMode: PhiRenderableBlockRenderMode;
|
|
9
15
|
};
|
|
10
|
-
export declare function PhiAssetPreviewGridWidget({ config, labels, renderMode }: PhiAssetPreviewGridWidgetProps): import("react").JSX.Element;
|
|
16
|
+
export declare function PhiAssetPreviewGridWidget({ config, labels, mediaLabels, renderMode }: PhiAssetPreviewGridWidgetProps): import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { PHI_MEDIA_WIDGET_DEFAULT_LABELS } from "../../../../../components/media/media-widget-labels";
|
|
3
3
|
import { PHI_ASSET_COLLECTION_DATA_SOURCE } from "../../../../../components/media/asset-collection-runtime";
|
|
4
4
|
import { PhiCollectionViewWidget } from "./client";
|
|
5
|
-
export function PhiAssetPreviewGridWidget({ config, labels, renderMode }) {
|
|
5
|
+
export function PhiAssetPreviewGridWidget({ config, labels, mediaLabels, renderMode }) {
|
|
6
6
|
return (_jsx(PhiCollectionViewWidget, { config: {
|
|
7
7
|
presentation: {
|
|
8
8
|
mode: "grid",
|
|
@@ -12,5 +12,5 @@ export function PhiAssetPreviewGridWidget({ config, labels, renderMode }) {
|
|
|
12
12
|
},
|
|
13
13
|
features: { tools: { mode: "external" }, pagination: { enabled: false } },
|
|
14
14
|
source: PHI_ASSET_COLLECTION_DATA_SOURCE,
|
|
15
|
-
}, labels: { ...PHI_MEDIA_WIDGET_DEFAULT_LABELS, grid: labels }, renderMode: renderMode }));
|
|
15
|
+
}, labels: { ...(mediaLabels ?? PHI_MEDIA_WIDGET_DEFAULT_LABELS), grid: labels }, renderMode: renderMode }));
|
|
16
16
|
}
|
|
@@ -12,4 +12,4 @@ export type PhiCollectionViewWidgetServerProps = {
|
|
|
12
12
|
renderMode: PhiRenderableBlockRenderMode;
|
|
13
13
|
preview?: boolean;
|
|
14
14
|
};
|
|
15
|
-
export declare function PhiCollectionViewWidgetServer({ config, widgetId, registry, renderMode, preview, }: PhiCollectionViewWidgetServerProps): Promise<import("react").JSX.Element>;
|
|
15
|
+
export declare function PhiCollectionViewWidgetServer({ runtime, config, widgetId, registry, renderMode, preview, }: PhiCollectionViewWidgetServerProps): Promise<import("react").JSX.Element>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
|
|
3
|
+
import { PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS } from "../../../../../constants/media-library-provider-keys";
|
|
4
|
+
import { getPhiMediaWidgetLabels } from "../../../../../components/media/label-sets/media";
|
|
5
|
+
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../../components/widgets/label-sets/runtime-options";
|
|
3
6
|
import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
|
|
4
7
|
import { readPhiCollectionViewDeclaredFailure } from "../../../../../components/widgets/shared/collection-source-failure";
|
|
5
8
|
import { PhiWidgetFailureServer } from "../../../../../components/widgets/shared/widget-failure.server";
|
|
6
|
-
export async function PhiCollectionViewWidgetServer({ config, widgetId, registry, renderMode, preview = false, }) {
|
|
9
|
+
export async function PhiCollectionViewWidgetServer({ runtime, config, widgetId, registry, renderMode, preview = false, }) {
|
|
7
10
|
if (preview) {
|
|
8
11
|
/*
|
|
9
12
|
* The preview reads no data, so this is the one place its binding is judged: against the providers
|
|
@@ -23,5 +26,14 @@ export async function PhiCollectionViewWidgetServer({ config, widgetId, registry
|
|
|
23
26
|
}
|
|
24
27
|
return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.CollectionView, componentProps: { config, widgetId, renderMode, preview: true } }));
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
/*
|
|
30
|
+
* The Media collection's renderer says the Media Label Set's words (the toolbar, the flag filter, the
|
|
31
|
+
* grid, the upload surface) and Core may not import the Asset Module to get them, so they are the
|
|
32
|
+
* Foundation's and loaded here -- only for a Widget bound to that collection, so no other source pays.
|
|
33
|
+
* `config.presentation.labels` still lays over them.
|
|
34
|
+
*/
|
|
35
|
+
const labels = config?.source?.providerKey === PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection
|
|
36
|
+
? await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime))
|
|
37
|
+
: undefined;
|
|
38
|
+
return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.CollectionView, componentProps: { config, widgetId, renderMode, preview: false, labels } }));
|
|
27
39
|
}
|
|
@@ -11,5 +11,5 @@ const PhiImageWidgetEditorTools = lazy(async () => ({
|
|
|
11
11
|
export const PHI_IMAGE_WIDGET_BUILDER_PLUGIN = {
|
|
12
12
|
...PHI_IMAGE_WIDGET_DEFINITION,
|
|
13
13
|
renderEditor: ({ config, authoring }) => (_jsx(Suspense, { fallback: null, children: _jsx(PhiImageWidgetEditor, { config: config, onChange: authoring?.updateConfig }) })),
|
|
14
|
-
renderEditorTools: ({
|
|
14
|
+
renderEditorTools: ({ config, authoring }) => authoring ? (_jsx(Suspense, { fallback: null, children: _jsx(PhiImageWidgetEditorTools, { config: config, onChange: authoring.updateConfig }) })) : null,
|
|
15
15
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { PhiCmsInstanceId } from "../../../../../types/cms-instance-id";
|
|
2
1
|
import type { PhiCmsImageWidgetConfig } from "./config";
|
|
3
2
|
export type PhiImageWidgetEditorProps = {
|
|
4
3
|
config?: PhiCmsImageWidgetConfig | null;
|
|
5
4
|
onChange?: (patch: Partial<PhiCmsImageWidgetConfig>) => void;
|
|
6
5
|
};
|
|
7
6
|
export declare function PhiImageWidgetEditor({ config, onChange }: PhiImageWidgetEditorProps): import("react").JSX.Element;
|
|
8
|
-
export declare function PhiImageWidgetEditorTools({
|
|
9
|
-
blockId: PhiCmsInstanceId;
|
|
10
|
-
}): import("react").JSX.Element;
|
|
7
|
+
export declare function PhiImageWidgetEditorTools({ config, onChange, }: PhiImageWidgetEditorProps): import("react").JSX.Element;
|
|
@@ -75,8 +75,8 @@ export function PhiImageWidgetEditor({ config, onChange }) {
|
|
|
75
75
|
pointerEvents: "none",
|
|
76
76
|
}, children: overlaySize })) : null] }));
|
|
77
77
|
}
|
|
78
|
-
export function PhiImageWidgetEditorTools({
|
|
79
|
-
return (_jsxs("span", { style: { display: "inline-flex" }, children: [_jsx(PhiWidgetImageToolButton, {
|
|
78
|
+
export function PhiImageWidgetEditorTools({ config, onChange, }) {
|
|
79
|
+
return (_jsxs("span", { style: { display: "inline-flex" }, children: [_jsx(PhiWidgetImageToolButton, { onChange: (patch) => onChange?.(patch) }), _jsx(PhiMaskPickerButton, { placement: "topRight", value: config?.mask, onChange: (mask) => {
|
|
80
80
|
onChange?.({ mask });
|
|
81
81
|
} })] }));
|
|
82
82
|
}
|
|
@@ -6,7 +6,7 @@ import { PhiButtonControl } from "../../../../../components/controls/phi-button-
|
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
7
7
|
import { usePhiMediaUpload } from "../../../../../components/media/phi-media-upload";
|
|
8
8
|
import { runPhiAddonAssetUpload, } from "../../../../../components/media/media-upload-flow";
|
|
9
|
-
import {
|
|
9
|
+
import { resolvePhiUploadStatusLabel } from "../../../../../components/media/phi-media-upload";
|
|
10
10
|
import { PhiUploadDropArea } from "../../../../../components/media/phi-upload-drop-area";
|
|
11
11
|
import { PhiTagControl } from "../../../../../components/controls/phi-tag-control";
|
|
12
12
|
import { readPhiSlotUploadAcceptance } from "./slot";
|
|
@@ -193,9 +193,8 @@ export function PhiSlotUploadWidgetClient({ config, labels }) {
|
|
|
193
193
|
return { asset: { id: view.mediaAssetId } };
|
|
194
194
|
}, [base, ownerId, read, slotName]);
|
|
195
195
|
const slotUpload = useMemo(() => readPhiSlotUploadAcceptance(slot), [slot]);
|
|
196
|
-
const uploadLabels = useMemo(() => resolvePhiAreaUploadLabels(labels.upload), [labels.upload]);
|
|
197
196
|
const upload = usePhiMediaUpload({
|
|
198
|
-
labels:
|
|
197
|
+
labels: labels.upload.refusals,
|
|
199
198
|
...(slotUpload ? { acceptance: slotUpload.acceptance } : {}),
|
|
200
199
|
runSession,
|
|
201
200
|
onUploaded: async () => {
|
|
@@ -8,7 +8,6 @@ import { PHI_TEXT_SOURCE_PRESET } from "../../helpers/text-source";
|
|
|
8
8
|
import { PHI_SPACE } from "../../theme/antd-css-var-contract";
|
|
9
9
|
import { buildPhiCmsWidgetNamespacedTypeKey } from "../../constants/cms-widget-types";
|
|
10
10
|
import { createPhiCmsPresetNodes } from "../../helpers/cms-preset-nodes";
|
|
11
|
-
import { resolvePhiBrandContact } from "../../helpers/brand-contact";
|
|
12
11
|
import { resolvePhiShellHeaderHeight, resolvePhiShellMetric } from "../../helpers/shell-region-style";
|
|
13
12
|
import { resolvePhiLayoutCreationPreset } from "../../helpers/cms-layout-defaults";
|
|
14
13
|
import { PHI_DEFAULT_PUB_AREA_PRESET } from "./pub-area-preset";
|
|
@@ -35,14 +34,13 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
35
34
|
const footerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_main");
|
|
36
35
|
const footerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_top");
|
|
37
36
|
const footerBottomRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_bottom");
|
|
38
|
-
const { label: contactLabel, href: contactHref, icon: contactIcon, } = resolvePhiBrandContact(runtime);
|
|
39
37
|
/*
|
|
40
38
|
* The Preset's words stay in the source language and say they are the Preset's; the Widgets translate
|
|
41
|
-
* them through the global store (`helpers/text-source.ts`).
|
|
42
|
-
*
|
|
43
|
-
*
|
|
39
|
+
* them through the global store (`helpers/text-source.ts`).
|
|
40
|
+
*
|
|
41
|
+
* The Footer's right column is left empty. It used to hold a mailto link to whoever runs the Site,
|
|
42
|
+
* which the Site's own contact page (`/contact`, with its Form) and the App's Support have replaced.
|
|
44
43
|
*/
|
|
45
|
-
const contactLabelIsPreset = !runtime.site.theme?.contact?.label?.trim();
|
|
46
44
|
/*
|
|
47
45
|
* A template rather than a finished sentence, and left untranslated here.
|
|
48
46
|
*
|
|
@@ -407,25 +405,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
407
405
|
},
|
|
408
406
|
contentVersionId: null,
|
|
409
407
|
},
|
|
410
|
-
{
|
|
411
|
-
id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetFooterRight,
|
|
412
|
-
siteId: page.siteId,
|
|
413
|
-
parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutFooterMain,
|
|
414
|
-
widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("simple-text"), "simple-text"),
|
|
415
|
-
slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Right,
|
|
416
|
-
sortOrder: 20,
|
|
417
|
-
status: 1,
|
|
418
|
-
flags: 0,
|
|
419
|
-
visibilityMask: page.visibilityMask,
|
|
420
|
-
label: "pub footer main right",
|
|
421
|
-
config: {
|
|
422
|
-
text: contactLabel,
|
|
423
|
-
...(contactLabelIsPreset ? { textSource: PHI_TEXT_SOURCE_PRESET } : {}),
|
|
424
|
-
href: contactHref,
|
|
425
|
-
icon: contactIcon,
|
|
426
|
-
},
|
|
427
|
-
contentVersionId: null,
|
|
428
|
-
},
|
|
429
408
|
]
|
|
430
409
|
: []),
|
|
431
410
|
...(footerBottomRegion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const PHI_DEFAULT_PUB_AREA_PRESET_KEY = "public-area-preset";
|
|
2
2
|
export declare const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS: readonly ["layoutHeaderMain", "layoutHeaderActions", "layoutHeaderBottom", "layoutSiderRight", "layoutFooterTop", "layoutFooterMain", "layoutFooterBottom"];
|
|
3
|
-
export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetSearch", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "
|
|
3
|
+
export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetSearch", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterBottomText"];
|
|
4
4
|
export declare const PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetLocale"];
|