@phis/ui 0.4.15 → 0.4.17
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 +2 -1
- package/components/controls/phi-table-control.js +15 -0
- package/components/forms/compound-form-controls.js +2 -1
- package/components/regions/clients/cms-region-container-client.d.ts +3 -1
- package/components/regions/clients/cms-region-container-client.js +2 -1
- package/components/regions/phi-cms-region-container.d.ts +3 -1
- package/components/regions/phi-cms-region-container.js +3 -2
- package/components/regions/phi-cms-region-shell.d.ts +16 -1
- package/components/regions/phi-cms-region-shell.js +39 -10
- package/components/regions/phi-cms-region-static.d.ts +3 -1
- package/components/regions/phi-cms-region-static.js +2 -1
- package/components/widgets/label-sets/observability-logs.d.ts +2 -0
- package/components/widgets/label-sets/observability-logs.js +4 -0
- package/components/widgets/label-sets/search.js +2 -0
- package/components/widgets/label-types/search.d.ts +2 -0
- package/components/widgets/label-types/search.js +1 -0
- package/constants/cms-widget-types.js +3 -2
- package/helpers/renderable-block-defaults.js +1 -0
- package/helpers/renderable-block-serialization.js +7 -1
- package/helpers/site-runtime.js +3 -0
- package/net/log.d.ts +1 -0
- package/net/log.js +19 -1
- package/net/phi-next-proxy.js +9 -1
- package/package.json +2 -2
- package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +13 -0
- package/plugins/runtime-modules/app/presets.js +0 -23
- package/plugins/runtime-modules/area-contributions/app.d.ts +1 -1
- package/plugins/runtime-modules/area-contributions/app.js +2 -0
- package/plugins/runtime-modules/area-contributions/public.d.ts +1 -1
- package/plugins/runtime-modules/area-contributions/public.js +2 -0
- package/plugins/runtime-modules/area-module-defaults.js +21 -2
- package/plugins/runtime-modules/builder/page-meta-form.js +11 -0
- package/plugins/runtime-modules/client-authoring-providers/app.d.ts +1 -1
- package/plugins/runtime-modules/client-authoring-providers/app.js +6 -0
- package/plugins/runtime-modules/client-authoring-providers/public.d.ts +1 -1
- package/plugins/runtime-modules/client-authoring-providers/public.js +6 -0
- package/plugins/runtime-modules/client-manifests/common.js +2 -2
- package/plugins/runtime-modules/core/authoring-widgets.js +0 -4
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
- package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/table/client.js +7 -5
- package/plugins/runtime-modules/core/widgets/table/config.js +8 -1
- package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
- package/plugins/runtime-modules/core/widgets.js +0 -17
- package/plugins/runtime-modules/groups/trees/group-tables.d.ts +44 -0
- package/plugins/runtime-modules/groups/trees/group-tables.js +150 -0
- package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +28 -136
- package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +9 -106
- package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +17 -5
- package/plugins/runtime-modules/observability/data-providers.d.ts +9 -0
- package/plugins/runtime-modules/observability/data-providers.js +5 -0
- package/plugins/runtime-modules/observability/definition.d.ts +9 -0
- package/plugins/runtime-modules/observability/module.d.ts +9 -0
- package/plugins/runtime-modules/observability/services/table.js +4 -0
- package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +13 -0
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +21 -0
- package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
- package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
- package/plugins/runtime-modules/public/presets.d.ts +0 -16
- package/plugins/runtime-modules/public/presets.js +0 -22
- package/plugins/runtime-modules/public-base-page-references.d.ts +0 -1
- package/plugins/runtime-modules/public-base-page-references.js +0 -1
- package/plugins/runtime-modules/search/authoring-widgets.d.ts +2 -0
- package/plugins/runtime-modules/search/authoring-widgets.js +8 -0
- package/plugins/runtime-modules/search/authoring.d.ts +1 -0
- package/plugins/runtime-modules/search/authoring.js +8 -0
- package/plugins/runtime-modules/search/definition.d.ts +21 -0
- package/plugins/runtime-modules/search/definition.js +23 -0
- package/plugins/runtime-modules/search/ids.d.ts +6 -0
- package/plugins/runtime-modules/search/ids.js +7 -0
- package/plugins/runtime-modules/search/module.d.ts +10 -0
- package/plugins/runtime-modules/search/module.js +4 -0
- package/plugins/runtime-modules/search/page-references.d.ts +8 -0
- package/plugins/runtime-modules/search/page-references.js +17 -0
- package/plugins/runtime-modules/{search-page-tree.d.ts → search/page-tree.d.ts} +1 -1
- package/plugins/runtime-modules/{search-page-tree.js → search/page-tree.js} +9 -7
- package/plugins/runtime-modules/search/presets.d.ts +12 -0
- package/plugins/runtime-modules/search/presets.js +33 -0
- package/plugins/runtime-modules/search/server.d.ts +1 -0
- package/plugins/runtime-modules/search/server.js +16 -0
- package/plugins/runtime-modules/search/widgets/search-box/authoring.d.ts +8 -0
- package/plugins/runtime-modules/search/widgets/search-box/authoring.js +21 -0
- package/plugins/runtime-modules/search/widgets/search-box/client.d.ts +39 -0
- package/plugins/runtime-modules/search/widgets/search-box/client.js +114 -0
- package/plugins/runtime-modules/search/widgets/search-box/config.d.ts +96 -0
- package/plugins/runtime-modules/search/widgets/search-box/config.js +67 -0
- package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.js +1 -4
- package/plugins/runtime-modules/search/widgets/search-box/server.d.ts +15 -0
- package/plugins/runtime-modules/{core → search}/widgets/search-box/server.js +13 -14
- package/plugins/runtime-modules/{core → search}/widgets/search-results/config.d.ts +0 -1
- package/plugins/runtime-modules/{core → search}/widgets/search-results/config.js +0 -1
- package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.js +1 -3
- package/plugins/runtime-modules/{core → search}/widgets/search-results/server.d.ts +1 -2
- package/plugins/runtime-modules/{core → search}/widgets/search-results/server.js +2 -2
- package/plugins/runtime-modules/search/widgets.d.ts +2 -0
- package/plugins/runtime-modules/search/widgets.js +20 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +15 -1
- package/server-helpers/search-index.js +9 -0
- package/styles/root.css +2 -0
- package/styles/shell.css +178 -18
- package/theme/phi-theme-tokens.d.ts +1 -1
- package/theme/phi-theme-tokens.js +2 -0
- package/types/renderable-block.d.ts +5 -0
- package/types/table-widget.d.ts +10 -1
- package/types/table-widget.js +1 -0
- package/plugins/runtime-modules/core/widgets/search-box/authoring.d.ts +0 -6
- package/plugins/runtime-modules/core/widgets/search-box/authoring.js +0 -10
- package/plugins/runtime-modules/core/widgets/search-box/client.d.ts +0 -21
- package/plugins/runtime-modules/core/widgets/search-box/client.js +0 -17
- package/plugins/runtime-modules/core/widgets/search-box/config.d.ts +0 -63
- package/plugins/runtime-modules/core/widgets/search-box/config.js +0 -48
- package/plugins/runtime-modules/core/widgets/search-box/server.d.ts +0 -21
- package/plugins/runtime-modules/search-page-references.d.ts +0 -20
- package/plugins/runtime-modules/search-page-references.js +0 -35
- /package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.d.ts +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.d.ts +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.js +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.d.ts +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.js +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.d.ts +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
2
2
|
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
3
|
import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
|
|
4
|
-
import { PhiGroupMembershipFlags } from "../../../../constants/site-groups";
|
|
5
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
6
5
|
import { createPhiSignalAddress, PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
|
|
7
6
|
import { createPhiGroupsControllerAddress, PHI_GROUPS_CONTROLLER_INSTANCE_KEY, PHI_GROUPS_CONTROLLER_TYPE, } from "../controller/address";
|
|
8
7
|
import { PHI_GROUPS_PAGE_LAYOUT_IDS, PHI_GROUPS_PAGE_OVERLAY_IDS, PHI_GROUPS_PAGE_WIDGET_IDS } from "../addresses";
|
|
9
8
|
import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
|
|
10
9
|
import { getPhiGroupFormLabels } from "../labels";
|
|
10
|
+
import { buildPhiGroupMembersTable, buildPhiGroupRetireAction, buildPhiGroupSettingColumns, buildPhiGroupsFooter, } from "./group-tables";
|
|
11
11
|
import { PHI_GROUPS_FORM_IDS } from "../forms";
|
|
12
12
|
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
|
|
13
13
|
const SYNTHETIC_ADMIN_GROUPS_REGION_IDS = {
|
|
@@ -34,12 +34,6 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
34
34
|
const createOverlayAddress = createPhiSignalAddress("cms", PHI_GROUPS_PAGE_OVERLAY_IDS.overlayCreate);
|
|
35
35
|
const membershipOverlayAddress = createPhiSignalAddress("cms", PHI_GROUPS_PAGE_OVERLAY_IDS.overlayMembership);
|
|
36
36
|
const stateOptions = { active: labels.states.active, retired: labels.states.retired };
|
|
37
|
-
const levelOptions = {
|
|
38
|
-
[String(PhiGroupMembershipFlags.Member)]: labels.levels.member,
|
|
39
|
-
[String(PhiGroupMembershipFlags.Author)]: labels.levels.author,
|
|
40
|
-
[String(PhiGroupMembershipFlags.Editor)]: labels.levels.editor,
|
|
41
|
-
[String(PhiGroupMembershipFlags.Manager)]: labels.levels.manager,
|
|
42
|
-
};
|
|
43
37
|
const scaffold = buildPhiBasePageContentScaffold({
|
|
44
38
|
page,
|
|
45
39
|
regionId: SYNTHETIC_ADMIN_GROUPS_REGION_IDS.regionContent,
|
|
@@ -303,33 +297,7 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
303
297
|
{ key: "spaceUsedBytes", fieldKey: "spaceUsedBytes", title: labels.columns.spaceUsed, sizing: { mode: "content" } },
|
|
304
298
|
{ key: "spaceQuotaBytes", fieldKey: "spaceQuotaBytes", title: labels.columns.spaceQuota, sizing: { mode: "content" } },
|
|
305
299
|
// Administration always manages every group, so the switch is always here.
|
|
306
|
-
|
|
307
|
-
key: "showMemberCompany",
|
|
308
|
-
fieldKey: "showMemberCompany",
|
|
309
|
-
title: labels.columns.showCompany,
|
|
310
|
-
description: labels.columns.showCompanyHint,
|
|
311
|
-
renderer: "switch",
|
|
312
|
-
editor: { control: "switch" },
|
|
313
|
-
sizing: { mode: "content" },
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
key: "threads",
|
|
317
|
-
fieldKey: "threads",
|
|
318
|
-
title: labels.columns.threads,
|
|
319
|
-
description: labels.columns.threadsHint,
|
|
320
|
-
renderer: "switch",
|
|
321
|
-
editor: { control: "switch" },
|
|
322
|
-
sizing: { mode: "content" },
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
key: "crossGroupThreads",
|
|
326
|
-
fieldKey: "crossGroupThreads",
|
|
327
|
-
title: labels.columns.crossGroupThreads,
|
|
328
|
-
description: labels.columns.crossGroupThreadsHint,
|
|
329
|
-
renderer: "switch",
|
|
330
|
-
editor: { control: "switch" },
|
|
331
|
-
sizing: { mode: "content" },
|
|
332
|
-
},
|
|
300
|
+
...buildPhiGroupSettingColumns(labels),
|
|
333
301
|
{ key: "providerId", fieldKey: "providerId", title: labels.columns.source, renderer: "badge", sizing: { mode: "content" } },
|
|
334
302
|
// A retired group is listed here and nowhere else, so this is where its state is read.
|
|
335
303
|
{
|
|
@@ -341,11 +309,7 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
341
309
|
sizing: { mode: "content" },
|
|
342
310
|
},
|
|
343
311
|
],
|
|
344
|
-
footer:
|
|
345
|
-
template: labels.groups.footer,
|
|
346
|
-
values: [{ key: "groups", value: { source: "core", fieldKey: "totalRows" } }],
|
|
347
|
-
align: "start",
|
|
348
|
-
},
|
|
312
|
+
footer: buildPhiGroupsFooter(labels),
|
|
349
313
|
},
|
|
350
314
|
features: {
|
|
351
315
|
// One group at a time: the membership table below shows exactly what is selected here.
|
|
@@ -367,24 +331,10 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
367
331
|
execution: "signal",
|
|
368
332
|
}],
|
|
369
333
|
row: [
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
display: "icon",
|
|
375
|
-
mode: "danger",
|
|
376
|
-
execution: "provider",
|
|
377
|
-
disabledWhen: { match: "any", conditions: [
|
|
378
|
-
{ source: "row", valuePath: "local", operator: "falsy", reason: labels.actions.retire },
|
|
379
|
-
{ source: "row", valuePath: "retired", operator: "truthy", reason: labels.actions.retire },
|
|
380
|
-
] },
|
|
381
|
-
confirm: {
|
|
382
|
-
title: labels.actions.retireConfirmTitle,
|
|
383
|
-
description: labels.actions.retireConfirmText,
|
|
384
|
-
okText: labels.actions.retireConfirmOk,
|
|
385
|
-
cancelText: labels.actions.removeConfirmCancel,
|
|
386
|
-
},
|
|
387
|
-
},
|
|
334
|
+
buildPhiGroupRetireAction(labels, [
|
|
335
|
+
{ valuePath: "local", operator: "falsy" },
|
|
336
|
+
{ valuePath: "retired", operator: "truthy" },
|
|
337
|
+
]),
|
|
388
338
|
{
|
|
389
339
|
key: "reactivate",
|
|
390
340
|
label: labels.actions.reactivate,
|
|
@@ -457,86 +407,28 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
|
|
|
457
407
|
sortOrder: 1,
|
|
458
408
|
label: labels.members.title,
|
|
459
409
|
config: {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
},
|
|
464
|
-
presentation: {
|
|
465
|
-
title: labels.members.title,
|
|
466
|
-
description: labels.members.description,
|
|
467
|
-
layout: { mode: "auto", overflowX: "auto" },
|
|
468
|
-
controlSize: "small",
|
|
469
|
-
columns: [
|
|
470
|
-
{ key: "displayName", fieldKey: "displayName", title: labels.columns.name, sizing: { mode: "fill", minWidth: 200 } },
|
|
471
|
-
{ key: "email", fieldKey: "email", title: labels.columns.email, sizing: { mode: "content" } },
|
|
472
|
-
{
|
|
473
|
-
key: "membershipFlags",
|
|
474
|
-
fieldKey: "membershipFlags",
|
|
475
|
-
title: labels.columns.level,
|
|
476
|
-
renderer: "badge",
|
|
477
|
-
valueMap: levelOptions,
|
|
478
|
-
// Editable in place: the level is the one thing about a membership that belongs to
|
|
479
|
-
// the group rather than to the account. A row a Directory contributes stays read-only,
|
|
480
|
-
// which the provider states through the field's `mutableWhen`.
|
|
481
|
-
editor: { control: "select" },
|
|
482
|
-
sizing: { mode: "content" },
|
|
483
|
-
},
|
|
484
|
-
{ key: "sourceProviderId", fieldKey: "sourceProviderId", title: labels.columns.source, renderer: "badge", sizing: { mode: "content" } },
|
|
485
|
-
{ key: "createdAt", fieldKey: "createdAt", title: labels.columns.since, renderer: "datetime", sizing: { mode: "content" } },
|
|
486
|
-
],
|
|
487
|
-
emptyState: { title: labels.members.empty, description: "" },
|
|
488
|
-
footer: {
|
|
489
|
-
template: labels.members.footer,
|
|
490
|
-
values: [{ key: "members", value: { source: "core", fieldKey: "totalRows" } }],
|
|
491
|
-
align: "start",
|
|
492
|
-
},
|
|
493
|
-
},
|
|
494
|
-
features: {
|
|
495
|
-
pagination: { enabled: true, pageSize: 25, pageSizes: [25, 50, 100] },
|
|
496
|
-
sorting: { mode: "none" },
|
|
497
|
-
search: { enabled: false },
|
|
410
|
+
...buildPhiGroupMembersTable({
|
|
411
|
+
labels,
|
|
412
|
+
audience: "administration",
|
|
498
413
|
tools: { mode: "self-contained", reset: false, reload: true },
|
|
499
|
-
// The
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
reason: labels.membership.retired,
|
|
518
|
-
}] },
|
|
519
|
-
}],
|
|
520
|
-
row: [{
|
|
521
|
-
key: "delete",
|
|
522
|
-
label: labels.actions.remove,
|
|
523
|
-
icon: "antd:delete",
|
|
524
|
-
display: "icon",
|
|
525
|
-
mode: "danger",
|
|
526
|
-
execution: "provider",
|
|
527
|
-
// A provider-owned membership is read here and changed at its source.
|
|
528
|
-
disabledWhen: { match: "any", conditions: [
|
|
529
|
-
{ source: "row", valuePath: "local", operator: "falsy", reason: labels.actions.remove },
|
|
530
|
-
] },
|
|
531
|
-
confirm: {
|
|
532
|
-
title: labels.actions.removeConfirmTitle,
|
|
533
|
-
description: labels.actions.removeConfirmText,
|
|
534
|
-
okText: labels.actions.removeConfirmOk,
|
|
535
|
-
cancelText: labels.actions.removeConfirmCancel,
|
|
536
|
-
},
|
|
537
|
-
}],
|
|
538
|
-
},
|
|
539
|
-
},
|
|
414
|
+
// The Form names the group itself, so a member can be added before any group is selected;
|
|
415
|
+
// with one selected, it starts there (the Controller answers the Form's `valuesRequest`).
|
|
416
|
+
toolbar: [{
|
|
417
|
+
key: "addMember",
|
|
418
|
+
label: labels.membership.title,
|
|
419
|
+
icon: "plus",
|
|
420
|
+
display: "icon",
|
|
421
|
+
mode: "primary",
|
|
422
|
+
execution: "signal",
|
|
423
|
+
disabledWhen: { match: "any", conditions: [{
|
|
424
|
+
source: "controller",
|
|
425
|
+
controllerAddress,
|
|
426
|
+
valuePath: "selectedGroupRetired",
|
|
427
|
+
operator: "truthy",
|
|
428
|
+
reason: labels.membership.retired,
|
|
429
|
+
}] },
|
|
430
|
+
}],
|
|
431
|
+
}),
|
|
540
432
|
signalRoutes: {
|
|
541
433
|
emits: [{
|
|
542
434
|
routeKey: "admin-groups-membership-action",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
|
|
2
2
|
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
3
|
import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
|
|
4
|
-
import { PhiGroupMembershipFlags } from "../../../../constants/site-groups";
|
|
5
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
6
5
|
import { createPhiSignalAddress, PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
|
|
7
6
|
import { createPhiGroupsControllerAddress, PHI_GROUPS_CONTROLLER_INSTANCE_KEY, PHI_GROUPS_CONTROLLER_TYPE, } from "../controller/address";
|
|
8
7
|
import { PHI_APP_GROUPS_PAGE_WIDGET_IDS } from "../addresses";
|
|
9
8
|
import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
|
|
10
9
|
import { getPhiGroupFormLabels } from "../labels";
|
|
10
|
+
import { buildPhiGroupLevelValueMap, buildPhiGroupMembersTable, buildPhiGroupRetireAction, buildPhiGroupSettingColumns, buildPhiGroupsFooter, } from "./group-tables";
|
|
11
11
|
import { canPhiViewerManageSomeGroup } from "../page-visibility";
|
|
12
12
|
import { canPhiViewerAccess, PHI_VIEWER_ACCESS_DEVELOPER_TOOLS } from "../../../../types/access";
|
|
13
13
|
import { PHI_GROUPS_FORM_IDS } from "../forms";
|
|
@@ -33,12 +33,7 @@ export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
|
|
|
33
33
|
siteWide: canPhiViewerAccess(runtime.viewer, PHI_VIEWER_ACCESS_DEVELOPER_TOOLS),
|
|
34
34
|
groupClaims: runtime.viewer.groupClaims,
|
|
35
35
|
});
|
|
36
|
-
const levelOptions =
|
|
37
|
-
[String(PhiGroupMembershipFlags.Member)]: labels.levels.member,
|
|
38
|
-
[String(PhiGroupMembershipFlags.Author)]: labels.levels.author,
|
|
39
|
-
[String(PhiGroupMembershipFlags.Editor)]: labels.levels.editor,
|
|
40
|
-
[String(PhiGroupMembershipFlags.Manager)]: labels.levels.manager,
|
|
41
|
-
};
|
|
36
|
+
const levelOptions = buildPhiGroupLevelValueMap(labels);
|
|
42
37
|
const scaffold = buildPhiBasePageContentScaffold({
|
|
43
38
|
page,
|
|
44
39
|
regionId: SYNTHETIC_APP_GROUPS_REGION_IDS.regionContent,
|
|
@@ -138,33 +133,10 @@ export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
|
|
|
138
133
|
{ key: "spaceQuotaBytes", fieldKey: "spaceQuotaBytes", title: labels.columns.spaceQuota, sizing: { mode: "content" } },
|
|
139
134
|
// Present only for someone who manages a group: a switch nobody here may touch is worse
|
|
140
135
|
// than no switch, so the column is left out rather than shown disabled.
|
|
141
|
-
...(managesSomeGroup ? [
|
|
142
|
-
key: "showMemberCompany",
|
|
143
|
-
fieldKey: "showMemberCompany",
|
|
144
|
-
title: labels.columns.showCompany,
|
|
145
|
-
description: labels.columns.showCompanyHint,
|
|
146
|
-
renderer: "switch",
|
|
147
|
-
editor: { control: "switch" },
|
|
148
|
-
sizing: { mode: "content" },
|
|
149
|
-
}, {
|
|
150
|
-
key: "threads",
|
|
151
|
-
fieldKey: "threads",
|
|
152
|
-
title: labels.columns.threads,
|
|
153
|
-
description: labels.columns.threadsHint,
|
|
154
|
-
renderer: "switch",
|
|
155
|
-
editor: { control: "switch" },
|
|
156
|
-
sizing: { mode: "content" },
|
|
157
|
-
}, {
|
|
158
|
-
key: "crossGroupThreads",
|
|
159
|
-
fieldKey: "crossGroupThreads",
|
|
160
|
-
title: labels.columns.crossGroupThreads,
|
|
161
|
-
description: labels.columns.crossGroupThreadsHint,
|
|
162
|
-
renderer: "switch",
|
|
163
|
-
editor: { control: "switch" },
|
|
164
|
-
sizing: { mode: "content" },
|
|
165
|
-
}] : []),
|
|
136
|
+
...(managesSomeGroup ? buildPhiGroupSettingColumns(labels) : []),
|
|
166
137
|
],
|
|
167
138
|
emptyState: { title: labels.mine.empty, description: labels.mine.emptyHint },
|
|
139
|
+
footer: buildPhiGroupsFooter(labels),
|
|
168
140
|
},
|
|
169
141
|
features: {
|
|
170
142
|
rowSelection: { mode: "single", preserveSelectedRowIdentities: true },
|
|
@@ -181,26 +153,10 @@ export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
|
|
|
181
153
|
...(managesSomeGroup ? {
|
|
182
154
|
actions: {
|
|
183
155
|
rowLayout: "compact",
|
|
184
|
-
row: [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
display: "icon",
|
|
189
|
-
mode: "danger",
|
|
190
|
-
execution: "provider",
|
|
191
|
-
disabledWhen: { match: "any", conditions: [
|
|
192
|
-
{ source: "row", valuePath: "manages", operator: "falsy",
|
|
193
|
-
reason: labels.actions.retire },
|
|
194
|
-
{ source: "row", valuePath: "local", operator: "falsy",
|
|
195
|
-
reason: labels.actions.retire },
|
|
196
|
-
] },
|
|
197
|
-
confirm: {
|
|
198
|
-
title: labels.actions.retireConfirmTitle,
|
|
199
|
-
description: labels.actions.retireConfirmText,
|
|
200
|
-
okText: labels.actions.retireConfirmOk,
|
|
201
|
-
cancelText: labels.actions.removeConfirmCancel,
|
|
202
|
-
},
|
|
203
|
-
}],
|
|
156
|
+
row: [buildPhiGroupRetireAction(labels, [
|
|
157
|
+
{ valuePath: "manages", operator: "falsy" },
|
|
158
|
+
{ valuePath: "local", operator: "falsy" },
|
|
159
|
+
])],
|
|
204
160
|
},
|
|
205
161
|
} : {}),
|
|
206
162
|
},
|
|
@@ -243,60 +199,7 @@ export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
|
|
|
243
199
|
sortOrder: 1,
|
|
244
200
|
label: labels.members.title,
|
|
245
201
|
config: {
|
|
246
|
-
|
|
247
|
-
providerKey: PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS.table,
|
|
248
|
-
resourceKey: "groupMembers",
|
|
249
|
-
},
|
|
250
|
-
presentation: {
|
|
251
|
-
title: labels.members.title,
|
|
252
|
-
description: labels.members.description,
|
|
253
|
-
layout: { mode: "auto", overflowX: "auto" },
|
|
254
|
-
controlSize: "small",
|
|
255
|
-
// No address and no source column: a colleague is recognized by name, and where a
|
|
256
|
-
// membership comes from is an administration question.
|
|
257
|
-
columns: [
|
|
258
|
-
{ key: "displayName", fieldKey: "displayName", title: labels.columns.name, sizing: { mode: "fill", minWidth: 200 } },
|
|
259
|
-
{ key: "companyName", fieldKey: "companyName", title: labels.columns.company, sizing: { mode: "content" } },
|
|
260
|
-
{
|
|
261
|
-
key: "membershipFlags",
|
|
262
|
-
fieldKey: "membershipFlags",
|
|
263
|
-
title: labels.columns.level,
|
|
264
|
-
renderer: "badge",
|
|
265
|
-
valueMap: levelOptions,
|
|
266
|
-
// Editable only where the control plane says this actor administers this group, which
|
|
267
|
-
// it states per row -- a member sees the same table without an editor.
|
|
268
|
-
editor: { control: "select" },
|
|
269
|
-
sizing: { mode: "content" },
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
emptyState: { title: labels.members.empty, description: "" },
|
|
273
|
-
},
|
|
274
|
-
features: {
|
|
275
|
-
pagination: { enabled: true, pageSize: 25, pageSizes: [25, 50, 100] },
|
|
276
|
-
sorting: { mode: "none" },
|
|
277
|
-
search: { enabled: false },
|
|
278
|
-
editing: { mode: "cell" },
|
|
279
|
-
actions: {
|
|
280
|
-
rowLayout: "compact",
|
|
281
|
-
row: [{
|
|
282
|
-
key: "delete",
|
|
283
|
-
label: labels.actions.remove,
|
|
284
|
-
icon: "antd:delete",
|
|
285
|
-
display: "icon",
|
|
286
|
-
mode: "danger",
|
|
287
|
-
execution: "provider",
|
|
288
|
-
disabledWhen: { match: "any", conditions: [
|
|
289
|
-
{ source: "row", valuePath: "manageable", operator: "falsy", reason: labels.actions.remove },
|
|
290
|
-
] },
|
|
291
|
-
confirm: {
|
|
292
|
-
title: labels.actions.removeConfirmTitle,
|
|
293
|
-
description: labels.actions.removeConfirmText,
|
|
294
|
-
okText: labels.actions.removeConfirmOk,
|
|
295
|
-
cancelText: labels.actions.removeConfirmCancel,
|
|
296
|
-
},
|
|
297
|
-
}],
|
|
298
|
-
},
|
|
299
|
-
},
|
|
202
|
+
...buildPhiGroupMembersTable({ labels, audience: "colleagues" }),
|
|
300
203
|
signalRoutes: {
|
|
301
204
|
listens: [{
|
|
302
205
|
routeKey: "app-groups-member-filter",
|
|
@@ -37,6 +37,15 @@ export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
|
|
|
37
37
|
regionId: SYNTHETIC_ADMIN_LOCALES_REGION_IDS.regionContent,
|
|
38
38
|
});
|
|
39
39
|
const nodes = createPhiCmsPresetNodes(page);
|
|
40
|
+
/*
|
|
41
|
+
* What every site translation starts from, as the Table's heading: the list is the place the source
|
|
42
|
+
* language matters, and a heading saying "Site translations" on a page called Locales told nothing.
|
|
43
|
+
* Under the column's own word, "Source", so the heading and the column name the same thing.
|
|
44
|
+
* Shown and not edited -- a Site's source language is fixed when the Site is created, and the Site
|
|
45
|
+
* config carries it, so no request is needed to name it.
|
|
46
|
+
*/
|
|
47
|
+
const sourceLocale = runtime.site.availableLocales.find((option) => option.code === runtime.site.sourceLocale);
|
|
48
|
+
const sourceLocaleText = sourceLocale ? `${sourceLocale.label} (${sourceLocale.code})` : runtime.site.sourceLocale;
|
|
40
49
|
return {
|
|
41
50
|
page: nodes.page({ pageType: PhiCmsPageType.Standard }),
|
|
42
51
|
pageMeta: {
|
|
@@ -128,8 +137,7 @@ export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
|
|
|
128
137
|
resourceKey: "siteTranslations",
|
|
129
138
|
},
|
|
130
139
|
presentation: {
|
|
131
|
-
title: widgetLabels.
|
|
132
|
-
description: widgetLabels.translationsDescription,
|
|
140
|
+
title: `${widgetLabels.columns.source}: ${sourceLocaleText}`,
|
|
133
141
|
borders: true,
|
|
134
142
|
layout: { mode: "auto", overflowX: "auto" },
|
|
135
143
|
columns: [
|
|
@@ -146,7 +154,8 @@ export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
|
|
|
146
154
|
fieldKey: "translation",
|
|
147
155
|
title: widgetLabels.columns.translation,
|
|
148
156
|
sizing: { mode: "fill", minWidth: 320 },
|
|
149
|
-
|
|
157
|
+
// A translation is as long as its source: several lines, wrapped, not one cut-off row.
|
|
158
|
+
editor: { control: "textarea" },
|
|
150
159
|
},
|
|
151
160
|
{ key: "updatedAt", fieldKey: "updatedAt", title: widgetLabels.columns.updated, renderer: "datetime", sizing: { mode: "content" } },
|
|
152
161
|
],
|
|
@@ -173,6 +182,8 @@ export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
|
|
|
173
182
|
* it reads as the question the empty filter asks and goes away once one is chosen.
|
|
174
183
|
*/
|
|
175
184
|
labelPlacement: "none",
|
|
185
|
+
// What the list under it is, said by the choice that decides it rather than under the heading.
|
|
186
|
+
description: widgetLabels.translationsDescription,
|
|
176
187
|
optionsProvider: { providerKey: PHI_LOCALIZATION_RUNTIME_DATA_PROVIDER_KEYS.adminSiteLocales },
|
|
177
188
|
}],
|
|
178
189
|
pagination: { enabled: true, pageSize: 25, pageSizes: [25, 50, 100] },
|
|
@@ -186,13 +197,14 @@ export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
|
|
|
186
197
|
mode: "cell",
|
|
187
198
|
disabledWhen: { source: "row", valuePath: "protected", operator: "truthy" },
|
|
188
199
|
},
|
|
189
|
-
|
|
200
|
+
// No reset: one language choice and a search box are cleared faster by hand than found again.
|
|
201
|
+
tools: { mode: "self-contained", reload: true, reset: false },
|
|
190
202
|
actions: {
|
|
191
203
|
bulk: [{
|
|
192
204
|
key: "deleteSelected",
|
|
193
205
|
label: widgetLabels.deleteSelectedLabel,
|
|
194
206
|
icon: "antd:delete",
|
|
195
|
-
display: "icon
|
|
207
|
+
display: "icon",
|
|
196
208
|
mode: "danger",
|
|
197
209
|
execution: "provider",
|
|
198
210
|
confirm: {
|
|
@@ -43,6 +43,15 @@ export declare const PHI_OBSERVABILITY_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
|
|
|
43
43
|
pagination: "offset";
|
|
44
44
|
total: true;
|
|
45
45
|
};
|
|
46
|
+
summaryFields: ({
|
|
47
|
+
key: string;
|
|
48
|
+
title: string;
|
|
49
|
+
type: "boolean";
|
|
50
|
+
} | {
|
|
51
|
+
key: string;
|
|
52
|
+
title: string;
|
|
53
|
+
type: "number";
|
|
54
|
+
})[];
|
|
46
55
|
recordRead: true;
|
|
47
56
|
}[];
|
|
48
57
|
}[];
|
|
@@ -41,6 +41,11 @@ export const PHI_OBSERVABILITY_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
|
|
|
41
41
|
pagination: "offset",
|
|
42
42
|
total: true,
|
|
43
43
|
},
|
|
44
|
+
// A period with more records than one request reads is cut to the newest; the page says so.
|
|
45
|
+
summaryFields: [
|
|
46
|
+
{ key: "truncated", title: "Cut at the record limit", type: "boolean" },
|
|
47
|
+
{ key: "recordLimit", title: "Record limit", type: "number" },
|
|
48
|
+
],
|
|
44
49
|
recordRead: true,
|
|
45
50
|
}],
|
|
46
51
|
},
|
|
@@ -51,6 +51,15 @@ export declare const PHI_OBSERVABILITY_RUNTIME_MODULE_DEFINITION: {
|
|
|
51
51
|
pagination: "offset";
|
|
52
52
|
total: true;
|
|
53
53
|
};
|
|
54
|
+
summaryFields: ({
|
|
55
|
+
key: string;
|
|
56
|
+
title: string;
|
|
57
|
+
type: "boolean";
|
|
58
|
+
} | {
|
|
59
|
+
key: string;
|
|
60
|
+
title: string;
|
|
61
|
+
type: "number";
|
|
62
|
+
})[];
|
|
54
63
|
recordRead: true;
|
|
55
64
|
}[];
|
|
56
65
|
}[];
|
|
@@ -51,6 +51,15 @@ export declare const PHI_OBSERVABILITY_RUNTIME_MODULE: {
|
|
|
51
51
|
pagination: "offset";
|
|
52
52
|
total: true;
|
|
53
53
|
};
|
|
54
|
+
summaryFields: ({
|
|
55
|
+
key: string;
|
|
56
|
+
title: string;
|
|
57
|
+
type: "boolean";
|
|
58
|
+
} | {
|
|
59
|
+
key: string;
|
|
60
|
+
title: string;
|
|
61
|
+
type: "number";
|
|
62
|
+
})[];
|
|
54
63
|
recordRead: true;
|
|
55
64
|
}[];
|
|
56
65
|
}[];
|
|
@@ -45,6 +45,10 @@ async function loadRows({ resourceKey, query, signal, }) {
|
|
|
45
45
|
return {
|
|
46
46
|
rows,
|
|
47
47
|
total: typeof payload.total === "number" && Number.isFinite(payload.total) ? payload.total : undefined,
|
|
48
|
+
summary: {
|
|
49
|
+
truncated: payload.summary?.truncated === true,
|
|
50
|
+
recordLimit: typeof payload.summary?.recordLimit === "number" ? payload.summary.recordLimit : null,
|
|
51
|
+
},
|
|
48
52
|
};
|
|
49
53
|
}
|
|
50
54
|
async function readRecord({ resourceKey, rowIdentity, signal, }) {
|
|
@@ -150,6 +150,19 @@ export async function buildPhiDefaultAdminLogsPageTree({ page, runtime, }) {
|
|
|
150
150
|
title: widgetLabels.empty.title,
|
|
151
151
|
description: widgetLabels.empty.text,
|
|
152
152
|
},
|
|
153
|
+
// How many entries the window holds; where the Provider cut it, the line says so too.
|
|
154
|
+
footer: {
|
|
155
|
+
template: widgetLabels.countFooter,
|
|
156
|
+
values: [{ key: "total", value: { source: "core", fieldKey: "totalRows" } }],
|
|
157
|
+
variants: [{
|
|
158
|
+
when: { value: { source: "provider", fieldKey: "truncated" }, operator: "truthy" },
|
|
159
|
+
template: widgetLabels.truncatedFooter,
|
|
160
|
+
values: [
|
|
161
|
+
{ key: "total", value: { source: "core", fieldKey: "totalRows" } },
|
|
162
|
+
{ key: "limit", value: { source: "provider", fieldKey: "recordLimit" } },
|
|
163
|
+
],
|
|
164
|
+
}],
|
|
165
|
+
},
|
|
153
166
|
controlSize: "small",
|
|
154
167
|
},
|
|
155
168
|
features: {
|
|
@@ -312,6 +312,27 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
|
|
|
312
312
|
},
|
|
313
313
|
contentVersionId: null,
|
|
314
314
|
},
|
|
315
|
+
/*
|
|
316
|
+
* The magnifier, in Public only: the Area every visitor reads, and the one whose results Page it
|
|
317
|
+
* opens. The App carries its box in its Sider where its preset puts one; the operator's Areas are
|
|
318
|
+
* not searched. Before the locale switch, in the slot nothing else of this preset takes.
|
|
319
|
+
*/
|
|
320
|
+
...(runtimeModuleArea === "public"
|
|
321
|
+
? [{
|
|
322
|
+
id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetSearch,
|
|
323
|
+
siteId: page.siteId,
|
|
324
|
+
parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderActions,
|
|
325
|
+
widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("search-box"), "search-box"),
|
|
326
|
+
slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[0].slotIndex,
|
|
327
|
+
sortOrder: 5,
|
|
328
|
+
status: 1,
|
|
329
|
+
flags: 0,
|
|
330
|
+
visibilityMask: page.visibilityMask,
|
|
331
|
+
label: "pub header main search",
|
|
332
|
+
config: { variant: "icon-only" },
|
|
333
|
+
contentVersionId: null,
|
|
334
|
+
}]
|
|
335
|
+
: []),
|
|
315
336
|
{
|
|
316
337
|
id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetLocale,
|
|
317
338
|
siteId: page.siteId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const PHI_DEFAULT_PUB_AREA_PRESET_KEY = "public-area-preset";
|
|
2
2
|
export declare const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS: readonly ["layoutHeaderMain", "layoutHeaderActions", "layoutHeaderBottom", "layoutSiderRight", "layoutFooterTop", "layoutFooterMain", "layoutFooterBottom"];
|
|
3
|
-
export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterRight", "widgetFooterBottomText"];
|
|
3
|
+
export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetSearch", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterRight", "widgetFooterBottomText"];
|
|
4
4
|
export declare const PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetLocale"];
|
|
@@ -25,7 +25,6 @@ export declare const PHI_PUBLIC_RUNTIME_MODULE_ROUTES: ({
|
|
|
25
25
|
path: string;
|
|
26
26
|
loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
27
27
|
navigation?: undefined;
|
|
28
|
-
defaultPageFlags?: undefined;
|
|
29
28
|
} | {
|
|
30
29
|
ownerModuleId: "@phis/ui/modules/public";
|
|
31
30
|
presetKey: "public-home-page";
|
|
@@ -47,7 +46,6 @@ export declare const PHI_PUBLIC_RUNTIME_MODULE_ROUTES: ({
|
|
|
47
46
|
};
|
|
48
47
|
}[];
|
|
49
48
|
loadTree: ({ page }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
50
|
-
defaultPageFlags?: undefined;
|
|
51
49
|
} | {
|
|
52
50
|
ownerModuleId: "@phis/ui/modules/public";
|
|
53
51
|
presetKey: "public-terms-page";
|
|
@@ -60,20 +58,6 @@ export declare const PHI_PUBLIC_RUNTIME_MODULE_ROUTES: ({
|
|
|
60
58
|
params: Readonly<Record<string, string>>;
|
|
61
59
|
}) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
62
60
|
navigation?: undefined;
|
|
63
|
-
defaultPageFlags?: undefined;
|
|
64
|
-
} | {
|
|
65
|
-
ownerModuleId: "@phis/ui/modules/public";
|
|
66
|
-
presetKey: "public-search-page";
|
|
67
|
-
presetVersion: number;
|
|
68
|
-
area: "public";
|
|
69
|
-
title: string;
|
|
70
|
-
path: string;
|
|
71
|
-
navigation: never[];
|
|
72
|
-
defaultPageFlags: number;
|
|
73
|
-
loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
|
|
74
|
-
activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
|
|
75
|
-
params: Readonly<Record<string, string>>;
|
|
76
|
-
}) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
|
|
77
61
|
})[];
|
|
78
62
|
/**
|
|
79
63
|
* The Public form pages, in their own list because they appear only where Forms are allowed. The
|