@phis/ui 0.4.2 → 0.4.4
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 +4 -3
- package/components/cms/phi-cms-page-render-scope.d.ts +4 -5
- package/components/cms/phi-cms-page-render-scope.js +43 -22
- package/components/cms/phi-cms-render-diagnostic-client.js +7 -3
- package/components/cms/phi-cms-render-error-boundary.js +2 -1
- package/components/controls/phi-anchor-nav-control.js +4 -1
- package/components/controls/phi-background-control.js +21 -6
- package/components/controls/phi-bullet-list-control.d.ts +7 -2
- package/components/controls/phi-bullet-list-control.js +35 -5
- package/components/controls/phi-color-control.js +4 -2
- package/components/controls/phi-drawer-control-adapter.js +3 -2
- package/components/controls/phi-inline-text-editor.js +7 -1
- package/components/controls/phi-length-control.js +1 -1
- package/components/controls/phi-ribbon-control.d.ts +38 -0
- package/components/controls/phi-ribbon-control.js +57 -0
- package/components/controls/phi-ribbon-wrap-control.d.ts +26 -0
- package/components/controls/phi-ribbon-wrap-control.js +25 -0
- package/components/controls/phi-select-control.js +5 -2
- package/components/controls/phi-series-chart-control.d.ts +48 -0
- package/components/controls/phi-series-chart-control.js +82 -0
- package/components/controls/phi-table-control.d.ts +3 -0
- package/components/controls/phi-table-control.js +13 -1
- package/components/controls/phi-text-control.js +57 -3
- package/components/controls/phi-tree-control.js +4 -4
- package/components/controls/phi-truncated-hover-text.d.ts +15 -0
- package/components/controls/phi-truncated-hover-text.js +25 -0
- package/components/forms/link-target-form-control.d.ts +1 -1
- package/components/forms/link-target-form-control.js +2 -45
- package/components/forms/phi-form-widget-frame.js +4 -2
- package/components/forms/shared-form-provider-registry.js +1 -4
- package/components/layouts/clients/phi-three-column-layout-client.js +10 -1
- package/components/media/asset-collection-runtime.js +6 -16
- package/components/media/media-font-metrics.d.ts +3 -0
- package/components/media/media-font-metrics.js +43 -0
- package/components/media/phi-area-upload-widget.js +53 -97
- package/components/media/phi-image-preview-data.d.ts +13 -0
- package/components/media/phi-image-preview-data.js +184 -9
- package/components/media/phi-media-picker-binding.js +16 -13
- package/components/media/phi-media-upload.d.ts +15 -8
- package/components/media/phi-media-upload.js +18 -9
- package/components/media/phi-site-font-assets.js +7 -8
- package/components/navigation/phi-link.js +6 -1
- package/components/overlays/phi-overlay-container-client.js +16 -1
- package/components/regions/clients/cms-region-container-client.js +6 -1
- package/components/regions/phi-cms-region-container.js +3 -0
- package/components/regions/phi-cms-region-shell.d.ts +12 -1
- package/components/regions/phi-cms-region-shell.js +81 -19
- package/components/regions/presets/phi-settings-page-shell-tree.js +48 -1
- package/components/root/phi-config-provider.d.ts +13 -0
- package/components/root/phi-config-provider.js +12 -1
- package/components/root/phi-root-background.d.ts +7 -0
- package/components/root/phi-root-background.js +20 -1
- package/components/root/phi-root-theme-resolver.js +3 -0
- package/components/root/phi-shell-chrome-overlay.d.ts +12 -1
- package/components/root/phi-shell-chrome-overlay.js +19 -3
- package/components/runtime/runtime-controller-materialization.js +12 -1
- package/components/shell/phi-antd-icon.d.ts +1 -0
- package/components/shell/phi-antd-icon.js +3 -0
- package/components/shell/use-phi-shell-sticky-top.js +61 -16
- package/components/state/scoped-state-store.js +20 -3
- package/components/surface/phi-surface-tone.d.ts +13 -0
- package/components/surface/phi-surface-tone.js +21 -0
- package/components/tables/client/phi-table-binding.d.ts +2 -1
- package/components/tables/client/phi-table-binding.js +45 -21
- package/components/trees/client/phi-tree-binding.js +19 -11
- package/components/widgets/client/bullet-list-entries-editor.d.ts +26 -0
- package/components/widgets/client/bullet-list-entries-editor.js +109 -0
- package/components/widgets/client/html-editor.js +1 -1
- package/components/widgets/client/shared/use-page-reference-options.d.ts +17 -0
- package/components/widgets/client/shared/use-page-reference-options.js +57 -0
- package/components/widgets/config/background.d.ts +32 -1
- package/components/widgets/config/background.js +41 -2
- package/components/widgets/config/choice-shared.js +12 -13
- package/components/widgets/config/command-buttons.d.ts +5 -1
- package/components/widgets/config/command-buttons.js +38 -81
- package/components/widgets/config/control-signal-config.d.ts +3 -1
- package/components/widgets/config/control-signal-config.js +19 -17
- package/components/widgets/config/image-source-parser.d.ts +1 -0
- package/components/widgets/config/image-source-parser.js +7 -8
- package/components/widgets/config/mask.d.ts +6 -1
- package/components/widgets/config/mask.js +24 -1
- package/components/widgets/config/parser-primitives.js +72 -0
- package/components/widgets/config/stack-tabs.d.ts +1 -1
- package/components/widgets/config/stack-tabs.js +2 -3
- package/components/widgets/config/strict-config-reader.d.ts +40 -0
- package/components/widgets/config/strict-config-reader.js +174 -0
- package/components/widgets/label-sets/background.js +2 -0
- package/components/widgets/label-sets/effects.js +2 -0
- package/components/widgets/label-types/background.d.ts +1 -0
- package/components/widgets/label-types/background.js +1 -0
- package/components/widgets/label-types/effects.d.ts +1 -0
- package/components/widgets/label-types/effects.js +1 -0
- package/components/widgets/navigation-descriptor-resolver.server.js +20 -8
- package/components/widgets/shared/bullet-list-vocabulary.d.ts +27 -1
- package/components/widgets/shared/bullet-list-vocabulary.js +24 -4
- package/components/widgets/shared/card-body-client.d.ts +18 -4
- package/components/widgets/shared/card-body-client.js +126 -26
- package/components/widgets/shared/card-vocabulary.d.ts +31 -4
- package/components/widgets/shared/card-vocabulary.js +35 -2
- package/components/widgets/shared/markdown-body-client.js +39 -10
- package/components/widgets/signals/control-signal-capabilities.d.ts +0 -18
- package/components/widgets/signals/control-signal-capabilities.js +10 -22
- package/components/workspace/catalog-store.d.ts +4 -3
- package/components/workspace/catalog-store.js +6 -5
- package/gateway/dashboard-cards-route.js +1 -0
- package/gateway/internal-references.d.ts +6 -1
- package/gateway/internal-references.js +48 -23
- package/gateway/site-cms-write-validation.d.ts +9 -0
- package/gateway/site-cms-write-validation.js +78 -0
- package/gateway/site-proxy.js +19 -3
- package/helpers/cms-container-chrome.js +6 -1
- package/helpers/locale.d.ts +8 -0
- package/helpers/locale.js +18 -0
- package/helpers/renderable-block-serialization.js +1 -1
- package/helpers/shell-region-style.js +2 -1
- package/helpers/surface-style.d.ts +12 -1
- package/helpers/surface-style.js +28 -2
- package/module-dashboard-cards.d.ts +1 -1
- package/module-dashboard-cards.js +1 -1
- package/next/config.d.mts +3 -0
- package/next/config.mjs +28 -1
- package/package.json +2 -2
- package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +5 -1
- package/plugins/runtime-modules/accounting/presets.d.ts +9 -0
- package/plugins/runtime-modules/accounting/presets.js +37 -0
- package/plugins/runtime-modules/accounting/server.d.ts +1 -4
- package/plugins/runtime-modules/accounting/server.js +4 -7
- package/plugins/runtime-modules/app/presets.d.ts +18 -0
- package/plugins/runtime-modules/app/presets.js +67 -0
- package/plugins/runtime-modules/app/server.d.ts +1 -4
- package/plugins/runtime-modules/app/server.js +4 -7
- package/plugins/runtime-modules/area-definitions.d.ts +0 -42
- package/plugins/runtime-modules/area-definitions.js +3 -8
- package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
- package/plugins/runtime-modules/asset/services/collection.js +9 -1
- package/plugins/runtime-modules/asset/services/options.js +2 -2
- package/plugins/runtime-modules/builder/area-settings-answer.js +2 -1
- package/plugins/runtime-modules/builder/authoring-canvas.js +6 -6
- package/plugins/runtime-modules/builder/cards.js +3 -5
- package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +3 -3
- package/plugins/runtime-modules/builder/clients/canvas-widget.js +15 -54
- package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +25 -35
- package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
- package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +8 -8
- package/plugins/runtime-modules/builder/clients/inspector-title.js +6 -6
- package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
- package/plugins/runtime-modules/builder/clients/layout-inspector.js +11 -25
- package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +10 -5
- package/plugins/runtime-modules/builder/clients/mode-switch.js +1 -1
- package/plugins/runtime-modules/builder/clients/pages-header.js +11 -11
- package/plugins/runtime-modules/builder/clients/pages-workspace.js +1 -1
- package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
- package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
- package/plugins/runtime-modules/builder/clients/shells-workspace.js +15 -31
- package/plugins/runtime-modules/builder/clients/structure-canvas.js +1 -1
- package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.d.ts +26 -0
- package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.js +36 -0
- package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
- package/plugins/runtime-modules/builder/clients/widget-inspector.js +1 -0
- package/plugins/runtime-modules/builder/clients/workspace-scope-boundary.js +2 -2
- package/plugins/runtime-modules/builder/cms-instance-allocator.js +8 -28
- package/plugins/runtime-modules/builder/controller/client.d.ts +0 -15
- package/plugins/runtime-modules/builder/controller/definition.d.ts +0 -15
- package/plugins/runtime-modules/builder/controller/definition.js +0 -8
- package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +1 -2
- package/plugins/runtime-modules/builder/controller/draft-command-controller.js +11 -30
- package/plugins/runtime-modules/builder/controller/draft-status-controller.js +15 -2
- package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +1 -2
- package/plugins/runtime-modules/builder/controller/inspector-controller.js +4 -7
- package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -2
- package/plugins/runtime-modules/builder/controller/page-controller.js +16 -68
- package/plugins/runtime-modules/builder/controller/server-definition.d.ts +0 -15
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.d.ts +2 -5
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +6 -50
- package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -3
- package/plugins/runtime-modules/builder/controller/workspace-controller.js +89 -153
- package/plugins/runtime-modules/builder/data-providers.d.ts +1 -0
- package/plugins/runtime-modules/builder/data-providers.js +1 -0
- package/plugins/runtime-modules/builder/definition.d.ts +1 -0
- package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +64 -30
- package/plugins/runtime-modules/builder/developer-workspace-store.js +255 -61
- package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +4 -3
- package/plugins/runtime-modules/builder/history.d.ts +3 -1
- package/plugins/runtime-modules/builder/options-providers.js +3 -2
- package/plugins/runtime-modules/builder/page-catalog-client.js +19 -7
- package/plugins/runtime-modules/builder/page-meta-form.js +1 -0
- package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
- package/plugins/runtime-modules/builder/persistence.js +33 -69
- package/plugins/runtime-modules/builder/public-route-collisions.d.ts +2 -2
- package/plugins/runtime-modules/builder/public-route-collisions.js +6 -19
- package/plugins/runtime-modules/builder/render-root-node-preview.server.js +20 -3
- package/plugins/runtime-modules/builder/render-root-node-scaffold.js +28 -18
- package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +2 -12
- package/plugins/runtime-modules/builder/runtime-module-selection.js +16 -42
- package/plugins/runtime-modules/builder/services/navigation-table.js +9 -15
- package/plugins/runtime-modules/builder/services/page-source-tree.js +8 -8
- package/plugins/runtime-modules/builder/services/runtime-modules-table.js +10 -10
- package/plugins/runtime-modules/builder/services/signal-routes-table.js +3 -3
- package/plugins/runtime-modules/builder/signal-route-selection.d.ts +1 -2
- package/plugins/runtime-modules/builder/signal-route-selection.js +2 -2
- package/plugins/runtime-modules/builder/signal-wiring-options.js +3 -2
- package/plugins/runtime-modules/builder/structure-dnd.js +8 -61
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +17 -10
- package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +27 -22
- package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +55 -0
- package/plugins/runtime-modules/builder/workspace-catalog-actions.js +142 -0
- package/plugins/runtime-modules/client-authoring-module.d.ts +8 -1
- package/plugins/runtime-modules/client-authoring-module.js +13 -3
- package/plugins/runtime-modules/client-manifests/common.js +1 -1
- package/plugins/runtime-modules/{runtime-calendar-adapters.js → core/calendar-adapters.js} +2 -2
- package/plugins/runtime-modules/{client-calendar-adapters/core.js → core/client-calendar-adapters.js} +1 -1
- package/plugins/runtime-modules/core/content-entries/table.js +1 -1
- package/plugins/runtime-modules/core/data-providers.d.ts +3 -0
- package/plugins/runtime-modules/core/data-providers.js +2 -1
- package/plugins/runtime-modules/core/definition.d.ts +3 -0
- package/plugins/runtime-modules/core/definition.js +1 -1
- package/plugins/runtime-modules/core/messaging/data-providers.d.ts +1 -0
- package/plugins/runtime-modules/core/messaging/data-providers.js +1 -0
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +1 -1
- package/plugins/runtime-modules/core/server.js +1 -1
- package/plugins/runtime-modules/core/themes.d.ts +44 -0
- package/plugins/runtime-modules/core/themes.js +12 -0
- package/plugins/runtime-modules/core/widgets/brand/client.d.ts +12 -3
- package/plugins/runtime-modules/core/widgets/brand/client.js +3 -11
- package/plugins/runtime-modules/core/widgets/brand/home.d.ts +15 -0
- package/plugins/runtime-modules/core/widgets/brand/home.js +18 -0
- package/plugins/runtime-modules/core/widgets/brand/plugin.js +3 -2
- package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
- package/plugins/runtime-modules/core/widgets/brand/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +25 -9
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +301 -254
- package/plugins/runtime-modules/core/widgets/card/config.js +68 -3
- package/plugins/runtime-modules/core/widgets/card/editor.js +41 -4
- package/plugins/runtime-modules/core/widgets/card/server.d.ts +3 -0
- package/plugins/runtime-modules/core/widgets/card/server.js +32 -3
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +7 -6
- package/plugins/runtime-modules/core/widgets/collection-view/config.js +9 -2
- package/plugins/runtime-modules/core/widgets/description/client.js +3 -3
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/description/editor.js +7 -63
- package/plugins/runtime-modules/core/widgets/description/server.js +3 -2
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/header-navigation/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/html/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/image/config.js +2 -2
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +320 -2
- package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -4
- package/plugins/runtime-modules/core/widgets/markdown/editor.js +11 -4
- package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +6 -1
- package/plugins/runtime-modules/core/widgets/markdown-toc/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/markdown-toc/config.js +14 -2
- package/plugins/runtime-modules/core/widgets/quick-links/authoring.js +7 -2
- package/plugins/runtime-modules/core/widgets/quick-links/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/quick-links/items.d.ts +0 -2
- package/plugins/runtime-modules/core/widgets/quick-links/items.js +0 -15
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +5 -25
- package/plugins/runtime-modules/core/widgets/result/config.js +2 -0
- package/plugins/runtime-modules/core/widgets/result/server.js +25 -19
- package/plugins/runtime-modules/core/widgets/sidebar-navigation/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/sidebar-navigation/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/client.js +8 -3
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
- package/plugins/runtime-modules/core/widgets/slot-upload/client.js +11 -2
- package/plugins/runtime-modules/core/widgets/table/client.js +8 -4
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +6 -83
- package/plugins/runtime-modules/core/widgets/table/config.js +302 -452
- package/plugins/runtime-modules/core/widgets/tree/config.js +5 -2
- package/plugins/runtime-modules/dashboard/card-rows.d.ts +7 -0
- package/plugins/runtime-modules/dashboard/card-rows.js +87 -0
- package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +32 -12
- package/plugins/runtime-modules/dashboard/services/collection.js +17 -7
- package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +5 -40
- package/plugins/runtime-modules/groups/data-providers.d.ts +2 -0
- package/plugins/runtime-modules/groups/data-providers.js +3 -3
- package/plugins/runtime-modules/groups/definition.d.ts +2 -0
- package/plugins/runtime-modules/localization/data-providers.d.ts +3 -0
- package/plugins/runtime-modules/localization/data-providers.js +2 -0
- package/plugins/runtime-modules/localization/definition.d.ts +3 -0
- package/plugins/runtime-modules/localization/services/table.js +3 -7
- package/plugins/runtime-modules/observability/data-providers.d.ts +1 -0
- package/plugins/runtime-modules/observability/data-providers.js +1 -0
- package/plugins/runtime-modules/observability/definition.d.ts +1 -0
- package/plugins/runtime-modules/observability/module.d.ts +1 -0
- package/plugins/runtime-modules/observability/services/table.js +1 -1
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +2 -105
- package/plugins/runtime-modules/public/presets.d.ts +115 -0
- package/plugins/runtime-modules/{area-base-presets.js → public/presets.js} +19 -119
- package/plugins/runtime-modules/public/server.d.ts +1 -4
- package/plugins/runtime-modules/public/server.js +4 -7
- package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +7 -8
- package/plugins/runtime-modules/public-base-page-references.d.ts +1 -1
- package/plugins/runtime-modules/public-base-page-references.js +1 -1
- package/plugins/runtime-modules/revisions/controller/client.js +11 -11
- package/plugins/runtime-modules/revisions/services/table.js +3 -3
- package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +22 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +2 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +111 -72
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +2 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +28 -31
- package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +1 -1
- package/plugins/runtime-modules/theme-descriptors.js +1 -1
- package/plugins/runtime-modules/user-management/data-providers.d.ts +2 -0
- package/plugins/runtime-modules/user-management/data-providers.js +1 -0
- package/plugins/runtime-modules/user-management/definition.d.ts +2 -0
- package/server-helpers/cms-link-targets.js +6 -0
- package/styles/control-shape.css +11 -11
- package/styles/controls.css +67 -5
- package/styles/layout.css +61 -9
- package/styles/shell.css +73 -0
- package/theme/phi-antd-token-resolver.js +20 -1
- package/theme/phi-theme-tokens.d.ts +1 -1
- package/theme/phi-theme-tokens.js +1 -0
- package/theme/phi-theme.d.ts +5 -0
- package/theme/phi-theme.js +21 -0
- package/theme/phi-tokens.d.ts +16 -15
- package/theme/phi-tokens.js +16 -15
- package/types/cms-config.js +142 -185
- package/types/cms-plugins.d.ts +6 -11
- package/types/core-widget-placements.d.ts +14 -3
- package/types/dashboard-cards.d.ts +48 -4
- package/types/dashboard-cards.js +6 -0
- package/types/media.d.ts +0 -3
- package/types/renderable-block.d.ts +6 -1
- package/types/site-theme.d.ts +10 -2
- package/types/table-widget.d.ts +9 -0
- package/types/table-widget.js +20 -0
- package/types.d.ts +1 -1
- package/widget-config.d.ts +2 -0
- package/widget-config.js +6 -0
- package/plugins/runtime-modules/area-base-presets.d.ts +0 -139
- /package/plugins/runtime-modules/{runtime-calendar-adapters.d.ts → core/calendar-adapters.d.ts} +0 -0
- /package/plugins/runtime-modules/{client-calendar-adapters/core.d.ts → core/client-calendar-adapters.d.ts} +0 -0
|
@@ -17,8 +17,6 @@ import { PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS, PHI_DEFAULT_PUB_AREA_WIDGET_NODE
|
|
|
17
17
|
const SYNTHETIC_REGION_IDS = {
|
|
18
18
|
regionHeaderTop: -1,
|
|
19
19
|
regionHeaderMain: -2,
|
|
20
|
-
regionHeaderBottom: -3,
|
|
21
|
-
regionSiderRight: -24,
|
|
22
20
|
regionFooterTop: -27,
|
|
23
21
|
regionFooterMain: -28,
|
|
24
22
|
regionFooterBottom: -33,
|
|
@@ -34,11 +32,8 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
34
32
|
ownerModuleId,
|
|
35
33
|
presetKey,
|
|
36
34
|
}, PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS);
|
|
37
|
-
const navigationArea = runtimeModuleArea === "public" ? "public" : runtimeModuleArea;
|
|
38
35
|
const headerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_main");
|
|
39
36
|
const headerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_top");
|
|
40
|
-
const headerBottomRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_bottom");
|
|
41
|
-
const siderRightRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "sider_right");
|
|
42
37
|
const footerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_main");
|
|
43
38
|
const footerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_top");
|
|
44
39
|
const footerBottomRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_bottom");
|
|
@@ -68,19 +63,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
68
63
|
family: "header",
|
|
69
64
|
region: "main",
|
|
70
65
|
});
|
|
71
|
-
const shellHeaderBottomHeight = resolvePhiShellHeaderHeight(runtime.site.theme?.shell, "bottom");
|
|
72
|
-
const shellHeaderBottomOffsetTop = resolvePhiShellMetric(runtime.site.theme?.shell, "offsetTop", {
|
|
73
|
-
family: "header",
|
|
74
|
-
region: "bottom",
|
|
75
|
-
});
|
|
76
|
-
const shellSiderRightWidth = resolvePhiShellMetric(runtime.site.theme?.shell, "width", {
|
|
77
|
-
family: "sider",
|
|
78
|
-
region: "right",
|
|
79
|
-
});
|
|
80
|
-
const shellSiderRightOffsetTop = resolvePhiShellMetric(runtime.site.theme?.shell, "offsetTop", {
|
|
81
|
-
family: "sider",
|
|
82
|
-
region: "right",
|
|
83
|
-
});
|
|
84
66
|
const shellFooterMainHeight = resolvePhiShellMetric(runtime.site.theme?.shell, "height", {
|
|
85
67
|
family: "footer",
|
|
86
68
|
region: "main",
|
|
@@ -135,44 +117,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
135
117
|
}),
|
|
136
118
|
]
|
|
137
119
|
: []),
|
|
138
|
-
...(headerBottomRegion
|
|
139
|
-
? [
|
|
140
|
-
nodes.region({
|
|
141
|
-
id: SYNTHETIC_REGION_IDS.regionHeaderBottom,
|
|
142
|
-
regionType: PhiCmsRegionType.HeaderBottom,
|
|
143
|
-
rootLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderBottom,
|
|
144
|
-
status: headerBottomRegion.status,
|
|
145
|
-
flags: headerBottomRegion.flags,
|
|
146
|
-
visibilityMask: headerBottomRegion.visibilityMask,
|
|
147
|
-
sortOrder: headerBottomRegion.sortOrder,
|
|
148
|
-
config: {
|
|
149
|
-
...headerBottomRegion.config,
|
|
150
|
-
size: { ...(headerBottomRegion.config.size ?? {}), height: `${shellHeaderBottomHeight}px` },
|
|
151
|
-
...(typeof shellHeaderBottomOffsetTop === "number" ? { offsetTop: shellHeaderBottomOffsetTop } : {}),
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
]
|
|
155
|
-
: []),
|
|
156
|
-
...(siderRightRegion
|
|
157
|
-
? [
|
|
158
|
-
nodes.region({
|
|
159
|
-
id: SYNTHETIC_REGION_IDS.regionSiderRight,
|
|
160
|
-
regionType: PhiCmsRegionType.SiderRight,
|
|
161
|
-
rootLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutSiderRight,
|
|
162
|
-
status: siderRightRegion.status,
|
|
163
|
-
flags: siderRightRegion.flags,
|
|
164
|
-
visibilityMask: siderRightRegion.visibilityMask,
|
|
165
|
-
sortOrder: siderRightRegion.sortOrder,
|
|
166
|
-
config: {
|
|
167
|
-
...siderRightRegion.config,
|
|
168
|
-
...(typeof shellSiderRightWidth === "number"
|
|
169
|
-
? { size: { ...(siderRightRegion.config.size ?? {}), width: `${shellSiderRightWidth}px` } }
|
|
170
|
-
: {}),
|
|
171
|
-
...(typeof shellSiderRightOffsetTop === "number" ? { offsetTop: shellSiderRightOffsetTop } : {}),
|
|
172
|
-
},
|
|
173
|
-
}),
|
|
174
|
-
]
|
|
175
|
-
: []),
|
|
176
120
|
...(footerTopRegion
|
|
177
121
|
? [
|
|
178
122
|
nodes.region({
|
|
@@ -295,53 +239,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
295
239
|
paddingRight: 0,
|
|
296
240
|
},
|
|
297
241
|
},
|
|
298
|
-
...(headerBottomRegion
|
|
299
|
-
? [
|
|
300
|
-
{
|
|
301
|
-
id: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderBottom,
|
|
302
|
-
siteId: page.siteId,
|
|
303
|
-
parentLayoutNodeId: null,
|
|
304
|
-
widgetType: buildPhiCmsLayoutNamespacedTypeKey(resolvePhiCmsLayoutPluginKey("flex"), "flex"),
|
|
305
|
-
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
306
|
-
sortOrder: 10,
|
|
307
|
-
status: 1,
|
|
308
|
-
flags: 0,
|
|
309
|
-
visibilityMask: page.visibilityMask,
|
|
310
|
-
label: "pub header bottom flex",
|
|
311
|
-
config: {
|
|
312
|
-
anchor: {
|
|
313
|
-
horizontal: "left",
|
|
314
|
-
vertical: "middle",
|
|
315
|
-
},
|
|
316
|
-
gap: 0,
|
|
317
|
-
wrap: false,
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
]
|
|
321
|
-
: []),
|
|
322
|
-
...(siderRightRegion
|
|
323
|
-
? [
|
|
324
|
-
{
|
|
325
|
-
id: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutSiderRight,
|
|
326
|
-
siteId: page.siteId,
|
|
327
|
-
parentLayoutNodeId: null,
|
|
328
|
-
widgetType: buildPhiCmsLayoutNamespacedTypeKey(resolvePhiCmsLayoutPluginKey("flex-vertical"), "flex-vertical"),
|
|
329
|
-
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
330
|
-
sortOrder: 16,
|
|
331
|
-
status: 1,
|
|
332
|
-
flags: 0,
|
|
333
|
-
visibilityMask: page.visibilityMask,
|
|
334
|
-
label: "pub sider right vertical",
|
|
335
|
-
config: {
|
|
336
|
-
anchor: {
|
|
337
|
-
horizontal: "center",
|
|
338
|
-
vertical: "top",
|
|
339
|
-
},
|
|
340
|
-
gap: 0,
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
]
|
|
344
|
-
: []),
|
|
345
242
|
...(footerTopRegion
|
|
346
243
|
? [
|
|
347
244
|
{
|
|
@@ -516,7 +413,7 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
516
413
|
visibilityMask: page.visibilityMask,
|
|
517
414
|
label: "pub header main navigation",
|
|
518
415
|
config: {
|
|
519
|
-
navKey: `${
|
|
416
|
+
navKey: `${runtimeModuleArea}:header`,
|
|
520
417
|
},
|
|
521
418
|
contentVersionId: null,
|
|
522
419
|
},
|
|
@@ -588,7 +485,7 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
588
485
|
config: {
|
|
589
486
|
title: "Quick Links",
|
|
590
487
|
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
591
|
-
navKey: `${
|
|
488
|
+
navKey: `${runtimeModuleArea}:footer`,
|
|
592
489
|
columns: 2,
|
|
593
490
|
separator: true,
|
|
594
491
|
},
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { PhiCmsDescriptorBuildContext } from "../../../types/cms-module-descriptors";
|
|
2
|
+
export declare const PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS: {
|
|
3
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
4
|
+
presetKey: string;
|
|
5
|
+
shellPresetVersion: number;
|
|
6
|
+
area: "public";
|
|
7
|
+
exportedNodeKeys: readonly ["widgetBrand", "widgetNav", "widgetLocale"];
|
|
8
|
+
loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const PHI_PUBLIC_RUNTIME_MODULE_ROUTES: ({
|
|
11
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
12
|
+
presetKey: string;
|
|
13
|
+
presetVersion: number;
|
|
14
|
+
area: "public";
|
|
15
|
+
title: string;
|
|
16
|
+
path: string;
|
|
17
|
+
defaultPageFlags: number;
|
|
18
|
+
loadTree: ({ page }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
19
|
+
} | {
|
|
20
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
21
|
+
presetKey: "public-welcome-page";
|
|
22
|
+
presetVersion: number;
|
|
23
|
+
area: "public";
|
|
24
|
+
title: string;
|
|
25
|
+
path: string;
|
|
26
|
+
loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
27
|
+
navigation?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
30
|
+
presetKey: "public-home-page";
|
|
31
|
+
presetVersion: number;
|
|
32
|
+
area: "public";
|
|
33
|
+
title: string;
|
|
34
|
+
path: string;
|
|
35
|
+
navigation: {
|
|
36
|
+
navKey: "public:header";
|
|
37
|
+
parentItemKey: null;
|
|
38
|
+
before: string;
|
|
39
|
+
item: {
|
|
40
|
+
itemKey: string;
|
|
41
|
+
label: {
|
|
42
|
+
defaultMessage: string;
|
|
43
|
+
};
|
|
44
|
+
icon: string;
|
|
45
|
+
routePresetKey: string;
|
|
46
|
+
};
|
|
47
|
+
}[];
|
|
48
|
+
loadTree: ({ page }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
49
|
+
} | {
|
|
50
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
51
|
+
presetKey: "public-terms-page";
|
|
52
|
+
presetVersion: number;
|
|
53
|
+
area: "public";
|
|
54
|
+
title: string;
|
|
55
|
+
path: string;
|
|
56
|
+
loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
|
|
57
|
+
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
58
|
+
params: Readonly<Record<string, string>>;
|
|
59
|
+
}) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
60
|
+
navigation?: undefined;
|
|
61
|
+
})[];
|
|
62
|
+
/**
|
|
63
|
+
* The Public form pages, in their own list because they appear only where Forms are allowed. The
|
|
64
|
+
* contact page is Core's like the terms: every Site starts with a way to be reached, and neither is
|
|
65
|
+
* a landing -- the front door is the Site package's business.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES: ({
|
|
68
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
69
|
+
presetKey: "public-contact-page";
|
|
70
|
+
presetVersion: number;
|
|
71
|
+
area: "public";
|
|
72
|
+
title: string;
|
|
73
|
+
path: string;
|
|
74
|
+
navigation: ({
|
|
75
|
+
navKey: "public:header";
|
|
76
|
+
parentItemKey: null;
|
|
77
|
+
after: string;
|
|
78
|
+
item: {
|
|
79
|
+
itemKey: string;
|
|
80
|
+
label: {
|
|
81
|
+
defaultMessage: string;
|
|
82
|
+
};
|
|
83
|
+
icon: string;
|
|
84
|
+
routePresetKey: string;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
navKey: "public:footer";
|
|
88
|
+
parentItemKey: null;
|
|
89
|
+
after: string;
|
|
90
|
+
item: {
|
|
91
|
+
itemKey: string;
|
|
92
|
+
label: {
|
|
93
|
+
defaultMessage: string;
|
|
94
|
+
};
|
|
95
|
+
routePresetKey: string;
|
|
96
|
+
icon?: undefined;
|
|
97
|
+
};
|
|
98
|
+
})[];
|
|
99
|
+
loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
|
|
100
|
+
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
101
|
+
params: Readonly<Record<string, string>>;
|
|
102
|
+
}) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
103
|
+
} | {
|
|
104
|
+
ownerModuleId: "@phis/ui/modules/public";
|
|
105
|
+
presetKey: "public-unsubscribe-page";
|
|
106
|
+
presetVersion: number;
|
|
107
|
+
area: "public";
|
|
108
|
+
title: string;
|
|
109
|
+
path: string;
|
|
110
|
+
navigation: never[];
|
|
111
|
+
loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
|
|
112
|
+
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
113
|
+
params: Readonly<Record<string, string>>;
|
|
114
|
+
}) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
115
|
+
})[];
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const PHI_AREA_BASE_RUNTIME_MODULE_AREA_SHELLS = [
|
|
1
|
+
import { PhiCmsFlags } from "../../../constants/phi-cms";
|
|
2
|
+
import { PHI_CMS_ERROR_CODES, resolvePhiCmsErrorPagePath } from "../../../constants/cms-error-pages";
|
|
3
|
+
import { PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS, PHI_DEFAULT_PUB_AREA_PRESET_KEY, } from "../preset-contracts/pub-area";
|
|
4
|
+
import { PHI_PUBLIC_BASE_PAGE_PRESET_KEYS } from "../public-base-page-references";
|
|
5
|
+
import { PHI_PUBLIC_RUNTIME_MODULE_ID } from "./ids";
|
|
6
|
+
/*
|
|
7
|
+
* What the Public base Module brings: the Site shell and the Pages no Site can do without. They live in
|
|
8
|
+
* the Module that owns them, so the Module reaches no other Module to state them (MODULES.md, "The
|
|
9
|
+
* dependency rule").
|
|
10
|
+
*/
|
|
11
|
+
export const PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS = [
|
|
13
12
|
{
|
|
14
13
|
ownerModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
|
|
15
14
|
presetKey: PHI_DEFAULT_PUB_AREA_PRESET_KEY,
|
|
16
15
|
shellPresetVersion: 1,
|
|
17
16
|
area: "public",
|
|
18
17
|
exportedNodeKeys: PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS,
|
|
19
|
-
loadTree: ({ page, runtime }) => import("
|
|
18
|
+
loadTree: ({ page, runtime }) => import("../phi-default-site-area-preset-tree")
|
|
20
19
|
.then((module) => module.buildPhiDefaultSiteAreaPresetTree({
|
|
21
20
|
page,
|
|
22
21
|
runtime,
|
|
@@ -25,56 +24,8 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_AREA_SHELLS = [
|
|
|
25
24
|
runtimeModuleArea: "public",
|
|
26
25
|
})),
|
|
27
26
|
},
|
|
28
|
-
{
|
|
29
|
-
ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
|
|
30
|
-
presetKey: "app-area-preset",
|
|
31
|
-
shellPresetVersion: 1,
|
|
32
|
-
area: "app",
|
|
33
|
-
/*
|
|
34
|
-
* The Site shell with a left sider added, rather than a shell of its own.
|
|
35
|
-
*
|
|
36
|
-
* App's header and footer are Public's -- one Brand, one account trigger, one description of both.
|
|
37
|
-
* What App has that Public does not is somewhere for the Modules a signed-in person works with,
|
|
38
|
-
* and that is the whole of the overlay. Nothing is omitted from the base, so the two trees cannot
|
|
39
|
-
* disagree about a Region: composition refuses a Region type stated twice.
|
|
40
|
-
*/
|
|
41
|
-
loadTree: async ({ page, runtime }) => {
|
|
42
|
-
const [{ buildPhiDefaultSiteAreaPresetTree }, { buildPhiDefaultAppAreaPresetTree }, { mergePhiCmsShellTrees },] = await Promise.all([
|
|
43
|
-
import("./phi-default-site-area-preset-tree"),
|
|
44
|
-
import("./app/trees/phi-default-app-area-preset-tree"),
|
|
45
|
-
import("./shell-tree-composition"),
|
|
46
|
-
]);
|
|
47
|
-
const [base, overlay] = await Promise.all([
|
|
48
|
-
buildPhiDefaultSiteAreaPresetTree({
|
|
49
|
-
page,
|
|
50
|
-
runtime,
|
|
51
|
-
presetKey: "app-area-preset",
|
|
52
|
-
ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
|
|
53
|
-
runtimeModuleArea: "app",
|
|
54
|
-
}),
|
|
55
|
-
buildPhiDefaultAppAreaPresetTree({ page, runtime }),
|
|
56
|
-
]);
|
|
57
|
-
return mergePhiCmsShellTrees(base, overlay);
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
...[
|
|
61
|
-
["accounting", PHI_ACCOUNTING_RUNTIME_MODULE_ID],
|
|
62
|
-
].map(([area, ownerModuleId]) => ({
|
|
63
|
-
ownerModuleId,
|
|
64
|
-
presetKey: `${area}-area-preset`,
|
|
65
|
-
shellPresetVersion: 1,
|
|
66
|
-
area,
|
|
67
|
-
loadTree: ({ page, runtime }) => import("./phi-default-site-area-preset-tree")
|
|
68
|
-
.then((module) => module.buildPhiDefaultSiteAreaPresetTree({
|
|
69
|
-
page,
|
|
70
|
-
runtime,
|
|
71
|
-
presetKey: `${area}-area-preset`,
|
|
72
|
-
ownerModuleId,
|
|
73
|
-
runtimeModuleArea: area,
|
|
74
|
-
})),
|
|
75
|
-
})),
|
|
76
27
|
];
|
|
77
|
-
export const
|
|
28
|
+
export const PHI_PUBLIC_RUNTIME_MODULE_ROUTES = [
|
|
78
29
|
{
|
|
79
30
|
ownerModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
|
|
80
31
|
presetKey: PHI_PUBLIC_BASE_PAGE_PRESET_KEYS.welcome,
|
|
@@ -90,7 +41,7 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
|
|
|
90
41
|
* the table for every Site, so a Site package offering a landing would arrive as the second and
|
|
91
42
|
* would no longer cover this one on activation.
|
|
92
43
|
*/
|
|
93
|
-
loadTree: ({ page, runtime }) => import("./
|
|
44
|
+
loadTree: ({ page, runtime }) => import("./trees/phi-default-pub-welcome-page-tree")
|
|
94
45
|
.then((module) => module.buildPhiDefaultPubWelcomePageTree({ page, runtime })),
|
|
95
46
|
},
|
|
96
47
|
{
|
|
@@ -121,36 +72,9 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
|
|
|
121
72
|
},
|
|
122
73
|
},
|
|
123
74
|
],
|
|
124
|
-
loadTree: ({ page }) => import("./
|
|
75
|
+
loadTree: ({ page }) => import("./trees/phi-default-pub-home-page-tree")
|
|
125
76
|
.then((module) => module.buildPhiDefaultPubHomePageTree({ page })),
|
|
126
77
|
},
|
|
127
|
-
buildPhiAreaRootRoutePresetDescriptor({
|
|
128
|
-
ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
|
|
129
|
-
area: "app",
|
|
130
|
-
title: "App",
|
|
131
|
-
}),
|
|
132
|
-
/*
|
|
133
|
-
* What a person has settled about their own account: their name, the language they read in.
|
|
134
|
-
*
|
|
135
|
-
* It sat with the Auth Module, which owned the route while Core owned every Widget on it. Nothing
|
|
136
|
-
* about a name or a language depends on how somebody signs in -- a Site that switches to a
|
|
137
|
-
* directory, or switches Auth off while sessions keep working, would have lost the Page that says
|
|
138
|
-
* what they are called. AUTHENTICATION.md section 5 already said so: profile administration does
|
|
139
|
-
* not become Auth's merely by appearing in its menu.
|
|
140
|
-
*
|
|
141
|
-
* The Area's own Settings child, so it is declared here rather than injected -- SETTINGS.md section
|
|
142
|
-
* 5, the same standing Admin and Builder give their General page.
|
|
143
|
-
*/
|
|
144
|
-
{
|
|
145
|
-
ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
|
|
146
|
-
presetKey: "app-profile-page",
|
|
147
|
-
presetVersion: 1 + PHI_BASE_PAGE_LAYOUT_VERSION,
|
|
148
|
-
area: "app",
|
|
149
|
-
title: "Profile",
|
|
150
|
-
path: "/settings/profile",
|
|
151
|
-
loadTree: ({ page, runtime }) => import("./app/trees/phi-default-app-profile-page-tree")
|
|
152
|
-
.then((module) => module.buildPhiDefaultAppProfilePageTree({ page, runtime })),
|
|
153
|
-
},
|
|
154
78
|
...PHI_CMS_ERROR_CODES.map((code) => ({
|
|
155
79
|
ownerModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
|
|
156
80
|
presetKey: `public-error-${code}-page`,
|
|
@@ -164,7 +88,7 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
|
|
|
164
88
|
* Pages, and the Site can still decide otherwise.
|
|
165
89
|
*/
|
|
166
90
|
defaultPageFlags: PhiCmsFlags.NoIndex,
|
|
167
|
-
loadTree: ({ page }) => import("./
|
|
91
|
+
loadTree: ({ page }) => import("./trees/phi-default-pub-error-page-tree")
|
|
168
92
|
.then((module) => module.buildPhiDefaultPubErrorPageTree({ code, page })),
|
|
169
93
|
})),
|
|
170
94
|
{
|
|
@@ -174,34 +98,10 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
|
|
|
174
98
|
area: "public",
|
|
175
99
|
title: "Terms and Conditions",
|
|
176
100
|
path: "/terms-and-conditions",
|
|
177
|
-
loadTree: ({ page }) => import("./
|
|
101
|
+
loadTree: ({ page }) => import("./trees/phi-default-pub-terms-page-tree")
|
|
178
102
|
.then((module) => module.buildPhiDefaultPubTermsPageTree({ page })),
|
|
179
103
|
},
|
|
180
|
-
buildPhiAreaRootRoutePresetDescriptor({
|
|
181
|
-
ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
|
|
182
|
-
area: "accounting",
|
|
183
|
-
title: "Accounting",
|
|
184
|
-
}),
|
|
185
|
-
{
|
|
186
|
-
ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
|
|
187
|
-
presetKey: "accounting-overview-page",
|
|
188
|
-
presetVersion: 1 + PHI_BASE_PAGE_LAYOUT_VERSION,
|
|
189
|
-
area: "accounting",
|
|
190
|
-
title: "Overview",
|
|
191
|
-
path: "/overview",
|
|
192
|
-
loadTree: ({ page, runtime }) => import("./accounting/trees/phi-default-accounting-page-tree")
|
|
193
|
-
.then((module) => module.buildPhiDefaultAccountingPageTree({ page, runtime })),
|
|
194
|
-
},
|
|
195
104
|
];
|
|
196
|
-
export const PHI_CORE_RUNTIME_MODULE_THEMES = PHI_CORE_THEME_PRESET_PLUGINS.map((preset) => ({
|
|
197
|
-
ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
|
|
198
|
-
presetKey: `${preset.key}-theme-preset`,
|
|
199
|
-
presetVersion: 1,
|
|
200
|
-
themeKey: preset.key,
|
|
201
|
-
title: preset.title,
|
|
202
|
-
...(preset.description ? { description: preset.description } : {}),
|
|
203
|
-
loadPreset: () => preset,
|
|
204
|
-
}));
|
|
205
105
|
/**
|
|
206
106
|
* The Public form pages, in their own list because they appear only where Forms are allowed. The
|
|
207
107
|
* contact page is Core's like the terms: every Site starts with a way to be reached, and neither is
|
|
@@ -238,7 +138,7 @@ export const PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES = [
|
|
|
238
138
|
},
|
|
239
139
|
},
|
|
240
140
|
],
|
|
241
|
-
loadTree: ({ page }) => import("./
|
|
141
|
+
loadTree: ({ page }) => import("./trees/phi-default-pub-contact-page-tree")
|
|
242
142
|
.then((module) => module.buildPhiDefaultPubContactPageTree({ page })),
|
|
243
143
|
},
|
|
244
144
|
/*
|
|
@@ -257,7 +157,7 @@ export const PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES = [
|
|
|
257
157
|
title: "Unsubscribe",
|
|
258
158
|
path: "/unsubscribe",
|
|
259
159
|
navigation: [],
|
|
260
|
-
loadTree: ({ page }) => import("./
|
|
160
|
+
loadTree: ({ page }) => import("./trees/phi-default-pub-unsubscribe-page-tree")
|
|
261
161
|
.then((module) => module.buildPhiDefaultPubUnsubscribePageTree({
|
|
262
162
|
page,
|
|
263
163
|
presetKey: PHI_PUBLIC_BASE_PAGE_PRESET_KEYS.unsubscribe,
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The unselectable base module of its Area. Shells and routes come from the shared Area-base preset
|
|
3
|
-
* list and are filtered by owner, so each base module states its own half of it.
|
|
4
|
-
*/
|
|
1
|
+
/** The unselectable base module of its Area. Its shell and Pages are its own (`./presets`). */
|
|
5
2
|
export declare const PHI_PUBLIC_RUNTIME_MODULE_SERVER_AREA_CONTRIBUTION: import("../area-contributions").PhiRuntimeModuleServerAreaContribution;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS, PHI_PUBLIC_RUNTIME_MODULE_ROUTES, PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES, } from "./presets";
|
|
2
2
|
import { definePhiRuntimeModuleServerAreaContribution } from "../area-contributions";
|
|
3
3
|
import { PHI_PUBLIC_RUNTIME_MODULE_DEFINITION } from "../public/definition";
|
|
4
4
|
import { PHI_PUBLIC_RUNTIME_MODULE_FORMS } from "./forms";
|
|
5
|
-
/**
|
|
6
|
-
* The unselectable base module of its Area. Shells and routes come from the shared Area-base preset
|
|
7
|
-
* list and are filtered by owner, so each base module states its own half of it.
|
|
8
|
-
*/
|
|
5
|
+
/** The unselectable base module of its Area. Its shell and Pages are its own (`./presets`). */
|
|
9
6
|
export const PHI_PUBLIC_RUNTIME_MODULE_SERVER_AREA_CONTRIBUTION = definePhiRuntimeModuleServerAreaContribution({
|
|
10
7
|
moduleId: PHI_PUBLIC_RUNTIME_MODULE_DEFINITION.moduleId,
|
|
11
8
|
catalogEntry: {
|
|
@@ -13,13 +10,13 @@ export const PHI_PUBLIC_RUNTIME_MODULE_SERVER_AREA_CONTRIBUTION = definePhiRunti
|
|
|
13
10
|
widgets: [],
|
|
14
11
|
layouts: [],
|
|
15
12
|
forms: PHI_PUBLIC_RUNTIME_MODULE_FORMS,
|
|
16
|
-
areaShells:
|
|
13
|
+
areaShells: PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS,
|
|
17
14
|
/*
|
|
18
15
|
* The landing, the error Pages, the terms, and the contact page: what no Site can do without. Each
|
|
19
16
|
* is a floor a package Module may cover (MODULES.md, "Who owns an address") -- the landing through
|
|
20
17
|
* the root slot, the others through their path.
|
|
21
18
|
*/
|
|
22
|
-
routes:
|
|
19
|
+
routes: [...PHI_PUBLIC_RUNTIME_MODULE_ROUTES, ...PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES],
|
|
23
20
|
load: () => import("./module").then((module) => module.PHI_PUBLIC_RUNTIME_MODULE),
|
|
24
21
|
},
|
|
25
22
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createPhiPresetCmsInstanceId } from "../../../../types/cms-instance-id";
|
|
2
|
+
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
2
3
|
import { PHI_PUBLIC_RUNTIME_MODULE_ID } from "../ids";
|
|
3
4
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
4
5
|
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
@@ -12,14 +13,11 @@ const ERROR_STATUS = {
|
|
|
12
13
|
/**
|
|
13
14
|
* The source text, and the source text only.
|
|
14
15
|
*
|
|
15
|
-
* It goes into the widget config untranslated
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* The admin presets are the deliberate other case: their labels are system copy shared across Sites, so
|
|
22
|
-
* they are translated globally in the preset and set the node's `NoTranslate` flag.
|
|
16
|
+
* It goes into the widget config untranslated and marked `textSource: "preset"`: these are the
|
|
17
|
+
* platform's words, the same on every Site, so the `result` widget translates them through the global
|
|
18
|
+
* store (`helpers/text-source.ts`). Pre-translating here would freeze one locale into every Site that
|
|
19
|
+
* adopts the page. An author who rewrites a text in the Builder drops the marker, and from then on the
|
|
20
|
+
* words are the Site's and its own store translates them.
|
|
23
21
|
*/
|
|
24
22
|
const ERROR_SOURCE_COPY = {
|
|
25
23
|
401: {
|
|
@@ -92,6 +90,7 @@ export async function buildPhiDefaultPubErrorPageTree({ code, page, }) {
|
|
|
92
90
|
sortOrder: 0,
|
|
93
91
|
label: `pub error ${code} result widget`,
|
|
94
92
|
config: {
|
|
93
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
95
94
|
status: ERROR_STATUS[code],
|
|
96
95
|
code: String(code),
|
|
97
96
|
title: copy.title,
|
|
@@ -4,7 +4,7 @@ import { createPhiPageReference } from "../../types/references";
|
|
|
4
4
|
*
|
|
5
5
|
* A Module that points at one of them has to say which, and a string typed at the call site is the same
|
|
6
6
|
* fragility as a path: nothing checks it, and a preset key that is renamed leaves a reference resolving
|
|
7
|
-
* to nothing. The base descriptors in `
|
|
7
|
+
* to nothing. The base descriptors in `public/presets.ts` read their keys from here, so the two
|
|
8
8
|
* cannot drift.
|
|
9
9
|
*
|
|
10
10
|
* Kept apart from those descriptors on purpose. They import every base Page tree, and
|
|
@@ -6,7 +6,7 @@ import { createPhiRuntimeModuleId } from "../../constants/module-identity";
|
|
|
6
6
|
*
|
|
7
7
|
* A Module that points at one of them has to say which, and a string typed at the call site is the same
|
|
8
8
|
* fragility as a path: nothing checks it, and a preset key that is renamed leaves a reference resolving
|
|
9
|
-
* to nothing. The base descriptors in `
|
|
9
|
+
* to nothing. The base descriptors in `public/presets.ts` read their keys from here, so the two
|
|
10
10
|
* cannot drift.
|
|
11
11
|
*
|
|
12
12
|
* Kept apart from those descriptors on purpose. They import every base Page tree, and
|
|
@@ -8,7 +8,7 @@ import { createPhiRuntimeControllerClient } from "../../../../components/runtime
|
|
|
8
8
|
import { usePhiSignalDispatcher, usePhiSignalListener } from "../../../../components/runtime/runtime-signal-bus";
|
|
9
9
|
import { dispatchPhiSignalCapability } from "../../../../components/runtime/runtime-signal-identity";
|
|
10
10
|
import { usePhiApplicationFeedback } from "../../../../components/runtime/use-phi-application-feedback";
|
|
11
|
-
import { getPhiWorkspaceCatalogSnapshot, usePhiWorkspaceCatalogValue,
|
|
11
|
+
import { getPhiWorkspaceCatalogSnapshot, usePhiWorkspaceCatalogValue, } from "../../../../components/workspace/catalog-store";
|
|
12
12
|
import { PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM, PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, PHI_BUILDER_THEME_KEY_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderPageSearchParam, normalizePhiBuilderRevisionsKindSearchParam, } from "../../../../helpers/cms-scope-search-params";
|
|
13
13
|
import { resolvePhiBuilderRevisionPagePath, } from "../types";
|
|
14
14
|
import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
|
|
@@ -31,13 +31,13 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
31
31
|
const { showMessage } = usePhiApplicationFeedback();
|
|
32
32
|
const pathname = usePhiPathname();
|
|
33
33
|
const router = useRouter();
|
|
34
|
-
const builderArea = usePhiWorkspaceCatalogValue(
|
|
35
|
-
const builderPageKey = usePhiWorkspaceCatalogValue(
|
|
36
|
-
const modulePresetPagesByArea = usePhiWorkspaceCatalogValue(
|
|
37
|
-
const customPages = usePhiWorkspaceCatalogValue(
|
|
38
|
-
const persistedPageCatalogByArea = usePhiWorkspaceCatalogValue(
|
|
34
|
+
const builderArea = usePhiWorkspaceCatalogValue((state) => state.area);
|
|
35
|
+
const builderPageKey = usePhiWorkspaceCatalogValue((state) => state.pageKey);
|
|
36
|
+
const modulePresetPagesByArea = usePhiWorkspaceCatalogValue((state) => state.modulePresetPagesByArea);
|
|
37
|
+
const customPages = usePhiWorkspaceCatalogValue((state) => state.customPages);
|
|
38
|
+
const persistedPageCatalogByArea = usePhiWorkspaceCatalogValue((state) => state.persistedPageCatalogByArea);
|
|
39
39
|
useEffect(() => {
|
|
40
|
-
const state = getPhiWorkspaceCatalogSnapshot(
|
|
40
|
+
const state = getPhiWorkspaceCatalogSnapshot();
|
|
41
41
|
const pages = resolvePhiBuilderActivePageCatalog(state.area, state.modulePresetPagesByArea, state.customPages, state.persistedPageCatalogByArea);
|
|
42
42
|
const search = new URLSearchParams(window.location.search);
|
|
43
43
|
const pageKey = resolvePhiBuilderActivePageKey(normalizePhiBuilderPageSearchParam(search.get(PHI_BUILDER_PAGE_SEARCH_PARAM)) ?? state.pageKey, pages);
|
|
@@ -72,7 +72,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
72
72
|
* not the root route, not the SEO answers. Every one of them is now a value only the server knows.
|
|
73
73
|
*/
|
|
74
74
|
const deleteAreaShell = useCallback(async (area, correlationId) => {
|
|
75
|
-
const source = getPhiWorkspaceCatalogSnapshot(
|
|
75
|
+
const source = getPhiWorkspaceCatalogSnapshot()
|
|
76
76
|
.areaPresetSourcesByArea?.[area] ?? null;
|
|
77
77
|
try {
|
|
78
78
|
await deleteCmsDraft("/api/site/cms/area/override", {
|
|
@@ -114,7 +114,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
114
114
|
* from the signal -- the button names a command, and what it acts on is whatever the Builder is
|
|
115
115
|
* pointed at when it is pressed.
|
|
116
116
|
*/
|
|
117
|
-
const area = getPhiWorkspaceCatalogSnapshot(
|
|
117
|
+
const area = getPhiWorkspaceCatalogSnapshot().area;
|
|
118
118
|
emitCapability("deleteAreaWarning", `Everything this Site stored for ${area} is cleared -- its Shell and its Module selection, drafts and published alike. What is live changes at once, the Module preset takes the Area back, and no revision is left to restore it from. It cannot be undone.`, signal.correlationId);
|
|
119
119
|
emitCapability("deleteAreaOpen", null, signal.correlationId);
|
|
120
120
|
return;
|
|
@@ -123,7 +123,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
123
123
|
const payload = isPhiRecord(signal.value) ? signal.value : null;
|
|
124
124
|
const values = isPhiRecord(payload?.values) ? payload.values : null;
|
|
125
125
|
const typed = typeof values?.areaKey === "string" ? values.areaKey.trim() : "";
|
|
126
|
-
const area = getPhiWorkspaceCatalogSnapshot(
|
|
126
|
+
const area = getPhiWorkspaceCatalogSnapshot().area;
|
|
127
127
|
if (typed !== area) {
|
|
128
128
|
// The Overlay stays open: what is wrong is the answer, not the question.
|
|
129
129
|
showMessage({ level: "error", content: "That is not the Area key." }, { correlationId: signal.correlationId });
|
|
@@ -169,7 +169,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
169
169
|
const key = typeof action?.key === "string" ? action.key : "";
|
|
170
170
|
if (key === "restore") {
|
|
171
171
|
showMessage({ level: "success", content: `Restored revision #${String(action?.revisionId ?? "")}.` }, { correlationId: signal.correlationId });
|
|
172
|
-
const state = getPhiWorkspaceCatalogSnapshot(
|
|
172
|
+
const state = getPhiWorkspaceCatalogSnapshot();
|
|
173
173
|
const search = new URLSearchParams(window.location.search);
|
|
174
174
|
const kind = normalizePhiBuilderRevisionsKindSearchParam(search.get(PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM)) ?? "area";
|
|
175
175
|
const revisionScope = search.get(PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM)?.trim() ?? "";
|