@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.
@@ -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 Colors = {
31
+ export declare type Color = {
32
32
  primary: string;
33
33
  secondary: string;
34
34
  tertiary: string;
35
35
  };
36
- export declare type buttonColor = {
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: buttonColor;
43
- secondary: buttonColor;
44
- black: buttonColor;
45
- white: buttonColor;
46
- error: buttonColor;
47
- invisible: buttonColor;
51
+ primary: ButtonColor;
52
+ secondary: ButtonColor;
53
+ black: ButtonColor;
54
+ white: ButtonColor;
55
+ error: ButtonColor;
56
+ invisible: ButtonColor;
48
57
  };
49
- export declare type buttonSize = {
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: buttonSize;
56
- xsmall: buttonSize;
57
- small: buttonSize;
58
- medium: buttonSize;
59
- large: buttonSize;
60
- xlarge: buttonSize;
61
- tall: buttonSize;
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: Orders, tz: Timezone, prepStates?: Array<PrepStatus>) => OrderBuckets;
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) => "" | "warning" | "alert" | "text";
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;
@@ -235,7 +235,7 @@ var makeBucketColor = function (settings, minutes) {
235
235
  if (!warning_minutes && !alert_minutes)
236
236
  return '';
237
237
  return minutes < warning_minutes
238
- ? 'warning'
238
+ ? 'error'
239
239
  : minutes < alert_minutes
240
240
  ? 'alert'
241
241
  : 'text';
@@ -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 Colors = {
31
+ export declare type Color = {
32
32
  primary: string;
33
33
  secondary: string;
34
34
  tertiary: string;
35
35
  };
36
- export declare type buttonColor = {
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: buttonColor;
43
- secondary: buttonColor;
44
- black: buttonColor;
45
- white: buttonColor;
46
- error: buttonColor;
47
- invisible: buttonColor;
51
+ primary: ButtonColor;
52
+ secondary: ButtonColor;
53
+ black: ButtonColor;
54
+ white: ButtonColor;
55
+ error: ButtonColor;
56
+ invisible: ButtonColor;
48
57
  };
49
- export declare type buttonSize = {
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: buttonSize;
56
- xsmall: buttonSize;
57
- small: buttonSize;
58
- medium: buttonSize;
59
- large: buttonSize;
60
- xlarge: buttonSize;
61
- tall: buttonSize;
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: Orders, tz: Timezone, prepStates?: Array<PrepStatus>) => OrderBuckets;
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) => "" | "warning" | "alert" | "text";
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;
@@ -217,7 +217,7 @@ export var makeBucketColor = function (settings, minutes) {
217
217
  if (!warning_minutes && !alert_minutes)
218
218
  return '';
219
219
  return minutes < warning_minutes
220
- ? 'warning'
220
+ ? 'error'
221
221
  : minutes < alert_minutes
222
222
  ? 'alert'
223
223
  : 'text';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.1.7",
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",