pict-section-form 1.0.154 → 1.0.156

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-form",
3
- "version": "1.0.154",
3
+ "version": "1.0.156",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -370,7 +370,14 @@ class PictDynamicSolver extends libPictProvider
370
370
 
371
371
  // Now sort the ordinal container keys
372
372
  let tmpOrdinalKeys = Object.keys(tmpOrdinalsToSolve);
373
- tmpOrdinalKeys.sort();
373
+ tmpOrdinalKeys.sort((a, b) =>
374
+ {
375
+ if (isNaN(Number(a)) || isNaN(Number(b)))
376
+ {
377
+ return a.localeCompare(b);
378
+ }
379
+ return Number(a) - Number(b);
380
+ });
374
381
 
375
382
  // Now enumerate the keys and solve each layer of the solution set
376
383
  for (let i = 0; i < tmpOrdinalKeys.length; i++)
@@ -290,6 +290,8 @@ class PictFormMetacontroller extends libPictViewClass
290
290
  */
291
291
  createDistinctManifest(pManifest, pUUID)
292
292
  {
293
+ const tmpDescriptorHashes = Object.keys(pManifest?.Descriptors || {});
294
+ const tmpDescriptorHashSet = new Set(tmpDescriptorHashes);
293
295
  const tmpUUID = pUUID != null ? pUUID : this.pict.getUUID().replace(/-/g, '');
294
296
  const tmpManifest = JSON.parse(JSON.stringify(pManifest));
295
297
  for (const tmpSection of tmpManifest.Sections || [])
@@ -305,8 +307,37 @@ class PictFormMetacontroller extends libPictViewClass
305
307
  const tmpNewDescriptors = {};
306
308
  for (const [ tmpKey, tmpDescriptor ] of Object.entries(tmpManifest.Descriptors || {}))
307
309
  {
308
- //FIXME: do we want to allow prefixing the data address? (ex. nesting it under a parent object) - caller can still do this themselves.
309
- tmpDescriptor.DataAddress = `${tmpDescriptor.DataAddress || tmpKey}_${tmpUUID}`;
310
+ if (!tmpDescriptor.DataAddress)
311
+ {
312
+ tmpDescriptor.DataAddress = tmpKey;
313
+ }
314
+ tmpDescriptor.OriginalDataAddress = tmpDescriptor.DataAddress;
315
+ // we only make distinct top level properties to keep things as tidy as possible so do a split to isoloate that
316
+ //TODO: if we have .. dereferences (for example) in the data address, this will not work properly
317
+
318
+ let tmpArrayIndex = tmpDescriptor.DataAddress.indexOf('[');
319
+ let tmpDotIndex = tmpDescriptor.DataAddress.indexOf('.');
320
+ if (tmpDotIndex >= 0 && (tmpDotIndex < tmpArrayIndex || tmpArrayIndex < 0))
321
+ {
322
+ const tmpPrefixPart = tmpDescriptor.DataAddress.substring(0, tmpDotIndex);
323
+ const tmpPostfixPart = tmpDescriptor.DataAddress.substring(tmpDotIndex);
324
+ tmpDescriptor.DataAddress = `${tmpPrefixPart}_${tmpUUID}${tmpPostfixPart}`;
325
+ }
326
+ else if (tmpArrayIndex >= 0 && (tmpArrayIndex < tmpDotIndex || tmpDotIndex < 0))
327
+ {
328
+ const tmpArrayPart = tmpDescriptor.DataAddress.substring(0, tmpArrayIndex);
329
+ const tmpPostfixPart = tmpDescriptor.DataAddress.substring(tmpArrayIndex);
330
+ tmpDescriptor.DataAddress = `${tmpArrayPart}_${tmpUUID}${tmpPostfixPart}`;
331
+ }
332
+ else
333
+ {
334
+ //FIXME: do we want to allow prefixing the data address? (ex. nesting it under a parent object) - caller can still do this themselves.
335
+ tmpDescriptor.DataAddress = `${tmpDescriptor.OriginalDataAddress}_${tmpUUID}`;
336
+ }
337
+ if (tmpDescriptor.Address != null)
338
+ {
339
+ tmpDescriptor.Address = tmpDescriptor.DataAddress;
340
+ }
310
341
  if (tmpDescriptor.Hash)
311
342
  {
312
343
  tmpDescriptor.OriginalHash = tmpDescriptor.Hash;
@@ -323,9 +354,127 @@ class PictFormMetacontroller extends libPictViewClass
323
354
  tmpDescriptor.PictForm.Group = `${tmpDescriptor.PictForm.Group}_${tmpUUID}`;
324
355
  }
325
356
  }
326
- tmpNewDescriptors[`${tmpKey}_${tmpUUID}`] = tmpDescriptor;
357
+ tmpNewDescriptors[tmpDescriptor.DataAddress] = tmpDescriptor;
327
358
  }
328
359
  tmpManifest.Descriptors = tmpNewDescriptors;
360
+ const tmpAddressTranslation = {};
361
+ const tmpHashTranslation = {};
362
+ for (const tmpDescriptor of Object.values(tmpManifest?.Descriptors || {}))
363
+ {
364
+ if (tmpDescriptor.OriginalDataAddress)
365
+ {
366
+ tmpAddressTranslation[tmpDescriptor.OriginalDataAddress] = tmpDescriptor.DataAddress;
367
+ }
368
+ if (tmpDescriptor.OriginalHash)
369
+ {
370
+ tmpHashTranslation[tmpDescriptor.OriginalHash] = tmpDescriptor.Hash;
371
+ }
372
+ }
373
+ for (const [ tmpOriginalAddress, tmpUpdatedAddress ] of Object.entries(tmpAddressTranslation))
374
+ {
375
+ for (const tmpIterAddress of Object.keys(tmpAddressTranslation))
376
+ {
377
+ if (tmpIterAddress === tmpOriginalAddress)
378
+ {
379
+ continue;
380
+ }
381
+ const tmpTranslatedAddress = tmpAddressTranslation[tmpIterAddress].replace(new RegExp(`\\b${tmpOriginalAddress}\\b`, 'g'), tmpUpdatedAddress);
382
+ if (tmpTranslatedAddress !== tmpAddressTranslation[tmpIterAddress])
383
+ {
384
+ //this.pict.log.info(`DocumentDynamicSectionManager._addTestSections: Updated address translation for "${tmpIterAddress}" from "${tmpAddressTranslation[tmpIterAddress]}" to "${tmpTranslatedAddress}".`);
385
+ tmpAddressTranslation[tmpIterAddress] = tmpTranslatedAddress;
386
+ const [ tmpCurrentKey, tmpOriginalDescriptor ] = Object.entries(tmpManifest.Descriptors).find(([ pKey, pDescriptor ]) => pDescriptor.OriginalDataAddress === tmpIterAddress);
387
+ tmpManifest.Descriptors[tmpCurrentKey].DataAddress = tmpTranslatedAddress;
388
+ if (tmpManifest.Descriptors[tmpCurrentKey].Address != null)
389
+ {
390
+ tmpManifest.Descriptors[tmpCurrentKey].Address = tmpManifest.Descriptors[tmpCurrentKey].DataAddress;
391
+ }
392
+ tmpManifest.Descriptors[tmpTranslatedAddress] = tmpManifest.Descriptors[tmpCurrentKey];
393
+ delete tmpManifest.Descriptors[tmpCurrentKey];
394
+ }
395
+ }
396
+ }
397
+ //TODO: should we merge these two together for solvers?
398
+ const tmpAddressMappings = Object.entries(tmpAddressTranslation).map(([ pOldAddress, pNewAddress ]) => ({ From: pOldAddress, To: pNewAddress }));
399
+ tmpAddressMappings.sort((a, b) => b.From.length - a.From.length);
400
+ const tmpHashMappings = Object.entries(tmpHashTranslation).map(([ pOldHash, pNewHash ]) => ({ From: pOldHash, To: pNewHash }));
401
+ tmpHashMappings.sort((a, b) => b.From.length - a.From.length);
402
+ const escapeRegExp = (string) =>
403
+ {
404
+ return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
405
+ }
406
+ for (const tmpSection of tmpManifest.Sections || [])
407
+ {
408
+ if (Array.isArray(tmpSection.Solvers) && tmpSection.Solvers.length > 0)
409
+ {
410
+ for (let i = 0; i < tmpSection.Solvers.length; i++)
411
+ {
412
+ const tmpSolver = tmpSection.Solvers[i];
413
+ const tmpSolverExpression = typeof tmpSolver === 'string' ? tmpSolver : tmpSolver.Expression;
414
+ if (!tmpSolverExpression)
415
+ {
416
+ continue;
417
+ }
418
+ let tmpUpdatedSolver = tmpSolverExpression;
419
+ for (const tmpMapping of tmpAddressMappings)
420
+ {
421
+ tmpUpdatedSolver = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
422
+ }
423
+ for (const tmpMapping of tmpHashMappings)
424
+ {
425
+ tmpUpdatedSolver = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
426
+ }
427
+ if (tmpUpdatedSolver !== tmpSolver)
428
+ {
429
+ //this.pict.log.info(`DocumentDynamicSectionManager._addTestSections: Updated section solver reference ${i} from "${tmpSolverExpression}" to "${tmpUpdatedSolver}".`);
430
+ if (typeof tmpSolver === 'string')
431
+ {
432
+ tmpSection.Solvers[i] = tmpUpdatedSolver;
433
+ }
434
+ else
435
+ {
436
+ tmpSection.Solvers[i].Expression = tmpUpdatedSolver;
437
+ }
438
+ }
439
+ }
440
+ }
441
+ for (const tmpGroup of tmpSection.Groups || [])
442
+ {
443
+ if (Array.isArray(tmpGroup.RecordSetSolvers) && tmpGroup.RecordSetSolvers.length > 0)
444
+ {
445
+ for (let i = 0; i < tmpGroup.RecordSetSolvers.length; i++)
446
+ {
447
+ const tmpSolver = tmpGroup.RecordSetSolvers[i];
448
+ const tmpSolverExpression = typeof tmpSolver === 'string' ? tmpSolver : tmpSolver.Expression;
449
+ if (!tmpSolverExpression)
450
+ {
451
+ continue;
452
+ }
453
+ let tmpUpdatedSolver = tmpSolverExpression;
454
+ for (const tmpMapping of tmpAddressMappings)
455
+ {
456
+ tmpUpdatedSolver = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
457
+ }
458
+ for (const tmpMapping of tmpHashMappings)
459
+ {
460
+ tmpUpdatedSolver = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
461
+ }
462
+ if (tmpUpdatedSolver !== tmpSolver)
463
+ {
464
+ //this.pict.log.info(`DocumentDynamicSectionManager._addTestSections: Updated group solver reference ${i} from "${tmpSolver}" to "${tmpUpdatedSolver}".`);
465
+ if (typeof tmpSolver === 'string')
466
+ {
467
+ tmpGroup.RecordSetSolvers[i] = tmpUpdatedSolver;
468
+ }
469
+ else
470
+ {
471
+ tmpGroup.RecordSetSolvers[i].Expression = tmpUpdatedSolver;
472
+ }
473
+ }
474
+ }
475
+ }
476
+ }
477
+ }
329
478
  return tmpManifest;
330
479
  }
331
480
 
@@ -50,6 +50,46 @@ class DoNothingView extends libPictView
50
50
  }
51
51
  }
52
52
 
53
+ class OrderedSolverApplication extends DoNothingApplication
54
+ {
55
+ constructor(pFable, pOptions, pServiceHash)
56
+ {
57
+ super(pFable, pOptions, pServiceHash);
58
+
59
+ this.pict.AppData.A = '5';
60
+ this.pict.AppData.B = '3';
61
+ }
62
+
63
+ onAfterSolve()
64
+ {
65
+ super.onAfterSolve();
66
+ this.pict.log.info('OrderedSolverApplication onAfterSolve called.');
67
+ this._testDone?.();
68
+ }
69
+
70
+ onAfterInitialize()
71
+ {
72
+ }
73
+ }
74
+
75
+ OrderedSolverApplication.default_configuration.pict_configuration.DefaultFormManifest =
76
+ {
77
+ Scope: 'OrderedSolverApplicationForm',
78
+ Descriptors: {},
79
+ Sections:
80
+ [
81
+ {
82
+ Name: 'Ordered Solver Section',
83
+ Hash: 'OrderedSolverSection',
84
+ Solvers:
85
+ [
86
+ { Ordinal: 5, Expression: 'C = A + B' },
87
+ { Ordinal: 40, Expression: 'D = C - B' },
88
+ ],
89
+ },
90
+ ],
91
+ };
92
+
53
93
  suite
54
94
  (
55
95
  'PictSectionForm Basic',
@@ -148,6 +188,546 @@ suite
148
188
  });
149
189
  }
150
190
  );
191
+ test(
192
+ 'Distinct Array Test',
193
+ (fDone) =>
194
+ {
195
+ //NOTE: code is a clone of Pict.safeLoadPictApplication
196
+ let _Pict;
197
+ const tmpApplicationClass = OrderedSolverApplication;
198
+ if (tmpApplicationClass && ('default_configuration' in tmpApplicationClass) && ('pict_configuration' in tmpApplicationClass.default_configuration))
199
+ {
200
+ _Pict = new libPict(tmpApplicationClass.default_configuration.pict_configuration);
201
+ }
202
+ else
203
+ {
204
+ _Pict = new libPict();
205
+ }
206
+
207
+ //_Pict.LogNoisiness = 0;
208
+
209
+ let tmpApplicationHash = 'DefaultApplication';
210
+ let tmpDefaultConfiguration = {};
211
+
212
+ if ('default_configuration' in tmpApplicationClass)
213
+ {
214
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
215
+
216
+ if ('Hash' in tmpApplicationClass.default_configuration)
217
+ {
218
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
219
+ tmpApplicationHash = tmpApplicationClass.default_configuration.Hash;
220
+ }
221
+ }
222
+ _Pict.log.info(`Loading the pict application [${tmpApplicationHash}] and associated views.`);
223
+
224
+ _Pict.addApplication(tmpApplicationHash, tmpDefaultConfiguration, tmpApplicationClass);
225
+
226
+ // Add the pict form service
227
+ _Pict.addServiceType('PictSectionForm', libPictSectionForm);
228
+
229
+ // Add the pict form metacontroller service, which provides programmaatic view construction from manifests and render/marshal methods.
230
+ _Pict.addView('PictFormMetacontroller', {}, libPictSectionForm.PictFormMetacontroller);
231
+
232
+ const tmpManifest =
233
+ {
234
+ Scope: 'OrderedSolverApplicationForm',
235
+ Descriptors:
236
+ {
237
+ DataTableAddress:
238
+ {
239
+ Hash: 'DataTable',
240
+ Name: 'Data Table',
241
+ DataAddress: 'DataTableAddress',
242
+ DataType: 'Array',
243
+ FormGroup: 'DataTableGroup',
244
+ FormSection: 'DataTableSection',
245
+ },
246
+ 'DataTableAddress[].ValueAddress':
247
+ {
248
+ Hash: 'ValueArray',
249
+ Name: 'Data Value',
250
+ DataAddress: 'DataTableAddress[].ValueAddress',
251
+ DataType: 'Array',
252
+ FormGroup: 'DataTableGroup',
253
+ FormSection: 'DataTableSection',
254
+ },
255
+ AggregateValueAddress:
256
+ {
257
+ Hash: 'AggregateValue',
258
+ Name: 'Aggregate Value',
259
+ DataAddress: 'AggregateValueAddress',
260
+ DataType: 'PreciseNumber',
261
+ FormGroup: 'DataTableGroup',
262
+ FormSection: 'DataTableSection',
263
+ },
264
+ AggregateValueAddress2:
265
+ {
266
+ Hash: 'AggregateValue2',
267
+ Name: 'Aggregate Value 2',
268
+ DataAddress: 'AggregateValueAddress2',
269
+ DataType: 'PreciseNumber',
270
+ FormGroup: 'DataTableGroup',
271
+ FormSection: 'DataTableSection',
272
+ },
273
+ },
274
+ Sections:
275
+ [
276
+ {
277
+ Name: 'Ordered Solver Section',
278
+ Hash: 'OrderedSolverSection',
279
+ Solvers:
280
+ [
281
+ { Ordinal: 5, Expression: 'AggregateValue = SUM(ValueArray)' },
282
+ { Ordinal: 40, Expression: 'AggregateValue2 = SUM(DataTableAddress[].ValueAddress)' },
283
+ ],
284
+ },
285
+ ],
286
+ };
287
+
288
+ let tmpHashedAggregateValue = null;
289
+ let tmpHashedAggregateValue2 = null;
290
+ _Pict.PictApplication.initializeAsync(
291
+ function (pError)
292
+ {
293
+ if (pError)
294
+ {
295
+ _Pict.log.info('Error initializing the pict application: '+pError)
296
+ }
297
+
298
+ try
299
+ {
300
+ _Pict.log.info('Loading the Application and associated views.');
301
+ const tmpDistinctManifest = _Pict.views.PictFormMetacontroller.createDistinctManifest(tmpManifest);
302
+ _Pict.log.info('Distinct Manifest:', tmpDistinctManifest);
303
+ tmpHashedAggregateValue = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue')[0];
304
+ tmpHashedAggregateValue2 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue2')[0];
305
+ const tmpInjectedSecionViews = _Pict.views.PictFormMetacontroller.injectManifest(tmpDistinctManifest);
306
+ _Pict.log.info('Injected Section Views:', tmpInjectedSecionViews.length);
307
+ _Pict.views.PictFormMetacontroller.updateMetatemplateInDOM();
308
+ setTimeout(() =>
309
+ {
310
+ for (const tmpView of tmpInjectedSecionViews)
311
+ {
312
+ tmpView.render();
313
+ }
314
+ for (const tmpView of tmpInjectedSecionViews)
315
+ {
316
+ tmpView.marshalToView();
317
+ }
318
+ //TODO: do we need to trigger a solve here?
319
+ }, 0);
320
+ _Pict.PictApplication.testDone = () =>
321
+ {
322
+ try
323
+ {
324
+ _Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2 });
325
+ Expect(_Pict.AppData[tmpHashedAggregateValue]).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
326
+ Expect(_Pict.AppData[tmpHashedAggregateValue2]).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
327
+ }
328
+ catch (pError)
329
+ {
330
+ return fDone(pError);
331
+ }
332
+ fDone();
333
+ };
334
+ const [ tmpValueArrayKey, tmpValueArrayDescriptor ] = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pDescriptor]) => pDescriptor.OriginalHash == 'ValueArray');
335
+ const tmpAddress = tmpValueArrayDescriptor.DataAddress;
336
+ _Pict.log.info('Setting up Distinct Array Test with address:', { tmpValueArrayKey, tmpValueArrayDescriptor, tmpAddress });
337
+ const tmpArrayAddress = tmpAddress.substring(0, tmpAddress.indexOf('[]'));
338
+ const tmpPropertyAddress = tmpAddress.substring(tmpAddress.indexOf('[]') + 3);
339
+ _Pict.manifest.setValueByHash(_Pict.AppData, tmpArrayAddress,
340
+ [
341
+ { [tmpPropertyAddress]: '1' },
342
+ { [tmpPropertyAddress]: '2' },
343
+ { [tmpPropertyAddress]: '3' },
344
+ { [tmpPropertyAddress]: '4' },
345
+ { [tmpPropertyAddress]: '5' },
346
+ ]);
347
+ _Pict.PictApplication.solve();
348
+ }
349
+ catch (pError)
350
+ {
351
+ _Pict.log.error('Error during Distinct Array Test:', pError);
352
+ return fDone(pError);
353
+ }
354
+ });
355
+ }
356
+ );
357
+ test(
358
+ 'Distinct Array Test 2',
359
+ (fDone) =>
360
+ {
361
+ //NOTE: code is a clone of Pict.safeLoadPictApplication
362
+ let _Pict;
363
+ const tmpApplicationClass = OrderedSolverApplication;
364
+ if (tmpApplicationClass && ('default_configuration' in tmpApplicationClass) && ('pict_configuration' in tmpApplicationClass.default_configuration))
365
+ {
366
+ _Pict = new libPict(tmpApplicationClass.default_configuration.pict_configuration);
367
+ }
368
+ else
369
+ {
370
+ _Pict = new libPict();
371
+ }
372
+
373
+ //_Pict.LogNoisiness = 0;
374
+
375
+ let tmpApplicationHash = 'DefaultApplication';
376
+ let tmpDefaultConfiguration = {};
377
+
378
+ if ('default_configuration' in tmpApplicationClass)
379
+ {
380
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
381
+
382
+ if ('Hash' in tmpApplicationClass.default_configuration)
383
+ {
384
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
385
+ tmpApplicationHash = tmpApplicationClass.default_configuration.Hash;
386
+ }
387
+ }
388
+ _Pict.log.info(`Loading the pict application [${tmpApplicationHash}] and associated views.`);
389
+
390
+ _Pict.addApplication(tmpApplicationHash, tmpDefaultConfiguration, tmpApplicationClass);
391
+
392
+ // Add the pict form service
393
+ _Pict.addServiceType('PictSectionForm', libPictSectionForm);
394
+
395
+ // Add the pict form metacontroller service, which provides programmaatic view construction from manifests and render/marshal methods.
396
+ _Pict.addView('PictFormMetacontroller', {}, libPictSectionForm.PictFormMetacontroller);
397
+
398
+ const tmpManifest =
399
+ {
400
+ Scope: 'OrderedSolverApplicationForm',
401
+ Descriptors:
402
+ {
403
+ 'DataTableAddress[].ValueAddress':
404
+ {
405
+ Hash: 'ValueArray',
406
+ Name: 'Data Value',
407
+ DataAddress: 'DataTableAddress[].ValueAddress',
408
+ DataType: 'Array',
409
+ FormGroup: 'DataTableGroup',
410
+ FormSection: 'DataTableSection',
411
+ },
412
+ AggregateValueAddress:
413
+ {
414
+ Hash: 'AggregateValue',
415
+ Name: 'Aggregate Value',
416
+ DataAddress: 'AggregateValueAddress',
417
+ DataType: 'PreciseNumber',
418
+ FormGroup: 'DataTableGroup',
419
+ FormSection: 'DataTableSection',
420
+ },
421
+ AggregateValueAddress2:
422
+ {
423
+ Hash: 'AggregateValue2',
424
+ Name: 'Aggregate Value 2',
425
+ DataAddress: 'AggregateValueAddress2',
426
+ DataType: 'PreciseNumber',
427
+ FormGroup: 'DataTableGroup',
428
+ FormSection: 'DataTableSection',
429
+ },
430
+ },
431
+ Sections:
432
+ [
433
+ {
434
+ Name: 'Ordered Solver Section',
435
+ Hash: 'OrderedSolverSection',
436
+ Solvers:
437
+ [
438
+ { Ordinal: 5, Expression: 'AggregateValue = SUM(ValueArray)' },
439
+ { Ordinal: 40, Expression: 'AggregateValue2 = SUM(DataTableAddress[].ValueAddress)' },
440
+ ],
441
+ },
442
+ ],
443
+ };
444
+
445
+ let tmpHashedAggregateValue = null;
446
+ let tmpHashedAggregateValue2 = null;
447
+ _Pict.PictApplication.initializeAsync(
448
+ function (pError)
449
+ {
450
+ if (pError)
451
+ {
452
+ _Pict.log.info('Error initializing the pict application: '+pError)
453
+ }
454
+
455
+ try
456
+ {
457
+ _Pict.log.info('Loading the Application and associated views.');
458
+ const tmpDistinctManifest = _Pict.views.PictFormMetacontroller.createDistinctManifest(tmpManifest);
459
+ _Pict.log.info('Distinct Manifest:', tmpDistinctManifest);
460
+ tmpHashedAggregateValue = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue')[0];
461
+ tmpHashedAggregateValue2 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue2')[0];
462
+ const tmpInjectedSecionViews = _Pict.views.PictFormMetacontroller.injectManifest(tmpDistinctManifest);
463
+ _Pict.log.info('Injected Section Views:', tmpInjectedSecionViews.length);
464
+ _Pict.views.PictFormMetacontroller.updateMetatemplateInDOM();
465
+ setTimeout(() =>
466
+ {
467
+ for (const tmpView of tmpInjectedSecionViews)
468
+ {
469
+ tmpView.render();
470
+ }
471
+ for (const tmpView of tmpInjectedSecionViews)
472
+ {
473
+ tmpView.marshalToView();
474
+ }
475
+ //TODO: do we need to trigger a solve here?
476
+ }, 0);
477
+ _Pict.PictApplication.testDone = () =>
478
+ {
479
+ try
480
+ {
481
+ _Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2 });
482
+ Expect(_Pict.AppData[tmpHashedAggregateValue]).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
483
+ Expect(_Pict.AppData[tmpHashedAggregateValue2]).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
484
+ }
485
+ catch (pError)
486
+ {
487
+ return fDone(pError);
488
+ }
489
+ fDone();
490
+ };
491
+ const [ tmpValueArrayKey, tmpValueArrayDescriptor ] = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pDescriptor]) => pDescriptor.OriginalHash == 'ValueArray');
492
+ const tmpAddress = tmpValueArrayDescriptor.DataAddress;
493
+ _Pict.log.info('Setting up Distinct Array Test with address:', { tmpValueArrayKey, tmpValueArrayDescriptor, tmpAddress });
494
+ const tmpArrayAddress = tmpAddress.substring(0, tmpAddress.indexOf('[]'));
495
+ const tmpPropertyAddress = tmpAddress.substring(tmpAddress.indexOf('[]') + 3);
496
+ _Pict.manifest.setValueByHash(_Pict.AppData, tmpArrayAddress,
497
+ [
498
+ { [tmpPropertyAddress]: '1' },
499
+ { [tmpPropertyAddress]: '2' },
500
+ { [tmpPropertyAddress]: '3' },
501
+ { [tmpPropertyAddress]: '4' },
502
+ { [tmpPropertyAddress]: '5' },
503
+ ]);
504
+ _Pict.PictApplication.solve();
505
+ }
506
+ catch (pError)
507
+ {
508
+ _Pict.log.error('Error during Distinct Array Test:', pError);
509
+ return fDone(pError);
510
+ }
511
+ });
512
+ }
513
+ );
514
+ test(
515
+ 'Distinct Array Test 3',
516
+ (fDone) =>
517
+ {
518
+ //NOTE: code is a clone of Pict.safeLoadPictApplication
519
+ let _Pict;
520
+ const tmpApplicationClass = OrderedSolverApplication;
521
+ if (tmpApplicationClass && ('default_configuration' in tmpApplicationClass) && ('pict_configuration' in tmpApplicationClass.default_configuration))
522
+ {
523
+ _Pict = new libPict(tmpApplicationClass.default_configuration.pict_configuration);
524
+ }
525
+ else
526
+ {
527
+ _Pict = new libPict();
528
+ }
529
+
530
+ //_Pict.LogNoisiness = 0;
531
+
532
+ let tmpApplicationHash = 'DefaultApplication';
533
+ let tmpDefaultConfiguration = {};
534
+
535
+ if ('default_configuration' in tmpApplicationClass)
536
+ {
537
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
538
+
539
+ if ('Hash' in tmpApplicationClass.default_configuration)
540
+ {
541
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
542
+ tmpApplicationHash = tmpApplicationClass.default_configuration.Hash;
543
+ }
544
+ }
545
+ _Pict.log.info(`Loading the pict application [${tmpApplicationHash}] and associated views.`);
546
+
547
+ _Pict.addApplication(tmpApplicationHash, tmpDefaultConfiguration, tmpApplicationClass);
548
+
549
+ // Add the pict form service
550
+ _Pict.addServiceType('PictSectionForm', libPictSectionForm);
551
+
552
+ // Add the pict form metacontroller service, which provides programmaatic view construction from manifests and render/marshal methods.
553
+ _Pict.addView('PictFormMetacontroller', {}, libPictSectionForm.PictFormMetacontroller);
554
+
555
+ const tmpManifest =
556
+ {
557
+ Scope: 'OrderedSolverApplicationForm',
558
+ Descriptors:
559
+ {
560
+ 'LevelOfIndirection.DataTableAddress[].ValueAddress':
561
+ {
562
+ Hash: 'ValueArray',
563
+ Name: 'Data Value',
564
+ DataAddress: 'LevelOfIndirection.DataTableAddress[].ValueAddress',
565
+ DataType: 'Array',
566
+ FormGroup: 'DataTableGroup',
567
+ FormSection: 'DataTableSection',
568
+ },
569
+ AggregateValueAddress:
570
+ {
571
+ Hash: 'AggregateValue',
572
+ Name: 'Aggregate Value',
573
+ DataAddress: 'AggregateValueAddress',
574
+ DataType: 'PreciseNumber',
575
+ FormGroup: 'DataTableGroup',
576
+ FormSection: 'DataTableSection',
577
+ },
578
+ AggregateValueAddress2:
579
+ {
580
+ Hash: 'AggregateValue2',
581
+ Name: 'Aggregate Value 2',
582
+ DataAddress: 'AggregateValueAddress2',
583
+ DataType: 'PreciseNumber',
584
+ FormGroup: 'DataTableGroup',
585
+ FormSection: 'DataTableSection',
586
+ },
587
+ },
588
+ Sections:
589
+ [
590
+ {
591
+ Name: 'Ordered Solver Section',
592
+ Hash: 'OrderedSolverSection',
593
+ Solvers:
594
+ [
595
+ { Ordinal: 5, Expression: 'AggregateValue = SUM(ValueArray)' },
596
+ { Ordinal: 40, Expression: 'AggregateValue2 = SUM(LevelOfIndirection.DataTableAddress[].ValueAddress)' },
597
+ ],
598
+ },
599
+ ],
600
+ };
601
+
602
+ let tmpHashedAggregateValue = null;
603
+ let tmpHashedAggregateValue2 = null;
604
+ _Pict.PictApplication.initializeAsync(
605
+ function (pError)
606
+ {
607
+ if (pError)
608
+ {
609
+ _Pict.log.info('Error initializing the pict application: '+pError)
610
+ }
611
+
612
+ try
613
+ {
614
+ _Pict.log.info('Loading the Application and associated views.');
615
+ const tmpDistinctManifest = _Pict.views.PictFormMetacontroller.createDistinctManifest(tmpManifest);
616
+ _Pict.log.info('Distinct Manifest:', tmpDistinctManifest);
617
+ tmpHashedAggregateValue = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue')[0];
618
+ tmpHashedAggregateValue2 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue2')[0];
619
+ const tmpInjectedSecionViews = _Pict.views.PictFormMetacontroller.injectManifest(tmpDistinctManifest);
620
+ _Pict.log.info('Injected Section Views:', tmpInjectedSecionViews.length);
621
+ _Pict.views.PictFormMetacontroller.updateMetatemplateInDOM();
622
+ setTimeout(() =>
623
+ {
624
+ for (const tmpView of tmpInjectedSecionViews)
625
+ {
626
+ tmpView.render();
627
+ }
628
+ for (const tmpView of tmpInjectedSecionViews)
629
+ {
630
+ tmpView.marshalToView();
631
+ }
632
+ //TODO: do we need to trigger a solve here?
633
+ }, 0);
634
+ _Pict.PictApplication.testDone = () =>
635
+ {
636
+ try
637
+ {
638
+ _Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2 });
639
+ Expect(_Pict.AppData[tmpHashedAggregateValue]).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
640
+ Expect(_Pict.AppData[tmpHashedAggregateValue2]).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
641
+ }
642
+ catch (pError)
643
+ {
644
+ return fDone(pError);
645
+ }
646
+ fDone();
647
+ };
648
+ const [ tmpValueArrayKey, tmpValueArrayDescriptor ] = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pDescriptor]) => pDescriptor.OriginalHash == 'ValueArray');
649
+ const tmpAddress = tmpValueArrayDescriptor.DataAddress;
650
+ _Pict.log.info('Setting up Distinct Array Test with address:', { tmpValueArrayKey, tmpValueArrayDescriptor, tmpAddress });
651
+ const tmpArrayAddress = tmpAddress.substring(0, tmpAddress.indexOf('[]'));
652
+ const tmpPropertyAddress = tmpAddress.substring(tmpAddress.indexOf('[]') + 3);
653
+ _Pict.manifest.setValueByHash(_Pict.AppData, tmpArrayAddress,
654
+ [
655
+ { [tmpPropertyAddress]: '1' },
656
+ { [tmpPropertyAddress]: '2' },
657
+ { [tmpPropertyAddress]: '3' },
658
+ { [tmpPropertyAddress]: '4' },
659
+ { [tmpPropertyAddress]: '5' },
660
+ ]);
661
+ _Pict.PictApplication.solve();
662
+ }
663
+ catch (pError)
664
+ {
665
+ _Pict.log.error('Error during Distinct Array Test:', pError);
666
+ return fDone(pError);
667
+ }
668
+ });
669
+ }
670
+ );
671
+ test(
672
+ 'Solve Ordinals',
673
+ (fDone) =>
674
+ {
675
+ //NOTE: code is a clone of Pict.safeLoadPictApplication
676
+ let _Pict;
677
+ const tmpApplicationClass = OrderedSolverApplication;
678
+ if (tmpApplicationClass && ('default_configuration' in tmpApplicationClass) && ('pict_configuration' in tmpApplicationClass.default_configuration))
679
+ {
680
+ _Pict = new libPict(tmpApplicationClass.default_configuration.pict_configuration);
681
+ }
682
+ else
683
+ {
684
+ _Pict = new libPict();
685
+ }
686
+
687
+ //_Pict.LogNoisiness = 0;
688
+
689
+ let tmpApplicationHash = 'DefaultApplication';
690
+ let tmpDefaultConfiguration = {};
691
+
692
+ if ('default_configuration' in tmpApplicationClass)
693
+ {
694
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
695
+
696
+ if ('Hash' in tmpApplicationClass.default_configuration)
697
+ {
698
+ tmpDefaultConfiguration = tmpApplicationClass.default_configuration;
699
+ tmpApplicationHash = tmpApplicationClass.default_configuration.Hash;
700
+ }
701
+ }
702
+ _Pict.log.info(`Loading the pict application [${tmpApplicationHash}] and associated views.`);
703
+
704
+ _Pict.addApplication(tmpApplicationHash, tmpDefaultConfiguration, tmpApplicationClass);
705
+
706
+ _Pict.PictApplication.testDone = () =>
707
+ {
708
+ try
709
+ {
710
+ Expect(_Pict.AppData.C).to.equal('8', 'C should equal 8 (A + B)');
711
+ Expect(_Pict.AppData.D).to.equal('5', 'D should equal 5 (C - B)');
712
+ }
713
+ catch (pError)
714
+ {
715
+ return fDone(pError);
716
+ }
717
+ fDone();
718
+ };
719
+
720
+ _Pict.PictApplication.initializeAsync(
721
+ function (pError)
722
+ {
723
+ if (pError)
724
+ {
725
+ _Pict.log.info('Error initializing the pict application: '+pError)
726
+ }
727
+ _Pict.log.info('Loading the Application and associated views.');
728
+ });
729
+ }
730
+ );
151
731
  }
152
732
  );
153
733
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA+BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqChB;IA9BA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,uHAAuH;IACvH,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC;QAAC,gBAAgB,EAAE,GAAG,CAAA;KAAE,CACzG;IA6BX,uCAoBC;IAED;;;;;;;;;OASG;IACH,qBALW,MAAM,GAAC,MAAM,cACb,OAAO,aACP,MAAM,GACJ,MAAM,GAAC,SAAS,CA8B5B;IAED;;;;;;;OAOG;IACH,wDAFW,MAAM,QAyDhB;IAED;;;;;OAKG;IACH,gEAFW,MAAM,QAgChB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAiFxB;IADA;;;;;MAAuC;CAExC;;;;;AAvXD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B"}
1
+ {"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA+BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqChB;IA9BA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,uHAAuH;IACvH,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC;QAAC,gBAAgB,EAAE,GAAG,CAAA;KAAE,CACzG;IA6BX,uCAoBC;IAED;;;;;;;;;OASG;IACH,qBALW,MAAM,GAAC,MAAM,cACb,OAAO,aACP,MAAM,GACJ,MAAM,GAAC,SAAS,CA8B5B;IAED;;;;;;;OAOG;IACH,wDAFW,MAAM,QAyDhB;IAED;;;;;OAKG;IACH,gEAFW,MAAM,QAgChB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAwFxB;IADA;;;;;MAAuC;CAExC;;;;;AA9XD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-View-Form-Metacontroller.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-Form-Metacont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;IAED;;;;;;;OAOG;IACH,gEAFW,YAAY,QAatB;IAED;;;;;OAKG;IACH,8EAFW,YAAY,QAmBtB;IAED;;;;;;OAMG;IACH,oEAHW,YAAY,GACV,IAAI,CAkDhB;IAED;;;;;;;OAOG;IACH,uEAJW,YAAY,GAEX,IAAI,CAsFf;IAED;;;;;OAKG;IACH,qCAHW,MAAM,GACJ,MAAM,GAAC,OAAO,CA2C1B;IAED,+CAeC;IAED;;;;;;;OAOG;IACH,kFAJW,MAAM,GAEJ,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAoLtC;IA5JC,gCAA0D;IAC1D,yBAAiD;IA6JnD;;;;OAIG;IACH,gCAHW,MAAM,qBACN,MAAM,QA0BhB;IAED;;;OAGG;IACH,yDAHW,MAAM,uBACN,MAAM,QAKhB;IAED;;;;;OAKG;IACH,yDALW,MAAM,uBACN,MAAM,GAEL,OAAO,CAoDlB;IAED;;;;OAIG;IACH,sCAJW,MAAM,GAEL,OAAO,CA0ClB;IAED;;;OAGG;IACH,wDAHW,MAAM,6BAuBhB;IAED,oCAgBC;IAED;;;;OAIG;IACH,4BAFa,OAAO,CAKnB;CACD;;;;;qCAGU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;oBAvqCjB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM"}
1
+ {"version":3,"file":"Pict-View-Form-Metacontroller.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-Form-Metacontroller.js"],"names":[],"mappings":";AAaA;;GAEG;AAEH;;;;;;GAMG;AACH;IAEC,2DAyBC;IAjBA,yBAA2B;IAE3B,wBAAsF;IAEtF,cAAkC;IAElC,gCAAkC;IAClC,8BAAiC;IAEjC;;;;;;MAOE;IAQH,wCAGC;IARD,kCAGC;IAOD;;;;OAIG;IACH,qBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAaf;IAED,yCAYC;IAED;;;;;OAKG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