ptechcore_ui 1.0.6 → 1.0.9

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/dist/index.d.cts CHANGED
@@ -86,6 +86,38 @@ declare const RewiseLayout: React.FC<PrivateLayoutProps>;
86
86
 
87
87
  declare const ToastContainer: React.FC;
88
88
 
89
+ interface Entity {
90
+ id: number;
91
+ organization: number;
92
+ legal_name: string;
93
+ trading_name?: string;
94
+ phone?: string;
95
+ email?: string;
96
+ logo?: string;
97
+ legal_representative_name?: string;
98
+ legal_representative_phone?: string;
99
+ legal_representative_email?: string;
100
+ country?: string;
101
+ city?: string;
102
+ address?: string;
103
+ rib?: string;
104
+ iban?: string;
105
+ bank_name?: string;
106
+ bank_address?: string;
107
+ tax_account?: string;
108
+ rccm?: string;
109
+ currency?: string;
110
+ centers_taxes?: string;
111
+ point_of_sale?: string;
112
+ establishment?: string;
113
+ fne_url?: string;
114
+ fne_auth_key?: string;
115
+ regime_taxes?: string;
116
+ balance_sticker_fne?: number;
117
+ permissions?: number[];
118
+ user_permissions?: string[];
119
+ }
120
+
89
121
  interface User {
90
122
  id: number;
91
123
  last_login: string | null;
@@ -102,15 +134,14 @@ interface User {
102
134
  phonenumber: string | null;
103
135
  groups: any[];
104
136
  user_permissions: any[];
105
- centers_access?: Array<{
106
- id: number;
107
- permissions?: number[];
108
- }>;
137
+ centers_access?: Entity[];
109
138
  }
110
139
 
111
140
  interface SessionContextType {
112
141
  isAuthenticated: boolean;
113
142
  token: string | null;
143
+ activeBusinessEntity: Entity | null;
144
+ setActiveBusinessEntity: (entity: Entity | null) => void;
114
145
  loggedUser: User | null;
115
146
  login: (token: string) => void;
116
147
  logout: () => void;
@@ -151,13 +182,7 @@ interface PagesProps {
151
182
  description?: string;
152
183
  sideAction?: React.ReactNode;
153
184
  sidebar?: React.ReactNode;
154
- tabs?: Array<{
155
- id: string;
156
- label: string;
157
- icon: React.ComponentType<{
158
- className?: string;
159
- }>;
160
- }>;
185
+ tabs: React.ReactNode;
161
186
  children?: React.ReactNode;
162
187
  }
163
188
  declare const Pages: React.FC<PagesProps>;
@@ -169,7 +194,37 @@ declare const UserServices: {
169
194
  updateUser: (id: number, data: Partial<User>, token: string) => Promise<unknown>;
170
195
  deleteUser: (id: number, token: string) => Promise<unknown>;
171
196
  getEntityUsers: (entityId: number, token: string) => Promise<unknown>;
197
+ getuserEntitiesAccess: (id: number, token: string) => Promise<unknown>;
172
198
  addUserToEntity: (entityId: number, userId: number, token: string) => Promise<unknown>;
173
199
  };
174
200
 
175
- export { DateInput, FileInput, InputField, type MenuItem, Modal, NumberInput, Pages, PrimaryButton, RewiseLayout, SecondaryButton, SelectInput, SessionProvider, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useSession, useToast };
201
+ type FDrawerColumn = {
202
+ key: string;
203
+ label: string;
204
+ type: 'text' | 'number' | 'date' | 'boolean' | 'custom';
205
+ filterable?: boolean;
206
+ filter_options?: {
207
+ value: string;
208
+ label: string;
209
+ }[];
210
+ sortable?: boolean;
211
+ search_name: string;
212
+ formule?: (item: any) => any | null;
213
+ };
214
+ type FDrawerLineAction = {
215
+ label: string;
216
+ permission: string;
217
+ navigate?: string;
218
+ onclick?: (item: any) => any;
219
+ };
220
+ interface FDrawerProps {
221
+ children?: React.ReactNode;
222
+ apiEndpoint: string;
223
+ columns: FDrawerColumn[];
224
+ actions: FDrawerLineAction[];
225
+ ordering: string;
226
+ toggle?: boolean;
227
+ }
228
+ declare const FDrawer: React.FC<FDrawerProps>;
229
+
230
+ export { DateInput, FDrawer, FileInput, InputField, type MenuItem, Modal, NumberInput, Pages, PrimaryButton, RewiseLayout, SecondaryButton, SelectInput, SessionProvider, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useSession, useToast };
package/dist/index.d.ts CHANGED
@@ -86,6 +86,38 @@ declare const RewiseLayout: React.FC<PrivateLayoutProps>;
86
86
 
87
87
  declare const ToastContainer: React.FC;
88
88
 
89
+ interface Entity {
90
+ id: number;
91
+ organization: number;
92
+ legal_name: string;
93
+ trading_name?: string;
94
+ phone?: string;
95
+ email?: string;
96
+ logo?: string;
97
+ legal_representative_name?: string;
98
+ legal_representative_phone?: string;
99
+ legal_representative_email?: string;
100
+ country?: string;
101
+ city?: string;
102
+ address?: string;
103
+ rib?: string;
104
+ iban?: string;
105
+ bank_name?: string;
106
+ bank_address?: string;
107
+ tax_account?: string;
108
+ rccm?: string;
109
+ currency?: string;
110
+ centers_taxes?: string;
111
+ point_of_sale?: string;
112
+ establishment?: string;
113
+ fne_url?: string;
114
+ fne_auth_key?: string;
115
+ regime_taxes?: string;
116
+ balance_sticker_fne?: number;
117
+ permissions?: number[];
118
+ user_permissions?: string[];
119
+ }
120
+
89
121
  interface User {
90
122
  id: number;
91
123
  last_login: string | null;
@@ -102,15 +134,14 @@ interface User {
102
134
  phonenumber: string | null;
103
135
  groups: any[];
104
136
  user_permissions: any[];
105
- centers_access?: Array<{
106
- id: number;
107
- permissions?: number[];
108
- }>;
137
+ centers_access?: Entity[];
109
138
  }
110
139
 
111
140
  interface SessionContextType {
112
141
  isAuthenticated: boolean;
113
142
  token: string | null;
143
+ activeBusinessEntity: Entity | null;
144
+ setActiveBusinessEntity: (entity: Entity | null) => void;
114
145
  loggedUser: User | null;
115
146
  login: (token: string) => void;
116
147
  logout: () => void;
@@ -151,13 +182,7 @@ interface PagesProps {
151
182
  description?: string;
152
183
  sideAction?: React.ReactNode;
153
184
  sidebar?: React.ReactNode;
154
- tabs?: Array<{
155
- id: string;
156
- label: string;
157
- icon: React.ComponentType<{
158
- className?: string;
159
- }>;
160
- }>;
185
+ tabs: React.ReactNode;
161
186
  children?: React.ReactNode;
162
187
  }
163
188
  declare const Pages: React.FC<PagesProps>;
@@ -169,7 +194,37 @@ declare const UserServices: {
169
194
  updateUser: (id: number, data: Partial<User>, token: string) => Promise<unknown>;
170
195
  deleteUser: (id: number, token: string) => Promise<unknown>;
171
196
  getEntityUsers: (entityId: number, token: string) => Promise<unknown>;
197
+ getuserEntitiesAccess: (id: number, token: string) => Promise<unknown>;
172
198
  addUserToEntity: (entityId: number, userId: number, token: string) => Promise<unknown>;
173
199
  };
174
200
 
175
- export { DateInput, FileInput, InputField, type MenuItem, Modal, NumberInput, Pages, PrimaryButton, RewiseLayout, SecondaryButton, SelectInput, SessionProvider, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useSession, useToast };
201
+ type FDrawerColumn = {
202
+ key: string;
203
+ label: string;
204
+ type: 'text' | 'number' | 'date' | 'boolean' | 'custom';
205
+ filterable?: boolean;
206
+ filter_options?: {
207
+ value: string;
208
+ label: string;
209
+ }[];
210
+ sortable?: boolean;
211
+ search_name: string;
212
+ formule?: (item: any) => any | null;
213
+ };
214
+ type FDrawerLineAction = {
215
+ label: string;
216
+ permission: string;
217
+ navigate?: string;
218
+ onclick?: (item: any) => any;
219
+ };
220
+ interface FDrawerProps {
221
+ children?: React.ReactNode;
222
+ apiEndpoint: string;
223
+ columns: FDrawerColumn[];
224
+ actions: FDrawerLineAction[];
225
+ ordering: string;
226
+ toggle?: boolean;
227
+ }
228
+ declare const FDrawer: React.FC<FDrawerProps>;
229
+
230
+ export { DateInput, FDrawer, FileInput, InputField, type MenuItem, Modal, NumberInput, Pages, PrimaryButton, RewiseLayout, SecondaryButton, SelectInput, SessionProvider, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useSession, useToast };