@open-tender/store 0.1.7 → 0.1.9
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/cjs/slices/orders.d.ts +2 -2
- package/dist/cjs/types/theme.d.ts +25 -16
- package/dist/cjs/utils/orders.d.ts +2 -2
- package/dist/cjs/utils/orders.js +1 -1
- package/dist/esm/slices/orders.d.ts +2 -2
- package/dist/esm/types/theme.d.ts +25 -16
- package/dist/esm/utils/orders.d.ts +2 -2
- package/dist/esm/utils/orders.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FetchOrdersArgs, ItemTypes, Order, OrderCounts, Orders, OrdersAndCounts, OrderUpdate, RequestError, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
1
|
+
import { FetchOrdersArgs, ItemTypes, Order, OrderCounts, Orders, OrdersAndCounts, OrdersKDS, OrderUpdate, RequestError, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
3
|
export interface OrdersState {
|
|
4
|
-
entities: Orders;
|
|
4
|
+
entities: Orders | OrdersKDS;
|
|
5
5
|
loading: RequestStatus;
|
|
6
6
|
error: RequestError;
|
|
7
7
|
current: any;
|
|
@@ -28,37 +28,46 @@ export declare type FontSizes = {
|
|
|
28
28
|
xxlarge: string;
|
|
29
29
|
xxxlarge: string;
|
|
30
30
|
};
|
|
31
|
-
export declare type
|
|
31
|
+
export declare type Color = {
|
|
32
32
|
primary: string;
|
|
33
33
|
secondary: string;
|
|
34
34
|
tertiary: string;
|
|
35
35
|
};
|
|
36
|
-
export declare type
|
|
36
|
+
export declare type Colors = {
|
|
37
|
+
text: Color;
|
|
38
|
+
background: Color;
|
|
39
|
+
border: Color;
|
|
40
|
+
link: Color;
|
|
41
|
+
error: Color;
|
|
42
|
+
success: Color;
|
|
43
|
+
alert: Color;
|
|
44
|
+
};
|
|
45
|
+
export declare type ButtonColor = {
|
|
37
46
|
color: string;
|
|
38
47
|
bgColor: string;
|
|
39
48
|
borderColor: string;
|
|
40
49
|
};
|
|
41
50
|
export declare type ButtonColors = {
|
|
42
|
-
primary:
|
|
43
|
-
secondary:
|
|
44
|
-
black:
|
|
45
|
-
white:
|
|
46
|
-
error:
|
|
47
|
-
invisible:
|
|
51
|
+
primary: ButtonColor;
|
|
52
|
+
secondary: ButtonColor;
|
|
53
|
+
black: ButtonColor;
|
|
54
|
+
white: ButtonColor;
|
|
55
|
+
error: ButtonColor;
|
|
56
|
+
invisible: ButtonColor;
|
|
48
57
|
};
|
|
49
|
-
export declare type
|
|
58
|
+
export declare type ButtonSize = {
|
|
50
59
|
fontSize: string;
|
|
51
60
|
padding: string;
|
|
52
61
|
height: string;
|
|
53
62
|
};
|
|
54
63
|
export declare type ButtonSizes = {
|
|
55
|
-
link:
|
|
56
|
-
xsmall:
|
|
57
|
-
small:
|
|
58
|
-
medium:
|
|
59
|
-
large:
|
|
60
|
-
xlarge:
|
|
61
|
-
tall:
|
|
64
|
+
link: ButtonSize;
|
|
65
|
+
xsmall: ButtonSize;
|
|
66
|
+
small: ButtonSize;
|
|
67
|
+
medium: ButtonSize;
|
|
68
|
+
large: ButtonSize;
|
|
69
|
+
xlarge: ButtonSize;
|
|
70
|
+
tall: ButtonSize;
|
|
62
71
|
};
|
|
63
72
|
export interface NavButtonProps {
|
|
64
73
|
text: string;
|
|
@@ -14,7 +14,7 @@ export declare const makeOrdersCounts: (itemTypes: ItemTypes | null, orders: Ord
|
|
|
14
14
|
future: Record<string, number>;
|
|
15
15
|
qa: Record<string, number>;
|
|
16
16
|
};
|
|
17
|
-
export declare const makeOrderBuckets: (orders:
|
|
17
|
+
export declare const makeOrderBuckets: (orders: OrdersKDS, tz: Timezone, prepStates?: Array<PrepStatus>) => OrderBuckets;
|
|
18
18
|
export declare const makeOrderBucketsCounts: (itemTypes?: ItemTypes, orders?: OrdersKDS) => Record<string, number>;
|
|
19
19
|
export declare const makeTicketCounts: (tickets: OrderTickets) => Record<string, number>;
|
|
20
20
|
export declare const makeCartLookup: (cart: OrderCart) => Record<string, OrderItem>;
|
|
@@ -29,7 +29,7 @@ export declare const makeItemTypesMap: (itemTypes: ItemTypes) => {};
|
|
|
29
29
|
export declare const makeTicketGroups: (tickets: OrderTickets, cart: OrderCart, itemTypes: ItemTypes, isAssembly: boolean) => unknown[];
|
|
30
30
|
export declare const makeDisplayCounts: (counts: Record<string, number>) => number[] | "";
|
|
31
31
|
export declare const displayCounts: (counts: Record<string, number>) => string;
|
|
32
|
-
export declare const makeBucketColor: (settings: Store, minutes: number) => "" | "
|
|
32
|
+
export declare const makeBucketColor: (settings: Store, minutes: number) => "" | "error" | "alert" | "text";
|
|
33
33
|
export declare const makeOrderTimes: (order: OrderKDS, amPm?: boolean, warningMinutes?: number, alertMinutes?: number) => {
|
|
34
34
|
delayed: number;
|
|
35
35
|
requested: Date;
|
package/dist/cjs/utils/orders.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FetchOrdersArgs, ItemTypes, Order, OrderCounts, Orders, OrdersAndCounts, OrderUpdate, RequestError, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
1
|
+
import { FetchOrdersArgs, ItemTypes, Order, OrderCounts, Orders, OrdersAndCounts, OrdersKDS, OrderUpdate, RequestError, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
3
|
export interface OrdersState {
|
|
4
|
-
entities: Orders;
|
|
4
|
+
entities: Orders | OrdersKDS;
|
|
5
5
|
loading: RequestStatus;
|
|
6
6
|
error: RequestError;
|
|
7
7
|
current: any;
|
|
@@ -28,37 +28,46 @@ export declare type FontSizes = {
|
|
|
28
28
|
xxlarge: string;
|
|
29
29
|
xxxlarge: string;
|
|
30
30
|
};
|
|
31
|
-
export declare type
|
|
31
|
+
export declare type Color = {
|
|
32
32
|
primary: string;
|
|
33
33
|
secondary: string;
|
|
34
34
|
tertiary: string;
|
|
35
35
|
};
|
|
36
|
-
export declare type
|
|
36
|
+
export declare type Colors = {
|
|
37
|
+
text: Color;
|
|
38
|
+
background: Color;
|
|
39
|
+
border: Color;
|
|
40
|
+
link: Color;
|
|
41
|
+
error: Color;
|
|
42
|
+
success: Color;
|
|
43
|
+
alert: Color;
|
|
44
|
+
};
|
|
45
|
+
export declare type ButtonColor = {
|
|
37
46
|
color: string;
|
|
38
47
|
bgColor: string;
|
|
39
48
|
borderColor: string;
|
|
40
49
|
};
|
|
41
50
|
export declare type ButtonColors = {
|
|
42
|
-
primary:
|
|
43
|
-
secondary:
|
|
44
|
-
black:
|
|
45
|
-
white:
|
|
46
|
-
error:
|
|
47
|
-
invisible:
|
|
51
|
+
primary: ButtonColor;
|
|
52
|
+
secondary: ButtonColor;
|
|
53
|
+
black: ButtonColor;
|
|
54
|
+
white: ButtonColor;
|
|
55
|
+
error: ButtonColor;
|
|
56
|
+
invisible: ButtonColor;
|
|
48
57
|
};
|
|
49
|
-
export declare type
|
|
58
|
+
export declare type ButtonSize = {
|
|
50
59
|
fontSize: string;
|
|
51
60
|
padding: string;
|
|
52
61
|
height: string;
|
|
53
62
|
};
|
|
54
63
|
export declare type ButtonSizes = {
|
|
55
|
-
link:
|
|
56
|
-
xsmall:
|
|
57
|
-
small:
|
|
58
|
-
medium:
|
|
59
|
-
large:
|
|
60
|
-
xlarge:
|
|
61
|
-
tall:
|
|
64
|
+
link: ButtonSize;
|
|
65
|
+
xsmall: ButtonSize;
|
|
66
|
+
small: ButtonSize;
|
|
67
|
+
medium: ButtonSize;
|
|
68
|
+
large: ButtonSize;
|
|
69
|
+
xlarge: ButtonSize;
|
|
70
|
+
tall: ButtonSize;
|
|
62
71
|
};
|
|
63
72
|
export interface NavButtonProps {
|
|
64
73
|
text: string;
|
|
@@ -14,7 +14,7 @@ export declare const makeOrdersCounts: (itemTypes: ItemTypes | null, orders: Ord
|
|
|
14
14
|
future: Record<string, number>;
|
|
15
15
|
qa: Record<string, number>;
|
|
16
16
|
};
|
|
17
|
-
export declare const makeOrderBuckets: (orders:
|
|
17
|
+
export declare const makeOrderBuckets: (orders: OrdersKDS, tz: Timezone, prepStates?: Array<PrepStatus>) => OrderBuckets;
|
|
18
18
|
export declare const makeOrderBucketsCounts: (itemTypes?: ItemTypes, orders?: OrdersKDS) => Record<string, number>;
|
|
19
19
|
export declare const makeTicketCounts: (tickets: OrderTickets) => Record<string, number>;
|
|
20
20
|
export declare const makeCartLookup: (cart: OrderCart) => Record<string, OrderItem>;
|
|
@@ -29,7 +29,7 @@ export declare const makeItemTypesMap: (itemTypes: ItemTypes) => {};
|
|
|
29
29
|
export declare const makeTicketGroups: (tickets: OrderTickets, cart: OrderCart, itemTypes: ItemTypes, isAssembly: boolean) => unknown[];
|
|
30
30
|
export declare const makeDisplayCounts: (counts: Record<string, number>) => number[] | "";
|
|
31
31
|
export declare const displayCounts: (counts: Record<string, number>) => string;
|
|
32
|
-
export declare const makeBucketColor: (settings: Store, minutes: number) => "" | "
|
|
32
|
+
export declare const makeBucketColor: (settings: Store, minutes: number) => "" | "error" | "alert" | "text";
|
|
33
33
|
export declare const makeOrderTimes: (order: OrderKDS, amPm?: boolean, warningMinutes?: number, alertMinutes?: number) => {
|
|
34
34
|
delayed: number;
|
|
35
35
|
requested: Date;
|
package/dist/esm/utils/orders.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|