@phis/ui 0.4.22 → 0.5.0
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/controls/phi-background-control.js +1 -1
- package/components/controls/phi-brand-control.d.ts +6 -1
- package/components/controls/phi-brand-control.js +2 -2
- package/components/controls/phi-breadcrumb-control.d.ts +2 -0
- package/components/media/media-asset-typed-fields.d.ts +10 -0
- package/components/media/media-asset-typed-fields.js +19 -0
- package/components/media/media-settings-labels.d.ts +33 -0
- package/components/media/media-settings-labels.js +62 -0
- package/components/media/media-upload-flow.d.ts +19 -0
- package/components/media/media-upload-flow.js +38 -0
- package/components/media/phi-asset-focal-rect-widget.js +2 -2
- package/components/media/phi-image-inspector-widget.js +1 -1
- package/components/media/phi-image-preview-data.js +5 -4
- package/components/media/phi-site-font-assets.js +2 -5
- package/components/media/use-authoring-asset-details.js +0 -1
- package/components/regions/presets/navigation-redirect.d.ts +2 -2
- package/components/regions/presets/navigation-redirect.js +3 -3
- package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -1
- package/components/widgets/helpers/internal-reference-resolver.server.d.ts +1 -1
- package/components/widgets/helpers/internal-reference-resolver.server.js +4 -0
- package/components/widgets/label-sets/builder-modules.js +6 -0
- package/components/widgets/label-types/builder-modules.d.ts +4 -0
- package/components/widgets/label-types/builder-modules.js +3 -0
- package/components/widgets/shared/markdown-render.js +30 -135
- package/components/widgets/shared/markdown-translation-unit.d.ts +62 -0
- package/components/widgets/shared/markdown-translation-unit.js +211 -0
- package/constants/runtime-module-ownership.js +4 -0
- package/gateway/internal-references.d.ts +5 -0
- package/gateway/internal-references.js +12 -12
- package/gateway/site-media-settings.d.ts +2 -0
- package/gateway/site-media-settings.js +6 -1
- package/gateway/site-media-storage-reader.d.ts +19 -0
- package/gateway/site-media-storage-reader.js +24 -0
- package/helpers/cms-navigation-catalog.d.ts +2 -0
- package/helpers/cms-navigation-catalog.js +1 -0
- package/helpers/cms-page-catalog.d.ts +12 -0
- package/helpers/cms-page-catalog.js +5 -0
- package/helpers/phi-seo.d.ts +16 -2
- package/helpers/phi-seo.js +54 -11
- package/helpers/public-route-claims.d.ts +4 -0
- package/helpers/public-route-claims.js +1 -1
- package/next/seo-routes.d.ts +1 -1
- package/next/seo-routes.js +23 -5
- package/package.json +1 -1
- package/plugins/runtime-modules/area-definitions.d.ts +75 -6
- package/plugins/runtime-modules/area-definitions.js +20 -0
- package/plugins/runtime-modules/asset/client-data-providers.js +12 -0
- package/plugins/runtime-modules/asset/controller/runtime.js +1 -1
- package/plugins/runtime-modules/asset/data-providers.d.ts +27 -2
- package/plugins/runtime-modules/asset/data-providers.js +56 -0
- package/plugins/runtime-modules/asset/definition.d.ts +38 -2
- package/plugins/runtime-modules/asset/definition.js +2 -1
- package/plugins/runtime-modules/asset/ids.d.ts +4 -0
- package/plugins/runtime-modules/asset/ids.js +4 -0
- package/plugins/runtime-modules/asset/server.js +2 -1
- package/plugins/runtime-modules/asset/services/options.d.ts +7 -0
- package/plugins/runtime-modules/asset/services/options.js +38 -0
- package/plugins/runtime-modules/asset/services/storage-spaces-table.d.ts +3 -0
- package/plugins/runtime-modules/asset/services/storage-spaces-table.js +89 -0
- package/plugins/runtime-modules/asset/settings-forms.d.ts +17 -0
- package/plugins/runtime-modules/asset/settings-forms.js +117 -1
- package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +94 -1
- package/plugins/runtime-modules/builder/area-shell-presets.server.d.ts +8 -0
- package/plugins/runtime-modules/builder/area-shell-presets.server.js +13 -0
- package/plugins/runtime-modules/builder/controller/page-controller-helpers.js +1 -1
- package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -1
- package/plugins/runtime-modules/builder/controller/page-controller.js +30 -3
- package/plugins/runtime-modules/builder/controller/server-definition.d.ts +7 -1
- package/plugins/runtime-modules/builder/controller/server-definition.js +8 -3
- package/plugins/runtime-modules/builder/data-providers.js +1 -0
- package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +2 -0
- package/plugins/runtime-modules/builder/navigation-path-context.js +7 -3
- package/plugins/runtime-modules/builder/options-providers.js +2 -2
- package/plugins/runtime-modules/builder/page-address-rule.d.ts +39 -0
- package/plugins/runtime-modules/builder/page-address-rule.js +62 -0
- package/plugins/runtime-modules/builder/page-meta-form.js +10 -0
- package/plugins/runtime-modules/builder/public-route-collisions.js +7 -2
- package/plugins/runtime-modules/builder/services/page-source-tree.js +2 -1
- package/plugins/runtime-modules/builder/services/runtime-modules-table.js +49 -1
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +14 -2
- package/plugins/runtime-modules/core/widgets/brand/client.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/brand/client.js +2 -1
- package/plugins/runtime-modules/core/widgets/brand/plugin.js +23 -2
- package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
- package/plugins/runtime-modules/core/widgets/brand/server.js +2 -1
- package/plugins/runtime-modules/core/widgets/breadcrumb/client.d.ts +14 -2
- package/plugins/runtime-modules/core/widgets/breadcrumb/client.js +35 -4
- package/plugins/runtime-modules/core/widgets/breadcrumb/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/breadcrumb/server.js +37 -2
- package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
- package/plugins/runtime-modules/core/widgets/card/server.js +7 -4
- package/plugins/runtime-modules/core/widgets/gallery/plugin.js +3 -1
- package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/gallery/server.js +12 -2
- package/plugins/runtime-modules/core/widgets/image/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/image/editor.js +1 -1
- package/plugins/runtime-modules/core/widgets/image/server.js +28 -5
- package/plugins/runtime-modules/core/widgets/page-title/authoring.js +3 -1
- package/plugins/runtime-modules/core/widgets/page-title/client.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/page-title/client.js +5 -1
- package/plugins/runtime-modules/core/widgets/page-title/config.d.ts +25 -3
- package/plugins/runtime-modules/core/widgets/page-title/config.js +24 -3
- package/plugins/runtime-modules/core/widgets/page-title/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/page-title/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/page-title/server.js +4 -3
- package/plugins/runtime-modules/core/widgets/table/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
- package/plugins/runtime-modules/descriptor-compiler.js +33 -8
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +1 -1
- package/server-helpers/cms-review-params.d.ts +25 -0
- package/server-helpers/cms-review-params.js +54 -0
- package/server-helpers/cms-review.d.ts +1 -25
- package/server-helpers/cms-review.js +2 -54
- package/types/cms-module-descriptors.d.ts +33 -3
- package/types/media.d.ts +6 -2
- package/types/table-widget.d.ts +11 -0
- package/types.d.ts +1 -1
|
@@ -11,6 +11,7 @@ import { readPhiInternalReference } from "../../../types/references";
|
|
|
11
11
|
import { resolvePhiWidgetInternalReferences } from "../helpers/internal-reference-resolver.server";
|
|
12
12
|
import { protectPhiMailHref, splitPhiMailAddresses } from "../../../helpers/protected-mail";
|
|
13
13
|
import { resolvePhiWidgetSourceUrl } from "../helpers/widget-source-url";
|
|
14
|
+
import { buildMarkdownTranslationUnit, readMarkdownTranslationUnit, } from "./markdown-translation-unit";
|
|
14
15
|
const MARKDOWN_DEFAULT_REVALIDATE_SECONDS = 14400;
|
|
15
16
|
function normalizeMarkdownSourceUrl(sourceUrl, publicUrl) {
|
|
16
17
|
const trimmed = resolvePhiWidgetSourceUrl(sourceUrl, publicUrl);
|
|
@@ -251,65 +252,11 @@ function mapInlineNodes(nodes) {
|
|
|
251
252
|
}
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
|
-
function escapeTranslationHtml(value) {
|
|
255
|
-
return value
|
|
256
|
-
.replaceAll("&", "&")
|
|
257
|
-
.replaceAll("<", "<")
|
|
258
|
-
.replaceAll(">", ">")
|
|
259
|
-
.replaceAll('"', """);
|
|
260
|
-
}
|
|
261
|
-
function decodeTranslationHtml(value) {
|
|
262
|
-
return value
|
|
263
|
-
.replaceAll(""", '"')
|
|
264
|
-
.replaceAll("'", "'")
|
|
265
|
-
.replaceAll(">", ">")
|
|
266
|
-
.replaceAll("<", "<")
|
|
267
|
-
.replaceAll("&", "&");
|
|
268
|
-
}
|
|
269
|
-
function serializeMarkdownInlines(nodes, metadata) {
|
|
270
|
-
return (nodes ?? []).map((node) => {
|
|
271
|
-
switch (node.type) {
|
|
272
|
-
case "text":
|
|
273
|
-
return escapeTranslationHtml(node.value ?? "");
|
|
274
|
-
case "strong":
|
|
275
|
-
return `<x-strong>${serializeMarkdownInlines(node.children, metadata)}</x-strong>`;
|
|
276
|
-
case "emphasis":
|
|
277
|
-
return `<x-emphasis>${serializeMarkdownInlines(node.children, metadata)}</x-emphasis>`;
|
|
278
|
-
case "delete":
|
|
279
|
-
return `<x-delete>${serializeMarkdownInlines(node.children, metadata)}</x-delete>`;
|
|
280
|
-
case "link": {
|
|
281
|
-
const index = metadata.links.push(node.url?.trim() ?? "") - 1;
|
|
282
|
-
return `<x-link data-index="${index}">${serializeMarkdownInlines(node.children, metadata)}</x-link>`;
|
|
283
|
-
}
|
|
284
|
-
case "image": {
|
|
285
|
-
/*
|
|
286
|
-
* The title is prose and gets translated, but as a unit of its own rather than as more content
|
|
287
|
-
* inside the image token. Two separate sentences in one token read as one run of text: asked to
|
|
288
|
-
* translate `alt` and title together, a translator returned them merged and re-split at a
|
|
289
|
-
* different point. Keeping the token's shape also leaves every already-translated image
|
|
290
|
-
* unchanged, since the string the catalogue is keyed by does not move.
|
|
291
|
-
*/
|
|
292
|
-
const index = metadata.images.push(node.url?.trim() ?? "") - 1;
|
|
293
|
-
metadata.titles[index] = node.title?.trim() ?? "";
|
|
294
|
-
return `<x-image data-index="${index}">${escapeTranslationHtml(node.alt ?? "")}</x-image>`;
|
|
295
|
-
}
|
|
296
|
-
case "inlineCode": {
|
|
297
|
-
const index = metadata.code.push(node.value ?? "") - 1;
|
|
298
|
-
return `<x-code data-index="${index}" translate="no">${escapeTranslationHtml(node.value ?? "")}</x-code>`;
|
|
299
|
-
}
|
|
300
|
-
case "break":
|
|
301
|
-
return "<br/>";
|
|
302
|
-
default:
|
|
303
|
-
return serializeMarkdownInlines(node.children, metadata);
|
|
304
|
-
}
|
|
305
|
-
}).join("");
|
|
306
|
-
}
|
|
307
255
|
function collectMarkdownTranslationUnits(node, units) {
|
|
308
256
|
if (node.type === "heading" || node.type === "paragraph" || node.type === "tableCell") {
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
units.push({ node, html, metadata });
|
|
257
|
+
const unit = buildMarkdownTranslationUnit(node.children);
|
|
258
|
+
if (unit.translatable || unit.slots.some((slot) => slot.kind === "image")) {
|
|
259
|
+
units.push({ node, unit });
|
|
313
260
|
}
|
|
314
261
|
return;
|
|
315
262
|
}
|
|
@@ -320,69 +267,6 @@ function collectMarkdownTranslationUnits(node, units) {
|
|
|
320
267
|
collectMarkdownTranslationUnits(child, units);
|
|
321
268
|
}
|
|
322
269
|
}
|
|
323
|
-
function parseTranslatedMarkdownInlines(translatedHtml, metadata) {
|
|
324
|
-
const stack = [{ kind: "root", children: [] }];
|
|
325
|
-
const tokenPattern = /<\/?x-(?:strong|emphasis|delete|link|image|code)\b[^>]*>|<br\s*\/?>/gi;
|
|
326
|
-
let cursor = 0;
|
|
327
|
-
const appendText = (value) => {
|
|
328
|
-
if (value)
|
|
329
|
-
stack.at(-1)?.children.push({ kind: "text", text: decodeTranslationHtml(value) });
|
|
330
|
-
};
|
|
331
|
-
for (const match of translatedHtml.matchAll(tokenPattern)) {
|
|
332
|
-
appendText(translatedHtml.slice(cursor, match.index));
|
|
333
|
-
const token = match[0];
|
|
334
|
-
cursor = (match.index ?? 0) + token.length;
|
|
335
|
-
if (/^<br/i.test(token)) {
|
|
336
|
-
stack.at(-1)?.children.push({ kind: "break" });
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
const closing = /^<\//.test(token);
|
|
340
|
-
const kindMatch = token.match(/^<\/?x-(strong|emphasis|delete|link|image|code)/i);
|
|
341
|
-
const kind = kindMatch?.[1]?.toLowerCase();
|
|
342
|
-
if (!kind)
|
|
343
|
-
return null;
|
|
344
|
-
if (!closing) {
|
|
345
|
-
const indexMatch = token.match(/data-index=["']?(\d+)/i);
|
|
346
|
-
stack.push({ kind, index: indexMatch ? Number(indexMatch[1]) : undefined, children: [] });
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
const frame = stack.pop();
|
|
350
|
-
if (!frame || frame.kind !== kind || stack.length === 0)
|
|
351
|
-
return null;
|
|
352
|
-
const parent = stack.at(-1);
|
|
353
|
-
if (!parent)
|
|
354
|
-
return null;
|
|
355
|
-
if (kind === "strong" || kind === "emphasis" || kind === "delete") {
|
|
356
|
-
parent.children.push({ kind, children: frame.children });
|
|
357
|
-
}
|
|
358
|
-
else if (kind === "link") {
|
|
359
|
-
const href = metadata.links[frame.index ?? -1];
|
|
360
|
-
if (href == null)
|
|
361
|
-
return null;
|
|
362
|
-
parent.children.push({ kind: "link", href, external: /^https?:\/\//.test(href), children: frame.children });
|
|
363
|
-
}
|
|
364
|
-
else if (kind === "image") {
|
|
365
|
-
const src = metadata.images[frame.index ?? -1];
|
|
366
|
-
if (src == null)
|
|
367
|
-
return null;
|
|
368
|
-
const title = metadata.titles[frame.index ?? -1]?.trim() ?? "";
|
|
369
|
-
parent.children.push({
|
|
370
|
-
kind: "image",
|
|
371
|
-
src,
|
|
372
|
-
alt: getInlineText(frame.children),
|
|
373
|
-
...(title ? { title } : {}),
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
else if (kind === "code") {
|
|
377
|
-
const text = metadata.code[frame.index ?? -1];
|
|
378
|
-
if (text == null)
|
|
379
|
-
return null;
|
|
380
|
-
parent.children.push({ kind: "inline_code", text });
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
appendText(translatedHtml.slice(cursor));
|
|
384
|
-
return stack.length === 1 ? stack[0]?.children ?? [] : null;
|
|
385
|
-
}
|
|
386
270
|
/*
|
|
387
271
|
* The render's own locale where there is one. A static render has no request to ask: `trBulk` reads the
|
|
388
272
|
* locale from the request headers, finds none, and answers in the Site's default -- which left every
|
|
@@ -396,25 +280,36 @@ function translateUnits(locale, msgs, format, sourceLocale) {
|
|
|
396
280
|
async function buildMarkdownInlineMap(tree, translate, sourceLocale, locale) {
|
|
397
281
|
const units = [];
|
|
398
282
|
collectMarkdownTranslationUnits(tree, units);
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
283
|
+
const sent = units.filter((entry) => entry.unit.translatable);
|
|
284
|
+
const translated = new Map();
|
|
285
|
+
if (translate && sent.length > 0) {
|
|
286
|
+
const answers = await translateUnits(locale, sent.map((entry) => entry.unit.html), "html", sourceLocale);
|
|
287
|
+
sent.forEach((entry, index) => translated.set(entry, answers[index] || entry.unit.html));
|
|
288
|
+
}
|
|
402
289
|
/*
|
|
403
|
-
*
|
|
404
|
-
* from the
|
|
405
|
-
* them. They are collected across every unit so this stays one
|
|
290
|
+
* A picture's alt text and title are prose and translate as plain text, each on its own: they are
|
|
291
|
+
* separate sentences from the one the picture stands in, and asked for together a translator merged
|
|
292
|
+
* them and re-split them at another point. They are collected across every unit so this stays one
|
|
293
|
+
* request.
|
|
406
294
|
*/
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
295
|
+
const imageTexts = units.flatMap(({ unit }) => unit.slots.flatMap((slot) => slot.kind !== "image"
|
|
296
|
+
? []
|
|
297
|
+
: ["alt", "title"].flatMap((field) => slot[field].trim() ? [{ slot, field, text: slot[field] }] : [])));
|
|
298
|
+
if (translate && imageTexts.length > 0) {
|
|
299
|
+
const answers = await translateUnits(locale, imageTexts.map((entry) => entry.text), "text", sourceLocale);
|
|
300
|
+
imageTexts.forEach((entry, index) => {
|
|
301
|
+
entry.slot[entry.field] = answers[index] || entry.text;
|
|
412
302
|
});
|
|
413
303
|
}
|
|
414
|
-
return new Map(units.map((
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
304
|
+
return new Map(units.map((entry) => {
|
|
305
|
+
const answer = translated.get(entry);
|
|
306
|
+
return [
|
|
307
|
+
entry.node,
|
|
308
|
+
(answer !== undefined ? readMarkdownTranslationUnit(answer, entry.unit.slots) : null)
|
|
309
|
+
?? readMarkdownTranslationUnit(entry.unit.html, entry.unit.slots)
|
|
310
|
+
?? mapInlineNodes(entry.node.children),
|
|
311
|
+
];
|
|
312
|
+
}));
|
|
418
313
|
}
|
|
419
314
|
function getInlineText(inlines) {
|
|
420
315
|
return inlines
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { PhiMarkdownInline } from "./markdown-body-client";
|
|
2
|
+
/**
|
|
3
|
+
* One Markdown translation unit as it travels: plain HTML any provider's HTML mode handles, with what
|
|
4
|
+
* must not be translated taken out of the text as a numbered `%n`. The vocabulary is the table in
|
|
5
|
+
* TRANSLATIONS.md, "The Markdown unit format".
|
|
6
|
+
*/
|
|
7
|
+
/** The smallest tree the unit is built from: an mdast inline node, as far as a unit reads it. */
|
|
8
|
+
export type MarkdownUnitNode = {
|
|
9
|
+
type: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
alt?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
children?: MarkdownUnitNode[];
|
|
15
|
+
};
|
|
16
|
+
/** What one `%n` stands for, at index `n - 1`. */
|
|
17
|
+
export type MarkdownUnitSlot = {
|
|
18
|
+
kind: "code";
|
|
19
|
+
text: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "link";
|
|
22
|
+
href: string;
|
|
23
|
+
}
|
|
24
|
+
/** `alt` and `title` are filled with their translations before the unit is read back. */
|
|
25
|
+
| {
|
|
26
|
+
kind: "image";
|
|
27
|
+
src: string;
|
|
28
|
+
alt: string;
|
|
29
|
+
title: string;
|
|
30
|
+
}
|
|
31
|
+
/** `%` and digits the author wrote; masked so a provider cannot confuse it with a token. */
|
|
32
|
+
| {
|
|
33
|
+
kind: "literal";
|
|
34
|
+
text: string;
|
|
35
|
+
}
|
|
36
|
+
/** A Site copy placeholder (`helpers/text-placeholders.ts`), masked in the same sequence. */
|
|
37
|
+
| {
|
|
38
|
+
kind: "placeholder";
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
export type MarkdownTranslationUnit = {
|
|
42
|
+
/** What is sent: `format: "html"`. */
|
|
43
|
+
html: string;
|
|
44
|
+
slots: MarkdownUnitSlot[];
|
|
45
|
+
/** Whether any text is left once the tokens are out; a unit without any is not sent, only read back. */
|
|
46
|
+
translatable: boolean;
|
|
47
|
+
};
|
|
48
|
+
export type MarkdownTranslationUnitOptions = {
|
|
49
|
+
/** Mask Site copy placeholders (`{site.name}` …) in the same sequence; the Markdown body masks none. */
|
|
50
|
+
sitePlaceholders?: boolean;
|
|
51
|
+
};
|
|
52
|
+
/** Builds the unit for one heading, paragraph or table cell from its inline children. */
|
|
53
|
+
export declare function buildMarkdownTranslationUnit(nodes: readonly MarkdownUnitNode[] | undefined, options?: MarkdownTranslationUnitOptions): MarkdownTranslationUnit;
|
|
54
|
+
/**
|
|
55
|
+
* Reads a unit back into inlines, by number and never by order: a provider moves tokens to wherever its
|
|
56
|
+
* language needs them. `null` for anything outside the vocabulary -- an unknown tag or attribute, a tag
|
|
57
|
+
* left open or closed out of turn, a slot missing, doubled or used as the wrong kind; the caller then
|
|
58
|
+
* shows the source.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readMarkdownTranslationUnit(html: string, slots: readonly MarkdownUnitSlot[], options?: {
|
|
61
|
+
resolvePlaceholder?: (name: string) => string;
|
|
62
|
+
}): PhiMarkdownInline[] | null;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
const TEXT_TOKEN_PATTERN = /%\d+|\{([A-Za-z][\w.]*)\}/g;
|
|
2
|
+
function escapeUnitText(value) {
|
|
3
|
+
return value
|
|
4
|
+
.replaceAll("&", "&")
|
|
5
|
+
.replaceAll("<", "<")
|
|
6
|
+
.replaceAll(">", ">")
|
|
7
|
+
.replaceAll('"', """);
|
|
8
|
+
}
|
|
9
|
+
const NAMED_ENTITIES = {
|
|
10
|
+
amp: "&",
|
|
11
|
+
lt: "<",
|
|
12
|
+
gt: ">",
|
|
13
|
+
quot: '"',
|
|
14
|
+
apos: "'",
|
|
15
|
+
nbsp: " ",
|
|
16
|
+
};
|
|
17
|
+
function decodeUnitText(value) {
|
|
18
|
+
return value.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/giu, (entity, body) => {
|
|
19
|
+
if (body[0] === "#") {
|
|
20
|
+
const code = body[1] === "x" || body[1] === "X" ? Number.parseInt(body.slice(2), 16) : Number(body.slice(1));
|
|
21
|
+
return Number.isFinite(code) && code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : entity;
|
|
22
|
+
}
|
|
23
|
+
return NAMED_ENTITIES[body.toLowerCase()] ?? entity;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** Builds the unit for one heading, paragraph or table cell from its inline children. */
|
|
27
|
+
export function buildMarkdownTranslationUnit(nodes, options = {}) {
|
|
28
|
+
const slots = [];
|
|
29
|
+
let html = "";
|
|
30
|
+
const token = (slot) => {
|
|
31
|
+
html += `%${slots.push(slot)}`;
|
|
32
|
+
};
|
|
33
|
+
const serializeText = (value) => {
|
|
34
|
+
let cursor = 0;
|
|
35
|
+
/*
|
|
36
|
+
* Digits right after a token would read as part of its number -- `%1` and `2 times` are `%12` --
|
|
37
|
+
* so they leave the text as a literal of their own: `%1%2 times`.
|
|
38
|
+
*/
|
|
39
|
+
const leading = /%\d+$/.test(html) ? value.match(/^\d+/)?.[0] : undefined;
|
|
40
|
+
if (leading) {
|
|
41
|
+
token({ kind: "literal", text: leading });
|
|
42
|
+
cursor = leading.length;
|
|
43
|
+
}
|
|
44
|
+
for (const match of value.slice(cursor).matchAll(TEXT_TOKEN_PATTERN)) {
|
|
45
|
+
const name = match[1];
|
|
46
|
+
if (name !== undefined && !options.sitePlaceholders)
|
|
47
|
+
continue;
|
|
48
|
+
const start = cursor + (match.index ?? 0);
|
|
49
|
+
html += escapeUnitText(value.slice(cursor, start));
|
|
50
|
+
token(name !== undefined ? { kind: "placeholder", name } : { kind: "literal", text: match[0] });
|
|
51
|
+
cursor = start + match[0].length;
|
|
52
|
+
}
|
|
53
|
+
html += escapeUnitText(value.slice(cursor));
|
|
54
|
+
};
|
|
55
|
+
const serialize = (children) => {
|
|
56
|
+
for (const node of children ?? []) {
|
|
57
|
+
switch (node.type) {
|
|
58
|
+
case "text":
|
|
59
|
+
serializeText(node.value ?? "");
|
|
60
|
+
break;
|
|
61
|
+
case "strong":
|
|
62
|
+
html += "<b>";
|
|
63
|
+
serialize(node.children);
|
|
64
|
+
html += "</b>";
|
|
65
|
+
break;
|
|
66
|
+
case "emphasis":
|
|
67
|
+
html += "<i>";
|
|
68
|
+
serialize(node.children);
|
|
69
|
+
html += "</i>";
|
|
70
|
+
break;
|
|
71
|
+
case "delete":
|
|
72
|
+
html += "<s>";
|
|
73
|
+
serialize(node.children);
|
|
74
|
+
html += "</s>";
|
|
75
|
+
break;
|
|
76
|
+
case "link":
|
|
77
|
+
// The address is numbered before the text it carries, so the numbers read in source order.
|
|
78
|
+
html += `<a href="%${slots.push({ kind: "link", href: node.url?.trim() ?? "" })}">`;
|
|
79
|
+
serialize(node.children);
|
|
80
|
+
html += "</a>";
|
|
81
|
+
break;
|
|
82
|
+
case "image": {
|
|
83
|
+
const src = node.url?.trim() ?? "";
|
|
84
|
+
if (src)
|
|
85
|
+
token({ kind: "image", src, alt: node.alt ?? "", title: node.title?.trim() ?? "" });
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
case "inlineCode":
|
|
89
|
+
token({ kind: "code", text: node.value ?? "" });
|
|
90
|
+
break;
|
|
91
|
+
case "break":
|
|
92
|
+
html += "<br>";
|
|
93
|
+
break;
|
|
94
|
+
default:
|
|
95
|
+
serialize(node.children);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
serialize(nodes);
|
|
100
|
+
return { html, slots, translatable: hasMarkdownUnitText(html) };
|
|
101
|
+
}
|
|
102
|
+
/** Whether a unit holds any text once its tags and tokens are out. */
|
|
103
|
+
function hasMarkdownUnitText(html) {
|
|
104
|
+
return decodeUnitText(html.replace(/<[^>]*>/g, "").replace(/%\d+/g, "")).trim().length > 0;
|
|
105
|
+
}
|
|
106
|
+
const UNIT_TOKEN_PATTERN = /<(\/?)([a-z][a-z0-9]*)\b([^>]*)>|%(\d+)/gi;
|
|
107
|
+
const HREF_PATTERN = /^\s+href\s*=\s*(?:"%(\d+)"|'%(\d+)'|%(\d+)(?=\s|$))\s*$/i;
|
|
108
|
+
/**
|
|
109
|
+
* Reads a unit back into inlines, by number and never by order: a provider moves tokens to wherever its
|
|
110
|
+
* language needs them. `null` for anything outside the vocabulary -- an unknown tag or attribute, a tag
|
|
111
|
+
* left open or closed out of turn, a slot missing, doubled or used as the wrong kind; the caller then
|
|
112
|
+
* shows the source.
|
|
113
|
+
*/
|
|
114
|
+
export function readMarkdownTranslationUnit(html, slots, options = {}) {
|
|
115
|
+
const stack = [{ tag: "root", children: [] }];
|
|
116
|
+
const used = new Set();
|
|
117
|
+
const take = (digits) => {
|
|
118
|
+
const number = Number(digits);
|
|
119
|
+
const slot = slots[number - 1];
|
|
120
|
+
if (!slot || used.has(number))
|
|
121
|
+
return null;
|
|
122
|
+
used.add(number);
|
|
123
|
+
return slot;
|
|
124
|
+
};
|
|
125
|
+
const appendText = (text) => {
|
|
126
|
+
if (!text)
|
|
127
|
+
return;
|
|
128
|
+
const children = stack.at(-1).children;
|
|
129
|
+
const last = children.at(-1);
|
|
130
|
+
if (last?.kind === "text")
|
|
131
|
+
last.text += text;
|
|
132
|
+
else
|
|
133
|
+
children.push({ kind: "text", text });
|
|
134
|
+
};
|
|
135
|
+
const appendRaw = (raw) => {
|
|
136
|
+
// A `<` that opened no tag the pattern knows is markup this vocabulary does not have.
|
|
137
|
+
if (/<[a-z/!?]/i.test(raw))
|
|
138
|
+
return false;
|
|
139
|
+
appendText(decodeUnitText(raw));
|
|
140
|
+
return true;
|
|
141
|
+
};
|
|
142
|
+
let cursor = 0;
|
|
143
|
+
for (const match of html.matchAll(UNIT_TOKEN_PATTERN)) {
|
|
144
|
+
if (!appendRaw(html.slice(cursor, match.index)))
|
|
145
|
+
return null;
|
|
146
|
+
cursor = (match.index ?? 0) + match[0].length;
|
|
147
|
+
const [, closing, rawTag, attributes, digits] = match;
|
|
148
|
+
if (digits !== undefined) {
|
|
149
|
+
const slot = take(digits);
|
|
150
|
+
if (!slot || slot.kind === "link")
|
|
151
|
+
return null;
|
|
152
|
+
const children = stack.at(-1).children;
|
|
153
|
+
if (slot.kind === "code")
|
|
154
|
+
children.push({ kind: "inline_code", text: slot.text });
|
|
155
|
+
else if (slot.kind === "image") {
|
|
156
|
+
children.push({ kind: "image", src: slot.src, alt: slot.alt, ...(slot.title ? { title: slot.title } : {}) });
|
|
157
|
+
}
|
|
158
|
+
else if (slot.kind === "literal")
|
|
159
|
+
appendText(slot.text);
|
|
160
|
+
else
|
|
161
|
+
appendText(options.resolvePlaceholder?.(slot.name) ?? `{${slot.name}}`);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const tag = rawTag.toLowerCase();
|
|
165
|
+
if (tag === "br") {
|
|
166
|
+
if (closing || !/^\s*\/?\s*$/.test(attributes ?? ""))
|
|
167
|
+
return null;
|
|
168
|
+
stack.at(-1).children.push({ kind: "break" });
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (tag !== "b" && tag !== "i" && tag !== "s" && tag !== "a")
|
|
172
|
+
return null;
|
|
173
|
+
if (closing) {
|
|
174
|
+
const frame = stack.pop();
|
|
175
|
+
const parent = stack.at(-1);
|
|
176
|
+
if (!frame || !parent || frame.tag !== tag || (attributes ?? "").trim())
|
|
177
|
+
return null;
|
|
178
|
+
if (frame.tag === "a") {
|
|
179
|
+
parent.children.push({
|
|
180
|
+
kind: "link",
|
|
181
|
+
href: frame.href,
|
|
182
|
+
external: /^https?:\/\//.test(frame.href),
|
|
183
|
+
children: frame.children,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
parent.children.push({
|
|
188
|
+
kind: frame.tag === "b" ? "strong" : frame.tag === "i" ? "emphasis" : "delete",
|
|
189
|
+
children: frame.children,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (tag === "a") {
|
|
195
|
+
const href = (attributes ?? "").match(HREF_PATTERN);
|
|
196
|
+
const slot = href ? take(href[1] ?? href[2] ?? href[3]) : null;
|
|
197
|
+
if (slot?.kind !== "link")
|
|
198
|
+
return null;
|
|
199
|
+
stack.push({ tag, href: slot.href, children: [] });
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if ((attributes ?? "").trim())
|
|
203
|
+
return null;
|
|
204
|
+
stack.push({ tag, children: [] });
|
|
205
|
+
}
|
|
206
|
+
if (!appendRaw(html.slice(cursor)))
|
|
207
|
+
return null;
|
|
208
|
+
if (stack.length !== 1 || used.size !== slots.length)
|
|
209
|
+
return null;
|
|
210
|
+
return stack[0].children;
|
|
211
|
+
}
|
|
@@ -70,6 +70,7 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
|
|
|
70
70
|
"form-handler/app-profile-theme": ["app", "profile-theme"],
|
|
71
71
|
"form-handler/asset-folder-create": ["asset", "folder-create"],
|
|
72
72
|
"form-handler/asset-media-settings": ["asset", "media-settings"],
|
|
73
|
+
"form-handler/asset-media-storage-settings": ["asset", "media-storage-settings"],
|
|
73
74
|
"form-handler/asset-metadata": ["asset", "metadata"],
|
|
74
75
|
"form-handler/auth-admin-installation-create": ["auth", "admin-installation-create"],
|
|
75
76
|
"form-handler/auth-admin-installation-update": ["auth", "admin-installation-update"],
|
|
@@ -123,6 +124,7 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
|
|
|
123
124
|
"forms/app/profile-theme": ["app", "profile-theme"],
|
|
124
125
|
"forms/asset/folder-create": ["asset", "folder-create"],
|
|
125
126
|
"forms/asset/media-settings": ["asset", "media-settings"],
|
|
127
|
+
"forms/asset/media-storage-settings": ["asset", "media-storage-settings"],
|
|
126
128
|
"forms/asset/metadata": ["asset", "metadata"],
|
|
127
129
|
"forms/auth/admin-installation-create": ["auth", "admin-installation-create"],
|
|
128
130
|
"forms/auth/admin-installation-edit": ["auth", "admin-installation-edit"],
|
|
@@ -184,6 +186,8 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
|
|
|
184
186
|
"options/localization-locales": ["localization", "locales"],
|
|
185
187
|
"options/media-folders": ["asset", "media-folders"],
|
|
186
188
|
"options/media-folder-choices": ["asset", "media-folder-choices"],
|
|
189
|
+
"options/media-storage-profiles": ["asset", "media-storage-profiles"],
|
|
190
|
+
"tables/media-storage-spaces": ["asset", "media-storage-spaces"],
|
|
187
191
|
"options/my-groups": ["groups", "my-groups"],
|
|
188
192
|
"options/revision-bindings": ["revisions", "revision-bindings"],
|
|
189
193
|
"options/runtime-modules": ["builder", "runtime-modules"],
|
|
@@ -32,6 +32,11 @@ export declare function resolveSiteInternalReferences(input: {
|
|
|
32
32
|
siteKey: string;
|
|
33
33
|
/** Required only for Page references. Assets are Site scoped and carry no Area. */
|
|
34
34
|
area?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The render is a preview the server already authorized (`hasPhiCmsAuthorizedPreviewRead`). Without it a
|
|
37
|
+
* Page that was never published resolves to no path, because the Public render would answer 404 for it.
|
|
38
|
+
*/
|
|
39
|
+
preview?: boolean;
|
|
35
40
|
references?: readonly PhiPageReference[];
|
|
36
41
|
assetIds?: readonly number[];
|
|
37
42
|
}): Promise<PhiResolvedInternalReferences>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "server-only";
|
|
2
2
|
import { buildApiHeaders, buildApiUrl } from "../helpers/site-api";
|
|
3
3
|
import { PhiMediaKind } from "../constants/media";
|
|
4
|
-
import {
|
|
4
|
+
import { readPhiMediaFocalRectField, readPhiMediaFontField } from "../components/media/media-asset-typed-fields";
|
|
5
5
|
import { createPhiResponseReader, requirePhiField } from "../components/widgets/config/strict-config-reader";
|
|
6
6
|
import { readPhiPageReference } from "../types/references";
|
|
7
7
|
import { throwPhiCmsGatewayError } from "./errors";
|
|
@@ -48,14 +48,8 @@ export function readPhiPublicMediaAssetReference(entry) {
|
|
|
48
48
|
altText: nullableText("altText"),
|
|
49
49
|
thumbnailUrl: nullableText("thumbnailUrl"),
|
|
50
50
|
previewUrl: nullableText("previewUrl"),
|
|
51
|
-
focalRect: reader
|
|
52
|
-
|
|
53
|
-
const value = requirePhiField(rect, key, "a number from 0 to 1", rect.number);
|
|
54
|
-
return value >= 0 && value <= 1 ? value : rect.fail(key, "a number from 0 to 1");
|
|
55
|
-
};
|
|
56
|
-
return { x: fraction("x"), y: fraction("y"), width: fraction("width"), height: fraction("height") };
|
|
57
|
-
}) ?? null,
|
|
58
|
-
font: reader.object("font", readPhiFontMetricsFields) ?? null,
|
|
51
|
+
focalRect: readPhiMediaFocalRectField(reader),
|
|
52
|
+
font: readPhiMediaFontField(reader),
|
|
59
53
|
};
|
|
60
54
|
}
|
|
61
55
|
/** What the server takes per list in one request (`MAX_REFERENCES_PER_REQUEST`). */
|
|
@@ -71,7 +65,7 @@ const PHI_REFERENCES_PER_REQUEST = 256;
|
|
|
71
65
|
*/
|
|
72
66
|
const pendingBatches = new Map();
|
|
73
67
|
function batchKey(input) {
|
|
74
|
-
return JSON.stringify([input.apiBaseUrl, input.internalToken, input.siteKey, input.area ?? ""]);
|
|
68
|
+
return JSON.stringify([input.apiBaseUrl, input.internalToken, input.siteKey, input.area ?? "", input.preview === true]);
|
|
75
69
|
}
|
|
76
70
|
async function requestSiteInternalReferences(input, references, assetIds) {
|
|
77
71
|
const response = await fetch(buildApiUrl(input.apiBaseUrl, "/api/v1/site/references"), {
|
|
@@ -85,7 +79,12 @@ async function requestSiteInternalReferences(input, references, assetIds) {
|
|
|
85
79
|
jsonBody: true,
|
|
86
80
|
}),
|
|
87
81
|
cache: "no-store",
|
|
88
|
-
body: JSON.stringify({
|
|
82
|
+
body: JSON.stringify({
|
|
83
|
+
...(input.area ? { area: input.area } : {}),
|
|
84
|
+
...(input.preview ? { preview: true } : {}),
|
|
85
|
+
references,
|
|
86
|
+
assets: assetIds,
|
|
87
|
+
}),
|
|
89
88
|
});
|
|
90
89
|
if (!response.ok) {
|
|
91
90
|
throwPhiCmsGatewayError(`Failed to resolve internal references (${response.status}).`, response.status);
|
|
@@ -136,6 +135,7 @@ export async function resolveSiteInternalReferences(input) {
|
|
|
136
135
|
internalToken: input.internalToken,
|
|
137
136
|
siteKey: input.siteKey,
|
|
138
137
|
...(input.area ? { area: input.area } : {}),
|
|
138
|
+
...(input.preview ? { preview: true } : {}),
|
|
139
139
|
};
|
|
140
140
|
if (!keepsReferences()) {
|
|
141
141
|
return requestThroughBatch(request, references, assetIds);
|
|
@@ -202,7 +202,7 @@ function keepsReferences() {
|
|
|
202
202
|
}
|
|
203
203
|
// A Page reference resolves within its Area; an Asset is Site scoped and carries none.
|
|
204
204
|
function pageCacheKey(request, reference) {
|
|
205
|
-
return `references:${request.siteKey.trim().toLowerCase()}:page:${request.area ?? ""}:${reference}`;
|
|
205
|
+
return `references:${request.siteKey.trim().toLowerCase()}:page:${request.area ?? ""}:${request.preview ? "preview" : "live"}:${reference}`;
|
|
206
206
|
}
|
|
207
207
|
function assetCacheKey(request, id) {
|
|
208
208
|
return `references:${request.siteKey.trim().toLowerCase()}:asset:${id}`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "server-only";
|
|
2
|
+
import { type PhiSiteMediaStorageSettings } from "./site-media-storage-reader";
|
|
2
3
|
type PhiSiteMediaSettings = {
|
|
3
4
|
userSpacesEnabled: boolean;
|
|
4
5
|
groupSpacesEnabled: boolean;
|
|
@@ -21,6 +22,7 @@ type PhiSiteAddonMediaSpace = {
|
|
|
21
22
|
};
|
|
22
23
|
type PhiSiteMediaSettingsResult = PhiSiteMediaSettings & {
|
|
23
24
|
addonSpaces: readonly PhiSiteAddonMediaSpace[];
|
|
25
|
+
storage: PhiSiteMediaStorageSettings;
|
|
24
26
|
};
|
|
25
27
|
type GetResolvedSiteMediaSettingsOptions = {
|
|
26
28
|
apiBaseUrl: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { definePhiRequestMemo } from "../server-helpers/request-memo";
|
|
2
2
|
import "server-only";
|
|
3
3
|
import { fetchPhiSiteApi } from "./site-api-request";
|
|
4
|
+
import { readPhiSiteMediaStorageSettings } from "./site-media-storage-reader";
|
|
4
5
|
export const getResolvedSiteMediaSettings = definePhiRequestMemo(async function getResolvedSiteMediaSettings({ apiBaseUrl, internalToken, siteKey, }) {
|
|
5
6
|
const payload = await fetchPhiSiteApi({
|
|
6
7
|
context: "getResolvedSiteMediaSettings",
|
|
@@ -14,5 +15,9 @@ export const getResolvedSiteMediaSettings = definePhiRequestMemo(async function
|
|
|
14
15
|
throw new Error("Missing site media settings payload.");
|
|
15
16
|
}
|
|
16
17
|
// A Site with no Add-on holding files reports none, which is an answer and not a missing field.
|
|
17
|
-
return {
|
|
18
|
+
return {
|
|
19
|
+
...payload.media,
|
|
20
|
+
addonSpaces: payload.addonSpaces ?? [],
|
|
21
|
+
storage: readPhiSiteMediaStorageSettings(payload.storage, "The site media storage settings"),
|
|
22
|
+
};
|
|
18
23
|
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Where the Site's Spaces write, among the Storage Profiles the operator created. */
|
|
2
|
+
export type PhiSiteMediaStorageSettings = {
|
|
3
|
+
profiles: readonly {
|
|
4
|
+
id: number;
|
|
5
|
+
key: string;
|
|
6
|
+
providerId: string;
|
|
7
|
+
local: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
spaces: number;
|
|
10
|
+
}[];
|
|
11
|
+
siteSpaceProfileId: number;
|
|
12
|
+
/** `null` is the Site's Local Profile. */
|
|
13
|
+
defaultUserProfileId: number | null;
|
|
14
|
+
defaultGroupProfileId: number | null;
|
|
15
|
+
/** Empty offers every Profile. */
|
|
16
|
+
allowedProfileIds: readonly number[];
|
|
17
|
+
};
|
|
18
|
+
/** Read, not cast: every field of the storage settings, or a throw naming the one that is wrong. */
|
|
19
|
+
export declare function readPhiSiteMediaStorageSettings(value: unknown, source: string): PhiSiteMediaStorageSettings;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createPhiResponseReader, requirePhiField } from "../components/widgets/config/strict-config-reader";
|
|
2
|
+
/** Read, not cast: every field of the storage settings, or a throw naming the one that is wrong. */
|
|
3
|
+
export function readPhiSiteMediaStorageSettings(value, source) {
|
|
4
|
+
const reader = createPhiResponseReader(value, source);
|
|
5
|
+
const id = (key) => requirePhiField(reader, key, "a Storage Profile id", reader.integer);
|
|
6
|
+
const nullableId = (key) => (reader.record[key] === null ? null : id(key));
|
|
7
|
+
const ids = (key) => requirePhiField(reader, key, "a list of Storage Profile ids", (field) => reader.value(field, "a list of Storage Profile ids", (value) => Array.isArray(value) && value.every((entry) => Number.isSafeInteger(entry) && entry > 0)
|
|
8
|
+
? value
|
|
9
|
+
: undefined));
|
|
10
|
+
return {
|
|
11
|
+
profiles: requirePhiField(reader, "profiles", "the Storage Profiles", (key) => reader.list(key, (profile) => ({
|
|
12
|
+
id: requirePhiField(profile, "id", "an id", profile.integer),
|
|
13
|
+
key: requirePhiField(profile, "key", "a key", profile.string),
|
|
14
|
+
providerId: requirePhiField(profile, "providerId", "a provider id", profile.string),
|
|
15
|
+
local: requirePhiField(profile, "local", "true or false", profile.boolean),
|
|
16
|
+
disabled: requirePhiField(profile, "disabled", "true or false", profile.boolean),
|
|
17
|
+
spaces: requirePhiField(profile, "spaces", "a count", profile.integer),
|
|
18
|
+
}))),
|
|
19
|
+
siteSpaceProfileId: id("siteSpaceProfileId"),
|
|
20
|
+
defaultUserProfileId: nullableId("defaultUserProfileId"),
|
|
21
|
+
defaultGroupProfileId: nullableId("defaultGroupProfileId"),
|
|
22
|
+
allowedProfileIds: ids("allowedProfileIds"),
|
|
23
|
+
};
|
|
24
|
+
}
|