@sparkvault/sdk-js 16.6.0 → 16.7.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/index.cjs +209 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +209 -114
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/form-attachments.d.ts +2 -0
- package/dist/products/help-desk/form-composer.d.ts +9 -5
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14341,25 +14341,23 @@ Array.from({ length: 1 << BRAND_BITS.size }, (_, mask) =>
|
|
|
14341
14341
|
* question a customer's new request asks before it is discarded, session,
|
|
14342
14342
|
* sign-in code (its length, lifetime, sender, resend wait, countdown and
|
|
14343
14343
|
* the code step's words), merge and pending-attachment timings, hold
|
|
14344
|
-
* presets,
|
|
14345
|
-
*
|
|
14344
|
+
* presets, size limits, the operator display and desk mode choices, the
|
|
14345
|
+
* operator queue's views and orders, the reply review list's views and
|
|
14346
14346
|
* states, the response-time histogram's bucket edges, the sections of a
|
|
14347
14347
|
* desk's settings an address names, and the messages the widget's native
|
|
14348
14348
|
* sign-in posts between the website and its first-party page live here for
|
|
14349
|
-
* the same reason. So
|
|
14350
|
-
*
|
|
14351
|
-
*
|
|
14352
|
-
*
|
|
14353
|
-
*
|
|
14354
|
-
* the portal, the SDK and the console's composer each send their messages
|
|
14355
|
-
* under, and the one rule that a message sent again is the same message
|
|
14349
|
+
* the same reason. So does the one rule a typed or pasted sign-in code is
|
|
14350
|
+
* read by (helpDeskPinDigits), which every sign-in form applies. So does the
|
|
14351
|
+
* one way a client names a message it sends (newMessageId), which the
|
|
14352
|
+
* portal, the SDK and the console's composer each send their messages under,
|
|
14353
|
+
* and the one rule that a message sent again is the same message
|
|
14356
14354
|
* (sameMessage), which keeps its name.
|
|
14357
14355
|
*
|
|
14358
14356
|
* BROWSER-SAFE: data and pure functions, and newMessageId's count of the ids
|
|
14359
|
-
* its page named; its imports are the
|
|
14360
|
-
*
|
|
14361
|
-
*
|
|
14362
|
-
*
|
|
14357
|
+
* its page named; its imports are the mail products whose fixed From local
|
|
14358
|
+
* parts no team alias may take (./mail-products.js), the brand rule no team
|
|
14359
|
+
* alias may read as (./organization-name.js) and the resource id rule a desk
|
|
14360
|
+
* id is read by (./ids.js).
|
|
14363
14361
|
*/
|
|
14364
14362
|
|
|
14365
14363
|
|
|
@@ -14424,11 +14422,10 @@ const DISCARD_REQUEST_COPY = Object.freeze({
|
|
|
14424
14422
|
});
|
|
14425
14423
|
|
|
14426
14424
|
/**
|
|
14427
|
-
* What the emailed-code step of
|
|
14428
|
-
*
|
|
14429
|
-
*
|
|
14430
|
-
*
|
|
14431
|
-
* the portal and on a company's own site.
|
|
14425
|
+
* What the emailed-code step of the SDK support form's sign-in says: the
|
|
14426
|
+
* refusal of a code that is wrong, spent or expired (Core's PIN_INVALID), and
|
|
14427
|
+
* the note once a new code is sent. Neither names who sent the email, so both
|
|
14428
|
+
* read right on any site the form runs on.
|
|
14432
14429
|
*/
|
|
14433
14430
|
const HELP_DESK_CODE_STEP_COPY = Object.freeze({
|
|
14434
14431
|
codeRefused: 'That code is wrong or has expired. Check the newest email, or send a new code.',
|
|
@@ -14543,7 +14540,7 @@ const HELP_DESK_ROLES = Object.freeze(['manager', 'agent', 'trainee']);
|
|
|
14543
14540
|
*
|
|
14544
14541
|
* see_desk list the desk, read its settings and queues
|
|
14545
14542
|
* view_tickets read every ticket of the desk, every queue and untriaged included
|
|
14546
|
-
* work_tickets notes, status, priority,
|
|
14543
|
+
* work_tickets notes, status, priority, assignment changes, attachments, merges
|
|
14547
14544
|
* reply send a customer reply directly (a Trainee's reply becomes a review instead)
|
|
14548
14545
|
* submit_reply_for_approval a customer reply is held for a Manager's approval
|
|
14549
14546
|
* open_request open a request for a customer with a first message
|
|
@@ -19242,6 +19239,7 @@ function createFormAttachments(client, prefix, context, onEntriesChange) {
|
|
|
19242
19239
|
get attachmentIds() { return entries.filter(entry => entry.state === 'complete' && entry.attachmentId).map(entry => entry.attachmentId); },
|
|
19243
19240
|
get unresolved() { return entries.some(entry => entry.state !== 'complete'); },
|
|
19244
19241
|
get hasEntries() { return entries.length > 0; },
|
|
19242
|
+
get names() { return entries.map(entry => entry.file.name); },
|
|
19245
19243
|
add,
|
|
19246
19244
|
async start() { await Promise.all(entries.map(entry => entry.operation ?? (entry.state === 'queued' ? run(entry) : Promise.resolve()))); },
|
|
19247
19245
|
lock(value) { locked = value; syncPicking(); entries.forEach(controls); },
|
|
@@ -19262,19 +19260,178 @@ function createFormAttachments(client, prefix, context, onEntriesChange) {
|
|
|
19262
19260
|
};
|
|
19263
19261
|
}
|
|
19264
19262
|
|
|
19265
|
-
|
|
19266
|
-
|
|
19267
|
-
|
|
19263
|
+
/**
|
|
19264
|
+
* Files brought to a message's composer by drag, drop and paste, handled
|
|
19265
|
+
* alike by every composer that takes them: the console's reply composer and
|
|
19266
|
+
* the SDK's support form. A composer says what a file brought now does
|
|
19267
|
+
* (attach, refuse in words, or nothing) and what attaching and refusing are;
|
|
19268
|
+
* this owns the rest of the policy.
|
|
19269
|
+
*
|
|
19270
|
+
* - A drag carries files only when its types name them; a drag or paste of
|
|
19271
|
+
* text is the browser's.
|
|
19272
|
+
* - A drag of files is never the browser's to open in place of the page:
|
|
19273
|
+
* dragenter and dragover are cancelled. A file the composer refuses keeps a
|
|
19274
|
+
* drop effect, so it is refused in words when it lands; one it takes
|
|
19275
|
+
* nothing from (a send under way) shows the cursor's refusal.
|
|
19276
|
+
* - The drop prompt shows while files the composer attaches are over its
|
|
19277
|
+
* frame, and goes when they leave the frame or land.
|
|
19278
|
+
* - A dropped folder arrives as a file that cannot be read, so a drop's files
|
|
19279
|
+
* leave the folders out and count them, for the composer to say so.
|
|
19280
|
+
* - A paste that carries files is those files, and the text beside them is
|
|
19281
|
+
* only their names (a file copied in the system's file manager). Office
|
|
19282
|
+
* apps are the exception: copied cells or paragraphs come as text and
|
|
19283
|
+
* formatted text, with a picture of them as a file, and that paste is the
|
|
19284
|
+
* text.
|
|
19285
|
+
* - A picture pasted from the clipboard is named "image.png" every time, so
|
|
19286
|
+
* it is numbered after the highest "Pasted image N" the composer holds
|
|
19287
|
+
* ("Pasted image 1.png"), which tells chips, and their Remove buttons,
|
|
19288
|
+
* apart, a restored draft's among them.
|
|
19289
|
+
*
|
|
19290
|
+
* BROWSER-SAFE: reads only the events it is handed and what the composer
|
|
19291
|
+
* says.
|
|
19292
|
+
*/
|
|
19293
|
+
|
|
19294
|
+
/** What a composer reads while files are dragged over it. */
|
|
19295
|
+
const DROP_FILES_COPY = 'Drop the files to attach them.';
|
|
19296
|
+
|
|
19297
|
+
/** What a person reads when a drop held a folder, which is never attached. */
|
|
19298
|
+
const FOLDER_REFUSAL_COPY = 'Folders can’t be attached. Add the files inside them instead.';
|
|
19299
|
+
|
|
19300
|
+
/** The name the clipboard gives every pasted picture, with its extension. */
|
|
19301
|
+
const CLIPBOARD_IMAGE_NAME = /^image\.(\w+)$/;
|
|
19302
|
+
|
|
19303
|
+
/** A pasted picture's name once numbered, its number captured. */
|
|
19304
|
+
const PASTED_IMAGE_NAME = /^Pasted image (\d+)\./;
|
|
19305
|
+
|
|
19306
|
+
/**
|
|
19307
|
+
* Whether a drag carries files.
|
|
19308
|
+
*
|
|
19309
|
+
* @param {DataTransfer|null|undefined} transfer - The drag event's dataTransfer
|
|
19310
|
+
* @returns {boolean}
|
|
19311
|
+
*/
|
|
19312
|
+
function carriesFiles(transfer) {
|
|
19313
|
+
return Array.from(transfer?.types ?? []).includes('Files');
|
|
19314
|
+
}
|
|
19315
|
+
|
|
19316
|
+
/**
|
|
19317
|
+
* The files a paste carries, or none when the paste is text: one with no
|
|
19318
|
+
* files, or an Office app's copy (formatted text and its text beside a
|
|
19319
|
+
* picture of them).
|
|
19320
|
+
*
|
|
19321
|
+
* @param {DataTransfer|null|undefined} clipboard - The paste event's clipboardData
|
|
19322
|
+
* @returns {File[]}
|
|
19323
|
+
*/
|
|
19324
|
+
function pastedFiles(clipboard) {
|
|
19325
|
+
if (!clipboard || clipboard.files.length === 0) return [];
|
|
19326
|
+
if (Array.from(clipboard.types).includes('text/html') && clipboard.getData('text/plain')) return [];
|
|
19327
|
+
return Array.from(clipboard.files);
|
|
19328
|
+
}
|
|
19329
|
+
|
|
19330
|
+
/**
|
|
19331
|
+
* The files a drop carries, its folders left out and counted.
|
|
19332
|
+
*
|
|
19333
|
+
* @param {DataTransfer} transfer - The drop event's dataTransfer
|
|
19334
|
+
* @returns {{ files: File[], folders: number }}
|
|
19335
|
+
*/
|
|
19336
|
+
function droppedFiles(transfer) {
|
|
19337
|
+
const files = [];
|
|
19338
|
+
let folders = 0;
|
|
19339
|
+
for (const item of Array.from(transfer.items)) {
|
|
19340
|
+
if (item.kind !== 'file') continue;
|
|
19341
|
+
if (item.webkitGetAsEntry()?.isDirectory) {
|
|
19342
|
+
folders += 1;
|
|
19343
|
+
continue;
|
|
19344
|
+
}
|
|
19345
|
+
const file = item.getAsFile();
|
|
19346
|
+
if (file) files.push(file);
|
|
19347
|
+
}
|
|
19348
|
+
return { files, folders };
|
|
19349
|
+
}
|
|
19350
|
+
|
|
19351
|
+
/**
|
|
19352
|
+
* Pasted files as they join a composer: each the clipboard named
|
|
19353
|
+
* "image.<ext>" comes back as "Pasted image N.<ext>", N counting on from the
|
|
19354
|
+
* highest the composer holds; any other comes back as it is.
|
|
19355
|
+
*
|
|
19356
|
+
* @param {File[]} files - The paste's files
|
|
19357
|
+
* @param {string[]} heldNames - The names of the files the composer holds
|
|
19358
|
+
* @returns {File[]}
|
|
19359
|
+
*/
|
|
19360
|
+
function namePasted(files, heldNames) {
|
|
19361
|
+
let number = heldNames.reduce((highest, name) => Math.max(highest, Number(PASTED_IMAGE_NAME.exec(name)?.[1] ?? 0)), 0);
|
|
19362
|
+
return files.map((file) => {
|
|
19363
|
+
const extension = CLIPBOARD_IMAGE_NAME.exec(file.name)?.[1];
|
|
19364
|
+
if (extension === undefined) return file;
|
|
19365
|
+
number += 1;
|
|
19366
|
+
return new File([file], `Pasted image ${number}.${extension}`, { type: file.type, lastModified: file.lastModified });
|
|
19367
|
+
});
|
|
19268
19368
|
}
|
|
19369
|
+
|
|
19370
|
+
/**
|
|
19371
|
+
* A composer's handlers for files brought to it, alike as DOM listeners and
|
|
19372
|
+
* as React's event props: `dragOver` answers dragenter and dragover, on the
|
|
19373
|
+
* element a file may be dropped anywhere over; `paste`, on each field a file
|
|
19374
|
+
* may be pasted into.
|
|
19375
|
+
*
|
|
19376
|
+
* @param {Object} composer
|
|
19377
|
+
* @param {() => ('attach'|'refuse'|'none')} composer.action - What a file brought now does
|
|
19378
|
+
* @param {(node: EventTarget|null) => boolean} composer.frameHolds - Whether a node lies in the frame, where the drop prompt shows
|
|
19379
|
+
* @param {() => string[]} composer.heldNames - The names of the files the composer holds
|
|
19380
|
+
* @param {(on: boolean) => void} composer.dragging - Shows or hides the drop prompt
|
|
19381
|
+
* @param {(files: File[], folders: number) => void} composer.attach - Attaches files; `folders` counts the folders a drop left out
|
|
19382
|
+
* @param {() => void} composer.refuse - Refuses the files in words
|
|
19383
|
+
* @returns {{ dragOver: (event: DragEvent) => void, dragLeave: (event: DragEvent) => void, drop: (event: DragEvent) => void, paste: (event: ClipboardEvent) => void }}
|
|
19384
|
+
*/
|
|
19385
|
+
function composerFileEvents({ action, frameHolds, heldNames, dragging, attach, refuse }) {
|
|
19386
|
+
return {
|
|
19387
|
+
dragOver(event) {
|
|
19388
|
+
if (!carriesFiles(event.dataTransfer)) return;
|
|
19389
|
+
event.preventDefault();
|
|
19390
|
+
const now = action();
|
|
19391
|
+
event.dataTransfer.dropEffect = now === 'none' ? 'none' : 'copy';
|
|
19392
|
+
dragging(now === 'attach' && frameHolds(event.target));
|
|
19393
|
+
},
|
|
19394
|
+
dragLeave(event) {
|
|
19395
|
+
if (!frameHolds(event.relatedTarget)) dragging(false);
|
|
19396
|
+
},
|
|
19397
|
+
drop(event) {
|
|
19398
|
+
if (!carriesFiles(event.dataTransfer)) return;
|
|
19399
|
+
event.preventDefault();
|
|
19400
|
+
dragging(false);
|
|
19401
|
+
const now = action();
|
|
19402
|
+
if (now === 'attach') {
|
|
19403
|
+
const { files, folders } = droppedFiles(event.dataTransfer);
|
|
19404
|
+
attach(files, folders);
|
|
19405
|
+
} else if (now === 'refuse') {
|
|
19406
|
+
refuse();
|
|
19407
|
+
}
|
|
19408
|
+
},
|
|
19409
|
+
// A paste of files lands none of its text (only their names) in the field.
|
|
19410
|
+
paste(event) {
|
|
19411
|
+
const files = pastedFiles(event.clipboardData);
|
|
19412
|
+
if (files.length === 0) return;
|
|
19413
|
+
const now = action();
|
|
19414
|
+
if (now === 'none') return;
|
|
19415
|
+
event.preventDefault();
|
|
19416
|
+
if (now === 'attach') attach(namePasted(files, heldNames()), 0);
|
|
19417
|
+
else refuse();
|
|
19418
|
+
}
|
|
19419
|
+
};
|
|
19420
|
+
}
|
|
19421
|
+
|
|
19269
19422
|
/**
|
|
19270
19423
|
* The details field as a composer. A file pasted into the summary or the
|
|
19271
19424
|
* details, or dropped anywhere on the request step, joins the form's one
|
|
19272
19425
|
* attachment pipeline (`attachments.add`), under the same limits and
|
|
19273
|
-
* refusals as a picked one; the drop target shows only over the composer.
|
|
19274
|
-
*
|
|
19275
|
-
*
|
|
19276
|
-
*
|
|
19277
|
-
*
|
|
19426
|
+
* refusals as a picked one; the drop target shows only over the composer.
|
|
19427
|
+
* How a drag, a drop and a paste are answered (which files they carry, the
|
|
19428
|
+
* folders a drop leaves out, the names of pasted pictures, when the drop
|
|
19429
|
+
* target shows) is @sparkvault/app-sdk/composer-files' to decide; this says
|
|
19430
|
+
* what a file brought now does. A paste or drag of text alone stays the
|
|
19431
|
+
* browser's. A file brought over the form is never the browser's to open in
|
|
19432
|
+
* place of the unsent request: on the sign-in step, or while the form takes
|
|
19433
|
+
* no files, it is refused outright, and a desk that takes no files says so
|
|
19434
|
+
* when the file is dropped.
|
|
19278
19435
|
*/
|
|
19279
19436
|
function createComposer(options) {
|
|
19280
19437
|
const { form, summary, textarea, attachments, deskRefusesFiles, onRequestStep } = options;
|
|
@@ -19283,14 +19440,13 @@ function createComposer(options) {
|
|
|
19283
19440
|
textarea.classList.add('svhd-composer-input');
|
|
19284
19441
|
const drop = document.createElement('p');
|
|
19285
19442
|
drop.className = 'svhd-composer-drop';
|
|
19286
|
-
drop.textContent =
|
|
19443
|
+
drop.textContent = DROP_FILES_COPY;
|
|
19287
19444
|
drop.hidden = true;
|
|
19288
19445
|
frame.append(textarea, drop);
|
|
19289
19446
|
if (attachments)
|
|
19290
19447
|
frame.append(attachments.toolbar, attachments.list);
|
|
19291
19448
|
const notice = attachments?.notice ?? createNotice();
|
|
19292
19449
|
const fields = [summary, textarea];
|
|
19293
|
-
let pastedImages = 0;
|
|
19294
19450
|
function fileAction() {
|
|
19295
19451
|
if (!onRequestStep())
|
|
19296
19452
|
return 'none';
|
|
@@ -19307,91 +19463,30 @@ function createComposer(options) {
|
|
|
19307
19463
|
return;
|
|
19308
19464
|
setNotice(notice, NO_CUSTOMER_FILES_COPY);
|
|
19309
19465
|
}
|
|
19310
|
-
// A dropped folder
|
|
19311
|
-
//
|
|
19312
|
-
function
|
|
19313
|
-
const files = [];
|
|
19314
|
-
let folders = 0;
|
|
19315
|
-
for (const item of Array.from(transfer.items)) {
|
|
19316
|
-
if (item.kind !== 'file')
|
|
19317
|
-
continue;
|
|
19318
|
-
if (item.webkitGetAsEntry()?.isDirectory) {
|
|
19319
|
-
folders += 1;
|
|
19320
|
-
continue;
|
|
19321
|
-
}
|
|
19322
|
-
const file = item.getAsFile();
|
|
19323
|
-
if (file)
|
|
19324
|
-
files.push(file);
|
|
19325
|
-
}
|
|
19466
|
+
// A dropped folder is left out, and said so beside any refusal the files
|
|
19467
|
+
// with it met.
|
|
19468
|
+
function attach(files, folders) {
|
|
19326
19469
|
if (files.length > 0)
|
|
19327
19470
|
attachments?.add(files);
|
|
19328
19471
|
if (folders > 0)
|
|
19329
|
-
setNotice(notice, files.length > 0 && !notice.hidden ? `${
|
|
19330
|
-
}
|
|
19331
|
-
|
|
19332
|
-
|
|
19333
|
-
|
|
19334
|
-
|
|
19335
|
-
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
}
|
|
19340
|
-
// Cancelling dragenter and dragover keeps the browser from opening the file
|
|
19341
|
-
// in place of the page. A drop effect of none cancels the drop itself, so a
|
|
19342
|
-
// file the desk refuses keeps one to be refused in words when it lands.
|
|
19343
|
-
const onDragOver = (event) => {
|
|
19344
|
-
if (!carriesFiles(event))
|
|
19345
|
-
return;
|
|
19346
|
-
event.preventDefault();
|
|
19347
|
-
const action = fileAction();
|
|
19348
|
-
if (event.dataTransfer)
|
|
19349
|
-
event.dataTransfer.dropEffect = action === 'none' ? 'none' : 'copy';
|
|
19350
|
-
dragging(action === 'attach' && event.target instanceof Node && frame.contains(event.target));
|
|
19351
|
-
};
|
|
19352
|
-
const onDragLeave = (event) => {
|
|
19353
|
-
if (!(event.relatedTarget instanceof Node) || !frame.contains(event.relatedTarget))
|
|
19354
|
-
dragging(false);
|
|
19355
|
-
};
|
|
19356
|
-
const onDrop = (event) => {
|
|
19357
|
-
if (!carriesFiles(event))
|
|
19358
|
-
return;
|
|
19359
|
-
event.preventDefault();
|
|
19360
|
-
dragging(false);
|
|
19361
|
-
const action = fileAction();
|
|
19362
|
-
if (action === 'attach' && event.dataTransfer)
|
|
19363
|
-
attachDropped(event.dataTransfer);
|
|
19364
|
-
else if (action === 'refuse')
|
|
19365
|
-
refuseFiles();
|
|
19366
|
-
};
|
|
19367
|
-
// A paste that carries files is those files, and the text beside them is
|
|
19368
|
-
// only their names (a file copied in the system's file manager), so none of
|
|
19369
|
-
// it lands in the field. Office apps are the exception: copied cells or
|
|
19370
|
-
// paragraphs come as text and formatted text, with a picture of them as a
|
|
19371
|
-
// file, and that paste is the text.
|
|
19372
|
-
const onPaste = (event) => {
|
|
19373
|
-
const clipboard = event.clipboardData;
|
|
19374
|
-
if (!clipboard || clipboard.files.length === 0)
|
|
19375
|
-
return;
|
|
19376
|
-
if (Array.from(clipboard.types).includes('text/html') && clipboard.getData('text/plain'))
|
|
19377
|
-
return;
|
|
19378
|
-
const action = fileAction();
|
|
19379
|
-
if (action === 'none')
|
|
19380
|
-
return;
|
|
19381
|
-
event.preventDefault();
|
|
19382
|
-
if (action === 'attach')
|
|
19383
|
-
attachments?.add(Array.from(clipboard.files, pastedName));
|
|
19384
|
-
else
|
|
19385
|
-
refuseFiles();
|
|
19386
|
-
};
|
|
19472
|
+
setNotice(notice, files.length > 0 && !notice.hidden ? `${FOLDER_REFUSAL_COPY} ${notice.textContent}` : FOLDER_REFUSAL_COPY);
|
|
19473
|
+
}
|
|
19474
|
+
const fileEvents = composerFileEvents({
|
|
19475
|
+
action: fileAction,
|
|
19476
|
+
frameHolds: (node) => node instanceof Node && frame.contains(node),
|
|
19477
|
+
heldNames: () => attachments?.names ?? [],
|
|
19478
|
+
dragging,
|
|
19479
|
+
attach,
|
|
19480
|
+
refuse: refuseFiles,
|
|
19481
|
+
});
|
|
19387
19482
|
const onInput = () => { if (!attachments)
|
|
19388
19483
|
setNotice(notice, null); };
|
|
19389
|
-
form.addEventListener('dragenter',
|
|
19390
|
-
form.addEventListener('dragover',
|
|
19391
|
-
form.addEventListener('dragleave',
|
|
19392
|
-
form.addEventListener('drop',
|
|
19484
|
+
form.addEventListener('dragenter', fileEvents.dragOver);
|
|
19485
|
+
form.addEventListener('dragover', fileEvents.dragOver);
|
|
19486
|
+
form.addEventListener('dragleave', fileEvents.dragLeave);
|
|
19487
|
+
form.addEventListener('drop', fileEvents.drop);
|
|
19393
19488
|
for (const field of fields) {
|
|
19394
|
-
field.addEventListener('paste',
|
|
19489
|
+
field.addEventListener('paste', fileEvents.paste);
|
|
19395
19490
|
field.addEventListener('input', onInput);
|
|
19396
19491
|
}
|
|
19397
19492
|
return {
|
|
@@ -19399,12 +19494,12 @@ function createComposer(options) {
|
|
|
19399
19494
|
notice,
|
|
19400
19495
|
clearNotice: () => setNotice(notice, null),
|
|
19401
19496
|
destroy() {
|
|
19402
|
-
form.removeEventListener('dragenter',
|
|
19403
|
-
form.removeEventListener('dragover',
|
|
19404
|
-
form.removeEventListener('dragleave',
|
|
19405
|
-
form.removeEventListener('drop',
|
|
19497
|
+
form.removeEventListener('dragenter', fileEvents.dragOver);
|
|
19498
|
+
form.removeEventListener('dragover', fileEvents.dragOver);
|
|
19499
|
+
form.removeEventListener('dragleave', fileEvents.dragLeave);
|
|
19500
|
+
form.removeEventListener('drop', fileEvents.drop);
|
|
19406
19501
|
for (const field of fields) {
|
|
19407
|
-
field.removeEventListener('paste',
|
|
19502
|
+
field.removeEventListener('paste', fileEvents.paste);
|
|
19408
19503
|
field.removeEventListener('input', onInput);
|
|
19409
19504
|
}
|
|
19410
19505
|
},
|
|
@@ -30449,7 +30544,7 @@ class SparkVault {
|
|
|
30449
30544
|
}
|
|
30450
30545
|
/** Get the SDK version */
|
|
30451
30546
|
static get version() {
|
|
30452
|
-
return '16.
|
|
30547
|
+
return '16.7.1';
|
|
30453
30548
|
}
|
|
30454
30549
|
}
|
|
30455
30550
|
if (typeof window !== 'undefined') {
|