@verdocs/web-sdk 2.1.4 → 2.2.1
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/Profiles-244e8254.js +95 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +3 -44
- package/dist/cjs/{verdocs-checkbox_5.cjs.entry.js → verdocs-checkbox_4.cjs.entry.js} +0 -39
- package/dist/cjs/verdocs-help-icon.cjs.entry.js +45 -0
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +4546 -0
- package/dist/cjs/verdocs-settings.cjs.entry.js +42 -0
- package/dist/cjs/verdocs-table.cjs.entry.js +27 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/controls/verdocs-table/verdocs-table.css +25 -0
- package/dist/collection/components/controls/verdocs-table/verdocs-table.js +71 -0
- package/dist/collection/components/controls/verdocs-table/verdocs-table.stories.js +25 -0
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.css +29 -0
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.js +98 -0
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.stories.js +10 -0
- package/dist/collection/components/settings/verdocs-settings-api-keys/verdocs-settings-api-keys.css +38 -0
- package/dist/collection/components/settings/verdocs-settings-api-keys/verdocs-settings-api-keys.js +179 -0
- package/dist/collection/components/settings/verdocs-settings-api-keys/verdocs-settings-api-keys.stories.js +11 -0
- package/dist/collection/components/settings/verdocs-settings-members/verdocs-settings-members.css +38 -0
- package/dist/collection/components/settings/verdocs-settings-members/verdocs-settings-members.js +210 -0
- package/dist/collection/components/settings/verdocs-settings-members/verdocs-settings-members.stories.js +17 -0
- package/dist/collection/components/settings/verdocs-settings-organization/TimeZones.js +144 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.css +33 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.js +226 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.stories.js +13 -0
- package/dist/collection/components/settings/verdocs-settings-profile/verdocs-settings-profile.css +33 -0
- package/dist/collection/components/settings/verdocs-settings-profile/verdocs-settings-profile.js +187 -0
- package/dist/collection/components/settings/verdocs-settings-profile/verdocs-settings-profile.stories.js +13 -0
- package/dist/components/EnvelopeStore.js +1 -1
- package/dist/components/Organizations.js +32 -0
- package/dist/components/Profiles.js +57 -0
- package/dist/components/Strings.js +6 -0
- package/dist/components/TemplateStore.js +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +6 -0
- package/dist/components/index3.js +3979 -168
- package/dist/components/index4.js +194 -0
- package/dist/components/verdocs-auth.js +2 -42
- package/dist/components/verdocs-settings-api-keys.d.ts +11 -0
- package/dist/components/verdocs-settings-api-keys.js +6 -0
- package/dist/components/verdocs-settings-api-keys2.js +108 -0
- package/dist/components/verdocs-settings-members.d.ts +11 -0
- package/dist/components/verdocs-settings-members.js +6 -0
- package/dist/components/verdocs-settings-members2.js +123 -0
- package/dist/components/verdocs-settings-organization.d.ts +11 -0
- package/dist/components/verdocs-settings-organization.js +6 -0
- package/dist/components/verdocs-settings-organization2.js +331 -0
- package/dist/components/verdocs-settings-profile.d.ts +11 -0
- package/dist/components/verdocs-settings-profile.js +6 -0
- package/dist/components/verdocs-settings-profile2.js +142 -0
- package/dist/components/verdocs-settings.d.ts +11 -0
- package/dist/components/verdocs-settings.js +119 -0
- package/dist/components/verdocs-table.d.ts +11 -0
- package/dist/components/verdocs-table.js +6 -0
- package/dist/components/verdocs-table2.js +41 -0
- package/dist/custom-elements.json +1999 -0
- package/dist/docs.json +485 -1
- package/dist/esm/Profiles-7645e6f1.js +88 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -42
- package/dist/esm/{verdocs-checkbox_5.entry.js → verdocs-checkbox_4.entry.js} +1 -39
- package/dist/esm/verdocs-help-icon.entry.js +41 -0
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +4539 -0
- package/dist/esm/verdocs-settings.entry.js +38 -0
- package/dist/esm/verdocs-table.entry.js +23 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Profiles-7645e6f1.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-help-icon.entry.js +1 -0
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-settings.entry.js +1 -0
- package/dist/esm-es5/verdocs-table.entry.js +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-table/verdocs-table.d.ts +21 -0
- package/dist/types/components/controls/verdocs-table/verdocs-table.stories.d.ts +7 -0
- package/dist/types/components/embeds/verdocs-settings/verdocs-settings.d.ts +22 -0
- package/dist/types/components/embeds/verdocs-settings/verdocs-settings.stories.d.ts +4 -0
- package/dist/types/components/settings/verdocs-settings-api-keys/verdocs-settings-api-keys.d.ts +44 -0
- package/dist/types/components/settings/verdocs-settings-api-keys/verdocs-settings-api-keys.stories.d.ts +4 -0
- package/dist/types/components/settings/verdocs-settings-members/verdocs-settings-members.d.ts +43 -0
- package/dist/types/components/settings/verdocs-settings-members/verdocs-settings-members.stories.d.ts +8 -0
- package/dist/types/components/settings/verdocs-settings-organization/TimeZones.d.ts +1 -0
- package/dist/types/components/settings/verdocs-settings-organization/verdocs-settings-organization.d.ts +42 -0
- package/dist/types/components/settings/verdocs-settings-organization/verdocs-settings-organization.stories.d.ts +6 -0
- package/dist/types/components/settings/verdocs-settings-profile/verdocs-settings-profile.d.ts +38 -0
- package/dist/types/components/settings/verdocs-settings-profile/verdocs-settings-profile.stories.d.ts +6 -0
- package/dist/types/components.d.ts +208 -0
- package/dist/verdocs-web-sdk/p-075dc36d.js +1 -0
- package/dist/verdocs-web-sdk/p-144d4ed1.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-268a29a9.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-40361f22.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-7213a107.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-84f9fe5d.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ab26744f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cbebc039.system.js +1 -0
- package/dist/verdocs-web-sdk/p-d309ef6f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-db4cfbfe.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-df90b36d.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e248947e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e9d2b68a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-febebe69.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -2
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-25916fc3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-300a240d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5e5eb075.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b75d3b7f.system.entry.js +0 -1
@@ -0,0 +1,331 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import { z } from './index3.js';
|
3
|
+
import './Types.js';
|
4
|
+
import { g as getOrganization, u as updateOrganization } from './Organizations.js';
|
5
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
6
|
+
import { d as convertToE164 } from './utils.js';
|
7
|
+
import { V as VerdocsToast } from './Toast.js';
|
8
|
+
import { d as defineCustomElement$4 } from './verdocs-button2.js';
|
9
|
+
import { d as defineCustomElement$3 } from './verdocs-help-icon2.js';
|
10
|
+
import { d as defineCustomElement$2 } from './verdocs-select-input2.js';
|
11
|
+
import { d as defineCustomElement$1 } from './verdocs-text-input2.js';
|
12
|
+
|
13
|
+
const TimeZones = [
|
14
|
+
['International Date Line West', 'GMT-11:00', '(GMT-11:00) International Date Line West'],
|
15
|
+
['Midway Island', 'GMT-11:00', '(GMT-11:00) Midway Island'],
|
16
|
+
['Samoa', 'GMT-11:00', '(GMT-11:00) Samoa'],
|
17
|
+
['Hawaii', 'GMT-10:00', '(GMT-10:00) Hawaii'],
|
18
|
+
['Alaska', 'GMT-09:00', '(GMT-09:00) Alaska'],
|
19
|
+
['Pacific Time (US & Canada)', 'GMT-08:00', '(GMT-08:00) Pacific Time (US & Canada)'],
|
20
|
+
['Tijuana', 'GMT-08:00', '(GMT-08:00) Tijuana'],
|
21
|
+
['Arizona', 'GMT-07:00', '(GMT-07:00) Arizona'],
|
22
|
+
['Chihuahua', 'GMT-07:00', '(GMT-07:00) Chihuahua'],
|
23
|
+
['Mazatlan', 'GMT-07:00', '(GMT-07:00) Mazatlan'],
|
24
|
+
['Mountain Time (US & Canada)', 'GMT-07:00', '(GMT-07:00) Mountain Time (US & Canada)'],
|
25
|
+
['Central America', 'GMT-06:00', '(GMT-06:00) Central America'],
|
26
|
+
['Central Time (US & Canada)', 'GMT-06:00', '(GMT-06:00) Central Time (US & Canada)'],
|
27
|
+
['Guadalajara', 'GMT-06:00', '(GMT-06:00) Guadalajara'],
|
28
|
+
['Mexico City', 'GMT-06:00', '(GMT-06:00) Mexico City'],
|
29
|
+
['Monterrey', 'GMT-06:00', '(GMT-06:00) Monterrey'],
|
30
|
+
['Saskatchewan', 'GMT-06:00', '(GMT-06:00) Saskatchewan'],
|
31
|
+
['Bogota', 'GMT-05:00', '(GMT-05:00) Bogota'],
|
32
|
+
['Eastern Time (US & Canada)', 'GMT-05:00', '(GMT-05:00) Eastern Time (US & Canada)'],
|
33
|
+
['Indiana (East)', 'GMT-05:00', '(GMT-05:00) Indiana (East)'],
|
34
|
+
['Lima', 'GMT-05:00', '(GMT-05:00) Lima'],
|
35
|
+
['Quito', 'GMT-05:00', '(GMT-05:00) Quito'],
|
36
|
+
['Caracas', 'GMT-04:30', '(GMT-04:30) Caracas'],
|
37
|
+
['Atlantic Time (Canada)', 'GMT-04:00', '(GMT-04:00) Atlantic Time (Canada)'],
|
38
|
+
['Georgetown', 'GMT-04:00', '(GMT-04:00) Georgetown'],
|
39
|
+
['La Paz', 'GMT-04:00', '(GMT-04:00) La Paz'],
|
40
|
+
['Santiago', 'GMT-04:00', '(GMT-04:00) Santiago'],
|
41
|
+
['Newfoundland', 'GMT-03:30', '(GMT-03:30) Newfoundland'],
|
42
|
+
['Brasilia', 'GMT-03:00', '(GMT-03:00) Brasilia'],
|
43
|
+
['Buenos Aires', 'GMT-03:00', '(GMT-03:00) Buenos Aires'],
|
44
|
+
['Greenland', 'GMT-03:00', '(GMT-03:00) Greenland'],
|
45
|
+
['Mid-Atlantic', 'GMT-02:00', '(GMT-02:00) Mid-Atlantic'],
|
46
|
+
['Azores', 'GMT-01:00', '(GMT-01:00) Azores'],
|
47
|
+
['Cape Verde Is.', 'GMT-01:00', '(GMT-01:00) Cape Verde Is.'],
|
48
|
+
['Casablanca', 'GMT+00:00', '(GMT+00:00) Casablanca'],
|
49
|
+
['Dublin', 'GMT+00:00', '(GMT+00:00) Dublin'],
|
50
|
+
['Edinburgh', 'GMT+00:00', '(GMT+00:00) Edinburgh'],
|
51
|
+
['Lisbon', 'GMT+00:00', '(GMT+00:00) Lisbon'],
|
52
|
+
['London', 'GMT+00:00', '(GMT+00:00) London'],
|
53
|
+
['Monrovia', 'GMT+00:00', '(GMT+00:00) Monrovia'],
|
54
|
+
['UTC', 'GMT+00:00', '(GMT+00:00) UTC'],
|
55
|
+
['Amsterdam', 'GMT+01:00', '(GMT+01:00) Amsterdam'],
|
56
|
+
['Belgrade', 'GMT+01:00', '(GMT+01:00) Belgrade'],
|
57
|
+
['Berlin', 'GMT+01:00', '(GMT+01:00) Berlin'],
|
58
|
+
['Bern', 'GMT+01:00', '(GMT+01:00) Bern'],
|
59
|
+
['Bratislava', 'GMT+01:00', '(GMT+01:00) Bratislava'],
|
60
|
+
['Brussels', 'GMT+01:00', '(GMT+01:00) Brussels'],
|
61
|
+
['Budapest', 'GMT+01:00', '(GMT+01:00) Budapest'],
|
62
|
+
['Copenhagen', 'GMT+01:00', '(GMT+01:00) Copenhagen'],
|
63
|
+
['Ljubljana', 'GMT+01:00', '(GMT+01:00) Ljubljana'],
|
64
|
+
['Madrid', 'GMT+01:00', '(GMT+01:00) Madrid'],
|
65
|
+
['Paris', 'GMT+01:00', '(GMT+01:00) Paris'],
|
66
|
+
['Prague', 'GMT+01:00', '(GMT+01:00) Prague'],
|
67
|
+
['Rome', 'GMT+01:00', '(GMT+01:00) Rome'],
|
68
|
+
['Sarajevo', 'GMT+01:00', '(GMT+01:00) Sarajevo'],
|
69
|
+
['Skopje', 'GMT+01:00', '(GMT+01:00) Skopje'],
|
70
|
+
['Stockholm', 'GMT+01:00', '(GMT+01:00) Stockholm'],
|
71
|
+
['Vienna', 'GMT+01:00', '(GMT+01:00) Vienna'],
|
72
|
+
['Warsaw', 'GMT+01:00', '(GMT+01:00) Warsaw'],
|
73
|
+
['West Central Africa', '(GMT+01:00', '(GMT+01:00) West Central Africa'],
|
74
|
+
['Zagreb', 'GMT+01:00', '(GMT+01:00) Zagreb'],
|
75
|
+
['Athens', 'GMT+02:00', '(GMT+02:00) Athens'],
|
76
|
+
['Bucharest', 'GMT+02:00', '(GMT+02:00) Bucharest'],
|
77
|
+
['Cairo', 'GMT+02:00', '(GMT+02:00) Cairo'],
|
78
|
+
['Harare', 'GMT+02:00', '(GMT+02:00) Harare'],
|
79
|
+
['Helsinki', 'GMT+02:00', '(GMT+02:00) Helsinki'],
|
80
|
+
['Istanbul', 'GMT+02:00', '(GMT+02:00) Istanbul'],
|
81
|
+
['Jerusalem', 'GMT+02:00', '(GMT+02:00) Jerusalem'],
|
82
|
+
['Kyiv', 'GMT+02:00', '(GMT+02:00) Kyiv'],
|
83
|
+
['Minsk', 'GMT+02:00', '(GMT+02:00) Minsk'],
|
84
|
+
['Pretoria', 'GMT+02:00', '(GMT+02:00) Pretoria'],
|
85
|
+
['Riga', 'GMT+02:00', '(GMT+02:00) Riga'],
|
86
|
+
['Sofia', 'GMT+02:00', '(GMT+02:00) Sofia'],
|
87
|
+
['Tallinn', 'GMT+02:00', '(GMT+02:00) Tallinn'],
|
88
|
+
['Vilnius', 'GMT+02:00', '(GMT+02:00) Vilnius'],
|
89
|
+
['Baghdad', 'GMT+03:00', '(GMT+03:00) Baghdad'],
|
90
|
+
['Kuwait', 'GMT+03:00', '(GMT+03:00) Kuwait'],
|
91
|
+
['Moscow', 'GMT+03:00', '(GMT+03:00) Moscow'],
|
92
|
+
['Nairobi', 'GMT+03:00', '(GMT+03:00) Nairobi'],
|
93
|
+
['Riyadh', 'GMT+03:00', '(GMT+03:00) Riyadh'],
|
94
|
+
['St. Petersburg', 'GMT+03:00', '(GMT+03:00) St. Petersburg'],
|
95
|
+
['Volgograd', 'GMT+03:00', '(GMT+03:00) Volgograd'],
|
96
|
+
['Tehran', 'GMT+03:30', '(GMT+03:30) Tehran'],
|
97
|
+
['Abu Dhabi', 'GMT+04:00', '(GMT+04:00) Abu Dhabi'],
|
98
|
+
['Baku', 'GMT+04:00', '(GMT+04:00) Baku'],
|
99
|
+
['Muscat', 'GMT+04:00', '(GMT+04:00) Muscat'],
|
100
|
+
['Tbilisi', 'GMT+04:00', '(GMT+04:00) Tbilisi'],
|
101
|
+
['Yerevan', 'GMT+04:00', '(GMT+04:00) Yerevan'],
|
102
|
+
['Kabul', 'GMT+04:30', '(GMT+04:30) Kabul'],
|
103
|
+
['Ekaterinburg', 'GMT+05:00', '(GMT+05:00) Ekaterinburg'],
|
104
|
+
['Islamabad', 'GMT+05:00', '(GMT+05:00) Islamabad'],
|
105
|
+
['Karachi', 'GMT+05:00', '(GMT+05:00) Karachi'],
|
106
|
+
['Tashkent', 'GMT+05:00', '(GMT+05:00) Tashkent'],
|
107
|
+
['Chennai', 'GMT+05:30', '(GMT+05:30) Chennai'],
|
108
|
+
['Kolkata', 'GMT+05:30', '(GMT+05:30) Kolkata'],
|
109
|
+
['Mumbai', 'GMT+05:30', '(GMT+05:30) Mumbai'],
|
110
|
+
['New Delhi', 'GMT+05:30', '(GMT+05:30) New Delhi'],
|
111
|
+
['Sri Jayawardenepura', 'GMT+05:30', '(GMT+05:30) Sri Jayawardenepura'],
|
112
|
+
['Kathmandu', 'GMT+05:45', '(GMT+05:45) Kathmandu'],
|
113
|
+
['Almaty', 'GMT+06:00', '(GMT+06:00) Almaty'],
|
114
|
+
['Astana', 'GMT+06:00', '(GMT+06:00) Astana'],
|
115
|
+
['Dhaka', 'GMT+06:00', '(GMT+06:00) Dhaka'],
|
116
|
+
['Novosibirsk', 'GMT+06:00', '(GMT+06:00) Novosibirsk'],
|
117
|
+
['Rangoon', 'GMT+06:30', '(GMT+06:30) Rangoon'],
|
118
|
+
['Bangkok', 'GMT+07:00', '(GMT+07:00) Bangkok'],
|
119
|
+
['Hanoi', 'GMT+07:00', '(GMT+07:00) Hanoi'],
|
120
|
+
['Jakarta', 'GMT+07:00', '(GMT+07:00) Jakarta'],
|
121
|
+
['Krasnoyarsk', 'GMT+07:00', '(GMT+07:00) Krasnoyarsk'],
|
122
|
+
['Beijing', 'GMT+08:00', '(GMT+08:00) Beijing'],
|
123
|
+
['Chongqing', 'GMT+08:00', '(GMT+08:00) Chongqing'],
|
124
|
+
['Hong Kong', 'GMT+08:00', '(GMT+08:00) Hong Kong'],
|
125
|
+
['Irkutsk', 'GMT+08:00', '(GMT+08:00) Irkutsk'],
|
126
|
+
['Kuala Lumpur', 'GMT+08:00', '(GMT+08:00) Kuala Lumpur'],
|
127
|
+
['Perth', 'GMT+08:00', '(GMT+08:00) Perth'],
|
128
|
+
['Singapore', 'GMT+08:00', '(GMT+08:00) Singapore'],
|
129
|
+
['Taipei', 'GMT+08:00', '(GMT+08:00) Taipei'],
|
130
|
+
['Ulaan Bataar', 'GMT+08:00', '(GMT+08:00) Ulaan Bataar'],
|
131
|
+
['Urumqi', 'GMT+08:00', '(GMT+08:00) Urumqi'],
|
132
|
+
['Osaka', 'GMT+09:00', '(GMT+09:00) Osaka'],
|
133
|
+
['Sapporo', 'GMT+09:00', '(GMT+09:00) Sapporo'],
|
134
|
+
['Seoul', 'GMT+09:00', '(GMT+09:00) Seoul'],
|
135
|
+
['Tokyo', 'GMT+09:00', '(GMT+09:00) Tokyo'],
|
136
|
+
['Yakutsk', 'GMT+09:00', '(GMT+09:00) Yakutsk'],
|
137
|
+
['Adelaide', 'GMT+09:30', '(GMT+09:30) Adelaide'],
|
138
|
+
['Darwin', 'GMT+09:30', '(GMT+09:30) Darwin'],
|
139
|
+
['Brisbane', 'GMT+10:00', '(GMT+10:00) Brisbane'],
|
140
|
+
['Canberra', 'GMT+10:00', '(GMT+10:00) Canberra'],
|
141
|
+
['Guam', 'GMT+10:00', '(GMT+10:00) Guam'],
|
142
|
+
['Hobart', 'GMT+10:00', '(GMT+10:00) Hobart'],
|
143
|
+
['Melbourne', 'GMT+10:00', '(GMT+10:00) Melbourne'],
|
144
|
+
['Port Moresby', 'GMT+10:00', '(GMT+10:00) Port Moresby'],
|
145
|
+
['Sydney', 'GMT+10:00', '(GMT+10:00) Sydney'],
|
146
|
+
['Vladivostok', 'GMT+10:00', '(GMT+10:00) Vladivostok'],
|
147
|
+
['Kamchatka', 'GMT+11:00', '(GMT+11:00) Kamchatka'],
|
148
|
+
['Magadan', 'GMT+11:00', '(GMT+11:00) Magadan'],
|
149
|
+
['New Caledonia', 'GMT+11:00', '(GMT+11:00) New Caledonia'],
|
150
|
+
['Solomon Is.', 'GMT+11:00', '(GMT+11:00) Solomon Is.'],
|
151
|
+
['Auckland', 'GMT+12:00', '(GMT+12:00) Auckland'],
|
152
|
+
['Fiji', 'GMT+12:00', '(GMT+12:00) Fiji'],
|
153
|
+
['Marshall Is.', 'GMT+12:00', '(GMT+12:00) Marshall Is.'],
|
154
|
+
['Wellington', 'GMT+12:00', '(GMT+12:00) Wellington'],
|
155
|
+
["Nuku'alofa", 'GMT+13:00', "(GMT+13:00) Nuku'alofa"],
|
156
|
+
];
|
157
|
+
|
158
|
+
const verdocsSettingsOrganizationCss = "verdocs-settings-organization{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-organization .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-organization .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-organization verdocs-text-input{margin:10px 0}verdocs-settings-organization verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-organization .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}";
|
159
|
+
|
160
|
+
const timeZoneOptions = TimeZones.map(tz => ({ value: tz[2], label: tz[2] }));
|
161
|
+
const schema = z.object({
|
162
|
+
name: z.string().trim().min(1, 'Name is required').max(30),
|
163
|
+
business_name: z.string().trim().max(30).optional(),
|
164
|
+
contact_email: z.string().trim().email('Invalid email').optional().or(z.literal('')),
|
165
|
+
phone: z.preprocess(val => convertToE164(String(val).trim()), z.string().optional()),
|
166
|
+
address: z.string().trim().max(30).optional(),
|
167
|
+
address2: z.string().trim().max(30).optional(),
|
168
|
+
timezone: z.string().trim().optional(),
|
169
|
+
url: z.string().trim().optional(),
|
170
|
+
});
|
171
|
+
const VerdocsSettingsOrganization = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
172
|
+
constructor() {
|
173
|
+
super();
|
174
|
+
this.__registerHost();
|
175
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
176
|
+
this.organizationUpdated = createEvent(this, "organizationUpdated", 7);
|
177
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
178
|
+
this.valid = false;
|
179
|
+
this.dirty = false;
|
180
|
+
this.submitting = false;
|
181
|
+
this.name = '';
|
182
|
+
this.business_name = '';
|
183
|
+
this.contact_email = '';
|
184
|
+
this.phone = '';
|
185
|
+
this.address = '';
|
186
|
+
this.address2 = '';
|
187
|
+
this.timezone = '';
|
188
|
+
this.url = '';
|
189
|
+
}
|
190
|
+
componentWillLoad() {
|
191
|
+
this.endpoint.loadSession();
|
192
|
+
if (!this.endpoint.session) {
|
193
|
+
console.log('[SETTINGS] Must be authenticated');
|
194
|
+
return;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
async componentDidLoad() {
|
198
|
+
const organization = await getOrganization(this.endpoint, this.endpoint.session.organization_id);
|
199
|
+
console.log('[SETTINGS] Loaded organization', organization);
|
200
|
+
this.resetForm(organization);
|
201
|
+
}
|
202
|
+
resetForm(organization) {
|
203
|
+
this.name = organization.name;
|
204
|
+
this.business_name = organization.business_name;
|
205
|
+
this.contact_email = organization.contact_email;
|
206
|
+
this.phone = organization.phone;
|
207
|
+
this.address = organization.address;
|
208
|
+
this.address2 = organization.address2;
|
209
|
+
this.timezone = organization.timezone;
|
210
|
+
this.url = organization.url;
|
211
|
+
this.dirty = false;
|
212
|
+
this.valid = true;
|
213
|
+
}
|
214
|
+
handleSubmit(e) {
|
215
|
+
e.preventDefault();
|
216
|
+
e.stopPropagation();
|
217
|
+
updateOrganization(VerdocsEndpoint.getDefault(), this.endpoint.session.organization_id, {
|
218
|
+
name: this.name,
|
219
|
+
business_name: this.business_name,
|
220
|
+
contact_email: this.contact_email,
|
221
|
+
phone: this.phone,
|
222
|
+
address: this.address,
|
223
|
+
address2: this.address2,
|
224
|
+
timezone: this.timezone,
|
225
|
+
url: this.url,
|
226
|
+
})
|
227
|
+
.then(newOrganization => {
|
228
|
+
var _a;
|
229
|
+
console.log('[SETTINGS] Update result', newOrganization);
|
230
|
+
(_a = this.organizationUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, organization: newOrganization });
|
231
|
+
this.resetForm(newOrganization);
|
232
|
+
})
|
233
|
+
.catch(e => VerdocsToast(`Error updating organization: ${e.message}`, { style: 'error' }));
|
234
|
+
}
|
235
|
+
processFields() {
|
236
|
+
const validation = schema.safeParse({
|
237
|
+
name: this.name,
|
238
|
+
business_name: this.business_name,
|
239
|
+
contact_email: this.contact_email,
|
240
|
+
phone: this.phone,
|
241
|
+
address: this.address,
|
242
|
+
address2: this.address2,
|
243
|
+
timezone: this.timezone,
|
244
|
+
url: this.url,
|
245
|
+
});
|
246
|
+
console.log('[SETTINGS] Validation result', validation);
|
247
|
+
this.valid = validation.success;
|
248
|
+
this.dirty = true;
|
249
|
+
}
|
250
|
+
render() {
|
251
|
+
if (!this.endpoint.session) {
|
252
|
+
console.log('[SETTINGS] Must be authenticated');
|
253
|
+
return h(Host, { class: "authentication-required" }, "Must be authenticated");
|
254
|
+
}
|
255
|
+
return (h(Host, null, h("h1", null, "Organization Profile"), h("form", { onSubmit: e => this.handleSubmit(e) }, h("div", { class: "columns" }, h("div", { class: "column" }, h("verdocs-text-input", { id: "verdocs-organization-name", value: this.name, autocomplete: "off", label: "Name", required: true, placeholder: "Enter your organization's name...", onInput: (e) => (this.name = e.target.value), onFocusout: (e) => {
|
256
|
+
this.name = e.target.value.trim();
|
257
|
+
this.processFields();
|
258
|
+
} }), h("verdocs-text-input", { id: "verdocs-organization-business-name", value: this.business_name, autocomplete: "off", label: "d/b/a", placeholder: "Enter your d/b/a, if any...", onInput: (e) => (this.business_name = e.target.value), onFocusout: (e) => {
|
259
|
+
this.business_name = e.target.value.trim();
|
260
|
+
this.processFields();
|
261
|
+
} }), h("verdocs-text-input", { id: "verdocs-organization-url", value: this.url, autocomplete: "off", label: "Web URL", placeholder: "Enter your Web URL...", onInput: (e) => (this.url = e.target.value), onFocusout: (e) => {
|
262
|
+
this.url = e.target.value.trim();
|
263
|
+
this.processFields();
|
264
|
+
} }), h("verdocs-text-input", { id: "verdocs-organization-phone", value: this.phone, autocomplete: "off", label: "Phone Number", placeholder: "Enter your phone number...", onInput: (e) => (this.phone = e.target.value), onFocusout: (e) => {
|
265
|
+
this.phone = e.target.value.trim();
|
266
|
+
this.processFields();
|
267
|
+
} })), h("div", { class: "column" }, h("verdocs-text-input", { id: "verdocs-organization-address", value: this.address, autocomplete: "off", label: "Address", required: true, placeholder: "Enter your address...", onInput: (e) => (this.address = e.target.value), onFocusout: (e) => {
|
268
|
+
this.address = e.target.value.trim();
|
269
|
+
this.processFields();
|
270
|
+
} }), h("verdocs-text-input", { id: "verdocs-organization-address", value: this.address2, autocomplete: "off", label: "Address 2", required: true, placeholder: "Address line 2...", onInput: (e) => (this.address2 = e.target.value), onFocusout: (e) => {
|
271
|
+
this.address2 = e.target.value.trim();
|
272
|
+
this.processFields();
|
273
|
+
} }), h("verdocs-text-input", { id: "verdocs-organization-address2", value: this.address2, clearable: true, autocomplete: "off", label: "Address 2", placeholder: "Enter your address...", onInput: (e) => (this.address2 = e.target.value), onFocusout: (e) => {
|
274
|
+
this.address2 = e.target.value.trim();
|
275
|
+
this.processFields();
|
276
|
+
} }), h("verdocs-text-input", { id: "verdocs-organization-email", value: this.contact_email, clearable: true, autocomplete: "off", label: "Contact Email", placeholder: "Enter your contact email address...", onInput: (e) => (this.contact_email = e.target.value), onFocusout: (e) => {
|
277
|
+
this.contact_email = e.target.value.trim();
|
278
|
+
this.processFields();
|
279
|
+
} }), h("verdocs-select-input", { options: timeZoneOptions, value: this.timezone, label: "Time Zone" }))), h("verdocs-button", { type: "submit", label: "Save", size: "normal", disabled: this.submitting || !this.dirty }))));
|
280
|
+
}
|
281
|
+
static get style() { return verdocsSettingsOrganizationCss; }
|
282
|
+
}, [0, "verdocs-settings-organization", {
|
283
|
+
"endpoint": [16],
|
284
|
+
"valid": [32],
|
285
|
+
"dirty": [32],
|
286
|
+
"submitting": [32],
|
287
|
+
"name": [32],
|
288
|
+
"business_name": [32],
|
289
|
+
"contact_email": [32],
|
290
|
+
"phone": [32],
|
291
|
+
"address": [32],
|
292
|
+
"address2": [32],
|
293
|
+
"timezone": [32],
|
294
|
+
"url": [32]
|
295
|
+
}]);
|
296
|
+
function defineCustomElement() {
|
297
|
+
if (typeof customElements === "undefined") {
|
298
|
+
return;
|
299
|
+
}
|
300
|
+
const components = ["verdocs-settings-organization", "verdocs-button", "verdocs-help-icon", "verdocs-select-input", "verdocs-text-input"];
|
301
|
+
components.forEach(tagName => { switch (tagName) {
|
302
|
+
case "verdocs-settings-organization":
|
303
|
+
if (!customElements.get(tagName)) {
|
304
|
+
customElements.define(tagName, VerdocsSettingsOrganization);
|
305
|
+
}
|
306
|
+
break;
|
307
|
+
case "verdocs-button":
|
308
|
+
if (!customElements.get(tagName)) {
|
309
|
+
defineCustomElement$4();
|
310
|
+
}
|
311
|
+
break;
|
312
|
+
case "verdocs-help-icon":
|
313
|
+
if (!customElements.get(tagName)) {
|
314
|
+
defineCustomElement$3();
|
315
|
+
}
|
316
|
+
break;
|
317
|
+
case "verdocs-select-input":
|
318
|
+
if (!customElements.get(tagName)) {
|
319
|
+
defineCustomElement$2();
|
320
|
+
}
|
321
|
+
break;
|
322
|
+
case "verdocs-text-input":
|
323
|
+
if (!customElements.get(tagName)) {
|
324
|
+
defineCustomElement$1();
|
325
|
+
}
|
326
|
+
break;
|
327
|
+
} });
|
328
|
+
}
|
329
|
+
defineCustomElement();
|
330
|
+
|
331
|
+
export { VerdocsSettingsOrganization as V, defineCustomElement as d };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface VerdocsSettingsProfile extends Components.VerdocsSettingsProfile, HTMLElement {}
|
4
|
+
export const VerdocsSettingsProfile: {
|
5
|
+
prototype: VerdocsSettingsProfile;
|
6
|
+
new (): VerdocsSettingsProfile;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { V as VerdocsSettingsProfile$1, d as defineCustomElement$1 } from './verdocs-settings-profile2.js';
|
2
|
+
|
3
|
+
const VerdocsSettingsProfile = VerdocsSettingsProfile$1;
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
5
|
+
|
6
|
+
export { VerdocsSettingsProfile, defineCustomElement };
|
@@ -0,0 +1,142 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import { z } from './index3.js';
|
3
|
+
import { g as getCurrentProfile, u as updateProfile } from './Profiles.js';
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
5
|
+
import './Types.js';
|
6
|
+
import { d as convertToE164 } from './utils.js';
|
7
|
+
import { V as VerdocsToast } from './Toast.js';
|
8
|
+
import { d as defineCustomElement$3 } from './verdocs-button2.js';
|
9
|
+
import { d as defineCustomElement$2 } from './verdocs-help-icon2.js';
|
10
|
+
import { d as defineCustomElement$1 } from './verdocs-text-input2.js';
|
11
|
+
|
12
|
+
const verdocsSettingsProfileCss = "verdocs-settings-profile{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-profile .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-profile .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-profile verdocs-text-input{margin:10px 0}verdocs-settings-profile verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-profile .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}";
|
13
|
+
|
14
|
+
const schema = z.object({
|
15
|
+
first_name: z.string().trim().min(1, 'First name is required').max(30),
|
16
|
+
last_name: z.string().trim().min(1, 'Last name is required').max(30),
|
17
|
+
email: z.string().trim().email('Invalid email').min(1, 'Email is required'),
|
18
|
+
phone: z.preprocess(val => convertToE164(String(val).trim()), z.string()),
|
19
|
+
});
|
20
|
+
const VerdocsSettingsProfile = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
21
|
+
constructor() {
|
22
|
+
super();
|
23
|
+
this.__registerHost();
|
24
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
25
|
+
this.profileUpdated = createEvent(this, "profileUpdated", 7);
|
26
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
27
|
+
this.valid = false;
|
28
|
+
this.dirty = false;
|
29
|
+
this.submitting = false;
|
30
|
+
this.first_name = '';
|
31
|
+
this.last_name = '';
|
32
|
+
this.email = '';
|
33
|
+
this.phone = '';
|
34
|
+
}
|
35
|
+
componentWillLoad() {
|
36
|
+
this.endpoint.loadSession();
|
37
|
+
if (!this.endpoint.session) {
|
38
|
+
console.log('[SETTINGS] Must be authenticated');
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
async componentDidLoad() {
|
43
|
+
const profile = await getCurrentProfile(this.endpoint);
|
44
|
+
console.log('[SETTINGS] Loaded profile', profile);
|
45
|
+
this.resetForm(profile);
|
46
|
+
}
|
47
|
+
resetForm(profile) {
|
48
|
+
this.first_name = profile.first_name;
|
49
|
+
this.last_name = profile.last_name;
|
50
|
+
this.email = profile.email;
|
51
|
+
this.phone = profile.phone;
|
52
|
+
this.dirty = false;
|
53
|
+
this.valid = true;
|
54
|
+
}
|
55
|
+
handleSubmit(e) {
|
56
|
+
e.preventDefault();
|
57
|
+
e.stopPropagation();
|
58
|
+
updateProfile(VerdocsEndpoint.getDefault(), this.endpoint.session.profile_id, {
|
59
|
+
first_name: this.first_name,
|
60
|
+
last_name: this.last_name,
|
61
|
+
phone: this.phone,
|
62
|
+
})
|
63
|
+
.then(newProfile => {
|
64
|
+
var _a;
|
65
|
+
console.log('[SETTINGS] Update result', newProfile);
|
66
|
+
(_a = this.profileUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, profile: newProfile });
|
67
|
+
this.resetForm(newProfile);
|
68
|
+
})
|
69
|
+
.catch(e => VerdocsToast(`Error updating profile: ${e.message}`, { style: 'error' }));
|
70
|
+
}
|
71
|
+
processFields() {
|
72
|
+
const validation = schema.safeParse({
|
73
|
+
first_name: this.first_name,
|
74
|
+
last_name: this.last_name,
|
75
|
+
email: this.email,
|
76
|
+
phone: this.phone,
|
77
|
+
});
|
78
|
+
console.log('[SETTINGS] Validation result', validation);
|
79
|
+
this.valid = validation.success;
|
80
|
+
this.dirty = true;
|
81
|
+
}
|
82
|
+
render() {
|
83
|
+
if (!this.endpoint.session) {
|
84
|
+
console.log('[SETTINGS] Must be authenticated');
|
85
|
+
return h(Host, { class: "authentication-required" }, "Must be authenticated");
|
86
|
+
}
|
87
|
+
return (h(Host, null, h("h1", null, "My Profile"), h("form", { onSubmit: e => this.handleSubmit(e) }, h("div", { class: "columns" }, h("div", { class: "column" }, h("verdocs-text-input", { id: "verdocs-profile-first-name", value: this.first_name, autocomplete: "off", label: "First Name", required: true, placeholder: "Enter your first name...", onInput: (e) => (this.first_name = e.target.value), onFocusout: (e) => {
|
88
|
+
this.first_name = e.target.value.trim();
|
89
|
+
this.processFields();
|
90
|
+
} }), h("verdocs-text-input", { id: "verdocs-profile-last-name", value: this.last_name, autocomplete: "off", label: "Last Name", required: true, placeholder: "Enter your last name...", onInput: (e) => (this.last_name = e.target.value), onFocusout: (e) => {
|
91
|
+
this.last_name = e.target.value.trim();
|
92
|
+
this.processFields();
|
93
|
+
} })), h("div", { class: "column" }, h("verdocs-text-input", { id: "verdocs-profile-email", value: this.email, autocomplete: "off", label: "Email Address", required: true, disabled: true, placeholder: "Enter your email address...", onInput: (e) => (this.email = e.target.value), onFocusout: (e) => {
|
94
|
+
this.email = e.target.value.trim();
|
95
|
+
this.processFields();
|
96
|
+
} }), h("verdocs-text-input", { id: "verdocs-profile-phone", value: this.phone, clearable: true, autocomplete: "off", label: "Phone Number", placeholder: "Enter your phone number...", onInput: (e) => (this.phone = e.target.value), onFocusout: (e) => {
|
97
|
+
this.phone = e.target.value.trim();
|
98
|
+
this.processFields();
|
99
|
+
} }))), h("verdocs-button", { type: "submit", label: "Save", size: "normal", disabled: this.submitting || !this.dirty }))));
|
100
|
+
}
|
101
|
+
static get style() { return verdocsSettingsProfileCss; }
|
102
|
+
}, [0, "verdocs-settings-profile", {
|
103
|
+
"endpoint": [16],
|
104
|
+
"valid": [32],
|
105
|
+
"dirty": [32],
|
106
|
+
"submitting": [32],
|
107
|
+
"first_name": [32],
|
108
|
+
"last_name": [32],
|
109
|
+
"email": [32],
|
110
|
+
"phone": [32]
|
111
|
+
}]);
|
112
|
+
function defineCustomElement() {
|
113
|
+
if (typeof customElements === "undefined") {
|
114
|
+
return;
|
115
|
+
}
|
116
|
+
const components = ["verdocs-settings-profile", "verdocs-button", "verdocs-help-icon", "verdocs-text-input"];
|
117
|
+
components.forEach(tagName => { switch (tagName) {
|
118
|
+
case "verdocs-settings-profile":
|
119
|
+
if (!customElements.get(tagName)) {
|
120
|
+
customElements.define(tagName, VerdocsSettingsProfile);
|
121
|
+
}
|
122
|
+
break;
|
123
|
+
case "verdocs-button":
|
124
|
+
if (!customElements.get(tagName)) {
|
125
|
+
defineCustomElement$3();
|
126
|
+
}
|
127
|
+
break;
|
128
|
+
case "verdocs-help-icon":
|
129
|
+
if (!customElements.get(tagName)) {
|
130
|
+
defineCustomElement$2();
|
131
|
+
}
|
132
|
+
break;
|
133
|
+
case "verdocs-text-input":
|
134
|
+
if (!customElements.get(tagName)) {
|
135
|
+
defineCustomElement$1();
|
136
|
+
}
|
137
|
+
break;
|
138
|
+
} });
|
139
|
+
}
|
140
|
+
defineCustomElement();
|
141
|
+
|
142
|
+
export { VerdocsSettingsProfile as V, defineCustomElement as d };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface VerdocsSettings extends Components.VerdocsSettings, HTMLElement {}
|
4
|
+
export const VerdocsSettings: {
|
5
|
+
prototype: VerdocsSettings;
|
6
|
+
new (): VerdocsSettings;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,119 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import './Types.js';
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
4
|
+
import { S as SDKError } from './errors.js';
|
5
|
+
import { d as defineCustomElement$b } from './verdocs-button2.js';
|
6
|
+
import { d as defineCustomElement$a } from './verdocs-help-icon2.js';
|
7
|
+
import { d as defineCustomElement$9 } from './verdocs-loader2.js';
|
8
|
+
import { d as defineCustomElement$8 } from './verdocs-select-input2.js';
|
9
|
+
import { d as defineCustomElement$7 } from './verdocs-settings-api-keys2.js';
|
10
|
+
import { d as defineCustomElement$6 } from './verdocs-settings-members2.js';
|
11
|
+
import { d as defineCustomElement$5 } from './verdocs-settings-organization2.js';
|
12
|
+
import { d as defineCustomElement$4 } from './verdocs-settings-profile2.js';
|
13
|
+
import { d as defineCustomElement$3 } from './verdocs-table2.js';
|
14
|
+
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
15
|
+
|
16
|
+
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}";
|
17
|
+
|
18
|
+
const VerdocsSettings$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
19
|
+
constructor() {
|
20
|
+
super();
|
21
|
+
this.__registerHost();
|
22
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
23
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
24
|
+
this.tab = 'profile';
|
25
|
+
}
|
26
|
+
async componentWillLoad() {
|
27
|
+
var _a, _b, _c;
|
28
|
+
try {
|
29
|
+
this.endpoint.loadSession();
|
30
|
+
if (!this.endpoint.session) {
|
31
|
+
console.log('[SETTINGS] Unable to start session, must be authenticated');
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
catch (e) {
|
36
|
+
console.log('[SETTINGS] Error with session', e);
|
37
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
38
|
+
}
|
39
|
+
}
|
40
|
+
render() {
|
41
|
+
if (!this.endpoint.session) {
|
42
|
+
return (h(Host, null, h("verdocs-loader", null)));
|
43
|
+
}
|
44
|
+
return (h(Host, null, h("div", { class: "tabs" }, h("div", { class: `tab ${this.tab === 'profile' ? 'active' : ''}`, onClick: () => (this.tab = 'profile') }, "Profile"), h("div", { class: `tab ${this.tab === 'organization' ? 'active' : ''}`, onClick: () => (this.tab = 'organization') }, "Organization"), h("div", { class: `tab ${this.tab === 'members' ? 'active' : ''}`, onClick: () => (this.tab = 'members') }, "Members"), h("div", { class: `tab ${this.tab === 'apikeys' ? 'active' : ''}`, onClick: () => (this.tab = 'apikeys') }, "API Keys")), this.tab === 'profile' && h("verdocs-settings-profile", { endpoint: this.endpoint }), this.tab === 'organization' && h("verdocs-settings-organization", { endpoint: this.endpoint }), this.tab === 'members' && h("verdocs-settings-members", { endpoint: this.endpoint }), this.tab === 'apikeys' && h("verdocs-settings-api-keys", { endpoint: this.endpoint })));
|
45
|
+
}
|
46
|
+
static get style() { return verdocsSettingsCss; }
|
47
|
+
}, [0, "verdocs-settings", {
|
48
|
+
"endpoint": [16],
|
49
|
+
"tab": [32]
|
50
|
+
}]);
|
51
|
+
function defineCustomElement$1() {
|
52
|
+
if (typeof customElements === "undefined") {
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
const components = ["verdocs-settings", "verdocs-button", "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"];
|
56
|
+
components.forEach(tagName => { switch (tagName) {
|
57
|
+
case "verdocs-settings":
|
58
|
+
if (!customElements.get(tagName)) {
|
59
|
+
customElements.define(tagName, VerdocsSettings$1);
|
60
|
+
}
|
61
|
+
break;
|
62
|
+
case "verdocs-button":
|
63
|
+
if (!customElements.get(tagName)) {
|
64
|
+
defineCustomElement$b();
|
65
|
+
}
|
66
|
+
break;
|
67
|
+
case "verdocs-help-icon":
|
68
|
+
if (!customElements.get(tagName)) {
|
69
|
+
defineCustomElement$a();
|
70
|
+
}
|
71
|
+
break;
|
72
|
+
case "verdocs-loader":
|
73
|
+
if (!customElements.get(tagName)) {
|
74
|
+
defineCustomElement$9();
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
case "verdocs-select-input":
|
78
|
+
if (!customElements.get(tagName)) {
|
79
|
+
defineCustomElement$8();
|
80
|
+
}
|
81
|
+
break;
|
82
|
+
case "verdocs-settings-api-keys":
|
83
|
+
if (!customElements.get(tagName)) {
|
84
|
+
defineCustomElement$7();
|
85
|
+
}
|
86
|
+
break;
|
87
|
+
case "verdocs-settings-members":
|
88
|
+
if (!customElements.get(tagName)) {
|
89
|
+
defineCustomElement$6();
|
90
|
+
}
|
91
|
+
break;
|
92
|
+
case "verdocs-settings-organization":
|
93
|
+
if (!customElements.get(tagName)) {
|
94
|
+
defineCustomElement$5();
|
95
|
+
}
|
96
|
+
break;
|
97
|
+
case "verdocs-settings-profile":
|
98
|
+
if (!customElements.get(tagName)) {
|
99
|
+
defineCustomElement$4();
|
100
|
+
}
|
101
|
+
break;
|
102
|
+
case "verdocs-table":
|
103
|
+
if (!customElements.get(tagName)) {
|
104
|
+
defineCustomElement$3();
|
105
|
+
}
|
106
|
+
break;
|
107
|
+
case "verdocs-text-input":
|
108
|
+
if (!customElements.get(tagName)) {
|
109
|
+
defineCustomElement$2();
|
110
|
+
}
|
111
|
+
break;
|
112
|
+
} });
|
113
|
+
}
|
114
|
+
defineCustomElement$1();
|
115
|
+
|
116
|
+
const VerdocsSettings = VerdocsSettings$1;
|
117
|
+
const defineCustomElement = defineCustomElement$1;
|
118
|
+
|
119
|
+
export { VerdocsSettings, defineCustomElement };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface VerdocsTable extends Components.VerdocsTable, HTMLElement {}
|
4
|
+
export const VerdocsTable: {
|
5
|
+
prototype: VerdocsTable;
|
6
|
+
new (): VerdocsTable;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|