pict-section-form 1.0.123 → 1.0.125

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.123",
3
+ "version": "1.0.125",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -47,7 +47,7 @@ class PictDynamicSolver extends libPictProvider
47
47
 
48
48
  /** @type {import('pict')} */
49
49
  this.pict;
50
- /** @type {import('pict') & { instantiateServiceProviderIfNotExists: (hash: string) => any }} */
50
+ /** @type {import('pict') & { instantiateServiceProviderIfNotExists: (hash: string) => any, ExpressionParser: any }} */
51
51
  this.fable;
52
52
  /** @type {any} */
53
53
  this.log;
@@ -176,9 +176,9 @@ class CustomInputHandler extends libPictSectionInputExtension
176
176
  * @param {string} pTransactionGUID - The transaction GUID, if any.
177
177
  * @returns {boolean} - Returns true.
178
178
  */
179
- onEvent(pView, pInput, pValue, pHTMLSelector, pEvent, pTransactionGUID)
179
+ onAfterEventCompletion(pView, pInput, pValue, pHTMLSelector, pEvent, pTransactionGUID)
180
180
  {
181
- const tmpPayload = typeof pValue === 'string' ? pEvent : '';
181
+ const tmpPayload = typeof pEvent === 'string' ? pEvent : '';
182
182
  let [ tmpType, tmpGroupHash, tmpEvent, tmpInputHash, tmpEventGUID ] = tmpPayload.split(':');
183
183
  if (!tmpEventGUID)
184
184
  {
@@ -188,7 +188,7 @@ class CustomInputHandler extends libPictSectionInputExtension
188
188
  let tmpAutoFillTriggerGroups = pInput.PictForm.AutofillTriggerGroup;
189
189
  if (!tmpAutoFillTriggerGroups || tmpType !== 'TriggerGroup' || (pInput.Hash || pInput.DataAddress) == tmpInputHash)
190
190
  {
191
- return super.onEvent(pView, pInput, pValue, pHTMLSelector, pEvent, pTransactionGUID);
191
+ return super.onAfterEventCompletion(pView, pInput, pValue, pHTMLSelector, pEvent, pTransactionGUID);
192
192
  }
193
193
  if (!Array.isArray(tmpAutoFillTriggerGroups))
194
194
  {
@@ -220,7 +220,7 @@ class CustomInputHandler extends libPictSectionInputExtension
220
220
  }
221
221
  }
222
222
 
223
- return super.onEvent(pView, pInput, pValue, pHTMLSelector, pEvent, pTransactionGUID);
223
+ return super.onAfterEventCompletion(pView, pInput, pValue, pHTMLSelector, pEvent, pTransactionGUID);
224
224
  }
225
225
 
226
226
  /**
@@ -235,9 +235,9 @@ class CustomInputHandler extends libPictSectionInputExtension
235
235
  * @param {string} pTransactionGUID - The transaction GUID, if any.
236
236
  * @returns {boolean} - Returns true.
237
237
  */
238
- onEventTabular(pView, pInput, pValue, pHTMLSelector, pRowIndex, pEvent, pTransactionGUID)
238
+ onAfterEventTabularCompletion(pView, pInput, pValue, pHTMLSelector, pRowIndex, pEvent, pTransactionGUID)
239
239
  {
240
- const tmpPayload = typeof pValue === 'string' ? pEvent : '';
240
+ const tmpPayload = typeof pEvent === 'string' ? pEvent : '';
241
241
  let [ tmpType, tmpGroupHash, tmpEvent, tmpInputHash, tmpEventGUID ] = tmpPayload.split(':');
242
242
  if (!tmpEventGUID)
243
243
  {
@@ -247,7 +247,7 @@ class CustomInputHandler extends libPictSectionInputExtension
247
247
  if (!pInput.PictForm.AutofillTriggerGroup || tmpType !== 'TriggerGroup' || (pInput.Hash || pInput.DataAddress) == tmpInputHash)
248
248
  {
249
249
  // Do nothing for now -- this is the triggering element
250
- return super.onEventTabular(pView, pInput, pValue, pHTMLSelector, pRowIndex, pEvent, pTransactionGUID);
250
+ return super.onAfterEventTabularCompletion(pView, pInput, pValue, pHTMLSelector, pRowIndex, pEvent, pTransactionGUID);
251
251
  }
252
252
  let tmpAutoFillTriggerGroups = pInput.PictForm.AutofillTriggerGroup;
253
253
  if (!Array.isArray(tmpAutoFillTriggerGroups))
@@ -282,7 +282,7 @@ class CustomInputHandler extends libPictSectionInputExtension
282
282
  }
283
283
  }
284
284
 
285
- return super.onEventTabular(pView, pInput, pValue, pHTMLSelector, pRowIndex, pEvent, pTransactionGUID);
285
+ return super.onAfterEventTabularCompletion(pView, pInput, pValue, pHTMLSelector, pRowIndex, pEvent, pTransactionGUID);
286
286
  }
287
287
  }
288
288
 
@@ -199,10 +199,11 @@ class CustomInputHandler extends libPictSectionInputExtension
199
199
  * @param {Object} pInput - The input object.
200
200
  * @param {any} pValue - The value of the input.
201
201
  * @param {string} pHTMLSelector - The HTML selector.
202
+ * @param {string} [pTransactionGUID] - (optional) The transaction GUID for the event dispatch.
202
203
  *
203
- * @return {Promise<any>} - Returns a promise that resolves when the data has been gathered.
204
+ * @return {Promise<Error?>} - Returns a promise that resolves when the data has been gathered.
204
205
  */
205
- async gatherDataFromServer(pView, pInput, pValue, pHTMLSelector)
206
+ async gatherDataFromServer(pView, pInput, pValue, pHTMLSelector, pTransactionGUID)
206
207
  {
207
208
  // Gather data from the server
208
209
  // These have to date not been asyncronous. Now they will be...
@@ -212,6 +213,11 @@ class CustomInputHandler extends libPictSectionInputExtension
212
213
  return null;
213
214
  }
214
215
 
216
+ const tmpLoadGUID = `BundleLoad-${this.pict.getUUID()}`;
217
+ if (pTransactionGUID)
218
+ {
219
+ pView.registerEventTransactionAsyncOperation(pTransactionGUID, tmpLoadGUID);
220
+ }
215
221
  let tmpInput = pInput;
216
222
  let tmpValue = pValue;
217
223
  let tmpAnticipate = this.fable.newAnticipate();
@@ -248,7 +254,7 @@ class CustomInputHandler extends libPictSectionInputExtension
248
254
  if (tmpInput.PictForm.EntityBundleTriggerGroup && this.pict.views.PictFormMetacontroller)
249
255
  {
250
256
  // Trigger the autofill global event
251
- this.pict.views.PictFormMetacontroller.triggerGlobalInputEvent(`TriggerGroup:${tmpInput.PictForm.EntityBundleTriggerGroup}:BundleLoad:${pInput.Hash || pInput.DataAddress}:${this.pict.getUUID()}`);
257
+ this.pict.views.PictFormMetacontroller.triggerGlobalInputEvent(`TriggerGroup:${tmpInput.PictForm.EntityBundleTriggerGroup}:BundleLoad:${pInput.Hash || pInput.DataAddress}:${this.pict.getUUID()}`, pTransactionGUID);
252
258
  }
253
259
  if (tmpInput.PictForm.EntityBundleTriggerMetacontrollerSolve && this.pict.views.PictFormMetacontroller)
254
260
  {
@@ -274,6 +280,11 @@ class CustomInputHandler extends libPictSectionInputExtension
274
280
  {
275
281
  this.log.error(`EntityBundleRequest error gathering entity set: ${pError}`, pError);
276
282
  }
283
+ //TODO: close the async operation if we have a transaction GUID
284
+ if (pTransactionGUID)
285
+ {
286
+ pView.eventTransactionAsyncOperationComplete(pTransactionGUID, tmpLoadGUID);
287
+ }
277
288
 
278
289
  return pResolve(pError);
279
290
  });
@@ -298,7 +309,7 @@ class CustomInputHandler extends libPictSectionInputExtension
298
309
  if (pValue && pInput.PictForm && pInput.PictForm.EntityBundleTriggerOnInitialize)
299
310
  {
300
311
  // This is a request on initial load
301
- this.gatherDataFromServer(pView, pInput, pValue, pHTMLSelector);
312
+ this.gatherDataFromServer(pView, pInput, pValue, pHTMLSelector, pTransactionGUID);
302
313
  }
303
314
  // This is in case we need to do a request on initial load!
304
315
  return super.onInputInitialize(pView, pGroup, pRow, pInput, pValue, pHTMLSelector, pTransactionGUID);
@@ -333,7 +344,7 @@ class CustomInputHandler extends libPictSectionInputExtension
333
344
  */
334
345
  onDataChange(pView, pInput, pValue, pHTMLSelector, pTransactionGUID)
335
346
  {
336
- this.gatherDataFromServer(pView, pInput, pValue, pHTMLSelector);
347
+ this.gatherDataFromServer(pView, pInput, pValue, pHTMLSelector, pTransactionGUID);
337
348
  return super.onDataChange(pView, pInput, pValue, pHTMLSelector, pTransactionGUID);
338
349
  }
339
350
 
@@ -350,7 +361,7 @@ class CustomInputHandler extends libPictSectionInputExtension
350
361
  */
351
362
  onDataChangeTabular(pView, pInput, pValue, pHTMLSelector, pRowIndex, pTransactionGUID)
352
363
  {
353
- this.gatherDataFromServer(pView, pInput, pValue, pHTMLSelector);
364
+ this.gatherDataFromServer(pView, pInput, pValue, pHTMLSelector, pTransactionGUID);
354
365
  return super.onDataChangeTabular(pView, pInput, pValue, pHTMLSelector, pRowIndex, pTransactionGUID);
355
366
  }
356
367
 
@@ -68,7 +68,8 @@ class PictViewDynamicForm extends libPictViewClass
68
68
  }
69
69
 
70
70
  // Use this to manage transactions
71
- this.transactionTracking = this.pict.newTransactionTracker();
71
+ //FIXME: should we have these sioled??
72
+ //this.transactionTracking = this.pict.newTransactionTracker();
72
73
 
73
74
  /** @type {Record<string, any>} */
74
75
  this._PackagePictView = this._Package;
@@ -168,6 +169,8 @@ class PictViewDynamicForm extends libPictViewClass
168
169
  {
169
170
  // The informary stuff doesn't know the resolution of the hash to address, so do it here.
170
171
  let tmpHashAddress = this.sectionManifest.resolveHashAddress(pInputHash);
172
+ const tmpTransactionGUID = this.fable.getUUID();
173
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
171
174
  try
172
175
  {
173
176
  let tmpMarshalDestinationObject = this.getMarshalDestinationObject();
@@ -176,7 +179,6 @@ class PictViewDynamicForm extends libPictViewClass
176
179
  let tmpValue = this.sectionManifest.getValueByHash(tmpMarshalDestinationObject, tmpHashAddress);
177
180
 
178
181
  let tmpInputProviderList = this.getInputProviderList(tmpInput);
179
- const tmpTransactionGUID = this.fable.getUUID();
180
182
  for (let i = 0; i < tmpInputProviderList.length; i++)
181
183
  {
182
184
  if (this.pict.providers[tmpInputProviderList[i]])
@@ -193,6 +195,10 @@ class PictViewDynamicForm extends libPictViewClass
193
195
  {
194
196
  this.log.error(`Dynamic form [${this.Hash}]::[${this.UUID}] gross error marshaling specific (${pInputHash}) data from view in dataChanged event: ${pError}`);
195
197
  }
198
+ finally
199
+ {
200
+ this.finalizeTransaction(tmpTransactionGUID);
201
+ }
196
202
  }
197
203
  else
198
204
  {
@@ -227,6 +233,8 @@ class PictViewDynamicForm extends libPictViewClass
227
233
  {
228
234
  // The informary stuff doesn't know the resolution of the hash to address, so do it here.
229
235
  let tmpHashAddress = tmpInput.Address;
236
+ const tmpTransactionGUID = this.fable.getUUID();
237
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
230
238
  try
231
239
  {
232
240
  let tmpMarshalDestinationObject = this.getMarshalDestinationObject();
@@ -238,7 +246,6 @@ class PictViewDynamicForm extends libPictViewClass
238
246
  // Each row has a distinct address!
239
247
  let tmpVirtualInformaryHTMLSelector = tmpInput.Macro.HTMLSelectorTabular + `[data-i-index="${pRowIndex}"]`;
240
248
  let tmpInputProviderList = this.getInputProviderList(tmpInput);
241
- const tmpTransactionGUID = this.fable.getUUID();
242
249
  for (let i = 0; i < tmpInputProviderList.length; i++)
243
250
  {
244
251
  if (this.pict.providers[tmpInputProviderList[i]])
@@ -255,6 +262,10 @@ class PictViewDynamicForm extends libPictViewClass
255
262
  {
256
263
  this.log.error(`Dynamic form [${this.Hash}]::[${this.UUID}] gross error marshaling specific (${tmpInput.Hash}) tabular data for group ${pGroupIndex} row ${pRowIndex} from view in dataChanged event: ${pError}`);
257
264
  }
265
+ finally
266
+ {
267
+ this.finalizeTransaction(tmpTransactionGUID);
268
+ }
258
269
  }
259
270
  else
260
271
  {
@@ -277,6 +288,8 @@ class PictViewDynamicForm extends libPictViewClass
277
288
  */
278
289
  setDataByInput(pInput, pValue)
279
290
  {
291
+ const tmpTransactionGUID = this.fable.getUUID();
292
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
280
293
  try
281
294
  {
282
295
  this.sectionManifest.setValueByHash(this.getMarshalDestinationObject(), pInput.Hash, pValue)
@@ -286,7 +299,6 @@ class PictViewDynamicForm extends libPictViewClass
286
299
  // Each row has a distinct address!
287
300
  let tmpVirtualInformaryHTMLSelector = pInput.Macro.HTMLSelector;
288
301
  let tmpInputProviderList = this.getInputProviderList(pInput);
289
- const tmpTransactionGUID = this.fable.getUUID();
290
302
  for (let i = 0; i < tmpInputProviderList.length; i++)
291
303
  {
292
304
  if (this.pict.providers[tmpInputProviderList[i]])
@@ -298,12 +310,15 @@ class PictViewDynamicForm extends libPictViewClass
298
310
  this.log.error(`Dynamic form setDataByInput [${this.Hash}]::[${this.UUID}] cannot find provider [${tmpInputProviderList[i]}] for input [${pInput.Hash}].`);
299
311
  }
300
312
  }
301
- this.finalizeTransaction(tmpTransactionGUID);
302
313
  }
303
314
  catch (pError)
304
315
  {
305
316
  this.log.error(`Dynamic form setDataByInput [${this.Hash}]::[${this.UUID}] gross error marshaling specific (${pInput.Hash}) from view in dataChanged event: ${pError}`);
306
317
  }
318
+ finally
319
+ {
320
+ this.finalizeTransaction(tmpTransactionGUID);
321
+ }
307
322
 
308
323
  return false;
309
324
  }
@@ -354,6 +369,8 @@ class PictViewDynamicForm extends libPictViewClass
354
369
  )
355
370
  {
356
371
  // The informary stuff doesn't know the resolution of the hash to address, so do it here.
372
+ const tmpTransactionGUID = this.fable.getUUID();
373
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
357
374
  try
358
375
  {
359
376
  let tmpMarshalDestinationObject = this.getMarshalDestinationObject();
@@ -365,7 +382,6 @@ class PictViewDynamicForm extends libPictViewClass
365
382
  // Each row has a distinct address!
366
383
  let tmpVirtualInformaryHTMLSelector = tmpInput.Macro.HTMLSelectorTabular + `[data-i-index="${pRowIndex}"]`;
367
384
  let tmpInputProviderList = this.getInputProviderList(tmpInput);
368
- const tmpTransactionGUID = this.fable.getUUID();
369
385
  for (let i = 0; i < tmpInputProviderList.length; i++)
370
386
  {
371
387
  if (this.pict.providers[tmpInputProviderList[i]])
@@ -377,12 +393,15 @@ class PictViewDynamicForm extends libPictViewClass
377
393
  this.log.error(`Dynamic form setDataTabularByHash [${this.Hash}]::[${this.UUID}] cannot find provider [${tmpInputProviderList[i]}] for input [${tmpInput.Hash}] row ${pRowIndex}.`);
378
394
  }
379
395
  }
380
- this.finalizeTransaction(tmpTransactionGUID);
381
396
  }
382
397
  catch (pError)
383
398
  {
384
399
  this.log.error(`Dynamic form setDataTabularByHash [${this.Hash}]::[${this.UUID}] gross error marshaling specific (${pInputHash}) tabular data for group ${pGroupIndex} row ${pRowIndex} from view in dataChanged event: ${pError}`);
385
400
  }
401
+ finally
402
+ {
403
+ this.finalizeTransaction(tmpTransactionGUID);
404
+ }
386
405
  }
387
406
 
388
407
  return false;
@@ -439,10 +458,10 @@ class PictViewDynamicForm extends libPictViewClass
439
458
  onMarshalToView()
440
459
  {
441
460
  // TODO: Only marshal data that has changed since the last marshal. Thought experiment: who decides what changes happened?
461
+ const tmpTransactionGUID = this.fable.getUUID();
462
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
442
463
  try
443
464
  {
444
- let tmpTransactionGUID = this.fable.getUUID();
445
- this.transactionTracking.registerTransaction(tmpTransactionGUID);
446
465
  let tmpMarshalDestinationObject = this.getMarshalDestinationObject();
447
466
  // TODO: Add optional transaction awareness to informary
448
467
  this.pict.providers.Informary.marshalDataToForm(tmpMarshalDestinationObject, this.formID, this.sectionManifest);
@@ -453,15 +472,19 @@ class PictViewDynamicForm extends libPictViewClass
453
472
  {
454
473
  this.log.error(`Gross error marshaling data to view: ${pError}`);
455
474
  }
475
+ finally
476
+ {
477
+ this.finalizeTransaction(tmpTransactionGUID);
478
+ }
456
479
  return super.onMarshalToView();
457
480
  }
458
481
 
459
482
  manualMarshalDataToViewByInput(pInput, pTransactionGUID)
460
483
  {
484
+ const tmpTransactionGUID = (typeof(pTransactionGUID) == 'string') ? pTransactionGUID : this.fable.getUUID();
485
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
461
486
  try
462
487
  {
463
- let tmpTransactionGUID = (typeof(pTransactionGUID) == 'string') ? pTransactionGUID : this.fable.getUUID();
464
- this.transactionTracking.registerTransaction(tmpTransactionGUID);
465
488
  this.pict.providers.Informary.manualMarshalDataToFormByInput(pInput);
466
489
  this.runLayoutProviderFunctions('onDataMarshalToForm', tmpTransactionGUID);
467
490
  this.runInputProviderFunctions('onDataMarshalToForm', pInput.Hash, null, tmpTransactionGUID);
@@ -470,14 +493,21 @@ class PictViewDynamicForm extends libPictViewClass
470
493
  {
471
494
  this.log.error(`Gross error marshaling data to view: ${pError}`);
472
495
  }
496
+ finally
497
+ {
498
+ if (tmpTransactionGUID !== pTransactionGUID)
499
+ {
500
+ this.finalizeTransaction(tmpTransactionGUID);
501
+ }
502
+ }
473
503
  }
474
504
 
475
505
  manualMarshalTabularDataToViewByInput(pInput, pRowIndex, pTransactionGUID)
476
506
  {
507
+ const tmpTransactionGUID = (typeof(pTransactionGUID) == 'string') ? pTransactionGUID : this.fable.getUUID();
508
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
477
509
  try
478
510
  {
479
- let tmpTransactionGUID = (typeof(pTransactionGUID) == 'string') ? pTransactionGUID : this.fable.getUUID();
480
- this.transactionTracking.registerTransaction(tmpTransactionGUID);
481
511
  this.pict.providers.Informary.manualMarshalTabularDataToFormByInput(pInput, pRowIndex);
482
512
  this.runLayoutProviderFunctions('onDataMarshalToForm', tmpTransactionGUID);
483
513
  this.runInputProviderFunctions('onDataMarshalToForm', pInput.Hash, pRowIndex, tmpTransactionGUID);
@@ -486,6 +516,13 @@ class PictViewDynamicForm extends libPictViewClass
486
516
  {
487
517
  this.log.error(`Gross error marshaling tabular data to view: ${pError}`);
488
518
  }
519
+ finally
520
+ {
521
+ if (tmpTransactionGUID !== pTransactionGUID)
522
+ {
523
+ this.finalizeTransaction(tmpTransactionGUID);
524
+ }
525
+ }
489
526
  }
490
527
 
491
528
  /**
@@ -513,10 +550,10 @@ class PictViewDynamicForm extends libPictViewClass
513
550
  onAfterMarshalToForm()
514
551
  {
515
552
  // Check to see if there are any hooks set from the input templates
553
+ const tmpTransactionGUID = this.fable.getUUID();
554
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
516
555
  try
517
556
  {
518
- let tmpTransactionGUID = this.fable.getUUID();
519
- this.transactionTracking.registerTransaction(tmpTransactionGUID);
520
557
  this.runInputProviderFunctions('onAfterMarshalToForm', null, null, tmpTransactionGUID);
521
558
 
522
559
  }
@@ -524,6 +561,10 @@ class PictViewDynamicForm extends libPictViewClass
524
561
  {
525
562
  this.log.error(`Gross error running after marshal to form: ${pError}`);
526
563
  }
564
+ finally
565
+ {
566
+ this.finalizeTransaction(tmpTransactionGUID);
567
+ }
527
568
  }
528
569
 
529
570
  /**
@@ -602,10 +643,21 @@ class PictViewDynamicForm extends libPictViewClass
602
643
  onAfterRender(pRenderable)
603
644
  {
604
645
  let tmpTransactionGUID = this.fable.getUUID();
605
- this.transactionTracking.registerTransaction(tmpTransactionGUID);
646
+ this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
606
647
 
607
- this.runLayoutProviderFunctions('onGroupLayoutInitialize', tmpTransactionGUID);
608
- this.runInputProviderFunctions('onInputInitialize', null, null, tmpTransactionGUID);
648
+ try
649
+ {
650
+ this.runLayoutProviderFunctions('onGroupLayoutInitialize', tmpTransactionGUID);
651
+ this.runInputProviderFunctions('onInputInitialize', null, null, tmpTransactionGUID);
652
+ }
653
+ catch (pError)
654
+ {
655
+ this.log.error(`Gross error running after render: ${pError.message || pError}`);
656
+ }
657
+ finally
658
+ {
659
+ this.finalizeTransaction(tmpTransactionGUID);
660
+ }
609
661
  return super.onAfterRender(pRenderable);
610
662
  }
611
663
 
@@ -628,7 +680,7 @@ class PictViewDynamicForm extends libPictViewClass
628
680
  runLayoutProviderFunctions(pFunctionName, pTransactionGUID)
629
681
  {
630
682
  const tmpTransactionGUID = (typeof(pTransactionGUID) === 'string') ? pTransactionGUID : this.fable.getUUID();
631
- const tmpTransaction = this.transactionTracking.registerTransaction(tmpTransactionGUID);
683
+ const tmpTransaction = this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
632
684
 
633
685
  // Check to see if there are any hooks set from the input templates
634
686
  let tmpLayoutProviders = this.pict.ContentAssignment.getElement(`${this.sectionDefinition.DefaultDestinationAddress} [data-i-pictdynamiclayout="true"]`);
@@ -660,12 +712,16 @@ class PictViewDynamicForm extends libPictViewClass
660
712
  if (tmpLayoutProvider && (pFunctionName in tmpLayoutProvider))
661
713
  {
662
714
  let tmpFunction = tmpLayoutProvider[pFunctionName];
663
- if (this.transactionTracking.checkEvent(tmpTransaction.TransactionKey, `G${tmpGroupIndex}-L${tmpLayout}`, pFunctionName))
715
+ if (this.pict.TransactionTracking.checkEvent(tmpTransaction.TransactionKey, `G${tmpGroupIndex}-L${tmpLayout}`, pFunctionName))
664
716
  {
665
717
  tmpFunction.call(tmpLayoutProvider, this, tmpGroup);
666
718
  }
667
719
  }
668
720
  }
721
+ if (tmpTransactionGUID !== pTransactionGUID)
722
+ {
723
+ this.finalizeTransaction(tmpTransactionGUID);
724
+ }
669
725
  }
670
726
 
671
727
  /**
@@ -679,7 +735,7 @@ class PictViewDynamicForm extends libPictViewClass
679
735
  runInputProviderFunctions(pFunctionName, pInputHash, pRowIndex, pTransactionGUID)
680
736
  {
681
737
  const tmpTransactionGUID = (typeof(pTransactionGUID) === 'string') ? pTransactionGUID : this.fable.getUUID();
682
- const tmpTransaction = this.transactionTracking.registerTransaction(tmpTransactionGUID);
738
+ const tmpTransaction = this.pict.TransactionTracking.registerTransaction(tmpTransactionGUID);
683
739
 
684
740
  // Check to see if there are any hooks set from the input templates
685
741
  for (let i = 0; i < this.sectionDefinition.Groups.length; i++)
@@ -713,8 +769,8 @@ class PictViewDynamicForm extends libPictViewClass
713
769
  this.log.trace(`Dynamic form [${this.Hash}]::[${this.UUID}] running provider [${tmpInputProviderList[l]}] function [${pFunctionName}] for input [${tmpInput.Hash}].`);
714
770
  }
715
771
  // TODO: Right now the Option input requires this bug to work
716
- //if (this.transactionTracking.checkEvent(tmpTransaction.TransactionKey, `I${tmpInput.Hash}-P${tmpInputProviderList[l]}`, pFunctionName))
717
- if ((tmpInput.PictForm.InputType == 'Option') || this.transactionTracking.checkEvent(tmpTransaction.TransactionKey, `I${tmpInput.Hash}-P${tmpInputProviderList[l]}`, pFunctionName))
772
+ //if (this.pict.TransactionTracking.checkEvent(tmpTransaction.TransactionKey, `I${tmpInput.Hash}-P${tmpInputProviderList[l]}`, pFunctionName))
773
+ if ((tmpInput.PictForm.InputType == 'Option') || this.pict.TransactionTracking.checkEvent(tmpTransaction.TransactionKey, `I${tmpInput.Hash}-P${tmpInputProviderList[l]}`, pFunctionName))
718
774
  {
719
775
  this.pict.providers[tmpInputProviderList[l]][pFunctionName](this, tmpGroup, j, tmpInput, tmpValue, tmpInput.Macro.HTMLSelector);
720
776
  }
@@ -766,7 +822,7 @@ class PictViewDynamicForm extends libPictViewClass
766
822
  let tmpValue = this.sectionManifest.getValueByHash(this.getMarshalDestinationObject(), tmpValueAddress);
767
823
  try
768
824
  {
769
- if (this.transactionTracking.checkEvent(tmpTransaction.TransactionKey, `TI${tmpInput.Hash}-P${tmpInputProviderList[l]}-R${r}`, pFunctionName))
825
+ if (this.pict.TransactionTracking.checkEvent(tmpTransaction.TransactionKey, `TI${tmpInput.Hash}-P${tmpInputProviderList[l]}-R${r}`, pFunctionName))
770
826
  {
771
827
  this.pict.providers[tmpInputProviderList[l]][pFunctionName + 'Tabular'](this, tmpGroup, tmpInput, tmpValue, tmpInput.Macro.HTMLSelectorTabular, r);
772
828
  }
@@ -787,7 +843,10 @@ class PictViewDynamicForm extends libPictViewClass
787
843
  }
788
844
  }
789
845
  }
790
- this.finalizeTransaction(tmpTransactionGUID);
846
+ if (pTransactionGUID !== tmpTransactionGUID)
847
+ {
848
+ this.finalizeTransaction(tmpTransactionGUID);
849
+ }
791
850
  }
792
851
 
793
852
  /**
@@ -1179,6 +1238,8 @@ class PictViewDynamicForm extends libPictViewClass
1179
1238
  }
1180
1239
  }
1181
1240
  }
1241
+ //TODO: figure out how to safely clean up old transactions
1242
+ //delete this.pict.TransactionTracking.transactions[pTransactionGUID];
1182
1243
  return true;
1183
1244
  }
1184
1245
 
@@ -13,9 +13,10 @@ declare class PictDynamicSolver extends libPictProvider {
13
13
  constructor(pFable: object, pOptions: object, pServiceHash: object);
14
14
  /** @type {import('pict')} */
15
15
  pict: import("pict");
16
- /** @type {import('pict') & { instantiateServiceProviderIfNotExists: (hash: string) => any }} */
16
+ /** @type {import('pict') & { instantiateServiceProviderIfNotExists: (hash: string) => any, ExpressionParser: any }} */
17
17
  fable: import("pict") & {
18
18
  instantiateServiceProviderIfNotExists: (hash: string) => any;
19
+ ExpressionParser: any;
19
20
  };
20
21
  /**
21
22
  * Checks the solver and returns the solver object if it passes the checks.
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA8BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqChB;IA9BA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,gGAAgG;IAChG,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,CAClF;IA6BX;;;;;;;;;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,QA+BhB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAiFxB;IADA;;;;;MAAuC;CAExC;;;;;AAhWD,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":";AA8BA;;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;;;;;;;;;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,QA+BhB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAiFxB;IADA;;;;;MAAuC;CAExC;;;;;AAhWD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B"}
@@ -52,10 +52,11 @@ declare class CustomInputHandler extends libPictSectionInputExtension {
52
52
  * @param {Object} pInput - The input object.
53
53
  * @param {any} pValue - The value of the input.
54
54
  * @param {string} pHTMLSelector - The HTML selector.
55
+ * @param {string} [pTransactionGUID] - (optional) The transaction GUID for the event dispatch.
55
56
  *
56
- * @return {Promise<any>} - Returns a promise that resolves when the data has been gathered.
57
+ * @return {Promise<Error?>} - Returns a promise that resolves when the data has been gathered.
57
58
  */
58
- gatherDataFromServer(pView: any, pInput: any, pValue: any, pHTMLSelector: string): Promise<any>;
59
+ gatherDataFromServer(pView: any, pInput: any, pValue: any, pHTMLSelector: string, pTransactionGUID?: string): Promise<Error | null>;
59
60
  /**
60
61
  * Initializes a tabular input element.
61
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Provider-Input-EntityBundleRequest.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IAKX,oGA0EC;IAED,+GAgEC;IAED;;;;;;;;;OASG;IACH,sDALW,GAAG,iBACH,MAAM,GAEL,OAAO,CAAC,GAAG,CAAC,CA8EvB;IA0BD;;;;;;;;;;;OAWG;IACH,uEANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;;OASG;IACH,8CALW,GAAG,iBACH,MAAM,oBACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;OAUG;IACH,qDANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;;OAWG;IACH,6EALW,GAAG,iBACH,MAAM,oBACN,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;;;;;;OAWG;IACH,yEANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;CACD"}
1
+ {"version":3,"file":"Pict-Provider-Input-EntityBundleRequest.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IAKX,oGA0EC;IAED,+GAgEC;IAED;;;;;;;;;;OAUG;IACH,sDANW,GAAG,iBACH,MAAM,qBACN,MAAM,GAEL,OAAO,CAAC,KAAK,OAAC,CAAC,CAwF1B;IA0BD;;;;;;;;;;;OAWG;IACH,uEANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;;OASG;IACH,8CALW,GAAG,iBACH,MAAM,oBACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;OAUG;IACH,qDANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;;OAWG;IACH,6EALW,GAAG,iBACH,MAAM,oBACN,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;;;;;;OAWG;IACH,yEANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;CACD"}
@@ -9,7 +9,6 @@ export = PictViewDynamicForm;
9
9
  */
10
10
  declare class PictViewDynamicForm extends libPictViewClass {
11
11
  constructor(pFable: any, pOptions: any, pServiceHash: any);
12
- transactionTracking: import("pict/types/source/services/Fable-Service-TransactionTracking");
13
12
  /** @type {Record<string, any>} */
14
13
  _PackagePictView: Record<string, any>;
15
14
  sectionDefinition: any;
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-View-DynamicForm.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-DynamicForm.js"],"names":[],"mappings":";AAYA;;;;;;;GAOG;AACH;IAEC,2DAuGC;IAvDA,4FAA4D;IAE5D,kCAAkC;IAClC,kBADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACO;IAIrC,uBAAqC;IAGrC,qBAA2H;IAG3H,sBAAwB;IAcxB,+BAA6D;IAmB7D,iCAAuC;IAEvC,eAAmD;IAEnD,4BAAkC;IAClC,6BAAgC;IAMjC;;;;OAIG;IACH,6BAFa,MAAM,CAgBlB;IAED;;;;;;;;OAQG;IACH,wBAFW,MAAM,QAgDhB;IAGD;;;;;;OAMG;IACH,gCAJW,MAAM,eACN,MAAM,aACN,MA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BAFa,OAAO,CAKnB;CACD;;;;;AA12CD,kCAAkC;AAClC,qCADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC6D"}
1
+ {"version":3,"file":"Pict-View-DynamicForm.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-DynamicForm.js"],"names":[],"mappings":";AAYA;;;;;;;GAOG;AACH;IAEC,2DAwGC;IArDA,kCAAkC;IAClC,kBADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACO;IAIrC,uBAAqC;IAGrC,qBAA2H;IAG3H,sBAAwB;IAcxB,+BAA6D;IAmB7D,iCAAuC;IAEvC,eAAmD;IAEnD,4BAAkC;IAClC,6BAAgC;IAMjC;;;;OAIG;IACH,6BAFa,MAAM,CAgBlB;IAED;;;;;;;;OAQG;IACH,wBAFW,MAAM,QAqDhB;IAGD;;;;;;OAMG;IACH,gCAJW,MAAM,eACN,MAAM,aACN,MAAM,QA4DhB;IAED;;;;;;;;OAQG;IACH,uBAJW,MAAM,UACN,GAAG,GACD,OAAO,CAqCnB;IAED;;;;;;;;;;OAUG;IACH,kCANW,MAAM,cACN,MAAM,aACN,MAAM,UACN,GAAG,GACD,OAAO,CAyEnB;IAED;;;;OAIG;IACH,gCAFa,MAAM,CAKlB;IAED;;;;OAIG;IACH,+BAFY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAK9B;IAED;;;OAGG;IACH,6BAFW,MAAM,uBAKhB;IAED;;;;;;OAMG;IACH,mCAJW,MAAM,eACN,MAAM,aACN,MAAM,OAOhB;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAwBf;IAED,yEAqBC;IAED,gGAqBC;IAED;;;OAGG;IACH,qBAFa,GAAG,CAcf;IAED;;;OAGG;IACH,6BAkBC;IAED;;;;OAIG;IACH,WAFa,GAAG,CAef;IA4ED;;;;;;;;;;;;;;;OAeG;IACH,0CAHW,MAAM,qBACN,MAAM,QA+ChB;IAED;;;;;;;OAOG;IACH,yCALW,MAAM,eACN,MAAM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ACH,6BALW,MAAM,UACN,MAAM,4CAEN,MAAM,QAmDhB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,4CAEN,MAAM,QAUhB;IAED;;;;;;;;OAQG;IACH,mCAJW,MAAM,eACN,MAAM,OAMhB;IAED;;;;;;OAMG;IACH,kCAJW,MAAM,kBACN,MAAM,OAMhB;IAED;;;;;OAKG;IACH,iCAHW,MAAM,SAMhB;IAED;;;;;;;OAOG;IACH,mCAHW,MAAM,OAMhB;IAED;;;;;;;OAOG;IACH,qCALW,MAAM,aACN,MAAM,gBACN,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;OAMG;IACH,qCAJW,MAAM,aACN,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;OAMG;IACH,mCAJW,MAAM,aACN,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;OAMG;IACH,mCAJW,MAAM,aACN,MAAM,gBAMhB;IAED;;;OAGG;IACH,yBAFa,OAAO,CAKnB;CACD;;;;;AAv6CD,kCAAkC;AAClC,qCADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC6D"}
@@ -320,10 +320,12 @@ class ImportExtraDataCSVCommand extends libPictCommandLineUtility.ServiceCommand
320
320
 
321
321
  if (tmpOptionsRow['Option Value'] || tmpOptionsRow['Option Text'])
322
322
  {
323
+ // strip leading and trailing whitespace, and convert HTML entities for quotes and apostrophes
324
+ const tmpCleanText = (tmpOptionsRow['Option Text'] || tmpOptionsRow['Option Value']).trim().replace(/&quot;/g, '"').replace(/&#39;/g, "'");
323
325
  tmpPickListConfig.DefaultListData.push(
324
326
  {
325
327
  id: tmpOptionsRow['Option Value'],
326
- text: tmpOptionsRow['Option Text']
328
+ text: tmpCleanText,
327
329
  });
328
330
  }
329
331
  }