@tallyui/components 3.0.0-next.0 → 3.0.0-next.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.js
CHANGED
|
@@ -2445,7 +2445,7 @@ function CustomerPicker({ search, create, selected, onSelect, onError, online, d
|
|
|
2445
2445
|
if (error2 instanceof CustomerServiceError) {
|
|
2446
2446
|
setError(error2.code === "network" ? "Couldn't reach the store. Try again." : error2.code === "server" ? "The store couldn't do that. Try again." : error2.message);
|
|
2447
2447
|
} else {
|
|
2448
|
-
setError(error2 instanceof ConnectorUnauthorizedError ? "Sign in again to continue." : "Something went wrong. Try again.");
|
|
2448
|
+
setError(error2 instanceof ConnectorUnauthorizedError && error2.code === "unauthorized" ? "Sign in again to continue." : error2 instanceof ConnectorUnauthorizedError && error2.code === "forbidden" ? "Your account isn't allowed to do this on this store. Ask the store owner." : "Something went wrong. Try again.");
|
|
2449
2449
|
onError?.(error2);
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
@@ -4434,6 +4434,10 @@ var PULL_NOTICE_TEXT = {
|
|
|
4434
4434
|
line: () => "Products aren't updating: this till needs to sign in to the online store again.",
|
|
4435
4435
|
detail: () => "You can keep selling. Products, prices and stock stay as they were until someone signs in again."
|
|
4436
4436
|
},
|
|
4437
|
+
forbidden: {
|
|
4438
|
+
line: () => "Products aren't updating: your account isn't allowed to do this on this store.",
|
|
4439
|
+
detail: () => "You can keep selling. Ask the store owner."
|
|
4440
|
+
},
|
|
4437
4441
|
till_update_required: {
|
|
4438
4442
|
line: () => "Products aren't updating: this till needs updating.",
|
|
4439
4443
|
detail: () => "You can keep selling. Products, prices and stock stay as they were until this till is updated."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tallyui/components",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Universal POS UI components for Tally UI",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"directory": "packages/components"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tallyui/core": "^3.0.0-next.
|
|
31
|
-
"@tallyui/primitives": "^3.0.0-next.
|
|
32
|
-
"@tallyui/theme": "^3.0.0-next.
|
|
30
|
+
"@tallyui/core": "^3.0.0-next.1",
|
|
31
|
+
"@tallyui/primitives": "^3.0.0-next.1",
|
|
32
|
+
"@tallyui/theme": "^3.0.0-next.1",
|
|
33
33
|
"react": ">=18",
|
|
34
34
|
"react-native": ">=0.74",
|
|
35
35
|
"react-native-svg": ">=15"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"class-variance-authority": "^0.7.1",
|
|
39
|
-
"@tallyui/pos": "3.0.0-next.
|
|
39
|
+
"@tallyui/pos": "3.0.0-next.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tallyui/connector-medusa": "3.0.0-next.
|
|
43
|
-
"@tallyui/connector-vendure": "3.0.0-next.
|
|
44
|
-
"@tallyui/connector-woocommerce": "3.0.0-next.
|
|
45
|
-
"@tallyui/mock-api": "3.0.0-next.
|
|
42
|
+
"@tallyui/connector-medusa": "3.0.0-next.1",
|
|
43
|
+
"@tallyui/connector-vendure": "3.0.0-next.1",
|
|
44
|
+
"@tallyui/connector-woocommerce": "3.0.0-next.1",
|
|
45
|
+
"@tallyui/mock-api": "3.0.0-next.1",
|
|
46
46
|
"@types/react": ">=18",
|
|
47
47
|
"react": "^19.2.4",
|
|
48
48
|
"react-native-svg": "15.12.1",
|
|
@@ -44,7 +44,9 @@ export function CustomerPicker({ search, create, selected, onSelect, onError, on
|
|
|
44
44
|
setError(error.code === 'network' ? "Couldn't reach the store. Try again."
|
|
45
45
|
: error.code === 'server' ? "The store couldn't do that. Try again." : error.message);
|
|
46
46
|
} else {
|
|
47
|
-
setError(error instanceof ConnectorUnauthorizedError ? 'Sign in again to continue.'
|
|
47
|
+
setError(error instanceof ConnectorUnauthorizedError && error.code === 'unauthorized' ? 'Sign in again to continue.'
|
|
48
|
+
: error instanceof ConnectorUnauthorizedError && error.code === 'forbidden' ? "Your account isn't allowed to do this on this store. Ask the store owner."
|
|
49
|
+
: 'Something went wrong. Try again.');
|
|
48
50
|
onError?.(error);
|
|
49
51
|
}
|
|
50
52
|
}
|
package/src/sale/sync-status.tsx
CHANGED
|
@@ -14,6 +14,10 @@ const PULL_NOTICE_TEXT: Record<string, PullNoticeText> = {
|
|
|
14
14
|
line: () => "Products aren't updating: this till needs to sign in to the online store again.",
|
|
15
15
|
detail: () => 'You can keep selling. Products, prices and stock stay as they were until someone signs in again.',
|
|
16
16
|
},
|
|
17
|
+
forbidden: {
|
|
18
|
+
line: () => "Products aren't updating: your account isn't allowed to do this on this store.",
|
|
19
|
+
detail: () => 'You can keep selling. Ask the store owner.',
|
|
20
|
+
},
|
|
17
21
|
till_update_required: {
|
|
18
22
|
line: () => "Products aren't updating: this till needs updating.",
|
|
19
23
|
detail: () => 'You can keep selling. Products, prices and stock stay as they were until this till is updated.',
|