@restaround/react 1.3.39 → 1.3.42

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 (47) hide show
  1. package/dist/components/PublicMenu/OrderDrawer/OrderTable.d.ts +2 -0
  2. package/dist/components/ScrollToTop/ScrollToTop.d.ts +7 -0
  3. package/dist/components/ScrollToTop/index.d.ts +1 -0
  4. package/dist/index.esm.js +1 -1
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/models/index.d.ts +1 -0
  9. package/dist/models/index.esm.js +1 -1
  10. package/dist/models/index.esm.js.map +1 -1
  11. package/dist/models/index.js +1 -1
  12. package/dist/models/index.js.map +1 -1
  13. package/dist/models/menu.d.ts +3 -0
  14. package/dist/models/models/index.d.ts +1 -0
  15. package/dist/models/models/menu.d.ts +3 -0
  16. package/dist/models/modules/table/models.d.ts +66 -0
  17. package/dist/modules/branch/utils.test.d.ts +1 -0
  18. package/dist/modules/order/constants.d.ts +6 -0
  19. package/dist/modules/order/hooks.d.ts +10 -1
  20. package/dist/modules/order/utils.d.ts +5 -1
  21. package/dist/modules/table/hooks.d.ts +4 -0
  22. package/dist/modules/table/index.d.ts +2 -0
  23. package/dist/modules/table/models.d.ts +66 -0
  24. package/dist/services/translation/locales/az/index.d.ts +6 -0
  25. package/dist/services/translation/locales/az/order.d.ts +6 -0
  26. package/dist/services/translation/locales/et/index.d.ts +6 -0
  27. package/dist/services/translation/locales/et/order.d.ts +6 -0
  28. package/dist/services/translation/locales/index.d.ts +30 -0
  29. package/dist/services/translation/locales/nl/index.d.ts +6 -0
  30. package/dist/services/translation/locales/nl/order.d.ts +6 -0
  31. package/dist/services/translation/locales/ru/index.d.ts +6 -0
  32. package/dist/services/translation/locales/ru/order.d.ts +6 -0
  33. package/dist/services/translation/locales/tr/index.d.ts +6 -0
  34. package/dist/services/translation/locales/tr/order.d.ts +6 -0
  35. package/dist/store/order.d.ts +3 -0
  36. package/dist/styles/ui.css +1 -1
  37. package/dist/styles/ui.css.map +1 -1
  38. package/dist/utils/index.esm.js +1 -1
  39. package/dist/utils/index.esm.js.map +1 -1
  40. package/dist/utils/index.js +1 -1
  41. package/dist/utils/index.js.map +1 -1
  42. package/dist/utils/models/index.d.ts +1 -0
  43. package/dist/utils/models/menu.d.ts +3 -0
  44. package/dist/utils/modules/order/constants.d.ts +16 -0
  45. package/dist/utils/modules/order/utils.d.ts +5 -1
  46. package/dist/utils/modules/table/models.d.ts +66 -0
  47. package/package.json +7 -7
@@ -1,6 +1,8 @@
1
1
  import { IconType } from "@sorocraft/ui";
2
- import { Order, OrderAddon, OrderItem, OrderStatus, SelectedAddons } from "./models";
2
+ import { Order, OrderAddon, OrderItem, OrderStatus, OrderType, SelectedAddons } from "./models";
3
3
  import * as addonModels from "../addon/models";
4
+ import * as businessModels from "../business/models";
5
+ import { OrderErrors } from "./constants";
4
6
  export declare const calculatSingleAddonTotalPrice: (addon: OrderAddon) => number;
5
7
  export declare function calculateTotalAddonPrice(addons?: OrderAddon[], quantity?: number): number;
6
8
  export declare const getOrderPrice: (order: Order, currency: string, language: string) => {
@@ -23,3 +25,5 @@ export declare const getOrderItemPrice: (orderItem: OrderItem) => {
23
25
  export declare const getSelectedAddonsFromOrderItems: (item: OrderItem) => SelectedAddons;
24
26
  export declare const getStatusIcon: (status: OrderStatus) => IconType;
25
27
  export declare const buildSelectedAddonsPayload: (productAddons?: addonModels.MenuAddon[], selectedAddons?: SelectedAddons) => OrderAddon[];
28
+ export declare const getDefaultOrderType: (settings: businessModels.BusinessSettings) => OrderType;
29
+ export declare const getOrderErrorMessages: (field: keyof Order) => OrderErrors;
@@ -0,0 +1,66 @@
1
+ export declare enum TableShape {
2
+ SQUARE = "SQUARE",
3
+ CIRCLE = "CIRCLE",
4
+ RECTANGLE = "RECTANGLE",
5
+ RECTANGLE_VERTICAL = "RECTANGLE_VERTICAL",
6
+ SINGLE_AT_BAR = "SINGLE_AT_BAR",
7
+ OTHER = "OTHER"
8
+ }
9
+ export declare enum TableStatus {
10
+ VACANT = "VACANT",// Free and available
11
+ RESERVED = "RESERVED",// Booked but not yet seated
12
+ OCCUPIED = "OCCUPIED",// Currently in use
13
+ BLOCKED = "BLOCKED",// Temporarily blocked/unavailable
14
+ NEEDS_CLEANING = "NEEDS_CLEANING",// Dirty, awaiting cleanup
15
+ OUT_OF_SERVICE = "OUT_OF_SERVICE",// Permanently unavailable repair/maintenance
16
+ PENDING_CONFIRMATION = "PENDING_CONFIRMATION",// Reservation not yet confirmed
17
+ NO_SHOW = "NO_SHOW"
18
+ }
19
+ export declare enum TableLocation {
20
+ MAIN_HALL = "MAIN_HALL",
21
+ PRIVATE_DINING = "PRIVATE_DINING",
22
+ VIP_ROOM = "VIP_ROOM",
23
+ BANQUET_HALL = "BANQUET_HALL",
24
+ BAR_AREA = "BAR_AREA",
25
+ LOUNGE = "LOUNGE",
26
+ OPEN_KITCHEN = "OPEN_KITCHEN",
27
+ BOOTH_SECTION = "BOOTH_SECTION",
28
+ MEZZANINE = "MEZZANINE",
29
+ WINE_CELLAR = "WINE_CELLAR",
30
+ TERRACE = "TERRACE",
31
+ PATIO = "PATIO",
32
+ GARDEN = "GARDEN",
33
+ COURTYARD = "COURTYARD",
34
+ ROOFTOP = "ROOFTOP",
35
+ BALCONY = "BALCONY",
36
+ SIDEWALK = "SIDEWALK",
37
+ POOLSIDE = "POOLSIDE",
38
+ SMOKING_AREA = "SMOKING_AREA",
39
+ NON_SMOKING = "NON_SMOKING",
40
+ FAMILY_SECTION = "FAMILY_SECTION",
41
+ KIDS_AREA = "KIDS_AREA",
42
+ WAITING_AREA = "WAITING_AREA",
43
+ DANCE_FLOOR = "DANCE_FLOOR"
44
+ }
45
+ export interface Table {
46
+ id: number;
47
+ businessId: number;
48
+ branchId: number;
49
+ name: string;
50
+ seatCount: number;
51
+ shape: TableShape;
52
+ location: TableLocation;
53
+ status: TableStatus;
54
+ }
55
+ export interface TableState {
56
+ tables: Table[];
57
+ }
58
+ export type TableForm = Omit<Table, "id" | "businessId" | "branchId"> & {
59
+ branchId: string | number;
60
+ };
61
+ export type TableUpdate = Partial<Omit<Table, "id" | "businessId">>;
62
+ export type TableFilter = Partial<Pick<Table, "branchId" | "shape" | "location" | "status">>;
63
+ export type TableFilterParams = {
64
+ field: keyof TableFilter;
65
+ value: TableFilter[keyof TableFilter];
66
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restaround/react",
3
- "version": "1.3.39",
3
+ "version": "1.3.42",
4
4
  "description": "React Library by restaround.co",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -71,24 +71,24 @@
71
71
  "@testing-library/react": "^16.3.0",
72
72
  "@types/google.maps": "^3.58.1",
73
73
  "@types/jest": "^30.0.0",
74
- "@types/react": "^19.1.12",
74
+ "@types/react": "^19.1.13",
75
75
  "@types/react-dom": "^19.1.9",
76
76
  "autoprefixer": "^10.4.21",
77
- "eslint": "^9.34.0",
77
+ "eslint": "^9.36.0",
78
78
  "eslint-plugin-react": "^7.37.5",
79
79
  "eslint-plugin-react-hooks": "^5.2.0",
80
- "eslint-plugin-unicorn": "^60.0.0",
80
+ "eslint-plugin-unicorn": "^61.0.2",
81
81
  "jest": "^30.1.3",
82
82
  "jest-environment-jsdom": "^30.1.2",
83
83
  "rimraf": "^6.0.1",
84
84
  "rollup-plugin-copy": "^3.5.0",
85
85
  "rollup-plugin-peer-deps-external": "^2.2.4",
86
86
  "rollup-plugin-postcss": "^4.0.2",
87
- "sass": "^1.92.0",
88
- "ts-jest": "^29.4.1",
87
+ "sass": "^1.92.1",
88
+ "ts-jest": "^29.4.4",
89
89
  "ts-node": "^10.9.2",
90
90
  "tslib": "^2.8.1",
91
91
  "typescript": "^5.9.2",
92
- "typescript-eslint": "^8.42.0"
92
+ "typescript-eslint": "^8.44.0"
93
93
  }
94
94
  }