@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
|
@@ -724,7 +724,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
724
724
|
label: "Builder area settings",
|
|
725
725
|
config: {
|
|
726
726
|
title: labels.areaSettings.title,
|
|
727
|
-
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
727
|
+
size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
|
|
728
728
|
/*
|
|
729
729
|
* Mounted with the Page rather than on first open, because the controls inside show state
|
|
730
730
|
* rather than ask for it.
|
|
@@ -754,7 +754,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
754
754
|
label: "Builder page metadata",
|
|
755
755
|
config: {
|
|
756
756
|
title: labels.pages.pageMeta,
|
|
757
|
-
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
757
|
+
size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
|
|
758
758
|
mountPolicy: "lazy-keep",
|
|
759
759
|
closeMode: "immediate",
|
|
760
760
|
signalRoutes: {
|
|
@@ -775,7 +775,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
775
775
|
label: "Builder module detail",
|
|
776
776
|
config: {
|
|
777
777
|
title: modulesLabels?.detail.title ?? "Module details",
|
|
778
|
-
|
|
778
|
+
size: { width: 640 },
|
|
779
779
|
mountPolicy: "lazy-keep",
|
|
780
780
|
closeMode: "immediate",
|
|
781
781
|
signalRoutes: {
|
|
@@ -796,7 +796,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
796
796
|
label: "Builder module usage",
|
|
797
797
|
config: {
|
|
798
798
|
title: modulesLabels?.usage.title ?? "This Module draws on pages",
|
|
799
|
-
|
|
799
|
+
size: { width: 680 },
|
|
800
800
|
mountPolicy: "lazy-keep",
|
|
801
801
|
closeMode: "immediate",
|
|
802
802
|
signalRoutes: {
|
|
@@ -817,7 +817,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
817
817
|
label: "Builder public route collision",
|
|
818
818
|
config: {
|
|
819
819
|
title: modulesLabels?.publicRoutes.title ?? "Public addresses are taken",
|
|
820
|
-
|
|
820
|
+
size: { width: 720 },
|
|
821
821
|
mountPolicy: "lazy-keep",
|
|
822
822
|
closeMode: "immediate",
|
|
823
823
|
signalRoutes: {
|
|
@@ -1240,6 +1240,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1240
1240
|
parentLayoutNodeId: PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS.areaSettingsFields,
|
|
1241
1241
|
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[0].slotIndex,
|
|
1242
1242
|
sortOrder: 0,
|
|
1243
|
+
// The Builder's Label Set, translated already.
|
|
1244
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1243
1245
|
label: "dev area settings form",
|
|
1244
1246
|
config: {
|
|
1245
1247
|
formId: PHI_BUILDER_AREA_SETTINGS_FORM_ID,
|
|
@@ -1530,6 +1532,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1530
1532
|
id: PHI_BUILDER_MODULES_TABLE_WIDGET_ID,
|
|
1531
1533
|
parentLayoutNodeId: SYNTHETIC_DEV_LAYOUT_IDS.layoutContent,
|
|
1532
1534
|
slotIndex: 0,
|
|
1535
|
+
// The Builder's Label Set, translated already.
|
|
1536
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1533
1537
|
label: "dev modules table",
|
|
1534
1538
|
config: {
|
|
1535
1539
|
source: {
|
|
@@ -1678,6 +1682,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1678
1682
|
parentLayoutNodeId: PHI_BUILDER_MODULE_USAGE_LAYOUT_IDS.moduleUsageBody,
|
|
1679
1683
|
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[1].slotIndex,
|
|
1680
1684
|
sortOrder: 1,
|
|
1685
|
+
// The Builder's Label Set, translated already.
|
|
1686
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1681
1687
|
label: "Builder module usage rows",
|
|
1682
1688
|
config: {
|
|
1683
1689
|
source: {
|
|
@@ -1755,6 +1761,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1755
1761
|
parentLayoutNodeId: PHI_BUILDER_PUBLIC_ROUTES_LAYOUT_IDS.publicRoutesBody,
|
|
1756
1762
|
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[1].slotIndex,
|
|
1757
1763
|
sortOrder: 1,
|
|
1764
|
+
// The Builder's Label Set, translated already.
|
|
1765
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1758
1766
|
label: "Builder public route collision rows",
|
|
1759
1767
|
config: {
|
|
1760
1768
|
source: {
|
|
@@ -1838,6 +1846,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1838
1846
|
parentLayoutNodeId: PHI_BUILDER_MODULE_DETAIL_LAYOUT_IDS.body,
|
|
1839
1847
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
1840
1848
|
sortOrder: 0,
|
|
1849
|
+
// The Builder's Label Set, translated already.
|
|
1850
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1841
1851
|
label: "dev module detail fields",
|
|
1842
1852
|
config: {
|
|
1843
1853
|
source: {
|
|
@@ -1907,6 +1917,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1907
1917
|
id: SYNTHETIC_DEV_WIDGET_IDS.widgetNavigationSource,
|
|
1908
1918
|
parentLayoutNodeId: SYNTHETIC_DEV_LAYOUT_IDS.layoutContent,
|
|
1909
1919
|
slotIndex: 0,
|
|
1920
|
+
// The Builder's Label Set, translated already.
|
|
1921
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1910
1922
|
label: "dev navigation source",
|
|
1911
1923
|
config: {
|
|
1912
1924
|
source: {
|
|
@@ -1948,6 +1960,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1948
1960
|
id: SYNTHETIC_DEV_WIDGET_IDS.widgetNavigationItems,
|
|
1949
1961
|
parentLayoutNodeId: SYNTHETIC_DEV_LAYOUT_IDS.layoutContent,
|
|
1950
1962
|
slotIndex: 1,
|
|
1963
|
+
// The Builder's Label Set, translated already.
|
|
1964
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
1951
1965
|
label: "dev navigation items",
|
|
1952
1966
|
config: {
|
|
1953
1967
|
source: {
|
|
@@ -2076,7 +2090,20 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
2076
2090
|
slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Left,
|
|
2077
2091
|
sortOrder: 0,
|
|
2078
2092
|
label: "dev builder mode switch",
|
|
2079
|
-
config: {
|
|
2093
|
+
config: {
|
|
2094
|
+
// The mode chosen goes to the Builder Controller, which enters the editor or the preview.
|
|
2095
|
+
signalRoutes: {
|
|
2096
|
+
emits: [{
|
|
2097
|
+
routeKey: "builder-mode-change",
|
|
2098
|
+
capabilityId: "change",
|
|
2099
|
+
scope: "area",
|
|
2100
|
+
channel: "builderMode",
|
|
2101
|
+
action: "change",
|
|
2102
|
+
valueType: "string",
|
|
2103
|
+
receiver: createPhiBuilderControllerAddress(),
|
|
2104
|
+
}],
|
|
2105
|
+
},
|
|
2106
|
+
},
|
|
2080
2107
|
}),
|
|
2081
2108
|
]
|
|
2082
2109
|
: []),
|
|
@@ -3,9 +3,11 @@ import { type PhiSignalRouteSet } from "../../../../../types/signals";
|
|
|
3
3
|
export type PhiBuilderChromeWidgetConfig = {
|
|
4
4
|
signalRoutes?: PhiSignalRouteSet;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
6
|
+
/** A chrome Widget that only draws Builder state -- the Inspector's heading -- reads no config at all. */
|
|
7
|
+
export type PhiBuilderChromeStateWidgetConfig = Record<string, never>;
|
|
8
|
+
type PhiBuilderChromeWidgetDefinition<TConfig = PhiBuilderChromeWidgetConfig> = Pick<PhiCmsWidgetPlugin<TConfig>, "kind" | "pluginKey" | "typeKey" | "title" | "description" | "category" | "iconFamily" | "runtimeSignals" | "slotSizePolicy" | "fields" | "parseConfig">;
|
|
9
|
+
export declare const PHI_BUILDER_MODE_SWITCH_WIDGET_DEFINITION: PhiBuilderChromeWidgetDefinition<PhiBuilderChromeWidgetConfig>;
|
|
10
|
+
export declare const PHI_BUILDER_INSPECTOR_HEADER_WIDGET_DEFINITION: PhiBuilderChromeWidgetDefinition<PhiBuilderChromeStateWidgetConfig>;
|
|
9
11
|
export type PhiBuilderInspectorSectionWidgetSpec = {
|
|
10
12
|
typeKey: string;
|
|
11
13
|
view: "region" | "layout" | "widget";
|
|
@@ -175,6 +177,6 @@ export declare const PHI_BUILDER_INSPECTOR_SECTION_WIDGET_DEFINITIONS: {
|
|
|
175
177
|
readonly section: "signals";
|
|
176
178
|
readonly title: "Widget Signals";
|
|
177
179
|
};
|
|
178
|
-
definition: PhiBuilderChromeWidgetDefinition
|
|
180
|
+
definition: PhiBuilderChromeWidgetDefinition<PhiBuilderChromeWidgetConfig>;
|
|
179
181
|
}[];
|
|
180
182
|
export {};
|
|
@@ -3,6 +3,9 @@ import { PHI_SIGNAL_VALUE_SCHEMAS, readPhiSignalRouteSet } from "../../../../../
|
|
|
3
3
|
function parseBuilderChromeWidgetConfig(config) {
|
|
4
4
|
return { signalRoutes: readPhiSignalRouteSet(config.signalRoutes) ?? undefined };
|
|
5
5
|
}
|
|
6
|
+
function parseBuilderChromeStateWidgetConfig() {
|
|
7
|
+
return {};
|
|
8
|
+
}
|
|
6
9
|
function createBuilderChromeWidgetDefinition(options) {
|
|
7
10
|
return {
|
|
8
11
|
kind: "widget",
|
|
@@ -15,7 +18,7 @@ function createBuilderChromeWidgetDefinition(options) {
|
|
|
15
18
|
runtimeSignals: options.runtimeSignals,
|
|
16
19
|
slotSizePolicy: options.slotSizePolicy,
|
|
17
20
|
fields: [],
|
|
18
|
-
parseConfig:
|
|
21
|
+
parseConfig: options.parseConfig,
|
|
19
22
|
};
|
|
20
23
|
}
|
|
21
24
|
export const PHI_BUILDER_MODE_SWITCH_WIDGET_DEFINITION = createBuilderChromeWidgetDefinition({
|
|
@@ -23,12 +26,18 @@ export const PHI_BUILDER_MODE_SWITCH_WIDGET_DEFINITION = createBuilderChromeWidg
|
|
|
23
26
|
slotSizePolicy: "intrinsic",
|
|
24
27
|
title: "Builder Mode Switch",
|
|
25
28
|
description: "Editor and preview switch for Builder workspaces.",
|
|
29
|
+
/* The mode chosen, along the routes its tree writes: the Builder Controller enters the editor or the preview. */
|
|
30
|
+
runtimeSignals: {
|
|
31
|
+
emits: [{ id: "change", action: "change", valueType: "string" }],
|
|
32
|
+
},
|
|
33
|
+
parseConfig: parseBuilderChromeWidgetConfig,
|
|
26
34
|
});
|
|
27
35
|
export const PHI_BUILDER_INSPECTOR_HEADER_WIDGET_DEFINITION = createBuilderChromeWidgetDefinition({
|
|
28
36
|
typeKey: "builder-inspector-header",
|
|
29
37
|
slotSizePolicy: "intrinsic",
|
|
30
38
|
title: "Builder Inspector Header",
|
|
31
39
|
description: "Dynamic node kind and type heading for Builder inspector overlays.",
|
|
40
|
+
parseConfig: parseBuilderChromeStateWidgetConfig,
|
|
32
41
|
});
|
|
33
42
|
export const PHI_BUILDER_INSPECTOR_SECTION_WIDGET_SPECS = [
|
|
34
43
|
{ typeKey: "builder-region-geometry-inspector", view: "region", section: "geometry", title: "Region Geometry" },
|
|
@@ -63,5 +72,6 @@ export const PHI_BUILDER_INSPECTOR_SECTION_WIDGET_DEFINITIONS = PHI_BUILDER_INSP
|
|
|
63
72
|
valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.builderInspector,
|
|
64
73
|
}],
|
|
65
74
|
},
|
|
75
|
+
parseConfig: parseBuilderChromeWidgetConfig,
|
|
66
76
|
}),
|
|
67
77
|
}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PhiCmsBuilderWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const PHI_BUILDER_INSPECTOR_HEADER_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<
|
|
2
|
+
import { type PhiBuilderChromeStateWidgetConfig } from "../chrome/config";
|
|
3
|
+
export declare const PHI_BUILDER_INSPECTOR_HEADER_WIDGET_BUILDER_PLUGIN: PhiCmsBuilderWidgetPlugin<PhiBuilderChromeStateWidgetConfig>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PhiCmsWidgetPlugin } from "../../../../../types";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const PHI_BUILDER_INSPECTOR_HEADER_WIDGET_PLUGIN: PhiCmsWidgetPlugin<
|
|
2
|
+
import { type PhiBuilderChromeStateWidgetConfig } from "../chrome/config";
|
|
3
|
+
export declare const PHI_BUILDER_INSPECTOR_HEADER_WIDGET_PLUGIN: PhiCmsWidgetPlugin<PhiBuilderChromeStateWidgetConfig>;
|
|
@@ -3,6 +3,6 @@ import { PhiBuilderModeSwitchWidget } from "../../../../../components/widgets/se
|
|
|
3
3
|
import { PHI_BUILDER_MODE_SWITCH_WIDGET_DEFINITION } from "../chrome/config";
|
|
4
4
|
export const PHI_BUILDER_MODE_SWITCH_WIDGET_PLUGIN = {
|
|
5
5
|
...PHI_BUILDER_MODE_SWITCH_WIDGET_DEFINITION,
|
|
6
|
-
render: ({ runtime }) => _jsx(PhiBuilderModeSwitchWidget, { runtime: runtime }),
|
|
6
|
+
render: ({ runtime, config }) => _jsx(PhiBuilderModeSwitchWidget, { runtime: runtime, signalRoutes: config?.signalRoutes }),
|
|
7
7
|
renderPreview: ({ runtime }) => _jsx(PhiBuilderModeSwitchWidget, { runtime: runtime, disabled: true }),
|
|
8
8
|
};
|
|
@@ -41,7 +41,7 @@ import { PhiTypographyControl } from "../../../../../components/controls/phi-typ
|
|
|
41
41
|
import { PhiIcon } from "../../../../../components/shell/phi-icon";
|
|
42
42
|
import { PhiSurfaceTone } from "../../../../../components/surface/phi-surface-tone";
|
|
43
43
|
import { resolvePhiSurfaceToneClassName } from "../../../../../types/surface";
|
|
44
|
-
import {
|
|
44
|
+
import { phiSurfaceTakesToneGround, resolvePhiSurfaceToneGround } from "../../../../../helpers/surface-style";
|
|
45
45
|
import { joinPhiClassNames } from "../../../../../helpers/class-names";
|
|
46
46
|
/** The Region's root Layout placed into another tree, at the slot it is moved to. */
|
|
47
47
|
function buildStructureRootLayoutNode(draft, parentLayoutNodeId, slotIndex) {
|
|
@@ -374,7 +374,7 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
|
|
|
374
374
|
...(effectiveDraft?.surface?.background
|
|
375
375
|
? resolvePhiBackgroundWidgetStyle(effectiveDraft.surface.background)
|
|
376
376
|
: {}),
|
|
377
|
-
...(toneGround ? { backgroundColor:
|
|
377
|
+
...(toneGround ? { backgroundColor: resolvePhiSurfaceToneGround(effectiveDraft?.surface?.tone) } : {}),
|
|
378
378
|
};
|
|
379
379
|
const slotBorderStyle = effectiveDraft?.surface?.border ? resolvePhiBorderWidgetStyle(effectiveDraft.surface.border) : {};
|
|
380
380
|
const regionConfig = (effectiveDraft?.regionConfig ?? null);
|
|
@@ -6,12 +6,15 @@ import { PHI_COMMON_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST } from "./commo
|
|
|
6
6
|
import { extendPhiRuntimeModuleDataProviderClientManifest } from "../../../components/runtime/runtime-module-data-provider-client-manifest";
|
|
7
7
|
import { PHI_DASHBOARD_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS } from "../dashboard/client-data-providers";
|
|
8
8
|
import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS } from "../groups/client-data-providers";
|
|
9
|
+
import { PHI_APP_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS } from "../app/client-data-providers";
|
|
9
10
|
import { extendPhiRuntimeModuleRenderClientManifest } from "../../../components/runtime/runtime-module-render-client-manifest";
|
|
10
11
|
import { PHI_AUTH_SECURITY_RENDER_CLIENT_LOADER } from "./auth-render-clients";
|
|
11
12
|
export const PHI_APP_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST = extendPhiRuntimeModuleDataProviderClientManifest(PHI_COMMON_RUNTIME_MODULE_DATA_PROVIDER_CLIENT_MANIFEST, [
|
|
12
13
|
// The App reads groups too: someone sees which groups they are in and who else is in them.
|
|
13
14
|
...PHI_DASHBOARD_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS,
|
|
14
15
|
...PHI_GROUPS_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS,
|
|
16
|
+
// The account's own addresses, on its Profile page.
|
|
17
|
+
...PHI_APP_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS,
|
|
15
18
|
]);
|
|
16
19
|
export { PHI_COMMON_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST as PHI_APP_RUNTIME_MODULE_CALENDAR_ADAPTER_CLIENT_MANIFEST } from "./common";
|
|
17
20
|
export { PHI_COMMON_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST as PHI_APP_RUNTIME_MODULE_MEDIA_SOURCE_CLIENT_MANIFEST } from "./common";
|
|
@@ -23,6 +23,16 @@ export const PHI_BUILDER_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST = extendPhiRuntim
|
|
|
23
23
|
PhiCmsWidgetType.AssetFocalRect,
|
|
24
24
|
definePhiRuntimeModuleRenderClient(dynamic(() => import("../../../components/media/phi-asset-focal-rect-widget").then((module) => module.PhiAssetFocalRectWidget))),
|
|
25
25
|
],
|
|
26
|
+
...[
|
|
27
|
+
[PhiRuntimeRenderClientType.BuilderBrandThemeControls, "PhiBuilderBrandThemeControlsWidgetClient"],
|
|
28
|
+
[PhiRuntimeRenderClientType.BuilderBrandThemePreview, "PhiBuilderBrandThemePreviewWidgetClient"],
|
|
29
|
+
[PhiRuntimeRenderClientType.BuilderBrandStyleControls, "PhiBuilderBrandStyleControlsWidgetClient"],
|
|
30
|
+
[PhiRuntimeRenderClientType.BuilderBrandBackgroundControls, "PhiBuilderBrandBackgroundControlsWidgetClient"],
|
|
31
|
+
[PhiRuntimeRenderClientType.BuilderBrandIdentityControls, "PhiBuilderBrandIdentityControlsWidgetClient"],
|
|
32
|
+
].map(([type, name]) => [
|
|
33
|
+
type,
|
|
34
|
+
definePhiRuntimeModuleRenderClient(dynamic(() => import("../../../plugins/runtime-modules/theme/widgets/brand-controls/client").then((module) => module[name]))),
|
|
35
|
+
]),
|
|
26
36
|
[
|
|
27
37
|
PhiRuntimeRenderClientType.BuilderModeSwitch,
|
|
28
38
|
definePhiRuntimeModuleRenderClient(dynamic(() => import("../../../plugins/runtime-modules/builder/clients/mode-switch").then((module) => module.PhiBuilderModeSwitchWidgetClient))),
|
|
@@ -95,6 +95,10 @@ export declare function definePhiContentEntryRoutes(spec: PhiContentEntryRoutesS
|
|
|
95
95
|
path: string;
|
|
96
96
|
landingPage?: true;
|
|
97
97
|
title: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
shareImage?: {
|
|
100
|
+
asset: string;
|
|
101
|
+
};
|
|
98
102
|
defaultPageFlags?: number;
|
|
99
103
|
loadTree: (context: PhiCmsDescriptorBuildContext & {
|
|
100
104
|
activeModuleIds: ReadonlySet<PhiRuntimeModuleId>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PHI_SHARED_PACKAGE_NAME } from "../../constants/package";
|
|
2
|
-
import { createPhiRuntimeModuleId } from "../../constants/module-identity";
|
|
2
|
+
import { createPhiRuntimeModuleId, isPhiModuleScopedIdentifier, readPhiRuntimeModulePackageName } from "../../constants/module-identity";
|
|
3
3
|
import { PHI_RECORD_FIELD_KINDS } from "../../constants/record-field-kinds";
|
|
4
4
|
import { isPhiCalendarAdapterKey } from "../../types/calendar";
|
|
5
5
|
import { collectPhiVideoProviderDescriptorErrors, isPhiVideoProviderKey, } from "../../types/video";
|
|
@@ -12,6 +12,7 @@ import { isPhiNamespacedRuntimeKey } from "../../types/runtime-data-provider";
|
|
|
12
12
|
import { collectPhiModuleIconErrors } from "../../helpers/module-icons";
|
|
13
13
|
import { isPhiViewerAccessPolicyProviderOwned, } from "../../types/access";
|
|
14
14
|
import { isPhiOwnedRuntimeModuleId, isPhiRuntimeModuleSourceLocale, resolvePhiRuntimeModuleSourceLocale, } from "../../types/runtime-module-locale";
|
|
15
|
+
import { readPhiFormHandlerPathError } from "../../gateway/form-handler-request";
|
|
15
16
|
/*
|
|
16
17
|
* The Modules named here are named by id, as data. Importing their `ids.ts` bound every file that
|
|
17
18
|
* reads this one -- the Foundation among them -- to the Module folders at compile time (MODULES.md,
|
|
@@ -513,6 +514,7 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
513
514
|
const ownerModuleIdByFormValidationKey = new Map();
|
|
514
515
|
const ownerModuleIdByFormHandlerKey = new Map();
|
|
515
516
|
const ownerModuleIdByFormId = new Map();
|
|
517
|
+
const ownerModuleIdByTableEmbedKey = new Map();
|
|
516
518
|
let platformModuleId = null;
|
|
517
519
|
for (const entry of entries) {
|
|
518
520
|
const { definition } = entry;
|
|
@@ -605,6 +607,22 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
605
607
|
}
|
|
606
608
|
ownerModuleIdByDataProviderKey.set(provider.key, definition.moduleId);
|
|
607
609
|
}
|
|
610
|
+
// TABLES.md; columns and parameters are `checkPhiEmbeddableTables`'s.
|
|
611
|
+
for (const embed of definition.embeddableTables ?? []) {
|
|
612
|
+
const subject = `${definition.moduleId}: embeddable Table "${embed.key}"`;
|
|
613
|
+
const provider = definition.dataProviders?.find((candidate) => candidate.key === embed.source?.providerKey);
|
|
614
|
+
const owner = embed.key.slice(0, embed.key.indexOf("/table-embeds/"));
|
|
615
|
+
if (!isPhiModuleScopedIdentifier("table-embeds", embed.key) || ![definition.moduleId, readPhiRuntimeModulePackageName(definition.moduleId)].includes(owner)) {
|
|
616
|
+
throw new Error(`${subject} needs a table-embeds key of its own Module.`);
|
|
617
|
+
}
|
|
618
|
+
if (provider?.kind !== "table" || !provider.resources.some((resource) => resource.resourceKey === embed.source.resourceKey)) {
|
|
619
|
+
throw new Error(`${subject} reads a resource no table Provider of this Module declares.`);
|
|
620
|
+
}
|
|
621
|
+
if (ownerModuleIdByTableEmbedKey.has(embed.key))
|
|
622
|
+
throw new Error(`${subject} is owned twice.`);
|
|
623
|
+
assertOwnedAccessPolicy(definition.moduleId, ownerProviderId, embed.accessPolicy, `embeddable Table "${embed.key}"`);
|
|
624
|
+
ownerModuleIdByTableEmbedKey.set(embed.key, definition.moduleId);
|
|
625
|
+
}
|
|
608
626
|
for (const adapter of definition.calendarAdapters ?? []) {
|
|
609
627
|
if (!isPhiCalendarAdapterKey(adapter.key)) {
|
|
610
628
|
throw new Error(`${definition.moduleId}: invalid Calendar adapter key "${adapter.key}".`);
|
|
@@ -683,6 +701,10 @@ export function createPhiRuntimeModuleCatalog(entries, areaDefinitions) {
|
|
|
683
701
|
(provider.requiresCsrf && provider.csrfPath == null)) {
|
|
684
702
|
throw new Error(`${definition.moduleId}: form handler provider "${provider.key}" has invalid immutable execution metadata.`);
|
|
685
703
|
}
|
|
704
|
+
const pathError = readPhiFormHandlerPathError(provider.upstreamPath);
|
|
705
|
+
if (pathError) {
|
|
706
|
+
throw new Error(`${definition.moduleId}: form handler provider "${provider.key}" has an invalid upstream path: ${pathError}.`);
|
|
707
|
+
}
|
|
686
708
|
if (provider.credentialPolicy === "auth-link" && definition.moduleId !== PHI_AUTH_RUNTIME_MODULE_ID) {
|
|
687
709
|
throw new Error(`${definition.moduleId}: form handler provider "${provider.key}" cannot claim Core-only auth-link credentials.`);
|
|
688
710
|
}
|
|
@@ -815,6 +837,14 @@ function assertPhiRecordDeclaration(owner, declaration) {
|
|
|
815
837
|
throw new Error(`${owner} field "${field.key}" has no label.`);
|
|
816
838
|
}
|
|
817
839
|
}
|
|
840
|
+
// A link preview names declared fields of the kind it shows: a title and a description are text.
|
|
841
|
+
const kinds = new Map(declaration.fields.map((field) => [field.key, field.kind]));
|
|
842
|
+
for (const [role, kind] of [["titleField", "text"], ["descriptionField", "text"], ["imageField", "picture"]]) {
|
|
843
|
+
const key = declaration.share?.[role];
|
|
844
|
+
if (key !== undefined && kinds.get(key) !== kind) {
|
|
845
|
+
throw new Error(`${owner} share.${role} "${key}" is no declared ${kind} field.`);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
818
848
|
}
|
|
819
849
|
function assertPhiRuntimeModuleRecordProviders(definition, entry) {
|
|
820
850
|
const descriptors = (definition.dataProviders ?? []).flatMap((provider) => provider.kind === "record" ? [provider] : []);
|
|
@@ -738,6 +738,11 @@ export declare const PHI_CORE_RUNTIME_MODULE_DEFINITION: {
|
|
|
738
738
|
value: string;
|
|
739
739
|
label: string;
|
|
740
740
|
}[];
|
|
741
|
+
}, {
|
|
742
|
+
readonly key: "currencyField";
|
|
743
|
+
readonly type: "string";
|
|
744
|
+
readonly label: "Currency field";
|
|
745
|
+
readonly description: "The key of the field whose value is the currency of one amount, instead of a fixed currency.";
|
|
741
746
|
}, {
|
|
742
747
|
readonly key: "currencies";
|
|
743
748
|
readonly type: "choice";
|
|
@@ -764,6 +769,29 @@ export declare const PHI_CORE_RUNTIME_MODULE_DEFINITION: {
|
|
|
764
769
|
readonly min: 0;
|
|
765
770
|
readonly precision: 0;
|
|
766
771
|
}];
|
|
772
|
+
} | {
|
|
773
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
774
|
+
key: `${string}/${string}`;
|
|
775
|
+
title: "Country";
|
|
776
|
+
valueType: "string";
|
|
777
|
+
presentation: "control";
|
|
778
|
+
settingsFields: readonly [{
|
|
779
|
+
readonly key: "allowClear";
|
|
780
|
+
readonly type: "boolean";
|
|
781
|
+
readonly label: "Allow clear";
|
|
782
|
+
}];
|
|
783
|
+
} | {
|
|
784
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
785
|
+
key: `${string}/${string}`;
|
|
786
|
+
title: "Address";
|
|
787
|
+
valueType: "json";
|
|
788
|
+
presentation: "control";
|
|
789
|
+
} | {
|
|
790
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
791
|
+
key: `${string}/${string}`;
|
|
792
|
+
title: "Flags";
|
|
793
|
+
valueType: "number";
|
|
794
|
+
presentation: "control";
|
|
767
795
|
})[];
|
|
768
796
|
readonly validationRules: ({
|
|
769
797
|
ownerModuleId: "@phis/ui/modules/core";
|
|
@@ -342,6 +342,11 @@ export declare const PHI_CORE_FORM_PROVIDER_DESCRIPTORS: {
|
|
|
342
342
|
value: string;
|
|
343
343
|
label: string;
|
|
344
344
|
}[];
|
|
345
|
+
}, {
|
|
346
|
+
readonly key: "currencyField";
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
readonly label: "Currency field";
|
|
349
|
+
readonly description: "The key of the field whose value is the currency of one amount, instead of a fixed currency.";
|
|
345
350
|
}, {
|
|
346
351
|
readonly key: "currencies";
|
|
347
352
|
readonly type: "choice";
|
|
@@ -368,6 +373,29 @@ export declare const PHI_CORE_FORM_PROVIDER_DESCRIPTORS: {
|
|
|
368
373
|
readonly min: 0;
|
|
369
374
|
readonly precision: 0;
|
|
370
375
|
}];
|
|
376
|
+
} | {
|
|
377
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
378
|
+
key: `${string}/${string}`;
|
|
379
|
+
title: "Country";
|
|
380
|
+
valueType: "string";
|
|
381
|
+
presentation: "control";
|
|
382
|
+
settingsFields: readonly [{
|
|
383
|
+
readonly key: "allowClear";
|
|
384
|
+
readonly type: "boolean";
|
|
385
|
+
readonly label: "Allow clear";
|
|
386
|
+
}];
|
|
387
|
+
} | {
|
|
388
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
389
|
+
key: `${string}/${string}`;
|
|
390
|
+
title: "Address";
|
|
391
|
+
valueType: "json";
|
|
392
|
+
presentation: "control";
|
|
393
|
+
} | {
|
|
394
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
395
|
+
key: `${string}/${string}`;
|
|
396
|
+
title: "Flags";
|
|
397
|
+
valueType: "number";
|
|
398
|
+
presentation: "control";
|
|
371
399
|
})[];
|
|
372
400
|
readonly validationRules: ({
|
|
373
401
|
ownerModuleId: "@phis/ui/modules/core";
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What a cell shows and what a condition reads, neither of which is a flag.
|
|
3
|
-
*
|
|
4
|
-
* `state` is the name a badge draws and `archived` and `locked` the answers a row action asks for; the
|
|
5
|
-
* enum values are strings because that is what an enum column and a condition compare against. The
|
|
6
|
-
* status itself stays on the row, because the filter above is written against what the route takes.
|
|
7
|
-
*
|
|
8
|
-
* One badge, so one state wins: archived over everything, then unread -- a message waiting to be read is
|
|
9
|
-
* what the reader acts on, and a lock is read in the conversation once it is open -- then locked.
|
|
10
|
-
*/
|
|
11
|
-
export declare function readPhiThreadInboxRow(row: Record<string, unknown>): {
|
|
12
|
-
kind: string;
|
|
13
|
-
status: string;
|
|
14
|
-
archived: boolean;
|
|
15
|
-
locked: boolean;
|
|
16
|
-
state: string;
|
|
17
|
-
};
|
|
18
1
|
/**
|
|
19
2
|
* What a row action writes, in the shape `PATCH /api/site/threads/{id}` takes it: archiving and reopening
|
|
20
3
|
* change the status, locking and unlocking the lock. Both are one row everybody in the conversation
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { PhisThreadStatus } from "../../../../constants/threads";
|
|
3
|
+
import { readPhiThreadInboxRow } from "../../../../helpers/thread-inbox-row";
|
|
3
4
|
import { buildPhiTablePageParams, createPhiTableProviderRequestInit, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
|
|
4
5
|
import { PhiTableProviderError, } from "../../../../types/table-widget";
|
|
5
6
|
import { createPhiTableProviderClient } from "../../../../components/widgets/client/shared/phi-table-provider";
|
|
@@ -36,28 +37,6 @@ function buildThreadQuery(query) {
|
|
|
36
37
|
search.set("unreadOnly", "1");
|
|
37
38
|
return search;
|
|
38
39
|
}
|
|
39
|
-
/**
|
|
40
|
-
* What a cell shows and what a condition reads, neither of which is a flag.
|
|
41
|
-
*
|
|
42
|
-
* `state` is the name a badge draws and `archived` and `locked` the answers a row action asks for; the
|
|
43
|
-
* enum values are strings because that is what an enum column and a condition compare against. The
|
|
44
|
-
* status itself stays on the row, because the filter above is written against what the route takes.
|
|
45
|
-
*
|
|
46
|
-
* One badge, so one state wins: archived over everything, then unread -- a message waiting to be read is
|
|
47
|
-
* what the reader acts on, and a lock is read in the conversation once it is open -- then locked.
|
|
48
|
-
*/
|
|
49
|
-
export function readPhiThreadInboxRow(row) {
|
|
50
|
-
const archived = row.status === PhisThreadStatus.Archived;
|
|
51
|
-
const locked = typeof row.flags === "number" && (row.flags & PhisThreadFlag.Locked) !== 0;
|
|
52
|
-
return {
|
|
53
|
-
...row,
|
|
54
|
-
kind: String(row.kind),
|
|
55
|
-
status: String(row.status),
|
|
56
|
-
archived,
|
|
57
|
-
locked,
|
|
58
|
-
state: archived ? "archived" : row.unread === true ? "unread" : locked ? "locked" : "open",
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
40
|
async function queryThreadTable({ resourceKey, query, signal, }) {
|
|
62
41
|
if (resourceKey !== "inbox") {
|
|
63
42
|
throw new PhiTableProviderError("resource-not-found", `Unknown conversation resource "${resourceKey}".`);
|
|
@@ -15,7 +15,6 @@ type PhiCardImageSource = {
|
|
|
15
15
|
sourceKind: "asset";
|
|
16
16
|
assetId?: number;
|
|
17
17
|
variantKey?: PhiImageAssetVariantKeyValue | null;
|
|
18
|
-
variantVersion?: number | null;
|
|
19
18
|
};
|
|
20
19
|
export type PhiCmsCardWidgetConfig = PhiCmsWidgetConfigBase & PhiCardImageSource & {
|
|
21
20
|
eyebrow?: string;
|
|
@@ -120,7 +120,7 @@ export function PhiCardWidgetEditor({ config, onChange }) {
|
|
|
120
120
|
mediaAspectRatio: config.mediaAspectRatio,
|
|
121
121
|
}),
|
|
122
122
|
frameAspectRatio: resolvePhiCardMediaAspectRatioValue(config.mediaAspectRatio),
|
|
123
|
-
variantVersion: asset?.variantVersion ??
|
|
123
|
+
variantVersion: asset?.variantVersion ?? null,
|
|
124
124
|
deliveryRevision: asset?.deliveryRevision,
|
|
125
125
|
originalUrl: assetId == null ? null : buildPhiMediaAssetContentDeliveryUrl(assetId),
|
|
126
126
|
sourceUrl: config.sourceKind === "url" ? config.sourceUrl : undefined,
|
|
@@ -7,10 +7,13 @@ const NO_BUTTONS = [];
|
|
|
7
7
|
export function PhiCommandToolbarWidget({ config, blockId, labels, disabled, signalsEnabled = true, }) {
|
|
8
8
|
const commands = usePhiCommandButtons({
|
|
9
9
|
buttons: config?.buttons ?? NO_BUTTONS,
|
|
10
|
+
key: config?.key,
|
|
10
11
|
signalRoutes: config?.signalRoutes,
|
|
11
12
|
blockId,
|
|
12
13
|
labels,
|
|
13
14
|
disabled,
|
|
15
|
+
initialDisabled: config?.disabled === true,
|
|
16
|
+
initialReadOnly: config?.readOnly === true,
|
|
14
17
|
signalsEnabled,
|
|
15
18
|
});
|
|
16
19
|
return (_jsx(PhiToolbarControl, { items: commands.items, compact: config?.compact !== false, wrap: config?.wrap === true, showLabels: config?.showLabels === true, disabled: commands.disabled, size: config?.controlSize, onActivate: commands.activate }));
|