@paroicms/internal-anywhere-lib 1.17.1 → 1.18.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.
@@ -1,2 +1,2 @@
1
- import type { ListSchema } from "@paroicms/public-anywhere-lib";
2
- export declare function sortParts(listType: ListSchema, list: any[]): void;
1
+ import type { ScListType } from "@paroicms/public-anywhere-lib";
2
+ export declare function sortParts(listType: ScListType, list: any[]): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sortParts = void 0;
3
+ exports.sortParts = sortParts;
4
4
  const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
5
  function sortParts(listType, list) {
6
6
  if (listType.orderBy === "manual") {
@@ -41,7 +41,6 @@ function sortParts(listType, list) {
41
41
  });
42
42
  }
43
43
  }
44
- exports.sortParts = sortParts;
45
44
  function includesOrderBy(orderBy, valueToCheck) {
46
45
  return orderBy.some((item) => item[0] === valueToCheck[0] && item[1] === valueToCheck[1]);
47
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"parts.helper.js","sourceRoot":"","sources":["../src/parts.helper.ts"],"names":[],"mappings":";;;AAAA,oEAAmD;AAGnD,SAAgB,SAAS,CAAC,QAAoB,EAAE,IAAW;IACzD,IAAI,QAAQ,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACjB,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;gBAAE,OAAO,CAAC,CAAC;YACxC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS;gBAAE,OAAO,CAAC,CAAC,CAAC;YACxC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS;gBAAE,OAAO,CAAC,CAAC;YACvC,OAAO,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;QACjC,CAAC,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;IAEtC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5F,CAAC"}
@@ -1,19 +1,14 @@
1
- import type { ClassicDocumentSchema, DocumentSchema, FTextFieldType, FieldType, LeafSchema, PartSchema, RoutingPointDocumentSchema, SiteSchema } from "@paroicms/public-anywhere-lib";
2
- export declare function getDocumentTypeByLeafType(siteSchema: SiteSchema, leafType: string): DocumentSchema;
3
- export declare function getPartTypeByLeafType(siteSchema: SiteSchema, leafType: string): PartSchema;
4
- export declare function getRoutingPointDocumentTypes(siteSchema: SiteSchema): RoutingPointDocumentSchema[];
5
- export declare function getClassicDocumentTypes(siteSchema: SiteSchema): ClassicDocumentSchema[];
6
- export declare function classicChildDocumentTypesOf(siteSchema: SiteSchema, parentLeafType: string): ClassicDocumentSchema[];
1
+ import type { ScDocumentType, ScFTextFieldType, ScFieldType, ScLeafType, ScPartType, ScRegularDocumentType, ScRoutingPointDocumentType, ScSiteSchema } from "@paroicms/public-anywhere-lib";
2
+ export declare function getLeafTypeByName(siteSchema: ScSiteSchema, typeName: string): ScLeafType;
3
+ export declare function getDocumentTypeByName(siteSchema: ScSiteSchema, typeName: string): ScDocumentType;
4
+ export declare function getPartTypeByName(siteSchema: ScSiteSchema, typeName: string): ScPartType;
5
+ export declare function getRoutingPointDocumentTypes(siteSchema: ScSiteSchema): ScRoutingPointDocumentType[];
6
+ export declare function regularChildDocumentTypesOf(siteSchema: ScSiteSchema, parentTypeName: string): ScRegularDocumentType[];
7
7
  export declare function getDocumentTypeByBoDirName({ boDirName, siteSchema, }: {
8
8
  boDirName: string;
9
- siteSchema: SiteSchema;
10
- }): DocumentSchema | undefined;
11
- export declare function getParentDocumentTypeOf({ leafType, siteSchema, }: {
12
- leafType: string;
13
- siteSchema: SiteSchema;
14
- }): DocumentSchema;
15
- export declare function getLeafSchema(siteSchema: SiteSchema, leafType: string): LeafSchema;
16
- export declare function getMediaLimitPerDocument(siteSchema: SiteSchema, documentType: DocumentSchema): number | undefined;
17
- export declare function getMediaLimitPerPart(siteSchema: SiteSchema, partType: PartSchema): number | undefined;
18
- export declare function isFTextFieldType(fieldType: FieldType): fieldType is FTextFieldType;
19
- export declare function documentTypeHasData(documentType: DocumentSchema): boolean;
9
+ siteSchema: ScSiteSchema;
10
+ }): ScDocumentType | undefined;
11
+ export declare function getMediaLimitPerDocument(siteSchema: ScSiteSchema, documentType: ScDocumentType): number | undefined;
12
+ export declare function getMediaLimitPerPart(siteSchema: ScSiteSchema, partType: ScPartType): number | undefined;
13
+ export declare function isFTextFieldType(fieldType: ScFieldType): fieldType is ScFTextFieldType;
14
+ export declare function documentTypeHasData(documentType: ScDocumentType): boolean;
@@ -1,61 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.documentTypeHasData = exports.isFTextFieldType = exports.getMediaLimitPerPart = exports.getMediaLimitPerDocument = exports.getLeafSchema = exports.getParentDocumentTypeOf = exports.getDocumentTypeByBoDirName = exports.classicChildDocumentTypesOf = exports.getClassicDocumentTypes = exports.getRoutingPointDocumentTypes = exports.getPartTypeByLeafType = exports.getDocumentTypeByLeafType = void 0;
4
- function getDocumentTypeByLeafType(siteSchema, leafType) {
5
- const documentType = siteSchema.documentTypes[leafType];
6
- if (!documentType)
7
- throw new Error(`Unknown documentType for leafType '${leafType}'`);
8
- return documentType;
9
- }
10
- exports.getDocumentTypeByLeafType = getDocumentTypeByLeafType;
11
- function getPartTypeByLeafType(siteSchema, leafType) {
12
- const partType = siteSchema.partTypes[leafType];
13
- if (!partType)
14
- throw new Error(`Unknown partType for leafType '${leafType}'`);
15
- return partType;
16
- }
17
- exports.getPartTypeByLeafType = getPartTypeByLeafType;
18
- function getRoutingPointDocumentTypes(siteSchema) {
19
- return Object.values(siteSchema.documentTypes).filter((item) => item.kind === "routingPoint");
20
- }
3
+ exports.getLeafTypeByName = getLeafTypeByName;
4
+ exports.getDocumentTypeByName = getDocumentTypeByName;
5
+ exports.getPartTypeByName = getPartTypeByName;
21
6
  exports.getRoutingPointDocumentTypes = getRoutingPointDocumentTypes;
22
- function getClassicDocumentTypes(siteSchema) {
23
- return Object.values(siteSchema.documentTypes).filter((item) => item.kind === "classic");
7
+ exports.regularChildDocumentTypesOf = regularChildDocumentTypesOf;
8
+ exports.getDocumentTypeByBoDirName = getDocumentTypeByBoDirName;
9
+ exports.getMediaLimitPerDocument = getMediaLimitPerDocument;
10
+ exports.getMediaLimitPerPart = getMediaLimitPerPart;
11
+ exports.isFTextFieldType = isFTextFieldType;
12
+ exports.documentTypeHasData = documentTypeHasData;
13
+ function getLeafTypeByName(siteSchema, typeName) {
14
+ const leafType = siteSchema.leafTypes[typeName];
15
+ if (!leafType)
16
+ throw new Error(`unknown leaf type '${typeName}'`);
17
+ return leafType;
24
18
  }
25
- exports.getClassicDocumentTypes = getClassicDocumentTypes;
26
- function classicChildDocumentTypesOf(siteSchema, parentLeafType) {
27
- const found = [];
28
- const parent = getDocumentTypeByLeafType(siteSchema, parentLeafType);
29
- for (const child of parent.children ?? []) {
30
- const documentType = getDocumentTypeByLeafType(siteSchema, child);
31
- if (documentType.kind !== "routingPoint") {
32
- found.push(documentType);
33
- }
19
+ function getDocumentTypeByName(siteSchema, typeName) {
20
+ const leafType = siteSchema.leafTypes[typeName];
21
+ if (!leafType || leafType.kind !== "document") {
22
+ throw new Error(`Unknown document type '${typeName}'`);
34
23
  }
35
- return found;
24
+ return leafType;
36
25
  }
37
- exports.classicChildDocumentTypesOf = classicChildDocumentTypesOf;
38
- function getDocumentTypeByBoDirName({ boDirName, siteSchema, }) {
39
- const found = Object.values(siteSchema.documentTypes).find((item) => item.boDirName === boDirName);
40
- return found;
26
+ function getPartTypeByName(siteSchema, typeName) {
27
+ const leafType = siteSchema.leafTypes[typeName];
28
+ if (!leafType || leafType.kind !== "part") {
29
+ throw new Error(`Unknown part type '${typeName}'`);
30
+ }
31
+ return leafType;
41
32
  }
42
- exports.getDocumentTypeByBoDirName = getDocumentTypeByBoDirName;
43
- function getParentDocumentTypeOf({ leafType, siteSchema, }) {
44
- const foundDocumentType = Object.values(siteSchema.documentTypes).find((item) => item.children?.includes(leafType));
45
- if (!foundDocumentType)
46
- throw new Error(`Unknown parent documentType of leafType:'${leafType}'`);
47
- return foundDocumentType;
33
+ function getRoutingPointDocumentTypes(siteSchema) {
34
+ return Object.values(siteSchema.leafTypes).filter((item) => item.kind === "document" && item.isRoutingPoint);
48
35
  }
49
- exports.getParentDocumentTypeOf = getParentDocumentTypeOf;
50
- function getLeafSchema(siteSchema, leafType) {
51
- if (leafType === siteSchema.site.leafType)
52
- return siteSchema.site;
53
- const type = siteSchema.documentTypes[leafType] ?? siteSchema.partTypes[leafType];
54
- if (!type)
55
- throw new Error(`unknown leaf-type '${leafType}'`);
56
- return type;
36
+ function regularChildDocumentTypesOf(siteSchema, parentTypeName) {
37
+ return (getDocumentTypeByName(siteSchema, parentTypeName)
38
+ .children?.map((typeName) => getDocumentTypeByName(siteSchema, typeName))
39
+ .filter((leafType) => !leafType.isRoutingPoint) ?? []);
40
+ }
41
+ function getDocumentTypeByBoDirName({ boDirName, siteSchema, }) {
42
+ return Object.values(siteSchema.leafTypes).find((item) => item.kind === "document" && item.boDirName === boDirName);
57
43
  }
58
- exports.getLeafSchema = getLeafSchema;
59
44
  function getMediaLimitPerDocument(siteSchema, documentType) {
60
45
  const policyName = documentType.mediaPolicy;
61
46
  if (policyName) {
@@ -65,7 +50,6 @@ function getMediaLimitPerDocument(siteSchema, documentType) {
65
50
  }
66
51
  return siteSchema.mediaPolicies.default.mediaLimitPerDocument;
67
52
  }
68
- exports.getMediaLimitPerDocument = getMediaLimitPerDocument;
69
53
  function getMediaLimitPerPart(siteSchema, partType) {
70
54
  const policyName = partType.mediaPolicy;
71
55
  if (policyName) {
@@ -75,13 +59,10 @@ function getMediaLimitPerPart(siteSchema, partType) {
75
59
  }
76
60
  return siteSchema.mediaPolicies.default.mediaLimitPerPart;
77
61
  }
78
- exports.getMediaLimitPerPart = getMediaLimitPerPart;
79
62
  function isFTextFieldType(fieldType) {
80
63
  return fieldType.dataType === "quillDelta" || fieldType.dataType === "html";
81
64
  }
82
- exports.isFTextFieldType = isFTextFieldType;
83
65
  function documentTypeHasData(documentType) {
84
- return documentType.kind !== "routingPoint" || !documentType.redirectTo;
66
+ return !documentType.isRoutingPoint || !documentType.redirectTo;
85
67
  }
86
- exports.documentTypeHasData = documentTypeHasData;
87
68
  //# sourceMappingURL=site-schema-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"site-schema-helpers.js","sourceRoot":"","sources":["../src/site-schema-helpers.ts"],"names":[],"mappings":";;;AAWA,SAAgB,yBAAyB,CAAC,UAAsB,EAAE,QAAgB;IAChF,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxD,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,GAAG,CAAC,CAAC;IACtF,OAAO,YAAY,CAAC;AACtB,CAAC;AAJD,8DAIC;AAED,SAAgB,qBAAqB,CAAC,UAAsB,EAAE,QAAgB;IAC5E,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,QAAQ,GAAG,CAAC,CAAC;IAC9E,OAAO,QAAQ,CAAC;AAClB,CAAC;AAJD,sDAIC;AAED,SAAgB,4BAA4B,CAAC,UAAsB;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,MAAM,CACnD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CACP,CAAC;AACpC,CAAC;AAJD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CAAC;AAChE,CAAC;AAED,SAAgB,oBAAoB,CAClC,UAAwB,EACxB,QAAoB;IAEpB,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC;IACxC,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAAC;QACnE,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC;IACpC,CAAC;IACD,OAAO,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC;AAC5D,CAAC;AAED,SAAgB,gBAAgB,CAAC,SAAsB;IACrD,OAAO,SAAS,CAAC,QAAQ,KAAK,YAAY,IAAI,SAAS,CAAC,QAAQ,KAAK,MAAM,CAAC;AAC9E,CAAC;AAED,SAAgB,mBAAmB,CAAC,YAA4B;IAC9D,OAAO,CAAC,YAAY,CAAC,cAAc,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;AAClE,CAAC"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseTimeWithUnit = exports.isSameTimeUnit = void 0;
3
+ exports.isSameTimeUnit = isSameTimeUnit;
4
+ exports.parseTimeWithUnit = parseTimeWithUnit;
4
5
  function isSameTimeUnit(dt, timeUnit) {
5
6
  const nowDay = new Date().toISOString().substring(0, 10);
6
7
  const dtDay = dt.toISOString().substring(0, 10);
7
8
  return nowDay === dtDay;
8
9
  }
9
- exports.isSameTimeUnit = isSameTimeUnit;
10
10
  function parseTimeWithUnit(timeToIdle) {
11
11
  if (!timeToIdle.endsWith("d"))
12
12
  throw new Error(`invalid timeToIdle: '${timeToIdle}'`);
@@ -15,5 +15,4 @@ function parseTimeWithUnit(timeToIdle) {
15
15
  delay: Number(timeToIdle.slice(0, -1)),
16
16
  };
17
17
  }
18
- exports.parseTimeWithUnit = parseTimeWithUnit;
19
18
  //# sourceMappingURL=time-with-unit.helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time-with-unit.helpers.js","sourceRoot":"","sources":["../src/time-with-unit.helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,EAAQ,EAAE,QAAe;IACtD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,MAAM,KAAK,KAAK,CAAC;AAC1B,CAAC;AAJD,wCAIC;AAOD,SAAgB,iBAAiB,CAAC,UAAkB;IAClD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,UAAU,GAAG,CAAC,CAAC;IACtF,OAAO;QACL,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvC,CAAC;AACJ,CAAC;AAND,8CAMC"}
1
+ {"version":3,"file":"time-with-unit.helpers.js","sourceRoot":"","sources":["../src/time-with-unit.helpers.ts"],"names":[],"mappings":";;AAAA,wCAIC;AAOD,8CAMC;AAjBD,SAAgB,cAAc,CAAC,EAAQ,EAAE,QAAe;IACtD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,MAAM,KAAK,KAAK,CAAC;AAC1B,CAAC;AAOD,SAAgB,iBAAiB,CAAC,UAAkB;IAClD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,UAAU,GAAG,CAAC,CAAC;IACtF,OAAO;QACL,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvC,CAAC;AACJ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateSlug = void 0;
3
+ exports.generateSlug = generateSlug;
4
4
  function generateSlug(str) {
5
5
  return (str
6
6
  .trim()
@@ -13,5 +13,4 @@ function generateSlug(str) {
13
13
  .replace(/^-+/, "")
14
14
  .toLowerCase());
15
15
  }
16
- exports.generateSlug = generateSlug;
17
16
  //# sourceMappingURL=url-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"url-helpers.js","sourceRoot":"","sources":["../src/url-helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,CACL,GAAG;SACA,IAAI,EAAE;SACN,SAAS,CAAC,KAAK,CAAC;QACjB,oEAAoE;SACnE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,oBAAoB;SACpD,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC;SAC7B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,WAAW,EAAE,CACjB,CAAC;AACJ,CAAC;AAbD,oCAaC"}
1
+ {"version":3,"file":"url-helpers.js","sourceRoot":"","sources":["../src/url-helpers.ts"],"names":[],"mappings":";;AAAA,oCAaC;AAbD,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,CACL,GAAG;SACA,IAAI,EAAE;SACN,SAAS,CAAC,KAAK,CAAC;QACjB,oEAAoE;SACnE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,oBAAoB;SACpD,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC;SAC7B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,WAAW,EAAE,CACjB,CAAC;AACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- import type { ListSchema } from "@paroicms/public-anywhere-lib";
2
- export declare function sortParts(listType: ListSchema, list: any[]): void;
1
+ import type { ScListType } from "@paroicms/public-anywhere-lib";
2
+ export declare function sortParts(listType: ScListType, list: any[]): void;
@@ -1,19 +1,14 @@
1
- import type { ClassicDocumentSchema, DocumentSchema, FTextFieldType, FieldType, LeafSchema, PartSchema, RoutingPointDocumentSchema, SiteSchema } from "@paroicms/public-anywhere-lib";
2
- export declare function getDocumentTypeByLeafType(siteSchema: SiteSchema, leafType: string): DocumentSchema;
3
- export declare function getPartTypeByLeafType(siteSchema: SiteSchema, leafType: string): PartSchema;
4
- export declare function getRoutingPointDocumentTypes(siteSchema: SiteSchema): RoutingPointDocumentSchema[];
5
- export declare function getClassicDocumentTypes(siteSchema: SiteSchema): ClassicDocumentSchema[];
6
- export declare function classicChildDocumentTypesOf(siteSchema: SiteSchema, parentLeafType: string): ClassicDocumentSchema[];
1
+ import type { ScDocumentType, ScFTextFieldType, ScFieldType, ScLeafType, ScPartType, ScRegularDocumentType, ScRoutingPointDocumentType, ScSiteSchema } from "@paroicms/public-anywhere-lib";
2
+ export declare function getLeafTypeByName(siteSchema: ScSiteSchema, typeName: string): ScLeafType;
3
+ export declare function getDocumentTypeByName(siteSchema: ScSiteSchema, typeName: string): ScDocumentType;
4
+ export declare function getPartTypeByName(siteSchema: ScSiteSchema, typeName: string): ScPartType;
5
+ export declare function getRoutingPointDocumentTypes(siteSchema: ScSiteSchema): ScRoutingPointDocumentType[];
6
+ export declare function regularChildDocumentTypesOf(siteSchema: ScSiteSchema, parentTypeName: string): ScRegularDocumentType[];
7
7
  export declare function getDocumentTypeByBoDirName({ boDirName, siteSchema, }: {
8
8
  boDirName: string;
9
- siteSchema: SiteSchema;
10
- }): DocumentSchema | undefined;
11
- export declare function getParentDocumentTypeOf({ leafType, siteSchema, }: {
12
- leafType: string;
13
- siteSchema: SiteSchema;
14
- }): DocumentSchema;
15
- export declare function getLeafSchema(siteSchema: SiteSchema, leafType: string): LeafSchema;
16
- export declare function getMediaLimitPerDocument(siteSchema: SiteSchema, documentType: DocumentSchema): number | undefined;
17
- export declare function getMediaLimitPerPart(siteSchema: SiteSchema, partType: PartSchema): number | undefined;
18
- export declare function isFTextFieldType(fieldType: FieldType): fieldType is FTextFieldType;
19
- export declare function documentTypeHasData(documentType: DocumentSchema): boolean;
9
+ siteSchema: ScSiteSchema;
10
+ }): ScDocumentType | undefined;
11
+ export declare function getMediaLimitPerDocument(siteSchema: ScSiteSchema, documentType: ScDocumentType): number | undefined;
12
+ export declare function getMediaLimitPerPart(siteSchema: ScSiteSchema, partType: ScPartType): number | undefined;
13
+ export declare function isFTextFieldType(fieldType: ScFieldType): fieldType is ScFTextFieldType;
14
+ export declare function documentTypeHasData(documentType: ScDocumentType): boolean;
@@ -1,49 +1,33 @@
1
- export function getDocumentTypeByLeafType(siteSchema, leafType) {
2
- const documentType = siteSchema.documentTypes[leafType];
3
- if (!documentType)
4
- throw new Error(`Unknown documentType for leafType '${leafType}'`);
5
- return documentType;
1
+ export function getLeafTypeByName(siteSchema, typeName) {
2
+ const leafType = siteSchema.leafTypes[typeName];
3
+ if (!leafType)
4
+ throw new Error(`unknown leaf type '${typeName}'`);
5
+ return leafType;
6
+ }
7
+ export function getDocumentTypeByName(siteSchema, typeName) {
8
+ const leafType = siteSchema.leafTypes[typeName];
9
+ if (!leafType || leafType.kind !== "document") {
10
+ throw new Error(`Unknown document type '${typeName}'`);
11
+ }
12
+ return leafType;
6
13
  }
7
- export function getPartTypeByLeafType(siteSchema, leafType) {
8
- const partType = siteSchema.partTypes[leafType];
9
- if (!partType)
10
- throw new Error(`Unknown partType for leafType '${leafType}'`);
11
- return partType;
14
+ export function getPartTypeByName(siteSchema, typeName) {
15
+ const leafType = siteSchema.leafTypes[typeName];
16
+ if (!leafType || leafType.kind !== "part") {
17
+ throw new Error(`Unknown part type '${typeName}'`);
18
+ }
19
+ return leafType;
12
20
  }
13
21
  export function getRoutingPointDocumentTypes(siteSchema) {
14
- return Object.values(siteSchema.documentTypes).filter((item) => item.kind === "routingPoint");
15
- }
16
- export function getClassicDocumentTypes(siteSchema) {
17
- return Object.values(siteSchema.documentTypes).filter((item) => item.kind === "classic");
22
+ return Object.values(siteSchema.leafTypes).filter((item) => item.kind === "document" && item.isRoutingPoint);
18
23
  }
19
- export function classicChildDocumentTypesOf(siteSchema, parentLeafType) {
20
- const found = [];
21
- const parent = getDocumentTypeByLeafType(siteSchema, parentLeafType);
22
- for (const child of parent.children ?? []) {
23
- const documentType = getDocumentTypeByLeafType(siteSchema, child);
24
- if (documentType.kind !== "routingPoint") {
25
- found.push(documentType);
26
- }
27
- }
28
- return found;
24
+ export function regularChildDocumentTypesOf(siteSchema, parentTypeName) {
25
+ return (getDocumentTypeByName(siteSchema, parentTypeName)
26
+ .children?.map((typeName) => getDocumentTypeByName(siteSchema, typeName))
27
+ .filter((leafType) => !leafType.isRoutingPoint) ?? []);
29
28
  }
30
29
  export function getDocumentTypeByBoDirName({ boDirName, siteSchema, }) {
31
- const found = Object.values(siteSchema.documentTypes).find((item) => item.boDirName === boDirName);
32
- return found;
33
- }
34
- export function getParentDocumentTypeOf({ leafType, siteSchema, }) {
35
- const foundDocumentType = Object.values(siteSchema.documentTypes).find((item) => item.children?.includes(leafType));
36
- if (!foundDocumentType)
37
- throw new Error(`Unknown parent documentType of leafType:'${leafType}'`);
38
- return foundDocumentType;
39
- }
40
- export function getLeafSchema(siteSchema, leafType) {
41
- if (leafType === siteSchema.site.leafType)
42
- return siteSchema.site;
43
- const type = siteSchema.documentTypes[leafType] ?? siteSchema.partTypes[leafType];
44
- if (!type)
45
- throw new Error(`unknown leaf-type '${leafType}'`);
46
- return type;
30
+ return Object.values(siteSchema.leafTypes).find((item) => item.kind === "document" && item.boDirName === boDirName);
47
31
  }
48
32
  export function getMediaLimitPerDocument(siteSchema, documentType) {
49
33
  const policyName = documentType.mediaPolicy;
@@ -67,6 +51,6 @@ export function isFTextFieldType(fieldType) {
67
51
  return fieldType.dataType === "quillDelta" || fieldType.dataType === "html";
68
52
  }
69
53
  export function documentTypeHasData(documentType) {
70
- return documentType.kind !== "routingPoint" || !documentType.redirectTo;
54
+ return !documentType.isRoutingPoint || !documentType.redirectTo;
71
55
  }
72
56
  //# sourceMappingURL=site-schema-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"site-schema-helpers.js","sourceRoot":"","sources":["../src/site-schema-helpers.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,yBAAyB,CAAC,UAAsB,EAAE,QAAgB;IAChF,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxD,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,GAAG,CAAC,CAAC;IACtF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,UAAsB,EAAE,QAAgB;IAC5E,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,QAAQ,GAAG,CAAC,CAAC;IAC9E,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,UAAsB;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,MAAM,CACnD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CACP,CAAC;AACpC,CAAC;AAED,MAAM,UAA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AAa,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAAC;QACnE,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC;IACpC,CAAC;IACD,OAAO,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAAsB;IACrD,OAAO,SAAS,CAAC,QAAQ,KAAK,YAAY,IAAI,SAAS,CAAC,QAAQ,KAAK,MAAM,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,YAA4B;IAC9D,OAAO,CAAC,YAAY,CAAC,cAAc,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;AAClE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/internal-anywhere-lib",
3
- "version": "1.17.1",
3
+ "version": "1.18.1",
4
4
  "description": "Front lib for Paroi CMS.",
5
5
  "author": "Paroi Team",
6
6
  "keywords": [
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@paroi/data-formatters-lib": "~0.4.0",
32
- "@paroicms/public-anywhere-lib": "0.2.1"
32
+ "@paroicms/public-anywhere-lib": "0.4.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "rimraf": "~6.0.1",
36
- "typescript": "~5.4.5",
36
+ "typescript": "~5.5.4",
37
37
  "vitest": "~1.5.3"
38
38
  },
39
39
  "files": [