@ng-simplicity/forms-core 1.0.0 → 1.0.1

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,6 +1,10 @@
1
1
  # @ng-simplicity/forms-core
2
2
 
3
- The core engine package for **NG-Simplicity Forms**. This package manages form states, dynamic registry injection, component lifecycle bindings, and structural layout directives (Rows, Columns, Sections, Groups, Arrays).
3
+ The core engine package for **NG-Simplicity Forms**. This package manages form states, dynamic registry injection, component lifecycle bindings, and structural layout directives (Rows, Columns, Sections, Groups, Arrays). It enables you to construct highly dynamic, complex forms where control properties (such as visibility, enabled/disabled state, select options, and validation rules) reactively adapt in real-time based on the current values inside the form. The engine is highly customizable, allowing you to develop and add your own custom form controls to the registry to be used in the form rendering.
4
+
5
+ This core package is extended by styling integration packages that provide prebuilt themed form components:
6
+ - **[@ng-simplicity/forms-bootstrap](../forms-bootstrap/README.md)**: Dynamic forms pre-styled with Bootstrap form fields and layouts.
7
+ - **[@ng-simplicity/forms-material](../forms-material/README.md)**: Dynamic forms pre-styled with Angular Material inputs and controls.
4
8
 
5
9
  ---
6
10
 
@@ -96,40 +100,81 @@ export class CustomFancyInputComponent
96
100
  }
97
101
  ```
98
102
 
99
- ### 2. Register Your Component
103
+ ### 2. Register, Construct, and Set Form Config
104
+
105
+ To use the dynamic form in your application:
106
+ 1. Provide the `NgsFormsService` at the component level (so that each page/form gets its own isolated instance of the form service).
107
+ 2. Register your custom components with `NgsFormsComponentRegistryService`.
108
+ 3. Construct your layout configuration (`NgsFormsFormConfig`).
109
+ 4. Set the configuration on `NgsFormsService`.
110
+ 5. Include the `<ngs-form></ngs-form>` tag in your component template.
100
111
 
101
- Register it into the registry service:
112
+ Here is a complete setup:
102
113
 
103
114
  ```typescript
104
- import { Component } from '@angular/core';
105
- import { NgsFormsComponentRegistryService } from '@ng-simplicity/forms-core';
115
+ import { Component, OnInit, inject } from '@angular/core';
116
+ import { Validators } from '@angular/forms';
117
+ import {
118
+ NgsFormComponent,
119
+ NgsFormsComponentRegistryService,
120
+ NgsFormsService,
121
+ NgsFormsFormConfig,
122
+ NgsFormsFormGroupComponent
123
+ } from '@ng-simplicity/forms-core';
106
124
  import { CustomFancyInputComponent } from './custom-fancy-input.component';
107
125
 
108
126
  @Component({
109
127
  selector: 'app-root',
110
- template: '<ngs-form></ngs-form>'
128
+ standalone: true,
129
+ imports: [NgsFormComponent],
130
+ providers: [NgsFormsService],
131
+ template: `
132
+ <div class="form-container">
133
+ <h2>Profile Settings</h2>
134
+ <ngs-form></ngs-form>
135
+ <button (click)="onSubmit()">Submit</button>
136
+ </div>
137
+ `
111
138
  })
112
- export class AppComponent {
139
+ export class AppComponent implements OnInit {
140
+ private ngsFormsService = inject(NgsFormsService);
141
+
113
142
  constructor(registry: NgsFormsComponentRegistryService) {
143
+ // Register your custom components with the dynamic engine
114
144
  registry.register(CustomFancyInputComponent.key, CustomFancyInputComponent);
115
145
  }
116
- }
117
- ```
118
146
 
119
- ### 3. Add to Schema
147
+ ngOnInit() {
148
+ // Construct the schema configuration
149
+ const formConfig: NgsFormsFormConfig = {
150
+ inputUpdateDebounce: 100,
151
+ root: NgsFormsFormGroupComponent.create({ name: 'profileForm' }, [
152
+ CustomFancyInputComponent.create({
153
+ name: 'nickname',
154
+ label: 'Nickname',
155
+ placeholder: 'Enter cool nickname...',
156
+ customColor: 'purple',
157
+ validators: [Validators.required, Validators.minLength(3)],
158
+ errorMessageMap: {
159
+ required: 'Nickname is required.',
160
+ minlength: 'Nickname must be at least 3 characters.'
161
+ }
162
+ })
163
+ ])
164
+ };
120
165
 
121
- ```typescript
122
- const formConfig = {
123
- inputUpdateDebounce: 100,
124
- root: NgsFormsFormGroupComponent.create({ name: 'profileForm' }, [
125
- CustomFancyInputComponent.create({
126
- name: 'nickname',
127
- label: 'Nickname',
128
- placeholder: 'Enter cool nickname...',
129
- customColor: 'purple'
130
- })
131
- ])
132
- };
166
+ // Set the configuration to initialize the form control tree
167
+ this.ngsFormsService.setFormConfig(formConfig);
168
+ }
169
+
170
+ onSubmit() {
171
+ if (this.ngsFormsService.isValid) {
172
+ console.log('Form Submitted!', this.ngsFormsService.formValue);
173
+ } else {
174
+ this.ngsFormsService.setIsSubmitted(true); // Triggers error validation display
175
+ }
176
+ }
177
+ }
133
178
  ```
134
179
 
135
180
  ---
@@ -151,6 +196,200 @@ Each form control component that extends `NgsFormsFormItemWithVisibleAndValidato
151
196
 
152
197
  ---
153
198
 
199
+ ## Common Control Properties
200
+
201
+ Most controls and layout structures support a standard set of core properties that are managed by the dynamic forms engine. These properties allow passing either a static/basic value or an asynchronous stream (`Observable`):
202
+
203
+ 1. **Visibility**:
204
+ - `visible` (boolean): Controls whether the item is mounted in the DOM.
205
+ - `visible$` (`Observable<boolean>`): Stream version to dynamically show/hide components.
206
+ - *Note: Visibility is configured at the wrapper component layer (`NgsFormsFormItem`).*
207
+
208
+ 2. **Disabled Status**:
209
+ - `disabled` (boolean): Sets the initial disabled state of the form control.
210
+ - `disabled$` (`Observable<boolean>`): Stream to toggle disabled state.
211
+ - *Configured at the inner `config` level.*
212
+
213
+ 3. **Validators**:
214
+ - `validators` (`Array<ValidatorFn>`): Array of standard/custom Angular Validator functions.
215
+ - `validators$` (`Observable<Array<ValidatorFn>>`): Stream of validator functions to change validators dynamically.
216
+ - *Configured at the inner `config` level.*
217
+
218
+ 4. **Options** (Only for components with choice selection like `select` and `radio`):
219
+ - `options` (`Array<NgsFormsFormInputOption>`): Static array of choices `{ id: string | number, label: string, disabled?: boolean }`.
220
+ - `options$` (`Observable<Array<NgsFormsFormInputOption>>`): Stream to dynamically populate choices.
221
+ - *Configured at the inner `config` level.*
222
+
223
+ > [!TIP]
224
+ > By supplying **Observable** streams (such as `visible$`, `disabled$`, `validators$`, or `options$`), you can build highly dynamic and reactive forms. Because these observables can be piped directly from the form service's value change stream (`this.ngsFormsService.formValue$`), fields can dynamically enable/disable, appear/disappear, change options, or update validation rules in real-time based on user input in other fields.
225
+
226
+ ---
227
+
228
+ ## Core Layout & Structural Components
229
+
230
+ `@ng-simplicity/forms-core` provides all non-styling-specific components and layout containers. Here is the list of available core components and how to construct them:
231
+
232
+ ### 1. Form Group (`form-group`)
233
+ Creates a nested `FormGroup` control.
234
+ - **Component**: `NgsFormsFormGroupComponent`
235
+ - **Key**: `'form-group'`
236
+ - **Config Type**: `NgsFormsFormItemConfigBaseItemWithNameAndValidators`
237
+
238
+ ```typescript
239
+ import { NgsFormsFormGroupComponent } from '@ng-simplicity/forms-core';
240
+
241
+ const group = NgsFormsFormGroupComponent.create(
242
+ {
243
+ name: 'profileDetails',
244
+ disabled: false,
245
+ },
246
+ [
247
+ // Array of child NgsFormsFormItem<any> components
248
+ ]
249
+ );
250
+ ```
251
+
252
+ ### 2. Form Array Container (`form-array`)
253
+ Creates a dynamic `FormArray` containing a list of repeated controls/groups.
254
+ - **Component**: `NgsFormsFormArrayContainerComponent`
255
+ - **Key**: `'form-array'`
256
+ - **Config Type**: `NgsFormItemArrayConfig`
257
+
258
+ ```typescript
259
+ import { NgsFormsFormArrayContainerComponent } from '@ng-simplicity/forms-core';
260
+
261
+ const contactList = NgsFormsFormArrayContainerComponent.create({
262
+ name: 'contacts',
263
+ initialItemCount: 1, // Number of items shown initially
264
+ minItems: 1, // Minimum allowed items
265
+ maxItems: 5, // Maximum allowed items
266
+ containerClass: 'custom-array-class', // CSS class for array container
267
+ itemContainerClass: 'custom-array-item-class', // CSS class for each item container
268
+ items: [
269
+ // Template items to replicate (e.g. input-text controls followed by a form-array-remove-button)
270
+ ]
271
+ });
272
+ ```
273
+
274
+ ### 3. Form Array Add Item Button (`form-array-add-item`)
275
+ Button to dynamically append a new item into the parent FormArray.
276
+ - **Component**: `NgsFormsFormArrayAddItemComponent`
277
+ - **Key**: `'form-array-add-item'`
278
+ - **Config Type**: `NgsFormItemArrayAddItemConfig`
279
+
280
+ ```typescript
281
+ import { NgsFormsFormArrayAddItemComponent } from '@ng-simplicity/forms-core';
282
+
283
+ const addContactBtn = NgsFormsFormArrayAddItemComponent.create({
284
+ buttonText: 'Add Contact',
285
+ buttonClass: 'btn btn-success',
286
+ buttonIcon: 'plus-icon'
287
+ });
288
+ ```
289
+
290
+ ### 4. Form Array Remove Item Button (`form-array-remove-item`)
291
+ Button to dynamically remove the current item from the parent FormArray.
292
+ - **Component**: `NgsFormsFormArrayRemoveItemComponent`
293
+ - **Key**: `'form-array-remove-item'`
294
+ - **Config Type**: `NgsFormItemArrayRemoveItemConfig`
295
+
296
+ ```typescript
297
+ import { NgsFormsFormArrayRemoveItemComponent } from '@ng-simplicity/forms-core';
298
+
299
+ const removeContactBtn = NgsFormsFormArrayRemoveItemComponent.create({
300
+ buttonText: 'Delete',
301
+ buttonClass: 'btn btn-danger',
302
+ buttonIcon: 'trash-icon'
303
+ });
304
+ ```
305
+
306
+ ### 5. Section (`section`)
307
+ A visual layout grouping with a title and subtitle.
308
+ - **Component**: `NgsFormsFormSectionComponent`
309
+ - **Key**: `'section'`
310
+ - **Config Type**: `NgsFormsFormSectionConfig`
311
+
312
+ ```typescript
313
+ import { NgsFormsFormSectionComponent } from '@ng-simplicity/forms-core';
314
+
315
+ const personalSection = NgsFormsFormSectionComponent.create({
316
+ title: 'Personal Information',
317
+ titleClass: 'custom-title-class', // Optional, defaults to 'h3'
318
+ subtitle: 'Tell us a bit about yourself',
319
+ subtitleClass: 'custom-subtitle-class', // Optional, defaults to 'lead'
320
+ items: [
321
+ // Array of child NgsFormsFormItem<any> components
322
+ ]
323
+ });
324
+ ```
325
+
326
+ ### 6. Row Layout (`form-row`)
327
+ Arranges child elements in a flex grid row.
328
+ - **Component**: `NgsFormsRowComponent`
329
+ - **Key**: `'form-row'`
330
+ - **Config Type**: `NgsFormItemRowConfig`
331
+
332
+ ```typescript
333
+ import { NgsFormsRowComponent } from '@ng-simplicity/forms-core';
334
+
335
+ const flexRow = NgsFormsRowComponent.create({
336
+ containerClass: 'row g-3', // CSS class for row container
337
+ columnClass: 'col-md-6', // CSS class applied to ALL child columns (optional)
338
+ columnClasses: ['col-md-8', 'col-md-4'], // CSS classes applied to each column individually (optional)
339
+ items: [
340
+ // Array of child NgsFormsFormItem<any> components
341
+ ]
342
+ });
343
+ ```
344
+
345
+ ### 7. Column Layout (`column`)
346
+ Groups elements vertically inside a layout.
347
+ - **Component**: `NgsFormsColumnComponent`
348
+ - **Key**: `'column'`
349
+ - **Config Type**: `NgsFormsFormItemContainerConfigBase`
350
+
351
+ ```typescript
352
+ import { NgsFormsColumnComponent } from '@ng-simplicity/forms-core';
353
+
354
+ const layoutCol = NgsFormsColumnComponent.create({
355
+ items: [
356
+ // Array of child NgsFormsFormItem<any> components
357
+ ]
358
+ });
359
+ ```
360
+
361
+ ### 8. HTML Content (`content-html`)
362
+ Inserts static HTML blocks directly into the layout.
363
+ - **Component**: `NgsFormsHtmlContentComponent`
364
+ - **Key**: `'content-html'`
365
+ - **Config Type**: `NgsFormItemHtmlContentConfig`
366
+
367
+ ```typescript
368
+ import { NgsFormsHtmlContentComponent } from '@ng-simplicity/forms-core';
369
+
370
+ const disclaimerText = NgsFormsHtmlContentComponent.create({
371
+ html: '<p class="text-muted">By clicking register, you agree to our policies.</p>',
372
+ sanitize: true // Whether to run sanitizer on the html
373
+ });
374
+ ```
375
+
376
+ ### 9. Text Div (`text-div`)
377
+ Inserts a basic text div.
378
+ - **Component**: `NgsFormsTextDivComponent`
379
+ - **Key**: `'text-div'`
380
+ - **Config Type**: `NgsFormsTextDivConfig`
381
+
382
+ ```typescript
383
+ import { NgsFormsTextDivComponent } from '@ng-simplicity/forms-core';
384
+
385
+ const headerText = NgsFormsTextDivComponent.create({
386
+ text: 'Billing Details',
387
+ classes: 'fw-bold mb-2' // CSS class name for styling
388
+ });
389
+ ```
390
+
391
+ ---
392
+
154
393
  ## Extension Reference Guide
155
394
 
156
395
  When writing custom controls, select the appropriate base class and configuration interface to inherit from.
@@ -186,3 +425,17 @@ Ensure your custom configuration type extends one of these core interfaces for f
186
425
  ```bash
187
426
  nx test forms-core --codeCoverage
188
427
  ```
428
+
429
+ ---
430
+
431
+ ## Example Applications
432
+
433
+ Fully functional example applications demonstrating the form engine functionality are located in the [`apps/`](../../apps) folder of this monorepo:
434
+ - **`forms-bootstrap-demo`**: Integrates and showcases the `@ng-simplicity/forms-bootstrap` package.
435
+ - **`forms-material-demo`**: Integrates and showcases the `@ng-simplicity/forms-material` package.
436
+
437
+ ---
438
+
439
+ ## Support & Contributions
440
+
441
+ If you have feature suggestions, need a feature to make `@ng-simplicity/forms-core` work for your project, or encounter any bugs, please log an issue in the GitHub issue tracker.
@@ -4,7 +4,6 @@ import { Directive, InjectionToken, inject, Injectable, Injector, ViewContainerR
4
4
  import { v4 } from 'uuid';
5
5
  import { toSignal } from '@angular/core/rxjs-interop';
6
6
  import { UntypedFormGroup, FormControl, UntypedFormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
- import { defaults } from 'lodash';
8
7
  import { CommonModule } from '@angular/common';
9
8
 
10
9
  class NgsSubscriber {
@@ -42,6 +41,20 @@ const NgsFormsFormControlAddRemoveFunctions = {
42
41
  }),
43
42
  };
44
43
 
44
+ function ngsDefaults(target, ...sources) {
45
+ const result = target ? { ...target } : {};
46
+ for (const source of sources) {
47
+ if (!source)
48
+ continue;
49
+ for (const key of Object.keys(source)) {
50
+ if (result[key] === undefined) {
51
+ result[key] = source[key];
52
+ }
53
+ }
54
+ }
55
+ return result;
56
+ }
57
+
45
58
  class NgsFormsBaseClassFormComponent extends NgsSubscriber {
46
59
  static key;
47
60
  id = v4();
@@ -164,7 +177,7 @@ class NgsFormsInternalService {
164
177
  }
165
178
  mergeState(key, update) {
166
179
  const obj = this.state.value[key] || {};
167
- const updated = defaults(update, obj);
180
+ const updated = ngsDefaults(update, obj);
168
181
  this.state.value[key] = updated;
169
182
  this.state.next(this.state.value);
170
183
  }
@@ -176,7 +189,7 @@ class NgsFormsInternalService {
176
189
  }
177
190
  subscribeToState(fieldName) {
178
191
  let last = '';
179
- return this.state.pipe(map((allState) => defaults(allState[fieldName], allState['global'])), filter((currentState) => {
192
+ return this.state.pipe(map((allState) => ngsDefaults(allState[fieldName], allState['global'])), filter((currentState) => {
180
193
  const stringifiedState = JSON.stringify(currentState);
181
194
  const isUpdated = stringifiedState !== last;
182
195
  last = stringifiedState;
@@ -510,11 +523,11 @@ class NgsFormsFormArrayAddItemComponent extends NgsFormsBaseClassFormComponent {
510
523
  this.internalArrayService.addItem();
511
524
  }
512
525
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsFormArrayAddItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
513
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsFormArrayAddItemComponent, isStandalone: true, selector: "ngs-forms-form-array-add-item", usesInheritance: true, ngImport: i0, template: "<button\n (click)=\"addItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-primary'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\"></i>\n }\n {{ config.buttonText || 'Add Item' }}\n</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
526
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsFormArrayAddItemComponent, isStandalone: true, selector: "ngs-forms-form-array-add-item", usesInheritance: true, ngImport: i0, template: "<button\n (click)=\"addItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-primary'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\" aria-hidden=\"true\"></i>\n }\n {{ config.buttonText || 'Add Item' }}\n</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
514
527
  }
515
528
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsFormArrayAddItemComponent, decorators: [{
516
529
  type: Component,
517
- args: [{ selector: 'ngs-forms-form-array-add-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"addItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-primary'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\"></i>\n }\n {{ config.buttonText || 'Add Item' }}\n</button>\n" }]
530
+ args: [{ selector: 'ngs-forms-form-array-add-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"addItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-primary'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\" aria-hidden=\"true\"></i>\n }\n {{ config.buttonText || 'Add Item' }}\n</button>\n" }]
518
531
  }] });
519
532
 
520
533
  class NgsFormsFormArrayContainerComponent extends NgsFormsFormItemWithVisibleAndValidatorsBase {
@@ -574,11 +587,11 @@ class NgsFormsFormArrayRemoveItemComponent extends NgsFormsBaseClassFormComponen
574
587
  this.internalArrayService.removeAt(this.myIndex);
575
588
  }
576
589
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsFormArrayRemoveItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
577
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsFormArrayRemoveItemComponent, isStandalone: true, selector: "ngs-forms-form-array-remove-item", usesInheritance: true, ngImport: i0, template: "<button\n (click)=\"removeItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-danger btn-sm'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\"></i>\n }\n {{ config.buttonText || 'Remove' }}\n index:{{ myIndex }}\n</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
590
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsFormArrayRemoveItemComponent, isStandalone: true, selector: "ngs-forms-form-array-remove-item", usesInheritance: true, ngImport: i0, template: "<button\n (click)=\"removeItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-danger btn-sm'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\" aria-hidden=\"true\"></i>\n }\n {{ config.buttonText || 'Remove' }}\n index:{{ myIndex }}\n</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
578
591
  }
579
592
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsFormArrayRemoveItemComponent, decorators: [{
580
593
  type: Component,
581
- args: [{ selector: 'ngs-forms-form-array-remove-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"removeItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-danger btn-sm'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\"></i>\n }\n {{ config.buttonText || 'Remove' }}\n index:{{ myIndex }}\n</button>\n" }]
594
+ args: [{ selector: 'ngs-forms-form-array-remove-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"removeItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-danger btn-sm'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\" aria-hidden=\"true\"></i>\n }\n {{ config.buttonText || 'Remove' }}\n index:{{ myIndex }}\n</button>\n" }]
582
595
  }], ctorParameters: () => [] });
583
596
 
584
597
  class NgsFormsTextDivComponent extends NgsFormsBaseClassFormComponent {
@@ -645,7 +658,7 @@ class NgsFormsFormSectionComponent extends NgsFormsBaseClassItemsContainerBase {
645
658
  };
646
659
  }
647
660
  ngOnInit() {
648
- this.config = defaults(this.config, sectionConfigDefaults);
661
+ this.config = ngsDefaults(this.config, sectionConfigDefaults);
649
662
  }
650
663
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsFormSectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
651
664
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsFormSectionComponent, isStandalone: true, selector: "ngs-forms-form-section", usesInheritance: true, ngImport: i0, template: "<div class=\"form-section\">\n <div class=\"form-section-title {{config.titleClass}}\">{{ config.title }}</div>\n @if (config.subtitle) {\n <div class=\"form-section-subtitle {{config.subtitleClass}}\">{{ config.subtitle }}</div>\n }\n @if (config.items.length) {\n <div class=\"form-section-items\">\n @for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgsFormsFormItemDirective, selector: "[ngs-form-item]", inputs: ["ngs-form-item", "ngs-form-group", "ngs-form-array", "ngs-form-index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -683,5 +696,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
683
696
  * Generated bundle index. Do not edit.
684
697
  */
685
698
 
686
- export { NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA, NGS_FORMS_ITEM_INDEX, NgsFormComponent, NgsFormsBaseClassFormComponent, NgsFormsBaseClassFormInputComponent, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsBaseClassItemsContainerBase, NgsFormsColumnComponent, NgsFormsComponentRegistryService, NgsFormsCoreModule, NgsFormsFormArrayAddItemComponent, NgsFormsFormArrayContainerComponent, NgsFormsFormArrayInternalService, NgsFormsFormArrayListComponent, NgsFormsFormArrayRemoveItemComponent, NgsFormsFormControlAddRemoveFunctions, NgsFormsFormGroupComponent, NgsFormsFormItemDirective, NgsFormsFormItemWithVisibleAndValidatorsBase, NgsFormsFormSectionComponent, NgsFormsHtmlContentComponent, NgsFormsInternalService, NgsFormsRowComponent, NgsFormsService, NgsFormsTextDivComponent, NgsSubscriber };
699
+ export { NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA, NGS_FORMS_ITEM_INDEX, NgsFormComponent, NgsFormsBaseClassFormComponent, NgsFormsBaseClassFormInputComponent, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsBaseClassItemsContainerBase, NgsFormsColumnComponent, NgsFormsComponentRegistryService, NgsFormsCoreModule, NgsFormsFormArrayAddItemComponent, NgsFormsFormArrayContainerComponent, NgsFormsFormArrayInternalService, NgsFormsFormArrayListComponent, NgsFormsFormArrayRemoveItemComponent, NgsFormsFormControlAddRemoveFunctions, NgsFormsFormGroupComponent, NgsFormsFormItemDirective, NgsFormsFormItemWithVisibleAndValidatorsBase, NgsFormsFormSectionComponent, NgsFormsHtmlContentComponent, NgsFormsInternalService, NgsFormsRowComponent, NgsFormsService, NgsFormsTextDivComponent, NgsSubscriber, ngsDefaults };
687
700
  //# sourceMappingURL=ng-simplicity-forms-core.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-simplicity-forms-core.mjs","sources":["../../../../libs/forms-core/src/classes/base/subscriber.class.ts","../../../../libs/forms-core/src/misc/injection-tokens.constants.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component.class.ts","../../../../libs/forms-core/src/services/form-component-registry/form-component-registry.service.ts","../../../../libs/forms-core/src/services/forms/forms.service.ts","../../../../libs/forms-core/src/services/internal/internal-forms.service.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-item-with-visible-and-validators-base.class.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-input.class.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-items-container.class.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-input-with-options-base.class.ts","../../../../libs/forms-core/src/controllers/form-item/form-item.controller.ts","../../../../libs/forms-core/src/components/core/form-item/form-item.component.ts","../../../../libs/forms-core/src/components/core/form/form.component.ts","../../../../libs/forms-core/src/components/core/form/form.component.html","../../../../libs/forms-core/src/components/shared-form-components/column/form-column.component.ts","../../../../libs/forms-core/src/components/shared-form-components/column/form-column.component.html","../../../../libs/forms-core/src/models/item-config-bases/form-item-config-base.model.ts","../../../../libs/forms-core/src/components/shared-form-components/row/form-row.component.ts","../../../../libs/forms-core/src/components/shared-form-components/row/form-row.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-group/form-group.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-group/form-group.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/service/form-array-internal.service.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/add-item/form-array-add-item.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/add-item/form-array-add-item.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/container/form-array.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/container/form-array.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/list/form-array-list.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/list/form-array-list.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/remove-item/form-array-remove-item.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/remove-item/form-array-remove-item.component.html","../../../../libs/forms-core/src/components/shared-form-components/text-div/text-div.component.ts","../../../../libs/forms-core/src/components/shared-form-components/text-div/text-div.component.html","../../../../libs/forms-core/src/components/shared-form-components/html-content/html-content.component.ts","../../../../libs/forms-core/src/components/shared-form-components/html-content/html-content.component.html","../../../../libs/forms-core/src/components/shared-form-components/section/section-config.interface.ts","../../../../libs/forms-core/src/components/shared-form-components/section/section.component.ts","../../../../libs/forms-core/src/components/shared-form-components/section/section.component.html","../../../../libs/forms-core/src/forms-core.module.ts","../../../../libs/forms-core/src/ng-simplicity-forms-core.ts"],"sourcesContent":["import { Observable, Subject, Subscription, takeUntil } from 'rxjs';\nimport { Directive } from '@angular/core';\n\n@Directive() // No-op, just for Angular compiler\nexport abstract class NgsSubscriber {\n protected readonly destroy$ = new Subject<void>();\n\n protected subscriptions: Subscription[] = [];\n\n subscribe<T>(subscribeTo: Observable<T>, nextObserver: (value: T) => void): void {\n subscribeTo.pipe(takeUntil(this.destroy$)).subscribe(nextObserver);\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.subscriptions.forEach((subscriber) => subscriber.unsubscribe());\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { AbstractControl, UntypedFormArray, UntypedFormGroup } from '@angular/forms';\n\nexport const NGS_FORMS_ITEM_DATA = new InjectionToken('ngs-forms-item-data');\nexport const NGS_FORMS_CONTROL_ADD_REMOVE_FN = new InjectionToken('ngs-form-control-remove-fn');\nexport const NGS_FORMS_ITEM_INDEX = new InjectionToken('ngs-forms-item-index');\n\ntype FormControlAddRemoveFn = (control: AbstractControl, controlName: string) => void;\n\nexport interface INgsFormsFormControlAddRemove {\n add: FormControlAddRemoveFn;\n remove: FormControlAddRemoveFn;\n}\ninterface IControlAddRemoveFunctionsBuilder {\n formGroup: (formGroup: UntypedFormGroup) => INgsFormsFormControlAddRemove;\n formArray: (formArray: UntypedFormArray) => INgsFormsFormControlAddRemove;\n}\nexport const NgsFormsFormControlAddRemoveFunctions: IControlAddRemoveFunctionsBuilder = {\n formGroup: (formGroup) => ({\n add: (control, controlName) => formGroup.addControl(controlName, control),\n remove: (control, controlName) => formGroup.removeControl(controlName),\n }),\n formArray: (formArray: UntypedFormArray) => ({\n add: (control, controlName) => formArray.controls.push(control),\n remove: (control, controlName) => {\n const index = formArray.controls.indexOf(control);\n formArray.controls.splice(index, 1);\n },\n }),\n};\n","import { Directive, inject, Injector } from '@angular/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { NgsSubscriber } from '../base/subscriber.class';\nimport { NGS_FORMS_ITEM_DATA } from '../../misc';\nimport { NgsFormsFormItem, NgsFormsFormItemConfigBase } from '../../models';\n\n@Directive({})\nexport abstract class NgsFormsBaseClassFormComponent<T extends NgsFormsFormItemConfigBase> extends NgsSubscriber {\n static key: string;\n id = uuidv4();\n protected config: T;\n protected readonly itemData: NgsFormsFormItem<T>;\n constructor() {\n super();\n this.itemData = inject<NgsFormsFormItem<T>>(NGS_FORMS_ITEM_DATA);\n this.config = this.itemData.config;\n }\n}\n","import { Injectable, Type } from '@angular/core';\n\n@Injectable({ providedIn: 'platform' })\nexport class NgsFormsComponentRegistryService {\n private readonly itemComponentRegistry: TItemComponentRegistry = {};\n getComponentTypeForKey(key: string): Type<unknown> | undefined {\n return this.itemComponentRegistry[key];\n }\n register(key: string, component: Type<unknown>): void {\n this.itemComponentRegistry[key] = component;\n }\n}\n\ntype TItemComponentRegistry = { [key: string]: Type<unknown> };\n","import { UntypedFormGroup } from '@angular/forms';\nimport { BehaviorSubject, Subject, Subscription } from 'rxjs';\nimport { NgsFormsFormConfig } from '../../models';\nimport { NgsFormsInternalService } from '../internal/internal-forms.service';\nimport { Injectable, OnDestroy } from '@angular/core';\n\n@Injectable()\nexport class NgsFormsService implements OnDestroy {\n attempt = 0;\n formValue$ = new BehaviorSubject<any>({});\n formValue: any = {};\n private internalFormService: NgsFormsInternalService | undefined;\n private formGroupSubscriptions: Array<Subscription> = [];\n private formGroup = new UntypedFormGroup({});\n\n get dirty(): boolean {\n return this.formGroup?.dirty ?? false;\n }\n get isValid(): boolean {\n if (!this.internalServiceIsSet) return false;\n return this.internalFormService!.checkIsValid();\n }\n get internalServiceIsSet(): boolean {\n return !!this.internalFormService;\n }\n\n setFormConfig(formConfig: NgsFormsFormConfig): void {\n if (!this.internalServiceIsSet) {\n if (this.attempt > 20) {\n console.error('Internal form service is unavailable. Is the ngs-form root tag added to the page?');\n return;\n }\n this.attempt++;\n setTimeout(() => this.setFormConfig(formConfig), 25);\n return;\n }\n this.internalFormService!.setFormData(formConfig);\n }\n\n setInternalService(internalFormsService: NgsFormsInternalService): void {\n this.internalFormService = internalFormsService;\n this.bindFormGroup();\n }\n\n setIsSubmitted(isSubmitted: boolean): void {\n if (!this.internalServiceIsSet) return;\n this.internalFormService!.setIsSubmitted(isSubmitted);\n }\n\n private bindFormGroup(): void {\n this.internalFormService!.formGroup$.subscribe((fg) => {\n this.formGroup = fg;\n this.formGroupSubscriptions.forEach((subscription) => subscription.unsubscribe());\n\n this.formGroupSubscriptions.push(\n this.formGroup.valueChanges.subscribe((v) => {\n this.formValue = v;\n this.formValue$.next(v);\n })\n );\n });\n }\n updateComponentState(componentKey: string, state: any): void {\n this.internalFormService?.updateComponentState(componentKey, state);\n }\n updateGlobalState(state: any): void {\n this.internalFormService?.updateGlobalState(state);\n }\n ngOnDestroy() {\n this.formGroupSubscriptions.forEach((subscription) => subscription.unsubscribe());\n }\n\n patchValue(entityData: any) {\n this.formGroup.patchValue(entityData);\n }\n}\n","import { BehaviorSubject, filter, map } from 'rxjs';\nimport { FormGroup, UntypedFormGroup } from '@angular/forms';\nimport { NgsFormsFormConfig } from '../../models';\nimport { Injectable } from '@angular/core';\nimport { NgsFormsGlobalFormState } from '../../models/global-state.interface';\nimport { defaults } from 'lodash';\n\n@Injectable()\nexport class NgsFormsInternalService {\n formGroup$ = new BehaviorSubject<FormGroup>(new UntypedFormGroup({}));\n formConfig$ = new BehaviorSubject<NgsFormsFormConfig | undefined>(undefined);\n isSubmitted$ = new BehaviorSubject<boolean>(false);\n state = new BehaviorSubject<{ [key: string]: any }>({});\n setIsSubmitted(isSubmitted: boolean): void {\n this.isSubmitted$.next(isSubmitted);\n }\n\n checkIsValid(): boolean {\n if (!this.formGroup$.value) return false;\n return this.formGroup$.value.valid;\n }\n\n setFormData(formConfig: NgsFormsFormConfig) {\n this.formGroup$.next(new UntypedFormGroup({}));\n this.formConfig$.next(formConfig);\n this.isSubmitted$.next(false);\n }\n private mergeState(key: string, update: any): void {\n const obj = this.state.value[key] || {};\n const updated = defaults(update, obj);\n this.state.value[key] = updated;\n this.state.next(this.state.value);\n }\n updateGlobalState(state: NgsFormsGlobalFormState) {\n this.mergeState('global', state);\n }\n updateComponentState(componentKey: string, state: any) {\n this.mergeState(componentKey, state);\n }\n\n subscribeToState(fieldName: string) {\n let last = '';\n return this.state.pipe(\n map((allState) => defaults(allState[fieldName], allState['global'])),\n filter((currentState) => {\n const stringifiedState = JSON.stringify(currentState);\n const isUpdated = stringifiedState !== last;\n last = stringifiedState;\n return isUpdated;\n })\n );\n }\n}\n","import { Directive, inject, OnDestroy, OnInit, Signal } from '@angular/core';\nimport { FormControl, UntypedFormControl, ValidatorFn } from '@angular/forms';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { INgsFormsFormControlAddRemove, NGS_FORMS_CONTROL_ADD_REMOVE_FN } from '../../misc';\nimport { NgsFormsInternalService } from '../../services';\nimport { NgsFormsFormItemConfigBaseItemWithNameAndValidators } from '../../models/item-config-bases/';\nimport { NgsFormsBaseClassFormComponent } from '../../classes/index';\n\n@Directive({})\nexport class NgsFormsFormItemWithVisibleAndValidatorsBase<T extends NgsFormsFormItemConfigBaseItemWithNameAndValidators> extends NgsFormsBaseClassFormComponent<T> implements OnInit, OnDestroy {\n control: UntypedFormControl | undefined;\n errorMessage = '';\n private formAddRemoveFns = inject<INgsFormsFormControlAddRemove>(NGS_FORMS_CONTROL_ADD_REMOVE_FN);\n private privateService = inject<NgsFormsInternalService>(NgsFormsInternalService);\n readonly submitted: Signal<boolean> = toSignal(this.privateService.isSubmitted$, { initialValue: false });\n\n ngOnInit() {\n this.control = new FormControl(undefined, { validators: [] });\n //this.bindVisible();\n this.bindValidators();\n //this.bindControlValidityChange();\n this.formAddRemoveFns.add(this.control, this.config.name);\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.formAddRemoveFns.remove(this.control!, this.config.name);\n }\n\n private bindValidators() {\n if (!this.config.validators && !this.config.validators$) return;\n if (this.config.validators) {\n this.control!.setValidators(this.config.validators);\n return;\n }\n if (this.config.validators$) {\n this.subscribe(this.config.validators$!, (validators: Array<ValidatorFn>) => this.control!.setValidators(validators));\n }\n }\n\n /*\n private bindVisible() {\n this.subscribe(this.parentVisibility$, (isVisible) => {\n if (this.isVisible === isVisible) return;\n this.isVisible = isVisible;\n if (isVisible) {\n this.formGroup.addControl(this.config.name, this.control);\n return;\n }\n this.formGroup.removeControl(this.config.name);\n });\n }\n */\n}\n\n","import { NgsFormsCommonComponentState, NgsFormsFormItemConfigBaseInput } from '../../models';\nimport { Directive, inject, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nimport { NgsFormsFormItemWithVisibleAndValidatorsBase } from './form-component-item-with-visible-and-validators-base.class';\nimport { NgsFormsInternalService, NgsFormsService } from '../../services';\n\n@Directive({}) // for compiler\nexport abstract class NgsFormsBaseClassFormInputComponent<T extends NgsFormsFormItemConfigBaseInput> extends NgsFormsFormItemWithVisibleAndValidatorsBase<T> {\n readonly myFormService = inject(NgsFormsService);\n private readonly internalService = inject(NgsFormsInternalService);\n\n readonly commonState: Signal<NgsFormsCommonComponentState> = toSignal(\n this.internalService.subscribeToState(this.config.name),\n { initialValue: {} as NgsFormsCommonComponentState }\n );\n\n toggleDisplayMode(setTo: 'summary' | 'input'){\n\n }\n}\n\n","import { NgsFormsFormItemContainerConfigBase } from '../../models';\n\nimport { NgsFormsBaseClassFormComponent } from './form-component.class';\nimport { Directive, OnDestroy } from '@angular/core';\n\n@Directive({}) // no op for compiler\nexport class NgsFormsBaseClassItemsContainerBase<T extends NgsFormsFormItemContainerConfigBase> extends NgsFormsBaseClassFormComponent<T> implements OnDestroy {}\n","import { Directive, Signal } from '@angular/core';\nimport { NgsFormsBaseClassFormInputComponent } from './form-component-input.class';\nimport { NgsFormsFormInputOption, NgsFormsFormItemConfigBaseInputWithOptions } from '../../models';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { of } from 'rxjs';\n\n@Directive()\nexport class NgsFormsBaseClassFormItemInputWithOptionsComponent<T extends NgsFormsFormItemConfigBaseInputWithOptions> extends NgsFormsBaseClassFormInputComponent<T> {\n options: Signal<Array<NgsFormsFormInputOption>> = toSignal(\n this.config.options$ ?? of(this.config.options ?? []),\n { initialValue: this.config.options ?? [] }\n );\n}\n\n","import { ComponentRef, Injector, Provider, ViewContainerRef } from '@angular/core';\nimport { NgsFormsFormItem } from '../../models';\nimport { NgsSubscriber } from '../../classes/base/subscriber.class';\nimport { INgsFormsFormControlAddRemove, NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA, NGS_FORMS_ITEM_INDEX } from '../../misc';\nimport { BehaviorSubject } from 'rxjs';\nimport { NgsFormsComponentRegistryService } from '../../services/form-component-registry/form-component-registry.service';\n\nexport class NgsFormItemController extends NgsSubscriber {\n private componentRef: ComponentRef<unknown> | undefined;\n private parentVisibility = new BehaviorSubject<boolean>(false);\n private lastVisible: boolean | undefined;\n\n constructor(\n private readonly injector: Injector,\n private readonly viewContainerRef: ViewContainerRef,\n private readonly itemData: NgsFormsFormItem<any>,\n private readonly addRemoveControlFn?: INgsFormsFormControlAddRemove,\n private readonly index?: number\n ) {\n super();\n this.bindVisibility();\n }\n\n destroy() {\n this.detach();\n super.ngOnDestroy();\n }\n\n private bindVisibility() {\n if (!this.itemData.visible$) {\n this.create();\n return;\n }\n this.subscribe(this.itemData.visible$, (visible) => {\n if (this.lastVisible === visible) return;\n\n this.lastVisible = visible;\n if (visible) {\n this.create();\n return;\n }\n this.detach();\n });\n }\n\n private create() {\n const providers: Provider[] = [{ provide: NGS_FORMS_ITEM_DATA, useValue: this.itemData }];\n if (this.index !== undefined) {\n providers.push({ provide: NGS_FORMS_ITEM_INDEX, useValue: this.index });\n }\n if (this.addRemoveControlFn) {\n providers.push({ provide: NGS_FORMS_CONTROL_ADD_REMOVE_FN, useValue: this.addRemoveControlFn });\n }\n const myInjector = Injector.create({\n parent: this.injector,\n providers,\n });\n const componentType = this.injector.get(NgsFormsComponentRegistryService).getComponentTypeForKey(this.itemData.type);\n if (!componentType) {\n console.error(`Ngs form component type ${this.itemData.type} not registered.`);\n return;\n }\n this.componentRef = this.viewContainerRef.createComponent(componentType, { injector: myInjector });\n this.parentVisibility.next(true);\n }\n\n private detach() {\n this.parentVisibility.next(false);\n this.componentRef?.destroy();\n }\n}\n","import { Directive, inject, Injector, Input, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';\nimport { UntypedFormArray, UntypedFormGroup } from '@angular/forms';\nimport { NgsFormItemController } from '../../../controllers';\nimport { INgsFormsFormControlAddRemove, NgsFormsFormControlAddRemoveFunctions } from '../../../misc';\nimport { NgsFormsComponentRegistryService } from '../../../services/form-component-registry/form-component-registry.service';\nimport { NgsFormsFormItem } from '../../../models';\n\n@Directive({\n selector: '[ngs-form-item]',\n //templateUrl: \"./form-item.component.html\",\n})\n\nexport class NgsFormsFormItemDirective implements OnInit, OnDestroy {\n @Input('ngs-form-item')\n itemData: NgsFormsFormItem<any> | undefined = undefined;\n\n @Input('ngs-form-group')\n formGroup?: UntypedFormGroup;\n\n @Input('ngs-form-array')\n formArray?: UntypedFormArray;\n\n @Input('ngs-form-index')\n index?: number;\n\n controller: NgsFormItemController | undefined;\n\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n\n private readonly formComponentRegistryService = inject(NgsFormsComponentRegistryService);\n\n ngOnInit(): void {\n if (!this.itemData) {\n return console.error('Form item without form data');\n }\n let addRemoveFn: INgsFormsFormControlAddRemove | undefined = undefined;\n if (this.formArray) {\n addRemoveFn = NgsFormsFormControlAddRemoveFunctions.formArray(this.formArray);\n }\n if (this.formGroup) {\n addRemoveFn = NgsFormsFormControlAddRemoveFunctions.formGroup(this.formGroup);\n }\n this.controller = new NgsFormItemController(this.injector, this.viewContainerRef, this.itemData, addRemoveFn, this.index);\n }\n\n ngOnDestroy() {\n this.controller?.destroy();\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NgsFormsService } from '../../../services/forms/forms.service';\nimport { NgsFormsInternalService } from '../../../services/internal/internal-forms.service';\nimport { NgsFormsFormItemDirective } from '../form-item/form-item.component';\n\n@Component({\n selector: 'ngs-form',\n templateUrl: './form.component.html',\n providers: [NgsFormsInternalService],\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormComponent {\n private readonly ngsInternalFormsService = inject(NgsFormsInternalService);\n readonly ngsFormsService = inject(NgsFormsService);\n\n readonly formGroup = toSignal(this.ngsInternalFormsService.formGroup$);\n readonly formConfig = toSignal(this.ngsInternalFormsService.formConfig$);\n\n constructor() {\n this.ngsFormsService.setInternalService(this.ngsInternalFormsService);\n }\n}\n\n","@if (formConfig()?.root && formGroup()) {\n <ng-container [ngs-form-group]=\"formGroup()!\" [ngs-form-item]=\"formConfig()!.root\"></ng-container>\n}\n\n","import { NgsFormsBaseClassItemsContainerBase } from '../../../classes/form-component-base/form-component-items-container.class';\nimport { NgsFormsFormItem, NgsFormsFormItemContainerConfigBase } from '../../../models';\nimport { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { v4 } from 'uuid';\nimport { NgsFormsFormItemDirective } from '../../core';\n\n@Component({\n selector: 'ngs-form-component-column',\n templateUrl: './form-column.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsColumnComponent extends NgsFormsBaseClassItemsContainerBase<NgsFormsFormItemContainerConfigBase> {\n static override key = 'column';\n\n static create(config: NgsFormsFormItemContainerConfigBase): NgsFormsFormItem<NgsFormsFormItemContainerConfigBase> {\n return {\n uuid: v4(),\n type: NgsFormsColumnComponent.key,\n config,\n };\n }\n}\n","@for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n}\n","// eslint-disable-next-line @typescript-eslint/no-empty-interface\nimport { NgsFormsFormErrorKeyValueMap } from '../errors';\nimport { Observable } from 'rxjs';\nimport { ValidatorFn } from '@angular/forms';\nimport { NgsFormsFormInputOption } from './form-item-option.model';\nimport { NgsFormsFormItem } from '../form-config';\n\nexport interface NgsFormsFormItemConfigBase {\n uuid?: string;\n}\n\nexport interface NgsFormsFormItemContainerConfigBase extends NgsFormsFormItemConfigBase {\n items: Array<NgsFormsFormItem<any>>\n}\n\nexport interface NgsFormsFormItemConfigBaseItemWithNameAndValidators extends NgsFormsFormItemConfigBase{\n name: string;\n errorMessageMap?: NgsFormsFormErrorKeyValueMap;\n disabled?: boolean;\n disabled$?: Observable<boolean>;\n validators?: Array<ValidatorFn>;\n validators$? :Observable<Array<ValidatorFn>>;\n}\n\n// ---\n\nexport interface NgsFormsFormItemConfigBaseInput extends NgsFormsFormItemConfigBaseItemWithNameAndValidators {\n id?: string;\n label: string;\n value?: unknown;\n}\n\n// ---\n\nexport interface NgsFormsFormItemConfigBaseTextInput extends NgsFormsFormItemConfigBaseInput {\n placeholder?: string;\n type?: 'text' | 'email' | 'password'\n}\n\n\nexport interface NgsFormsFormItemConfigBaseInputWithOptions extends NgsFormsFormItemConfigBaseInput {\n options?: Array<NgsFormsFormInputOption>;\n options$?: Observable<Array<NgsFormsFormInputOption>>;\n}\n// --\n","import { Component, Injector, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormItemRowConfig } from './form-row-config.model';\nimport { NgsFormsFormItem } from '../../../models';\nimport { v4 } from 'uuid';\nimport { NgsFormsFormItemDirective, NgsFormsBaseClassFormComponent } from '../../../internal';\n\n@Component({\n selector: 'ngs-forms-row-component',\n templateUrl: './form-row.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n\nexport class NgsFormsRowComponent extends NgsFormsBaseClassFormComponent<NgsFormItemRowConfig> {\n static override key = 'form-row';\n constructor(\n ) {\n super();\n }\n getIndividualRowDivClass(index: number) {\n if (this.config.columnClass) {\n return this.config.columnClass;\n }\n if (!this.config.columnClasses?.length) {\n return '';\n }\n return this.config.columnClasses[index];\n }\n static create(config: NgsFormItemRowConfig): NgsFormsFormItem<NgsFormItemRowConfig> {\n return {\n uuid: v4(),\n type: NgsFormsRowComponent.key,\n config: config,\n };\n }\n}\n","<div class=\"{{config.containerClass}}\">\n @for(item of config.items; track item; let i = $index){\n <div class=\"{{getIndividualRowDivClass(i)}}\">\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n </div>\n }\n</div>\n","import { Component, ChangeDetectionStrategy, inject, Injector, OnInit, ViewContainerRef } from '@angular/core';\nimport {\n UntypedFormControl,\n UntypedFormGroup,\n} from '@angular/forms';\nimport { v4 } from 'uuid';\n\nimport { NgsFormsFormItem, NgsFormsFormItemConfigBaseItemWithNameAndValidators } from '../../../models';\nimport { NgsFormsFormItemWithVisibleAndValidatorsBase } from '../../../classes/form-component-base/form-component-item-with-visible-and-validators-base.class';\n\nimport { NgsFormsFormItemDirective } from '../../core';\n\n\n@Component({\n selector: 'ngs-forms-form-group',\n templateUrl: './form-group.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormGroupComponent\n extends NgsFormsFormItemWithVisibleAndValidatorsBase<NgsFormsFormItemConfigBaseItemWithNameAndValidators>\n implements OnInit\n{\n static override key = 'form-group';\n\n static create(\n config: NgsFormsFormItemConfigBaseItemWithNameAndValidators,\n items?: Array<NgsFormsFormItem<any>>\n ): NgsFormsFormItem<NgsFormsFormItemConfigBaseItemWithNameAndValidators> {\n return {\n uuid: v4(),\n type: NgsFormsFormGroupComponent.key,\n config,\n items,\n };\n }\n\n get formGroupControl(): UntypedFormGroup {\n return this.control as unknown as UntypedFormGroup;\n }\n\n constructor() {\n super();\n this.control = new UntypedFormGroup({}) as unknown as UntypedFormControl;\n }\n}\n\n","@if (itemData.items) {\n @for (item of itemData.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\" [ngs-form-group]=\"formGroupControl\"></ng-container>\n }\n}\n","import { inject, Injectable, OnDestroy } from '@angular/core';\n\nimport { UntypedFormArray, UntypedFormGroup } from '@angular/forms';\nimport { NgsFormItemArrayConfig } from '../container';\n\nimport { INgsFormsFormControlAddRemove, NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA } from '../../../../misc';\nimport { NgsFormsFormItem } from '../../../../models/index';\n\n@Injectable()\nexport class NgsFormsFormArrayInternalService implements OnDestroy {\n config = inject<NgsFormsFormItem<NgsFormItemArrayConfig>>(NGS_FORMS_ITEM_DATA).config;\n\n readonly formArray = new UntypedFormArray([]);\n addRemoveFn = inject<INgsFormsFormControlAddRemove>(NGS_FORMS_CONTROL_ADD_REMOVE_FN);\n constructor() {\n this.addRemoveFn.add(this.formArray, this.config.name);\n if (this.config.initialItemCount) {\n for (let i = 0; i < this.config.initialItemCount; i++) {\n this.addItem();\n }\n }\n }\n\n ngOnDestroy() {\n this.addRemoveFn.remove(this.formArray, this.config.name);\n }\n\n removeAt(index: number) {\n if (this.config?.minItems && this.formArray.controls.length <= this.config!.minItems!) {\n return;\n }\n if (!this.formArray.controls.length) {\n return;\n }\n this.formArray.removeAt(index);\n }\n addItem() {\n if (this.config?.maxItems && this.formArray.controls.length >= this.config!.maxItems) {\n return;\n }\n this.formArray.controls.push(new UntypedFormGroup({}));\n }\n}\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../../classes/form-component-base/form-component.class';\nimport { NgsFormsFormItem } from '../../../../models';\nimport { NgsFormItemArrayAddItemConfig } from './form-array-add-item-config.model';\nimport { NgsFormsFormArrayInternalService } from '../service/form-array-internal.service';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-form-array-add-item',\n templateUrl: './form-array-add-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayAddItemComponent extends NgsFormsBaseClassFormComponent<NgsFormItemArrayAddItemConfig> {\n static override key = 'form-array-add-item';\n internalArrayService = inject(NgsFormsFormArrayInternalService);\n\n static create(config: NgsFormItemArrayAddItemConfig): NgsFormsFormItem<NgsFormItemArrayAddItemConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayAddItemComponent.key,\n config: config,\n };\n }\n\n addItem() {\n this.internalArrayService.addItem();\n }\n}\n","<button\n (click)=\"addItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-primary'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\"></i>\n }\n {{ config.buttonText || 'Add Item' }}\n</button>\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsFormItem } from '../../../../models';\nimport { NgsFormsFormItemDirective } from '../../../core/index';\nimport { NgsFormItemArrayConfig } from './form-array-config.model';\nimport { NgsFormsFormItemWithVisibleAndValidatorsBase } from '../../../../classes/form-component-base/form-component-item-with-visible-and-validators-base.class';\nimport { NgsFormsFormArrayInternalService } from '../service/form-array-internal.service';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-form-array',\n imports: [NgsFormsFormItemDirective],\n templateUrl: './form-array.component.html',\n providers: [NgsFormsFormArrayInternalService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayContainerComponent extends NgsFormsFormItemWithVisibleAndValidatorsBase<NgsFormItemArrayConfig> {\n static override key = 'form-array';\n static create(\n config: NgsFormItemArrayConfig\n ): NgsFormsFormItem<NgsFormItemArrayConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayContainerComponent.key,\n config: config,\n };\n }\n}\n","<div [class]=\"config.containerClass || ''\">\n @for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n }\n</div>\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsFormArrayInternalService } from '../service';\nimport { AbstractControl, FormArray, UntypedFormGroup } from '@angular/forms';\n\nimport { v4 } from 'uuid';\nimport { NgsFormsFormArrayListConfig } from './form-array-list.config';\nimport { NgsFormsFormItemDirective, NgsFormsBaseClassFormComponent, NgsFormsFormItem } from '../../../../internal';\n\n@Component({\n selector: 'ngs-forms-form-array-list',\n templateUrl: './form-array-list.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayListComponent extends NgsFormsBaseClassFormComponent<NgsFormsFormArrayListConfig> {\n static override key = 'form-array-list';\n public internalArrayService = inject<NgsFormsFormArrayInternalService>(\n NgsFormsFormArrayInternalService\n );\n public myFormArray: FormArray<any> = this.internalArrayService.formArray;\n\n static create(\n config: NgsFormsFormArrayListConfig\n ): NgsFormsFormItem<NgsFormsFormArrayListConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayListComponent.key,\n config: config,\n };\n }\n\n castToFormGroup(control: AbstractControl): UntypedFormGroup {\n return control as UntypedFormGroup;\n }\n}\n","@for (formGroup of myFormArray.controls; track formGroup; let i = $index) {\n <div [attr.data-index]=\"$index\" [class]=\"config.containerClass || ''\">\n <ng-container [ngs-form-group]=\"castToFormGroup(formGroup)\" [ngs-form-index]=\"i\"\n [ngs-form-item]=\"config.templateItem\"></ng-container>\n </div>\n}\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../../classes/form-component-base/form-component.class';\nimport { NgsFormsFormItem } from '../../../../models';\nimport { NgsFormItemArrayRemoveItemConfig } from './form-array-remove-item-config.model';\nimport { NgsFormsFormArrayInternalService } from '../service';\nimport { NGS_FORMS_ITEM_INDEX } from '../../../../misc';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-form-array-remove-item',\n templateUrl: './form-array-remove-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayRemoveItemComponent extends NgsFormsBaseClassFormComponent<NgsFormItemArrayRemoveItemConfig> {\n static override key = 'form-array-remove-item';\n internalArrayService = inject(NgsFormsFormArrayInternalService);\n myIndex = inject<number>(NGS_FORMS_ITEM_INDEX);\n\n constructor() {\n super();\n }\n\n static create(config: NgsFormItemArrayRemoveItemConfig): NgsFormsFormItem<NgsFormItemArrayRemoveItemConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayRemoveItemComponent.key,\n config,\n };\n }\n\n removeItem() {\n this.internalArrayService.removeAt(this.myIndex);\n }\n}\n","<button\n (click)=\"removeItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-danger btn-sm'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\"></i>\n }\n {{ config.buttonText || 'Remove' }}\n index:{{ myIndex }}\n</button>\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../classes/form-component-base/form-component.class';\nimport { NgsFormsTextDivConfig } from './text-div-config.model';\nimport { NgsFormsFormItem } from '../../../models';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-form-component-text-div',\n imports: [],\n templateUrl: './text-div.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsTextDivComponent extends NgsFormsBaseClassFormComponent<NgsFormsTextDivConfig> {\n static override key = 'text-div';\n\n static create(\n config: NgsFormsTextDivConfig\n ): NgsFormsFormItem<NgsFormsTextDivConfig> {\n return {\n uuid: v4(),\n type: NgsFormsTextDivComponent.key,\n config: config,\n };\n }\n static title(\n title: string,\n divClass = 'h2'\n ): NgsFormsFormItem<NgsFormsTextDivConfig> {\n return NgsFormsTextDivComponent.create({\n text: title,\n classes: divClass,\n });\n }\n}\n","<div class=\"{{config.classes\">{{ config.text }}</div>\n","import { Component, ChangeDetectionStrategy, inject, Sanitizer, SecurityContext } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../classes/form-component-base/form-component.class';\nimport { NgsFormItemHtmlContentConfig } from './html-content-config.model';\nimport { NgsFormsFormItem } from '../../../models';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-form-component-html-content',\n imports: [],\n templateUrl: './html-content.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsHtmlContentComponent extends NgsFormsBaseClassFormComponent<NgsFormItemHtmlContentConfig> {\n static override key = 'content-html';\n contentConfig = this.config as NgsFormItemHtmlContentConfig;\n html: string;\n\n constructor() {\n super();\n const sanitizer = inject(Sanitizer);\n this.html =\n sanitizer.sanitize(SecurityContext.HTML, this.contentConfig.html) ||\n '';\n }\n\n static create(\n config: NgsFormItemHtmlContentConfig\n ): NgsFormsFormItem<NgsFormItemHtmlContentConfig> {\n return {\n uuid: v4(),\n type: NgsFormsHtmlContentComponent.key,\n config,\n };\n }\n}\n","<div [innerHTML]=\"html\"></div>\n","import { NgsFormsFormItemContainerConfigBase } from '../../../models/index';\n\nexport interface NgsFormsFormSectionConfig extends NgsFormsFormItemContainerConfigBase {\n title: string;\n titleClass?: string;\n subtitle?: string;\n subtitleClass?: string;\n}\n\nexport const sectionConfigDefaults: Partial<NgsFormsFormSectionConfig> = {\n titleClass: 'h3',\n subtitleClass: 'lead',\n};\n","import { NgsFormsBaseClassItemsContainerBase } from '../../../classes/form-component-base/form-component-items-container.class';\nimport { NgsFormsFormSectionConfig, sectionConfigDefaults } from './section-config.interface';\nimport { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { defaults } from 'lodash';\nimport { v4 } from 'uuid';\nimport { NgsFormsFormItemDirective } from '../../core';\nimport { NgsFormsFormItem } from '../../../models';\n\n@Component({\n selector: 'ngs-forms-form-section',\n templateUrl: './section.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormSectionComponent extends NgsFormsBaseClassItemsContainerBase<NgsFormsFormSectionConfig> implements OnInit {\n static override key = 'section';\n\n static create(config: NgsFormsFormSectionConfig): NgsFormsFormItem<NgsFormsFormSectionConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormSectionComponent.key,\n config: config,\n };\n }\n\n ngOnInit() {\n this.config = defaults(this.config, sectionConfigDefaults);\n }\n}\n","<div class=\"form-section\">\n <div class=\"form-section-title {{config.titleClass}}\">{{ config.title }}</div>\n @if (config.subtitle) {\n <div class=\"form-section-subtitle {{config.subtitleClass}}\">{{ config.subtitle }}</div>\n }\n @if (config.items.length) {\n <div class=\"form-section-items\">\n @for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n }\n </div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgsFormsColumnComponent } from './components/shared-form-components/column';\nimport { NgsFormsComponentRegistryService } from './services/form-component-registry/form-component-registry.service';\nimport { NgsFormsFormArrayAddItemComponent } from './components/shared-form-components/form-array/add-item';\nimport { NgsFormsFormArrayContainerComponent } from './components/shared-form-components/form-array/container';\nimport { NgsFormsFormArrayListComponent } from './components/shared-form-components/form-array/list';\nimport { NgsFormsFormArrayRemoveItemComponent } from './components/shared-form-components/form-array/remove-item';\nimport { NgsFormsFormSectionComponent } from './components/shared-form-components/section/section.component';\nimport { NgsFormsRowComponent } from './components/shared-form-components/row';\nimport { NgsFormsTextDivComponent } from './components/shared-form-components/text-div';\nimport { NgsFormsFormGroupComponent } from './components/shared-form-components/form-group';\n\n\n@NgModule({\n imports: [CommonModule, FormsModule, ReactiveFormsModule],\n})\nexport class NgsFormsCoreModule {\n static registerCoreNgsFormComponents(\n registryService: NgsFormsComponentRegistryService\n ) {\n registryService.register(NgsFormsFormGroupComponent.key, NgsFormsFormGroupComponent);\n registryService.register(NgsFormsRowComponent.key, NgsFormsRowComponent);\n registryService.register(\n NgsFormsColumnComponent.key,\n NgsFormsColumnComponent\n );\n registryService.register(\n NgsFormsFormArrayContainerComponent.key,\n NgsFormsFormArrayContainerComponent\n );\n registryService.register(\n NgsFormsFormArrayAddItemComponent.key,\n NgsFormsFormArrayAddItemComponent\n );\n registryService.register(\n NgsFormsFormArrayRemoveItemComponent.key,\n NgsFormsFormArrayRemoveItemComponent\n );\n registryService.register(\n NgsFormsFormArrayListComponent.key,\n NgsFormsFormArrayListComponent\n );\n registryService.register(\n NgsFormsTextDivComponent.key,\n NgsFormsTextDivComponent\n );\n //registryService.register('content-html', NgsFormsHtmlContentComponent);\n registryService.register(\n NgsFormsFormSectionComponent.key,\n NgsFormsFormSectionComponent\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["uuidv4"],"mappings":";;;;;;;;;MAIsB,aAAa,CAAA;AACd,IAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;IAEvC,aAAa,GAAmB,EAAE;IAE5C,SAAS,CAAI,WAA0B,EAAE,YAAgC,EAAA;AACvE,QAAA,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC;IACpE;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;AACpB,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;AACxB,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,WAAW,EAAE,CAAC;IACtE;wGAboB,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADlC;;;MCAY,mBAAmB,GAAG,IAAI,cAAc,CAAC,qBAAqB;MAC9D,+BAA+B,GAAG,IAAI,cAAc,CAAC,4BAA4B;MACjF,oBAAoB,GAAG,IAAI,cAAc,CAAC,sBAAsB;AAYtE,MAAM,qCAAqC,GAAsC;AACtF,IAAA,SAAS,EAAE,CAAC,SAAS,MAAM;AACzB,QAAA,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC;AACzE,QAAA,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC;K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;AAEG;;;;"}
1
+ {"version":3,"file":"ng-simplicity-forms-core.mjs","sources":["../../../../libs/forms-core/src/classes/base/subscriber.class.ts","../../../../libs/forms-core/src/misc/injection-tokens.constants.ts","../../../../libs/forms-core/src/misc/defaults.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component.class.ts","../../../../libs/forms-core/src/services/form-component-registry/form-component-registry.service.ts","../../../../libs/forms-core/src/services/forms/forms.service.ts","../../../../libs/forms-core/src/services/internal/internal-forms.service.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-item-with-visible-and-validators-base.class.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-input.class.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-items-container.class.ts","../../../../libs/forms-core/src/classes/form-component-base/form-component-input-with-options-base.class.ts","../../../../libs/forms-core/src/controllers/form-item/form-item.controller.ts","../../../../libs/forms-core/src/components/core/form-item/form-item.component.ts","../../../../libs/forms-core/src/components/core/form/form.component.ts","../../../../libs/forms-core/src/components/core/form/form.component.html","../../../../libs/forms-core/src/components/shared-form-components/column/form-column.component.ts","../../../../libs/forms-core/src/components/shared-form-components/column/form-column.component.html","../../../../libs/forms-core/src/models/item-config-bases/form-item-config-base.model.ts","../../../../libs/forms-core/src/components/shared-form-components/row/form-row.component.ts","../../../../libs/forms-core/src/components/shared-form-components/row/form-row.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-group/form-group.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-group/form-group.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/service/form-array-internal.service.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/add-item/form-array-add-item.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/add-item/form-array-add-item.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/container/form-array.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/container/form-array.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/list/form-array-list.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/list/form-array-list.component.html","../../../../libs/forms-core/src/components/shared-form-components/form-array/remove-item/form-array-remove-item.component.ts","../../../../libs/forms-core/src/components/shared-form-components/form-array/remove-item/form-array-remove-item.component.html","../../../../libs/forms-core/src/components/shared-form-components/text-div/text-div.component.ts","../../../../libs/forms-core/src/components/shared-form-components/text-div/text-div.component.html","../../../../libs/forms-core/src/components/shared-form-components/html-content/html-content.component.ts","../../../../libs/forms-core/src/components/shared-form-components/html-content/html-content.component.html","../../../../libs/forms-core/src/components/shared-form-components/section/section-config.interface.ts","../../../../libs/forms-core/src/components/shared-form-components/section/section.component.ts","../../../../libs/forms-core/src/components/shared-form-components/section/section.component.html","../../../../libs/forms-core/src/forms-core.module.ts","../../../../libs/forms-core/src/ng-simplicity-forms-core.ts"],"sourcesContent":["import { Observable, Subject, Subscription, takeUntil } from 'rxjs';\nimport { Directive } from '@angular/core';\n\n@Directive() // No-op, just for Angular compiler\nexport abstract class NgsSubscriber {\n protected readonly destroy$ = new Subject<void>();\n\n protected subscriptions: Subscription[] = [];\n\n subscribe<T>(subscribeTo: Observable<T>, nextObserver: (value: T) => void): void {\n subscribeTo.pipe(takeUntil(this.destroy$)).subscribe(nextObserver);\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.subscriptions.forEach((subscriber) => subscriber.unsubscribe());\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { AbstractControl, UntypedFormArray, UntypedFormGroup } from '@angular/forms';\n\nexport const NGS_FORMS_ITEM_DATA = new InjectionToken('ngs-forms-item-data');\nexport const NGS_FORMS_CONTROL_ADD_REMOVE_FN = new InjectionToken('ngs-form-control-remove-fn');\nexport const NGS_FORMS_ITEM_INDEX = new InjectionToken('ngs-forms-item-index');\n\ntype FormControlAddRemoveFn = (control: AbstractControl, controlName: string) => void;\n\nexport interface INgsFormsFormControlAddRemove {\n add: FormControlAddRemoveFn;\n remove: FormControlAddRemoveFn;\n}\ninterface IControlAddRemoveFunctionsBuilder {\n formGroup: (formGroup: UntypedFormGroup) => INgsFormsFormControlAddRemove;\n formArray: (formArray: UntypedFormArray) => INgsFormsFormControlAddRemove;\n}\nexport const NgsFormsFormControlAddRemoveFunctions: IControlAddRemoveFunctionsBuilder = {\n formGroup: (formGroup) => ({\n add: (control, controlName) => formGroup.addControl(controlName, control),\n remove: (control, controlName) => formGroup.removeControl(controlName),\n }),\n formArray: (formArray: UntypedFormArray) => ({\n add: (control, controlName) => formArray.controls.push(control),\n remove: (control, controlName) => {\n const index = formArray.controls.indexOf(control);\n formArray.controls.splice(index, 1);\n },\n }),\n};\n","/**\n * Simple alternative to lodash.defaults.\n * Returns a new object with properties from source assigned to target\n * if the properties are undefined or missing on target.\n */\nexport function ngsDefaults<T extends object, U extends object>(target: T, source: U): T & U;\nexport function ngsDefaults(target: any, ...sources: any[]): any {\n const result = target ? { ...target } : {};\n for (const source of sources) {\n if (!source) continue;\n for (const key of Object.keys(source)) {\n if (result[key] === undefined) {\n result[key] = source[key];\n }\n }\n }\n return result;\n}\n","import { Directive, inject, Injector } from '@angular/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { NgsSubscriber } from '../base/subscriber.class';\nimport { NGS_FORMS_ITEM_DATA } from '../../misc';\nimport { NgsFormsFormItem, NgsFormsFormItemConfigBase } from '../../models';\n\n@Directive({})\nexport abstract class NgsFormsBaseClassFormComponent<T extends NgsFormsFormItemConfigBase> extends NgsSubscriber {\n static key: string;\n id = uuidv4();\n protected config: T;\n protected readonly itemData: NgsFormsFormItem<T>;\n constructor() {\n super();\n this.itemData = inject<NgsFormsFormItem<T>>(NGS_FORMS_ITEM_DATA);\n this.config = this.itemData.config;\n }\n}\n","import { Injectable, Type } from '@angular/core';\n\n@Injectable({ providedIn: 'platform' })\nexport class NgsFormsComponentRegistryService {\n private readonly itemComponentRegistry: TItemComponentRegistry = {};\n getComponentTypeForKey(key: string): Type<unknown> | undefined {\n return this.itemComponentRegistry[key];\n }\n register(key: string, component: Type<unknown>): void {\n this.itemComponentRegistry[key] = component;\n }\n}\n\ntype TItemComponentRegistry = { [key: string]: Type<unknown> };\n","import { UntypedFormGroup } from '@angular/forms';\nimport { BehaviorSubject, Subject, Subscription } from 'rxjs';\nimport { NgsFormsFormConfig } from '../../models';\nimport { NgsFormsInternalService } from '../internal/internal-forms.service';\nimport { Injectable, OnDestroy } from '@angular/core';\n\n@Injectable()\nexport class NgsFormsService implements OnDestroy {\n attempt = 0;\n formValue$ = new BehaviorSubject<any>({});\n formValue: any = {};\n private internalFormService: NgsFormsInternalService | undefined;\n private formGroupSubscriptions: Array<Subscription> = [];\n private formGroup = new UntypedFormGroup({});\n\n get dirty(): boolean {\n return this.formGroup?.dirty ?? false;\n }\n get isValid(): boolean {\n if (!this.internalServiceIsSet) return false;\n return this.internalFormService!.checkIsValid();\n }\n get internalServiceIsSet(): boolean {\n return !!this.internalFormService;\n }\n\n setFormConfig(formConfig: NgsFormsFormConfig): void {\n if (!this.internalServiceIsSet) {\n if (this.attempt > 20) {\n console.error('Internal form service is unavailable. Is the ngs-form root tag added to the page?');\n return;\n }\n this.attempt++;\n setTimeout(() => this.setFormConfig(formConfig), 25);\n return;\n }\n this.internalFormService!.setFormData(formConfig);\n }\n\n setInternalService(internalFormsService: NgsFormsInternalService): void {\n this.internalFormService = internalFormsService;\n this.bindFormGroup();\n }\n\n setIsSubmitted(isSubmitted: boolean): void {\n if (!this.internalServiceIsSet) return;\n this.internalFormService!.setIsSubmitted(isSubmitted);\n }\n\n private bindFormGroup(): void {\n this.internalFormService!.formGroup$.subscribe((fg) => {\n this.formGroup = fg;\n this.formGroupSubscriptions.forEach((subscription) => subscription.unsubscribe());\n\n this.formGroupSubscriptions.push(\n this.formGroup.valueChanges.subscribe((v) => {\n this.formValue = v;\n this.formValue$.next(v);\n })\n );\n });\n }\n updateComponentState(componentKey: string, state: any): void {\n this.internalFormService?.updateComponentState(componentKey, state);\n }\n updateGlobalState(state: any): void {\n this.internalFormService?.updateGlobalState(state);\n }\n ngOnDestroy() {\n this.formGroupSubscriptions.forEach((subscription) => subscription.unsubscribe());\n }\n\n patchValue(entityData: any) {\n this.formGroup.patchValue(entityData);\n }\n}\n","import { BehaviorSubject, filter, map } from 'rxjs';\nimport { FormGroup, UntypedFormGroup } from '@angular/forms';\nimport { NgsFormsFormConfig } from '../../models';\nimport { Injectable } from '@angular/core';\nimport { NgsFormsGlobalFormState } from '../../models/global-state.interface';\nimport { ngsDefaults } from '../../misc/defaults';\n\n@Injectable()\nexport class NgsFormsInternalService {\n formGroup$ = new BehaviorSubject<FormGroup>(new UntypedFormGroup({}));\n formConfig$ = new BehaviorSubject<NgsFormsFormConfig | undefined>(undefined);\n isSubmitted$ = new BehaviorSubject<boolean>(false);\n state = new BehaviorSubject<{ [key: string]: any }>({});\n setIsSubmitted(isSubmitted: boolean): void {\n this.isSubmitted$.next(isSubmitted);\n }\n\n checkIsValid(): boolean {\n if (!this.formGroup$.value) return false;\n return this.formGroup$.value.valid;\n }\n\n setFormData(formConfig: NgsFormsFormConfig) {\n this.formGroup$.next(new UntypedFormGroup({}));\n this.formConfig$.next(formConfig);\n this.isSubmitted$.next(false);\n }\n private mergeState(key: string, update: any): void {\n const obj = this.state.value[key] || {};\n const updated = ngsDefaults(update, obj);\n this.state.value[key] = updated;\n this.state.next(this.state.value);\n }\n updateGlobalState(state: NgsFormsGlobalFormState) {\n this.mergeState('global', state);\n }\n updateComponentState(componentKey: string, state: any) {\n this.mergeState(componentKey, state);\n }\n\n subscribeToState(fieldName: string) {\n let last = '';\n return this.state.pipe(\n map((allState) => ngsDefaults(allState[fieldName], allState['global'])),\n filter((currentState) => {\n const stringifiedState = JSON.stringify(currentState);\n const isUpdated = stringifiedState !== last;\n last = stringifiedState;\n return isUpdated;\n })\n );\n }\n}\n","import { Directive, inject, OnDestroy, OnInit, Signal } from '@angular/core';\nimport { FormControl, UntypedFormControl, ValidatorFn } from '@angular/forms';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { INgsFormsFormControlAddRemove, NGS_FORMS_CONTROL_ADD_REMOVE_FN } from '../../misc';\nimport { NgsFormsInternalService } from '../../services';\nimport { NgsFormsFormItemConfigBaseItemWithNameAndValidators } from '../../models/item-config-bases/';\nimport { NgsFormsBaseClassFormComponent } from '../../classes/index';\n\n@Directive({})\nexport class NgsFormsFormItemWithVisibleAndValidatorsBase<T extends NgsFormsFormItemConfigBaseItemWithNameAndValidators> extends NgsFormsBaseClassFormComponent<T> implements OnInit, OnDestroy {\n control: UntypedFormControl | undefined;\n errorMessage = '';\n private formAddRemoveFns = inject<INgsFormsFormControlAddRemove>(NGS_FORMS_CONTROL_ADD_REMOVE_FN);\n private privateService = inject<NgsFormsInternalService>(NgsFormsInternalService);\n readonly submitted: Signal<boolean> = toSignal(this.privateService.isSubmitted$, { initialValue: false });\n\n ngOnInit() {\n this.control = new FormControl(undefined, { validators: [] });\n //this.bindVisible();\n this.bindValidators();\n //this.bindControlValidityChange();\n this.formAddRemoveFns.add(this.control, this.config.name);\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.formAddRemoveFns.remove(this.control!, this.config.name);\n }\n\n private bindValidators() {\n if (!this.config.validators && !this.config.validators$) return;\n if (this.config.validators) {\n this.control!.setValidators(this.config.validators);\n return;\n }\n if (this.config.validators$) {\n this.subscribe(this.config.validators$!, (validators: Array<ValidatorFn>) => this.control!.setValidators(validators));\n }\n }\n\n /*\n private bindVisible() {\n this.subscribe(this.parentVisibility$, (isVisible) => {\n if (this.isVisible === isVisible) return;\n this.isVisible = isVisible;\n if (isVisible) {\n this.formGroup.addControl(this.config.name, this.control);\n return;\n }\n this.formGroup.removeControl(this.config.name);\n });\n }\n */\n}\n\n","import { NgsFormsCommonComponentState, NgsFormsFormItemConfigBaseInput } from '../../models';\nimport { Directive, inject, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nimport { NgsFormsFormItemWithVisibleAndValidatorsBase } from './form-component-item-with-visible-and-validators-base.class';\nimport { NgsFormsInternalService, NgsFormsService } from '../../services';\n\n@Directive({}) // for compiler\nexport abstract class NgsFormsBaseClassFormInputComponent<T extends NgsFormsFormItemConfigBaseInput> extends NgsFormsFormItemWithVisibleAndValidatorsBase<T> {\n readonly myFormService = inject(NgsFormsService);\n private readonly internalService = inject(NgsFormsInternalService);\n\n readonly commonState: Signal<NgsFormsCommonComponentState> = toSignal(\n this.internalService.subscribeToState(this.config.name),\n { initialValue: {} as NgsFormsCommonComponentState }\n );\n\n toggleDisplayMode(setTo: 'summary' | 'input'){\n\n }\n}\n\n","import { NgsFormsFormItemContainerConfigBase } from '../../models';\n\nimport { NgsFormsBaseClassFormComponent } from './form-component.class';\nimport { Directive, OnDestroy } from '@angular/core';\n\n@Directive({}) // no op for compiler\nexport class NgsFormsBaseClassItemsContainerBase<T extends NgsFormsFormItemContainerConfigBase> extends NgsFormsBaseClassFormComponent<T> implements OnDestroy {}\n","import { Directive, Signal } from '@angular/core';\nimport { NgsFormsBaseClassFormInputComponent } from './form-component-input.class';\nimport { NgsFormsFormInputOption, NgsFormsFormItemConfigBaseInputWithOptions } from '../../models';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { of } from 'rxjs';\n\n@Directive()\nexport class NgsFormsBaseClassFormItemInputWithOptionsComponent<T extends NgsFormsFormItemConfigBaseInputWithOptions> extends NgsFormsBaseClassFormInputComponent<T> {\n options: Signal<Array<NgsFormsFormInputOption>> = toSignal(\n this.config.options$ ?? of(this.config.options ?? []),\n { initialValue: this.config.options ?? [] }\n );\n}\n\n","import { ComponentRef, Injector, Provider, ViewContainerRef } from '@angular/core';\nimport { NgsFormsFormItem } from '../../models';\nimport { NgsSubscriber } from '../../classes/base/subscriber.class';\nimport { INgsFormsFormControlAddRemove, NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA, NGS_FORMS_ITEM_INDEX } from '../../misc';\nimport { BehaviorSubject } from 'rxjs';\nimport { NgsFormsComponentRegistryService } from '../../services/form-component-registry/form-component-registry.service';\n\nexport class NgsFormItemController extends NgsSubscriber {\n private componentRef: ComponentRef<unknown> | undefined;\n private parentVisibility = new BehaviorSubject<boolean>(false);\n private lastVisible: boolean | undefined;\n\n constructor(\n private readonly injector: Injector,\n private readonly viewContainerRef: ViewContainerRef,\n private readonly itemData: NgsFormsFormItem<any>,\n private readonly addRemoveControlFn?: INgsFormsFormControlAddRemove,\n private readonly index?: number\n ) {\n super();\n this.bindVisibility();\n }\n\n destroy() {\n this.detach();\n super.ngOnDestroy();\n }\n\n private bindVisibility() {\n if (!this.itemData.visible$) {\n this.create();\n return;\n }\n this.subscribe(this.itemData.visible$, (visible) => {\n if (this.lastVisible === visible) return;\n\n this.lastVisible = visible;\n if (visible) {\n this.create();\n return;\n }\n this.detach();\n });\n }\n\n private create() {\n const providers: Provider[] = [{ provide: NGS_FORMS_ITEM_DATA, useValue: this.itemData }];\n if (this.index !== undefined) {\n providers.push({ provide: NGS_FORMS_ITEM_INDEX, useValue: this.index });\n }\n if (this.addRemoveControlFn) {\n providers.push({ provide: NGS_FORMS_CONTROL_ADD_REMOVE_FN, useValue: this.addRemoveControlFn });\n }\n const myInjector = Injector.create({\n parent: this.injector,\n providers,\n });\n const componentType = this.injector.get(NgsFormsComponentRegistryService).getComponentTypeForKey(this.itemData.type);\n if (!componentType) {\n console.error(`Ngs form component type ${this.itemData.type} not registered.`);\n return;\n }\n this.componentRef = this.viewContainerRef.createComponent(componentType, { injector: myInjector });\n this.parentVisibility.next(true);\n }\n\n private detach() {\n this.parentVisibility.next(false);\n this.componentRef?.destroy();\n }\n}\n","import { Directive, inject, Injector, Input, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';\nimport { UntypedFormArray, UntypedFormGroup } from '@angular/forms';\nimport { NgsFormItemController } from '../../../controllers';\nimport { INgsFormsFormControlAddRemove, NgsFormsFormControlAddRemoveFunctions } from '../../../misc';\nimport { NgsFormsComponentRegistryService } from '../../../services/form-component-registry/form-component-registry.service';\nimport { NgsFormsFormItem } from '../../../models';\n\n@Directive({\n selector: '[ngs-form-item]',\n //templateUrl: \"./form-item.component.html\",\n})\n\nexport class NgsFormsFormItemDirective implements OnInit, OnDestroy {\n @Input('ngs-form-item')\n itemData: NgsFormsFormItem<any> | undefined = undefined;\n\n @Input('ngs-form-group')\n formGroup?: UntypedFormGroup;\n\n @Input('ngs-form-array')\n formArray?: UntypedFormArray;\n\n @Input('ngs-form-index')\n index?: number;\n\n controller: NgsFormItemController | undefined;\n\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n\n private readonly formComponentRegistryService = inject(NgsFormsComponentRegistryService);\n\n ngOnInit(): void {\n if (!this.itemData) {\n return console.error('Form item without form data');\n }\n let addRemoveFn: INgsFormsFormControlAddRemove | undefined = undefined;\n if (this.formArray) {\n addRemoveFn = NgsFormsFormControlAddRemoveFunctions.formArray(this.formArray);\n }\n if (this.formGroup) {\n addRemoveFn = NgsFormsFormControlAddRemoveFunctions.formGroup(this.formGroup);\n }\n this.controller = new NgsFormItemController(this.injector, this.viewContainerRef, this.itemData, addRemoveFn, this.index);\n }\n\n ngOnDestroy() {\n this.controller?.destroy();\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NgsFormsService } from '../../../services/forms/forms.service';\nimport { NgsFormsInternalService } from '../../../services/internal/internal-forms.service';\nimport { NgsFormsFormItemDirective } from '../form-item/form-item.component';\n\n@Component({\n selector: 'ngs-form',\n templateUrl: './form.component.html',\n providers: [NgsFormsInternalService],\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormComponent {\n private readonly ngsInternalFormsService = inject(NgsFormsInternalService);\n readonly ngsFormsService = inject(NgsFormsService);\n\n readonly formGroup = toSignal(this.ngsInternalFormsService.formGroup$);\n readonly formConfig = toSignal(this.ngsInternalFormsService.formConfig$);\n\n constructor() {\n this.ngsFormsService.setInternalService(this.ngsInternalFormsService);\n }\n}\n\n","@if (formConfig()?.root && formGroup()) {\n <ng-container [ngs-form-group]=\"formGroup()!\" [ngs-form-item]=\"formConfig()!.root\"></ng-container>\n}\n\n","import { NgsFormsBaseClassItemsContainerBase } from '../../../classes/form-component-base/form-component-items-container.class';\nimport { NgsFormsFormItem, NgsFormsFormItemContainerConfigBase } from '../../../models';\nimport { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { v4 } from 'uuid';\nimport { NgsFormsFormItemDirective } from '../../core';\n\n@Component({\n selector: 'ngs-form-component-column',\n templateUrl: './form-column.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsColumnComponent extends NgsFormsBaseClassItemsContainerBase<NgsFormsFormItemContainerConfigBase> {\n static override key = 'column';\n\n static create(config: NgsFormsFormItemContainerConfigBase): NgsFormsFormItem<NgsFormsFormItemContainerConfigBase> {\n return {\n uuid: v4(),\n type: NgsFormsColumnComponent.key,\n config,\n };\n }\n}\n","@for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n}\n","// eslint-disable-next-line @typescript-eslint/no-empty-interface\nimport { NgsFormsFormErrorKeyValueMap } from '../errors';\nimport { Observable } from 'rxjs';\nimport { ValidatorFn } from '@angular/forms';\nimport { NgsFormsFormInputOption } from './form-item-option.model';\nimport { NgsFormsFormItem } from '../form-config';\n\nexport interface NgsFormsFormItemConfigBase {\n uuid?: string;\n}\n\nexport interface NgsFormsFormItemContainerConfigBase extends NgsFormsFormItemConfigBase {\n items: Array<NgsFormsFormItem<any>>\n}\n\nexport interface NgsFormsFormItemConfigBaseItemWithNameAndValidators extends NgsFormsFormItemConfigBase{\n name: string;\n errorMessageMap?: NgsFormsFormErrorKeyValueMap;\n disabled?: boolean;\n disabled$?: Observable<boolean>;\n validators?: Array<ValidatorFn>;\n validators$? :Observable<Array<ValidatorFn>>;\n}\n\n// ---\n\nexport interface NgsFormsFormItemConfigBaseInput extends NgsFormsFormItemConfigBaseItemWithNameAndValidators {\n id?: string;\n label: string;\n value?: unknown;\n}\n\n// ---\n\nexport interface NgsFormsFormItemConfigBaseTextInput extends NgsFormsFormItemConfigBaseInput {\n placeholder?: string;\n type?: 'text' | 'email' | 'password'\n}\n\n\nexport interface NgsFormsFormItemConfigBaseInputWithOptions extends NgsFormsFormItemConfigBaseInput {\n options?: Array<NgsFormsFormInputOption>;\n options$?: Observable<Array<NgsFormsFormInputOption>>;\n}\n// --\n","import { Component, Injector, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormItemRowConfig } from './form-row-config.model';\nimport { NgsFormsFormItem } from '../../../models';\nimport { v4 } from 'uuid';\nimport { NgsFormsFormItemDirective, NgsFormsBaseClassFormComponent } from '../../../internal';\n\n@Component({\n selector: 'ngs-forms-row-component',\n templateUrl: './form-row.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n\nexport class NgsFormsRowComponent extends NgsFormsBaseClassFormComponent<NgsFormItemRowConfig> {\n static override key = 'form-row';\n constructor(\n ) {\n super();\n }\n getIndividualRowDivClass(index: number) {\n if (this.config.columnClass) {\n return this.config.columnClass;\n }\n if (!this.config.columnClasses?.length) {\n return '';\n }\n return this.config.columnClasses[index];\n }\n static create(config: NgsFormItemRowConfig): NgsFormsFormItem<NgsFormItemRowConfig> {\n return {\n uuid: v4(),\n type: NgsFormsRowComponent.key,\n config: config,\n };\n }\n}\n","<div class=\"{{config.containerClass}}\">\n @for(item of config.items; track item; let i = $index){\n <div class=\"{{getIndividualRowDivClass(i)}}\">\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n </div>\n }\n</div>\n","import { Component, ChangeDetectionStrategy, inject, Injector, OnInit, ViewContainerRef } from '@angular/core';\nimport {\n UntypedFormControl,\n UntypedFormGroup,\n} from '@angular/forms';\nimport { v4 } from 'uuid';\n\nimport { NgsFormsFormItem, NgsFormsFormItemConfigBaseItemWithNameAndValidators } from '../../../models';\nimport { NgsFormsFormItemWithVisibleAndValidatorsBase } from '../../../classes/form-component-base/form-component-item-with-visible-and-validators-base.class';\n\nimport { NgsFormsFormItemDirective } from '../../core';\n\n\n@Component({\n selector: 'ngs-forms-form-group',\n templateUrl: './form-group.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormGroupComponent\n extends NgsFormsFormItemWithVisibleAndValidatorsBase<NgsFormsFormItemConfigBaseItemWithNameAndValidators>\n implements OnInit\n{\n static override key = 'form-group';\n\n static create(\n config: NgsFormsFormItemConfigBaseItemWithNameAndValidators,\n items?: Array<NgsFormsFormItem<any>>\n ): NgsFormsFormItem<NgsFormsFormItemConfigBaseItemWithNameAndValidators> {\n return {\n uuid: v4(),\n type: NgsFormsFormGroupComponent.key,\n config,\n items,\n };\n }\n\n get formGroupControl(): UntypedFormGroup {\n return this.control as unknown as UntypedFormGroup;\n }\n\n constructor() {\n super();\n this.control = new UntypedFormGroup({}) as unknown as UntypedFormControl;\n }\n}\n\n","@if (itemData.items) {\n @for (item of itemData.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\" [ngs-form-group]=\"formGroupControl\"></ng-container>\n }\n}\n","import { inject, Injectable, OnDestroy } from '@angular/core';\n\nimport { UntypedFormArray, UntypedFormGroup } from '@angular/forms';\nimport { NgsFormItemArrayConfig } from '../container';\n\nimport { INgsFormsFormControlAddRemove, NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA } from '../../../../misc';\nimport { NgsFormsFormItem } from '../../../../models/index';\n\n@Injectable()\nexport class NgsFormsFormArrayInternalService implements OnDestroy {\n config = inject<NgsFormsFormItem<NgsFormItemArrayConfig>>(NGS_FORMS_ITEM_DATA).config;\n\n readonly formArray = new UntypedFormArray([]);\n addRemoveFn = inject<INgsFormsFormControlAddRemove>(NGS_FORMS_CONTROL_ADD_REMOVE_FN);\n constructor() {\n this.addRemoveFn.add(this.formArray, this.config.name);\n if (this.config.initialItemCount) {\n for (let i = 0; i < this.config.initialItemCount; i++) {\n this.addItem();\n }\n }\n }\n\n ngOnDestroy() {\n this.addRemoveFn.remove(this.formArray, this.config.name);\n }\n\n removeAt(index: number) {\n if (this.config?.minItems && this.formArray.controls.length <= this.config!.minItems!) {\n return;\n }\n if (!this.formArray.controls.length) {\n return;\n }\n this.formArray.removeAt(index);\n }\n addItem() {\n if (this.config?.maxItems && this.formArray.controls.length >= this.config!.maxItems) {\n return;\n }\n this.formArray.controls.push(new UntypedFormGroup({}));\n }\n}\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../../classes/form-component-base/form-component.class';\nimport { NgsFormsFormItem } from '../../../../models';\nimport { NgsFormItemArrayAddItemConfig } from './form-array-add-item-config.model';\nimport { NgsFormsFormArrayInternalService } from '../service/form-array-internal.service';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-form-array-add-item',\n templateUrl: './form-array-add-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayAddItemComponent extends NgsFormsBaseClassFormComponent<NgsFormItemArrayAddItemConfig> {\n static override key = 'form-array-add-item';\n internalArrayService = inject(NgsFormsFormArrayInternalService);\n\n static create(config: NgsFormItemArrayAddItemConfig): NgsFormsFormItem<NgsFormItemArrayAddItemConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayAddItemComponent.key,\n config: config,\n };\n }\n\n addItem() {\n this.internalArrayService.addItem();\n }\n}\n","<button\n (click)=\"addItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-primary'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\" aria-hidden=\"true\"></i>\n }\n {{ config.buttonText || 'Add Item' }}\n</button>\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsFormItem } from '../../../../models';\nimport { NgsFormsFormItemDirective } from '../../../core/index';\nimport { NgsFormItemArrayConfig } from './form-array-config.model';\nimport { NgsFormsFormItemWithVisibleAndValidatorsBase } from '../../../../classes/form-component-base/form-component-item-with-visible-and-validators-base.class';\nimport { NgsFormsFormArrayInternalService } from '../service/form-array-internal.service';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-form-array',\n imports: [NgsFormsFormItemDirective],\n templateUrl: './form-array.component.html',\n providers: [NgsFormsFormArrayInternalService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayContainerComponent extends NgsFormsFormItemWithVisibleAndValidatorsBase<NgsFormItemArrayConfig> {\n static override key = 'form-array';\n static create(\n config: NgsFormItemArrayConfig\n ): NgsFormsFormItem<NgsFormItemArrayConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayContainerComponent.key,\n config: config,\n };\n }\n}\n","<div [class]=\"config.containerClass || ''\">\n @for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n }\n</div>\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsFormArrayInternalService } from '../service';\nimport { AbstractControl, FormArray, UntypedFormGroup } from '@angular/forms';\n\nimport { v4 } from 'uuid';\nimport { NgsFormsFormArrayListConfig } from './form-array-list.config';\nimport { NgsFormsFormItemDirective, NgsFormsBaseClassFormComponent, NgsFormsFormItem } from '../../../../internal';\n\n@Component({\n selector: 'ngs-forms-form-array-list',\n templateUrl: './form-array-list.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayListComponent extends NgsFormsBaseClassFormComponent<NgsFormsFormArrayListConfig> {\n static override key = 'form-array-list';\n public internalArrayService = inject<NgsFormsFormArrayInternalService>(\n NgsFormsFormArrayInternalService\n );\n public myFormArray: FormArray<any> = this.internalArrayService.formArray;\n\n static create(\n config: NgsFormsFormArrayListConfig\n ): NgsFormsFormItem<NgsFormsFormArrayListConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayListComponent.key,\n config: config,\n };\n }\n\n castToFormGroup(control: AbstractControl): UntypedFormGroup {\n return control as UntypedFormGroup;\n }\n}\n","@for (formGroup of myFormArray.controls; track formGroup; let i = $index) {\n <div [attr.data-index]=\"$index\" [class]=\"config.containerClass || ''\">\n <ng-container [ngs-form-group]=\"castToFormGroup(formGroup)\" [ngs-form-index]=\"i\"\n [ngs-form-item]=\"config.templateItem\"></ng-container>\n </div>\n}\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../../classes/form-component-base/form-component.class';\nimport { NgsFormsFormItem } from '../../../../models';\nimport { NgsFormItemArrayRemoveItemConfig } from './form-array-remove-item-config.model';\nimport { NgsFormsFormArrayInternalService } from '../service';\nimport { NGS_FORMS_ITEM_INDEX } from '../../../../misc';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-form-array-remove-item',\n templateUrl: './form-array-remove-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormArrayRemoveItemComponent extends NgsFormsBaseClassFormComponent<NgsFormItemArrayRemoveItemConfig> {\n static override key = 'form-array-remove-item';\n internalArrayService = inject(NgsFormsFormArrayInternalService);\n myIndex = inject<number>(NGS_FORMS_ITEM_INDEX);\n\n constructor() {\n super();\n }\n\n static create(config: NgsFormItemArrayRemoveItemConfig): NgsFormsFormItem<NgsFormItemArrayRemoveItemConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormArrayRemoveItemComponent.key,\n config,\n };\n }\n\n removeItem() {\n this.internalArrayService.removeAt(this.myIndex);\n }\n}\n","<button\n (click)=\"removeItem()\"\n [class]=\"config.buttonClass || 'btn btn-outline-danger btn-sm'\"\n type=\"button\">\n @if (config.buttonIcon) {\n <i [class]=\"config.buttonIcon\" aria-hidden=\"true\"></i>\n }\n {{ config.buttonText || 'Remove' }}\n index:{{ myIndex }}\n</button>\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../classes/form-component-base/form-component.class';\nimport { NgsFormsTextDivConfig } from './text-div-config.model';\nimport { NgsFormsFormItem } from '../../../models';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-form-component-text-div',\n imports: [],\n templateUrl: './text-div.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsTextDivComponent extends NgsFormsBaseClassFormComponent<NgsFormsTextDivConfig> {\n static override key = 'text-div';\n\n static create(\n config: NgsFormsTextDivConfig\n ): NgsFormsFormItem<NgsFormsTextDivConfig> {\n return {\n uuid: v4(),\n type: NgsFormsTextDivComponent.key,\n config: config,\n };\n }\n static title(\n title: string,\n divClass = 'h2'\n ): NgsFormsFormItem<NgsFormsTextDivConfig> {\n return NgsFormsTextDivComponent.create({\n text: title,\n classes: divClass,\n });\n }\n}\n","<div class=\"{{config.classes\">{{ config.text }}</div>\n","import { Component, ChangeDetectionStrategy, inject, Sanitizer, SecurityContext } from '@angular/core';\nimport { NgsFormsBaseClassFormComponent } from '../../../classes/form-component-base/form-component.class';\nimport { NgsFormItemHtmlContentConfig } from './html-content-config.model';\nimport { NgsFormsFormItem } from '../../../models';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-form-component-html-content',\n imports: [],\n templateUrl: './html-content.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsHtmlContentComponent extends NgsFormsBaseClassFormComponent<NgsFormItemHtmlContentConfig> {\n static override key = 'content-html';\n contentConfig = this.config as NgsFormItemHtmlContentConfig;\n html: string;\n\n constructor() {\n super();\n const sanitizer = inject(Sanitizer);\n this.html =\n sanitizer.sanitize(SecurityContext.HTML, this.contentConfig.html) ||\n '';\n }\n\n static create(\n config: NgsFormItemHtmlContentConfig\n ): NgsFormsFormItem<NgsFormItemHtmlContentConfig> {\n return {\n uuid: v4(),\n type: NgsFormsHtmlContentComponent.key,\n config,\n };\n }\n}\n","<div [innerHTML]=\"html\"></div>\n","import { NgsFormsFormItemContainerConfigBase } from '../../../models/index';\n\nexport interface NgsFormsFormSectionConfig extends NgsFormsFormItemContainerConfigBase {\n title: string;\n titleClass?: string;\n subtitle?: string;\n subtitleClass?: string;\n}\n\nexport const sectionConfigDefaults: Partial<NgsFormsFormSectionConfig> = {\n titleClass: 'h3',\n subtitleClass: 'lead',\n};\n","import { NgsFormsBaseClassItemsContainerBase } from '../../../classes/form-component-base/form-component-items-container.class';\nimport { NgsFormsFormSectionConfig, sectionConfigDefaults } from './section-config.interface';\nimport { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { ngsDefaults } from '../../../misc/defaults';\nimport { v4 } from 'uuid';\nimport { NgsFormsFormItemDirective } from '../../core';\nimport { NgsFormsFormItem } from '../../../models';\n\n@Component({\n selector: 'ngs-forms-form-section',\n templateUrl: './section.component.html',\n imports: [NgsFormsFormItemDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsFormSectionComponent extends NgsFormsBaseClassItemsContainerBase<NgsFormsFormSectionConfig> implements OnInit {\n static override key = 'section';\n\n static create(config: NgsFormsFormSectionConfig): NgsFormsFormItem<NgsFormsFormSectionConfig> {\n return {\n uuid: v4(),\n type: NgsFormsFormSectionComponent.key,\n config: config,\n };\n }\n\n ngOnInit() {\n this.config = ngsDefaults(this.config, sectionConfigDefaults);\n }\n}\n","<div class=\"form-section\">\n <div class=\"form-section-title {{config.titleClass}}\">{{ config.title }}</div>\n @if (config.subtitle) {\n <div class=\"form-section-subtitle {{config.subtitleClass}}\">{{ config.subtitle }}</div>\n }\n @if (config.items.length) {\n <div class=\"form-section-items\">\n @for (item of config.items; track item.uuid) {\n <ng-container [ngs-form-item]=\"item\"></ng-container>\n }\n </div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgsFormsColumnComponent } from './components/shared-form-components/column';\nimport { NgsFormsComponentRegistryService } from './services/form-component-registry/form-component-registry.service';\nimport { NgsFormsFormArrayAddItemComponent } from './components/shared-form-components/form-array/add-item';\nimport { NgsFormsFormArrayContainerComponent } from './components/shared-form-components/form-array/container';\nimport { NgsFormsFormArrayListComponent } from './components/shared-form-components/form-array/list';\nimport { NgsFormsFormArrayRemoveItemComponent } from './components/shared-form-components/form-array/remove-item';\nimport { NgsFormsFormSectionComponent } from './components/shared-form-components/section/section.component';\nimport { NgsFormsRowComponent } from './components/shared-form-components/row';\nimport { NgsFormsTextDivComponent } from './components/shared-form-components/text-div';\nimport { NgsFormsFormGroupComponent } from './components/shared-form-components/form-group';\n\n\n@NgModule({\n imports: [CommonModule, FormsModule, ReactiveFormsModule],\n})\nexport class NgsFormsCoreModule {\n static registerCoreNgsFormComponents(\n registryService: NgsFormsComponentRegistryService\n ) {\n registryService.register(NgsFormsFormGroupComponent.key, NgsFormsFormGroupComponent);\n registryService.register(NgsFormsRowComponent.key, NgsFormsRowComponent);\n registryService.register(\n NgsFormsColumnComponent.key,\n NgsFormsColumnComponent\n );\n registryService.register(\n NgsFormsFormArrayContainerComponent.key,\n NgsFormsFormArrayContainerComponent\n );\n registryService.register(\n NgsFormsFormArrayAddItemComponent.key,\n NgsFormsFormArrayAddItemComponent\n );\n registryService.register(\n NgsFormsFormArrayRemoveItemComponent.key,\n NgsFormsFormArrayRemoveItemComponent\n );\n registryService.register(\n NgsFormsFormArrayListComponent.key,\n NgsFormsFormArrayListComponent\n );\n registryService.register(\n NgsFormsTextDivComponent.key,\n NgsFormsTextDivComponent\n );\n //registryService.register('content-html', NgsFormsHtmlContentComponent);\n registryService.register(\n NgsFormsFormSectionComponent.key,\n NgsFormsFormSectionComponent\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["uuidv4"],"mappings":";;;;;;;;MAIsB,aAAa,CAAA;AACd,IAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;IAEvC,aA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,CAFnB,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA;;4FAE7C,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AAC1D,iBAAA;;;ACjBD;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -202,6 +202,22 @@ interface IControlAddRemoveFunctionsBuilder {
202
202
  }
203
203
  declare const NgsFormsFormControlAddRemoveFunctions: IControlAddRemoveFunctionsBuilder;
204
204
 
205
+ /**
206
+ * Simple alternative to lodash.defaults.
207
+ * Returns a new object with properties from source assigned to target
208
+ * if the properties are undefined or missing on target.
209
+ */
210
+ declare function ngsDefaults<T extends object, U extends object>(target: T, source: U): T & U;
211
+
212
+ type NgsFormItemVisibilityFn = (params: NgsFormsFunctionParameters) => Observable<boolean> | boolean;
213
+ type NgsFormValidatorArrayBuilderFn = (params: NgsFormsFunctionParameters) => Observable<Array<ValidatorFn>> | Array<ValidatorFn>;
214
+ type NgsFormDisableFn = (params: NgsFormsFunctionParameters) => Observable<boolean> | boolean;
215
+ interface NgsFormsFunctionParameters {
216
+ injector: Injector;
217
+ formGroup: UntypedFormGroup;
218
+ service: NgsFormsService;
219
+ }
220
+
205
221
  declare class NgsFormItemController extends NgsSubscriber {
206
222
  private readonly injector;
207
223
  private readonly viewContainerRef;
@@ -392,5 +408,5 @@ declare class NgsFormsCoreModule {
392
408
  static ɵinj: i0.ɵɵInjectorDeclaration<NgsFormsCoreModule>;
393
409
  }
394
410
 
395
- export { NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA, NGS_FORMS_ITEM_INDEX, NgsFormComponent, NgsFormsBaseClassFormComponent, NgsFormsBaseClassFormInputComponent, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsBaseClassItemsContainerBase, NgsFormsColumnComponent, NgsFormsComponentRegistryService, NgsFormsCoreModule, NgsFormsFormArrayAddItemComponent, NgsFormsFormArrayContainerComponent, NgsFormsFormArrayInternalService, NgsFormsFormArrayListComponent, NgsFormsFormArrayRemoveItemComponent, NgsFormsFormControlAddRemoveFunctions, NgsFormsFormGroupComponent, NgsFormsFormItemDirective, NgsFormsFormItemWithVisibleAndValidatorsBase, NgsFormsFormSectionComponent, NgsFormsHtmlContentComponent, NgsFormsInternalService, NgsFormsRowComponent, NgsFormsService, NgsFormsTextDivComponent, NgsSubscriber };
396
- export type { INgsFormsFormControlAddRemove, NgsFormItemArrayAddItemConfig, NgsFormItemArrayConfig, NgsFormItemArrayRemoveItemConfig, NgsFormItemHtmlContentConfig, NgsFormItemRowConfig, NgsFormsFormArrayListConfig, NgsFormsFormConfig, NgsFormsFormErrorKeyValueMap, NgsFormsFormInputOption, NgsFormsFormItem, NgsFormsFormItemConfigBase, NgsFormsFormItemConfigBaseInput, NgsFormsFormItemConfigBaseInputWithOptions, NgsFormsFormItemConfigBaseItemWithNameAndValidators, NgsFormsFormItemConfigBaseTextInput, NgsFormsFormItemContainerConfigBase, NgsServerSideValidationErrorObjectType };
411
+ export { NGS_FORMS_CONTROL_ADD_REMOVE_FN, NGS_FORMS_ITEM_DATA, NGS_FORMS_ITEM_INDEX, NgsFormComponent, NgsFormsBaseClassFormComponent, NgsFormsBaseClassFormInputComponent, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsBaseClassItemsContainerBase, NgsFormsColumnComponent, NgsFormsComponentRegistryService, NgsFormsCoreModule, NgsFormsFormArrayAddItemComponent, NgsFormsFormArrayContainerComponent, NgsFormsFormArrayInternalService, NgsFormsFormArrayListComponent, NgsFormsFormArrayRemoveItemComponent, NgsFormsFormControlAddRemoveFunctions, NgsFormsFormGroupComponent, NgsFormsFormItemDirective, NgsFormsFormItemWithVisibleAndValidatorsBase, NgsFormsFormSectionComponent, NgsFormsHtmlContentComponent, NgsFormsInternalService, NgsFormsRowComponent, NgsFormsService, NgsFormsTextDivComponent, NgsSubscriber, ngsDefaults };
412
+ export type { INgsFormsFormControlAddRemove, NgsFormDisableFn, NgsFormItemArrayAddItemConfig, NgsFormItemArrayConfig, NgsFormItemArrayRemoveItemConfig, NgsFormItemHtmlContentConfig, NgsFormItemRowConfig, NgsFormItemVisibilityFn, NgsFormValidatorArrayBuilderFn, NgsFormsFormArrayListConfig, NgsFormsFormConfig, NgsFormsFormErrorKeyValueMap, NgsFormsFormInputOption, NgsFormsFormItem, NgsFormsFormItemConfigBase, NgsFormsFormItemConfigBaseInput, NgsFormsFormItemConfigBaseInputWithOptions, NgsFormsFormItemConfigBaseItemWithNameAndValidators, NgsFormsFormItemConfigBaseTextInput, NgsFormsFormItemContainerConfigBase, NgsFormsFunctionParameters, NgsServerSideValidationErrorObjectType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-simplicity/forms-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",