@phis/ui 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/cms/phi-cms-layout-renderer.js +17 -7
- package/components/controls/phi-cascader-control.d.ts +9 -1
- package/components/controls/phi-cascader-control.js +25 -3
- package/components/controls/phi-money-control.d.ts +39 -0
- package/components/controls/phi-money-control.js +34 -0
- package/components/controls/phi-number-control.d.ts +6 -1
- package/components/controls/phi-number-control.js +3 -3
- package/components/controls/phi-options-provider.d.ts +7 -0
- package/components/controls/phi-options-provider.js +11 -0
- package/components/forms/extended-form-field-controls.d.ts +1 -0
- package/components/forms/extended-form-field-controls.js +23 -1
- package/components/forms/form-descriptor-runtime-client.js +13 -0
- package/components/forms/form-provider-contract.d.ts +43 -0
- package/components/forms/form-provider-contract.js +40 -0
- package/components/forms/money-field.d.ts +27 -0
- package/components/forms/money-field.js +78 -0
- package/components/forms/shared-form-provider-registry.js +4 -0
- package/components/layouts/clients/phi-flex-layout-client.js +17 -2
- package/components/layouts/clients/phi-layout-anchored-overlay.d.ts +2 -0
- package/components/layouts/clients/phi-layout-anchored-overlay.js +2 -0
- package/components/media/phi-media-picker-binding.js +6 -1
- package/components/media/phi-site-font-assets.js +6 -1
- package/components/motion/phi-sequence-run.d.ts +14 -1
- package/components/motion/phi-sequence-run.js +22 -3
- package/components/motion/phi-sequence-viewport.js +3 -1
- package/components/regions/presets/content-entry-editor-page-tree.js +5 -1
- package/components/regions/presets/content-entry-public-page-trees.js +2 -0
- package/components/tables/client/phi-table-binding.js +16 -3
- package/components/trees/client/phi-tree-binding.js +6 -2
- package/components/widgets/builder/stack-tabs.d.ts +2 -1
- package/components/widgets/builder/stack-tabs.js +18 -2
- package/components/widgets/client/shared/phi-collection-view-binding.js +10 -2
- package/components/widgets/client/shared/phi-rendered-value.d.ts +9 -1
- package/components/widgets/client/shared/phi-rendered-value.js +20 -1
- package/components/widgets/config/choice-shared.d.ts +1 -49
- package/components/widgets/config/choice-shared.js +0 -1
- package/components/widgets/config/stack-tabs.js +4 -3
- package/components/widgets/label-sets/gallery.js +6 -0
- package/components/widgets/label-sets/interval.d.ts +4 -0
- package/components/widgets/label-sets/interval.js +31 -0
- package/components/widgets/label-sets/record.js +6 -1
- package/components/widgets/label-sets/slot-upload.d.ts +4 -0
- package/components/widgets/label-sets/slot-upload.js +36 -0
- package/components/widgets/label-sets/table.js +6 -1
- package/components/widgets/label-types/gallery.d.ts +7 -0
- package/components/widgets/label-types/gallery.js +6 -0
- package/components/widgets/label-types/interval.d.ts +16 -0
- package/components/widgets/label-types/interval.js +21 -0
- package/components/widgets/label-types/record.d.ts +3 -0
- package/components/widgets/label-types/record.js +2 -0
- package/components/widgets/label-types/slot-upload.d.ts +24 -0
- package/components/widgets/label-types/slot-upload.js +16 -0
- package/components/widgets/label-types/table.d.ts +3 -0
- package/components/widgets/label-types/table.js +2 -0
- package/constants/record-field-kinds.d.ts +1 -1
- package/constants/record-field-kinds.js +1 -1
- package/constants/runtime-module-ownership.js +1 -0
- package/controls.d.ts +7 -0
- package/controls.js +4 -0
- package/helpers/cms-dialog.d.ts +39 -3
- package/helpers/cms-dialog.js +46 -4
- package/helpers/cms-page-catalog.d.ts +8 -0
- package/helpers/cms-page-catalog.js +18 -2
- package/helpers/cms-preset-nodes.d.ts +13 -3
- package/helpers/cms-preset-nodes.js +3 -2
- package/helpers/config-text-fields.d.ts +49 -0
- package/helpers/config-text-fields.js +122 -0
- package/helpers/money-amount.d.ts +48 -0
- package/helpers/money-amount.js +131 -0
- package/helpers/page-layout-check.js +15 -2
- package/helpers/preset-text-source-check.d.ts +22 -0
- package/helpers/preset-text-source-check.js +45 -0
- package/helpers/record-fields.d.ts +18 -5
- package/helpers/record-fields.js +38 -13
- package/helpers/text-source.d.ts +14 -5
- package/helpers/text-source.js +16 -3
- package/module-page-check.d.ts +1 -0
- package/module-page-check.js +1 -0
- package/module-records.d.ts +6 -3
- package/module-records.js +4 -2
- package/package.json +2 -2
- package/plugins/runtime/phi-slot-child-frame-view.js +1 -1
- package/plugins/runtime/slot-size-policy.d.ts +8 -2
- package/plugins/runtime/slot-size-policy.js +51 -16
- package/plugins/runtime-modules/accounting/module.d.ts +1 -1
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-page-tree.js +2 -0
- package/plugins/runtime-modules/app/module.d.ts +1 -1
- package/plugins/runtime-modules/asset/services/collection.js +1 -0
- package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +2 -2
- package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +3 -0
- package/plugins/runtime-modules/builder/clients/widget-inspector.js +2 -2
- package/plugins/runtime-modules/builder/offered-page-catalog.js +3 -3
- package/plugins/runtime-modules/builder/options-providers.js +7 -0
- package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -0
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +17 -3
- package/plugins/runtime-modules/contracts.d.ts +1 -1
- package/plugins/runtime-modules/core/definition.d.ts +43 -0
- package/plugins/runtime-modules/core/form-providers.d.ts +43 -0
- package/plugins/runtime-modules/core/widgets/breadcrumb/client.d.ts +6 -3
- package/plugins/runtime-modules/core/widgets/breadcrumb/client.js +6 -5
- package/plugins/runtime-modules/core/widgets/breadcrumb/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/breadcrumb/server.d.ts +9 -1
- package/plugins/runtime-modules/core/widgets/breadcrumb/server.js +29 -3
- package/plugins/runtime-modules/core/widgets/button/config.d.ts +0 -1
- package/plugins/runtime-modules/core/widgets/button/config.js +0 -1
- package/plugins/runtime-modules/core/widgets/button/plugin.js +6 -25
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +18 -2
- package/plugins/runtime-modules/core/widgets/card/config.js +16 -1
- package/plugins/runtime-modules/core/widgets/card/plugin.js +8 -10
- package/plugins/runtime-modules/core/widgets/card/server.d.ts +1 -2
- package/plugins/runtime-modules/core/widgets/card/server.js +16 -28
- package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +4 -3
- package/plugins/runtime-modules/core/widgets/cascader/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/cascader/config.d.ts +8 -2
- package/plugins/runtime-modules/core/widgets/cascader/config.js +22 -0
- package/plugins/runtime-modules/core/widgets/checkbox-group/config.d.ts +8 -2
- package/plugins/runtime-modules/core/widgets/checkbox-group/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +2 -1
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +2 -2
- package/plugins/runtime-modules/core/widgets/entry-list/config.js +0 -1
- package/plugins/runtime-modules/core/widgets/entry-list/plugin.js +1 -3
- package/plugins/runtime-modules/core/widgets/entry-list/server.d.ts +1 -3
- package/plugins/runtime-modules/core/widgets/entry-list/server.js +3 -3
- package/plugins/runtime-modules/core/widgets/gallery/authoring.js +12 -3
- package/plugins/runtime-modules/core/widgets/gallery/client.js +10 -1
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/gallery/config.js +8 -0
- package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/image/server.js +5 -9
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +2 -1
- package/plugins/runtime-modules/core/widgets/markdown-toc/server.js +3 -5
- package/plugins/runtime-modules/core/widgets/multi-select/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/quick-links/plugin.js +2 -4
- package/plugins/runtime-modules/core/widgets/quick-links/server.d.ts +2 -5
- package/plugins/runtime-modules/core/widgets/quick-links/server.js +2 -6
- package/plugins/runtime-modules/core/widgets/record/client.js +8 -2
- package/plugins/runtime-modules/core/widgets/record/config.js +4 -0
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +2 -2
- package/plugins/runtime-modules/core/widgets/result/config.js +0 -1
- package/plugins/runtime-modules/core/widgets/result/plugin.js +2 -4
- package/plugins/runtime-modules/core/widgets/result/server.d.ts +2 -3
- package/plugins/runtime-modules/core/widgets/result/server.js +11 -33
- package/plugins/runtime-modules/core/widgets/segmented/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/select-box/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +2 -1
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/slider/config.d.ts +11 -0
- package/plugins/runtime-modules/core/widgets/slider/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/slot-upload/authoring.js +2 -1
- package/plugins/runtime-modules/core/widgets/slot-upload/client.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/slot-upload/client.js +45 -24
- package/plugins/runtime-modules/core/widgets/slot-upload/config.d.ts +11 -4
- package/plugins/runtime-modules/core/widgets/slot-upload/config.js +16 -1
- package/plugins/runtime-modules/core/widgets/slot-upload/plugin.js +2 -2
- package/plugins/runtime-modules/core/widgets/slot-upload/server.d.ts +8 -3
- package/plugins/runtime-modules/core/widgets/slot-upload/server.js +9 -3
- package/plugins/runtime-modules/core/widgets/spacer/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/spacer/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/steps/config.d.ts +8 -3
- package/plugins/runtime-modules/core/widgets/steps/config.js +1 -2
- package/plugins/runtime-modules/core/widgets/steps/plugin.js +6 -30
- package/plugins/runtime-modules/core/widgets/table/client.js +4 -4
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +6 -3
- package/plugins/runtime-modules/core/widgets/table/config.js +4 -1
- package/plugins/runtime-modules/core/widgets/timeline/config.d.ts +8 -1
- package/plugins/runtime-modules/core/widgets/timeline/config.js +1 -2
- package/plugins/runtime-modules/core/widgets/timeline/plugin.js +6 -37
- package/plugins/runtime-modules/descriptor-compiler.d.ts +11 -1
- package/plugins/runtime-modules/descriptor-compiler.js +49 -8
- package/plugins/runtime-modules/groups/definition.d.ts +1 -1
- package/plugins/runtime-modules/groups/forms.d.ts +18 -0
- package/plugins/runtime-modules/groups/forms.js +2 -2
- package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +8 -4
- package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +2 -0
- package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +3 -0
- package/plugins/runtime-modules/page-preset-overlays.d.ts +18 -0
- package/plugins/runtime-modules/page-preset-overlays.js +70 -0
- package/plugins/runtime-modules/public/module.d.ts +1 -1
- package/plugins/runtime-modules/public/trees/phi-default-pub-welcome-page-tree.js +1 -0
- package/plugins/runtime-modules/resolver.js +5 -0
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +5 -2
- package/plugins/runtime-modules/search/widgets/search-box/server.js +3 -5
- package/plugins/runtime-modules/search/widgets/search-results/server.js +3 -5
- package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +4 -0
- package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +6 -2
- package/plugins/runtime-modules/user-management/controller/client.js +6 -1
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +5 -3
- package/runtime-render-client.d.ts +1 -1
- package/runtime-render-client.js +2 -1
- package/server-helpers/cms-page-record.d.ts +2 -2
- package/server-helpers/cms-page-record.js +15 -5
- package/server-helpers/cms-request.js +34 -12
- package/server-helpers/cms-widget-texts.d.ts +14 -0
- package/server-helpers/cms-widget-texts.js +117 -0
- package/server-helpers/record-fields.d.ts +1 -1
- package/server-helpers/record-fields.js +1 -2
- package/server-helpers/record-samples.d.ts +4 -4
- package/server-helpers/record-samples.js +10 -2
- package/server-helpers/search-index.js +12 -3
- package/styles/root.css +6 -2
- package/types/cms-module-descriptors.d.ts +3 -0
- package/types/cms-plugins.d.ts +38 -5
- package/types/collection-provider.d.ts +7 -0
- package/types/core-widget-placements.d.ts +37 -0
- package/types/record-provider.d.ts +19 -3
- package/types/slot-size-policy.d.ts +19 -2
- package/types/table-widget.d.ts +33 -1
- package/types/table-widget.js +1 -0
- package/types/tree-widget.d.ts +7 -0
- package/types/widget-runtime.d.ts +1 -1
- package/types.d.ts +1 -0
package/module-records.d.ts
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* types say what it is asked with, `fetchPhiSiteApi` asks Core with the credentials the context carries,
|
|
8
8
|
* and `resolvePhiRecordSource` is how one of the package's Server Widgets reads the record its binding
|
|
9
9
|
* names -- once per request, however many Widgets are bound to it. `resolvePhiPageRecordFields` reads the
|
|
10
|
-
* declared fields of the record the Page is about, through the same read
|
|
10
|
+
* declared fields of the record the Page is about, through the same read; `readPhiPageRecordField` picks
|
|
11
|
+
* one of them by kind, and `resolvePhiWidgetRecordField` is the whole step a bound Widget takes -- the
|
|
12
|
+
* same one Core's own Widgets take.
|
|
11
13
|
*
|
|
12
14
|
* `PhiWidgetFailureServer` is what such a Widget renders when that read, or its binding, fails: the error
|
|
13
15
|
* card in the Builder, nothing on a live page, and the `cms.widget.unavailable` warning either way. It is
|
|
@@ -15,9 +17,10 @@
|
|
|
15
17
|
* in `@phis/ui/runtime/data-provider-client`.
|
|
16
18
|
*/
|
|
17
19
|
import "server-only";
|
|
18
|
-
export type {
|
|
20
|
+
export type { PhiRecordFieldKind } from "./constants/record-field-kinds";
|
|
21
|
+
export type { PhiRecordField, PhiRecordFieldValueByKind, PhiRecordLink, PhiRecordPicture, PhiRecordSample, PhiRecordTag, PhiRuntimeModuleRecordProviderServerDefinition, PhiRuntimeRecordFieldsReader, PhiRuntimeRecordProviderContext, PhiRuntimeRecordProviderResolver, PhiRuntimeRecordSamplesReader, } from "./types/record-provider";
|
|
19
22
|
export { resolvePhiRecordSource, type PhiRecordSourceResult } from "./server-helpers/record-source";
|
|
20
|
-
export { resolvePhiPageRecordFields, type PhiPageRecordFieldsResult } from "./server-helpers/record-fields";
|
|
23
|
+
export { readPhiPageRecordField, resolvePhiPageRecordFields, resolvePhiWidgetRecordField, type PhiPageRecordFieldsResult, type PhiWidgetRecordField, } from "./server-helpers/record-fields";
|
|
21
24
|
export { fetchPhiSiteApi, type PhiSiteApiRequest } from "./gateway/site-api-request";
|
|
22
25
|
export { PhiWidgetFailureServer } from "./components/widgets/shared/widget-failure.server";
|
|
23
26
|
export type { PhiWidgetFailureProps } from "./components/widgets/shared/widget-failure";
|
package/module-records.js
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* types say what it is asked with, `fetchPhiSiteApi` asks Core with the credentials the context carries,
|
|
8
8
|
* and `resolvePhiRecordSource` is how one of the package's Server Widgets reads the record its binding
|
|
9
9
|
* names -- once per request, however many Widgets are bound to it. `resolvePhiPageRecordFields` reads the
|
|
10
|
-
* declared fields of the record the Page is about, through the same read
|
|
10
|
+
* declared fields of the record the Page is about, through the same read; `readPhiPageRecordField` picks
|
|
11
|
+
* one of them by kind, and `resolvePhiWidgetRecordField` is the whole step a bound Widget takes -- the
|
|
12
|
+
* same one Core's own Widgets take.
|
|
11
13
|
*
|
|
12
14
|
* `PhiWidgetFailureServer` is what such a Widget renders when that read, or its binding, fails: the error
|
|
13
15
|
* card in the Builder, nothing on a live page, and the `cms.widget.unavailable` warning either way. It is
|
|
@@ -16,6 +18,6 @@
|
|
|
16
18
|
*/
|
|
17
19
|
import "server-only";
|
|
18
20
|
export { resolvePhiRecordSource } from "./server-helpers/record-source";
|
|
19
|
-
export { resolvePhiPageRecordFields } from "./server-helpers/record-fields";
|
|
21
|
+
export { readPhiPageRecordField, resolvePhiPageRecordFields, resolvePhiWidgetRecordField, } from "./server-helpers/record-fields";
|
|
20
22
|
export { fetchPhiSiteApi } from "./gateway/site-api-request";
|
|
21
23
|
export { PhiWidgetFailureServer } from "./components/widgets/shared/widget-failure.server";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phis/ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
"@lexical/rich-text": "0.50.0",
|
|
517
517
|
"@lexical/selection": "0.50.0",
|
|
518
518
|
"@lexical/utils": "0.50.0",
|
|
519
|
-
"@phis/contracts": "^0.7.
|
|
519
|
+
"@phis/contracts": "^0.7.9",
|
|
520
520
|
"dayjs": "^1.11.23",
|
|
521
521
|
"dom-serializer": "^2.0.0",
|
|
522
522
|
"htmlparser2": "^10.1.0",
|
|
@@ -31,7 +31,7 @@ export function PhiSlotChildFrameView({ kind, slotSizePolicy, surfacePolicy, blo
|
|
|
31
31
|
* whatever reads its attributes, and a frame carrying a width of its own while announcing "fill"
|
|
32
32
|
* makes every reader below it wrong in the same way at once.
|
|
33
33
|
*/
|
|
34
|
-
const policy = resolvePhiEffectiveSlotSizePolicy(resolvePhiSlotSizePolicy(slotSizePolicy, kind), {
|
|
34
|
+
const policy = resolvePhiEffectiveSlotSizePolicy(resolvePhiSlotSizePolicy(slotSizePolicy, kind, config), {
|
|
35
35
|
explicitInlineSize: resolvedExplicitInlineSize,
|
|
36
36
|
explicitBlockSize: resolvedExplicitBlockSize,
|
|
37
37
|
});
|
|
@@ -17,7 +17,11 @@ export type PhiSlotChildSizing = {
|
|
|
17
17
|
*/
|
|
18
18
|
queriesRoom: boolean;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* `config` is the config of the block whose policy this is; a by-config policy reads its field there.
|
|
22
|
+
* A caller without the block's config passes `null` and gets `otherwise`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolvePhiSlotSizePolicy(policy: PhiSlotSizePolicy | null | undefined, kind: PhiSlotChildKind, config: Record<string, unknown> | null | undefined): PhiNormalizedSlotSizePolicy;
|
|
21
25
|
export declare function resolvePhiSlotChildExplicitAxes(geometry: PhiResolvedBlockGeometry): {
|
|
22
26
|
explicitInlineSize: boolean;
|
|
23
27
|
explicitBlockSize: boolean;
|
|
@@ -61,7 +65,8 @@ export declare function resolvePhiSlotChildSizeConstraints(geometry: PhiResolved
|
|
|
61
65
|
* `Cannot assign to read only property 'config'` and take the Widget's whole render with it. The account
|
|
62
66
|
* menu was lost to exactly that shape, from a different source; see the Account Widget plugin.
|
|
63
67
|
*
|
|
64
|
-
*
|
|
68
|
+
* Resolved values carry the same information and share nothing, so there is no reference to fill in.
|
|
69
|
+
* The policy is built here as a plain object, `takesRest` included.
|
|
65
70
|
*/
|
|
66
71
|
export declare function resolvePhiSlotChildSizingForConfig(kind: PhiSlotChildKind, slotSizePolicy: PhiSlotSizePolicy | null | undefined, config: PhiRenderableBlockGeometryInput | null | undefined): PhiSlotChildSizing;
|
|
67
72
|
export declare function buildPhiSlotChildClassName(policy: PhiNormalizedSlotSizePolicy): string;
|
|
@@ -75,6 +80,7 @@ export declare function buildPhiSlotChildDataAttributes(policy: PhiNormalizedSlo
|
|
|
75
80
|
}): {
|
|
76
81
|
"data-phi-slot-size-inline": PhiSlotAxisSizePolicy;
|
|
77
82
|
"data-phi-slot-size-block": PhiSlotAxisSizePolicy;
|
|
83
|
+
"data-phi-slot-rest": string | undefined;
|
|
78
84
|
"data-phi-layout-fill-slot": string | undefined;
|
|
79
85
|
"data-phi-layout-explicit-width": string | undefined;
|
|
80
86
|
"data-phi-layout-explicit-height": string | undefined;
|
|
@@ -25,9 +25,30 @@ const PHI_SLOT_CHILD_DEFAULT_POLICY = {
|
|
|
25
25
|
function normalizePhiSlotPolicyAxis(axis, fallback) {
|
|
26
26
|
return axis === "fill" || axis === "fixed" || axis === "intrinsic" ? axis : fallback;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The value a by-config policy holds for this config.
|
|
30
|
+
*
|
|
31
|
+
* Only a top-level config field with a string or boolean value is read (a boolean as the key `"true"` or
|
|
32
|
+
* `"false"`); a missing field, any other value, an unknown value and no config at all give `otherwise`. A policy that is already a value passes through.
|
|
33
|
+
*/
|
|
34
|
+
function resolvePhiSlotSizePolicyValue(policy, config) {
|
|
35
|
+
if (policy == null || typeof policy === "string" || !("configField" in policy)) {
|
|
36
|
+
return policy;
|
|
37
|
+
}
|
|
38
|
+
const field = config?.[policy.configField];
|
|
39
|
+
const selected = typeof field === "boolean" ? String(field) : field;
|
|
40
|
+
return typeof selected === "string" && Object.hasOwn(policy.byValue, selected)
|
|
41
|
+
? policy.byValue[selected]
|
|
42
|
+
: policy.otherwise;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `config` is the config of the block whose policy this is; a by-config policy reads its field there.
|
|
46
|
+
* A caller without the block's config passes `null` and gets `otherwise`.
|
|
47
|
+
*/
|
|
48
|
+
export function resolvePhiSlotSizePolicy(policy, kind, config) {
|
|
29
49
|
const fallback = PHI_SLOT_CHILD_DEFAULT_POLICY[kind];
|
|
30
|
-
|
|
50
|
+
const value = resolvePhiSlotSizePolicyValue(policy, config);
|
|
51
|
+
if (value == null) {
|
|
31
52
|
return fallback;
|
|
32
53
|
}
|
|
33
54
|
/*
|
|
@@ -38,39 +59,46 @@ export function resolvePhiSlotSizePolicy(policy, kind) {
|
|
|
38
59
|
* Layout asked, so nothing moved -- but the word has to mean what it says now that every definition
|
|
39
60
|
* has to say it.
|
|
40
61
|
*/
|
|
41
|
-
if (
|
|
62
|
+
if (value === "intrinsic") {
|
|
42
63
|
return {
|
|
43
64
|
inline: "intrinsic",
|
|
44
65
|
block: "intrinsic",
|
|
45
66
|
};
|
|
46
67
|
}
|
|
47
|
-
if (
|
|
68
|
+
if (value === "fill") {
|
|
48
69
|
return {
|
|
49
70
|
inline: "fill",
|
|
50
71
|
block: "fill",
|
|
51
72
|
};
|
|
52
73
|
}
|
|
53
|
-
if (
|
|
74
|
+
if (value === "rest") {
|
|
75
|
+
return {
|
|
76
|
+
inline: "fill",
|
|
77
|
+
block: "fill",
|
|
78
|
+
takesRest: true,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (value === "fill-inline") {
|
|
54
82
|
return {
|
|
55
83
|
inline: "fill",
|
|
56
84
|
block: "intrinsic",
|
|
57
85
|
};
|
|
58
86
|
}
|
|
59
|
-
if (
|
|
87
|
+
if (value === "fill-block") {
|
|
60
88
|
return {
|
|
61
89
|
inline: "intrinsic",
|
|
62
90
|
block: "fill",
|
|
63
91
|
};
|
|
64
92
|
}
|
|
65
|
-
if (
|
|
93
|
+
if (value === "fixed") {
|
|
66
94
|
return {
|
|
67
95
|
inline: "fixed",
|
|
68
96
|
block: "fixed",
|
|
69
97
|
};
|
|
70
98
|
}
|
|
71
99
|
return {
|
|
72
|
-
inline: normalizePhiSlotPolicyAxis(
|
|
73
|
-
block: normalizePhiSlotPolicyAxis(
|
|
100
|
+
inline: normalizePhiSlotPolicyAxis(value.inline, fallback.inline),
|
|
101
|
+
block: normalizePhiSlotPolicyAxis(value.block, fallback.block),
|
|
74
102
|
};
|
|
75
103
|
}
|
|
76
104
|
export function resolvePhiSlotChildExplicitAxes(geometry) {
|
|
@@ -100,7 +128,11 @@ export function resolvePhiSlotChildExplicitAxes(geometry) {
|
|
|
100
128
|
export function resolvePhiEffectiveSlotSizePolicy(policy, explicit) {
|
|
101
129
|
const inline = explicit?.explicitInlineSize === true ? "fixed" : policy.inline;
|
|
102
130
|
const block = explicit?.explicitBlockSize === true ? "fixed" : policy.block;
|
|
103
|
-
|
|
131
|
+
if (inline === policy.inline && block === policy.block) {
|
|
132
|
+
return policy;
|
|
133
|
+
}
|
|
134
|
+
// The flag is carried as it stands: the Flex Layout asks for it together with a main axis that still fills.
|
|
135
|
+
return policy.takesRest === true ? { inline, block, takesRest: true } : { inline, block };
|
|
104
136
|
}
|
|
105
137
|
export function resolvePhiSlotChildSizeConstraints(geometry) {
|
|
106
138
|
return {
|
|
@@ -121,13 +153,14 @@ export function resolvePhiSlotChildSizeConstraints(geometry) {
|
|
|
121
153
|
* `Cannot assign to read only property 'config'` and take the Widget's whole render with it. The account
|
|
122
154
|
* menu was lost to exactly that shape, from a different source; see the Account Widget plugin.
|
|
123
155
|
*
|
|
124
|
-
*
|
|
156
|
+
* Resolved values carry the same information and share nothing, so there is no reference to fill in.
|
|
157
|
+
* The policy is built here as a plain object, `takesRest` included.
|
|
125
158
|
*/
|
|
126
159
|
export function resolvePhiSlotChildSizingForConfig(kind, slotSizePolicy, config) {
|
|
127
160
|
const geometry = resolvePhiRenderableBlockGeometry(config);
|
|
128
161
|
const explicit = resolvePhiSlotChildExplicitAxes(geometry);
|
|
129
162
|
return {
|
|
130
|
-
policy: resolvePhiEffectiveSlotSizePolicy(resolvePhiSlotSizePolicy(slotSizePolicy, kind), explicit),
|
|
163
|
+
policy: resolvePhiEffectiveSlotSizePolicy(resolvePhiSlotSizePolicy(slotSizePolicy, kind, config), explicit),
|
|
131
164
|
...explicit,
|
|
132
165
|
...resolvePhiSlotChildSizeConstraints(geometry),
|
|
133
166
|
queriesRoom: phiBlockGeometryQueriesRoom(geometry),
|
|
@@ -149,6 +182,7 @@ export function buildPhiSlotChildDataAttributes(policy, options) {
|
|
|
149
182
|
return {
|
|
150
183
|
"data-phi-slot-size-inline": policy.inline,
|
|
151
184
|
"data-phi-slot-size-block": policy.block,
|
|
185
|
+
"data-phi-slot-rest": policy.takesRest === true ? "true" : undefined,
|
|
152
186
|
"data-phi-layout-fill-slot": fillInline || fillBlock ? "true" : undefined,
|
|
153
187
|
"data-phi-layout-explicit-width": explicitInlineSize ? "true" : undefined,
|
|
154
188
|
"data-phi-layout-explicit-height": explicitBlockSize ? "true" : undefined,
|
|
@@ -161,7 +195,7 @@ export function buildPhiSlotChildDataAttributes(policy, options) {
|
|
|
161
195
|
export function resolvePhiSlotChildSizing(child, fallbackKind = "widget") {
|
|
162
196
|
if (!isValidElement(child)) {
|
|
163
197
|
return {
|
|
164
|
-
policy: resolvePhiSlotSizePolicy(undefined, fallbackKind),
|
|
198
|
+
policy: resolvePhiSlotSizePolicy(undefined, fallbackKind, null),
|
|
165
199
|
explicitInlineSize: false,
|
|
166
200
|
explicitBlockSize: false,
|
|
167
201
|
queriesRoom: false,
|
|
@@ -194,7 +228,7 @@ export function resolvePhiSlotChildSizing(child, fallbackKind = "widget") {
|
|
|
194
228
|
|| configExplicit.explicitBlockSize,
|
|
195
229
|
};
|
|
196
230
|
return {
|
|
197
|
-
policy: resolvePhiEffectiveSlotSizePolicy(resolvePhiSlotSizePolicy(props.slotSizePolicy, resolvedKind), explicit),
|
|
231
|
+
policy: resolvePhiEffectiveSlotSizePolicy(resolvePhiSlotSizePolicy(props.slotSizePolicy, resolvedKind, props.config), explicit),
|
|
198
232
|
...explicit,
|
|
199
233
|
...configConstraints,
|
|
200
234
|
queriesRoom,
|
|
@@ -211,14 +245,15 @@ export function resolvePhiSlotChildSizing(child, fallbackKind = "widget") {
|
|
|
211
245
|
props["data-phi-slot-size-block"] === "intrinsic"
|
|
212
246
|
? props["data-phi-slot-size-block"]
|
|
213
247
|
: undefined,
|
|
214
|
-
}, fallbackKind);
|
|
248
|
+
}, fallbackKind, props.config);
|
|
249
|
+
const dataPolicy = props["data-phi-slot-rest"] === "true" ? { ...policy, takesRest: true } : policy;
|
|
215
250
|
const explicit = {
|
|
216
251
|
explicitInlineSize: props["data-phi-layout-explicit-width"] === "true" || configExplicit.explicitInlineSize,
|
|
217
252
|
explicitBlockSize: props["data-phi-layout-explicit-height"] === "true" || configExplicit.explicitBlockSize,
|
|
218
253
|
};
|
|
219
254
|
return {
|
|
220
255
|
// Idempotent: an element that already wrote the effective policy into its attributes says the same again.
|
|
221
|
-
policy: resolvePhiEffectiveSlotSizePolicy(
|
|
256
|
+
policy: resolvePhiEffectiveSlotSizePolicy(dataPolicy, explicit),
|
|
222
257
|
...explicit,
|
|
223
258
|
queriesRoom,
|
|
224
259
|
minInlineSize: configConstraints.minInlineSize ??
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* to the Core Runtime Controller; a Module's own goes into that Module's Controller, mounted on demand.
|
|
5
5
|
*/
|
|
6
6
|
export declare const PHI_ACCOUNTING_RUNTIME_MODULE: {
|
|
7
|
-
icon: string;
|
|
8
7
|
moduleId: "@phis/ui/modules/accounting";
|
|
9
8
|
category: "foundation";
|
|
10
9
|
description: string;
|
|
10
|
+
icon: string;
|
|
11
11
|
serverBinding: import("../../../types").PhiRuntimeModuleServerBinding;
|
|
12
12
|
kind: "module";
|
|
13
13
|
eligibleAreas: readonly ["public" | "app" | "admin" | "builder" | "editor" | "accounting"];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
1
2
|
import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-id";
|
|
2
3
|
import { PHI_SURFACE_CARD } from "../../../../helpers/surface-presets";
|
|
3
4
|
import { PHI_ACCOUNTING_RUNTIME_MODULE_ID } from "../ids";
|
|
@@ -36,6 +37,7 @@ export async function buildPhiDefaultAccountingPageTree({ page, }) {
|
|
|
36
37
|
label: "Accounting",
|
|
37
38
|
config: {
|
|
38
39
|
eyebrow: "Accounting",
|
|
40
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
39
41
|
title: "Accounting",
|
|
40
42
|
description: "Invoices and billing workflows for this site.",
|
|
41
43
|
variant: "compact",
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* to the Core Runtime Controller; a Module's own goes into that Module's Controller, mounted on demand.
|
|
5
5
|
*/
|
|
6
6
|
export declare const PHI_APP_RUNTIME_MODULE: {
|
|
7
|
-
icon: string;
|
|
8
7
|
moduleId: "@phis/ui/modules/app";
|
|
9
8
|
category: "foundation";
|
|
10
9
|
description: string;
|
|
10
|
+
icon: string;
|
|
11
11
|
serverBinding: import("../../../types").PhiRuntimeModuleServerBinding;
|
|
12
12
|
formProviders: {
|
|
13
13
|
handlers: ({
|
|
@@ -48,6 +48,7 @@ function buildMediaQuery(query) {
|
|
|
48
48
|
search.set("until", until);
|
|
49
49
|
return search;
|
|
50
50
|
}
|
|
51
|
+
/** The Media library answers file names and sizes, nothing in a language, so it reads neither `locale` nor `timeZone`. */
|
|
51
52
|
async function queryMediaCollection(request) {
|
|
52
53
|
if (request.resourceKey !== "assets") {
|
|
53
54
|
throw new Error(`Unknown Asset collection "${request.resourceKey}".`);
|
|
@@ -12,7 +12,7 @@ import { createPhiRuntimeFormControllerAddress } from "../../../../components/fo
|
|
|
12
12
|
import { PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
|
|
13
13
|
import { PHI_ASSET_FOLDER_FORM_ID, PHI_ASSET_METADATA_FORM_ID } from "../metadata-form";
|
|
14
14
|
import { PHI_ASSET_INSPECTOR_LAYOUT_IDS, PHI_ASSET_INSPECTOR_OVERLAY_IDS, PHI_ASSET_INSPECTOR_WIDGET_IDS, PHI_ASSET_MEDIA_PAGE_LAYOUT_IDS, PHI_ASSET_MEDIA_PAGE_WIDGET_IDS, } from "../media-page-ids";
|
|
15
|
-
import { PHI_DIALOG_BLEED_BODY_CONFIG, PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG } from "../../../../helpers/cms-dialog";
|
|
15
|
+
import { PHI_DIALOG_BLEED_BODY_CONFIG, PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG, PHI_DIALOG_WIDTH_SINGLE_COLUMN, } from "../../../../helpers/cms-dialog";
|
|
16
16
|
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
|
|
17
17
|
const PHI_ASSET_MEDIA_PAGE_REGION_IDS = {
|
|
18
18
|
regionHeaderBottom: -511,
|
|
@@ -209,7 +209,7 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
|
|
|
209
209
|
config: {
|
|
210
210
|
title: mediaLabels?.editor.createFolderTitle ?? "Create folder",
|
|
211
211
|
controlSize: "medium",
|
|
212
|
-
width:
|
|
212
|
+
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
213
213
|
flags: PhiCmsFlags.Centered,
|
|
214
214
|
mountPolicy: "remount",
|
|
215
215
|
closeMode: "immediate",
|
|
@@ -8,6 +8,7 @@ import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress } from "../../../../ty
|
|
|
8
8
|
import { buildPhiSettingsPageShellTree } from "../../../../components/regions/presets/phi-settings-page-shell-tree";
|
|
9
9
|
import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
|
|
10
10
|
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
|
|
11
|
+
import { PHI_DIALOG_WIDTH_SINGLE_COLUMN } from "../../../../helpers/cms-dialog";
|
|
11
12
|
const SYNTHETIC_AUTH_SETTINGS_REGION_IDS = {
|
|
12
13
|
regionContent: -482,
|
|
13
14
|
};
|
|
@@ -272,6 +273,7 @@ export async function buildPhiDefaultAdminAuthSettingsPageTree({ page, runtime,
|
|
|
272
273
|
title: labels.installations.createTitle,
|
|
273
274
|
openActionKey: "create",
|
|
274
275
|
formId: PHI_AUTH_ADMIN_SETTINGS_FORM_IDS.installationCreate,
|
|
276
|
+
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
275
277
|
label: labels.installations.createTitle,
|
|
276
278
|
submitLabel: labels.submitLabel,
|
|
277
279
|
cancelLabel: labels.installations.confirmCancel,
|
|
@@ -296,6 +298,7 @@ export async function buildPhiDefaultAdminAuthSettingsPageTree({ page, runtime,
|
|
|
296
298
|
title: labels.installations.editTitle,
|
|
297
299
|
openActionKey: "edit",
|
|
298
300
|
formId: PHI_AUTH_ADMIN_SETTINGS_FORM_IDS.installationEdit,
|
|
301
|
+
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
299
302
|
label: labels.installations.editTitle,
|
|
300
303
|
submitLabel: labels.submitLabel,
|
|
301
304
|
cancelLabel: labels.installations.confirmCancel,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { isPhiAuthoredTextField, readPhiTextSource } from "../../../../helpers/text-source";
|
|
3
|
+
import { PHI_TEXT_SOURCE_PRESET, isPhiAuthoredTextField, readPhiTextSource } from "../../../../helpers/text-source";
|
|
4
4
|
import { useEffect } from "react";
|
|
5
5
|
import { PhiGeometryControl } from "../../../../components/controls/phi-geometry-control";
|
|
6
6
|
import { PhiSurfaceControl } from "../../../../components/controls/phi-surface-control";
|
|
@@ -88,7 +88,7 @@ export function PhiDeveloperBuilderWidgetInspectorWidgetClient({ section, builde
|
|
|
88
88
|
* An author writing into a Preset's text makes the Widget's words the Site's: from here on the
|
|
89
89
|
* Site's store translates them, not the global one (`helpers/text-source.ts`).
|
|
90
90
|
*/
|
|
91
|
-
if (readPhiTextSource(currentWidgetSettingsConfigRecord.textSource)
|
|
91
|
+
if (readPhiTextSource(currentWidgetSettingsConfigRecord.textSource) === PHI_TEXT_SOURCE_PRESET
|
|
92
92
|
&& isPhiAuthoredTextField(field)) {
|
|
93
93
|
patch.textSource = undefined;
|
|
94
94
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { resolvePhiBuilderAreaAsCmsArea } from "../../../constants/cms-areas";
|
|
3
3
|
import { choosePhiAreaRootApplicant, resolvePhiAreaLandingSelection, } from "../../../helpers/cms-area-config";
|
|
4
|
-
import { findPhiBuilderPageKeyFromStoragePath, normalizePhiBuilderCmsCatalogPath, resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../helpers/cms-page-catalog";
|
|
4
|
+
import { findPhiBuilderPageKeyFromStoragePath, normalizePhiBuilderCmsCatalogPath, resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderRequestedPageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../helpers/cms-page-catalog";
|
|
5
5
|
import { findFirstPhiCmsNavigationLinkPath } from "../../../components/regions/presets/navigation-redirect";
|
|
6
6
|
import { resolvePhiRuntimeAreaDefinition } from "../area-definitions";
|
|
7
7
|
import { resolvePhiAreaRootRouteNavKey } from "../area-root-route";
|
|
@@ -201,8 +201,8 @@ function findPageKeyByReference(nodes, reference) {
|
|
|
201
201
|
*/
|
|
202
202
|
export function resolvePhiBuilderOfferedPageKey(state, area, requestedPageKey) {
|
|
203
203
|
const pages = resolvePhiBuilderOfferedPageCatalog(state, area);
|
|
204
|
-
const requested = requestedPageKey
|
|
205
|
-
if (requested
|
|
204
|
+
const requested = resolvePhiBuilderRequestedPageKey(requestedPageKey, pages);
|
|
205
|
+
if (requested) {
|
|
206
206
|
return { pages, pageKey: requested };
|
|
207
207
|
}
|
|
208
208
|
const rootRoute = readPhiBuilderStoredAreaRootRoute(state, area);
|
|
@@ -22,6 +22,13 @@ function resolveProviderArea(context) {
|
|
|
22
22
|
}
|
|
23
23
|
function collectPageOptions(area, nodes) {
|
|
24
24
|
return nodes.flatMap((node) => {
|
|
25
|
+
/*
|
|
26
|
+
* A folder is offered as its Pages only. The picker chooses only what it is offered
|
|
27
|
+
* (`select: "options"`), so the folder the Cascader draws for them opens and chooses nothing.
|
|
28
|
+
*/
|
|
29
|
+
if (!node.storagePath) {
|
|
30
|
+
return collectPageOptions(area, node.children ?? []);
|
|
31
|
+
}
|
|
25
32
|
const path = resolvePhiBuilderCatalogPathForCatalog(area, node.key, nodes);
|
|
26
33
|
/*
|
|
27
34
|
* The root reads as the address, not as the title of whatever Page is standing in it.
|
package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
1
2
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
2
3
|
import { PhiCmsFlags } from "../../../../constants/phi-cms";
|
|
3
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
@@ -468,6 +469,7 @@ export async function buildPhiBuilderInspectorAreaOverlayTree({ page, runtime, }
|
|
|
468
469
|
label: "Builder effects commands",
|
|
469
470
|
config: {
|
|
470
471
|
key: "builder-effects-commands",
|
|
472
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
471
473
|
...PHI_DIALOG_COMMANDS_CONFIG,
|
|
472
474
|
/*
|
|
473
475
|
* The two buttons as one group, the way the Area settings footer states it: they are the two
|
|
@@ -597,6 +599,7 @@ export async function buildPhiBuilderInspectorAreaOverlayTree({ page, runtime, }
|
|
|
597
599
|
label: "Builder signal wiring commands",
|
|
598
600
|
config: {
|
|
599
601
|
key: "builder-signal-wiring-commands",
|
|
602
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
600
603
|
...PHI_DIALOG_COMMANDS_CONFIG,
|
|
601
604
|
/*
|
|
602
605
|
* The two buttons as one group, the way the Area settings footer states it: they are the two
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
1
2
|
import { createPhiPresetCmsInstanceIdMap, } from "../../../../types/cms-instance-id";
|
|
2
3
|
import { PHI_CMS_DEFAULT_SLOT_INDEX, PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS, PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX, } from "../../../../constants/cms-layout-types";
|
|
3
4
|
import { PhiCmsFlags, PhiCmsRegionType, PhiCmsStatus } from "../../../../constants/phi-cms";
|
|
@@ -27,7 +28,7 @@ import { PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS, PHI_BUILDER_AREA_SETTINGS_OVERLAY
|
|
|
27
28
|
import { PHI_BUILDER_PAGE_META_FORM_ID } from "../page-meta-form";
|
|
28
29
|
import { PHI_BUILDER_AREA_SETTINGS_FORM_ID } from "../area-settings-form";
|
|
29
30
|
import { getPhiBuilderNavigationPageLabels } from "./builder-navigation-label-set";
|
|
30
|
-
import { PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG } from "../../../../helpers/cms-dialog";
|
|
31
|
+
import { PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG, PHI_DIALOG_WIDTH_SINGLE_COLUMN, } from "../../../../helpers/cms-dialog";
|
|
31
32
|
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
|
|
32
33
|
const SYNTHETIC_DEV_REGION_IDS = {
|
|
33
34
|
regionHeaderTop: -509,
|
|
@@ -511,6 +512,7 @@ export async function buildPhiDefaultBuilderAreaPresetTree({ page, runtime, }) {
|
|
|
511
512
|
label: "dev builder area selector",
|
|
512
513
|
config: {
|
|
513
514
|
key: "builder-area-selector",
|
|
515
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
514
516
|
value: "public",
|
|
515
517
|
/*
|
|
516
518
|
* Disabled is the selector's resting state: only Builder pages that edit one Area at a
|
|
@@ -564,6 +566,7 @@ export async function buildPhiDefaultBuilderAreaPresetTree({ page, runtime, }) {
|
|
|
564
566
|
label: labels.themeSwitch.debug,
|
|
565
567
|
defaultChecked: false,
|
|
566
568
|
key: "debugScaffold",
|
|
569
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
567
570
|
/*
|
|
568
571
|
* Disabled is the switch's resting state, the same way the Area selector rests: only the
|
|
569
572
|
* pages that draw a canvas arm it, via the workspace controller's "enabled" signal
|
|
@@ -724,7 +727,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
724
727
|
label: "Builder area settings",
|
|
725
728
|
config: {
|
|
726
729
|
title: labels.areaSettings.title,
|
|
727
|
-
width:
|
|
730
|
+
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
728
731
|
/*
|
|
729
732
|
* Mounted with the Page rather than on first open, because the controls inside show state
|
|
730
733
|
* rather than ask for it.
|
|
@@ -754,7 +757,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
754
757
|
label: "Builder page metadata",
|
|
755
758
|
config: {
|
|
756
759
|
title: labels.pages.pageMeta,
|
|
757
|
-
width:
|
|
760
|
+
width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
|
|
758
761
|
mountPolicy: "lazy-keep",
|
|
759
762
|
closeMode: "immediate",
|
|
760
763
|
signalRoutes: {
|
|
@@ -1195,6 +1198,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1195
1198
|
label: siderFullHeightLabel,
|
|
1196
1199
|
defaultChecked: true,
|
|
1197
1200
|
key: "dev-structure-sider-full-height-switch",
|
|
1201
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1198
1202
|
signalRoutes: {
|
|
1199
1203
|
emits: [
|
|
1200
1204
|
{
|
|
@@ -1307,6 +1311,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1307
1311
|
label: "dev area settings action",
|
|
1308
1312
|
config: {
|
|
1309
1313
|
key: "areaSettingsAction",
|
|
1314
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1310
1315
|
compact: true,
|
|
1311
1316
|
showLabels: true,
|
|
1312
1317
|
buttons: [{
|
|
@@ -1338,6 +1343,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1338
1343
|
label: "Area settings commands",
|
|
1339
1344
|
config: {
|
|
1340
1345
|
key: "area-settings-commands",
|
|
1346
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1341
1347
|
...PHI_DIALOG_COMMANDS_CONFIG,
|
|
1342
1348
|
/*
|
|
1343
1349
|
* The two buttons as one group rather than as two things that happen to stand near
|
|
@@ -1398,6 +1404,10 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1398
1404
|
label: "dev pages select",
|
|
1399
1405
|
config: {
|
|
1400
1406
|
key: "pageSelect",
|
|
1407
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1408
|
+
// Folders open under the pointer and choose nothing: only a Page is offered.
|
|
1409
|
+
expandTrigger: "hover",
|
|
1410
|
+
select: "options",
|
|
1401
1411
|
signalRoutes: {
|
|
1402
1412
|
emits: [
|
|
1403
1413
|
{
|
|
@@ -1429,6 +1439,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1429
1439
|
text: "",
|
|
1430
1440
|
placeholder: labels.pages.form.title,
|
|
1431
1441
|
key: "pageTitle",
|
|
1442
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1432
1443
|
signalRoutes: {
|
|
1433
1444
|
listens: [
|
|
1434
1445
|
{
|
|
@@ -1456,6 +1467,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1456
1467
|
label: "dev pages meta toolbar",
|
|
1457
1468
|
config: {
|
|
1458
1469
|
key: "pageMetaToolbar",
|
|
1470
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1459
1471
|
signalRoutes: {
|
|
1460
1472
|
emits: [
|
|
1461
1473
|
{
|
|
@@ -1712,6 +1724,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1712
1724
|
label: "Builder module usage commands",
|
|
1713
1725
|
config: {
|
|
1714
1726
|
key: "module-usage-commands",
|
|
1727
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1715
1728
|
...PHI_DIALOG_COMMANDS_CONFIG,
|
|
1716
1729
|
buttons: [
|
|
1717
1730
|
{ key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: modulesLabels?.usage.cancel ?? "Keep it on", icon: "close" },
|
|
@@ -1808,6 +1821,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
|
|
|
1808
1821
|
label: "Builder public route collision commands",
|
|
1809
1822
|
config: {
|
|
1810
1823
|
key: "public-routes-commands",
|
|
1824
|
+
textSource: PHI_TEXT_SOURCE_PRESET,
|
|
1811
1825
|
...PHI_DIALOG_COMMANDS_CONFIG,
|
|
1812
1826
|
buttons: [
|
|
1813
1827
|
{ key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: modulesLabels?.publicRoutes.cancel ?? "Cancel", icon: "close" },
|
|
@@ -5,7 +5,7 @@ export type { PhiCmsAreaShellPresetDescriptor, PhiCmsRoutePresetDescriptor, PhiC
|
|
|
5
5
|
export declare function buildPhiRuntimeModuleDataProviderDescriptor(definition: PhiRuntimeModuleDataProviderDescriptor): {
|
|
6
6
|
key: `${string}/${string}`;
|
|
7
7
|
ownerModuleId: `${string}/${string}`;
|
|
8
|
-
kind: "
|
|
8
|
+
kind: "table" | "tree" | "options" | "collection" | "timeline" | "record";
|
|
9
9
|
executionMode: import("../../types").PhiRuntimeDataProviderExecutionMode;
|
|
10
10
|
authoringMode: import("../../types").PhiRuntimeDataProviderAuthoringMode;
|
|
11
11
|
title: string;
|
|
@@ -717,6 +717,49 @@ export declare const PHI_CORE_RUNTIME_MODULE_DEFINITION: {
|
|
|
717
717
|
readonly label: "Area";
|
|
718
718
|
readonly description: "Whose Pages are offered; Public when empty.";
|
|
719
719
|
}];
|
|
720
|
+
} | {
|
|
721
|
+
ownerModuleId: "@phis/ui/modules/core";
|
|
722
|
+
key: `${string}/${string}`;
|
|
723
|
+
title: "Money";
|
|
724
|
+
valueType: "json";
|
|
725
|
+
presentation: "control";
|
|
726
|
+
settingsFields: readonly [{
|
|
727
|
+
readonly key: "currency";
|
|
728
|
+
readonly type: "choice";
|
|
729
|
+
readonly mode: "single";
|
|
730
|
+
readonly valueType: "string";
|
|
731
|
+
readonly label: "Currency";
|
|
732
|
+
readonly description: "The currency of one amount.";
|
|
733
|
+
readonly options: {
|
|
734
|
+
value: string;
|
|
735
|
+
label: string;
|
|
736
|
+
}[];
|
|
737
|
+
}, {
|
|
738
|
+
readonly key: "currencies";
|
|
739
|
+
readonly type: "choice";
|
|
740
|
+
readonly mode: "multiple";
|
|
741
|
+
readonly valueType: "string[]";
|
|
742
|
+
readonly label: "Currencies";
|
|
743
|
+
readonly description: "One amount per currency, instead of a single currency.";
|
|
744
|
+
readonly options: {
|
|
745
|
+
value: string;
|
|
746
|
+
label: string;
|
|
747
|
+
}[];
|
|
748
|
+
}, {
|
|
749
|
+
readonly key: "min";
|
|
750
|
+
readonly type: "number";
|
|
751
|
+
readonly label: "Minimum";
|
|
752
|
+
readonly description: "In minor units: 100 is 1.00 CHF.";
|
|
753
|
+
readonly min: 0;
|
|
754
|
+
readonly precision: 0;
|
|
755
|
+
}, {
|
|
756
|
+
readonly key: "max";
|
|
757
|
+
readonly type: "number";
|
|
758
|
+
readonly label: "Maximum";
|
|
759
|
+
readonly description: "In minor units.";
|
|
760
|
+
readonly min: 0;
|
|
761
|
+
readonly precision: 0;
|
|
762
|
+
}];
|
|
720
763
|
})[];
|
|
721
764
|
readonly validationRules: ({
|
|
722
765
|
ownerModuleId: "@phis/ui/modules/core";
|