@apptimate/core-lib 1.0.0 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
- # @apptimate/core-lib
2
-
3
- ## 1.0.0
4
-
5
- ### Major Changes
6
-
7
- - init
1
+ # @apptimate/core-lib
2
+
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - init
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
- {
2
- "name": "@apptimate/core-lib",
3
- "version": "1.0.0",
4
- "main": "src/index.ts",
5
- "types": "src/index.ts",
6
- "publishConfig": {
7
- "access": "public"
8
- },
9
- "dependencies": {
10
- "js-cookie": "^3.0.5",
11
- "clsx": "^2.1.1",
12
- "tailwind-merge": "^3.5.0"
13
- },
14
- "devDependencies": {
15
- "@types/js-cookie": "^3.0.6"
16
- }
1
+ {
2
+ "name": "@apptimate/core-lib",
3
+ "version": "1.2.0",
4
+ "main": "src/index.ts",
5
+ "types": "src/index.ts",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "dependencies": {
10
+ "js-cookie": "^3.0.5",
11
+ "clsx": "^2.1.1",
12
+ "tailwind-merge": "^3.5.0"
13
+ },
14
+ "devDependencies": {
15
+ "@types/js-cookie": "^3.0.6"
16
+ }
17
17
  }
package/src/client.ts ADDED
@@ -0,0 +1,10 @@
1
+ // Client-safe exports only — no 'use server' modules
2
+ export * from './utils/commonService';
3
+ export * from './utils/httpClient';
4
+ export * from './utils/localStorageHandler';
5
+ export * from './utils/bem';
6
+ export * from './utils/cn';
7
+ export * from './common/interfaces/ICommon';
8
+ export * from './constants/storageKeys';
9
+ export * from './constants/menus';
10
+ export * from './constants/iconRegistry';
@@ -1,6 +1,6 @@
1
- export interface IApiResponse<T = any> {
2
- is_success: boolean;
3
- message: string;
4
- result: T | null;
5
- system_code: string;
6
- }
1
+ export interface IApiResponse<T = any> {
2
+ is_success: boolean;
3
+ message: string;
4
+ result: T | null;
5
+ system_code: string;
6
+ }
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Master Icon Registry
3
+ * Maps string names to Lucide icon component names.
4
+ * This list is used by both the DashboardLayout (for rendering)
5
+ * and the Menu Config admin page (for icon selection).
6
+ */
7
+ export const ICON_REGISTRY: { name: string; category: string }[] = [
8
+ // General / Navigation
9
+ { name: 'LayoutGrid', category: 'General' },
10
+ { name: 'LayoutDashboard', category: 'General' },
11
+ { name: 'Home', category: 'General' },
12
+ { name: 'Menu', category: 'General' },
13
+ { name: 'Grid3X3', category: 'General' },
14
+ { name: 'Layers', category: 'General' },
15
+ { name: 'Component', category: 'General' },
16
+ { name: 'Blocks', category: 'General' },
17
+ { name: 'PanelsTopLeft', category: 'General' },
18
+
19
+ // Business / Commerce
20
+ { name: 'ShoppingCart', category: 'Commerce' },
21
+ { name: 'ShoppingBag', category: 'Commerce' },
22
+ { name: 'Store', category: 'Commerce' },
23
+ { name: 'Storefront', category: 'Commerce' },
24
+ { name: 'CreditCard', category: 'Commerce' },
25
+ { name: 'Wallet', category: 'Commerce' },
26
+ { name: 'Receipt', category: 'Commerce' },
27
+ { name: 'BadgeDollarSign', category: 'Commerce' },
28
+ { name: 'DollarSign', category: 'Commerce' },
29
+ { name: 'CircleDollarSign', category: 'Commerce' },
30
+ { name: 'HandCoins', category: 'Commerce' },
31
+ { name: 'Banknote', category: 'Commerce' },
32
+ { name: 'PiggyBank', category: 'Commerce' },
33
+ { name: 'Gem', category: 'Commerce' },
34
+ { name: 'Crown', category: 'Commerce' },
35
+ { name: 'Gift', category: 'Commerce' },
36
+ { name: 'Tag', category: 'Commerce' },
37
+ { name: 'Tags', category: 'Commerce' },
38
+ { name: 'Percent', category: 'Commerce' },
39
+ { name: 'Barcode', category: 'Commerce' },
40
+ { name: 'ScanLine', category: 'Commerce' },
41
+
42
+ // Inventory / Warehouse
43
+ { name: 'Package', category: 'Inventory' },
44
+ { name: 'PackageOpen', category: 'Inventory' },
45
+ { name: 'PackageCheck', category: 'Inventory' },
46
+ { name: 'PackagePlus', category: 'Inventory' },
47
+ { name: 'Boxes', category: 'Inventory' },
48
+ { name: 'Box', category: 'Inventory' },
49
+ { name: 'Archive', category: 'Inventory' },
50
+ { name: 'ArchiveRestore', category: 'Inventory' },
51
+ { name: 'Warehouse', category: 'Inventory' },
52
+ { name: 'Container', category: 'Inventory' },
53
+ { name: 'Truck', category: 'Inventory' },
54
+ { name: 'Forklift', category: 'Inventory' },
55
+
56
+ // Finance / Accounting
57
+ { name: 'Landmark', category: 'Finance' },
58
+ { name: 'Calculator', category: 'Finance' },
59
+ { name: 'Scale', category: 'Finance' },
60
+ { name: 'TrendingUp', category: 'Finance' },
61
+ { name: 'TrendingDown', category: 'Finance' },
62
+ { name: 'ArrowUpDown', category: 'Finance' },
63
+ { name: 'BarChart3', category: 'Finance' },
64
+ { name: 'BarChart4', category: 'Finance' },
65
+ { name: 'LineChart', category: 'Finance' },
66
+ { name: 'PieChart', category: 'Finance' },
67
+ { name: 'Activity', category: 'Finance' },
68
+
69
+ // Documents / Files
70
+ { name: 'FileText', category: 'Documents' },
71
+ { name: 'FileSpreadsheet', category: 'Documents' },
72
+ { name: 'FileCheck', category: 'Documents' },
73
+ { name: 'FilePlus', category: 'Documents' },
74
+ { name: 'Files', category: 'Documents' },
75
+ { name: 'FolderOpen', category: 'Documents' },
76
+ { name: 'FolderKanban', category: 'Documents' },
77
+ { name: 'ClipboardList', category: 'Documents' },
78
+ { name: 'ClipboardCheck', category: 'Documents' },
79
+ { name: 'ScrollText', category: 'Documents' },
80
+ { name: 'BookOpen', category: 'Documents' },
81
+ { name: 'Notebook', category: 'Documents' },
82
+
83
+ // People / HR
84
+ { name: 'Users', category: 'People' },
85
+ { name: 'UserCircle', category: 'People' },
86
+ { name: 'UserCog', category: 'People' },
87
+ { name: 'UserPlus', category: 'People' },
88
+ { name: 'Contact', category: 'People' },
89
+ { name: 'BadgeCheck', category: 'People' },
90
+ { name: 'Building2', category: 'People' },
91
+ { name: 'Building', category: 'People' },
92
+ { name: 'Briefcase', category: 'People' },
93
+ { name: 'HardHat', category: 'People' },
94
+ { name: 'GraduationCap', category: 'People' },
95
+
96
+ // Settings / System
97
+ { name: 'Settings', category: 'System' },
98
+ { name: 'Settings2', category: 'System' },
99
+ { name: 'Cog', category: 'System' },
100
+ { name: 'SlidersHorizontal', category: 'System' },
101
+ { name: 'Wrench', category: 'System' },
102
+ { name: 'Shield', category: 'System' },
103
+ { name: 'ShieldCheck', category: 'System' },
104
+ { name: 'Lock', category: 'System' },
105
+ { name: 'Key', category: 'System' },
106
+ { name: 'Bell', category: 'System' },
107
+ { name: 'Database', category: 'System' },
108
+ { name: 'Server', category: 'System' },
109
+ { name: 'HardDrive', category: 'System' },
110
+ { name: 'Cpu', category: 'System' },
111
+ { name: 'Globe', category: 'System' },
112
+ { name: 'Plug', category: 'System' },
113
+
114
+ // Manufacturing / Production
115
+ { name: 'Factory', category: 'Manufacturing' },
116
+ { name: 'Hammer', category: 'Manufacturing' },
117
+ { name: 'Drill', category: 'Manufacturing' },
118
+ { name: 'Scissors', category: 'Manufacturing' },
119
+ { name: 'Ruler', category: 'Manufacturing' },
120
+ { name: 'Pipette', category: 'Manufacturing' },
121
+ { name: 'Beaker', category: 'Manufacturing' },
122
+ { name: 'FlaskConical', category: 'Manufacturing' },
123
+ { name: 'Atom', category: 'Manufacturing' },
124
+
125
+ // Quality / Inspection
126
+ { name: 'CheckCircle', category: 'Quality' },
127
+ { name: 'CircleAlert', category: 'Quality' },
128
+ { name: 'AlertTriangle', category: 'Quality' },
129
+ { name: 'Search', category: 'Quality' },
130
+ { name: 'ScanSearch', category: 'Quality' },
131
+ { name: 'Eye', category: 'Quality' },
132
+ { name: 'Microscope', category: 'Quality' },
133
+ { name: 'Sparkles', category: 'Quality' },
134
+ { name: 'Star', category: 'Quality' },
135
+ { name: 'ThumbsUp', category: 'Quality' },
136
+
137
+ // Logistics / Delivery
138
+ { name: 'MapPin', category: 'Logistics' },
139
+ { name: 'Map', category: 'Logistics' },
140
+ { name: 'Navigation', category: 'Logistics' },
141
+ { name: 'Route', category: 'Logistics' },
142
+ { name: 'Plane', category: 'Logistics' },
143
+ { name: 'Ship', category: 'Logistics' },
144
+ { name: 'TrainFront', category: 'Logistics' },
145
+ { name: 'PackageSearch', category: 'Logistics' },
146
+ { name: 'Timer', category: 'Logistics' },
147
+ { name: 'Clock', category: 'Logistics' },
148
+ { name: 'Calendar', category: 'Logistics' },
149
+ { name: 'CalendarDays', category: 'Logistics' },
150
+
151
+ // Communication
152
+ { name: 'Mail', category: 'Communication' },
153
+ { name: 'MessageSquare', category: 'Communication' },
154
+ { name: 'Phone', category: 'Communication' },
155
+ { name: 'Megaphone', category: 'Communication' },
156
+ { name: 'Send', category: 'Communication' },
157
+
158
+ // Misc Business
159
+ { name: 'Handshake', category: 'Business' },
160
+ { name: 'Target', category: 'Business' },
161
+ { name: 'Trophy', category: 'Business' },
162
+ { name: 'Rocket', category: 'Business' },
163
+ { name: 'Lightbulb', category: 'Business' },
164
+ { name: 'Zap', category: 'Business' },
165
+ { name: 'Flame', category: 'Business' },
166
+ { name: 'Heart', category: 'Business' },
167
+ { name: 'Leaf', category: 'Business' },
168
+ { name: 'Recycle', category: 'Business' },
169
+ { name: 'Palette', category: 'Business' },
170
+ { name: 'Paintbrush', category: 'Business' },
171
+ { name: 'Camera', category: 'Business' },
172
+ { name: 'Utensils', category: 'Business' },
173
+ { name: 'Coffee', category: 'Business' },
174
+ { name: 'Wine', category: 'Business' },
175
+ { name: 'Pill', category: 'Business' },
176
+ { name: 'Stethoscope', category: 'Business' },
177
+ { name: 'Car', category: 'Business' },
178
+ { name: 'Fuel', category: 'Business' },
179
+ { name: 'Wheat', category: 'Business' },
180
+ { name: 'Flower2', category: 'Business' },
181
+ ];
182
+
183
+ /**
184
+ * Get unique icon categories for filtering.
185
+ */
186
+ export function getIconCategories(): string[] {
187
+ const cats = new Set(ICON_REGISTRY.map(i => i.category));
188
+ return Array.from(cats);
189
+ }