@esri/solution-form 5.2.7 → 5.2.8

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.
@@ -25,7 +25,6 @@ const tslib_1 = require("tslib");
25
25
  const is_hub_form_template_1 = require("./helpers/is-hub-form-template");
26
26
  const post_process_survey_1 = require("./helpers/post-process-survey");
27
27
  const common = tslib_1.__importStar(require("@esri/solution-common"));
28
- const formUtils = tslib_1.__importStar(require("./formUtils"));
29
28
  // ------------------------------------------------------------------------------------------------------------------ //
30
29
  /**
31
30
  * Form post-processing actions
@@ -38,20 +37,6 @@ const formUtils = tslib_1.__importStar(require("./formUtils"));
38
37
  * @returns Promise resolving to successfulness of update
39
38
  */
40
39
  async function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
41
- // Fetch the form's zip file
42
- const formDataResponse = await common.getItemDataAsFile(itemId, "Form", authentication);
43
- if (formDataResponse) {
44
- const zipObject = await common.blobToZipObject(formDataResponse);
45
- // Detemplatize it
46
- const updatedZipObject = await formUtils.swizzleFormObject(zipObject, templateDictionary);
47
- // Update the form
48
- void common.updateItemWithZipObject(updatedZipObject, itemId, authentication);
49
- }
50
- else {
51
- // If the form data is not found, AGO is slow storing the data; try again
52
- await common.delay(5000);
53
- return postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
54
- }
55
40
  // If this is a Hub form, post-process it as such
56
41
  if ((0, is_hub_form_template_1.isHubFormTemplate)(template)) {
57
42
  return (0, post_process_survey_1.postProcessHubSurvey)(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
@@ -1 +1 @@
1
- {"version":3,"file":"post-process.js","sourceRoot":"","sources":["../../src/post-process.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AAEH,yEAAmE;AACnE,uEAAqE;AACrE,sEAAgD;AAChD,+DAAyC;AAGzC,wHAAwH;AAExH;;;;;;;;;GASG;AACI,KAAK,UAAU,WAAW,CAC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KAAK,UAAU,WAAW,CAC/B,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAA8B,EAC9B,SAAiC,EACjC,kBAAuB,EACvB,cAAkC;IAElC,iDAAiD;IACjD,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,6CAA6C;IAC7C,OAAO,MAAM,CAAC,gCAAgC,CAC5C,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf,CAAC;AACJ,CAAC;AA5BD,kCA4BC"}
@@ -21,7 +21,6 @@
21
21
  import { isHubFormTemplate } from "./helpers/is-hub-form-template";
22
22
  import { postProcessHubSurvey } from "./helpers/post-process-survey";
23
23
  import * as common from "@esri/solution-common";
24
- import * as formUtils from "./formUtils";
25
24
  // ------------------------------------------------------------------------------------------------------------------ //
26
25
  /**
27
26
  * Form post-processing actions
@@ -34,20 +33,6 @@ import * as formUtils from "./formUtils";
34
33
  * @returns Promise resolving to successfulness of update
35
34
  */
36
35
  export async function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
37
- // Fetch the form's zip file
38
- const formDataResponse = await common.getItemDataAsFile(itemId, "Form", authentication);
39
- if (formDataResponse) {
40
- const zipObject = await common.blobToZipObject(formDataResponse);
41
- // Detemplatize it
42
- const updatedZipObject = await formUtils.swizzleFormObject(zipObject, templateDictionary);
43
- // Update the form
44
- void common.updateItemWithZipObject(updatedZipObject, itemId, authentication);
45
- }
46
- else {
47
- // If the form data is not found, AGO is slow storing the data; try again
48
- await common.delay(5000);
49
- return postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
50
- }
51
36
  // If this is a Hub form, post-process it as such
52
37
  if (isHubFormTemplate(template)) {
53
38
  return postProcessHubSurvey(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
@@ -1 +1 @@
1
-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kBAAkB,EAClB,cAAc,CACf,CAAC;KACH;IAED,6CAA6C;IAC7C,OAAO,MAAM,CAAC,gCAAgC,CAC5C,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"post-process.js","sourceRoot":"","sources":["../../src/post-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,wHAAwH;AAExH;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAA8B,EAC9B,SAAiC,EACjC,kBAAuB,EACvB,cAAkC;IAElC,iDAAiD;IACjD,IAAI,iBAAiB,CAAC,QAAQ,CAAC,EAAE;QAC/B,OAAO,oBAAoB,CACzB,MAAM,EACN,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,cAAc,CACf,CAAC;KACH;IAED,6CAA6C;IAC7C,OAAO,MAAM,CAAC,gCAAgC,CAC5C,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-form",
3
- "version": "5.2.7",
3
+ "version": "5.2.8",
4
4
  "description": "Manages the creation and deployment of form item types for @esri/solution.js.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -23,21 +23,21 @@
23
23
  "@esri/arcgis-rest-portal": "^3.7.0",
24
24
  "@esri/arcgis-rest-request": "^3.7.0",
25
25
  "@esri/arcgis-rest-service-admin": "^3.7.0",
26
- "@esri/hub-common": "^14.97.0",
26
+ "@esri/hub-common": "^14.102.0",
27
27
  "@esri/hub-initiatives": "^14.0.0",
28
- "@esri/hub-sites": "^14.2.2",
28
+ "@esri/hub-sites": "^14.2.3",
29
29
  "@esri/hub-teams": "^14.1.0",
30
- "@esri/solution-common": "^5.2.7",
31
- "@esri/solution-feature-layer": "^5.2.7",
32
- "@esri/solution-file": "^5.2.7",
33
- "@esri/solution-group": "^5.2.7",
34
- "@esri/solution-simple-types": "^5.2.7",
35
- "@esri/solution-storymap": "^5.2.7",
30
+ "@esri/solution-common": "^5.2.8",
31
+ "@esri/solution-feature-layer": "^5.2.8",
32
+ "@esri/solution-file": "^5.2.8",
33
+ "@esri/solution-group": "^5.2.8",
34
+ "@esri/solution-simple-types": "^5.2.8",
35
+ "@esri/solution-storymap": "^5.2.8",
36
36
  "@types/jasmine": "^5.1.4",
37
37
  "fetch-mock": "^7.7.3",
38
38
  "jasmine": "^5.1.0",
39
39
  "jasmine-core": "^5.1.0",
40
- "rollup": "^4.9.4"
40
+ "rollup": "^4.12.1"
41
41
  },
42
42
  "dependencies": {
43
43
  "tslib": "1.14.1"
@@ -78,5 +78,5 @@
78
78
  "esri",
79
79
  "ES6"
80
80
  ],
81
- "gitHead": "20fe186e21ebce0fa33f4d3daf90392dee5bf2ea"
81
+ "gitHead": "1d7e8dfcf16f4e05b57edaf7142710e00ee4be43"
82
82
  }