suis 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -6,8 +6,10 @@ export class SuisSelectGroupLabelPipe {
|
|
6
6
|
return placeholder;
|
7
7
|
const options = groupOptions.map((go) => go.children).flat();
|
8
8
|
const selectedOption = options.find((option) => JSON.stringify(option[optionValue]) === JSON.stringify(value));
|
9
|
-
if (!selectedOption)
|
10
|
-
|
9
|
+
if (!selectedOption) {
|
10
|
+
console.warn('[SuisSelectGroupLabelPipe] Provided value does not belong to valid values');
|
11
|
+
return JSON.stringify(value);
|
12
|
+
}
|
11
13
|
return selectedOption[optionLabel];
|
12
14
|
}
|
13
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisSelectGroupLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
@@ -20,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
20
22
|
name: 'suisSelectGroupLabel',
|
21
23
|
}]
|
22
24
|
}] });
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QtZ3JvdXAtbGFiZWwucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL21vZHVsZXMvc3Vpcy1zZWxlY3QvcGlwZXMvc3Vpcy1zZWxlY3QtZ3JvdXAtbGFiZWwucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7QUFPcEQsTUFBTSxPQUFPLHdCQUF3QjtJQUNuQyxTQUFTLENBQ1AsS0FBUSxFQUNSLFlBQXFDLEVBQ3JDLF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6
6
|
return placeholder;
|
7
7
|
const selectedOption = options.find((option) => JSON.stringify(option[optionValue]) === JSON.stringify(value));
|
8
|
-
if (!selectedOption)
|
9
|
-
|
8
|
+
if (!selectedOption) {
|
9
|
+
console.warn('[SuisSelectLabelPipe] Provided value does not belong to valid values');
|
10
|
+
return JSON.stringify(value);
|
11
|
+
}
|
10
12
|
return selectedOption[optionLabel];
|
11
13
|
}
|
12
14
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisSelectLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
@@ -19,4 +21,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
19
21
|
name: 'suisSelectLabel',
|
20
22
|
}]
|
21
23
|
}] });
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QtbGFiZWwucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL21vZHVsZXMvc3Vpcy1zZWxlY3QvcGlwZXMvc3Vpcy1zZWxlY3QtbGFiZWwucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7QUFPcEQsTUFBTSxPQUFPLG1CQUFtQjtJQUM5QixTQUFTLENBQ1AsS0FBUSxFQUNSLE9BQTJCLEVBQzNCLFdBQW1CLEVBQ25CLFdBQW1CLEVBQ25CLFdBQW1CO1FBRW5CLElBQUksQ0FBQyxLQUFLO1lBQUUsT0FBTyxXQUFXLENBQUM7UUFDL0IsTUFBTSxjQUFjLEdBQUcsT0FBTyxDQUFDLElBQUks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N0cmluZyxcbiAgICBvcHRpb25MYWJlbDogc3RyaW5nXG4gICk6IHN0cmluZyB7XG4gICAgaWYgKCF2YWx1ZSkgcmV0dXJuIHBsYWNlaG9sZGVyO1xuICAgIGNvbnN0IHNlbGVjdGVkT3B0aW9uID0gb3B0aW9ucy5maW5kKFxuICAgICAgKG9wdGlvbikgPT4gSlNPTi5zdHJpbmdpZnkob3B0aW9uW29wdGlvblZhbHVlXSkgPT09IEpTT04uc3RyaW5naWZ5KHZhbHVlKVxuICAgICk7XG4gICAgaWYgKCFzZWxlY3RlZE9wdGlvbikge1xuICAgICAgY29uc29sZS53YXJuKFxuICAgICAgICAnW1N1aXNTZWxlY3RMYWJlbFBpcGVdIFByb3ZpZGVkIHZhbHVlIGRvZXMgbm90IGJlbG9uZyB0byB2YWxpZCB2YWx1ZXMnXG4gICAgICApO1xuICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHZhbHVlKTtcbiAgICB9XG4gICAgcmV0dXJuIHNlbGVjdGVkT3B0aW9uW29wdGlvbkxhYmVsXTtcbiAgfVxufVxuIl19
|
package/fesm2022/suis.mjs
CHANGED
@@ -1264,8 +1264,10 @@ class SuisSelectLabelPipe {
|
|
1264
1264
|
if (!value)
|
1265
1265
|
return placeholder;
|
1266
1266
|
const selectedOption = options.find((option) => JSON.stringify(option[optionValue]) === JSON.stringify(value));
|
1267
|
-
if (!selectedOption)
|
1268
|
-
|
1267
|
+
if (!selectedOption) {
|
1268
|
+
console.warn('[SuisSelectLabelPipe] Provided value does not belong to valid values');
|
1269
|
+
return JSON.stringify(value);
|
1270
|
+
}
|
1269
1271
|
return selectedOption[optionLabel];
|
1270
1272
|
}
|
1271
1273
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisSelectLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
@@ -1680,8 +1682,10 @@ class SuisSelectGroupLabelPipe {
|
|
1680
1682
|
return placeholder;
|
1681
1683
|
const options = groupOptions.map((go) => go.children).flat();
|
1682
1684
|
const selectedOption = options.find((option) => JSON.stringify(option[optionValue]) === JSON.stringify(value));
|
1683
|
-
if (!selectedOption)
|
1684
|
-
|
1685
|
+
if (!selectedOption) {
|
1686
|
+
console.warn('[SuisSelectGroupLabelPipe] Provided value does not belong to valid values');
|
1687
|
+
return JSON.stringify(value);
|
1688
|
+
}
|
1685
1689
|
return selectedOption[optionLabel];
|
1686
1690
|
}
|
1687
1691
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisSelectGroupLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|