@webority/mobile-support 0.0.13 → 0.1.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/lib/commonjs/SupportProvider.js +1 -335
- package/lib/commonjs/client.js +1 -149
- package/lib/commonjs/clipboard.js +1 -10
- package/lib/commonjs/components/Attachments.js +1 -246
- package/lib/commonjs/components/NewSupportTicket.js +1 -210
- package/lib/commonjs/components/PhotoTray.js +1 -141
- package/lib/commonjs/components/SupportContact.js +1 -134
- package/lib/commonjs/components/SupportTicketDetail.js +1 -348
- package/lib/commonjs/components/SupportTicketList.js +1 -279
- package/lib/commonjs/device.js +1 -29
- package/lib/commonjs/files.js +1 -37
- package/lib/commonjs/format.js +1 -29
- package/lib/commonjs/index.js +1 -97
- package/lib/commonjs/photos.js +1 -67
- package/lib/commonjs/report/ReportIssueButton.js +1 -57
- package/lib/commonjs/report/captureAndReport.js +1 -34
- package/lib/commonjs/report/index.js +1 -20
- package/lib/commonjs/share/index.js +1 -44
- package/lib/commonjs/types.js +1 -2
- package/lib/commonjs/validation.js +1 -45
- package/lib/module/SupportProvider.js +1 -323
- package/lib/module/client.js +1 -143
- package/lib/module/clipboard.js +1 -5
- package/lib/module/components/Attachments.js +1 -240
- package/lib/module/components/NewSupportTicket.js +1 -205
- package/lib/module/components/PhotoTray.js +1 -136
- package/lib/module/components/SupportContact.js +1 -129
- package/lib/module/components/SupportTicketDetail.js +1 -343
- package/lib/module/components/SupportTicketList.js +1 -273
- package/lib/module/device.js +1 -24
- package/lib/module/files.js +1 -31
- package/lib/module/format.js +1 -23
- package/lib/module/index.js +1 -10
- package/lib/module/photos.js +1 -61
- package/lib/module/report/ReportIssueButton.js +1 -52
- package/lib/module/report/captureAndReport.js +1 -29
- package/lib/module/report/index.js +1 -12
- package/lib/module/share/index.js +1 -37
- package/lib/module/types.js +0 -2
- package/lib/module/validation.js +1 -38
- package/lib/typescript/commonjs/SupportProvider.d.ts +4 -0
- package/lib/typescript/commonjs/format.d.ts +6 -4
- package/lib/typescript/module/SupportProvider.d.ts +4 -0
- package/lib/typescript/module/format.d.ts +6 -4
- package/package.json +8 -6
|
@@ -18,6 +18,8 @@ export interface SupportProviderProps {
|
|
|
18
18
|
* attachments show their name and size only.
|
|
19
19
|
*/
|
|
20
20
|
openFile?: SupportFileOpener;
|
|
21
|
+
/** IANA time zone ticket times show in. Defaults to `Asia/Kolkata` (IST). */
|
|
22
|
+
timeZone?: string;
|
|
21
23
|
children: React.ReactNode;
|
|
22
24
|
}
|
|
23
25
|
export declare const SupportProvider: React.FC<SupportProviderProps>;
|
|
@@ -26,6 +28,8 @@ export declare const useSupportClient: () => SupportClient;
|
|
|
26
28
|
export declare const useAttachmentLoader: () => (attachment: Pick<SupportAttachmentView, "id" | "contentType">) => Promise<string>;
|
|
27
29
|
/** @internal Used by the file rows; null when the app gave no `openFile`. */
|
|
28
30
|
export declare const useAttachmentOpener: () => AttachmentOpener | null;
|
|
31
|
+
/** @internal Used by the ticket screens to format times. */
|
|
32
|
+
export declare const useSupportTimeZone: () => string;
|
|
29
33
|
export interface SupportConfigState {
|
|
30
34
|
config: SupportContactInfo | null;
|
|
31
35
|
loading: boolean;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** The zone ticket times show in unless the app passes `timeZone` to `SupportProvider`. */
|
|
2
|
+
export declare const DEFAULT_TIME_ZONE = "Asia/Kolkata";
|
|
1
3
|
/**
|
|
2
|
-
* A timestamp in
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* A timestamp as `07-Oct-2026, 2:30 PM` in an IANA time zone. The backend sends UTC.
|
|
5
|
+
* Built from `formatToParts`, because the assembled Intl string varies by engine
|
|
6
|
+
* (month spelling, a narrow no-break space before AM/PM).
|
|
5
7
|
*/
|
|
6
|
-
export declare const formatWhen: (utc: string | null | undefined) => string;
|
|
8
|
+
export declare const formatWhen: (utc: string | null | undefined, timeZone?: string) => string;
|
|
7
9
|
/** A byte count as a person reads it. */
|
|
8
10
|
export declare const formatBytes: (bytes: number) => string;
|
|
9
11
|
export declare const isImage: (contentType: string) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-support",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Customer support tickets for Webority React Native apps: the support API client, hooks, ticket screens, contact card and a report-an-issue button that attaches a screenshot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"!**/*.map"
|
|
63
63
|
],
|
|
64
64
|
"scripts": {
|
|
65
|
-
"build": "bob build",
|
|
65
|
+
"build": "bob build && node ../../scripts/minify-lib.mjs",
|
|
66
66
|
"clean": "rimraf lib",
|
|
67
67
|
"lint": "biome lint ./src",
|
|
68
68
|
"lint:fix": "biome lint --write ./src",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"typecheck": "tsc --noEmit"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@webority/mobile-core": ">=0.0
|
|
74
|
-
"@webority/mobile-ui": ">=0.0
|
|
73
|
+
"@webority/mobile-core": ">=0.1.0 <0.2.0",
|
|
74
|
+
"@webority/mobile-ui": ">=0.1.0 <0.2.0",
|
|
75
75
|
"expo": ">=57.0.0",
|
|
76
76
|
"expo-clipboard": ">=57.0.0",
|
|
77
77
|
"expo-file-system": ">=57.0.0",
|
|
@@ -102,13 +102,15 @@
|
|
|
102
102
|
[
|
|
103
103
|
"commonjs",
|
|
104
104
|
{
|
|
105
|
-
"esm": true
|
|
105
|
+
"esm": true,
|
|
106
|
+
"sourceMaps": false
|
|
106
107
|
}
|
|
107
108
|
],
|
|
108
109
|
[
|
|
109
110
|
"module",
|
|
110
111
|
{
|
|
111
|
-
"esm": true
|
|
112
|
+
"esm": true,
|
|
113
|
+
"sourceMaps": false
|
|
112
114
|
}
|
|
113
115
|
],
|
|
114
116
|
[
|