@pepperi-addons/ngx-lib-react 0.5.2 → 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 +13 -30
- package/elements/main.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -3
- package/package.json +1 -1
- package/services.d.ts +60 -1
- package/services.js +172 -1
package/README.md
CHANGED
|
@@ -126,37 +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
|
-
## ⚠️ Angular Services NOT
|
|
129
|
+
## ⚠️ Angular Services NOT Exported Directly
|
|
130
130
|
|
|
131
|
-
|
|
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
|
-
|
|
134
|
-
- **For HTTP**: Use the HTTP helper functions below
|
|
135
|
-
- **For UI**: Use the custom element components (PepDialog, PepSnackBar, etc.)
|
|
136
|
-
- **For utilities**: Use standard JavaScript libraries (uuid, validator, js-cookie, etc.)
|
|
135
|
+
Instead you should use:
|
|
137
136
|
|
|
138
|
-
|
|
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.
|
|
139
143
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```tsx
|
|
143
|
-
import {
|
|
144
|
-
pepHttpGet,
|
|
145
|
-
pepHttpPost,
|
|
146
|
-
addBearerToken
|
|
147
|
-
} from '@pepperi-addons/ngx-lib-react';
|
|
148
|
-
|
|
149
|
-
// Simple GET request
|
|
150
|
-
const data = await pepHttpGet('https://api.example.com/data');
|
|
151
|
-
|
|
152
|
-
// POST with body
|
|
153
|
-
const result = await pepHttpPost('https://api.example.com/users', {
|
|
154
|
-
name: 'John Doe'
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
// With authentication
|
|
158
|
-
const options = addBearerToken('your-token');
|
|
159
|
-
const secureData = await pepHttpGet('https://api.example.com/secure', options);
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
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.
|