@esri/hub-common 13.3.0 → 13.4.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/dist/esm/core/schemas/getEntityEditorSchemas.js +10 -0
- package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/discussions/_internal/DiscussionSchema.js +38 -0
- package/dist/esm/discussions/_internal/DiscussionSchema.js.map +1 -0
- package/dist/esm/discussions/_internal/DiscussionUiSchemaCreate.js +26 -0
- package/dist/esm/discussions/_internal/DiscussionUiSchemaCreate.js.map +1 -0
- package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js +115 -0
- package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -0
- package/dist/esm/projects/_internal/ProjectBusinessRules.js +0 -2
- package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/node/core/schemas/getEntityEditorSchemas.js +10 -0
- package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/discussions/_internal/DiscussionSchema.js +41 -0
- package/dist/node/discussions/_internal/DiscussionSchema.js.map +1 -0
- package/dist/node/discussions/_internal/DiscussionUiSchemaCreate.js +29 -0
- package/dist/node/discussions/_internal/DiscussionUiSchemaCreate.js.map +1 -0
- package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js +118 -0
- package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -0
- package/dist/node/projects/_internal/ProjectBusinessRules.js +0 -2
- package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/types/core/schemas/getEntityEditorSchemas.d.ts +1 -1
- package/dist/types/core/types/HubEntity.d.ts +2 -1
- package/dist/types/discussions/_internal/DiscussionSchema.d.ts +7 -0
- package/dist/types/discussions/_internal/DiscussionUiSchemaCreate.d.ts +7 -0
- package/dist/types/discussions/_internal/DiscussionUiSchemaEdit.d.ts +7 -0
- package/package.json +1 -1
|
@@ -5,10 +5,12 @@ import { filterSchemaToUiSchema } from "./internal/filterSchemaToUiSchema";
|
|
|
5
5
|
import { ProjectEditorTypes, } from "../../projects/_internal/ProjectSchema";
|
|
6
6
|
import { InitiativeEditorTypes, } from "../../initiatives/_internal/InitiativeSchema";
|
|
7
7
|
import { SiteEditorTypes, } from "../../sites/_internal/SiteSchema";
|
|
8
|
+
import { DiscussionEditorTypes, } from "../../discussions/_internal/DiscussionSchema";
|
|
8
9
|
export const validEditorTypes = [
|
|
9
10
|
...ProjectEditorTypes,
|
|
10
11
|
...InitiativeEditorTypes,
|
|
11
12
|
...SiteEditorTypes,
|
|
13
|
+
...DiscussionEditorTypes,
|
|
12
14
|
];
|
|
13
15
|
/**
|
|
14
16
|
* get the editor schema and uiSchema defined for an entity.
|
|
@@ -49,6 +51,14 @@ export const getEntityEditorSchemas = async (i18nScope, type, options = []) => {
|
|
|
49
51
|
"hub:site:edit": () => import("../../sites/_internal/SiteUiSchemaEdit"),
|
|
50
52
|
}[type]());
|
|
51
53
|
break;
|
|
54
|
+
case "discussion":
|
|
55
|
+
const { DiscussionSchema } = await import("../../discussions/_internal/DiscussionSchema");
|
|
56
|
+
schema = cloneObject(DiscussionSchema);
|
|
57
|
+
({ uiSchema } = await {
|
|
58
|
+
"hub:discussion:edit": () => import("../../discussions/_internal/DiscussionUiSchemaEdit"),
|
|
59
|
+
"hub:discussion:create": () => import("../../discussions/_internal/DiscussionUiSchemaCreate"),
|
|
60
|
+
}[type]());
|
|
61
|
+
break;
|
|
52
62
|
}
|
|
53
63
|
// filter out properties not used in the UI schema
|
|
54
64
|
schema = filterSchemaToUiSchema(schema, uiSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEntityEditorSchemas.js","sourceRoot":"","sources":["../../../../src/core/schemas/getEntityEditorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAEL,kBAAkB,GACnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,qBAAqB,GAEtB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAEL,eAAe,GAChB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"getEntityEditorSchemas.js","sourceRoot":"","sources":["../../../../src/core/schemas/getEntityEditorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAEL,kBAAkB,GACnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,qBAAqB,GAEtB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAEL,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,qBAAqB,GACtB,MAAM,8CAA8C,CAAC;AAOtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,GAAG,kBAAkB;IACrB,GAAG,qBAAqB;IACxB,GAAG,eAAe;IAClB,GAAG,qBAAqB;CAChB,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,SAAiB,EACjB,IAAgB,EAChB,UAAoC,EAAE,EACd,EAAE;IAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtC,wDAAwD;IACxD,+CAA+C;IAC/C,IAAI,MAAM,CAAC;IACX,IAAI,QAAQ,CAAC;IACb,QAAQ,UAAU,EAAE;QA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D,CAAC;gBAC9D,uBAAuB,EAAE,GAAG,EAAE,CAC5B,MAAM,CAAC,sDAAsD,CAAC;aACjE,CAAC,IAA4B,CAAC,EAAE,CAAC,CAAC;YACnC,MAAM;KACT;IAED,kDAAkD;IAClD,MAAM,GAAG,sBAAsB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClD,oBAAoB;IACpB,QAAQ,GAAG,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1D,+CAA+C;IAC/C,QAAQ,GAAG,WAAW,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAEhD,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ENTITY_CATEGORIES_SCHEMA, ENTITY_NAME_SCHEMA, ENTITY_TAGS_SCHEMA, } from "../../core/schemas/shared";
|
|
2
|
+
export const DiscussionEditorTypes = [
|
|
3
|
+
"hub:discussion:edit",
|
|
4
|
+
"hub:discussion:create",
|
|
5
|
+
];
|
|
6
|
+
/**
|
|
7
|
+
* defines the JSON schema for a Discussion's editable fields
|
|
8
|
+
*/
|
|
9
|
+
export const DiscussionSchema = {
|
|
10
|
+
required: ["name"],
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
name: ENTITY_NAME_SCHEMA,
|
|
14
|
+
summary: {
|
|
15
|
+
type: "string",
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: "string",
|
|
19
|
+
},
|
|
20
|
+
location: {
|
|
21
|
+
type: "object",
|
|
22
|
+
},
|
|
23
|
+
tags: ENTITY_TAGS_SCHEMA,
|
|
24
|
+
categories: ENTITY_CATEGORIES_SCHEMA,
|
|
25
|
+
view: {
|
|
26
|
+
type: "object",
|
|
27
|
+
properties: {
|
|
28
|
+
featuredImage: {
|
|
29
|
+
type: "object",
|
|
30
|
+
},
|
|
31
|
+
featuredImageAltText: {
|
|
32
|
+
type: "string",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=DiscussionSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionSchema.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,uBAAuB;CACf,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAyB;IACpD,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;SACf;QACD,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,wBAAwB;QACpC,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;iBACf;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACiC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* create uiSchema for Hub Discussions - this
|
|
3
|
+
* defines how the schema properties should be
|
|
4
|
+
* rendered in the Discussions creation experience
|
|
5
|
+
*/
|
|
6
|
+
export const uiSchema = {
|
|
7
|
+
type: "Layout",
|
|
8
|
+
elements: [
|
|
9
|
+
{
|
|
10
|
+
labelKey: "{{i18nScope}}.fields.name.label",
|
|
11
|
+
scope: "/properties/name",
|
|
12
|
+
type: "Control",
|
|
13
|
+
options: {
|
|
14
|
+
messages: [
|
|
15
|
+
{
|
|
16
|
+
type: "ERROR",
|
|
17
|
+
keyword: "required",
|
|
18
|
+
icon: true,
|
|
19
|
+
labelKey: "{{i18nScope}}.fields.name.requiredError",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=DiscussionUiSchemaCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionUiSchemaCreate.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,QAAQ,EAAE,iCAAiC;YAC3C,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,OAAO;wBACb,OAAO,EAAE,UAAU;wBACnB,IAAI,EAAE,IAAI;wBACV,QAAQ,EAAE,yCAAyC;qBACpD;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete edit uiSchema for Hub discussions - this defines
|
|
3
|
+
* how the schema properties should be rendered in the
|
|
4
|
+
* discussion editing experience
|
|
5
|
+
*/
|
|
6
|
+
export const uiSchema = {
|
|
7
|
+
type: "Layout",
|
|
8
|
+
elements: [
|
|
9
|
+
{
|
|
10
|
+
type: "Section",
|
|
11
|
+
labelKey: "{{i18nScope}}.sections.basicInfo.label",
|
|
12
|
+
elements: [
|
|
13
|
+
{
|
|
14
|
+
labelKey: "{{i18nScope}}.fields.name.label",
|
|
15
|
+
scope: "/properties/name",
|
|
16
|
+
type: "Control",
|
|
17
|
+
options: {
|
|
18
|
+
messages: [
|
|
19
|
+
{
|
|
20
|
+
type: "ERROR",
|
|
21
|
+
keyword: "required",
|
|
22
|
+
icon: true,
|
|
23
|
+
labelKey: "{{i18nScope}}.fields.name.requiredError",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
labelKey: "{{i18nScope}}.fields.summary.label",
|
|
30
|
+
scope: "/properties/summary",
|
|
31
|
+
type: "Control",
|
|
32
|
+
options: {
|
|
33
|
+
control: "hub-field-input-input",
|
|
34
|
+
type: "textarea",
|
|
35
|
+
helperText: {
|
|
36
|
+
labelKey: "{{i18nScope}}.fields.summary.helperText",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
labelKey: "{{i18nScope}}.fields.description.label",
|
|
42
|
+
scope: "/properties/description",
|
|
43
|
+
type: "Control",
|
|
44
|
+
options: {
|
|
45
|
+
control: "hub-field-input-input",
|
|
46
|
+
type: "textarea",
|
|
47
|
+
helperText: {
|
|
48
|
+
labelKey: "{{i18nScope}}.fields.description.helperText",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.label",
|
|
54
|
+
scope: "/properties/view/properties/featuredImage",
|
|
55
|
+
type: "Control",
|
|
56
|
+
options: {
|
|
57
|
+
control: "hub-field-input-image-picker",
|
|
58
|
+
maxWidth: 727,
|
|
59
|
+
maxHeight: 484,
|
|
60
|
+
aspectRatio: 1.5,
|
|
61
|
+
sizeDescription: {
|
|
62
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.sizeDescription",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.altText.label",
|
|
68
|
+
scope: "/properties/view/properties/featuredImageAltText",
|
|
69
|
+
type: "Control",
|
|
70
|
+
options: {
|
|
71
|
+
helperText: {
|
|
72
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.altText.helperText",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
labelKey: "{{i18nScope}}.fields.tags.label",
|
|
78
|
+
scope: "/properties/tags",
|
|
79
|
+
type: "Control",
|
|
80
|
+
options: {
|
|
81
|
+
control: "hub-field-input-combobox",
|
|
82
|
+
allowCustomValues: true,
|
|
83
|
+
selectionMode: "multiple",
|
|
84
|
+
placeholderIcon: "label",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
labelKey: "{{i18nScope}}.fields.categories.label",
|
|
89
|
+
scope: "/properties/categories",
|
|
90
|
+
type: "Control",
|
|
91
|
+
options: {
|
|
92
|
+
control: "hub-field-input-combobox",
|
|
93
|
+
allowCustomValues: false,
|
|
94
|
+
selectionMode: "multiple",
|
|
95
|
+
placeholderIcon: "select-category",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "Section",
|
|
102
|
+
labelKey: "{{i18nScope}}.sections.location.label",
|
|
103
|
+
elements: [
|
|
104
|
+
{
|
|
105
|
+
scope: "/properties/location",
|
|
106
|
+
type: "Control",
|
|
107
|
+
options: {
|
|
108
|
+
control: "hub-field-input-location-picker",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=DiscussionUiSchemaEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionUiSchemaEdit.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH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;wBACP,UAAU,EAAE;4BACV,QAAQ,EAAE,uDAAuD;yBAClE;qBACF;iBACF;gBACD;oBACE,QAAQ,EAAE,iCAAiC;oBAC3C,KAAK,EAAE,kBAAkB;oBACzB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,0BAA0B;wBACnC,iBAAiB,EAAE,IAAI;wBACvB,aAAa,EAAE,UAAU;wBACzB,eAAe,EAAE,OAAO;qBACzB;iBACF;gBACD;oBACE,QAAQ,EAAE,uCAAuC;oBACjD,KAAK,EAAE,wBAAwB;oBAC/B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,0BAA0B;wBACnC,iBAAiB,EAAE,KAAK;wBACxB,aAAa,EAAE,UAAU;wBACzB,eAAe,EAAE,iBAAiB;qBACnC;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,uCAAuC;YACjD,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,sBAAsB;oBAC7B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,iCAAiC;qBAC3C;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -60,14 +60,12 @@ export const ProjectPermissionPolicies = [
|
|
|
60
60
|
permission: "hub:project:view",
|
|
61
61
|
subsystems: ["projects"],
|
|
62
62
|
authenticated: false,
|
|
63
|
-
licenses: ["hub-premium"],
|
|
64
63
|
},
|
|
65
64
|
{
|
|
66
65
|
permission: "hub:project:edit",
|
|
67
66
|
authenticated: true,
|
|
68
67
|
subsystems: ["projects"],
|
|
69
68
|
entityEdit: true,
|
|
70
|
-
licenses: ["hub-premium"],
|
|
71
69
|
},
|
|
72
70
|
{
|
|
73
71
|
permission: "hub:project:delete",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectBusinessRules.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectBusinessRules.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAuB;IAC5D,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA4B;IACnE;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,SAAS;QACrB,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,CAAC,mBAAmB,CAAC;KACnC;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,oBAAoB;QAChC,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;QACtC,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"ProjectBusinessRules.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectBusinessRules.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAuB;IAC5D,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAA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}
|
|
@@ -8,10 +8,12 @@ const filterSchemaToUiSchema_1 = require("./internal/filterSchemaToUiSchema");
|
|
|
8
8
|
const ProjectSchema_1 = require("../../projects/_internal/ProjectSchema");
|
|
9
9
|
const InitiativeSchema_1 = require("../../initiatives/_internal/InitiativeSchema");
|
|
10
10
|
const SiteSchema_1 = require("../../sites/_internal/SiteSchema");
|
|
11
|
+
const DiscussionSchema_1 = require("../../discussions/_internal/DiscussionSchema");
|
|
11
12
|
exports.validEditorTypes = [
|
|
12
13
|
...ProjectSchema_1.ProjectEditorTypes,
|
|
13
14
|
...InitiativeSchema_1.InitiativeEditorTypes,
|
|
14
15
|
...SiteSchema_1.SiteEditorTypes,
|
|
16
|
+
...DiscussionSchema_1.DiscussionEditorTypes,
|
|
15
17
|
];
|
|
16
18
|
/**
|
|
17
19
|
* get the editor schema and uiSchema defined for an entity.
|
|
@@ -52,6 +54,14 @@ exports.getEntityEditorSchemas = async (i18nScope, type, options = []) => {
|
|
|
52
54
|
"hub:site:edit": () => Promise.resolve().then(() => require("../../sites/_internal/SiteUiSchemaEdit")),
|
|
53
55
|
}[type]());
|
|
54
56
|
break;
|
|
57
|
+
case "discussion":
|
|
58
|
+
const { DiscussionSchema } = await Promise.resolve().then(() => require("../../discussions/_internal/DiscussionSchema"));
|
|
59
|
+
schema = util_1.cloneObject(DiscussionSchema);
|
|
60
|
+
({ uiSchema } = await {
|
|
61
|
+
"hub:discussion:edit": () => Promise.resolve().then(() => require("../../discussions/_internal/DiscussionUiSchemaEdit")),
|
|
62
|
+
"hub:discussion:create": () => Promise.resolve().then(() => require("../../discussions/_internal/DiscussionUiSchemaCreate")),
|
|
63
|
+
}[type]());
|
|
64
|
+
break;
|
|
55
65
|
}
|
|
56
66
|
// filter out properties not used in the UI schema
|
|
57
67
|
schema = filterSchemaToUiSchema_1.filterSchemaToUiSchema(schema, uiSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEntityEditorSchemas.js","sourceRoot":"","sources":["../../../../src/core/schemas/getEntityEditorSchemas.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,qCAAyC;AAGzC,wFAAqF;AACrF,8EAA2E;AAC3E,0EAGgD;AAChD,mFAGsD;AACtD,iEAG0C;
|
|
1
|
+
{"version":3,"file":"getEntityEditorSchemas.js","sourceRoot":"","sources":["../../../../src/core/schemas/getEntityEditorSchemas.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,qCAAyC;AAGzC,wFAAqF;AACrF,8EAA2E;AAC3E,0EAGgD;AAChD,mFAGsD;AACtD,iEAG0C;AAC1C,mFAGsD;AAOzC,QAAA,gBAAgB,GAAG;IAC9B,GAAG,kCAAkB;IACrB,GAAG,wCAAqB;IACxB,GAAG,4BAAe;IAClB,GAAG,wCAAqB;CAChB,CAAC;AAEX;;;;;;;;;GASG;AACU,QAAA,sBAAsB,GAAG,KAAK,EACzC,SAAiB,EACjB,IAAgB,EAChB,UAAoC,EAAE,EACd,EAAE;IAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtC,wDAAwD;IACxD,+CAA+C;IAC/C,IAAI,MAAM,CAAC;IACX,IAAI,QAAQ,CAAC;IACb,QAAQ,UAAU,EAAE;QAClB,KAAK,SAAS;YACZ,MAAM,EAAE,aAAa,EAAE,GAAG,2CACxB,wCAAwC,EACzC,CAAC;YACF,MAAM,GAAG,kBAAW,CAAC,aAAa,CAAC,CAAC;YAEpC,CAAC,EAAE,QAAQ,EAAE,GAAG,MAAM;gBACpB,kBAAkB,EAAE,GAAG,EAAE,sCAChB,8CAA8C,EAAC;gBACxD,oBAAoB,EAAE,GAAG,EAAE,sCAClB,gDAAgD,EAAC;aAC3D,CAAC,IAAyB,CAAC,EAAE,CAAC,CAAC;YAChC,MAAM;QACR,KAAK,YAAY;YACf,MAAM,EAAE,gBAAgB,EAAE,GAAG,2CAC3B,8CAA8C,EAC/C,CAAC;Y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use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscussionSchema = exports.DiscussionEditorTypes = void 0;
|
|
4
|
+
const shared_1 = require("../../core/schemas/shared");
|
|
5
|
+
exports.DiscussionEditorTypes = [
|
|
6
|
+
"hub:discussion:edit",
|
|
7
|
+
"hub:discussion:create",
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* defines the JSON schema for a Discussion's editable fields
|
|
11
|
+
*/
|
|
12
|
+
exports.DiscussionSchema = {
|
|
13
|
+
required: ["name"],
|
|
14
|
+
type: "object",
|
|
15
|
+
properties: {
|
|
16
|
+
name: shared_1.ENTITY_NAME_SCHEMA,
|
|
17
|
+
summary: {
|
|
18
|
+
type: "string",
|
|
19
|
+
},
|
|
20
|
+
description: {
|
|
21
|
+
type: "string",
|
|
22
|
+
},
|
|
23
|
+
location: {
|
|
24
|
+
type: "object",
|
|
25
|
+
},
|
|
26
|
+
tags: shared_1.ENTITY_TAGS_SCHEMA,
|
|
27
|
+
categories: shared_1.ENTITY_CATEGORIES_SCHEMA,
|
|
28
|
+
view: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
featuredImage: {
|
|
32
|
+
type: "object",
|
|
33
|
+
},
|
|
34
|
+
featuredImageAltText: {
|
|
35
|
+
type: "string",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=DiscussionSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionSchema.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionSchema.ts"],"names":[],"mappings":";;;AACA,sDAKmC;AAGtB,QAAA,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,uBAAuB;CACf,CAAC;AAEX;;GAEG;AACU,QAAA,gBAAgB,GAAyB;IACpD,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,2BAAkB;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;SACf;QACD,IAAI,EAAE,2BAAkB;QACxB,UAAU,EAAE,iCAAwB;QACpC,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;iBACf;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACiC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* create uiSchema for Hub Discussions - this
|
|
6
|
+
* defines how the schema properties should be
|
|
7
|
+
* rendered in the Discussions creation experience
|
|
8
|
+
*/
|
|
9
|
+
exports.uiSchema = {
|
|
10
|
+
type: "Layout",
|
|
11
|
+
elements: [
|
|
12
|
+
{
|
|
13
|
+
labelKey: "{{i18nScope}}.fields.name.label",
|
|
14
|
+
scope: "/properties/name",
|
|
15
|
+
type: "Control",
|
|
16
|
+
options: {
|
|
17
|
+
messages: [
|
|
18
|
+
{
|
|
19
|
+
type: "ERROR",
|
|
20
|
+
keyword: "required",
|
|
21
|
+
icon: true,
|
|
22
|
+
labelKey: "{{i18nScope}}.fields.name.requiredError",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=DiscussionUiSchemaCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionUiSchemaCreate.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,QAAQ,EAAE,iCAAiC;YAC3C,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,OAAO;wBACb,OAAO,EAAE,UAAU;wBACnB,IAAI,EAAE,IAAI;wBACV,QAAQ,EAAE,yCAAyC;qBACpD;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* complete edit uiSchema for Hub discussions - this defines
|
|
6
|
+
* how the schema properties should be rendered in the
|
|
7
|
+
* discussion editing experience
|
|
8
|
+
*/
|
|
9
|
+
exports.uiSchema = {
|
|
10
|
+
type: "Layout",
|
|
11
|
+
elements: [
|
|
12
|
+
{
|
|
13
|
+
type: "Section",
|
|
14
|
+
labelKey: "{{i18nScope}}.sections.basicInfo.label",
|
|
15
|
+
elements: [
|
|
16
|
+
{
|
|
17
|
+
labelKey: "{{i18nScope}}.fields.name.label",
|
|
18
|
+
scope: "/properties/name",
|
|
19
|
+
type: "Control",
|
|
20
|
+
options: {
|
|
21
|
+
messages: [
|
|
22
|
+
{
|
|
23
|
+
type: "ERROR",
|
|
24
|
+
keyword: "required",
|
|
25
|
+
icon: true,
|
|
26
|
+
labelKey: "{{i18nScope}}.fields.name.requiredError",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
labelKey: "{{i18nScope}}.fields.summary.label",
|
|
33
|
+
scope: "/properties/summary",
|
|
34
|
+
type: "Control",
|
|
35
|
+
options: {
|
|
36
|
+
control: "hub-field-input-input",
|
|
37
|
+
type: "textarea",
|
|
38
|
+
helperText: {
|
|
39
|
+
labelKey: "{{i18nScope}}.fields.summary.helperText",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
labelKey: "{{i18nScope}}.fields.description.label",
|
|
45
|
+
scope: "/properties/description",
|
|
46
|
+
type: "Control",
|
|
47
|
+
options: {
|
|
48
|
+
control: "hub-field-input-input",
|
|
49
|
+
type: "textarea",
|
|
50
|
+
helperText: {
|
|
51
|
+
labelKey: "{{i18nScope}}.fields.description.helperText",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.label",
|
|
57
|
+
scope: "/properties/view/properties/featuredImage",
|
|
58
|
+
type: "Control",
|
|
59
|
+
options: {
|
|
60
|
+
control: "hub-field-input-image-picker",
|
|
61
|
+
maxWidth: 727,
|
|
62
|
+
maxHeight: 484,
|
|
63
|
+
aspectRatio: 1.5,
|
|
64
|
+
sizeDescription: {
|
|
65
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.sizeDescription",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.altText.label",
|
|
71
|
+
scope: "/properties/view/properties/featuredImageAltText",
|
|
72
|
+
type: "Control",
|
|
73
|
+
options: {
|
|
74
|
+
helperText: {
|
|
75
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.altText.helperText",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
labelKey: "{{i18nScope}}.fields.tags.label",
|
|
81
|
+
scope: "/properties/tags",
|
|
82
|
+
type: "Control",
|
|
83
|
+
options: {
|
|
84
|
+
control: "hub-field-input-combobox",
|
|
85
|
+
allowCustomValues: true,
|
|
86
|
+
selectionMode: "multiple",
|
|
87
|
+
placeholderIcon: "label",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
labelKey: "{{i18nScope}}.fields.categories.label",
|
|
92
|
+
scope: "/properties/categories",
|
|
93
|
+
type: "Control",
|
|
94
|
+
options: {
|
|
95
|
+
control: "hub-field-input-combobox",
|
|
96
|
+
allowCustomValues: false,
|
|
97
|
+
selectionMode: "multiple",
|
|
98
|
+
placeholderIcon: "select-category",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "Section",
|
|
105
|
+
labelKey: "{{i18nScope}}.sections.location.label",
|
|
106
|
+
elements: [
|
|
107
|
+
{
|
|
108
|
+
scope: "/properties/location",
|
|
109
|
+
type: "Control",
|
|
110
|
+
options: {
|
|
111
|
+
control: "hub-field-input-location-picker",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=DiscussionUiSchemaEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscussionUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionUiSchemaEdit.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,wCAAwC;YAClD,QAAQ,EAAE;gBACR;oBACE,QAAQ,EAAE,iCAAiC;oBAC3C,KAAK,EAAE,kBAAkB;oBACzB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,OAAO;gCACb,OAAO,EAAE,UAAU;gCACnB,IAAI,EAAE,IAAI;gCACV,QAAQ,EAAE,yCAAyC;6BACp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AO,EAAE;wBACP,OAAO,EAAE,0BAA0B;wBACnC,iBAAiB,EAAE,KAAK;wBACxB,aAAa,EAAE,UAAU;wBACzB,eAAe,EAAE,iBAAiB;qBACnC;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,uCAAuC;YACjD,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,sBAAsB;oBAC7B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,iCAAiC;qBAC3C;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -63,14 +63,12 @@ exports.ProjectPermissionPolicies = [
|
|
|
63
63
|
permission: "hub:project:view",
|
|
64
64
|
subsystems: ["projects"],
|
|
65
65
|
authenticated: false,
|
|
66
|
-
licenses: ["hub-premium"],
|
|
67
66
|
},
|
|
68
67
|
{
|
|
69
68
|
permission: "hub:project:edit",
|
|
70
69
|
authenticated: true,
|
|
71
70
|
subsystems: ["projects"],
|
|
72
71
|
entityEdit: true,
|
|
73
|
-
licenses: ["hub-premium"],
|
|
74
72
|
},
|
|
75
73
|
{
|
|
76
74
|
permission: "hub:project:delete",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectBusinessRules.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectBusinessRules.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACU,QAAA,0BAA0B,GAAuB;IAC5D,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAA4B;IACnE;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,SAAS;QACrB,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,CAAC,mBAAmB,CAAC;KACnC;CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AAEX;;;GAGG;AACU,QAAA,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,oBAAoB;QAChC,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;QACtC,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"ProjectBusinessRules.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectBusinessRules.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACU,QAAA,0BAA0B,GAAuB;IAC5D,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAA4B;IACnE;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,SAAS;QACrB,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,CAAC,mBAAmB,CAAC;KACnC;CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AAEX;;;GAGG;AACU,QAAA,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,oBAAoB;QAChC,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;QACtC,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,KAAK;KACrB;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,UAAU,EAAE,IAAI;KACjB;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,WAAW,EAAE,IAAI;QACjB,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,WAAW,EAAE,IAAI;QACjB,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;CACF,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { UiSchemaElementOptions } from "./types";
|
|
|
5
5
|
* to the supported/defined uiSchema configurations
|
|
6
6
|
*/
|
|
7
7
|
export declare type EditorType = (typeof validEditorTypes)[number];
|
|
8
|
-
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit", "hub:site:edit"];
|
|
8
|
+
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit", "hub:site:edit", "hub:discussion:edit", "hub:discussion:create"];
|
|
9
9
|
/**
|
|
10
10
|
* get the editor schema and uiSchema defined for an entity.
|
|
11
11
|
* The schema and uiSchema that are returned can be used to
|
|
@@ -2,4 +2,5 @@ import { IHubInitiative } from "./IHubInitiative";
|
|
|
2
2
|
import { IHubPage } from "./IHubPage";
|
|
3
3
|
import { IHubProject } from "./IHubProject";
|
|
4
4
|
import { IHubSite } from "./IHubSite";
|
|
5
|
-
|
|
5
|
+
import { IHubDiscussion } from "./IHubDiscussion";
|
|
6
|
+
export declare type HubEntity = IHubSite | IHubProject | IHubDiscussion | IHubInitiative | IHubPage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfigurationSchema } from "../../core";
|
|
2
|
+
export declare type DiscussionEditorType = (typeof DiscussionEditorTypes)[number];
|
|
3
|
+
export declare const DiscussionEditorTypes: readonly ["hub:discussion:edit", "hub:discussion:create"];
|
|
4
|
+
/**
|
|
5
|
+
* defines the JSON schema for a Discussion's editable fields
|
|
6
|
+
*/
|
|
7
|
+
export declare const DiscussionSchema: IConfigurationSchema;
|