@ngx-formly/bootstrap 6.3.12 → 7.0.0-alpha.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.
Files changed (167) hide show
  1. package/README.md +1 -0
  2. package/addons/addons.component.d.ts +1 -1
  3. package/addons/addons.config.d.ts +2 -0
  4. package/addons/public_api.d.ts +1 -0
  5. package/checkbox/checkbox.config.d.ts +2 -0
  6. package/checkbox/checkbox.type.d.ts +1 -1
  7. package/checkbox/public_api.d.ts +1 -0
  8. package/esm2022/addons/addon.extension.mjs +9 -0
  9. package/esm2022/addons/addons.component.mjs +31 -0
  10. package/esm2022/addons/addons.config.mjs +9 -0
  11. package/esm2022/addons/addons.module.mjs +21 -0
  12. package/esm2022/addons/public_api.mjs +3 -0
  13. package/esm2022/checkbox/checkbox.config.mjs +17 -0
  14. package/esm2022/checkbox/checkbox.module.mjs +32 -0
  15. package/{esm2020 → esm2022}/checkbox/checkbox.type.mjs +8 -8
  16. package/esm2022/checkbox/public_api.mjs +4 -0
  17. package/esm2022/form-field/field.type.mjs +25 -0
  18. package/esm2022/form-field/form-field.config.mjs +12 -0
  19. package/esm2022/form-field/form-field.module.mjs +21 -0
  20. package/{esm2020 → esm2022}/form-field/form-field.wrapper.mjs +12 -15
  21. package/esm2022/form-field/public_api.mjs +4 -0
  22. package/esm2022/input/input.config.mjs +32 -0
  23. package/esm2022/input/input.module.mjs +32 -0
  24. package/{esm2020 → esm2022}/input/input.type.mjs +6 -6
  25. package/esm2022/input/public_api.mjs +4 -0
  26. package/esm2022/lib/bootstrap.config.mjs +21 -0
  27. package/esm2022/lib/bootstrap.mjs +3 -0
  28. package/esm2022/lib/bootstrap.module.mjs +45 -0
  29. package/esm2022/multicheckbox/multicheckbox.config.mjs +13 -0
  30. package/esm2022/multicheckbox/multicheckbox.module.mjs +36 -0
  31. package/esm2022/multicheckbox/multicheckbox.type.mjs +99 -0
  32. package/esm2022/multicheckbox/public_api.mjs +4 -0
  33. package/esm2022/radio/public_api.mjs +4 -0
  34. package/esm2022/radio/radio.config.mjs +13 -0
  35. package/esm2022/radio/radio.module.mjs +36 -0
  36. package/esm2022/radio/radio.type.mjs +82 -0
  37. package/esm2022/select/public_api.mjs +4 -0
  38. package/esm2022/select/select.config.mjs +14 -0
  39. package/esm2022/select/select.module.mjs +36 -0
  40. package/esm2022/select/select.type.mjs +144 -0
  41. package/esm2022/textarea/public_api.mjs +4 -0
  42. package/esm2022/textarea/textarea.config.mjs +13 -0
  43. package/esm2022/textarea/textarea.module.mjs +32 -0
  44. package/{esm2020 → esm2022}/textarea/textarea.type.mjs +6 -6
  45. package/fesm2022/ngx-formly-bootstrap-addons.mjs +70 -0
  46. package/fesm2022/ngx-formly-bootstrap-addons.mjs.map +1 -0
  47. package/{fesm2015 → fesm2022}/ngx-formly-bootstrap-checkbox.mjs +37 -47
  48. package/fesm2022/ngx-formly-bootstrap-checkbox.mjs.map +1 -0
  49. package/fesm2022/ngx-formly-bootstrap-form-field.mjs +127 -0
  50. package/fesm2022/ngx-formly-bootstrap-form-field.mjs.map +1 -0
  51. package/fesm2022/ngx-formly-bootstrap-input.mjs +134 -0
  52. package/fesm2022/ngx-formly-bootstrap-input.mjs.map +1 -0
  53. package/{fesm2020 → fesm2022}/ngx-formly-bootstrap-multicheckbox.mjs +35 -41
  54. package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -0
  55. package/{fesm2020 → fesm2022}/ngx-formly-bootstrap-radio.mjs +35 -41
  56. package/fesm2022/ngx-formly-bootstrap-radio.mjs.map +1 -0
  57. package/{fesm2020 → fesm2022}/ngx-formly-bootstrap-select.mjs +39 -80
  58. package/fesm2022/ngx-formly-bootstrap-select.mjs.map +1 -0
  59. package/fesm2022/ngx-formly-bootstrap-textarea.mjs +98 -0
  60. package/fesm2022/ngx-formly-bootstrap-textarea.mjs.map +1 -0
  61. package/fesm2022/ngx-formly-bootstrap.mjs +69 -0
  62. package/fesm2022/ngx-formly-bootstrap.mjs.map +1 -0
  63. package/form-field/field.type.d.ts +1 -1
  64. package/form-field/form-field.config.d.ts +2 -0
  65. package/form-field/form-field.wrapper.d.ts +1 -1
  66. package/form-field/public_api.d.ts +1 -0
  67. package/input/input.config.d.ts +2 -0
  68. package/input/input.type.d.ts +1 -1
  69. package/input/public_api.d.ts +1 -0
  70. package/lib/bootstrap.config.d.ts +1 -0
  71. package/lib/bootstrap.d.ts +1 -0
  72. package/multicheckbox/multicheckbox.config.d.ts +2 -0
  73. package/multicheckbox/multicheckbox.type.d.ts +1 -1
  74. package/multicheckbox/public_api.d.ts +1 -0
  75. package/package.json +40 -62
  76. package/radio/public_api.d.ts +1 -0
  77. package/radio/radio.config.d.ts +2 -0
  78. package/radio/radio.type.d.ts +3 -3
  79. package/select/public_api.d.ts +1 -0
  80. package/select/select.config.d.ts +2 -0
  81. package/select/select.type.d.ts +2 -8
  82. package/textarea/public_api.d.ts +1 -0
  83. package/textarea/textarea.config.d.ts +2 -0
  84. package/textarea/textarea.type.d.ts +1 -1
  85. package/addons/package.json +0 -10
  86. package/checkbox/package.json +0 -10
  87. package/esm2020/addons/addon.extension.mjs +0 -9
  88. package/esm2020/addons/addons.component.mjs +0 -31
  89. package/esm2020/addons/addons.module.mjs +0 -36
  90. package/esm2020/addons/public_api.mjs +0 -2
  91. package/esm2020/checkbox/checkbox.module.mjs +0 -57
  92. package/esm2020/checkbox/public_api.mjs +0 -3
  93. package/esm2020/form-field/field.type.mjs +0 -25
  94. package/esm2020/form-field/form-field.module.mjs +0 -43
  95. package/esm2020/form-field/public_api.mjs +0 -3
  96. package/esm2020/input/input.module.mjs +0 -87
  97. package/esm2020/input/public_api.mjs +0 -3
  98. package/esm2020/lib/bootstrap.mjs +0 -2
  99. package/esm2020/lib/bootstrap.module.mjs +0 -47
  100. package/esm2020/multicheckbox/multicheckbox.module.mjs +0 -53
  101. package/esm2020/multicheckbox/multicheckbox.type.mjs +0 -99
  102. package/esm2020/multicheckbox/public_api.mjs +0 -3
  103. package/esm2020/radio/public_api.mjs +0 -3
  104. package/esm2020/radio/radio.module.mjs +0 -53
  105. package/esm2020/radio/radio.type.mjs +0 -82
  106. package/esm2020/select/public_api.mjs +0 -3
  107. package/esm2020/select/select.module.mjs +0 -55
  108. package/esm2020/select/select.type.mjs +0 -179
  109. package/esm2020/textarea/public_api.mjs +0 -3
  110. package/esm2020/textarea/textarea.module.mjs +0 -49
  111. package/fesm2015/ngx-formly-bootstrap-addons.mjs +0 -80
  112. package/fesm2015/ngx-formly-bootstrap-addons.mjs.map +0 -1
  113. package/fesm2015/ngx-formly-bootstrap-checkbox.mjs.map +0 -1
  114. package/fesm2015/ngx-formly-bootstrap-form-field.mjs +0 -144
  115. package/fesm2015/ngx-formly-bootstrap-form-field.mjs.map +0 -1
  116. package/fesm2015/ngx-formly-bootstrap-input.mjs +0 -159
  117. package/fesm2015/ngx-formly-bootstrap-input.mjs.map +0 -1
  118. package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs +0 -154
  119. package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs.map +0 -1
  120. package/fesm2015/ngx-formly-bootstrap-radio.mjs +0 -136
  121. package/fesm2015/ngx-formly-bootstrap-radio.mjs.map +0 -1
  122. package/fesm2015/ngx-formly-bootstrap-select.mjs +0 -235
  123. package/fesm2015/ngx-formly-bootstrap-select.mjs.map +0 -1
  124. package/fesm2015/ngx-formly-bootstrap-textarea.mjs +0 -104
  125. package/fesm2015/ngx-formly-bootstrap-textarea.mjs.map +0 -1
  126. package/fesm2015/ngx-formly-bootstrap.mjs +0 -58
  127. package/fesm2015/ngx-formly-bootstrap.mjs.map +0 -1
  128. package/fesm2020/ngx-formly-bootstrap-addons.mjs +0 -78
  129. package/fesm2020/ngx-formly-bootstrap-addons.mjs.map +0 -1
  130. package/fesm2020/ngx-formly-bootstrap-checkbox.mjs +0 -140
  131. package/fesm2020/ngx-formly-bootstrap-checkbox.mjs.map +0 -1
  132. package/fesm2020/ngx-formly-bootstrap-form-field.mjs +0 -142
  133. package/fesm2020/ngx-formly-bootstrap-form-field.mjs.map +0 -1
  134. package/fesm2020/ngx-formly-bootstrap-input.mjs +0 -159
  135. package/fesm2020/ngx-formly-bootstrap-input.mjs.map +0 -1
  136. package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs.map +0 -1
  137. package/fesm2020/ngx-formly-bootstrap-radio.mjs.map +0 -1
  138. package/fesm2020/ngx-formly-bootstrap-select.mjs.map +0 -1
  139. package/fesm2020/ngx-formly-bootstrap-textarea.mjs +0 -104
  140. package/fesm2020/ngx-formly-bootstrap-textarea.mjs.map +0 -1
  141. package/fesm2020/ngx-formly-bootstrap.mjs +0 -58
  142. package/fesm2020/ngx-formly-bootstrap.mjs.map +0 -1
  143. package/form-field/package.json +0 -10
  144. package/input/package.json +0 -10
  145. package/multicheckbox/package.json +0 -10
  146. package/radio/package.json +0 -10
  147. package/select/package.json +0 -10
  148. package/textarea/package.json +0 -10
  149. /package/addons/{ngx-formly-bootstrap-addons.d.ts → index.d.ts} +0 -0
  150. /package/checkbox/{ngx-formly-bootstrap-checkbox.d.ts → index.d.ts} +0 -0
  151. /package/{esm2020 → esm2022}/addons/ngx-formly-bootstrap-addons.mjs +0 -0
  152. /package/{esm2020 → esm2022}/checkbox/ngx-formly-bootstrap-checkbox.mjs +0 -0
  153. /package/{esm2020 → esm2022}/form-field/ngx-formly-bootstrap-form-field.mjs +0 -0
  154. /package/{esm2020 → esm2022}/input/ngx-formly-bootstrap-input.mjs +0 -0
  155. /package/{esm2020 → esm2022}/multicheckbox/ngx-formly-bootstrap-multicheckbox.mjs +0 -0
  156. /package/{esm2020 → esm2022}/ngx-formly-bootstrap.mjs +0 -0
  157. /package/{esm2020 → esm2022}/public_api.mjs +0 -0
  158. /package/{esm2020 → esm2022}/radio/ngx-formly-bootstrap-radio.mjs +0 -0
  159. /package/{esm2020 → esm2022}/select/ngx-formly-bootstrap-select.mjs +0 -0
  160. /package/{esm2020 → esm2022}/textarea/ngx-formly-bootstrap-textarea.mjs +0 -0
  161. /package/form-field/{ngx-formly-bootstrap-form-field.d.ts → index.d.ts} +0 -0
  162. /package/{ngx-formly-bootstrap.d.ts → index.d.ts} +0 -0
  163. /package/input/{ngx-formly-bootstrap-input.d.ts → index.d.ts} +0 -0
  164. /package/multicheckbox/{ngx-formly-bootstrap-multicheckbox.d.ts → index.d.ts} +0 -0
  165. /package/radio/{ngx-formly-bootstrap-radio.d.ts → index.d.ts} +0 -0
  166. /package/select/{ngx-formly-bootstrap-select.d.ts → index.d.ts} +0 -0
  167. /package/textarea/{ngx-formly-bootstrap-textarea.d.ts → index.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-radio.mjs","sources":["../../../../src/ui/bootstrap/radio/src/radio.type.ts","../../../../src/ui/bootstrap/radio/src/radio.module.ts","../../../../src/ui/bootstrap/radio/src/ngx-formly-bootstrap-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\nimport { FormControl } from '@angular/forms';\n\ninterface RadioProps extends FormlyFieldProps {\n formCheck?: 'default' | 'inline';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\n class=\"form-check\"\n [class.form-check-inline]=\"props.formCheck === 'inline'\"\n >\n <input\n type=\"radio\"\n [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"option.disabled ? disabledControl : formControl\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const,\n },\n };\n\n get disabledControl() {\n return new FormControl({ value: this.formControl.value, disabled: true });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA2CM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AA9B5E,IAAA,WAAA,GAAA;;QA+BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,SAAS,EAAE,SAAkB;AAC9B,aAAA;SACF,CAAC;KAKH;AAHC,IAAA,IAAI,eAAe,GAAA;AACjB,QAAA,OAAO,IAAI,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;KAC3E;;8GATU,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA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,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC3BD;;AAEG;;;;"}
@@ -1,235 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
6
- import { SelectControlValueAccessor, ReactiveFormsModule } from '@angular/forms';
7
- import * as i3 from '@ngx-formly/core';
8
- import { FormlyModule } from '@ngx-formly/core';
9
- import * as i4 from '@ngx-formly/core/select';
10
- import { FormlySelectModule } from '@ngx-formly/core/select';
11
- import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
12
- import { take } from 'rxjs/operators';
13
-
14
- class FormlyFieldSelect extends FieldType {
15
- constructor(ngZone, hostContainerRef) {
16
- super(hostContainerRef);
17
- this.ngZone = ngZone;
18
- this.defaultOptions = {
19
- props: {
20
- compareWith(o1, o2) {
21
- return o1 === o2;
22
- },
23
- },
24
- };
25
- }
26
- // workaround for https://github.com/angular/angular/issues/10010
27
- /**
28
- * TODO: Check if this is still needed
29
- */
30
- set selectAccessor(s) {
31
- if (!s) {
32
- return;
33
- }
34
- const writeValue = s.writeValue.bind(s);
35
- if (s._getOptionId(s.value) === null) {
36
- writeValue(s.value);
37
- }
38
- s.writeValue = (value) => {
39
- const id = s._idCounter;
40
- writeValue(value);
41
- if (value === null) {
42
- this.ngZone.onStable
43
- .asObservable()
44
- .pipe(take(1))
45
- .subscribe(() => {
46
- if (id !== s._idCounter &&
47
- s._getOptionId(value) === null &&
48
- s._elementRef.nativeElement.selectedIndex !== -1) {
49
- writeValue(value);
50
- }
51
- });
52
- }
53
- };
54
- }
55
- }
56
- FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldSelect, deps: [{ token: i0.NgZone }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
57
- FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldSelect, selector: "formly-field-select", viewQueries: [{ propertyName: "selectAccessor", first: true, predicate: SelectControlValueAccessor, descendants: true }], usesInheritance: true, ngImport: i0, template: `
58
- <ng-template #fieldTypeTemplate>
59
- <select
60
- *ngIf="props.multiple; else singleSelect"
61
- class="form-select"
62
- multiple
63
- [formControl]="formControl"
64
- [compareWith]="props.compareWith"
65
- [class.is-invalid]="showError"
66
- [formlyAttributes]="field"
67
- [attr.aria-describedby]="id + '-formly-validation-error'"
68
- [attr.aria-invalid]="showError"
69
- >
70
- <ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
71
- <ng-container *ngFor="let opt of opts">
72
- <option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
73
- {{ opt.label }}
74
- </option>
75
- <ng-template #optgroup>
76
- <optgroup [label]="opt.label">
77
- <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
78
- {{ child.label }}
79
- </option>
80
- </optgroup>
81
- </ng-template>
82
- </ng-container>
83
- </ng-container>
84
- </select>
85
-
86
- <ng-template #singleSelect>
87
- <select
88
- class="form-select"
89
- [formControl]="formControl"
90
- [compareWith]="props.compareWith"
91
- [class.is-invalid]="showError"
92
- [formlyAttributes]="field"
93
- [attr.aria-describedby]="id + '-formly-validation-error'"
94
- [attr.aria-invalid]="showError"
95
- >
96
- <option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
97
- <ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
98
- <ng-container *ngFor="let opt of opts">
99
- <option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
100
- {{ opt.label }}
101
- </option>
102
- <ng-template #optgroup>
103
- <optgroup [label]="opt.label">
104
- <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
105
- {{ child.label }}
106
- </option>
107
- </optgroup>
108
- </ng-template>
109
- </ng-container>
110
- </ng-container>
111
- </select>
112
- </ng-template>
113
- </ng-template>
114
- `, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }], pipes: { "async": i1.AsyncPipe, "formlySelectOptions": i4.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldSelect, decorators: [{
116
- type: Component,
117
- args: [{
118
- selector: 'formly-field-select',
119
- template: `
120
- <ng-template #fieldTypeTemplate>
121
- <select
122
- *ngIf="props.multiple; else singleSelect"
123
- class="form-select"
124
- multiple
125
- [formControl]="formControl"
126
- [compareWith]="props.compareWith"
127
- [class.is-invalid]="showError"
128
- [formlyAttributes]="field"
129
- [attr.aria-describedby]="id + '-formly-validation-error'"
130
- [attr.aria-invalid]="showError"
131
- >
132
- <ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
133
- <ng-container *ngFor="let opt of opts">
134
- <option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
135
- {{ opt.label }}
136
- </option>
137
- <ng-template #optgroup>
138
- <optgroup [label]="opt.label">
139
- <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
140
- {{ child.label }}
141
- </option>
142
- </optgroup>
143
- </ng-template>
144
- </ng-container>
145
- </ng-container>
146
- </select>
147
-
148
- <ng-template #singleSelect>
149
- <select
150
- class="form-select"
151
- [formControl]="formControl"
152
- [compareWith]="props.compareWith"
153
- [class.is-invalid]="showError"
154
- [formlyAttributes]="field"
155
- [attr.aria-describedby]="id + '-formly-validation-error'"
156
- [attr.aria-invalid]="showError"
157
- >
158
- <option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
159
- <ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
160
- <ng-container *ngFor="let opt of opts">
161
- <option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
162
- {{ opt.label }}
163
- </option>
164
- <ng-template #optgroup>
165
- <optgroup [label]="opt.label">
166
- <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
167
- {{ child.label }}
168
- </option>
169
- </optgroup>
170
- </ng-template>
171
- </ng-container>
172
- </ng-container>
173
- </select>
174
- </ng-template>
175
- </ng-template>
176
- `,
177
- changeDetection: ChangeDetectionStrategy.OnPush,
178
- }]
179
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ViewContainerRef }]; }, propDecorators: { selectAccessor: [{
180
- type: ViewChild,
181
- args: [SelectControlValueAccessor]
182
- }] } });
183
-
184
- class FormlyBootstrapSelectModule {
185
- }
186
- FormlyBootstrapSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
187
- FormlyBootstrapSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapSelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
188
- ReactiveFormsModule,
189
- FormlyBootstrapFormFieldModule,
190
- FormlySelectModule, i3.FormlyModule] });
191
- FormlyBootstrapSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapSelectModule, imports: [[
192
- CommonModule,
193
- ReactiveFormsModule,
194
- FormlyBootstrapFormFieldModule,
195
- FormlySelectModule,
196
- FormlyModule.forChild({
197
- types: [
198
- {
199
- name: 'select',
200
- component: FormlyFieldSelect,
201
- wrappers: ['form-field'],
202
- },
203
- { name: 'enum', extends: 'select' },
204
- ],
205
- }),
206
- ]] });
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapSelectModule, decorators: [{
208
- type: NgModule,
209
- args: [{
210
- declarations: [FormlyFieldSelect],
211
- imports: [
212
- CommonModule,
213
- ReactiveFormsModule,
214
- FormlyBootstrapFormFieldModule,
215
- FormlySelectModule,
216
- FormlyModule.forChild({
217
- types: [
218
- {
219
- name: 'select',
220
- component: FormlyFieldSelect,
221
- wrappers: ['form-field'],
222
- },
223
- { name: 'enum', extends: 'select' },
224
- ],
225
- }),
226
- ],
227
- }]
228
- }] });
229
-
230
- /**
231
- * Generated bundle index. Do not edit.
232
- */
233
-
234
- export { FormlyBootstrapSelectModule, FormlyFieldSelect };
235
- //# sourceMappingURL=ngx-formly-bootstrap-select.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-select.mjs","sources":["../../../../src/ui/bootstrap/select/src/select.type.ts","../../../../src/ui/bootstrap/select/src/select.module.ts","../../../../src/ui/bootstrap/select/src/ngx-formly-bootstrap-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, NgZone, Type, ViewContainerRef } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\nimport { take } from 'rxjs/operators';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n compareWith?: (o1: any, o2: any) => boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <ng-template #fieldTypeTemplate>\n <select\n *ngIf=\"props.multiple; else singleSelect\"\n class=\"form-select\"\n multiple\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select\n class=\"form-select\"\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-container>\n </select>\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n /**\n * TODO: Check if this is still needed\n */\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) {\n return;\n }\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable\n .asObservable()\n .pipe(take(1))\n .subscribe(() => {\n if (\n id !== s._idCounter &&\n s._getOptionId(value) === null &&\n s._elementRef.nativeElement.selectedIndex !== -1\n ) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone, hostContainerRef: ViewContainerRef) {\n super(hostContainerRef);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AA8EM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;IA2C5E,WAAoB,CAAA,MAAc,EAAE,gBAAkC,EAAA;QACpE,KAAK,CAAC,gBAAgB,CAAC,CAAC;AADN,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QA1CzB,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;AACF,aAAA;SACF,CAAC;KAsCD;;AAnCD;;AAEG;IACH,IAA2C,cAAc,CAAC,CAAM,EAAA;QAC9D,IAAI,CAAC,CAAC,EAAE;YACN,OAAO;AACR,SAAA;QAED,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;AACpC,YAAA,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACrB,SAAA;AAED,QAAA,CAAC,CAAC,UAAU,GAAG,CAAC,KAAU,KAAI;AAC5B,YAAA,MAAM,EAAE,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AAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC5BD;;AAEG;;;;"}
@@ -1,104 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import * as i2 from '@ngx-formly/core';
5
- import { FormlyModule } from '@ngx-formly/core';
6
- import * as i1 from '@angular/forms';
7
- import { ReactiveFormsModule } from '@angular/forms';
8
- import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
9
-
10
- class FormlyFieldTextArea extends FieldType {
11
- constructor() {
12
- super(...arguments);
13
- this.defaultOptions = {
14
- props: {
15
- cols: 1,
16
- rows: 1,
17
- },
18
- };
19
- }
20
- }
21
- FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
22
- FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldTextArea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
23
- <ng-template #fieldTypeTemplate>
24
- <textarea
25
- [formControl]="formControl"
26
- [cols]="props.cols"
27
- [rows]="props.rows"
28
- class="form-control"
29
- [class.is-invalid]="showError"
30
- [formlyAttributes]="field"
31
- [attr.aria-describedby]="id + '-formly-validation-error'"
32
- [attr.aria-invalid]="showError"
33
- ></textarea>
34
- </ng-template>
35
- `, isInline: true, directives: [{ type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
37
- type: Component,
38
- args: [{
39
- selector: 'formly-field-textarea',
40
- template: `
41
- <ng-template #fieldTypeTemplate>
42
- <textarea
43
- [formControl]="formControl"
44
- [cols]="props.cols"
45
- [rows]="props.rows"
46
- class="form-control"
47
- [class.is-invalid]="showError"
48
- [formlyAttributes]="field"
49
- [attr.aria-describedby]="id + '-formly-validation-error'"
50
- [attr.aria-invalid]="showError"
51
- ></textarea>
52
- </ng-template>
53
- `,
54
- changeDetection: ChangeDetectionStrategy.OnPush,
55
- }]
56
- }] });
57
-
58
- class FormlyBootstrapTextAreaModule {
59
- }
60
- FormlyBootstrapTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
61
- FormlyBootstrapTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
62
- ReactiveFormsModule,
63
- FormlyBootstrapFormFieldModule, i2.FormlyModule] });
64
- FormlyBootstrapTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapTextAreaModule, imports: [[
65
- CommonModule,
66
- ReactiveFormsModule,
67
- FormlyBootstrapFormFieldModule,
68
- FormlyModule.forChild({
69
- types: [
70
- {
71
- name: 'textarea',
72
- component: FormlyFieldTextArea,
73
- wrappers: ['form-field'],
74
- },
75
- ],
76
- }),
77
- ]] });
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapTextAreaModule, decorators: [{
79
- type: NgModule,
80
- args: [{
81
- declarations: [FormlyFieldTextArea],
82
- imports: [
83
- CommonModule,
84
- ReactiveFormsModule,
85
- FormlyBootstrapFormFieldModule,
86
- FormlyModule.forChild({
87
- types: [
88
- {
89
- name: 'textarea',
90
- component: FormlyFieldTextArea,
91
- wrappers: ['form-field'],
92
- },
93
- ],
94
- }),
95
- ],
96
- }]
97
- }] });
98
-
99
- /**
100
- * Generated bundle index. Do not edit.
101
- */
102
-
103
- export { FormlyBootstrapTextAreaModule, FormlyFieldTextArea };
104
- //# sourceMappingURL=ngx-formly-bootstrap-textarea.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-textarea.mjs","sources":["../../../../src/ui/bootstrap/textarea/src/textarea.type.ts","../../../../src/ui/bootstrap/textarea/src/textarea.module.ts","../../../../src/ui/bootstrap/textarea/src/ngx-formly-bootstrap-textarea.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface TextAreaProps extends FormlyFieldProps {\n cols?: number;\n rows?: number;\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-template #fieldTypeTemplate>\n <textarea\n [formControl]=\"formControl\"\n [cols]=\"props.cols\"\n [rows]=\"props.rows\"\n class=\"form-control\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n ></textarea>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldTextArea } from './textarea.type';\n\n@NgModule({\n declarations: [FormlyFieldTextArea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AA+BM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AAlBlF,IAAA,WAAA,GAAA;;QAmBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,CAAC;AACR,aAAA;SACF,CAAC;KACH;;iHAPY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,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AAA,EAAA,CAAA,CAAA;4HAA7B,6BAA6B,EAAA,YAAA,EAAA,CAjBzB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,YAAY;QACZ,mBAAmB;AAEnB,QAAA,8BAA8B,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAYrB,6BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAhB/B,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,mBAAmB;YAEnB,8BAA8B;YAC9B,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;4FAEU,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAlBzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;ACzBD;;AAEG;;;;"}
@@ -1,58 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { NgModule } from '@angular/core';
3
- import { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
4
- import { FormlyBootstrapInputModule } from '@ngx-formly/bootstrap/input';
5
- import { FormlyBootstrapTextAreaModule } from '@ngx-formly/bootstrap/textarea';
6
- import { FormlyBootstrapRadioModule } from '@ngx-formly/bootstrap/radio';
7
- import { FormlyBootstrapCheckboxModule } from '@ngx-formly/bootstrap/checkbox';
8
- import { FormlyBootstrapMultiCheckboxModule } from '@ngx-formly/bootstrap/multicheckbox';
9
- import { FormlyBootstrapSelectModule } from '@ngx-formly/bootstrap/select';
10
- import { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';
11
-
12
- class FormlyBootstrapModule {
13
- }
14
- FormlyBootstrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15
- FormlyBootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapModule, imports: [FormlyBootstrapFormFieldModule,
16
- FormlyBootstrapInputModule,
17
- FormlyBootstrapTextAreaModule,
18
- FormlyBootstrapRadioModule,
19
- FormlyBootstrapCheckboxModule,
20
- FormlyBootstrapMultiCheckboxModule,
21
- FormlyBootstrapSelectModule,
22
- FormlyBootstrapAddonsModule] });
23
- FormlyBootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapModule, imports: [[
24
- FormlyBootstrapFormFieldModule,
25
- FormlyBootstrapInputModule,
26
- FormlyBootstrapTextAreaModule,
27
- FormlyBootstrapRadioModule,
28
- FormlyBootstrapCheckboxModule,
29
- FormlyBootstrapMultiCheckboxModule,
30
- FormlyBootstrapSelectModule,
31
- FormlyBootstrapAddonsModule,
32
- ]] });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapModule, decorators: [{
34
- type: NgModule,
35
- args: [{
36
- imports: [
37
- FormlyBootstrapFormFieldModule,
38
- FormlyBootstrapInputModule,
39
- FormlyBootstrapTextAreaModule,
40
- FormlyBootstrapRadioModule,
41
- FormlyBootstrapCheckboxModule,
42
- FormlyBootstrapMultiCheckboxModule,
43
- FormlyBootstrapSelectModule,
44
- FormlyBootstrapAddonsModule,
45
- ],
46
- }]
47
- }] });
48
-
49
- /*
50
- * Public API Surface of bootstrap
51
- */
52
-
53
- /**
54
- * Generated bundle index. Do not edit.
55
- */
56
-
57
- export { FormlyBootstrapModule };
58
- //# sourceMappingURL=ngx-formly-bootstrap.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-bootstrap.mjs","sources":["../../../../src/ui/bootstrap/src/lib/bootstrap.module.ts","../../../../src/ui/bootstrap/src/public_api.ts","../../../../src/ui/bootstrap/src/ngx-formly-bootstrap.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyBootstrapInputModule } from '@ngx-formly/bootstrap/input';\nimport { FormlyBootstrapTextAreaModule } from '@ngx-formly/bootstrap/textarea';\nimport { FormlyBootstrapRadioModule } from '@ngx-formly/bootstrap/radio';\nimport { FormlyBootstrapCheckboxModule } from '@ngx-formly/bootstrap/checkbox';\nimport { FormlyBootstrapMultiCheckboxModule } from '@ngx-formly/bootstrap/multicheckbox';\nimport { FormlyBootstrapSelectModule } from '@ngx-formly/bootstrap/select';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n imports: [\n FormlyBootstrapFormFieldModule,\n FormlyBootstrapInputModule,\n FormlyBootstrapTextAreaModule,\n FormlyBootstrapRadioModule,\n FormlyBootstrapCheckboxModule,\n FormlyBootstrapMultiCheckboxModule,\n FormlyBootstrapSelectModule,\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n","/*\n * Public API Surface of bootstrap\n */\n\nexport * from './lib/bootstrap';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,qBAAqB,CAAA;;mHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,8BAA8B;QAC9B,0BAA0B;QAC1B,6BAA6B;QAC7B,0BAA0B;QAC1B,6BAA6B;QAC7B,kCAAkC;QAClC,2BAA2B;QAC3B,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAGlB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAXvB,OAAA,EAAA,CAAA;YACP,8BAA8B;YAC9B,0BAA0B;YAC1B,6BAA6B;YAC7B,0BAA0B;YAC1B,6BAA6B;YAC7B,kCAAkC;YAClC,2BAA2B;YAC3B,2BAA2B;SAC5B,CAAA,EAAA,CAAA,CAAA;4FAEU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAZjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,8BAA8B;wBAC9B,0BAA0B;wBAC1B,6BAA6B;wBAC7B,0BAA0B;wBAC1B,6BAA6B;wBAC7B,kCAAkC;wBAClC,2BAA2B;wBAC3B,2BAA2B;AAC5B,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,78 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i1$1 from '@ngx-formly/core';
6
- import { FieldWrapper, FormlyModule } from '@ngx-formly/core';
7
- import { ReactiveFormsModule } from '@angular/forms';
8
-
9
- class FormlyWrapperAddons extends FieldWrapper {
10
- constructor(hostContainerRef) {
11
- super();
12
- this.hostContainerRef = hostContainerRef;
13
- }
14
- set content(templateRef) {
15
- if (templateRef && this.hostContainerRef) {
16
- this.hostContainerRef.createEmbeddedView(templateRef);
17
- }
18
- }
19
- addonRightClick($event) {
20
- this.props.addonRight.onClick?.(this.field, $event);
21
- }
22
- addonLeftClick($event) {
23
- this.props.addonLeft.onClick?.(this.field, $event);
24
- }
25
- }
26
- FormlyWrapperAddons.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyWrapperAddons, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
27
- FormlyWrapperAddons.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyWrapperAddons, selector: "formly-wrapper-addons", viewQueries: [{ propertyName: "content", first: true, predicate: ["fieldTypeTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n <div\n class=\"input-group-text\"\n *ngIf=\"props.addonLeft\"\n [class.input-group-btn]=\"props.addonLeft.onClick\"\n (click)=\"addonLeftClick($event)\"\n >\n <i [ngClass]=\"props.addonLeft.class\" *ngIf=\"props.addonLeft.class\"></i>\n <span *ngIf=\"props.addonLeft.text\">{{ props.addonLeft.text }}</span>\n </div>\n <ng-container #fieldComponent></ng-container>\n <div\n class=\"input-group-text\"\n *ngIf=\"props.addonRight\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n <i [ngClass]=\"props.addonRight.class\" *ngIf=\"props.addonRight.class\"></i>\n <span *ngIf=\"props.addonRight.text\">{{ props.addonRight.text }}</span>\n </div>\n </div>\n</ng-template>\n", styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyWrapperAddons, decorators: [{
29
- type: Component,
30
- args: [{ selector: 'formly-wrapper-addons', encapsulation: ViewEncapsulation.None, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n <div\n class=\"input-group-text\"\n *ngIf=\"props.addonLeft\"\n [class.input-group-btn]=\"props.addonLeft.onClick\"\n (click)=\"addonLeftClick($event)\"\n >\n <i [ngClass]=\"props.addonLeft.class\" *ngIf=\"props.addonLeft.class\"></i>\n <span *ngIf=\"props.addonLeft.text\">{{ props.addonLeft.text }}</span>\n </div>\n <ng-container #fieldComponent></ng-container>\n <div\n class=\"input-group-text\"\n *ngIf=\"props.addonRight\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n <i [ngClass]=\"props.addonRight.class\" *ngIf=\"props.addonRight.class\"></i>\n <span *ngIf=\"props.addonRight.text\">{{ props.addonRight.text }}</span>\n </div>\n </div>\n</ng-template>\n", styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"] }]
31
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { content: [{
32
- type: ViewChild,
33
- args: ['fieldTypeTemplate', { static: true }]
34
- }] } });
35
-
36
- function addonsExtension(field) {
37
- if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {
38
- return;
39
- }
40
- if (field.props.addonLeft || field.props.addonRight) {
41
- field.wrappers = [...(field.wrappers || []), 'addons'];
42
- }
43
- }
44
-
45
- class FormlyBootstrapAddonsModule {
46
- }
47
- FormlyBootstrapAddonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
48
- FormlyBootstrapAddonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapAddonsModule, declarations: [FormlyWrapperAddons], imports: [CommonModule,
49
- ReactiveFormsModule, i1$1.FormlyModule] });
50
- FormlyBootstrapAddonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapAddonsModule, imports: [[
51
- CommonModule,
52
- ReactiveFormsModule,
53
- FormlyModule.forChild({
54
- wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],
55
- extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],
56
- }),
57
- ]] });
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyBootstrapAddonsModule, decorators: [{
59
- type: NgModule,
60
- args: [{
61
- declarations: [FormlyWrapperAddons],
62
- imports: [
63
- CommonModule,
64
- ReactiveFormsModule,
65
- FormlyModule.forChild({
66
- wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],
67
- extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],
68
- }),
69
- ],
70
- }]
71
- }] });
72
-
73
- /**
74
- * Generated bundle index. Do not edit.
75
- */
76
-
77
- export { FormlyBootstrapAddonsModule };
78
- //# sourceMappingURL=ngx-formly-bootstrap-addons.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-addons.mjs","sources":["../../../../src/ui/bootstrap/addons/src/addons.component.ts","../../../../src/ui/bootstrap/addons/src/addons.component.html","../../../../src/ui/bootstrap/addons/src/addon.extension.ts","../../../../src/ui/bootstrap/addons/src/addons.module.ts","../../../../src/ui/bootstrap/addons/src/ngx-formly-bootstrap-addons.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { FormlyFieldConfig, FieldTypeConfig, FieldWrapper } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface AddonsProps extends FormlyFieldProps {\n addonRight?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n addonLeft?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n}\n\n@Component({\n selector: 'formly-wrapper-addons',\n templateUrl: './addons.component.html',\n styleUrls: ['./addons.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperAddons extends FieldWrapper<FieldTypeConfig<AddonsProps>> {\n @ViewChild('fieldTypeTemplate', { static: true }) set content(templateRef: TemplateRef<any>) {\n if (templateRef && this.hostContainerRef) {\n this.hostContainerRef.createEmbeddedView(templateRef);\n }\n }\n\n constructor(private hostContainerRef?: ViewContainerRef) {\n super();\n }\n\n addonRightClick($event: any) {\n this.props.addonRight.onClick?.(this.field, $event);\n }\n\n addonLeftClick($event: any) {\n this.props.addonLeft.onClick?.(this.field, $event);\n }\n}\n","<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n <div\n class=\"input-group-text\"\n *ngIf=\"props.addonLeft\"\n [class.input-group-btn]=\"props.addonLeft.onClick\"\n (click)=\"addonLeftClick($event)\"\n >\n <i [ngClass]=\"props.addonLeft.class\" *ngIf=\"props.addonLeft.class\"></i>\n <span *ngIf=\"props.addonLeft.text\">{{ props.addonLeft.text }}</span>\n </div>\n <ng-container #fieldComponent></ng-container>\n <div\n class=\"input-group-text\"\n *ngIf=\"props.addonRight\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n <i [ngClass]=\"props.addonRight.class\" *ngIf=\"props.addonRight.class\"></i>\n <span *ngIf=\"props.addonRight.text\">{{ props.addonRight.text }}</span>\n </div>\n </div>\n</ng-template>\n","import { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport function addonsExtension(field: FormlyFieldConfig) {\n if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {\n return;\n }\n\n if (field.props.addonLeft || field.props.addonRight) {\n field.wrappers = [...(field.wrappers || []), 'addons'];\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyWrapperAddons } from './addons.component';\nimport { addonsExtension } from './addon.extension';\n\n@NgModule({\n declarations: [FormlyWrapperAddons],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyModule.forChild({\n wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],\n extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],\n }),\n ],\n})\nexport class FormlyBootstrapAddonsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AAuBM,MAAO,mBAAoB,SAAQ,YAA0C,CAAA;AAOjF,IAAA,WAAA,CAAoB,gBAAmC,EAAA;AACrD,QAAA,KAAK,EAAE,CAAC;QADU,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAmB;KAEtD;IARD,IAAsD,OAAO,CAAC,WAA6B,EAAA;AACzF,QAAA,IAAI,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACxC,YAAA,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACvD,SAAA;KACF;AAMD,IAAA,eAAe,CAAC,MAAW,EAAA;AACzB,QAAA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,IAAI,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