@verdocs/web-sdk 5.0.67 → 5.0.68
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/dist/cjs/verdocs-contact-picker.verdocs-multiselect.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +13 -8
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-organization-card.verdocs-portal.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-organization-card_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +7 -7
- package/dist/cjs/verdocs-templates-list.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-templates-list.entry.cjs.js.map +1 -1
- package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.css +23 -0
- package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.js +1 -1
- package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.js.map +1 -1
- package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +5 -1
- package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +11 -6
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +17 -10
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js.map +1 -1
- package/dist/components/{p-ChSdhofj.js → p-B8oLX6-0.js} +3 -3
- package/dist/components/{p-ChSdhofj.js.map → p-B8oLX6-0.js.map} +1 -1
- package/dist/components/{p-FMmdRAwT.js → p-BC9E1lIr.js} +14 -14
- package/dist/components/{p-FMmdRAwT.js.map → p-BC9E1lIr.js.map} +1 -1
- package/dist/components/{p-DcGAyXll.js → p-BPaxQrtW.js} +7 -3
- package/dist/components/p-BPaxQrtW.js.map +1 -0
- package/dist/components/{p-BF25av2F.js → p-BSopvRgr.js} +3 -3
- package/dist/components/{p-BF25av2F.js.map → p-BSopvRgr.js.map} +1 -1
- package/dist/components/{p-D-eXKBQK.js → p-BVwBJvZX.js} +3 -3
- package/dist/components/{p-D-eXKBQK.js.map → p-BVwBJvZX.js.map} +1 -1
- package/dist/components/{p-a2mcI8jM.js → p-BXnjauAt.js} +3 -3
- package/dist/components/{p-a2mcI8jM.js.map → p-BXnjauAt.js.map} +1 -1
- package/dist/components/{p-C_Iua_8I.js → p-Bd_tIPj6.js} +3 -3
- package/dist/components/{p-C_Iua_8I.js.map → p-Bd_tIPj6.js.map} +1 -1
- package/dist/components/{p-BiJg4trF.js → p-Blv4Px1q.js} +3 -3
- package/dist/components/{p-BiJg4trF.js.map → p-Blv4Px1q.js.map} +1 -1
- package/dist/components/{p-BK1G2TCe.js → p-BqQxZHHz.js} +3 -3
- package/dist/components/{p-BK1G2TCe.js.map → p-BqQxZHHz.js.map} +1 -1
- package/dist/components/{p-BERtpjuC.js → p-C-l2dmJo.js} +3 -3
- package/dist/components/{p-BERtpjuC.js.map → p-C-l2dmJo.js.map} +1 -1
- package/dist/components/{p-MZFye18Y.js → p-Ch6Kdfra.js} +3 -3
- package/dist/components/{p-MZFye18Y.js.map → p-Ch6Kdfra.js.map} +1 -1
- package/dist/components/{p-DL0ugSd9.js → p-CkX7jHYc.js} +14 -14
- package/dist/components/{p-DL0ugSd9.js.map → p-CkX7jHYc.js.map} +1 -1
- package/dist/components/{p-D6z0a96H.js → p-CsnQa5sQ.js} +4 -4
- package/dist/components/{p-D6z0a96H.js.map → p-CsnQa5sQ.js.map} +1 -1
- package/dist/components/{p-BXN75-nb.js → p-DC--nyvW.js} +5 -5
- package/dist/components/{p-BXN75-nb.js.map → p-DC--nyvW.js.map} +1 -1
- package/dist/components/{p-mxrRjSEM.js → p-DhrRkOUi.js} +3 -3
- package/dist/components/{p-mxrRjSEM.js.map → p-DhrRkOUi.js.map} +1 -1
- package/dist/components/{p-BRr3-bHO.js → p-DpbDLSke.js} +6 -12
- package/dist/components/p-DpbDLSke.js.map +1 -0
- package/dist/components/{p-Oos-rvdo.js → p-cJMs8iXW.js} +15 -10
- package/dist/components/p-cJMs8iXW.js.map +1 -0
- package/dist/components/{p-C7Cguo-b.js → p-eXVwQFzY.js} +3 -3
- package/dist/components/{p-C7Cguo-b.js.map → p-eXVwQFzY.js.map} +1 -1
- package/dist/components/{p-D3eafwac.js → p-r_GHGV6q.js} +13 -13
- package/dist/components/{p-D3eafwac.js.map → p-r_GHGV6q.js.map} +1 -1
- package/dist/components/verdocs-build.js +17 -17
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-dropdown.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +2 -2
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-payment.js +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-multiselect.js +1 -1
- package/dist/components/verdocs-organization-card.js +1 -1
- package/dist/components/verdocs-portal.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +3 -3
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +9 -9
- package/dist/components/verdocs-templates-list.js.map +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/esm/verdocs-contact-picker.verdocs-multiselect.entry.js.map +1 -1
- package/dist/esm/verdocs-contact-picker_2.entry.js +13 -8
- package/dist/esm/verdocs-contact-picker_2.entry.js.map +1 -1
- package/dist/esm/verdocs-organization-card.verdocs-portal.entry.js.map +1 -1
- package/dist/esm/verdocs-organization-card_2.entry.js +5 -1
- package/dist/esm/verdocs-organization-card_2.entry.js.map +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +7 -7
- package/dist/esm/verdocs-templates-list.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.verdocs-multiselect.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-organization-card.verdocs-portal.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card_2.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js.map +1 -1
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +10 -3
- package/dist/types/components.d.ts +32 -4
- package/dist/verdocs-web-sdk/{p-15fdb9df.system.entry.js → p-22539b25.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-22539b25.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-80e61388.system.entry.js → p-289ad8d2.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-289ad8d2.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-4437b439.entry.js → p-5badc484.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-5badc484.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-e2985bcb.entry.js → p-720ceced.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-720ceced.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6743a4ec.system.entry.js → p-795cb651.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-795cb651.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-9b1b273c.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-9b1b273c.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-C7nljRlm.system.js.map → p-BlaEjWtc.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-CNuYIT4Z.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CwXSduhy.system.js +1 -1
- package/dist/verdocs-web-sdk/p-D3kzqvo2.system.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-contact-picker.verdocs-multiselect.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-organization-card.verdocs-portal.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-templates-list.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-BRr3-bHO.js.map +0 -1
- package/dist/components/p-DcGAyXll.js.map +0 -1
- package/dist/components/p-Oos-rvdo.js.map +0 -1
- package/dist/verdocs-web-sdk/p-15fdb9df.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-36e094d6.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-36e094d6.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4437b439.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6743a4ec.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-80e61388.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BIoNmybA.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CMYmkzNA.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e2985bcb.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"verdocs-organization-card.verdocs-portal.entry.js","sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: IOrganization;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"names":["format"],"mappings":";;;AAAA,MAAM,0BAA0B,GAAG,ghEAA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oBAAoB,GAAA;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;;IAGzD,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,gBAAgB,EAAA,EAC1D,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;"}
|
1
|
+
{"version":3,"file":"verdocs-organization-card.verdocs-portal.entry.js","sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: IOrganization;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n\n // Temporary hack to dismiss portals-in-portals, which right now is pretty much just\n // multiselect.\n document.querySelectorAll('.verdocs-multiselect-dropdown').forEach(el => el.remove());\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n this.portal.className = 'verdocs-portal-wrapper';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"names":["format"],"mappings":";;;AAAA,MAAM,0BAA0B,GAAG,ghEAAghE;;ACInjE;AACA;AAEA,MAAM,YAAY,GAChB,gWAAgW;MAarV,uBAAuB,GAAA,MAAA;AAJpC,IAAA,WAAA,CAAA,OAAA,EAAA;;AAWE,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AA0DzB;IAvDC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;IAIrB,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;IAGtB,MAAM,GAAA;;AACJ,QAAA,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC;QACrF,MAAM,YAAY,GAAG,YAAY;QACjC,MAAM,QAAQ,GAAG,CAAoB,iBAAA,EAAA,IAAI,CAAC,YAAY,CAAC,EAAE,CAAA,CAAE;QAE3D,QACE,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAA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host,c as createEvent}from"./index-CF7i8guW.js";import{d as dateFnsExports}from"./index-dzBXqXlK.js";var verdocsOrganizationCardCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-organization-card{font-family:"Inter", "Barlow", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}.verdocs-org-card-popup{font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border:1px solid #cccccc}.verdocs-org-card-popup .popup-header-with-logo{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-header-with-logo img{max-width:300px;max-height:50px}.verdocs-org-card-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.verdocs-org-card-popup .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}.verdocs-org-card-popup .field{margin:0 0 20px 0}.verdocs-org-card-popup .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}.verdocs-org-card-popup .field a{color:#654dcb;text-transform:uppercase}';var BusinessIcon='<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';var VerdocsOrganizationCard=function(){function o(o){registerInstance(this,o);this.hovered=false}o.prototype.onMouseOver=function(){this.hovered=true};o.prototype.onMouseOut=function(){this.hovered=false};o.prototype.render=function(){var o,r,e,a,i,s;console.log("Rendering org card",this.organization.thumbnail_url,this.organization);var c=BusinessIcon;var
|
1
|
+
import{r as registerInstance,h,H as Host,c as createEvent}from"./index-CF7i8guW.js";import{d as dateFnsExports}from"./index-dzBXqXlK.js";var verdocsOrganizationCardCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-organization-card{font-family:"Inter", "Barlow", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}.verdocs-org-card-popup{font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border:1px solid #cccccc}.verdocs-org-card-popup .popup-header-with-logo{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-header-with-logo img{max-width:300px;max-height:50px}.verdocs-org-card-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.verdocs-org-card-popup .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}.verdocs-org-card-popup .field{margin:0 0 20px 0}.verdocs-org-card-popup .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}.verdocs-org-card-popup .field a{color:#654dcb;text-transform:uppercase}';var BusinessIcon='<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';var VerdocsOrganizationCard=function(){function o(o){registerInstance(this,o);this.hovered=false}o.prototype.onMouseOver=function(){this.hovered=true};o.prototype.onMouseOut=function(){this.hovered=false};o.prototype.render=function(){var o,r,e,a,i,s;console.log("Rendering org card",this.organization.thumbnail_url,this.organization);var c=BusinessIcon;var t="verdocs-org-card-".concat(this.organization.id);return h(Host,{key:"97272d216497af502a3cb2d6e0952bda802249e1",id:t},this.organization.thumbnail_url?h("img",{class:"icon",src:this.organization.thumbnail_url,alt:"Logo"}):h("span",{class:"icon",innerHTML:c}),h("span",{key:"e5f71759e662b6a1ad04ee9acf2710b9d7904a22",class:"content"},(o=this.organization)===null||o===void 0?void 0:o.name),h("verdocs-portal",{key:"0496b9a82bca4289e6fb226e24c5fed23c4e8fb3",anchor:t},h("div",{key:"991b528de45afb90d6c54f4ce6d6c415e9e2bc81",class:"verdocs-org-card-popup",style:{display:this.hovered?"block":"none"}},this.organization.full_logo_url?h("div",{class:"popup-header-with-logo"},h("img",{src:this.organization.full_logo_url,alt:"Logo"}),h("div",{class:"title"},(r=this.organization)===null||r===void 0?void 0:r.name)):h("div",{class:"popup-header"},h("span",{class:"status"},h("span",{class:"icon",innerHTML:c})),h("span",{class:"title"},(e=this.organization)===null||e===void 0?void 0:e.name)),h("div",{key:"54c746473d12e7428b2982c0f627d2d5ac078875",class:"popup-body"},h("div",{key:"a291de045b2cd5f6431e795b3b0da2a2187ec019",class:"field"},h("strong",{key:"86cfad50f43e266fcbca1934458de84c6af791bf"},"Joined"),dateFnsExports.format(new Date(((a=this.organization)===null||a===void 0?void 0:a.created_at)||undefined),"LLL d, Y")),this.organization.url&&h("div",{key:"743cc0af65238631e94353b1c0a09718d556a3e5",class:"field"},h("strong",{key:"55b51d9b2d4256ff4462ba28940331e3aff22e95"},"Website"),h("a",{key:"d6f11530ba3adc9c897fd2f26f47de8b9d17b807",href:(i=this.organization)===null||i===void 0?void 0:i.url,target:"_blank",rel:"nofollow"},(s=this.organization)===null||s===void 0?void 0:s.url))))))};return o}();VerdocsOrganizationCard.style=verdocsOrganizationCardCss;var verdocsPortalCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";var Z_INDEX="10001";var VerdocsPortal=function(){function o(o){registerInstance(this,o);this.clickAway=createEvent(this,"clickAway");this.moved=false;this.voffset=0}o.prototype.handleScroll=function(){this.calculatePosition()};o.prototype.handleResize=function(){this.calculatePosition()};o.prototype.handleClick=function(o){var r;var e=o.target.closest(".verdocs-portal");if(!this.element.contains(o.target)&&!e){(r=this.clickAway)===null||r===void 0?void 0:r.emit()}document.querySelectorAll(".verdocs-multiselect-dropdown").forEach((function(o){return o.remove()}))};o.prototype.calculateLeft=function(){var o;var r=document.getElementById(this.anchor);if(!r)return 0;var e=r.getBoundingClientRect();var a=document.documentElement.clientWidth+document.documentElement.scrollLeft;var i=Math.max(e.left,0);var s=((o=this.element)===null||o===void 0?void 0:o.offsetWidth)||400;var c=i+s>a;return c?a-s-20:i};o.prototype.calculateTop=function(){var o;var r=document.getElementById(this.anchor);if(!r)return 0;var e=r.getBoundingClientRect();var a=document.documentElement.clientHeight+document.documentElement.scrollTop;var i=e.bottom+this.voffset+document.documentElement.scrollTop;var s=((o=this.element)===null||o===void 0?void 0:o.offsetHeight)||300;var c=i+s>a;return c?i-s-e.height:i};o.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};o.prototype.componentWillLoad=function(){var o;var r="".concat(this.anchor,"-portal");(o=document.getElementById(r))===null||o===void 0?void 0:o.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",r);this.portal.style.zIndex=Z_INDEX;this.portal.style.position="absolute";this.portal.className="verdocs-portal-wrapper";document.body.append(this.portal)};o.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};o.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};o.prototype.render=function(){var o=this;return h(Host,{key:"6496c55ff467085e8d1d660f749abb2e70eb8c95",ref:function(r){return o.element=r},class:"verdocs-portal"},h("slot",{key:"731cefa0a79a520279e255455a95e22d1255f424"}))};return o}();VerdocsPortal.style=verdocsPortalCss;export{VerdocsOrganizationCard as verdocs_organization_card,VerdocsPortal as verdocs_portal};
|
2
2
|
//# sourceMappingURL=verdocs-organization-card_2.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["verdocsOrganizationCardCss","BusinessIcon","VerdocsOrganizationCard","hostRef","this","hovered","prototype","onMouseOver","onMouseOut","render","console","log","organization","thumbnail_url","fallbackIcon","portalId","concat","id","h","Host","key","class","src","alt","innerHTML","_a","name","anchor","style","display","full_logo_url","_b","_c","format","Date","_d","created_at","undefined","url","href","_e","target","rel","_f","verdocsPortalCss","Z_INDEX","VerdocsPortal","moved","voffset","handleScroll","calculatePosition","handleResize","handleClick","e","closest","element","contains","clickAway","emit","calculateLeft","anchorEl","document","getElementById","anchorRect","getBoundingClientRect","rightOfViewportWithScroll","documentElement","clientWidth","scrollLeft","leftOfPopup","Math","max","left","popupWidth","offsetWidth","offRightEdge","calculateTop","bottomOfViewportWithScroll","clientHeight","scrollTop","topOfPopup","bottom","popupHeight","offsetHeight","offBottomEdge","height","portal","top","componentWillLoad","remove","createElement","setAttribute","zIndex","position","body","append","componentDidLoad","appendChild","disconnectedCallback","_this","ref","el"],"sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: IOrganization;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"yIAAA,IAAMA,2BAA6B,ygECOnC,IAAMC,aACJ,iW,IAaWC,wBAAuB,WAJpC,SAAAA,EAAAC,G,yBAWEC,KAAOC,QAAY,KA0DpB,CAvDCH,EAAAI,UAAAC,YAAA,WACEH,KAAKC,QAAU,I,EAIjBH,EAAAI,UAAAE,WAAA,WACEJ,KAAKC,QAAU,K,EAGjBH,EAAAI,UAAAG,OAAA,W,gBACEC,QAAQC,IAAI,qBAAsBP,KAAKQ,aAAaC,cAAeT,KAAKQ,cACxE,IAAME,EAAeb,aACrB,IAAMc,EAAW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G,IAAczD,EAAArB,KAAKmD,WAAS,MAAA9B,SAAA,SAAAA,EAAA0D,eAAgB,IAClD,IAAMC,EAAgBJ,EAAaE,EAAcL,EAEjD,OAAOO,EAAgBJ,EAAaE,EAAcnB,EAAWsB,OAASL,C,EAGhElC,EAAAxC,UAAA4C,kBAAA,WACN9C,KAAKkF,OAAO1D,MAAM2D,IAAM,GAAAvE,OAAGZ,KAAKwE,eAAc,MAC9CxE,KAAKkF,OAAO1D,MAAM4C,KAAO,GAAAxD,OAAGZ,KAAKuD,gBAAe,K,EAGlDb,EAAAxC,UAAAkF,kBAAA,W,MACE,IAAMvE,EAAK,GAAAD,OAAGZ,KAAKuB,OAAM,YACzBF,EAAAoC,SAASC,eAAe7C,MAAG,MAAAQ,SAAA,SAAAA,EAAEgE,SAE7BrF,KAAKkF,OAASzB,SAAS6B,cAAc,OACrCtF,KAAKkF,OAAOK,aAAa,KAAM1E,GAC/Bb,KAAKkF,OAAO1D,MAAMgE,OAAS/C,QAC3BzC,KAAKkF,OAAO1D,MAAMiE,SAAW,WAC7BhC,SAASiC,KAAKC,OAAO3F,KAAKkF,O,EAG5BxC,EAAAxC,UAAA0F,iBAAA,WACE5F,KAAKkF,OAAOW,YAAY7F,KAAKmD,SAC7BnD,KAAK8C,mB,EAGPJ,EAAAxC,UAAA4F,qBAAA,WACE9F,KAAK2C,MAAQ3C,KAAKkF,OAAOG,SAAYrF,KAAK2C,MAAQ,I,EAGpDD,EAAAxC,UAAAG,OAAA,eAAA0F,EAAA/F,KACE,OACEc,EAACC,KAAI,CAAAC,IAAA,2CAACgF,IAAK,SAAAC,GAAE,OAAKF,EAAK5C,QAAU8C,CAApB,EAAyBhF,MAAM,kBAC1CH,EAAQ,QAAAE,IAAA,6C,WA/FU,G","ignoreList":[]}
|
1
|
+
{"version":3,"names":["verdocsOrganizationCardCss","BusinessIcon","VerdocsOrganizationCard","hostRef","this","hovered","prototype","onMouseOver","onMouseOut","render","console","log","organization","thumbnail_url","fallbackIcon","portalId","concat","id","h","Host","key","class","src","alt","innerHTML","_a","name","anchor","style","display","full_logo_url","_b","_c","format","Date","_d","created_at","undefined","url","href","_e","target","rel","_f","verdocsPortalCss","Z_INDEX","VerdocsPortal","moved","voffset","handleScroll","calculatePosition","handleResize","handleClick","e","closest","element","contains","clickAway","emit","document","querySelectorAll","forEach","el","remove","calculateLeft","anchorEl","getElementById","anchorRect","getBoundingClientRect","rightOfViewportWithScroll","documentElement","clientWidth","scrollLeft","leftOfPopup","Math","max","left","popupWidth","offsetWidth","offRightEdge","calculateTop","bottomOfViewportWithScroll","clientHeight","scrollTop","topOfPopup","bottom","popupHeight","offsetHeight","offBottomEdge","height","portal","top","componentWillLoad","createElement","setAttribute","zIndex","position","className","body","append","componentDidLoad","appendChild","disconnectedCallback","_this","ref"],"sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: IOrganization;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n\n // Temporary hack to dismiss portals-in-portals, which right now is pretty much just\n // multiselect.\n document.querySelectorAll('.verdocs-multiselect-dropdown').forEach(el => el.remove());\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n this.portal.className = 'verdocs-portal-wrapper';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"yIAAA,IAAMA,2BAA6B,ygECOnC,IAAMC,aACJ,iW,IAaWC,wBAAuB,WAJpC,SAAAA,EAAAC,G,yBAWEC,KAAOC,QAAY,KA0DpB,CAvDCH,EAAAI,UAAAC,YAAA,WACEH,KAAKC,QAAU,I,EAIjBH,EAAAI,UAAAE,WAAA,WACEJ,KAAKC,QAAU,K,EAGjBH,EAAAI,UAAAG,OAAA,W,gBACEC,QAAQC,IAAI,qBAAsBP,KAAKQ,aAAaC,cAAeT,KAAKQ,cACxE,IAAME,EAAeb,aACrB,IAAMc,EAAW,oBAAAC,OAAoBZ,KAAKQ,aAAaK,IAEvD,OACEC,EAACC,KAAK,CAAAC,IAAA,2CAAAH,GAAIF,GACPX,KAAKQ,aAAaC,cAAgBK,EAAK,OAAAG,MAAM,OAAOC,IAAKlB,KAAKQ,aAAaC,cAAeU,IAAI,SAAYL,EAAM,QAAAG,MAAM,OAAOG,UAAWV,IAEzII,EAAM,QAAAE,IAA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AAxC,UAAA4C,kBAAA,WACN9C,KAAKsF,OAAO9D,MAAM+D,IAAM,GAAA3E,OAAGZ,KAAK4E,eAAc,MAC9C5E,KAAKsF,OAAO9D,MAAMgD,KAAO,GAAA5D,OAAGZ,KAAK4D,gBAAe,K,EAGlDlB,EAAAxC,UAAAsF,kBAAA,W,MACE,IAAM3E,EAAK,GAAAD,OAAGZ,KAAKuB,OAAM,YACzBF,EAAAkC,SAASO,eAAejD,MAAG,MAAAQ,SAAA,SAAAA,EAAEsC,SAE7B3D,KAAKsF,OAAS/B,SAASkC,cAAc,OACrCzF,KAAKsF,OAAOI,aAAa,KAAM7E,GAC/Bb,KAAKsF,OAAO9D,MAAMmE,OAASlD,QAC3BzC,KAAKsF,OAAO9D,MAAMoE,SAAW,WAC7B5F,KAAKsF,OAAOO,UAAY,yBACxBtC,SAASuC,KAAKC,OAAO/F,KAAKsF,O,EAG5B5C,EAAAxC,UAAA8F,iBAAA,WACEhG,KAAKsF,OAAOW,YAAYjG,KAAKmD,SAC7BnD,KAAK8C,mB,EAGPJ,EAAAxC,UAAAgG,qBAAA,WACElG,KAAK2C,MAAQ3C,KAAKsF,OAAO3B,SAAY3D,KAAK2C,MAAQ,I,EAGpDD,EAAAxC,UAAAG,OAAA,eAAA8F,EAAAnG,KACE,OACEc,EAACC,KAAI,CAAAC,IAAA,2CAACoF,IAAK,SAAA1C,GAAE,OAAKyC,EAAKhD,QAAUO,CAApB,EAAyBzC,MAAM,kBAC1CH,EAAQ,QAAAE,IAAA,6C,WApGU,G","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{c(s.next(e))}catch(e){a(e)}}function l(e){try{c(s["throw"](e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(r,l)}c((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,i,a,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return c([e,t])}}function c(l){if(s)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(n=0)),n)try{if(s=1,i&&(a=l[0]&2?i["return"]:l[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;if(i=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;i=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1];a=l;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(l);break}if(a[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];i=0}finally{s=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CF7i8guW.js";import{d as dateFnsExports}from"./index-dzBXqXlK.js";import{VerdocsEndpoint,getTemplates,deleteTemplate,integerSequence,canPerformTemplateAction}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-C1sRVZWv.js";var verdocsTemplatesListCss='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var GlobeAltIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var LockClosedIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var BuildingOfficeIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var EnvelopeIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var CreatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var LastUsedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var UpdatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var VisibilityFilters=[{value:"private_shared",label:"Personal + Shared"},{value:"private",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var StarredFilters=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var SortOptions=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var VerdocsTemplatesList=function(){function e(e){var t=this;registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.viewTemplate=createEvent(this,"viewTemplate");this.signNow=createEvent(this,"signNow");this.submittedData=createEvent(this,"submittedData");this.editTemplate=createEvent(this,"editTemplate");this.templateDeleted=createEvent(this,"templateDeleted");this.changeSort=createEvent(this,"changeSort");this.changeVisibility=createEvent(this,"changeVisibility");this.changeStarred=createEvent(this,"changeStarred");this.changeName=createEvent(this,"changeName");this.endpoint=VerdocsEndpoint.getDefault();this.visibility="private_shared";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter="";this.handleOptionSelected=function(e,n){var s,i,a,r;if(e==="send"){(s=t.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:t.endpoint,template:n})}else if(e==="signnow"){(i=t.signNow)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,template:n})}else if(e==="submitted"){(a=t.submittedData)===null||a===void 0?void 0:a.emit({endpoint:t.endpoint,template:n})}else if(e==="edit"){(r=t.editTemplate)===null||r===void 0?void 0:r.emit({endpoint:t.endpoint,template:n})}else if(e==="delete"){t.confirmDelete=n}}}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,a;return __generator(this,(function(r){switch(r.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;r.label=1;case 1:r.trys.push([1,3,,4]);s={visibility:this.visibility,page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,getTemplates(this.endpoint,s)];case 2:i=r.sent();this.templates=i.templates;this.count=i.count;this.loading=false;return[3,4];case 3:a=r.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;deleteTemplate(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,a;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(a=n.response)===null||a===void 0?void 0:a.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return h(Host,{key:"e7e90b641fbea53569365333de5671fe8056ad00"},h("div",{key:"800eaf67dd2c153ec9730952ecf86c2c883f3a59",class:"header"},h("div",{key:"0566a72ae5b65cae1d3d1ab9ee1f92193b28c7b7",class:"filter"},h("verdocs-text-input",{key:"18339e5f5219d4a874863483a5519313d62e5f39",id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),h("verdocs-quick-filter",{key:"eb436954742039fe8e238e3f9e29323b284499fe",label:"Visibility",value:this.visibility,options:VisibilityFilters,onOptionSelected:function(t){var n;e.visibility=t.detail.value;(n=e.changeVisibility)===null||n===void 0?void 0:n.emit(e.visibility)}}),h("verdocs-quick-filter",{key:"9a384e6a64b56c25ede399db0cfe691651712f08",label:"Starred",value:this.starred,options:StarredFilters,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),h("verdocs-quick-filter",{key:"12b8d9bcbf43f10b98d19b429adeb2bb1fb9fa2d",label:"Sort By",value:this.sort,options:SortOptions,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&h("verdocs-spinner",{key:"1c2a66d3549ee80decf1d523c9dece2416146a0b",mode:"dark",size:24}),h("div",{key:"6ecb8f54e7bb8a1b8e71497cfd78a5a8487466c5",style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var s=t[n];var i=[];var a=[];if(e.allowedActions.includes("send")){i.push({label:"Preview / Send",id:"send",disabled:!canPerformTemplateAction(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("signnow")){i.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){i.push({label:""});i.push({label:"Submissions",id:"submitted",disabled:!canPerformTemplateAction(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){i.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){i.push({label:"Edit",id:"edit",disabled:!a.includes("write")})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){i.push({label:"Delete",id:"delete",disabled:!a.includes("delete")})}}return h("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},h("div",{class:"inner"},h("verdocs-template-star",{template:t,endpoint:e.endpoint}),h("div",{class:"spacer icon-spacer"}),h("div",{class:"name"},t.name),h("div",{class:"spacer usage-spacer"}),h("div",{class:"usage"},h("span",{innerHTML:EnvelopeIcon,title:"Usage Counter"}),t.counter||"--"),h("div",{class:"spacer last-used-spacer"}),h("div",{class:"last-used"},n==="created_at"&&h("span",{innerHTML:CreatedIcon,title:"Created"}),n==="updated_at"&&h("span",{innerHTML:UpdatedIcon,title:"Last Updated"}),n==="last_used_at"&&h("span",{innerHTML:LastUsedIcon,title:"Last Used"}),s?dateFnsExports.format(new Date(s),"P"):"Never"),h("div",{class:"spacer ownership-spacer"}),t.is_public&&h("div",{class:"ownership"},h("span",{innerHTML:GlobeAltIcon})," Public"),!t.is_public&&!t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:LockClosedIcon})," Private"),!t.is_public&&t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:BuildingOfficeIcon})," Shared"),h("verdocs-dropdown",{options:i,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&h("div",{key:"9c248da7e6a766b6d4ca75c5a6728f609540ff43"},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&h("div",{key:"978cb7ba0c6ee2307781fa1a93311fded6c03cf7",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null),this.confirmDelete&&h("verdocs-ok-dialog",{key:"737d3a3e1211a1a7da04bea7a1c5ba8cce43cd4b",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}();VerdocsTemplatesList.style=verdocsTemplatesListCss;export{VerdocsTemplatesList as verdocs_templates_list};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{c(s.next(e))}catch(e){a(e)}}function l(e){try{c(s["throw"](e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(r,l)}c((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,i,a,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return c([e,t])}}function c(l){if(s)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(n=0)),n)try{if(s=1,i&&(a=l[0]&2?i["return"]:l[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;if(i=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;i=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1];a=l;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(l);break}if(a[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];i=0}finally{s=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CF7i8guW.js";import{d as dateFnsExports}from"./index-dzBXqXlK.js";import{VerdocsEndpoint,getTemplates,deleteTemplate,integerSequence,canPerformTemplateAction}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-C1sRVZWv.js";var verdocsTemplatesListCss='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var GlobeAltIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var LockClosedIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var BuildingOfficeIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var EnvelopeIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var CreatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var LastUsedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var UpdatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var VisibilityFilters=[{value:"private_shared",label:"Personal + Shared"},{value:"private",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var StarredFilters=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var SortOptions=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var VerdocsTemplatesList=function(){function e(e){var t=this;registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.viewTemplate=createEvent(this,"viewTemplate");this.signNow=createEvent(this,"signNow");this.submittedData=createEvent(this,"submittedData");this.editTemplate=createEvent(this,"editTemplate");this.templateDeleted=createEvent(this,"templateDeleted");this.changeSort=createEvent(this,"changeSort");this.changeVisibility=createEvent(this,"changeVisibility");this.changeStarred=createEvent(this,"changeStarred");this.changeName=createEvent(this,"changeName");this.endpoint=VerdocsEndpoint.getDefault();this.visibility="private_shared";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter="";this.handleOptionSelected=function(e,n){var s,i,a,r;if(e==="send"){(s=t.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:t.endpoint,template:n})}else if(e==="signnow"){(i=t.signNow)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,template:n})}else if(e==="submitted"){(a=t.submittedData)===null||a===void 0?void 0:a.emit({endpoint:t.endpoint,template:n})}else if(e==="edit"){(r=t.editTemplate)===null||r===void 0?void 0:r.emit({endpoint:t.endpoint,template:n})}else if(e==="delete"){t.confirmDelete=n}}}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,a;return __generator(this,(function(r){switch(r.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;r.label=1;case 1:r.trys.push([1,3,,4]);s={visibility:this.visibility,page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,getTemplates(this.endpoint,s)];case 2:i=r.sent();this.templates=i.templates;this.count=i.count;this.loading=false;return[3,4];case 3:a=r.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;deleteTemplate(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,a;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(a=n.response)===null||a===void 0?void 0:a.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return h(Host,{key:"09f26fe2ca274c54c4a445b6fbd2b5b0e0b4e587"},h("div",{key:"419453dcda9b282dbb221e21c59c3b9ab805ccb3",class:"header"},h("div",{key:"0874a0b65a716901f2a974c6d9a687f94598bb7f",class:"filter"},h("verdocs-text-input",{key:"3f333fd5a1c0b450af04d8ea48922ced96f23e2b",id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),h("verdocs-quick-filter",{key:"89ef45476a685f220aa9511556b7f60ad8ff5cf3",label:"Visibility",value:this.visibility,options:VisibilityFilters,onOptionSelected:function(t){var n;e.visibility=t.detail.value;(n=e.changeVisibility)===null||n===void 0?void 0:n.emit(e.visibility)}}),h("verdocs-quick-filter",{key:"434e0caca9b04f840b841359b7ef94856676f957",label:"Starred",value:this.starred,options:StarredFilters,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),h("verdocs-quick-filter",{key:"34b7ad87857dd9de3bfab997239c7e616716c8c0",label:"Sort By",value:this.sort,options:SortOptions,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&h("verdocs-spinner",{key:"5d237a87ce4be276951b27e18c9597ee551f7ce3",mode:"dark",size:24}),h("div",{key:"91b04bd0fb46e2b9d712f3fdf9d162ed77f8af63",style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var s=t[n];var i=[];var a=[];if(e.allowedActions.includes("send")){i.push({label:"Preview / Send",id:"send",disabled:!canPerformTemplateAction(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("signnow")){i.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){i.push({label:""});i.push({label:"Submissions",id:"submitted",disabled:!canPerformTemplateAction(e.endpoint.profile,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){i.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){i.push({label:"Edit",id:"edit",disabled:!a.includes("write")})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){i.push({label:"Delete",id:"delete",disabled:!a.includes("delete")})}}return h("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},h("div",{class:"inner"},h("verdocs-template-star",{template:t,endpoint:e.endpoint}),h("div",{class:"spacer icon-spacer"}),h("div",{class:"name"},t.name),h("div",{class:"spacer usage-spacer"}),h("div",{class:"usage"},h("span",{innerHTML:EnvelopeIcon,title:"Usage Counter"}),t.counter||"--"),h("div",{class:"spacer last-used-spacer"}),h("div",{class:"last-used"},n==="created_at"&&h("span",{innerHTML:CreatedIcon,title:"Created"}),n==="updated_at"&&h("span",{innerHTML:UpdatedIcon,title:"Last Updated"}),n==="last_used_at"&&h("span",{innerHTML:LastUsedIcon,title:"Last Used"}),s?dateFnsExports.format(new Date(s),"P"):"Never"),h("div",{class:"spacer ownership-spacer"}),t.is_public&&h("div",{class:"ownership"},h("span",{innerHTML:GlobeAltIcon})," Public"),!t.is_public&&!t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:LockClosedIcon})," Private"),!t.is_public&&t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:BuildingOfficeIcon})," Shared"),h("verdocs-dropdown",{options:i,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&h("div",{key:"02c8a2c032d7d5d9367640dc8af9207cac1191d3"},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&h("div",{key:"0fa668155a34667926145cce15f06ff8b9174049",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null),this.confirmDelete&&h("verdocs-ok-dialog",{key:"2d5c0920ed5a25c1cee436ef49eed765b7f1c787",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}();VerdocsTemplatesList.style=verdocsTemplatesListCss;export{VerdocsTemplatesList as verdocs_templates_list};
|
2
2
|
//# sourceMappingURL=verdocs-templates-list.entry.js.map
|