@verdocs/web-sdk 2.3.56 → 2.3.58

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.
@@ -84,7 +84,11 @@ const VerdocsFieldDate = class {
84
84
  onSelect: ({ date, formattedDate }) => {
85
85
  console.log('Selected date', formattedDate, date);
86
86
  const event = new window.Event('input');
87
+ console.log('Will dispatch', event, this.el);
87
88
  this.el.dispatchEvent(event);
89
+ const event2 = new window.Event('datechange');
90
+ console.log('Will dispatch 2', event2, this.el);
91
+ this.el.dispatchEvent(event2);
88
92
  },
89
93
  });
90
94
  }
@@ -292,7 +292,9 @@ const VerdocsSign = class {
292
292
  });
293
293
  case 'date':
294
294
  const iso = e.target.getAttribute('iso');
295
+ console.log('iso', iso);
295
296
  const formatted = index$1.format(new Date(iso), Types.FORMAT_DATE);
297
+ console.log('f', formatted);
296
298
  if (formatted !== '1970-12-31') {
297
299
  return this.saveFieldChange(field.name, { prepared: false, value: formatted });
298
300
  }
@@ -422,13 +424,16 @@ const VerdocsSign = class {
422
424
  // These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
423
425
  // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.
424
426
  if (e.target.name.includes('checkbox_group') || e.target.name.includes('radio_button_group')) {
425
- console.log('CB', e.target);
426
427
  this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
427
428
  }
428
429
  else {
429
430
  this.checkRecipientFields();
430
431
  }
431
432
  });
433
+ el.addEventListener('datechange', (e) => {
434
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
435
+ this.checkRecipientFields();
436
+ });
432
437
  el.addEventListener('attached', async (e) => {
433
438
  console.log('[SIGN] onAttached', e.detail, e.target.value);
434
439
  const r = await Envelopes.uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail);
@@ -270,7 +270,9 @@ export class VerdocsSign {
270
270
  });
271
271
  case 'date':
272
272
  const iso = e.target.getAttribute('iso');
273
+ console.log('iso', iso);
273
274
  const formatted = format(new Date(iso), FORMAT_DATE);
275
+ console.log('f', formatted);
274
276
  if (formatted !== '1970-12-31') {
275
277
  return this.saveFieldChange(field.name, { prepared: false, value: formatted });
276
278
  }
@@ -400,13 +402,16 @@ export class VerdocsSign {
400
402
  // These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
401
403
  // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.
402
404
  if (e.target.name.includes('checkbox_group') || e.target.name.includes('radio_button_group')) {
403
- console.log('CB', e.target);
404
405
  this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
405
406
  }
406
407
  else {
407
408
  this.checkRecipientFields();
408
409
  }
409
410
  });
411
+ el.addEventListener('datechange', (e) => {
412
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
413
+ this.checkRecipientFields();
414
+ });
410
415
  el.addEventListener('attached', async (e) => {
411
416
  console.log('[SIGN] onAttached', e.detail, e.target.value);
412
417
  const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail);
@@ -46,7 +46,11 @@ export class VerdocsFieldDate {
46
46
  onSelect: ({ date, formattedDate }) => {
47
47
  console.log('Selected date', formattedDate, date);
48
48
  const event = new window.Event('input');
49
+ console.log('Will dispatch', event, this.el);
49
50
  this.el.dispatchEvent(event);
51
+ const event2 = new window.Event('datechange');
52
+ console.log('Will dispatch 2', event2, this.el);
53
+ this.el.dispatchEvent(event2);
50
54
  },
51
55
  });
52
56
  }
@@ -85,7 +85,11 @@ const VerdocsFieldDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
85
85
  onSelect: ({ date, formattedDate }) => {
86
86
  console.log('Selected date', formattedDate, date);
87
87
  const event = new window.Event('input');
88
+ console.log('Will dispatch', event, this.el);
88
89
  this.el.dispatchEvent(event);
90
+ const event2 = new window.Event('datechange');
91
+ console.log('Will dispatch 2', event2, this.el);
92
+ this.el.dispatchEvent(event2);
89
93
  },
90
94
  });
91
95
  }
@@ -293,7 +293,9 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
293
293
  });
294
294
  case 'date':
295
295
  const iso = e.target.getAttribute('iso');
296
+ console.log('iso', iso);
296
297
  const formatted = format(new Date(iso), FORMAT_DATE);
298
+ console.log('f', formatted);
297
299
  if (formatted !== '1970-12-31') {
298
300
  return this.saveFieldChange(field.name, { prepared: false, value: formatted });
299
301
  }
@@ -423,13 +425,16 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
423
425
  // These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
424
426
  // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.
425
427
  if (e.target.name.includes('checkbox_group') || e.target.name.includes('radio_button_group')) {
426
- console.log('CB', e.target);
427
428
  this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
428
429
  }
429
430
  else {
430
431
  this.checkRecipientFields();
431
432
  }
432
433
  });
434
+ el.addEventListener('datechange', (e) => {
435
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
436
+ this.checkRecipientFields();
437
+ });
433
438
  el.addEventListener('attached', async (e) => {
434
439
  console.log('[SIGN] onAttached', e.detail, e.target.value);
435
440
  const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail);
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-01-20T00:44:48",
2
+ "timestamp": "2024-01-21T22:10:31",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.20.0",
@@ -80,7 +80,11 @@ const VerdocsFieldDate = class {
80
80
  onSelect: ({ date, formattedDate }) => {
81
81
  console.log('Selected date', formattedDate, date);
82
82
  const event = new window.Event('input');
83
+ console.log('Will dispatch', event, this.el);
83
84
  this.el.dispatchEvent(event);
85
+ const event2 = new window.Event('datechange');
86
+ console.log('Will dispatch 2', event2, this.el);
87
+ this.el.dispatchEvent(event2);
84
88
  },
85
89
  });
86
90
  }
@@ -288,7 +288,9 @@ const VerdocsSign = class {
288
288
  });
289
289
  case 'date':
290
290
  const iso = e.target.getAttribute('iso');
291
+ console.log('iso', iso);
291
292
  const formatted = format(new Date(iso), FORMAT_DATE);
293
+ console.log('f', formatted);
292
294
  if (formatted !== '1970-12-31') {
293
295
  return this.saveFieldChange(field.name, { prepared: false, value: formatted });
294
296
  }
@@ -418,13 +420,16 @@ const VerdocsSign = class {
418
420
  // These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
419
421
  // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.
420
422
  if (e.target.name.includes('checkbox_group') || e.target.name.includes('radio_button_group')) {
421
- console.log('CB', e.target);
422
423
  this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
423
424
  }
424
425
  else {
425
426
  this.checkRecipientFields();
426
427
  }
427
428
  });
429
+ el.addEventListener('datechange', (e) => {
430
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
431
+ this.checkRecipientFields();
432
+ });
428
433
  el.addEventListener('attached', async (e) => {
429
434
  console.log('[SIGN] onAttached', e.detail, e.target.value);
430
435
  const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail);