@codingfactory/inventory-locator-client 0.1.0

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 (53) hide show
  1. package/package.json +47 -0
  2. package/src/api/client.ts +31 -0
  3. package/src/components/counting/CountEntryForm.vue +833 -0
  4. package/src/components/counting/CountReport.vue +385 -0
  5. package/src/components/counting/CountSessionDetail.vue +650 -0
  6. package/src/components/counting/CountSessionList.vue +683 -0
  7. package/src/components/dashboard/InventoryDashboard.vue +670 -0
  8. package/src/components/dashboard/UnlocatedProducts.vue +468 -0
  9. package/src/components/labels/LabelBatchPrint.vue +528 -0
  10. package/src/components/labels/LabelPreview.vue +293 -0
  11. package/src/components/locations/InventoryLocatorShell.vue +408 -0
  12. package/src/components/locations/LocationBreadcrumb.vue +144 -0
  13. package/src/components/locations/LocationCodeBadge.vue +46 -0
  14. package/src/components/locations/LocationDetail.vue +884 -0
  15. package/src/components/locations/LocationForm.vue +360 -0
  16. package/src/components/locations/LocationSearchInput.vue +428 -0
  17. package/src/components/locations/LocationTree.vue +156 -0
  18. package/src/components/locations/LocationTreeNode.vue +280 -0
  19. package/src/components/locations/LocationTypeIcon.vue +58 -0
  20. package/src/components/products/LocationProductAdd.vue +637 -0
  21. package/src/components/products/LocationProductList.vue +547 -0
  22. package/src/components/products/ProductLocationList.vue +215 -0
  23. package/src/components/products/QuickMoveModal.vue +592 -0
  24. package/src/components/scanning/ScanHistory.vue +146 -0
  25. package/src/components/scanning/ScanResult.vue +350 -0
  26. package/src/components/scanning/ScannerOverlay.vue +696 -0
  27. package/src/components/shared/InvBadge.vue +71 -0
  28. package/src/components/shared/InvButton.vue +206 -0
  29. package/src/components/shared/InvCard.vue +254 -0
  30. package/src/components/shared/InvEmptyState.vue +132 -0
  31. package/src/components/shared/InvInput.vue +125 -0
  32. package/src/components/shared/InvModal.vue +296 -0
  33. package/src/components/shared/InvSelect.vue +155 -0
  34. package/src/components/shared/InvTable.vue +288 -0
  35. package/src/composables/useCountSessions.ts +184 -0
  36. package/src/composables/useLabelPrinting.ts +71 -0
  37. package/src/composables/useLocationBreadcrumbs.ts +19 -0
  38. package/src/composables/useLocationProducts.ts +125 -0
  39. package/src/composables/useLocationSearch.ts +46 -0
  40. package/src/composables/useLocations.ts +159 -0
  41. package/src/composables/useMovements.ts +71 -0
  42. package/src/composables/useScanner.ts +83 -0
  43. package/src/env.d.ts +7 -0
  44. package/src/index.ts +46 -0
  45. package/src/plugin.ts +14 -0
  46. package/src/stores/countStore.ts +95 -0
  47. package/src/stores/locationStore.ts +113 -0
  48. package/src/stores/scannerStore.ts +51 -0
  49. package/src/types/index.ts +216 -0
  50. package/src/utils/codeFormatter.ts +29 -0
  51. package/src/utils/locationIcons.ts +64 -0
  52. package/tsconfig.json +21 -0
  53. package/vite.config.ts +37 -0
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@codingfactory/inventory-locator-client",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ },
14
+ "./style.css": "./dist/inventory-locator-client.css"
15
+ },
16
+ "scripts": {
17
+ "dev": "vite build --watch",
18
+ "build": "vite build",
19
+ "test": "vitest",
20
+ "test:run": "vitest run",
21
+ "typecheck": "vue-tsc --noEmit"
22
+ },
23
+ "peerDependencies": {
24
+ "axios": "^1.6.0",
25
+ "pinia": "^3.0.0",
26
+ "vue": "^3.5.0",
27
+ "vue-router": "^4.5.0"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "vue-router": {
31
+ "optional": true
32
+ }
33
+ },
34
+ "devDependencies": {
35
+ "@vitejs/plugin-vue": "^5.0",
36
+ "@vue/test-utils": "^2.0",
37
+ "typescript": "^5.0",
38
+ "vite": "^6.0",
39
+ "vite-plugin-dts": "^4.0",
40
+ "vitest": "^3.0",
41
+ "vue": "^3.5.0",
42
+ "vue-tsc": "^2.0"
43
+ },
44
+ "dependencies": {
45
+ "html5-qrcode": "^2.3"
46
+ }
47
+ }
@@ -0,0 +1,31 @@
1
+ import axios, { type AxiosInstance } from 'axios'
2
+
3
+ let apiClient: AxiosInstance | null = null
4
+ let apiPrefix = '/api/inventory-locator/v1'
5
+
6
+ export function configureApiClient(options: {
7
+ axiosInstance?: AxiosInstance
8
+ prefix?: string
9
+ }) {
10
+ if (options.axiosInstance) {
11
+ apiClient = options.axiosInstance
12
+ }
13
+ if (options.prefix) {
14
+ apiPrefix = options.prefix
15
+ }
16
+ }
17
+
18
+ export function getApiClient(): AxiosInstance {
19
+ if (!apiClient) {
20
+ apiClient = axios
21
+ }
22
+ return apiClient
23
+ }
24
+
25
+ export function getApiPrefix(): string {
26
+ return apiPrefix
27
+ }
28
+
29
+ export function apiUrl(path: string): string {
30
+ return `${apiPrefix}${path}`
31
+ }