@nerdjs/sales-kit 1.0.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.
Files changed (78) hide show
  1. package/README.md +79 -0
  2. package/dist/cjs/components/calendar/calendar.d.ts +5 -0
  3. package/dist/cjs/components/calendar/day/day.d.ts +8 -0
  4. package/dist/cjs/components/calendar/day/index.d.ts +1 -0
  5. package/dist/cjs/components/calendar/day/typings.d.ts +16 -0
  6. package/dist/cjs/components/calendar/index.d.ts +2 -0
  7. package/dist/cjs/components/calendar/typings.d.ts +27 -0
  8. package/dist/cjs/components/customerFinder/customerFinder.d.ts +11 -0
  9. package/dist/cjs/components/customerFinder/index.d.ts +2 -0
  10. package/dist/cjs/components/customerFinder/optionTemplate.d.ts +6 -0
  11. package/dist/cjs/components/index.d.ts +4 -0
  12. package/dist/cjs/components/locationFinder/editLocation.d.ts +15 -0
  13. package/dist/cjs/components/locationFinder/index.d.ts +1 -0
  14. package/dist/cjs/components/locationFinder/locationByAddress.d.ts +18 -0
  15. package/dist/cjs/components/locationFinder/locationFinder.d.ts +7 -0
  16. package/dist/cjs/components/locationFinder/locationsFound.d.ts +12 -0
  17. package/dist/cjs/components/locationFinder/newLocationForm.d.ts +20 -0
  18. package/dist/cjs/components/locationFinder/optionTemplate.d.ts +8 -0
  19. package/dist/cjs/components/locationFinder/typings.d.ts +23 -0
  20. package/dist/cjs/components/salesQuote/components/aboutQuote/aboutQuote.d.ts +5 -0
  21. package/dist/cjs/components/salesQuote/components/aboutQuote/commodityDescription.d.ts +16 -0
  22. package/dist/cjs/components/salesQuote/components/aboutQuote/index.d.ts +2 -0
  23. package/dist/cjs/components/salesQuote/components/aboutQuote/quoteCheck.d.ts +6 -0
  24. package/dist/cjs/components/salesQuote/components/pallet/editPallet.d.ts +11 -0
  25. package/dist/cjs/components/salesQuote/components/pallet/palletChecker.d.ts +15 -0
  26. package/dist/cjs/components/salesQuote/components/pallet/palletCount.d.ts +13 -0
  27. package/dist/cjs/components/salesQuote/components/quoteCalendar/quoteCalendar.d.ts +24 -0
  28. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/costBreakdown.d.ts +14 -0
  29. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/marketCosts.d.ts +7 -0
  30. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccessorials.d.ts +13 -0
  31. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccordion.d.ts +17 -0
  32. package/dist/cjs/components/salesQuote/components/quoteSelect.d.ts +4 -0
  33. package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummary.d.ts +4 -0
  34. package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryBody.d.ts +12 -0
  35. package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryHeader.d.ts +10 -0
  36. package/dist/cjs/components/salesQuote/components/quoteSummary/typings.d.ts +47 -0
  37. package/dist/cjs/components/salesQuote/index.d.ts +4 -0
  38. package/dist/cjs/components/salesQuote/salesQuote.d.ts +17 -0
  39. package/dist/cjs/components/salesQuote/typings.d.ts +156 -0
  40. package/dist/cjs/components/shared/bootstrapDialogTitle/bootstrapDialogTitle.d.ts +11 -0
  41. package/dist/cjs/components/shared/bootstrapDialogTitle/index.d.ts +1 -0
  42. package/dist/cjs/components/shared/index.d.ts +2 -0
  43. package/dist/cjs/components/shared/loading/index.d.ts +1 -0
  44. package/dist/cjs/components/shared/loading/loading.d.ts +6 -0
  45. package/dist/cjs/components/stop/index.d.ts +2 -0
  46. package/dist/cjs/components/stop/menuAccessorials.d.ts +27 -0
  47. package/dist/cjs/components/stop/stop.d.ts +4 -0
  48. package/dist/cjs/components/stop/stopDetail.d.ts +5 -0
  49. package/dist/cjs/components/stop/stopDetailHeader.d.ts +6 -0
  50. package/dist/cjs/entities/customer/customer.d.ts +16 -0
  51. package/dist/cjs/entities/customer/helper.d.ts +5 -0
  52. package/dist/cjs/entities/customer/index.d.ts +1 -0
  53. package/dist/cjs/entities/index.d.ts +4 -0
  54. package/dist/cjs/entities/location/helper.d.ts +5 -0
  55. package/dist/cjs/entities/location/index.d.ts +2 -0
  56. package/dist/cjs/entities/location/location.d.ts +32 -0
  57. package/dist/cjs/entities/marketCosts/helper.d.ts +5 -0
  58. package/dist/cjs/entities/marketCosts/index.d.ts +2 -0
  59. package/dist/cjs/entities/marketCosts/marketCosts.d.ts +22 -0
  60. package/dist/cjs/entities/quote/helper.d.ts +5 -0
  61. package/dist/cjs/entities/quote/index.d.ts +2 -0
  62. package/dist/cjs/entities/quote/quote.d.ts +80 -0
  63. package/dist/cjs/index.d.ts +4 -0
  64. package/dist/cjs/index.js +3170 -0
  65. package/dist/cjs/index.js.map +1 -0
  66. package/dist/cjs/redux/calendar/calendarSlice.d.ts +12 -0
  67. package/dist/cjs/redux/calendar/index.d.ts +1 -0
  68. package/dist/cjs/redux/index.d.ts +3 -0
  69. package/dist/cjs/redux/nerdSalesKitReducer.d.ts +10 -0
  70. package/dist/cjs/redux/quote/index.d.ts +4 -0
  71. package/dist/cjs/redux/quote/quoteAction.d.ts +125 -0
  72. package/dist/cjs/redux/quote/quoteReducer.d.ts +28 -0
  73. package/dist/cjs/redux/quote/quoteSelector.d.ts +22 -0
  74. package/dist/cjs/redux/quote/quoteState.d.ts +124 -0
  75. package/dist/cjs/utils/constants.d.ts +5 -0
  76. package/dist/cjs/utils/helpers.d.ts +17 -0
  77. package/dist/cjs/utils/index.d.ts +2 -0
  78. package/package.json +93 -0
@@ -0,0 +1,156 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="google.maps" />
3
+ import { SelectChangeEvent } from "@mui/material/Select";
4
+ import { ThemeOptions } from "@mui/material/styles";
5
+ import { AnyAction, Dispatch } from "@reduxjs/toolkit";
6
+ import { IselectedDateRangeState } from "../../redux/calendar";
7
+ import { IQuoteState } from "../../redux/quote/quoteReducer";
8
+ import { IAccessorial, IAccessorialObj, IQuoteForm, IStateShippers } from "../../redux/quote/quoteState";
9
+ export declare type salesQuoteProps = {
10
+ dispatch: Dispatch<AnyAction>;
11
+ theme: ThemeOptions;
12
+ nerdSalesKitState: {
13
+ quoteState: IQuoteState;
14
+ selectedDateRange: IselectedDateRangeState;
15
+ };
16
+ t: any;
17
+ networkCompletionStack: Record<string, boolean>[];
18
+ isCustomer: boolean;
19
+ appConfigServiceLevels: AppConfigServiceLevelsType;
20
+ };
21
+ export declare type AppConfigServiceLevelsType = {
22
+ [name: string]: {
23
+ [name: string]: string;
24
+ };
25
+ };
26
+ interface IGoogleService {
27
+ maps: typeof google.maps;
28
+ }
29
+ export declare type ServiceContextType = {
30
+ googleService: IGoogleService;
31
+ quoteState: IQuoteState;
32
+ t: any;
33
+ isMobile: boolean;
34
+ appConfigServiceLevels: AppConfigServiceLevelsType;
35
+ };
36
+ export interface IQuoteObjProps {
37
+ dispatch: Dispatch<AnyAction>;
38
+ networkCompletionStack: Record<string, boolean>[];
39
+ isCustomer: boolean;
40
+ children: React.ReactNode | undefined;
41
+ submitForm: () => void;
42
+ }
43
+ export declare type nerdSalesQuoteCheckProps = {
44
+ onChange: (event: SelectChangeEvent, type: string) => void;
45
+ service: string;
46
+ mode: string;
47
+ isMobile?: boolean;
48
+ dispatch: Dispatch<AnyAction>;
49
+ state: IQuoteForm;
50
+ };
51
+ export interface IQuoteSelect {
52
+ isMobile: boolean;
53
+ selectOptions: string[];
54
+ onChange: (event: SelectChangeEvent) => void;
55
+ value: string;
56
+ labelId: string;
57
+ inputLabel?: string;
58
+ label?: string;
59
+ required: boolean;
60
+ }
61
+ export interface IPallet {
62
+ key?: number;
63
+ index?: number;
64
+ classes?: object;
65
+ count: number | string;
66
+ length: number;
67
+ width: number;
68
+ height: number;
69
+ units: string;
70
+ stackable: boolean;
71
+ remaining?: boolean;
72
+ disabled?: boolean;
73
+ onDelete?: () => void;
74
+ type?: string;
75
+ onDimensionEdit?: () => void;
76
+ }
77
+ export interface IShippers {
78
+ zip: number | string;
79
+ facility?: string;
80
+ locationId?: number;
81
+ accessorialIds: number[];
82
+ date: Date | string | null;
83
+ }
84
+ export interface IPickDropCard {
85
+ stopPickArray: IPickStopCard[];
86
+ card?: React.ElementType<unknown>;
87
+ onCloseCard?: (index: number) => void;
88
+ quoteAccessorials: IAccessorialObj[];
89
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
90
+ disabled?: boolean;
91
+ }
92
+ export interface IPickStopCard {
93
+ zip: string;
94
+ facility: string;
95
+ accessorialIds: string[];
96
+ date: Date | null;
97
+ }
98
+ export interface IStopDetail {
99
+ CardContainer: any;
100
+ stopCard: IShippers;
101
+ stopCardIndex: number;
102
+ openCard: boolean;
103
+ onCloseCard: (i: number) => void;
104
+ quoteAccessorials: Array<IAccessorialObj>;
105
+ stopType: string;
106
+ dispatch: Dispatch<AnyAction>;
107
+ networkCompletionStack: Record<string, boolean>[];
108
+ onChange?: (stopDetailData: IShippers | IStateShippers) => void;
109
+ }
110
+ export interface IStop extends Partial<IStopDetail> {
111
+ stopCards: IShippers[];
112
+ stopType: string;
113
+ disabled?: boolean;
114
+ addMoreStopHandler?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
115
+ accessorials: IAccessorial;
116
+ serviceType: string;
117
+ }
118
+ export interface IStopDetailHeaderProps {
119
+ type: string;
120
+ index: number;
121
+ }
122
+ export interface IMenuAccessorials {
123
+ anchorEl: HTMLElement | null;
124
+ openAccessorials: boolean;
125
+ handleClose: () => void;
126
+ copyAccessorials: Array<IAccessorialObj>;
127
+ handleSelectAccessorial: (i: number) => void;
128
+ }
129
+ export interface ICustomer {
130
+ id: number;
131
+ name: string;
132
+ company_id: number;
133
+ credit_on_hold: boolean;
134
+ inactivity_hold: boolean;
135
+ credit_term_id: number;
136
+ line1: string;
137
+ city: string;
138
+ state: string;
139
+ zip: string;
140
+ is_active: boolean;
141
+ credit_term_name: string;
142
+ }
143
+ export declare enum QuoteAuxContent {
144
+ LTL = "LTL",
145
+ STANDARD_IM_SERVICE = "Standard IM Service",
146
+ TL = "TL",
147
+ FEET = "feet",
148
+ DRY = "Dry",
149
+ REEFER = "Reefer",
150
+ CONSIGNEE = "Drop-off",
151
+ SHIPPER = "Pick-up",
152
+ DROP_OFF = "Drop-off",
153
+ PICK_UP = "Pick-up",
154
+ INCHES = "inches"
155
+ }
156
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ declare type DialogTitleProps = {
3
+ id: string;
4
+ children?: React.ReactNode;
5
+ onClose?: () => void;
6
+ };
7
+ /**
8
+ * @param props
9
+ */
10
+ export default function BootstrapDialogTitle(props: DialogTitleProps): JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./bootstrapDialogTitle";
@@ -0,0 +1,2 @@
1
+ export * from "./loading";
2
+ export * from "./bootstrapDialogTitle";
@@ -0,0 +1 @@
1
+ export * from "./loading";
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { SkeletonProps } from "@mui/material/Skeleton";
3
+ export interface LoadingProps extends SkeletonProps {
4
+ specialProp?: string;
5
+ }
6
+ export declare const Loading: (props: LoadingProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./stop";
2
+ export * from "./stopDetail";
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import { IAccessorialObj } from "../../redux/quote";
3
+ declare type menuAccessorials = {
4
+ openCard: boolean;
5
+ onCloseCard: (i: number) => void;
6
+ stopCardIndex: number;
7
+ handleSelectAccessorial: (i: number) => void;
8
+ copyAccessorials: IAccessorialObj[];
9
+ };
10
+ /**
11
+ *
12
+ * @param {any} root0 root
13
+ * @param {HTMLElement} root0.anchorEl - HTMLElement ref
14
+ * @param {boolean} root0.openAccessorials boolean to open/close the menu
15
+ * @param {() => {}} root0.handleClose function to close the menu
16
+ * @returns {React.ReactElement<any>} return as a function to avoid re-render
17
+ */
18
+ /**
19
+ * @param root0
20
+ * @param root0.openCard
21
+ * @param root0.onCloseCard
22
+ * @param root0.stopCardIndex
23
+ * @param root0.handleSelectAccessorial
24
+ * @param root0.copyAccessorials
25
+ */
26
+ export default function MenuAccessorials({ openCard, onCloseCard, stopCardIndex, handleSelectAccessorial, copyAccessorials, }: menuAccessorials): JSX.Element;
27
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IStop } from "../salesQuote/typings";
3
+ declare const Stop: (props: IStop) => JSX.Element;
4
+ export default Stop;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "./Stop.scss";
3
+ import { IStopDetail } from "../salesQuote/typings";
4
+ declare const _default: React.MemoExoticComponent<(props: IStopDetail) => JSX.Element | null>;
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { IStopDetailHeaderProps } from "../salesQuote/typings";
3
+ /**
4
+ * @param props
5
+ */
6
+ export default function StopDetailHeader(props: IStopDetailHeaderProps): JSX.Element;
@@ -0,0 +1,16 @@
1
+ export default class Customer_Entity {
2
+ static requiredFields: string[];
3
+ constructor(customerJson: unknown);
4
+ id: number;
5
+ name: string;
6
+ company_id: number;
7
+ credit_on_hold: boolean;
8
+ inactivity_hold: boolean;
9
+ credit_term_id: number;
10
+ line1: string;
11
+ city: string;
12
+ state: string;
13
+ zip: string;
14
+ is_active: boolean;
15
+ credit_term_name: string;
16
+ }
@@ -0,0 +1,5 @@
1
+ import Customer_Entity from "./customer";
2
+ export default class Customer extends Customer_Entity {
3
+ static fromList(customersJSON: unknown): Array<Customer>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1 @@
1
+ export * from "./customer";
@@ -0,0 +1,4 @@
1
+ export * from "./customer";
2
+ export * from "./location";
3
+ export * from "./quote";
4
+ export * from "./marketCosts";
@@ -0,0 +1,5 @@
1
+ import Location_Entity from "./location";
2
+ export default class Location extends Location_Entity {
3
+ static fromList(locationJSON: unknown): Array<Location>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./helper";
2
+ export * from "./location";
@@ -0,0 +1,32 @@
1
+ export default class Location_Entity {
2
+ static requiredFields: string[];
3
+ constructor(customerJson: unknown);
4
+ id: number;
5
+ name: string;
6
+ contact: string;
7
+ phone: string;
8
+ accessorials: {
9
+ [key: string]: [
10
+ {
11
+ accessorialId: number;
12
+ costAmount: number;
13
+ name: string;
14
+ }
15
+ ];
16
+ };
17
+ address: {
18
+ formattedAddress: string;
19
+ line1: string;
20
+ line2: string;
21
+ city: string;
22
+ state: string;
23
+ zip: string;
24
+ country: string;
25
+ latitude: number;
26
+ longitude: number;
27
+ timezone: string;
28
+ verified: boolean;
29
+ terminal_distance: number;
30
+ placeId: string;
31
+ };
32
+ }
@@ -0,0 +1,5 @@
1
+ import MarketCosts_Entity from "./marketCosts";
2
+ export default class MarketCosts extends MarketCosts_Entity {
3
+ static fromList(quoteJSON: unknown): Array<MarketCosts>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./helper";
2
+ export * from "./marketCosts";
@@ -0,0 +1,22 @@
1
+ export default class MarketCosts_Entity {
2
+ static requiredFields: string[];
3
+ constructor(marketCostsJSON: unknown);
4
+ id: number;
5
+ total_cost: number;
6
+ total_cost_with_margin: number;
7
+ margin: number;
8
+ otr_miles: number;
9
+ fuel_cost: number;
10
+ linehaul_cost: number;
11
+ truckload_total_cost: number;
12
+ ltl_pallet_percentage: number;
13
+ stop_fees: number;
14
+ market_data: {
15
+ fuel_rate: number;
16
+ linehaul_rate: number;
17
+ linehaul_total: number;
18
+ market_type: string;
19
+ market_lane: string;
20
+ market_days: number;
21
+ };
22
+ }
@@ -0,0 +1,5 @@
1
+ import Quote_Entity from "./quote";
2
+ export default class QuoteRequest extends Quote_Entity {
3
+ static fromList(quoteJSON: unknown): Array<QuoteRequest>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./quote";
2
+ export * from "./helper";
@@ -0,0 +1,80 @@
1
+ export default class Quote_Entity {
2
+ static requiredFields: string[];
3
+ constructor(quoteJson: unknown);
4
+ id: number;
5
+ customerId: number;
6
+ customerName: string;
7
+ createdAt: string;
8
+ commodityDescription: string;
9
+ commodityDescriptionId: number;
10
+ totalMiles?: number;
11
+ pallets: number;
12
+ pieces: number;
13
+ freightClass?: string;
14
+ dryVanOnly: boolean;
15
+ feet: number;
16
+ weight: number;
17
+ type: string;
18
+ stops: [
19
+ {
20
+ id: number;
21
+ name: string;
22
+ type: string;
23
+ date: string;
24
+ city: string;
25
+ state: string;
26
+ zip: string;
27
+ address: {
28
+ locationId: number | null;
29
+ line1: string;
30
+ line2?: string;
31
+ city: string;
32
+ state: string;
33
+ zip: string;
34
+ latitude: number;
35
+ longitude: number;
36
+ };
37
+ }
38
+ ];
39
+ serviceLevels: [
40
+ {
41
+ id: string;
42
+ description: string;
43
+ serviceLevel: string;
44
+ baseRate: number;
45
+ extra: number;
46
+ fuelRate: number;
47
+ totalRate: number;
48
+ flexible: boolean;
49
+ from: string;
50
+ to: string;
51
+ }
52
+ ];
53
+ accessorials?: [
54
+ {
55
+ costAmount: number;
56
+ name: string;
57
+ accessorialId: number;
58
+ stopId: number;
59
+ stopName: string;
60
+ }
61
+ ];
62
+ units: {
63
+ palletDimensions: [
64
+ {
65
+ units: string;
66
+ length: number;
67
+ width: number;
68
+ height: number;
69
+ count: string;
70
+ }
71
+ ];
72
+ totalDimensions: {
73
+ totalWeight: string;
74
+ };
75
+ };
76
+ api: string;
77
+ version: number;
78
+ transitTime?: number;
79
+ temp?: string;
80
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./components";
2
+ export * from "./redux";
3
+ export * from "./entities";
4
+ export * from "./utils";