@pepperi-addons/ngx-composite-lib-react 0.5.0 → 0.5.2

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
@@ -1,10 +1,10 @@
1
1
  # @pepperi-addons/ngx-composite-lib-react
2
2
 
3
- Thin React wrappers for Pepperi ngx-composite-lib Angular Elements.
3
+ React wrappers for Pepperi ngx-composite-lib Angular Elements.
4
4
 
5
- ## Version 0.5.0
5
+ ## Version 0.5.2
6
6
 
7
- This package provides React wrappers for 10 fully converted Angular Elements from ngx-composite-lib:
7
+ This package provides React wrappers for **15 fully converted Angular Elements** from ngx-composite-lib.
8
8
 
9
9
  ## Available Components
10
10
 
@@ -20,59 +20,156 @@ import {
20
20
  PepShowIfBadge,
21
21
  PepGenericList,
22
22
  PepFileStatusPanel,
23
+ PepGenericForm,
24
+ PepDataViewBuilder,
25
+ PepManageParameters,
26
+ PepMappingParameters,
27
+ PepGenericFieldsBuilder,
23
28
  } from '@pepperi-addons/ngx-composite-lib-react';
24
29
  ```
25
30
 
26
31
  ## Component Details
27
32
 
28
- - **PepColorSettings** - Color picker and settings component
29
- - **PepGroupButtonsSettings** - Group button configuration component
30
- - **PepFlowPickerButton** - Flow selection button component
31
- - **PepIconPicker** - Icon selection component
32
- - **PepPaddingSettings** - Padding configuration component
33
- - **PepShadowSettings** - Shadow configuration component
34
- - **PepRichText** - Rich text editor with Quill integration
35
- - **PepShowIfBadge** - Conditional badge display component
36
- - **PepGenericList** - Advanced data list with filtering and actions
37
- - **PepFileStatusPanel** - File status display with snackbar support
33
+ ### Basic Components
34
+ - **PepColorSettings** - Color picker and settings
35
+ - **PepGroupButtonsSettings** - Button group configuration
36
+ - **PepFlowPickerButton** - Flow selection button
37
+ - **PepIconPicker** - Icon selection
38
+ - **PepPaddingSettings** - Padding/spacing configuration
39
+ - **PepShadowSettings** - Shadow effects configuration
40
+ - **PepShowIfBadge** - Conditional visibility badge
41
+
42
+ ### Content Components
43
+ - **PepRichText** - Rich text editor (Quill-based)
44
+ - **PepGenericList** - Advanced list with selection
45
+ - **PepFileStatusPanel** - File upload status display
46
+ - **PepGenericForm** - Dynamic form builder
47
+
48
+ ### Advanced Components
49
+ - **PepDataViewBuilder** - Data view configuration builder
50
+ - **PepManageParameters** - Parameter management interface
51
+ - **PepMappingParameters** - Parameter mapping interface
52
+ - **PepGenericFieldsBuilder** - Form fields builder with drag-drop
53
+
54
+ ## Installation
55
+
56
+ ```bash
57
+ npm install @pepperi-addons/ngx-composite-lib-react
58
+ ```
59
+
60
+ ## Setup
38
61
 
39
- ## Prerequisites
62
+ ### 1. Include Angular Elements Bundle
40
63
 
41
- Load the Elements bundle from `@pepperi-addons/ngx-composite-lib-elements` before using wrappers:
64
+ Add to your HTML:
42
65
 
43
66
  ```html
44
- <script src="path/to/elements/main.js"></script>
67
+ <!-- CSS -->
68
+ <link rel="stylesheet" href="/node_modules/@pepperi-addons/ngx-composite-lib-react/elements/styles.css" />
69
+
70
+ <!-- JavaScript (ES Modules) -->
71
+ <script src="/node_modules/@pepperi-addons/ngx-composite-lib-react/elements/runtime.js" type="module"></script>
72
+ <script src="/node_modules/@pepperi-addons/ngx-composite-lib-react/elements/polyfills.js" type="module"></script>
73
+ <script src="/node_modules/@pepperi-addons/ngx-composite-lib-react/elements/main.js" type="module"></script>
74
+ ```
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
+ })
45
102
  ```
46
103
 
47
- ## Usage Example
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
+
121
+ ## Usage Examples
122
+
123
+ ### Basic Component
48
124
 
49
125
  ```tsx
50
- import React from 'react';
51
- import { PepRichText, PepGenericList } from '@pepperi-addons/ngx-composite-lib-react';
126
+ import React, { useState } from 'react';
127
+ import { PepColorSettings } from '@pepperi-addons/ngx-composite-lib-react';
52
128
 
53
129
  function MyComponent() {
130
+ const [color, setColor] = useState('#FF5733');
131
+
132
+ return (
133
+ <PepColorSettings
134
+ value={color}
135
+ onValueChange={setColor}
136
+ />
137
+ );
138
+ }
139
+ ```
140
+
141
+ ### Advanced Components
142
+
143
+ ```tsx
144
+ import React, { useState } from 'react';
145
+ import {
146
+ PepGenericFieldsBuilder,
147
+ PepDataViewBuilder,
148
+ PepMappingParameters
149
+ } from '@pepperi-addons/ngx-composite-lib-react';
150
+
151
+ function FormBuilder() {
152
+ const [fields, setFields] = useState([]);
153
+
54
154
  return (
55
- <div>
56
- <PepRichText
57
- value="<p>Hello World</p>"
58
- onValueChange={(event) => console.log('Value changed:', event.detail)}
59
- />
60
- <PepGenericList
61
- dataSource={myData}
62
- onSelectionChanged={(event) => console.log('Selection:', event.detail)}
63
- />
64
- </div>
155
+ <PepGenericFieldsBuilder
156
+ builderTitle="Form Fields"
157
+ availableFields={availableFields}
158
+ fields={fields}
159
+ onFieldsChange={setFields}
160
+ />
65
161
  );
66
162
  }
67
163
  ```
68
164
 
69
165
  ## Features
70
166
 
71
- - ✅ Full Input/Output parity with Angular components
72
- - ✅ TypeScript support with proper type definitions
73
- - ✅ Event handling with React-friendly patterns
74
- - ✅ Consistent API across all components
75
- - ✅ Optimized for React 17+ and React 18+
167
+ - ✅ **15 Production-Ready Components** - All tested and working
168
+ - ✅ **Full TypeScript Support** - Complete type definitions
169
+ - ✅ **React-Friendly API** - Idiomatic React patterns
170
+ - ✅ **Event Handling** - Proper event propagation
171
+ - ✅ **React 17+ & 18+ Compatible** - Works with modern React
172
+ - ✅ **Comprehensive Documentation** - Full API reference included
76
173
 
77
174
  ## License
78
175
 
@@ -332,6 +332,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
332
332
  THE SOFTWARE.
333
333
 
334
334
 
335
+ node-fetch
336
+ MIT
337
+ The MIT License (MIT)
338
+
339
+ Copyright (c) 2016 David Frank
340
+
341
+ Permission is hereby granted, free of charge, to any person obtaining a copy
342
+ of this software and associated documentation files (the "Software"), to deal
343
+ in the Software without restriction, including without limitation the rights
344
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
345
+ copies of the Software, and to permit persons to whom the Software is
346
+ furnished to do so, subject to the following conditions:
347
+
348
+ The above copyright notice and this permission notice shall be included in all
349
+ copies or substantial portions of the Software.
350
+
351
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
352
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
353
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
354
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
355
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
356
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
357
+ SOFTWARE.
358
+
359
+
360
+
335
361
  quill
336
362
  BSD-3-Clause
337
363
  Copyright (c) 2014, Jason Chen