@webority/support-react 0.88.1 → 0.90.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.
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "webority-guidance/1",
|
|
3
|
+
"package": {
|
|
4
|
+
"name": "@webority/support-react",
|
|
5
|
+
"version": "0.90.0"
|
|
6
|
+
},
|
|
7
|
+
"components": [
|
|
8
|
+
{
|
|
9
|
+
"name": "ReportIssue",
|
|
10
|
+
"usage": {
|
|
11
|
+
"when": [
|
|
12
|
+
"The person should be able to report a problem from any page, with the page address, browser and product version attached.",
|
|
13
|
+
"A screenshot of the page can help, and the person chooses whether to add one."
|
|
14
|
+
],
|
|
15
|
+
"whenNot": [],
|
|
16
|
+
"do": [],
|
|
17
|
+
"dont": [],
|
|
18
|
+
"a11y": [
|
|
19
|
+
"The button opens a modal dialog and says so through aria-haspopup.",
|
|
20
|
+
"In compact mode the label is the button's accessible name and its tooltip.",
|
|
21
|
+
"The screenshot progress and the created ticket are announced as status messages."
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "SupportCenter",
|
|
27
|
+
"usage": {
|
|
28
|
+
"when": [
|
|
29
|
+
"The customer needs one page for their own support tickets.",
|
|
30
|
+
"They open a ticket to read its conversation and reply.",
|
|
31
|
+
"They start a new ticket from the same page."
|
|
32
|
+
],
|
|
33
|
+
"whenNot": [],
|
|
34
|
+
"do": [],
|
|
35
|
+
"dont": [],
|
|
36
|
+
"a11y": [
|
|
37
|
+
"The page is a section labelled by its Your tickets heading.",
|
|
38
|
+
"New ticket is a native button and stays disabled until the support settings have loaded.",
|
|
39
|
+
"A failure to load the support settings shows a warning alert with a Try again button."
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "SupportContact",
|
|
45
|
+
"usage": {
|
|
46
|
+
"when": [
|
|
47
|
+
"A page or footer shows how to reach support.",
|
|
48
|
+
"It lists the email address with a copy button, the phone number as a call link and the opening hours.",
|
|
49
|
+
"A field the product has not set is left out, and nothing renders when none is set."
|
|
50
|
+
],
|
|
51
|
+
"whenNot": [],
|
|
52
|
+
"do": [],
|
|
53
|
+
"dont": [],
|
|
54
|
+
"a11y": [
|
|
55
|
+
"The section is labelled Contact followed by the support name, or Contact support when no name is set.",
|
|
56
|
+
"The email address is a mailto link and the phone number a call link.",
|
|
57
|
+
"The copy button for the email address is labelled Copy email."
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
@@ -6,21 +6,16 @@
|
|
|
6
6
|
* product version.
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
|
-
* @param {string} [props.label
|
|
10
|
-
* @param {boolean} [props.floating
|
|
11
|
-
* @param {boolean} [props.compact
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* never overlap and neither needs an offset; `className` and `style` then land on the item inside
|
|
15
|
-
* that container, which is not itself fixed.
|
|
16
|
-
* @param {string} [props.defaultCategory="Bug report"] Preselected when the config lists it.
|
|
17
|
-
* @param {string} [props.appVersion] The product build, recorded on the ticket.
|
|
9
|
+
* @param {string} [props.label]
|
|
10
|
+
* @param {boolean} [props.floating]
|
|
11
|
+
* @param {boolean} [props.compact]
|
|
12
|
+
* @param {string} [props.defaultCategory]
|
|
13
|
+
* @param {string} [props.appVersion]
|
|
18
14
|
* @param {(id: string) => string} [props.getTicketHref] Where the new ticket can be opened; shows a View ticket link.
|
|
19
15
|
* @param {(ticket: any) => void} [props.onOpenTicket] Called by the View ticket button when there is no href.
|
|
20
16
|
* @param {(ticket: any) => void} [props.onCreated] Called once the ticket is raised.
|
|
21
|
-
* @param {string} [props.className]
|
|
22
|
-
* @param {import('react').CSSProperties} [props.style]
|
|
23
|
-
* `floating`, an inset such as `{ bottom: "5rem" }` moves the button clear of other fixed controls.
|
|
17
|
+
* @param {string} [props.className]
|
|
18
|
+
* @param {import('react').CSSProperties} [props.style]
|
|
24
19
|
*/
|
|
25
20
|
export default function ReportIssue({ label, floating, compact, defaultCategory, appVersion, getTicketHref, onOpenTicket, onCreated, className, style, }: {
|
|
26
21
|
label?: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const meta: {
|
|
2
|
+
readonly name: "ReportIssue";
|
|
3
|
+
readonly marker: any;
|
|
4
|
+
readonly platforms: readonly ["web"];
|
|
5
|
+
readonly acceptsChildren: false;
|
|
6
|
+
readonly props: {
|
|
7
|
+
readonly label: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly default: "Report an issue";
|
|
10
|
+
readonly description: "The button text.";
|
|
11
|
+
};
|
|
12
|
+
readonly floating: {
|
|
13
|
+
readonly type: "boolean";
|
|
14
|
+
readonly default: false;
|
|
15
|
+
readonly description: "Pins the button to the bottom corner of the screen.";
|
|
16
|
+
};
|
|
17
|
+
readonly compact: {
|
|
18
|
+
readonly type: "boolean";
|
|
19
|
+
readonly default: false;
|
|
20
|
+
readonly description: "Shows an icon only: a 40px circle with the label as its tooltip and accessible name. With floating it sits in the shared floating corner container, above the compact chat launcher, so the two never overlap and neither needs an offset.";
|
|
21
|
+
};
|
|
22
|
+
readonly defaultCategory: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly default: "Bug report";
|
|
25
|
+
readonly description: "The category preselected when the support config lists it.";
|
|
26
|
+
};
|
|
27
|
+
readonly appVersion: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly description: "The product build, recorded on the ticket.";
|
|
30
|
+
};
|
|
31
|
+
readonly className: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
readonly description: "Added to the button's wrapper, both floating and inline, to place it.";
|
|
34
|
+
};
|
|
35
|
+
readonly style: {
|
|
36
|
+
readonly type: "object";
|
|
37
|
+
readonly description: "Merged over the wrapper's own style. With floating, an inset such as bottom 5rem moves the button clear of other fixed controls.";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
readonly examples: readonly [{
|
|
41
|
+
readonly id: "ReportIssue";
|
|
42
|
+
readonly title: "Default";
|
|
43
|
+
readonly props: {
|
|
44
|
+
readonly appVersion: "9.1.0";
|
|
45
|
+
};
|
|
46
|
+
}];
|
|
47
|
+
readonly usage: {
|
|
48
|
+
readonly when: readonly ["The person should be able to report a problem from any page, with the page address, browser and product version attached.", "A screenshot of the page can help, and the person chooses whether to add one."];
|
|
49
|
+
readonly whenNot: readonly [];
|
|
50
|
+
readonly do: readonly [];
|
|
51
|
+
readonly dont: readonly [];
|
|
52
|
+
readonly a11y: readonly ["The button opens a modal dialog and says so through aria-haspopup.", "In compact mode the label is the button's accessible name and its tooltip.", "The screenshot progress and the created ticket are announced as status messages."];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* The list is filtered, searched and paged on the server; the status tabs show the server's counts.
|
|
6
6
|
*
|
|
7
7
|
* @param {object} props
|
|
8
|
-
* @param {string} [props.initialTicketId]
|
|
9
|
-
* @param {string} [props.defaultCategory]
|
|
10
|
-
* @param {string} [props.appVersion]
|
|
8
|
+
* @param {string} [props.initialTicketId]
|
|
9
|
+
* @param {string} [props.defaultCategory]
|
|
10
|
+
* @param {string} [props.appVersion]
|
|
11
11
|
*/
|
|
12
12
|
export default function SupportCenter({ initialTicketId, defaultCategory, appVersion }: {
|
|
13
13
|
initialTicketId?: string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const meta: {
|
|
2
|
+
readonly name: "SupportCenter";
|
|
3
|
+
readonly marker: any;
|
|
4
|
+
readonly platforms: readonly ["web"];
|
|
5
|
+
readonly acceptsChildren: false;
|
|
6
|
+
readonly props: {
|
|
7
|
+
readonly initialTicketId: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly description: "Open this ticket first. It wins over the ticket named in the address.";
|
|
10
|
+
};
|
|
11
|
+
readonly defaultCategory: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
readonly description: "Preselected in the New ticket form when the support settings list it.";
|
|
14
|
+
};
|
|
15
|
+
readonly appVersion: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly description: "The product build, recorded on new tickets.";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly omit: readonly [];
|
|
21
|
+
readonly examples: readonly [{
|
|
22
|
+
readonly id: "SupportCenter";
|
|
23
|
+
readonly title: "Default";
|
|
24
|
+
readonly props: {};
|
|
25
|
+
}, {
|
|
26
|
+
readonly id: "SupportCenter.initialTicket";
|
|
27
|
+
readonly title: "Open ticket";
|
|
28
|
+
readonly props: {
|
|
29
|
+
readonly initialTicketId: "t-2";
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
readonly id: "SupportCenter.newTicket";
|
|
33
|
+
readonly title: "Preselected category";
|
|
34
|
+
readonly props: {
|
|
35
|
+
readonly defaultCategory: "Billing";
|
|
36
|
+
readonly appVersion: "4.2.0";
|
|
37
|
+
};
|
|
38
|
+
}];
|
|
39
|
+
readonly usage: {
|
|
40
|
+
readonly when: readonly ["The customer needs one page for their own support tickets.", "They open a ticket to read its conversation and reply.", "They start a new ticket from the same page."];
|
|
41
|
+
readonly whenNot: readonly [];
|
|
42
|
+
readonly do: readonly [];
|
|
43
|
+
readonly dont: readonly [];
|
|
44
|
+
readonly a11y: readonly ["The page is a section labelled by its Your tickets heading.", "New ticket is a native button and stays disabled until the support settings have loaded.", "A failure to load the support settings shows a warning alert with a Try again button."];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const meta: {
|
|
2
|
+
readonly name: "SupportContact";
|
|
3
|
+
readonly marker: any;
|
|
4
|
+
readonly platforms: readonly ["web"];
|
|
5
|
+
readonly acceptsChildren: false;
|
|
6
|
+
readonly props: {
|
|
7
|
+
readonly className: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly description: "Extra classes on the contact section.";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
readonly omit: readonly [];
|
|
13
|
+
readonly examples: readonly [{
|
|
14
|
+
readonly id: "SupportContact";
|
|
15
|
+
readonly title: "Default";
|
|
16
|
+
readonly props: {};
|
|
17
|
+
}];
|
|
18
|
+
readonly usage: {
|
|
19
|
+
readonly when: readonly ["A page or footer shows how to reach support.", "It lists the email address with a copy button, the phone number as a call link and the opening hours.", "A field the product has not set is left out, and nothing renders when none is set."];
|
|
20
|
+
readonly whenNot: readonly [];
|
|
21
|
+
readonly do: readonly [];
|
|
22
|
+
readonly dont: readonly [];
|
|
23
|
+
readonly a11y: readonly ["The section is labelled Contact followed by the support name, or Contact support when no name is set.", "The email address is a mailto link and the phone number a call link.", "The copy button for the email address is labelled Copy email."];
|
|
24
|
+
};
|
|
25
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/support-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.0",
|
|
4
4
|
"description": "Webority customer support for React portals: ticket centre, report-an-issue with an optional page screenshot, and support contact details, built on @webority/ui-react.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"types": "./dist/types/index.d.ts",
|
|
23
23
|
"default": "./dist/support-react.js"
|
|
24
24
|
},
|
|
25
|
-
"./package.json": "./package.json"
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
"./guidance.json": "./dist/guidance.json"
|
|
26
27
|
},
|
|
27
28
|
"sideEffects": false,
|
|
28
29
|
"peerDependencies": {
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"react": "^19.0.0",
|
|
31
32
|
"react-bootstrap": "^2.10.0",
|
|
32
33
|
"react-dom": "^19.0.0",
|
|
33
|
-
"@webority/ui-react": "0.
|
|
34
|
+
"@webority/ui-react": "0.90.0"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@testing-library/dom": "10.4.2",
|
|
@@ -48,13 +49,14 @@
|
|
|
48
49
|
"typescript": "^7.0.2",
|
|
49
50
|
"vite": "^8.0.12",
|
|
50
51
|
"vitest": "5.0.1",
|
|
51
|
-
"@webority/
|
|
52
|
+
"@webority/canvas-kit": "0.90.0",
|
|
53
|
+
"@webority/ui-react": "0.90.0"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"html-to-image": "^1.11.13"
|
|
55
57
|
},
|
|
56
58
|
"scripts": {
|
|
57
|
-
"build": "vite build && tsc -p tsconfig.json",
|
|
59
|
+
"build": "vite build && tsc -p tsconfig.json && node ../canvas-kit/dist/cli.js guidance --config canvas-kit.json --out dist/guidance.json",
|
|
58
60
|
"test": "vitest run",
|
|
59
61
|
"test:watch": "vitest",
|
|
60
62
|
"test:coverage": "vitest run --coverage"
|