@pepperi-addons/ngx-composite-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 +49 -2
- package/elements/main.js +1 -1
- package/i18n/de.ngx-composite-lib.json +2 -0
- package/i18n/en.ngx-composite-lib.json +181 -0
- package/i18n/es.ngx-composite-lib.json +2 -0
- package/i18n/fr.ngx-composite-lib.json +2 -0
- package/i18n/he.ngx-composite-lib.json +2 -0
- package/i18n/hu.ngx-composite-lib.json +2 -0
- package/i18n/it.ngx-composite-lib.json +2 -0
- package/i18n/ja.ngx-composite-lib.json +2 -0
- package/i18n/nl.ngx-composite-lib.json +2 -0
- package/i18n/pl.ngx-composite-lib.json +2 -0
- package/i18n/pt.ngx-composite-lib.json +2 -0
- package/i18n/ru.ngx-composite-lib.json +2 -0
- package/i18n/zh.ngx-composite-lib.json +2 -0
- package/i18n/zh.ngx-lib.json +2 -0
- package/package.json +3 -2
- package/pep-generic-list.d.ts +4 -0
- package/pep-generic-list.js +15 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
React wrappers for Pepperi ngx-composite-lib Angular Elements.
|
|
4
4
|
|
|
5
|
-
## Version 0.5.
|
|
5
|
+
## Version 0.5.2
|
|
6
6
|
|
|
7
7
|
This package provides React wrappers for **15 fully converted Angular Elements** from ngx-composite-lib.
|
|
8
8
|
|
|
@@ -59,7 +59,9 @@ npm install @pepperi-addons/ngx-composite-lib-react
|
|
|
59
59
|
|
|
60
60
|
## Setup
|
|
61
61
|
|
|
62
|
-
Include
|
|
62
|
+
### 1. Include Angular Elements Bundle
|
|
63
|
+
|
|
64
|
+
Add to your HTML:
|
|
63
65
|
|
|
64
66
|
```html
|
|
65
67
|
<!-- CSS -->
|
|
@@ -71,6 +73,51 @@ Include the Angular Elements bundle in your HTML:
|
|
|
71
73
|
<script src="/node_modules/@pepperi-addons/ngx-composite-lib-react/elements/main.js" type="module"></script>
|
|
72
74
|
```
|
|
73
75
|
|
|
76
|
+
### 2. Load Translations (Required)
|
|
77
|
+
|
|
78
|
+
The components use `@ngx-translate` for internationalization. You must load the translation files:
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
// In your Angular app (if using Angular)
|
|
82
|
+
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
83
|
+
import { HttpClient } from '@angular/common/http';
|
|
84
|
+
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
85
|
+
|
|
86
|
+
export function HttpLoaderFactory(http: HttpClient) {
|
|
87
|
+
return new TranslateHttpLoader(
|
|
88
|
+
http,
|
|
89
|
+
'/node_modules/@pepperi-addons/ngx-composite-lib-react/i18n/',
|
|
90
|
+
'.ngx-composite-lib.json'
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// In your module
|
|
95
|
+
TranslateModule.forRoot({
|
|
96
|
+
loader: {
|
|
97
|
+
provide: TranslateLoader,
|
|
98
|
+
useFactory: HttpLoaderFactory,
|
|
99
|
+
deps: [HttpClient]
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Available Languages:**
|
|
105
|
+
- English (en)
|
|
106
|
+
- German (de)
|
|
107
|
+
- Spanish (es)
|
|
108
|
+
- French (fr)
|
|
109
|
+
- Hebrew (he)
|
|
110
|
+
- Hungarian (hu)
|
|
111
|
+
- Italian (it)
|
|
112
|
+
- Japanese (ja)
|
|
113
|
+
- Dutch (nl)
|
|
114
|
+
- Polish (pl)
|
|
115
|
+
- Portuguese (pt)
|
|
116
|
+
- Russian (ru)
|
|
117
|
+
- Chinese (zh)
|
|
118
|
+
|
|
119
|
+
Translation files are located at: `/node_modules/@pepperi-addons/ngx-composite-lib-react/i18n/`
|
|
120
|
+
|
|
74
121
|
## Usage Examples
|
|
75
122
|
|
|
76
123
|
### Basic Component
|