sgerp-frontend-lib 0.1.4 → 0.1.5

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 (62) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -0
  4. package/dist/locales/locale-server.d.ts +1 -1
  5. package/dist/locales/locale-server.d.ts.map +1 -1
  6. package/dist/locales/locale-server.js +5 -0
  7. package/dist/locales/locale.d.ts +1 -1
  8. package/dist/locales/locale.d.ts.map +1 -1
  9. package/dist/locales/locale.js +6 -2
  10. package/dist/locales/locale_en.d.ts.map +1 -1
  11. package/dist/locales/locale_en.js +77 -1
  12. package/dist/locales/locale_id.d.ts +2 -0
  13. package/dist/locales/locale_id.d.ts.map +1 -0
  14. package/dist/locales/locale_id.js +2473 -0
  15. package/dist/locales/locale_ja.d.ts.map +1 -1
  16. package/dist/locales/locale_ja.js +76 -1
  17. package/dist/locales/locale_ms.d.ts.map +1 -1
  18. package/dist/locales/locale_ms.js +60 -1
  19. package/dist/locales/locale_tl.d.ts +2 -0
  20. package/dist/locales/locale_tl.d.ts.map +1 -0
  21. package/dist/locales/locale_tl.js +1122 -0
  22. package/dist/sgerp/collection.d.ts.map +1 -1
  23. package/dist/sgerp/collection.js +18 -4
  24. package/dist/sgerp/domains.d.ts +16 -2
  25. package/dist/sgerp/domains.d.ts.map +1 -1
  26. package/dist/sgerp/domains.js +47 -1
  27. package/dist/sgerp/hooks/use-selection-state.d.ts +37 -0
  28. package/dist/sgerp/hooks/use-selection-state.d.ts.map +1 -0
  29. package/dist/sgerp/hooks/use-selection-state.js +121 -0
  30. package/dist/sgerp/hooks/use-simulation-data.d.ts +105 -0
  31. package/dist/sgerp/hooks/use-simulation-data.d.ts.map +1 -0
  32. package/dist/sgerp/hooks/use-simulation-data.js +146 -0
  33. package/dist/sgerp/hooks/use-simulation-state.d.ts +80 -0
  34. package/dist/sgerp/hooks/use-simulation-state.d.ts.map +1 -0
  35. package/dist/sgerp/hooks/use-simulation-state.js +161 -0
  36. package/dist/sgerp/index.d.ts +10 -3
  37. package/dist/sgerp/index.d.ts.map +1 -1
  38. package/dist/sgerp/index.js +24 -2
  39. package/dist/sgerp/simulation-logic/fetchUtils.d.ts.map +1 -1
  40. package/dist/sgerp/simulation-logic/fetchUtils.js +2 -0
  41. package/dist/sgerp/simulation-logic/index.d.ts +3 -1
  42. package/dist/sgerp/simulation-logic/index.d.ts.map +1 -1
  43. package/dist/sgerp/simulation-logic/index.js +10 -1
  44. package/dist/sgerp/simulation-logic/liveUpdates.d.ts +102 -0
  45. package/dist/sgerp/simulation-logic/liveUpdates.d.ts.map +1 -0
  46. package/dist/sgerp/simulation-logic/liveUpdates.js +87 -0
  47. package/dist/sgerp/simulation-logic/prepareSimulationData.d.ts +36 -0
  48. package/dist/sgerp/simulation-logic/prepareSimulationData.d.ts.map +1 -0
  49. package/dist/sgerp/simulation-logic/prepareSimulationData.js +34 -0
  50. package/dist/sgerp/simulation-logic/routeCalculationUtils.d.ts +7 -1
  51. package/dist/sgerp/simulation-logic/routeCalculationUtils.d.ts.map +1 -1
  52. package/dist/sgerp/simulation-logic/routeCalculationUtils.js +81 -0
  53. package/dist/vrptoolbox/collection.d.ts +16 -0
  54. package/dist/vrptoolbox/collection.d.ts.map +1 -0
  55. package/dist/vrptoolbox/collection.js +62 -0
  56. package/dist/vrptoolbox/index.d.ts +6 -0
  57. package/dist/vrptoolbox/index.d.ts.map +1 -0
  58. package/dist/vrptoolbox/index.js +8 -0
  59. package/dist/vrptoolbox/types/job.d.ts +46 -0
  60. package/dist/vrptoolbox/types/job.d.ts.map +1 -0
  61. package/dist/vrptoolbox/types/job.js +5 -0
  62. package/package.json +7 -4
package/dist/index.d.ts CHANGED
@@ -4,4 +4,5 @@
4
4
  */
5
5
  export * from './sgerp';
6
6
  export { ConnectionManager } from './connection-manager';
7
+ export * from './vrptoolbox';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sgerplib/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sgerplib/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,cAAc,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -24,3 +24,5 @@ __exportStar(require("./sgerp"), exports);
24
24
  // Re-export connection manager
25
25
  var connection_manager_1 = require("./connection-manager");
26
26
  Object.defineProperty(exports, "ConnectionManager", { enumerable: true, get: function () { return connection_manager_1.ConnectionManager; } });
27
+ // Re-export VRP Toolbox module
28
+ __exportStar(require("./vrptoolbox"), exports);
@@ -1,4 +1,4 @@
1
- export type Language = "en" | "ja" | "ms";
1
+ export type Language = "en" | "ja" | "ms" | "tl" | "fil" | "id";
2
2
  /**
3
3
  * Server-side localization function (no localStorage, no client features)
4
4
  * @param key - The translation key
@@ -1 +1 @@
1
- {"version":3,"file":"locale-server.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale-server.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAU1C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,KAAK,MAAM,EACX,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,SAAQ,QAAyB,KAChC,MAmCF,CAAC"}
1
+ {"version":3,"file":"locale-server.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale-server.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC;AAahE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,KAAK,MAAM,EACX,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,SAAQ,QAAyB,KAChC,MAmCF,CAAC"}
@@ -4,10 +4,15 @@ exports.localizeServer = void 0;
4
4
  const locale_en_1 = require("./locale_en");
5
5
  const locale_ja_1 = require("./locale_ja");
6
6
  const locale_ms_1 = require("./locale_ms");
7
+ const locale_tl_1 = require("./locale_tl");
8
+ const locale_id_1 = require("./locale_id");
7
9
  const locales = {
8
10
  en: locale_en_1.translations,
9
11
  ja: locale_ja_1.translations,
10
12
  ms: locale_ms_1.translations,
13
+ tl: locale_tl_1.translations,
14
+ fil: locale_tl_1.translations, // Filipino uses same translations as Tagalog
15
+ id: locale_id_1.translations,
11
16
  };
12
17
  const DEFAULT_LOCALE = "en";
13
18
  /**
@@ -1,4 +1,4 @@
1
- export type Language = "en" | "ja" | "ms";
1
+ export type Language = "en" | "ja" | "ms" | "tl" | "fil";
2
2
  type LocaleChangeListener = (locale: Language) => void;
3
3
  export declare const subscribeToLocaleChanges: (listener: LocaleChangeListener) => () => void;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAc1C,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;AAGvD,eAAO,MAAM,wBAAwB,GAAI,UAAU,oBAAoB,eAKtE,CAAC;AA6BF;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAO,QAe5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,QAAQ,KAAG,IAU5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GACnB,KAAK,MAAM,EACX,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,SAAQ,QAAsB,KAC7B,MAmCF,CAAC"}
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAiBzD,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;AAGvD,eAAO,MAAM,wBAAwB,GAAI,UAAU,oBAAoB,eAKtE,CAAC;AA6BF;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAO,QAe5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,QAAQ,KAAG,IAU5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GACnB,KAAK,MAAM,EACX,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,SAAQ,QAAsB,KAC7B,MAmCF,CAAC"}
@@ -5,10 +5,14 @@ exports.localize = exports.setLocale = exports.getLocale = exports.subscribeToLo
5
5
  const locale_en_1 = require("./locale_en");
6
6
  const locale_ja_1 = require("./locale_ja");
7
7
  const locale_ms_1 = require("./locale_ms");
8
+ const locale_tl_1 = require("./locale_tl");
8
9
  const locales = {
9
10
  en: locale_en_1.translations,
10
11
  ja: locale_ja_1.translations,
11
12
  ms: locale_ms_1.translations,
13
+ tl: locale_tl_1.translations,
14
+ fil: locale_tl_1.translations, // Filipino uses same translations as Tagalog
15
+ // id: translations_id,
12
16
  };
13
17
  const DEFAULT_LOCALE = "en";
14
18
  const STORAGE_KEY = "sgerp-language";
@@ -60,7 +64,7 @@ const getLocale = () => {
60
64
  else if (typeof window !== "undefined") {
61
65
  // Browser environment
62
66
  const stored = safeLocalStorage.getItem(STORAGE_KEY);
63
- if (stored === "en" || stored === "ja" || stored === "ms") {
67
+ if (stored === "en" || stored === "ja" || stored === "ms" || stored === "tl" || stored === "fil") {
64
68
  return stored;
65
69
  }
66
70
  return DEFAULT_LOCALE;
@@ -139,7 +143,7 @@ if (typeof self !== "undefined" && self.postMessage) {
139
143
  if (typeof window !== "undefined") {
140
144
  // Initialize locale from localStorage
141
145
  const storedLocale = safeLocalStorage.getItem(STORAGE_KEY);
142
- if (storedLocale === "en" || storedLocale === "ja" || storedLocale === "ms") {
146
+ if (storedLocale === "en" || storedLocale === "ja" || storedLocale === "ms" || storedLocale === "tl" || storedLocale === "fil") {
143
147
  (0, exports.setLocale)(storedLocale);
144
148
  }
145
149
  }
@@ -1 +1 @@
1
- {"version":3,"file":"locale_en.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale_en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAomE/C,CAAC"}
1
+ {"version":3,"file":"locale_en.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale_en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAirE/C,CAAC"}
@@ -234,6 +234,27 @@ exports.translations = {
234
234
  "ptapp.simulation.vehicles": "Vehicles",
235
235
  "ptapp.simulation.trips": "Trips",
236
236
  "ptapp.simulation.bookings": "Bookings",
237
+ // Simulation status
238
+ "simulation.info_title": "Simulation Information",
239
+ "simulation.live": "Live",
240
+ "simulation.mode": "Mode",
241
+ "simulation.mode_template": "Template",
242
+ "simulation.mode_real_operations": "Real Operations",
243
+ "simulation.service_period": "Service Period",
244
+ "simulation.booking_period": "Booking Period",
245
+ "simulation.vehicles": "Vehicles",
246
+ "simulation.bookings": "Bookings",
247
+ "simulation.algorithm": "Algorithm",
248
+ "simulation.algo_dynamic": "Dynamic",
249
+ "simulation.algo_static": "Static",
250
+ "simulation.acceptable_waiting_time": "Acceptable Waiting Time",
251
+ "simulation.max_additional_journey_time": "Max Additional Journey Time",
252
+ "simulation.max_additional_journey_time_percent": "Max Additional Journey Time %",
253
+ "simulation.min_advance_booking_window": "Min Advance Booking Window",
254
+ "simulation.max_advance_booking_window": "Max Advance Booking Window",
255
+ "simulation.vehicle_capacity": "Vehicle Capacity",
256
+ "simulation.max_walking_distance": "Max Walking Distance",
257
+ "simulation.services_on_date": "Services on",
237
258
  "ptapp.passengers.title": "Passengers",
238
259
  "ptapp.passengers.description": "Manage passenger information",
239
260
  "ptapp.passengers.back_to_list": "Back to Passengers",
@@ -359,10 +380,28 @@ exports.translations = {
359
380
  "common.filter": "Filter",
360
381
  "common.done": "Done",
361
382
  "common.clear": "Clear",
383
+ "common.open": "Open",
384
+ "common.close": "Close",
385
+ "common.service": "Service",
386
+ "common.timezone": "Timezone",
387
+ "common.details": "Details",
388
+ "common.see_details": "See Details",
389
+ // Month names for localization
390
+ "month.january": "January",
391
+ "month.february": "February",
392
+ "month.march": "March",
393
+ "month.april": "April",
394
+ "month.may": "May",
395
+ "month.june": "June",
396
+ "month.july": "July",
397
+ "month.august": "August",
398
+ "month.september": "September",
399
+ "month.october": "October",
400
+ "month.november": "November",
401
+ "month.december": "December",
362
402
  "common.clear_all": "Clear All",
363
403
  "common.select": "Select...",
364
404
  "common.apply": "Apply",
365
- "common.close": "Close",
366
405
  "common.change": "Change",
367
406
  "common.yes": "Yes",
368
407
  "common.no": "No",
@@ -400,6 +439,10 @@ exports.translations = {
400
439
  "common.vehicle_plural": "vehicles",
401
440
  "common.vehicles": "vehicles",
402
441
  "common.bookings": "bookings",
442
+ "common.booking_singular": "Booking",
443
+ "common.booking_plural": "Bookings",
444
+ "common.drag_to_assign": "Drag to assign",
445
+ "common.assigning": "Assigning",
403
446
  "common.help": "Help",
404
447
  "common.keyboard_shortcuts": "Keyboard Shortcuts",
405
448
  // Autoplan Confirmation Dialog
@@ -422,6 +465,7 @@ exports.translations = {
422
465
  "autoplan.button_running": "Auto-planning...",
423
466
  // Calculation/Processor
424
467
  "processor.calculating_by": "Calculating by {username}",
468
+ "processor.system": "System",
425
469
  "processor.history_title": "Calculation History",
426
470
  "processor.total_calculations": "{count} total calculation{plural}",
427
471
  // Keyboard Shortcuts Help
@@ -491,6 +535,10 @@ exports.translations = {
491
535
  "vehicle.of_project": "of project",
492
536
  "vehicle.vehicle": "Vehicle",
493
537
  "vehicle.vehicle_details": "Vehicle Details",
538
+ "vehicle.total_travel_time": "Total Travel Time",
539
+ "vehicle.total_distance": "Total Distance",
540
+ "vehicle.search": "Search",
541
+ "vehicle.search_placeholder": "Search vehicles...",
494
542
  // Driver
495
543
  "driver.create_driver": "Create Driver",
496
544
  "driver.create_description": "Create a new driver account with user credentials",
@@ -599,6 +647,17 @@ exports.translations = {
599
647
  // Filter labels
600
648
  "filter.all": "All",
601
649
  "filter.all_statuses": "All Statuses",
650
+ "filter.search": "Search...",
651
+ "filter.select_all": "Select All",
652
+ "filter.clear_all": "Clear All",
653
+ "filter.no_matches": "No matches found",
654
+ "filter.selected": "selected",
655
+ "filter.reset": "Reset",
656
+ "filter.date_from": "From",
657
+ "filter.date_to": "To",
658
+ "filter.select_date": "Select date",
659
+ "filter.apply": "Apply",
660
+ "filter.no_date_range": "No date range",
602
661
  "filter.project": "Project",
603
662
  "filter.simulation": "Simulation",
604
663
  "filter.organization": "Organization",
@@ -673,6 +732,9 @@ exports.translations = {
673
732
  "toast.unassign_from_vehicle_singular_description": "All bookings have been removed from this vehicle.",
674
733
  "toast.unassign_from_vehicles_plural_description": "All bookings have been removed from {count} vehicles.",
675
734
  "toast.unassign_error": "Failed to unassign bookings",
735
+ "toast.assign_bookings_success": "Assigned {count} {booking} to {vehicle}",
736
+ "toast.assign_bookings_error": "Failed to assign bookings - operation not committed",
737
+ "toast.assign_bookings_error_generic": "Failed to assign bookings to vehicle",
676
738
  "toast.unassign_orders_success": "Orders unassigned successfully!",
677
739
  "toast.unassign_order_singular_description": "The order has been unassigned from its vehicle.",
678
740
  "toast.unassign_orders_plural_description": "{count} orders have been unassigned from their vehicles.",
@@ -942,6 +1004,8 @@ exports.translations = {
942
1004
  "template.create_title": "Create Template",
943
1005
  "template.create_description": "Create a new simulation template",
944
1006
  "template.create_button": "Create Template",
1007
+ "template.calendar_of_services": "Calendar of Services",
1008
+ "template.default_template_for_project": "Default template simulation for project",
945
1009
  "template.type_label": "Template Type",
946
1010
  "template.type_jit": "JIT",
947
1011
  "template.type_on-demand": "On-demand",
@@ -1370,6 +1434,12 @@ exports.translations = {
1370
1434
  "service.create_title": "Create Service",
1371
1435
  "service.create_description": "Create a new service from a template",
1372
1436
  "service.create_button": "Create Service",
1437
+ "service.create_from_template": "Create Service from Template",
1438
+ "service.created_successfully": "Service created successfully!",
1439
+ "service.created_successfully_title": "Services Created Successfully",
1440
+ "service.created_count": "{{count}} service(s) processed:",
1441
+ "service.created": "Created",
1442
+ "service.already_exists": "Already Exists",
1373
1443
  "service.project_label": "Project",
1374
1444
  "service.project_placeholder": "Search projects...",
1375
1445
  "service.template_label": "Template",
@@ -1514,6 +1584,10 @@ exports.translations = {
1514
1584
  // Language Selector
1515
1585
  "language.english": "English",
1516
1586
  "language.japanese": "Japanese",
1587
+ "language.malay": "Malay",
1588
+ "language.tagalog": "Tagalog",
1589
+ "language.filipino": "Filipino",
1590
+ "language.indonesian": "Indonesian",
1517
1591
  "language.select": "Select language",
1518
1592
  // Timezone Selector
1519
1593
  "timezone.search_placeholder": "Search timezone...",
@@ -1564,6 +1638,8 @@ exports.translations = {
1564
1638
  "booking.dropoff_location": "Dropoff Location",
1565
1639
  "booking.search_pickup": "Search pickup locations...",
1566
1640
  "booking.search_dropoff": "Search dropoff locations...",
1641
+ "booking.search": "Search",
1642
+ "booking.search_placeholder": "Search bookings...",
1567
1643
  "booking.tickets": "Tickets",
1568
1644
  "booking.payment_summary": "Payment Summary",
1569
1645
  "booking.show_details": "Show Details",
@@ -0,0 +1,2 @@
1
+ export declare const translations: Record<string, string>;
2
+ //# sourceMappingURL=locale_id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale_id.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale_id.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4gF/C,CAAC"}