@yourself.create/ngx-form-designer 0.0.9 → 0.0.11
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.
|
@@ -544,16 +544,10 @@ class FormEngine {
|
|
|
544
544
|
return;
|
|
545
545
|
const value = this.values[fieldName];
|
|
546
546
|
const fieldErrors = [];
|
|
547
|
-
const ruleErrors = this.getRuleValidationErrors(field);
|
|
548
547
|
// Visibility check
|
|
549
548
|
const isVisible = this.isFieldVisible(field.id);
|
|
550
549
|
if (!isVisible) {
|
|
551
|
-
|
|
552
|
-
this.errors[fieldName] = ruleErrors;
|
|
553
|
-
}
|
|
554
|
-
else {
|
|
555
|
-
delete this.errors[fieldName];
|
|
556
|
-
}
|
|
550
|
+
delete this.errors[fieldName];
|
|
557
551
|
return;
|
|
558
552
|
}
|
|
559
553
|
const isRequired = this.isFieldRequired(field.id);
|
|
@@ -584,9 +578,6 @@ class FormEngine {
|
|
|
584
578
|
}
|
|
585
579
|
}
|
|
586
580
|
}
|
|
587
|
-
if (ruleErrors.length > 0) {
|
|
588
|
-
fieldErrors.push(...ruleErrors);
|
|
589
|
-
}
|
|
590
581
|
if (fieldErrors.length > 0) {
|
|
591
582
|
this.errors[fieldName] = fieldErrors;
|
|
592
583
|
}
|
|
@@ -594,11 +585,6 @@ class FormEngine {
|
|
|
594
585
|
delete this.errors[fieldName];
|
|
595
586
|
}
|
|
596
587
|
}
|
|
597
|
-
getRuleValidationErrors(field) {
|
|
598
|
-
return this.getEnterpriseRuleOutcomes(field)
|
|
599
|
-
.filter(({ rule, conditionMet }) => rule.severity === 'error' && !conditionMet && rule.elseAction === undefined)
|
|
600
|
-
.map(({ rule }) => this.getRuleValidationMessage(rule));
|
|
601
|
-
}
|
|
602
588
|
// Generic rule evaluator
|
|
603
589
|
evaluateDependencyRules(field, positiveEffect, negativeEffect, startValue) {
|
|
604
590
|
if (!field.dependencies)
|
|
@@ -32621,7 +32607,7 @@ class TextFieldWidgetComponent {
|
|
|
32621
32607
|
return styles;
|
|
32622
32608
|
}
|
|
32623
32609
|
return mergeAndNormalize(styles, {
|
|
32624
|
-
|
|
32610
|
+
'--fd-prefix-padding-left': `calc(25px + ${Math.max(this.displayPrefix.length, 1)}ch)`
|
|
32625
32611
|
});
|
|
32626
32612
|
}
|
|
32627
32613
|
hasWrapperFrame() {
|
|
@@ -32941,6 +32927,7 @@ class TextFieldWidgetComponent {
|
|
|
32941
32927
|
[attr.aria-describedby]="getAriaDescribedBy()"
|
|
32942
32928
|
[attr.aria-label]="getAccessibleLabel()"
|
|
32943
32929
|
[class]="getControlClass()"
|
|
32930
|
+
[class.fd-prefixed-input]="hasDisplayPrefix()"
|
|
32944
32931
|
[ngStyle]="getSingleLineControlStyles()"
|
|
32945
32932
|
data-fd="field-control"
|
|
32946
32933
|
[attr.min]="config.html5?.min"
|
|
@@ -32970,6 +32957,7 @@ class TextFieldWidgetComponent {
|
|
|
32970
32957
|
[attr.aria-describedby]="getAriaDescribedBy()"
|
|
32971
32958
|
[attr.aria-label]="getAccessibleLabel()"
|
|
32972
32959
|
[class]="getControlClass()"
|
|
32960
|
+
[class.fd-prefixed-input]="hasDisplayPrefix()"
|
|
32973
32961
|
[ngStyle]="getSingleLineControlStyles()"
|
|
32974
32962
|
data-fd="field-control"
|
|
32975
32963
|
[attr.min]="config.html5?.min"
|
|
@@ -32986,15 +32974,11 @@ class TextFieldWidgetComponent {
|
|
|
32986
32974
|
<p [id]="helpTextId" [class]="fieldHelpClass" data-fd="field-help">{{ config.helpText }}</p>
|
|
32987
32975
|
}
|
|
32988
32976
|
</div>
|
|
32989
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: ColorPickerDirective, selector: "[colorPicker]", inputs: ["colorPicker", "cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpEyeDropper", "cpPresetLabel", "cpPresetColors", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "cpArrowPosition", "cpExtraTemplate"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }] });
|
|
32977
|
+
`, isInline: true, styles: [".fd-prefixed-input{padding-left:var(--fd-prefix-padding-left)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: ColorPickerDirective, selector: "[colorPicker]", inputs: ["colorPicker", "cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpEyeDropper", "cpPresetLabel", "cpPresetColors", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "cpArrowPosition", "cpExtraTemplate"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }] });
|
|
32990
32978
|
}
|
|
32991
32979
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TextFieldWidgetComponent, decorators: [{
|
|
32992
32980
|
type: Component,
|
|
32993
|
-
args: [{
|
|
32994
|
-
selector: 'app-text-field-widget',
|
|
32995
|
-
standalone: true,
|
|
32996
|
-
imports: [CommonModule, ReactiveFormsModule, ColorPickerDirective],
|
|
32997
|
-
template: `
|
|
32981
|
+
args: [{ selector: 'app-text-field-widget', standalone: true, imports: [CommonModule, ReactiveFormsModule, ColorPickerDirective], template: `
|
|
32998
32982
|
<div [class]="fieldContainerClass"
|
|
32999
32983
|
[class.hidden]="!visible"
|
|
33000
32984
|
[ngStyle]="getWrapperStyles()"
|
|
@@ -33084,6 +33068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
33084
33068
|
[attr.aria-describedby]="getAriaDescribedBy()"
|
|
33085
33069
|
[attr.aria-label]="getAccessibleLabel()"
|
|
33086
33070
|
[class]="getControlClass()"
|
|
33071
|
+
[class.fd-prefixed-input]="hasDisplayPrefix()"
|
|
33087
33072
|
[ngStyle]="getSingleLineControlStyles()"
|
|
33088
33073
|
data-fd="field-control"
|
|
33089
33074
|
[attr.min]="config.html5?.min"
|
|
@@ -33113,6 +33098,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
33113
33098
|
[attr.aria-describedby]="getAriaDescribedBy()"
|
|
33114
33099
|
[attr.aria-label]="getAccessibleLabel()"
|
|
33115
33100
|
[class]="getControlClass()"
|
|
33101
|
+
[class.fd-prefixed-input]="hasDisplayPrefix()"
|
|
33116
33102
|
[ngStyle]="getSingleLineControlStyles()"
|
|
33117
33103
|
data-fd="field-control"
|
|
33118
33104
|
[attr.min]="config.html5?.min"
|
|
@@ -33129,8 +33115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
33129
33115
|
<p [id]="helpTextId" [class]="fieldHelpClass" data-fd="field-help">{{ config.helpText }}</p>
|
|
33130
33116
|
}
|
|
33131
33117
|
</div>
|
|
33132
|
-
|
|
33133
|
-
}]
|
|
33118
|
+
`, styles: [".fd-prefixed-input{padding-left:var(--fd-prefix-padding-left)!important}\n"] }]
|
|
33134
33119
|
}], propDecorators: { config: [{
|
|
33135
33120
|
type: Input
|
|
33136
33121
|
}], engine: [{
|
|
@@ -37037,7 +37022,7 @@ class InlineQuillEditorComponent {
|
|
|
37037
37022
|
setHtml(nextHtml) {
|
|
37038
37023
|
if (!this.quill)
|
|
37039
37024
|
return;
|
|
37040
|
-
if (this.quill.hasFocus())
|
|
37025
|
+
if (this.hasFocus || this.quill.hasFocus())
|
|
37041
37026
|
return;
|
|
37042
37027
|
const normalized = nextHtml ?? '';
|
|
37043
37028
|
if (normalized === this.lastHtml)
|