@rxap/material-form-system 12.1.0 → 13.0.0-next.0
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/esm2020/index.mjs +12 -0
- package/esm2020/lib/chip-input-adapter.directive.mjs +50 -0
- package/esm2020/lib/chip-list-iterator.directive.mjs +107 -0
- package/esm2020/lib/compare-with.directive.mjs +65 -0
- package/esm2020/lib/control-error.directive.mjs +89 -0
- package/esm2020/lib/control-errors.directive.mjs +79 -0
- package/esm2020/lib/form-controls/form-controls.component.mjs +123 -0
- package/esm2020/lib/form-controls/form-controls.component.module.mjs +42 -0
- package/esm2020/lib/form-field-hide-show.directive.mjs +151 -0
- package/esm2020/lib/input-clear-button.directive.mjs +61 -0
- package/esm2020/lib/material-form-system.module.mjs +33 -0
- package/esm2020/lib/required.directive.mjs +45 -0
- package/esm2020/rxap-material-form-system.mjs +5 -0
- package/fesm2015/rxap-material-form-system.mjs +831 -0
- package/fesm2015/rxap-material-form-system.mjs.map +1 -0
- package/{fesm2015/rxap-material-form-system.js → fesm2020/rxap-material-form-system.mjs} +93 -117
- package/fesm2020/rxap-material-form-system.mjs.map +1 -0
- package/package.json +41 -27
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-material-form-system.umd.js +0 -1253
- package/bundles/rxap-material-form-system.umd.js.map +0 -1
- package/esm2015/index.js +0 -12
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/chip-input-adapter.directive.js +0 -52
- package/esm2015/lib/chip-input-adapter.directive.js.map +0 -1
- package/esm2015/lib/chip-list-iterator.directive.js +0 -108
- package/esm2015/lib/chip-list-iterator.directive.js.map +0 -1
- package/esm2015/lib/compare-with.directive.js +0 -65
- package/esm2015/lib/compare-with.directive.js.map +0 -1
- package/esm2015/lib/control-error.directive.js +0 -91
- package/esm2015/lib/control-error.directive.js.map +0 -1
- package/esm2015/lib/control-errors.directive.js +0 -81
- package/esm2015/lib/control-errors.directive.js.map +0 -1
- package/esm2015/lib/form-controls/form-controls.component.js +0 -129
- package/esm2015/lib/form-controls/form-controls.component.js.map +0 -1
- package/esm2015/lib/form-controls/form-controls.component.module.js +0 -42
- package/esm2015/lib/form-controls/form-controls.component.module.js.map +0 -1
- package/esm2015/lib/form-field-hide-show.directive.js +0 -161
- package/esm2015/lib/form-field-hide-show.directive.js.map +0 -1
- package/esm2015/lib/input-clear-button.directive.js +0 -61
- package/esm2015/lib/input-clear-button.directive.js.map +0 -1
- package/esm2015/lib/material-form-system.module.js +0 -33
- package/esm2015/lib/material-form-system.module.js.map +0 -1
- package/esm2015/lib/required.directive.js +0 -46
- package/esm2015/lib/required.directive.js.map +0 -1
- package/esm2015/rxap-material-form-system.js +0 -5
- package/esm2015/rxap-material-form-system.js.map +0 -1
- package/fesm2015/rxap-material-form-system.js.map +0 -1
|
@@ -43,8 +43,7 @@ class ControlErrorDirective {
|
|
|
43
43
|
return true;
|
|
44
44
|
}
|
|
45
45
|
ngAfterContentInit() {
|
|
46
|
-
|
|
47
|
-
const control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
46
|
+
const control = this.formField._control.ngControl?.control;
|
|
48
47
|
if (control) {
|
|
49
48
|
this._control = control;
|
|
50
49
|
this._subscription = controlErrorChanges$(control)
|
|
@@ -70,17 +69,16 @@ class ControlErrorDirective {
|
|
|
70
69
|
this.cdr.detectChanges();
|
|
71
70
|
}
|
|
72
71
|
ngOnDestroy() {
|
|
73
|
-
|
|
74
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
72
|
+
this._subscription?.unsubscribe();
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
|
-
ControlErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
78
|
-
ControlErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
75
|
+
ControlErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorDirective, deps: [{ token: MAT_FORM_FIELD }, { token: TemplateRef }, { token: ViewContainerRef }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
76
|
+
ControlErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ControlErrorDirective, selector: "[rxapControlError]", inputs: { key: ["rxapControlErrorKey", "key"] }, ngImport: i0 });
|
|
79
77
|
__decorate([
|
|
80
78
|
Required,
|
|
81
79
|
__metadata("design:type", String)
|
|
82
80
|
], ControlErrorDirective.prototype, "key", void 0);
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorDirective, decorators: [{
|
|
84
82
|
type: Directive,
|
|
85
83
|
args: [{
|
|
86
84
|
// tslint:disable-next-line:directive-selector
|
|
@@ -104,10 +102,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
104
102
|
}] } });
|
|
105
103
|
class ControlErrorDirectiveModule {
|
|
106
104
|
}
|
|
107
|
-
ControlErrorDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
108
|
-
ControlErrorDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
109
|
-
ControlErrorDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
105
|
+
ControlErrorDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
106
|
+
ControlErrorDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorDirectiveModule, declarations: [ControlErrorDirective], exports: [ControlErrorDirective] });
|
|
107
|
+
ControlErrorDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorDirectiveModule });
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorDirectiveModule, decorators: [{
|
|
111
109
|
type: NgModule,
|
|
112
110
|
args: [{
|
|
113
111
|
declarations: [ControlErrorDirective],
|
|
@@ -126,8 +124,7 @@ class ControlErrorsDirective {
|
|
|
126
124
|
return true;
|
|
127
125
|
}
|
|
128
126
|
ngAfterContentInit() {
|
|
129
|
-
|
|
130
|
-
const control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
127
|
+
const control = this.formField._control.ngControl?.control;
|
|
131
128
|
if (control) {
|
|
132
129
|
this._control = control;
|
|
133
130
|
this._subscription = controlErrorChanges$(control)
|
|
@@ -152,13 +149,12 @@ class ControlErrorsDirective {
|
|
|
152
149
|
this.cdr.detectChanges();
|
|
153
150
|
}
|
|
154
151
|
ngOnDestroy() {
|
|
155
|
-
|
|
156
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
152
|
+
this._subscription?.unsubscribe();
|
|
157
153
|
}
|
|
158
154
|
}
|
|
159
|
-
ControlErrorsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
160
|
-
ControlErrorsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
155
|
+
ControlErrorsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorsDirective, deps: [{ token: MAT_FORM_FIELD }, { token: TemplateRef }, { token: ViewContainerRef }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
156
|
+
ControlErrorsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ControlErrorsDirective, selector: "[rxapControlErrors]", ngImport: i0 });
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorsDirective, decorators: [{
|
|
162
158
|
type: Directive,
|
|
163
159
|
args: [{
|
|
164
160
|
// tslint:disable-next-line:directive-selector
|
|
@@ -179,10 +175,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
179
175
|
}] }]; } });
|
|
180
176
|
class ControlErrorsDirectiveModule {
|
|
181
177
|
}
|
|
182
|
-
ControlErrorsDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
183
|
-
ControlErrorsDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
184
|
-
ControlErrorsDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
178
|
+
ControlErrorsDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorsDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
179
|
+
ControlErrorsDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorsDirectiveModule, declarations: [ControlErrorsDirective], exports: [ControlErrorsDirective] });
|
|
180
|
+
ControlErrorsDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorsDirectiveModule });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ControlErrorsDirectiveModule, decorators: [{
|
|
186
182
|
type: NgModule,
|
|
187
183
|
args: [{
|
|
188
184
|
declarations: [ControlErrorsDirective],
|
|
@@ -211,9 +207,9 @@ class InputClearButtonDirective {
|
|
|
211
207
|
}
|
|
212
208
|
}
|
|
213
209
|
}
|
|
214
|
-
InputClearButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
215
|
-
InputClearButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
210
|
+
InputClearButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputClearButtonDirective, deps: [{ token: MAT_FORM_FIELD }], target: i0.ɵɵFactoryTarget.Directive });
|
|
211
|
+
InputClearButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: InputClearButtonDirective, selector: "[rxapInputClearButton]", host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.type", "attr.tabindex": "this.tabIndex", "disabled": "this.isDisabled" } }, ngImport: i0 });
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputClearButtonDirective, decorators: [{
|
|
217
213
|
type: Directive,
|
|
218
214
|
args: [{
|
|
219
215
|
selector: '[rxapInputClearButton]'
|
|
@@ -236,10 +232,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
236
232
|
}] } });
|
|
237
233
|
class InputClearButtonDirectiveModule {
|
|
238
234
|
}
|
|
239
|
-
InputClearButtonDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
240
|
-
InputClearButtonDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
241
|
-
InputClearButtonDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
235
|
+
InputClearButtonDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputClearButtonDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
236
|
+
InputClearButtonDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputClearButtonDirectiveModule, declarations: [InputClearButtonDirective], exports: [InputClearButtonDirective] });
|
|
237
|
+
InputClearButtonDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputClearButtonDirectiveModule });
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputClearButtonDirectiveModule, decorators: [{
|
|
243
239
|
type: NgModule,
|
|
244
240
|
args: [{
|
|
245
241
|
declarations: [InputClearButtonDirective],
|
|
@@ -252,8 +248,7 @@ class RequiredDirective {
|
|
|
252
248
|
this.formField = formField;
|
|
253
249
|
}
|
|
254
250
|
ngAfterContentInit() {
|
|
255
|
-
|
|
256
|
-
const control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
251
|
+
const control = this.formField._control.ngControl?.control;
|
|
257
252
|
if (control) {
|
|
258
253
|
const hasRequiredValidator = Reflect.get(control, 'hasRequiredValidator');
|
|
259
254
|
if (hasRequiredValidator) {
|
|
@@ -265,9 +260,9 @@ class RequiredDirective {
|
|
|
265
260
|
}
|
|
266
261
|
}
|
|
267
262
|
}
|
|
268
|
-
RequiredDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
269
|
-
RequiredDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
270
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
263
|
+
RequiredDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RequiredDirective, deps: [{ token: MAT_FORM_FIELD }], target: i0.ɵɵFactoryTarget.Directive });
|
|
264
|
+
RequiredDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: RequiredDirective, selector: "[formControlName][rxapRequired]", ngImport: i0 });
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RequiredDirective, decorators: [{
|
|
271
266
|
type: Directive,
|
|
272
267
|
args: [{
|
|
273
268
|
selector: '[formControlName][rxapRequired]'
|
|
@@ -278,10 +273,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
278
273
|
}] }]; } });
|
|
279
274
|
class RequiredDirectiveModule {
|
|
280
275
|
}
|
|
281
|
-
RequiredDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
282
|
-
RequiredDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
283
|
-
RequiredDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
276
|
+
RequiredDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RequiredDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
277
|
+
RequiredDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RequiredDirectiveModule, declarations: [RequiredDirective], exports: [RequiredDirective] });
|
|
278
|
+
RequiredDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RequiredDirectiveModule });
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RequiredDirectiveModule, decorators: [{
|
|
285
280
|
type: NgModule,
|
|
286
281
|
args: [{
|
|
287
282
|
exports: [RequiredDirective],
|
|
@@ -290,31 +285,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
290
285
|
}] });
|
|
291
286
|
|
|
292
287
|
class ExtractHideShowMixin {
|
|
293
|
-
extractOptions(formDefinition, controlId) {
|
|
294
|
-
|
|
295
|
-
if (formDefinition === void 0) { formDefinition = this.formDefinition; }
|
|
296
|
-
if (controlId === void 0) { controlId = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.controlId) !== null && _b !== void 0 ? _b : this.controlId; }
|
|
297
|
-
const map = (_c = getMetadata(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition))) !== null && _c !== void 0 ? _c : null;
|
|
288
|
+
extractOptions(formDefinition = this.formDefinition, controlId = this.control?.controlId ?? this.controlId) {
|
|
289
|
+
const map = getMetadata(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition)) ?? null;
|
|
298
290
|
if (!map || !map.has(controlId)) {
|
|
299
291
|
return {};
|
|
300
292
|
}
|
|
301
293
|
return map.get(controlId);
|
|
302
294
|
}
|
|
303
|
-
extractHideFunction(formDefinition, controlId) {
|
|
304
|
-
|
|
305
|
-
if (formDefinition === void 0) { formDefinition = this.formDefinition; }
|
|
306
|
-
if (controlId === void 0) { controlId = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.controlId) !== null && _b !== void 0 ? _b : this.controlId; }
|
|
307
|
-
const map = (_c = getMetadata(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition))) !== null && _c !== void 0 ? _c : null;
|
|
295
|
+
extractHideFunction(formDefinition = this.formDefinition, controlId = this.control?.controlId ?? this.controlId) {
|
|
296
|
+
const map = getMetadata(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;
|
|
308
297
|
if (!map || !map.has(controlId)) {
|
|
309
298
|
return null;
|
|
310
299
|
}
|
|
311
300
|
return map.get(controlId);
|
|
312
301
|
}
|
|
313
|
-
extractShowFunction(formDefinition, controlId) {
|
|
314
|
-
|
|
315
|
-
if (formDefinition === void 0) { formDefinition = this.formDefinition; }
|
|
316
|
-
if (controlId === void 0) { controlId = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.controlId) !== null && _b !== void 0 ? _b : this.controlId; }
|
|
317
|
-
const map = (_c = getMetadata(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition))) !== null && _c !== void 0 ? _c : null;
|
|
302
|
+
extractShowFunction(formDefinition = this.formDefinition, controlId = this.control?.controlId ?? this.controlId) {
|
|
303
|
+
const map = getMetadata(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;
|
|
318
304
|
if (!map || !map.has(controlId)) {
|
|
319
305
|
return null;
|
|
320
306
|
}
|
|
@@ -330,8 +316,7 @@ let FormFieldHideShowDirective = class FormFieldHideShowDirective {
|
|
|
330
316
|
this.subscription = new Subscription();
|
|
331
317
|
}
|
|
332
318
|
ngAfterContentInit() {
|
|
333
|
-
|
|
334
|
-
const control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
319
|
+
const control = this.formField._control.ngControl?.control;
|
|
335
320
|
if (!control) {
|
|
336
321
|
throw new Error('The form field has not a control associated!');
|
|
337
322
|
}
|
|
@@ -402,15 +387,15 @@ let FormFieldHideShowDirective = class FormFieldHideShowDirective {
|
|
|
402
387
|
this.renderer.removeStyle(this.elementRef.nativeElement, 'display');
|
|
403
388
|
}
|
|
404
389
|
};
|
|
405
|
-
FormFieldHideShowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
406
|
-
FormFieldHideShowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
390
|
+
FormFieldHideShowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldHideShowDirective, deps: [{ token: MAT_FORM_FIELD }, { token: Renderer2 }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
391
|
+
FormFieldHideShowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormFieldHideShowDirective, selector: "mat-form-field[rxapHideShow]", ngImport: i0 });
|
|
407
392
|
FormFieldHideShowDirective = __decorate([
|
|
408
393
|
Mixin(ExtractHideShowMixin, ExtractFormDefinitionMixin),
|
|
409
394
|
__metadata("design:paramtypes", [MatFormField,
|
|
410
395
|
Renderer2,
|
|
411
396
|
ElementRef])
|
|
412
397
|
], FormFieldHideShowDirective);
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldHideShowDirective, decorators: [{
|
|
414
399
|
type: Directive,
|
|
415
400
|
args: [{
|
|
416
401
|
selector: 'mat-form-field[rxapHideShow]'
|
|
@@ -427,10 +412,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
427
412
|
}] }]; } });
|
|
428
413
|
class FormFieldHideShowDirectiveModule {
|
|
429
414
|
}
|
|
430
|
-
FormFieldHideShowDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
431
|
-
FormFieldHideShowDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
432
|
-
FormFieldHideShowDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
415
|
+
FormFieldHideShowDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldHideShowDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
416
|
+
FormFieldHideShowDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldHideShowDirectiveModule, declarations: [FormFieldHideShowDirective], exports: [FormFieldHideShowDirective] });
|
|
417
|
+
FormFieldHideShowDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldHideShowDirectiveModule });
|
|
418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldHideShowDirectiveModule, decorators: [{
|
|
434
419
|
type: NgModule,
|
|
435
420
|
args: [{
|
|
436
421
|
declarations: [FormFieldHideShowDirective],
|
|
@@ -440,18 +425,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
440
425
|
|
|
441
426
|
class MaterialFormSystemModule {
|
|
442
427
|
}
|
|
443
|
-
MaterialFormSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
444
|
-
MaterialFormSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
428
|
+
MaterialFormSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MaterialFormSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
429
|
+
MaterialFormSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MaterialFormSystemModule, exports: [ControlErrorDirectiveModule,
|
|
445
430
|
ControlErrorsDirectiveModule,
|
|
446
431
|
InputClearButtonDirectiveModule,
|
|
447
432
|
RequiredDirectiveModule,
|
|
448
433
|
FormFieldHideShowDirectiveModule] });
|
|
449
|
-
MaterialFormSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
434
|
+
MaterialFormSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MaterialFormSystemModule, imports: [ControlErrorDirectiveModule,
|
|
450
435
|
ControlErrorsDirectiveModule,
|
|
451
436
|
InputClearButtonDirectiveModule,
|
|
452
437
|
RequiredDirectiveModule,
|
|
453
438
|
FormFieldHideShowDirectiveModule] });
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MaterialFormSystemModule, decorators: [{
|
|
455
440
|
type: NgModule,
|
|
456
441
|
args: [{
|
|
457
442
|
exports: [
|
|
@@ -497,9 +482,9 @@ class CompareWithDirective {
|
|
|
497
482
|
}
|
|
498
483
|
}
|
|
499
484
|
}
|
|
500
|
-
CompareWithDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
501
|
-
CompareWithDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
485
|
+
CompareWithDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CompareWithDirective, deps: [{ token: MatSelect }], target: i0.ɵɵFactoryTarget.Directive });
|
|
486
|
+
CompareWithDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: CompareWithDirective, selector: "mat-select[rxapCompareWith]", inputs: { objectPath: ["rxapCompareWith", "objectPath"] }, ngImport: i0 });
|
|
487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CompareWithDirective, decorators: [{
|
|
503
488
|
type: Directive,
|
|
504
489
|
args: [{
|
|
505
490
|
selector: 'mat-select[rxapCompareWith]',
|
|
@@ -513,10 +498,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
513
498
|
}] } });
|
|
514
499
|
class CompareWithDirectiveModule {
|
|
515
500
|
}
|
|
516
|
-
CompareWithDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
517
|
-
CompareWithDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
518
|
-
CompareWithDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
501
|
+
CompareWithDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CompareWithDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
502
|
+
CompareWithDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CompareWithDirectiveModule, declarations: [CompareWithDirective], exports: [CompareWithDirective] });
|
|
503
|
+
CompareWithDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CompareWithDirectiveModule });
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CompareWithDirectiveModule, decorators: [{
|
|
520
505
|
type: NgModule,
|
|
521
506
|
args: [{
|
|
522
507
|
declarations: [CompareWithDirective],
|
|
@@ -576,7 +561,7 @@ class FormControlsComponent {
|
|
|
576
561
|
this.formDirective.cdr.markForCheck();
|
|
577
562
|
let submitSubscription;
|
|
578
563
|
const invalidSubmitSubscription = this.formDirective.invalidSubmit
|
|
579
|
-
.pipe(take(1), tap(() => submitSubscription
|
|
564
|
+
.pipe(take(1), tap(() => submitSubscription?.unsubscribe()), tap(() => (this.invalid = true)), tap(() => this.cdr.detectChanges()), tap(() => this.snackBar.open($localize `:@@rxap-material.form-system.form-controls.form-is-invalid:Form is not valid`, 'ok', { duration: 5000 })))
|
|
580
565
|
.subscribe();
|
|
581
566
|
submitSubscription = this.formDirective.rxapSubmit
|
|
582
567
|
.pipe(take(1), tap((value) => {
|
|
@@ -602,17 +587,11 @@ class FormControlsComponent {
|
|
|
602
587
|
console.log(clone(this.formDirective.form.value));
|
|
603
588
|
}
|
|
604
589
|
}
|
|
605
|
-
FormControlsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
606
|
-
FormControlsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
590
|
+
FormControlsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlsComponent, deps: [{ token: FormDirective }, { token: ChangeDetectorRef }, { token: MatSnackBar }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
591
|
+
FormControlsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormControlsComponent, selector: "rxap-form-controls", inputs: { allowResubmit: "allowResubmit", navigateAfterSubmit: "navigateAfterSubmit" }, outputs: { close: "close", submitted: "submitted" }, host: { classAttribute: "mfd-form-controls" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"32px\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"end center\" fxLayoutGap=\"32px\" style=\"width: 100%\">\n <button (click)=\"reset()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.reset\"\n mat-stroked-button>\n Reset\n </button>\n <button (click)=\"cancel()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"warn\" fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.cancel\"\n mat-stroked-button>\n Cancel\n </button>\n <button (click)=\"submit(!allowResubmit)\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit\">Submit</span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"allowResubmit\" (click)=\"submit(true)\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n [disabled]=\"submitting$ | async\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit-and-close\">\n Submit and Close\n </span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"isDevMode\" type=\"button\" mat-button fxFlex=\"nogrow\" (click)=\"logCurrentFormState()\">Current Form State</button>\n </div>\n</div>\n", styles: ["button{overflow:hidden}button.invalid{border:6px solid darkred}\n"], components: [{ type: i1$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlsComponent, decorators: [{
|
|
608
593
|
type: Component,
|
|
609
|
-
args: [{
|
|
610
|
-
selector: 'rxap-form-controls',
|
|
611
|
-
templateUrl: './form-controls.component.html',
|
|
612
|
-
styleUrls: ['./form-controls.component.scss'],
|
|
613
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
614
|
-
host: { class: 'mfd-form-controls' },
|
|
615
|
-
}]
|
|
594
|
+
args: [{ selector: 'rxap-form-controls', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-form-controls' }, template: "<div fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"32px\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"end center\" fxLayoutGap=\"32px\" style=\"width: 100%\">\n <button (click)=\"reset()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.reset\"\n mat-stroked-button>\n Reset\n </button>\n <button (click)=\"cancel()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"warn\" fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.cancel\"\n mat-stroked-button>\n Cancel\n </button>\n <button (click)=\"submit(!allowResubmit)\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit\">Submit</span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"allowResubmit\" (click)=\"submit(true)\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n [disabled]=\"submitting$ | async\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit-and-close\">\n Submit and Close\n </span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"isDevMode\" type=\"button\" mat-button fxFlex=\"nogrow\" (click)=\"logCurrentFormState()\">Current Form State</button>\n </div>\n</div>\n", styles: ["button{overflow:hidden}button.invalid{border:6px solid darkred}\n"] }]
|
|
616
595
|
}], ctorParameters: function () { return [{ type: i6.FormDirective, decorators: [{
|
|
617
596
|
type: Inject,
|
|
618
597
|
args: [FormDirective]
|
|
@@ -639,14 +618,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
639
618
|
|
|
640
619
|
class FormControlsComponentModule {
|
|
641
620
|
}
|
|
642
|
-
FormControlsComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
643
|
-
FormControlsComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
621
|
+
FormControlsComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
622
|
+
FormControlsComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlsComponentModule, declarations: [FormControlsComponent], imports: [MatProgressSpinnerModule,
|
|
644
623
|
FlexLayoutModule,
|
|
645
624
|
MatButtonModule,
|
|
646
625
|
CommonModule,
|
|
647
626
|
RxapFormsModule,
|
|
648
627
|
MatSnackBarModule], exports: [FormControlsComponent] });
|
|
649
|
-
FormControlsComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
628
|
+
FormControlsComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlsComponentModule, imports: [[
|
|
650
629
|
MatProgressSpinnerModule,
|
|
651
630
|
FlexLayoutModule,
|
|
652
631
|
MatButtonModule,
|
|
@@ -654,7 +633,7 @@ FormControlsComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0
|
|
|
654
633
|
RxapFormsModule,
|
|
655
634
|
MatSnackBarModule,
|
|
656
635
|
]] });
|
|
657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlsComponentModule, decorators: [{
|
|
658
637
|
type: NgModule,
|
|
659
638
|
args: [{
|
|
660
639
|
declarations: [FormControlsComponent],
|
|
@@ -678,23 +657,21 @@ class ChipInputAdapterDirective {
|
|
|
678
657
|
this.matChipInput.addOnBlur = true;
|
|
679
658
|
}
|
|
680
659
|
ngOnDestroy() {
|
|
681
|
-
|
|
682
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
660
|
+
this._subscription?.unsubscribe();
|
|
683
661
|
}
|
|
684
662
|
ngOnInit() {
|
|
685
663
|
this._subscription = this.matChipInput.chipEnd
|
|
686
|
-
.pipe(filter((add) =>
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
(_b = this.ngControl.control) === null || _b === void 0 ? void 0 : _b.setValue([...value, add.value].filter(unique()));
|
|
664
|
+
.pipe(filter((add) => !!add.value?.trim()), tap((add) => {
|
|
665
|
+
const value = this.ngControl.value ?? [];
|
|
666
|
+
this.ngControl.control?.setValue([...value, add.value].filter(unique()));
|
|
690
667
|
this.matChipInput.clear();
|
|
691
668
|
}))
|
|
692
669
|
.subscribe();
|
|
693
670
|
}
|
|
694
671
|
}
|
|
695
|
-
ChipInputAdapterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
696
|
-
ChipInputAdapterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
672
|
+
ChipInputAdapterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipInputAdapterDirective, deps: [{ token: i1$3.MatChipInput }, { token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
673
|
+
ChipInputAdapterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ChipInputAdapterDirective, selector: "[matChipInputFor][rxapChipInputAdapter]", ngImport: i0 });
|
|
674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipInputAdapterDirective, decorators: [{
|
|
698
675
|
type: Directive,
|
|
699
676
|
args: [{
|
|
700
677
|
selector: '[matChipInputFor][rxapChipInputAdapter]'
|
|
@@ -702,10 +679,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
702
679
|
}], ctorParameters: function () { return [{ type: i1$3.MatChipInput }, { type: i2$1.NgControl }]; } });
|
|
703
680
|
class ChipInputAdapterDirectiveModule {
|
|
704
681
|
}
|
|
705
|
-
ChipInputAdapterDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
706
|
-
ChipInputAdapterDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
707
|
-
ChipInputAdapterDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
682
|
+
ChipInputAdapterDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipInputAdapterDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
683
|
+
ChipInputAdapterDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipInputAdapterDirectiveModule, declarations: [ChipInputAdapterDirective], exports: [ChipInputAdapterDirective] });
|
|
684
|
+
ChipInputAdapterDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipInputAdapterDirectiveModule });
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipInputAdapterDirectiveModule, decorators: [{
|
|
709
686
|
type: NgModule,
|
|
710
687
|
args: [{
|
|
711
688
|
exports: [ChipInputAdapterDirective],
|
|
@@ -732,8 +709,8 @@ class ChipListIteratorDirective {
|
|
|
732
709
|
this._differ = null;
|
|
733
710
|
}
|
|
734
711
|
ngOnInit() {
|
|
735
|
-
|
|
736
|
-
|
|
712
|
+
this._subscription = this.ngControl.valueChanges
|
|
713
|
+
?.pipe(startWith(this.ngControl.value), log('test'), filter((value) => Array.isArray(value)), tap((items) => {
|
|
737
714
|
this._dirty = false;
|
|
738
715
|
// React on ngForOf changes only once all inputs have been initialized
|
|
739
716
|
const value = items;
|
|
@@ -741,7 +718,7 @@ class ChipListIteratorDirective {
|
|
|
741
718
|
try {
|
|
742
719
|
this._differ = this.differs.find(value).create((_, item) => item);
|
|
743
720
|
}
|
|
744
|
-
catch
|
|
721
|
+
catch {
|
|
745
722
|
throw new Error(`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);
|
|
746
723
|
}
|
|
747
724
|
}
|
|
@@ -751,11 +728,11 @@ class ChipListIteratorDirective {
|
|
|
751
728
|
this.applyChanges(changes);
|
|
752
729
|
}
|
|
753
730
|
}
|
|
754
|
-
}))
|
|
731
|
+
}))
|
|
732
|
+
.subscribe();
|
|
755
733
|
}
|
|
756
734
|
ngOnDestroy() {
|
|
757
|
-
|
|
758
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
735
|
+
this._subscription?.unsubscribe();
|
|
759
736
|
}
|
|
760
737
|
applyChanges(changes) {
|
|
761
738
|
const insertTuples = [];
|
|
@@ -787,16 +764,15 @@ class ChipListIteratorDirective {
|
|
|
787
764
|
});
|
|
788
765
|
}
|
|
789
766
|
onRemoved($event) {
|
|
790
|
-
|
|
791
|
-
(_a = this.ngControl.control) === null || _a === void 0 ? void 0 : _a.setValue(((_b = this.ngControl.value) !== null && _b !== void 0 ? _b : []).filter((item) => item !== $event.chip.value));
|
|
767
|
+
this.ngControl.control?.setValue((this.ngControl.value ?? []).filter((item) => item !== $event.chip.value));
|
|
792
768
|
}
|
|
793
769
|
perViewChange(view, record) {
|
|
794
770
|
view.context.$implicit = record.item;
|
|
795
771
|
}
|
|
796
772
|
}
|
|
797
|
-
ChipListIteratorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
798
|
-
ChipListIteratorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
799
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
773
|
+
ChipListIteratorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipListIteratorDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i2$1.NgControl }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
|
|
774
|
+
ChipListIteratorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ChipListIteratorDirective, selector: "[rxapChipListIterator]", ngImport: i0 });
|
|
775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipListIteratorDirective, decorators: [{
|
|
800
776
|
type: Directive,
|
|
801
777
|
args: [{
|
|
802
778
|
selector: '[rxapChipListIterator]'
|
|
@@ -804,10 +780,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
804
780
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i2$1.NgControl }, { type: i0.IterableDiffers }]; } });
|
|
805
781
|
class ChipListIteratorDirectiveModule {
|
|
806
782
|
}
|
|
807
|
-
ChipListIteratorDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
808
|
-
ChipListIteratorDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
809
|
-
ChipListIteratorDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
783
|
+
ChipListIteratorDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipListIteratorDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
784
|
+
ChipListIteratorDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipListIteratorDirectiveModule, declarations: [ChipListIteratorDirective], exports: [ChipListIteratorDirective] });
|
|
785
|
+
ChipListIteratorDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipListIteratorDirectiveModule });
|
|
786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChipListIteratorDirectiveModule, decorators: [{
|
|
811
787
|
type: NgModule,
|
|
812
788
|
args: [{
|
|
813
789
|
exports: [ChipListIteratorDirective],
|
|
@@ -820,4 +796,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
820
796
|
*/
|
|
821
797
|
|
|
822
798
|
export { ChipInputAdapterDirective, ChipInputAdapterDirectiveModule, ChipListIteratorDirective, ChipListIteratorDirectiveModule, CompareWithDirective, CompareWithDirectiveModule, ControlErrorDirective, ControlErrorDirectiveModule, ControlErrorsDirective, ControlErrorsDirectiveModule, ExtractHideShowMixin, FormControlsComponent, FormControlsComponentModule, FormFieldHideShowDirective, FormFieldHideShowDirectiveModule, InputClearButtonDirective, InputClearButtonDirectiveModule, MaterialFormSystemModule, RequiredDirective, RequiredDirectiveModule };
|
|
823
|
-
//# sourceMappingURL=rxap-material-form-system.
|
|
799
|
+
//# sourceMappingURL=rxap-material-form-system.mjs.map
|