@sparkvault/sdk-js 16.8.0 → 16.10.0
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 +1110 -649
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +1110 -649
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/support-styles.d.ts +6 -1
- package/dist/products/help-desk/types.d.ts +4 -0
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
- package/dist/products/help-desk/form-attachments.d.ts +0 -38
- package/dist/products/help-desk/form-composer.d.ts +0 -38
- package/dist/products/help-desk/icons.d.ts +0 -21
package/package.json
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { HelpDeskClient } from './client';
|
|
2
|
-
/** A refusal of files read under the composer, hidden until there is one. */
|
|
3
|
-
export declare function createNotice(): HTMLParagraphElement;
|
|
4
|
-
/** Show a notice's refusal, or hide it with null. It is an alert only while it shows, as a field's error is. */
|
|
5
|
-
export declare function setNotice(notice: HTMLParagraphElement, text: string | null): void;
|
|
6
|
-
export interface FormUploadContext {
|
|
7
|
-
draftId: string;
|
|
8
|
-
expectedSessionToken: string;
|
|
9
|
-
}
|
|
10
|
-
/** The form's one attachment pipeline: picked, pasted and dropped files all enter through `add`. */
|
|
11
|
-
export interface FormAttachments {
|
|
12
|
-
/** The Attach button, which opens the picker, with the policy hint that describes it. */
|
|
13
|
-
readonly toolbar: HTMLDivElement;
|
|
14
|
-
/** Each file as a chip: its name, status or progress, and its Remove and Retry. */
|
|
15
|
-
readonly list: HTMLUListElement;
|
|
16
|
-
/** The refusal of files past the per-message count. */
|
|
17
|
-
readonly notice: HTMLParagraphElement;
|
|
18
|
-
/** Whether a file handed over now joins: not while a send locks the files or picking is off. */
|
|
19
|
-
readonly accepting: boolean;
|
|
20
|
-
readonly attachmentIds: string[];
|
|
21
|
-
readonly unresolved: boolean;
|
|
22
|
-
readonly hasEntries: boolean;
|
|
23
|
-
/** The names of the files it holds, its chips' names. */
|
|
24
|
-
readonly names: string[];
|
|
25
|
-
add(files: ArrayLike<File>): void;
|
|
26
|
-
start(): Promise<void>;
|
|
27
|
-
lock(value: boolean): void;
|
|
28
|
-
disablePicking(value: boolean): void;
|
|
29
|
-
renewSession(previousToken: string, nextToken: string): void;
|
|
30
|
-
clear(preserveComplete?: boolean): void;
|
|
31
|
-
destroy(preserveComplete?: boolean): void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The picker owns each file's transfer; it publishes only IDs whose Forge
|
|
35
|
-
* receipt has confirmed storage. `onEntriesChange` hears each file the
|
|
36
|
-
* customer adds or removes.
|
|
37
|
-
*/
|
|
38
|
-
export declare function createFormAttachments(client: HelpDeskClient, prefix: string, context: () => Promise<FormUploadContext | null>, onEntriesChange: () => void): FormAttachments;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type FormAttachments } from './form-attachments';
|
|
2
|
-
export interface FormComposer {
|
|
3
|
-
/** The bordered frame: the text, then the Attach toolbar and the file chips when the desk takes files. */
|
|
4
|
-
readonly frame: HTMLDivElement;
|
|
5
|
-
/** The refusal of a file the composer cannot take, read under the frame. */
|
|
6
|
-
readonly notice: HTMLParagraphElement;
|
|
7
|
-
clearNotice(): void;
|
|
8
|
-
destroy(): void;
|
|
9
|
-
}
|
|
10
|
-
export interface ComposerOptions {
|
|
11
|
-
/** The contact form: a file brought anywhere over it is the composer's to take or refuse. */
|
|
12
|
-
form: HTMLFormElement;
|
|
13
|
-
/** The summary, where a pasted file joins as it does in the details. */
|
|
14
|
-
summary: HTMLInputElement;
|
|
15
|
-
/** The details, which the composer frames. */
|
|
16
|
-
textarea: HTMLTextAreaElement;
|
|
17
|
-
/** The form's attachment pipeline; absent when the form takes no files. */
|
|
18
|
-
attachments: FormAttachments | undefined;
|
|
19
|
-
/** The desk takes no files from customers, so a file brought to the request is refused in words. */
|
|
20
|
-
deskRefusesFiles: boolean;
|
|
21
|
-
/** Whether the request step shows: files join the request only there. */
|
|
22
|
-
onRequestStep: () => boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The details field as a composer. A file pasted into the summary or the
|
|
26
|
-
* details, or dropped anywhere on the request step, joins the form's one
|
|
27
|
-
* attachment pipeline (`attachments.add`), under the same limits and
|
|
28
|
-
* refusals as a picked one; the drop target shows only over the composer.
|
|
29
|
-
* How a drag, a drop and a paste are answered (which files they carry, the
|
|
30
|
-
* folders a drop leaves out, the names of pasted pictures, when the drop
|
|
31
|
-
* target shows) is @sparkvault/app-sdk/composer-files' to decide; this says
|
|
32
|
-
* what a file brought now does. A paste or drag of text alone stays the
|
|
33
|
-
* browser's. A file brought over the form is never the browser's to open in
|
|
34
|
-
* place of the unsent request: on the sign-in step, or while the form takes
|
|
35
|
-
* no files, it is refused outright, and a desk that takes no files says so
|
|
36
|
-
* when the file is dropped.
|
|
37
|
-
*/
|
|
38
|
-
export declare function createComposer(options: ComposerOptions): FormComposer;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The help desk's bare outline glyphs, shared by the support wizard and the
|
|
3
|
-
* ticket form: stroked in `currentColor`, so the stylesheet that sizes them
|
|
4
|
-
* also colors them, and hidden from assistive technology, since the control
|
|
5
|
-
* that holds one names it.
|
|
6
|
-
*/
|
|
7
|
-
declare const PATHS: {
|
|
8
|
-
readonly back: "m14.5 6-6 6 6 6";
|
|
9
|
-
readonly close: "m6 6 12 12M18 6 6 18";
|
|
10
|
-
readonly external: "M14 4h6v6m0-6L10 14M11 5H5a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1v-6";
|
|
11
|
-
readonly check: "m5 12 4 4L19 6";
|
|
12
|
-
readonly article: "M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8Zm0 0v5h5M8 12h8M8 16h6";
|
|
13
|
-
readonly chevron: "m9 6 6 6-6 6";
|
|
14
|
-
readonly thumbUp: "M7 10v11H3V10Zm0 1 5-8c2 0 3 1 2 4l-1 3h6a2 2 0 0 1 2 2l-2 7a2 2 0 0 1-2 2H7";
|
|
15
|
-
readonly thumbDown: "M7 14V3H3v11Zm0-1 5 8c2 0 3-1 2-4l-1-3h6a2 2 0 0 0 2-2l-2-7a2 2 0 0 0-2-2H7";
|
|
16
|
-
readonly paperclip: "m21 11-8.6 8.6a5.5 5.5 0 0 1-7.8-7.8l8.6-8.6a3.7 3.7 0 0 1 5.2 5.2l-8.6 8.6a1.8 1.8 0 0 1-2.6-2.6L15 6.6";
|
|
17
|
-
readonly info: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-10v5m0-8h.01";
|
|
18
|
-
};
|
|
19
|
-
export type HelpDeskIconName = keyof typeof PATHS;
|
|
20
|
-
export declare function helpDeskIcon(name: HelpDeskIconName): SVGSVGElement;
|
|
21
|
-
export {};
|