data-restructor 3.3.4 → 3.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.
Files changed (49) hide show
  1. package/.auto-changelog +9 -0
  2. package/.auto-changelog-template.hbs +36 -0
  3. package/.github/workflows/codeql-analysis.yml +4 -4
  4. package/.github/workflows/continuous-integration.yaml +84 -0
  5. package/CHANGELOG.md +199 -94
  6. package/CONTRIBUTING.md +51 -43
  7. package/Commands.md +16 -15
  8. package/README.md +193 -137
  9. package/SECURITY.md +2 -2
  10. package/coverage/coverage-summary.json +3 -3
  11. package/coverage/datarestructor.js.html +133 -133
  12. package/coverage/describedfield.js.html +45 -45
  13. package/coverage/index.html +1 -1
  14. package/coverage/templateResolver.js.html +26 -26
  15. package/devdist/datarestructor-ie.js +1487 -1678
  16. package/devdist/datarestructor.js +1438 -1614
  17. package/devdist/describedfield-ie.js +260 -282
  18. package/devdist/describedfield.js +257 -279
  19. package/devdist/templateResolver-ie.js +221 -257
  20. package/devdist/templateResolver.js +192 -228
  21. package/dist/datarestructor-ie.js +1 -1
  22. package/dist/datarestructor-ie.js.map +1 -1
  23. package/dist/datarestructor.js +1 -1
  24. package/dist/datarestructor.js.map +1 -1
  25. package/dist/describedfield-ie.js +1 -1
  26. package/dist/describedfield-ie.js.map +1 -1
  27. package/dist/describedfield.js +1 -1
  28. package/dist/describedfield.js.map +1 -1
  29. package/dist/templateResolver-ie.js +1 -1
  30. package/dist/templateResolver-ie.js.map +1 -1
  31. package/dist/templateResolver.js +1 -1
  32. package/dist/templateResolver.js.map +1 -1
  33. package/docs/datarestructor.js.html +1 -1
  34. package/docs/describedfield.js.html +1 -1
  35. package/docs/index.html +54 -44
  36. package/docs/module-datarestructor.DescribedEntryCreator.html +94 -94
  37. package/docs/module-datarestructor.PropertyStructureDescriptionBuilder.html +1 -1
  38. package/docs/module-datarestructor.Restructor.html +1 -1
  39. package/docs/module-datarestructor.Transform.html +605 -605
  40. package/docs/module-datarestructor.html +959 -995
  41. package/docs/module-described_field.DescribedDataFieldBuilder.html +1 -1
  42. package/docs/module-described_field.DescribedDataFieldGroup.html +1 -1
  43. package/docs/module-described_field.html +1 -37
  44. package/docs/module-template_resolver.Resolver.html +167 -167
  45. package/docs/module-template_resolver.html +1 -37
  46. package/docs/templateResolver.js.html +1 -1
  47. package/package.json +20 -14
  48. package/renovate.json +14 -0
  49. package/.github/workflows/action.yaml +0 -44
@@ -6,7 +6,7 @@
6
6
  // anything defined in a previous bundle is accessed via the
7
7
  // orig method which is the require for previous bundles
8
8
 
9
- (function(modules, entry, mainEntry, parcelRequireName, globalName) {
9
+ (function (modules, entry, mainEntry, parcelRequireName, globalName) {
10
10
  /* eslint-disable no-undef */
11
11
  var globalObject =
12
12
  typeof globalThis !== 'undefined'
@@ -80,11 +80,13 @@
80
80
  return cache[name].exports;
81
81
 
82
82
  function localRequire(x) {
83
- return newRequire(localRequire.resolve(x));
83
+ var res = localRequire.resolve(x);
84
+ return res === false ? {} : newRequire(res);
84
85
  }
85
86
 
86
87
  function resolve(x) {
87
- return modules[name][1][x] || x;
88
+ var id = modules[name][1][x];
89
+ return id != null ? id : x;
88
90
  }
89
91
  }
90
92
 
@@ -99,9 +101,9 @@
99
101
  newRequire.modules = modules;
100
102
  newRequire.cache = cache;
101
103
  newRequire.parent = previousRequire;
102
- newRequire.register = function(id, exports) {
104
+ newRequire.register = function (id, exports) {
103
105
  modules[id] = [
104
- function(require, module) {
106
+ function (require, module) {
105
107
  module.exports = exports;
106
108
  },
107
109
  {},
@@ -109,7 +111,7 @@
109
111
  };
110
112
 
111
113
  Object.defineProperty(newRequire, 'root', {
112
- get: function() {
114
+ get: function () {
113
115
  return globalObject[parcelRequireName];
114
116
  },
115
117
  });
@@ -131,7 +133,7 @@
131
133
 
132
134
  // RequireJS
133
135
  } else if (typeof define === 'function' && define.amd) {
134
- define(function() {
136
+ define(function () {
135
137
  return mainExports;
136
138
  });
137
139
 
@@ -140,287 +142,263 @@
140
142
  this[globalName] = mainExports;
141
143
  }
142
144
  }
143
- })({"4X3T9":[function(require,module,exports) {
145
+ })({"g0GVY":[function(require,module,exports) {
144
146
  /**
145
- * @file Describes a data field of the restructured data.
146
- * @version {@link https://github.com/JohT/data-restructor-js/releases/latest latest version}
147
- * @author JohT
148
- * @version ${project.version}
149
- */
150
- "use strict";
151
- var module = describedFieldInternalCreateIfNotExists(module);
152
- // Fallback for vanilla js without modules
147
+ * @file Describes a data field of the restructured data.
148
+ * @version {@link https://github.com/JohT/data-restructor-js/releases/latest latest version}
149
+ * @author JohT
150
+ * @version ${project.version}
151
+ */ "use strict";
152
+ var module = describedFieldInternalCreateIfNotExists(module); // Fallback for vanilla js without modules
153
153
  function describedFieldInternalCreateIfNotExists(objectToCheck) {
154
- return objectToCheck || ({});
154
+ return objectToCheck || {};
155
155
  }
156
156
  /**
157
- * Describes a data field of the restructured data.
158
- * @module described_field
159
- */
160
- var described_field = module.exports = {};
161
- // Export module for npm...
157
+ * Describes a data field of the restructured data.
158
+ * @module described_field
159
+ */ var described_field = module.exports = {}; // Export module for npm...
162
160
  described_field.internalCreateIfNotExists = describedFieldInternalCreateIfNotExists;
163
161
  /**
164
- * Describes a field of the restructured data.
165
- * Dynamically added properties represent custom named groups containing DescribedDataField-Arrays.
166
- *
167
- * @typedef {Object} module:described_field.DescribedDataField
168
- * @property {string} [category=""] - name of the category. Could contain a short domain name like "product" or "vendor".
169
- * @property {string} [type=""] - type of the data element. Examples: "summary" for e.g. a list overview. "detail" e.g. when a summary is selected. "filter" e.g. for field/value pair results that can be selected as data filters.
170
- * @property {string} [abbreviation=""] - one optional character, a symbol character or a short abbreviation of the category
171
- * @property {string} [image=""] - one optional path to an image resource
172
- * @property {string} index - array of numbers containing the splitted index. Example: "responses[2].hits.hits[4]._source.name" will have an index of [2,4]
173
- * @property {string[]} groupNames - array of names of all dynamically added properties representing groups
174
- * @property {string} displayName - display name of the field
175
- * @property {string} fieldName - field name
176
- * @property {{*}} value - content of the field
177
- * @property {module:described_field.DescribedDataField[]} [couldBeAnyCustomGroupName] any number of groups attached to the field each containing multiple fields
178
- */
179
- described_field.DescribedDataFieldBuilder = (function () {
180
- /**
181
- * Builds a {@link module:described_field.DescribedDataField}.
182
- * DescribedDataField is the main element of the restructured data and therefore considered "public".
183
- * @constructs DescribedDataFieldBuilder
184
- * @alias module:described_field.DescribedDataFieldBuilder
185
- */
186
- function DescribedDataFieldBuilder() {
162
+ * Describes a field of the restructured data.
163
+ * Dynamically added properties represent custom named groups containing DescribedDataField-Arrays.
164
+ *
165
+ * @typedef {Object} module:described_field.DescribedDataField
166
+ * @property {string} [category=""] - name of the category. Could contain a short domain name like "product" or "vendor".
167
+ * @property {string} [type=""] - type of the data element. Examples: "summary" for e.g. a list overview. "detail" e.g. when a summary is selected. "filter" e.g. for field/value pair results that can be selected as data filters.
168
+ * @property {string} [abbreviation=""] - one optional character, a symbol character or a short abbreviation of the category
169
+ * @property {string} [image=""] - one optional path to an image resource
170
+ * @property {string} index - array of numbers containing the splitted index. Example: "responses[2].hits.hits[4]._source.name" will have an index of [2,4]
171
+ * @property {string[]} groupNames - array of names of all dynamically added properties representing groups
172
+ * @property {string} displayName - display name of the field
173
+ * @property {string} fieldName - field name
174
+ * @property {{*}} value - content of the field
175
+ * @property {module:described_field.DescribedDataField[]} [couldBeAnyCustomGroupName] any number of groups attached to the field each containing multiple fields
176
+ */ described_field.DescribedDataFieldBuilder = function() {
187
177
  /**
188
- * @type {module:described_field.DescribedDataField}
189
- */
190
- this.describedField = {
191
- category: "",
192
- type: "",
193
- abbreviation: "",
194
- image: "",
195
- index: [],
196
- groupNames: [],
197
- displayName: "",
198
- fieldName: "",
199
- value: ""
200
- };
201
- /**
202
- * Takes over all values of the template {@link module:described_field.DescribedDataField}.
203
- * @function
204
- * @param {module:described_field.DescribedDataField} template
205
- * @returns {DescribedDataFieldBuilder}
206
- * @example fromDescribedDataField(sourceField)
207
- */
208
- this.fromDescribedDataField = function (template) {
209
- this.category(template.category);
210
- this.type(template.type);
211
- this.abbreviation(template.abbreviation);
212
- this.image(template.image);
213
- this.index(template.index);
214
- this.groupNames(template.groupNames);
215
- this.displayName(template.displayName);
216
- this.fieldName(template.fieldName);
217
- this.value(template.value);
218
- return this;
219
- };
220
- /**
221
- * Sets the category.
222
- *
223
- * Contains a short domain nam, for example:
224
- * - "product" for products
225
- * - "vendor" for vendors
226
- *
227
- * @function
228
- * @param {String} [value=""]
229
- * @returns {DescribedDataFieldBuilder}
230
- * @example category("Product")
231
- */
232
- this.category = function (value) {
233
- this.describedField.category = withDefaultString(value, "");
234
- return this;
235
- };
236
- /**
237
- * Sets the type.
238
- *
239
- * Contains the type of the entry, for example:
240
- * - "summary" for e.g. a list overview.
241
- * - "detail" e.g. when a summary is selected.
242
- * - "filter" e.g. for field/value pair results that can be selected as search parameters.
243
- *
244
- * @function
245
- * @param {String} [value=""]
246
- * @returns {DescribedDataFieldBuilder}
247
- * @example type("summary")
248
- */
249
- this.type = function (value) {
250
- this.describedField.type = withDefaultString(value, "");
251
- return this;
252
- };
253
- /**
254
- * Sets the optional abbreviation.
255
- *
256
- * Contains a symbol character or a very short abbreviation of the category.
257
- * - "P" for products
258
- * - "V" for vendors
259
- *
260
- * @function
261
- * @param {String} [value=""]
262
- * @returns {DescribedDataFieldBuilder}
263
- * @example abbreviation("P")
264
- */
265
- this.abbreviation = function (value) {
266
- this.describedField.abbreviation = withDefaultString(value, "");
267
- return this;
268
- };
269
- /**
270
- * Sets the optional path to an image resource.
271
- *
272
- * @function
273
- * @param {String} [value=""]
274
- * @returns {DescribedDataFieldBuilder}
275
- * @example image("img/product.png")
276
- */
277
- this.image = function (value) {
278
- this.describedField.image = withDefaultString(value, "");
279
- return this;
280
- };
281
- /**
282
- * Sets the index as an array of numbers containing the splitted array indexes of the source field.
283
- * Example: "responses[2].hits.hits[4]._source.name" will have an index of [2,4].
284
- *
285
- * @function
286
- * @param {number[]} [value=[]]
287
- * @returns {DescribedDataFieldBuilder}
288
- * @example index([2,4])
289
- */
290
- this.index = function (value) {
291
- this.describedField.index = withDefaultArray(value, []);
292
- return this;
293
- };
294
- /**
295
- * Sets the group names as an array of strings containing the names of the dynamically added properties,
296
- * that contain an array of {@link module:described_field.DescribedDataField}-Objects.
297
- *
298
- * @function
299
- * @param {string[]} [value=[]]
300
- * @returns {DescribedDataFieldBuilder}
301
- * @example groupNames(["summaries","details","options"])
302
- */
303
- this.groupNames = function (value) {
304
- this.describedField.groupNames = withDefaultArray(value, []);
305
- return this;
306
- };
307
- /**
308
- * Sets the display name.
309
- *
310
- * @function
311
- * @param {String} [value=""]
312
- * @returns {DescribedDataFieldBuilder}
313
- * @example displayName("Color")
314
- */
315
- this.displayName = function (value) {
316
- this.describedField.displayName = withDefaultString(value, "");
317
- return this;
318
- };
319
- /**
320
- * Sets the (technical) field name.
321
- *
322
- * @function
323
- * @param {String} [value=""]
324
- * @returns {DescribedDataFieldBuilder}
325
- * @example fieldName("color")
326
- */
327
- this.fieldName = function (value) {
328
- this.describedField.fieldName = withDefaultString(value, "");
329
- return this;
330
- };
331
- /**
332
- * Sets the value/content of the field.
333
- *
334
- * @function
335
- * @param {*} value
336
- * @returns {DescribedDataFieldBuilder}
337
- * @example value("darkblue")
338
- */
339
- this.value = function (value) {
340
- this.describedField.value = value;
341
- return this;
342
- };
343
- /**
344
- * Finalizes the settings and builds the {@link module:described_field.DescribedDataField}.
345
- * @function
346
- * @returns {module:described_field.DescribedDataField}
347
- */
348
- this.build = function () {
349
- return this.describedField;
350
- };
351
- }
352
- function isSpecifiedString(value) {
353
- return typeof value === "string" && value !== null && value !== "";
354
- }
355
- function withDefaultString(value, defaultValue) {
356
- return isSpecifiedString(value) ? value : defaultValue;
357
- }
358
- function withDefaultArray(value, defaultValue) {
359
- return value === undefined || value === null ? defaultValue : value;
360
- }
361
- return DescribedDataFieldBuilder;
362
- })();
178
+ * Builds a {@link module:described_field.DescribedDataField}.
179
+ * DescribedDataField is the main element of the restructured data and therefore considered "public".
180
+ * @constructs DescribedDataFieldBuilder
181
+ * @alias module:described_field.DescribedDataFieldBuilder
182
+ */ function DescribedDataFieldBuilder() {
183
+ /**
184
+ * @type {module:described_field.DescribedDataField}
185
+ */ this.describedField = {
186
+ category: "",
187
+ type: "",
188
+ abbreviation: "",
189
+ image: "",
190
+ index: [],
191
+ groupNames: [],
192
+ displayName: "",
193
+ fieldName: "",
194
+ value: ""
195
+ };
196
+ /**
197
+ * Takes over all values of the template {@link module:described_field.DescribedDataField}.
198
+ * @function
199
+ * @param {module:described_field.DescribedDataField} template
200
+ * @returns {DescribedDataFieldBuilder}
201
+ * @example fromDescribedDataField(sourceField)
202
+ */ this.fromDescribedDataField = function(template) {
203
+ this.category(template.category);
204
+ this.type(template.type);
205
+ this.abbreviation(template.abbreviation);
206
+ this.image(template.image);
207
+ this.index(template.index);
208
+ this.groupNames(template.groupNames);
209
+ this.displayName(template.displayName);
210
+ this.fieldName(template.fieldName);
211
+ this.value(template.value);
212
+ return this;
213
+ };
214
+ /**
215
+ * Sets the category.
216
+ *
217
+ * Contains a short domain nam, for example:
218
+ * - "product" for products
219
+ * - "vendor" for vendors
220
+ *
221
+ * @function
222
+ * @param {String} [value=""]
223
+ * @returns {DescribedDataFieldBuilder}
224
+ * @example category("Product")
225
+ */ this.category = function(value) {
226
+ this.describedField.category = withDefaultString(value, "");
227
+ return this;
228
+ };
229
+ /**
230
+ * Sets the type.
231
+ *
232
+ * Contains the type of the entry, for example:
233
+ * - "summary" for e.g. a list overview.
234
+ * - "detail" e.g. when a summary is selected.
235
+ * - "filter" e.g. for field/value pair results that can be selected as search parameters.
236
+ *
237
+ * @function
238
+ * @param {String} [value=""]
239
+ * @returns {DescribedDataFieldBuilder}
240
+ * @example type("summary")
241
+ */ this.type = function(value) {
242
+ this.describedField.type = withDefaultString(value, "");
243
+ return this;
244
+ };
245
+ /**
246
+ * Sets the optional abbreviation.
247
+ *
248
+ * Contains a symbol character or a very short abbreviation of the category.
249
+ * - "P" for products
250
+ * - "V" for vendors
251
+ *
252
+ * @function
253
+ * @param {String} [value=""]
254
+ * @returns {DescribedDataFieldBuilder}
255
+ * @example abbreviation("P")
256
+ */ this.abbreviation = function(value) {
257
+ this.describedField.abbreviation = withDefaultString(value, "");
258
+ return this;
259
+ };
260
+ /**
261
+ * Sets the optional path to an image resource.
262
+ *
263
+ * @function
264
+ * @param {String} [value=""]
265
+ * @returns {DescribedDataFieldBuilder}
266
+ * @example image("img/product.png")
267
+ */ this.image = function(value) {
268
+ this.describedField.image = withDefaultString(value, "");
269
+ return this;
270
+ };
271
+ /**
272
+ * Sets the index as an array of numbers containing the splitted array indexes of the source field.
273
+ * Example: "responses[2].hits.hits[4]._source.name" will have an index of [2,4].
274
+ *
275
+ * @function
276
+ * @param {number[]} [value=[]]
277
+ * @returns {DescribedDataFieldBuilder}
278
+ * @example index([2,4])
279
+ */ this.index = function(value) {
280
+ this.describedField.index = withDefaultArray(value, []);
281
+ return this;
282
+ };
283
+ /**
284
+ * Sets the group names as an array of strings containing the names of the dynamically added properties,
285
+ * that contain an array of {@link module:described_field.DescribedDataField}-Objects.
286
+ *
287
+ * @function
288
+ * @param {string[]} [value=[]]
289
+ * @returns {DescribedDataFieldBuilder}
290
+ * @example groupNames(["summaries","details","options"])
291
+ */ this.groupNames = function(value) {
292
+ this.describedField.groupNames = withDefaultArray(value, []);
293
+ return this;
294
+ };
295
+ /**
296
+ * Sets the display name.
297
+ *
298
+ * @function
299
+ * @param {String} [value=""]
300
+ * @returns {DescribedDataFieldBuilder}
301
+ * @example displayName("Color")
302
+ */ this.displayName = function(value) {
303
+ this.describedField.displayName = withDefaultString(value, "");
304
+ return this;
305
+ };
306
+ /**
307
+ * Sets the (technical) field name.
308
+ *
309
+ * @function
310
+ * @param {String} [value=""]
311
+ * @returns {DescribedDataFieldBuilder}
312
+ * @example fieldName("color")
313
+ */ this.fieldName = function(value) {
314
+ this.describedField.fieldName = withDefaultString(value, "");
315
+ return this;
316
+ };
317
+ /**
318
+ * Sets the value/content of the field.
319
+ *
320
+ * @function
321
+ * @param {*} value
322
+ * @returns {DescribedDataFieldBuilder}
323
+ * @example value("darkblue")
324
+ */ this.value = function(value) {
325
+ this.describedField.value = value;
326
+ return this;
327
+ };
328
+ /**
329
+ * Finalizes the settings and builds the {@link module:described_field.DescribedDataField}.
330
+ * @function
331
+ * @returns {module:described_field.DescribedDataField}
332
+ */ this.build = function() {
333
+ return this.describedField;
334
+ };
335
+ }
336
+ function isSpecifiedString(value) {
337
+ return typeof value === "string" && value !== null && value !== "";
338
+ }
339
+ function withDefaultString(value, defaultValue) {
340
+ return isSpecifiedString(value) ? value : defaultValue;
341
+ }
342
+ function withDefaultArray(value, defaultValue) {
343
+ return value === undefined || value === null ? defaultValue : value;
344
+ }
345
+ return DescribedDataFieldBuilder;
346
+ }();
363
347
  /**
364
- * Creates a new described data field with all properties of the original one except for dynamically added groups.
365
- * @param {module:described_field.DescribedDataField} describedDataField
366
- * @returns {module:described_field.DescribedDataField}
367
- * @memberof module:described_field
368
- */
369
- described_field.copyWithoutGroups = function (describedDataField) {
370
- return new described_field.DescribedDataFieldBuilder().fromDescribedDataField(describedDataField).groupNames([]).build();
348
+ * Creates a new described data field with all properties of the original one except for dynamically added groups.
349
+ * @param {module:described_field.DescribedDataField} describedDataField
350
+ * @returns {module:described_field.DescribedDataField}
351
+ * @memberof module:described_field
352
+ */ described_field.copyWithoutGroups = function(describedDataField) {
353
+ return new described_field.DescribedDataFieldBuilder().fromDescribedDataField(describedDataField).groupNames([]).build();
371
354
  };
372
- described_field.DescribedDataFieldGroup = (function () {
373
- /**
374
- * Adds groups to {@link module:described_field.DescribedDataField}s. These groups are dynamically added properties
375
- * that contain an array of sub fields of the same type {@link module:described_field.DescribedDataField}s.
376
- *
377
- * @param {module:described_field.DescribedDataField} dataField
378
- * @constructs DescribedDataFieldGroup
379
- * @alias module:described_field.DescribedDataFieldGroup
380
- * @example new described_field.DescribedDataFieldGroup(field).addGroupEntry("details", detailField);
381
- */
382
- function DescribedDataFieldGroup(dataField) {
383
- this.dataField = dataField;
384
- /**
385
- * Adds an entry to the given group. If the group does not exist, it will be created.
386
- * @function
387
- * @param {String} groupName name of the group to which the entry will be added
388
- * @param {module:described_field.DescribedDataField} describedField sub field that is added to the group
389
- * @returns {DescribedDataFieldGroup}
390
- */
391
- this.addGroupEntry = function (groupName, describedField) {
392
- this.addGroupEntries(groupName, [describedField]);
393
- return this;
394
- };
355
+ described_field.DescribedDataFieldGroup = function() {
395
356
  /**
396
- * Adds entries to the given group. If the group does not exist, it will be created.
397
- * @function
398
- * @param {String} groupName name of the group to which the entries will be added
399
- * @param {module:described_field.DescribedDataField[]} describedFields sub fields that are added to the group
400
- * @returns {DescribedDataFieldGroup}
401
- */
402
- this.addGroupEntries = function (groupName, describedFields) {
403
- if (!groupName || groupName.length === 0) {
404
- return this;
405
- }
406
- if (!describedFields || describedFields.length === 0) {
407
- return this;
408
- }
409
- if (this.dataField[groupName] === undefined) {
410
- this.dataField.groupNames.push(groupName);
411
- this.dataField[groupName] = [];
412
- }
413
- var index;
414
- var describedField;
415
- for (index = 0; index < describedFields.length; index += 1) {
416
- describedField = describedFields[index];
417
- this.dataField[groupName].push(describedField);
418
- }
419
- return this;
420
- };
421
- }
422
- return DescribedDataFieldGroup;
423
- })();
357
+ * Adds groups to {@link module:described_field.DescribedDataField}s. These groups are dynamically added properties
358
+ * that contain an array of sub fields of the same type {@link module:described_field.DescribedDataField}s.
359
+ *
360
+ * @param {module:described_field.DescribedDataField} dataField
361
+ * @constructs DescribedDataFieldGroup
362
+ * @alias module:described_field.DescribedDataFieldGroup
363
+ * @example new described_field.DescribedDataFieldGroup(field).addGroupEntry("details", detailField);
364
+ */ function DescribedDataFieldGroup(dataField) {
365
+ this.dataField = dataField;
366
+ /**
367
+ * Adds an entry to the given group. If the group does not exist, it will be created.
368
+ * @function
369
+ * @param {String} groupName name of the group to which the entry will be added
370
+ * @param {module:described_field.DescribedDataField} describedField sub field that is added to the group
371
+ * @returns {DescribedDataFieldGroup}
372
+ */ this.addGroupEntry = function(groupName, describedField) {
373
+ this.addGroupEntries(groupName, [
374
+ describedField
375
+ ]);
376
+ return this;
377
+ };
378
+ /**
379
+ * Adds entries to the given group. If the group does not exist, it will be created.
380
+ * @function
381
+ * @param {String} groupName name of the group to which the entries will be added
382
+ * @param {module:described_field.DescribedDataField[]} describedFields sub fields that are added to the group
383
+ * @returns {DescribedDataFieldGroup}
384
+ */ this.addGroupEntries = function(groupName, describedFields) {
385
+ if (!groupName || groupName.length === 0) return this;
386
+ if (!describedFields || describedFields.length === 0) return this;
387
+ if (this.dataField[groupName] === undefined) {
388
+ this.dataField.groupNames.push(groupName);
389
+ this.dataField[groupName] = [];
390
+ }
391
+ var index;
392
+ var describedField;
393
+ for(index = 0; index < describedFields.length; index += 1){
394
+ describedField = describedFields[index];
395
+ this.dataField[groupName].push(describedField);
396
+ }
397
+ return this;
398
+ };
399
+ }
400
+ return DescribedDataFieldGroup;
401
+ }();
424
402
 
425
- },{}]},["4X3T9"], "4X3T9", "parcelRequire9661")
403
+ },{}]},["g0GVY"], "g0GVY", "parcelRequirec1f2")
426
404