@phis/ui 0.8.1 → 0.8.3
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/README.md +9 -2
- package/components/calendar/gregory-calendar-adapter-client.js +1 -0
- package/components/controls/phi-accordion-control.d.ts +6 -0
- package/components/controls/phi-accordion-control.js +8 -13
- package/components/controls/phi-background-control.js +2 -5
- package/components/controls/phi-builder-insert-picker-control-labels.d.ts +2 -0
- package/components/controls/phi-builder-insert-picker-control-labels.js +1 -0
- package/components/controls/phi-builder-insert-picker-control.js +10 -11
- package/components/controls/phi-cascader-control.d.ts +9 -3
- package/components/controls/phi-cascader-control.js +38 -10
- package/components/controls/phi-checkbox-group-control.d.ts +3 -1
- package/components/controls/phi-checkbox-group-control.js +2 -2
- package/components/controls/phi-collapse-control.d.ts +9 -2
- package/components/controls/phi-collapse-control.js +14 -2
- package/components/controls/phi-color-control.d.ts +3 -1
- package/components/controls/phi-color-control.js +2 -2
- package/components/controls/phi-color-field-control.d.ts +6 -1
- package/components/controls/phi-color-field-control.js +2 -2
- package/components/controls/phi-confirm-control.d.ts +1 -1
- package/components/controls/phi-confirm-control.js +71 -2
- package/components/controls/phi-confirm-dialog.js +2 -1
- package/components/controls/phi-date-picker-control.js +1 -1
- package/components/controls/phi-dimension-control.d.ts +3 -1
- package/components/controls/phi-dimension-control.js +2 -2
- package/components/controls/phi-geometry-control.js +1 -1
- package/components/controls/phi-length-control.d.ts +6 -1
- package/components/controls/phi-length-control.js +3 -2
- package/components/controls/phi-multi-select-control.d.ts +6 -1
- package/components/controls/phi-multi-select-control.js +3 -3
- package/components/controls/phi-segmented-control.d.ts +6 -1
- package/components/controls/phi-segmented-control.js +3 -3
- package/components/controls/phi-switch-control.d.ts +3 -1
- package/components/controls/phi-switch-control.js +3 -3
- package/components/controls/phi-table-control.d.ts +8 -1
- package/components/controls/phi-table-control.js +11 -5
- package/components/forms/compound-form-controls.js +16 -1
- package/components/layouts/clients/phi-collapsible-layout-client.js +2 -6
- package/components/media/media-upload-flow.d.ts +62 -5
- package/components/media/media-upload-flow.js +62 -24
- package/components/media/media-widget-labels.d.ts +2 -0
- package/components/media/media-widget-labels.js +2 -0
- package/components/media/phi-area-upload-widget.d.ts +44 -1
- package/components/media/phi-area-upload-widget.js +32 -7
- package/components/media/phi-asset-inspector-section.js +19 -1
- package/components/media/phi-media-upload.d.ts +10 -3
- package/components/media/phi-media-upload.js +11 -8
- package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -0
- package/components/shell/phi-builder-icon.js +9 -1
- package/components/shell/phi-widget-icon.js +1 -0
- package/components/tables/phi-table-surface.d.ts +25 -0
- package/components/tables/phi-table-surface.js +25 -0
- package/components/widgets/builder/phi-static-rows-editor.js +4 -1
- package/components/widgets/client/html-editor-link-node.d.ts +12 -0
- package/components/widgets/client/html-editor-link-node.js +60 -0
- package/components/widgets/client/html-editor.js +10 -6
- package/components/widgets/client/shared/phi-choice-controller.d.ts +8 -1
- package/components/widgets/client/shared/phi-choice-controller.js +16 -1
- package/components/widgets/client/shared/phi-collection-view-binding.js +33 -26
- package/components/widgets/config/choice-shared.d.ts +2 -0
- package/components/widgets/config/choice-shared.js +1 -0
- package/components/widgets/config/image-variant-options.d.ts +4 -1
- package/components/widgets/config/image-variant-options.js +27 -14
- package/components/widgets/inspector-field-row.d.ts +14 -1
- package/components/widgets/inspector-field-row.js +21 -1
- package/components/widgets/label-sets/builder-chrome.js +2 -0
- package/components/widgets/label-sets/inspector.js +10 -0
- package/components/widgets/label-sets/security.js +2 -0
- package/components/widgets/label-types/inspector.d.ts +5 -0
- package/components/widgets/label-types/inspector.js +5 -0
- package/components/widgets/label-types/security.d.ts +2 -0
- package/components/widgets/signals/signal-endpoint-list.js +4 -1
- package/constants/cms-widget-types.d.ts +1 -0
- package/constants/cms-widget-types.js +3 -0
- package/constants/runtime-module-ownership.js +1 -0
- package/gateway/site-proxy.d.ts +12 -0
- package/gateway/site-proxy.js +20 -0
- package/helpers/cms-inspector-drawer.d.ts +15 -0
- package/helpers/cms-inspector-drawer.js +37 -0
- package/helpers/cms-layout-defaults.js +1 -1
- package/helpers/preset-tree-contract-check.js +56 -0
- package/helpers/text-source.js +2 -0
- package/net/phi-next-proxy.d.ts +7 -0
- package/net/phi-next-proxy.js +1 -1
- package/package.json +27 -14
- package/plugins/runtime-modules/accounting/definition.d.ts +1 -1
- package/plugins/runtime-modules/accounting/definition.js +0 -1
- package/plugins/runtime-modules/accounting/ids.d.ts +4 -4
- package/plugins/runtime-modules/accounting/ids.js +4 -2
- package/plugins/runtime-modules/accounting/module.d.ts +1 -1
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +2 -1
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +5 -4
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +80 -38
- package/plugins/runtime-modules/admin/definition.d.ts +1 -1
- package/plugins/runtime-modules/admin/definition.js +0 -1
- package/plugins/runtime-modules/admin/module.d.ts +1 -1
- package/plugins/runtime-modules/app/definition.d.ts +1 -1
- package/plugins/runtime-modules/app/definition.js +0 -1
- package/plugins/runtime-modules/app/module.d.ts +1 -1
- package/plugins/runtime-modules/area-base-definition.d.ts +19 -1
- package/plugins/runtime-modules/area-base-definition.js +18 -0
- package/plugins/runtime-modules/area-contributions/admin.d.ts +1 -1
- package/plugins/runtime-modules/area-contributions/admin.js +2 -0
- package/plugins/runtime-modules/area-definitions.d.ts +8 -8
- package/plugins/runtime-modules/area-definitions.js +4 -3
- package/plugins/runtime-modules/area-root-route.d.ts +8 -0
- package/plugins/runtime-modules/area-root-route.js +11 -1
- package/plugins/runtime-modules/asset/labels.js +4 -0
- package/plugins/runtime-modules/asset/metadata-form.d.ts +0 -28
- package/plugins/runtime-modules/asset/metadata-form.js +6 -10
- package/plugins/runtime-modules/asset/services/options.d.ts +3 -2
- package/plugins/runtime-modules/asset/services/options.js +4 -3
- package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -1
- package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +3 -3
- package/plugins/runtime-modules/auth/widgets/security/client.js +2 -2
- package/plugins/runtime-modules/avatar/addresses.d.ts +1 -1
- package/plugins/runtime-modules/builder/addresses.d.ts +1 -1
- package/plugins/runtime-modules/builder/addresses.js +1 -1
- package/plugins/runtime-modules/builder/area-settings-form.js +1 -1
- package/plugins/runtime-modules/builder/clients/inspector-condition-group.d.ts +16 -0
- package/plugins/runtime-modules/builder/clients/inspector-condition-group.js +9 -0
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +97 -10
- package/plugins/runtime-modules/builder/clients/pages-header.js +7 -6
- package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
- package/plugins/runtime-modules/builder/controller/workspace-controller.js +7 -4
- package/plugins/runtime-modules/builder/definition.d.ts +1 -1
- package/plugins/runtime-modules/builder/definition.js +0 -1
- package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +10 -4
- package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -8
- package/plugins/runtime-modules/builder/page-meta-form.js +5 -2
- package/plugins/runtime-modules/builder/plugin-meta-labels.js +8 -0
- package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +4 -2
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +20 -13
- package/plugins/runtime-modules/builder/workspace-catalog-actions.js +8 -1
- package/plugins/runtime-modules/cdn/authoring-widgets.d.ts +3 -0
- package/plugins/runtime-modules/cdn/authoring-widgets.js +7 -0
- package/plugins/runtime-modules/cdn/authoring.d.ts +1 -0
- package/plugins/runtime-modules/cdn/authoring.js +8 -0
- package/plugins/runtime-modules/cdn/bytes.d.ts +5 -0
- package/plugins/runtime-modules/cdn/bytes.js +17 -0
- package/plugins/runtime-modules/cdn/client-data-providers.d.ts +7 -0
- package/plugins/runtime-modules/cdn/client-data-providers.js +9 -0
- package/plugins/runtime-modules/cdn/data-providers.d.ts +134 -0
- package/plugins/runtime-modules/cdn/data-providers.js +117 -0
- package/plugins/runtime-modules/cdn/definition.d.ts +140 -0
- package/plugins/runtime-modules/cdn/definition.js +23 -0
- package/plugins/runtime-modules/cdn/ids.d.ts +18 -0
- package/plugins/runtime-modules/cdn/ids.js +20 -0
- package/plugins/runtime-modules/cdn/module.d.ts +131 -0
- package/plugins/runtime-modules/cdn/module.js +4 -0
- package/plugins/runtime-modules/cdn/platform.d.ts +25 -0
- package/plugins/runtime-modules/cdn/platform.js +73 -0
- package/plugins/runtime-modules/cdn/presets.d.ts +2 -0
- package/plugins/runtime-modules/cdn/presets.js +20 -0
- package/plugins/runtime-modules/cdn/server.d.ts +1 -0
- package/plugins/runtime-modules/cdn/server.js +14 -0
- package/plugins/runtime-modules/cdn/services/table.d.ts +11 -0
- package/plugins/runtime-modules/cdn/services/table.js +296 -0
- package/plugins/runtime-modules/cdn/services/upload.d.ts +20 -0
- package/plugins/runtime-modules/cdn/services/upload.js +146 -0
- package/plugins/runtime-modules/cdn/table-params.d.ts +10 -0
- package/plugins/runtime-modules/cdn/table-params.js +10 -0
- package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.d.ts +95 -0
- package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.js +156 -0
- package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.d.ts +18 -0
- package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +491 -0
- package/plugins/runtime-modules/cdn/widgets/upload/client.d.ts +12 -0
- package/plugins/runtime-modules/cdn/widgets/upload/client.js +138 -0
- package/plugins/runtime-modules/cdn/widgets/upload/config.d.ts +29 -0
- package/plugins/runtime-modules/cdn/widgets/upload/config.js +43 -0
- package/plugins/runtime-modules/cdn/widgets/upload/label-types.d.ts +24 -0
- package/plugins/runtime-modules/cdn/widgets/upload/label-types.js +1 -0
- package/plugins/runtime-modules/cdn/widgets/upload/labels.d.ts +4 -0
- package/plugins/runtime-modules/cdn/widgets/upload/labels.js +72 -0
- package/plugins/runtime-modules/cdn/widgets/upload/plugin.d.ts +3 -0
- package/plugins/runtime-modules/cdn/widgets/upload/plugin.js +7 -0
- package/plugins/runtime-modules/cdn/widgets/upload/server.d.ts +8 -0
- package/plugins/runtime-modules/cdn/widgets/upload/server.js +17 -0
- package/plugins/runtime-modules/cdn/widgets.d.ts +2 -0
- package/plugins/runtime-modules/cdn/widgets.js +13 -0
- package/plugins/runtime-modules/client-authoring-providers/admin.d.ts +1 -1
- package/plugins/runtime-modules/client-authoring-providers/admin.js +6 -0
- package/plugins/runtime-modules/client-manifests/admin.js +11 -1
- package/plugins/runtime-modules/core/authoring-widgets.js +2 -1
- package/plugins/runtime-modules/core/messaging/label-defaults.d.ts +49 -0
- package/plugins/runtime-modules/core/messaging/label-defaults.js +48 -0
- package/plugins/runtime-modules/core/messaging/labels.d.ts +2 -28
- package/plugins/runtime-modules/core/messaging/labels.js +52 -23
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +3 -1
- package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/select-box/client.js +13 -4
- package/plugins/runtime-modules/core/widgets/select-box/config.js +1 -0
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/table/client.js +17 -8
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +1 -1143
- package/plugins/runtime-modules/core/widgets/table/config.js +144 -125
- package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +2 -0
- package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +76 -0
- package/plugins/runtime-modules/core/widgets/thread-conversation/client.d.ts +44 -1
- package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +28 -13
- package/plugins/runtime-modules/editor/definition.d.ts +1 -1
- package/plugins/runtime-modules/editor/definition.js +0 -1
- package/plugins/runtime-modules/editor/module.d.ts +1 -1
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +16 -8
- package/plugins/runtime-modules/public/definition.d.ts +1 -1
- package/plugins/runtime-modules/public/definition.js +0 -1
- package/plugins/runtime-modules/public/module.d.ts +1 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +109 -86
- package/plugins/runtime-modules/threads/controller/client.js +10 -12
- package/plugins/runtime-modules/threads/controller/definition.d.ts +6 -0
- package/plugins/runtime-modules/threads/controller/definition.js +17 -6
- package/styles/controls.css +49 -1
- package/styles/layout.css +3 -2
- package/types/calendar.d.ts +5 -0
- package/types/cms-plugins.d.ts +30 -10
- package/types/table-widget.d.ts +8 -2
|
@@ -2,6 +2,7 @@ import "server-only";
|
|
|
2
2
|
import { PHI_TR_CTX_WEB_UI_LABEL } from "../../../../gateway/tr";
|
|
3
3
|
import { definePhiRuntimeModuleLabelSet, definePhiMessageLabel, getPhiLabelSet } from "../../../../gateway/label-set";
|
|
4
4
|
import { PHI_CORE_RUNTIME_MODULE_IDENTITY } from "../ids";
|
|
5
|
+
import { PHI_THREAD_CONVERSATION_DEFAULT_LABELS } from "./label-defaults";
|
|
5
6
|
/*
|
|
6
7
|
* What a conversation and the reply to it say, wherever they are placed.
|
|
7
8
|
*
|
|
@@ -9,26 +10,27 @@ import { PHI_CORE_RUNTIME_MODULE_IDENTITY } from "../ids";
|
|
|
9
10
|
* a group's, Support's, an add-on's -- places the same conversation and the same reply, and reads them
|
|
10
11
|
* in the same words. A Module says what its own Page is called; it does not say "Reply" again.
|
|
11
12
|
*/
|
|
13
|
+
const D = PHI_THREAD_CONVERSATION_DEFAULT_LABELS;
|
|
12
14
|
const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_CORE_RUNTIME_MODULE_IDENTITY, {
|
|
13
15
|
key: "widget:thread-conversation",
|
|
14
16
|
ctx: PHI_TR_CTX_WEB_UI_LABEL,
|
|
15
17
|
labels: {
|
|
16
|
-
no_thread_text: definePhiMessageLabel(
|
|
17
|
-
loading_text: definePhiMessageLabel(
|
|
18
|
-
empty_text: definePhiMessageLabel(
|
|
19
|
-
subject_fallback:
|
|
20
|
-
older_label:
|
|
21
|
-
archived_label:
|
|
22
|
-
locked_label:
|
|
18
|
+
no_thread_text: definePhiMessageLabel(D.noThreadText),
|
|
19
|
+
loading_text: definePhiMessageLabel(D.loadingText),
|
|
20
|
+
empty_text: definePhiMessageLabel(D.emptyText),
|
|
21
|
+
subject_fallback: D.subjectFallback,
|
|
22
|
+
older_label: D.olderLabel,
|
|
23
|
+
archived_label: D.archivedLabel,
|
|
24
|
+
locked_label: D.lockedLabel,
|
|
23
25
|
/*
|
|
24
26
|
* Where the Reply would have been. A locked conversation takes no new message from anybody, so the
|
|
25
27
|
* way to write one is not offered at all rather than offered and then refused.
|
|
26
28
|
*/
|
|
27
|
-
locked_text: definePhiMessageLabel(
|
|
29
|
+
locked_text: definePhiMessageLabel(D.lockedText),
|
|
28
30
|
/* The action in the conversation's heading that opens a reply. */
|
|
29
|
-
reply_label:
|
|
31
|
+
reply_label: D.replyLabel,
|
|
30
32
|
/* Before the names of who is in it, beneath a heading that is the subject. */
|
|
31
|
-
participants_label:
|
|
33
|
+
participants_label: D.participantsLabel,
|
|
32
34
|
/*
|
|
33
35
|
* Said on the note itself rather than in a legend somewhere.
|
|
34
36
|
*
|
|
@@ -36,7 +38,7 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
|
|
|
36
38
|
* must never be in doubt is which of the two a message is. A marker on the message is the only
|
|
37
39
|
* place a person actually looks while writing the next one.
|
|
38
40
|
*/
|
|
39
|
-
internal_label:
|
|
41
|
+
internal_label: D.internalLabel,
|
|
40
42
|
/*
|
|
41
43
|
* One word for the control, because there is one control.
|
|
42
44
|
*
|
|
@@ -44,8 +46,8 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
|
|
|
44
46
|
* only appears where that language can actually be produced. A picker beside every message would have
|
|
45
47
|
* been a second control on every row for the sake of reading one message in a third language.
|
|
46
48
|
*/
|
|
47
|
-
translate_label:
|
|
48
|
-
original_label:
|
|
49
|
+
translate_label: D.translateLabel,
|
|
50
|
+
original_label: D.originalLabel,
|
|
49
51
|
/*
|
|
50
52
|
* Said on the translation, because an unmarked one reads as what the person wrote.
|
|
51
53
|
*
|
|
@@ -54,17 +56,30 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
|
|
|
54
56
|
* beside it as its own name, where the provider reported one -- not woven into a sentence, which would
|
|
55
57
|
* fix a word order that only holds in English.
|
|
56
58
|
*/
|
|
57
|
-
machine_translation_label:
|
|
58
|
-
translation_error_text: definePhiMessageLabel(
|
|
59
|
-
redacted_text: definePhiMessageLabel(
|
|
60
|
-
withheld_text: definePhiMessageLabel(
|
|
61
|
-
system_author_label:
|
|
59
|
+
machine_translation_label: D.machineTranslationLabel,
|
|
60
|
+
translation_error_text: definePhiMessageLabel(D.feedback.errorTranslation),
|
|
61
|
+
redacted_text: definePhiMessageLabel(D.redactedText),
|
|
62
|
+
withheld_text: definePhiMessageLabel(D.withheldText),
|
|
63
|
+
system_author_label: D.systemAuthorLabel,
|
|
62
64
|
/* A projection carries a display name or nothing; nothing is still somebody. */
|
|
63
|
-
unnamed_author_label:
|
|
64
|
-
error_title:
|
|
65
|
-
error_generic: definePhiMessageLabel(
|
|
66
|
-
error_network: definePhiMessageLabel(
|
|
67
|
-
error_not_found: definePhiMessageLabel(
|
|
65
|
+
unnamed_author_label: D.unnamedAuthorLabel,
|
|
66
|
+
error_title: D.feedback.errorTitle,
|
|
67
|
+
error_generic: definePhiMessageLabel(D.feedback.errorGeneric),
|
|
68
|
+
error_network: definePhiMessageLabel(D.feedback.errorNetwork),
|
|
69
|
+
error_not_found: definePhiMessageLabel(D.feedback.errorNotFound),
|
|
70
|
+
// The Builder canvas's made-up conversation (`label-defaults.ts`, `sample`).
|
|
71
|
+
sample_tag: D.sample.tag,
|
|
72
|
+
sample_subject: D.sample.subject,
|
|
73
|
+
sample_member_name: D.sample.memberName,
|
|
74
|
+
sample_staff_name: D.sample.staffName,
|
|
75
|
+
sample_question: definePhiMessageLabel(D.sample.question),
|
|
76
|
+
sample_note: definePhiMessageLabel(D.sample.note),
|
|
77
|
+
sample_answer: definePhiMessageLabel(D.sample.answer),
|
|
78
|
+
sample_answer_attachment: D.sample.answerAttachment,
|
|
79
|
+
sample_file_call: definePhiMessageLabel(D.sample.fileCall),
|
|
80
|
+
sample_file_address: definePhiMessageLabel(D.sample.fileAddress),
|
|
81
|
+
sample_file_contract: definePhiMessageLabel(D.sample.fileContract),
|
|
82
|
+
sample_file_attachment: D.sample.fileAttachment,
|
|
68
83
|
},
|
|
69
84
|
});
|
|
70
85
|
/**
|
|
@@ -129,5 +144,19 @@ export async function getPhiThreadConversationLabels(options) {
|
|
|
129
144
|
errorNotFound: labels.error_not_found,
|
|
130
145
|
errorTranslation: labels.translation_error_text,
|
|
131
146
|
},
|
|
147
|
+
sample: {
|
|
148
|
+
tag: labels.sample_tag,
|
|
149
|
+
subject: labels.sample_subject,
|
|
150
|
+
memberName: labels.sample_member_name,
|
|
151
|
+
staffName: labels.sample_staff_name,
|
|
152
|
+
question: labels.sample_question,
|
|
153
|
+
note: labels.sample_note,
|
|
154
|
+
answer: labels.sample_answer,
|
|
155
|
+
answerAttachment: labels.sample_answer_attachment,
|
|
156
|
+
fileCall: labels.sample_file_call,
|
|
157
|
+
fileAddress: labels.sample_file_address,
|
|
158
|
+
fileContract: labels.sample_file_contract,
|
|
159
|
+
fileAttachment: labels.sample_file_attachment,
|
|
160
|
+
},
|
|
132
161
|
};
|
|
133
162
|
}
|
|
@@ -474,6 +474,20 @@ export declare const PHI_CARD_WIDGET_DEFINITION: {
|
|
|
474
474
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
475
475
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
476
476
|
heading?: string;
|
|
477
|
+
} & {
|
|
478
|
+
type: "condition-group";
|
|
479
|
+
conditionFields: PhiCmsConfigField[];
|
|
480
|
+
defaultCondition: Record<string, unknown>;
|
|
481
|
+
addLabel?: string;
|
|
482
|
+
emptyLabel?: string;
|
|
483
|
+
}) | ({
|
|
484
|
+
key: string;
|
|
485
|
+
label: string;
|
|
486
|
+
description?: string;
|
|
487
|
+
required?: boolean;
|
|
488
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
489
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
490
|
+
heading?: string;
|
|
477
491
|
} & {
|
|
478
492
|
type: "surface";
|
|
479
493
|
tone?: false;
|
|
@@ -381,7 +381,7 @@ export function PhiAssetCollectionViewBinding({ config, binding, labels: rawLabe
|
|
|
381
381
|
pageSize: config.initialQuery?.pageSize ?? features.pagination?.pageSize ?? 20,
|
|
382
382
|
filters: { ...(config.initialQuery?.filters ?? {}) },
|
|
383
383
|
}) })) : null, features.tools.reload ? (_jsx(PhiButtonControl, { ariaLabel: labels.tool.reloadLabel, tooltip: labels.tool.reloadLabel, icon: resolvePhiButtonIcon("reload"), size: controlSize, onClick: binding.reload })) : null] })) : null;
|
|
384
|
-
const awaitingInitialPayload = binding.data == null && !state.error;
|
|
384
|
+
const awaitingInitialPayload = binding.loading && binding.data == null && !state.error;
|
|
385
385
|
const body = state.error ? null : awaitingInitialPayload ? (_jsx(PhiMediaAssetCollectionSkeletonControl, { mode: mode, gap: gap, minColumnWidth: minColumnWidth })) : state.assets.length === 0 ? (_jsx(PhiEmptyControl, { description: presentation.emptyDescription ?? labels.grid.emptyDescription })) : undefined;
|
|
386
386
|
/*
|
|
387
387
|
* The upload panel: the Media library's wall, into the resolved Folder path where the placement names
|
|
@@ -168,6 +168,8 @@ export function PhiSiteAddressCollectionViewBinding({ config, binding, widgetId,
|
|
|
168
168
|
const emptyDescription = typeof binding.data?.meta?.emptyDescription === "string" && binding.data.meta.emptyDescription.trim()
|
|
169
169
|
? binding.data.meta.emptyDescription
|
|
170
170
|
: presentation.emptyDescription ?? labels.empty;
|
|
171
|
-
const body = binding.data == null ? (binding.
|
|
171
|
+
const body = binding.data == null ? (binding.loading && !binding.error
|
|
172
|
+
? _jsx(PhiCollectionViewSkeletonControl, { mode: mode, gap: gap, minColumnWidth: minColumnWidth, count: 3 })
|
|
173
|
+
: null) : tiles.length === 0 ? (_jsx(PhiEmptyControl, { description: emptyDescription })) : undefined;
|
|
172
174
|
return (_jsx(PhiCollectionViewControl, { title: presentation.title, description: presentation.description, toolbar: features.tools.mode === "external" ? null : toolbar, diagnostics: binding.error && binding.data != null ? _jsx(PhiAlertControl, { level: "error", title: binding.error }) : null, body: body, items: items, mode: mode, ...(gap ? { gap } : {}), minColumnWidth: minColumnWidth, pagination: null }));
|
|
173
175
|
}
|
|
@@ -359,6 +359,20 @@ export declare const PHI_COMMAND_TOOLBAR_WIDGET_DEFINITION: {
|
|
|
359
359
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
360
360
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
361
361
|
heading?: string;
|
|
362
|
+
} & {
|
|
363
|
+
type: "condition-group";
|
|
364
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
365
|
+
defaultCondition: Record<string, unknown>;
|
|
366
|
+
addLabel?: string;
|
|
367
|
+
emptyLabel?: string;
|
|
368
|
+
}) | ({
|
|
369
|
+
key: string;
|
|
370
|
+
label: string;
|
|
371
|
+
description?: string;
|
|
372
|
+
required?: boolean;
|
|
373
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
374
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
375
|
+
heading?: string;
|
|
362
376
|
} & {
|
|
363
377
|
type: "surface";
|
|
364
378
|
tone?: false;
|
|
@@ -325,6 +325,20 @@ export declare const PHI_DESCRIPTION_WIDGET_DEFINITION: {
|
|
|
325
325
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
326
326
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
327
327
|
heading?: string;
|
|
328
|
+
} & {
|
|
329
|
+
type: "condition-group";
|
|
330
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
331
|
+
defaultCondition: Record<string, unknown>;
|
|
332
|
+
addLabel?: string;
|
|
333
|
+
emptyLabel?: string;
|
|
334
|
+
}) | ({
|
|
335
|
+
key: string;
|
|
336
|
+
label: string;
|
|
337
|
+
description?: string;
|
|
338
|
+
required?: boolean;
|
|
339
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
340
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
341
|
+
heading?: string;
|
|
328
342
|
} & {
|
|
329
343
|
type: "surface";
|
|
330
344
|
tone?: false;
|
|
@@ -368,6 +368,20 @@ export declare const PHI_ENTRY_LIST_WIDGET_DEFINITION: {
|
|
|
368
368
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
369
369
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
370
370
|
heading?: string;
|
|
371
|
+
} & {
|
|
372
|
+
type: "condition-group";
|
|
373
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
374
|
+
defaultCondition: Record<string, unknown>;
|
|
375
|
+
addLabel?: string;
|
|
376
|
+
emptyLabel?: string;
|
|
377
|
+
}) | ({
|
|
378
|
+
key: string;
|
|
379
|
+
label: string;
|
|
380
|
+
description?: string;
|
|
381
|
+
required?: boolean;
|
|
382
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
383
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
384
|
+
heading?: string;
|
|
371
385
|
} & {
|
|
372
386
|
type: "surface";
|
|
373
387
|
tone?: false;
|
|
@@ -372,6 +372,20 @@ export declare const PHI_FLOAT_BUTTON_WIDGET_DEFINITION: {
|
|
|
372
372
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
373
373
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
374
374
|
heading?: string;
|
|
375
|
+
} & {
|
|
376
|
+
type: "condition-group";
|
|
377
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
378
|
+
defaultCondition: Record<string, unknown>;
|
|
379
|
+
addLabel?: string;
|
|
380
|
+
emptyLabel?: string;
|
|
381
|
+
}) | ({
|
|
382
|
+
key: string;
|
|
383
|
+
label: string;
|
|
384
|
+
description?: string;
|
|
385
|
+
required?: boolean;
|
|
386
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
387
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
388
|
+
heading?: string;
|
|
375
389
|
} & {
|
|
376
390
|
type: "surface";
|
|
377
391
|
tone?: false;
|
|
@@ -339,6 +339,20 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
|
|
|
339
339
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
340
340
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
341
341
|
heading?: string;
|
|
342
|
+
} & {
|
|
343
|
+
type: "condition-group";
|
|
344
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
345
|
+
defaultCondition: Record<string, unknown>;
|
|
346
|
+
addLabel?: string;
|
|
347
|
+
emptyLabel?: string;
|
|
348
|
+
}) | ({
|
|
349
|
+
key: string;
|
|
350
|
+
label: string;
|
|
351
|
+
description?: string;
|
|
352
|
+
required?: boolean;
|
|
353
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
354
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
355
|
+
heading?: string;
|
|
342
356
|
} & {
|
|
343
357
|
type: "surface";
|
|
344
358
|
tone?: false;
|
|
@@ -390,6 +390,20 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
|
|
|
390
390
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
391
391
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
392
392
|
heading?: string;
|
|
393
|
+
} & {
|
|
394
|
+
type: "condition-group";
|
|
395
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
396
|
+
defaultCondition: Record<string, unknown>;
|
|
397
|
+
addLabel?: string;
|
|
398
|
+
emptyLabel?: string;
|
|
399
|
+
}) | ({
|
|
400
|
+
key: string;
|
|
401
|
+
label: string;
|
|
402
|
+
description?: string;
|
|
403
|
+
required?: boolean;
|
|
404
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
405
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
406
|
+
heading?: string;
|
|
393
407
|
} & {
|
|
394
408
|
type: "surface";
|
|
395
409
|
tone?: false;
|
|
@@ -333,6 +333,20 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
|
|
|
333
333
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
334
334
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
335
335
|
heading?: string;
|
|
336
|
+
} & {
|
|
337
|
+
type: "condition-group";
|
|
338
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
339
|
+
defaultCondition: Record<string, unknown>;
|
|
340
|
+
addLabel?: string;
|
|
341
|
+
emptyLabel?: string;
|
|
342
|
+
}) | ({
|
|
343
|
+
key: string;
|
|
344
|
+
label: string;
|
|
345
|
+
description?: string;
|
|
346
|
+
required?: boolean;
|
|
347
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
348
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
349
|
+
heading?: string;
|
|
336
350
|
} & {
|
|
337
351
|
type: "surface";
|
|
338
352
|
tone?: false;
|
|
@@ -20,14 +20,23 @@ export function PhiSelectBoxWidget({ config, sender, signalsEnabled = true, valu
|
|
|
20
20
|
sender,
|
|
21
21
|
});
|
|
22
22
|
const fill = mode === "control" || mode === "config";
|
|
23
|
+
/*
|
|
24
|
+
* As wide as the box it stands in. On a Page that box is the Widget's slot frame, which is as wide as
|
|
25
|
+
* its content unless the placement gives it a width (`size`) -- so an unsized select keeps its own
|
|
26
|
+
* width, at least four control heights, and a sized one fills what it was given, label included.
|
|
27
|
+
*/
|
|
23
28
|
const controlStyle = {
|
|
24
29
|
minWidth: fill ? 0 : minWidth,
|
|
25
|
-
width:
|
|
30
|
+
width: "100%",
|
|
26
31
|
};
|
|
32
|
+
// Cleared, the select answers nothing; the Control holds and announces that as the empty value.
|
|
27
33
|
const handleChange = (nextValue) => {
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
const held = nextValue ?? "";
|
|
35
|
+
choice.publish(held);
|
|
36
|
+
onChange?.(held);
|
|
30
37
|
};
|
|
31
|
-
const control = (_jsx(PhiSelectControl, { label: resolvedConfig.label, description: resolvedConfig.description,
|
|
38
|
+
const control = (_jsx(PhiSelectControl, { label: resolvedConfig.label, description: resolvedConfig.description,
|
|
39
|
+
// Nothing chosen shows the placeholder, not an empty choice.
|
|
40
|
+
value: choice.value === "" ? undefined : choice.value, placeholder: resolvedConfig.placeholder, disabled: choice.disabled, readOnly: choice.readOnly, size: resolvedConfig.controlSize, presentation: resolvedConfig.presentation, allowCustom: resolvedConfig.allowCustom, allowClear: resolvedConfig.allowClear, options: choice.options, onSearch: choice.onSearch, filterOptionsLocally: choice.filterOptionsLocally, onFocus: choice.emitFocus, onBlur: choice.emitBlur, onChange: handleChange, style: controlStyle }));
|
|
32
41
|
return control;
|
|
33
42
|
}
|
|
@@ -32,6 +32,7 @@ export const PHI_SELECT_BOX_WIDGET_DEFINITION = {
|
|
|
32
32
|
],
|
|
33
33
|
},
|
|
34
34
|
{ key: "allowCustom", type: "boolean", label: "Allow Custom Values" },
|
|
35
|
+
{ key: "allowClear", type: "boolean", label: "Allow Clear" },
|
|
35
36
|
...buildPhiChoiceControlOptionFields("toolbar"),
|
|
36
37
|
...PHI_CHOICE_CONTROL_CONFIG_FIELDS,
|
|
37
38
|
],
|
|
@@ -349,6 +349,20 @@ export declare const PHI_SIMPLE_TEXT_WIDGET_DEFINITION: {
|
|
|
349
349
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
350
350
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
351
351
|
heading?: string;
|
|
352
|
+
} & {
|
|
353
|
+
type: "condition-group";
|
|
354
|
+
conditionFields: import("../../../../../types").PhiCmsConfigField[];
|
|
355
|
+
defaultCondition: Record<string, unknown>;
|
|
356
|
+
addLabel?: string;
|
|
357
|
+
emptyLabel?: string;
|
|
358
|
+
}) | ({
|
|
359
|
+
key: string;
|
|
360
|
+
label: string;
|
|
361
|
+
description?: string;
|
|
362
|
+
required?: boolean;
|
|
363
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
364
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
365
|
+
heading?: string;
|
|
352
366
|
} & {
|
|
353
367
|
type: "surface";
|
|
354
368
|
tone?: false;
|
|
@@ -685,17 +685,19 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
685
685
|
return pageSize > 0 ? Math.ceil(total / pageSize) : 0;
|
|
686
686
|
}, [resolvedQuery.page, resolvedQuery.pageSize, rows.length, selectedRowIdentities.length, summary, total]);
|
|
687
687
|
const footer = useMemo(() => {
|
|
688
|
-
if (
|
|
688
|
+
if (presentation.header === false || presentation.footerOmitted)
|
|
689
689
|
return undefined;
|
|
690
|
+
if (!presentation.footer)
|
|
691
|
+
return { content: "" };
|
|
690
692
|
// The first variant whose value holds says the line instead; see `PhiTableFooterVariant`.
|
|
691
693
|
const variant = presentation.footer.variants?.find(({ when }) => {
|
|
692
694
|
const held = Boolean(resolveSummaryValue({ key: "when", value: when.value }));
|
|
693
695
|
return when.operator === "truthy" ? held : !held;
|
|
694
696
|
});
|
|
695
697
|
const template = variant?.template ?? presentation.footer.template;
|
|
696
|
-
//
|
|
698
|
+
// An empty line keeps the Table's closing bar; only footerOmitted removes it.
|
|
697
699
|
if (!template.trim())
|
|
698
|
-
return
|
|
700
|
+
return { align: presentation.footer.align, content: "" };
|
|
699
701
|
const values = variant ? variant.values ?? [] : presentation.footer.values;
|
|
700
702
|
return {
|
|
701
703
|
align: presentation.footer.align,
|
|
@@ -704,7 +706,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
704
706
|
return typeof value === "number" ? value : value == null ? "—" : String(value);
|
|
705
707
|
})),
|
|
706
708
|
};
|
|
707
|
-
}, [presentation.footer, resolveSummaryValue]);
|
|
709
|
+
}, [presentation.footer, presentation.footerOmitted, presentation.header, resolveSummaryValue]);
|
|
708
710
|
const tableSummary = useMemo(() => presentation.summary ? {
|
|
709
711
|
...presentation.summary,
|
|
710
712
|
rows: presentation.summary.rows.map((row) => ({
|
|
@@ -942,7 +944,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
|
|
|
942
944
|
afterRowIdentity: null,
|
|
943
945
|
}).catch(() => undefined).finally(clearPhiDataDragPayload);
|
|
944
946
|
}
|
|
945
|
-
: undefined, loading: effectiveLoading, loadingRows: presentation.loadingRows, 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 })] }));
|
|
947
|
+
: undefined, loading: effectiveLoading, loadingRows: presentation.loadingRows, bordered: presentation.borders, surface: presentation.surface, 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 })] }));
|
|
946
948
|
}
|
|
947
949
|
function TableAction({ action, disabled = false, disabledReason, templateValue, size, onActivate }) {
|
|
948
950
|
const icon = action.icon ? resolvePhiButtonIcon(action.icon) : null;
|
|
@@ -969,7 +971,13 @@ function TableAction({ action, disabled = false, disabledReason, templateValue,
|
|
|
969
971
|
if (action.execution === "link" && action.link) {
|
|
970
972
|
return disabled ? content : _jsx(PhiLink, { href: action.link.href, external: action.link.external, newTab: action.link.newTab, children: content });
|
|
971
973
|
}
|
|
972
|
-
|
|
974
|
+
/*
|
|
975
|
+
* Below the button, its right edge on the button's: the actions stand at a Table's right end, and a
|
|
976
|
+
* confirmation beside them had nowhere to go on a phone -- placed to the left it ran past the window's
|
|
977
|
+
* left edge, and Ant Design neither moves such a box sideways nor finds room for it on the right. Above
|
|
978
|
+
* or below, it is flipped to where there is room and shifted along the edge into the window.
|
|
979
|
+
*/
|
|
980
|
+
return action.confirm && !disabled ? (_jsx(PhiConfirmControl, { title: formatTableActionTemplate(action.confirm.title, templateValue), description: action.confirm.alert ? (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [action.confirm.description ? (_jsx("span", { children: formatTableActionTemplate(action.confirm.description, templateValue) })) : null, _jsx(PhiAlertControl, { level: action.confirm.alert.level, title: formatTableActionTemplate(action.confirm.alert.title, templateValue), description: formatTableActionTemplate(action.confirm.alert.description, templateValue) })] })) : formatTableActionTemplate(action.confirm.description, templateValue), confirmLabel: action.confirm.okText, cancelLabel: action.confirm.cancelText, danger: danger, placement: "bottomRight", onConfirm: onActivate, children: content })) : content;
|
|
973
981
|
}
|
|
974
982
|
function TableBindingTool({ field, tool, sourceConfig, value, size, onChange, onCreate }) {
|
|
975
983
|
const [popoverOpen, setPopoverOpen] = useState(false);
|
|
@@ -1037,8 +1045,9 @@ function TableFilter({ filter, field, sourceConfig, value, size, onChange, label
|
|
|
1037
1045
|
}
|
|
1038
1046
|
if (filter.type === "boolean") {
|
|
1039
1047
|
if (filter.control === "switch") {
|
|
1040
|
-
// A switch answers yes or no and nothing else, so an absent value reads as off.
|
|
1041
|
-
|
|
1048
|
+
// A switch answers yes or no and nothing else, so an absent value reads as off. Its label stands
|
|
1049
|
+
// beside it as text, not as its name -- so the filter's label is also its accessible name.
|
|
1050
|
+
return _jsx(PhiSwitchControl, { checked: value === true, size: size === "large" ? undefined : size, ariaLabel: filter.label, onChange: (next) => onChange(next) });
|
|
1042
1051
|
}
|
|
1043
1052
|
return _jsx(PhiSelectControl, { allowClear: true, value: typeof value === "boolean" ? String(value) : undefined, options: [{ value: "true", label: labels.yes }, { value: "false", label: labels.no }], size: size, placeholder: hiddenLabelPlaceholder, onChange: (next) => onChange(next === undefined ? undefined : next === "true"), style: { minWidth: 140 } });
|
|
1044
1053
|
}
|