@ngx-smz/core 21.1.1 → 21.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2633,7 +2633,7 @@ class LabelComponent {
|
|
|
2633
2633
|
@if(showLabel) {
|
|
2634
2634
|
<label [for]="propertyName" [innerHTML]="text"></label>
|
|
2635
2635
|
|
|
2636
|
-
@if(warning != null) {
|
|
2636
|
+
@if(warning != null && warning.value != null) {
|
|
2637
2637
|
<i class="ml-2" [ngClass]="warning.styleClass" [pTooltip]="warning.value" [tooltipPosition]="warning.position"></i>
|
|
2638
2638
|
}
|
|
2639
2639
|
|
|
@@ -2664,7 +2664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2664
2664
|
@if(showLabel) {
|
|
2665
2665
|
<label [for]="propertyName" [innerHTML]="text"></label>
|
|
2666
2666
|
|
|
2667
|
-
@if(warning != null) {
|
|
2667
|
+
@if(warning != null && warning.value != null) {
|
|
2668
2668
|
<i class="ml-2" [ngClass]="warning.styleClass" [pTooltip]="warning.value" [tooltipPosition]="warning.position"></i>
|
|
2669
2669
|
}
|
|
2670
2670
|
|
|
@@ -25097,6 +25097,47 @@ class SmzFormTooltipHelpBuilder {
|
|
|
25097
25097
|
}
|
|
25098
25098
|
}
|
|
25099
25099
|
|
|
25100
|
+
class SmzFormConditionalTooltipBuilder {
|
|
25101
|
+
inputBuilder;
|
|
25102
|
+
inputRef;
|
|
25103
|
+
resolveMessage;
|
|
25104
|
+
styleClass = 'fa-solid fa-exclamation-triangle text-red-500';
|
|
25105
|
+
position = 'top';
|
|
25106
|
+
constructor(inputBuilder, inputRef, resolveMessage) {
|
|
25107
|
+
this.inputBuilder = inputBuilder;
|
|
25108
|
+
this.inputRef = inputRef;
|
|
25109
|
+
this.resolveMessage = resolveMessage;
|
|
25110
|
+
this.inputRef.warningFunction = this.resolveMessage;
|
|
25111
|
+
this.initializeTooltip();
|
|
25112
|
+
}
|
|
25113
|
+
initializeTooltip() {
|
|
25114
|
+
this.inputRef.warning = signal({
|
|
25115
|
+
value: null,
|
|
25116
|
+
styleClass: this.styleClass,
|
|
25117
|
+
position: this.position
|
|
25118
|
+
}, ...(ngDevMode ? [{ debugName: "warning" }] : []));
|
|
25119
|
+
}
|
|
25120
|
+
withStyleClass(styleClass) {
|
|
25121
|
+
this.styleClass = styleClass;
|
|
25122
|
+
this.inputRef.warning?.update((previous) => ({
|
|
25123
|
+
...previous,
|
|
25124
|
+
styleClass: this.styleClass
|
|
25125
|
+
}));
|
|
25126
|
+
return this;
|
|
25127
|
+
}
|
|
25128
|
+
withPosition(position) {
|
|
25129
|
+
this.position = position;
|
|
25130
|
+
this.inputRef.warning?.update((previous) => ({
|
|
25131
|
+
...previous,
|
|
25132
|
+
position: this.position
|
|
25133
|
+
}));
|
|
25134
|
+
return this;
|
|
25135
|
+
}
|
|
25136
|
+
get input() {
|
|
25137
|
+
return this.inputBuilder;
|
|
25138
|
+
}
|
|
25139
|
+
}
|
|
25140
|
+
|
|
25100
25141
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
25101
25142
|
class SmzFormGroupBuilder extends SmzBuilderUtilities {
|
|
25102
25143
|
formBuilderRef;
|
|
@@ -25735,10 +25776,8 @@ class SmzFormInputBuilder {
|
|
|
25735
25776
|
this.inputRef.advancedSettings.overrideResponseFormat = format;
|
|
25736
25777
|
return this.that;
|
|
25737
25778
|
}
|
|
25738
|
-
|
|
25739
|
-
this.inputRef
|
|
25740
|
-
this.inputRef.warning = signal({ value: null, styleClass, position }, ...(ngDevMode ? [{ debugName: "warning" }] : []));
|
|
25741
|
-
return this.that;
|
|
25779
|
+
withConditionalTooltip(resolveMessage) {
|
|
25780
|
+
return new SmzFormConditionalTooltipBuilder(this.that, this.inputRef, resolveMessage);
|
|
25742
25781
|
}
|
|
25743
25782
|
withHelp(message) {
|
|
25744
25783
|
return new SmzFormTooltipHelpBuilder(this.that, this.inputRef, message);
|