@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
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { PhisPaymentMoney } from "@phis/contracts/payments";
|
|
1
2
|
import type { PhiRecordFieldKind } from "../constants/record-field-kinds";
|
|
2
|
-
import type { PhiRuntimeDataProviderKey } from "./runtime-data-provider";
|
|
3
|
+
import type { PhiRuntimeDataProviderBinding, PhiRuntimeDataProviderKey } from "./runtime-data-provider";
|
|
3
4
|
import type { PhiBlockRuntime } from "./widget-runtime";
|
|
4
5
|
/** What a record Provider is asked with, besides its parameters: whose Site, in which language. */
|
|
5
6
|
export type PhiRuntimeRecordProviderContext = {
|
|
@@ -56,8 +57,10 @@ export type PhiRecordLink = {
|
|
|
56
57
|
label?: string;
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
|
-
* What a field of each kind holds. A `date` is an ISO instant
|
|
60
|
-
*
|
|
60
|
+
* What a field of each kind holds. A `date` is an ISO instant, a `number` a number and a `money` the
|
|
61
|
+
* payment contract's amount (`{ currency, minor }`, `minor` an integer string of minor units): Core writes
|
|
62
|
+
* all three in the page's language -- a date in the Site's time zone, money with its currency's own
|
|
63
|
+
* places (`formatPhisMoney`). What a domain formats itself is a `text`.
|
|
61
64
|
*/
|
|
62
65
|
export type PhiRecordFieldValueByKind = {
|
|
63
66
|
text: string;
|
|
@@ -68,6 +71,7 @@ export type PhiRecordFieldValueByKind = {
|
|
|
68
71
|
tag: PhiRecordTag;
|
|
69
72
|
date: string;
|
|
70
73
|
number: number;
|
|
74
|
+
money: PhisPaymentMoney;
|
|
71
75
|
link: PhiRecordLink;
|
|
72
76
|
};
|
|
73
77
|
export type PhiRecordFieldDescriptor = {
|
|
@@ -112,4 +116,16 @@ export type PhiCmsPageRecordDescriptor = {
|
|
|
112
116
|
titleField?: string;
|
|
113
117
|
descriptionField?: string;
|
|
114
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* The record a Page is about, as `runtime.page.record` carries it: the Provider and the parameters the
|
|
121
|
+
* address filled in, plus the names of the fields the route's `pageRecord` makes the Page's title and
|
|
122
|
+
* description. Absent where the route names none, never empty.
|
|
123
|
+
*
|
|
124
|
+
* The two names say what the Page takes from the record, not what is asked of the Provider, so they are no
|
|
125
|
+
* part of what a read is keyed by. A Table or Form binding stays the general `PhiRuntimeDataProviderBinding`.
|
|
126
|
+
*/
|
|
127
|
+
export type PhiPageRecordBinding = PhiRuntimeDataProviderBinding & {
|
|
128
|
+
titleField?: string;
|
|
129
|
+
descriptionField?: string;
|
|
130
|
+
};
|
|
115
131
|
export type { PhiRecordFieldKind } from "../constants/record-field-kinds";
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
export type PhiSlotAxisSizePolicy = "intrinsic" | "fill" | "fixed";
|
|
2
|
-
export type PhiSlotSizePolicyPreset = "intrinsic" | "fill-inline" | "fill-block" | "fill" | "fixed";
|
|
3
|
-
|
|
2
|
+
export type PhiSlotSizePolicyPreset = "intrinsic" | "fill-inline" | "fill-block" | "fill" | "rest" | "fixed";
|
|
3
|
+
/** A policy that holds whatever the config says. */
|
|
4
|
+
export type PhiSlotSizePolicyValue = PhiSlotSizePolicyPreset | {
|
|
4
5
|
inline?: PhiSlotAxisSizePolicy | null;
|
|
5
6
|
block?: PhiSlotAxisSizePolicy | null;
|
|
6
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* A policy one field of the block's own config decides: `byValue[config[configField]]`, else `otherwise`.
|
|
10
|
+
* A string field is read as it is, a boolean field as the key `"true"` or `"false"`; anything else is `otherwise`.
|
|
11
|
+
* Declarative on purpose: the policy travels to the Builder as data.
|
|
12
|
+
*/
|
|
13
|
+
export type PhiSlotSizePolicyByConfig = {
|
|
14
|
+
configField: string;
|
|
15
|
+
byValue: Readonly<Record<string, PhiSlotSizePolicyValue>>;
|
|
16
|
+
otherwise: PhiSlotSizePolicyValue;
|
|
17
|
+
};
|
|
18
|
+
export type PhiSlotSizePolicy = PhiSlotSizePolicyValue | PhiSlotSizePolicyByConfig;
|
|
7
19
|
export type PhiNormalizedSlotSizePolicy = {
|
|
8
20
|
inline: PhiSlotAxisSizePolicy;
|
|
9
21
|
block: PhiSlotAxisSizePolicy;
|
|
22
|
+
/**
|
|
23
|
+
* Set by `"rest"` alone, which is `fill` on both axes and this. Only a Flex Layout reads it: where a
|
|
24
|
+
* child that fills the Layout's main axis also states it, that child alone grows into the room left over.
|
|
25
|
+
*/
|
|
26
|
+
takesRest?: true;
|
|
10
27
|
};
|
package/types/table-widget.d.ts
CHANGED
|
@@ -49,7 +49,25 @@ export type PhiTableQuery = {
|
|
|
49
49
|
* How a Provider value is drawn. Named rather than written into the column, because a record of the
|
|
50
50
|
* same rows draws the same values and must mean the same thing by `datetime` as the table does.
|
|
51
51
|
*/
|
|
52
|
-
export type PhiTableValueRenderer = "text" | "email" | "date" | "datetime" | "badge" | "tags" | "link" | "code" | "json" | "switch" | "checkbox" | "icon"
|
|
52
|
+
export type PhiTableValueRenderer = "text" | "email" | "date" | "datetime" | "badge" | "tags" | "link" | "code" | "json" | "switch" | "checkbox" | "icon"
|
|
53
|
+
/**
|
|
54
|
+
* An amount of money, `{ currency, minor }` -- the payment contract's `PhisPaymentMoney`, with `minor`
|
|
55
|
+
* an integer string or a safe integer of minor units -- written in the reader's language with the
|
|
56
|
+
* currency's own number of places (`formatPhisMoney`). Bound to a `json` field.
|
|
57
|
+
*/
|
|
58
|
+
| "money"
|
|
59
|
+
/**
|
|
60
|
+
* How long a period is, `PhiIntervalValue` (`{ unit: "month", count: 3 }`), in Core's words: "per
|
|
61
|
+
* month", "every 3 months". Bound to a `json` field.
|
|
62
|
+
*/
|
|
63
|
+
| "interval";
|
|
64
|
+
/** The unit of a `PhiIntervalValue`. */
|
|
65
|
+
export type PhiIntervalUnit = "day" | "week" | "month" | "year";
|
|
66
|
+
/** A period of `count` (a whole number, one or more) `unit`s, as the `interval` renderer draws it. */
|
|
67
|
+
export type PhiIntervalValue = {
|
|
68
|
+
unit: PhiIntervalUnit;
|
|
69
|
+
count: number;
|
|
70
|
+
};
|
|
53
71
|
export type PhiTableColumnDefinition = {
|
|
54
72
|
key: string;
|
|
55
73
|
title: string;
|
|
@@ -532,12 +550,26 @@ export type PhiTableProviderQueryRequest = {
|
|
|
532
550
|
resourceKey: string;
|
|
533
551
|
query: PhiTableQuery;
|
|
534
552
|
params?: Record<string, unknown>;
|
|
553
|
+
/**
|
|
554
|
+
* The reader's language and the Site's time zone (`usePhiIntlLocale`, `usePhiIntlTimeZone`), filled by
|
|
555
|
+
* the binding, for a Provider that writes words, amounts or dates into what it answers. Part of the
|
|
556
|
+
* binding's load key: a live language switch asks again.
|
|
557
|
+
*/
|
|
558
|
+
locale: string;
|
|
559
|
+
timeZone: string;
|
|
535
560
|
signal: AbortSignal;
|
|
536
561
|
};
|
|
537
562
|
export type PhiTableProviderRecordRequest = {
|
|
538
563
|
resourceKey: string;
|
|
539
564
|
rowIdentity: PhiTableRowIdentity | null;
|
|
540
565
|
params?: Record<string, unknown>;
|
|
566
|
+
/**
|
|
567
|
+
* The reader's language and the Site's time zone (`usePhiIntlLocale`, `usePhiIntlTimeZone`), filled by
|
|
568
|
+
* the binding, for a Provider that writes words, amounts or dates into what it answers. Part of the
|
|
569
|
+
* binding's load key: a live language switch asks again.
|
|
570
|
+
*/
|
|
571
|
+
locale: string;
|
|
572
|
+
timeZone: string;
|
|
541
573
|
signal: AbortSignal;
|
|
542
574
|
};
|
|
543
575
|
export type PhiTableProviderMutationInvalidation = "none" | "view" | "resource";
|
package/types/table-widget.js
CHANGED
|
@@ -334,6 +334,7 @@ export function validatePhiTableWidgetBinding(config, resource) {
|
|
|
334
334
|
((column.renderer === "date" || column.renderer === "datetime") && field?.type === column.renderer) ||
|
|
335
335
|
(column.renderer === "json" && field?.type === "json") ||
|
|
336
336
|
(column.renderer === "tags" && (field?.type === "json" || field?.type === "enum[]")) ||
|
|
337
|
+
((column.renderer === "money" || column.renderer === "interval") && field?.type === "json") ||
|
|
337
338
|
((column.renderer === "email" || column.renderer === "link" || column.renderer === "code" ||
|
|
338
339
|
column.renderer === "badge") && (field?.type === "string" || field?.type === "enum"));
|
|
339
340
|
if (!rendererCompatible) {
|
package/types/tree-widget.d.ts
CHANGED
|
@@ -56,6 +56,13 @@ export type PhiTreeProviderQueryRequest = {
|
|
|
56
56
|
resourceKey: string;
|
|
57
57
|
query: PhiTreeQuery;
|
|
58
58
|
params?: Record<string, unknown>;
|
|
59
|
+
/**
|
|
60
|
+
* The reader's language and the Site's time zone (`usePhiIntlLocale`, `usePhiIntlTimeZone`), filled by
|
|
61
|
+
* the binding, for a Provider that writes words, amounts or dates into what it answers. Part of the
|
|
62
|
+
* binding's load key: a live language switch asks again.
|
|
63
|
+
*/
|
|
64
|
+
locale: string;
|
|
65
|
+
timeZone: string;
|
|
59
66
|
signal: AbortSignal;
|
|
60
67
|
};
|
|
61
68
|
export type PhiTreeProviderQueryResult = {
|
|
@@ -118,7 +118,7 @@ export type PhiBlockRuntimePage = {
|
|
|
118
118
|
* The record this Page is about, as a binding: the Provider and the parameters the address filled in.
|
|
119
119
|
* Present on a route that names a `pageRecord`; a Widget reads the record's fields through it.
|
|
120
120
|
*/
|
|
121
|
-
record?: import("./
|
|
121
|
+
record?: import("./record-provider").PhiPageRecordBinding;
|
|
122
122
|
};
|
|
123
123
|
/**
|
|
124
124
|
* What a Widget knows about the request it renders in. It holds nothing only the server may know: a
|
package/types.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export type * from "./types/slot-size-policy";
|
|
|
26
26
|
export type * from "./types/runtime-data-provider";
|
|
27
27
|
export { isPhiRuntimeDataProviderKey, readPhiRuntimeDataProviderBinding } from "./types/runtime-data-provider";
|
|
28
28
|
export type * from "./types/table-widget";
|
|
29
|
+
export type * from "./types/record-widget";
|
|
29
30
|
export type * from "./types/tree-widget";
|
|
30
31
|
export type * from "./types/collection-provider";
|
|
31
32
|
export type * from "./types/form-descriptor";
|