@verdocs/web-sdk 6.5.0-beta.34 → 6.5.0-beta.35

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 (33) hide show
  1. package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +2 -4
  2. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +1 -3
  3. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
  4. package/dist/components/{p-BWvUv89M.js → p-BZ8310aE.js} +4 -4
  5. package/dist/components/{p-BWvUv89M.js.map → p-BZ8310aE.js.map} +1 -1
  6. package/dist/components/{p-BcGvNPBh.js → p-B_TQ4EUa.js} +4 -4
  7. package/dist/components/{p-BcGvNPBh.js.map → p-B_TQ4EUa.js.map} +1 -1
  8. package/dist/components/{p-Dh9AjNdu.js → p-Ck3ul0eW.js} +4 -6
  9. package/dist/components/p-Ck3ul0eW.js.map +1 -0
  10. package/dist/components/{p-CY-c2d8q.js → p-vFfCwagt.js} +3 -3
  11. package/dist/components/{p-CY-c2d8q.js.map → p-vFfCwagt.js.map} +1 -1
  12. package/dist/components/verdocs-build.js +4 -4
  13. package/dist/components/verdocs-field-date.js +1 -1
  14. package/dist/components/verdocs-preview.js +1 -1
  15. package/dist/components/verdocs-template-document-page.js +1 -1
  16. package/dist/components/verdocs-template-fields.js +1 -1
  17. package/dist/custom-elements.json +2456 -0
  18. package/dist/esm/verdocs-field-attachment_11.entry.js +2 -4
  19. package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
  20. package/dist/esm-es5/verdocs-field-attachment_11.entry.js.map +1 -1
  21. package/dist/verdocs-web-sdk/p-0f3e0202.system.entry.js +2 -0
  22. package/dist/verdocs-web-sdk/{p-1bde2f57.system.entry.js.map → p-0f3e0202.system.entry.js.map} +1 -1
  23. package/dist/verdocs-web-sdk/p-8a0af7b5.entry.js +2 -0
  24. package/dist/verdocs-web-sdk/p-8a0af7b5.entry.js.map +1 -0
  25. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  26. package/dist/verdocs-web-sdk/p-l12LJkCM.system.js.map +1 -0
  27. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/components/p-Dh9AjNdu.js.map +0 -1
  30. package/dist/verdocs-web-sdk/p-1bde2f57.system.entry.js +0 -2
  31. package/dist/verdocs-web-sdk/p-DDdzKvq8.system.js.map +0 -1
  32. package/dist/verdocs-web-sdk/p-f986d5dd.entry.js +0 -2
  33. package/dist/verdocs-web-sdk/p-f986d5dd.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"file":"p-Ck3ul0eW.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,stwBAAstwB;;MCoBruwB,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;AAL7B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AASE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAE7C;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;;AAGG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;AAEG;AACoB,QAAA,IAAI,CAAA,IAAA,GAAa,KAAK;AAE7C;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAE1C;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAE1C;;AAEG;AACoB,QAAA,IAAU,CAAA,UAAA,GAAY,CAAC;QAsBrC,IAAA,CAAA,WAAW,GAAG,CAAA,oBAAA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CAAC,EAC/C,QAAQ,EAAE,MAAK;;AACb,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,CAAC,EAAC,SAAS,EAAE,SAAS,EAAC,CAAC;AAC1C,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,iBAAiB,EAAE,CAAC,IAAG;;AACrB,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EAAE,8CAA8C,EAAA,CACxD,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","format"],"sources":["src/components/fields/verdocs-field-date/verdocs-field-date.scss?tag=verdocs-field-date","src/components/fields/verdocs-field-date/verdocs-field-date.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-date {\n font-family: $verdocs-primary-font;\n width: 74px;\n height: 20px;\n display: block;\n font-size: 11px;\n position: relative;\n scroll-margin: 20px 0;\n letter-spacing: 0.3px;\n background-color: var(--verdocs-field-background, transparent);\n transform-origin: bottom left;\n\n &.small input {\n font-size: 7px;\n }\n\n .edge-top,\n .edge-right,\n .edge-left,\n .edge-bottom {\n position: absolute;\n z-index: 10;\n }\n\n .edge-top {\n top: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n .edge-right {\n top: 0;\n bottom: 0;\n right: -2px;\n width: 5px;\n }\n\n .edge-left {\n top: 0;\n left: -2px;\n bottom: 0;\n width: 5px;\n }\n\n .edge-bottom {\n bottom: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n label {\n top: -14px;\n left: 0;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n input {\n position: absolute;\n\n font-size: 12px;\n\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n box-sizing: border-box;\n color: var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));\n font-weight: 500;\n transform-origin: 0 0;\n height: 100%;\n width: 100%;\n background: none;\n border: var(--verdocs-field-border, 1px solid $light-border-color);\n border-radius: var(--verdocs-field-radius);\n appearance: none;\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled input {\n opacity: 0.5;\n }\n\n &.required {\n input {\n border: 1px solid var(--verdocs-required-field-border);\n }\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n .settings-icon {\n position: absolute;\n top: -3px;\n left: -18px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n.air-datepicker-cell.-year-.-other-decade-,\n.air-datepicker-cell.-day-.-other-month- {\n color: var(--adp-color-other-month);\n}\n\n.air-datepicker-cell.-year-.-other-decade-:hover,\n.air-datepicker-cell.-day-.-other-month-:hover {\n color: var(--adp-color-other-month-hover);\n}\n\n.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month- {\n color: var(--adp-color-other-month);\n}\n\n.-selected-.air-datepicker-cell.-year-.-other-decade-,\n.-selected-.air-datepicker-cell.-day-.-other-month- {\n color: #fff;\n background: var(--adp-background-color-selected-other-month);\n}\n\n.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-selected-.-focus-.air-datepicker-cell.-day-.-other-month- {\n background: var(--adp-background-color-selected-other-month-focused);\n}\n\n.-in-range-.air-datepicker-cell.-year-.-other-decade-,\n.-in-range-.air-datepicker-cell.-day-.-other-month- {\n background-color: var(--adp-background-color-in-range);\n color: var(--adp-color);\n}\n\n.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month- {\n background-color: var(--adp-background-color-in-range-focused);\n}\n\n.air-datepicker-cell.-year-.-other-decade-:empty,\n.air-datepicker-cell.-day-.-other-month-:empty {\n background: none;\n border: none;\n}\n\n.air-datepicker-cell {\n border-radius: var(--adp-cell-border-radius);\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n z-index: 1;\n}\n\n.air-datepicker-cell.-focus- {\n background: var(--adp-cell-background-color-hover);\n}\n\n.air-datepicker-cell.-current- {\n color: var(--adp-color-current-date);\n}\n\n.air-datepicker-cell.-current-.-focus- {\n color: var(--adp-color);\n}\n\n.air-datepicker-cell.-current-.-in-range- {\n color: var(--adp-color-current-date);\n}\n\n.air-datepicker-cell.-disabled- {\n cursor: default;\n color: var(--adp-color-disabled);\n}\n\n.air-datepicker-cell.-disabled-.-focus- {\n color: var(--adp-color-disabled);\n}\n\n.air-datepicker-cell.-disabled-.-in-range- {\n color: var(--adp-color-disabled-in-range);\n}\n\n.air-datepicker-cell.-disabled-.-current-.-focus- {\n color: var(--adp-color-disabled);\n}\n\n.air-datepicker-cell.-in-range- {\n background: var(--adp-cell-background-color-in-range);\n border-radius: 0;\n}\n\n.air-datepicker-cell.-in-range-:hover {\n background: var(--adp-cell-background-color-in-range-hover);\n}\n\n.air-datepicker-cell.-range-from- {\n border: 1px solid var(--adp-cell-border-color-in-range);\n background-color: var(--adp-cell-background-color-in-range);\n border-radius: var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius);\n}\n\n.air-datepicker-cell.-range-to- {\n border: 1px solid var(--adp-cell-border-color-in-range);\n background-color: var(--adp-cell-background-color-in-range);\n border-radius: 0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0;\n}\n\n.air-datepicker-cell.-range-to-.-range-from- {\n border-radius: var(--adp-cell-border-radius);\n}\n\n.air-datepicker-cell.-selected- {\n color: #fff;\n border: none;\n background: var(--adp-cell-background-color-selected);\n}\n\n.air-datepicker-cell.-selected-.-current- {\n color: #fff;\n background: var(--adp-cell-background-color-selected);\n}\n\n.air-datepicker-cell.-selected-.-focus- {\n background: var(--adp-cell-background-color-selected-hover);\n}\n\n.air-datepicker-body {\n transition: all var(--adp-transition-duration) var(--adp-transition-ease);\n}\n\n.air-datepicker-body.-hidden- {\n display: none;\n}\n\n.air-datepicker-body--day-names {\n display: grid;\n grid-template-columns: repeat(7, var(--adp-day-cell-width));\n margin: 8px 0 3px;\n}\n\n.air-datepicker-body--day-name {\n color: var(--adp-day-name-color);\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n text-align: center;\n text-transform: uppercase;\n font-size: 0.8em;\n}\n\n.air-datepicker-body--day-name.-clickable- {\n cursor: pointer;\n}\n\n.air-datepicker-body--day-name.-clickable-:hover {\n color: var(--adp-day-name-color-hover);\n}\n\n.air-datepicker-body--cells {\n display: grid;\n}\n\n.air-datepicker-body--cells.-days- {\n grid-template-columns: repeat(7, var(--adp-day-cell-width));\n grid-auto-rows: var(--adp-day-cell-height);\n}\n\n.air-datepicker-body--cells.-months- {\n grid-template-columns: repeat(3, 1fr);\n grid-auto-rows: var(--adp-month-cell-height);\n}\n\n.air-datepicker-body--cells.-years- {\n grid-template-columns: repeat(4, 1fr);\n grid-auto-rows: var(--adp-year-cell-height);\n}\n\n.air-datepicker-nav {\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid var(--adp-border-color-inner);\n min-height: var(--adp-nav-height);\n padding: var(--adp-padding);\n box-sizing: content-box;\n}\n\n.-only-timepicker- .air-datepicker-nav {\n display: none;\n}\n\n.air-datepicker-nav--title,\n.air-datepicker-nav--action {\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n}\n\n.air-datepicker-nav--action {\n width: var(--adp-nav-action-size);\n border-radius: var(--adp-border-radius);\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.air-datepicker-nav--action:hover {\n background: var(--adp-background-color-hover);\n}\n\n.air-datepicker-nav--action:active {\n background: var(--adp-background-color-active);\n}\n\n.air-datepicker-nav--action.-disabled- {\n visibility: hidden;\n}\n\n.air-datepicker-nav--action svg {\n width: 32px;\n height: 32px;\n}\n\n.air-datepicker-nav--action path {\n fill: none;\n stroke: var(--adp-nav-arrow-color);\n stroke-width: 2px;\n}\n\n.air-datepicker-nav--title {\n border-radius: var(--adp-border-radius);\n padding: 0 8px;\n}\n\n.air-datepicker-nav--title i {\n font-style: normal;\n color: var(--adp-nav-color-secondary);\n margin-left: 0.3em;\n}\n\n.air-datepicker-nav--title:hover {\n background: var(--adp-background-color-hover);\n}\n\n.air-datepicker-nav--title:active {\n background: var(--adp-background-color-active);\n}\n\n.air-datepicker-nav--title.-disabled- {\n cursor: default;\n background: none;\n}\n\n.air-datepicker-buttons {\n display: grid;\n grid-auto-columns: 1fr;\n grid-auto-flow: column;\n}\n\n.air-datepicker-button {\n display: inline-flex;\n color: var(--adp-btn-color);\n border-radius: var(--adp-btn-border-radius);\n cursor: pointer;\n height: var(--adp-btn-height);\n border: none;\n background: rgba(255, 255, 255, 0);\n}\n\n.air-datepicker-button:hover {\n color: var(--adp-btn-color-hover);\n background: var(--adp-btn-background-color-hover);\n}\n\n.air-datepicker-button:focus {\n color: var(--adp-btn-color-hover);\n background: var(--adp-btn-background-color-hover);\n outline: none;\n}\n\n.air-datepicker-button:active {\n background: var(--adp-btn-background-color-active);\n}\n\n.air-datepicker-button span {\n outline: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n\n.air-datepicker-time {\n display: grid;\n grid-template-columns: max-content 1fr;\n grid-column-gap: 12px;\n align-items: center;\n position: relative;\n padding: 0 var(--adp-time-padding-inner);\n}\n\n.-only-timepicker- .air-datepicker-time {\n border-top: none;\n}\n\n.air-datepicker-time--current {\n display: flex;\n align-items: center;\n flex: 1;\n font-size: 14px;\n text-align: center;\n}\n\n.air-datepicker-time--current-colon {\n margin: 0 2px 3px;\n line-height: 1;\n}\n\n.air-datepicker-time--current-hours,\n.air-datepicker-time--current-minutes {\n line-height: 1;\n font-size: 19px;\n font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;\n position: relative;\n z-index: 1;\n}\n\n.air-datepicker-time--current-hours:after,\n.air-datepicker-time--current-minutes:after {\n content: '';\n background: var(--adp-background-color-hover);\n border-radius: var(--adp-border-radius);\n position: absolute;\n left: -2px;\n top: -3px;\n right: -2px;\n bottom: -2px;\n z-index: -1;\n opacity: 0;\n}\n\n.air-datepicker-time--current-hours.-focus-:after,\n.air-datepicker-time--current-minutes.-focus-:after {\n opacity: 1;\n}\n\n.air-datepicker-time--current-ampm {\n text-transform: uppercase;\n align-self: flex-end;\n color: var(--adp-time-day-period-color);\n margin-left: 6px;\n font-size: 11px;\n margin-bottom: 1px;\n}\n\n.air-datepicker-time--row {\n display: flex;\n align-items: center;\n font-size: 11px;\n height: 17px;\n background: linear-gradient(to right, var(--adp-time-track-color), var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat;\n}\n\n.air-datepicker-time--row:first-child {\n margin-bottom: 4px;\n}\n\n.air-datepicker-time--row input[type='range'] {\n background: none;\n cursor: pointer;\n flex: 1;\n height: 100%;\n width: 100%;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n}\n\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n}\n\n.air-datepicker-time--row input[type='range']::-ms-tooltip {\n display: none;\n}\n\n.air-datepicker-time--row input[type='range']:hover::-webkit-slider-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n\n.air-datepicker-time--row input[type='range']:hover::-moz-range-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n\n.air-datepicker-time--row input[type='range']:hover::-ms-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n\n.air-datepicker-time--row input[type='range']:focus {\n outline: none;\n}\n\n.air-datepicker-time--row input[type='range']:focus::-webkit-slider-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n\n.air-datepicker-time--row input[type='range']:focus::-moz-range-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n\n.air-datepicker-time--row input[type='range']:focus::-ms-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -webkit-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n\n.air-datepicker-time--row input[type='range']::-moz-range-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -moz-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n\n.air-datepicker-time--row input[type='range']::-ms-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -ms-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n margin-top: calc(var(--adp-time-thumb-size) / 2 * -1);\n}\n\n.air-datepicker-time--row input[type='range']::-webkit-slider-runnable-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n\n.air-datepicker-time--row input[type='range']::-moz-range-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n\n.air-datepicker-time--row input[type='range']::-ms-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n\n.air-datepicker-time--row input[type='range']::-ms-fill-lower {\n background: rgba(0, 0, 0, 0);\n}\n\n.air-datepicker-time--row input[type='range']::-ms-fill-upper {\n background: rgba(0, 0, 0, 0);\n}\n\n.air-datepicker {\n --adp-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n --adp-font-size: 14px;\n --adp-width: 246px;\n --adp-z-index: 100;\n --adp-padding: 4px;\n --adp-grid-areas: 'nav' 'body' 'timepicker' 'buttons';\n --adp-transition-duration: 0.3s;\n --adp-transition-ease: ease-out;\n --adp-transition-offset: 8px;\n --adp-background-color: #fff;\n --adp-background-color-hover: #f0f0f0;\n --adp-background-color-active: #eaeaea;\n --adp-background-color-in-range: rgba(92, 196, 239, 0.1);\n --adp-background-color-in-range-focused: rgba(92, 196, 239, 0.2);\n --adp-background-color-selected-other-month-focused: #8ad5f4;\n --adp-background-color-selected-other-month: #a2ddf6;\n --adp-color: #4a4a4a;\n --adp-color-secondary: #9c9c9c;\n --adp-accent-color: #4eb5e6;\n --adp-color-current-date: var(--adp-accent-color);\n --adp-color-other-month: #dedede;\n --adp-color-disabled: #aeaeae;\n --adp-color-disabled-in-range: #939393;\n --adp-color-other-month-hover: #c5c5c5;\n --adp-border-color: #dbdbdb;\n --adp-border-color-inner: #efefef;\n --adp-border-radius: 4px;\n --adp-border-color-inline: #d7d7d7;\n --adp-nav-height: 32px;\n --adp-nav-arrow-color: var(--adp-color-secondary);\n --adp-nav-action-size: 32px;\n --adp-nav-color-secondary: var(--adp-color-secondary);\n --adp-day-name-color: #ff9a19;\n --adp-day-name-color-hover: #8ad5f4;\n --adp-day-cell-width: 1fr;\n --adp-day-cell-height: 32px;\n --adp-month-cell-height: 42px;\n --adp-year-cell-height: 56px;\n --adp-pointer-size: 10px;\n --adp-poiner-border-radius: 2px;\n --adp-pointer-offset: 14px;\n --adp-cell-border-radius: 4px;\n --adp-cell-background-color-hover: var(--adp-background-color-hover);\n --adp-cell-background-color-selected: #5cc4ef;\n --adp-cell-background-color-selected-hover: #45bced;\n --adp-cell-background-color-in-range: rgba(92, 196, 239, 0.1);\n --adp-cell-background-color-in-range-hover: rgba(92, 196, 239, 0.2);\n --adp-cell-border-color-in-range: var(--adp-cell-background-color-selected);\n --adp-btn-height: 32px;\n --adp-btn-color: var(--adp-accent-color);\n --adp-btn-color-hover: var(--adp-color);\n --adp-btn-border-radius: var(--adp-border-radius);\n --adp-btn-background-color-hover: var(--adp-background-color-hover);\n --adp-btn-background-color-active: var(--adp-background-color-active);\n --adp-time-track-height: 1px;\n --adp-time-track-color: #dedede;\n --adp-time-track-color-hover: #b1b1b1;\n --adp-time-thumb-size: 12px;\n --adp-time-padding-inner: 10px;\n --adp-time-day-period-color: var(--adp-color-secondary);\n --adp-mobile-font-size: 16px;\n --adp-mobile-nav-height: 40px;\n --adp-mobile-width: 320px;\n --adp-mobile-day-cell-height: 38px;\n --adp-mobile-month-cell-height: 48px;\n --adp-mobile-year-cell-height: 64px;\n}\n\n.air-datepicker-overlay {\n --adp-overlay-background-color: rgba(0, 0, 0, 0.3);\n --adp-overlay-transition-duration: 0.3s;\n --adp-overlay-transition-ease: ease-out;\n --adp-overlay-z-index: 99;\n}\n\n.air-datepicker {\n background: var(--adp-background-color);\n border: 1px solid var(--adp-border-color);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border-radius: var(--adp-border-radius);\n box-sizing: content-box;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: repeat(4, max-content);\n grid-template-areas: var(--adp-grid-areas);\n font-family: var(--adp-font-family), sans-serif;\n font-size: var(--adp-font-size);\n color: var(--adp-color);\n width: var(--adp-width);\n position: absolute;\n transition:\n opacity var(--adp-transition-duration) var(--adp-transition-ease),\n transform var(--adp-transition-duration) var(--adp-transition-ease);\n z-index: var(--adp-z-index);\n}\n\n.air-datepicker:not(.-custom-position-) {\n opacity: 0;\n}\n\n.air-datepicker.-from-top- {\n transform: translateY(calc(var(--adp-transition-offset) * -1));\n}\n\n.air-datepicker.-from-right- {\n transform: translateX(var(--adp-transition-offset));\n}\n\n.air-datepicker.-from-bottom- {\n transform: translateY(var(--adp-transition-offset));\n}\n\n.air-datepicker.-from-left- {\n transform: translateX(calc(var(--adp-transition-offset) * -1));\n}\n\n.air-datepicker.-active-:not(.-custom-position-) {\n transform: translate(0, 0);\n opacity: 1;\n}\n\n.air-datepicker.-active-.-custom-position- {\n transition: none;\n}\n\n.air-datepicker.-inline- {\n border-color: var(--adp-border-color-inline);\n box-shadow: none;\n position: static;\n left: auto;\n right: auto;\n opacity: 1;\n transform: none;\n}\n\n.air-datepicker.-inline- .air-datepicker--pointer {\n display: none;\n}\n\n.air-datepicker.-is-mobile- {\n --adp-font-size: var(--adp-mobile-font-size);\n --adp-day-cell-height: var(--adp-mobile-day-cell-height);\n --adp-month-cell-height: var(--adp-mobile-month-cell-height);\n --adp-year-cell-height: var(--adp-mobile-year-cell-height);\n --adp-nav-height: var(--adp-mobile-nav-height);\n --adp-nav-action-size: var(--adp-mobile-nav-height);\n position: fixed;\n width: var(--adp-mobile-width);\n border: none;\n}\n\n.air-datepicker.-is-mobile- * {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.air-datepicker.-is-mobile- .air-datepicker--pointer {\n display: none;\n}\n\n.air-datepicker.-is-mobile-:not(.-custom-position-) {\n transform: translate(-50%, calc(-50% + var(--adp-transition-offset)));\n}\n\n.air-datepicker.-is-mobile-.-active-:not(.-custom-position-) {\n transform: translate(-50%, -50%);\n}\n\n.air-datepicker.-custom-position- {\n transition: none;\n}\n\n.air-datepicker-global-container {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.air-datepicker--pointer {\n --pointer-half-size: calc(var(--adp-pointer-size) / 2);\n position: absolute;\n width: var(--adp-pointer-size);\n height: var(--adp-pointer-size);\n z-index: -1;\n}\n\n.air-datepicker--pointer:after {\n content: '';\n position: absolute;\n background: #fff;\n border-top: 1px solid var(--adp-border-color-inline);\n border-right: 1px solid var(--adp-border-color-inline);\n border-top-right-radius: var(--adp-poiner-border-radius);\n width: var(--adp-pointer-size);\n height: var(--adp-pointer-size);\n box-sizing: border-box;\n}\n\n.-top-left- .air-datepicker--pointer,\n.-top-center- .air-datepicker--pointer,\n.-top-right- .air-datepicker--pointer,\n[data-popper-placement^='top'] .air-datepicker--pointer {\n top: calc(100% - var(--pointer-half-size) + 1px);\n}\n\n.-top-left- .air-datepicker--pointer:after,\n.-top-center- .air-datepicker--pointer:after,\n.-top-right- .air-datepicker--pointer:after,\n[data-popper-placement^='top'] .air-datepicker--pointer:after {\n transform: rotate(135deg);\n}\n\n.-right-top- .air-datepicker--pointer,\n.-right-center- .air-datepicker--pointer,\n.-right-bottom- .air-datepicker--pointer,\n[data-popper-placement^='right'] .air-datepicker--pointer {\n right: calc(100% - var(--pointer-half-size) + 1px);\n}\n\n.-right-top- .air-datepicker--pointer:after,\n.-right-center- .air-datepicker--pointer:after,\n.-right-bottom- .air-datepicker--pointer:after,\n[data-popper-placement^='right'] .air-datepicker--pointer:after {\n transform: rotate(225deg);\n}\n\n.-bottom-left- .air-datepicker--pointer,\n.-bottom-center- .air-datepicker--pointer,\n.-bottom-right- .air-datepicker--pointer,\n[data-popper-placement^='bottom'] .air-datepicker--pointer {\n bottom: calc(100% - var(--pointer-half-size) + 1px);\n}\n\n.-bottom-left- .air-datepicker--pointer:after,\n.-bottom-center- .air-datepicker--pointer:after,\n.-bottom-right- .air-datepicker--pointer:after,\n[data-popper-placement^='bottom'] .air-datepicker--pointer:after {\n transform: rotate(315deg);\n}\n\n.-left-top- .air-datepicker--pointer,\n.-left-center- .air-datepicker--pointer,\n.-left-bottom- .air-datepicker--pointer,\n[data-popper-placement^='left'] .air-datepicker--pointer {\n left: calc(100% - var(--pointer-half-size) + 1px);\n}\n\n.-left-top- .air-datepicker--pointer:after,\n.-left-center- .air-datepicker--pointer:after,\n.-left-bottom- .air-datepicker--pointer:after,\n[data-popper-placement^='left'] .air-datepicker--pointer:after {\n transform: rotate(45deg);\n}\n\n.-top-left- .air-datepicker--pointer,\n.-bottom-left- .air-datepicker--pointer {\n left: var(--adp-pointer-offset);\n}\n\n.-top-right- .air-datepicker--pointer,\n.-bottom-right- .air-datepicker--pointer {\n right: var(--adp-pointer-offset);\n}\n\n.-top-center- .air-datepicker--pointer,\n.-bottom-center- .air-datepicker--pointer {\n left: calc(50% - var(--adp-pointer-size) / 2);\n}\n\n.-left-top- .air-datepicker--pointer,\n.-right-top- .air-datepicker--pointer {\n top: var(--adp-pointer-offset);\n}\n\n.-left-bottom- .air-datepicker--pointer,\n.-right-bottom- .air-datepicker--pointer {\n bottom: var(--adp-pointer-offset);\n}\n\n.-left-center- .air-datepicker--pointer,\n.-right-center- .air-datepicker--pointer {\n top: calc(50% - var(--adp-pointer-size) / 2);\n}\n\n.air-datepicker--navigation {\n grid-area: nav;\n}\n\n.air-datepicker--content {\n box-sizing: content-box;\n padding: var(--adp-padding);\n grid-area: body;\n}\n\n.-only-timepicker- .air-datepicker--content {\n display: none;\n}\n\n.air-datepicker--time {\n grid-area: timepicker;\n}\n\n.air-datepicker--buttons {\n grid-area: buttons;\n}\n\n.air-datepicker--buttons,\n.air-datepicker--time {\n padding: var(--adp-padding);\n border-top: 1px solid var(--adp-border-color-inner);\n}\n\n.air-datepicker-overlay {\n position: fixed;\n background: var(--adp-overlay-background-color);\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n opacity: 0;\n transition:\n opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),\n left 0s,\n height 0s,\n width 0s;\n transition-delay: 0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);\n z-index: var(--adp-overlay-z-index);\n}\n\n.air-datepicker-overlay.-active- {\n opacity: 1;\n width: 100%;\n height: 100%;\n transition:\n opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),\n height 0s,\n width 0s;\n}\n\n@keyframes adp-spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import {format} from 'date-fns';\n// import {getRGBA} from '@verdocs/js-sdk';\nimport interact from 'interactjs';\nimport {ResizeEvent} from '@interactjs/actions/resize/plugin';\nimport AirDatepicker from 'air-datepicker';\nimport localeEn from 'air-datepicker/locale/en';\nimport {type ITemplate, type ITemplateField, updateField, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Fragment, State, Listen} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {FORMAT_DATE} from '../../../utils/Types';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a date field. When tapped or clicked, the input element will display a date picker component.\n */\n@Component({\n tag: 'verdocs-field-date',\n styleUrl: 'verdocs-field-date.scss',\n shadow: false,\n})\nexport class VerdocsFieldDate {\n @Element() el: HTMLElement;\n private inputEl: HTMLInputElement;\n\n /**\n * Fields may be attached to templates or envelopes, but only template fields may be edited.\n */\n @Prop({reflect: true}) source: 'template' | 'envelope' = 'template';\n\n /**\n * The source template or envelope ID the field is found in.\n */\n @Prop({reflect: true}) sourceid: string = '';\n\n /**\n * The name of the field to display.\n */\n @Prop({reflect: true}) fieldname: string = '';\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop({reflect: true}) disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop({reflect: true}) editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop({reflect: true}) moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop({reflect: true}) done?: boolean = false;\n\n /**\n * If set, the field will be be scaled horizontally by this factor.\n */\n @Prop({reflect: true}) xscale?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop({reflect: true}) yscale?: number = 1;\n\n /**\n * The page the field is on\n */\n @Prop({reflect: true}) pagenumber?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop() field?: ITemplateField;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n /**\n * Event fired when the field's settings are changed.\n */\n @Event({composed: true}) settingsChanged: EventEmitter<{fieldName: string; field: ITemplateField}>;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() containerId = `verdocs-date-picker-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() showingProperties?: boolean = false;\n\n @State() focused = false;\n\n @Listen('blur', {capture: true})\n handleBlur() {\n this.focused = false;\n }\n\n @Method()\n async focusField() {\n this.inputEl.focus();\n this.focused = true;\n }\n\n picker: AirDatepicker<HTMLElement> | null = null;\n\n componentDidLoad() {\n const {source, sourceid, fieldname} = this;\n const {field} = Store.getField(source, sourceid, fieldname, this.field);\n const {readonly = false} = field || {};\n\n if (!readonly) {\n this.picker = new AirDatepicker<HTMLElement>(`#${this.containerId}`, {\n locale: localeEn,\n isMobile: true,\n autoClose: true,\n onShow: () => (this.focused = true),\n onHide: () => (this.focused = false),\n onSelect: ({date, formattedDate}) => {\n const event = new CustomEvent('fieldChange', {detail: {date, formattedDate}});\n this.el.dispatchEvent(event);\n },\n });\n }\n }\n\n componentDidRender() {\n interact.dynamicDrop(true);\n\n if (this.editable) {\n interact(this.el).resizable({\n edges: {\n top: '.edge-top',\n left: '.edge-left',\n bottom: '.edge-bottom',\n right: '.edge-right',\n },\n modifiers: [\n interact.modifiers.restrictSize({\n min: {width: 50, height: 12},\n }),\n ],\n listeners: {\n start: this.handleResizeStart.bind(this),\n move: this.handleResize.bind(this),\n end: this.handleResizeEnd.bind(this),\n },\n });\n }\n }\n\n handleResizeStart(e: ResizeEvent) {\n e.preventDefault();\n e.stopPropagation();\n e.target.dataset.originalBottom = e.target.style.bottom;\n }\n\n handleResize(e: any) {\n let {width, height} = e.rect;\n\n const dX = e.deltaRect.left;\n const dY = e.deltaRect.bottom;\n const currentLeft = parseFloat(e.target.style.left);\n const currentBottom = parseFloat(e.target.style.bottom);\n\n width /= this.xscale;\n height /= this.yscale;\n\n Object.assign(e.target.style, {\n width: `${width}px`,\n height: `${height}px`,\n left: `${currentLeft + dX}px`,\n bottom: `${currentBottom - dY}px`,\n });\n }\n\n async handleResizeEnd(e: any) {\n const {sourceid, fieldname} = this;\n\n const width = Math.round(parseFloat(e.target.style.width));\n let height = Math.round(parseFloat(e.target.style.height));\n if (height < 12) {\n height = 12;\n }\n\n const newBottom = parseFloat(e.target.style.bottom);\n const originalBottom = parseFloat(e.target.dataset.originalBottom);\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const oldField = template.fields.find(f => f.name === fieldname);\n const y = newBottom !== originalBottom ? newBottom / this.yscale : oldField?.y;\n\n updateField(VerdocsEndpoint.getDefault(), sourceid, fieldname, {width, height, y})\n .then(async updatedField => {\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const newTemplate = JSON.parse(JSON.stringify(template)) as ITemplate;\n const fieldIndex = newTemplate.fields.findIndex(field => field.name === fieldname);\n if (fieldIndex > -1) {\n newTemplate.fields[fieldIndex] = updatedField;\n }\n Store.updateTemplate(this.sourceid, newTemplate);\n\n this.settingsChanged?.emit({fieldName: fieldname, field: updatedField});\n Object.assign(e.target.dataset, {x: 0, y: 0, h: 0});\n })\n .catch(e => console.log('Field update failed', e));\n }\n\n @Method()\n async showSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.showPanel) {\n settingsPanel.showPanel();\n }\n }\n\n @Method()\n async hideSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.hidePanel) {\n settingsPanel.hidePanel();\n }\n }\n\n // NOTE: We don't use a \"date\" field here because browsers vary widely in their formatting of it.\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n const {required = false, placeholder = 'Date...', value = '', label = '', readonly = false, height = 20, width = 74} = field || {};\n const signerClass = `signer-${(index % 10) + 1}`;\n const small = height < 20 || width < 74;\n\n const formattedValue = value ? format(new Date(value), FORMAT_DATE) : '';\n\n if (this.done) {\n return <Host class={{done}}>{formattedValue}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused, small, [signerClass]: true}}>\n {editable && <div class=\"edge-top\" />}\n {editable && <div class=\"edge-right\" />}\n {editable && <div class=\"edge-left\" />}\n {editable && <div class=\"edge-bottom\" />}\n\n {label && <label>{label}</label>}\n\n <input\n name={fieldname}\n class=\"input-el\"\n type=\"text\"\n value={formattedValue}\n id={this.containerId}\n placeholder={placeholder}\n disabled={readonly || disabled}\n ref={el => (this.inputEl = el)}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n />\n\n {editable && (\n <Fragment>\n <div\n id={`verdocs-settings-panel-trigger-${fieldname}`}\n style={{transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})`}}\n class=\"settings-icon\"\n innerHTML={SettingsIcon}\n onClick={(e: any) => {\n e.stopPropagation();\n this.showingProperties = !this.showingProperties;\n }}\n />\n\n {this.showingProperties && (\n <verdocs-portal anchor={`verdocs-settings-panel-trigger-${field.name}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => (this.showingProperties = false)}\n onDelete={() => {\n this.deleted?.emit({fieldName: fieldname});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={'Date fields allow the user to select a date.'}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -8,7 +8,7 @@ import { d as defineCustomElement$l } from './p-UM5wCODg.js';
8
8
  import { d as defineCustomElement$k } from './p-CO3KQG1e.js';
9
9
  import { d as defineCustomElement$j } from './p-C0qRY7Gm.js';
10
10
  import { d as defineCustomElement$i } from './p-1zwMmY7V.js';
11
- import { d as defineCustomElement$h } from './p-Dh9AjNdu.js';
11
+ import { d as defineCustomElement$h } from './p-Ck3ul0eW.js';
12
12
  import { d as defineCustomElement$g } from './p-CufGuqmE.js';
13
13
  import { d as defineCustomElement$f } from './p-CpcMSzRA.js';
14
14
  import { d as defineCustomElement$e } from './p-CwkHIsJM.js';
@@ -383,6 +383,6 @@ function defineCustomElement() {
383
383
  }
384
384
 
385
385
  export { VerdocsTemplateDocumentPage as V, defineCustomElement as d };
386
- //# sourceMappingURL=p-CY-c2d8q.js.map
386
+ //# sourceMappingURL=p-vFfCwagt.js.map
387
387
 
388
- //# sourceMappingURL=p-CY-c2d8q.js.map
388
+ //# sourceMappingURL=p-vFfCwagt.js.map
@@ -1 +1 @@
1
- {"file":"p-CY-c2d8q.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,wjBAAwjB;;MCmBllB,2BAA2B,iBAAAA,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CAAM,KAAI;;;;;;;;oBAQjB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY;oBACzC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa;oBAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;oBACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;AACzD,oBAAA,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;AAC/D,iBAAC,EAAA,CACD,KAEF,CAAA,CAAA,KAAA,EAAA,IAAA,CAAW,CACZ;SAAA,CACF,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop({reflect: true}) templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop({reflect: true}) documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop({reflect: true}) pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-vFfCwagt.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,wjBAAwjB;;MCmBllB,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AALxC,IAAA,WAAA,CAAA,YAA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AC,YAAY;oBACzC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa;oBAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;oBACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;AACzD,oBAAA,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;AAC/D,iBAAC,EAAA,CACD,KAEF,CAAA,CAAA,KAAA,EAAA,IAAA,CAAW,CACZ;SAAA,CACF,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop({reflect: true}) templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop({reflect: true}) documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop({reflect: true}) pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -10,7 +10,7 @@ import { d as defineCustomElement$C } from './p-C35_YsQk.js';
10
10
  import { d as defineCustomElement$B } from './p-CO3KQG1e.js';
11
11
  import { d as defineCustomElement$A } from './p-C0qRY7Gm.js';
12
12
  import { d as defineCustomElement$z } from './p-1zwMmY7V.js';
13
- import { d as defineCustomElement$y } from './p-Dh9AjNdu.js';
13
+ import { d as defineCustomElement$y } from './p-Ck3ul0eW.js';
14
14
  import { d as defineCustomElement$x } from './p-CufGuqmE.js';
15
15
  import { d as defineCustomElement$w } from './p-CpcMSzRA.js';
16
16
  import { d as defineCustomElement$v } from './p-CwkHIsJM.js';
@@ -25,7 +25,7 @@ import { d as defineCustomElement$n } from './p-Bt8fO1FH.js';
25
25
  import { d as defineCustomElement$m } from './p-C4okdDwv.js';
26
26
  import { d as defineCustomElement$l } from './p-Sywj-5pY.js';
27
27
  import { d as defineCustomElement$k } from './p-D_KhbsnA.js';
28
- import { d as defineCustomElement$j } from './p-BcGvNPBh.js';
28
+ import { d as defineCustomElement$j } from './p-B_TQ4EUa.js';
29
29
  import { d as defineCustomElement$i } from './p-DnAwXP9h.js';
30
30
  import { d as defineCustomElement$h } from './p-Cd0WoTsM.js';
31
31
  import { d as defineCustomElement$g } from './p-BttIJYW3.js';
@@ -34,9 +34,9 @@ import { d as defineCustomElement$e } from './p-ZEl4NzX5.js';
34
34
  import { d as defineCustomElement$d } from './p-IUBQly7U.js';
35
35
  import { d as defineCustomElement$c } from './p-dJ-8COo-.js';
36
36
  import { d as defineCustomElement$b } from './p-CMjSbrE6.js';
37
- import { d as defineCustomElement$a } from './p-CY-c2d8q.js';
37
+ import { d as defineCustomElement$a } from './p-vFfCwagt.js';
38
38
  import { d as defineCustomElement$9 } from './p-CG5hnDaJ.js';
39
- import { d as defineCustomElement$8 } from './p-BWvUv89M.js';
39
+ import { d as defineCustomElement$8 } from './p-BZ8310aE.js';
40
40
  import { d as defineCustomElement$7 } from './p-2-71mUOp.js';
41
41
  import { d as defineCustomElement$6 } from './p-D-ZRWW6J.js';
42
42
  import { d as defineCustomElement$5 } from './p-BkdE4JBa.js';
@@ -1,4 +1,4 @@
1
- import { V as VerdocsFieldDate$1, d as defineCustomElement$1 } from './p-Dh9AjNdu.js';
1
+ import { V as VerdocsFieldDate$1, d as defineCustomElement$1 } from './p-Ck3ul0eW.js';
2
2
 
3
3
  const VerdocsFieldDate = VerdocsFieldDate$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { V as VerdocsPreview$1, d as defineCustomElement$1 } from './p-BcGvNPBh.js';
1
+ import { V as VerdocsPreview$1, d as defineCustomElement$1 } from './p-B_TQ4EUa.js';
2
2
 
3
3
  const VerdocsPreview = VerdocsPreview$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { V as VerdocsTemplateDocumentPage$1, d as defineCustomElement$1 } from './p-CY-c2d8q.js';
1
+ import { V as VerdocsTemplateDocumentPage$1, d as defineCustomElement$1 } from './p-vFfCwagt.js';
2
2
 
3
3
  const VerdocsTemplateDocumentPage = VerdocsTemplateDocumentPage$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { V as VerdocsTemplateFields$1, d as defineCustomElement$1 } from './p-BWvUv89M.js';
1
+ import { V as VerdocsTemplateFields$1, d as defineCustomElement$1 } from './p-BZ8310aE.js';
2
2
 
3
3
  const VerdocsTemplateFields = VerdocsTemplateFields$1;
4
4
  const defineCustomElement = defineCustomElement$1;