@verdocs/web-sdk 2.2.6 → 2.2.8
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/{Primitives-be5088cb.js → Primitives-a59870a2.js} +20 -0
- package/dist/cjs/{Profiles-244e8254.js → Profiles-54271244.js} +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-button_2.cjs.entry.js → verdocs-button_3.cjs.entry.js} +48 -0
- package/dist/cjs/verdocs-checkbox_3.cjs.entry.js +56 -0
- package/dist/cjs/{verdocs-dialog_2.cjs.entry.js → verdocs-dialog_3.cjs.entry.js} +26 -2
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +160 -27
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/controls/verdocs-table/verdocs-table.css +9 -8
- package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.css +33 -0
- package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.js +102 -0
- package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.stories.js +25 -0
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +0 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.css +1 -1
- package/dist/collection/components/settings/verdocs-settings-api-keys/verdocs-settings-api-keys.js +8 -11
- package/dist/collection/components/settings/verdocs-settings-members/verdocs-settings-members.css +31 -7
- package/dist/collection/components/settings/verdocs-settings-members/verdocs-settings-members.js +137 -10
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +11 -0
- package/dist/components/{Strings.js → Members.js} +6 -6
- package/dist/components/Primitives.js +18 -1
- package/dist/components/Profiles.js +15 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/verdocs-dialog2.js +0 -1
- package/dist/components/verdocs-envelopes-list.js +1 -1
- package/dist/components/verdocs-settings-api-keys2.js +9 -11
- package/dist/components/verdocs-settings-members2.js +193 -15
- package/dist/components/verdocs-settings-profile2.js +1 -1
- package/dist/components/verdocs-settings.js +26 -20
- package/dist/components/verdocs-table2.js +1 -1
- package/dist/components/verdocs-tabs.d.ts +11 -0
- package/dist/components/verdocs-tabs.js +6 -0
- package/dist/components/verdocs-tabs2.js +46 -0
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/docs.json +100 -5
- package/dist/esm/Primitives-8fe93caf.js +37 -0
- package/dist/esm/{Profiles-7645e6f1.js → Profiles-4cc942ef.js} +15 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/{verdocs-button_2.entry.js → verdocs-button_3.entry.js} +49 -2
- package/dist/esm/verdocs-checkbox_3.entry.js +50 -0
- package/dist/esm/{verdocs-dialog_2.entry.js → verdocs-dialog_3.entry.js} +26 -3
- package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
- package/dist/esm/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +160 -27
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +2 -2
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Primitives-8fe93caf.js +1 -0
- package/dist/esm-es5/Profiles-4cc942ef.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_3.entry.js +1 -0
- package/dist/esm-es5/verdocs-checkbox_3.entry.js +1 -0
- package/dist/esm-es5/verdocs-dialog_3.entry.js +1 -0
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-tabs/verdocs-tabs.d.ts +31 -0
- package/dist/types/components/controls/verdocs-tabs/verdocs-tabs.stories.d.ts +7 -0
- package/dist/types/components/settings/verdocs-settings-members/verdocs-settings-members.d.ts +17 -1
- package/dist/types/components.d.ts +38 -0
- package/dist/verdocs-web-sdk/{p-68487ce7.system.entry.js → p-02bbfba3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-0578c85b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-19a0fdf2.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3a0c5966.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3bcd86ea.system.js +1 -0
- package/dist/verdocs-web-sdk/p-4f8dbb97.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5e808a0b.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-6572cc71.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0d590026.entry.js → p-7967b361.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dd5460ea.entry.js → p-7dd4ffcc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dfcbcf0b.entry.js → p-803924f3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-937cd171.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a1eb425e.system.entry.js → p-96ca789b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-075dc36d.js → p-983da2f6.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e9d2b68a.entry.js → p-a2b83969.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-043eab3f.system.entry.js → p-c556a377.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-690a485e.system.entry.js → p-c9e66410.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-cb9985fe.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cea9f0ba.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cfead4df.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-dc6e47a4.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-b3e0db4b.system.entry.js → p-e0a212a1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b4ac7a21.entry.js → p-ed38d3d2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-986f78e3.entry.js → p-f7fecffd.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1d7846c9.entry.js → p-fb609f37.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bf8bded0.system.entry.js → p-fb71f28a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-febebe69.system.entry.js → p-ff850808.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +0 -104
- package/dist/esm/Primitives-054bc6e5.js +0 -20
- package/dist/esm/verdocs-checkbox_4.entry.js +0 -97
- package/dist/esm-es5/Primitives-054bc6e5.js +0 -1
- package/dist/esm-es5/Profiles-7645e6f1.js +0 -1
- package/dist/esm-es5/verdocs-button_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +0 -1
- package/dist/esm-es5/verdocs-dialog_2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0fecb805.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-13585ecc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4821f318.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4c9d9cd6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4f0c253e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7291906c.js +0 -1
- package/dist/verdocs-web-sdk/p-77f04115.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8a77db15.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-96c4637b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bc442f6c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c9ac0d2f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cbebc039.system.js +0 -1
- package/dist/verdocs-web-sdk/p-d50523fd.system.js +0 -1
@@ -1,7 +1,8 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import './Types.js';
|
3
|
-
import { g as getMembers
|
3
|
+
import { g as getMembers } from './Members.js';
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
5
|
+
import { a as formatFullName } from './Primitives.js';
|
5
6
|
import { V as VerdocsToast } from './Toast.js';
|
6
7
|
import { S as SDKError } from './errors.js';
|
7
8
|
import { d as defineCustomElement$6 } from './verdocs-button2.js';
|
@@ -82,7 +83,7 @@ var deleteKey = function (endpoint, organizationId, clientId) {
|
|
82
83
|
|
83
84
|
const verdocsSettingsApiKeysCss = "verdocs-settings-api-keys{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-settings-api-keys .table{margin:12px 0}verdocs-settings-api-keys .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-api-keys .data-col svg{width:24px;height:24px}verdocs-settings-api-keys .col-name svg,verdocs-settings-api-keys .col-client_id svg,verdocs-settings-api-keys .col-profile_id svg{fill:#a1a1aa}verdocs-settings-api-keys .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-api-keys .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-api-keys .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-api-keys .header-col.col-actions{text-align:center}verdocs-settings-api-keys verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}";
|
84
85
|
|
85
|
-
const ClockIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zM12.75 6a.75.75 0 00-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 000-1.5h-3.75V6z" clip-rule="evenodd" /></svg>`;
|
86
|
+
// const ClockIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zM12.75 6a.75.75 0 00-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 000-1.5h-3.75V6z" clip-rule="evenodd" /></svg>`;
|
86
87
|
const TagIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M5.5 3A2.5 2.5 0 003 5.5v2.879a2.5 2.5 0 00.732 1.767l6.5 6.5a2.5 2.5 0 003.536 0l2.878-2.878a2.5 2.5 0 000-3.536l-6.5-6.5A2.5 2.5 0 008.38 3H5.5zM6 7a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>`;
|
87
88
|
const UserIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-5.5-2.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zM10 12a5.99 5.99 0 00-4.793 2.39A6.483 6.483 0 0010 16.5a6.483 6.483 0 004.793-2.11A5.99 5.99 0 0010 12z" clip-rule="evenodd" /></svg>`;
|
88
89
|
const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;
|
@@ -186,17 +187,17 @@ const VerdocsSettingsApiKeys = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
186
187
|
});
|
187
188
|
}
|
188
189
|
render() {
|
189
|
-
var _a, _b, _c, _d
|
190
|
-
const profileOptions = this.members.map(member => ({ label:
|
190
|
+
var _a, _b, _c, _d;
|
191
|
+
const profileOptions = this.members.map(member => ({ label: formatFullName(member), value: member.id }));
|
191
192
|
if (!this.endpoint.session) {
|
192
193
|
console.log('[SETTINGS] Must be authenticated');
|
193
194
|
return h(Host, { class: "authentication-required" }, "Must be authenticated");
|
194
195
|
}
|
195
|
-
return (h(Host, null, h("
|
196
|
+
return (h(Host, null, h("verdocs-table", { data: this.keys, columns: [
|
196
197
|
{
|
197
198
|
id: 'name',
|
198
199
|
header: 'Name',
|
199
|
-
renderCell: (_, row) => (h("div", null, h("div",
|
200
|
+
renderCell: (_, row) => (h("div", null, h("div", null, row.name))),
|
200
201
|
},
|
201
202
|
{
|
202
203
|
id: 'client_id',
|
@@ -206,10 +207,7 @@ const VerdocsSettingsApiKeys = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
206
207
|
{
|
207
208
|
id: 'profile_id',
|
208
209
|
header: 'Acts as',
|
209
|
-
renderCell: (_, row) => {
|
210
|
-
var _a, _b;
|
211
|
-
return (h("div", null, h("div", { innerHTML: UserIcon }), h("div", null, capitalize((_a = row.profile) === null || _a === void 0 ? void 0 : _a.first_name), " ", capitalize((_b = row.profile) === null || _b === void 0 ? void 0 : _b.last_name))));
|
212
|
-
},
|
210
|
+
renderCell: (_, row) => (h("div", null, h("div", { innerHTML: UserIcon }), h("div", null, formatFullName(row.profile)))),
|
213
211
|
},
|
214
212
|
{
|
215
213
|
id: 'actions',
|
@@ -220,7 +218,7 @@ const VerdocsSettingsApiKeys = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
220
218
|
this.newApiKeyName = e.target.value.trim();
|
221
219
|
} }), h("p", null, "API keys must be associated with a profile. Actions performed via API calls using this key will \"act as\" this profile."), h("verdocs-select-input", { options: profileOptions, label: "Act as Profile", onInput: (e) => {
|
222
220
|
this.newApiKeyProfileId = e.target.value;
|
223
|
-
} }), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", size: "small", label: "Cancel", onClick: () => (this.creatingKey = false) }), h("verdocs-button", { size: "small", label: "OK", onClick: () => this.handleCreateKey() }))))), this.createdKey && (h("verdocs-dialog", { onExit: () => (this.createdKey = null) }, h("div", { slot: "title", class: "heading" }, "API Key Details"), h("div", { class: "content" }, h("verdocs-text-input", { label: "Name", disabled: true, value: (_a = this.createdKey) === null || _a === void 0 ? void 0 : _a.name }), h("verdocs-text-input", { label: "Profile", disabled: true, value:
|
221
|
+
} }), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", size: "small", label: "Cancel", onClick: () => (this.creatingKey = false) }), h("verdocs-button", { size: "small", label: "OK", onClick: () => this.handleCreateKey() }))))), this.createdKey && (h("verdocs-dialog", { onExit: () => (this.createdKey = null) }, h("div", { slot: "title", class: "heading" }, "API Key Details"), h("div", { class: "content" }, h("verdocs-text-input", { label: "Name", disabled: true, value: (_a = this.createdKey) === null || _a === void 0 ? void 0 : _a.name }), h("verdocs-text-input", { label: "Profile", disabled: true, value: formatFullName((_b = this.createdKey) === null || _b === void 0 ? void 0 : _b.profile) }), h("p", null, "Please save the Client ID and Secret below. Be sure to never expose your secret key in insecure (Web or mobile environments)!"), h("verdocs-text-input", { label: "Client ID", disabled: true, value: (_c = this.createdKey) === null || _c === void 0 ? void 0 : _c.client_id, copyable: true }), h("verdocs-text-input", { label: "Secret Key", disabled: true, value: (_d = this.createdKey) === null || _d === void 0 ? void 0 : _d.client_secret, copyable: true }), h("div", { class: "buttons" }, h("verdocs-button", { size: "small", label: "Done", onClick: () => (this.createdKey = null) })))))));
|
224
222
|
}
|
225
223
|
static get style() { return verdocsSettingsApiKeysCss; }
|
226
224
|
}, [0, "verdocs-settings-api-keys", {
|
@@ -1,15 +1,45 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { g as
|
3
|
-
import './Types.js';
|
2
|
+
import { g as getRoles } from './Profiles.js';
|
4
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
4
|
+
import './Types.js';
|
5
|
+
import { g as getMembers, d as deleteMember } from './Members.js';
|
6
|
+
import { b as formatInitials, a as formatFullName, c as capitalize } from './Primitives.js';
|
5
7
|
import { V as VerdocsToast } from './Toast.js';
|
6
8
|
import { S as SDKError } from './errors.js';
|
7
|
-
import { d as defineCustomElement$
|
8
|
-
import { d as defineCustomElement$
|
9
|
+
import { d as defineCustomElement$7 } from './verdocs-button2.js';
|
10
|
+
import { d as defineCustomElement$6 } from './verdocs-dialog2.js';
|
11
|
+
import { d as defineCustomElement$5 } from './verdocs-help-icon2.js';
|
12
|
+
import { d as defineCustomElement$4 } from './verdocs-select-input2.js';
|
13
|
+
import { d as defineCustomElement$3 } from './verdocs-table2.js';
|
14
|
+
import { d as defineCustomElement$2 } from './verdocs-tabs2.js';
|
15
|
+
import { d as defineCustomElement$1 } from './verdocs-text-input2.js';
|
16
|
+
import { f as format } from './index2.js';
|
9
17
|
|
10
|
-
|
18
|
+
var getInvitations = function (endpoint, organizationId) {
|
19
|
+
return endpoint.api //
|
20
|
+
.get("/organizations/".concat(organizationId, "/invitation"))
|
21
|
+
.then(function (r) { return r.data; });
|
22
|
+
};
|
23
|
+
var createInvitation = function (endpoint, organizationId, params) {
|
24
|
+
return endpoint.api //
|
25
|
+
.post("/organizations/".concat(organizationId, "/invitation"), params)
|
26
|
+
.then(function (r) { return r.data; });
|
27
|
+
};
|
28
|
+
var deleteInvitation = function (endpoint, organizationId, email) {
|
29
|
+
return endpoint.api //
|
30
|
+
.delete("/organizations/".concat(organizationId, "/invitation/").concat(email))
|
31
|
+
.then(function (r) { return r.data; });
|
32
|
+
};
|
33
|
+
var resendInvitation = function (endpoint, organizationId, email) {
|
34
|
+
return endpoint.api //
|
35
|
+
.post("/organizations/".concat(organizationId, "/invitation/").concat(email, "/resend"))
|
36
|
+
.then(function (r) { return r.data; });
|
37
|
+
};
|
38
|
+
|
39
|
+
const verdocsSettingsMembersCss = "verdocs-settings-members{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .role{font-size:12px;width:32px;height:32px;border-radius:32px;background:#777777;color:#ffffff;font-weight:700;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-members .data-col svg{width:24px;height:24px}verdocs-settings-members .col-name svg,verdocs-settings-members .col-client_id svg,verdocs-settings-members .col-profile_id svg{fill:#a1a1aa}verdocs-settings-members .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-members .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-members .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-members .header-col.col-actions{text-align:center}verdocs-settings-members verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}";
|
11
40
|
|
12
41
|
const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;
|
42
|
+
const ArrowPathIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>`;
|
13
43
|
const getRoleLabel = (roles) => {
|
14
44
|
if (roles.find(role => role.name === 'owner') !== undefined)
|
15
45
|
return 'Owner';
|
@@ -44,6 +74,16 @@ const VerdocsSettingsMembers = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
44
74
|
this.memberRemoved = createEvent(this, "memberRemoved", 7);
|
45
75
|
this.endpoint = VerdocsEndpoint.getDefault();
|
46
76
|
this.members = [];
|
77
|
+
this.invited = [];
|
78
|
+
this.roles = [];
|
79
|
+
this.selectedTab = 0;
|
80
|
+
this.invitingMember = false;
|
81
|
+
this.newEmailAddress = '';
|
82
|
+
this.newRoleId = '';
|
83
|
+
this.submitting = false;
|
84
|
+
this.deletingInvitation = null;
|
85
|
+
this.resendingInvitation = null;
|
86
|
+
this.deletingMember = null;
|
47
87
|
}
|
48
88
|
componentWillLoad() {
|
49
89
|
this.endpoint.loadSession();
|
@@ -53,42 +93,155 @@ const VerdocsSettingsMembers = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
53
93
|
}
|
54
94
|
}
|
55
95
|
async componentDidLoad() {
|
56
|
-
|
96
|
+
this.loadMembers().catch((e) => console.log('Unknown Error', e));
|
97
|
+
}
|
98
|
+
async loadMembers() {
|
99
|
+
var _a, _b, _c, _d;
|
57
100
|
try {
|
58
|
-
|
101
|
+
const [roles, members, invites] = await Promise.all([
|
102
|
+
getRoles(this.endpoint),
|
103
|
+
getMembers(this.endpoint, this.endpoint.session.organization_id),
|
104
|
+
getInvitations(this.endpoint, this.endpoint.session.organization_id),
|
105
|
+
]);
|
106
|
+
this.roles = roles;
|
107
|
+
this.members = members;
|
108
|
+
this.invited = invites;
|
109
|
+
this.newRoleId = ((_a = roles.find(role => role.name === 'member')) === null || _a === void 0 ? void 0 : _a.id) || '';
|
59
110
|
}
|
60
111
|
catch (e) {
|
61
|
-
(
|
112
|
+
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
62
113
|
VerdocsToast('Unable to load members. Please try again later');
|
63
114
|
}
|
64
115
|
}
|
116
|
+
async handleInviteMember() {
|
117
|
+
this.submitting = true;
|
118
|
+
createInvitation(VerdocsEndpoint.getDefault(), this.endpoint.session.organization_id, {
|
119
|
+
email: this.newEmailAddress,
|
120
|
+
role_id: this.newRoleId,
|
121
|
+
organization_id: this.endpoint.session.organization_id,
|
122
|
+
})
|
123
|
+
.then(r => {
|
124
|
+
console.log('[SETTINGS] Invited member', r);
|
125
|
+
this.invitingMember = false;
|
126
|
+
this.submitting = false;
|
127
|
+
this.newRoleId = '';
|
128
|
+
this.newEmailAddress = '';
|
129
|
+
VerdocsToast('Invitation sent!', { style: 'success' });
|
130
|
+
this.loadMembers();
|
131
|
+
})
|
132
|
+
.catch(e => {
|
133
|
+
console.log('[SETTINGS] Unable to invite member', e);
|
134
|
+
this.invitingMember = false;
|
135
|
+
this.submitting = false;
|
136
|
+
this.newRoleId = '';
|
137
|
+
this.newEmailAddress = '';
|
138
|
+
VerdocsToast('Unable to invite member. Please try again later', { style: 'error' });
|
139
|
+
});
|
140
|
+
}
|
141
|
+
async handleDeleteMember() {
|
142
|
+
this.submitting = true;
|
143
|
+
deleteMember(VerdocsEndpoint.getDefault(), this.deletingMember.organization_id, this.deletingMember.email)
|
144
|
+
.then(() => {
|
145
|
+
this.submitting = false;
|
146
|
+
this.deletingMember = null;
|
147
|
+
VerdocsToast('The member has been deleted.', { style: 'success' });
|
148
|
+
this.loadMembers();
|
149
|
+
})
|
150
|
+
.catch(e => {
|
151
|
+
this.submitting = false;
|
152
|
+
this.deletingMember = null;
|
153
|
+
console.log('Delete error', e);
|
154
|
+
VerdocsToast('Unable to cancel invitation. Please try again later', { style: 'error' });
|
155
|
+
});
|
156
|
+
}
|
157
|
+
async handleDeleteInvitation() {
|
158
|
+
this.submitting = true;
|
159
|
+
deleteInvitation(VerdocsEndpoint.getDefault(), this.deletingInvitation.organization_id, this.deletingInvitation.email)
|
160
|
+
.then(() => {
|
161
|
+
this.submitting = false;
|
162
|
+
this.deletingInvitation = null;
|
163
|
+
VerdocsToast('The invitation has been cancelled.', { style: 'success' });
|
164
|
+
this.loadMembers();
|
165
|
+
})
|
166
|
+
.catch(e => {
|
167
|
+
this.submitting = false;
|
168
|
+
this.deletingInvitation = null;
|
169
|
+
console.log('Delete error', e);
|
170
|
+
VerdocsToast('Unable to cancel invitation. Please try again later', { style: 'error' });
|
171
|
+
});
|
172
|
+
}
|
173
|
+
async handleResendInvitation() {
|
174
|
+
this.submitting = true;
|
175
|
+
resendInvitation(VerdocsEndpoint.getDefault(), this.resendingInvitation.organization_id, this.resendingInvitation.email)
|
176
|
+
.then(() => {
|
177
|
+
this.submitting = false;
|
178
|
+
this.resendingInvitation = null;
|
179
|
+
VerdocsToast('The invitation has been resent.', { style: 'success' });
|
180
|
+
this.loadMembers();
|
181
|
+
})
|
182
|
+
.catch(e => {
|
183
|
+
this.submitting = false;
|
184
|
+
this.resendingInvitation = null;
|
185
|
+
console.log('REsend error', e);
|
186
|
+
VerdocsToast('Unable to resend invitation. Please try again later', { style: 'error' });
|
187
|
+
});
|
188
|
+
}
|
65
189
|
render() {
|
66
190
|
if (!this.endpoint.session) {
|
67
191
|
console.log('[SETTINGS] Must be authenticated');
|
68
192
|
return h(Host, { class: "authentication-required" }, "Must be authenticated");
|
69
193
|
}
|
70
|
-
|
194
|
+
const roleOptions = this.roles.map(role => ({ label: getRoleLabel([{ name: role.name }]), value: role.id }));
|
195
|
+
return (h(Host, null, h("verdocs-tabs", { tabs: [{ label: `Members (${this.members.length})` }, { label: `Pending Invitations (${this.invited.length})` }], onSelectTab: e => (this.selectedTab = e.detail.index) }), this.selectedTab === 0 && (h("verdocs-table", { data: this.members, columns: [
|
71
196
|
{
|
72
197
|
id: 'name',
|
73
198
|
renderHeader: () => 'Member',
|
74
|
-
renderCell: (_, row) => (h("div", { style: { display: 'flex', flexDirection: 'row', gap: '10px', alignItems: 'center' } }, h("div", { class: "role", style: { backgroundColor: getRoleColor(row.roles) } },
|
199
|
+
renderCell: (_, row) => (h("div", { style: { display: 'flex', flexDirection: 'row', gap: '10px', alignItems: 'center' } }, h("div", { class: "role", style: { backgroundColor: getRoleColor(row.roles) } }, formatInitials(row)), h("span", null, formatFullName(row)))),
|
75
200
|
},
|
76
201
|
{ id: 'email', header: 'E-mail Address' },
|
77
202
|
{ id: 'phone', header: 'Phone Number' },
|
78
203
|
{ id: 'roles', header: 'Role', renderCell: (_, row) => `${getRoleLabel(row.roles)}` },
|
79
|
-
{
|
80
|
-
|
204
|
+
{
|
205
|
+
id: 'actions',
|
206
|
+
header: 'Actions',
|
207
|
+
renderCell: (_, row) => h("div", null, row.id !== this.endpoint.session.profile_id && h("div", { innerHTML: TrashIcon, onClick: () => (this.deletingMember = row) })),
|
208
|
+
},
|
209
|
+
] })), this.selectedTab === 1 && (h("verdocs-table", { data: this.invited, columns: [
|
210
|
+
{ id: 'email', header: 'E-mail Address' },
|
211
|
+
{ id: 'generated_at', header: 'Invited', renderCell: (_, row) => h("div", null, format(new Date(row.generated_at), 'MMM d, Y')) },
|
212
|
+
{ id: 'role_id', header: 'Role', renderCell: (_, row) => { var _a; return h("div", null, getRoleLabel([{ name: (_a = this.roles.find(r => r.id === row.role_id)) === null || _a === void 0 ? void 0 : _a.name }])); } },
|
213
|
+
{ id: 'status', header: 'Status', renderCell: (_, row) => h("div", null, capitalize(row.status)) },
|
214
|
+
{
|
215
|
+
id: 'actions',
|
216
|
+
header: 'Actions',
|
217
|
+
renderCell: (_, row) => (h("div", null, h("div", { innerHTML: TrashIcon, onClick: () => (this.deletingInvitation = row) }), h("div", { innerHTML: ArrowPathIcon, onClick: () => (this.resendingInvitation = row) }))),
|
218
|
+
},
|
219
|
+
] })), h("verdocs-button", { label: "Invite New Member", size: "normal", disabled: this.submitting, onClick: () => (this.invitingMember = true) }), this.invitingMember && (h("verdocs-dialog", { onExit: () => (this.invitingMember = false) }, h("div", { slot: "title", class: "heading" }, "Invite New Member"), h("div", { class: "content" }, h("verdocs-text-input", { label: "E-mail Address", placeholder: "Enter the user's email address...", id: "verdocs-invite-email", value: this.newEmailAddress, autocomplete: "off", required: true, onInput: (e) => (this.newEmailAddress = e.target.value), onFocusout: (e) => {
|
220
|
+
this.newEmailAddress = e.target.value.trim();
|
221
|
+
} }), h("div", { style: { marginBottom: '20px' } }), h("verdocs-select-input", { options: roleOptions, label: "Role", onInput: (e) => {
|
222
|
+
this.newRoleId = e.target.value;
|
223
|
+
} }), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", size: "small", label: "Cancel", disabled: this.submitting, onClick: () => (this.invitingMember = false) }), h("verdocs-button", { size: "small", label: "OK", disabled: this.submitting || !this.newEmailAddress || !this.newRoleId, onClick: () => this.handleInviteMember() }))))), this.deletingMember && (h("verdocs-dialog", { onExit: () => (this.deletingMember = null) }, h("div", { slot: "title", class: "heading" }, "Delete Member?"), h("div", { class: "content" }, h("p", null, "Are you sure you want to delete this member? This action cannot be undone."), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", size: "small", disabled: this.submitting, label: "Cancel", onClick: () => (this.deletingMember = null) }), h("verdocs-button", { size: "small", label: "OK", disabled: this.submitting, onClick: () => this.handleDeleteMember() }))))), this.deletingInvitation && (h("verdocs-dialog", { onExit: () => (this.deletingInvitation = null) }, h("div", { slot: "title", class: "heading" }, "Cancel Invitation?"), h("div", { class: "content" }, h("p", null, "Are you sure you want to cancel this invitation? This action cannot be undone."), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", size: "small", disabled: this.submitting, label: "Cancel", onClick: () => (this.deletingInvitation = null) }), h("verdocs-button", { size: "small", label: "OK", disabled: this.submitting, onClick: () => this.handleDeleteInvitation() }))))), this.resendingInvitation && (h("verdocs-dialog", { onExit: () => (this.resendingInvitation = null) }, h("div", { slot: "title", class: "heading" }, "Resend Invitation?"), h("div", { class: "content" }, h("p", null, "The user will receive an email reminder to join your organization."), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", size: "small", disabled: this.submitting, label: "Cancel", onClick: () => (this.resendingInvitation = null) }), h("verdocs-button", { size: "small", label: "OK", disabled: this.submitting, onClick: () => this.handleResendInvitation() })))))));
|
81
224
|
}
|
82
225
|
static get style() { return verdocsSettingsMembersCss; }
|
83
226
|
}, [0, "verdocs-settings-members", {
|
84
227
|
"endpoint": [16],
|
85
|
-
"members": [32]
|
228
|
+
"members": [32],
|
229
|
+
"invited": [32],
|
230
|
+
"roles": [32],
|
231
|
+
"selectedTab": [32],
|
232
|
+
"invitingMember": [32],
|
233
|
+
"newEmailAddress": [32],
|
234
|
+
"newRoleId": [32],
|
235
|
+
"submitting": [32],
|
236
|
+
"deletingInvitation": [32],
|
237
|
+
"resendingInvitation": [32],
|
238
|
+
"deletingMember": [32]
|
86
239
|
}]);
|
87
240
|
function defineCustomElement() {
|
88
241
|
if (typeof customElements === "undefined") {
|
89
242
|
return;
|
90
243
|
}
|
91
|
-
const components = ["verdocs-settings-members", "verdocs-button", "verdocs-table"];
|
244
|
+
const components = ["verdocs-settings-members", "verdocs-button", "verdocs-dialog", "verdocs-help-icon", "verdocs-select-input", "verdocs-table", "verdocs-tabs", "verdocs-text-input"];
|
92
245
|
components.forEach(tagName => { switch (tagName) {
|
93
246
|
case "verdocs-settings-members":
|
94
247
|
if (!customElements.get(tagName)) {
|
@@ -97,10 +250,35 @@ function defineCustomElement() {
|
|
97
250
|
break;
|
98
251
|
case "verdocs-button":
|
99
252
|
if (!customElements.get(tagName)) {
|
100
|
-
defineCustomElement$
|
253
|
+
defineCustomElement$7();
|
254
|
+
}
|
255
|
+
break;
|
256
|
+
case "verdocs-dialog":
|
257
|
+
if (!customElements.get(tagName)) {
|
258
|
+
defineCustomElement$6();
|
259
|
+
}
|
260
|
+
break;
|
261
|
+
case "verdocs-help-icon":
|
262
|
+
if (!customElements.get(tagName)) {
|
263
|
+
defineCustomElement$5();
|
264
|
+
}
|
265
|
+
break;
|
266
|
+
case "verdocs-select-input":
|
267
|
+
if (!customElements.get(tagName)) {
|
268
|
+
defineCustomElement$4();
|
101
269
|
}
|
102
270
|
break;
|
103
271
|
case "verdocs-table":
|
272
|
+
if (!customElements.get(tagName)) {
|
273
|
+
defineCustomElement$3();
|
274
|
+
}
|
275
|
+
break;
|
276
|
+
case "verdocs-tabs":
|
277
|
+
if (!customElements.get(tagName)) {
|
278
|
+
defineCustomElement$2();
|
279
|
+
}
|
280
|
+
break;
|
281
|
+
case "verdocs-text-input":
|
104
282
|
if (!customElements.get(tagName)) {
|
105
283
|
defineCustomElement$1();
|
106
284
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { z } from './index3.js';
|
3
|
-
import {
|
3
|
+
import { a as getCurrentProfile, u as updateProfile } from './Profiles.js';
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
5
5
|
import './Types.js';
|
6
6
|
import { d as convertToE164 } from './utils.js';
|
@@ -2,16 +2,17 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
2
2
|
import './Types.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
4
4
|
import { S as SDKError } from './errors.js';
|
5
|
-
import { d as defineCustomElement$
|
6
|
-
import { d as defineCustomElement$
|
7
|
-
import { d as defineCustomElement$
|
8
|
-
import { d as defineCustomElement$
|
9
|
-
import { d as defineCustomElement$
|
10
|
-
import { d as defineCustomElement$
|
11
|
-
import { d as defineCustomElement$
|
12
|
-
import { d as defineCustomElement$
|
13
|
-
import { d as defineCustomElement$
|
14
|
-
import { d as defineCustomElement$
|
5
|
+
import { d as defineCustomElement$d } from './verdocs-button2.js';
|
6
|
+
import { d as defineCustomElement$c } from './verdocs-dialog2.js';
|
7
|
+
import { d as defineCustomElement$b } from './verdocs-help-icon2.js';
|
8
|
+
import { d as defineCustomElement$a } from './verdocs-loader2.js';
|
9
|
+
import { d as defineCustomElement$9 } from './verdocs-select-input2.js';
|
10
|
+
import { d as defineCustomElement$8 } from './verdocs-settings-api-keys2.js';
|
11
|
+
import { d as defineCustomElement$7 } from './verdocs-settings-members2.js';
|
12
|
+
import { d as defineCustomElement$6 } from './verdocs-settings-organization2.js';
|
13
|
+
import { d as defineCustomElement$5 } from './verdocs-settings-profile2.js';
|
14
|
+
import { d as defineCustomElement$4 } from './verdocs-table2.js';
|
15
|
+
import { d as defineCustomElement$3 } from './verdocs-tabs2.js';
|
15
16
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
16
17
|
|
17
18
|
const verdocsSettingsCss = "verdocs-settings{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}";
|
@@ -53,7 +54,7 @@ function defineCustomElement$1() {
|
|
53
54
|
if (typeof customElements === "undefined") {
|
54
55
|
return;
|
55
56
|
}
|
56
|
-
const components = ["verdocs-settings", "verdocs-button", "verdocs-dialog", "verdocs-help-icon", "verdocs-loader", "verdocs-select-input", "verdocs-settings-api-keys", "verdocs-settings-members", "verdocs-settings-organization", "verdocs-settings-profile", "verdocs-table", "verdocs-text-input"];
|
57
|
+
const components = ["verdocs-settings", "verdocs-button", "verdocs-dialog", "verdocs-help-icon", "verdocs-loader", "verdocs-select-input", "verdocs-settings-api-keys", "verdocs-settings-members", "verdocs-settings-organization", "verdocs-settings-profile", "verdocs-table", "verdocs-tabs", "verdocs-text-input"];
|
57
58
|
components.forEach(tagName => { switch (tagName) {
|
58
59
|
case "verdocs-settings":
|
59
60
|
if (!customElements.get(tagName)) {
|
@@ -62,50 +63,55 @@ function defineCustomElement$1() {
|
|
62
63
|
break;
|
63
64
|
case "verdocs-button":
|
64
65
|
if (!customElements.get(tagName)) {
|
65
|
-
defineCustomElement$
|
66
|
+
defineCustomElement$d();
|
66
67
|
}
|
67
68
|
break;
|
68
69
|
case "verdocs-dialog":
|
69
70
|
if (!customElements.get(tagName)) {
|
70
|
-
defineCustomElement$
|
71
|
+
defineCustomElement$c();
|
71
72
|
}
|
72
73
|
break;
|
73
74
|
case "verdocs-help-icon":
|
74
75
|
if (!customElements.get(tagName)) {
|
75
|
-
defineCustomElement$
|
76
|
+
defineCustomElement$b();
|
76
77
|
}
|
77
78
|
break;
|
78
79
|
case "verdocs-loader":
|
79
80
|
if (!customElements.get(tagName)) {
|
80
|
-
defineCustomElement$
|
81
|
+
defineCustomElement$a();
|
81
82
|
}
|
82
83
|
break;
|
83
84
|
case "verdocs-select-input":
|
84
85
|
if (!customElements.get(tagName)) {
|
85
|
-
defineCustomElement$
|
86
|
+
defineCustomElement$9();
|
86
87
|
}
|
87
88
|
break;
|
88
89
|
case "verdocs-settings-api-keys":
|
89
90
|
if (!customElements.get(tagName)) {
|
90
|
-
defineCustomElement$
|
91
|
+
defineCustomElement$8();
|
91
92
|
}
|
92
93
|
break;
|
93
94
|
case "verdocs-settings-members":
|
94
95
|
if (!customElements.get(tagName)) {
|
95
|
-
defineCustomElement$
|
96
|
+
defineCustomElement$7();
|
96
97
|
}
|
97
98
|
break;
|
98
99
|
case "verdocs-settings-organization":
|
99
100
|
if (!customElements.get(tagName)) {
|
100
|
-
defineCustomElement$
|
101
|
+
defineCustomElement$6();
|
101
102
|
}
|
102
103
|
break;
|
103
104
|
case "verdocs-settings-profile":
|
104
105
|
if (!customElements.get(tagName)) {
|
105
|
-
defineCustomElement$
|
106
|
+
defineCustomElement$5();
|
106
107
|
}
|
107
108
|
break;
|
108
109
|
case "verdocs-table":
|
110
|
+
if (!customElements.get(tagName)) {
|
111
|
+
defineCustomElement$4();
|
112
|
+
}
|
113
|
+
break;
|
114
|
+
case "verdocs-tabs":
|
109
115
|
if (!customElements.get(tagName)) {
|
110
116
|
defineCustomElement$3();
|
111
117
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
2
|
|
3
|
-
const verdocsTableCss = "verdocs-table{
|
3
|
+
const verdocsTableCss = "verdocs-table{width:100%;display:block;margin:0 0 10px 0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-table .table-wrapper{margin:10px 0;padding:0}verdocs-table .table{width:100%;border:none;border-collapse:collapse}verdocs-table .row.data-row{border:1px solid #d4d4d8;background-color:#ffffff}verdocs-table .header-col{color:#5c6575;font-weight:600;text-align:left;padding:8px 16px}verdocs-table .data-col{font-weight:400;padding:8px 16px}";
|
4
4
|
|
5
5
|
const VerdocsTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
6
|
constructor() {
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface VerdocsTabs extends Components.VerdocsTabs, HTMLElement {}
|
4
|
+
export const VerdocsTabs: {
|
5
|
+
prototype: VerdocsTabs;
|
6
|
+
new (): VerdocsTabs;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
|
3
|
+
const verdocsTabsCss = "verdocs-tabs{width:100%;height:50px;display:-ms-flexbox;display:flex;color:#72757d;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#e5e5e5;font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.06));filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.06))}verdocs-tabs .tab{height:50px;display:-ms-flexbox;display:flex;cursor:pointer;padding:0 40px;font-size:16px;font-weight:600;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:#e4e4e7}verdocs-tabs .tab.active{color:#707ae5;background-color:#ffffff}verdocs-tabs .tab.disabled{color:#d4d4d8;cursor:default}";
|
4
|
+
|
5
|
+
const VerdocsTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
|
+
constructor() {
|
7
|
+
super();
|
8
|
+
this.__registerHost();
|
9
|
+
this.selectTab = createEvent(this, "selectTab", 7);
|
10
|
+
this.tabs = [];
|
11
|
+
this.defaultTab = 0;
|
12
|
+
this.selectedTab = 0;
|
13
|
+
}
|
14
|
+
componentWillLoad() {
|
15
|
+
this.selectedTab = this.defaultTab || 0;
|
16
|
+
}
|
17
|
+
handleSelectTab(index) {
|
18
|
+
var _a;
|
19
|
+
this.selectedTab = index;
|
20
|
+
(_a = this.selectTab) === null || _a === void 0 ? void 0 : _a.emit({ tab: this.tabs[index], index });
|
21
|
+
}
|
22
|
+
render() {
|
23
|
+
return (h(Host, null, this.tabs.map((tab, index) => (h("div", { class: `tab ${index === this.selectedTab ? 'active' : ''} ${tab.disabled ? 'disabled' : ''}`, onClick: tab.disabled ? () => { } : () => this.handleSelectTab(index) }, tab.label))), h("div", { class: "flex flex-1" }), h("slot", null, h("div", null))));
|
24
|
+
}
|
25
|
+
static get style() { return verdocsTabsCss; }
|
26
|
+
}, [4, "verdocs-tabs", {
|
27
|
+
"tabs": [16],
|
28
|
+
"defaultTab": [2, "default-tab"],
|
29
|
+
"selectedTab": [32]
|
30
|
+
}]);
|
31
|
+
function defineCustomElement() {
|
32
|
+
if (typeof customElements === "undefined") {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
const components = ["verdocs-tabs"];
|
36
|
+
components.forEach(tagName => { switch (tagName) {
|
37
|
+
case "verdocs-tabs":
|
38
|
+
if (!customElements.get(tagName)) {
|
39
|
+
customElements.define(tagName, VerdocsTabs);
|
40
|
+
}
|
41
|
+
break;
|
42
|
+
} });
|
43
|
+
}
|
44
|
+
defineCustomElement();
|
45
|
+
|
46
|
+
export { VerdocsTabs as V, defineCustomElement as d };
|
@@ -15,7 +15,7 @@ import { d as defineCustomElement$3 } from './verdocs-template-star2.js';
|
|
15
15
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
16
16
|
import { f as format } from './index2.js';
|
17
17
|
|
18
|
-
const verdocsTemplatesListCss = "verdocs-templates-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-templates-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .header .filter{width:150px}verdocs-templates-list .header verdocs-text-input{margin:0}verdocs-templates-list .header verdocs-text-input input{height:32px}verdocs-templates-list .filter{-ms-flex-align:center;align-items:center}verdocs-templates-list .template-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-templates-list .template{width:100%;margin:3px 0;border:1px solid #ffffff;background:#ffffff}verdocs-templates-list .template:hover{cursor:pointer;background:#ededff;border:1px solid #a7a7f5}verdocs-templates-list .template .inner{gap:10px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .template .inner svg{width:24px;height:24px}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:16px;margin-left:10px}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{margin:0;height:30px;-ms-flex:0 0 1px;flex:0 0 1px;display:-ms-flexbox;display:flex;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}verdocs-templates-list .empty-text{font-size:20px;text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-templates-list .usage,verdocs-templates-list .ownership,verdocs-templates-list .last-used{gap:10px;color:#444;display:-ms-flexbox;display:flex;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .usage span,verdocs-templates-list .usage svg,verdocs-templates-list .ownership span,verdocs-templates-list .ownership svg,verdocs-templates-list .last-used span,verdocs-templates-list .last-used svg{width:24px;height:24px}verdocs-templates-list .usage span,verdocs-templates-list .ownership span,verdocs-templates-list .last-used span{display:block}verdocs-templates-list .ownership{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-templates-list .last-used{-ms-flex:0 0 130px;flex:0 0 130px}verdocs-templates-list .usage{-ms-flex:0 0 60px;flex:0 0 60px}";
|
18
|
+
const verdocsTemplatesListCss = "verdocs-templates-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-templates-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .header .filter{width:150px}verdocs-templates-list .header verdocs-text-input{margin:0}verdocs-templates-list .header verdocs-text-input input{height:32px}verdocs-templates-list .filter{-ms-flex-align:center;align-items:center}verdocs-templates-list .template-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-templates-list .template{width:100%;margin:3px 0;border:1px solid #ffffff;background:#ffffff}verdocs-templates-list .template:hover{cursor:pointer;background:#ededff;border:1px solid #a7a7f5}verdocs-templates-list .template .inner{gap:10px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .template .inner svg{width:24px;height:24px}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:16px;margin-left:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{margin:0;height:30px;-ms-flex:0 0 1px;flex:0 0 1px;display:-ms-flexbox;display:flex;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}verdocs-templates-list .empty-text{font-size:20px;text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-templates-list .usage,verdocs-templates-list .ownership,verdocs-templates-list .last-used{gap:10px;color:#444;display:-ms-flexbox;display:flex;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-templates-list .usage span,verdocs-templates-list .usage svg,verdocs-templates-list .ownership span,verdocs-templates-list .ownership svg,verdocs-templates-list .last-used span,verdocs-templates-list .last-used svg{width:24px;height:24px}verdocs-templates-list .usage span,verdocs-templates-list .ownership span,verdocs-templates-list .last-used span{display:block}verdocs-templates-list .ownership{-ms-flex:0 0 100px;flex:0 0 100px}@media screen and (max-width: 600px){verdocs-templates-list .ownership{display:none}}verdocs-templates-list .last-used{-ms-flex:0 0 130px;flex:0 0 130px}verdocs-templates-list .usage{-ms-flex:0 0 60px;flex:0 0 60px}";
|
19
19
|
|
20
20
|
const 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>`;
|
21
21
|
const 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>`;
|