@phis/ui 0.7.8 → 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 +52 -8
- 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/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 +23 -0
- package/components/forms/form-provider-contract.js +36 -0
- package/components/forms/form-provider-registry.d.ts +5 -1
- package/components/forms/shared-form-provider-registry.js +13 -0
- package/components/forms/structured-field-labels.d.ts +24 -0
- package/components/forms/structured-field-labels.js +43 -0
- package/components/forms/structured-form-field-controls.d.ts +12 -0
- package/components/forms/structured-form-field-controls.js +65 -0
- package/components/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/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 +27 -3
- package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
- package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
- package/components/widgets/config/background.d.ts +3 -2
- package/components/widgets/config/choice-shared.d.ts +10 -1
- package/components/widgets/config/choice-shared.js +8 -2
- package/components/widgets/label-sets/admin-locales.js +1 -1
- package/components/widgets/label-sets/admin-users.d.ts +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/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/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-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/draft-status-controller.js +28 -1
- package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
- package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
- package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
- package/plugins/runtime-modules/builder/persistence.js +4 -0
- package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
- package/plugins/runtime-modules/builder/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 +23 -0
- package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +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/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/resolver.js +17 -0
- package/plugins/runtime-modules/revisions/controller/client.js +13 -11
- 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 +13 -4
- 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/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
|
@@ -8,6 +8,7 @@ import { useCallback, useEffect, useEffectEvent, useMemo, useRef, useState } fro
|
|
|
8
8
|
import { PhiMultiSelectControl } from "../../../../../components/controls/phi-multi-select-control";
|
|
9
9
|
import { PhiAlertControl } from "../../../../../components/controls/phi-alert-control";
|
|
10
10
|
import { PhiWidgetFailure } from "../../../../../components/widgets/shared/widget-failure-client";
|
|
11
|
+
import { isPhiTableProviderRefusal } from "../../../../../components/widgets/client/shared/phi-table-provider-refusal";
|
|
11
12
|
import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
|
|
12
13
|
import { usePhiConfirmDialog } from "../../../../../components/controls/phi-confirm-dialog";
|
|
13
14
|
import { PhiCascaderControl } from "../../../../../components/controls/phi-cascader-control";
|
|
@@ -35,6 +36,7 @@ import { usePhiApplicationFeedback } from "../../../../../components/runtime/use
|
|
|
35
36
|
import { usePhiTableBinding } from "../../../../../components/tables/client/phi-table-binding";
|
|
36
37
|
import { PhiTableBindingControl } from "../../../../../components/tables/client/phi-table-binding-control";
|
|
37
38
|
import { usePhiTableFilterOptions } from "../../../../../components/tables/client/phi-table-filter-options";
|
|
39
|
+
import { isTableQueryNarrowedByReader } from "./reader-query";
|
|
38
40
|
import { clearPhiDataDragPayload, readPhiDataDragPayload } from "../../../../../components/runtime/client/phi-data-dnd";
|
|
39
41
|
import { renderPhiValueContent, renderPhiValueWithLead, } from "../../../../../components/widgets/client/shared/phi-rendered-value";
|
|
40
42
|
import { formatPhiTranslation } from "../../../../../helpers/translation-format";
|
|
@@ -44,6 +46,7 @@ import { collectPhiRuntimeValueConditions, combinePhiRuntimeConditionExpressions
|
|
|
44
46
|
import { isPhiControllerSignalAddress, } from "../../../../../types/signals";
|
|
45
47
|
import { resolvePhiButtonIcon } from "../../../../../components/widgets/client/shared/phi-button-icons";
|
|
46
48
|
import { PhiFlexControl } from "../../../../../components/controls/phi-flex-control";
|
|
49
|
+
import { PhiRevealOnceDialogControl } from "../../../../../components/controls/phi-reveal-once-dialog-control";
|
|
47
50
|
import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
|
|
48
51
|
import { PhiCompactGroupControl } from "../../../../../components/controls/phi-compact-group-control";
|
|
49
52
|
import { isPhiRecord } from "../../../../../helpers/is-record";
|
|
@@ -245,6 +248,8 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
245
248
|
...(initialQuery.filters ?? {}),
|
|
246
249
|
};
|
|
247
250
|
const [searchDraft, setSearchDraft] = useState(initialQuery.search ?? "");
|
|
251
|
+
// A value an action answered to be shown once (`reveal`), held only while its Dialog is open.
|
|
252
|
+
const [revealed, setRevealed] = useState(null);
|
|
248
253
|
const [conditionControllerStates, setConditionControllerStates] = useState({});
|
|
249
254
|
/*
|
|
250
255
|
* What a condition on this Table can read besides its row: the Controllers that answered, and the
|
|
@@ -314,7 +319,9 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
314
319
|
if (result.status === "accepted" && result.message?.trim()) {
|
|
315
320
|
showMessage({ level: "info", content: result.message.trim() });
|
|
316
321
|
}
|
|
317
|
-
|
|
322
|
+
// A value shown once never leaves the Table: the result goes on without it.
|
|
323
|
+
const { revealValue: _shownOnce, ...announced } = result;
|
|
324
|
+
emitCapability("mutationChange", announced);
|
|
318
325
|
},
|
|
319
326
|
validateResource,
|
|
320
327
|
});
|
|
@@ -482,6 +489,10 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
482
489
|
selectedRowIdentities: identities,
|
|
483
490
|
actionValue,
|
|
484
491
|
query: resolvedQuery,
|
|
492
|
+
}).then((result) => {
|
|
493
|
+
if (action.reveal && result.status === "accepted" && typeof result.revealValue === "string" && result.revealValue) {
|
|
494
|
+
setRevealed({ title: action.reveal.title, description: action.reveal.description, value: result.revealValue });
|
|
495
|
+
}
|
|
485
496
|
}).catch(() => undefined);
|
|
486
497
|
}, [emitCapability, executeAction, onAction, resolvedQuery, resource]);
|
|
487
498
|
usePhiSignalListener(useCallback((signal) => {
|
|
@@ -730,6 +741,9 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
730
741
|
const childAcceptanceField = resource?.hierarchy?.canAcceptChildrenField;
|
|
731
742
|
const selfContainedTools = features.tools?.mode !== "external";
|
|
732
743
|
const hasQueryTools = (features.search?.enabled ?? false) || (features.filters?.length ?? 0) > 0;
|
|
744
|
+
// The Page's own words always; the generic "adjust the filters" only where a filter of the reader's is set.
|
|
745
|
+
const emptyDescription = presentation.emptyState?.description ??
|
|
746
|
+
(isTableQueryNarrowedByReader(features.filters, resolvedQuery, config.fixedFilters) ? labels.emptyDescription : undefined);
|
|
733
747
|
const hasSelfContainedTools = selfContainedTools && (configuredBindingFields.length > 0 ||
|
|
734
748
|
hasQueryTools ||
|
|
735
749
|
features.tools?.reload === true ||
|
|
@@ -798,16 +812,17 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
798
812
|
* configuration does not fit, a read that failed. A refused edit is not one of them -- it stays in
|
|
799
813
|
* `error` alone and is said above the rows to the person who made it.
|
|
800
814
|
*/
|
|
801
|
-
const
|
|
815
|
+
const refusal = isPhiTableProviderRefusal(queryError) ? queryError : null;
|
|
816
|
+
const sourceFailure = bindingError ?? contractError ?? (refusal ? null : queryError?.message) ?? null;
|
|
802
817
|
if (sourceFailure) {
|
|
803
818
|
return (_jsx(PhiWidgetFailure, { renderMode: renderMode, widgetType: PhiCmsWidgetType.Table, title: sourceFailure, error: queryError }));
|
|
804
819
|
}
|
|
805
|
-
return (_jsxs(PhiFlexControl, { vertical: true, gap: selfContainedTools ? token.paddingSM : token.padding, style: { minWidth: 0, width: "100%" }, children: [confirmDialog, _jsx(PhiCollectionHeaderControl, { title: presentation.title, description: presentation.description, filters: collectionFilters, toolbar: collectionToolbar }), !selfContainedTools && bulkActions.length && selectedRowIdentities.length > 0 ? (_jsx(PhiAlertControl, { level: "info", title: (_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: "small", wrap: true, children: [_jsx("span", { children: formatPhiTableWidgetLabel(labels.selected, selectedRowIdentities.length) }), _jsx(PhiFlexControl, { align: "center", gap: "small", children: bulkActions.map((action) => {
|
|
820
|
+
return (_jsxs(PhiFlexControl, { vertical: true, gap: selfContainedTools ? token.paddingSM : token.padding, style: { minWidth: 0, width: "100%" }, children: [confirmDialog, _jsx(PhiRevealOnceDialogControl, { value: revealed?.value ?? null, title: revealed?.title ?? "", description: revealed?.description, labels: labels.reveal, onClose: () => setRevealed(null) }), _jsx(PhiCollectionHeaderControl, { title: presentation.title, description: presentation.description, filters: collectionFilters, toolbar: collectionToolbar }), !selfContainedTools && bulkActions.length && selectedRowIdentities.length > 0 ? (_jsx(PhiAlertControl, { level: "info", title: (_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: "small", wrap: true, children: [_jsx("span", { children: formatPhiTableWidgetLabel(labels.selected, selectedRowIdentities.length) }), _jsx(PhiFlexControl, { align: "center", gap: "small", children: bulkActions.map((action) => {
|
|
806
821
|
if (!matchesAllConditions(null, action.visibleWhen, conditionSources))
|
|
807
822
|
return null;
|
|
808
823
|
const disabled = findMatchingCondition(null, action.disabledWhen, conditionSources);
|
|
809
824
|
return _jsx(TableAction, { action: action, size: resolvedControlSize, disabled: Boolean(disabled), disabledReason: disabled && "reason" in disabled ? disabled.reason : undefined, onActivate: () => activateAction(action, undefined, selectedRowIdentities) }, action.key);
|
|
810
|
-
}) })] })) })) : null, error ? _jsx(PhiAlertControl, { level: "error", showIcon: true, title: error.message }) : null, _jsx(PhiTableBindingControl, { rows: rows, fields: resource?.fields ?? [], sourceConfig: bindingParams,
|
|
825
|
+
}) })] })) })) : null, error && !isPhiTableProviderRefusal(error) ? _jsx(PhiAlertControl, { level: "error", showIcon: true, title: error.message }) : null, _jsx(PhiTableBindingControl, { rows: rows, fields: resource?.fields ?? [], sourceConfig: bindingParams,
|
|
811
826
|
/* Options an editor could not be given: the rows still stand, the author reads why. */
|
|
812
827
|
renderDiagnostics: (warnings) => warnings.map((warning) => (_jsx(PhiWidgetFailure, { renderMode: renderMode, widgetType: PhiCmsWidgetType.Table, title: warning }, warning))), rowIdentityPath: resource?.rowIdentityPath ?? "id", columns: columns, columnOrder: columnOrder, sortingMode: features.sorting?.mode ?? "none", sorts: resolvedQuery.sorts ?? [], onSortsChange: (sorts) => setQuery((current) => ({ ...current, page: 1, cursor: null, sorts })), columnReordering: features.columnReordering?.enabled === true, onColumnOrderChange: updateColumnOrder, rowSelection: features.rowSelection?.mode && features.rowSelection.mode !== "none" ? {
|
|
813
828
|
mode: features.rowSelection.mode,
|
|
@@ -945,7 +960,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
945
960
|
afterRowIdentity: null,
|
|
946
961
|
}).catch(() => undefined).finally(clearPhiDataDragPayload);
|
|
947
962
|
}
|
|
948
|
-
: undefined, loading: effectiveLoading, bordered: presentation.borders, striped: presentation.row?.striped, showHeader: presentation.header, stickyHeader: presentation.stickyHeader !== false, size: resolvedControlSize, emptyText: (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [_jsx(PhiTypographyControl, { strong: true, children: presentation.emptyState?.title ?? labels.emptyTitle }), _jsx(PhiTypographyControl, { type: "secondary", children:
|
|
963
|
+
: undefined, loading: effectiveLoading, bordered: presentation.borders, striped: presentation.row?.striped, showHeader: presentation.header, stickyHeader: presentation.stickyHeader !== false, size: resolvedControlSize, emptyText: (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [_jsx(PhiTypographyControl, { strong: true, children: refusal?.message ?? presentation.emptyState?.title ?? labels.emptyTitle }), emptyDescription && !refusal ? _jsx(PhiTypographyControl, { type: "secondary", children: emptyDescription }) : null] })), layout: presentation.layout, footer: footer, summary: tableSummary })] }));
|
|
949
964
|
}
|
|
950
965
|
function TableAction({ action, disabled = false, disabledReason, templateValue, size, onActivate }) {
|
|
951
966
|
const icon = action.icon ? resolvePhiButtonIcon(action.icon) : null;
|
|
@@ -116,6 +116,8 @@ const PHI_TABLE_ACTION_CONFIG_FIELDS = [
|
|
|
116
116
|
{ key: "newTab", type: "boolean", label: "Open In New Tab", visibleWhen: { field: "execution", equals: "link" } },
|
|
117
117
|
...buildPhiTableConditionExpressionConfigFields("visibleWhen", "Visible Conditions", "all", "Always visible"),
|
|
118
118
|
...buildPhiTableConditionExpressionConfigFields("disabledWhen", "Disabled Conditions", "any", "No disabled conditions"),
|
|
119
|
+
{ key: "reveal.title", type: "string", label: "Shown Once Title", visibleWhen: { field: "execution", equals: "provider" } },
|
|
120
|
+
{ key: "reveal.description", type: "string", label: "Shown Once Description", visibleWhen: { field: "execution", equals: "provider" } },
|
|
119
121
|
{ key: "confirm.title", type: "string", label: "Confirm Title" },
|
|
120
122
|
{ key: "confirm.description", type: "string", label: "Confirm Description" },
|
|
121
123
|
{ key: "confirm.alert.level", type: "choice", label: "Confirm Alert Level", options: [
|
|
@@ -361,6 +363,10 @@ function readAction(reader) {
|
|
|
361
363
|
newTab: reader.boolean("newTab"),
|
|
362
364
|
visibleWhen: readCondition(reader, "visibleWhen"),
|
|
363
365
|
disabledWhen: readCondition(reader, "disabledWhen"),
|
|
366
|
+
reveal: reader.object("reveal", (revealReader) => ({
|
|
367
|
+
title: requireString(revealReader, "title"),
|
|
368
|
+
description: revealReader.string("description"),
|
|
369
|
+
})),
|
|
364
370
|
confirm: reader.object("confirm", (confirmReader) => ({
|
|
365
371
|
title: requireString(confirmReader, "title"),
|
|
366
372
|
description: confirmReader.string("description"),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PhiTableFilterDefinition, PhiTableQuery, PhiTableQueryValue } from "../../../../../types/table-widget";
|
|
2
|
+
/**
|
|
3
|
+
* Whether what the reader can change narrows the rows: a search text, or one of the Table's own filters
|
|
4
|
+
* (`features.filters`) holding a value in the query. Only then does the generic empty hint ("adjust the
|
|
5
|
+
* filters") have anything to point at.
|
|
6
|
+
*
|
|
7
|
+
* A filter holds a value when the query carries one for its key -- for a date range, for either of its
|
|
8
|
+
* two keys -- that is not blank: an empty text, an empty list and a cleared choice are never sent, so they
|
|
9
|
+
* narrow nothing. A `defaultValue` counts like a chosen value: it narrows the query just the same and the
|
|
10
|
+
* reader can clear it, so the hint is true of it. A boolean `false` counts, since the query is narrowed
|
|
11
|
+
* to it; a switch that was never touched and has no default carries nothing.
|
|
12
|
+
*
|
|
13
|
+
* What the reader cannot change does not count: a key the Page pins through `fixedFilters`, and a filter
|
|
14
|
+
* key the query carries that is none of the Table's own filters -- one a Controller or another Widget
|
|
15
|
+
* sets by signal, such as the key a list below a selection is narrowed to.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isTableQueryNarrowedByReader(filters: readonly PhiTableFilterDefinition[] | undefined, query: PhiTableQuery, fixedFilters?: Readonly<Record<string, PhiTableQueryValue>>): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function holdsValue(value) {
|
|
2
|
+
if (value === undefined || value === null)
|
|
3
|
+
return false;
|
|
4
|
+
if (typeof value === "string")
|
|
5
|
+
return value.trim() !== "";
|
|
6
|
+
if (Array.isArray(value))
|
|
7
|
+
return value.length > 0;
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Whether what the reader can change narrows the rows: a search text, or one of the Table's own filters
|
|
12
|
+
* (`features.filters`) holding a value in the query. Only then does the generic empty hint ("adjust the
|
|
13
|
+
* filters") have anything to point at.
|
|
14
|
+
*
|
|
15
|
+
* A filter holds a value when the query carries one for its key -- for a date range, for either of its
|
|
16
|
+
* two keys -- that is not blank: an empty text, an empty list and a cleared choice are never sent, so they
|
|
17
|
+
* narrow nothing. A `defaultValue` counts like a chosen value: it narrows the query just the same and the
|
|
18
|
+
* reader can clear it, so the hint is true of it. A boolean `false` counts, since the query is narrowed
|
|
19
|
+
* to it; a switch that was never touched and has no default carries nothing.
|
|
20
|
+
*
|
|
21
|
+
* What the reader cannot change does not count: a key the Page pins through `fixedFilters`, and a filter
|
|
22
|
+
* key the query carries that is none of the Table's own filters -- one a Controller or another Widget
|
|
23
|
+
* sets by signal, such as the key a list below a selection is narrowed to.
|
|
24
|
+
*/
|
|
25
|
+
export function isTableQueryNarrowedByReader(filters, query, fixedFilters) {
|
|
26
|
+
if (holdsValue(query.search))
|
|
27
|
+
return true;
|
|
28
|
+
const readerKey = (key) => !Object.prototype.hasOwnProperty.call(fixedFilters ?? {}, key) &&
|
|
29
|
+
holdsValue(query.filters?.[key]);
|
|
30
|
+
return (filters ?? []).some((filter) => filter.type === "dateRange"
|
|
31
|
+
? readerKey(filter.startKey) || readerKey(filter.endKey)
|
|
32
|
+
: readerKey(filter.key));
|
|
33
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS } from "../../../../constants/cms-layout-types";
|
|
2
2
|
import { PHI_DASHBOARD_CARD_DATA_PROVIDER_KEY, PHI_DASHBOARD_CARD_RESOURCE_KEY, } from "../../../../constants/dashboard-card-provider-keys";
|
|
3
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
5
5
|
import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
|
|
6
6
|
/**
|
|
@@ -16,6 +16,8 @@ export function buildPhiDashboardCardsWidget({ nodes, widgetId, area, slotIndex,
|
|
|
16
16
|
typeKey: "collection-view",
|
|
17
17
|
slotIndex,
|
|
18
18
|
sortOrder: 0,
|
|
19
|
+
// `emptyDescription` is the Dashboard's Label Set, translated already.
|
|
20
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
19
21
|
label: `${area} dashboard cards`,
|
|
20
22
|
config: {
|
|
21
23
|
presentation: {
|
|
@@ -141,7 +141,7 @@ export declare function instantiatePhiCmsAreaShellPreset({ binding, catalog, sit
|
|
|
141
141
|
runtime: PhiBlockRuntime;
|
|
142
142
|
loadModuleMedia: PhiModuleMediaLoader;
|
|
143
143
|
}): Promise<PhiResolvedCmsPageTree>;
|
|
144
|
-
export declare function instantiatePhiCmsRoutePreset({ binding, catalog, activeModuleIds, siteId, path, runtime, loadModuleMedia,
|
|
144
|
+
export declare function instantiatePhiCmsRoutePreset({ binding, catalog, activeModuleIds, siteId, path, runtime, loadModuleMedia, translateRouteText, }: {
|
|
145
145
|
binding: PhiCmsRoutePresetBinding;
|
|
146
146
|
catalog: PhiCmsCompiledDescriptorCatalog;
|
|
147
147
|
activeModuleIds: ReadonlySet<PhiRuntimeModuleId>;
|
|
@@ -149,6 +149,22 @@ export declare function instantiatePhiCmsRoutePreset({ binding, catalog, activeM
|
|
|
149
149
|
path: string;
|
|
150
150
|
runtime: PhiBlockRuntime;
|
|
151
151
|
loadModuleMedia: PhiModuleMediaLoader;
|
|
152
|
-
|
|
153
|
-
}): Promise<
|
|
152
|
+
translateRouteText?: (source: string) => string | Promise<string>;
|
|
153
|
+
}): Promise<{
|
|
154
|
+
pageMeta: {
|
|
155
|
+
title: import("../../types").PhiCmsResolvedPageMetaField;
|
|
156
|
+
description: import("../../types").PhiCmsResolvedPageMetaField | null;
|
|
157
|
+
preview?: {
|
|
158
|
+
title: string | null;
|
|
159
|
+
description: string | null;
|
|
160
|
+
image: import("../../module-records").PhiRecordPicture | null;
|
|
161
|
+
} | null;
|
|
162
|
+
};
|
|
163
|
+
page: PhiCmsPageNode;
|
|
164
|
+
regions: import("../../types").PhiCmsRegionNode[];
|
|
165
|
+
overlays: import("../../types").PhiCmsOverlayNode[];
|
|
166
|
+
layoutNodes: import("../../types").PhiCmsLayoutNode[];
|
|
167
|
+
contentWidgets: import("../../types").PhiCmsContentWidgetNode[];
|
|
168
|
+
controllerSettings?: import("../../types/cms").PhiCmsTreeControllerSettings | null;
|
|
169
|
+
}>;
|
|
154
170
|
export {};
|
|
@@ -9,8 +9,10 @@ import { resolvePhiRuntimeModuleAreaRoutePath } from "../../helpers/runtime-modu
|
|
|
9
9
|
import { createPhiPageReference } from "../../types/references";
|
|
10
10
|
import { choosePhiAreaRootApplicant, describePhiAreaShellSettingsError, orderPhiAreaPathClaimsByCover, isPhiAssignablePublicRoutePath, } from "../../helpers/cms-area-config";
|
|
11
11
|
import { checkPhiPresetTreeContract } from "../../helpers/preset-tree-contract-check";
|
|
12
|
+
import { refusePhiCatalogRouteAddresses } from "../../helpers/route-address-check";
|
|
12
13
|
import { concatPhiCmsTreeControllerSettings } from "../../helpers/cms-tree-controller-settings";
|
|
13
14
|
import { createPhiModuleMediaResolver } from "../../helpers/module-media";
|
|
15
|
+
import { PHI_PAGE_SHARE_IMAGE_CONFIG_KEY } from "../../types/link-preview";
|
|
14
16
|
const PHI_CMS_REGION_TYPE_VALUES = new Set(Object.values(PhiCmsRegionType));
|
|
15
17
|
const PHI_ROUTE_PARAMETER_PATTERN = /^:[A-Za-z][A-Za-z0-9_]*$/;
|
|
16
18
|
const PHI_NAVIGATION_ANCHORS = new Set([
|
|
@@ -112,6 +114,13 @@ export function compilePhiCmsRoutePattern(descriptor) {
|
|
|
112
114
|
if (dynamicSegments.length > 1) {
|
|
113
115
|
throw new Error(`${descriptor.ownerModuleId}/${descriptor.presetKey}: a route may contain at most one dynamic segment.`);
|
|
114
116
|
}
|
|
117
|
+
// The route's own meta is stated or left out, never stated empty.
|
|
118
|
+
if (descriptor.description !== undefined && !descriptor.description.trim()) {
|
|
119
|
+
throw new Error(`${descriptor.ownerModuleId}/${descriptor.presetKey}: a route's description must not be empty.`);
|
|
120
|
+
}
|
|
121
|
+
if (descriptor.shareImage !== undefined && !descriptor.shareImage.asset?.trim()) {
|
|
122
|
+
throw new Error(`${descriptor.ownerModuleId}/${descriptor.presetKey}: a route's share image must name a picture of the package.`);
|
|
123
|
+
}
|
|
115
124
|
// A page record is filled in from the address, so every route parameter it names has to be in the path.
|
|
116
125
|
if (descriptor.pageRecord) {
|
|
117
126
|
const routeParams = new Set(dynamicSegments.map((segment) => segment.slice(1)));
|
|
@@ -444,6 +453,8 @@ export function compilePhiCmsDescriptorCatalog({ catalog, areaDefinitions, }) {
|
|
|
444
453
|
for (const identity of areaShellByIdentity.keys()) {
|
|
445
454
|
visitShell(identity);
|
|
446
455
|
}
|
|
456
|
+
// A Page is never a folder, across every installed package (THIRD_PARTY_MODULES.md, "Addresses and folders").
|
|
457
|
+
refusePhiCatalogRouteAddresses(routesByArea);
|
|
447
458
|
const routeDescriptors = [...routesByArea.values()].flat().map(({ descriptor }) => descriptor);
|
|
448
459
|
const injectionKeysByOwnerAndSurface = new Map();
|
|
449
460
|
const allInjectionKeysBySurface = new Map();
|
|
@@ -1625,7 +1636,7 @@ export async function instantiatePhiCmsAreaShellPreset({ binding, catalog, siteI
|
|
|
1625
1636
|
assertPhiCmsPresetTreeContract(tree, page, catalog.formDefinitionsById);
|
|
1626
1637
|
return tree;
|
|
1627
1638
|
}
|
|
1628
|
-
export async function instantiatePhiCmsRoutePreset({ binding, catalog, activeModuleIds, siteId, path, runtime, loadModuleMedia,
|
|
1639
|
+
export async function instantiatePhiCmsRoutePreset({ binding, catalog, activeModuleIds, siteId, path, runtime, loadModuleMedia, translateRouteText, }) {
|
|
1629
1640
|
const descriptor = binding.descriptor;
|
|
1630
1641
|
const page = createSyntheticPresetPage({
|
|
1631
1642
|
siteId,
|
|
@@ -1633,29 +1644,46 @@ export async function instantiatePhiCmsRoutePreset({ binding, catalog, activeMod
|
|
|
1633
1644
|
path,
|
|
1634
1645
|
flags: descriptor.defaultPageFlags ?? 0,
|
|
1635
1646
|
});
|
|
1647
|
+
const media = createPhiModuleMediaResolver(descriptor.ownerModuleId, loadModuleMedia);
|
|
1636
1648
|
const loadedTree = await descriptor.loadTree({
|
|
1637
1649
|
page,
|
|
1638
1650
|
runtime: resolveTargetRuntime(runtime, descriptor.area),
|
|
1639
1651
|
catalog,
|
|
1640
1652
|
activeModuleIds,
|
|
1641
1653
|
params: binding.params,
|
|
1642
|
-
media
|
|
1654
|
+
media,
|
|
1643
1655
|
});
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1656
|
+
/*
|
|
1657
|
+
* The route's own meta fills in what the tree leaves out: its title and description, translated as the
|
|
1658
|
+
* Module's text, and its share picture, resolved like any picture of the package. What the tree states
|
|
1659
|
+
* wins, field by field.
|
|
1660
|
+
*/
|
|
1661
|
+
const translate = async (source) => translateRouteText
|
|
1662
|
+
? (await translateRouteText(source)).trim() || source
|
|
1663
|
+
: source;
|
|
1664
|
+
const metaField = async (source) => ({ msgId: 0, source, value: await translate(source) });
|
|
1665
|
+
const title = loadedTree.pageMeta?.title ?? await metaField(descriptor.title);
|
|
1666
|
+
const description = loadedTree.pageMeta?.description
|
|
1667
|
+
?? (descriptor.description ? await metaField(descriptor.description) : null);
|
|
1668
|
+
const shareImageAssetId = descriptor.shareImage
|
|
1669
|
+
&& loadedTree.page.layoutConfig?.[PHI_PAGE_SHARE_IMAGE_CONFIG_KEY] === undefined
|
|
1670
|
+
? await media.asset(descriptor.shareImage.asset)
|
|
1671
|
+
: null;
|
|
1672
|
+
const tree = {
|
|
1673
|
+
...loadedTree,
|
|
1674
|
+
...(shareImageAssetId !== null
|
|
1675
|
+
? {
|
|
1676
|
+
page: {
|
|
1677
|
+
...loadedTree.page,
|
|
1678
|
+
layoutConfig: {
|
|
1679
|
+
...loadedTree.page.layoutConfig,
|
|
1680
|
+
[PHI_PAGE_SHARE_IMAGE_CONFIG_KEY]: { assetId: shareImageAssetId },
|
|
1681
|
+
},
|
|
1655
1682
|
},
|
|
1656
|
-
|
|
1657
|
-
},
|
|
1658
|
-
}
|
|
1683
|
+
}
|
|
1684
|
+
: {}),
|
|
1685
|
+
pageMeta: { ...loadedTree.pageMeta, title, description },
|
|
1686
|
+
};
|
|
1659
1687
|
assertPhiCmsPresetTreeContract(tree, page, catalog.formDefinitionsById);
|
|
1660
1688
|
return tree;
|
|
1661
1689
|
}
|
|
@@ -38,6 +38,10 @@ export declare const PHI_EDITOR_RUNTIME_MODULE_ROUTES: (PhiCmsRoutePresetDescrip
|
|
|
38
38
|
path: string;
|
|
39
39
|
landingPage?: true;
|
|
40
40
|
title: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
shareImage?: {
|
|
43
|
+
asset: string;
|
|
44
|
+
};
|
|
41
45
|
defaultPageFlags?: number;
|
|
42
46
|
loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
|
|
43
47
|
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS } from "../../../../constants/cms-layout-types";
|
|
2
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
2
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
3
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
4
4
|
import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
|
|
5
5
|
import { canPhiViewerAccess, PHI_VIEWER_ACCESS_PUBLISHING } from "../../../../types/access";
|
|
@@ -70,6 +70,8 @@ export async function buildPhiDefaultEditorReleasesPageTree({ page, runtime, })
|
|
|
70
70
|
typeKey: "table",
|
|
71
71
|
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[1].slotIndex,
|
|
72
72
|
sortOrder: 10,
|
|
73
|
+
// The Module's Label Set, translated already.
|
|
74
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
73
75
|
label: labels.widgetLabel,
|
|
74
76
|
config: {
|
|
75
77
|
source: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
2
2
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
3
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
4
|
import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
|
|
5
5
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
6
6
|
import { createPhiSignalAddress, PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
|
|
@@ -284,6 +284,8 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
284
284
|
typeKey: "table",
|
|
285
285
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
286
286
|
sortOrder: 0,
|
|
287
|
+
// The Module's Label Set, translated already.
|
|
288
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
287
289
|
label: labels.groups.title,
|
|
288
290
|
config: {
|
|
289
291
|
source: {
|
|
@@ -409,6 +411,8 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
409
411
|
// Its own slot: one slot holds one direct node, so the two tables stack rather than collide.
|
|
410
412
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX + 1,
|
|
411
413
|
sortOrder: 1,
|
|
414
|
+
// The Module's Label Set, translated already.
|
|
415
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
412
416
|
label: labels.members.title,
|
|
413
417
|
config: {
|
|
414
418
|
...buildPhiGroupMembersTable({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
2
2
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
3
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
4
|
import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
|
|
5
5
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
6
6
|
import { createPhiSignalAddress, PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
|
|
@@ -111,6 +111,8 @@ export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
|
|
|
111
111
|
typeKey: "table",
|
|
112
112
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
113
113
|
sortOrder: 0,
|
|
114
|
+
// The Module's Label Set, translated already.
|
|
115
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
114
116
|
label: labels.mine.title,
|
|
115
117
|
config: {
|
|
116
118
|
source: {
|
|
@@ -198,6 +200,8 @@ export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
|
|
|
198
200
|
typeKey: "table",
|
|
199
201
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX + 1,
|
|
200
202
|
sortOrder: 1,
|
|
203
|
+
// The Module's Label Set, translated already.
|
|
204
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
201
205
|
label: labels.members.title,
|
|
202
206
|
config: {
|
|
203
207
|
...buildPhiGroupMembersTable({ labels, audience: "colleagues" }),
|
|
@@ -37,6 +37,10 @@ export declare const PHI_LOCALIZATION_RUNTIME_MODULE_ROUTES: (PhiCmsRoutePresetD
|
|
|
37
37
|
path: string;
|
|
38
38
|
landingPage?: true;
|
|
39
39
|
title: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
shareImage?: {
|
|
42
|
+
asset: string;
|
|
43
|
+
};
|
|
40
44
|
defaultPageFlags?: number;
|
|
41
45
|
loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
|
|
42
46
|
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-id";
|
|
2
2
|
import { PHI_LOCALIZATION_RUNTIME_MODULE_ID } from "../ids";
|
|
3
3
|
import { PHI_CMS_DEFAULT_SLOT_INDEX, } from "../../../../constants/cms-layout-types";
|
|
4
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
5
5
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
6
6
|
import { createPhiSignalAddress, PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
|
|
7
7
|
import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
|
|
@@ -128,6 +128,8 @@ export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
|
|
|
128
128
|
parentLayoutNodeId: SYNTHETIC_ADMIN_LOCALES_LAYOUT_IDS.layoutGrid,
|
|
129
129
|
typeKey: "table",
|
|
130
130
|
slotIndex: 1,
|
|
131
|
+
// The Module's Label Set, translated already.
|
|
132
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
131
133
|
label: labels.widgetLabel,
|
|
132
134
|
config: {
|
|
133
135
|
source: {
|
package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
2
2
|
import { PHI_CMS_DEFAULT_SLOT_INDEX, PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS, } from "../../../../constants/cms-layout-types";
|
|
3
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
5
5
|
import { createPhiSignalAddress, createPhiSignalSubcontrolAddress } from "../../../../types/signals";
|
|
6
6
|
import { PHI_EDITOR_TRANSLATION_FORM_WIDGET_ID, PHI_EDITOR_TRANSLATION_COMMANDS_WIDGET_ID, PHI_EDITOR_TRANSLATION_OVERLAY_ID, PHI_EDITOR_TRANSLATION_OVERLAY_FOOTER_LAYOUT_ID, PHI_EDITOR_TRANSLATION_OVERLAY_LAYOUT_ID, PHI_EDITOR_TRANSLATIONS_SOURCE_LOCALE_WIDGET_ID, PHI_EDITOR_TRANSLATIONS_WIDGET_ID, } from "./editor-translations-shell";
|
|
@@ -67,7 +67,7 @@ export async function buildPhiDefaultEditorTranslationsPageTree({ page, runtime,
|
|
|
67
67
|
label: "editor translation edit modal",
|
|
68
68
|
config: {
|
|
69
69
|
title: widgetLabels.actions.edit,
|
|
70
|
-
|
|
70
|
+
size: { width: 720 },
|
|
71
71
|
mountPolicy: "remount",
|
|
72
72
|
closeMode: "request",
|
|
73
73
|
signalRoutes: {
|
|
@@ -136,6 +136,8 @@ export async function buildPhiDefaultEditorTranslationsPageTree({ page, runtime,
|
|
|
136
136
|
typeKey: "table",
|
|
137
137
|
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[1].slotIndex,
|
|
138
138
|
sortOrder: 10,
|
|
139
|
+
// The Module's Label Set, translated already.
|
|
140
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
139
141
|
label: labels.widgetLabel,
|
|
140
142
|
config: {
|
|
141
143
|
source: {
|
|
@@ -44,6 +44,10 @@ export declare const PHI_NEWS_RUNTIME_MODULE_ROUTES: ({
|
|
|
44
44
|
path: string;
|
|
45
45
|
landingPage?: true;
|
|
46
46
|
title: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
shareImage?: {
|
|
49
|
+
asset: string;
|
|
50
|
+
};
|
|
47
51
|
defaultPageFlags?: number;
|
|
48
52
|
loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
|
|
49
53
|
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-id";
|
|
2
2
|
import { PHI_OBSERVABILITY_RUNTIME_MODULE_ID } from "../ids";
|
|
3
3
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
4
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
5
5
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
6
6
|
import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
|
|
7
7
|
import { getPhiAdminLogsPageLabels } from "./admin-logs-label-set";
|
|
@@ -57,7 +57,7 @@ export async function buildPhiDefaultAdminLogsPageTree({ page, runtime, }) {
|
|
|
57
57
|
label: "observability log detail modal",
|
|
58
58
|
config: {
|
|
59
59
|
title: widgetLabels.detail.title,
|
|
60
|
-
width: 960,
|
|
60
|
+
size: { width: 960 },
|
|
61
61
|
mountPolicy: "lazy-keep",
|
|
62
62
|
/*
|
|
63
63
|
* Which row action this modal is for, which it has to say itself.
|
|
@@ -115,6 +115,8 @@ export async function buildPhiDefaultAdminLogsPageTree({ page, runtime, }) {
|
|
|
115
115
|
typeKey: "table",
|
|
116
116
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
117
117
|
sortOrder: 0,
|
|
118
|
+
// The Module's Label Set, translated already.
|
|
119
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
118
120
|
label: labels.tableLabel,
|
|
119
121
|
config: {
|
|
120
122
|
source: {
|
|
@@ -249,6 +251,8 @@ export async function buildPhiDefaultAdminLogsPageTree({ page, runtime, }) {
|
|
|
249
251
|
typeKey: "record",
|
|
250
252
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
251
253
|
sortOrder: 0,
|
|
254
|
+
// The Module's Label Set, translated already.
|
|
255
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
252
256
|
label: "observability log record",
|
|
253
257
|
config: {
|
|
254
258
|
source: {
|
|
@@ -405,6 +405,23 @@ export function collectPhiRuntimeDataProviderKeys({ moduleSet, trees, }) {
|
|
|
405
405
|
readPhiCollectionViewItemRendererKey(widgetConfig, moduleSet) === PHI_MEDIA_LIBRARY_ITEM_RENDERER_KEY) {
|
|
406
406
|
collected.add(PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection);
|
|
407
407
|
}
|
|
408
|
+
/*
|
|
409
|
+
* A Markdown text's Table embeds read the Provider their active Module names (TABLES.md), found in its
|
|
410
|
+
* source -- its own or its Content record's. One a code sample quotes mounts a Provider, never a Table.
|
|
411
|
+
*/
|
|
412
|
+
if (widget.widgetType === PhiCmsWidgetType.Markdown) {
|
|
413
|
+
const sources = [widgetConfig.markdown, widget.resolvedContent?.textFields.markdown?.source];
|
|
414
|
+
const keys = sources.flatMap((source) => typeof source === "string"
|
|
415
|
+
? [...source.matchAll(/!\[[^\]\n]*\]\(\s*<?phis:table\/([^\s?#)>]+)/gu)].map((match) => match[1])
|
|
416
|
+
: []);
|
|
417
|
+
for (const key of keys) {
|
|
418
|
+
for (const definition of moduleSet.moduleDefinitionsById.values()) {
|
|
419
|
+
const providerKey = definition.embeddableTables?.find((embed) => embed.key === key)?.source.providerKey;
|
|
420
|
+
if (providerKey && knownProviderKeys.has(providerKey))
|
|
421
|
+
collected.add(providerKey);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
408
425
|
if (widget.widgetType === PhiCmsWidgetType.Form) {
|
|
409
426
|
const formId = parsePhiFormWidgetConfig(widgetConfig).formId;
|
|
410
427
|
const form = formId ? moduleSet.formDefinitionsById.get(formId) : null;
|
|
@@ -11,8 +11,9 @@ import { usePhiApplicationFeedback } from "../../../../components/runtime/use-ph
|
|
|
11
11
|
import { getPhiWorkspaceCatalogSnapshot, usePhiWorkspaceCatalogValue, } from "../../../../components/workspace/catalog-store";
|
|
12
12
|
import { PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM, PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, PHI_BUILDER_THEME_KEY_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderPageSearchParam, normalizePhiBuilderRevisionsKindSearchParam, } from "../../../../helpers/cms-scope-search-params";
|
|
13
13
|
import { resolvePhiBuilderRevisionPagePath, } from "../types";
|
|
14
|
-
import {
|
|
14
|
+
import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, } from "../../../../helpers/cms-page-catalog";
|
|
15
15
|
import { PHI_REVISIONS_RUNTIME_CONTROLLER_DEFINITION, } from "../controller/definition";
|
|
16
|
+
import { resolvePhiRevisionsDraftContextTarget } from "./draft-context-target";
|
|
16
17
|
import { resolvePhiBuilderRevisionNavScopeKey } from "../../../../helpers/cms-navigation-scope-key";
|
|
17
18
|
import { deleteCmsDraft } from "../../../../helpers/cms-draft-delete";
|
|
18
19
|
import { isPhiRecord } from "../../../../helpers/is-record";
|
|
@@ -181,6 +182,15 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
181
182
|
else if (kind === "theme" && scopeKey) {
|
|
182
183
|
search.set(PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, scopeKey);
|
|
183
184
|
}
|
|
185
|
+
/*
|
|
186
|
+
* Only a changed address is a navigation. The Table hands every scope it is given back to this
|
|
187
|
+
* Controller, and replacing the address with itself still fetches the Page from the server, whose
|
|
188
|
+
* answer refreshes the workspace catalog, which makes this Controller hand the scope to the Table
|
|
189
|
+
* again: a page scope asked for its history and the Page about once a second for as long as it
|
|
190
|
+
* stood open.
|
|
191
|
+
*/
|
|
192
|
+
if (search.toString() === window.location.search.replace(/^\?/, ""))
|
|
193
|
+
return;
|
|
184
194
|
router.replace(`${pathname}?${search.toString()}`, { scroll: false });
|
|
185
195
|
return;
|
|
186
196
|
}
|
|
@@ -193,21 +203,13 @@ function PhiRevisionsControllerMount({ address, config, }) {
|
|
|
193
203
|
const area = scope?.area;
|
|
194
204
|
if (key === "restore" || key === "resetPage") {
|
|
195
205
|
const structural = (kind === "area" || kind === "page") && isPhiBuilderAreaKey(area);
|
|
196
|
-
|
|
197
|
-
if (kind === "page" && isPhiBuilderAreaKey(area) && typeof scope?.path === "string") {
|
|
198
|
-
const state = getPhiWorkspaceCatalogSnapshot();
|
|
199
|
-
const pages = resolvePhiBuilderActivePageCatalog(area, state.modulePresetPagesByArea, state.customPages, state.persistedPageCatalogByArea);
|
|
200
|
-
pageKey = findPhiBuilderPageKeyFromStoragePath(area, scope.path, pages)
|
|
201
|
-
?? resolvePhiBuilderPageKeyFromCatalogPath(area, scope.path, pages);
|
|
202
|
-
}
|
|
206
|
+
const target = resolvePhiRevisionsDraftContextTarget(scope, action?.areaModules === true, getPhiWorkspaceCatalogSnapshot());
|
|
203
207
|
reportDraftStatus({
|
|
204
208
|
status: key === "restore" ? "draft" : "published",
|
|
205
209
|
revisionId: typeof action?.restoredRevisionId === "number" ? action.restoredRevisionId : null,
|
|
206
210
|
...(kind === "navigation" ? { navKey: scope?.navKey } : {}),
|
|
207
211
|
...(kind === "theme" ? { themeKey: scope?.themeKey } : {}),
|
|
208
|
-
...(
|
|
209
|
-
...(pageKey !== null ? { pageKey } : {}),
|
|
210
|
-
...(action?.areaModules === true ? { areaModules: true } : {}),
|
|
212
|
+
...(target ?? {}),
|
|
211
213
|
}, signal.correlationId);
|
|
212
214
|
if (structural) {
|
|
213
215
|
router.refresh();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type PhiBuilderAreaKey } from "../../../../constants/cms-areas";
|
|
2
|
+
import type { PhiWorkspaceCatalogState } from "../../../../components/workspace/catalog-state";
|
|
3
|
+
/**
|
|
4
|
+
* The Builder context a revision action superseded, as the `draftStatus` broadcast names it: the Area's
|
|
5
|
+
* Module selection (`areaModules`), one Page (`pageKey`), or -- with the Area alone -- its Shell.
|
|
6
|
+
*/
|
|
7
|
+
export type PhiRevisionsDraftContextTarget = {
|
|
8
|
+
area: PhiBuilderAreaKey;
|
|
9
|
+
areaModules: true;
|
|
10
|
+
} | {
|
|
11
|
+
area: PhiBuilderAreaKey;
|
|
12
|
+
pageKey: string;
|
|
13
|
+
} | {
|
|
14
|
+
area: PhiBuilderAreaKey;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Which cached Builder context a restore or a Page reset replaced, read off the scope the Revisions
|
|
18
|
+
* Table acted on.
|
|
19
|
+
*
|
|
20
|
+
* A Page scope names its Page by storage path when it is the Site's own, and by preset identity when it
|
|
21
|
+
* is a Module's -- then its `path` is null. A Page scope that names no Page of the catalog has no target:
|
|
22
|
+
* the Area alone means its Shell, and discarding the Shell's edits for a Page's revision lost them while
|
|
23
|
+
* the Page kept showing what was replaced.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolvePhiRevisionsDraftContextTarget(scope: Readonly<Record<string, unknown>> | null, areaModules: boolean, catalog: Pick<PhiWorkspaceCatalogState, "modulePresetPagesByArea" | "customPages" | "persistedPageCatalogByArea">): PhiRevisionsDraftContextTarget | null;
|