@open-tender/utils 0.1.108 → 0.1.109
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/.DS_Store
ADDED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { OrderType, RequestedAt, RevenueCenter, ServiceType } from '@open-tender/types';
|
|
2
|
+
import { OrderType, RequestedAt, RevenueCenter, ServiceType, TimeOption } from '@open-tender/types';
|
|
3
3
|
export declare const useFirstTimes: (revenueCenter: RevenueCenter, serviceType: ServiceType, orderType: OrderType, requestedAt?: RequestedAt, isGroupOrder?: boolean) => {
|
|
4
4
|
date: `${number}${number}${number}${number}-${number}${number}-${number}${number}` | null;
|
|
5
5
|
setDate: import("react").Dispatch<import("react").SetStateAction<`${number}${number}${number}${number}-${number}${number}-${number}${number}` | null>>;
|
|
@@ -11,15 +11,7 @@ export declare const useFirstTimes: (revenueCenter: RevenueCenter, serviceType:
|
|
|
11
11
|
name: string;
|
|
12
12
|
value: string;
|
|
13
13
|
}[];
|
|
14
|
-
timeOptions:
|
|
15
|
-
name: string;
|
|
16
|
-
value: string;
|
|
17
|
-
disabled: boolean;
|
|
18
|
-
})[] | {
|
|
19
|
-
name: string;
|
|
20
|
-
value: null;
|
|
21
|
-
disabled: boolean;
|
|
22
|
-
}[];
|
|
14
|
+
timeOptions: TimeOption[];
|
|
23
15
|
firstMinutes: string | number | null;
|
|
24
16
|
requestedTime: RequestedAt;
|
|
25
17
|
orderMsg: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateString, FirstTime, GroupOrderPrepTime, GroupOrderTime, Holidays, ISOString, Order, OrderTime, OrderTimeWithDate, RequestedAt, RevenueCenter, ServiceType,
|
|
1
|
+
import { DateString, FirstTime, GroupOrderPrepTime, GroupOrderTime, Holidays, ISOString, Order, OrderTime, OrderTimeWithDate, RequestedAt, RevenueCenter, ServiceType, Timezone, TimezonePython, ValidTimes, Weekday } from '@open-tender/types';
|
|
2
2
|
export declare const timezoneMap: Record<TimezonePython, Timezone>;
|
|
3
3
|
export declare const weekdays: string[];
|
|
4
4
|
export declare const weekdaysUpper: string[];
|
|
@@ -60,7 +60,11 @@ export declare const makeDates: (startDateStr: string, days: number, fmt?: strin
|
|
|
60
60
|
label: string;
|
|
61
61
|
value: string;
|
|
62
62
|
}[];
|
|
63
|
-
export declare const makeTimes: (date: DateString, firstTime: FirstTime, validTimes: ValidTimes, holidays: Holidays | null, serviceType: ServiceType, leadTime?: number) =>
|
|
63
|
+
export declare const makeTimes: (date: DateString, firstTime: FirstTime, validTimes: ValidTimes, holidays: Holidays | null, serviceType: ServiceType, leadTime?: number) => {
|
|
64
|
+
name: string;
|
|
65
|
+
value: number;
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
}[] | null;
|
|
64
68
|
export declare const makeOrderTimes: (orderTimes: OrderTime[] | null, tz: Timezone) => OrderTimeWithDate[];
|
|
65
69
|
export declare const findOrderTime: (orderTimes: Array<OrderTime> | null, tz: Timezone, requestedAt: ISOString | string | null) => OrderTimeWithDate;
|
|
66
70
|
export declare const makeFirstTime: (revenueCenter: RevenueCenter, tz: Timezone, serviceType: ServiceType, requestedAt: RequestedAt | null) => RequestedAt | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { OrderType, RequestedAt, RevenueCenter, ServiceType } from '@open-tender/types';
|
|
2
|
+
import { OrderType, RequestedAt, RevenueCenter, ServiceType, TimeOption } from '@open-tender/types';
|
|
3
3
|
export declare const useFirstTimes: (revenueCenter: RevenueCenter, serviceType: ServiceType, orderType: OrderType, requestedAt?: RequestedAt, isGroupOrder?: boolean) => {
|
|
4
4
|
date: `${number}${number}${number}${number}-${number}${number}-${number}${number}` | null;
|
|
5
5
|
setDate: import("react").Dispatch<import("react").SetStateAction<`${number}${number}${number}${number}-${number}${number}-${number}${number}` | null>>;
|
|
@@ -11,15 +11,7 @@ export declare const useFirstTimes: (revenueCenter: RevenueCenter, serviceType:
|
|
|
11
11
|
name: string;
|
|
12
12
|
value: string;
|
|
13
13
|
}[];
|
|
14
|
-
timeOptions:
|
|
15
|
-
name: string;
|
|
16
|
-
value: string;
|
|
17
|
-
disabled: boolean;
|
|
18
|
-
})[] | {
|
|
19
|
-
name: string;
|
|
20
|
-
value: null;
|
|
21
|
-
disabled: boolean;
|
|
22
|
-
}[];
|
|
14
|
+
timeOptions: TimeOption[];
|
|
23
15
|
firstMinutes: string | number | null;
|
|
24
16
|
requestedTime: RequestedAt;
|
|
25
17
|
orderMsg: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateString, FirstTime, GroupOrderPrepTime, GroupOrderTime, Holidays, ISOString, Order, OrderTime, OrderTimeWithDate, RequestedAt, RevenueCenter, ServiceType,
|
|
1
|
+
import { DateString, FirstTime, GroupOrderPrepTime, GroupOrderTime, Holidays, ISOString, Order, OrderTime, OrderTimeWithDate, RequestedAt, RevenueCenter, ServiceType, Timezone, TimezonePython, ValidTimes, Weekday } from '@open-tender/types';
|
|
2
2
|
export declare const timezoneMap: Record<TimezonePython, Timezone>;
|
|
3
3
|
export declare const weekdays: string[];
|
|
4
4
|
export declare const weekdaysUpper: string[];
|
|
@@ -60,7 +60,11 @@ export declare const makeDates: (startDateStr: string, days: number, fmt?: strin
|
|
|
60
60
|
label: string;
|
|
61
61
|
value: string;
|
|
62
62
|
}[];
|
|
63
|
-
export declare const makeTimes: (date: DateString, firstTime: FirstTime, validTimes: ValidTimes, holidays: Holidays | null, serviceType: ServiceType, leadTime?: number) =>
|
|
63
|
+
export declare const makeTimes: (date: DateString, firstTime: FirstTime, validTimes: ValidTimes, holidays: Holidays | null, serviceType: ServiceType, leadTime?: number) => {
|
|
64
|
+
name: string;
|
|
65
|
+
value: number;
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
}[] | null;
|
|
64
68
|
export declare const makeOrderTimes: (orderTimes: OrderTime[] | null, tz: Timezone) => OrderTimeWithDate[];
|
|
65
69
|
export declare const findOrderTime: (orderTimes: Array<OrderTime> | null, tz: Timezone, requestedAt: ISOString | string | null) => OrderTimeWithDate;
|
|
66
70
|
export declare const makeFirstTime: (revenueCenter: RevenueCenter, tz: Timezone, serviceType: ServiceType, requestedAt: RequestedAt | null) => RequestedAt | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.109",
|
|
4
4
|
"description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "^4.8.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@open-tender/types": "^0.2.
|
|
57
|
+
"@open-tender/types": "^0.2.44",
|
|
58
58
|
"@reduxjs/toolkit": "^1.8.5",
|
|
59
59
|
"react": "^18.2.0"
|
|
60
60
|
},
|