@esri/solution-form 3.0.0 → 3.1.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.
Files changed (45) hide show
  1. package/package.json +9 -9
  2. package/dist/node/convert-item-to-template.d.ts +0 -32
  3. package/dist/node/convert-item-to-template.js +0 -35
  4. package/dist/node/convert-item-to-template.js.map +0 -1
  5. package/dist/node/create-item-from-template.d.ts +0 -31
  6. package/dist/node/create-item-from-template.js +0 -40
  7. package/dist/node/create-item-from-template.js.map +0 -1
  8. package/dist/node/helpers/build-create-params.d.ts +0 -30
  9. package/dist/node/helpers/build-create-params.js +0 -78
  10. package/dist/node/helpers/build-create-params.js.map +0 -1
  11. package/dist/node/helpers/create-item-from-hub-template.d.ts +0 -32
  12. package/dist/node/helpers/create-item-from-hub-template.js +0 -80
  13. package/dist/node/helpers/create-item-from-hub-template.js.map +0 -1
  14. package/dist/node/helpers/create-survey.d.ts +0 -30
  15. package/dist/node/helpers/create-survey.js +0 -60
  16. package/dist/node/helpers/create-survey.js.map +0 -1
  17. package/dist/node/helpers/encode-survey-form.d.ts +0 -28
  18. package/dist/node/helpers/encode-survey-form.js +0 -59
  19. package/dist/node/helpers/encode-survey-form.js.map +0 -1
  20. package/dist/node/helpers/is-hub-form-template.d.ts +0 -24
  21. package/dist/node/helpers/is-hub-form-template.js +0 -33
  22. package/dist/node/helpers/is-hub-form-template.js.map +0 -1
  23. package/dist/node/helpers/post-process-survey.d.ts +0 -33
  24. package/dist/node/helpers/post-process-survey.js +0 -82
  25. package/dist/node/helpers/post-process-survey.js.map +0 -1
  26. package/dist/node/index.d.ts +0 -23
  27. package/dist/node/index.js +0 -27
  28. package/dist/node/index.js.map +0 -1
  29. package/dist/node/post-process.d.ts +0 -32
  30. package/dist/node/post-process.js +0 -44
  31. package/dist/node/post-process.js.map +0 -1
  32. package/dist/umd/form/src/convert-item-to-template.d.ts +0 -32
  33. package/dist/umd/form/src/create-item-from-template.d.ts +0 -31
  34. package/dist/umd/form/src/helpers/build-create-params.d.ts +0 -30
  35. package/dist/umd/form/src/helpers/create-item-from-hub-template.d.ts +0 -32
  36. package/dist/umd/form/src/helpers/create-survey.d.ts +0 -30
  37. package/dist/umd/form/src/helpers/encode-survey-form.d.ts +0 -28
  38. package/dist/umd/form/src/helpers/is-hub-form-template.d.ts +0 -24
  39. package/dist/umd/form/src/helpers/post-process-survey.d.ts +0 -33
  40. package/dist/umd/form/src/index.d.ts +0 -23
  41. package/dist/umd/form/src/post-process.d.ts +0 -32
  42. package/dist/umd/form.umd.js +0 -503
  43. package/dist/umd/form.umd.js.map +0 -1
  44. package/dist/umd/form.umd.min.js +0 -19
  45. package/dist/umd/form.umd.min.js.map +0 -1
@@ -1,33 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2020 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.isHubFormTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- const common = tslib_1.__importStar(require("@esri/solution-common"));
21
- /**
22
- * Determines if the given template is a Hub Survey
23
- * template vs Solutions.js Survey template.
24
- *
25
- * @param {IITemTemplate} template A template
26
- * @returns {boolean}
27
- */
28
- function isHubFormTemplate(template) {
29
- // relying on basic duck typing vs adding extraneous props during migration
30
- return !!common.getProp(template, "properties.services");
31
- }
32
- exports.isHubFormTemplate = isHubFormTemplate;
33
- //# sourceMappingURL=is-hub-form-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-hub-form-template.js","sourceRoot":"","sources":["../../../src/helpers/is-hub-form-template.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAEhD;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,QAA8B;IAC9D,2EAA2E;IAC3E,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;AAC3D,CAAC;AAHD,8CAGC"}
@@ -1,33 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { UserSession, IItemTemplate } from "@esri/solution-common";
17
- /**
18
- * Provides utility method to post process Hub surveys
19
- *
20
- * @module post-process-survey
21
- */
22
- /**
23
- * Performs Survey post processing actions
24
- *
25
- * @param {string} itemId The item ID
26
- * @param {string} type The template/item type
27
- * @param {any[]} itemInfos An Array of item details
28
- * @param {IItemTemplate} template The template
29
- * @param {any} templateDictionary The template dictionary
30
- * @param {UserSession} authentication The destination session info
31
- * @returns {Promise<any>}
32
- */
33
- export declare function postProcessHubSurvey(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
@@ -1,82 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2020 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.postProcessHubSurvey = void 0;
19
- const solution_common_1 = require("@esri/solution-common");
20
- const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
21
- /**
22
- * Provides utility method to post process Hub surveys
23
- *
24
- * @module post-process-survey
25
- */
26
- /**
27
- * Performs Survey post processing actions
28
- *
29
- * @param {string} itemId The item ID
30
- * @param {string} type The template/item type
31
- * @param {any[]} itemInfos An Array of item details
32
- * @param {IItemTemplate} template The template
33
- * @param {any} templateDictionary The template dictionary
34
- * @param {UserSession} authentication The destination session info
35
- * @returns {Promise<any>}
36
- */
37
- function postProcessHubSurvey(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
38
- const featureServiceSourceId = template.properties.info.serviceInfo.itemId;
39
- const { itemId: featureServiceResultId } = templateDictionary[featureServiceSourceId];
40
- const interpolated = (0, solution_common_1.replaceInTemplate)(template, templateDictionary);
41
- return (0, solution_common_1.getItemBase)(featureServiceResultId, authentication).then(featureServiceResultBase => {
42
- const itemUpdates = [
43
- // fix/update form properties we couldn't control via the API
44
- {
45
- id: itemId,
46
- title: interpolated.item.title,
47
- snippet: interpolated.item.snippet,
48
- extent: interpolated.item.extent,
49
- culture: interpolated.item.culture
50
- },
51
- // fix/update feature service properties we couldn't control via the API
52
- {
53
- id: featureServiceResultId,
54
- extent: interpolated.item.extent,
55
- typeKeywords: [`source-${featureServiceSourceId}`].concat(featureServiceResultBase.typeKeywords)
56
- }
57
- ];
58
- const toUpdatePromise = (updatedItem) => (0, solution_common_1.updateItem)(updatedItem, authentication);
59
- const updatePromises = itemUpdates.map(toUpdatePromise);
60
- return Promise.all(updatePromises)
61
- .then(() => {
62
- const itemIdsToMove = [itemId, featureServiceResultId];
63
- const toMovePromise = (id) => (0, arcgis_rest_portal_1.moveItem)({
64
- itemId: id,
65
- folderId: templateDictionary.folderId,
66
- authentication: authentication
67
- });
68
- const movePromises = itemIdsToMove.map(toMovePromise);
69
- return Promise.all(movePromises);
70
- })
71
- .then(() => (0, solution_common_1.removeFolder)(featureServiceResultBase.ownerFolder, authentication))
72
- .then(() => {
73
- // Create a template item for the Feature Service that was created by the API
74
- const featureServiceTemplate = (0, solution_common_1.createInitializedItemTemplate)(featureServiceResultBase);
75
- templates.push(featureServiceTemplate);
76
- template.dependencies.push(featureServiceResultBase.id);
77
- return true;
78
- });
79
- });
80
- }
81
- exports.postProcessHubSurvey = postProcessHubSurvey;
82
- //# sourceMappingURL=post-process-survey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"post-process-survey.js","sourceRoot":"","sources":["../../../src/helpers/post-process-survey.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2DAS+B;AAC/B,iEAAoD;AAEpD;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,SAAgB,oBAAoB,CAClC,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAAuB,EACvB,SAA0B,EAC1B,kBAAuB,EACvB,cAA2B;IAE3B,MAAM,sBAAsB,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IAC3E,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAC3D,sBAAsB,CACvB,CAAC;IACF,MAAM,YAAY,GAAG,IAAA,mCAAiB,EAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;IACrE,OAAO,IAAA,6BAAW,EAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,IAAI,CAC7D,wBAAwB,CAAC,EAAE;QACzB,MAAM,WAAW,GAAG;YAClB,6DAA6D;YAC7D;gBACE,EAAE,EAAE,MAAM;gBACV,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK;gBAC9B,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO;gBAClC,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM;gBAChC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO;aACnC;YACD,wEAAwE;YACxE;gBACE,EAAE,EAAE,sBAAsB;gBAC1B,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM;gBAChC,YAAY,EAAE,CAAC,UAAU,sBAAsB,EAAE,CAAC,CAAC,MAAM,CACvD,wBAAwB,CAAC,YAAY,CACtC;aACF;SACF,CAAC;QACF,MAAM,eAAe,GAAG,CAAC,WAAwB,EAAE,EAAE,CACnD,IAAA,4BAAU,EAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACxD,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;aAC/B,IAAI,CAAC,GAAG,EAAE;YACT,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;YACvD,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,EAAE,CACnC,IAAA,6BAAQ,EAAC;gBACP,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE,kBAAkB,CAAC,QAAkB;gBAC/C,cAAc,EAAE,cAAc;aAC/B,CAAC,CAAC;YACL,MAAM,YAAY,GAAG,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACtD,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,EAAE,CACT,IAAA,8BAAY,EAAC,wBAAwB,CAAC,WAAW,EAAE,cAAc,CAAC,CACnE;aACA,IAAI,CAAC,GAAG,EAAE;YACT,6EAA6E;YAC7E,MAAM,sBAAsB,GAAG,IAAA,+CAA6B,EAC1D,wBAAwB,CACzB,CAAC;YACF,SAAS,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACvC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;YACxD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC,CACF,CAAC;AACJ,CAAC;AA/DD,oDA+DC"}
@@ -1,23 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation and deployment of form item types.
18
- *
19
- * @module solution-form
20
- */
21
- export * from "./convert-item-to-template";
22
- export * from "./create-item-from-template";
23
- export * from "./post-process";
@@ -1,27 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- /**
20
- * Manages the creation and deployment of form item types.
21
- *
22
- * @module solution-form
23
- */
24
- tslib_1.__exportStar(require("./convert-item-to-template"), exports);
25
- tslib_1.__exportStar(require("./create-item-from-template"), exports);
26
- tslib_1.__exportStar(require("./post-process"), exports);
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,qEAA2C;AAC3C,sEAA4C;AAC5C,yDAA+B"}
@@ -1,32 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation and deployment of form item types.
18
- *
19
- * @module post-process
20
- */
21
- import { UserSession, IItemTemplate } from "@esri/solution-common";
22
- /**
23
- * Form post-processing actions
24
- *
25
- * @param {string} itemId The item ID
26
- * @param {string} type The template type
27
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
28
- * @param {any} templateDictionary The template dictionary
29
- * @param {UserSession} authentication The destination session info
30
- * @returns Promise resolving to successfulness of update
31
- */
32
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.postProcess = void 0;
19
- /**
20
- * Manages the creation and deployment of form item types.
21
- *
22
- * @module post-process
23
- */
24
- const solution_common_1 = require("@esri/solution-common");
25
- const is_hub_form_template_1 = require("./helpers/is-hub-form-template");
26
- const post_process_survey_1 = require("./helpers/post-process-survey");
27
- /**
28
- * Form post-processing actions
29
- *
30
- * @param {string} itemId The item ID
31
- * @param {string} type The template type
32
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
33
- * @param {any} templateDictionary The template dictionary
34
- * @param {UserSession} authentication The destination session info
35
- * @returns Promise resolving to successfulness of update
36
- */
37
- function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
38
- if ((0, is_hub_form_template_1.isHubFormTemplate)(template)) {
39
- return (0, post_process_survey_1.postProcessHubSurvey)(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
40
- }
41
- return (0, solution_common_1.updateItemTemplateFromDictionary)(itemId, templateDictionary, authentication);
42
- }
43
- exports.postProcess = postProcess;
44
- //# sourceMappingURL=post-process.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"post-process.js","sourceRoot":"","sources":["../../src/post-process.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,2DAI+B;AAC/B,yEAAmE;AACnE,uEAAqE;AAErE;;;;;;;;;GASG;AACH,SAAgB,WAAW,CACzB,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAAuB,EACvB,SAA0B,EAC1B,kBAAuB,EACvB,cAA2B;IAE3B,IAAI,IAAA,wCAAiB,EAAC,QAAQ,CAAC,EAAE;QAC/B,OAAO,IAAA,0CAAoB,EACzB,MAAM,EACN,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,cAAc,CACf,CAAC;KACH;IAED,OAAO,IAAA,kDAAgC,EACrC,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf,CAAC;AACJ,CAAC;AA1BD,kCA0BC"}
@@ -1,32 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation of Form templates
18
- *
19
- * @module convert-item-to-template
20
- */
21
- import { UserSession, IItemTemplate } from "@esri/solution-common";
22
- /**
23
- * Creates a template from a Form item
24
- *
25
- * @param {string} solutionItemId The solution item ID
26
- * @param {any} itemInfo: The base item info
27
- * @param {UserSession} destAuthentication Credentials for requests to the destination organization
28
- * @param {UserSession} srcAuthentication Credentials for requests to source items
29
- * @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
30
- * @returns {Promise<IItemTemplate>}
31
- */
32
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
@@ -1,31 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the deployment items from Form templates.
18
- *
19
- * @module create-item-from-template
20
- */
21
- import { UserSession, IItemTemplate, IItemProgressCallback, ICreateItemFromTemplateResponse } from "@esri/solution-common";
22
- /**
23
- * Creates a Form item from a template
24
- *
25
- * @param {IItemTemplate} template The template
26
- * @param {any} templateDictionary The template dictionary
27
- * @param {UserSession} destinationAuthentication The destination user session info
28
- * @param itemProgressCallback An item progress callback
29
- * @returns {Promise<ICreateItemFromTemplateResponse>}
30
- */
31
- export declare function createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
@@ -1,30 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { IItemTemplate, UserSession, ISurvey123CreateParams } from "@esri/solution-common";
17
- /**
18
- * Utility method for creating Survey123 parameters
19
- *
20
- * @module build-create-params
21
- */
22
- /**
23
- * Builds the Survey123 create API parameters
24
- *
25
- * @param {IItemTemplate} template The template
26
- * @param {any} templateDictionary The template dictionary
27
- * @param {UserSession} destinationAuthentication The destination session info
28
- * @returns {Promise<ISurvey123CreateParams>}
29
- */
30
- export declare function buildCreateParams(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession): Promise<ISurvey123CreateParams>;
@@ -1,32 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { IItemTemplate, UserSession, IItemProgressCallback, ICreateItemFromTemplateResponse } from "@esri/solution-common";
17
- /**
18
- * Manages the creation of Surveys from Hub Templates
19
- * via the Survey123 API
20
- *
21
- * @module create-item-from-hub-template
22
- */
23
- /**
24
- * Orchestrates creation of Surveys from Hub templates
25
- *
26
- * @param {IItemTemplate} template The template
27
- * @param {any} templateDictionary The template dictionary
28
- * @param {UserSession} destinationAuthentication The destination session info
29
- * @param {Function} itemProgressCallback A progress callback
30
- * @returns {Promise<ICreateItemFromTemplateResponse>}
31
- */
32
- export declare function createItemFromHubTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
@@ -1,30 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { ISurvey123CreateParams, ISurvey123CreateResult } from "@esri/solution-common";
17
- /**
18
- * Provides utility method to call Survey123 create endpoint
19
- *
20
- * @module create-survey
21
- */
22
- /**
23
- * Calls the Survey123 create API with the given parameters
24
- *
25
- * @param {ISurvey123CreateParams} params
26
- * @param {string} [survey123Url=https://survey123.arcgis.com] An optional, Survey123 base URL override
27
- * @throws Will throw if the Survey123 API returns an error response
28
- * @returns {Promise<ISurvey123CreateResult>}
29
- */
30
- export declare function createSurvey(params: ISurvey123CreateParams, survey123Url?: string): Promise<ISurvey123CreateResult>;
@@ -1,28 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages Survey123 parameter encoding
18
- *
19
- * @module encode-survey-form
20
- */
21
- /**
22
- * URI Encodes Survey123 form content parameter
23
- * values
24
- *
25
- * @param {any} form Unencoded form data
26
- * @returns {any} Encoded form data
27
- */
28
- export declare const encodeSurveyForm: (form: any) => any;
@@ -1,24 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import * as common from "@esri/solution-common";
17
- /**
18
- * Determines if the given template is a Hub Survey
19
- * template vs Solutions.js Survey template.
20
- *
21
- * @param {IITemTemplate} template A template
22
- * @returns {boolean}
23
- */
24
- export declare function isHubFormTemplate(template: common.IItemTemplate): boolean;
@@ -1,33 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { UserSession, IItemTemplate } from "@esri/solution-common";
17
- /**
18
- * Provides utility method to post process Hub surveys
19
- *
20
- * @module post-process-survey
21
- */
22
- /**
23
- * Performs Survey post processing actions
24
- *
25
- * @param {string} itemId The item ID
26
- * @param {string} type The template/item type
27
- * @param {any[]} itemInfos An Array of item details
28
- * @param {IItemTemplate} template The template
29
- * @param {any} templateDictionary The template dictionary
30
- * @param {UserSession} authentication The destination session info
31
- * @returns {Promise<any>}
32
- */
33
- export declare function postProcessHubSurvey(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
@@ -1,23 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation and deployment of form item types.
18
- *
19
- * @module solution-form
20
- */
21
- export * from "./convert-item-to-template";
22
- export * from "./create-item-from-template";
23
- export * from "./post-process";
@@ -1,32 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation and deployment of form item types.
18
- *
19
- * @module post-process
20
- */
21
- import { UserSession, IItemTemplate } from "@esri/solution-common";
22
- /**
23
- * Form post-processing actions
24
- *
25
- * @param {string} itemId The item ID
26
- * @param {string} type The template type
27
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
28
- * @param {any} templateDictionary The template dictionary
29
- * @param {UserSession} authentication The destination session info
30
- * @returns Promise resolving to successfulness of update
31
- */
32
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;