@esri/solution-form 5.3.7 → 5.4.1

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.
@@ -23,6 +23,48 @@ import JSZip from "jszip";
23
23
  * @returns Promise that resolves to the updated zip object
24
24
  */
25
25
  export declare function swizzleFormObject(zipObject: JSZip, templateDictionary: any): Promise<JSZip>;
26
+ /**
27
+ * Templatizes the content in a form's zip object.
28
+ *
29
+ * @param zipObject Form zip object to templatize; it is modified in place
30
+ * @param templateDictionary Dictionary of values to use when templatizing
31
+ * @returns Promise that resolves to the modified zip object
32
+ */
33
+ export declare function templatizeFormData(zipObject: JSZip, templateDictionary: any): Promise<JSZip>;
34
+ /**
35
+ * Replaces the feature service url references.
36
+ *
37
+ * @param contents String in which to replace feature service URLs
38
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
39
+ * @param agoIdTypeRegEx Matcher for AGO ids with "_type" suffix
40
+ * @returns Modified contents
41
+ */
42
+ export declare function _replaceFeatureServiceURLs(contents: string, templateDictionary: any, agoIdTypeRegEx: RegExp): string;
43
+ /**
44
+ * Replaces the item id references.
45
+ *
46
+ * @param contents String in which to replace the item id references
47
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
48
+ * @param agoIdTypeRegEx Matcher for AGO ids
49
+ * @returns Modified contents
50
+ */
51
+ export declare function _replaceItemIds(contents: string, templateDictionary: any, agoIdTypeRegEx: RegExp): string;
52
+ /**
53
+ * Replaces portal base url references.
54
+ *
55
+ * @param contents String in which to replace the portal base url references
56
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
57
+ * @returns Modified contents
58
+ */
59
+ export declare function _replacePortalBaseUrls(contents: string, templateDictionary: any): string;
60
+ /**
61
+ * Replaces workflow manager base url references.
62
+ *
63
+ * @param contents String in which to replace the workflow manager base url references
64
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
65
+ * @returns Modified contents
66
+ */
67
+ export declare function _replaceWorkflowManagerBaseUrls(contents: string, templateDictionary: any): string;
26
68
  /**
27
69
  * Updates the binary content of a zip object.
28
70
  *
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports._updateZipObjectTextContent = exports.swizzleFormObject = void 0;
18
+ exports._updateZipObjectTextContent = exports._replaceWorkflowManagerBaseUrls = exports._replacePortalBaseUrls = exports._replaceItemIds = exports._replaceFeatureServiceURLs = exports.templatizeFormData = exports.swizzleFormObject = void 0;
19
19
  const tslib_1 = require("tslib");
20
20
  const common = tslib_1.__importStar(require("@esri/solution-common"));
21
21
  // ------------------------------------------------------------------------------------------------------------------ //
@@ -62,7 +62,107 @@ async function swizzleFormObject(zipObject, templateDictionary) {
62
62
  return Promise.resolve(zipObject);
63
63
  }
64
64
  exports.swizzleFormObject = swizzleFormObject;
65
+ /**
66
+ * Templatizes the content in a form's zip object.
67
+ *
68
+ * @param zipObject Form zip object to templatize; it is modified in place
69
+ * @param templateDictionary Dictionary of values to use when templatizing
70
+ * @returns Promise that resolves to the modified zip object
71
+ */
72
+ async function templatizeFormData(zipObject, templateDictionary) {
73
+ const zipObjectContents = await common.getZipObjectContents(zipObject);
74
+ zipObjectContents.forEach((zipFile) => {
75
+ if (zipFile.file.endsWith(".info") || zipFile.file.endsWith(".itemInfo") || zipFile.file.endsWith(".json")
76
+ || zipFile.file.endsWith(".webform") || zipFile.file.endsWith(".xml")) {
77
+ let contents = zipFile.content;
78
+ const agoIdTypeRegEx = /\b([0-9A-Fa-f]){32}_type/g;
79
+ // Replace the item id references
80
+ contents = _replaceItemIds(contents, templateDictionary, agoIdTypeRegEx);
81
+ // Replace the feature service url references
82
+ contents = _replaceFeatureServiceURLs(contents, templateDictionary, agoIdTypeRegEx);
83
+ // Replace portal base url references
84
+ contents = _replacePortalBaseUrls(contents, templateDictionary);
85
+ // Replace workflow manager base url references
86
+ contents = _replaceWorkflowManagerBaseUrls(contents, templateDictionary);
87
+ zipObject.file(zipFile.file, contents);
88
+ }
89
+ });
90
+ // Return the modified zip object
91
+ return Promise.resolve(zipObject);
92
+ }
93
+ exports.templatizeFormData = templatizeFormData;
65
94
  // ------------------------------------------------------------------------------------------------------------------ //
95
+ /**
96
+ * Replaces the feature service url references.
97
+ *
98
+ * @param contents String in which to replace feature service URLs
99
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
100
+ * @param agoIdTypeRegEx Matcher for AGO ids with "_type" suffix
101
+ * @returns Modified contents
102
+ */
103
+ function _replaceFeatureServiceURLs(contents, templateDictionary, agoIdTypeRegEx) {
104
+ let updatedContents = contents;
105
+ const fsIds = Object.keys(templateDictionary)
106
+ .filter((key) => key.match(agoIdTypeRegEx) && templateDictionary[key].type === "Feature Service");
107
+ fsIds.forEach((fsId) => {
108
+ const urlToReplace = templateDictionary[fsId].url;
109
+ const urlReplacement = templateDictionary[urlToReplace];
110
+ if (urlReplacement) {
111
+ updatedContents = updatedContents.replace(new RegExp(urlToReplace, "g"), urlReplacement);
112
+ }
113
+ });
114
+ return updatedContents;
115
+ }
116
+ exports._replaceFeatureServiceURLs = _replaceFeatureServiceURLs;
117
+ /**
118
+ * Replaces the item id references.
119
+ *
120
+ * @param contents String in which to replace the item id references
121
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
122
+ * @param agoIdTypeRegEx Matcher for AGO ids
123
+ * @returns Modified contents
124
+ */
125
+ function _replaceItemIds(contents, templateDictionary, agoIdTypeRegEx) {
126
+ let updatedContents = contents;
127
+ const itemIds = Object.keys(templateDictionary)
128
+ .filter((key) => key.match(agoIdTypeRegEx) && templateDictionary[key].type !== "Feature Service")
129
+ .map((key) => key.replace("_type", ""));
130
+ itemIds.forEach((itemId) => {
131
+ updatedContents = updatedContents.replace(new RegExp(itemId, "g"), `{{${itemId}.itemId}}`);
132
+ });
133
+ return updatedContents;
134
+ }
135
+ exports._replaceItemIds = _replaceItemIds;
136
+ /**
137
+ * Replaces portal base url references.
138
+ *
139
+ * @param contents String in which to replace the portal base url references
140
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
141
+ * @returns Modified contents
142
+ */
143
+ function _replacePortalBaseUrls(contents, templateDictionary) {
144
+ let updatedContents = contents;
145
+ if (templateDictionary.portalBaseUrl) {
146
+ updatedContents = updatedContents.replace(new RegExp(templateDictionary.portalBaseUrl, "g"), "{{portalBaseUrl}}");
147
+ }
148
+ return updatedContents;
149
+ }
150
+ exports._replacePortalBaseUrls = _replacePortalBaseUrls;
151
+ /**
152
+ * Replaces workflow manager base url references.
153
+ *
154
+ * @param contents String in which to replace the workflow manager base url references
155
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
156
+ * @returns Modified contents
157
+ */
158
+ function _replaceWorkflowManagerBaseUrls(contents, templateDictionary) {
159
+ let updatedContents = contents;
160
+ if (templateDictionary.workflowBaseUrl) {
161
+ updatedContents = updatedContents.replace(new RegExp(templateDictionary.workflowBaseUrl, "g"), "{{workflowBaseUrl}}");
162
+ }
163
+ return updatedContents;
164
+ }
165
+ exports._replaceWorkflowManagerBaseUrls = _replaceWorkflowManagerBaseUrls;
66
166
  /**
67
167
  * Updates the binary content of a zip object.
68
168
  *
@@ -1 +1 @@
1
- {"version":3,"file":"formUtils.js","sourceRoot":"","sources":["../../src/formUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAGhD,wHAAwH;AAExH;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CACrC,SAAgB,EAChB,kBAAuB;IAEvB,qCAAqC;IACrC,MAAM,iBAAiB,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAEvE,qHAAqH;IACrH,IAAI,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACrB,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;UACxB,QAAQ,CAAE,gCAAgC;UAC1C,GAAG,CAAC,iBAAiB,EAAE,GAAG,IAAI,GAAG,EAAE,CAAE,+C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AMG;AACH,SAAgB,2BAA2B,CACzC,WAAyC,EACzC,kBAAuB;IAEvB,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;IAE1C,gCAAgC;IAChC,4EAA4E;IAC5E,IAAI,uBAAuB,GAAG,WAAW,CAAC,OAAiB,CAAC;IAE5D,uBAAuB,GAAG,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IAE5F,uCAAuC;IACvC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAEpF,4GAA4G;IAC5G,YAAY,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;QACrC,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,OAAO,WAAW,EAAE,MAAM,KAAK,QAAQ,EAAE;YAC3C,uBAAuB,GAAG,uBAAuB,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;SAC5G;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAxBD,kEAwBC"}
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import * as common from "@esri/solution-common";
17
17
  /**
18
- * Form post-processing actions
18
+ * Post-processes form items and the end of Solution item deployment.
19
19
  *
20
20
  * @param {string} itemId The item ID
21
21
  * @param {string} type The template type
@@ -25,3 +25,22 @@ import * as common from "@esri/solution-common";
25
25
  * @returns Promise resolving to successfulness of update
26
26
  */
27
27
  export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: common.IItemTemplate, templates: common.IItemTemplate[], templateDictionary: any, authentication: common.UserSession): Promise<any>;
28
+ /**
29
+ * Post-processes form items just before a Solution item is created.
30
+ *
31
+ * @param templates All of the templates in the created Solution item
32
+ * @param templateDictionary A collection of mappings from item ids and service URLs to templatizing info
33
+ * @returns
34
+ */
35
+ export declare function postProcessFormItems(templates: common.IItemTemplate[], templateDictionary: any): Promise<common.IItemTemplate[]>;
36
+ /**
37
+ * Encapsulates the rules for naming a form's data file.
38
+ * Chooses the first parameter that's defined and is not the string "undefined".
39
+ *
40
+ * @param itemName Template's item name
41
+ * @param dataFilename The data file name
42
+ * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
43
+ *
44
+ * @return A name for the data file
45
+ */
46
+ export declare function _getFormDataFilename(itemName: string, dataFilename: string, itemIdAsName: string): string;
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.postProcess = void 0;
18
+ exports._getFormDataFilename = exports.postProcessFormItems = exports.postProcess = void 0;
19
19
  const tslib_1 = require("tslib");
20
20
  /**
21
21
  * Manages the creation and deployment of form item types.
@@ -28,7 +28,7 @@ const common = tslib_1.__importStar(require("@esri/solution-common"));
28
28
  const formUtils = tslib_1.__importStar(require("./formUtils"));
29
29
  // ------------------------------------------------------------------------------------------------------------------ //
30
30
  /**
31
- * Form post-processing actions
31
+ * Post-processes form items and the end of Solution item deployment.
32
32
  *
33
33
  * @param {string} itemId The item ID
34
34
  * @param {string} type The template type
@@ -60,4 +60,60 @@ async function postProcess(itemId, type, itemInfos, template, templates, templat
60
60
  return common.updateItemTemplateFromDictionary(itemId, templateDictionary, authentication);
61
61
  }
62
62
  exports.postProcess = postProcess;
63
+ /**
64
+ * Post-processes form items just before a Solution item is created.
65
+ *
66
+ * @param templates All of the templates in the created Solution item
67
+ * @param templateDictionary A collection of mappings from item ids and service URLs to templatizing info
68
+ * @returns
69
+ */
70
+ async function postProcessFormItems(templates, templateDictionary) {
71
+ for (const template of templates) {
72
+ if (template.type === "Form") {
73
+ // Store the form's data in the solution resources, not in template
74
+ const formData = template.data;
75
+ template.data = null;
76
+ // Add the form data to the template for a post-process resource upload
77
+ if (formData) {
78
+ let zipObject = await common.blobToZipObject(formData);
79
+ // Templatize the form
80
+ zipObject = await formUtils.templatizeFormData(zipObject, templateDictionary);
81
+ template.item.name = _getFormDataFilename(template.item.name, formData.name, `${template.itemId}.zip`);
82
+ const templatizedFormData = await common.zipObjectToZipFile(zipObject, template.item.name);
83
+ // Add the data file to the template so that it can be uploaded with the other resources in the solution
84
+ const storageName = common.convertItemResourceToStorageResource(template.itemId, template.item.name, common.SolutionTemplateFormatVersion, common.SolutionResourceType.data);
85
+ const dataFile = {
86
+ itemId: template.itemId,
87
+ file: templatizedFormData,
88
+ folder: storageName.folder,
89
+ filename: template.item.name
90
+ };
91
+ template.dataFile = dataFile;
92
+ // Update the template's resources
93
+ template.resources.push(storageName.folder + "/" + storageName.filename);
94
+ }
95
+ }
96
+ }
97
+ return Promise.resolve(templates);
98
+ }
99
+ exports.postProcessFormItems = postProcessFormItems;
100
+ // ------------------------------------------------------------------------------------------------------------------ //
101
+ /**
102
+ * Encapsulates the rules for naming a form's data file.
103
+ * Chooses the first parameter that's defined and is not the string "undefined".
104
+ *
105
+ * @param itemName Template's item name
106
+ * @param dataFilename The data file name
107
+ * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
108
+ *
109
+ * @return A name for the data file
110
+ */
111
+ function _getFormDataFilename(itemName, dataFilename, itemIdAsName) {
112
+ const originalFilename = itemName || dataFilename;
113
+ const filename = originalFilename && originalFilename !== "undefined"
114
+ ? originalFilename
115
+ : itemIdAsName;
116
+ return filename;
117
+ }
118
+ exports._getFormDataFilename = _getFormDataFilename;
63
119
  //# sourceMappingURL=post-process.js.map
@@ -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,UA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AAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC;AA/CD,oDA+CC;AAED,wHAAwH;AAExH;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAClC,QAAgB,EAChB,YAAoB,EACpB,YAAoB;IAEpB,MAAM,gBAAgB,GAAG,QAAQ,IAAI,YAAY,CAAC;IAClD,MAAM,QAAQ,GACZ,gBAAgB,IAAI,gBAAgB,KAAK,WAAW;QAClD,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,YAAY,CAAC;IACnB,OAAO,QAAQ,CAAC;AAClB,CAAC;AAXD,oDAWC"}
@@ -23,6 +23,48 @@ import JSZip from "jszip";
23
23
  * @returns Promise that resolves to the updated zip object
24
24
  */
25
25
  export declare function swizzleFormObject(zipObject: JSZip, templateDictionary: any): Promise<JSZip>;
26
+ /**
27
+ * Templatizes the content in a form's zip object.
28
+ *
29
+ * @param zipObject Form zip object to templatize; it is modified in place
30
+ * @param templateDictionary Dictionary of values to use when templatizing
31
+ * @returns Promise that resolves to the modified zip object
32
+ */
33
+ export declare function templatizeFormData(zipObject: JSZip, templateDictionary: any): Promise<JSZip>;
34
+ /**
35
+ * Replaces the feature service url references.
36
+ *
37
+ * @param contents String in which to replace feature service URLs
38
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
39
+ * @param agoIdTypeRegEx Matcher for AGO ids with "_type" suffix
40
+ * @returns Modified contents
41
+ */
42
+ export declare function _replaceFeatureServiceURLs(contents: string, templateDictionary: any, agoIdTypeRegEx: RegExp): string;
43
+ /**
44
+ * Replaces the item id references.
45
+ *
46
+ * @param contents String in which to replace the item id references
47
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
48
+ * @param agoIdTypeRegEx Matcher for AGO ids
49
+ * @returns Modified contents
50
+ */
51
+ export declare function _replaceItemIds(contents: string, templateDictionary: any, agoIdTypeRegEx: RegExp): string;
52
+ /**
53
+ * Replaces portal base url references.
54
+ *
55
+ * @param contents String in which to replace the portal base url references
56
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
57
+ * @returns Modified contents
58
+ */
59
+ export declare function _replacePortalBaseUrls(contents: string, templateDictionary: any): string;
60
+ /**
61
+ * Replaces workflow manager base url references.
62
+ *
63
+ * @param contents String in which to replace the workflow manager base url references
64
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
65
+ * @returns Modified contents
66
+ */
67
+ export declare function _replaceWorkflowManagerBaseUrls(contents: string, templateDictionary: any): string;
26
68
  /**
27
69
  * Updates the binary content of a zip object.
28
70
  *
@@ -57,7 +57,102 @@ export async function swizzleFormObject(zipObject, templateDictionary) {
57
57
  */
58
58
  return Promise.resolve(zipObject);
59
59
  }
60
+ /**
61
+ * Templatizes the content in a form's zip object.
62
+ *
63
+ * @param zipObject Form zip object to templatize; it is modified in place
64
+ * @param templateDictionary Dictionary of values to use when templatizing
65
+ * @returns Promise that resolves to the modified zip object
66
+ */
67
+ export async function templatizeFormData(zipObject, templateDictionary) {
68
+ const zipObjectContents = await common.getZipObjectContents(zipObject);
69
+ zipObjectContents.forEach((zipFile) => {
70
+ if (zipFile.file.endsWith(".info") || zipFile.file.endsWith(".itemInfo") || zipFile.file.endsWith(".json")
71
+ || zipFile.file.endsWith(".webform") || zipFile.file.endsWith(".xml")) {
72
+ let contents = zipFile.content;
73
+ const agoIdTypeRegEx = /\b([0-9A-Fa-f]){32}_type/g;
74
+ // Replace the item id references
75
+ contents = _replaceItemIds(contents, templateDictionary, agoIdTypeRegEx);
76
+ // Replace the feature service url references
77
+ contents = _replaceFeatureServiceURLs(contents, templateDictionary, agoIdTypeRegEx);
78
+ // Replace portal base url references
79
+ contents = _replacePortalBaseUrls(contents, templateDictionary);
80
+ // Replace workflow manager base url references
81
+ contents = _replaceWorkflowManagerBaseUrls(contents, templateDictionary);
82
+ zipObject.file(zipFile.file, contents);
83
+ }
84
+ });
85
+ // Return the modified zip object
86
+ return Promise.resolve(zipObject);
87
+ }
60
88
  // ------------------------------------------------------------------------------------------------------------------ //
89
+ /**
90
+ * Replaces the feature service url references.
91
+ *
92
+ * @param contents String in which to replace feature service URLs
93
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
94
+ * @param agoIdTypeRegEx Matcher for AGO ids with "_type" suffix
95
+ * @returns Modified contents
96
+ */
97
+ export function _replaceFeatureServiceURLs(contents, templateDictionary, agoIdTypeRegEx) {
98
+ let updatedContents = contents;
99
+ const fsIds = Object.keys(templateDictionary)
100
+ .filter((key) => key.match(agoIdTypeRegEx) && templateDictionary[key].type === "Feature Service");
101
+ fsIds.forEach((fsId) => {
102
+ const urlToReplace = templateDictionary[fsId].url;
103
+ const urlReplacement = templateDictionary[urlToReplace];
104
+ if (urlReplacement) {
105
+ updatedContents = updatedContents.replace(new RegExp(urlToReplace, "g"), urlReplacement);
106
+ }
107
+ });
108
+ return updatedContents;
109
+ }
110
+ /**
111
+ * Replaces the item id references.
112
+ *
113
+ * @param contents String in which to replace the item id references
114
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
115
+ * @param agoIdTypeRegEx Matcher for AGO ids
116
+ * @returns Modified contents
117
+ */
118
+ export function _replaceItemIds(contents, templateDictionary, agoIdTypeRegEx) {
119
+ let updatedContents = contents;
120
+ const itemIds = Object.keys(templateDictionary)
121
+ .filter((key) => key.match(agoIdTypeRegEx) && templateDictionary[key].type !== "Feature Service")
122
+ .map((key) => key.replace("_type", ""));
123
+ itemIds.forEach((itemId) => {
124
+ updatedContents = updatedContents.replace(new RegExp(itemId, "g"), `{{${itemId}.itemId}}`);
125
+ });
126
+ return updatedContents;
127
+ }
128
+ /**
129
+ * Replaces portal base url references.
130
+ *
131
+ * @param contents String in which to replace the portal base url references
132
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
133
+ * @returns Modified contents
134
+ */
135
+ export function _replacePortalBaseUrls(contents, templateDictionary) {
136
+ let updatedContents = contents;
137
+ if (templateDictionary.portalBaseUrl) {
138
+ updatedContents = updatedContents.replace(new RegExp(templateDictionary.portalBaseUrl, "g"), "{{portalBaseUrl}}");
139
+ }
140
+ return updatedContents;
141
+ }
142
+ /**
143
+ * Replaces workflow manager base url references.
144
+ *
145
+ * @param contents String in which to replace the workflow manager base url references
146
+ * @param templateDictionary Item ids of feature services pointing to feature service URLs
147
+ * @returns Modified contents
148
+ */
149
+ export function _replaceWorkflowManagerBaseUrls(contents, templateDictionary) {
150
+ let updatedContents = contents;
151
+ if (templateDictionary.workflowBaseUrl) {
152
+ updatedContents = updatedContents.replace(new RegExp(templateDictionary.workflowBaseUrl, "g"), "{{workflowBaseUrl}}");
153
+ }
154
+ return updatedContents;
155
+ }
61
156
  /**
62
157
  * Updates the binary content of a zip object.
63
158
  *
@@ -1 +1 @@
1
- {"version":3,"file":"formUtils.js","sourceRoot":"","sources":["../../src/formUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAGhD,wHAAwH;AAExH;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,SAAgB,EAChB,kBAAuB;IAEvB,qCAAqC;IACrC,MAAM,iBAAiB,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAEvE,qHAAqH;IACrH,IAAI,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACrB,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;UACxB,QAAQ,CAAE,gCAAgC;UAC1C,GAAG,CAAC,iBAAiB,EAAE,GAAG,IAAI,GAAG,EAAE,CAAE,+CAA+C;KACvF,CAAC;IAEF,qFAAqF;IACrF,mFAAmF;IACnF,iBAAiB,CAAC,OAAO,CACvB,CAAC,WAA0C,EAAE,EAAE;QAE7C,gDAAgD;QAChD,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,EAAE;YAC3C,MAAM,iBAAiB,GAAG,2BAA2B,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;YAEvF,6CAA6C;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IACvC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAEpF,4GAA4G;IAC5G,YAAY,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;QACrC,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,OAAO,WAAW,EAAE,MAAM,KAAK,QAAQ,EAAE;YAC3C,uBAAuB,GAAG,uBAAuB,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;SAC5G;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import * as common from "@esri/solution-common";
17
17
  /**
18
- * Form post-processing actions
18
+ * Post-processes form items and the end of Solution item deployment.
19
19
  *
20
20
  * @param {string} itemId The item ID
21
21
  * @param {string} type The template type
@@ -25,3 +25,22 @@ import * as common from "@esri/solution-common";
25
25
  * @returns Promise resolving to successfulness of update
26
26
  */
27
27
  export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: common.IItemTemplate, templates: common.IItemTemplate[], templateDictionary: any, authentication: common.UserSession): Promise<any>;
28
+ /**
29
+ * Post-processes form items just before a Solution item is created.
30
+ *
31
+ * @param templates All of the templates in the created Solution item
32
+ * @param templateDictionary A collection of mappings from item ids and service URLs to templatizing info
33
+ * @returns
34
+ */
35
+ export declare function postProcessFormItems(templates: common.IItemTemplate[], templateDictionary: any): Promise<common.IItemTemplate[]>;
36
+ /**
37
+ * Encapsulates the rules for naming a form's data file.
38
+ * Chooses the first parameter that's defined and is not the string "undefined".
39
+ *
40
+ * @param itemName Template's item name
41
+ * @param dataFilename The data file name
42
+ * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
43
+ *
44
+ * @return A name for the data file
45
+ */
46
+ export declare function _getFormDataFilename(itemName: string, dataFilename: string, itemIdAsName: string): string;
@@ -24,7 +24,7 @@ import * as common from "@esri/solution-common";
24
24
  import * as formUtils from "./formUtils";
25
25
  // ------------------------------------------------------------------------------------------------------------------ //
26
26
  /**
27
- * Form post-processing actions
27
+ * Post-processes form items and the end of Solution item deployment.
28
28
  *
29
29
  * @param {string} itemId The item ID
30
30
  * @param {string} type The template type
@@ -55,4 +55,58 @@ export async function postProcess(itemId, type, itemInfos, template, templates,
55
55
  // Update the item's template
56
56
  return common.updateItemTemplateFromDictionary(itemId, templateDictionary, authentication);
57
57
  }
58
+ /**
59
+ * Post-processes form items just before a Solution item is created.
60
+ *
61
+ * @param templates All of the templates in the created Solution item
62
+ * @param templateDictionary A collection of mappings from item ids and service URLs to templatizing info
63
+ * @returns
64
+ */
65
+ export async function postProcessFormItems(templates, templateDictionary) {
66
+ for (const template of templates) {
67
+ if (template.type === "Form") {
68
+ // Store the form's data in the solution resources, not in template
69
+ const formData = template.data;
70
+ template.data = null;
71
+ // Add the form data to the template for a post-process resource upload
72
+ if (formData) {
73
+ let zipObject = await common.blobToZipObject(formData);
74
+ // Templatize the form
75
+ zipObject = await formUtils.templatizeFormData(zipObject, templateDictionary);
76
+ template.item.name = _getFormDataFilename(template.item.name, formData.name, `${template.itemId}.zip`);
77
+ const templatizedFormData = await common.zipObjectToZipFile(zipObject, template.item.name);
78
+ // Add the data file to the template so that it can be uploaded with the other resources in the solution
79
+ const storageName = common.convertItemResourceToStorageResource(template.itemId, template.item.name, common.SolutionTemplateFormatVersion, common.SolutionResourceType.data);
80
+ const dataFile = {
81
+ itemId: template.itemId,
82
+ file: templatizedFormData,
83
+ folder: storageName.folder,
84
+ filename: template.item.name
85
+ };
86
+ template.dataFile = dataFile;
87
+ // Update the template's resources
88
+ template.resources.push(storageName.folder + "/" + storageName.filename);
89
+ }
90
+ }
91
+ }
92
+ return Promise.resolve(templates);
93
+ }
94
+ // ------------------------------------------------------------------------------------------------------------------ //
95
+ /**
96
+ * Encapsulates the rules for naming a form's data file.
97
+ * Chooses the first parameter that's defined and is not the string "undefined".
98
+ *
99
+ * @param itemName Template's item name
100
+ * @param dataFilename The data file name
101
+ * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
102
+ *
103
+ * @return A name for the data file
104
+ */
105
+ export function _getFormDataFilename(itemName, dataFilename, itemIdAsName) {
106
+ const originalFilename = itemName || dataFilename;
107
+ const filename = originalFilename && originalFilename !== "undefined"
108
+ ? originalFilename
109
+ : itemIdAsName;
110
+ return filename;
111
+ }
58
112
  //# sourceMappingURL=post-process.js.map
@@ -1 +1 @@
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;AAChD,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,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,4BAA4B;IAC5B,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IACxF,IAAI,gBAAgB,EAAE;QACpB,MAAM,SAAS,GAAU,MAAM,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAExE,kBAAkB;QAClB,MAAM,gBAAgB,GAAG,MAAM,SAAS,CAAC,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;QAE1F,kBAAkB;QAClB,KAAK,MAAM,CAAC,uBAAuB,CA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 @@
1
1
  {
2
2
  "name": "@esri/solution-form",
3
- "version": "5.3.7",
3
+ "version": "5.4.1",
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,16 +23,16 @@
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.130.0",
26
+ "@esri/hub-common": "^14.157.0",
27
27
  "@esri/hub-initiatives": "^14.0.0",
28
- "@esri/hub-sites": "^14.2.4",
29
- "@esri/hub-teams": "^14.1.0",
30
- "@esri/solution-common": "^5.3.7",
31
- "@esri/solution-feature-layer": "^5.3.7",
32
- "@esri/solution-file": "^5.3.7",
33
- "@esri/solution-group": "^5.3.7",
34
- "@esri/solution-simple-types": "^5.3.7",
35
- "@esri/solution-storymap": "^5.3.7",
28
+ "@esri/hub-sites": "^15.0.0",
29
+ "@esri/hub-teams": "^14.1.1",
30
+ "@esri/solution-common": "^5.4.1",
31
+ "@esri/solution-feature-layer": "^5.4.1",
32
+ "@esri/solution-file": "^5.4.1",
33
+ "@esri/solution-group": "^5.4.1",
34
+ "@esri/solution-simple-types": "^5.4.1",
35
+ "@esri/solution-storymap": "^5.4.1",
36
36
  "@types/jasmine": "^5.1.4",
37
37
  "fetch-mock": "^7.7.3",
38
38
  "jasmine": "^5.1.0",
@@ -78,5 +78,5 @@
78
78
  "esri",
79
79
  "ES6"
80
80
  ],
81
- "gitHead": "628cdd259928f8d97d2697d6344acc7b20f7ac15"
81
+ "gitHead": "34d872d5a1796ff00c8f6021992902694efe4dbf"
82
82
  }