@phis/ui 0.7.7 → 0.8.0
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/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 +64 -9
- 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-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/forms/extended-form-field-controls.d.ts +1 -1
- package/components/forms/extended-form-field-controls.js +23 -7
- package/components/forms/flags-field.d.ts +22 -0
- package/components/forms/flags-field.js +58 -0
- 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 +28 -0
- package/components/forms/form-provider-contract.js +45 -2
- package/components/forms/form-provider-registry.d.ts +11 -1
- package/components/forms/money-field-currency-key.d.ts +6 -0
- package/components/forms/money-field-currency-key.js +14 -0
- package/components/forms/money-field.d.ts +26 -3
- package/components/forms/money-field.js +54 -4
- 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/overlays/phi-overlay-container-client.js +2 -2
- 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/navigation-redirect.d.ts +4 -1
- package/components/regions/presets/navigation-redirect.js +6 -3
- package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
- package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
- 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 +19 -0
- package/components/shell/phi-icon-names.js +264 -0
- package/components/shell/phi-icon.d.ts +2 -11
- package/components/shell/phi-icon.js +4 -32
- package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
- package/components/widgets/client/shared/phi-command-buttons.js +10 -4
- package/components/widgets/client/shared/phi-rendered-value.js +32 -6
- 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 +2 -5
- package/components/widgets/label-sets/admin-users.js +4 -10
- package/components/widgets/label-sets/effects.js +2 -4
- package/components/widgets/label-sets/profile.d.ts +13 -0
- package/components/widgets/label-sets/profile.js +28 -0
- package/components/widgets/label-sets/search-results.js +2 -4
- package/components/widgets/label-sets/table.js +9 -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/search-results.d.ts +2 -2
- package/components/widgets/label-types/search-results.js +1 -2
- 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/constants/countries.d.ts +9 -0
- package/constants/countries.js +28 -0
- package/constants/customer-file.d.ts +25 -0
- package/constants/customer-file.js +26 -0
- package/constants/record-field-kinds.d.ts +15 -0
- package/constants/record-field-kinds.js +13 -0
- package/constants/runtime-module-ownership.js +12 -0
- package/constants/runtime-render-client-types.d.ts +5 -0
- package/constants/runtime-render-client-types.js +5 -0
- package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
- package/constants.d.ts +1 -0
- package/constants.js +2 -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-form-route.js +11 -2
- package/helpers/address-field.d.ts +43 -0
- package/helpers/address-field.js +68 -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/money-amount.d.ts +7 -0
- package/helpers/money-amount.js +15 -0
- package/helpers/phi-metadata.d.ts +33 -1
- package/helpers/phi-metadata.js +62 -1
- package/helpers/preset-table-check.d.ts +34 -0
- package/helpers/preset-table-check.js +124 -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/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/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/module-labels.d.ts +1 -1
- package/module-labels.js +1 -1
- package/module-page-check.d.ts +1 -0
- package/module-page-check.js +1 -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 -5
- 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 +11 -0
- package/plugins/runtime-modules/accounting/ids.js +23 -0
- package/plugins/runtime-modules/accounting/presets.js +32 -5
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -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 +26 -0
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -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 +98 -0
- package/plugins/runtime-modules/app/data-providers.js +80 -0
- package/plugins/runtime-modules/app/definition.d.ts +131 -0
- package/plugins/runtime-modules/app/definition.js +2 -0
- package/plugins/runtime-modules/app/forms.d.ts +46 -1
- package/plugins/runtime-modules/app/forms.js +195 -1
- package/plugins/runtime-modules/app/ids.d.ts +7 -0
- package/plugins/runtime-modules/app/ids.js +8 -0
- package/plugins/runtime-modules/app/module.d.ts +131 -0
- package/plugins/runtime-modules/app/presets.js +3 -6
- package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
- package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
- package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
- package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
- package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
- package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
- package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.d.ts +3 -6
- package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +4 -7
- package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
- package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
- package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
- package/plugins/runtime-modules/asset/presets.d.ts +4 -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-image-field.d.ts +2 -1
- package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
- 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/client.d.ts +5 -5
- package/plugins/runtime-modules/builder/controller/client.js +2 -1
- package/plugins/runtime-modules/builder/controller/definition.d.ts +4 -4
- package/plugins/runtime-modules/builder/controller/definition.js +7 -0
- package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +3 -1
- package/plugins/runtime-modules/builder/controller/draft-command-controller.js +2 -1
- package/plugins/runtime-modules/builder/controller/draft-status-controller.js +72 -18
- package/plugins/runtime-modules/builder/controller/server-definition.d.ts +4 -4
- package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +3 -1
- package/plugins/runtime-modules/builder/controller/workspace-controller.js +8 -10
- package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +10 -0
- package/plugins/runtime-modules/builder/developer-workspace-store.js +35 -1
- package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
- package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +6 -0
- package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -6
- 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.d.ts +4 -1
- package/plugins/runtime-modules/builder/persistence.js +14 -3
- package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
- package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
- 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/content-entry-routes.d.ts +4 -0
- package/plugins/runtime-modules/contracts.js +31 -1
- package/plugins/runtime-modules/core/definition.d.ts +28 -0
- package/plugins/runtime-modules/core/form-providers.d.ts +28 -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 +0 -1
- 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/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/dimension/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/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/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/simple-text/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
- package/plugins/runtime-modules/core/widgets/spacer/client.js +3 -3
- package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
- package/plugins/runtime-modules/core/widgets/table/config.js +6 -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/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/phi-default-admin-locales-page-tree.js +3 -1
- package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -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/phi-default-site-area-preset-tree.js +46 -39
- package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
- package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
- package/plugins/runtime-modules/resolver.js +17 -0
- package/plugins/runtime-modules/revisions/controller/client.js +50 -46
- 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/presets.d.ts +4 -0
- package/plugins/runtime-modules/revisions/services/table.js +16 -5
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
- package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
- package/plugins/runtime-modules/theme/presets.d.ts +4 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
- 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 +5 -0
- package/plugins/runtime-modules/threads/controller/definition.js +1 -1
- package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
- package/plugins/runtime-modules/threads/data-providers.js +85 -0
- package/plugins/runtime-modules/threads/definition.d.ts +115 -2
- package/plugins/runtime-modules/threads/definition.js +1 -1
- package/plugins/runtime-modules/threads/ids.d.ts +2 -0
- package/plugins/runtime-modules/threads/ids.js +3 -0
- package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
- package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -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 +86 -0
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -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 +166 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -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/search-text.js +3 -0
- package/server-helpers.d.ts +1 -1
- package/server-helpers.js +1 -1
- package/styles/builder-scaffold.css +7 -1
- package/styles/layout-authoring-scaffold.css +27 -0
- package/styles/shell.css +30 -6
- package/theme/phi-theme-composition.js +9 -0
- package/theme/phi-theme-inverse-ground.d.ts +39 -0
- package/theme/phi-theme-inverse-ground.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 +14 -2
- package/types/cms.d.ts +10 -0
- package/types/core-widget-placements.d.ts +3 -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/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 +14 -0
- package/types/widget-runtime.d.ts +3 -0
- package/types.d.ts +1 -0
- /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
|
@@ -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,8 @@ 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, PhiMediaAssetFlags, PhiMediaKind, } from "../../../../../constants/media";
|
|
46
|
+
import { readPhiXAccount } from "../../../../../types/link-preview";
|
|
45
47
|
import { PhiPresetSizeControl } from "../../../../../components/controls/phi-preset-size-control";
|
|
46
48
|
import { PhiButtonControl } from "../../../../../components/controls/phi-button-control";
|
|
47
49
|
import { PhiCheckboxControl } from "../../../../../components/controls/phi-checkbox-control";
|
|
@@ -79,9 +81,9 @@ const PHI_THEME_CHROME_SHADOW_EDGES = [
|
|
|
79
81
|
const BRAND_THEME_COLOR_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.colorCollapse.activeKey";
|
|
80
82
|
const BRAND_THEME_STYLE_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.styleCollapse.activeKey";
|
|
81
83
|
const BRAND_THEME_BACKGROUND_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.backgroundCollapse.activeKey";
|
|
82
|
-
const BRAND_THEME_BACKGROUND_SECTION_KEYS = ["root", "chrome", "shadow"];
|
|
84
|
+
const BRAND_THEME_BACKGROUND_SECTION_KEYS = ["root", "chrome", "inverse", "shadow"];
|
|
83
85
|
const BRAND_THEME_IDENTITY_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.identityCollapse.activeKey";
|
|
84
|
-
const BRAND_THEME_IDENTITY_SECTION_KEYS = ["logo", "wordmark", "lines"];
|
|
86
|
+
const BRAND_THEME_IDENTITY_SECTION_KEYS = ["logo", "wordmark", "lines", "share"];
|
|
85
87
|
const BRAND_THEME_STYLE_SECTION_KEYS = [
|
|
86
88
|
"shapes",
|
|
87
89
|
"buttonShadow",
|
|
@@ -487,6 +489,7 @@ function resolveBrandDraftAliasTokens(resolvedTheme, preset, mode, fonts = {}) {
|
|
|
487
489
|
}),
|
|
488
490
|
...buildPhiThemeLinkTokens(resolvedTheme.links),
|
|
489
491
|
...buildPhiSurfaceShadowTokens(resolvedTheme.shadows, mode),
|
|
492
|
+
...buildPhiThemeInverseGroundTokens(resolvedTheme.root?.inverse, mode, aliasTokens),
|
|
490
493
|
};
|
|
491
494
|
}
|
|
492
495
|
function readEffectiveTokenNumber(token, key, fallback) {
|
|
@@ -543,6 +546,22 @@ function mergeThemeRootSurface(theme, surface, mode, value) {
|
|
|
543
546
|
},
|
|
544
547
|
};
|
|
545
548
|
}
|
|
549
|
+
/**
|
|
550
|
+
* One mode's Inverse Ground set, the other mode's kept. Opaque by construction: the picker offers no
|
|
551
|
+
* alpha, and the Theme's reader refuses a colour with any.
|
|
552
|
+
*/
|
|
553
|
+
function mergeThemeInverseGround(theme, mode, value) {
|
|
554
|
+
return {
|
|
555
|
+
...theme,
|
|
556
|
+
root: {
|
|
557
|
+
...(theme.root ?? {}),
|
|
558
|
+
inverse: {
|
|
559
|
+
...(theme.root?.inverse ?? {}),
|
|
560
|
+
[mode]: value,
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
};
|
|
564
|
+
}
|
|
546
565
|
function mergeThemeChromeShadow(theme, family, value) {
|
|
547
566
|
return {
|
|
548
567
|
...theme,
|
|
@@ -1475,6 +1494,9 @@ function clearThemeRootSurface(theme, surface, mode) {
|
|
|
1475
1494
|
if (surface === "background") {
|
|
1476
1495
|
return { ...theme, root: { ...root, background: without(root.background, mode) } };
|
|
1477
1496
|
}
|
|
1497
|
+
if (surface === "inverse") {
|
|
1498
|
+
return { ...theme, root: { ...root, inverse: without(root.inverse, mode) } };
|
|
1499
|
+
}
|
|
1478
1500
|
return {
|
|
1479
1501
|
...theme,
|
|
1480
1502
|
root: { ...root, chrome: without(root.chrome, surface === "shadow" ? "shadow" : mode) },
|
|
@@ -1741,6 +1763,31 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
|
|
|
1741
1763
|
"--phi-labeled-control-width": "100%",
|
|
1742
1764
|
}, 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
1765
|
},
|
|
1766
|
+
{
|
|
1767
|
+
/*
|
|
1768
|
+
* What a link to the Site shows in a messenger or a feed where the Page says nothing of its
|
|
1769
|
+
* own (NEXT_INTEGRATION.md, "Link previews"). Only a picture every visitor is served can be
|
|
1770
|
+
* shown there, so the picker offers the Site Space and greys out the rest.
|
|
1771
|
+
*/
|
|
1772
|
+
key: "share",
|
|
1773
|
+
label: _jsx(PhiTypographyControl, { strong: true, children: "Link preview" }),
|
|
1774
|
+
children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, style: {
|
|
1775
|
+
"--phi-labeled-control-label-width": "33.333333%",
|
|
1776
|
+
"--phi-labeled-control-width": "100%",
|
|
1777
|
+
}, 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." }), _jsx(PhiMediaPickerBinding, { config: {
|
|
1778
|
+
mediaType: PhiMediaKind.Image,
|
|
1779
|
+
pageSize: 12,
|
|
1780
|
+
showPagination: true,
|
|
1781
|
+
showGroupFilter: true,
|
|
1782
|
+
showSearchBar: true,
|
|
1783
|
+
}, 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, {
|
|
1784
|
+
shareImage: { assetId: asset.id, ...(brand.shareImage?.alt ? { alt: brand.shareImage.alt } : {}) },
|
|
1785
|
+
})), onAssetClear: () => publishDraft(mergeThemeBrand(state.draft, { shareImage: null })) }), _jsx(PhiLabeledControl, { label: "Alt", fill: true, children: _jsx(PhiTextControl, { value: brand.shareImage?.alt ?? "", placeholder: "Alt text", ariaLabel: "Link preview alt text", allowClear: false, disabled: !brand.shareImage, onChange: (next) => brand.shareImage && publishDraft(mergeThemeBrand(state.draft, {
|
|
1786
|
+
shareImage: next?.trim()
|
|
1787
|
+
? { assetId: brand.shareImage.assetId, alt: next }
|
|
1788
|
+
: { assetId: brand.shareImage.assetId },
|
|
1789
|
+
})) }) }), _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] })),
|
|
1790
|
+
},
|
|
1744
1791
|
] }) }) }));
|
|
1745
1792
|
}
|
|
1746
1793
|
/**
|
|
@@ -1751,12 +1798,29 @@ function isSamePhiBackgroundConfig(left, right) {
|
|
|
1751
1798
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
1752
1799
|
}
|
|
1753
1800
|
export function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime, config, }) {
|
|
1754
|
-
const { token: clientToken } = usePhiConfig();
|
|
1801
|
+
const { presets: themePresets, token: clientToken } = usePhiConfig();
|
|
1755
1802
|
const themeBlocks = usePhiThemeBlockCatalog();
|
|
1756
1803
|
const themeKey = resolveThemeKey(config);
|
|
1757
1804
|
const { state, publishDraft, editTransaction } = usePhiBrandThemeDraft(runtime, themeKey);
|
|
1758
1805
|
const mode = usePhiBrandPreviewMode(resolveThemePayloadMode(state.draft), config?.signalRoutes);
|
|
1759
1806
|
const composition = resolvePhiThemeComposition(state.draft, themeBlocks);
|
|
1807
|
+
/*
|
|
1808
|
+
* The Inverse Ground the mode being authored paints, as the live render resolves it: the stated colour,
|
|
1809
|
+
* else the mode's own container ground. The control shows that, so an author sees what an inverse box
|
|
1810
|
+
* stands on before anybody stated one.
|
|
1811
|
+
*/
|
|
1812
|
+
const inverseGround = useMemo(() => {
|
|
1813
|
+
const resolvedDraft = resolvePhiThemeRuntimePayload(state.draft, themeBlocks).theme;
|
|
1814
|
+
return String(resolveBrandDraftAliasTokens(resolvedDraft, resolveThemePayloadPreset(resolvedDraft, themePresets), mode).inverseGround);
|
|
1815
|
+
}, [mode, state.draft, themeBlocks, themePresets]);
|
|
1816
|
+
const inverseGroundCustomColors = useMemo(() => {
|
|
1817
|
+
const palette = resolveThemeCustomPalette(state.draft, resolveThemePayloadPreset(state.draft, themePresets), mode);
|
|
1818
|
+
return PHI_THEME_CUSTOM_COLOR_KEYS.map((key, index) => ({ key, label: `Custom ${index + 1}`, value: palette[key] }));
|
|
1819
|
+
}, [mode, state.draft, themePresets]);
|
|
1820
|
+
const inverseGroundPresets = usePhiColorControlPresets({
|
|
1821
|
+
customColors: inverseGroundCustomColors,
|
|
1822
|
+
presets: PHI_COLOR_PICKER_PRESETS,
|
|
1823
|
+
});
|
|
1760
1824
|
const [activeBackgroundSection, changeActiveBackgroundSection] = usePhiBrandAccordionSection(BRAND_THEME_BACKGROUND_COLLAPSE_STORAGE_KEY, BRAND_THEME_BACKGROUND_SECTION_KEYS);
|
|
1761
1825
|
const modeLabel = mode === "dark" ? "Dark mode" : "Light mode";
|
|
1762
1826
|
const otherMode = mode === "dark" ? "light" : "dark";
|
|
@@ -1785,6 +1849,14 @@ export function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime, config,
|
|
|
1785
1849
|
label: _jsx(PhiTypographyControl, { strong: true, children: "Chrome Overlay" }),
|
|
1786
1850
|
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
1851
|
},
|
|
1852
|
+
{
|
|
1853
|
+
key: "inverse",
|
|
1854
|
+
label: _jsx(PhiTypographyControl, { strong: true, children: "Inverse Ground" }),
|
|
1855
|
+
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) => {
|
|
1856
|
+
if (next)
|
|
1857
|
+
publishDraft(mergeThemeInverseGround(state.draft, mode, next));
|
|
1858
|
+
} }, `inverse-${mode}`)] })),
|
|
1859
|
+
},
|
|
1788
1860
|
{
|
|
1789
1861
|
key: "shadow",
|
|
1790
1862
|
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,9 @@ 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
|
+
},
|
|
9
14
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PHI_SIGNAL_VALUE_SCHEMAS, readPhiSignalRouteSet, } from "../../../../types/signals";
|
|
2
|
-
import { PHI_THREADS_CONTROLLER_KEY, PHI_THREADS_CONTROLLER_PLUGIN_KEY, } from "
|
|
2
|
+
import { PHI_THREADS_CONTROLLER_KEY, PHI_THREADS_CONTROLLER_PLUGIN_KEY, } from "../../../../constants/threads-controller-address";
|
|
3
3
|
/**
|
|
4
4
|
* Turns "a row is selected" into "that conversation", and runs the dialog that opens a new one.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Who this viewer may write to, for this Module's own Form that opens a conversation. */
|
|
2
|
-
export declare const PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
|
|
2
|
+
export declare const PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
|
|
3
3
|
key: `${string}/${string}`;
|
|
4
4
|
ownerModuleId: "@phis/ui/modules/threads";
|
|
5
5
|
kind: "options";
|
|
@@ -7,4 +7,117 @@ export declare const PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
|
|
|
7
7
|
authoringMode: "none";
|
|
8
8
|
title: string;
|
|
9
9
|
description: string;
|
|
10
|
-
|
|
10
|
+
resources?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
key: `${string}/${string}`;
|
|
13
|
+
ownerModuleId: "@phis/ui/modules/threads";
|
|
14
|
+
kind: "table";
|
|
15
|
+
executionMode: "live";
|
|
16
|
+
authoringMode: "none";
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
resources: ({
|
|
20
|
+
resourceKey: "person";
|
|
21
|
+
title: string;
|
|
22
|
+
rowIdentityPath: string;
|
|
23
|
+
fields: ({
|
|
24
|
+
key: string;
|
|
25
|
+
title: string;
|
|
26
|
+
type: "number";
|
|
27
|
+
required: true;
|
|
28
|
+
} | {
|
|
29
|
+
key: string;
|
|
30
|
+
title: string;
|
|
31
|
+
type: "string";
|
|
32
|
+
required?: undefined;
|
|
33
|
+
})[];
|
|
34
|
+
query: {
|
|
35
|
+
search: false;
|
|
36
|
+
filterFields: string[];
|
|
37
|
+
sorting: "none";
|
|
38
|
+
pagination: "none";
|
|
39
|
+
total?: undefined;
|
|
40
|
+
};
|
|
41
|
+
rowActivation?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
resourceKey: "addresses";
|
|
44
|
+
title: string;
|
|
45
|
+
rowIdentityPath: string;
|
|
46
|
+
fields: ({
|
|
47
|
+
key: string;
|
|
48
|
+
title: string;
|
|
49
|
+
type: "number";
|
|
50
|
+
required: true;
|
|
51
|
+
options?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
key: string;
|
|
54
|
+
title: string;
|
|
55
|
+
type: "string";
|
|
56
|
+
required?: undefined;
|
|
57
|
+
options?: undefined;
|
|
58
|
+
} | {
|
|
59
|
+
key: string;
|
|
60
|
+
title: string;
|
|
61
|
+
type: "enum[]";
|
|
62
|
+
options: {
|
|
63
|
+
value: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}[];
|
|
66
|
+
required?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
key: string;
|
|
69
|
+
title: string;
|
|
70
|
+
type: "datetime";
|
|
71
|
+
required?: undefined;
|
|
72
|
+
options?: undefined;
|
|
73
|
+
})[];
|
|
74
|
+
query: {
|
|
75
|
+
search: false;
|
|
76
|
+
filterFields: string[];
|
|
77
|
+
sorting: "none";
|
|
78
|
+
pagination: "none";
|
|
79
|
+
total?: undefined;
|
|
80
|
+
};
|
|
81
|
+
rowActivation?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
resourceKey: "threads";
|
|
84
|
+
title: string;
|
|
85
|
+
rowIdentityPath: string;
|
|
86
|
+
rowActivation: true;
|
|
87
|
+
fields: ({
|
|
88
|
+
key: string;
|
|
89
|
+
title: string;
|
|
90
|
+
type: "number";
|
|
91
|
+
required: true;
|
|
92
|
+
options?: undefined;
|
|
93
|
+
} | {
|
|
94
|
+
key: string;
|
|
95
|
+
title: string;
|
|
96
|
+
type: "string";
|
|
97
|
+
required?: undefined;
|
|
98
|
+
options?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
key: string;
|
|
101
|
+
title: string;
|
|
102
|
+
type: "enum";
|
|
103
|
+
options: {
|
|
104
|
+
value: string;
|
|
105
|
+
label: string;
|
|
106
|
+
}[];
|
|
107
|
+
required?: undefined;
|
|
108
|
+
} | {
|
|
109
|
+
key: string;
|
|
110
|
+
title: string;
|
|
111
|
+
type: "datetime";
|
|
112
|
+
required?: undefined;
|
|
113
|
+
options?: undefined;
|
|
114
|
+
})[];
|
|
115
|
+
query: {
|
|
116
|
+
search: false;
|
|
117
|
+
filterFields: string[];
|
|
118
|
+
sorting: "none";
|
|
119
|
+
pagination: "offset";
|
|
120
|
+
total: false;
|
|
121
|
+
};
|
|
122
|
+
})[];
|
|
123
|
+
})[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS, PHI_THREADS_RUNTIME_MODULE_ID, } from "./ids";
|
|
2
|
+
import { PhisThreadKind, PhisThreadStatus } from "../../../constants/threads";
|
|
3
|
+
import { PHI_CUSTOMER_FILE_RESOURCE_KEYS } from "../../../constants/customer-file";
|
|
2
4
|
/** Who this viewer may write to, for this Module's own Form that opens a conversation. */
|
|
3
5
|
export const PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
|
|
4
6
|
{
|
|
@@ -10,4 +12,87 @@ export const PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
|
|
|
10
12
|
title: "People you can write to",
|
|
11
13
|
description: "Whoever shares a group with this viewer, for naming them in a new conversation.",
|
|
12
14
|
},
|
|
15
|
+
/*
|
|
16
|
+
* Staff's customer file on one member of the Site (`GET /api/site/members/{userId}/file`, for the
|
|
17
|
+
* holders of `accounting` or `support`): the person as the staff road of `users:v1` answers them, their
|
|
18
|
+
* current addresses where the actor may read them, and the threads -- the person's file first, then
|
|
19
|
+
* every conversation they take part in that the actor sees. Three resources because a Table lists one
|
|
20
|
+
* kind of row; each reads the same route for the member its `userId` filter names, and none reads
|
|
21
|
+
* anything without one. Core writes every read to the Site's access log.
|
|
22
|
+
*/
|
|
23
|
+
{
|
|
24
|
+
key: PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFile,
|
|
25
|
+
ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
|
|
26
|
+
kind: "table",
|
|
27
|
+
executionMode: "live",
|
|
28
|
+
authoringMode: "none",
|
|
29
|
+
title: "Customer file",
|
|
30
|
+
description: "One member as staff may read them: contact details, addresses, their file and their conversations.",
|
|
31
|
+
resources: [
|
|
32
|
+
{
|
|
33
|
+
resourceKey: PHI_CUSTOMER_FILE_RESOURCE_KEYS.person,
|
|
34
|
+
title: "Person",
|
|
35
|
+
rowIdentityPath: "userId",
|
|
36
|
+
fields: [
|
|
37
|
+
{ key: "userId", title: "User", type: "number", required: true },
|
|
38
|
+
{ key: "displayName", title: "Shown as", type: "string" },
|
|
39
|
+
{ key: "fullName", title: "Name", type: "string" },
|
|
40
|
+
{ key: "companyName", title: "Company", type: "string" },
|
|
41
|
+
{ key: "email", title: "E-mail", type: "string" },
|
|
42
|
+
{ key: "phone", title: "Business phone", type: "string" },
|
|
43
|
+
{ key: "mobile", title: "Mobile", type: "string" },
|
|
44
|
+
],
|
|
45
|
+
query: { search: false, filterFields: ["userId"], sorting: "none", pagination: "none" },
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
resourceKey: PHI_CUSTOMER_FILE_RESOURCE_KEYS.addresses,
|
|
49
|
+
title: "Addresses",
|
|
50
|
+
rowIdentityPath: "id",
|
|
51
|
+
fields: [
|
|
52
|
+
{ key: "id", title: "ID", type: "number", required: true },
|
|
53
|
+
{ key: "name", title: "Name", type: "string" },
|
|
54
|
+
{ key: "lines", title: "Address", type: "string" },
|
|
55
|
+
{
|
|
56
|
+
key: "purposes",
|
|
57
|
+
title: "Purposes",
|
|
58
|
+
type: "enum[]",
|
|
59
|
+
options: ["billing", "shipping", "defaultBilling", "defaultShipping"].map((value) => ({ value, label: value })),
|
|
60
|
+
},
|
|
61
|
+
{ key: "createdAt", title: "Added", type: "datetime" },
|
|
62
|
+
],
|
|
63
|
+
query: { search: false, filterFields: ["userId"], sorting: "none", pagination: "none" },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
resourceKey: PHI_CUSTOMER_FILE_RESOURCE_KEYS.threads,
|
|
67
|
+
title: "Threads",
|
|
68
|
+
rowIdentityPath: "id",
|
|
69
|
+
// Choosing one opens it in the conversation beside the list, as the inbox does.
|
|
70
|
+
rowActivation: true,
|
|
71
|
+
fields: [
|
|
72
|
+
{ key: "id", title: "ID", type: "number", required: true },
|
|
73
|
+
{ key: "subject", title: "Subject", type: "string" },
|
|
74
|
+
{ key: "kind", title: "Kind", type: "enum", options: [
|
|
75
|
+
{ value: String(PhisThreadKind.Direct), label: "Direct" },
|
|
76
|
+
{ value: String(PhisThreadKind.Group), label: "Group" },
|
|
77
|
+
{ value: String(PhisThreadKind.CrossGroup), label: "Between groups" },
|
|
78
|
+
{ value: String(PhisThreadKind.Support), label: "Support" },
|
|
79
|
+
{ value: String(PhisThreadKind.File), label: "File" },
|
|
80
|
+
] },
|
|
81
|
+
{ key: "status", title: "Status", type: "enum", options: [
|
|
82
|
+
{ value: String(PhisThreadStatus.Open), label: "Open" },
|
|
83
|
+
{ value: String(PhisThreadStatus.Archived), label: "Archived" },
|
|
84
|
+
] },
|
|
85
|
+
{ key: "state", title: "State", type: "enum", options: [
|
|
86
|
+
{ value: "unread", label: "New" },
|
|
87
|
+
{ value: "open", label: "Open" },
|
|
88
|
+
{ value: "archived", label: "Archived" },
|
|
89
|
+
{ value: "locked", label: "Locked" },
|
|
90
|
+
] },
|
|
91
|
+
{ key: "latestMessageAt", title: "Last activity", type: "datetime" },
|
|
92
|
+
],
|
|
93
|
+
// Paged by Core without a count, so the list turns back and forth rather than to a page number.
|
|
94
|
+
query: { search: false, filterFields: ["userId"], sorting: "none", pagination: "offset", total: false },
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
13
98
|
];
|
|
@@ -21,7 +21,7 @@ export declare const PHI_THREADS_RUNTIME_MODULE_DEFINITION: {
|
|
|
21
21
|
controllerType: "@phis/ui/modules/threads/controller/default";
|
|
22
22
|
controller: import("../contracts").PhiRuntimeModuleControllerDescriptor;
|
|
23
23
|
controllerMountPolicy: "demand";
|
|
24
|
-
dataProviders: {
|
|
24
|
+
dataProviders: ({
|
|
25
25
|
key: `${string}/${string}`;
|
|
26
26
|
ownerModuleId: "@phis/ui/modules/threads";
|
|
27
27
|
kind: "options";
|
|
@@ -29,7 +29,120 @@ export declare const PHI_THREADS_RUNTIME_MODULE_DEFINITION: {
|
|
|
29
29
|
authoringMode: "none";
|
|
30
30
|
title: string;
|
|
31
31
|
description: string;
|
|
32
|
-
|
|
32
|
+
resources?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
key: `${string}/${string}`;
|
|
35
|
+
ownerModuleId: "@phis/ui/modules/threads";
|
|
36
|
+
kind: "table";
|
|
37
|
+
executionMode: "live";
|
|
38
|
+
authoringMode: "none";
|
|
39
|
+
title: string;
|
|
40
|
+
description: string;
|
|
41
|
+
resources: ({
|
|
42
|
+
resourceKey: "person";
|
|
43
|
+
title: string;
|
|
44
|
+
rowIdentityPath: string;
|
|
45
|
+
fields: ({
|
|
46
|
+
key: string;
|
|
47
|
+
title: string;
|
|
48
|
+
type: "number";
|
|
49
|
+
required: true;
|
|
50
|
+
} | {
|
|
51
|
+
key: string;
|
|
52
|
+
title: string;
|
|
53
|
+
type: "string";
|
|
54
|
+
required?: undefined;
|
|
55
|
+
})[];
|
|
56
|
+
query: {
|
|
57
|
+
search: false;
|
|
58
|
+
filterFields: string[];
|
|
59
|
+
sorting: "none";
|
|
60
|
+
pagination: "none";
|
|
61
|
+
total?: undefined;
|
|
62
|
+
};
|
|
63
|
+
rowActivation?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
resourceKey: "addresses";
|
|
66
|
+
title: string;
|
|
67
|
+
rowIdentityPath: string;
|
|
68
|
+
fields: ({
|
|
69
|
+
key: string;
|
|
70
|
+
title: string;
|
|
71
|
+
type: "number";
|
|
72
|
+
required: true;
|
|
73
|
+
options?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
key: string;
|
|
76
|
+
title: string;
|
|
77
|
+
type: "string";
|
|
78
|
+
required?: undefined;
|
|
79
|
+
options?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
key: string;
|
|
82
|
+
title: string;
|
|
83
|
+
type: "enum[]";
|
|
84
|
+
options: {
|
|
85
|
+
value: string;
|
|
86
|
+
label: string;
|
|
87
|
+
}[];
|
|
88
|
+
required?: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
key: string;
|
|
91
|
+
title: string;
|
|
92
|
+
type: "datetime";
|
|
93
|
+
required?: undefined;
|
|
94
|
+
options?: undefined;
|
|
95
|
+
})[];
|
|
96
|
+
query: {
|
|
97
|
+
search: false;
|
|
98
|
+
filterFields: string[];
|
|
99
|
+
sorting: "none";
|
|
100
|
+
pagination: "none";
|
|
101
|
+
total?: undefined;
|
|
102
|
+
};
|
|
103
|
+
rowActivation?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
resourceKey: "threads";
|
|
106
|
+
title: string;
|
|
107
|
+
rowIdentityPath: string;
|
|
108
|
+
rowActivation: true;
|
|
109
|
+
fields: ({
|
|
110
|
+
key: string;
|
|
111
|
+
title: string;
|
|
112
|
+
type: "number";
|
|
113
|
+
required: true;
|
|
114
|
+
options?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
key: string;
|
|
117
|
+
title: string;
|
|
118
|
+
type: "string";
|
|
119
|
+
required?: undefined;
|
|
120
|
+
options?: undefined;
|
|
121
|
+
} | {
|
|
122
|
+
key: string;
|
|
123
|
+
title: string;
|
|
124
|
+
type: "enum";
|
|
125
|
+
options: {
|
|
126
|
+
value: string;
|
|
127
|
+
label: string;
|
|
128
|
+
}[];
|
|
129
|
+
required?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
key: string;
|
|
132
|
+
title: string;
|
|
133
|
+
type: "datetime";
|
|
134
|
+
required?: undefined;
|
|
135
|
+
options?: undefined;
|
|
136
|
+
})[];
|
|
137
|
+
query: {
|
|
138
|
+
search: false;
|
|
139
|
+
filterFields: string[];
|
|
140
|
+
sorting: "none";
|
|
141
|
+
pagination: "offset";
|
|
142
|
+
total: false;
|
|
143
|
+
};
|
|
144
|
+
})[];
|
|
145
|
+
})[];
|
|
33
146
|
formProviders: {
|
|
34
147
|
handlers: {
|
|
35
148
|
key: `${string}/${string}`;
|
|
@@ -2,7 +2,7 @@ import { PHI_CMS_AREA_KEYS } from "../../../constants/cms-areas";
|
|
|
2
2
|
import { buildPhiRuntimeModuleControllerDescriptor } from "../contracts";
|
|
3
3
|
import { PHI_CORE_SERVER_BINDING } from "../../../types/server-capabilities";
|
|
4
4
|
import { PHI_THREADS_RUNTIME_MODULE_IDENTITY } from "./ids";
|
|
5
|
-
import { PHI_THREADS_CONTROLLER_TYPE } from "
|
|
5
|
+
import { PHI_THREADS_CONTROLLER_TYPE } from "../../../constants/threads-controller-address";
|
|
6
6
|
import { PHI_THREADS_RUNTIME_CONTROLLER_DEFINITION } from "./controller/definition";
|
|
7
7
|
import { PHI_THREADS_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "./data-providers";
|
|
8
8
|
import { PHI_THREADS_FORM_HANDLER_PROVIDER_DESCRIPTORS } from "./forms";
|
|
@@ -15,4 +15,6 @@ export declare const PHI_THREADS_RUNTIME_MODULE_IDENTITY: {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS: {
|
|
17
17
|
readonly candidates: `${string}/${string}`;
|
|
18
|
+
/** Staff's customer file on one member, the Foundation name (`constants/customer-file.ts`). */
|
|
19
|
+
readonly customerFile: `${string}/${string}`;
|
|
18
20
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
|
|
2
2
|
import { createPhiSharedRuntimeDataProviderKey } from "../../../constants/runtime-data-provider-key";
|
|
3
|
+
import { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS } from "../../../constants/customer-file";
|
|
3
4
|
export const PHI_THREADS_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/threads`;
|
|
4
5
|
/**
|
|
5
6
|
* The Module's identity as its Label Sets inherit it (`definePhiRuntimeModuleLabelSet`): the id and,
|
|
@@ -19,4 +20,6 @@ export const PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS = {
|
|
|
19
20
|
// Not a Foundation name: who this viewer may write to is what this Module's own form asks, and a
|
|
20
21
|
// Module offering its own inbox asks the Core route the same way rather than borrowing this key.
|
|
21
22
|
candidates: createPhiSharedRuntimeDataProviderKey("options", "thread-candidates"),
|
|
23
|
+
/** Staff's customer file on one member, the Foundation name (`constants/customer-file.ts`). */
|
|
24
|
+
customerFile: PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS.table,
|
|
22
25
|
};
|