@phis/ui 0.7.8 → 0.8.1
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 +15 -7
- package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
- package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
- package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
- package/components/cms/phi-cms-render-diagnostic.js +12 -2
- package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
- package/components/cms/phi-cms-render-error-boundary.js +1 -1
- package/components/cms/phi-cms-root-layout.js +3 -1
- package/components/controls/phi-address-control.d.ts +23 -0
- package/components/controls/phi-address-control.js +43 -0
- package/components/controls/phi-color-control.d.ts +3 -1
- package/components/controls/phi-color-control.js +2 -2
- package/components/controls/phi-country-select-control.d.ts +22 -0
- package/components/controls/phi-country-select-control.js +16 -0
- package/components/controls/phi-dialog-control.d.ts +1 -1
- package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
- package/components/controls/phi-drawer-control-adapter.js +5 -3
- package/components/controls/phi-drawer-control.d.ts +7 -5
- package/components/controls/phi-float-button-control.d.ts +8 -1
- package/components/controls/phi-float-button-control.js +19 -3
- package/components/controls/phi-form-control.js +52 -8
- package/components/controls/phi-media-picker-control.d.ts +9 -0
- package/components/controls/phi-media-picker-control.js +1 -1
- package/components/controls/phi-modal-control-adapter.d.ts +1 -1
- package/components/controls/phi-modal-control-adapter.js +14 -37
- package/components/controls/phi-modal-control.d.ts +5 -5
- package/components/controls/phi-options-provider.d.ts +1 -0
- package/components/controls/phi-options-provider.js +1 -0
- package/components/controls/phi-overlay-control-contract.d.ts +52 -17
- package/components/controls/phi-overlay-control-contract.js +55 -30
- package/components/controls/phi-popover-control.js +4 -1
- package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
- package/components/controls/phi-reveal-once-dialog-control.js +52 -0
- package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
- package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
- package/components/controls/phi-table-control.d.ts +7 -1
- package/components/controls/phi-table-control.js +23 -8
- package/components/forms/flags-field.d.ts +22 -0
- package/components/forms/flags-field.js +58 -0
- package/components/forms/form-descriptor-field-check.d.ts +18 -0
- package/components/forms/form-descriptor-field-check.js +41 -0
- package/components/forms/form-descriptor-runtime-client.js +11 -10
- package/components/forms/form-option-flags.d.ts +20 -0
- package/components/forms/form-option-flags.js +38 -0
- package/components/forms/form-provider-contract.d.ts +23 -0
- package/components/forms/form-provider-contract.js +36 -0
- package/components/forms/form-provider-registry.d.ts +5 -1
- package/components/forms/form-record-source.d.ts +38 -0
- package/components/forms/form-record-source.js +48 -0
- package/components/forms/shared-form-descriptors.d.ts +0 -34
- package/components/forms/shared-form-descriptors.js +0 -6
- package/components/forms/shared-form-ids.d.ts +1 -1
- package/components/forms/shared-form-ids.js +1 -1
- package/components/forms/shared-form-provider-registry.js +13 -0
- package/components/forms/structured-field-labels.d.ts +24 -0
- package/components/forms/structured-field-labels.js +43 -0
- package/components/forms/structured-form-field-controls.d.ts +12 -0
- package/components/forms/structured-form-field-controls.js +65 -0
- package/components/media/media-settings-labels.d.ts +1 -0
- package/components/media/media-settings-labels.js +2 -0
- package/components/media/phi-media-picker-binding.d.ts +41 -33
- package/components/media/phi-media-picker-binding.js +2 -1
- package/components/media/use-media-library-add-picker.d.ts +33 -32
- package/components/overlays/phi-overlay-container-client.js +13 -11
- package/components/regions/phi-cms-region-shell.js +2 -2
- package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
- package/components/regions/presets/phi-settings-page-shell-tree.d.ts +13 -2
- package/components/regions/presets/phi-settings-page-shell-tree.js +4 -4
- package/components/root/phi-root-theme-resolver.js +3 -0
- package/components/shell/phi-antd-icon.d.ts +1 -8
- package/components/shell/phi-antd-icon.js +1 -227
- package/components/shell/phi-icon-names.d.ts +22 -0
- package/components/shell/phi-icon-names.js +267 -0
- package/components/shell/phi-icon.d.ts +4 -15
- package/components/shell/phi-icon.js +9 -50
- package/components/tables/client/phi-table-binding-params.d.ts +24 -0
- package/components/tables/client/phi-table-binding-params.js +39 -0
- package/components/tables/client/phi-table-binding.d.ts +1 -3
- package/components/tables/client/phi-table-binding.js +5 -9
- package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
- package/components/widgets/client/shared/phi-button-icons.js +8 -12
- package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
- package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
- package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
- package/components/widgets/client/shared/phi-collection-provider.js +5 -0
- package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
- package/components/widgets/client/shared/phi-command-buttons.d.ts +29 -2
- package/components/widgets/client/shared/phi-command-buttons.js +19 -5
- package/components/widgets/client/shared/phi-rendered-value.js +27 -3
- package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
- package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
- package/components/widgets/config/background.d.ts +3 -2
- package/components/widgets/config/choice-shared.d.ts +10 -1
- package/components/widgets/config/choice-shared.js +8 -2
- package/components/widgets/label-sets/admin-locales.js +1 -1
- package/components/widgets/label-sets/admin-users.d.ts +3 -5
- package/components/widgets/label-sets/admin-users.js +6 -10
- package/components/widgets/label-sets/builder-modules.js +4 -0
- package/components/widgets/label-sets/effects.js +2 -4
- package/components/widgets/label-sets/profile.d.ts +13 -16
- package/components/widgets/label-sets/profile.js +24 -33
- package/components/widgets/label-sets/registration.d.ts +0 -1
- package/components/widgets/label-sets/registration.js +0 -2
- package/components/widgets/label-sets/revisions.js +2 -0
- package/components/widgets/label-sets/search-results.js +2 -4
- package/components/widgets/label-sets/signals.js +2 -0
- package/components/widgets/label-sets/table.js +9 -0
- package/components/widgets/label-types/builder-modules.d.ts +4 -0
- package/components/widgets/label-types/builder-modules.js +2 -0
- package/components/widgets/label-types/effects.d.ts +3 -2
- package/components/widgets/label-types/effects.js +1 -2
- package/components/widgets/label-types/revisions.d.ts +2 -0
- package/components/widgets/label-types/revisions.js +2 -1
- package/components/widgets/label-types/search-results.d.ts +2 -2
- package/components/widgets/label-types/search-results.js +1 -2
- package/components/widgets/label-types/signals.d.ts +2 -0
- package/components/widgets/label-types/signals.js +1 -0
- package/components/widgets/label-types/table.d.ts +3 -0
- package/components/widgets/label-types/table.js +2 -0
- package/components/widgets/server/builder-chrome.d.ts +4 -1
- package/components/widgets/server/builder-chrome.js +2 -2
- package/components/widgets/shared/markdown-body-client.d.ts +26 -0
- package/components/widgets/shared/markdown-body-client.js +31 -1
- package/components/widgets/shared/markdown-render.d.ts +10 -2
- package/components/widgets/shared/markdown-render.js +35 -13
- package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
- package/components/widgets/shared/widget-failure-audience.js +21 -0
- package/components/widgets/shared/widget-failure-client.js +5 -2
- package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
- package/components/widgets/shared/widget-failure-notice-client.js +10 -0
- package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
- package/components/widgets/shared/widget-failure-notice.js +17 -0
- package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
- package/components/widgets/shared/widget-failure-staff.js +18 -0
- package/components/widgets/shared/widget-failure.d.ts +9 -6
- package/components/widgets/shared/widget-failure.js +0 -9
- package/components/widgets/shared/widget-failure.server.d.ts +4 -2
- package/components/widgets/shared/widget-failure.server.js +8 -3
- package/constants/countries.d.ts +9 -0
- package/constants/countries.js +28 -0
- package/constants/customer-file.d.ts +34 -0
- package/constants/customer-file.js +35 -0
- package/constants/record-field-kinds.d.ts +15 -0
- package/constants/record-field-kinds.js +13 -0
- package/constants/runtime-module-ownership.js +15 -2
- package/constants/runtime-render-client-types.d.ts +5 -0
- package/constants/runtime-render-client-types.js +5 -0
- package/constants/site-address.d.ts +9 -0
- package/constants/site-address.js +10 -0
- package/constants/table-loading.d.ts +14 -0
- package/constants/table-loading.js +14 -0
- package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
- package/constants.d.ts +2 -0
- package/constants.js +4 -0
- package/gateway/form-handler-request.d.ts +22 -0
- package/gateway/form-handler-request.js +40 -0
- package/gateway/label-set.d.ts +15 -2
- package/gateway/label-set.js +60 -22
- package/gateway/site-cms-write-validation.js +19 -3
- package/gateway/site-form-route.js +11 -2
- package/helpers/address-field.d.ts +43 -0
- package/helpers/address-field.js +68 -0
- package/helpers/announced-action.d.ts +17 -0
- package/helpers/announced-action.js +29 -0
- package/helpers/cms-dialog.d.ts +5 -20
- package/helpers/cms-dialog.js +8 -13
- package/helpers/cms-page-catalog.d.ts +10 -0
- package/helpers/cms-page-catalog.js +19 -0
- package/helpers/cms-preset-nodes.d.ts +4 -4
- package/helpers/cms-preset-nodes.js +1 -1
- package/helpers/cms-region-keys.d.ts +1 -1
- package/helpers/country-names.d.ts +12 -0
- package/helpers/country-names.js +14 -0
- package/helpers/phi-metadata.d.ts +25 -1
- package/helpers/phi-metadata.js +53 -1
- package/helpers/phi-site-description.d.ts +11 -0
- package/helpers/phi-site-description.js +13 -0
- package/helpers/preset-form-check.d.ts +14 -0
- package/helpers/preset-form-check.js +12 -0
- package/helpers/preset-table-check.d.ts +38 -0
- package/helpers/preset-table-check.js +118 -0
- package/helpers/preset-text-source-check.d.ts +4 -1
- package/helpers/preset-text-source-check.js +6 -1
- package/helpers/preset-tree-contract-check.d.ts +3 -2
- package/helpers/preset-tree-contract-check.js +30 -5
- package/helpers/public-route-claims.d.ts +9 -1
- package/helpers/public-route-claims.js +23 -3
- package/helpers/record-fields.d.ts +1 -5
- package/helpers/record-fields.js +15 -6
- package/helpers/record-widget-binding.d.ts +10 -0
- package/helpers/record-widget-binding.js +35 -0
- package/helpers/record-widget.d.ts +1 -10
- package/helpers/record-widget.js +4 -33
- package/helpers/route-address-check.d.ts +22 -2
- package/helpers/route-address-check.js +29 -8
- package/helpers/site-address-row.d.ts +23 -0
- package/helpers/site-address-row.js +36 -0
- package/helpers/surface-style.d.ts +8 -1
- package/helpers/surface-style.js +12 -2
- package/helpers/table-widget-binding.d.ts +12 -0
- package/helpers/table-widget-binding.js +296 -0
- package/helpers/thread-inbox-row.d.ts +20 -0
- package/helpers/thread-inbox-row.js +26 -0
- package/helpers/translation-format.d.ts +26 -0
- package/helpers/translation-format.js +31 -0
- package/helpers/tree-widget-binding.d.ts +19 -0
- package/helpers/tree-widget-binding.js +72 -0
- package/helpers/typed-confirmation.d.ts +9 -0
- package/helpers/typed-confirmation.js +13 -0
- package/helpers/widget-binding-check.d.ts +22 -0
- package/helpers/widget-binding-check.js +91 -0
- package/module-labels.d.ts +1 -1
- package/module-labels.js +1 -1
- package/module-page-check.d.ts +3 -0
- package/module-page-check.js +3 -0
- package/module-records.d.ts +2 -2
- package/module-records.js +1 -0
- package/next/area-route.js +34 -1
- package/next/root-route.js +4 -4
- package/package.json +2 -2
- package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
- package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
- package/plugins/runtime-modules/accounting/data-providers.js +1 -1
- package/plugins/runtime-modules/accounting/ids.d.ts +14 -0
- package/plugins/runtime-modules/accounting/ids.js +34 -0
- package/plugins/runtime-modules/accounting/presets.js +32 -5
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +78 -0
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +136 -0
- package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +29 -0
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +450 -0
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
- package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
- package/plugins/runtime-modules/app/client-data-providers.js +9 -0
- package/plugins/runtime-modules/app/data-providers.d.ts +43 -0
- package/plugins/runtime-modules/app/data-providers.js +45 -0
- package/plugins/runtime-modules/app/definition.d.ts +60 -1
- package/plugins/runtime-modules/app/definition.js +2 -0
- package/plugins/runtime-modules/app/forms.d.ts +33 -3
- package/plugins/runtime-modules/app/forms.js +166 -31
- package/plugins/runtime-modules/app/ids.d.ts +8 -0
- package/plugins/runtime-modules/app/ids.js +9 -0
- package/plugins/runtime-modules/app/module.d.ts +60 -1
- package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
- package/plugins/runtime-modules/app/services/addresses-collection.js +105 -0
- package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +21 -0
- package/plugins/runtime-modules/app/trees/account-addresses-panel.js +143 -0
- package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +57 -0
- package/plugins/runtime-modules/app/trees/addresses-label-set.js +104 -0
- package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
- package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +28 -19
- package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -2
- package/plugins/runtime-modules/app/trees/profile-label-set.js +5 -14
- package/plugins/runtime-modules/asset/presets.d.ts +4 -0
- package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
- package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
- package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
- package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
- package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
- package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
- package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
- package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
- package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
- package/plugins/runtime-modules/blog/presets.d.ts +4 -0
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
- package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
- package/plugins/runtime-modules/builder/clients/inspector-image-field.js +6 -3
- package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
- package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
- package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
- package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
- package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
- package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
- package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
- package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
- package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
- package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
- package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
- package/plugins/runtime-modules/builder/persistence.js +4 -0
- package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
- package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
- package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +8 -1
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +47 -7
- package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
- package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
- package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
- package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
- package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
- package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
- package/plugins/runtime-modules/client-manifests/app.js +3 -0
- package/plugins/runtime-modules/client-manifests/builder.js +10 -0
- package/plugins/runtime-modules/client-manifests/common.js +6 -0
- package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
- package/plugins/runtime-modules/contracts.js +31 -1
- package/plugins/runtime-modules/core/definition.d.ts +23 -0
- package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -2
- package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
- package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
- package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
- package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +173 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
- package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
- package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
- package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
- package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
- package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
- package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
- package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
- package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
- package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
- package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
- package/plugins/runtime-modules/core/widgets/table/client.js +48 -51
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
- package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
- package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
- package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
- package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
- package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
- package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
- package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
- package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
- package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
- package/plugins/runtime-modules/descriptor-compiler.js +44 -16
- package/plugins/runtime-modules/editor/presets.d.ts +4 -0
- package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
- package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
- package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
- package/plugins/runtime-modules/localization/presets.d.ts +4 -0
- package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
- package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
- package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
- package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +9 -2
- package/plugins/runtime-modules/news/presets.d.ts +4 -0
- package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
- package/plugins/runtime-modules/resolver.js +17 -0
- package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
- package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
- package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
- package/plugins/runtime-modules/revisions/controller/client.js +86 -60
- package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
- package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
- package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
- package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
- package/plugins/runtime-modules/revisions/forms.js +1 -1
- package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
- package/plugins/runtime-modules/revisions/page-ids.js +4 -1
- package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
- package/plugins/runtime-modules/revisions/services/options.js +14 -4
- package/plugins/runtime-modules/revisions/services/table.js +54 -25
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +79 -4
- package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
- package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
- package/plugins/runtime-modules/theme/presets.d.ts +4 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +105 -7
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
- package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
- package/plugins/runtime-modules/threads/client-data-providers.js +10 -0
- package/plugins/runtime-modules/threads/controller/client.js +62 -2
- package/plugins/runtime-modules/threads/controller/definition.js +49 -1
- package/plugins/runtime-modules/threads/data-providers.d.ts +100 -2
- package/plugins/runtime-modules/threads/data-providers.js +96 -0
- package/plugins/runtime-modules/threads/definition.d.ts +100 -2
- package/plugins/runtime-modules/threads/definition.js +1 -1
- package/plugins/runtime-modules/threads/ids.d.ts +4 -0
- package/plugins/runtime-modules/threads/ids.js +5 -0
- package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
- package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
- package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
- package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
- package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +126 -0
- package/plugins/runtime-modules/threads/services/customer-file-table.js +79 -0
- package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
- package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
- package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
- package/plugins/runtime-modules/user-management/data-providers.js +101 -3
- package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
- package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
- package/plugins/runtime-modules/user-management/ids.js +9 -0
- package/plugins/runtime-modules/user-management/presets.js +17 -1
- package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
- package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +90 -0
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +122 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +181 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +24 -18
- package/server-helpers/cms-page-record.d.ts +9 -1
- package/server-helpers/cms-page-record.js +11 -1
- package/server-helpers/cms-request.js +8 -5
- package/server-helpers/link-preview-image.d.ts +30 -0
- package/server-helpers/link-preview-image.js +57 -0
- package/server-helpers/runtime.js +0 -1
- package/server-helpers/search-text.js +3 -0
- package/server-helpers.d.ts +1 -1
- package/server-helpers.js +1 -1
- package/styles/controls.css +4 -2
- package/styles/layout.css +7 -0
- package/styles/shell.css +30 -6
- package/theme/phi-antd-token-resolver.d.ts +8 -0
- package/theme/phi-antd-token-resolver.js +10 -0
- package/theme/phi-theme-color.d.ts +19 -0
- package/theme/phi-theme-color.js +42 -0
- package/theme/phi-theme-composition.js +9 -0
- package/theme/phi-theme-gradients.js +4 -22
- package/theme/phi-theme-inverse-ground.d.ts +39 -0
- package/theme/phi-theme-inverse-ground.js +103 -0
- package/theme/phi-theme-palette-defaults.d.ts +16 -0
- package/theme/phi-theme-palette-defaults.js +103 -0
- package/theme/phi-theme-tokens.d.ts +2 -1
- package/theme/phi-theme-tokens.js +2 -0
- package/types/cms-module-descriptors.d.ts +14 -0
- package/types/cms-overlay.d.ts +13 -6
- package/types/cms-overlay.js +6 -22
- package/types/cms-plugins.d.ts +20 -3
- package/types/cms.d.ts +10 -0
- package/types/collection-provider.d.ts +27 -0
- package/types/collection-signal-values.d.ts +2 -0
- package/types/collection-signal-values.js +23 -0
- package/types/collection-view-widget.d.ts +9 -0
- package/types/core-widget-placements.d.ts +9 -3
- package/types/link-preview.d.ts +19 -0
- package/types/link-preview.js +19 -0
- package/types/record-provider.d.ts +22 -1
- package/types/signals.d.ts +2 -0
- package/types/signals.js +2 -0
- package/types/site-theme.d.ts +27 -0
- package/types/table-embed.d.ts +48 -0
- package/types/table-embed.js +1 -0
- package/types/table-widget.d.ts +29 -1
- package/types/table-widget.js +0 -282
- package/types/tree-widget.d.ts +0 -1
- package/types/tree-widget.js +0 -60
- package/types/widget-runtime.d.ts +3 -1
- package/types.d.ts +2 -1
- package/types.js +1 -1
- /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ import { PhiCmsFlags, PhiCmsRegionType, PhiCmsStatus } from "../../../../constan
|
|
|
4
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
5
5
|
import { resolvePhiShellHeaderHeight } from "../../../../helpers/shell-region-style";
|
|
6
6
|
import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
|
|
7
|
-
import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress, } from "../../../../types";
|
|
7
|
+
import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress, createPhiSignalSubcontrolAddress, } from "../../../../types";
|
|
8
8
|
import { PHI_SPACE } from "../../../../theme/antd-css-var-contract";
|
|
9
9
|
import { getPhiBuilderChromeWidgetLabels } from "../../../../components/widgets/label-sets/builder-chrome";
|
|
10
10
|
import { getPhiBuilderRevisionsWidgetLabels } from "../../../../components/widgets/label-sets/revisions";
|
|
@@ -40,6 +40,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
40
40
|
getPhiBuilderRevisionsWidgetLabels(credentials),
|
|
41
41
|
]);
|
|
42
42
|
const deleteAreaOverlay = createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_OVERLAY_IDS.overlayDeleteArea);
|
|
43
|
+
// The dialog's confirm button, which stays greyed out until the Area key is typed.
|
|
44
|
+
const deleteAreaConfirm = createPhiSignalSubcontrolAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaCommands, "confirm");
|
|
43
45
|
return {
|
|
44
46
|
page: nodes.page(),
|
|
45
47
|
pageMeta: {
|
|
@@ -77,6 +79,24 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
77
79
|
valueType: "string",
|
|
78
80
|
receiver: createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaWarning),
|
|
79
81
|
},
|
|
82
|
+
{
|
|
83
|
+
routeKey: "builder-revisions-controller-delete-area-key",
|
|
84
|
+
capabilityId: "deleteAreaKey",
|
|
85
|
+
scope: "area",
|
|
86
|
+
channel: "text",
|
|
87
|
+
action: "change",
|
|
88
|
+
valueType: "string",
|
|
89
|
+
receiver: createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaKey),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
routeKey: "builder-revisions-controller-delete-area-confirm-enabled",
|
|
93
|
+
capabilityId: "deleteAreaConfirmEnabled",
|
|
94
|
+
scope: "page",
|
|
95
|
+
channel: "enabled",
|
|
96
|
+
action: "change",
|
|
97
|
+
valueType: "boolean",
|
|
98
|
+
receiver: deleteAreaConfirm,
|
|
99
|
+
},
|
|
80
100
|
{ routeKey: "builder-revisions-controller-delete-area-open", capabilityId: "deleteAreaOpen", scope: "area", channel: "dialog", action: "activate", valueType: "none", receiver: deleteAreaOverlay },
|
|
81
101
|
{ routeKey: "builder-revisions-controller-delete-area-close", capabilityId: "deleteAreaClose", scope: "area", channel: "dialog", action: "close", valueType: "none", receiver: deleteAreaOverlay },
|
|
82
102
|
{ routeKey: "builder-revisions-controller-history-reload", capabilityId: "historyReload", scope: "page", channel: "reload", action: "activate", valueType: "none", receiver: createPhiSignalAddress("cms", PHI_REVISIONS_TABLE_WIDGET_ID) },
|
|
@@ -95,7 +115,7 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
95
115
|
label: "Builder delete area",
|
|
96
116
|
config: {
|
|
97
117
|
title: revisionsLabels.deleteArea.title,
|
|
98
|
-
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
118
|
+
size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
|
|
99
119
|
/*
|
|
100
120
|
* `remount` rather than `lazy-keep`: the field is the confirmation, and a dialog that kept a
|
|
101
121
|
* half-typed Area key from the last time it was opened would carry an answer across to a
|
|
@@ -294,12 +314,41 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
294
314
|
tone: "secondary",
|
|
295
315
|
},
|
|
296
316
|
}),
|
|
317
|
+
/*
|
|
318
|
+
* The exact word to type, shown rather than described: asked for "the Area key", nobody knew its
|
|
319
|
+
* spelling or its case. The key stands on a line of its own in code type, where it is read at a
|
|
320
|
+
* glance and selected with one double click; the Controller writes it in as the dialog opens, as
|
|
321
|
+
* it does the warning, and the comparison takes it in any case (`matchesPhiTypedConfirmation`).
|
|
322
|
+
*/
|
|
297
323
|
nodes.widget({
|
|
298
|
-
typeKey: "
|
|
299
|
-
|
|
324
|
+
typeKey: "simple-text",
|
|
325
|
+
/* Label set text, translated already; a second pass would hand the translator a non-source text. */
|
|
326
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
327
|
+
id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaTypeToConfirm,
|
|
300
328
|
parentLayoutNodeId: PHI_REVISIONS_DELETE_AREA_LAYOUT_IDS.deleteAreaBody,
|
|
301
329
|
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[2].slotIndex,
|
|
302
330
|
sortOrder: 2,
|
|
331
|
+
label: "Builder delete area type to confirm",
|
|
332
|
+
config: { text: revisionsLabels.deleteArea.typeToConfirm },
|
|
333
|
+
}),
|
|
334
|
+
nodes.widget({
|
|
335
|
+
typeKey: "simple-text",
|
|
336
|
+
// A key, never words to translate.
|
|
337
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
338
|
+
id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaKey,
|
|
339
|
+
parentLayoutNodeId: PHI_REVISIONS_DELETE_AREA_LAYOUT_IDS.deleteAreaBody,
|
|
340
|
+
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[3].slotIndex,
|
|
341
|
+
sortOrder: 3,
|
|
342
|
+
label: "Builder delete area key",
|
|
343
|
+
// Never empty, for the same reason as the warning; the Controller's key replaces it.
|
|
344
|
+
config: { text: "area", marks: ["bold", "code"], fontSize: "lg" },
|
|
345
|
+
}),
|
|
346
|
+
nodes.widget({
|
|
347
|
+
typeKey: "form",
|
|
348
|
+
id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaForm,
|
|
349
|
+
parentLayoutNodeId: PHI_REVISIONS_DELETE_AREA_LAYOUT_IDS.deleteAreaBody,
|
|
350
|
+
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[4].slotIndex,
|
|
351
|
+
sortOrder: 4,
|
|
303
352
|
label: "Builder delete area form",
|
|
304
353
|
config: {
|
|
305
354
|
formId: PHI_REVISIONS_FORM_IDS.deleteArea,
|
|
@@ -321,6 +370,17 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
321
370
|
valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.formValues,
|
|
322
371
|
receiver: createPhiRevisionsControllerAddress(),
|
|
323
372
|
},
|
|
373
|
+
// The key while it is typed, so the confirm button wakes the moment it matches.
|
|
374
|
+
{
|
|
375
|
+
routeKey: "builder-delete-area-typed",
|
|
376
|
+
capabilityId: "valuesChange",
|
|
377
|
+
scope: "area",
|
|
378
|
+
channel: "deleteAreaTyped",
|
|
379
|
+
action: "change",
|
|
380
|
+
valueType: "json",
|
|
381
|
+
valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.formValues,
|
|
382
|
+
receiver: createPhiRevisionsControllerAddress(),
|
|
383
|
+
},
|
|
324
384
|
],
|
|
325
385
|
/*
|
|
326
386
|
* The footer's confirm button sends `submit` here. A route on the sender alone delivers
|
|
@@ -365,6 +425,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
365
425
|
emits: [{ capabilityId: "submit", value: null }],
|
|
366
426
|
label: revisionsLabels.deleteArea.confirm,
|
|
367
427
|
danger: true,
|
|
428
|
+
// Until the Area key is typed; the Controller switches it on (`deleteAreaConfirmEnabled`).
|
|
429
|
+
disabled: true,
|
|
368
430
|
},
|
|
369
431
|
],
|
|
370
432
|
signalRoutes: {
|
|
@@ -388,6 +450,17 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
388
450
|
receiver: createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaForm),
|
|
389
451
|
},
|
|
390
452
|
],
|
|
453
|
+
listens: [
|
|
454
|
+
{
|
|
455
|
+
routeKey: "builder-delete-area-confirm-enabled",
|
|
456
|
+
capabilityId: "enabled",
|
|
457
|
+
scope: "page",
|
|
458
|
+
channel: "enabled",
|
|
459
|
+
action: "change",
|
|
460
|
+
valueType: "boolean",
|
|
461
|
+
receiver: deleteAreaConfirm,
|
|
462
|
+
},
|
|
463
|
+
],
|
|
391
464
|
},
|
|
392
465
|
},
|
|
393
466
|
}),
|
|
@@ -396,6 +469,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
|
|
|
396
469
|
id: PHI_REVISIONS_TABLE_WIDGET_ID,
|
|
397
470
|
parentLayoutNodeId: PHI_REVISIONS_PAGE_LAYOUT_IDS.layoutContent,
|
|
398
471
|
slotIndex: 0,
|
|
472
|
+
// The Module's Label Set, translated already.
|
|
473
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
399
474
|
label: "dev revisions table",
|
|
400
475
|
config: {
|
|
401
476
|
source: {
|
|
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { PhiEmptyControl } from "../../../../../components/controls/phi-empty-control";
|
|
4
4
|
import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
|
|
5
5
|
import { PhiLink } from "../../../../../components/navigation/phi-link";
|
|
6
|
-
import {
|
|
6
|
+
import { usePhiIntlLocale } from "../../../../../components/root/phi-intl-locale";
|
|
7
|
+
import { formatPhiCountLabel, formatPhiTranslation } from "../../../../../helpers/translation-format";
|
|
7
8
|
import { PHI_SPACE } from "../../../../../theme/antd-css-var-contract";
|
|
8
9
|
function PhiSearchSnippet({ segments }) {
|
|
9
10
|
if (segments.length === 0)
|
|
@@ -18,6 +19,7 @@ function PhiSearchSnippet({ segments }) {
|
|
|
18
19
|
* answered, so a reader who arrived by a pasted link knows what they are looking at.
|
|
19
20
|
*/
|
|
20
21
|
export function PhiSearchResultsWidgetClient({ labels, config }) {
|
|
22
|
+
const locale = usePhiIntlLocale();
|
|
21
23
|
if (!config)
|
|
22
24
|
return null;
|
|
23
25
|
if (config.state === "idle") {
|
|
@@ -27,6 +29,6 @@ export function PhiSearchResultsWidgetClient({ labels, config }) {
|
|
|
27
29
|
return (_jsx(PhiTypographyControl, { type: "secondary", children: formatPhiTranslation(labels.short, [String(config.minLength)]) }));
|
|
28
30
|
}
|
|
29
31
|
const heading = config.title ?? formatPhiTranslation(labels.heading, [config.query]);
|
|
30
|
-
const count =
|
|
32
|
+
const count = formatPhiCountLabel(labels.count, config.total, locale);
|
|
31
33
|
return (_jsxs("section", { "aria-label": labels.region, style: { display: "flex", flexDirection: "column", gap: PHI_SPACE.sm }, children: [_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: PHI_SPACE.xxs }, children: [_jsx(PhiTypographyControl, { presentation: "title", level: 2, style: { marginTop: 0, marginBottom: 0 }, children: heading }), config.hits.length > 0 ? _jsx(PhiTypographyControl, { type: "secondary", children: count }) : null] }), config.hits.length === 0 ? (_jsx(PhiEmptyControl, { description: formatPhiTranslation(labels.empty, [config.query]) })) : (_jsx("ol", { style: { listStyle: "none", margin: 0, padding: 0, display: "flex", flexDirection: "column", gap: PHI_SPACE.base }, children: config.hits.map((hit) => (_jsxs("li", { style: { display: "flex", flexDirection: "column", gap: PHI_SPACE.xxs }, children: [_jsx(PhiTypographyControl, { presentation: "title", level: 3, style: { marginTop: 0, marginBottom: 0 }, children: _jsx(PhiLink, { href: hit.href, children: hit.title }) }), _jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: "0.85em" }, children: hit.href }), hit.description ? (_jsx(PhiTypographyControl, { presentation: "paragraph", style: { marginBottom: 0 }, children: hit.description })) : null, _jsx(PhiSearchSnippet, { segments: hit.snippet })] }, hit.href))) }))] }));
|
|
32
34
|
}
|
|
@@ -13,7 +13,19 @@ import { materializePhiThemeBrandLogo, materializePhiThemeBrandSignet, materiali
|
|
|
13
13
|
import { buildPhiSiteThemeSelectOptions, createPhiSiteThemeSelectionValue, createPhiThemeDerivation, ensurePhiThemeDerivation, readPhiSiteThemeSelectionState, resolvePhiThemeSelectionValue, } from "../../../../theme/phi-theme-selection";
|
|
14
14
|
import { dispatchPhiSignalCapability } from "../../../../components/runtime/runtime-signal-identity";
|
|
15
15
|
import { formatPhiHistoryMoveMessage, formatPhiHistoryTooltip, } from "../../../../components/widgets/label-types/history";
|
|
16
|
-
import { phiThemeHistory, resolvePhiThemeHistoryAction, DEFAULT_THEME_KEY, resolveThemeKey, normalizeTheme, resolveInitialTheme, resolveThemePayloadPreset, applyThemePreset, resetThemeToPreset, buildThemeReviewHref, createInitialBrandThemeState, isSameThemePayload, mergeThemeSetChoice, } from "../brand-theme-model";
|
|
16
|
+
import { phiThemeHistory, resolvePhiThemeHistoryAction, DEFAULT_THEME_KEY, resolveThemeKey, normalizeTheme, resolveInitialTheme, resolveThemePayloadPreset, applyThemePreset, resetThemeToPreset, buildThemeReviewHref, createInitialBrandThemeState, isSameThemePayload, mergeThemeSetChoice, omitThemeFields, } from "../brand-theme-model";
|
|
17
|
+
import { omitPhiThemePaletteDefaults } from "../../../../theme/phi-theme-palette-defaults";
|
|
18
|
+
/*
|
|
19
|
+
* The colours a draft states as the Theme gives them anyway are not stored: they are no decision, and
|
|
20
|
+
* kept they would read as one wherever the record is read. Dropped ahead of the save's takeover of
|
|
21
|
+
* Module blocks, which copies a Module's palette in whole again; a core palette is then simply followed.
|
|
22
|
+
*/
|
|
23
|
+
function omitThemePaletteDefaults(theme, presets) {
|
|
24
|
+
if (!theme.palette)
|
|
25
|
+
return theme;
|
|
26
|
+
const palette = omitPhiThemePaletteDefaults(resolveThemePayloadPreset(theme, presets), theme.palette, theme.style?.token ?? {});
|
|
27
|
+
return Object.keys(palette).length > 0 ? { ...theme, palette } : omitThemeFields(theme, "palette");
|
|
28
|
+
}
|
|
17
29
|
/*
|
|
18
30
|
* `correlationId` is the exchange this state belongs to: the command that saved, published or reset,
|
|
19
31
|
* or the draft another Widget asked the Controller to take. It is absent only where the Controller
|
|
@@ -323,7 +335,7 @@ export function PhiThemeControllerRuntime({ runtime, config, setOptions, history
|
|
|
323
335
|
themeKey,
|
|
324
336
|
]);
|
|
325
337
|
async function saveTheme(draftTheme = stateRef.current.draft, options) {
|
|
326
|
-
let nextTheme = ensurePhiThemeDerivation(draftTheme);
|
|
338
|
+
let nextTheme = omitThemePaletteDefaults(ensurePhiThemeDerivation(draftTheme), themePresets);
|
|
327
339
|
setSaving(true);
|
|
328
340
|
try {
|
|
329
341
|
const current = stateRef.current;
|
|
@@ -75,6 +75,10 @@ export declare const PHI_THEME_RUNTIME_MODULE_ROUTES: {
|
|
|
75
75
|
path: string;
|
|
76
76
|
landingPage?: true;
|
|
77
77
|
title: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
shareImage?: {
|
|
80
|
+
asset: string;
|
|
81
|
+
};
|
|
78
82
|
defaultPageFlags?: number;
|
|
79
83
|
loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
|
|
80
84
|
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
@@ -22,6 +22,7 @@ import { usePhiSiteFontAssets } from "../../../../../components/media/phi-site-f
|
|
|
22
22
|
import { buildPhiFontFaceCss, buildPhiFontFamilyStack } from "../../../../../theme/phi-font-face";
|
|
23
23
|
import { PHI_THEME_HEADING_FONT_VARIABLE, readPhiThemeHeadingFont, resolvePhiThemeHeadingFontFamily, } from "../../../../../theme/phi-theme-typography";
|
|
24
24
|
import { resolvePhiThemeRuntimePayload } from "../../../../../theme/phi-theme-runtime";
|
|
25
|
+
import { buildPhiThemeInverseGroundTokens } from "../../../../../theme/phi-theme-inverse-ground";
|
|
25
26
|
import { resolvePhiAntdAliasTokens } from "../../../../../theme/phi-antd-token-resolver";
|
|
26
27
|
import { buildPhiThemeStructuralTokens } from "../../../../../theme/phi-theme";
|
|
27
28
|
import { PHI_CONTROL_HEIGHTS, PHI_LAYOUT, PHI_PADDING, PHI_RADII, } from "../../../../../theme/phi-tokens";
|
|
@@ -41,7 +42,13 @@ import { normalizePhiBackgroundWidgetConfig } from "../../../../../components/wi
|
|
|
41
42
|
import { PhiMediaPickerBinding } from "../../../../../components/media/phi-media-picker-binding";
|
|
42
43
|
import { usePhiMediaPickerLabels } from "../../../../../components/media/phi-media-picker-labels";
|
|
43
44
|
import { PHI_SEARCH_WIDGET_DEFAULT_LABELS } from "../../../../../components/widgets/label-types/search";
|
|
44
|
-
import { buildPhiMediaAssetContentDeliveryUrl, PhiMediaAssetFlags, PhiMediaKind, } from "../../../../../constants/media";
|
|
45
|
+
import { buildPhiMediaAssetContentDeliveryUrl, isPhiMediaAssetPublic, PhiImageAssetVariantKey, PhiMediaAssetFlags, PhiMediaKind, } from "../../../../../constants/media";
|
|
46
|
+
import { resolvePhiImagePresentation } from "../../../../../components/media/image-presentation";
|
|
47
|
+
import { usePhiAuthoringAssetDetails } from "../../../../../components/media/use-authoring-asset-details";
|
|
48
|
+
import { PhiImageControl } from "../../../../../components/controls/phi-image-control";
|
|
49
|
+
import { resolvePhiSiteDescription } from "../../../../../helpers/phi-site-description";
|
|
50
|
+
import { omitPhiThemePaletteDefaults } from "../../../../../theme/phi-theme-palette-defaults";
|
|
51
|
+
import { readPhiXAccount } from "../../../../../types/link-preview";
|
|
45
52
|
import { PhiPresetSizeControl } from "../../../../../components/controls/phi-preset-size-control";
|
|
46
53
|
import { PhiButtonControl } from "../../../../../components/controls/phi-button-control";
|
|
47
54
|
import { PhiCheckboxControl } from "../../../../../components/controls/phi-checkbox-control";
|
|
@@ -79,9 +86,9 @@ const PHI_THEME_CHROME_SHADOW_EDGES = [
|
|
|
79
86
|
const BRAND_THEME_COLOR_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.colorCollapse.activeKey";
|
|
80
87
|
const BRAND_THEME_STYLE_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.styleCollapse.activeKey";
|
|
81
88
|
const BRAND_THEME_BACKGROUND_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.backgroundCollapse.activeKey";
|
|
82
|
-
const BRAND_THEME_BACKGROUND_SECTION_KEYS = ["root", "chrome", "shadow"];
|
|
89
|
+
const BRAND_THEME_BACKGROUND_SECTION_KEYS = ["root", "chrome", "inverse", "shadow"];
|
|
83
90
|
const BRAND_THEME_IDENTITY_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.identityCollapse.activeKey";
|
|
84
|
-
const BRAND_THEME_IDENTITY_SECTION_KEYS = ["logo", "wordmark", "lines"];
|
|
91
|
+
const BRAND_THEME_IDENTITY_SECTION_KEYS = ["logo", "wordmark", "lines", "share"];
|
|
85
92
|
const BRAND_THEME_STYLE_SECTION_KEYS = [
|
|
86
93
|
"shapes",
|
|
87
94
|
"buttonShadow",
|
|
@@ -487,6 +494,7 @@ function resolveBrandDraftAliasTokens(resolvedTheme, preset, mode, fonts = {}) {
|
|
|
487
494
|
}),
|
|
488
495
|
...buildPhiThemeLinkTokens(resolvedTheme.links),
|
|
489
496
|
...buildPhiSurfaceShadowTokens(resolvedTheme.shadows, mode),
|
|
497
|
+
...buildPhiThemeInverseGroundTokens(resolvedTheme.root?.inverse, mode, aliasTokens),
|
|
490
498
|
};
|
|
491
499
|
}
|
|
492
500
|
function readEffectiveTokenNumber(token, key, fallback) {
|
|
@@ -543,6 +551,22 @@ function mergeThemeRootSurface(theme, surface, mode, value) {
|
|
|
543
551
|
},
|
|
544
552
|
};
|
|
545
553
|
}
|
|
554
|
+
/**
|
|
555
|
+
* One mode's Inverse Ground set, the other mode's kept. Opaque by construction: the picker offers no
|
|
556
|
+
* alpha, and the Theme's reader refuses a colour with any.
|
|
557
|
+
*/
|
|
558
|
+
function mergeThemeInverseGround(theme, mode, value) {
|
|
559
|
+
return {
|
|
560
|
+
...theme,
|
|
561
|
+
root: {
|
|
562
|
+
...(theme.root ?? {}),
|
|
563
|
+
inverse: {
|
|
564
|
+
...(theme.root?.inverse ?? {}),
|
|
565
|
+
[mode]: value,
|
|
566
|
+
},
|
|
567
|
+
},
|
|
568
|
+
};
|
|
569
|
+
}
|
|
546
570
|
function mergeThemeChromeShadow(theme, family, value) {
|
|
547
571
|
return {
|
|
548
572
|
...theme,
|
|
@@ -1023,11 +1047,17 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
|
|
|
1023
1047
|
const selectedPreset = resolveThemePayloadPreset(state.draft, themePresets);
|
|
1024
1048
|
/*
|
|
1025
1049
|
* What the tab shows is what the Site renders: the palette block with the draft's palette on top,
|
|
1026
|
-
* resolved for the mode being edited. The seeds the author owns are the ones
|
|
1027
|
-
*
|
|
1050
|
+
* resolved for the mode being edited. The seeds the author owns are the ones the draft's palette
|
|
1051
|
+
* states, shared or under this mode, other than the Theme gives them; the derived overrides live
|
|
1052
|
+
* under this mode alone.
|
|
1028
1053
|
*/
|
|
1029
1054
|
const colorToken = resolvePhiThemeColorTokens(selectedPreset, state.draft.palette, previewMode);
|
|
1030
|
-
|
|
1055
|
+
/*
|
|
1056
|
+
* What the author owns is what changes something: a colour the draft states exactly as the Theme
|
|
1057
|
+
* gives it -- a Module palette taken over on save, a picker put back on the Theme's value -- is no
|
|
1058
|
+
* decision of theirs, offers no reset, and is not stored on the next save.
|
|
1059
|
+
*/
|
|
1060
|
+
const ownPalette = omitPhiThemePaletteDefaults(selectedPreset, state.draft.palette, buildPhiEffectiveNonColorThemeTokens(state.draft));
|
|
1031
1061
|
const ownOverrides = ownPalette.modes?.[previewMode]?.overrides ?? {};
|
|
1032
1062
|
/*
|
|
1033
1063
|
* The same colour without the author's derived overrides: what a derived control falls back to, and
|
|
@@ -1475,6 +1505,9 @@ function clearThemeRootSurface(theme, surface, mode) {
|
|
|
1475
1505
|
if (surface === "background") {
|
|
1476
1506
|
return { ...theme, root: { ...root, background: without(root.background, mode) } };
|
|
1477
1507
|
}
|
|
1508
|
+
if (surface === "inverse") {
|
|
1509
|
+
return { ...theme, root: { ...root, inverse: without(root.inverse, mode) } };
|
|
1510
|
+
}
|
|
1478
1511
|
return {
|
|
1479
1512
|
...theme,
|
|
1480
1513
|
root: { ...root, chrome: without(root.chrome, surface === "shadow" ? "shadow" : mode) },
|
|
@@ -1583,6 +1616,21 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
|
|
|
1583
1616
|
});
|
|
1584
1617
|
const [activeIdentitySection, changeActiveIdentitySection] = usePhiBrandAccordionSection(BRAND_THEME_IDENTITY_COLLAPSE_STORAGE_KEY, BRAND_THEME_IDENTITY_SECTION_KEYS);
|
|
1585
1618
|
const brand = state.draft.brand ?? {};
|
|
1619
|
+
/*
|
|
1620
|
+
* The link preview's picture as a shared link shows it: the Asset's share variant (1200 x 630, cut
|
|
1621
|
+
* around its focus), drawn the way every picture of the house is drawn. The Asset's facts give the
|
|
1622
|
+
* variant's version and the alt text the head falls back to.
|
|
1623
|
+
*/
|
|
1624
|
+
const shareImageId = brand.shareImage?.assetId ?? null;
|
|
1625
|
+
const shareAsset = usePhiAuthoringAssetDetails(shareImageId);
|
|
1626
|
+
const shareImagePresentation = shareImageId == null ? null : resolvePhiImagePresentation({
|
|
1627
|
+
sourceKind: "asset",
|
|
1628
|
+
assetId: shareImageId,
|
|
1629
|
+
variantKey: PhiImageAssetVariantKey.Share,
|
|
1630
|
+
variantVersion: shareAsset?.variantVersion ?? null,
|
|
1631
|
+
deliveryRevision: shareAsset?.deliveryRevision ?? null,
|
|
1632
|
+
originalUrl: shareAsset?.deliveryUrl?.trim() || buildPhiMediaAssetContentDeliveryUrl(shareImageId),
|
|
1633
|
+
});
|
|
1586
1634
|
/*
|
|
1587
1635
|
* The Logo shows what the Site draws, which is the Set's wherever the record says nothing about the
|
|
1588
1636
|
* mode. Picking one takes the mode over; the reset hands it back to the Set.
|
|
@@ -1741,6 +1789,31 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
|
|
|
1741
1789
|
"--phi-labeled-control-width": "100%",
|
|
1742
1790
|
}, children: [_jsx(PhiBrandLineFields, { label: "Slogan", placeholder: "What the Site says about itself", fallbackIcon: "antd:star", line: brand.slogan, onChange: (next) => publishDraft(mergeThemeBrand(state.draft, { slogan: next })) }), _jsx(PhiBrandLineFields, { label: "Location", placeholder: "Where the Site says it is", fallbackIcon: "antd:location", line: brand.location, onChange: (next) => publishDraft(mergeThemeBrand(state.draft, { location: next })) })] })),
|
|
1743
1791
|
},
|
|
1792
|
+
{
|
|
1793
|
+
/*
|
|
1794
|
+
* What a link to the Site shows in a messenger or a feed where the Page says nothing of its
|
|
1795
|
+
* own (NEXT_INTEGRATION.md, "Link previews"). Only a picture every visitor is served can be
|
|
1796
|
+
* shown there, so the picker offers the Site Space and greys out the rest.
|
|
1797
|
+
*/
|
|
1798
|
+
key: "share",
|
|
1799
|
+
label: _jsx(PhiTypographyControl, { strong: true, children: "Link preview" }),
|
|
1800
|
+
children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, style: {
|
|
1801
|
+
"--phi-labeled-control-label-width": "33.333333%",
|
|
1802
|
+
"--phi-labeled-control-width": "100%",
|
|
1803
|
+
}, children: [_jsx(PhiTypographyControl, { type: "secondary", children: "The picture a shared link shows where its Page states none, cut to 1200 x 630 around its focus. Only a publicly delivered picture can be chosen." }), shareImagePresentation?.url ? (_jsx(PhiCardControl, { size: "small", padding: clientToken.paddingXS, cover: (_jsx(PhiImageControl, { presentation: shareImagePresentation, source: "asset", alt: brand.shareImage?.alt || shareAsset?.altText || "Link preview picture", width: 1200, height: 630, blurDataUrl: shareAsset?.blurDataUrl ?? null, sizes: "400px" })), children: _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXXS, style: { minWidth: 0 }, children: [runtime.site.hostname ? (_jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: clientToken.fontSizeSM }, children: runtime.site.hostname })) : null, _jsx(PhiTypographyControl, { strong: true, children: runtime.site.name || "Page title" }), _jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: clientToken.fontSizeSM }, children: resolvePhiSiteDescription(brand.slogan?.label) })] }) })) : null, _jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingXS, style: { minWidth: 0 }, children: [_jsx("div", { style: { flex: "1 1 auto", minWidth: 0 }, children: _jsx(PhiMediaPickerBinding, { config: {
|
|
1804
|
+
mediaType: PhiMediaKind.Image,
|
|
1805
|
+
pageSize: 12,
|
|
1806
|
+
showPagination: true,
|
|
1807
|
+
showGroupFilter: true,
|
|
1808
|
+
showSearchBar: true,
|
|
1809
|
+
}, labels: mediaPickerLabels, searchLabels: PHI_SEARCH_WIDGET_DEFAULT_LABELS, siteSpaceOnly: true, isAssetSelectable: (asset) => isPhiMediaAssetPublic(asset.deliveryPolicy, asset.lifecycleStatus), value: brand.shareImage?.assetId ?? null, onAssetSelect: (asset) => publishDraft(mergeThemeBrand(state.draft, {
|
|
1810
|
+
shareImage: { assetId: asset.id, ...(brand.shareImage?.alt ? { alt: brand.shareImage.alt } : {}) },
|
|
1811
|
+
})), onAssetClear: () => publishDraft(mergeThemeBrand(state.draft, { shareImage: null })) }) }), brand.shareImage ? (_jsx(PhiButtonControl, { size: "small", type: "link", style: { flexShrink: 0, paddingInline: 0 }, onClick: () => publishDraft(mergeThemeBrand(state.draft, { shareImage: null })), label: "Remove" })) : null] }), _jsx(PhiLabeledControl, { label: "Alt", fill: true, children: _jsx(PhiTextControl, { value: brand.shareImage?.alt ?? "", placeholder: shareAsset?.altText || "Alt text", ariaLabel: "Link preview alt text", allowClear: false, disabled: !brand.shareImage, onChange: (next) => brand.shareImage && publishDraft(mergeThemeBrand(state.draft, {
|
|
1812
|
+
shareImage: next?.trim()
|
|
1813
|
+
? { assetId: brand.shareImage.assetId, alt: next }
|
|
1814
|
+
: { assetId: brand.shareImage.assetId },
|
|
1815
|
+
})) }) }), _jsx(PhiLabeledControl, { label: "X account", fill: true, children: _jsx(PhiTextControl, { value: brand.xAccount ?? "", placeholder: "@account", ariaLabel: "X account", allowClear: false, onChange: (next) => publishDraft(mergeThemeBrand(state.draft, { xAccount: next?.trim() ?? "" })) }) }), brand.xAccount && !readPhiXAccount(brand.xAccount) ? (_jsx(PhiTypographyControl, { type: "danger", children: "An X account is @ and up to 15 letters, digits or underscores. This one is not stated." })) : null] })),
|
|
1816
|
+
},
|
|
1744
1817
|
] }) }) }));
|
|
1745
1818
|
}
|
|
1746
1819
|
/**
|
|
@@ -1751,12 +1824,29 @@ function isSamePhiBackgroundConfig(left, right) {
|
|
|
1751
1824
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
1752
1825
|
}
|
|
1753
1826
|
export function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime, config, }) {
|
|
1754
|
-
const { token: clientToken } = usePhiConfig();
|
|
1827
|
+
const { presets: themePresets, token: clientToken } = usePhiConfig();
|
|
1755
1828
|
const themeBlocks = usePhiThemeBlockCatalog();
|
|
1756
1829
|
const themeKey = resolveThemeKey(config);
|
|
1757
1830
|
const { state, publishDraft, editTransaction } = usePhiBrandThemeDraft(runtime, themeKey);
|
|
1758
1831
|
const mode = usePhiBrandPreviewMode(resolveThemePayloadMode(state.draft), config?.signalRoutes);
|
|
1759
1832
|
const composition = resolvePhiThemeComposition(state.draft, themeBlocks);
|
|
1833
|
+
/*
|
|
1834
|
+
* The Inverse Ground the mode being authored paints, as the live render resolves it: the stated colour,
|
|
1835
|
+
* else the mode's own container ground. The control shows that, so an author sees what an inverse box
|
|
1836
|
+
* stands on before anybody stated one.
|
|
1837
|
+
*/
|
|
1838
|
+
const inverseGround = useMemo(() => {
|
|
1839
|
+
const resolvedDraft = resolvePhiThemeRuntimePayload(state.draft, themeBlocks).theme;
|
|
1840
|
+
return String(resolveBrandDraftAliasTokens(resolvedDraft, resolveThemePayloadPreset(resolvedDraft, themePresets), mode).inverseGround);
|
|
1841
|
+
}, [mode, state.draft, themeBlocks, themePresets]);
|
|
1842
|
+
const inverseGroundCustomColors = useMemo(() => {
|
|
1843
|
+
const palette = resolveThemeCustomPalette(state.draft, resolveThemePayloadPreset(state.draft, themePresets), mode);
|
|
1844
|
+
return PHI_THEME_CUSTOM_COLOR_KEYS.map((key, index) => ({ key, label: `Custom ${index + 1}`, value: palette[key] }));
|
|
1845
|
+
}, [mode, state.draft, themePresets]);
|
|
1846
|
+
const inverseGroundPresets = usePhiColorControlPresets({
|
|
1847
|
+
customColors: inverseGroundCustomColors,
|
|
1848
|
+
presets: PHI_COLOR_PICKER_PRESETS,
|
|
1849
|
+
});
|
|
1760
1850
|
const [activeBackgroundSection, changeActiveBackgroundSection] = usePhiBrandAccordionSection(BRAND_THEME_BACKGROUND_COLLAPSE_STORAGE_KEY, BRAND_THEME_BACKGROUND_SECTION_KEYS);
|
|
1761
1851
|
const modeLabel = mode === "dark" ? "Dark mode" : "Light mode";
|
|
1762
1852
|
const otherMode = mode === "dark" ? "light" : "dark";
|
|
@@ -1785,6 +1875,14 @@ export function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime, config,
|
|
|
1785
1875
|
label: _jsx(PhiTypographyControl, { strong: true, children: "Chrome Overlay" }),
|
|
1786
1876
|
children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingXS, children: [_jsxs(PhiTypographyControl, { type: "secondary", children: [modeLabel, ". Shared by the Header, Sider and Footer Regions. Content and Hero never take it, and a Region that authors its own Background or Effect paints over it."] }), _jsxs(PhiFlexControl, { vertical: true, align: "stretch", gap: clientToken.paddingXXS, style: { flexShrink: 0 }, children: [_jsx(PhiBrandBlockResetButton, { disabled: state.draft.root?.chrome?.[mode] == null, blockTitle: composition.ground.title, onReset: () => publishDraft(clearThemeRootSurface(state.draft, "chrome", mode)) }), _jsx(PhiBrandCopyModeButton, { mode: mode, disabled: isSamePhiBackgroundConfig(chromeOverlay, otherChromeOverlay), onCopy: () => publishDraft(mergeThemeRootSurface(state.draft, "chrome", otherMode, chromeOverlay)) })] })] }), _jsx(PhiBackgroundControl, { value: chromeOverlay, motionModes: PHI_SHELL_CHROME_OVERLAY_MOTION_MODES, filters: PHI_SHELL_CHROME_OVERLAY_FILTERS, baseKinds: PHI_SHELL_CHROME_OVERLAY_BASE_KINDS, imageSourceKinds: PHI_SHELL_CHROME_OVERLAY_IMAGE_SOURCE_KINDS, renderMediaPicker: renderPhiThemeRootBackgroundMediaPicker, editTransaction: editTransaction, onChange: (value) => publishDraft(mergeThemeRootSurface(state.draft, "chrome", mode, value)) }, `chrome-${mode}`)] })),
|
|
1787
1877
|
},
|
|
1878
|
+
{
|
|
1879
|
+
key: "inverse",
|
|
1880
|
+
label: _jsx(PhiTypographyControl, { strong: true, children: "Inverse Ground" }),
|
|
1881
|
+
children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingXS, children: [_jsxs(PhiTypographyControl, { type: "secondary", children: [modeLabel, ". What a Surface toned Inverse stands on when it is drawn in this mode, on a page in the other one. Always opaque; unset, it is this mode's container colour."] }), _jsx(PhiBrandBlockResetButton, { disabled: state.draft.root?.inverse?.[mode] == null, blockTitle: composition.ground.title, onReset: () => publishDraft(clearThemeRootSurface(state.draft, "inverse", mode)) })] }), _jsx(PhiColorControl, { mode: "single", disabledAlpha: true, value: inverseGround, presets: inverseGroundPresets, onChange: (next) => {
|
|
1882
|
+
if (next)
|
|
1883
|
+
publishDraft(mergeThemeInverseGround(state.draft, mode, next));
|
|
1884
|
+
} }, `inverse-${mode}`)] })),
|
|
1885
|
+
},
|
|
1788
1886
|
{
|
|
1789
1887
|
key: "shadow",
|
|
1790
1888
|
label: _jsx(PhiTypographyControl, { strong: true, children: "Chrome Shadow" }),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PhiCmsWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import type { PhiControlSignalConfig } from "../../../../../components/widgets/config/control-signal-config";
|
|
3
|
+
/** Routes only: a panel listens and never emits, so it has no signal identity of its own. */
|
|
4
|
+
export type PhiBuilderBrandWidgetConfig = Pick<PhiControlSignalConfig, "signalRoutes"> & {
|
|
4
5
|
themeKey?: string;
|
|
5
6
|
};
|
|
6
7
|
type PhiBuilderBrandWidgetDefinition = Pick<PhiCmsWidgetPlugin<PhiBuilderBrandWidgetConfig>, "kind" | "pluginKey" | "typeKey" | "title" | "description" | "category" | "iconFamily" | "runtimeSignals" | "requiredDataProviders" | "slotSizePolicy" | "fields" | "parseConfig">;
|
|
@@ -2,7 +2,7 @@ import { PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS } from "../../../../../constants/m
|
|
|
2
2
|
import { PHI_THEME_SIGNAL_CHANNELS } from "../../../../../plugins/runtime-modules/theme/controller/signals";
|
|
3
3
|
import { createPhiCmsWidgetDefinition } from "../../../../../components/widgets/config/helpers";
|
|
4
4
|
import { readString } from "../../../../../components/widgets/config/parser-primitives";
|
|
5
|
-
import {
|
|
5
|
+
import { readPhiSignalRouteSet } from "../../../../../types/signals";
|
|
6
6
|
function parseBuilderBrandWidgetConfig(config) {
|
|
7
7
|
return {
|
|
8
8
|
/*
|
|
@@ -10,7 +10,7 @@ function parseBuilderBrandWidgetConfig(config) {
|
|
|
10
10
|
* wrote, so a route an author adds in the Builder works as well. The parser dropped them once and
|
|
11
11
|
* the panels listened to a hard-coded broadcast, which left the declared input decoration.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
signalRoutes: readPhiSignalRouteSet(config.signalRoutes),
|
|
14
14
|
themeKey: readString(config.themeKey),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
@@ -1,30 +1,42 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../../components/widgets/label-sets/runtime-options";
|
|
3
|
-
import { PhiBuilderBrandBackgroundControlsWidgetClient, PhiBuilderBrandIdentityControlsWidgetClient, PhiBuilderBrandStyleControlsWidgetClient, PhiBuilderBrandThemeControlsWidgetClient, PhiBuilderBrandThemePreviewWidgetClient, } from "./client";
|
|
4
3
|
import { PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION, } from "./config";
|
|
5
4
|
import { getPhiColorPickerLabels } from "../../../../../components/widgets/label-sets/color-picker";
|
|
6
5
|
import { getPhiMediaWidgetLabels } from "../../../../../components/media/label-sets/media";
|
|
7
6
|
import { PhiMediaPickerLabelsProvider } from "../../../../../components/media/phi-media-picker-labels";
|
|
7
|
+
import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
|
|
8
|
+
import { PhiRuntimeRenderClientType } from "../../../../../constants/runtime-render-client-types";
|
|
9
|
+
/*
|
|
10
|
+
* The five panels of the Theme workspace are Render Clients the Builder's Client manifest loads when one is
|
|
11
|
+
* drawn (`client-manifests/builder.tsx`), not Client components this server half imports: an import here
|
|
12
|
+
* put the whole workspace (`./client`, some 180 kB of source with what it reaches) into every Builder
|
|
13
|
+
* route's client graph, the dashboard's included, because a server-side `import()` defers nothing for the
|
|
14
|
+
* browser (TODOS.md, "The Builder got heavier").
|
|
15
|
+
*/
|
|
8
16
|
export const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_PLUGIN = {
|
|
9
17
|
...PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION,
|
|
10
|
-
render: async ({ runtime, config }) => (_jsx(
|
|
18
|
+
render: async ({ runtime, config }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandThemeControls, componentProps: {
|
|
19
|
+
runtime,
|
|
20
|
+
config,
|
|
21
|
+
colorPickerLabels: await getPhiColorPickerLabels(buildPhiWidgetLabelTranslatorOptions(runtime)),
|
|
22
|
+
} })),
|
|
11
23
|
};
|
|
12
24
|
export const PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_PLUGIN = {
|
|
13
25
|
...PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION,
|
|
14
|
-
render: ({ runtime, config }) => _jsx(
|
|
15
|
-
renderPreview: ({ runtime }) => _jsx(
|
|
26
|
+
render: ({ runtime, config }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandThemePreview, componentProps: { runtime, config } })),
|
|
27
|
+
renderPreview: ({ runtime }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandThemePreview, componentProps: { runtime } })),
|
|
16
28
|
};
|
|
17
29
|
export const PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_PLUGIN = {
|
|
18
30
|
...PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION,
|
|
19
|
-
render: ({ runtime, config }) => _jsx(
|
|
31
|
+
render: ({ runtime, config }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandStyleControls, componentProps: { runtime, config } })),
|
|
20
32
|
};
|
|
21
33
|
export const PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_PLUGIN = {
|
|
22
34
|
...PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION,
|
|
23
35
|
// The picker the Background Control opens says its words in the reader's language.
|
|
24
|
-
render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(
|
|
36
|
+
render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandBackgroundControls, componentProps: { runtime, config } }) })),
|
|
25
37
|
};
|
|
26
38
|
export const PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_PLUGIN = {
|
|
27
39
|
...PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION,
|
|
28
40
|
// The picker the Logo field opens says its words in the reader's language.
|
|
29
|
-
render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(
|
|
41
|
+
render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandIdentityControls, componentProps: { runtime, config } }) })),
|
|
30
42
|
};
|
|
@@ -6,4 +6,14 @@ export const PHI_THREADS_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS = [
|
|
|
6
6
|
ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
|
|
7
7
|
loadLive: async () => (await import("./services/options")).PhiThreadCandidatesOptionsProviderClient,
|
|
8
8
|
},
|
|
9
|
+
{
|
|
10
|
+
key: PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFile,
|
|
11
|
+
ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
|
|
12
|
+
loadLive: async () => (await import("./services/customer-file-table")).PhiThreadsCustomerFileTableProviderClient,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFileAddresses,
|
|
16
|
+
ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
|
|
17
|
+
loadLive: async () => (await import("./services/customer-file-addresses")).PhiThreadsCustomerFileAddressesProviderClient,
|
|
18
|
+
},
|
|
9
19
|
];
|