ptechcore_ui 1.0.1 → 1.0.3

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.cjs +1396 -0
  2. package/dist/index.d.cts +62 -0
  3. package/dist/index.d.ts +62 -0
  4. package/dist/index.js +1366 -0
  5. package/package.json +14 -1
  6. package/eslint.config.js +0 -28
  7. package/index.html +0 -78
  8. package/postcss.config.js +0 -6
  9. package/src/App.tsx +0 -156
  10. package/src/assets/imgs/login_illustration.png +0 -0
  11. package/src/components/common/Buttons.tsx +0 -39
  12. package/src/components/common/Cards.tsx +0 -18
  13. package/src/components/common/FDrawer.tsx +0 -2448
  14. package/src/components/common/FDrawer.types.ts +0 -191
  15. package/src/components/common/Inputs.tsx +0 -409
  16. package/src/components/common/Modals.tsx +0 -41
  17. package/src/components/common/Navigations.tsx +0 -0
  18. package/src/components/common/Toast.tsx +0 -0
  19. package/src/components/demo/ToastDemo.tsx +0 -73
  20. package/src/components/layout/Header.tsx +0 -202
  21. package/src/components/layout/ModernDoubleSidebarLayout.tsx +0 -719
  22. package/src/components/layout/PrivateLayout.tsx +0 -52
  23. package/src/components/layout/Sidebar.tsx +0 -182
  24. package/src/components/ui/Toast.tsx +0 -93
  25. package/src/contexts/SessionContext.tsx +0 -77
  26. package/src/contexts/ThemeContext.tsx +0 -58
  27. package/src/contexts/ToastContext.tsx +0 -94
  28. package/src/index.css +0 -3
  29. package/src/index.ts +0 -10
  30. package/src/main.tsx +0 -10
  31. package/src/models/Organization.ts +0 -47
  32. package/src/models/Plan.ts +0 -42
  33. package/src/models/User.ts +0 -23
  34. package/src/pages/Analytics.tsx +0 -101
  35. package/src/pages/CreateOrganization.tsx +0 -215
  36. package/src/pages/Dashboard.tsx +0 -15
  37. package/src/pages/Home.tsx +0 -12
  38. package/src/pages/Profile.tsx +0 -313
  39. package/src/pages/Settings.tsx +0 -382
  40. package/src/pages/Team.tsx +0 -180
  41. package/src/pages/auth/Login.tsx +0 -140
  42. package/src/pages/auth/Register.tsx +0 -302
  43. package/src/pages/organizations/DetailEntity.tsx +0 -1002
  44. package/src/pages/organizations/DetailOrganizations.tsx +0 -1628
  45. package/src/pages/organizations/ListOrganizations.tsx +0 -270
  46. package/src/pages/pricings/CartPlan.tsx +0 -486
  47. package/src/pages/pricings/ListPricing.tsx +0 -321
  48. package/src/pages/users/CreateUser.tsx +0 -448
  49. package/src/pages/users/ListUsers.tsx +0 -0
  50. package/src/services/AuthServices.ts +0 -94
  51. package/src/services/OrganizationServices.ts +0 -61
  52. package/src/services/PlanSubscriptionServices.tsx +0 -137
  53. package/src/services/UserServices.ts +0 -36
  54. package/src/services/api.ts +0 -64
  55. package/src/styles/theme.ts +0 -383
  56. package/src/utils/utils.ts +0 -48
  57. package/src/vite-env.d.ts +0 -1
  58. package/tailwind.config.js +0 -158
  59. package/tsconfig.app.json +0 -24
  60. package/tsconfig.json +0 -31
  61. package/tsconfig.node.json +0 -22
  62. package/vite.config.ts +0 -10
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "ptechcore_ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.cjs",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
5
18
  "scripts": {
6
19
  "dev": "vite",
7
20
  "build": "tsup src/index.ts --format cjs,esm --dts",
package/eslint.config.js DELETED
@@ -1,28 +0,0 @@
1
- import js from '@eslint/js';
2
- import globals from 'globals';
3
- import reactHooks from 'eslint-plugin-react-hooks';
4
- import reactRefresh from 'eslint-plugin-react-refresh';
5
- import tseslint from 'typescript-eslint';
6
-
7
- export default tseslint.config(
8
- { ignores: ['dist'] },
9
- {
10
- extends: [js.configs.recommended, ...tseslint.configs.recommended],
11
- files: ['**/*.{ts,tsx}'],
12
- languageOptions: {
13
- ecmaVersion: 2020,
14
- globals: globals.browser,
15
- },
16
- plugins: {
17
- 'react-hooks': reactHooks,
18
- 'react-refresh': reactRefresh,
19
- },
20
- rules: {
21
- ...reactHooks.configs.recommended.rules,
22
- 'react-refresh/only-export-components': [
23
- 'warn',
24
- { allowConstantExport: true },
25
- ],
26
- },
27
- }
28
- );
package/index.html DELETED
@@ -1,78 +0,0 @@
1
- <!doctype html>
2
- <html lang="fr">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>PanneauPro - Location de Panneaux Publicitaires</title>
8
- <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
9
- <link rel="preconnect" href="https://fonts.googleapis.com">
10
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
- <link href="https://fonts.googleapis.com/css2?family=Sometype+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
12
- <style>
13
- * {
14
- margin: 0;
15
- padding: 0;
16
- box-sizing: border-box;
17
- }
18
-
19
- body {
20
- font-family: 'Sometype Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
21
- -webkit-font-smoothing: antialiased;
22
- -moz-osx-font-smoothing: grayscale;
23
- background-color: #FFFFFF;
24
- color: #353A3B;
25
- }
26
-
27
- #root {
28
- min-height: 100vh;
29
- }
30
-
31
- /* Loading initial - Trinity Colors */
32
- .app-loading {
33
- display: flex;
34
- align-items: center;
35
- justify-content: center;
36
- min-height: 100vh;
37
- background: linear-gradient(135deg, #7A8B8E 0%, #353A3B 100%);
38
- }
39
-
40
- .loading-content {
41
- text-align: center;
42
- color: white;
43
- }
44
-
45
- .loading-spinner {
46
- width: 48px;
47
- height: 48px;
48
- border: 4px solid rgba(255, 255, 255, 0.3);
49
- border-top: 4px solid #ffffff;
50
- border-radius: 50%;
51
- animation: spin 1s linear infinite;
52
- margin: 0 auto 16px;
53
- }
54
-
55
- @keyframes spin {
56
- 0% { transform: rotate(0deg); }
57
- 100% { transform: rotate(360deg); }
58
- }
59
-
60
- .loading-text {
61
- font-size: 18px;
62
- font-weight: 600;
63
- margin-bottom: 8px;
64
- }
65
-
66
- .loading-subtext {
67
- font-size: 14px;
68
- opacity: 0.9;
69
- }
70
- </style>
71
-
72
-
73
- </head>
74
- <body>
75
- <div id="root"></div>
76
- <script type="module" src="/src/main.tsx"></script>
77
- </body>
78
- </html>
package/postcss.config.js DELETED
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- };
package/src/App.tsx DELETED
@@ -1,156 +0,0 @@
1
- import React from 'react';
2
- import { BrowserRouter as Router, Routes, Route, BrowserRouter } from 'react-router-dom';
3
- import { ToastProvider } from './contexts/ToastContext';
4
- import ToastContainer from './components/ui/Toast';
5
- // import RewiseLayout from './components/layout/RewiseLayout';
6
- import Home from './pages/Home';
7
- import Login from './pages/auth/Login';
8
- import Register from './pages/auth/Register';
9
- import { SessionProvider } from './contexts/SessionContext';
10
- import Dashboard from './pages/Dashboard';
11
- import Analytics from './pages/Analytics';
12
- import Team from './pages/Team';
13
- import Profile from './pages/Profile';
14
- import Settings from './pages/Settings';
15
- import CreateOrganization from './pages/CreateOrganization';
16
- import ListOrganizations from './pages/organizations/ListOrganizations';
17
- import DetailOrganizations from './pages/organizations/DetailOrganizations';
18
- import DetailEntity from './pages/organizations/DetailEntity';
19
- import CartPlan from './pages/pricings/CartPlan';
20
- import { ThemeProvider } from './contexts/ThemeContext';
21
- import RewiseLayout, { MenuItem } from './components/layout/ModernDoubleSidebarLayout';
22
- import {
23
- LayoutDashboard, FileText, Users, CreditCard, TrendingUp,
24
- ChevronLeft, ChevronRight, Search, Bell, User,
25
- LogOut, Menu, X, Moon, Sun, Palette, Building2,
26
- Calculator, PiggyBank, FileBarChart, Shield, Package,
27
- DollarSign, BarChart3, Briefcase, Receipt, UserCheck,
28
- Database, Globe, HelpCircle, Activity, Lock, AlertTriangle,
29
- CheckCircle, Clock, FileCheck, Bot, ScanLine,
30
- MessageSquare, Smartphone, Workflow, RefreshCw, Wifi,
31
- Eye, Target, BookOpen, Archive, Download,
32
- Upload, Save, FolderOpen, ChevronDown, Link, PieChart,
33
- Video, Calendar, Folder
34
- } from 'lucide-react';
35
-
36
- function App() {
37
- return (
38
- <ThemeProvider>
39
- <SessionProvider>
40
- <ToastProvider>
41
- <BrowserRouter>
42
- <Routes>
43
- <Route path='/*' element={<PrivateRoutes />} />
44
- <Route path="" element={<Home />} />
45
- <Route path="auth/*" element={<AuthRoutes />} />
46
- </Routes>
47
- <ToastContainer />
48
- </BrowserRouter>
49
- </ToastProvider>
50
- </SessionProvider>
51
- </ThemeProvider>
52
- );
53
- }
54
-
55
- export default App;
56
-
57
-
58
-
59
- const PrivateRoutes = () => {
60
-
61
- // Modules principaux restructurés selon les standards ERP
62
- const primaryMenuItems: MenuItem[] = [
63
- {
64
- id: 'dashboard',
65
- label: 'Tableau de Bord',
66
- icon: <LayoutDashboard className="w-5 h-5" />,
67
- path: '/dashboard',
68
- ariaLabel: 'Accéder au tableau de bord principal'
69
- },
70
- {
71
- id: 'organizations',
72
- label: 'Organisations',
73
- icon: <Calculator className="w-5 h-5" />,
74
- badge: '3',
75
- ariaLabel: 'Accéder aux organisations'
76
- },
77
- {
78
- id: 'entities',
79
- label: 'Entités',
80
- icon: <Calculator className="w-5 h-5" />,
81
- badge: '3',
82
- ariaLabel: 'Accéder aux entités'
83
- },
84
-
85
- ];
86
-
87
- // Sous-menus restructurés et enrichis
88
- const secondaryMenuItems: Record<string, MenuItem[]> = {
89
- dashboard: [
90
- { id: 'global-view', label: 'Vue Globale', path: '/dashboard', icon: <Eye className="w-4 h-4" /> },
91
- { id: 'executive-view', label: 'Vue Executive', path: '/executive', icon: <TrendingUp className="w-4 h-4" /> },
92
- { id: 'kpis', label: 'KPIs Temps Réel', path: '/dashboard/kpis', icon: <Activity className="w-4 h-4" /> },
93
- { id: 'alerts', label: 'Alertes', path: '/dashboard/alerts', icon: <AlertTriangle className="w-4 h-4" />, badge: '5' },
94
- { id: 'ai-insights', label: 'IA Insights', path: '/dashboard/ai-insights', icon: <Bot className="w-4 h-4" /> },
95
- { id: 'workflows', label: 'Workflows', path: '/dashboard/workflows', icon: <Workflow className="w-4 h-4" /> }
96
- ],
97
- organizations: [
98
- { id: 'new_organizations', label: 'Nouvelles Organisations', path: '/organizations/new', icon: <FileText className="w-4 h-4" />, badge: '3' },
99
- { id: 'list_organizations', label: 'Liste des Organisations', path: '/organizations/', icon: <BookOpen className="w-4 h-4" /> },
100
-
101
- ],
102
- entities: [
103
- { id: 'crm-clients', label: 'Clients', path: '/tiers/clients', icon: <UserCheck className="w-4 h-4" /> },
104
- { id: 'suppliers', label: 'Fournisseurs', path: '/tiers/fournisseurs', icon: <Briefcase className="w-4 h-4" /> },
105
- { id: 'recouvrement', label: 'Recouvrement', path: '/tiers/recouvrement', icon: <Receipt className="w-4 h-4" /> },
106
- { id: 'global-lettrage', label: 'Lettrage Global', path: '/tiers/lettrage', icon: <RefreshCw className="w-4 h-4" /> },
107
- { id: 'contacts', label: 'Contacts', path: '/tiers/contacts', icon: <Users className="w-4 h-4" /> }
108
- ],
109
-
110
- };
111
-
112
-
113
-
114
-
115
- return (
116
- <RewiseLayout module_name='Rewise' primaryMenuItems={primaryMenuItems} secondaryMenuItems={secondaryMenuItems} >
117
- {/* <Route element={<ModernDoubleSidebarLayout />} > */}
118
- <Routes>
119
- <Route path='dashboard' element={<Dashboard />} />
120
- <Route path='analytics' element={<Analytics />} />
121
- <Route path='team' element={<Team />} />
122
- <Route path='profile' element={<Profile />} />
123
- <Route path='settings' element={<Settings />} />
124
-
125
- <Route path='organizations/new' element={<CreateOrganization />} />
126
- <Route path='organizations/:id' element={<DetailOrganizations />} />
127
- <Route path='organizations' element={<ListOrganizations />} />
128
-
129
-
130
- <Route path='entities/:id' element={<DetailEntity />} />
131
- <Route path='pricing/cart' element={<CartPlan />} />
132
-
133
- <Route path='calendar' element={<div><h1 className="text-2xl font-bold">Calendrier</h1><p>Planning et événements</p></div>} />
134
- <Route path='reports' element={<div><h1 className="text-2xl font-bold">Rapports</h1><p>Rapports et statistiques</p></div>} />
135
- <Route path='help' element={<div><h1 className="text-2xl font-bold">Aide</h1><p>Documentation et support</p></div>} />
136
-
137
- </Routes>
138
-
139
- </RewiseLayout>
140
- );
141
- }
142
-
143
-
144
- const AuthRoutes = () => {
145
-
146
- return <Routes>
147
-
148
- <Route path='login' element={<Login />} />
149
- <Route path='register' element={<Register />} />
150
-
151
-
152
- {/* <Route path='send-mail' element={<SendMail />} />
153
- <Route path='change-password/:token' element={<ChangePassword />} /> */}
154
-
155
- </Routes>;
156
- }
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
-
3
- interface PrimaryButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- loading?: boolean;
5
- children?: React.ReactNode;
6
- classname?: string;
7
- }
8
-
9
- const PrimaryButton: React.FC<PrimaryButtonProps> = ({
10
- loading = false,
11
- children,
12
- classname = '',
13
- ...props
14
- }) => (
15
- <button
16
- type="submit"
17
- disabled={loading || props.disabled}
18
- className={`px-4 py-2 text-sm bg-[#6A8A82] text-white rounded-lg hover:bg-[#5A7A72] transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname}`}
19
- {...props}
20
- >
21
- {loading ? "Connexion en cours..." : children}
22
- </button>
23
- );
24
- export const SecondaryButton: React.FC<PrimaryButtonProps> = ({
25
- loading = false,
26
- children,
27
- ...props
28
- }) => (
29
- <button
30
- type="button"
31
- disabled={loading || props.disabled}
32
- className="px-4 py-2 bg-[#B87333] text-white rounded-lg hover:bg-[#A66B2A] transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center"
33
- {...props}
34
- >
35
- {loading ? "Connexion en cours..." : children}
36
- </button>
37
- );
38
-
39
- export default PrimaryButton;
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import { Building2, Mail, Phone, MapPin, Calendar, UserIcon } from "lucide-react";
3
-
4
-
5
-
6
- export const RewiseBasicCard: React.FC<{ title: React.ReactNode, children?: React.ReactNode }> = ({ title ,children }) => (
7
- <div className="bg-white rounded-lg ">
8
- <div className="px-6 py-2 border-b border-gray-200">
9
- <div className="flex items-center space-x-4">
10
- {title}
11
- </div>
12
- </div>
13
-
14
- <div className="p-3">
15
- { children }
16
- </div>
17
- </div>
18
- );