@phis/ui 0.4.16 → 0.4.18

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.
Files changed (110) hide show
  1. package/README.md +1 -1
  2. package/components/cms/phi-cms-render-error-boundary.d.ts +8 -0
  3. package/components/cms/phi-cms-render-error-boundary.js +2 -1
  4. package/components/controls/phi-table-control.js +15 -0
  5. package/components/forms/compound-form-controls.js +2 -1
  6. package/components/widgets/label-sets/observability-logs.d.ts +2 -0
  7. package/components/widgets/label-sets/observability-logs.js +4 -0
  8. package/components/widgets/label-sets/search.js +2 -0
  9. package/components/widgets/label-types/search.d.ts +2 -0
  10. package/components/widgets/label-types/search.js +1 -0
  11. package/constants/cms-widget-types.js +3 -2
  12. package/helpers/site-runtime.js +3 -0
  13. package/module-references.d.ts +19 -0
  14. package/module-references.js +18 -0
  15. package/net/log.d.ts +1 -0
  16. package/net/log.js +19 -1
  17. package/net/phi-next-proxy.js +9 -1
  18. package/package.json +6 -1
  19. package/plugins/runtime-modules/app/presets.js +0 -23
  20. package/plugins/runtime-modules/area-contributions/app.d.ts +1 -1
  21. package/plugins/runtime-modules/area-contributions/app.js +2 -0
  22. package/plugins/runtime-modules/area-contributions/public.d.ts +1 -1
  23. package/plugins/runtime-modules/area-contributions/public.js +2 -0
  24. package/plugins/runtime-modules/area-module-defaults.js +21 -2
  25. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +54 -54
  26. package/plugins/runtime-modules/client-authoring-providers/app.d.ts +1 -1
  27. package/plugins/runtime-modules/client-authoring-providers/app.js +6 -0
  28. package/plugins/runtime-modules/client-authoring-providers/public.d.ts +1 -1
  29. package/plugins/runtime-modules/client-authoring-providers/public.js +6 -0
  30. package/plugins/runtime-modules/client-manifests/common.js +2 -2
  31. package/plugins/runtime-modules/core/authoring-widgets.js +0 -4
  32. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  33. package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +1 -1
  34. package/plugins/runtime-modules/core/widgets/table/client.js +7 -5
  35. package/plugins/runtime-modules/core/widgets/table/config.js +8 -1
  36. package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
  37. package/plugins/runtime-modules/core/widgets.js +0 -17
  38. package/plugins/runtime-modules/groups/trees/group-tables.d.ts +44 -0
  39. package/plugins/runtime-modules/groups/trees/group-tables.js +150 -0
  40. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +28 -136
  41. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +9 -106
  42. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +17 -5
  43. package/plugins/runtime-modules/observability/data-providers.d.ts +9 -0
  44. package/plugins/runtime-modules/observability/data-providers.js +5 -0
  45. package/plugins/runtime-modules/observability/definition.d.ts +9 -0
  46. package/plugins/runtime-modules/observability/module.d.ts +9 -0
  47. package/plugins/runtime-modules/observability/services/table.js +4 -0
  48. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +13 -0
  49. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +21 -0
  50. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
  51. package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
  52. package/plugins/runtime-modules/public/presets.d.ts +0 -16
  53. package/plugins/runtime-modules/public/presets.js +0 -22
  54. package/plugins/runtime-modules/public-base-page-references.d.ts +0 -1
  55. package/plugins/runtime-modules/public-base-page-references.js +0 -1
  56. package/plugins/runtime-modules/search/authoring-widgets.d.ts +2 -0
  57. package/plugins/runtime-modules/search/authoring-widgets.js +8 -0
  58. package/plugins/runtime-modules/search/authoring.d.ts +1 -0
  59. package/plugins/runtime-modules/search/authoring.js +8 -0
  60. package/plugins/runtime-modules/search/definition.d.ts +21 -0
  61. package/plugins/runtime-modules/search/definition.js +23 -0
  62. package/plugins/runtime-modules/search/ids.d.ts +6 -0
  63. package/plugins/runtime-modules/search/ids.js +7 -0
  64. package/plugins/runtime-modules/search/module.d.ts +10 -0
  65. package/plugins/runtime-modules/search/module.js +4 -0
  66. package/plugins/runtime-modules/search/page-references.d.ts +8 -0
  67. package/plugins/runtime-modules/search/page-references.js +17 -0
  68. package/plugins/runtime-modules/{search-page-tree.d.ts → search/page-tree.d.ts} +1 -1
  69. package/plugins/runtime-modules/{search-page-tree.js → search/page-tree.js} +9 -7
  70. package/plugins/runtime-modules/search/presets.d.ts +12 -0
  71. package/plugins/runtime-modules/search/presets.js +33 -0
  72. package/plugins/runtime-modules/search/server.d.ts +1 -0
  73. package/plugins/runtime-modules/search/server.js +16 -0
  74. package/plugins/runtime-modules/search/widgets/search-box/authoring.d.ts +8 -0
  75. package/plugins/runtime-modules/search/widgets/search-box/authoring.js +21 -0
  76. package/plugins/runtime-modules/search/widgets/search-box/client.d.ts +39 -0
  77. package/plugins/runtime-modules/search/widgets/search-box/client.js +114 -0
  78. package/plugins/runtime-modules/search/widgets/search-box/config.d.ts +96 -0
  79. package/plugins/runtime-modules/search/widgets/search-box/config.js +67 -0
  80. package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.js +1 -4
  81. package/plugins/runtime-modules/search/widgets/search-box/server.d.ts +15 -0
  82. package/plugins/runtime-modules/{core → search}/widgets/search-box/server.js +13 -14
  83. package/plugins/runtime-modules/{core → search}/widgets/search-results/config.d.ts +0 -1
  84. package/plugins/runtime-modules/{core → search}/widgets/search-results/config.js +0 -1
  85. package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.js +1 -3
  86. package/plugins/runtime-modules/{core → search}/widgets/search-results/server.d.ts +1 -2
  87. package/plugins/runtime-modules/{core → search}/widgets/search-results/server.js +2 -2
  88. package/plugins/runtime-modules/search/widgets.d.ts +2 -0
  89. package/plugins/runtime-modules/search/widgets.js +20 -0
  90. package/server-helpers/search-index.js +9 -0
  91. package/styles/shell.css +142 -0
  92. package/theme/phi-theme-tokens.d.ts +1 -1
  93. package/theme/phi-theme-tokens.js +2 -0
  94. package/types/table-widget.d.ts +10 -1
  95. package/types/table-widget.js +1 -0
  96. package/plugins/runtime-modules/core/widgets/search-box/authoring.d.ts +0 -6
  97. package/plugins/runtime-modules/core/widgets/search-box/authoring.js +0 -10
  98. package/plugins/runtime-modules/core/widgets/search-box/client.d.ts +0 -21
  99. package/plugins/runtime-modules/core/widgets/search-box/client.js +0 -17
  100. package/plugins/runtime-modules/core/widgets/search-box/config.d.ts +0 -63
  101. package/plugins/runtime-modules/core/widgets/search-box/config.js +0 -48
  102. package/plugins/runtime-modules/core/widgets/search-box/server.d.ts +0 -21
  103. package/plugins/runtime-modules/search-page-references.d.ts +0 -20
  104. package/plugins/runtime-modules/search-page-references.js +0 -35
  105. /package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.d.ts +0 -0
  106. /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.d.ts +0 -0
  107. /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.js +0 -0
  108. /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.d.ts +0 -0
  109. /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.js +0 -0
  110. /package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.d.ts +0 -0
@@ -1,48 +0,0 @@
1
- import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
2
- import { readPhiLinkTarget } from "../../../../../types/references";
3
- import { readRenderableBlockConfig, readString, } from "../../../../../components/widgets/config/parser-primitives";
4
- const PHI_SEARCH_BOX_SIZES = ["small", "medium", "large"];
5
- function normalizePhiSearchBoxWidgetConfig(raw) {
6
- return {
7
- ...readRenderableBlockConfig(raw),
8
- placeholder: readString(raw.placeholder)?.trim() ?? "",
9
- linkTarget: readPhiLinkTarget(raw.linkTarget) ?? undefined,
10
- controlSize: PHI_SEARCH_BOX_SIZES.includes(raw.controlSize)
11
- ? raw.controlSize
12
- : undefined,
13
- };
14
- }
15
- export const PHI_SEARCH_BOX_WIDGET_DEFINITION = {
16
- kind: "widget",
17
- pluginKey: resolvePhiCmsWidgetPluginKey("search-box"),
18
- typeKey: "search-box",
19
- title: "Search Box",
20
- description: "A box that sends what a visitor types to the Site's search results page.",
21
- category: "navigation",
22
- tags: ["search", "find", "navigation"],
23
- translatesOwnText: true,
24
- icon: "antd:search",
25
- slotSizePolicy: "fill-inline",
26
- fields: [
27
- { key: "placeholder", type: "string", label: "Placeholder", description: "Empty shows \"Search\"." },
28
- {
29
- key: "linkTarget",
30
- type: "link-target",
31
- heading: "Results",
32
- label: "Results page",
33
- description: "Where the query is answered. Empty is this Area's own search page.",
34
- },
35
- {
36
- key: "controlSize",
37
- type: "choice",
38
- label: "Size",
39
- options: [
40
- { value: "small", label: "Small" },
41
- { value: "medium", label: "Medium" },
42
- { value: "large", label: "Large" },
43
- ],
44
- },
45
- ],
46
- defaultConfig: normalizePhiSearchBoxWidgetConfig({}),
47
- parseConfig: normalizePhiSearchBoxWidgetConfig,
48
- };
@@ -1,21 +0,0 @@
1
- import type { PhiNoLabels, PhiServerBlockBaseProps } from "../../../../../types";
2
- import type { PhiResolvedLinkTargets } from "../../../../../types/references";
3
- import type { PhiSearchBoxWidgetConfig } from "./config";
4
- export type PhiSearchBoxWidgetProps = PhiServerBlockBaseProps<PhiNoLabels, PhiSearchBoxWidgetConfig> & {
5
- /** The page's resolved link targets, where the author chose a results Page. */
6
- links?: PhiResolvedLinkTargets | null;
7
- /** Whether the placeholder is translated: the node's `NoTranslate` flag, read by the plugin. */
8
- translate?: boolean;
9
- };
10
- /**
11
- * The search box, resolved on the server: where the form goes, what the box says, what it already holds.
12
- *
13
- * The results Page is a reference, resolved as every link is -- through the page's targets where the
14
- * author picked one, or alone where the box takes the Area's own Page. An Area whose search Page does not
15
- * resolve -- a Module switched off, a Page unpublished -- draws no box at all rather than one that
16
- * leads to "not found".
17
- *
18
- * On the results Page itself the box shows the query it is answering, read from the same URL parameter
19
- * the results Widget reads.
20
- */
21
- export declare function PhiSearchBoxWidget({ config, runtime, links, translate }: PhiSearchBoxWidgetProps): Promise<import("react").JSX.Element | null>;
@@ -1,20 +0,0 @@
1
- import { type PhiLinkTarget } from "../../types/references";
2
- import type { PhiCmsAreaKey } from "../../constants/cms-areas";
3
- /**
4
- * The search results Pages (SEARCH.md), one per Area that is indexed, named once.
5
- *
6
- * The App base brings its own rather than sending a signed-in reader to the Public one: the App's
7
- * results Page searches App and Public, the Public one only Public, and which Area a reader stands in
8
- * is what decides between them. The Search Box Widget reads the Area it is placed in and links to that
9
- * Area's Page unless its author chose another; the Pages themselves are declared beside the other base
10
- * Pages of their Modules, with the keys from here so the two cannot drift.
11
- *
12
- * Kept apart from the Module folders for the reason `public-base-page-references.ts` is: a Core Widget
13
- * links to these Pages, and importing them from beside the trees would compile the whole Module with it.
14
- */
15
- export declare const PHI_APP_SEARCH_PAGE_PRESET_KEY = "app-search-page";
16
- /**
17
- * Where a Search Box in `area` sends its query when its author chose no Page: the Area's own results
18
- * Page, and for an Area that has none -- the operator's chrome -- the Public one, resolved in Public.
19
- */
20
- export declare function resolvePhiSearchPageLinkTarget(area: PhiCmsAreaKey): PhiLinkTarget;
@@ -1,35 +0,0 @@
1
- import { createPhiPageReference } from "../../types/references";
2
- import { PHI_SHARED_PACKAGE_NAME } from "../../constants/package";
3
- import { createPhiRuntimeModuleId } from "../../constants/module-identity";
4
- import { PHI_PUBLIC_BASE_PAGE_REFERENCES } from "./public-base-page-references";
5
- /**
6
- * The search results Pages (SEARCH.md), one per Area that is indexed, named once.
7
- *
8
- * The App base brings its own rather than sending a signed-in reader to the Public one: the App's
9
- * results Page searches App and Public, the Public one only Public, and which Area a reader stands in
10
- * is what decides between them. The Search Box Widget reads the Area it is placed in and links to that
11
- * Area's Page unless its author chose another; the Pages themselves are declared beside the other base
12
- * Pages of their Modules, with the keys from here so the two cannot drift.
13
- *
14
- * Kept apart from the Module folders for the reason `public-base-page-references.ts` is: a Core Widget
15
- * links to these Pages, and importing them from beside the trees would compile the whole Module with it.
16
- */
17
- export const PHI_APP_SEARCH_PAGE_PRESET_KEY = "app-search-page";
18
- const PHI_APP_RUNTIME_MODULE_ID = createPhiRuntimeModuleId(PHI_SHARED_PACKAGE_NAME, "app");
19
- const PHI_APP_SEARCH_PAGE_REFERENCE = createPhiPageReference({
20
- kind: "module",
21
- ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
22
- presetKey: PHI_APP_SEARCH_PAGE_PRESET_KEY,
23
- });
24
- /**
25
- * Where a Search Box in `area` sends its query when its author chose no Page: the Area's own results
26
- * Page, and for an Area that has none -- the operator's chrome -- the Public one, resolved in Public.
27
- */
28
- export function resolvePhiSearchPageLinkTarget(area) {
29
- if (area === "app") {
30
- return { kind: "page", reference: PHI_APP_SEARCH_PAGE_REFERENCE };
31
- }
32
- return area === "public"
33
- ? { kind: "page", reference: PHI_PUBLIC_BASE_PAGE_REFERENCES.search }
34
- : { kind: "page", reference: PHI_PUBLIC_BASE_PAGE_REFERENCES.search, area: "public" };
35
- }