sgerp-frontend-lib 0.1.1 → 0.1.2

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 (255) hide show
  1. package/README.md +1 -1
  2. package/dist/connection-manager.d.ts +48 -0
  3. package/dist/connection-manager.d.ts.map +1 -0
  4. package/dist/connection-manager.js +156 -0
  5. package/dist/index.js +20 -2
  6. package/dist/locales/locale-server.d.ts +10 -0
  7. package/dist/locales/locale-server.d.ts.map +1 -0
  8. package/dist/locales/locale-server.js +49 -0
  9. package/dist/locales/locale.d.ts +23 -0
  10. package/dist/locales/locale.d.ts.map +1 -0
  11. package/dist/locales/locale.js +145 -0
  12. package/dist/locales/locale_en.d.ts.map +1 -1
  13. package/dist/locales/locale_en.js +84 -9
  14. package/dist/locales/locale_ja.d.ts.map +1 -1
  15. package/dist/locales/locale_ja.js +84 -9
  16. package/dist/locales/locale_ms.d.ts.map +1 -1
  17. package/dist/locales/locale_ms.js +84 -9
  18. package/dist/locales/useLocalization.d.ts +11 -0
  19. package/dist/locales/useLocalization.d.ts.map +1 -0
  20. package/dist/locales/useLocalization.js +64 -0
  21. package/dist/locales.d.ts +228 -0
  22. package/dist/locales.d.ts.map +1 -0
  23. package/dist/locales.js +229 -0
  24. package/dist/sgerp/api/client.d.ts +45 -0
  25. package/dist/sgerp/api/client.d.ts.map +1 -0
  26. package/dist/sgerp/api/client.js +141 -0
  27. package/dist/sgerp/client.js +341 -0
  28. package/dist/sgerp/collection.d.ts +391 -0
  29. package/dist/sgerp/collection.d.ts.map +1 -0
  30. package/dist/sgerp/collection.js +756 -0
  31. package/dist/sgerp/collections/account/user.d.ts +8 -0
  32. package/dist/sgerp/collections/account/user.d.ts.map +1 -0
  33. package/dist/sgerp/collections/account/user.js +10 -0
  34. package/dist/sgerp/collections/masstransit/building.d.ts +26 -0
  35. package/dist/sgerp/collections/masstransit/building.d.ts.map +1 -0
  36. package/dist/sgerp/collections/masstransit/building.js +53 -0
  37. package/dist/sgerp/collections/masstransit/transitstop.d.ts +15 -0
  38. package/dist/sgerp/collections/masstransit/transitstop.d.ts.map +1 -0
  39. package/dist/sgerp/collections/masstransit/transitstop.js +54 -0
  40. package/dist/sgerp/collections/masstransit/transitstopset.d.ts +10 -0
  41. package/dist/sgerp/collections/masstransit/transitstopset.d.ts.map +1 -0
  42. package/dist/sgerp/collections/masstransit/transitstopset.js +10 -0
  43. package/dist/sgerp/collections/sharing/organization-project.d.ts +11 -0
  44. package/dist/sgerp/collections/sharing/organization-project.d.ts.map +1 -0
  45. package/dist/sgerp/collections/sharing/organization-project.js +13 -0
  46. package/dist/sgerp/collections/sharing/organization.d.ts +11 -0
  47. package/dist/sgerp/collections/sharing/organization.d.ts.map +1 -0
  48. package/dist/sgerp/collections/sharing/organization.js +13 -0
  49. package/dist/sgerp/collections/sharing/pricing.d.ts +18 -0
  50. package/dist/sgerp/collections/sharing/pricing.d.ts.map +1 -0
  51. package/dist/sgerp/collections/sharing/pricing.js +23 -0
  52. package/dist/sgerp/collections/sharing/project-member.d.ts +8 -0
  53. package/dist/sgerp/collections/sharing/project-member.d.ts.map +1 -0
  54. package/dist/sgerp/collections/sharing/project-member.js +10 -0
  55. package/dist/sgerp/collections/sharing/project.d.ts +8 -0
  56. package/dist/sgerp/collections/sharing/project.d.ts.map +1 -0
  57. package/dist/sgerp/collections/sharing/project.js +10 -0
  58. package/dist/sgerp/collections/simulation/booking.d.ts +11 -0
  59. package/dist/sgerp/collections/simulation/booking.d.ts.map +1 -0
  60. package/dist/sgerp/collections/simulation/booking.js +13 -0
  61. package/dist/sgerp/collections/simulation/dataset.d.ts +14 -0
  62. package/dist/sgerp/collections/simulation/dataset.d.ts.map +1 -0
  63. package/dist/sgerp/collections/simulation/dataset.js +17 -0
  64. package/dist/sgerp/collections/simulation/driver.d.ts +12 -0
  65. package/dist/sgerp/collections/simulation/driver.d.ts.map +1 -0
  66. package/dist/sgerp/collections/simulation/driver.js +40 -0
  67. package/dist/sgerp/collections/simulation/geofence.d.ts +24 -0
  68. package/dist/sgerp/collections/simulation/geofence.d.ts.map +1 -0
  69. package/dist/sgerp/collections/simulation/geofence.js +66 -0
  70. package/dist/sgerp/collections/simulation/mapboxtoken.d.ts +18 -0
  71. package/dist/sgerp/collections/simulation/mapboxtoken.d.ts.map +1 -0
  72. package/dist/sgerp/collections/simulation/mapboxtoken.js +24 -0
  73. package/dist/sgerp/collections/simulation/node.js +13 -0
  74. package/dist/sgerp/collections/simulation/operationslocation.d.ts +28 -0
  75. package/dist/sgerp/collections/simulation/operationslocation.d.ts.map +1 -0
  76. package/dist/sgerp/collections/simulation/operationslocation.js +64 -0
  77. package/dist/sgerp/collections/simulation/operationslocationgroup.d.ts +12 -0
  78. package/dist/sgerp/collections/simulation/operationslocationgroup.d.ts.map +1 -0
  79. package/dist/sgerp/collections/simulation/operationslocationgroup.js +24 -0
  80. package/dist/sgerp/collections/simulation/routingprofile.d.ts +10 -0
  81. package/dist/sgerp/collections/simulation/routingprofile.d.ts.map +1 -0
  82. package/dist/sgerp/collections/simulation/routingprofile.js +10 -0
  83. package/dist/sgerp/collections/simulation/simulation.d.ts +12 -0
  84. package/dist/sgerp/collections/simulation/simulation.d.ts.map +1 -0
  85. package/dist/sgerp/collections/simulation/simulation.js +35 -0
  86. package/dist/sgerp/collections/simulation/simulationprocessor.d.ts +19 -0
  87. package/dist/sgerp/collections/simulation/simulationprocessor.d.ts.map +1 -0
  88. package/dist/sgerp/collections/simulation/simulationprocessor.js +27 -0
  89. package/dist/sgerp/collections/simulation/vehicle.js +13 -0
  90. package/dist/sgerp/collections/simulation/vehicletype.d.ts +11 -0
  91. package/dist/sgerp/collections/simulation/vehicletype.d.ts.map +1 -0
  92. package/dist/sgerp/collections/simulation/vehicletype.js +13 -0
  93. package/dist/sgerp/collections/sms_notify/smsscheduled.d.ts +11 -0
  94. package/dist/sgerp/collections/sms_notify/smsscheduled.d.ts.map +1 -0
  95. package/dist/sgerp/collections/sms_notify/smsscheduled.js +13 -0
  96. package/dist/sgerp/collections/transportation/passenger.d.ts +8 -0
  97. package/dist/sgerp/collections/transportation/passenger.d.ts.map +1 -0
  98. package/dist/sgerp/collections/transportation/passenger.js +10 -0
  99. package/dist/sgerp/collections/transportation/ticket.d.ts +11 -0
  100. package/dist/sgerp/collections/transportation/ticket.d.ts.map +1 -0
  101. package/dist/sgerp/collections/transportation/ticket.js +13 -0
  102. package/dist/sgerp/collections/transportation/transaction.d.ts +11 -0
  103. package/dist/sgerp/collections/transportation/transaction.d.ts.map +1 -0
  104. package/dist/sgerp/collections/transportation/transaction.js +13 -0
  105. package/dist/sgerp/constants/bulkoperations-enums.d.ts +71 -0
  106. package/dist/sgerp/constants/bulkoperations-enums.d.ts.map +1 -0
  107. package/dist/sgerp/constants/bulkoperations-enums.js +99 -0
  108. package/dist/sgerp/constants/messages-enums.d.ts +47 -0
  109. package/dist/sgerp/constants/messages-enums.d.ts.map +1 -0
  110. package/dist/sgerp/constants/messages-enums.js +67 -0
  111. package/dist/sgerp/constants/scheduling-enums.d.ts +42 -0
  112. package/dist/sgerp/constants/scheduling-enums.d.ts.map +1 -0
  113. package/dist/sgerp/constants/scheduling-enums.js +61 -0
  114. package/dist/sgerp/constants/simulation-enums.d.ts +93 -0
  115. package/dist/sgerp/constants/simulation-enums.d.ts.map +1 -0
  116. package/dist/sgerp/constants/simulation-enums.js +147 -0
  117. package/dist/sgerp/constants/solver-strategies.d.ts +75 -0
  118. package/dist/sgerp/constants/solver-strategies.d.ts.map +1 -0
  119. package/dist/sgerp/constants/solver-strategies.js +26 -0
  120. package/dist/sgerp/context/sgerp-context.js +134 -0
  121. package/dist/sgerp/domains.d.ts +47 -0
  122. package/dist/sgerp/domains.d.ts.map +1 -0
  123. package/dist/sgerp/domains.js +45 -0
  124. package/dist/sgerp/hooks/use-collection.js +122 -0
  125. package/dist/sgerp/hooks/use-live-updates.js +16 -13
  126. package/dist/sgerp/index.js +153 -0
  127. package/dist/sgerp/map-states/operations-location-state.d.ts +12 -0
  128. package/dist/sgerp/map-states/operations-location-state.d.ts.map +1 -0
  129. package/dist/sgerp/map-states/operations-location-state.js +86 -0
  130. package/dist/sgerp/routing/index.d.ts +51 -0
  131. package/dist/sgerp/routing/index.d.ts.map +1 -0
  132. package/dist/sgerp/routing/index.js +373 -0
  133. package/dist/sgerp/simulation-logic/fetchUtils.js +226 -0
  134. package/dist/sgerp/simulation-logic/index.js +27 -7
  135. package/dist/sgerp/simulation-logic/manualEditUtils.js +69 -0
  136. package/dist/sgerp/simulation-logic/mapUtils.js +58 -0
  137. package/dist/sgerp/simulation-logic/optimisticUpdateUtils.js +8 -5
  138. package/dist/sgerp/simulation-logic/referenceUtils.js +110 -0
  139. package/dist/sgerp/simulation-logic/routeCalculationUtils.js +43 -0
  140. package/dist/sgerp/simulation-logic/timeShiftUtils.js +63 -0
  141. package/dist/sgerp/types/account/user.d.ts +38 -0
  142. package/dist/sgerp/types/account/user.d.ts.map +1 -0
  143. package/dist/sgerp/types/account/user.js +2 -0
  144. package/dist/sgerp/types/bulkoperations/index.d.ts +37 -0
  145. package/dist/sgerp/types/bulkoperations/index.d.ts.map +1 -0
  146. package/dist/sgerp/types/bulkoperations/index.js +35 -0
  147. package/dist/sgerp/types/bulkoperations/vehicle-upload.d.ts +335 -0
  148. package/dist/sgerp/types/bulkoperations/vehicle-upload.d.ts.map +1 -0
  149. package/dist/sgerp/types/bulkoperations/vehicle-upload.js +49 -0
  150. package/dist/sgerp/types/config.d.ts +25 -0
  151. package/dist/sgerp/types/config.d.ts.map +1 -0
  152. package/dist/sgerp/types/config.js +2 -0
  153. package/dist/sgerp/types/geojson.d.ts +45 -0
  154. package/dist/sgerp/types/geojson.d.ts.map +1 -0
  155. package/dist/sgerp/types/geojson.js +6 -0
  156. package/dist/sgerp/types/map.d.ts +24 -0
  157. package/dist/sgerp/types/map.d.ts.map +1 -0
  158. package/dist/sgerp/types/map.js +2 -0
  159. package/dist/sgerp/types/masstransit/building.d.ts +24 -0
  160. package/dist/sgerp/types/masstransit/building.d.ts.map +1 -0
  161. package/dist/sgerp/types/masstransit/building.js +2 -0
  162. package/dist/sgerp/types/masstransit/transitstop.d.ts +35 -0
  163. package/dist/sgerp/types/masstransit/transitstop.d.ts.map +1 -0
  164. package/dist/sgerp/types/masstransit/transitstop.js +2 -0
  165. package/dist/sgerp/types/masstransit/transitstopset.d.ts +14 -0
  166. package/dist/sgerp/types/masstransit/transitstopset.d.ts.map +1 -0
  167. package/dist/sgerp/types/masstransit/transitstopset.js +2 -0
  168. package/dist/sgerp/types/sharing/organization-project.d.ts +14 -0
  169. package/dist/sgerp/types/sharing/organization-project.d.ts.map +1 -0
  170. package/dist/sgerp/types/sharing/organization-project.js +2 -0
  171. package/dist/sgerp/types/sharing/organization.d.ts +14 -0
  172. package/dist/sgerp/types/sharing/organization.d.ts.map +1 -0
  173. package/dist/sgerp/types/sharing/organization.js +2 -0
  174. package/dist/sgerp/types/sharing/pricing.d.ts +98 -0
  175. package/dist/sgerp/types/sharing/pricing.d.ts.map +1 -0
  176. package/dist/sgerp/types/sharing/pricing.js +2 -0
  177. package/dist/sgerp/types/sharing/project-member.d.ts +15 -0
  178. package/dist/sgerp/types/sharing/project-member.d.ts.map +1 -0
  179. package/dist/sgerp/types/sharing/project-member.js +2 -0
  180. package/dist/sgerp/types/sharing/project.d.ts +16 -0
  181. package/dist/sgerp/types/sharing/project.d.ts.map +1 -0
  182. package/dist/sgerp/types/sharing/project.js +2 -0
  183. package/dist/sgerp/types/simulation/booking.d.ts +128 -0
  184. package/dist/sgerp/types/simulation/booking.d.ts.map +1 -0
  185. package/dist/sgerp/types/simulation/booking.js +24 -0
  186. package/dist/sgerp/types/simulation/calculation-params.d.ts +20 -0
  187. package/dist/sgerp/types/simulation/calculation-params.d.ts.map +1 -0
  188. package/dist/sgerp/types/simulation/calculation-params.js +2 -0
  189. package/dist/sgerp/types/simulation/dataset.d.ts +16 -0
  190. package/dist/sgerp/types/simulation/dataset.d.ts.map +1 -0
  191. package/dist/sgerp/types/simulation/dataset.js +2 -0
  192. package/dist/sgerp/types/simulation/driver.d.ts +19 -0
  193. package/dist/sgerp/types/simulation/driver.d.ts.map +1 -0
  194. package/dist/sgerp/types/simulation/driver.js +2 -0
  195. package/dist/sgerp/types/simulation/geofence.d.ts +19 -0
  196. package/dist/sgerp/types/simulation/geofence.d.ts.map +1 -0
  197. package/dist/sgerp/types/simulation/geofence.js +2 -0
  198. package/dist/sgerp/types/simulation/logistics-api-settings.d.ts +98 -0
  199. package/dist/sgerp/types/simulation/logistics-api-settings.d.ts.map +1 -0
  200. package/dist/sgerp/types/simulation/logistics-api-settings.js +104 -0
  201. package/dist/sgerp/types/simulation/mapboxtoken.d.ts +13 -0
  202. package/dist/sgerp/types/simulation/mapboxtoken.d.ts.map +1 -0
  203. package/dist/sgerp/types/simulation/mapboxtoken.js +2 -0
  204. package/dist/sgerp/types/simulation/node.js +5 -2
  205. package/dist/sgerp/types/simulation/operationslocation.d.ts +40 -0
  206. package/dist/sgerp/types/simulation/operationslocation.d.ts.map +1 -0
  207. package/dist/sgerp/types/simulation/operationslocation.js +2 -0
  208. package/dist/sgerp/types/simulation/operationslocationgroup.d.ts +11 -0
  209. package/dist/sgerp/types/simulation/operationslocationgroup.d.ts.map +1 -0
  210. package/dist/sgerp/types/simulation/operationslocationgroup.js +2 -0
  211. package/dist/sgerp/types/simulation/pricing.d.ts +171 -0
  212. package/dist/sgerp/types/simulation/pricing.d.ts.map +1 -0
  213. package/dist/sgerp/types/simulation/pricing.js +2 -0
  214. package/dist/sgerp/types/simulation/route-cost-modification.d.ts +35 -0
  215. package/dist/sgerp/types/simulation/route-cost-modification.d.ts.map +1 -0
  216. package/dist/sgerp/types/simulation/route-cost-modification.js +5 -0
  217. package/dist/sgerp/types/simulation/routing-engine-settings.d.ts +42 -0
  218. package/dist/sgerp/types/simulation/routing-engine-settings.d.ts.map +1 -0
  219. package/dist/sgerp/types/simulation/routing-engine-settings.js +35 -0
  220. package/dist/sgerp/types/simulation/routingprofile.d.ts +32 -0
  221. package/dist/sgerp/types/simulation/routingprofile.d.ts.map +1 -0
  222. package/dist/sgerp/types/simulation/routingprofile.js +37 -0
  223. package/dist/sgerp/types/simulation/simulation.d.ts +120 -0
  224. package/dist/sgerp/types/simulation/simulation.d.ts.map +1 -0
  225. package/dist/sgerp/types/simulation/simulation.js +2 -0
  226. package/dist/sgerp/types/simulation/simulationprocessor.d.ts +31 -0
  227. package/dist/sgerp/types/simulation/simulationprocessor.d.ts.map +1 -0
  228. package/dist/sgerp/types/simulation/simulationprocessor.js +2 -0
  229. package/dist/sgerp/types/simulation/vehicle.js +2 -1
  230. package/dist/sgerp/types/simulation/vehicletype.d.ts +33 -0
  231. package/dist/sgerp/types/simulation/vehicletype.d.ts.map +1 -0
  232. package/dist/sgerp/types/simulation/vehicletype.js +2 -0
  233. package/dist/sgerp/types/sms_notify/smsscheduled.d.ts +36 -0
  234. package/dist/sgerp/types/sms_notify/smsscheduled.d.ts.map +1 -0
  235. package/dist/sgerp/types/sms_notify/smsscheduled.js +6 -0
  236. package/dist/sgerp/types/transportation/passenger.d.ts +49 -0
  237. package/dist/sgerp/types/transportation/passenger.d.ts.map +1 -0
  238. package/dist/sgerp/types/transportation/passenger.js +13 -0
  239. package/dist/sgerp/types/transportation/ticket.d.ts +31 -0
  240. package/dist/sgerp/types/transportation/ticket.d.ts.map +1 -0
  241. package/dist/sgerp/types/transportation/ticket.js +2 -0
  242. package/dist/sgerp/types/transportation/transaction.d.ts +71 -0
  243. package/dist/sgerp/types/transportation/transaction.d.ts.map +1 -0
  244. package/dist/sgerp/types/transportation/transaction.js +54 -0
  245. package/dist/sgerp/utils/bookingPayload.d.ts +80 -0
  246. package/dist/sgerp/utils/bookingPayload.d.ts.map +1 -0
  247. package/dist/sgerp/utils/bookingPayload.js +44 -0
  248. package/dist/sgerp/utils/color.d.ts +30 -0
  249. package/dist/sgerp/utils/color.d.ts.map +1 -0
  250. package/dist/sgerp/utils/color.js +117 -0
  251. package/dist/sgerp/utils/enum-helpers.d.ts +41 -0
  252. package/dist/sgerp/utils/enum-helpers.d.ts.map +1 -0
  253. package/dist/sgerp/utils/enum-helpers.js +54 -0
  254. package/dist/sgerp/utils/routeUtils.js +171 -0
  255. package/package.json +1 -1
package/README.md CHANGED
@@ -15,7 +15,7 @@ npm install sgerp-frontend-lib
15
15
  Install the complete library directly into your project:
16
16
 
17
17
  ```bash
18
- npx shadcn@latest add https://your-docs-url.com/registry/lib/sgerp-lib
18
+ npx shadcn@latest add https://sgerp-frontend-lib.vercel.app/registry/lib/sgerp-lib
19
19
  ```
20
20
 
21
21
  This copies all `sgerplib/sgerp` files into your project. You own the code and can modify it as needed.
@@ -0,0 +1,48 @@
1
+ import type { Connection } from './sgerp/types/config';
2
+ export interface StoredConnection extends Connection {
3
+ lastUsed?: string;
4
+ }
5
+ export declare class ConnectionManager {
6
+ /**
7
+ * Get all stored connections from localStorage
8
+ */
9
+ static getConnections(): StoredConnection[];
10
+ /**
11
+ * Get a specific connection by ID
12
+ */
13
+ static getConnection(id: string): StoredConnection | null;
14
+ /**
15
+ * Save a connection to localStorage
16
+ */
17
+ static saveConnection(connection: Connection): void;
18
+ /**
19
+ * Delete a connection from localStorage
20
+ */
21
+ static deleteConnection(id: string): void;
22
+ /**
23
+ * Get the active connection ID
24
+ */
25
+ static getActiveConnectionId(): string | null;
26
+ /**
27
+ * Get the active connection
28
+ */
29
+ static getActiveConnection(): StoredConnection | null;
30
+ /**
31
+ * Set the active connection ID
32
+ */
33
+ static setActiveConnection(id: string): void;
34
+ /**
35
+ * Update the lastUsed timestamp for a connection
36
+ */
37
+ static touchConnection(id: string): void;
38
+ /**
39
+ * Clear all connections
40
+ */
41
+ static clearAll(): void;
42
+ /**
43
+ * Subscribe to connection changes
44
+ * @returns Unsubscribe function
45
+ */
46
+ static onChange(callback: () => void): () => void;
47
+ }
48
+ //# sourceMappingURL=connection-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-manager.d.ts","sourceRoot":"","sources":["../sgerplib/connection-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMvD,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAWD,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,cAAc,IAAI,gBAAgB,EAAE;IAY3C;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAKzD;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IA+BnD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAoBzC;;OAEG;IACH,MAAM,CAAC,qBAAqB,IAAI,MAAM,GAAG,IAAI;IAW7C;;OAEG;IACH,MAAM,CAAC,mBAAmB,IAAI,gBAAgB,GAAG,IAAI;IAKrD;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAW5C;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAOxC;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI,IAAI;IAYvB;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;CAOlD"}
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectionManager = void 0;
4
+ const STORAGE_KEY = 'sgerp_connections';
5
+ const ACTIVE_CONNECTION_KEY = 'sgerp_active_connection';
6
+ const CONNECTION_CHANGE_EVENT = 'sgerp_connection_change';
7
+ /**
8
+ * Dispatch a custom event to notify components of connection changes
9
+ */
10
+ function notifyConnectionChange() {
11
+ if (typeof window !== 'undefined') {
12
+ window.dispatchEvent(new CustomEvent(CONNECTION_CHANGE_EVENT));
13
+ }
14
+ }
15
+ class ConnectionManager {
16
+ /**
17
+ * Get all stored connections from localStorage
18
+ */
19
+ static getConnections() {
20
+ if (typeof window === 'undefined')
21
+ return [];
22
+ try {
23
+ const stored = localStorage.getItem(STORAGE_KEY);
24
+ return stored ? JSON.parse(stored) : [];
25
+ }
26
+ catch (error) {
27
+ console.error('Failed to load connections:', error);
28
+ return [];
29
+ }
30
+ }
31
+ /**
32
+ * Get a specific connection by ID
33
+ */
34
+ static getConnection(id) {
35
+ const connections = this.getConnections();
36
+ return connections.find(conn => conn.id === id) || null;
37
+ }
38
+ /**
39
+ * Save a connection to localStorage
40
+ */
41
+ static saveConnection(connection) {
42
+ if (typeof window === 'undefined')
43
+ return;
44
+ try {
45
+ const connections = this.getConnections();
46
+ const existingIndex = connections.findIndex(conn => conn.id === connection.id);
47
+ const storedConnection = Object.assign(Object.assign({}, connection), { lastUsed: new Date().toISOString() });
48
+ if (existingIndex >= 0) {
49
+ connections[existingIndex] = storedConnection;
50
+ }
51
+ else {
52
+ connections.push(storedConnection);
53
+ }
54
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(connections));
55
+ // Set as active connection if it's the first one
56
+ if (connections.length === 1) {
57
+ this.setActiveConnection(connection.id);
58
+ }
59
+ notifyConnectionChange();
60
+ }
61
+ catch (error) {
62
+ console.error('Failed to save connection:', error);
63
+ }
64
+ }
65
+ /**
66
+ * Delete a connection from localStorage
67
+ */
68
+ static deleteConnection(id) {
69
+ if (typeof window === 'undefined')
70
+ return;
71
+ try {
72
+ const connections = this.getConnections();
73
+ const filtered = connections.filter(conn => conn.id !== id);
74
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(filtered));
75
+ // If we deleted the active connection, clear it
76
+ if (this.getActiveConnectionId() === id) {
77
+ localStorage.removeItem(ACTIVE_CONNECTION_KEY);
78
+ }
79
+ notifyConnectionChange();
80
+ }
81
+ catch (error) {
82
+ console.error('Failed to delete connection:', error);
83
+ }
84
+ }
85
+ /**
86
+ * Get the active connection ID
87
+ */
88
+ static getActiveConnectionId() {
89
+ if (typeof window === 'undefined')
90
+ return null;
91
+ try {
92
+ return localStorage.getItem(ACTIVE_CONNECTION_KEY);
93
+ }
94
+ catch (error) {
95
+ console.error('Failed to get active connection:', error);
96
+ return null;
97
+ }
98
+ }
99
+ /**
100
+ * Get the active connection
101
+ */
102
+ static getActiveConnection() {
103
+ const id = this.getActiveConnectionId();
104
+ return id ? this.getConnection(id) : null;
105
+ }
106
+ /**
107
+ * Set the active connection ID
108
+ */
109
+ static setActiveConnection(id) {
110
+ if (typeof window === 'undefined')
111
+ return;
112
+ try {
113
+ localStorage.setItem(ACTIVE_CONNECTION_KEY, id);
114
+ notifyConnectionChange();
115
+ }
116
+ catch (error) {
117
+ console.error('Failed to set active connection:', error);
118
+ }
119
+ }
120
+ /**
121
+ * Update the lastUsed timestamp for a connection
122
+ */
123
+ static touchConnection(id) {
124
+ const connection = this.getConnection(id);
125
+ if (connection) {
126
+ this.saveConnection(connection);
127
+ }
128
+ }
129
+ /**
130
+ * Clear all connections
131
+ */
132
+ static clearAll() {
133
+ if (typeof window === 'undefined')
134
+ return;
135
+ try {
136
+ localStorage.removeItem(STORAGE_KEY);
137
+ localStorage.removeItem(ACTIVE_CONNECTION_KEY);
138
+ notifyConnectionChange();
139
+ }
140
+ catch (error) {
141
+ console.error('Failed to clear connections:', error);
142
+ }
143
+ }
144
+ /**
145
+ * Subscribe to connection changes
146
+ * @returns Unsubscribe function
147
+ */
148
+ static onChange(callback) {
149
+ if (typeof window === 'undefined')
150
+ return () => { };
151
+ const handler = () => callback();
152
+ window.addEventListener(CONNECTION_CHANGE_EVENT, handler);
153
+ return () => window.removeEventListener(CONNECTION_CHANGE_EVENT, handler);
154
+ }
155
+ }
156
+ exports.ConnectionManager = ConnectionManager;
package/dist/index.js CHANGED
@@ -1,8 +1,26 @@
1
+ "use strict";
1
2
  /**
2
3
  * SGERP Frontend Library
3
4
  * Main entry point for npm package
4
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.ConnectionManager = void 0;
5
22
  // Re-export everything from sgerp module
6
- export * from './sgerp';
23
+ __exportStar(require("./sgerp"), exports);
7
24
  // Re-export connection manager
8
- export { ConnectionManager } from './connection-manager';
25
+ var connection_manager_1 = require("./connection-manager");
26
+ Object.defineProperty(exports, "ConnectionManager", { enumerable: true, get: function () { return connection_manager_1.ConnectionManager; } });
@@ -0,0 +1,10 @@
1
+ export type Language = "en" | "ja" | "ms";
2
+ /**
3
+ * Server-side localization function (no localStorage, no client features)
4
+ * @param key - The translation key
5
+ * @param params - Parameters to replace in the translation
6
+ * @param locale - The locale to use
7
+ * @returns The localized string
8
+ */
9
+ export declare const localizeServer: (key: string, params?: Record<string, unknown>, locale?: Language) => string;
10
+ //# sourceMappingURL=locale-server.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.localizeServer = void 0;
4
+ const locale_en_1 = require("./locale_en");
5
+ const locale_ja_1 = require("./locale_ja");
6
+ const locale_ms_1 = require("./locale_ms");
7
+ const locales = {
8
+ en: locale_en_1.translations,
9
+ ja: locale_ja_1.translations,
10
+ ms: locale_ms_1.translations,
11
+ };
12
+ const DEFAULT_LOCALE = "en";
13
+ /**
14
+ * Server-side localization function (no localStorage, no client features)
15
+ * @param key - The translation key
16
+ * @param params - Parameters to replace in the translation
17
+ * @param locale - The locale to use
18
+ * @returns The localized string
19
+ */
20
+ const localizeServer = (key, params = {}, locale = DEFAULT_LOCALE) => {
21
+ const translation = locale in locales ? locales[locale] : locales[DEFAULT_LOCALE];
22
+ // Try to find the key in the selected locale
23
+ let value = translation[key];
24
+ // If not found, try removing '_id' from the key and search again
25
+ if (value === undefined) {
26
+ const keyWithoutId = key.replace(/_id/g, "");
27
+ value = translation[keyWithoutId];
28
+ }
29
+ // If still not found, fallback to English translation
30
+ if (value === undefined) {
31
+ value = locales["en"][key];
32
+ // Try removing '_id' from the key in English fallback
33
+ if (value === undefined) {
34
+ const keyWithoutId = key.replace(/_id/g, "");
35
+ value = locales["en"][keyWithoutId];
36
+ }
37
+ }
38
+ // If still not found, use the key itself
39
+ if (value === undefined) {
40
+ value = key;
41
+ }
42
+ // Replace placeholders with provided values
43
+ Object.keys(params).forEach((param) => {
44
+ const regex = new RegExp(`\\{${param}\\}`, "g");
45
+ value = value.replace(regex, String(params[param] || ""));
46
+ });
47
+ return value;
48
+ };
49
+ exports.localizeServer = localizeServer;
@@ -0,0 +1,23 @@
1
+ export type Language = "en" | "ja" | "ms";
2
+ type LocaleChangeListener = (locale: Language) => void;
3
+ export declare const subscribeToLocaleChanges: (listener: LocaleChangeListener) => () => void;
4
+ /**
5
+ * Get the current locale
6
+ * @returns The current locale
7
+ */
8
+ export declare const getLocale: () => Language;
9
+ /**
10
+ * Set the locale
11
+ * @param locale - The locale to set
12
+ */
13
+ export declare const setLocale: (locale: Language) => void;
14
+ /**
15
+ * Localize a key with optional parameters
16
+ * @param key - The translation key
17
+ * @param params - Parameters to replace in the translation
18
+ * @param locale - Optional locale override
19
+ * @returns The localized string
20
+ */
21
+ export declare const localize: (key: string, params?: Record<string, unknown>, locale?: Language) => string;
22
+ export {};
23
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.localize = exports.setLocale = exports.getLocale = exports.subscribeToLocaleChanges = void 0;
5
+ const locale_en_1 = require("./locale_en");
6
+ const locale_ja_1 = require("./locale_ja");
7
+ const locale_ms_1 = require("./locale_ms");
8
+ const locales = {
9
+ en: locale_en_1.translations,
10
+ ja: locale_ja_1.translations,
11
+ ms: locale_ms_1.translations,
12
+ };
13
+ const DEFAULT_LOCALE = "en";
14
+ const STORAGE_KEY = "sgerp-language";
15
+ let currentLocale = DEFAULT_LOCALE;
16
+ const listeners = new Set();
17
+ const subscribeToLocaleChanges = (listener) => {
18
+ listeners.add(listener);
19
+ return () => {
20
+ listeners.delete(listener);
21
+ };
22
+ };
23
+ exports.subscribeToLocaleChanges = subscribeToLocaleChanges;
24
+ const notifyListeners = () => {
25
+ listeners.forEach(listener => listener(currentLocale));
26
+ };
27
+ // Function to safely access localStorage
28
+ const safeLocalStorage = {
29
+ getItem: (key) => {
30
+ try {
31
+ if (typeof window !== "undefined" && window.localStorage) {
32
+ return localStorage.getItem(key);
33
+ }
34
+ }
35
+ catch (_a) {
36
+ // Ignore localStorage errors
37
+ }
38
+ return null;
39
+ },
40
+ setItem: (key, value) => {
41
+ try {
42
+ if (typeof window !== "undefined" && window.localStorage) {
43
+ localStorage.setItem(key, value);
44
+ }
45
+ }
46
+ catch (_a) {
47
+ // Ignore localStorage errors
48
+ }
49
+ },
50
+ };
51
+ /**
52
+ * Get the current locale
53
+ * @returns The current locale
54
+ */
55
+ const getLocale = () => {
56
+ if (typeof self !== "undefined" && typeof self.postMessage === "function") {
57
+ // Web Worker environment
58
+ return currentLocale;
59
+ }
60
+ else if (typeof window !== "undefined") {
61
+ // Browser environment
62
+ const stored = safeLocalStorage.getItem(STORAGE_KEY);
63
+ if (stored === "en" || stored === "ja" || stored === "ms") {
64
+ return stored;
65
+ }
66
+ return DEFAULT_LOCALE;
67
+ }
68
+ else {
69
+ // Server environment
70
+ return DEFAULT_LOCALE;
71
+ }
72
+ };
73
+ exports.getLocale = getLocale;
74
+ /**
75
+ * Set the locale
76
+ * @param locale - The locale to set
77
+ */
78
+ const setLocale = (locale) => {
79
+ if (locale in locales) {
80
+ // Only notify if locale actually changed
81
+ const changed = currentLocale !== locale;
82
+ currentLocale = locale;
83
+ safeLocalStorage.setItem(STORAGE_KEY, locale);
84
+ if (changed) {
85
+ notifyListeners();
86
+ }
87
+ }
88
+ };
89
+ exports.setLocale = setLocale;
90
+ /**
91
+ * Localize a key with optional parameters
92
+ * @param key - The translation key
93
+ * @param params - Parameters to replace in the translation
94
+ * @param locale - Optional locale override
95
+ * @returns The localized string
96
+ */
97
+ const localize = (key, params = {}, locale = (0, exports.getLocale)()) => {
98
+ const translation = locale in locales ? locales[locale] : locales[DEFAULT_LOCALE];
99
+ // Try to find the key in the selected locale
100
+ let value = translation[key];
101
+ // If not found, try removing '_id' from the key and search again
102
+ if (value === undefined) {
103
+ const keyWithoutId = key.replace(/_id/g, "");
104
+ value = translation[keyWithoutId];
105
+ }
106
+ // If still not found, fallback to English translation
107
+ if (value === undefined) {
108
+ value = locales["en"][key];
109
+ // Try removing '_id' from the key in English fallback
110
+ if (value === undefined) {
111
+ const keyWithoutId = key.replace(/_id/g, "");
112
+ value = locales["en"][keyWithoutId];
113
+ }
114
+ }
115
+ // If still not found, use the key itself
116
+ if (value === undefined) {
117
+ value = key;
118
+ }
119
+ // Replace placeholders with provided values
120
+ Object.keys(params).forEach((param) => {
121
+ const regex = new RegExp(`\\{${param}\\}`, "g");
122
+ value = value.replace(regex, String(params[param] || ""));
123
+ });
124
+ return value;
125
+ };
126
+ exports.localize = localize;
127
+ // Setup for Web Worker environment
128
+ if (typeof self !== "undefined" && self.postMessage) {
129
+ self.onmessage = (event) => {
130
+ if (event.data.type === "setLocale") {
131
+ (0, exports.setLocale)(event.data.locale);
132
+ }
133
+ else if (event.data.type === "getLocale") {
134
+ self.postMessage({ type: "currentLocale", locale: (0, exports.getLocale)() });
135
+ }
136
+ };
137
+ }
138
+ // Setup for Browser environment
139
+ if (typeof window !== "undefined") {
140
+ // Initialize locale from localStorage
141
+ const storedLocale = safeLocalStorage.getItem(STORAGE_KEY);
142
+ if (storedLocale === "en" || storedLocale === "ja" || storedLocale === "ms") {
143
+ (0, exports.setLocale)(storedLocale);
144
+ }
145
+ }
@@ -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,CA2gE/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,CAomE/C,CAAC"}
@@ -1,4 +1,7 @@
1
- export const translations = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translations = void 0;
4
+ exports.translations = {
2
5
  // SGERP Login
3
6
  "sgerp_login.username": "Username",
4
7
  "sgerp_login.password": "Password",
@@ -137,17 +140,82 @@ export const translations = {
137
140
  "interactive_demo.loading": "Loading...",
138
141
  "interactive_demo.code_equivalent": "Code Equivalent",
139
142
  // Homepage
140
- "homepage.title": "SGERP Frontend Library",
141
- "homepage.subtitle": "A TypeScript library for interacting with SGERP backend APIs. Manage multiple connections, environments, and make type-safe API requests.",
143
+ "homepage.badge": "Frontend Components for Logistics & TMS",
144
+ "homepage.title": "Build Mobility and Logistics Apps Fast",
145
+ "homepage.subtitle": "Production-ready React components backed by swatmobility.com services",
146
+ "homepage.description": "Shadcn-style reusable components for mobility and logistics platforms. Fully customizable, drop into any React app, and adapt to your design system. Perfect for people transport and logistics applications.",
142
147
  "homepage.try_it_out": "Try It Out",
143
148
  "homepage.get_started": "Get Started",
144
149
  "homepage.documentation": "Documentation",
145
- "homepage.feature_connection_title": "Connection Management",
146
- "homepage.feature_connection_desc": "Store and switch between multiple user/environment profiles with ease.",
147
- "homepage.feature_typesafe_title": "Type-Safe",
148
- "homepage.feature_typesafe_desc": "Full TypeScript support with comprehensive type definitions.",
149
- "homepage.feature_easy_title": "Easy to Use",
150
- "homepage.feature_easy_desc": "Simple API with automatic authentication and error handling.",
150
+ // Stats
151
+ "homepage.stat_components": "Components",
152
+ "homepage.stat_tables": "Data Tables",
153
+ "homepage.stat_pages": "Full Pages",
154
+ "homepage.stat_typescript": "TypeScript",
155
+ // Features Section
156
+ "homepage.features_title": "Everything You Need for Mobility & Logistics Apps",
157
+ "homepage.features_subtitle": "Frontend components backed by swatmobility.com infrastructure for mobility and delivery management",
158
+ "homepage.feature_transport_title": "People Transport",
159
+ "homepage.feature_transport_desc": "Complete passenger transport solutions with booking management, ridesharing support, driver assignment, and real-time tracking for efficient people movement.",
160
+ "homepage.feature_logistics_title": "Logistics",
161
+ "homepage.feature_logistics_desc": "18 pre-built table components, 10+ complete pages, and specialized editors for delivery management and supply chain operations. Install with shadcn CLI and customize.",
162
+ "homepage.feature_backend_title": "Backend-Powered",
163
+ "homepage.feature_backend_desc": "All components connect to production-grade logistics APIs. Fetch live data with automatic authentication and type safety.",
164
+ "homepage.feature_maps_title": "Interactive Maps",
165
+ "homepage.feature_maps_desc": "Route visualization with Mapbox GL. Display vehicle routes, waypoints, and live tracking on interactive maps.",
166
+ "homepage.feature_routing_title": "Route Planning",
167
+ "homepage.feature_routing_desc": "Solve vehicle routing problems with automated planning algorithms or manual editing. Create optimal routes with autoplan, then fine-tune manually for real-world constraints.",
168
+ "homepage.feature_customizable_title": "Shadcn-Style Components",
169
+ "homepage.feature_customizable_desc": "Fully customizable components that drop into any React app. Built with Radix UI primitives and Tailwind CSS. Copy, paste, and adapt to your design system.",
170
+ // Use Cases Section
171
+ "homepage.usecases_title": "Built for Real-World Logistics",
172
+ "homepage.usecases_subtitle": "Trusted by transportation companies for fleet operations, delivery management, and route optimization",
173
+ "homepage.usecase_fleet_title": "Fleet Management",
174
+ "homepage.usecase_fleet_desc": "Track vehicles, assign drivers, monitor service schedules, and optimize fleet utilization across multiple projects.",
175
+ "homepage.usecase_rideshare_title": "Ride-Sharing & Carpooling",
176
+ "homepage.usecase_rideshare_desc": "Manage passenger bookings, match riders, calculate routes, and handle JIT shift-based transportation services.",
177
+ "homepage.usecase_delivery_title": "Last-Mile Delivery",
178
+ "homepage.usecase_delivery_desc": "Optimize delivery routes, track packages, manage nodes, and coordinate drivers for efficient last-mile logistics.",
179
+ "homepage.usecase_routing_title": "Route Optimization",
180
+ "homepage.usecase_routing_desc": "Calculate optimal routes using swatmobility route optimization APIs, visualize waypoints, estimate travel times, and reduce operational costs.",
181
+ // Showcase Section
182
+ "homepage.showcase_title": "See It In Action",
183
+ "homepage.showcase_subtitle": "Production-ready components for every aspect of mobility and logistics management",
184
+ "homepage.hero_feature_title": "Complete Route Planning Interface — Zero Development Required",
185
+ "homepage.hero_feature_desc": "Drop in a full-featured route planning interface with interactive maps, vehicle management, and timeline views. Connected to backend by swatmobility developers — just install and use or customize.",
186
+ "homepage.showcase_services": "Services Management",
187
+ "homepage.showcase_services_desc": "Complete page for managing transportation services with filtering and scheduling",
188
+ "homepage.showcase_drivers": "Driver Management",
189
+ "homepage.showcase_drivers_desc": "Track driver availability, assignments, and performance metrics",
190
+ "homepage.showcase_passengers": "Passenger Bookings",
191
+ "homepage.showcase_passengers_desc": "Manage passenger information, bookings, and transaction history",
192
+ "homepage.showcase_timeline": "Timeline View",
193
+ "homepage.showcase_timeline_desc": "Gantt-style timeline for visualizing vehicle schedules and routes",
194
+ "homepage.showcase_notifications": "Notifications",
195
+ "homepage.showcase_notifications_desc": "Schedule SMS and push notifications for passengers and drivers",
196
+ "homepage.showcase_trackplayer": "Route Playback",
197
+ "homepage.showcase_trackplayer_desc": "Replay historical routes with speed control and waypoint tracking",
198
+ // CTA Section
199
+ "homepage.cta_title": "Start Building Today",
200
+ "homepage.cta_subtitle": "Install components via shadcn CLI and connect to your SGERP backend. Full TypeScript support included.",
201
+ // Footer
202
+ "footer.about": "About",
203
+ "footer.about_desc": "Production-ready React components for mobility and logistics platforms, backed by SWAT Mobility.",
204
+ "footer.documentation": "Documentation",
205
+ "footer.getting_started": "Getting Started",
206
+ "footer.api_reference": "API Reference",
207
+ "footer.components": "Components",
208
+ "footer.pages": "Pages",
209
+ "footer.resources": "Resources",
210
+ "footer.try_demo": "Try Demo",
211
+ "footer.github": "GitHub",
212
+ "footer.npm_package": "NPM Package",
213
+ "footer.connect": "Connect",
214
+ "footer.swat_website": "SWAT Mobility",
215
+ "footer.contact": "Contact Us",
216
+ "footer.about_us": "About Us",
217
+ "footer.copyright": "SWAT Mobility. All rights reserved.",
218
+ "footer.terms": "Terms & Conditions",
151
219
  // PT App
152
220
  "ptapp.title": "PT Management",
153
221
  "ptapp.login_required": "Please log in to access PT Management",
@@ -1939,4 +2007,11 @@ export const translations = {
1939
2007
  "example.map.feature_style": "Change map style using the dropdown (top-left)",
1940
2008
  "example.map.feature_zoom": "Zoom and pan using mouse or touch",
1941
2009
  "example.map.feature_updates": "Data automatically updates when collection changes",
2010
+ // Table Examples
2011
+ "examples.live_example": "Live Example",
2012
+ "examples.integrated_editor_recommended": "Integrated Editor (Recommended)",
2013
+ "examples.integrated_editor_desc": "Enable editing with just enableEditor={true}. The table handles the drawer and editor automatically.",
2014
+ "examples.custom_onedit_handler": "Custom onEdit Handler",
2015
+ "examples.custom_onedit_desc": "For advanced use cases, provide your own onEdit handler for full control.",
2016
+ "examples.see_code_above": "See code example above for custom implementation",
1942
2017
  };
@@ -1 +1 @@
1
- {"version":3,"file":"locale_ja.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale_ja.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAugE/C,CAAC"}
1
+ {"version":3,"file":"locale_ja.d.ts","sourceRoot":"","sources":["../../sgerplib/locales/locale_ja.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAimE/C,CAAC"}