pict-section-form 1.0.32 → 1.0.33

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 (50) hide show
  1. package/debug/PICTSection-TabularManifests.json +14 -22
  2. package/debug/ParseCSV-CustomManifestCSVFactory.js +27 -0
  3. package/debug/ParseCSV.js +2 -1
  4. package/debug/data/ExampleForm.json +14 -22
  5. package/package.json +1 -1
  6. package/source/application/Pict-Application-Form.js +14 -1
  7. package/source/providers/Pict-Provider-DynamicInput.js +20 -0
  8. package/source/providers/Pict-Provider-DynamicInputEvents.js +30 -0
  9. package/source/providers/Pict-Provider-DynamicLayout.js +7 -0
  10. package/source/providers/Pict-Provider-DynamicRecordSet.js +35 -0
  11. package/source/providers/Pict-Provider-DynamicTabularData.js +62 -0
  12. package/source/providers/Pict-Provider-MetaLists.js +19 -0
  13. package/source/providers/Pict-Provider-MetatemplateGenerator.js +63 -5
  14. package/source/providers/Pict-Provider-MetatemplateMacros.js +16 -0
  15. package/source/providers/layouts/Pict-Layout-TuiGrid.js +57 -1
  16. package/source/services/ManifestFactory.js +21 -17
  17. package/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js +17 -0
  18. package/source/views/Pict-View-DynamicForm.js +289 -36
  19. package/source/views/Pict-View-Form-Metacontroller.js +39 -1
  20. package/types/application/Pict-Application-Form.d.ts +14 -0
  21. package/types/application/Pict-Application-Form.d.ts.map +1 -1
  22. package/types/providers/Pict-Provider-DynamicInput.d.ts +23 -3
  23. package/types/providers/Pict-Provider-DynamicInput.d.ts.map +1 -1
  24. package/types/providers/Pict-Provider-DynamicInputEvents.d.ts +34 -4
  25. package/types/providers/Pict-Provider-DynamicInputEvents.d.ts.map +1 -1
  26. package/types/providers/Pict-Provider-DynamicLayout.d.ts +8 -1
  27. package/types/providers/Pict-Provider-DynamicLayout.d.ts.map +1 -1
  28. package/types/providers/Pict-Provider-DynamicRecordSet.d.ts +40 -5
  29. package/types/providers/Pict-Provider-DynamicRecordSet.d.ts.map +1 -1
  30. package/types/providers/Pict-Provider-DynamicTabularData.d.ts +70 -8
  31. package/types/providers/Pict-Provider-DynamicTabularData.d.ts.map +1 -1
  32. package/types/providers/Pict-Provider-MetaLists.d.ts +22 -3
  33. package/types/providers/Pict-Provider-MetaLists.d.ts.map +1 -1
  34. package/types/providers/Pict-Provider-MetatemplateGenerator.d.ts +67 -5
  35. package/types/providers/Pict-Provider-MetatemplateGenerator.d.ts.map +1 -1
  36. package/types/providers/Pict-Provider-MetatemplateMacros.d.ts +16 -0
  37. package/types/providers/Pict-Provider-MetatemplateMacros.d.ts.map +1 -1
  38. package/types/providers/layouts/Pict-Layout-TuiGrid.d.ts +54 -7
  39. package/types/providers/layouts/Pict-Layout-TuiGrid.d.ts.map +1 -1
  40. package/types/services/ManifestFactory.d.ts +11 -0
  41. package/types/services/ManifestFactory.d.ts.map +1 -1
  42. package/types/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts +18 -2
  43. package/types/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts.map +1 -1
  44. package/types/views/Pict-View-DynamicForm.d.ts +279 -34
  45. package/types/views/Pict-View-DynamicForm.d.ts.map +1 -1
  46. package/types/views/Pict-View-Form-Metacontroller.d.ts +44 -2
  47. package/types/views/Pict-View-Form-Metacontroller.d.ts.map +1 -1
  48. package/debug/data/ExampleFormTest.js +0 -4
  49. package/debug/data/html/index.html +0 -13
  50. package/debug/data/package.json +0 -27
@@ -59,8 +59,6 @@
59
59
  "InputType": "Option",
60
60
  "Row": "3",
61
61
  "Width": "1",
62
- "Units": "planetary",
63
- "New": "Y",
64
62
  "SelectOptions": [
65
63
  {
66
64
  "id": "Earth",
@@ -80,7 +78,9 @@
80
78
  }
81
79
  ],
82
80
  "Section": "Header",
83
- "Group": "General_Info"
81
+ "Group": "General_Info",
82
+ "Units": "planetary",
83
+ "New": "Y"
84
84
  }
85
85
  },
86
86
  "Header.Location.Address": {
@@ -91,9 +91,9 @@
91
91
  "PictForm": {
92
92
  "Row": "1",
93
93
  "Width": "1",
94
- "ExternalDatabaseID": "A-001",
95
94
  "Section": "Header",
96
- "Group": "Address"
95
+ "Group": "Address",
96
+ "ExternalDatabaseID": "A-001"
97
97
  }
98
98
  },
99
99
  "Header.Location.City": {
@@ -128,9 +128,9 @@
128
128
  "PictForm": {
129
129
  "Row": "2",
130
130
  "Width": "1",
131
- "ExternalDatabaseID": "A-003",
132
131
  "Section": "Header",
133
- "Group": "Address"
132
+ "Group": "Address",
133
+ "ExternalDatabaseID": "A-003"
134
134
  }
135
135
  },
136
136
  "Header.Location.Country": {
@@ -161,15 +161,7 @@
161
161
  "Hash": "PackageAddress",
162
162
  "Name": "PackageAddress",
163
163
  "DataAddress": "Inventory.Packages",
164
- "DataType": "Array",
165
- "PictForm": {
166
- "InputType": "TabularAddress",
167
- "Row": "1",
168
- "Width": "3",
169
- "ExternalDatabaseID": "X-11",
170
- "Section": "Package_Dimensions",
171
- "Group": "Size"
172
- }
164
+ "DataType": "Array"
173
165
  },
174
166
  "Packages[].Area": {
175
167
  "Hash": "AreaSet",
@@ -287,9 +279,9 @@
287
279
  "PictForm": {
288
280
  "Row": "2",
289
281
  "Width": "1",
290
- "Units": "inches",
291
282
  "Section": "Package_Dimensions",
292
- "Group": "Size"
283
+ "Group": "Size",
284
+ "Units": "inches"
293
285
  },
294
286
  "IsTabular": true
295
287
  },
@@ -301,9 +293,9 @@
301
293
  "PictForm": {
302
294
  "Row": "2",
303
295
  "Width": "1",
304
- "Units": "inches",
305
296
  "Section": "Package_Dimensions",
306
- "Group": "Size"
297
+ "Group": "Size",
298
+ "Units": "inches"
307
299
  },
308
300
  "IsTabular": true
309
301
  },
@@ -315,9 +307,9 @@
315
307
  "PictForm": {
316
308
  "Row": "3",
317
309
  "Width": "2",
318
- "Units": "square inches",
319
310
  "Section": "Package_Dimensions",
320
- "Group": "Size"
311
+ "Group": "Size",
312
+ "Units": "square inches"
321
313
  },
322
314
  "IsTabular": true
323
315
  }
@@ -0,0 +1,27 @@
1
+ const libManifestFactory = require('../source/services/ManifestFactory.js');
2
+
3
+ class CustomManifestCSVFactory extends libManifestFactory
4
+ {
5
+ constructor(pFable, pSettings, pServiceHash)
6
+ {
7
+ super(pFable, pSettings, pServiceHash);
8
+ }
9
+
10
+ onTabularRowAddDescriptor(pIncomingDescriptor, pSection, pGroup, pNewDescriptor)
11
+ {
12
+ if (pIncomingDescriptor.Units)
13
+ {
14
+ pNewDescriptor.PictForm.Units = pIncomingDescriptor.Units;
15
+ }
16
+ if (pIncomingDescriptor['External Database ID'])
17
+ {
18
+ pNewDescriptor.PictForm.ExternalDatabaseID = pIncomingDescriptor['External Database ID'];
19
+ }
20
+ if (pIncomingDescriptor['New'])
21
+ {
22
+ pNewDescriptor.PictForm.New = pIncomingDescriptor['New'];
23
+ }
24
+ }
25
+ }
26
+
27
+ module.exports = CustomManifestCSVFactory;
package/debug/ParseCSV.js CHANGED
@@ -43,7 +43,8 @@ class ImportCSVCommand extends libPictCommandLineUtility.ServiceCommandLineComma
43
43
  }
44
44
 
45
45
  // The ManifestFactory gives us a programmatic way to manage Manifest config consistently
46
- this.fable.addAndInstantiateServiceType('ManifestFactory', require('../source/services/ManifestFactory.js'));
46
+ this.fable.addAndInstantiateServiceType('ManifestFactory', require('./ParseCSV-CustomManifestCSVFactory.js'));
47
+ //this.fable.addAndInstantiateServiceType('ManifestFactory', require('../source/services/ManifestFactory.js'));
47
48
  // Initialize the CSV parser
48
49
  this.fable.instantiateServiceProvider('CSVParser');
49
50
  this.fable.instantiateServiceProvider('FilePersistence');
@@ -58,8 +58,6 @@
58
58
  "InputType": "Option",
59
59
  "Row": "3",
60
60
  "Width": "1",
61
- "Units": "planetary",
62
- "New": "Y",
63
61
  "SelectOptions": [
64
62
  {
65
63
  "id": "Earth",
@@ -79,7 +77,9 @@
79
77
  }
80
78
  ],
81
79
  "Section": "Header",
82
- "Group": "General_Info"
80
+ "Group": "General_Info",
81
+ "Units": "planetary",
82
+ "New": "Y"
83
83
  }
84
84
  },
85
85
  "Header.Location.Address": {
@@ -90,9 +90,9 @@
90
90
  "PictForm": {
91
91
  "Row": "1",
92
92
  "Width": "1",
93
- "ExternalDatabaseID": "A-001",
94
93
  "Section": "Header",
95
- "Group": "Address"
94
+ "Group": "Address",
95
+ "ExternalDatabaseID": "A-001"
96
96
  }
97
97
  },
98
98
  "Header.Location.City": {
@@ -127,9 +127,9 @@
127
127
  "PictForm": {
128
128
  "Row": "2",
129
129
  "Width": "1",
130
- "ExternalDatabaseID": "A-003",
131
130
  "Section": "Header",
132
- "Group": "Address"
131
+ "Group": "Address",
132
+ "ExternalDatabaseID": "A-003"
133
133
  }
134
134
  },
135
135
  "Header.Location.Country": {
@@ -160,15 +160,7 @@
160
160
  "Hash": "PackageAddress",
161
161
  "Name": "PackageAddress",
162
162
  "DataAddress": "Inventory.Packages",
163
- "DataType": "Array",
164
- "PictForm": {
165
- "InputType": "TabularAddress",
166
- "Row": "1",
167
- "Width": "3",
168
- "ExternalDatabaseID": "X-11",
169
- "Section": "Package_Dimensions",
170
- "Group": "Size"
171
- }
163
+ "DataType": "Array"
172
164
  },
173
165
  "Packages[].Area": {
174
166
  "Hash": "AreaSet",
@@ -286,9 +278,9 @@
286
278
  "PictForm": {
287
279
  "Row": "2",
288
280
  "Width": "1",
289
- "Units": "inches",
290
281
  "Section": "Package_Dimensions",
291
- "Group": "Size"
282
+ "Group": "Size",
283
+ "Units": "inches"
292
284
  },
293
285
  "IsTabular": true
294
286
  },
@@ -300,9 +292,9 @@
300
292
  "PictForm": {
301
293
  "Row": "2",
302
294
  "Width": "1",
303
- "Units": "inches",
304
295
  "Section": "Package_Dimensions",
305
- "Group": "Size"
296
+ "Group": "Size",
297
+ "Units": "inches"
306
298
  },
307
299
  "IsTabular": true
308
300
  },
@@ -314,9 +306,9 @@
314
306
  "PictForm": {
315
307
  "Row": "3",
316
308
  "Width": "2",
317
- "Units": "square inches",
318
309
  "Section": "Package_Dimensions",
319
- "Group": "Size"
310
+ "Group": "Size",
311
+ "Units": "square inches"
320
312
  },
321
313
  "IsTabular": true
322
314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-form",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -1,8 +1,15 @@
1
1
  const libPictApplication = require('pict-application');
2
- //const libPictApplication = require('../../../pict-application/source/Pict-Application.js');
3
2
 
4
3
  const libPictSectionForm = require('../Pict-Section-Form.js');
5
4
 
5
+ /**
6
+ * Represents a PictSectionFormApplication.
7
+ *
8
+ * This is the automagic controller for a dyncamic form application.
9
+ *
10
+ * @class
11
+ * @extends libPictApplication
12
+ */
6
13
  class PictSectionFormApplication extends libPictApplication
7
14
  {
8
15
  constructor(pFable, pOptions, pServiceHash)
@@ -16,11 +23,17 @@ class PictSectionFormApplication extends libPictApplication
16
23
  this.pict.addView('PictFormMetacontroller', {}, libPictSectionForm.PictFormMetacontroller);
17
24
  }
18
25
 
26
+ /**
27
+ * Marshals data from any rendered dynamic views to application data.
28
+ */
19
29
  marshalDataFromDynamicViewsToAppData()
20
30
  {
21
31
  this.pict.views.PictFormMetacontroller.marshalFromView();
22
32
  }
23
33
 
34
+ /**
35
+ * Marshals data from the application data to any rendered dynamic views.
36
+ */
24
37
  marshalDataFromAppDataToDynamicViews()
25
38
  {
26
39
  this.pict.views.PictFormMetacontroller.marshalToView();
@@ -30,6 +30,13 @@ class PictDynamicInput extends libPictProvider
30
30
  this.templateProviderMap = {};
31
31
  }
32
32
 
33
+ /**
34
+ * Retrieves the template hash for the input based on the provided view and input.
35
+ *
36
+ * @param {View} pView - The view object.
37
+ * @param {Input} pInput - The input object.
38
+ * @returns {string|boolean} - The template hash if found, otherwise false.
39
+ */
33
40
  getInputTemplateHash(pView, pInput)
34
41
  {
35
42
  if (pInput.IsTabular)
@@ -80,6 +87,12 @@ class PictDynamicInput extends libPictProvider
80
87
  return false;
81
88
  }
82
89
 
90
+ /**
91
+ * Adds a default input provider for a given template full hash.
92
+ *
93
+ * @param {string} pTemplateFullHash - The full hash of the template.
94
+ * @param {any} pProvider - The provider to be added.
95
+ */
83
96
  addDefaultInputProvider(pTemplateFullHash, pProvider)
84
97
  {
85
98
  if (!(pTemplateFullHash in this.templateProviderMap))
@@ -92,6 +105,13 @@ class PictDynamicInput extends libPictProvider
92
105
  }
93
106
  }
94
107
 
108
+ /**
109
+ * Retrieves the default input providers based on the given view and input.
110
+ *
111
+ * @param {string} pView - The view to retrieve input providers for.
112
+ * @param {string} pInput - The input to retrieve input providers for.
113
+ * @returns {Array} An array of default input providers.
114
+ */
95
115
  getDefaultInputProviders(pView, pInput)
96
116
  {
97
117
  let tmpTemplateHash = this.getInputTemplateHash(pView, pInput);
@@ -28,6 +28,12 @@ class PictDynamicInputEvents extends libPictProvider
28
28
  super(pFable, tmpOptions, pServiceHash);
29
29
  }
30
30
 
31
+ /**
32
+ * Requests input data from the view based on the provided input hash.
33
+ *
34
+ * @param {Object} pView - The view object.
35
+ * @param {string} pInputHash - The input hash.
36
+ */
31
37
  inputDataRequest(pView, pInputHash)
32
38
  {
33
39
  let tmpInput = pView.getInputFromHash(pInputHash);
@@ -62,6 +68,13 @@ class PictDynamicInputEvents extends libPictProvider
62
68
  }
63
69
  }
64
70
 
71
+ /**
72
+ * Handles the input event for a dynamic form.
73
+ *
74
+ * @param {Object} pView - The view object.
75
+ * @param {string} pInputHash - The input hash.
76
+ * @param {string} pEvent - The input event.
77
+ */
65
78
  inputEvent(pView, pInputHash, pEvent)
66
79
  {
67
80
  let tmpInput = pView.getInputFromHash(pInputHash);
@@ -96,6 +109,14 @@ class PictDynamicInputEvents extends libPictProvider
96
109
  }
97
110
  }
98
111
 
112
+ /**
113
+ * Requests input data for a tabular record.
114
+ *
115
+ * @param {Object} pView - The view object.
116
+ * @param {number} pGroupIndex - The index of the group.
117
+ * @param {number} pInputIndex - The index of the input.
118
+ * @param {number} pRowIndex - The index of the row.
119
+ */
99
120
  inputDataRequestTabular(pView, pGroupIndex, pInputIndex, pRowIndex)
100
121
  {
101
122
  let tmpInput = pView.getTabularRecordInput(pGroupIndex, pInputIndex);
@@ -137,6 +158,15 @@ class PictDynamicInputEvents extends libPictProvider
137
158
  pView.marshalToView();
138
159
  }
139
160
 
161
+ /**
162
+ * Handles the tabular input event.
163
+ *
164
+ * @param {Object} pView - The view object.
165
+ * @param {number} pGroupIndex - The index of the group.
166
+ * @param {number} pInputIndex - The index of the input.
167
+ * @param {number} pRowIndex - The index of the row.
168
+ * @param {string} pEvent - The input event.
169
+ */
140
170
  inputEventTabular(pView, pGroupIndex, pInputIndex, pRowIndex, pEvent)
141
171
  {
142
172
  let tmpInput = pView.getTabularRecordInput(pGroupIndex, pInputIndex);
@@ -53,6 +53,13 @@ class PictDynamicLayout extends libPictProvider
53
53
  return true;
54
54
  }
55
55
 
56
+ /**
57
+ * This fires after data has been marshaled to the form from the model.
58
+ *
59
+ * @param {object} pView - The view to initialize the newly rendered control for
60
+ * @param {object} pGroup - The group to initialize the newly rendered control for
61
+ * @returns {boolean}
62
+ */
56
63
  onDataMarshalToForm(pView, pGroup)
57
64
  {
58
65
  return true;
@@ -33,26 +33,61 @@ class PictRecordSet extends libPictProvider
33
33
  this.recordProviders = {};
34
34
  }
35
35
 
36
+ /**
37
+ * Returns the count for a specific dynamic record set.
38
+ *
39
+ * @param {Object} pFilter - The filter object.
40
+ * @param {Function} fCallback - The callback function to be called after the count is returned.
41
+ * @returns {any} - The result of the callback function.
42
+ */
36
43
  count(pFilter, fCallback)
37
44
  {
38
45
  return fCallback();
39
46
  }
40
47
 
48
+ /**
49
+ * Reads a record list.
50
+ *
51
+ * @param {Object} pFilter - The filter object.
52
+ * @param {Function} fCallback - The callback function to be called after the record list is read.
53
+ * @returns {any} - The result of the callback function.
54
+ */
41
55
  readRecordList(pFilter, fCallback)
42
56
  {
43
57
  return fCallback();
44
58
  }
45
59
 
60
+ /**
61
+ * Reads a record.
62
+ *
63
+ * @param {Object} pFilter - The filter object.
64
+ * @param {Function} fCallback - The callback function to be called after the record is read.
65
+ * @returns {any} - The result of the callback function.
66
+ */
46
67
  readRecord(pFilter, fCallback)
47
68
  {
48
69
  return fCallback();
49
70
  }
50
71
 
72
+ /**
73
+ * Writes a record.
74
+ *
75
+ * @param {Object} pRecord - The record to be written.
76
+ * @param {Function} fCallback - The callback function to be called after the record is written.
77
+ * @returns {any} - The result of the callback function.
78
+ */
51
79
  writeRecord(pRecord, fCallback)
52
80
  {
53
81
  return fCallback();
54
82
  }
55
83
 
84
+ /**
85
+ * Deletes a record.
86
+ *
87
+ * @param {Object} pRecord - The record to be deleted.
88
+ * @param {Function} fCallback - The callback function to be called after the record is deleted.
89
+ * @returns {any} - The result of the callback function.
90
+ */
56
91
  deleteRecord(pRecord, fCallback)
57
92
  {
58
93
  return fCallback();
@@ -28,6 +28,13 @@ class DynamicTabularData extends libPictProvider
28
28
  super(pFable, tmpOptions, pServiceHash);
29
29
  }
30
30
 
31
+ /**
32
+ * Retrieves the tabular record set from the specified view and group index.
33
+ *
34
+ * @param {Object} pView - The view object.
35
+ * @param {number} pGroupIndex - The index of the group.
36
+ * @returns {Array|Object|boolean} - The tabular record set if it exists, otherwise false.
37
+ */
31
38
  getTabularRecordSet(pView, pGroupIndex)
32
39
  {
33
40
  // The neat thing about how the tabular groups work is that we can make it clever about whether it's an object or an array.
@@ -40,6 +47,14 @@ class DynamicTabularData extends libPictProvider
40
47
  return pView.sectionManifest.getValueByHash(pView.getMarshalDestinationObject(), tmpGroup.RecordSetAddress);
41
48
  }
42
49
 
50
+ /**
51
+ * Retrieves the tabular record input from the specified view, group, and input indexes.
52
+ *
53
+ * @param {Object} pView - The view object.
54
+ * @param {number} pGroupIndex - The index of the group.
55
+ * @param {number} pInputIndex - The index of the input.
56
+ * @returns {ElementDescriptor|boolean} The tabular record input or false if the group is invalid.
57
+ */
43
58
  getTabularRecordInput(pView, pGroupIndex, pInputIndex)
44
59
  {
45
60
  // The neat thing about how the tabular groups work is that we can make it clever about whether it's an object or an array.
@@ -57,6 +72,14 @@ class DynamicTabularData extends libPictProvider
57
72
  return tmpGroup.supportingManifest.elementDescriptors[tmpSupportingManifestHash];
58
73
  }
59
74
 
75
+ /**
76
+ * Retrieves tabular record data based on the provided parameters.
77
+ *
78
+ * @param {Object} pView - The view object.
79
+ * @param {number} pGroupIndex - The index of the group.
80
+ * @param {string} pRowIdentifier - The identifier of the row.
81
+ * @returns {boolean|Object} - The tabular record data or false if not found.
82
+ */
60
83
  getTabularRecordData(pView, pGroupIndex, pRowIdentifier)
61
84
  {
62
85
  // The neat thing about how the tabular groups work is that we can make it clever about whether it's an object or an array.
@@ -107,6 +130,12 @@ class DynamicTabularData extends libPictProvider
107
130
  }
108
131
  }
109
132
 
133
+ /**
134
+ * Creates a dynamic table row for the given view and group index.
135
+ *
136
+ * @param {Object} pView - The view object.
137
+ * @param {number} pGroupIndex - The index of the group.
138
+ */
110
139
  createDynamicTableRow(pView, pGroupIndex)
111
140
  {
112
141
  let tmpGroup = pView.getGroup(pGroupIndex);
@@ -131,6 +160,15 @@ class DynamicTabularData extends libPictProvider
131
160
  }
132
161
  }
133
162
 
163
+ /**
164
+ * Sets the index of a dynamic table row in a view.
165
+ *
166
+ * @param {Object} pView - The view object.
167
+ * @param {number} pGroupIndex - The index of the group.
168
+ * @param {number} pRowIndex - The current index of the row.
169
+ * @param {number} pNewRowIndex - The new index to move the row to.
170
+ * @returns {boolean} - Returns false if the index is out of bounds, otherwise returns undefined.
171
+ */
134
172
  setDynamicTableRowIndex(pView, pGroupIndex, pRowIndex, pNewRowIndex)
135
173
  {
136
174
  let tmpGroup = pView.getGroup(pGroupIndex);
@@ -160,6 +198,14 @@ class DynamicTabularData extends libPictProvider
160
198
  }
161
199
  }
162
200
 
201
+ /**
202
+ * Moves a dynamic table row down within a view.
203
+ *
204
+ * @param {Object} pView - The view containing the dynamic table.
205
+ * @param {number} pGroupIndex - The index of the group containing the row.
206
+ * @param {number} pRowIndex - The index of the row to be moved.
207
+ * @returns {boolean} - Returns true if the row was successfully moved, false otherwise.
208
+ */
163
209
  moveDynamicTableRowDown(pView, pGroupIndex, pRowIndex)
164
210
  {
165
211
  let tmpGroup = pView.getGroup(pGroupIndex);
@@ -188,6 +234,14 @@ class DynamicTabularData extends libPictProvider
188
234
  }
189
235
  }
190
236
 
237
+ /**
238
+ * Moves a dynamic table row up.
239
+ *
240
+ * @param {Object} pView - The view object.
241
+ * @param {number} pGroupIndex - The index of the group.
242
+ * @param {number} pRowIndex - The index of the row to be moved.
243
+ * @returns {boolean} Returns true if the row was moved successfully, false otherwise.
244
+ */
191
245
  moveDynamicTableRowUp(pView, pGroupIndex, pRowIndex)
192
246
  {
193
247
  let tmpGroup = pView.getGroup(pGroupIndex);
@@ -222,6 +276,14 @@ class DynamicTabularData extends libPictProvider
222
276
  }
223
277
 
224
278
 
279
+ /**
280
+ * Deletes a dynamic table row from the specified view.
281
+ *
282
+ * @param {Object} pView - The view from which to delete the row.
283
+ * @param {number} pGroupIndex - The index of the group containing the row.
284
+ * @param {number|string} pRowIndex - The index or key of the row to delete.
285
+ * @returns {boolean} - Returns true if the row was successfully deleted, false otherwise.
286
+ */
225
287
  deleteDynamicTableRow(pView, pGroupIndex, pRowIndex)
226
288
  {
227
289
  let tmpGroup = pView.getGroup(pGroupIndex);
@@ -31,6 +31,13 @@ class PictMetalist extends libPictProvider
31
31
  this.globalLists = {};
32
32
  }
33
33
 
34
+ /**
35
+ * Retrieves a list based on the provided view hash and list hash.
36
+ *
37
+ * @param {string} pViewHash - The view hash.
38
+ * @param {string} pListHash - The list hash.
39
+ * @returns {Array} - The retrieved list.
40
+ */
34
41
  getList(pViewHash, pListHash)
35
42
  {
36
43
  if ((pViewHash in this.computedLists) && (pListHash in this.computedLists[pViewHash]))
@@ -44,11 +51,23 @@ class PictMetalist extends libPictProvider
44
51
  return [];
45
52
  }
46
53
 
54
+ /**
55
+ * Checks if a list exists in the Pict Provider MetaLists.
56
+ *
57
+ * @param {string} pViewHash - The hash of the view.
58
+ * @param {string} pListHash - The hash of the list.
59
+ * @returns {boolean} - Returns true if the list exists, otherwise false.
60
+ */
47
61
  hasList(pViewHash, pListHash)
48
62
  {
49
63
  return ((pViewHash in this.computedLists) && (pListHash in this.computedLists[pViewHash])) || (pListHash in this.globalLists);
50
64
  }
51
65
 
66
+ /**
67
+ * Builds meta lists for the Pict provider.
68
+ *
69
+ * @param {Array|string} pViewHashes - The view hashes to build meta lists for.
70
+ */
52
71
  buildLists(pViewHashes)
53
72
  {
54
73
  // this.log.trace(`Dynamic MetaList Provider [${this.UUID}]::[${this.Hash}] pulling Metalists.`);