@phis/ui 0.7.8 → 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-address-control.d.ts +23 -0
- package/components/controls/phi-address-control.js +43 -0
- package/components/controls/phi-color-control.d.ts +3 -1
- package/components/controls/phi-color-control.js +2 -2
- package/components/controls/phi-country-select-control.d.ts +22 -0
- package/components/controls/phi-country-select-control.js +16 -0
- package/components/controls/phi-dialog-control.d.ts +1 -1
- package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
- package/components/controls/phi-drawer-control-adapter.js +5 -3
- package/components/controls/phi-drawer-control.d.ts +7 -5
- package/components/controls/phi-float-button-control.d.ts +8 -1
- package/components/controls/phi-float-button-control.js +19 -3
- package/components/controls/phi-form-control.js +52 -8
- 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-modal-control-adapter.d.ts +1 -1
- package/components/controls/phi-modal-control-adapter.js +14 -37
- package/components/controls/phi-modal-control.d.ts +5 -5
- package/components/controls/phi-options-provider.d.ts +1 -0
- package/components/controls/phi-options-provider.js +1 -0
- package/components/controls/phi-overlay-control-contract.d.ts +52 -17
- package/components/controls/phi-overlay-control-contract.js +55 -30
- package/components/controls/phi-popover-control.js +4 -1
- package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
- package/components/controls/phi-reveal-once-dialog-control.js +52 -0
- package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
- package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
- package/components/controls/phi-table-control.d.ts +7 -1
- package/components/controls/phi-table-control.js +23 -8
- package/components/forms/flags-field.d.ts +22 -0
- package/components/forms/flags-field.js +58 -0
- 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-option-flags.d.ts +20 -0
- package/components/forms/form-option-flags.js +38 -0
- package/components/forms/form-provider-contract.d.ts +23 -0
- package/components/forms/form-provider-contract.js +36 -0
- package/components/forms/form-provider-registry.d.ts +5 -1
- 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/forms/shared-form-provider-registry.js +13 -0
- package/components/forms/structured-field-labels.d.ts +24 -0
- package/components/forms/structured-field-labels.js +43 -0
- package/components/forms/structured-form-field-controls.d.ts +12 -0
- package/components/forms/structured-form-field-controls.js +65 -0
- 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 +13 -11
- package/components/regions/phi-cms-region-shell.js +2 -2
- package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
- package/components/regions/presets/phi-settings-page-shell-tree.d.ts +13 -2
- package/components/regions/presets/phi-settings-page-shell-tree.js +4 -4
- package/components/root/phi-root-theme-resolver.js +3 -0
- package/components/shell/phi-antd-icon.d.ts +1 -8
- package/components/shell/phi-antd-icon.js +1 -227
- package/components/shell/phi-icon-names.d.ts +22 -0
- package/components/shell/phi-icon-names.js +267 -0
- package/components/shell/phi-icon.d.ts +4 -15
- package/components/shell/phi-icon.js +9 -50
- 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 +29 -2
- package/components/widgets/client/shared/phi-command-buttons.js +19 -5
- package/components/widgets/client/shared/phi-rendered-value.js +27 -3
- package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
- package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
- package/components/widgets/config/background.d.ts +3 -2
- package/components/widgets/config/choice-shared.d.ts +10 -1
- package/components/widgets/config/choice-shared.js +8 -2
- package/components/widgets/label-sets/admin-locales.js +1 -1
- package/components/widgets/label-sets/admin-users.d.ts +3 -5
- package/components/widgets/label-sets/admin-users.js +6 -10
- package/components/widgets/label-sets/builder-modules.js +4 -0
- package/components/widgets/label-sets/effects.js +2 -4
- package/components/widgets/label-sets/profile.d.ts +13 -16
- package/components/widgets/label-sets/profile.js +24 -33
- 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/search-results.js +2 -4
- package/components/widgets/label-sets/signals.js +2 -0
- package/components/widgets/label-sets/table.js +9 -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/effects.d.ts +3 -2
- package/components/widgets/label-types/effects.js +1 -2
- package/components/widgets/label-types/revisions.d.ts +2 -0
- package/components/widgets/label-types/revisions.js +2 -1
- package/components/widgets/label-types/search-results.d.ts +2 -2
- package/components/widgets/label-types/search-results.js +1 -2
- package/components/widgets/label-types/signals.d.ts +2 -0
- package/components/widgets/label-types/signals.js +1 -0
- package/components/widgets/label-types/table.d.ts +3 -0
- package/components/widgets/label-types/table.js +2 -0
- package/components/widgets/server/builder-chrome.d.ts +4 -1
- package/components/widgets/server/builder-chrome.js +2 -2
- package/components/widgets/shared/markdown-body-client.d.ts +26 -0
- package/components/widgets/shared/markdown-body-client.js +31 -1
- package/components/widgets/shared/markdown-render.d.ts +10 -2
- package/components/widgets/shared/markdown-render.js +35 -13
- 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/countries.d.ts +9 -0
- package/constants/countries.js +28 -0
- package/constants/customer-file.d.ts +34 -0
- package/constants/customer-file.js +35 -0
- package/constants/record-field-kinds.d.ts +15 -0
- package/constants/record-field-kinds.js +13 -0
- package/constants/runtime-module-ownership.js +15 -2
- package/constants/runtime-render-client-types.d.ts +5 -0
- package/constants/runtime-render-client-types.js +5 -0
- 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/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
- package/constants.d.ts +2 -0
- package/constants.js +4 -0
- package/gateway/form-handler-request.d.ts +22 -0
- package/gateway/form-handler-request.js +40 -0
- package/gateway/label-set.d.ts +15 -2
- package/gateway/label-set.js +60 -22
- package/gateway/site-cms-write-validation.js +19 -3
- package/gateway/site-form-route.js +11 -2
- package/helpers/address-field.d.ts +43 -0
- package/helpers/address-field.js +68 -0
- package/helpers/announced-action.d.ts +17 -0
- package/helpers/announced-action.js +29 -0
- package/helpers/cms-dialog.d.ts +5 -20
- package/helpers/cms-dialog.js +8 -13
- package/helpers/cms-page-catalog.d.ts +10 -0
- package/helpers/cms-page-catalog.js +19 -0
- package/helpers/cms-preset-nodes.d.ts +4 -4
- package/helpers/cms-preset-nodes.js +1 -1
- package/helpers/cms-region-keys.d.ts +1 -1
- package/helpers/country-names.d.ts +12 -0
- package/helpers/country-names.js +14 -0
- package/helpers/phi-metadata.d.ts +25 -1
- package/helpers/phi-metadata.js +53 -1
- 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 +38 -0
- package/helpers/preset-table-check.js +118 -0
- package/helpers/preset-text-source-check.d.ts +4 -1
- package/helpers/preset-text-source-check.js +6 -1
- package/helpers/preset-tree-contract-check.d.ts +3 -2
- package/helpers/preset-tree-contract-check.js +30 -5
- package/helpers/public-route-claims.d.ts +9 -1
- package/helpers/public-route-claims.js +23 -3
- package/helpers/record-fields.d.ts +1 -5
- package/helpers/record-fields.js +15 -6
- 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/route-address-check.d.ts +22 -2
- package/helpers/route-address-check.js +29 -8
- package/helpers/site-address-row.d.ts +23 -0
- package/helpers/site-address-row.js +36 -0
- package/helpers/surface-style.d.ts +8 -1
- package/helpers/surface-style.js +12 -2
- package/helpers/table-widget-binding.d.ts +12 -0
- package/helpers/table-widget-binding.js +296 -0
- package/helpers/thread-inbox-row.d.ts +20 -0
- package/helpers/thread-inbox-row.js +26 -0
- package/helpers/translation-format.d.ts +26 -0
- package/helpers/translation-format.js +31 -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-labels.d.ts +1 -1
- package/module-labels.js +1 -1
- package/module-page-check.d.ts +3 -0
- package/module-page-check.js +3 -0
- package/module-records.d.ts +2 -2
- package/module-records.js +1 -0
- package/next/area-route.js +34 -1
- package/next/root-route.js +4 -4
- package/package.json +2 -2
- package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
- package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
- package/plugins/runtime-modules/accounting/data-providers.js +1 -1
- package/plugins/runtime-modules/accounting/ids.d.ts +14 -0
- package/plugins/runtime-modules/accounting/ids.js +34 -0
- package/plugins/runtime-modules/accounting/presets.js +32 -5
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +78 -0
- package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +136 -0
- package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +29 -0
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +450 -0
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
- package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
- package/plugins/runtime-modules/app/client-data-providers.js +9 -0
- package/plugins/runtime-modules/app/data-providers.d.ts +43 -0
- package/plugins/runtime-modules/app/data-providers.js +45 -0
- package/plugins/runtime-modules/app/definition.d.ts +60 -1
- package/plugins/runtime-modules/app/definition.js +2 -0
- package/plugins/runtime-modules/app/forms.d.ts +33 -3
- package/plugins/runtime-modules/app/forms.js +166 -31
- package/plugins/runtime-modules/app/ids.d.ts +8 -0
- package/plugins/runtime-modules/app/ids.js +9 -0
- package/plugins/runtime-modules/app/module.d.ts +60 -1
- package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
- package/plugins/runtime-modules/app/services/addresses-collection.js +105 -0
- package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +21 -0
- package/plugins/runtime-modules/app/trees/account-addresses-panel.js +143 -0
- package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +57 -0
- package/plugins/runtime-modules/app/trees/addresses-label-set.js +104 -0
- 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 +28 -19
- package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -2
- package/plugins/runtime-modules/app/trees/profile-label-set.js +5 -14
- package/plugins/runtime-modules/asset/presets.d.ts +4 -0
- package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
- package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
- package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
- package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
- package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
- package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
- package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
- package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
- package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
- package/plugins/runtime-modules/blog/presets.d.ts +4 -0
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
- package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
- package/plugins/runtime-modules/builder/clients/inspector-image-field.js +6 -3
- package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
- package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
- package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
- package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
- package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
- package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
- package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
- package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
- package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
- package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
- package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
- package/plugins/runtime-modules/builder/persistence.js +4 -0
- package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
- 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 +8 -1
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +47 -7
- package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
- package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
- package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
- package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
- package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
- package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
- package/plugins/runtime-modules/client-manifests/app.js +3 -0
- package/plugins/runtime-modules/client-manifests/builder.js +10 -0
- package/plugins/runtime-modules/client-manifests/common.js +6 -0
- package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
- package/plugins/runtime-modules/contracts.js +31 -1
- package/plugins/runtime-modules/core/definition.d.ts +23 -0
- package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -2
- package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
- package/plugins/runtime-modules/core/widgets/card/editor.js +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/client.js +3 -0
- package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
- package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/dimension/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/client.js +4 -1
- package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
- package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
- 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/header-navigation/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
- package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
- package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
- package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
- package/plugins/runtime-modules/core/widgets/number-input/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/simple-text/config.js +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
- package/plugins/runtime-modules/core/widgets/table/client.js +48 -51
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
- package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
- package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
- package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -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/dashboard/trees/dashboard-cards-page-tree.js +3 -1
- package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
- package/plugins/runtime-modules/descriptor-compiler.js +44 -16
- package/plugins/runtime-modules/editor/presets.d.ts +4 -0
- package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
- package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
- package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
- package/plugins/runtime-modules/localization/presets.d.ts +4 -0
- 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-admin-locales-page-tree.js +3 -1
- package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +9 -2
- package/plugins/runtime-modules/news/presets.d.ts +4 -0
- package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
- package/plugins/runtime-modules/resolver.js +17 -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 +86 -60
- 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/controller/draft-context-target.d.ts +25 -0
- package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -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/presets.d.ts +4 -0
- package/plugins/runtime-modules/revisions/services/options.js +14 -4
- package/plugins/runtime-modules/revisions/services/table.js +54 -25
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +79 -4
- package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
- package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
- package/plugins/runtime-modules/theme/presets.d.ts +4 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +105 -7
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
- package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
- package/plugins/runtime-modules/threads/client-data-providers.js +10 -0
- package/plugins/runtime-modules/threads/controller/client.js +62 -2
- package/plugins/runtime-modules/threads/controller/definition.js +49 -1
- package/plugins/runtime-modules/threads/data-providers.d.ts +100 -2
- package/plugins/runtime-modules/threads/data-providers.js +96 -0
- package/plugins/runtime-modules/threads/definition.d.ts +100 -2
- package/plugins/runtime-modules/threads/definition.js +1 -1
- package/plugins/runtime-modules/threads/ids.d.ts +4 -0
- package/plugins/runtime-modules/threads/ids.js +5 -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 +126 -0
- package/plugins/runtime-modules/threads/services/customer-file-table.js +79 -0
- package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
- package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
- package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
- package/plugins/runtime-modules/user-management/data-providers.js +101 -3
- package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
- package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
- package/plugins/runtime-modules/user-management/ids.js +9 -0
- package/plugins/runtime-modules/user-management/presets.js +17 -1
- package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
- package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +90 -0
- package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +122 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +181 -0
- package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +24 -18
- package/server-helpers/cms-page-record.d.ts +9 -1
- package/server-helpers/cms-page-record.js +11 -1
- package/server-helpers/cms-request.js +8 -5
- package/server-helpers/link-preview-image.d.ts +30 -0
- package/server-helpers/link-preview-image.js +57 -0
- package/server-helpers/runtime.js +0 -1
- package/server-helpers/search-text.js +3 -0
- package/server-helpers.d.ts +1 -1
- package/server-helpers.js +1 -1
- package/styles/controls.css +4 -2
- package/styles/layout.css +7 -0
- package/styles/shell.css +30 -6
- 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-composition.js +9 -0
- package/theme/phi-theme-gradients.js +4 -22
- package/theme/phi-theme-inverse-ground.d.ts +39 -0
- package/theme/phi-theme-inverse-ground.js +103 -0
- package/theme/phi-theme-palette-defaults.d.ts +16 -0
- package/theme/phi-theme-palette-defaults.js +103 -0
- package/theme/phi-theme-tokens.d.ts +2 -1
- package/theme/phi-theme-tokens.js +2 -0
- package/types/cms-module-descriptors.d.ts +14 -0
- package/types/cms-overlay.d.ts +13 -6
- package/types/cms-overlay.js +6 -22
- package/types/cms-plugins.d.ts +20 -3
- package/types/cms.d.ts +10 -0
- 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 +9 -3
- package/types/link-preview.d.ts +19 -0
- package/types/link-preview.js +19 -0
- package/types/record-provider.d.ts +22 -1
- package/types/signals.d.ts +2 -0
- package/types/signals.js +2 -0
- package/types/site-theme.d.ts +27 -0
- package/types/table-embed.d.ts +48 -0
- package/types/table-embed.js +1 -0
- package/types/table-widget.d.ts +29 -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 +3 -1
- package/types.d.ts +2 -1
- package/types.js +1 -1
- /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isPhiRecord } from "../../../../helpers/is-record";
|
|
3
|
+
import { buildPhiTablePageParams, createPhiTableProviderRequestInit, readPhiTableRows, readPhiTableStringFilter, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
|
|
4
|
+
import { readPhiTableProviderResponse, } from "../../../../components/widgets/client/shared/phi-table-provider-response";
|
|
5
|
+
import { createPhiTableProviderClient, } from "../../../../components/widgets/client/shared/phi-table-provider";
|
|
6
|
+
import { PhiTableProviderError, } from "../../../../types/table-widget";
|
|
7
|
+
import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../data-providers";
|
|
8
|
+
import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS, PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS as RESOURCES, } from "../ids";
|
|
9
|
+
/** Core's Site Admin routes for `users:v1` access (phis-server `/api/site/admin/users-access`). */
|
|
10
|
+
export const PHI_USERS_ACCESS_PATH = "/api/site/admin/users-access";
|
|
11
|
+
const RESPONSE_OPTIONS = { subject: "People data access" };
|
|
12
|
+
const RETENTION_ROW_ID = "retention";
|
|
13
|
+
// The Page names the same size; the route takes up to 100.
|
|
14
|
+
const LOG_PAGE_SIZE = 25;
|
|
15
|
+
function readFields(value) {
|
|
16
|
+
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
|
|
17
|
+
}
|
|
18
|
+
/** One Add-on as the Table reads it: Core's row, with the two marks its acts are offered by. */
|
|
19
|
+
export function toPhiUsersAccessAddonRow(row) {
|
|
20
|
+
const awaiting = readFields(row.awaiting);
|
|
21
|
+
const granted = readFields(row.granted);
|
|
22
|
+
return {
|
|
23
|
+
...row,
|
|
24
|
+
addonId: typeof row.addonId === "string" ? row.addonId : "",
|
|
25
|
+
fields: readFields(row.fields),
|
|
26
|
+
background: readFields(row.background),
|
|
27
|
+
granted,
|
|
28
|
+
effective: readFields(row.effective),
|
|
29
|
+
awaiting,
|
|
30
|
+
hasAwaiting: awaiting.length > 0,
|
|
31
|
+
hasGrant: granted.length > 0,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** One entry of the access log as the Table reads it; Core answers no id, so the row's place is its key. */
|
|
35
|
+
export function toPhiUsersAccessLogRow(row, index, page) {
|
|
36
|
+
const actor = isPhiRecord(row.actor) && typeof row.actor.displayName === "string" ? row.actor.displayName : "";
|
|
37
|
+
return {
|
|
38
|
+
...row,
|
|
39
|
+
key: `${page}:${index}:${typeof row.at === "string" ? row.at : ""}`,
|
|
40
|
+
actor,
|
|
41
|
+
fields: readFields(row.fields),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** What the grant of an Add-on asks for: everything its manifest asks in the background, as the Table last read it. */
|
|
45
|
+
const backgroundAsked = new Map();
|
|
46
|
+
async function readAccess(signal) {
|
|
47
|
+
return readPhiTableProviderResponse(await fetch(PHI_USERS_ACCESS_PATH, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
|
|
48
|
+
}
|
|
49
|
+
/** The log's request: newest first, a page at a time, narrowed by subject and Add-on. */
|
|
50
|
+
export function buildPhiUsersAccessLogParams(query) {
|
|
51
|
+
const params = buildPhiTablePageParams(query, LOG_PAGE_SIZE);
|
|
52
|
+
const subject = readPhiTableStringFilter(query, "subject");
|
|
53
|
+
if (subject)
|
|
54
|
+
params.set("subject", subject);
|
|
55
|
+
const addonId = readPhiTableStringFilter(query, "addonId");
|
|
56
|
+
if (addonId)
|
|
57
|
+
params.set("addonId", addonId);
|
|
58
|
+
return params;
|
|
59
|
+
}
|
|
60
|
+
async function queryUsersAccess({ resourceKey, query, signal }) {
|
|
61
|
+
if (resourceKey === RESOURCES.addons) {
|
|
62
|
+
const rows = readPhiTableRows((await readAccess(signal))?.addons).map(toPhiUsersAccessAddonRow);
|
|
63
|
+
backgroundAsked.clear();
|
|
64
|
+
for (const row of rows) {
|
|
65
|
+
if (row.addonId)
|
|
66
|
+
backgroundAsked.set(row.addonId, row.background);
|
|
67
|
+
}
|
|
68
|
+
return { rows, total: rows.length };
|
|
69
|
+
}
|
|
70
|
+
if (resourceKey === RESOURCES.retention) {
|
|
71
|
+
const days = (await readAccess(signal))?.retentionDays;
|
|
72
|
+
if (typeof days !== "number" || !Number.isSafeInteger(days)) {
|
|
73
|
+
throw new PhiTableProviderError("invalid-response", "The access log retention is invalid.");
|
|
74
|
+
}
|
|
75
|
+
return { rows: [{ id: RETENTION_ROW_ID, days }], total: 1 };
|
|
76
|
+
}
|
|
77
|
+
if (resourceKey === RESOURCES.log) {
|
|
78
|
+
const params = buildPhiUsersAccessLogParams(query);
|
|
79
|
+
const result = await readPhiTableProviderResponse(await fetch(`${PHI_USERS_ACCESS_PATH}/log?${params}`, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
|
|
80
|
+
const page = Number(params.get("page")) || 1;
|
|
81
|
+
return { rows: readPhiTableRows(result?.items).map((row, index) => toPhiUsersAccessLogRow(row, index, page)) };
|
|
82
|
+
}
|
|
83
|
+
throw new PhiTableProviderError("resource-not-found", `Unknown people data access resource "${resourceKey}".`);
|
|
84
|
+
}
|
|
85
|
+
/** The address of one Add-on's grant; the id is one segment, so its `@` and `/` are encoded. */
|
|
86
|
+
export function buildPhiUsersAccessGrantPath(addonId) {
|
|
87
|
+
return `${PHI_USERS_ACCESS_PATH}/${encodeURIComponent(addonId)}`;
|
|
88
|
+
}
|
|
89
|
+
async function mutateUsersAccess(request) {
|
|
90
|
+
const init = createPhiTableProviderRequestInit(request.signal);
|
|
91
|
+
const json = (body) => ({
|
|
92
|
+
...init,
|
|
93
|
+
headers: { ...init.headers, "content-type": "application/json" },
|
|
94
|
+
body: JSON.stringify(body),
|
|
95
|
+
});
|
|
96
|
+
if (request.resourceKey === RESOURCES.retention && request.kind === "field" && request.fieldKey === "days") {
|
|
97
|
+
const days = request.proposedValue;
|
|
98
|
+
if (typeof days !== "number" || !Number.isSafeInteger(days) || days < 1 || days > 3650) {
|
|
99
|
+
return { status: "rejected", invalidation: "none", errorCode: "invalid-field-value", message: "A whole number of days from 1 to 3650." };
|
|
100
|
+
}
|
|
101
|
+
const result = await readPhiTableProviderResponse(await fetch(`${PHI_USERS_ACCESS_PATH}/retention`, { ...json({ days }), method: "PUT" }), RESPONSE_OPTIONS);
|
|
102
|
+
return { status: "accepted", invalidation: "none", canonicalValue: result?.retentionDays ?? days };
|
|
103
|
+
}
|
|
104
|
+
if (request.resourceKey === RESOURCES.addons && request.kind === "action") {
|
|
105
|
+
const addonId = typeof request.rowIdentity === "string" ? request.rowIdentity : "";
|
|
106
|
+
if (!addonId)
|
|
107
|
+
throw new PhiTableProviderError("invalid-query", "An Add-on id is required.");
|
|
108
|
+
if (request.actionKey === "grant") {
|
|
109
|
+
const fields = backgroundAsked.get(addonId) ?? [];
|
|
110
|
+
if (fields.length === 0)
|
|
111
|
+
throw new PhiTableProviderError("invalid-query", `${addonId} asks for nothing in the background.`);
|
|
112
|
+
await readPhiTableProviderResponse(await fetch(buildPhiUsersAccessGrantPath(addonId), { ...json({ fields }), method: "PUT" }), RESPONSE_OPTIONS);
|
|
113
|
+
}
|
|
114
|
+
else if (request.actionKey === "revoke") {
|
|
115
|
+
await readPhiTableProviderResponse(await fetch(buildPhiUsersAccessGrantPath(addonId), { ...init, method: "DELETE" }), RESPONSE_OPTIONS);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new PhiTableProviderError("action-not-supported", `Unsupported people data access action "${request.actionKey}".`);
|
|
119
|
+
}
|
|
120
|
+
return { status: "accepted", invalidation: "view" };
|
|
121
|
+
}
|
|
122
|
+
throw new PhiTableProviderError("mutation-not-supported", "This people data access change is not offered.");
|
|
123
|
+
}
|
|
124
|
+
const resources = PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS
|
|
125
|
+
.find((descriptor) => descriptor.key === PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess)?.resources ?? [];
|
|
126
|
+
export const PHI_USER_MANAGEMENT_USERS_ACCESS_TABLE_PROVIDER_REGISTRATION = {
|
|
127
|
+
key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess,
|
|
128
|
+
resources,
|
|
129
|
+
query: queryUsersAccess,
|
|
130
|
+
mutate: mutateUsersAccess,
|
|
131
|
+
};
|
|
132
|
+
export const PhiUserManagementUsersAccessTableProviderClient = createPhiTableProviderClient(PHI_USER_MANAGEMENT_USERS_ACCESS_TABLE_PROVIDER_REGISTRATION);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
|
|
3
|
+
export declare function getPhiAdminUsersAccessLabels(options: PhiGlobalTranslatorOptions): Promise<{
|
|
4
|
+
pageTitle: string;
|
|
5
|
+
pageDescription: string;
|
|
6
|
+
panels: {
|
|
7
|
+
background: {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
retention: {
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
log: {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
widgets: {
|
|
21
|
+
addons: string;
|
|
22
|
+
retention: string;
|
|
23
|
+
log: string;
|
|
24
|
+
};
|
|
25
|
+
columns: {
|
|
26
|
+
addon: string;
|
|
27
|
+
fields: string;
|
|
28
|
+
background: string;
|
|
29
|
+
granted: string;
|
|
30
|
+
awaiting: string;
|
|
31
|
+
grantedAt: string;
|
|
32
|
+
days: string;
|
|
33
|
+
at: string;
|
|
34
|
+
actor: string;
|
|
35
|
+
road: string;
|
|
36
|
+
operation: string;
|
|
37
|
+
subjects: string;
|
|
38
|
+
logFields: string;
|
|
39
|
+
};
|
|
40
|
+
daysUnit: string;
|
|
41
|
+
fields: {
|
|
42
|
+
name: string;
|
|
43
|
+
email: string;
|
|
44
|
+
phone: string;
|
|
45
|
+
address: string;
|
|
46
|
+
};
|
|
47
|
+
roads: {
|
|
48
|
+
staff: string;
|
|
49
|
+
self: string;
|
|
50
|
+
background: string;
|
|
51
|
+
checkout: string;
|
|
52
|
+
};
|
|
53
|
+
operations: {
|
|
54
|
+
describe: string;
|
|
55
|
+
addresses: string;
|
|
56
|
+
createAddress: string;
|
|
57
|
+
fileOf: string;
|
|
58
|
+
customerFile: string;
|
|
59
|
+
};
|
|
60
|
+
nobody: string;
|
|
61
|
+
actions: {
|
|
62
|
+
grant: string;
|
|
63
|
+
revoke: string;
|
|
64
|
+
};
|
|
65
|
+
grant: {
|
|
66
|
+
title: string;
|
|
67
|
+
text: string;
|
|
68
|
+
ok: string;
|
|
69
|
+
};
|
|
70
|
+
revoke: {
|
|
71
|
+
title: string;
|
|
72
|
+
text: string;
|
|
73
|
+
ok: string;
|
|
74
|
+
};
|
|
75
|
+
cancel: string;
|
|
76
|
+
empty: {
|
|
77
|
+
addons: string;
|
|
78
|
+
log: string;
|
|
79
|
+
};
|
|
80
|
+
footers: {
|
|
81
|
+
addons: string;
|
|
82
|
+
log: string;
|
|
83
|
+
};
|
|
84
|
+
filters: {
|
|
85
|
+
subject: string;
|
|
86
|
+
subjectPlaceholder: string;
|
|
87
|
+
addon: string;
|
|
88
|
+
addonPlaceholder: string;
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { PHI_TR_CTX_WEB_UI_LABEL } from "../../../../gateway/tr";
|
|
3
|
+
import { definePhiMessageLabel, definePhiRuntimeModuleLabelSet, getPhiLabelSet } from "../../../../gateway/label-set";
|
|
4
|
+
import { PHI_USER_MANAGEMENT_RUNTIME_MODULE_IDENTITY } from "../ids";
|
|
5
|
+
/**
|
|
6
|
+
* What Admin -> Settings -> People data says: which Add-ons read people with nobody acting and what the
|
|
7
|
+
* Site granted them, how long the access log is kept, and the log.
|
|
8
|
+
*/
|
|
9
|
+
const PHI_ADMIN_USERS_ACCESS_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_USER_MANAGEMENT_RUNTIME_MODULE_IDENTITY, {
|
|
10
|
+
key: "preset:admin-users-access-page",
|
|
11
|
+
ctx: PHI_TR_CTX_WEB_UI_LABEL,
|
|
12
|
+
labels: {
|
|
13
|
+
page_title: "People data",
|
|
14
|
+
page_description: definePhiMessageLabel("Which Add-ons read people's data in the background, and every time anybody's was read."),
|
|
15
|
+
panel_background: "Background access",
|
|
16
|
+
panel_background_description: definePhiMessageLabel("An Add-on reads people with nobody acting -- in a job or an event -- only the fields granted here, and only while its manifest still asks for them."),
|
|
17
|
+
panel_retention: "Retention",
|
|
18
|
+
panel_retention_description: definePhiMessageLabel("How long the access log keeps an entry before it is forgotten."),
|
|
19
|
+
panel_log: "Access log",
|
|
20
|
+
panel_log_description: definePhiMessageLabel("Every answer that carried personal data: who asked, through which Add-on, and what it carried."),
|
|
21
|
+
addons_label: "Add-ons reading people",
|
|
22
|
+
retention_label: "access log retention",
|
|
23
|
+
log_label: "access log",
|
|
24
|
+
column_addon: "Add-on",
|
|
25
|
+
column_fields: "Reads",
|
|
26
|
+
column_background: "Asks in the background",
|
|
27
|
+
column_granted: "Granted",
|
|
28
|
+
column_awaiting: "Awaiting",
|
|
29
|
+
column_granted_at: "Granted on",
|
|
30
|
+
column_days: "Kept for",
|
|
31
|
+
days_unit: "days",
|
|
32
|
+
column_at: "When",
|
|
33
|
+
column_actor: "Acting",
|
|
34
|
+
column_road: "Road",
|
|
35
|
+
column_operation: "Operation",
|
|
36
|
+
column_subjects: "People",
|
|
37
|
+
column_log_fields: "Fields",
|
|
38
|
+
field_name: "Name",
|
|
39
|
+
field_email: "E-mail",
|
|
40
|
+
field_phone: "Telephone",
|
|
41
|
+
field_address: "Addresses",
|
|
42
|
+
road_staff: "Staff",
|
|
43
|
+
road_self: "Self",
|
|
44
|
+
road_background: "Background",
|
|
45
|
+
road_checkout: "Checkout",
|
|
46
|
+
operation_describe: "Described",
|
|
47
|
+
operation_addresses: "Addresses read",
|
|
48
|
+
operation_create_address: "Address written",
|
|
49
|
+
operation_file_of: "File opened",
|
|
50
|
+
operation_customer_file: "Customer file",
|
|
51
|
+
nobody: "Nobody",
|
|
52
|
+
action_grant: "Grant what is asked",
|
|
53
|
+
action_revoke: "Withdraw",
|
|
54
|
+
grant_title: "Grant %1 background access?",
|
|
55
|
+
grant_text: definePhiMessageLabel("It reads the fields it asks for with nobody acting, until the grant is withdrawn."),
|
|
56
|
+
revoke_title: "Withdraw the grant of %1?",
|
|
57
|
+
revoke_text: definePhiMessageLabel("It reads nobody in the background from now on; what it reads for somebody acting is unchanged."),
|
|
58
|
+
confirm_grant: "Grant",
|
|
59
|
+
confirm_revoke: "Withdraw",
|
|
60
|
+
cancel: "Cancel",
|
|
61
|
+
addons_empty: definePhiMessageLabel("No installed Add-on reads people."),
|
|
62
|
+
log_empty: definePhiMessageLabel("Nothing was read, or the filters leave nothing."),
|
|
63
|
+
addons_footer: "%1 Add-ons",
|
|
64
|
+
// The log pages without a count: what a page holds, and which page it is.
|
|
65
|
+
log_footer: "%1 entries on page %2",
|
|
66
|
+
filter_subject: "Person",
|
|
67
|
+
filter_subject_placeholder: "Subject",
|
|
68
|
+
filter_addon: "Add-on",
|
|
69
|
+
filter_addon_placeholder: "@scope/name",
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
export async function getPhiAdminUsersAccessLabels(options) {
|
|
73
|
+
const labels = await getPhiLabelSet(options, PHI_ADMIN_USERS_ACCESS_LABEL_SET);
|
|
74
|
+
return {
|
|
75
|
+
pageTitle: labels.page_title,
|
|
76
|
+
pageDescription: labels.page_description,
|
|
77
|
+
panels: {
|
|
78
|
+
background: { title: labels.panel_background, description: labels.panel_background_description },
|
|
79
|
+
retention: { title: labels.panel_retention, description: labels.panel_retention_description },
|
|
80
|
+
log: { title: labels.panel_log, description: labels.panel_log_description },
|
|
81
|
+
},
|
|
82
|
+
widgets: { addons: labels.addons_label, retention: labels.retention_label, log: labels.log_label },
|
|
83
|
+
columns: {
|
|
84
|
+
addon: labels.column_addon,
|
|
85
|
+
fields: labels.column_fields,
|
|
86
|
+
background: labels.column_background,
|
|
87
|
+
granted: labels.column_granted,
|
|
88
|
+
awaiting: labels.column_awaiting,
|
|
89
|
+
grantedAt: labels.column_granted_at,
|
|
90
|
+
days: labels.column_days,
|
|
91
|
+
at: labels.column_at,
|
|
92
|
+
actor: labels.column_actor,
|
|
93
|
+
road: labels.column_road,
|
|
94
|
+
operation: labels.column_operation,
|
|
95
|
+
subjects: labels.column_subjects,
|
|
96
|
+
logFields: labels.column_log_fields,
|
|
97
|
+
},
|
|
98
|
+
daysUnit: labels.days_unit,
|
|
99
|
+
fields: { name: labels.field_name, email: labels.field_email, phone: labels.field_phone, address: labels.field_address },
|
|
100
|
+
roads: { staff: labels.road_staff, self: labels.road_self, background: labels.road_background, checkout: labels.road_checkout },
|
|
101
|
+
operations: {
|
|
102
|
+
describe: labels.operation_describe,
|
|
103
|
+
addresses: labels.operation_addresses,
|
|
104
|
+
createAddress: labels.operation_create_address,
|
|
105
|
+
fileOf: labels.operation_file_of,
|
|
106
|
+
customerFile: labels.operation_customer_file,
|
|
107
|
+
},
|
|
108
|
+
nobody: labels.nobody,
|
|
109
|
+
actions: { grant: labels.action_grant, revoke: labels.action_revoke },
|
|
110
|
+
grant: { title: labels.grant_title, text: labels.grant_text, ok: labels.confirm_grant },
|
|
111
|
+
revoke: { title: labels.revoke_title, text: labels.revoke_text, ok: labels.confirm_revoke },
|
|
112
|
+
cancel: labels.cancel,
|
|
113
|
+
empty: { addons: labels.addons_empty, log: labels.log_empty },
|
|
114
|
+
footers: { addons: labels.addons_footer, log: labels.log_footer },
|
|
115
|
+
filters: {
|
|
116
|
+
subject: labels.filter_subject,
|
|
117
|
+
subjectPlaceholder: labels.filter_subject_placeholder,
|
|
118
|
+
addon: labels.filter_addon,
|
|
119
|
+
addonPlaceholder: labels.filter_addon_placeholder,
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
}
|
package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PhiCmsPageNode, PhiResolvedCmsPageTree } from "../../../../types/cms";
|
|
2
|
+
import type { PhiBlockRuntime } from "../../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Admin -> Settings -> People data: what the Site lets Add-ons read of people (`users:v1`), phis-server
|
|
5
|
+
* `/api/site/admin/users-access`. A Settings page like the others, three panels in the one shell:
|
|
6
|
+
*
|
|
7
|
+
* - **Background access**, one row per installed Add-on that reads people: what its manifest reads, what it
|
|
8
|
+
* asks to read with nobody acting, what the Site granted and what still awaits a grant. Granting gives it
|
|
9
|
+
* what it asks; withdrawing ends it. A manifest asking for more later keeps the old grant until granted
|
|
10
|
+
* again, which is what `Awaiting` shows.
|
|
11
|
+
* - **Retention**, the days the log keeps an entry, edited in its cell.
|
|
12
|
+
* - **Access log**, newest first, narrowed by a person's subject and an Add-on.
|
|
13
|
+
*
|
|
14
|
+
* Core answers these routes to a Site Admin only, and the Settings entry is offered to them alone; a
|
|
15
|
+
* Maintainer who opens the address is refused by the routes, and the Tables say so.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildPhiDefaultAdminUsersAccessPageTree({ page, runtime, }: {
|
|
18
|
+
page: PhiCmsPageNode;
|
|
19
|
+
runtime: PhiBlockRuntime;
|
|
20
|
+
}): Promise<PhiResolvedCmsPageTree>;
|
package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS, PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID, PHI_USER_MANAGEMENT_USERS_ACCESS_PAGE_PRESET_KEY, PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS as RESOURCES, } from "../ids";
|
|
2
|
+
import { buildPhiSettingsPageShellTree } from "../../../../components/regions/presets/phi-settings-page-shell-tree";
|
|
3
|
+
import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
|
|
4
|
+
import { getPhiAdminUsersAccessLabels } from "./admin-users-access-label-set";
|
|
5
|
+
const REGION_CONTENT_ID = -487;
|
|
6
|
+
/**
|
|
7
|
+
* Admin -> Settings -> People data: what the Site lets Add-ons read of people (`users:v1`), phis-server
|
|
8
|
+
* `/api/site/admin/users-access`. A Settings page like the others, three panels in the one shell:
|
|
9
|
+
*
|
|
10
|
+
* - **Background access**, one row per installed Add-on that reads people: what its manifest reads, what it
|
|
11
|
+
* asks to read with nobody acting, what the Site granted and what still awaits a grant. Granting gives it
|
|
12
|
+
* what it asks; withdrawing ends it. A manifest asking for more later keeps the old grant until granted
|
|
13
|
+
* again, which is what `Awaiting` shows.
|
|
14
|
+
* - **Retention**, the days the log keeps an entry, edited in its cell.
|
|
15
|
+
* - **Access log**, newest first, narrowed by a person's subject and an Add-on.
|
|
16
|
+
*
|
|
17
|
+
* Core answers these routes to a Site Admin only, and the Settings entry is offered to them alone; a
|
|
18
|
+
* Maintainer who opens the address is refused by the routes, and the Tables say so.
|
|
19
|
+
*/
|
|
20
|
+
export async function buildPhiDefaultAdminUsersAccessPageTree({ page, runtime, }) {
|
|
21
|
+
const labels = await getPhiAdminUsersAccessLabels(buildPhiWidgetLabelTranslatorOptions(runtime));
|
|
22
|
+
const fieldTags = {
|
|
23
|
+
renderer: "tags",
|
|
24
|
+
sizing: { mode: "content" },
|
|
25
|
+
valueMap: labels.fields,
|
|
26
|
+
};
|
|
27
|
+
const tree = buildPhiSettingsPageShellTree({
|
|
28
|
+
page,
|
|
29
|
+
ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
|
|
30
|
+
presetKey: PHI_USER_MANAGEMENT_USERS_ACCESS_PAGE_PRESET_KEY,
|
|
31
|
+
regionId: REGION_CONTENT_ID,
|
|
32
|
+
label: labels.pageTitle,
|
|
33
|
+
panels: [
|
|
34
|
+
{
|
|
35
|
+
nodeKey: "panelBackground",
|
|
36
|
+
title: labels.panels.background.title,
|
|
37
|
+
description: labels.panels.background.description,
|
|
38
|
+
sections: [{
|
|
39
|
+
nodeKey: "widgetAddons",
|
|
40
|
+
typeKey: "table",
|
|
41
|
+
label: labels.widgets.addons,
|
|
42
|
+
config: {
|
|
43
|
+
source: { providerKey: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess, resourceKey: RESOURCES.addons },
|
|
44
|
+
presentation: {
|
|
45
|
+
controlSize: "small",
|
|
46
|
+
layout: { mode: "auto", overflowX: "auto" },
|
|
47
|
+
columns: [
|
|
48
|
+
{ key: "addonId", fieldKey: "addonId", title: labels.columns.addon, renderer: "code", sizing: { mode: "content" }, sticky: "left" },
|
|
49
|
+
{ key: "fields", fieldKey: "fields", title: labels.columns.fields, ...fieldTags },
|
|
50
|
+
{ key: "background", fieldKey: "background", title: labels.columns.background, ...fieldTags },
|
|
51
|
+
{ key: "granted", fieldKey: "granted", title: labels.columns.granted, ...fieldTags, tagColorMap: { name: "success", email: "success", phone: "success", address: "success" } },
|
|
52
|
+
{ key: "awaiting", fieldKey: "awaiting", title: labels.columns.awaiting, ...fieldTags, tagColorMap: { name: "warning", email: "warning", phone: "warning", address: "warning" } },
|
|
53
|
+
{ key: "grantedAt", fieldKey: "grantedAt", title: labels.columns.grantedAt, renderer: "datetime", sizing: { mode: "content" } },
|
|
54
|
+
],
|
|
55
|
+
emptyState: { title: labels.empty.addons },
|
|
56
|
+
footer: {
|
|
57
|
+
template: labels.footers.addons,
|
|
58
|
+
values: [{ key: "addons", value: { source: "core", fieldKey: "totalRows" } }],
|
|
59
|
+
align: "start",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
features: {
|
|
63
|
+
pagination: { enabled: false },
|
|
64
|
+
sorting: { mode: "none" },
|
|
65
|
+
tools: { mode: "self-contained", reset: false, reload: true },
|
|
66
|
+
actions: {
|
|
67
|
+
rowLayout: "compact",
|
|
68
|
+
row: [
|
|
69
|
+
{
|
|
70
|
+
key: "grant",
|
|
71
|
+
label: labels.actions.grant,
|
|
72
|
+
icon: "antd:safety-certificate",
|
|
73
|
+
display: "icon",
|
|
74
|
+
mode: "primary",
|
|
75
|
+
execution: "provider",
|
|
76
|
+
confirm: { title: labels.grant.title, description: labels.grant.text, okText: labels.grant.ok, cancelText: labels.cancel },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: "revoke",
|
|
80
|
+
label: labels.actions.revoke,
|
|
81
|
+
icon: "antd:stop",
|
|
82
|
+
display: "icon",
|
|
83
|
+
mode: "danger",
|
|
84
|
+
execution: "provider",
|
|
85
|
+
confirm: { title: labels.revoke.title, description: labels.revoke.text, okText: labels.revoke.ok, cancelText: labels.cancel },
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
}],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
nodeKey: "panelRetention",
|
|
95
|
+
title: labels.panels.retention.title,
|
|
96
|
+
description: labels.panels.retention.description,
|
|
97
|
+
sections: [{
|
|
98
|
+
nodeKey: "widgetRetention",
|
|
99
|
+
typeKey: "table",
|
|
100
|
+
label: labels.widgets.retention,
|
|
101
|
+
config: {
|
|
102
|
+
source: { providerKey: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess, resourceKey: RESOURCES.retention },
|
|
103
|
+
presentation: {
|
|
104
|
+
controlSize: "small",
|
|
105
|
+
// The heading names the one value; the panel says what it is for.
|
|
106
|
+
footerOmitted: "One setting edited in its cell: there is nothing to count.",
|
|
107
|
+
layout: { mode: "auto", overflowX: "auto" },
|
|
108
|
+
columns: [{
|
|
109
|
+
key: "days",
|
|
110
|
+
fieldKey: "days",
|
|
111
|
+
title: labels.columns.days,
|
|
112
|
+
// The unit belongs to the value, not to the heading (TABLES.md, cell editors).
|
|
113
|
+
editor: { prefix: labels.daysUnit },
|
|
114
|
+
sizing: { mode: "content" },
|
|
115
|
+
align: "right",
|
|
116
|
+
}],
|
|
117
|
+
},
|
|
118
|
+
features: {
|
|
119
|
+
pagination: { enabled: false },
|
|
120
|
+
sorting: { mode: "none" },
|
|
121
|
+
editing: { mode: "cell" },
|
|
122
|
+
tools: { mode: "self-contained", reset: false, reload: false },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
}],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
nodeKey: "panelLog",
|
|
129
|
+
title: labels.panels.log.title,
|
|
130
|
+
description: labels.panels.log.description,
|
|
131
|
+
sections: [{
|
|
132
|
+
nodeKey: "widgetLog",
|
|
133
|
+
typeKey: "table",
|
|
134
|
+
label: labels.widgets.log,
|
|
135
|
+
config: {
|
|
136
|
+
source: { providerKey: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess, resourceKey: RESOURCES.log },
|
|
137
|
+
presentation: {
|
|
138
|
+
controlSize: "small",
|
|
139
|
+
layout: { mode: "auto", overflowX: "auto" },
|
|
140
|
+
columns: [
|
|
141
|
+
{ key: "at", fieldKey: "at", title: labels.columns.at, renderer: "datetime", sizing: { mode: "content" } },
|
|
142
|
+
{ key: "addonId", fieldKey: "addonId", title: labels.columns.addon, renderer: "code", sizing: { mode: "content" } },
|
|
143
|
+
{ key: "actor", fieldKey: "actor", title: labels.columns.actor, valueMap: { "": labels.nobody }, sizing: { mode: "content" } },
|
|
144
|
+
{ key: "road", fieldKey: "road", title: labels.columns.road, renderer: "badge", valueMap: labels.roads, sizing: { mode: "content" } },
|
|
145
|
+
{ key: "operation", fieldKey: "operation", title: labels.columns.operation, valueMap: labels.operations, sizing: { mode: "content" } },
|
|
146
|
+
{ key: "subjects", fieldKey: "subjects", title: labels.columns.subjects, renderer: "tags", sizing: { mode: "fill", minWidth: 160 } },
|
|
147
|
+
{ key: "fields", fieldKey: "fields", title: labels.columns.logFields, ...fieldTags },
|
|
148
|
+
],
|
|
149
|
+
emptyState: { title: labels.empty.log },
|
|
150
|
+
footer: {
|
|
151
|
+
template: labels.footers.log,
|
|
152
|
+
values: [
|
|
153
|
+
{ key: "entries", value: { source: "core", fieldKey: "pageRows" } },
|
|
154
|
+
{ key: "page", value: { source: "core", fieldKey: "page" } },
|
|
155
|
+
],
|
|
156
|
+
align: "start",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
features: {
|
|
160
|
+
pagination: { enabled: true, pageSize: 25, pageSizes: [25, 50, 100] },
|
|
161
|
+
sorting: { mode: "none" },
|
|
162
|
+
search: { enabled: false },
|
|
163
|
+
tools: { mode: "self-contained", reset: true, reload: true },
|
|
164
|
+
filters: [
|
|
165
|
+
{ key: "subject", type: "text", label: labels.filters.subject, placeholder: labels.filters.subjectPlaceholder },
|
|
166
|
+
{ key: "addonId", type: "text", label: labels.filters.addon, placeholder: labels.filters.addonPlaceholder },
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
}],
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
});
|
|
174
|
+
return {
|
|
175
|
+
...tree,
|
|
176
|
+
pageMeta: {
|
|
177
|
+
title: { msgId: 0, source: "People data", value: labels.pageTitle },
|
|
178
|
+
description: { msgId: 0, source: "Which Add-ons read people's data in the background, and every time anybody's was read.", value: labels.pageDescription },
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
|
|
2
2
|
import { PHI_CMS_DEFAULT_SLOT_INDEX, } from "../../../../constants/cms-layout-types";
|
|
3
|
-
import { PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
3
|
+
import { PhiCmsFlags, PhiCmsPageType } from "../../../../constants/phi-cms";
|
|
4
4
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
5
5
|
import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
|
|
6
6
|
import { getPhiAdminUsersPageLabels } from "./admin-users-label-set";
|
|
@@ -48,7 +48,7 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
48
48
|
reason: "User Management is still loading.",
|
|
49
49
|
};
|
|
50
50
|
const nodes = createPhiCmsPresetNodes(page);
|
|
51
|
-
const overlay = (id, rootLayoutNodeId, title,
|
|
51
|
+
const overlay = (id, rootLayoutNodeId, title, geometry, key, formMode) => nodes.overlay({
|
|
52
52
|
id,
|
|
53
53
|
overlayType: "modal",
|
|
54
54
|
bodyLayoutNodeId: rootLayoutNodeId,
|
|
@@ -70,7 +70,7 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
70
70
|
label: key,
|
|
71
71
|
config: {
|
|
72
72
|
title,
|
|
73
|
-
|
|
73
|
+
...geometry,
|
|
74
74
|
mountPolicy: "remount",
|
|
75
75
|
closeMode: formMode ? "request" : "immediate",
|
|
76
76
|
signalRoutes: {
|
|
@@ -202,9 +202,11 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
202
202
|
},
|
|
203
203
|
}],
|
|
204
204
|
overlays: [
|
|
205
|
-
overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayCreate, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutCreate, widgetLabels.editor.addTitle, PHI_DIALOG_WIDTH_SINGLE_COLUMN, "admin-users-create-modal", "create"),
|
|
206
|
-
overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayEdit, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutEdit, widgetLabels.editor.editTitle, PHI_DIALOG_WIDTH_SINGLE_COLUMN, "admin-users-edit-modal", "edit"),
|
|
207
|
-
overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayHistory, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutHistory, widgetLabels.history.title,
|
|
205
|
+
overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayCreate, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutCreate, widgetLabels.editor.addTitle, { size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN } }, "admin-users-create-modal", "create"),
|
|
206
|
+
overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayEdit, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutEdit, widgetLabels.editor.editTitle, { size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN } }, "admin-users-edit-modal", "edit"),
|
|
207
|
+
overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayHistory, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutHistory, widgetLabels.history.title,
|
|
208
|
+
// A log of changes reads across: wide where the window is, and never more of it than nine tenths.
|
|
209
|
+
{ size: { width: 980 }, maxSize: { width: "90vw" } }, "admin-users-history-modal"),
|
|
208
210
|
],
|
|
209
211
|
regions: [scaffold.region],
|
|
210
212
|
layoutNodes: [
|
|
@@ -247,6 +249,8 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
247
249
|
typeKey: "table",
|
|
248
250
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
249
251
|
sortOrder: 0,
|
|
252
|
+
// The Module's Label Set, translated already.
|
|
253
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
250
254
|
label: labels.tableLabel,
|
|
251
255
|
config: {
|
|
252
256
|
source: {
|
|
@@ -270,11 +274,10 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
270
274
|
renderer: "badge",
|
|
271
275
|
sizing: { mode: "content" },
|
|
272
276
|
valueMap: {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
auth: widgetLabels.accountTypes.auth,
|
|
277
|
+
staff: widgetLabels.accountTypes.staff,
|
|
278
|
+
customer: widgetLabels.accountTypes.customer,
|
|
276
279
|
},
|
|
277
|
-
tagColorMap: {
|
|
280
|
+
tagColorMap: { staff: "error", customer: "warning" },
|
|
278
281
|
},
|
|
279
282
|
{
|
|
280
283
|
key: "roleTags",
|
|
@@ -325,11 +328,10 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
325
328
|
key: "accountType",
|
|
326
329
|
type: "select",
|
|
327
330
|
label: widgetLabels.columns.account,
|
|
328
|
-
defaultValue: "
|
|
331
|
+
defaultValue: "staff",
|
|
329
332
|
options: [
|
|
330
|
-
{ value: "
|
|
331
|
-
{ value: "
|
|
332
|
-
{ value: "auth", label: widgetLabels.accountTypes.auth },
|
|
333
|
+
{ value: "staff", label: widgetLabels.accountTypes.staff },
|
|
334
|
+
{ value: "customer", label: widgetLabels.accountTypes.customer },
|
|
333
335
|
],
|
|
334
336
|
},
|
|
335
337
|
{
|
|
@@ -378,10 +380,7 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
378
380
|
icon: "edit",
|
|
379
381
|
display: "icon",
|
|
380
382
|
execution: "signal",
|
|
381
|
-
disabledWhen:
|
|
382
|
-
readOnlyCondition,
|
|
383
|
-
{ source: "row", valuePath: "medusaCustomerId", operator: "truthy", reason: widgetLabels.actions.editDisabled },
|
|
384
|
-
] },
|
|
383
|
+
disabledWhen: readOnlyCondition,
|
|
385
384
|
},
|
|
386
385
|
{
|
|
387
386
|
key: "delete",
|
|
@@ -601,6 +600,8 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
601
600
|
typeKey: "table",
|
|
602
601
|
slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
|
|
603
602
|
sortOrder: 0,
|
|
603
|
+
// The Module's Label Set, translated already.
|
|
604
|
+
flags: PhiCmsFlags.NoTranslate,
|
|
604
605
|
label: "admin users login history table",
|
|
605
606
|
config: {
|
|
606
607
|
source: {
|
|
@@ -618,6 +619,11 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
|
|
|
618
619
|
{ key: "userAgent", fieldKey: "userAgent", title: widgetLabels.columns.userAgent, sizing: { mode: "fill" } },
|
|
619
620
|
],
|
|
620
621
|
emptyState: { title: widgetLabels.history.empty, description: "" },
|
|
622
|
+
footer: {
|
|
623
|
+
template: widgetLabels.history.footer,
|
|
624
|
+
values: [{ key: "logins", value: { source: "core", fieldKey: "totalRows" } }],
|
|
625
|
+
align: "start",
|
|
626
|
+
},
|
|
621
627
|
},
|
|
622
628
|
features: {
|
|
623
629
|
pagination: { enabled: false, pageSize: 25 },
|