@esri/hub-common 14.102.0 → 14.104.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/ArcGISContext.js +12 -0
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/core/schemas/internal/getEditorSchemas.js +1 -0
- package/dist/esm/core/schemas/internal/getEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js +238 -0
- package/dist/esm/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js.map +1 -0
- package/dist/esm/core/schemas/internal/metrics/MetricSchema.js +5 -0
- package/dist/esm/core/schemas/internal/metrics/MetricSchema.js.map +1 -1
- package/dist/esm/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js +31 -31
- package/dist/esm/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js.map +1 -1
- package/dist/esm/core/schemas/internal/metrics/definitions.js +80 -0
- package/dist/esm/core/schemas/internal/metrics/definitions.js.map +1 -0
- package/dist/esm/core/schemas/internal/metrics/interfaces.js.map +1 -1
- package/dist/esm/core/schemas/internal/metrics/rules.js +6 -0
- package/dist/esm/core/schemas/internal/metrics/rules.js.map +1 -1
- package/dist/esm/events/api/events.js +11 -15
- package/dist/esm/events/api/events.js.map +1 -1
- package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
- package/dist/esm/events/api/orval/awaited-type.js +1 -0
- package/dist/esm/events/api/orval/awaited-type.js.map +1 -0
- package/dist/esm/initiatives/HubInitiative.js +29 -43
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/initiatives/HubInitiatives.js +25 -9
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js +5 -0
- package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js +12 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/esm/initiatives/defaults.js +2 -0
- package/dist/esm/initiatives/defaults.js.map +1 -1
- package/dist/esm/projects/HubProject.js +23 -63
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +5 -24
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/esm/projects/edit.js +24 -9
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/esm/surveys/utils/get-s123-share-url.js +4 -0
- package/dist/esm/surveys/utils/get-s123-share-url.js.map +1 -0
- package/dist/esm/surveys/utils/index.js +1 -0
- package/dist/esm/surveys/utils/index.js.map +1 -1
- package/dist/node/ArcGISContext.js +12 -0
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/core/schemas/internal/getEditorSchemas.js +1 -0
- package/dist/node/core/schemas/internal/getEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js +241 -0
- package/dist/node/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js.map +1 -0
- package/dist/node/core/schemas/internal/metrics/MetricSchema.js +5 -0
- package/dist/node/core/schemas/internal/metrics/MetricSchema.js.map +1 -1
- package/dist/node/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js +31 -31
- package/dist/node/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js.map +1 -1
- package/dist/node/core/schemas/internal/metrics/definitions.js +83 -0
- package/dist/node/core/schemas/internal/metrics/definitions.js.map +1 -0
- package/dist/node/core/schemas/internal/metrics/interfaces.js.map +1 -1
- package/dist/node/core/schemas/internal/metrics/rules.js +6 -0
- package/dist/node/core/schemas/internal/metrics/rules.js.map +1 -1
- package/dist/node/events/api/events.js +12 -15
- package/dist/node/events/api/events.js.map +1 -1
- package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
- package/dist/node/events/api/orval/{async-return-type.js → awaited-type.js} +1 -1
- package/dist/node/events/api/orval/awaited-type.js.map +1 -0
- package/dist/node/initiatives/HubInitiative.js +28 -42
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/initiatives/HubInitiatives.js +24 -8
- package/dist/node/initiatives/HubInitiatives.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeBusinessRules.js +5 -0
- package/dist/node/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js +12 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/node/initiatives/defaults.js +2 -0
- package/dist/node/initiatives/defaults.js.map +1 -1
- package/dist/node/projects/HubProject.js +22 -62
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +5 -24
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/node/projects/edit.js +23 -8
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/node/surveys/utils/get-s123-share-url.js +8 -0
- package/dist/node/surveys/utils/get-s123-share-url.js.map +1 -0
- package/dist/node/surveys/utils/index.js +1 -0
- package/dist/node/surveys/utils/index.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +8 -0
- package/dist/types/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.d.ts +16 -0
- package/dist/types/core/schemas/internal/metrics/definitions.d.ts +92 -0
- package/dist/types/core/schemas/internal/metrics/rules.d.ts +7 -85
- package/dist/types/core/schemas/types.d.ts +2 -2
- package/dist/types/events/api/events.d.ts +8 -1
- package/dist/types/events/api/orval/api/orval-events.d.ts +30 -21
- package/dist/types/events/api/orval/awaited-type.d.ts +5 -0
- package/dist/types/initiatives/_internal/InitiativeBusinessRules.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeSchema.d.ts +1 -1
- package/dist/types/surveys/utils/get-s123-share-url.d.ts +2 -0
- package/dist/types/surveys/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/events/api/orval/async-return-type.js +0 -1
- package/dist/esm/events/api/orval/async-return-type.js.map +0 -1
- package/dist/node/events/api/orval/async-return-type.js.map +0 -1
- package/dist/types/events/api/orval/async-return-type.d.ts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HubProject.js","sourceRoot":"","sources":["../../../src/projects/HubProject.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAa7C,+CAA4C;AAE5C,yDAAsD;AAItD,qEAAkE;AAElE,8DAA8D;AAC9D,mCAAuC;AAGvC,kEAA+D;AAC/D,4DAAyD;AAKzD,iCAA4C;AAC5C,kCAA0D;AAC1D,iCAAuE;AAEvE,uDAAoD;AACpD,wCAAqD;AAErD,oFAAiF;
|
|
1
|
+
{"version":3,"file":"HubProject.js","sourceRoot":"","sources":["../../../src/projects/HubProject.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAa7C,+CAA4C;AAE5C,yDAAsD;AAItD,qEAAkE;AAElE,8DAA8D;AAC9D,mCAAuC;AAGvC,kEAA+D;AAC/D,4DAAyD;AAKzD,iCAA4C;AAC5C,kCAA0D;AAC1D,iCAAuE;AAEvE,uDAAoD;AACpD,wCAAqD;AAErD,oFAAiF;AAEjF,gEAA6D;AAC7D,sEAAmE;AACnE,gEAA6D;AAE7D;;GAEG;AACH,MAAa,UACX,SAAQ,6BAA0B;IAWlC;;;;OAIG;IACH,YAAoB,OAAoB,EAAE,OAAuB;QAC/D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,iBAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CACb,IAA0B,EAC1B,OAAuB;QAEvB,6CAA6C;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAA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,OAAO,CAAC,kBAAkB,CAChC,CAAC;SACH;aAAM;YACL,YAAY;YACZ,IAAI,CAAC,MAAM,GAAG,MAAM,oBAAa,CAC/B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAChC,CAAC;SACH;QACD,yCAAyC;QACzC,MAAM,KAAK,CAAC,SAAS,EAAE,CAAC;QAExB,OAAO;IACT,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM;QACV,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACrD;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,MAAM,EAAE,aAAa,EAAE,GAAG,2CAAa,QAAQ,EAAC,CAAC;QACjD,wBAAwB;QACxB,MAAM,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvE,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,QAAgB;QAC5B,MAAM,OAAO,GAAG,mCAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;QACtD,oBAAoB;QACpB,IAAI,MAAM,EAAE;YACV,OAAO,6BAAa,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SAC5C;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,UAAU,QAAQ,aAAa,CAAC,CAAC;SAClD;IACH,CAAC;CACF;AArWD,gCAqWC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProjectSchema = exports.ProjectEditorTypes = void 0;
|
|
4
4
|
const MetricSchema_1 = require("../../core/schemas/internal/metrics/MetricSchema");
|
|
5
|
+
const definitions_1 = require("../../core/schemas/internal/metrics/definitions");
|
|
5
6
|
const HubItemEntitySchema_1 = require("../../core/schemas/shared/HubItemEntitySchema");
|
|
6
7
|
const types_1 = require("../../types");
|
|
7
8
|
exports.ProjectEditorTypes = [
|
|
@@ -22,30 +23,10 @@ exports.ProjectSchema = Object.assign(Object.assign({}, HubItemEntitySchema_1.Hu
|
|
|
22
23
|
}, _metric: {
|
|
23
24
|
type: "object",
|
|
24
25
|
required: ["cardTitle"],
|
|
25
|
-
properties:
|
|
26
|
-
type: "string",
|
|
27
|
-
minLength: 1,
|
|
28
|
-
} }),
|
|
26
|
+
properties: MetricSchema_1.MetricSchema.properties,
|
|
29
27
|
} }), allOf: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
_metric: {
|
|
34
|
-
properties: {
|
|
35
|
-
type: {
|
|
36
|
-
const: "static",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
then: {
|
|
43
|
-
properties: {
|
|
44
|
-
_metric: {
|
|
45
|
-
required: ["value"],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
28
|
+
definitions_1.IF_SOURCE_TITLE_THEN_SOURCE_LINK,
|
|
29
|
+
definitions_1.IF_STATIC_THEN_REQUIRE_VALUE,
|
|
30
|
+
definitions_1.VALUE_TYPE_MAPPING,
|
|
50
31
|
] });
|
|
51
32
|
//# sourceMappingURL=ProjectSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":";;;AAAA,mFAAgF;AAChF,uFAAoF;AAEpF,uCAA8C;AAGjC,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;CACb,CAAC;AAEX;;GAEG;AACU,QAAA,aAAa,GAAyB,gCAC9C,yCAAmB,KACtB,UAAU,kCACL,yCAAmB,CAAC,UAAU,KACjC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,EACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAe,CAAC,UAAU;YACnC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAe,CAAC;SACnC,EACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,UAAU,
|
|
1
|
+
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":";;;AAAA,mFAAgF;AAChF,iFAIyD;AACzD,uFAAoF;AAEpF,uCAA8C;AAGjC,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;CACb,CAAC;AAEX;;GAEG;AACU,QAAA,aAAa,GAAyB,gCAC9C,yCAAmB,KACtB,UAAU,kCACL,yCAAmB,CAAC,UAAU,KACjC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,EACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAe,CAAC,UAAU;YACnC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAe,CAAC;SACnC,EACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,UAAU,EAAE,2BAAY,CAAC,UAAU;SACpC,KAEH,KAAK,EAAE;QACL,8CAAgC;QAChC,0CAA4B;QAC5B,gCAAkB;KACnB,GACsB,CAAC"}
|
|
@@ -12,6 +12,8 @@ const getPropertyMap_1 = require("./_internal/getPropertyMap");
|
|
|
12
12
|
const util_1 = require("../util");
|
|
13
13
|
const discussions_1 = require("../discussions");
|
|
14
14
|
const setEntityStatusKeyword_1 = require("../utils/internal/setEntityStatusKeyword");
|
|
15
|
+
const editorToMetric_1 = require("../core/schemas/internal/metrics/editorToMetric");
|
|
16
|
+
const setMetricAndDisplay_1 = require("../core/schemas/internal/metrics/setMetricAndDisplay");
|
|
15
17
|
/**
|
|
16
18
|
* @private
|
|
17
19
|
* Create a new Hub Project item
|
|
@@ -55,16 +57,29 @@ exports.createProject = createProject;
|
|
|
55
57
|
* @returns
|
|
56
58
|
*/
|
|
57
59
|
function editorToProject(editor, portal) {
|
|
58
|
-
var _a;
|
|
59
|
-
|
|
60
|
+
var _a, _b;
|
|
61
|
+
const _metric = editor._metric;
|
|
62
|
+
// 1. remove the ephemeral props we graft onto the editor
|
|
60
63
|
delete editor._groups;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
delete editor._thumbnail;
|
|
65
|
+
(_a = editor.view) === null || _a === void 0 ? true : delete _a.featuredImage;
|
|
66
|
+
delete editor._metric;
|
|
67
|
+
delete editor._groups;
|
|
68
|
+
// 2. clone into a HubProject and ensure there's an orgUrlKey
|
|
69
|
+
let project = util_1.cloneObject(editor);
|
|
64
70
|
project.orgUrlKey = editor.orgUrlKey ? editor.orgUrlKey : portal.urlKey;
|
|
65
|
-
// copy the location extent up one level
|
|
66
|
-
project.extent = (
|
|
67
|
-
//
|
|
71
|
+
// 3. copy the location extent up one level
|
|
72
|
+
project.extent = (_b = editor.location) === null || _b === void 0 ? void 0 : _b.extent;
|
|
73
|
+
// 4. handle configured metric:
|
|
74
|
+
// a. transform editor values into metric + displayConfig
|
|
75
|
+
// b. set metric and displayConfig on project
|
|
76
|
+
if (_metric && Object.keys(_metric).length) {
|
|
77
|
+
const metricId = _metric.metricId || util_1.createId(util_1.camelize(`${_metric.cardTitle}_`));
|
|
78
|
+
const { metric, displayConfig } = editorToMetric_1.editorToMetric(_metric, metricId, {
|
|
79
|
+
metricName: _metric.cardTitle,
|
|
80
|
+
});
|
|
81
|
+
project = setMetricAndDisplay_1.setMetricAndDisplay(project, metric, displayConfig);
|
|
82
|
+
}
|
|
68
83
|
return project;
|
|
69
84
|
}
|
|
70
85
|
exports.editorToProject = editorToProject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../src/projects/edit.ts"],"names":[],"mappings":";;;AAEA,4EAA4E;AAC5E,sCAA+D;AAC/D,0CAA8E;AAC9E,iEAIkC;AAClC,qEAAkE;AAElE,yCAAoE;AACpE,2DAAwD;AACxD,+DAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../src/projects/edit.ts"],"names":[],"mappings":";;;AAEA,4EAA4E;AAC5E,sCAA+D;AAC/D,0CAA8E;AAC9E,iEAIkC;AAClC,qEAAkE;AAElE,yCAAoE;AACpE,2DAAwD;AACxD,+DAA4D;AAC5D,kCAA0D;AAC1D,gDAAuD;AAEvD,qFAAkF;AAClF,oFAAiF;AACjF,8FAA2F;AAE3F;;;;;;;;GAQG;AACI,KAAK,UAAU,aAAa,CACjC,cAAoC,EACpC,cAAmC;IAEnC,kCAAkC;IAClC,2CAA2C;IAC3C,MAAM,OAAO,mCAAQ,0BAAe,GAAK,cAAc,CAAE,CAAC;IAE1D,uDAAuD;IACvD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QACjB,OAAO,CAAC,IAAI,GAAG,qBAAa,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;KAC/D;IACD,yBAAyB;IACzB,OAAO,CAAC,IAAI,GAAG,MAAM,qBAAa,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,cAAc,CAAC,CAAC;IAC3E,kCAAkC;IAClC,OAAO,CAAC,YAAY,GAAG,sBAAc,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,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c,EAAE,CACjB,CAAC;IAEF,mEAAmE;IACnE,0EAA0E;IAC1E,wEAAwE;IACxE,sDAAsD;IACtD,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3D,0BAA0B;IAC1B,MAAM,YAAY,GAAG,MAAM,oBAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACtE,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;AAvCD,sCAuCC;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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getS123ShareUrl = void 0;
|
|
4
|
+
function getS123ShareUrl(id, context) {
|
|
5
|
+
return `${context.survey123Url}/share/${id}?portalUrl=${encodeURIComponent(context.portalUrl)}`;
|
|
6
|
+
}
|
|
7
|
+
exports.getS123ShareUrl = getS123ShareUrl;
|
|
8
|
+
//# sourceMappingURL=get-s123-share-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-s123-share-url.js","sourceRoot":"","sources":["../../../../src/surveys/utils/get-s123-share-url.ts"],"names":[],"mappings":";;;AAEA,SAAgB,eAAe,CAAC,EAAU,EAAE,OAAuB;IACjE,OAAO,GAAG,OAAO,CAAC,YAAY,UAAU,EAAE,cAAc,kBAAkB,CACxE,OAAO,CAAC,SAAS,CAClB,EAAE,CAAC;AACN,CAAC;AAJD,0CAIC"}
|
|
@@ -6,6 +6,7 @@ tslib_1.__exportStar(require("./get-form-info-json"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./get-form-json"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./get-input-feature-service-model"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./get-map-question"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./get-s123-share-url"), exports);
|
|
9
10
|
tslib_1.__exportStar(require("./get-source-feature-service-model-from-fieldworker"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./get-stakeholder-model"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./get-survey-models"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/surveys/utils/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,+DAAqC;AACrC,0DAAgC;AAChC,4EAAkD;AAClD,6DAAmC;AACnC,8FAAoE;AACpE,kEAAwC;AACxC,8DAAoC;AACpC,6DAAmC;AACnC,gEAAsC;AACtC,4DAAkC;AAClC,6DAAmC;AACnC,iEAAuC;AACvC,oEAA0C;AAC1C,+DAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/surveys/utils/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,+DAAqC;AACrC,0DAAgC;AAChC,4EAAkD;AAClD,6DAAmC;AACnC,+DAAqC;AACrC,8FAAoE;AACpE,kEAAwC;AACxC,8DAAoC;AACpC,6DAAmC;AACnC,gEAAsC;AACtC,4DAAkC;AAClC,6DAAmC;AACnC,iEAAuC;AACvC,oEAA0C;AAC1C,+DAAqC"}
|
|
@@ -197,6 +197,10 @@ export interface IArcGISContext {
|
|
|
197
197
|
* Return the portal thumbnail url
|
|
198
198
|
*/
|
|
199
199
|
orgThumbnailUrl: string;
|
|
200
|
+
/**
|
|
201
|
+
* Return the Survey123 url
|
|
202
|
+
*/
|
|
203
|
+
survey123Url: string;
|
|
200
204
|
/**
|
|
201
205
|
* Return the token for a given app, if defined
|
|
202
206
|
* @param app
|
|
@@ -507,6 +511,10 @@ export declare class ArcGISContext implements IArcGISContext {
|
|
|
507
511
|
*/
|
|
508
512
|
get userHubSettings(): IUserHubSettings;
|
|
509
513
|
get orgThumbnailUrl(): string;
|
|
514
|
+
/**
|
|
515
|
+
* Return the survey123 url
|
|
516
|
+
*/
|
|
517
|
+
get survey123Url(): string;
|
|
510
518
|
/**
|
|
511
519
|
* Return a token for a specific app
|
|
512
520
|
* @param app
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../../../ArcGISContext";
|
|
2
|
+
import { IUiSchema } from "../../types";
|
|
3
|
+
import { EntityEditorOptions } from "../EditorOptions";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* constructs the uiSchema for initiative metrics.
|
|
7
|
+
* This defines how the MetricSchema properties
|
|
8
|
+
* should render when creating/editing initiative
|
|
9
|
+
* metrics
|
|
10
|
+
*
|
|
11
|
+
* @param i18nScope
|
|
12
|
+
* @param config
|
|
13
|
+
* @param context
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare const buildUiSchema: (i18nScope: string, config: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const IF_STATIC_THEN_REQUIRE_VALUE: {
|
|
2
|
+
if: {
|
|
3
|
+
type: string;
|
|
4
|
+
properties: {
|
|
5
|
+
_metric: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
type: {
|
|
9
|
+
const: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
then: {
|
|
16
|
+
type: string;
|
|
17
|
+
properties: {
|
|
18
|
+
_metric: {
|
|
19
|
+
type: string;
|
|
20
|
+
required: string[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const IF_SOURCE_TITLE_THEN_SOURCE_LINK: {
|
|
26
|
+
if: {
|
|
27
|
+
type: string;
|
|
28
|
+
properties: {
|
|
29
|
+
_metric: {
|
|
30
|
+
type: string;
|
|
31
|
+
properties: {
|
|
32
|
+
sourceTitle: {
|
|
33
|
+
not: {
|
|
34
|
+
const: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
required: string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
then: {
|
|
43
|
+
type: string;
|
|
44
|
+
properties: {
|
|
45
|
+
_metric: {
|
|
46
|
+
type: string;
|
|
47
|
+
required: string[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const VALUE_TYPE_MAPPING: {
|
|
53
|
+
if: {
|
|
54
|
+
type: string;
|
|
55
|
+
properties: {
|
|
56
|
+
_metric: {
|
|
57
|
+
type: string;
|
|
58
|
+
properties: {
|
|
59
|
+
valueType: {
|
|
60
|
+
enum: string[];
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
then: {
|
|
67
|
+
type: string;
|
|
68
|
+
properties: {
|
|
69
|
+
_metric: {
|
|
70
|
+
type: string;
|
|
71
|
+
properties: {
|
|
72
|
+
value: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
else: {
|
|
80
|
+
type: string;
|
|
81
|
+
properties: {
|
|
82
|
+
_metric: {
|
|
83
|
+
type: string;
|
|
84
|
+
properties: {
|
|
85
|
+
value: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
@@ -1,91 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUiSchemaRule } from "../../types";
|
|
2
2
|
/**
|
|
3
3
|
* Shared metric rules for uiSchema
|
|
4
4
|
*/
|
|
5
5
|
/** Show if the type is set to static */
|
|
6
|
-
export declare const SHOW_FOR_STATIC_RULE_ENTITY:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
effect: UiSchemaRuleEffects;
|
|
14
|
-
};
|
|
15
|
-
export declare const SHOW_FOR_STATIC_AND_STRING_RULE_ENTITY: {
|
|
16
|
-
condition: {
|
|
17
|
-
schema: {
|
|
18
|
-
properties: {
|
|
19
|
-
_metric: {
|
|
20
|
-
properties: {
|
|
21
|
-
type: {
|
|
22
|
-
const: string;
|
|
23
|
-
};
|
|
24
|
-
valueType: {
|
|
25
|
-
const: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
effect: UiSchemaRuleEffects;
|
|
33
|
-
};
|
|
34
|
-
export declare const SHOW_FOR_STATIC_AND_NUMBER_RULE_ENTITY: {
|
|
35
|
-
condition: {
|
|
36
|
-
schema: {
|
|
37
|
-
properties: {
|
|
38
|
-
_metric: {
|
|
39
|
-
properties: {
|
|
40
|
-
type: {
|
|
41
|
-
const: string;
|
|
42
|
-
};
|
|
43
|
-
valueType: {
|
|
44
|
-
const: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
effect: UiSchemaRuleEffects;
|
|
52
|
-
};
|
|
53
|
-
export declare const SHOW_FOR_STATIC_AND_DATE_RULE_ENTITY: {
|
|
54
|
-
condition: {
|
|
55
|
-
schema: {
|
|
56
|
-
properties: {
|
|
57
|
-
_metric: {
|
|
58
|
-
properties: {
|
|
59
|
-
type: {
|
|
60
|
-
const: string;
|
|
61
|
-
};
|
|
62
|
-
valueType: {
|
|
63
|
-
const: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
effect: UiSchemaRuleEffects;
|
|
71
|
-
};
|
|
6
|
+
export declare const SHOW_FOR_STATIC_RULE_ENTITY: IUiSchemaRule;
|
|
7
|
+
export declare const SHOW_FOR_STATIC_AND_STRING_RULE_ENTITY: IUiSchemaRule;
|
|
8
|
+
export declare const SHOW_FOR_STATIC_AND_NUMBER_RULE_ENTITY: IUiSchemaRule;
|
|
9
|
+
export declare const SHOW_FOR_STATIC_AND_DATE_RULE_ENTITY: IUiSchemaRule;
|
|
72
10
|
/** Show if the type is set to dynamic */
|
|
73
|
-
export declare const SHOW_FOR_DYNAMIC_RULE_ENTITY:
|
|
74
|
-
condition: {
|
|
75
|
-
scope: string;
|
|
76
|
-
schema: {
|
|
77
|
-
const: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
effect: UiSchemaRuleEffects;
|
|
81
|
-
};
|
|
11
|
+
export declare const SHOW_FOR_DYNAMIC_RULE_ENTITY: IUiSchemaRule;
|
|
82
12
|
/** Show if sharing is enabled */
|
|
83
|
-
export declare const SHOW_FOR_SHARING_RULE_ENTITY:
|
|
84
|
-
condition: {
|
|
85
|
-
scope: string;
|
|
86
|
-
schema: {
|
|
87
|
-
const: boolean;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
effect: UiSchemaRuleEffects;
|
|
91
|
-
};
|
|
13
|
+
export declare const SHOW_FOR_SHARING_RULE_ENTITY: IUiSchemaRule;
|
|
@@ -12,7 +12,7 @@ export interface IEditorConfig {
|
|
|
12
12
|
* to the supported/defined uiSchema configurations
|
|
13
13
|
*/
|
|
14
14
|
export declare type EntityEditorType = (typeof validEntityEditorTypes)[number];
|
|
15
|
-
export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings"];
|
|
15
|
+
export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings"];
|
|
16
16
|
/** Defines the possible editor type values for a stat card. These
|
|
17
17
|
* correspond to the supported/defined uiSchema configurations. This should
|
|
18
18
|
* have its own signature in the getEditorConfig function.
|
|
@@ -36,7 +36,7 @@ export declare const validCardEditorTypes: readonly ["hub:card:stat", "hub:card:
|
|
|
36
36
|
* to defined schema/uiSchema configurations
|
|
37
37
|
*/
|
|
38
38
|
export declare type EditorType = (typeof validEditorTypes)[number];
|
|
39
|
-
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:card:stat", "hub:card:follow"];
|
|
39
|
+
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:card:stat", "hub:card:follow"];
|
|
40
40
|
/**
|
|
41
41
|
* An editor's module when dynamically imported depending on the EditorType. This
|
|
42
42
|
* will always have a buildUiSchema function, and sometimes it will have a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEvent, ICreateEventParams, IGetEventParams, IGetEventsParams, IDeleteEventParams } from "./types";
|
|
1
|
+
import { IEvent, ICreateEventParams, IGetEventParams, IGetEventsParams, IUpdateEventParams, IDeleteEventParams } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* create an event
|
|
4
4
|
*
|
|
@@ -20,6 +20,13 @@ export declare function getEvents(options: IGetEventsParams): Promise<IEvent[]>;
|
|
|
20
20
|
* @return {Promise<IEvent>}
|
|
21
21
|
*/
|
|
22
22
|
export declare function getEvent(options: IGetEventParams): Promise<IEvent>;
|
|
23
|
+
/**
|
|
24
|
+
* update an event
|
|
25
|
+
*
|
|
26
|
+
* @param {IUpdateEventParams} options
|
|
27
|
+
* @return {Promise<IEvent>}
|
|
28
|
+
*/
|
|
29
|
+
export declare function updateEvent(options: IUpdateEventParams): Promise<IEvent>;
|
|
23
30
|
/**
|
|
24
31
|
* delete an event
|
|
25
32
|
*
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* Hub Events Service
|
|
5
5
|
* OpenAPI spec version: 0.0.1
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { Awaited } from "../awaited-type";
|
|
8
8
|
import { customClient } from "../custom-client";
|
|
9
9
|
export declare type GetEventsParams = {
|
|
10
10
|
/**
|
|
11
11
|
* Include registrations with each event
|
|
12
12
|
*/
|
|
13
|
-
includeRegistrations?:
|
|
13
|
+
includeRegistrations?: string;
|
|
14
14
|
/**
|
|
15
15
|
* Include creator with each event
|
|
16
16
|
*/
|
|
17
|
-
includeCreator?:
|
|
17
|
+
includeCreator?: string;
|
|
18
18
|
/**
|
|
19
19
|
* latest ISO8601 start date-time for the events
|
|
20
20
|
*/
|
|
@@ -27,14 +27,18 @@ export declare type GetEventsParams = {
|
|
|
27
27
|
* Comma separated sting list of AttendanceTypes
|
|
28
28
|
*/
|
|
29
29
|
attendanceTypes?: string;
|
|
30
|
+
/**
|
|
31
|
+
* comma separated string list of event statuses
|
|
32
|
+
*/
|
|
33
|
+
status?: string;
|
|
30
34
|
/**
|
|
31
35
|
* the max amount of events to return
|
|
32
36
|
*/
|
|
33
|
-
num?:
|
|
37
|
+
num?: string;
|
|
34
38
|
/**
|
|
35
39
|
* the index to start at
|
|
36
40
|
*/
|
|
37
|
-
start?:
|
|
41
|
+
start?: string;
|
|
38
42
|
};
|
|
39
43
|
export interface ICreateRegistration {
|
|
40
44
|
/** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
|
|
@@ -49,6 +53,8 @@ export interface ICreateRegistration {
|
|
|
49
53
|
lastName?: string;
|
|
50
54
|
/** Role of the user in the event */
|
|
51
55
|
role?: RegistrationRole;
|
|
56
|
+
/** Attendance type for this registration */
|
|
57
|
+
type: EventAttendanceType;
|
|
52
58
|
/** Username for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
53
59
|
username?: string;
|
|
54
60
|
}
|
|
@@ -135,12 +141,6 @@ export declare enum RegistrationRole {
|
|
|
135
141
|
ORGANIZER = "ORGANIZER",
|
|
136
142
|
ATTENDEE = "ATTENDEE"
|
|
137
143
|
}
|
|
138
|
-
export interface IUpdateRegistration {
|
|
139
|
-
/** Role of the user in the event */
|
|
140
|
-
role?: RegistrationRole;
|
|
141
|
-
/** Status of the registration */
|
|
142
|
-
status?: RegistrationStatus;
|
|
143
|
-
}
|
|
144
144
|
export interface IRegistration {
|
|
145
145
|
createdAt: string;
|
|
146
146
|
createdBy?: IUser;
|
|
@@ -150,6 +150,7 @@ export interface IRegistration {
|
|
|
150
150
|
id: number;
|
|
151
151
|
role: RegistrationRole;
|
|
152
152
|
status: RegistrationStatus;
|
|
153
|
+
type: EventAttendanceType;
|
|
153
154
|
updatedAt: string;
|
|
154
155
|
user?: IUser;
|
|
155
156
|
userId: string;
|
|
@@ -193,6 +194,14 @@ export declare enum EventAttendanceType {
|
|
|
193
194
|
VIRTUAL = "VIRTUAL",
|
|
194
195
|
IN_PERSON = "IN_PERSON"
|
|
195
196
|
}
|
|
197
|
+
export interface IUpdateRegistration {
|
|
198
|
+
/** Role of the user in the event */
|
|
199
|
+
role?: RegistrationRole;
|
|
200
|
+
/** Status of the registration */
|
|
201
|
+
status?: RegistrationStatus;
|
|
202
|
+
/** Attendance type for this registration */
|
|
203
|
+
type?: EventAttendanceType;
|
|
204
|
+
}
|
|
196
205
|
export declare enum EventAccess {
|
|
197
206
|
PRIVATE = "PRIVATE",
|
|
198
207
|
ORG = "ORG",
|
|
@@ -290,14 +299,14 @@ export declare const getRegistrations: (options?: SecondParameter<typeof customC
|
|
|
290
299
|
export declare const getRegistration: (id: number, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
|
|
291
300
|
export declare const updateRegistration: (id: number, iUpdateRegistration: IUpdateRegistration, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
|
|
292
301
|
export declare const deleteRegistration: (id: number, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
|
|
293
|
-
export declare type CreateEventResult = NonNullable<
|
|
294
|
-
export declare type GetEventsResult = NonNullable<
|
|
295
|
-
export declare type GetEventResult = NonNullable<
|
|
296
|
-
export declare type UpdateEventResult = NonNullable<
|
|
297
|
-
export declare type DeleteEventResult = NonNullable<
|
|
298
|
-
export declare type CreateRegistrationResult = NonNullable<
|
|
299
|
-
export declare type GetRegistrationsResult = NonNullable<
|
|
300
|
-
export declare type GetRegistrationResult = NonNullable<
|
|
301
|
-
export declare type UpdateRegistrationResult = NonNullable<
|
|
302
|
-
export declare type DeleteRegistrationResult = NonNullable<
|
|
302
|
+
export declare type CreateEventResult = NonNullable<Awaited<ReturnType<typeof createEvent>>>;
|
|
303
|
+
export declare type GetEventsResult = NonNullable<Awaited<ReturnType<typeof getEvents>>>;
|
|
304
|
+
export declare type GetEventResult = NonNullable<Awaited<ReturnType<typeof getEvent>>>;
|
|
305
|
+
export declare type UpdateEventResult = NonNullable<Awaited<ReturnType<typeof updateEvent>>>;
|
|
306
|
+
export declare type DeleteEventResult = NonNullable<Awaited<ReturnType<typeof deleteEvent>>>;
|
|
307
|
+
export declare type CreateRegistrationResult = NonNullable<Awaited<ReturnType<typeof createRegistration>>>;
|
|
308
|
+
export declare type GetRegistrationsResult = NonNullable<Awaited<ReturnType<typeof getRegistrations>>>;
|
|
309
|
+
export declare type GetRegistrationResult = NonNullable<Awaited<ReturnType<typeof getRegistration>>>;
|
|
310
|
+
export declare type UpdateRegistrationResult = NonNullable<Awaited<ReturnType<typeof updateRegistration>>>;
|
|
311
|
+
export declare type DeleteRegistrationResult = NonNullable<Awaited<ReturnType<typeof deleteRegistration>>>;
|
|
303
312
|
export {};
|
|
@@ -8,7 +8,7 @@ export declare const InitiativeDefaultFeatures: IFeatureFlags;
|
|
|
8
8
|
* These define the requirements any user must meet to perform related actions
|
|
9
9
|
* @private
|
|
10
10
|
*/
|
|
11
|
-
export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:projects", "hub:initiative:workspace:projects:member", "hub:initiative:workspace:projects:manager", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:workspace:associationGroup:create", "hub:initiative:manage"];
|
|
11
|
+
export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:metrics", "hub:initiative:workspace:projects", "hub:initiative:workspace:projects:member", "hub:initiative:workspace:projects:manager", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:workspace:associationGroup:create", "hub:initiative:manage"];
|
|
12
12
|
/**
|
|
13
13
|
* Initiative permission policies
|
|
14
14
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IConfigurationSchema } from "../../core";
|
|
2
2
|
export declare type InitiativeEditorType = (typeof InitiativeEditorTypes)[number];
|
|
3
|
-
export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit", "hub:initiative:create"];
|
|
3
|
+
export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics"];
|
|
4
4
|
/**
|
|
5
5
|
* defines the JSON schema for a Hub Initiative's editable fields
|
|
6
6
|
*/
|
|
@@ -3,6 +3,7 @@ export * from "./get-form-info-json";
|
|
|
3
3
|
export * from "./get-form-json";
|
|
4
4
|
export * from "./get-input-feature-service-model";
|
|
5
5
|
export * from "./get-map-question";
|
|
6
|
+
export * from "./get-s123-share-url";
|
|
6
7
|
export * from "./get-source-feature-service-model-from-fieldworker";
|
|
7
8
|
export * from "./get-stakeholder-model";
|
|
8
9
|
export * from "./get-survey-models";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=async-return-type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"async-return-type.js","sourceRoot":"","sources":["../../../../../src/events/api/orval/async-return-type.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"async-return-type.js","sourceRoot":"","sources":["../../../../../src/events/api/orval/async-return-type.ts"],"names":[],"mappings":""}
|