@docuninja/builder2.0 0.0.65
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/README.md +32 -0
- package/dist/builder/builder-store.d.ts +54 -0
- package/dist/builder/cache-store.d.ts +12 -0
- package/dist/builder/component-types.d.ts +149 -0
- package/dist/builder/helpers.d.ts +9 -0
- package/dist/builder/hooks/use-cookie-consent-height.d.ts +1 -0
- package/dist/builder/hooks/use-label-position.d.ts +3 -0
- package/dist/builder/index.d.ts +97 -0
- package/dist/builder/password-files.d.ts +3 -0
- package/dist/builder/pdf-worker.d.ts +2 -0
- package/dist/builder/root.d.ts +2 -0
- package/dist/builder/sensor.d.ts +14 -0
- package/dist/builder/sign/actions.d.ts +21 -0
- package/dist/builder/sign/checkbox-panel.d.ts +5 -0
- package/dist/builder/sign/component-types.d.ts +68 -0
- package/dist/builder/sign/consent.d.ts +7 -0
- package/dist/builder/sign/date-panel.d.ts +5 -0
- package/dist/builder/sign/file.d.ts +10 -0
- package/dist/builder/sign/font-selector.d.ts +6 -0
- package/dist/builder/sign/fonts.d.ts +1 -0
- package/dist/builder/sign/index.d.ts +50 -0
- package/dist/builder/sign/initials-panel.d.ts +5 -0
- package/dist/builder/sign/initials-signature-panel.d.ts +6 -0
- package/dist/builder/sign/multiselect-panel.d.ts +5 -0
- package/dist/builder/sign/number-panel.d.ts +5 -0
- package/dist/builder/sign/radio-panel.d.ts +5 -0
- package/dist/builder/sign/select-panel.d.ts +5 -0
- package/dist/builder/sign/sign-panel.d.ts +5 -0
- package/dist/builder/sign/signature.d.ts +6 -0
- package/dist/builder/sign/success.d.ts +3 -0
- package/dist/builder/sign/text-panel.d.ts +5 -0
- package/dist/builder/sign/voided.d.ts +1 -0
- package/dist/builder/sign-store.d.ts +49 -0
- package/dist/builder/standalone.d.ts +13 -0
- package/dist/builder/types/api.d.ts +352 -0
- package/dist/builder/ui/delete.d.ts +7 -0
- package/dist/builder/ui/document.d.ts +5 -0
- package/dist/builder/ui/editable.d.ts +7 -0
- package/dist/builder/ui/files.d.ts +6 -0
- package/dist/builder/ui/frame.d.ts +1 -0
- package/dist/builder/ui/index.d.ts +124 -0
- package/dist/builder/ui/index.iife.d.ts +2 -0
- package/dist/builder/ui/options-modal.d.ts +11 -0
- package/dist/builder/ui/preview.d.ts +7 -0
- package/dist/builder/ui/rectangles.d.ts +9 -0
- package/dist/builder/ui/save.d.ts +11 -0
- package/dist/builder/ui/send-confirmation.d.ts +9 -0
- package/dist/builder/ui/settings-modal.d.ts +10 -0
- package/dist/builder/ui/signatories.d.ts +23 -0
- package/dist/builder/ui/signatory.d.ts +51 -0
- package/dist/builder/ui/title.d.ts +7 -0
- package/dist/builder/ui/toolbox-context.d.ts +14 -0
- package/dist/builder/ui/toolbox.d.ts +3 -0
- package/dist/builder/ui/upload.d.ts +16 -0
- package/dist/builder/ui/validation-errors.d.ts +5 -0
- package/dist/builder/ui/websockets.d.ts +38 -0
- package/dist/builder/websocket-manager.d.ts +75 -0
- package/dist/builder/websockets-store.d.ts +20 -0
- package/dist/builder.d.ts +963 -0
- package/dist/builder.es.js +51357 -0
- package/dist/builder.iife.js +294 -0
- package/dist/builder2.0.css +1 -0
- package/dist/builder2.0.standalone.css +2 -0
- package/dist/index.iife.min-CUOWEcLA.js +184 -0
- package/package.json +93 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ClientContact, User } from './types/api';
|
|
2
|
+
type State = {
|
|
3
|
+
temporarySignature: string | null;
|
|
4
|
+
temporaryInitials: string | null;
|
|
5
|
+
signatures: Record<string, string | null>;
|
|
6
|
+
dates: Record<string, string>;
|
|
7
|
+
inputs: Record<string, string>;
|
|
8
|
+
inputErrors: Record<string, string | null>;
|
|
9
|
+
checkboxes: Record<string, boolean>;
|
|
10
|
+
initials: Record<string, string>;
|
|
11
|
+
selects: Record<string, string>;
|
|
12
|
+
selectErrors: Record<string, string | null>;
|
|
13
|
+
radios: Record<string, string>;
|
|
14
|
+
radioErrors: Record<string, string | null>;
|
|
15
|
+
multiselects: Record<string, string[]>;
|
|
16
|
+
multiselectErrors: Record<string, string | null>;
|
|
17
|
+
numbers: Record<string, string>;
|
|
18
|
+
numberErrors: Record<string, string | null>;
|
|
19
|
+
signatory: User | ClientContact | null;
|
|
20
|
+
};
|
|
21
|
+
type Actions = {
|
|
22
|
+
createOrUpdateSignature: (id: string, signature: string | null) => void;
|
|
23
|
+
findSignature: (id: string) => string | null;
|
|
24
|
+
updateTemporarySignature: (signature: string) => void;
|
|
25
|
+
updateTemporaryInitials: (initials: string) => void;
|
|
26
|
+
createOrUpdateDate: (id: string, value: string) => void;
|
|
27
|
+
createOrUpdateInput: (id: string, value: string) => void;
|
|
28
|
+
setInputError: (id: string, error: string | null) => void;
|
|
29
|
+
createOrUpdateCheckbox: (id: string, value: boolean) => void;
|
|
30
|
+
createOrUpdateInitials: (id: string, value: string) => void;
|
|
31
|
+
findInitials: (id: string) => string | null;
|
|
32
|
+
createOrUpdateSelect: (id: string, value: string) => void;
|
|
33
|
+
findSelect: (id: string) => string | null;
|
|
34
|
+
setSelectError: (id: string, error: string | null) => void;
|
|
35
|
+
createOrUpdateRadio: (id: string, value: string) => void;
|
|
36
|
+
findRadio: (id: string) => string | null;
|
|
37
|
+
setRadioError: (id: string, error: string | null) => void;
|
|
38
|
+
createOrUpdateMultiselect: (id: string, values: string[]) => void;
|
|
39
|
+
findMultiselect: (id: string) => string[] | null;
|
|
40
|
+
setMultiselectError: (id: string, error: string | null) => void;
|
|
41
|
+
createOrUpdateNumber: (id: string, value: string) => void;
|
|
42
|
+
findNumber: (id: string) => string | null;
|
|
43
|
+
setNumberError: (id: string, error: string | null) => void;
|
|
44
|
+
updateSignatory: (user: User | ClientContact) => void;
|
|
45
|
+
resetAllSigningData: () => void;
|
|
46
|
+
};
|
|
47
|
+
export type SignStore = State & Actions;
|
|
48
|
+
export declare const useSignStore: import('zustand').UseBoundStore<import('zustand').StoreApi<SignStore>>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type DocuNinjaSignOptions = {
|
|
2
|
+
document: string;
|
|
3
|
+
invitation: string;
|
|
4
|
+
sig?: string;
|
|
5
|
+
endpoint?: string;
|
|
6
|
+
company?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class DocuNinjaSign {
|
|
9
|
+
options: DocuNinjaSignOptions;
|
|
10
|
+
constructor(options: DocuNinjaSignOptions);
|
|
11
|
+
mount(element: HTMLDivElement): void;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
export interface GenericSingleResponse<T> {
|
|
2
|
+
data: T;
|
|
3
|
+
}
|
|
4
|
+
export interface GenericManyResponse<T> {
|
|
5
|
+
data: T[];
|
|
6
|
+
links: {
|
|
7
|
+
first: string;
|
|
8
|
+
last: string;
|
|
9
|
+
prev: string | null;
|
|
10
|
+
next: string | null;
|
|
11
|
+
};
|
|
12
|
+
meta: {
|
|
13
|
+
current_page: number;
|
|
14
|
+
from: string | null;
|
|
15
|
+
last_page: number;
|
|
16
|
+
links: {
|
|
17
|
+
url: string | null;
|
|
18
|
+
label: string;
|
|
19
|
+
active: boolean;
|
|
20
|
+
}[];
|
|
21
|
+
path: string;
|
|
22
|
+
per_page: number;
|
|
23
|
+
to: string | null;
|
|
24
|
+
total: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type WithSignerToken<T> = T & {
|
|
28
|
+
"X-Signer-Token": string;
|
|
29
|
+
"X-Signer-Token-Expires": string;
|
|
30
|
+
};
|
|
31
|
+
export interface Company {
|
|
32
|
+
id: string;
|
|
33
|
+
account_id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
address1: string;
|
|
36
|
+
address2: string;
|
|
37
|
+
city: string;
|
|
38
|
+
state: string;
|
|
39
|
+
postal_code: string;
|
|
40
|
+
country_id: string;
|
|
41
|
+
currency_id: string;
|
|
42
|
+
language_id: string;
|
|
43
|
+
timezone_id: string;
|
|
44
|
+
subdomain: string;
|
|
45
|
+
website: string;
|
|
46
|
+
logo: string;
|
|
47
|
+
role: string;
|
|
48
|
+
onboarding_completed_at: string;
|
|
49
|
+
created_at: string;
|
|
50
|
+
updated_at: string;
|
|
51
|
+
users?: User[];
|
|
52
|
+
pivot?: CompanyUser | null;
|
|
53
|
+
documents?: Document[];
|
|
54
|
+
}
|
|
55
|
+
export interface Template {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
subject: string;
|
|
59
|
+
body: string;
|
|
60
|
+
type_id: number;
|
|
61
|
+
}
|
|
62
|
+
export interface Account {
|
|
63
|
+
id: string;
|
|
64
|
+
plan: string | null;
|
|
65
|
+
plan_term: string | null;
|
|
66
|
+
plan_expires: string | null;
|
|
67
|
+
plan_paid: string | null;
|
|
68
|
+
trial_ends_at: string | null;
|
|
69
|
+
is_active: boolean;
|
|
70
|
+
created_at: string;
|
|
71
|
+
updated_at: string;
|
|
72
|
+
default_company?: Company;
|
|
73
|
+
companies?: Company[];
|
|
74
|
+
users?: User[];
|
|
75
|
+
}
|
|
76
|
+
export interface ActivityLog {
|
|
77
|
+
id: string;
|
|
78
|
+
company_id: string;
|
|
79
|
+
user_id: string;
|
|
80
|
+
user_type: string;
|
|
81
|
+
ip_address: string | null;
|
|
82
|
+
user_agent: string | null;
|
|
83
|
+
subject_type: string;
|
|
84
|
+
subject_id: number;
|
|
85
|
+
event: string;
|
|
86
|
+
event_type: string | null;
|
|
87
|
+
properties: Record<string, unknown> | null;
|
|
88
|
+
description: string | null;
|
|
89
|
+
old_values: Record<string, unknown> | null;
|
|
90
|
+
new_values: Record<string, unknown> | null;
|
|
91
|
+
created_at: string;
|
|
92
|
+
updated_at: string;
|
|
93
|
+
}
|
|
94
|
+
export interface Client {
|
|
95
|
+
id: string;
|
|
96
|
+
user_id: string;
|
|
97
|
+
company_id: string;
|
|
98
|
+
name: string | null;
|
|
99
|
+
website: string | null;
|
|
100
|
+
private_notes: string | null;
|
|
101
|
+
public_notes: string | null;
|
|
102
|
+
logo: string | null;
|
|
103
|
+
phone: string | null;
|
|
104
|
+
balance: number;
|
|
105
|
+
paid_to_date: number;
|
|
106
|
+
currency_id: number | null;
|
|
107
|
+
address1: string | null;
|
|
108
|
+
address2: string | null;
|
|
109
|
+
city: string | null;
|
|
110
|
+
state: string | null;
|
|
111
|
+
postal_code: string | null;
|
|
112
|
+
country_id: number | null;
|
|
113
|
+
is_deleted: boolean;
|
|
114
|
+
vat_number: string | null;
|
|
115
|
+
id_number: string | null;
|
|
116
|
+
created_at: string;
|
|
117
|
+
updated_at: string;
|
|
118
|
+
deleted_at: string | null;
|
|
119
|
+
contacts?: ClientContact[];
|
|
120
|
+
}
|
|
121
|
+
export interface ClientContact {
|
|
122
|
+
id: string;
|
|
123
|
+
user_id: string;
|
|
124
|
+
company_id: string;
|
|
125
|
+
client_id: string;
|
|
126
|
+
first_name: string | null;
|
|
127
|
+
last_name: string | null;
|
|
128
|
+
phone: string | null;
|
|
129
|
+
email: string | null;
|
|
130
|
+
signature_base64: string | null;
|
|
131
|
+
initials_base64: string | null;
|
|
132
|
+
email_verified_at: string | null;
|
|
133
|
+
is_primary: boolean;
|
|
134
|
+
last_login: string | null;
|
|
135
|
+
created_at: string;
|
|
136
|
+
updated_at: string;
|
|
137
|
+
deleted_at: string | null;
|
|
138
|
+
e_signature: string | null;
|
|
139
|
+
e_initials: string | null;
|
|
140
|
+
contact_key: string | null;
|
|
141
|
+
user?: User;
|
|
142
|
+
company?: Company;
|
|
143
|
+
client?: Client;
|
|
144
|
+
}
|
|
145
|
+
export interface CompanyUser {
|
|
146
|
+
id: string;
|
|
147
|
+
is_owner: boolean;
|
|
148
|
+
is_admin: boolean;
|
|
149
|
+
account_id: string;
|
|
150
|
+
company_id: string;
|
|
151
|
+
user_id: string;
|
|
152
|
+
permissions: Array<unknown> | null;
|
|
153
|
+
role: string;
|
|
154
|
+
created_at: string;
|
|
155
|
+
updated_at: string;
|
|
156
|
+
deleted_at: string | null;
|
|
157
|
+
}
|
|
158
|
+
export interface Document {
|
|
159
|
+
id: string;
|
|
160
|
+
description: string;
|
|
161
|
+
status_id: number;
|
|
162
|
+
is_deleted: boolean;
|
|
163
|
+
user_id: string;
|
|
164
|
+
company_id: string;
|
|
165
|
+
completed_at: string | null;
|
|
166
|
+
voided_at: string | null;
|
|
167
|
+
created_at: string | null;
|
|
168
|
+
updated_at: string | null;
|
|
169
|
+
deleted_at: string | null;
|
|
170
|
+
user?: User | null;
|
|
171
|
+
company?: Company | null;
|
|
172
|
+
invitations?: DocumentInvitation[];
|
|
173
|
+
files?: DocumentFile[];
|
|
174
|
+
signatures?: DocumentSignature[];
|
|
175
|
+
signatoryOrder: string[];
|
|
176
|
+
metadata: Record<string, unknown> | null;
|
|
177
|
+
}
|
|
178
|
+
export interface DocumentFile {
|
|
179
|
+
id: string;
|
|
180
|
+
user_id: string;
|
|
181
|
+
document_id: string;
|
|
182
|
+
filename: string;
|
|
183
|
+
path: string;
|
|
184
|
+
hash: string;
|
|
185
|
+
disk: string;
|
|
186
|
+
mime_type: string;
|
|
187
|
+
file_size: number;
|
|
188
|
+
page_position: number;
|
|
189
|
+
page_count: number | null;
|
|
190
|
+
url: string | null;
|
|
191
|
+
previews: string[];
|
|
192
|
+
metadata: Record<string, unknown> | null;
|
|
193
|
+
created_at: string;
|
|
194
|
+
updated_at: string;
|
|
195
|
+
}
|
|
196
|
+
export interface DocumentInvitation {
|
|
197
|
+
id: string;
|
|
198
|
+
user_id: string;
|
|
199
|
+
client_contact_id: string | null;
|
|
200
|
+
client_id: string | null;
|
|
201
|
+
company_id: string;
|
|
202
|
+
document_id: string;
|
|
203
|
+
message_id: string | null;
|
|
204
|
+
email_error: string | null;
|
|
205
|
+
entity: "contact" | "user";
|
|
206
|
+
signing_order?: number;
|
|
207
|
+
sent_date: string | null;
|
|
208
|
+
viewed_date: string | null;
|
|
209
|
+
opened_date: string | null;
|
|
210
|
+
signed_date: string | null;
|
|
211
|
+
ip_address: string | null;
|
|
212
|
+
created_at: string;
|
|
213
|
+
updated_at: string;
|
|
214
|
+
deleted_at: string | null;
|
|
215
|
+
user?: User;
|
|
216
|
+
company?: Company;
|
|
217
|
+
document?: Document;
|
|
218
|
+
contact?: ClientContact;
|
|
219
|
+
}
|
|
220
|
+
export interface DocumentSignature {
|
|
221
|
+
id: string;
|
|
222
|
+
document_id: string;
|
|
223
|
+
document_file_id: string;
|
|
224
|
+
client_contact_id: string;
|
|
225
|
+
user_id: string;
|
|
226
|
+
page_number: number;
|
|
227
|
+
coordinates: {
|
|
228
|
+
x: number;
|
|
229
|
+
y: number;
|
|
230
|
+
width: number;
|
|
231
|
+
height: number;
|
|
232
|
+
};
|
|
233
|
+
type: string;
|
|
234
|
+
value: string | null;
|
|
235
|
+
ip_address: string;
|
|
236
|
+
signed_at: string;
|
|
237
|
+
created_at: string;
|
|
238
|
+
updated_at: string;
|
|
239
|
+
user?: User;
|
|
240
|
+
contact?: ClientContact | null;
|
|
241
|
+
document?: Document;
|
|
242
|
+
file?: DocumentFile;
|
|
243
|
+
}
|
|
244
|
+
export interface User {
|
|
245
|
+
id: string;
|
|
246
|
+
account_id: string | null;
|
|
247
|
+
first_name: string | null;
|
|
248
|
+
last_name: string | null;
|
|
249
|
+
phone_number: string | null;
|
|
250
|
+
email: string;
|
|
251
|
+
phone_number_verified: boolean;
|
|
252
|
+
is_deleted: boolean;
|
|
253
|
+
referral_code: string | null;
|
|
254
|
+
oauth_user_id: string | null;
|
|
255
|
+
oauth_user_token: string | null;
|
|
256
|
+
oauth_provider_id: string | null;
|
|
257
|
+
google_2fa_secret: string | null;
|
|
258
|
+
accepted_terms_version: string | null;
|
|
259
|
+
avatar: string;
|
|
260
|
+
e_signature: string | null;
|
|
261
|
+
e_initials: string | null;
|
|
262
|
+
created_at: string;
|
|
263
|
+
updated_at: string;
|
|
264
|
+
deleted_at: string | null;
|
|
265
|
+
email_verified_at: string | null;
|
|
266
|
+
companies?: Company[];
|
|
267
|
+
account: Account | null;
|
|
268
|
+
}
|
|
269
|
+
export interface Timezone {
|
|
270
|
+
id: string;
|
|
271
|
+
location: string;
|
|
272
|
+
name: string;
|
|
273
|
+
utc_offset: number;
|
|
274
|
+
}
|
|
275
|
+
export interface Currency {
|
|
276
|
+
id: string;
|
|
277
|
+
code: string;
|
|
278
|
+
decimal_separator: string;
|
|
279
|
+
exchange_rate: number;
|
|
280
|
+
name: string;
|
|
281
|
+
precision: number;
|
|
282
|
+
swap_currency_symbol: boolean;
|
|
283
|
+
symbol: string;
|
|
284
|
+
thousand_separator: string;
|
|
285
|
+
}
|
|
286
|
+
export interface Language {
|
|
287
|
+
id: string;
|
|
288
|
+
locale: string;
|
|
289
|
+
name: string;
|
|
290
|
+
}
|
|
291
|
+
export interface Country {
|
|
292
|
+
id: string;
|
|
293
|
+
capital: string;
|
|
294
|
+
citizenship: string;
|
|
295
|
+
country_code: string;
|
|
296
|
+
currency: string;
|
|
297
|
+
currency_code: string;
|
|
298
|
+
currency_sub_unit: string;
|
|
299
|
+
full_name: string;
|
|
300
|
+
iso_3166_2: string;
|
|
301
|
+
iso_3166_3: string;
|
|
302
|
+
name: string;
|
|
303
|
+
region_code: string;
|
|
304
|
+
sub_region_code: string;
|
|
305
|
+
eea: boolean;
|
|
306
|
+
swap_postal_code: boolean;
|
|
307
|
+
swap_currency_symbol: boolean;
|
|
308
|
+
thousand_separator: string;
|
|
309
|
+
decimal_separator: string;
|
|
310
|
+
}
|
|
311
|
+
export interface Plan {
|
|
312
|
+
id: string;
|
|
313
|
+
name: string;
|
|
314
|
+
description: string;
|
|
315
|
+
popular: boolean;
|
|
316
|
+
price: {
|
|
317
|
+
monthly: number;
|
|
318
|
+
yearly: number;
|
|
319
|
+
};
|
|
320
|
+
features: string[];
|
|
321
|
+
highlighted_features: string[];
|
|
322
|
+
}
|
|
323
|
+
export interface ValidationBag {
|
|
324
|
+
message: string;
|
|
325
|
+
errors: Record<string, string[]>;
|
|
326
|
+
}
|
|
327
|
+
export declare enum DocumentStatus {
|
|
328
|
+
Draft = 1,
|
|
329
|
+
PendingApproval = 2,
|
|
330
|
+
Approved = 3,
|
|
331
|
+
Rejected = 4,
|
|
332
|
+
Sent = 5,
|
|
333
|
+
Completed = 6,
|
|
334
|
+
Expired = 7,
|
|
335
|
+
Voided = 8
|
|
336
|
+
}
|
|
337
|
+
export interface Blueprint {
|
|
338
|
+
id: string;
|
|
339
|
+
name: string;
|
|
340
|
+
description: string;
|
|
341
|
+
path: string | null;
|
|
342
|
+
disk: string | null;
|
|
343
|
+
mime_type: string | null;
|
|
344
|
+
hash: string | null;
|
|
345
|
+
is_template: boolean;
|
|
346
|
+
metadata: Record<string, unknown>;
|
|
347
|
+
is_deleted: boolean;
|
|
348
|
+
created_at: string;
|
|
349
|
+
updated_at: string;
|
|
350
|
+
archived_at: string | null;
|
|
351
|
+
document: Document;
|
|
352
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type EditableProps = {
|
|
3
|
+
children: React.ReactElement | null;
|
|
4
|
+
};
|
|
5
|
+
export declare function Editable({ children }: EditableProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
6
|
+
export declare function useEditable(): boolean;
|
|
7
|
+
export declare function useReadonly(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Document as TDocument } from '../types/api';
|
|
2
|
+
export type FileProps = {
|
|
3
|
+
document: TDocument;
|
|
4
|
+
setIsDialogOpen: (open: boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function Files({ document, setIsDialogOpen }: FileProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Entry(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Axios } from 'axios';
|
|
2
|
+
import { DateFormat } from '..';
|
|
3
|
+
import { AlertProps, ConfirmationDialogButtonProps, ConfirmationDialogProps, CreateBlueprintSignatoryProps, CreateClientTabProps, CreateDialogProps, CreateDialogTabButtonProps, DeleteDialogButtonProps, DeleteDialogProps, ImportFromButtonProps, RectangleSettingsCheckboxProps, RectangleSettingsDialogButtonProps, RectangleSettingsDialogProps, RectangleSettingsInputProps, RectangleSettingsLabelProps, RectangleSettingsOptionItemProps, RectangleSettingsOptionsListProps, RectangleSettingsRemoveButtonProps, RectangleSettingsSelectProps, SaveButtonProps, SendButtonProps, SendDialogButtonProps, SendDialogProps, SignProps, SignatorySelectorProps, SignatorySwapProps, ToolboxContextProps, UninviteDialogButtonProps, UninviteDialogProps, UploadDialogProps, UploadProps, ValidationErrorsProps } from '../component-types';
|
|
4
|
+
import { Blueprint, Document } from '../types/api';
|
|
5
|
+
export type Builder = {
|
|
6
|
+
token: string;
|
|
7
|
+
document: string;
|
|
8
|
+
saveBuilderEvent?: string;
|
|
9
|
+
components: {
|
|
10
|
+
skeleton: React.ComponentType;
|
|
11
|
+
save: React.ComponentType<SaveButtonProps>;
|
|
12
|
+
sign: React.ComponentType<SignProps>;
|
|
13
|
+
send: {
|
|
14
|
+
trigger: React.ComponentType<SendButtonProps>;
|
|
15
|
+
dialog: React.ComponentType<SendDialogProps>;
|
|
16
|
+
button: React.ComponentType<SendDialogButtonProps>;
|
|
17
|
+
};
|
|
18
|
+
delete: {
|
|
19
|
+
dialog: React.ComponentType<DeleteDialogProps>;
|
|
20
|
+
button: React.ComponentType<DeleteDialogButtonProps>;
|
|
21
|
+
};
|
|
22
|
+
upload: {
|
|
23
|
+
trigger: React.ComponentType<UploadProps>;
|
|
24
|
+
dialog: React.ComponentType<UploadDialogProps>;
|
|
25
|
+
};
|
|
26
|
+
confirmation: {
|
|
27
|
+
dialog: React.ComponentType<ConfirmationDialogProps>;
|
|
28
|
+
button: React.ComponentType<ConfirmationDialogButtonProps>;
|
|
29
|
+
};
|
|
30
|
+
validationErrors: React.ComponentType<ValidationErrorsProps>;
|
|
31
|
+
signatorySelector: React.ComponentType<SignatorySelectorProps>;
|
|
32
|
+
signatorySwap: React.ComponentType<SignatorySwapProps>;
|
|
33
|
+
uninvite: {
|
|
34
|
+
dialog: React.ComponentType<UninviteDialogProps>;
|
|
35
|
+
button: React.ComponentType<UninviteDialogButtonProps>;
|
|
36
|
+
};
|
|
37
|
+
createSignatory: {
|
|
38
|
+
dialog: React.ComponentType<CreateDialogProps>;
|
|
39
|
+
client: {
|
|
40
|
+
form: React.ComponentType<CreateClientTabProps>;
|
|
41
|
+
button: React.ComponentType<CreateDialogTabButtonProps>;
|
|
42
|
+
};
|
|
43
|
+
user: {
|
|
44
|
+
form: React.ComponentType<CreateClientTabProps>;
|
|
45
|
+
button: React.ComponentType<CreateDialogTabButtonProps>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
toolboxContext: React.ComponentType<ToolboxContextProps>;
|
|
49
|
+
createBlueprintSignatory: React.ComponentType<CreateBlueprintSignatoryProps>;
|
|
50
|
+
alert: React.ComponentType<AlertProps>;
|
|
51
|
+
actions?: React.ComponentType;
|
|
52
|
+
helper?: React.ComponentType;
|
|
53
|
+
imports?: {
|
|
54
|
+
googleDrive?: React.ComponentType<ImportFromButtonProps>;
|
|
55
|
+
};
|
|
56
|
+
rectangleSettings: {
|
|
57
|
+
dialog: React.ComponentType<RectangleSettingsDialogProps>;
|
|
58
|
+
save: React.ComponentType<RectangleSettingsDialogButtonProps>;
|
|
59
|
+
button: React.ComponentType<RectangleSettingsDialogButtonProps>;
|
|
60
|
+
input: React.ComponentType<RectangleSettingsInputProps>;
|
|
61
|
+
label: React.ComponentType<RectangleSettingsLabelProps>;
|
|
62
|
+
checkbox: React.ComponentType<RectangleSettingsCheckboxProps>;
|
|
63
|
+
select: React.ComponentType<RectangleSettingsSelectProps>;
|
|
64
|
+
removeButton: React.ComponentType<RectangleSettingsRemoveButtonProps>;
|
|
65
|
+
optionItem: React.ComponentType<RectangleSettingsOptionItemProps>;
|
|
66
|
+
optionsList: React.ComponentType<RectangleSettingsOptionsListProps>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
styles: {
|
|
70
|
+
frame: React.CSSProperties | undefined;
|
|
71
|
+
border: string | undefined;
|
|
72
|
+
childrenWrapper?: React.CSSProperties;
|
|
73
|
+
title?: React.CSSProperties;
|
|
74
|
+
signatoriesWrapper?: React.CSSProperties;
|
|
75
|
+
filesWrapper?: React.CSSProperties;
|
|
76
|
+
signatories?: {
|
|
77
|
+
title?: React.CSSProperties;
|
|
78
|
+
panel?: React.CSSProperties;
|
|
79
|
+
list?: React.CSSProperties;
|
|
80
|
+
};
|
|
81
|
+
} | null;
|
|
82
|
+
options: {
|
|
83
|
+
header: {
|
|
84
|
+
sticky: boolean;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
endpoint?: string | undefined;
|
|
88
|
+
events: {
|
|
89
|
+
onMessage: (message: string) => void;
|
|
90
|
+
onMessageDismiss: () => void;
|
|
91
|
+
};
|
|
92
|
+
readonly: boolean;
|
|
93
|
+
blueprint?: boolean;
|
|
94
|
+
invoiceninja?: boolean;
|
|
95
|
+
company?: string;
|
|
96
|
+
onEntityReady?: (entity: Document | Blueprint) => void;
|
|
97
|
+
services?: {
|
|
98
|
+
google?: {
|
|
99
|
+
appId: string;
|
|
100
|
+
clientId: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
translations?: {
|
|
104
|
+
[key: string]: string | object;
|
|
105
|
+
};
|
|
106
|
+
defaultDateFormat?: DateFormat;
|
|
107
|
+
};
|
|
108
|
+
export declare const BuilderContext: import('react').Context<Builder | null>;
|
|
109
|
+
export declare const BuilderContextPlus: import('react').Context<(Builder & {
|
|
110
|
+
http: Axios;
|
|
111
|
+
}) | null>;
|
|
112
|
+
export declare function useBuilderContext(): Builder;
|
|
113
|
+
export declare function useBuilderContextPlus(): Builder & {
|
|
114
|
+
http: Axios;
|
|
115
|
+
};
|
|
116
|
+
export declare function Builder(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
117
|
+
export * from '../component-types';
|
|
118
|
+
export * from '../sign';
|
|
119
|
+
export * from '../sign/component-types';
|
|
120
|
+
export * from '../types/api';
|
|
121
|
+
export * as BuilderTypes from '../types/api';
|
|
122
|
+
export type { Rectangle } from '../../builder/index';
|
|
123
|
+
export * from '../pdf-worker';
|
|
124
|
+
export * from '../password-files';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SelectOption } from '../index';
|
|
2
|
+
type OptionsModalProps = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
options: SelectOption[];
|
|
6
|
+
defaultValue: string | null;
|
|
7
|
+
onSave: (options: SelectOption[], defaultValue: string | null) => void;
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function OptionsModal({ isOpen, onOpenChange, options: initialOptions, defaultValue: initialDefaultValue, onSave, title, }: OptionsModalProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Document as TDocument } from '../types/api';
|
|
2
|
+
export type PreviewProps = {
|
|
3
|
+
document: TDocument;
|
|
4
|
+
isDialogOpen: boolean;
|
|
5
|
+
setIsDialogOpen: (open: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function Preview({ document }: PreviewProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DocumentFile } from '../types/api';
|
|
2
|
+
import { Rectangle } from '.';
|
|
3
|
+
type RectangleProps = {
|
|
4
|
+
file: DocumentFile;
|
|
5
|
+
};
|
|
6
|
+
export declare function Rectangles({ file }: RectangleProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export declare function useRectangleTips(): (rectangle: Rectangle) => string[];
|
|
8
|
+
export declare function RectanglesTips(): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Document } from '../types/api';
|
|
2
|
+
type SaveParams = {
|
|
3
|
+
document: Document;
|
|
4
|
+
};
|
|
5
|
+
export declare function Save({ document }: SaveParams): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type ConfirmationProps = {
|
|
7
|
+
document: Document;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Document, DocumentInvitation } from '../types/api';
|
|
2
|
+
interface SendConfirmationProps {
|
|
3
|
+
document: Document;
|
|
4
|
+
invitations?: DocumentInvitation[];
|
|
5
|
+
isDialogOpen: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function SendConfirmation({ document, invitations, isDialogOpen, onOpenChange, }: SendConfirmationProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DateFormat, Rectangle } from '../index';
|
|
2
|
+
export declare function useDefaultDateFormat(): DateFormat;
|
|
3
|
+
type SettingsModalProps = {
|
|
4
|
+
rectangle: Rectangle;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSave: (updatedRectangle: Rectangle) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function SettingsModal({ rectangle, isOpen, onClose, onSave, }: SettingsModalProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClientContact, User as TUser } from '../types/api';
|
|
2
|
+
export declare function Signatories(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type SelectProps = {
|
|
4
|
+
onSelect: (id: string, type: "contact" | "user", entity: ClientContact | TUser, metadata?: Record<string, unknown>) => unknown;
|
|
5
|
+
value?: string;
|
|
6
|
+
};
|
|
7
|
+
export type SelectOption = {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
type: "contact" | "user";
|
|
11
|
+
entity: ClientContact | TUser;
|
|
12
|
+
};
|
|
13
|
+
export declare function Select({ onSelect, value }: SelectProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type BlueprintPartyResult = {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
type: "blueprint";
|
|
18
|
+
entity: {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare function BlueprintPartySelector(): import("@emotion/react/jsx-runtime").JSX.Element;
|