@esri/hub-common 12.14.0 → 12.16.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 +52 -0
- package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -0
- package/dist/esm/core/schemas/index.js +1 -1
- package/dist/esm/core/schemas/index.js.map +1 -1
- package/dist/esm/core/schemas/shared/index.js +2 -0
- package/dist/esm/core/schemas/shared/index.js.map +1 -0
- package/dist/esm/core/schemas/shared/subschemas.js +20 -0
- package/dist/esm/core/schemas/shared/subschemas.js.map +1 -0
- package/dist/esm/core/types/IHubProject.js.map +1 -1
- package/dist/esm/initiatives/HubInitiative.js +12 -12
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js +13 -0
- package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +20 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -0
- package/dist/esm/items/_enrichments.js +11 -3
- package/dist/esm/items/_enrichments.js.map +1 -1
- package/dist/esm/items/index.js +1 -0
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/items/is-services-directory-disabled.js +35 -0
- package/dist/esm/items/is-services-directory-disabled.js.map +1 -0
- package/dist/esm/projects/HubProject.js +7 -7
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +52 -0
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -0
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js +128 -0
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js.map +1 -0
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +130 -0
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -0
- package/dist/esm/projects/edit.js +11 -32
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/node/core/schemas/getEntityEditorSchemas.js +55 -0
- package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -0
- package/dist/node/core/schemas/index.js +1 -1
- package/dist/node/core/schemas/index.js.map +1 -1
- package/dist/node/core/schemas/shared/index.js +5 -0
- package/dist/node/core/schemas/shared/index.js.map +1 -0
- package/dist/node/core/schemas/shared/subschemas.js +23 -0
- package/dist/node/core/schemas/shared/subschemas.js.map +1 -0
- package/dist/node/core/types/IHubProject.js.map +1 -1
- package/dist/node/initiatives/HubInitiative.js +12 -12
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js +16 -0
- package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +23 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -0
- package/dist/node/items/_enrichments.js +11 -3
- package/dist/node/items/_enrichments.js.map +1 -1
- package/dist/node/items/index.js +1 -0
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/items/is-services-directory-disabled.js +38 -0
- package/dist/node/items/is-services-directory-disabled.js.map +1 -0
- package/dist/node/projects/HubProject.js +7 -7
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +55 -0
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -0
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js +131 -0
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js.map +1 -0
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +133 -0
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -0
- package/dist/node/projects/edit.js +11 -32
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/types/content/_internal.d.ts +1 -0
- package/dist/types/core/behaviors/IWithEditorBehavior.d.ts +7 -2
- package/dist/types/core/schemas/getEntityEditorSchemas.d.ts +19 -0
- package/dist/types/core/schemas/index.d.ts +1 -1
- package/dist/types/core/schemas/shared/index.d.ts +1 -0
- package/dist/types/core/schemas/shared/subschemas.d.ts +29 -0
- package/dist/types/core/types/IHubProject.d.ts +0 -8
- package/dist/types/core/types/IServerEnrichments.d.ts +2 -0
- package/dist/types/initiatives/HubInitiative.d.ts +11 -5
- package/dist/types/initiatives/_internal/InitiativeSchema.d.ts +7 -0
- package/dist/types/initiatives/_internal/InitiativeUiSchemaEdit.d.ts +5 -0
- package/dist/types/items/index.d.ts +1 -0
- package/dist/types/items/is-services-directory-disabled.d.ts +9 -0
- package/dist/types/projects/HubProject.d.ts +8 -6
- package/dist/types/projects/_internal/ProjectSchema.d.ts +7 -0
- package/dist/types/projects/_internal/ProjectUiSchemaCreate.d.ts +7 -0
- package/dist/types/projects/_internal/ProjectUiSchemaEdit.d.ts +7 -0
- package/dist/types/projects/edit.d.ts +7 -4
- package/package.json +1 -1
- package/dist/esm/core/schemas/hubproject.js +0 -300
- package/dist/esm/core/schemas/hubproject.js.map +0 -1
- package/dist/node/core/schemas/hubproject.js +0 -303
- package/dist/node/core/schemas/hubproject.js.map +0 -1
- package/dist/types/core/schemas/hubproject.d.ts +0 -10
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectSchema = exports.ProjectEditorTypes = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const shared_1 = require("../../core/schemas/shared");
|
|
6
|
+
exports.ProjectEditorTypes = [
|
|
7
|
+
"hub:project:create",
|
|
8
|
+
"hub:project:edit",
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* defines the JSON schema for a Hub Project's editable fields
|
|
12
|
+
*/
|
|
13
|
+
exports.ProjectSchema = {
|
|
14
|
+
required: ["name"],
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
name: shared_1.ENTITY_NAME_SCHEMA,
|
|
18
|
+
summary: {
|
|
19
|
+
type: "string",
|
|
20
|
+
},
|
|
21
|
+
description: {
|
|
22
|
+
type: "string",
|
|
23
|
+
},
|
|
24
|
+
status: {
|
|
25
|
+
type: "string",
|
|
26
|
+
default: core_1.PROJECT_STATUSES.notStarted,
|
|
27
|
+
enum: Object.keys(core_1.PROJECT_STATUSES),
|
|
28
|
+
},
|
|
29
|
+
extent: shared_1.ENTITY_EXTENT_SCHEMA,
|
|
30
|
+
view: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
featuredContentIds: {
|
|
34
|
+
type: "array",
|
|
35
|
+
maxItems: 4,
|
|
36
|
+
items: {
|
|
37
|
+
type: "string",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
featuredImage: {
|
|
41
|
+
type: "object",
|
|
42
|
+
},
|
|
43
|
+
showMap: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
},
|
|
46
|
+
// TODO: extend this schema definition to provide
|
|
47
|
+
// appropriate validation for the timeline editor
|
|
48
|
+
timeline: {
|
|
49
|
+
type: "object",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=ProjectSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,sDAGmC;AAGtB,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,kBAAkB;CACV,CAAC;AAEX;;GAEG;AACU,QAAA,aAAa,GAAyB;IACjD,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,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAgB,CAAC,UAAU;YACpC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAgB,CAAC;SACpC;QACD,MAAM,EAAE,6BAAoB;QAC5B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,kBAAkB,EAAE;oBAClB,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,CAAC;oBACX,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;qBACf;iBACF;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;iBACf;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,SAAS;iBAChB;gBACD,iDAAiD;gBACjD,iDAAiD;gBACjD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACiC,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiSchema = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
/**
|
|
6
|
+
* minimal create uiSchema for Hub Projects - this defines
|
|
7
|
+
* how the schema properties should be rendered in the
|
|
8
|
+
* project creation experience
|
|
9
|
+
*/
|
|
10
|
+
exports.uiSchema = {
|
|
11
|
+
type: "Layout",
|
|
12
|
+
elements: [
|
|
13
|
+
{
|
|
14
|
+
type: "Section",
|
|
15
|
+
options: { section: "stepper", scale: "l" },
|
|
16
|
+
elements: [
|
|
17
|
+
{
|
|
18
|
+
type: "Step",
|
|
19
|
+
labelKey: "{{i18nScope}}.sections.details.label",
|
|
20
|
+
elements: [
|
|
21
|
+
{
|
|
22
|
+
type: "Section",
|
|
23
|
+
labelKey: "{{i18nScope}}.sections.basicInfo.label",
|
|
24
|
+
elements: [
|
|
25
|
+
{
|
|
26
|
+
labelKey: "{{i18nScope}}.fields.name.label",
|
|
27
|
+
scope: "/properties/name",
|
|
28
|
+
type: "Control",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
labelKey: "{{i18nScope}}.fields.summary.label",
|
|
32
|
+
scope: "/properties/summary",
|
|
33
|
+
type: "Control",
|
|
34
|
+
options: {
|
|
35
|
+
control: "hub-field-input-input",
|
|
36
|
+
type: "textarea",
|
|
37
|
+
helperText: {
|
|
38
|
+
labelKey: "{{i18nScope}}.fields.summary.helperText",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
labelKey: "{{i18nScope}}.fields.description.label",
|
|
44
|
+
scope: "/properties/description",
|
|
45
|
+
type: "Control",
|
|
46
|
+
options: {
|
|
47
|
+
control: "hub-field-input-input",
|
|
48
|
+
type: "textarea",
|
|
49
|
+
helperText: {
|
|
50
|
+
labelKey: "{{i18nScope}}.fields.description.helperText",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: "Step",
|
|
60
|
+
labelKey: "{{i18nScope}}.sections.location.label",
|
|
61
|
+
rule: {
|
|
62
|
+
effect: core_1.UiSchemaRuleEffects.DISABLE,
|
|
63
|
+
condition: {
|
|
64
|
+
scope: "/properties/name",
|
|
65
|
+
schema: { const: "" },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
elements: [
|
|
69
|
+
{
|
|
70
|
+
type: "Section",
|
|
71
|
+
labelKey: "{{i18nScope}}.sections.location.label",
|
|
72
|
+
elements: [
|
|
73
|
+
{
|
|
74
|
+
scope: "/properties/extent",
|
|
75
|
+
type: "Control",
|
|
76
|
+
options: {
|
|
77
|
+
control: "hub-field-input-boundary-picker",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "Step",
|
|
86
|
+
labelKey: "{{i18nScope}}.sections.statusAndTimeline.label",
|
|
87
|
+
rule: {
|
|
88
|
+
effect: core_1.UiSchemaRuleEffects.DISABLE,
|
|
89
|
+
condition: {
|
|
90
|
+
scope: "/properties/name",
|
|
91
|
+
schema: { const: "" },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
elements: [
|
|
95
|
+
{
|
|
96
|
+
type: "Section",
|
|
97
|
+
labelKey: "{{i18nScope}}.sections.status.label",
|
|
98
|
+
elements: [
|
|
99
|
+
{
|
|
100
|
+
labelKey: "{{i18nScope}}.fields.status.label",
|
|
101
|
+
scope: "/properties/status",
|
|
102
|
+
type: "Control",
|
|
103
|
+
options: {
|
|
104
|
+
control: "hub-field-input-select",
|
|
105
|
+
enum: {
|
|
106
|
+
i18nScope: "{{i18nScope}}.fields.status.enum",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: "Section",
|
|
114
|
+
labelKey: "{{i18nScope}}.sections.timeline.label",
|
|
115
|
+
elements: [
|
|
116
|
+
{
|
|
117
|
+
scope: "/properties/view/properties/timeline",
|
|
118
|
+
type: "Control",
|
|
119
|
+
options: {
|
|
120
|
+
control: "arcgis-hub-timeline-editor",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=ProjectUiSchemaCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectUiSchemaCreate.ts"],"names":[],"mappings":";;;AAAA,qCAA4D;AAE5D;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;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EAAE,SAAS;oCACf,OAAO,EAAE;wCACP,OAAO,EAAE,iCAAiC;qCAC3C;iCACF;6BACF;yBACF;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,gDAAgD;oBAC1D,IAAI,EAAE;wBACJ,MAAM,EAAE,0BAAmB,CAAC,OAAO;wBACnC,SAAS,EAAE;4BACT,KAAK,EAAE,kBAAkB;4BACzB,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;yBACtB;qBACF;oBACD,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,SAAS;4BACf,QAAQ,EAAE,qCAAqC;4BAC/C,QAAQ,EAAE;gCACR;oCACE,QAAQ,EAAE,mCAAmC;oCAC7C,KAAK,EAAE,oBAAoB;oCAC3B,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE;wCACP,OAAO,EAAE,wBAAwB;wCACjC,IAAI,EAAE;4CACJ,SAAS,EAAE,kCAAkC;yCAC9C;qCACF;iCACF;6BACF;yBACF;wBACD;4BACE,IAAI,EAAE,SAAS;4BACf,QAAQ,EAAE,uCAAuC;4BACjD,QAAQ,EAAE;gCACR;oCACE,KAAK,EAAE,sCAAsC;oCAC7C,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE;wCACP,OAAO,EAAE,4BAA4B;qCACtC;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* complete edit uiSchema for Hub Projects - this defines
|
|
6
|
+
* how the schema properties should be rendered in the
|
|
7
|
+
* project 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
|
+
},
|
|
21
|
+
{
|
|
22
|
+
labelKey: "{{i18nScope}}.fields.summary.label",
|
|
23
|
+
scope: "/properties/summary",
|
|
24
|
+
type: "Control",
|
|
25
|
+
options: {
|
|
26
|
+
control: "hub-field-input-input",
|
|
27
|
+
type: "textarea",
|
|
28
|
+
helperText: {
|
|
29
|
+
labelKey: "{{i18nScope}}.fields.summary.helperText",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
labelKey: "{{i18nScope}}.fields.description.label",
|
|
35
|
+
scope: "/properties/description",
|
|
36
|
+
type: "Control",
|
|
37
|
+
options: {
|
|
38
|
+
control: "hub-field-input-input",
|
|
39
|
+
type: "textarea",
|
|
40
|
+
helperText: {
|
|
41
|
+
labelKey: "{{i18nScope}}.fields.description.helperText",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.label",
|
|
47
|
+
scope: "/properties/view/properties/featuredImage",
|
|
48
|
+
type: "Control",
|
|
49
|
+
options: {
|
|
50
|
+
control: "hub-field-input-image-picker",
|
|
51
|
+
maxWidth: 727,
|
|
52
|
+
maxHeight: 484,
|
|
53
|
+
aspectRatio: 1.5,
|
|
54
|
+
helperText: {
|
|
55
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.helperText",
|
|
56
|
+
},
|
|
57
|
+
sizeDescription: {
|
|
58
|
+
labelKey: "{{i18nScope}}.fields.featuredImage.sizeDescription",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "Section",
|
|
66
|
+
labelKey: "{{i18nScope}}.sections.location.label",
|
|
67
|
+
elements: [
|
|
68
|
+
{
|
|
69
|
+
scope: "/properties/extent",
|
|
70
|
+
type: "Control",
|
|
71
|
+
options: {
|
|
72
|
+
control: "hub-field-input-boundary-picker",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
labelKey: "{{i18nScope}}.fields.showMap.label",
|
|
77
|
+
scope: "/properties/view/properties/showMap",
|
|
78
|
+
type: "Control",
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: "Section",
|
|
84
|
+
labelKey: "{{i18nScope}}.sections.status.label",
|
|
85
|
+
elements: [
|
|
86
|
+
{
|
|
87
|
+
scope: "/properties/status",
|
|
88
|
+
type: "Control",
|
|
89
|
+
labelKey: "{{i18nScope}}.fields.status.label",
|
|
90
|
+
options: {
|
|
91
|
+
control: "hub-field-input-select",
|
|
92
|
+
enum: {
|
|
93
|
+
i18nScope: "{{i18nScope}}.fields.status.enum",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: "Section",
|
|
101
|
+
labelKey: "{{i18nScope}}.sections.timeline.label",
|
|
102
|
+
elements: [
|
|
103
|
+
{
|
|
104
|
+
scope: "/properties/view/properties/timeline",
|
|
105
|
+
type: "Control",
|
|
106
|
+
options: {
|
|
107
|
+
control: "arcgis-hub-timeline-editor",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: "Section",
|
|
114
|
+
labelKey: "{{i18nScope}}.sections.featuredContent.label",
|
|
115
|
+
options: {
|
|
116
|
+
helperText: {
|
|
117
|
+
labelKey: "{{i18nScope}}.sections.featuredContent.helperText",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
elements: [
|
|
121
|
+
{
|
|
122
|
+
scope: "/properties/view/properties/featuredContentIds",
|
|
123
|
+
type: "Control",
|
|
124
|
+
options: {
|
|
125
|
+
control: "hub-field-input-gallery-picker",
|
|
126
|
+
targetEntity: "item",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=ProjectUiSchemaEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectUiSchemaEdit.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;iBAChB;gBACD;oBACE,QAAQ,EAAE,oCAAoC;oBAC9C,KAAK,EAAE,qBAAqB;oBAC5B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,uBAAuB;wBAChC,IAAI,EAAE,UAAU;wBAChB,UAAU,EAAE;4BACV,QAAQ,EAAE,yCAAyC;yBACpD;qBACF;iBACF;gBACD;oBACE,QAAQ,EAAE,wCAAwC;oBAClD,KAAK,EAAE,yBAAyB;oBAChC,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,uBAAuB;wBAChC,IAAI,EAAE,UAAU;wBAChB,UAAU,EAAE;4BACV,QAAQ,EAAE,6CAA6C;yBACxD;qBACF;iBACF;gBACD;oBACE,QAAQ,EAAE,0CAA0C;oBACpD,KAAK,EAAE,2CAA2C;oBAClD,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,8BAA8B;wBACvC,QAAQ,EA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AY,EAAE,MAAM;qBACrB;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -8,14 +8,11 @@ const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
|
|
|
8
8
|
const PropertyMapper_1 = require("../core/_internal/PropertyMapper");
|
|
9
9
|
const types_1 = require("../core/types");
|
|
10
10
|
const defaults_1 = require("./defaults");
|
|
11
|
-
const schemas_1 = require("../core/schemas");
|
|
12
|
-
const internal_1 = require("../core/schemas/internal");
|
|
13
|
-
const applyUiSchemaElementOptions_1 = require("../core/schemas/internal/applyUiSchemaElementOptions");
|
|
14
11
|
const computeProps_1 = require("./_internal/computeProps");
|
|
15
12
|
const getPropertyMap_1 = require("./_internal/getPropertyMap");
|
|
16
13
|
const util_1 = require("../util");
|
|
17
|
-
const interpolate_1 = require("../items/interpolate");
|
|
18
14
|
const configureBaseResources_1 = require("../core/_internal/configureBaseResources");
|
|
15
|
+
const schemas_1 = require("../core/schemas");
|
|
19
16
|
/**
|
|
20
17
|
* @private
|
|
21
18
|
* Create a new Hub Project item
|
|
@@ -110,37 +107,19 @@ async function deleteProject(id, requestOptions) {
|
|
|
110
107
|
}
|
|
111
108
|
exports.deleteProject = deleteProject;
|
|
112
109
|
/**
|
|
110
|
+
* DEPRECATED: the following will be removed at next breaking version
|
|
111
|
+
* use the getEntityEditorSchemas function instead (which this function
|
|
112
|
+
* has already been refactored to consume)
|
|
113
|
+
*
|
|
113
114
|
* Get the editor config for for the HubProject entity.
|
|
114
|
-
* @param i18nScope
|
|
115
|
-
* @param type
|
|
116
|
-
* @param options
|
|
117
|
-
* @returns
|
|
115
|
+
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
116
|
+
* @param type editor type - corresonds to the returned uiSchema
|
|
117
|
+
* @param options optional hash of dynamic uiSchema element options
|
|
118
118
|
*/
|
|
119
|
+
/* istanbul ignore next deprecated */
|
|
119
120
|
async function getHubProjectEditorConfig(i18nScope, type, options = []) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// uiSchema is the complete (edit) schema, unless otherwise specified
|
|
123
|
-
let uiSchema = util_1.cloneObject(schemas_1.HubProjectEditUiSchema);
|
|
124
|
-
// by default we don't need to filter the schema b/c it's the entire schema
|
|
125
|
-
let filterSchema = false;
|
|
126
|
-
// if another schema is requested, we need to use that UI schema
|
|
127
|
-
// and the subset the overall schema down to just the properties
|
|
128
|
-
// used in the UI schema
|
|
129
|
-
switch (type) {
|
|
130
|
-
case "create":
|
|
131
|
-
uiSchema = util_1.cloneObject(schemas_1.HubProjectCreateUiSchema);
|
|
132
|
-
filterSchema = true;
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
if (filterSchema) {
|
|
136
|
-
// filter out properties not used in the UI schema
|
|
137
|
-
schema = internal_1.filterSchemaToUiSchema(schema, uiSchema);
|
|
138
|
-
}
|
|
139
|
-
// apply the options
|
|
140
|
-
uiSchema = applyUiSchemaElementOptions_1.applyUiSchemaElementOptions(uiSchema, options);
|
|
141
|
-
// interpolate the i18n scope into the uiSchema
|
|
142
|
-
uiSchema = interpolate_1.interpolate(uiSchema, { i18nScope });
|
|
143
|
-
return Promise.resolve({ schema, uiSchema });
|
|
121
|
+
const editorType = `hub:project:${type}`;
|
|
122
|
+
return schemas_1.getEntityEditorSchemas(i18nScope, editorType, options);
|
|
144
123
|
}
|
|
145
124
|
exports.getHubProjectEditorConfig = getHubProjectEditorConfig;
|
|
146
125
|
//# sourceMappingURL=edit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../src/projects/edit.ts"],"names":[],"mappings":";;;AAEA,4EAA4E;AAC5E,sCAKmB;AACnB,0CAA8E;
|
|
1
|
+
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../src/projects/edit.ts"],"names":[],"mappings":";;;AAEA,4EAA4E;AAC5E,sCAKmB;AACnB,0CAA8E;AAC9E,iEAAwE;AACxE,qEAAkE;AAClE,yCAA+D;AAC/D,yCAA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8CAA8C;IAC9C,IAAI,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACjE,cAAc,GAAG,2BAAY,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACrE,qEAAqE;IACrE,uCAAuC;IACvC,OAAO,cAA6B,CAAC;AACvC,CAAC;AA1CD,sCA0CC;AAED;;;;;GAKG;AACI,KAAK,UAAU,aAAa,CACjC,EAAU,EACV,cAAmC;IAEnC,MAAM,EAAE,GAAG,gCAAK,cAAc,GAAK,EAAE,EAAE,EAAE,CAAsB,CAAC;IAChE,MAAM,+BAAU,CAAC,EAAE,CAAC,CAAC;IACrB,OAAO;AACT,CAAC;AAPD,sCAOC;AAED;;;;;;;;;GASG;AACH,qCAAqC;AAC9B,KAAK,UAAU,yBAAyB,CAC7C,SAAiB,EACjB,IAAsB,EACtB,UAAoC,EAAE;IAEtC,MAAM,UAAU,GAAG,eAAe,IAAI,EAAuB,CAAC;IAE9D,OAAO,gCAAsB,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AARD,8DAQC"}
|
|
@@ -107,6 +107,7 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
|
|
|
107
107
|
server?: Partial<import("@esri/arcgis-rest-feature-layer").IFeatureServiceDefinition>;
|
|
108
108
|
layers?: Partial<ILayerDefinition>[];
|
|
109
109
|
recordCount?: number;
|
|
110
|
+
servicesDirectoryDisabled?: boolean;
|
|
110
111
|
created: number;
|
|
111
112
|
modified: number;
|
|
112
113
|
numViews: number;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { IConfigurationSchema, IUiSchema, UiSchemaElementOptions } from "../schemas";
|
|
1
|
+
import { IConfigurationSchema, IUiSchema, UiSchemaElementOptions, EditorType } from "../schemas";
|
|
2
|
+
/**
|
|
3
|
+
* DEPRECATED: the following will be removed at next breaking version
|
|
4
|
+
* we will be shifting towards the EditorType defined in the schemas
|
|
5
|
+
* directory
|
|
6
|
+
*/
|
|
2
7
|
export declare type EditorConfigType = "create" | "edit";
|
|
3
8
|
export interface IEditorConfig {
|
|
4
9
|
schema: IConfigurationSchema;
|
|
@@ -8,5 +13,5 @@ export interface IEditorConfig {
|
|
|
8
13
|
*
|
|
9
14
|
*/
|
|
10
15
|
export interface IWithEditorBehavior {
|
|
11
|
-
getEditorConfig(i18nScope: string, type:
|
|
16
|
+
getEditorConfig(i18nScope: string, type: EditorType, options: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
12
17
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IEditorConfig } from "../behaviors";
|
|
2
|
+
import { UiSchemaElementOptions } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* defines the possible editor type values - these correspond
|
|
5
|
+
* to the supported/defined uiSchema configurations
|
|
6
|
+
*/
|
|
7
|
+
export declare type EditorType = (typeof validEditorTypes)[number];
|
|
8
|
+
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit"];
|
|
9
|
+
/**
|
|
10
|
+
* get the editor schema and uiSchema defined for an entity.
|
|
11
|
+
* The schema and uiSchema that are returned can be used to
|
|
12
|
+
* render a form UI (using the configuration editor)
|
|
13
|
+
*
|
|
14
|
+
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
15
|
+
* @param type editor type - corresonds to the returned uiSchema
|
|
16
|
+
* @param options optional hash of dynamic uiSchema element options
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
export declare const getEntityEditorSchemas: (i18nScope: string, type: EditorType, options?: UiSchemaElementOptions[]) => Promise<IEditorConfig>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./getEntityEditorSchemas";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./subschemas";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For consistency and validation purposes, leverage these commonly
|
|
3
|
+
* re-used subschemas in your schema definitions
|
|
4
|
+
*/
|
|
5
|
+
export declare const ENTITY_NAME_SCHEMA: {
|
|
6
|
+
type: string;
|
|
7
|
+
minLength: number;
|
|
8
|
+
maxLength: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const ENTITY_EXTENT_SCHEMA: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
spatialReference: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
xmax: {
|
|
17
|
+
type: string[];
|
|
18
|
+
};
|
|
19
|
+
xmin: {
|
|
20
|
+
type: string[];
|
|
21
|
+
};
|
|
22
|
+
ymax: {
|
|
23
|
+
type: string[];
|
|
24
|
+
};
|
|
25
|
+
ymin: {
|
|
26
|
+
type: string[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { IWithLayout, IWithPermissions, IWithSlug, IWithCatalog } from "../traits/index";
|
|
2
2
|
import { IHubItemEntity } from "./IHubItemEntity";
|
|
3
|
-
import { IHubTimeline } from "./IHubTimeline";
|
|
4
3
|
/**
|
|
5
4
|
* Defines the properties of a Hub Project object
|
|
6
5
|
*/
|
|
7
6
|
export interface IHubProject extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions {
|
|
8
|
-
/**
|
|
9
|
-
* Timeline for the project
|
|
10
|
-
*/
|
|
11
|
-
timeline?: IHubTimeline;
|
|
12
|
-
/**
|
|
13
|
-
* Project Status
|
|
14
|
-
*/
|
|
15
7
|
status: PROJECT_STATUSES;
|
|
16
8
|
}
|
|
17
9
|
export declare enum PROJECT_STATUSES {
|
|
@@ -6,4 +6,6 @@ export interface IServerEnrichments {
|
|
|
6
6
|
layers?: Array<Partial<ILayerDefinition>>;
|
|
7
7
|
/** The count of records for the layer referenced by this content */
|
|
8
8
|
recordCount?: number | null;
|
|
9
|
+
/** If the server's services directory is disabled. See https://enterprise.arcgis.com/en/server/latest/administer/linux/disabling-the-services-directory.htm */
|
|
10
|
+
servicesDirectoryDisabled?: boolean;
|
|
9
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IHubInitiative, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior } from "../core";
|
|
1
|
+
import { IHubInitiative, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IEditorConfig } from "../core";
|
|
2
2
|
import { Catalog } from "../search";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
|
+
import { InitiativeEditorType } from "./_internal/InitiativeSchema";
|
|
5
6
|
/**
|
|
6
7
|
* Hub Initiative Class
|
|
7
8
|
*/
|
|
@@ -41,11 +42,16 @@ export declare class HubInitiative extends HubItemEntity<IHubInitiative> impleme
|
|
|
41
42
|
*/
|
|
42
43
|
static fetch(identifier: string, context: IArcGISContext): Promise<HubInitiative>;
|
|
43
44
|
/**
|
|
44
|
-
* Static method to get the editor config for
|
|
45
|
-
* @param i18nScope
|
|
46
|
-
* @param type
|
|
47
|
-
* @param options
|
|
45
|
+
* Static method to get the editor config for the HubInitiative entity.
|
|
46
|
+
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
47
|
+
* @param type editor type - corresonds to the returned uiSchema
|
|
48
|
+
* @param options optional hash of dynamic uiSchema element options
|
|
49
|
+
*
|
|
50
|
+
* Note: typescript does not have a means to specify static methods in interfaces
|
|
51
|
+
* so while this is the implementation of IWithEditorBehavior, it is not enforced
|
|
52
|
+
* by the compiler.
|
|
48
53
|
*/
|
|
54
|
+
static getEditorConfig(i18nScope: string, type: InitiativeEditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
49
55
|
private static applyDefaults;
|
|
50
56
|
/**
|
|
51
57
|
* Apply a new state to the instance
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfigurationSchema } from "../../core";
|
|
2
|
+
export declare type InitiativeEditorType = (typeof InitiativeEditorTypes)[number];
|
|
3
|
+
export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit"];
|
|
4
|
+
/**
|
|
5
|
+
* defines the JSON schema for a Hub Initiative's editable fields
|
|
6
|
+
*/
|
|
7
|
+
export declare const InitiativeSchema: IConfigurationSchema;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IItem } from "@esri/arcgis-rest-types";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if a server's services directory is disabled. Consider hoisting this to RESTJS
|
|
5
|
+
* @param idOrItem A feature service ID or item
|
|
6
|
+
* @param requestOptions Request options
|
|
7
|
+
* @returns Promise that resolves boolean
|
|
8
|
+
*/
|
|
9
|
+
export declare const isServicesDirectoryDisabled: (idOrItem: string | IItem, requestOptions: IRequestOptions) => Promise<boolean>;
|
|
@@ -2,7 +2,8 @@ import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBeha
|
|
|
2
2
|
import { Catalog } from "../search";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
|
-
import {
|
|
5
|
+
import { IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
|
|
6
|
+
import { ProjectEditorType } from "./_internal/ProjectSchema";
|
|
6
7
|
/**
|
|
7
8
|
* Hub Project Class
|
|
8
9
|
*/
|
|
@@ -42,15 +43,16 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
|
|
|
42
43
|
*/
|
|
43
44
|
static fetch(identifier: string, context: IArcGISContext): Promise<HubProject>;
|
|
44
45
|
/**
|
|
45
|
-
* Static method to get the editor config for
|
|
46
|
-
* @param i18nScope
|
|
47
|
-
* @param type
|
|
48
|
-
* @param options
|
|
46
|
+
* Static method to get the editor config for the HubProject entity.
|
|
47
|
+
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
48
|
+
* @param type editor type - corresonds to the returned uiSchema
|
|
49
|
+
* @param options optional hash of dynamic uiSchema element options
|
|
50
|
+
*
|
|
49
51
|
* Note: typescript does not have a means to specify static methods in interfaces
|
|
50
52
|
* so while this is the implementation of IWithEditorBehavior, it is not enforced
|
|
51
53
|
* by the compiler.
|
|
52
54
|
*/
|
|
53
|
-
static getEditorConfig(i18nScope: string, type:
|
|
55
|
+
static getEditorConfig(i18nScope: string, type: ProjectEditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
54
56
|
private static applyDefaults;
|
|
55
57
|
/**
|
|
56
58
|
* Apply a new state to the instance
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfigurationSchema } from "../../core";
|
|
2
|
+
export declare type ProjectEditorType = (typeof ProjectEditorTypes)[number];
|
|
3
|
+
export declare const ProjectEditorTypes: readonly ["hub:project:create", "hub:project:edit"];
|
|
4
|
+
/**
|
|
5
|
+
* defines the JSON schema for a Hub Project's editable fields
|
|
6
|
+
*/
|
|
7
|
+
export declare const ProjectSchema: IConfigurationSchema;
|