@phis/ui 0.8.0 → 0.8.1
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 +15 -7
- package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
- package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
- package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
- package/components/cms/phi-cms-render-diagnostic.js +12 -2
- package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
- package/components/cms/phi-cms-render-error-boundary.js +1 -1
- package/components/cms/phi-cms-root-layout.js +3 -1
- package/components/controls/phi-media-picker-control.d.ts +9 -0
- package/components/controls/phi-media-picker-control.js +1 -1
- package/components/controls/phi-popover-control.js +4 -1
- package/components/controls/phi-table-control.d.ts +7 -1
- package/components/controls/phi-table-control.js +23 -8
- package/components/forms/form-descriptor-field-check.d.ts +18 -0
- package/components/forms/form-descriptor-field-check.js +41 -0
- package/components/forms/form-descriptor-runtime-client.js +11 -10
- package/components/forms/form-record-source.d.ts +38 -0
- package/components/forms/form-record-source.js +48 -0
- package/components/forms/shared-form-descriptors.d.ts +0 -34
- package/components/forms/shared-form-descriptors.js +0 -6
- package/components/forms/shared-form-ids.d.ts +1 -1
- package/components/forms/shared-form-ids.js +1 -1
- package/components/media/media-settings-labels.d.ts +1 -0
- package/components/media/media-settings-labels.js +2 -0
- package/components/media/phi-media-picker-binding.d.ts +41 -33
- package/components/media/phi-media-picker-binding.js +2 -1
- package/components/media/use-media-library-add-picker.d.ts +33 -32
- package/components/overlays/phi-overlay-container-client.js +11 -9
- package/components/regions/presets/phi-settings-page-shell-tree.d.ts +7 -0
- package/components/regions/presets/phi-settings-page-shell-tree.js +3 -3
- package/components/shell/phi-icon-names.d.ts +3 -0
- package/components/shell/phi-icon-names.js +3 -0
- package/components/shell/phi-icon.d.ts +5 -7
- package/components/shell/phi-icon.js +8 -21
- package/components/tables/client/phi-table-binding-params.d.ts +24 -0
- package/components/tables/client/phi-table-binding-params.js +39 -0
- package/components/tables/client/phi-table-binding.d.ts +1 -3
- package/components/tables/client/phi-table-binding.js +5 -9
- package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
- package/components/widgets/client/shared/phi-button-icons.js +8 -12
- package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
- package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
- package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
- package/components/widgets/client/shared/phi-collection-provider.js +5 -0
- package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
- package/components/widgets/client/shared/phi-command-buttons.d.ts +16 -0
- package/components/widgets/client/shared/phi-command-buttons.js +9 -1
- package/components/widgets/label-sets/admin-users.d.ts +1 -0
- package/components/widgets/label-sets/admin-users.js +2 -0
- package/components/widgets/label-sets/builder-modules.js +4 -0
- package/components/widgets/label-sets/profile.d.ts +0 -16
- package/components/widgets/label-sets/profile.js +0 -37
- package/components/widgets/label-sets/registration.d.ts +0 -1
- package/components/widgets/label-sets/registration.js +0 -2
- package/components/widgets/label-sets/revisions.js +2 -0
- package/components/widgets/label-sets/signals.js +2 -0
- package/components/widgets/label-types/builder-modules.d.ts +4 -0
- package/components/widgets/label-types/builder-modules.js +2 -0
- package/components/widgets/label-types/revisions.d.ts +2 -0
- package/components/widgets/label-types/revisions.js +2 -1
- package/components/widgets/label-types/signals.d.ts +2 -0
- package/components/widgets/label-types/signals.js +1 -0
- package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
- package/components/widgets/shared/widget-failure-audience.js +21 -0
- package/components/widgets/shared/widget-failure-client.js +5 -2
- package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
- package/components/widgets/shared/widget-failure-notice-client.js +10 -0
- package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
- package/components/widgets/shared/widget-failure-notice.js +17 -0
- package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
- package/components/widgets/shared/widget-failure-staff.js +18 -0
- package/components/widgets/shared/widget-failure.d.ts +9 -6
- package/components/widgets/shared/widget-failure.js +0 -9
- package/components/widgets/shared/widget-failure.server.d.ts +4 -2
- package/components/widgets/shared/widget-failure.server.js +8 -3
- package/constants/customer-file.d.ts +12 -3
- package/constants/customer-file.js +12 -3
- package/constants/runtime-module-ownership.js +4 -3
- package/constants/site-address.d.ts +9 -0
- package/constants/site-address.js +10 -0
- package/constants/table-loading.d.ts +14 -0
- package/constants/table-loading.js +14 -0
- package/constants.d.ts +2 -1
- package/constants.js +3 -1
- package/gateway/site-cms-write-validation.js +19 -3
- package/helpers/announced-action.d.ts +17 -0
- package/helpers/announced-action.js +29 -0
- package/helpers/phi-metadata.d.ts +0 -8
- package/helpers/phi-metadata.js +1 -10
- package/helpers/phi-site-description.d.ts +11 -0
- package/helpers/phi-site-description.js +13 -0
- package/helpers/preset-form-check.d.ts +14 -0
- package/helpers/preset-form-check.js +12 -0
- package/helpers/preset-table-check.d.ts +19 -15
- package/helpers/preset-table-check.js +33 -39
- package/helpers/record-widget-binding.d.ts +10 -0
- package/helpers/record-widget-binding.js +35 -0
- package/helpers/record-widget.d.ts +1 -10
- package/helpers/record-widget.js +4 -33
- package/helpers/table-widget-binding.d.ts +12 -0
- package/helpers/table-widget-binding.js +296 -0
- package/helpers/tree-widget-binding.d.ts +19 -0
- package/helpers/tree-widget-binding.js +72 -0
- package/helpers/typed-confirmation.d.ts +9 -0
- package/helpers/typed-confirmation.js +13 -0
- package/helpers/widget-binding-check.d.ts +22 -0
- package/helpers/widget-binding-check.js +91 -0
- package/module-page-check.d.ts +2 -0
- package/module-page-check.js +2 -0
- package/next/root-route.js +2 -1
- package/package.json +1 -1
- package/plugins/runtime-modules/accounting/ids.d.ts +7 -4
- package/plugins/runtime-modules/accounting/ids.js +14 -3
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +21 -9
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +29 -15
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +11 -8
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +206 -137
- package/plugins/runtime-modules/app/client-data-providers.js +1 -1
- package/plugins/runtime-modules/app/data-providers.d.ts +14 -69
- package/plugins/runtime-modules/app/data-providers.js +19 -54
- package/plugins/runtime-modules/app/definition.d.ts +8 -80
- package/plugins/runtime-modules/app/forms.d.ts +1 -16
- package/plugins/runtime-modules/app/forms.js +0 -59
- package/plugins/runtime-modules/app/ids.d.ts +2 -1
- package/plugins/runtime-modules/app/ids.js +3 -2
- package/plugins/runtime-modules/app/module.d.ts +8 -80
- package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
- package/plugins/runtime-modules/app/services/{addresses-table.js → addresses-collection.js} +23 -19
- package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +10 -6
- package/plugins/runtime-modules/app/trees/account-addresses-panel.js +37 -73
- package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +0 -5
- package/plugins/runtime-modules/app/trees/addresses-label-set.js +2 -6
- package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
- package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +1 -17
- package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +0 -2
- package/plugins/runtime-modules/app/trees/profile-label-set.js +2 -14
- package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
- package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -1
- package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
- package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
- package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +5 -0
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +14 -1
- package/plugins/runtime-modules/client-manifests/common.js +6 -0
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
- package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +173 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
- package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
- package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/table/client.js +30 -48
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
- package/plugins/runtime-modules/core/widgets/table/config.js +3 -0
- package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
- package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
- package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
- package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
- package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
- package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
- package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +5 -0
- package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
- package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
- package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
- package/plugins/runtime-modules/revisions/controller/client.js +74 -50
- package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
- package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
- package/plugins/runtime-modules/revisions/forms.js +1 -1
- package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
- package/plugins/runtime-modules/revisions/page-ids.js +4 -1
- package/plugins/runtime-modules/revisions/services/options.js +14 -4
- package/plugins/runtime-modules/revisions/services/table.js +41 -21
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +76 -3
- package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +39 -13
- package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
- package/plugins/runtime-modules/threads/controller/client.js +62 -2
- package/plugins/runtime-modules/threads/controller/definition.js +48 -0
- package/plugins/runtime-modules/threads/data-providers.d.ts +22 -37
- package/plugins/runtime-modules/threads/data-providers.js +35 -24
- package/plugins/runtime-modules/threads/definition.d.ts +22 -37
- package/plugins/runtime-modules/threads/ids.d.ts +2 -0
- package/plugins/runtime-modules/threads/ids.js +2 -0
- package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
- package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
- package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
- package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
- package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +14 -80
- package/plugins/runtime-modules/threads/services/customer-file-table.js +27 -112
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +4 -0
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +4 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +15 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +5 -0
- package/server-helpers/runtime.js +0 -1
- package/styles/controls.css +4 -2
- package/styles/layout.css +7 -0
- package/theme/phi-antd-token-resolver.d.ts +8 -0
- package/theme/phi-antd-token-resolver.js +10 -0
- package/theme/phi-theme-color.d.ts +19 -0
- package/theme/phi-theme-color.js +42 -0
- package/theme/phi-theme-gradients.js +4 -22
- package/theme/phi-theme-palette-defaults.d.ts +16 -0
- package/theme/phi-theme-palette-defaults.js +103 -0
- package/types/cms-plugins.d.ts +6 -1
- package/types/collection-provider.d.ts +27 -0
- package/types/collection-signal-values.d.ts +2 -0
- package/types/collection-signal-values.js +23 -0
- package/types/collection-view-widget.d.ts +9 -0
- package/types/core-widget-placements.d.ts +6 -0
- package/types/signals.d.ts +2 -0
- package/types/signals.js +2 -0
- package/types/table-widget.d.ts +15 -1
- package/types/table-widget.js +0 -282
- package/types/tree-widget.d.ts +0 -1
- package/types/tree-widget.js +0 -60
- package/types/widget-runtime.d.ts +0 -1
- package/types.d.ts +1 -1
- package/types.js +1 -1
- package/plugins/runtime-modules/app/services/addresses-table.d.ts +0 -135
package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js
CHANGED
|
@@ -11,7 +11,7 @@ import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from ".
|
|
|
11
11
|
import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
|
|
12
12
|
import { PHI_DIALOG_WIDTH_SINGLE_COLUMN } from "../../../../helpers/cms-dialog";
|
|
13
13
|
import { createPhiThreadsControllerAddress, PHI_THREADS_CONTROLLER_INSTANCE_KEY, PHI_THREADS_CONTROLLER_TYPE, } from "../../../../constants/threads-controller-address";
|
|
14
|
-
import { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS, PHI_CUSTOMER_FILE_RESOURCE_KEYS as RESOURCES, PHI_CUSTOMER_FILE_OWN_FILE_PARAM,
|
|
14
|
+
import { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS, PHI_CUSTOMER_FILE_RESOURCE_KEYS as RESOURCES, PHI_CUSTOMER_FILE_OWN_FILE_PARAM, } from "../../../../constants/customer-file";
|
|
15
15
|
import { PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS } from "../ids";
|
|
16
16
|
import { PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS } from "../customer-file-access";
|
|
17
17
|
import { getPhiAccountingCustomerFilePageLabels } from "./accounting-customer-file-label-set";
|
|
@@ -23,15 +23,18 @@ const SYNTHETIC_CUSTOMER_FILE_REGION_ID = -459;
|
|
|
23
23
|
*
|
|
24
24
|
* A Page of the Accounting Module, beside the product directory, built from what the conversations Page
|
|
25
25
|
* already is and bound by Foundation names only (`constants/customer-file.ts`,
|
|
26
|
-
* `constants/threads-controller-address.ts`): the Table
|
|
27
|
-
* conversations Module's, which is active in the Accounting Area by default and has to
|
|
28
|
-
* to read anything. The person Table's filter is Core's member picker
|
|
26
|
+
* `constants/threads-controller-address.ts`): the Table and Collection Providers and the Conversations
|
|
27
|
+
* Controller are the conversations Module's, which is active in the Accounting Area by default and has to
|
|
28
|
+
* be for this Page to read anything. The person Table's filter is Core's member picker
|
|
29
29
|
* (the `site-members` options with Core's search, which matches names, e-mail addresses and telephone
|
|
30
|
-
* numbers); its query goes to the
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* file
|
|
30
|
+
* numbers); its query goes to the conversations Table and to the Conversations Controller, so one choice
|
|
31
|
+
* fills the Page with one request: the Controller hands the member to the addresses tiles as binding params
|
|
32
|
+
* (Core's address renderer, read-only), joins the Tables' read for the file's id and hands it to the file
|
|
33
|
+
* panel, a conversation reader whose "Add note" opens Core's Reply Form
|
|
34
|
+
* in a dialog of its own (every message of a file is internal). The conversations Table lists the person's
|
|
35
|
+
* conversations, the file not among them, and choosing a row is the conversations Page's choreography
|
|
36
|
+
* unchanged: the Controller makes the selection a thread, the conversation reader below reads it, and its
|
|
37
|
+
* Reply opens the Reply dialog with the internal note offered.
|
|
35
38
|
*
|
|
36
39
|
* The Page is for the holders of `accounting` (`PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS`), who read every
|
|
37
40
|
* field, the addresses included. A viewer the Area admits without it is told so in the Page and nothing is
|
|
@@ -77,8 +80,11 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
77
80
|
}
|
|
78
81
|
const controllerAddress = createPhiThreadsControllerAddress();
|
|
79
82
|
const addressesAddress = createPhiSignalAddress("cms", widgetIds.widgetAddresses);
|
|
83
|
+
const fileAddress = createPhiSignalAddress("cms", widgetIds.widgetFile);
|
|
80
84
|
const threadsAddress = createPhiSignalAddress("cms", widgetIds.widgetThreads);
|
|
81
85
|
const conversationAddress = createPhiSignalAddress("cms", widgetIds.widgetConversation);
|
|
86
|
+
const noteOverlayAddress = createPhiSignalAddress("cms", overlayIds.overlayNote);
|
|
87
|
+
const noteFormAddress = createPhiSignalAddress("cms", widgetIds.widgetNoteForm);
|
|
82
88
|
const replyOverlayAddress = createPhiSignalAddress("cms", overlayIds.overlayReply);
|
|
83
89
|
const replyFormAddress = createPhiSignalAddress("cms", widgetIds.widgetReplyForm);
|
|
84
90
|
const route = (routeKey, capabilityId, channel, action, receiver, valueType = "none", valueSchema) => ({
|
|
@@ -91,76 +97,135 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
91
97
|
...(valueSchema ? { valueSchema } : {}),
|
|
92
98
|
receiver,
|
|
93
99
|
});
|
|
94
|
-
// The member chosen above, handed on as the query the two lists below read it from.
|
|
95
|
-
const personQueryTo = (routeKey, receiver) => route(routeKey, "queryChange", "query", "change", receiver, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableQuery);
|
|
96
100
|
const queryInput = (routeKey, receiver) => route(routeKey, "queryChange", "query", "change", receiver, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableQuery);
|
|
97
101
|
const tableAction = (routeKey, capabilityId, receiver) => route(routeKey, capabilityId, "action", "activate", receiver, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableAction);
|
|
98
102
|
const threadRoute = (routeKey, capabilityId, action, receiver) => route(routeKey, capabilityId, "thread", action, receiver, "json", PHI_SIGNAL_VALUE_SCHEMAS.threadSelection);
|
|
99
103
|
const prefix = "accounting-customer-file";
|
|
100
104
|
// What each Table says where its rows would be when the reader chooses themselves (Core refuses that file).
|
|
101
105
|
const ownFile = { [PHI_CUSTOMER_FILE_OWN_FILE_PARAM]: labels.ownFile };
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
/*
|
|
107
|
+
* Core's Reply Form in a dialog, once for a note in the file and once for a reply in the conversation:
|
|
108
|
+
* each opens on its own reader's Reply and reads its thread from the row that Reply named. Every message
|
|
109
|
+
* of a file is internal (Core), so the note offers no audience; the reply offers the internal note.
|
|
110
|
+
*/
|
|
111
|
+
const writeDialog = (kind) => {
|
|
112
|
+
const note = kind === "note";
|
|
113
|
+
const overlayAddress = note ? noteOverlayAddress : replyOverlayAddress;
|
|
114
|
+
const formAddress = note ? noteFormAddress : replyFormAddress;
|
|
115
|
+
const title = note ? labels.note.title : labels.reply.title;
|
|
116
|
+
const dialog = nodes.dialog({
|
|
117
|
+
id: note ? overlayIds.overlayNote : overlayIds.overlayReply,
|
|
118
|
+
bodyLayoutNodeId: note ? layoutIds.layoutNote : layoutIds.layoutReply,
|
|
119
|
+
sortOrder: note ? 0 : 1,
|
|
120
|
+
label: `${prefix}-${kind}-modal`,
|
|
121
|
+
config: {
|
|
122
|
+
title,
|
|
123
|
+
size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
|
|
124
|
+
mountPolicy: "remount",
|
|
125
|
+
closeMode: "immediate",
|
|
126
|
+
openActionKey: "reply",
|
|
127
|
+
signalRoutes: {
|
|
128
|
+
listens: [
|
|
129
|
+
tableAction(`${prefix}-${kind}-open`, "open", overlayAddress),
|
|
130
|
+
route(`${prefix}-${kind}-close`, "close", "dialog", "close", overlayAddress),
|
|
131
|
+
],
|
|
132
|
+
},
|
|
118
133
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
134
|
+
commands: {
|
|
135
|
+
footerLayoutNodeId: note ? layoutIds.layoutNoteFooter : layoutIds.layoutReplyFooter,
|
|
136
|
+
widgetId: note ? widgetIds.widgetNoteCommands : widgetIds.widgetReplyCommands,
|
|
137
|
+
label: title,
|
|
138
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
139
|
+
config: {
|
|
140
|
+
key: `${prefix}-${kind}-commands`,
|
|
141
|
+
buttons: [
|
|
142
|
+
{ key: "cancel", emits: [{ capabilityId: "close", value: null }], action: "cancel", icon: "close" },
|
|
143
|
+
{
|
|
144
|
+
key: "submit",
|
|
145
|
+
emits: [{ capabilityId: "submit", value: null }],
|
|
146
|
+
label: note ? labels.note.save : labels.reply.send,
|
|
147
|
+
variant: "primary",
|
|
148
|
+
icon: note ? "save" : "antd:send-outlined",
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
signalRoutes: {
|
|
152
|
+
emits: [
|
|
153
|
+
route(`${prefix}-${kind}-cancel`, "close", "dialog", "close", overlayAddress),
|
|
154
|
+
route(`${prefix}-${kind}-commands-submit`, "submit", "submit", "activate", formAddress),
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
const form = nodes.widget({
|
|
161
|
+
id: formAddress === noteFormAddress ? widgetIds.widgetNoteForm : widgetIds.widgetReplyForm,
|
|
162
|
+
parentLayoutNodeId: note ? layoutIds.layoutNote : layoutIds.layoutReply,
|
|
163
|
+
typeKey: "form",
|
|
164
|
+
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
165
|
+
label: title,
|
|
124
166
|
flags: PhiCmsFlags.NoTranslate,
|
|
125
167
|
config: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
variant: "primary",
|
|
134
|
-
icon: "antd:send-outlined",
|
|
135
|
-
},
|
|
136
|
-
],
|
|
168
|
+
formId: PHI_SHARED_FORM_IDS.threadReply,
|
|
169
|
+
// A reply may be an internal note; in the file every message is one (Core), so there is nothing to choose.
|
|
170
|
+
...(note ? {} : { formConfig: { initialValues: { internalAllowed: true } } }),
|
|
171
|
+
execution: { mode: "handler" },
|
|
172
|
+
source: { providerKey: PHI_THREAD_LIBRARY_DATA_PROVIDER_KEYS.table, resourceKey: "inbox" },
|
|
173
|
+
openActionKey: "reply",
|
|
174
|
+
feedback: { mode: "message" },
|
|
137
175
|
signalRoutes: {
|
|
138
176
|
emits: [
|
|
139
|
-
route(`${prefix}-
|
|
140
|
-
route(`${prefix}-
|
|
177
|
+
route(`${prefix}-${kind}-success`, "submitSuccess", "submit", "activate", controllerAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.formResult),
|
|
178
|
+
route(`${prefix}-${kind}-success-close`, "submitSuccess", "dialog", "close", overlayAddress),
|
|
179
|
+
],
|
|
180
|
+
listens: [
|
|
181
|
+
route(`${prefix}-${kind}-submit`, "submit", "submit", "activate", formAddress),
|
|
182
|
+
tableAction(`${prefix}-${kind}-record-open`, "recordOpen", formAddress),
|
|
141
183
|
],
|
|
142
184
|
},
|
|
143
185
|
},
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
186
|
+
});
|
|
187
|
+
return { dialog, form };
|
|
188
|
+
};
|
|
189
|
+
const noteDialog = writeDialog("note");
|
|
190
|
+
const replyDialog = writeDialog("reply");
|
|
191
|
+
/*
|
|
192
|
+
* A conversation reader: the file's, which the Controller hands the member's file, and the listing's,
|
|
193
|
+
* which it hands the chosen conversation. Each Reply opens its own dialog and reads its own Form, and
|
|
194
|
+
* reaches the Controller too, which then knows where the message landed.
|
|
195
|
+
*/
|
|
196
|
+
const reader = (kind) => {
|
|
197
|
+
const file = kind === "file";
|
|
198
|
+
const address = file ? fileAddress : conversationAddress;
|
|
199
|
+
const overlayAddress = file ? noteOverlayAddress : replyOverlayAddress;
|
|
200
|
+
const formAddress = file ? noteFormAddress : replyFormAddress;
|
|
201
|
+
return {
|
|
202
|
+
reply: true,
|
|
203
|
+
...(file ? { title: labels.file.title, replyLabel: labels.file.add, emptyDescription: labels.file.empty } : { emptyDescription: labels.conversation.empty }),
|
|
204
|
+
signalRoutes: {
|
|
205
|
+
emits: [
|
|
206
|
+
...(file ? [] : [
|
|
207
|
+
// A conversation opened from `?thread=` reaches the Controller, which knows it is open.
|
|
208
|
+
route(`${prefix}-conversation-opened`, "opened", "opened", "change", controllerAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.threadSelection),
|
|
209
|
+
]),
|
|
210
|
+
tableAction(`${prefix}-${kind}-reply`, "reply", overlayAddress),
|
|
211
|
+
tableAction(`${prefix}-${kind}-reply-record`, "reply", formAddress),
|
|
212
|
+
tableAction(`${prefix}-${kind}-reply-controller`, "reply", controllerAddress),
|
|
213
|
+
],
|
|
214
|
+
listens: [
|
|
215
|
+
threadRoute(`${prefix}-${kind}-select`, "select", "change", address),
|
|
216
|
+
threadRoute(`${prefix}-${kind}-reload`, "reload", "reload", address),
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
};
|
|
159
221
|
return {
|
|
160
222
|
page: nodes.page({ pageType: PhiCmsPageType.Standard }),
|
|
161
223
|
pageMeta,
|
|
162
|
-
|
|
163
|
-
|
|
224
|
+
/*
|
|
225
|
+
* The Conversations Controller, configured as on the conversations Page -- the chosen conversation to
|
|
226
|
+
* its reader, the listing read again after a reply -- and with this Page's part: the member's file to
|
|
227
|
+
* the file panel when the person Table chooses one, read again after a note.
|
|
228
|
+
*/
|
|
164
229
|
controllerSettings: [{
|
|
165
230
|
type: PHI_THREADS_CONTROLLER_TYPE,
|
|
166
231
|
instanceKey: PHI_THREADS_CONTROLLER_INSTANCE_KEY,
|
|
@@ -170,14 +235,18 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
170
235
|
emits: [
|
|
171
236
|
threadRoute(`${prefix}-controller-thread`, "threadChange", "change", conversationAddress),
|
|
172
237
|
threadRoute(`${prefix}-controller-thread-reload`, "threadReload", "reload", conversationAddress),
|
|
238
|
+
threadRoute(`${prefix}-controller-file`, "fileThreadChange", "change", fileAddress),
|
|
239
|
+
threadRoute(`${prefix}-controller-file-reload`, "fileThreadReload", "reload", fileAddress),
|
|
173
240
|
route(`${prefix}-controller-reload-threads`, "reload", "reload", "activate", threadsAddress),
|
|
241
|
+
// The member chosen, as the addresses tiles' binding params.
|
|
242
|
+
route(`${prefix}-controller-addresses`, "memberParamsChange", "bindingParams", "change", addressesAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableBindingParams),
|
|
174
243
|
],
|
|
175
244
|
},
|
|
176
245
|
},
|
|
177
246
|
}],
|
|
178
|
-
overlays: [replyDialog.overlay],
|
|
247
|
+
overlays: [noteDialog.dialog.overlay, replyDialog.dialog.overlay],
|
|
179
248
|
regions: [scaffold.region],
|
|
180
|
-
layoutNodes: [scaffold.layoutNode, ...replyDialog.layouts],
|
|
249
|
+
layoutNodes: [scaffold.layoutNode, ...noteDialog.dialog.layouts, ...replyDialog.dialog.layouts],
|
|
181
250
|
contentWidgets: [
|
|
182
251
|
nodes.widget({
|
|
183
252
|
id: widgetIds.widgetPerson,
|
|
@@ -195,17 +264,26 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
195
264
|
controlSize: "small",
|
|
196
265
|
layout: { mode: "auto", overflowX: "auto" },
|
|
197
266
|
columns: [
|
|
198
|
-
{ key: "displayName", fieldKey: "displayName", title: labels.person.columns.displayName, sizing: { mode: "content" } },
|
|
199
|
-
{ key: "fullName", fieldKey: "fullName", title: labels.person.columns.name, sizing: { mode: "content" } },
|
|
200
|
-
{ key: "companyName", fieldKey: "companyName", title: labels.person.columns.company, sizing: { mode: "content" } },
|
|
201
|
-
{ key: "email", fieldKey: "email", title: labels.person.columns.email, renderer: "email", sizing: { mode: "fill" } },
|
|
202
|
-
{ key: "phone", fieldKey: "phone", title: labels.person.columns.phone, sizing: { mode: "content" } },
|
|
203
|
-
{ key: "mobile", fieldKey: "mobile", title: labels.person.columns.mobile, sizing: { mode: "content" } },
|
|
267
|
+
{ key: "displayName", fieldKey: "displayName", title: labels.person.columns.displayName, sizing: { mode: "content", minWidth: 120 } },
|
|
268
|
+
{ key: "fullName", fieldKey: "fullName", title: labels.person.columns.name, sizing: { mode: "content", minWidth: 120 } },
|
|
269
|
+
{ key: "companyName", fieldKey: "companyName", title: labels.person.columns.company, sizing: { mode: "content", minWidth: 120 } },
|
|
270
|
+
{ key: "email", fieldKey: "email", title: labels.person.columns.email, renderer: "email", sizing: { mode: "fill", minWidth: 200 } },
|
|
271
|
+
{ key: "phone", fieldKey: "phone", title: labels.person.columns.phone, sizing: { mode: "content", minWidth: 120 } },
|
|
272
|
+
{ key: "mobile", fieldKey: "mobile", title: labels.person.columns.mobile, sizing: { mode: "content", minWidth: 120 } },
|
|
204
273
|
],
|
|
205
274
|
emptyState: { title: labels.person.empty },
|
|
275
|
+
footer: {
|
|
276
|
+
template: labels.person.footer,
|
|
277
|
+
values: [{ key: "member", value: { source: "provider", fieldKey: "userId" } }],
|
|
278
|
+
// Nobody chosen: nothing to say under the picker.
|
|
279
|
+
variants: [{ when: { value: { source: "provider", fieldKey: "userId" }, operator: "falsy" }, template: "" }],
|
|
280
|
+
align: "start",
|
|
281
|
+
},
|
|
282
|
+
// One row, the member chosen.
|
|
283
|
+
loadingRows: 1,
|
|
206
284
|
},
|
|
207
285
|
features: {
|
|
208
|
-
// The
|
|
286
|
+
// The other readers take this query, so it pages as they do.
|
|
209
287
|
pagination: { enabled: false, pageSize: 25 },
|
|
210
288
|
sorting: { mode: "none" },
|
|
211
289
|
search: { enabled: false },
|
|
@@ -223,55 +301,76 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
223
301
|
}],
|
|
224
302
|
},
|
|
225
303
|
signalRoutes: {
|
|
304
|
+
// The member chosen, handed on as the query the conversations read it from, and to the
|
|
305
|
+
// Controller, which opens their file and hands the member to the addresses.
|
|
226
306
|
emits: [
|
|
227
|
-
|
|
228
|
-
|
|
307
|
+
route(`${prefix}-person-to-threads`, "queryChange", "query", "change", threadsAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableQuery),
|
|
308
|
+
route(`${prefix}-person-to-file`, "queryChange", "member", "change", controllerAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableQuery),
|
|
229
309
|
],
|
|
230
310
|
},
|
|
231
311
|
},
|
|
232
312
|
}),
|
|
313
|
+
/*
|
|
314
|
+
* The member's addresses as Core's address tiles, read-only: the resource declares no action. The
|
|
315
|
+
* member arrives from the Controller as the binding param `userId`, and the read is the one the
|
|
316
|
+
* Tables and the Controller make for the choice, joined.
|
|
317
|
+
*/
|
|
233
318
|
nodes.widget({
|
|
234
319
|
id: widgetIds.widgetAddresses,
|
|
235
320
|
parentLayoutNodeId: PHI_BASE_PAGE_LAYOUT_NODE_ID,
|
|
236
|
-
typeKey: "
|
|
321
|
+
typeKey: "collection-view",
|
|
237
322
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX + 1,
|
|
238
323
|
sortOrder: 1,
|
|
239
324
|
// The Module's Label Set, translated already.
|
|
240
325
|
flags: PhiCmsFlags.NoTranslate,
|
|
241
326
|
label: labels.addresses.label,
|
|
242
327
|
config: {
|
|
243
|
-
source: { providerKey: PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS.
|
|
328
|
+
source: { providerKey: PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS.addresses, resourceKey: RESOURCES.addresses, params: ownFile },
|
|
244
329
|
presentation: {
|
|
245
330
|
title: labels.addresses.title,
|
|
331
|
+
mode: "grid",
|
|
246
332
|
controlSize: "small",
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
emptyState: { title: labels.addresses.empty },
|
|
333
|
+
emptyDescription: labels.addresses.empty,
|
|
334
|
+
labels: { purposes: labels.addresses.purposes },
|
|
250
335
|
},
|
|
251
336
|
features: {
|
|
252
|
-
pagination: { enabled: false },
|
|
253
|
-
sorting: { mode: "none" },
|
|
254
|
-
search: { enabled: false },
|
|
255
337
|
tools: { mode: "self-contained", reset: false, reload: false },
|
|
338
|
+
pagination: { enabled: false },
|
|
339
|
+
},
|
|
340
|
+
signalRoutes: {
|
|
341
|
+
listens: [
|
|
342
|
+
route(`${prefix}-addresses-member`, "bindingParamsChange", "bindingParams", "change", addressesAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.tableBindingParams),
|
|
343
|
+
],
|
|
256
344
|
},
|
|
257
|
-
signalRoutes: { listens: [queryInput(`${prefix}-addresses-query`, addressesAddress)] },
|
|
258
345
|
},
|
|
259
346
|
}),
|
|
347
|
+
// The member's file: its entries, internal notes and what Add-ons wrote with their links, and "Add note".
|
|
260
348
|
nodes.widget({
|
|
261
|
-
id: widgetIds.
|
|
349
|
+
id: widgetIds.widgetFile,
|
|
262
350
|
parentLayoutNodeId: PHI_BASE_PAGE_LAYOUT_NODE_ID,
|
|
263
|
-
typeKey: "
|
|
351
|
+
typeKey: "thread-conversation",
|
|
264
352
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX + 2,
|
|
265
353
|
sortOrder: 2,
|
|
266
354
|
// The Module's Label Set, translated already.
|
|
267
355
|
flags: PhiCmsFlags.NoTranslate,
|
|
356
|
+
label: labels.file.label,
|
|
357
|
+
config: reader("file"),
|
|
358
|
+
}),
|
|
359
|
+
nodes.widget({
|
|
360
|
+
id: widgetIds.widgetThreads,
|
|
361
|
+
parentLayoutNodeId: PHI_BASE_PAGE_LAYOUT_NODE_ID,
|
|
362
|
+
typeKey: "table",
|
|
363
|
+
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX + 3,
|
|
364
|
+
sortOrder: 3,
|
|
365
|
+
// The Module's Label Set, translated already.
|
|
366
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
268
367
|
label: labels.threads.label,
|
|
269
368
|
config: {
|
|
270
|
-
|
|
271
|
-
source: { providerKey: PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS.table, resourceKey: RESOURCES.threads, params: { ...ownFile, [PHI_CUSTOMER_FILE_SUBJECT_PARAM]: labels.fileSubject } },
|
|
369
|
+
source: { providerKey: PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS.table, resourceKey: RESOURCES.threads, params: ownFile },
|
|
272
370
|
presentation: {
|
|
273
371
|
title: labels.threads.title,
|
|
274
372
|
controlSize: "small",
|
|
373
|
+
// Fixed, as on the conversations Page: the subject is the one column worth cutting short.
|
|
275
374
|
layout: { mode: "fixed", overflowX: "auto" },
|
|
276
375
|
columns: [
|
|
277
376
|
{ key: "subject", fieldKey: "subject", title: labels.threads.columns.subject, ellipsis: true, sizing: { mode: "fill", minWidth: 200 } },
|
|
@@ -285,7 +384,6 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
285
384
|
[String(PhisThreadKind.Group)]: labels.threads.kinds.group,
|
|
286
385
|
[String(PhisThreadKind.CrossGroup)]: labels.threads.kinds.crossGroup,
|
|
287
386
|
[String(PhisThreadKind.Support)]: labels.threads.kinds.support,
|
|
288
|
-
[String(PhisThreadKind.File)]: labels.threads.kinds.file,
|
|
289
387
|
},
|
|
290
388
|
},
|
|
291
389
|
{
|
|
@@ -299,9 +397,20 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
299
397
|
},
|
|
300
398
|
{ key: "latestMessageAt", fieldKey: "latestMessageAt", title: labels.threads.columns.activity, renderer: "datetime", sizing: { mode: "fixed", width: 180 } },
|
|
301
399
|
],
|
|
302
|
-
emptyState: { title: labels.threads.empty },
|
|
400
|
+
emptyState: { title: labels.threads.empty, description: labels.threads.emptyHint },
|
|
401
|
+
footer: {
|
|
402
|
+
template: labels.threads.footer,
|
|
403
|
+
values: [
|
|
404
|
+
{ key: "threads", value: { source: "core", fieldKey: "pageRows" } },
|
|
405
|
+
{ key: "page", value: { source: "core", fieldKey: "page" } },
|
|
406
|
+
],
|
|
407
|
+
// Nothing on the page: the empty state says it.
|
|
408
|
+
variants: [{ when: { value: { source: "core", fieldKey: "pageRows" }, operator: "falsy" }, template: "" }],
|
|
409
|
+
align: "start",
|
|
410
|
+
},
|
|
303
411
|
},
|
|
304
412
|
features: {
|
|
413
|
+
// Choosing one opens it below, as on the conversations Page.
|
|
305
414
|
rowSelection: { mode: "single", preserveSelectedRowIdentities: true },
|
|
306
415
|
pagination: { enabled: true, pageSize: 25 },
|
|
307
416
|
sorting: { mode: "none" },
|
|
@@ -325,57 +434,17 @@ export async function buildPhiDefaultAccountingCustomerFilePageTree({ page, runt
|
|
|
325
434
|
id: widgetIds.widgetConversation,
|
|
326
435
|
parentLayoutNodeId: PHI_BASE_PAGE_LAYOUT_NODE_ID,
|
|
327
436
|
typeKey: "thread-conversation",
|
|
328
|
-
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX +
|
|
329
|
-
sortOrder:
|
|
330
|
-
|
|
331
|
-
config: {
|
|
332
|
-
reply: true,
|
|
333
|
-
signalRoutes: {
|
|
334
|
-
emits: [
|
|
335
|
-
// A conversation opened from `?thread=` reaches the Controller, which knows it is open.
|
|
336
|
-
route(`${prefix}-conversation-opened`, "opened", "opened", "change", controllerAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.threadSelection),
|
|
337
|
-
// Reply: one announcement, two listeners -- the dialog opens on it, the Form reads its row.
|
|
338
|
-
tableAction(`${prefix}-conversation-reply`, "reply", replyOverlayAddress),
|
|
339
|
-
tableAction(`${prefix}-conversation-reply-record`, "reply", replyFormAddress),
|
|
340
|
-
],
|
|
341
|
-
listens: [
|
|
342
|
-
threadRoute(`${prefix}-conversation-select`, "select", "change", conversationAddress),
|
|
343
|
-
threadRoute(`${prefix}-conversation-reload`, "reload", "reload", conversationAddress),
|
|
344
|
-
],
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
}),
|
|
348
|
-
/*
|
|
349
|
-
* Core's Reply Form, reading its thread from the row the conversation's Reply named, as on the
|
|
350
|
-
* conversations Page. Staff may mark a note internal; in the file every message is internal anyway.
|
|
351
|
-
*/
|
|
352
|
-
nodes.widget({
|
|
353
|
-
id: widgetIds.widgetReplyForm,
|
|
354
|
-
parentLayoutNodeId: layoutIds.layoutReply,
|
|
355
|
-
typeKey: "form",
|
|
356
|
-
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
357
|
-
label: labels.noteLabel,
|
|
437
|
+
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX + 4,
|
|
438
|
+
sortOrder: 4,
|
|
439
|
+
// The Module's Label Set, translated already.
|
|
358
440
|
flags: PhiCmsFlags.NoTranslate,
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
formConfig: { initialValues: { internalAllowed: true } },
|
|
362
|
-
execution: { mode: "handler" },
|
|
363
|
-
source: { providerKey: PHI_THREAD_LIBRARY_DATA_PROVIDER_KEYS.table, resourceKey: "inbox" },
|
|
364
|
-
openActionKey: "reply",
|
|
365
|
-
feedback: { mode: "message" },
|
|
366
|
-
signalRoutes: {
|
|
367
|
-
emits: [
|
|
368
|
-
route(`${prefix}-reply-success`, "submitSuccess", "submit", "activate", controllerAddress, "json", PHI_SIGNAL_VALUE_SCHEMAS.formResult),
|
|
369
|
-
route(`${prefix}-reply-success-close`, "submitSuccess", "dialog", "close", replyOverlayAddress),
|
|
370
|
-
],
|
|
371
|
-
listens: [
|
|
372
|
-
route(`${prefix}-reply-submit`, "submit", "submit", "activate", replyFormAddress),
|
|
373
|
-
tableAction(`${prefix}-reply-record-open`, "recordOpen", replyFormAddress),
|
|
374
|
-
],
|
|
375
|
-
},
|
|
376
|
-
},
|
|
441
|
+
label: labels.conversation.label,
|
|
442
|
+
config: reader("conversation"),
|
|
377
443
|
}),
|
|
378
|
-
|
|
444
|
+
noteDialog.form,
|
|
445
|
+
replyDialog.form,
|
|
446
|
+
...noteDialog.dialog.widgets,
|
|
447
|
+
...replyDialog.dialog.widgets,
|
|
379
448
|
],
|
|
380
449
|
};
|
|
381
450
|
}
|
|
@@ -4,6 +4,6 @@ export const PHI_APP_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS = [
|
|
|
4
4
|
{
|
|
5
5
|
key: PHI_APP_ADDRESSES_DATA_PROVIDER_KEY,
|
|
6
6
|
ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
|
|
7
|
-
loadLive: async () => (await import("./services/addresses-
|
|
7
|
+
loadLive: async () => (await import("./services/addresses-collection")).PhiAppAddressesCollectionProviderClient,
|
|
8
8
|
},
|
|
9
9
|
];
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The account's own address book on this Site (`users:v1`, phis-server SERVER_ADDONS.md): the current
|
|
3
|
-
* addresses only, never a `Superseded` or `Removed` one
|
|
3
|
+
* addresses only, never a `Superseded` or `Removed` one, as Core's address tiles draw them
|
|
4
|
+
* (`PHI_SITE_ADDRESS_ITEM_RENDERER_KEY`, COLLECTIONS.md "The address renderer").
|
|
4
5
|
*
|
|
5
6
|
* `live` and `authoringMode: "none"`: they are the signed-in person's, and nobody composing a Page has any
|
|
6
7
|
* business reading them. An address never changes in Core -- a change is a new version that replaces it --
|
|
7
|
-
* so the
|
|
8
|
-
* are the Module's two Forms
|
|
8
|
+
* so the item's id moves with every edit, which is why every write answers the list read again. Adding and
|
|
9
|
+
* changing are the Module's two Forms, opened by the toolbar's `create` and a tile's `edit` (the change
|
|
10
|
+
* Form reads the address through `readRecord`); removing and the two defaults are the Provider's actions.
|
|
11
|
+
* A chosen address is `{ addressId }` (`selectionValueSchema`), prepared for the Shop's checkout.
|
|
9
12
|
*/
|
|
10
13
|
export declare const PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
|
|
11
14
|
key: `${string}/${string}`;
|
|
12
15
|
ownerModuleId: "@phis/ui/modules/app";
|
|
13
|
-
kind: "
|
|
16
|
+
kind: "collection";
|
|
14
17
|
executionMode: "live";
|
|
15
18
|
authoringMode: "none";
|
|
16
19
|
title: string;
|
|
@@ -18,81 +21,23 @@ export declare const PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
|
|
|
18
21
|
resources: {
|
|
19
22
|
resourceKey: string;
|
|
20
23
|
title: string;
|
|
21
|
-
|
|
24
|
+
itemIdentityPath: string;
|
|
25
|
+
itemRendererKey: `${string}/${string}`;
|
|
26
|
+
selectionValueSchema: `${string}/signals/${string}`;
|
|
22
27
|
recordRead: true;
|
|
23
|
-
|
|
24
|
-
key: string;
|
|
25
|
-
title: string;
|
|
26
|
-
type: "number";
|
|
27
|
-
required: true;
|
|
28
|
-
options?: undefined;
|
|
29
|
-
} | {
|
|
30
|
-
key: string;
|
|
31
|
-
title: string;
|
|
32
|
-
type: "string";
|
|
33
|
-
required?: undefined;
|
|
34
|
-
options?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
key: string;
|
|
37
|
-
title: string;
|
|
38
|
-
type: "enum[]";
|
|
39
|
-
options: {
|
|
40
|
-
value: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
|
|
41
|
-
label: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
|
|
42
|
-
}[];
|
|
43
|
-
required?: undefined;
|
|
44
|
-
} | {
|
|
45
|
-
key: string;
|
|
46
|
-
title: string;
|
|
47
|
-
type: "boolean";
|
|
48
|
-
required?: undefined;
|
|
49
|
-
options?: undefined;
|
|
50
|
-
} | {
|
|
51
|
-
key: string;
|
|
52
|
-
title: string;
|
|
53
|
-
type: "datetime";
|
|
54
|
-
required?: undefined;
|
|
55
|
-
options?: undefined;
|
|
56
|
-
} | {
|
|
57
|
-
key: string;
|
|
58
|
-
title: string;
|
|
59
|
-
type: "json";
|
|
60
|
-
required?: undefined;
|
|
61
|
-
options?: undefined;
|
|
62
|
-
} | {
|
|
63
|
-
key: string;
|
|
64
|
-
title: string;
|
|
65
|
-
type: "number";
|
|
66
|
-
required?: undefined;
|
|
67
|
-
options?: undefined;
|
|
68
|
-
})[];
|
|
28
|
+
defaultForWidget: true;
|
|
69
29
|
query: {
|
|
70
30
|
search: false;
|
|
71
|
-
|
|
72
|
-
sorting: "none";
|
|
73
|
-
pagination: "none";
|
|
31
|
+
pagination: false;
|
|
74
32
|
};
|
|
75
33
|
actions: ({
|
|
76
34
|
key: string;
|
|
77
35
|
title: string;
|
|
78
|
-
scope: "
|
|
79
|
-
intent: "write";
|
|
80
|
-
disabledWhen: {
|
|
81
|
-
match: "any";
|
|
82
|
-
conditions: {
|
|
83
|
-
source: "row";
|
|
84
|
-
valuePath: string;
|
|
85
|
-
operator: "truthy";
|
|
86
|
-
}[];
|
|
87
|
-
};
|
|
88
|
-
confirmation?: undefined;
|
|
36
|
+
scope: "resource";
|
|
89
37
|
} | {
|
|
90
38
|
key: string;
|
|
91
39
|
title: string;
|
|
92
|
-
scope: "
|
|
93
|
-
intent: "destructive";
|
|
94
|
-
confirmation: "required";
|
|
95
|
-
disabledWhen?: undefined;
|
|
40
|
+
scope: "item";
|
|
96
41
|
})[];
|
|
97
42
|
}[];
|
|
98
43
|
}[];
|