@pepperi-addons/ngx-lib-react 0.5.1 → 0.5.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.
package/README.md CHANGED
@@ -126,50 +126,20 @@ Notes:
126
126
  - Events are bridged from the custom element `CustomEvent` to React callbacks.
127
127
  - Ensure `.pepperi-theme` is applied at app level so Angular Material overlays are themed.
128
128
 
129
- ## Using Services
129
+ ## ⚠️ Angular Services NOT Exported Directly
130
130
 
131
- The package also exports all Angular services for utility functions:
131
+ Angular service **classes** (e.g. `PepHttpService`, `PepSessionService`,
132
+ `PepCustomizationService`) are not exported from this package, to avoid pulling
133
+ Angular and its DI runtime into your React bundle.
132
134
 
133
- ```tsx
134
- import {
135
- PepUtilitiesService,
136
- PepColorService,
137
- PepFileService,
138
- PepValidatorService,
139
- PepDataConvertorService
140
- } from '@pepperi-addons/ngx-lib-react';
141
-
142
- // Example: Generate UUID
143
- const utilitiesService = new PepUtilitiesService();
144
- const uuid = utilitiesService.generateUUID();
145
-
146
- // Example: Validate email
147
- const validatorService = new PepValidatorService();
148
- const isValid = validatorService.isValidEmail('test@example.com');
149
- ```
150
-
151
- ## HTTP Helper Functions
135
+ Instead you should use:
152
136
 
153
- For making HTTP requests without Angular dependencies:
154
-
155
- ```tsx
156
- import {
157
- pepHttpGet,
158
- pepHttpPost,
159
- addBearerToken
160
- } from '@pepperi-addons/ngx-lib-react';
161
-
162
- // Simple GET request
163
- const data = await pepHttpGet('https://api.example.com/data');
164
-
165
- // POST with body
166
- const result = await pepHttpPost('https://api.example.com/users', {
167
- name: 'John Doe'
168
- });
169
-
170
- // With authentication
171
- const options = addBearerToken('your-token');
172
- const secureData = await pepHttpGet('https://api.example.com/secure', options);
173
- ```
137
+ - **HTTP helper functions** (no Angular runtime).
138
+ - **Bridge-based helpers** that call selected Angular services via the
139
+ Elements bundle at runtime (see `SERVICES.md` for full details).
140
+ - **Custom element components** (PepDialog, PepSnackBar, etc.) for UI.
141
+ - Standard JavaScript libraries (uuid, validator, js-cookie, etc.) for
142
+ general utilities.
174
143
 
175
- See [SERVICES.md](./SERVICES.md) for complete documentation on available services and usage examples.
144
+ See [SERVICES.md](./SERVICES.md) for complete documentation on available
145
+ service helpers (HTTP/session/customization) and usage examples.