@verdocs/web-sdk 2.3.57 → 2.3.59

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.
@@ -86,6 +86,9 @@ const VerdocsFieldDate = class {
86
86
  const event = new window.Event('input');
87
87
  console.log('Will dispatch', event, this.el);
88
88
  this.el.dispatchEvent(event);
89
+ const event2 = new window.Event('datechange');
90
+ console.log('Will dispatch 2', event2, this.el);
91
+ this.hostEl.dispatchEvent(event2);
89
92
  },
90
93
  });
91
94
  }
@@ -126,6 +129,7 @@ const VerdocsFieldDate = class {
126
129
  return this.hideSettingsPanel();
127
130
  }, helpText: 'Date fields allow the user to select a date.' })))))));
128
131
  }
132
+ get hostEl() { return index.getElement(this); }
129
133
  };
130
134
  VerdocsFieldDate.style = verdocsFieldDateCss;
131
135
 
@@ -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
  }
@@ -428,6 +430,10 @@ const VerdocsSign = class {
428
430
  this.checkRecipientFields();
429
431
  }
430
432
  });
433
+ el.addEventListener('datechange', (e) => {
434
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
435
+ this.checkRecipientFields();
436
+ });
431
437
  el.addEventListener('attached', async (e) => {
432
438
  console.log('[SIGN] onAttached', e.detail, e.target.value);
433
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
  }
@@ -406,6 +408,10 @@ export class VerdocsSign {
406
408
  this.checkRecipientFields();
407
409
  }
408
410
  });
411
+ el.addEventListener('datechange', (e) => {
412
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
413
+ this.checkRecipientFields();
414
+ });
409
415
  el.addEventListener('attached', async (e) => {
410
416
  console.log('[SIGN] onAttached', e.detail, e.target.value);
411
417
  const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail);
@@ -48,6 +48,9 @@ export class VerdocsFieldDate {
48
48
  const event = new window.Event('input');
49
49
  console.log('Will dispatch', event, this.el);
50
50
  this.el.dispatchEvent(event);
51
+ const event2 = new window.Event('datechange');
52
+ console.log('Will dispatch 2', event2, this.el);
53
+ this.hostEl.dispatchEvent(event2);
51
54
  },
52
55
  });
53
56
  }
@@ -382,4 +385,5 @@ export class VerdocsFieldDate {
382
385
  }
383
386
  };
384
387
  }
388
+ static get elementRef() { return "hostEl"; }
385
389
  }
@@ -87,6 +87,9 @@ const VerdocsFieldDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
87
87
  const event = new window.Event('input');
88
88
  console.log('Will dispatch', event, this.el);
89
89
  this.el.dispatchEvent(event);
90
+ const event2 = new window.Event('datechange');
91
+ console.log('Will dispatch 2', event2, this.el);
92
+ this.hostEl.dispatchEvent(event2);
90
93
  },
91
94
  });
92
95
  }
@@ -127,6 +130,7 @@ const VerdocsFieldDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
127
130
  return this.hideSettingsPanel();
128
131
  }, helpText: 'Date fields allow the user to select a date.' })))))));
129
132
  }
133
+ get hostEl() { return this; }
130
134
  static get style() { return verdocsFieldDateCss; }
131
135
  }, [0, "verdocs-field-date", {
132
136
  "templateid": [1],
@@ -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
  }
@@ -429,6 +431,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
429
431
  this.checkRecipientFields();
430
432
  }
431
433
  });
434
+ el.addEventListener('datechange', (e) => {
435
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
436
+ this.checkRecipientFields();
437
+ });
432
438
  el.addEventListener('attached', async (e) => {
433
439
  console.log('[SIGN] onAttached', e.detail, e.target.value);
434
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-21T20:24:09",
2
+ "timestamp": "2024-01-21T23:02:36",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.20.0",
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-172625c5.js';
1
+ import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, a as getElement } from './index-172625c5.js';
2
2
  import { c as createCommonjsModule, a as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-5ec8f9b7.js';
3
3
  import { g as getRGBA } from './Colors-1b298092.js';
4
4
  import { g as getTemplateRoleStore, a as getRoleIndex } from './TemplateRoleStore-447f2cb6.js';
@@ -82,6 +82,9 @@ const VerdocsFieldDate = class {
82
82
  const event = new window.Event('input');
83
83
  console.log('Will dispatch', event, this.el);
84
84
  this.el.dispatchEvent(event);
85
+ const event2 = new window.Event('datechange');
86
+ console.log('Will dispatch 2', event2, this.el);
87
+ this.hostEl.dispatchEvent(event2);
85
88
  },
86
89
  });
87
90
  }
@@ -122,6 +125,7 @@ const VerdocsFieldDate = class {
122
125
  return this.hideSettingsPanel();
123
126
  }, helpText: 'Date fields allow the user to select a date.' })))))));
124
127
  }
128
+ get hostEl() { return getElement(this); }
125
129
  };
126
130
  VerdocsFieldDate.style = verdocsFieldDateCss;
127
131
 
@@ -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
  }
@@ -424,6 +426,10 @@ const VerdocsSign = class {
424
426
  this.checkRecipientFields();
425
427
  }
426
428
  });
429
+ el.addEventListener('datechange', (e) => {
430
+ console.log('[SIGN] onfieldInput', e.detail, e.target.value);
431
+ this.checkRecipientFields();
432
+ });
427
433
  el.addEventListener('attached', async (e) => {
428
434
  console.log('[SIGN] onAttached', e.detail, e.target.value);
429
435
  const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail);