@sphereon/ui-components.credential-branding 0.4.1-unstable.160 → 0.4.1-unstable.161
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.
|
@@ -142,7 +142,7 @@ var toCredentialDetailsRow = function (args) { return __awaiter(void 0, void 0,
|
|
|
142
142
|
return [2, rows];
|
|
143
143
|
}
|
|
144
144
|
_loop_1 = function (key, value) {
|
|
145
|
-
var
|
|
145
|
+
var label, items, isFirst, _j, items_1, item, _k, _l, _m, _o, label, contacts, imageSize, _p;
|
|
146
146
|
return __generator(this, function (_q) {
|
|
147
147
|
switch (_q.label) {
|
|
148
148
|
case 0:
|
|
@@ -157,40 +157,43 @@ var toCredentialDetailsRow = function (args) { return __awaiter(void 0, void 0,
|
|
|
157
157
|
});
|
|
158
158
|
return [2, "continue"];
|
|
159
159
|
}
|
|
160
|
-
if (!Array.isArray(value)) return [3,
|
|
161
|
-
primitiveItems = value.filter(function (item) { return item !== undefined && item !== null && typeof item !== 'object'; });
|
|
162
|
-
objectItems = value.filter(function (item) { return typeof item === 'object' && item !== null; });
|
|
160
|
+
if (!Array.isArray(value)) return [3, 7];
|
|
163
161
|
label = (_e = (_d = branding === null || branding === void 0 ? void 0 : branding.find(function (claim) { return claim.key === (parentKey ? "".concat(parentKey, ".").concat(key) : key); })) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : key;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
label: label,
|
|
168
|
-
value: primitiveItems.map(function (item) { return "- ".concat(item); }).join('\n')
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
if (!(objectItems.length > 0)) return [3, 4];
|
|
172
|
-
_j = 0, objectItems_1 = objectItems;
|
|
162
|
+
items = value.filter(function (item) { return item !== undefined && item !== null; });
|
|
163
|
+
isFirst = true;
|
|
164
|
+
_j = 0, items_1 = items;
|
|
173
165
|
_q.label = 1;
|
|
174
166
|
case 1:
|
|
175
|
-
if (!(_j <
|
|
176
|
-
item =
|
|
167
|
+
if (!(_j < items_1.length)) return [3, 6];
|
|
168
|
+
item = items_1[_j];
|
|
169
|
+
if (!(typeof item === 'object')) return [3, 3];
|
|
177
170
|
_l = (_k = rows).concat;
|
|
178
171
|
return [4, (0, exports.toCredentialDetailsRow)({ object: item, subject: subject, issuer: issuer, branding: branding, parentKey: parentKey ? "".concat(parentKey, ".").concat(key) : key })];
|
|
179
172
|
case 2:
|
|
180
173
|
rows = _l.apply(_k, [_q.sent()]);
|
|
181
|
-
|
|
174
|
+
return [3, 4];
|
|
182
175
|
case 3:
|
|
176
|
+
rows.push({
|
|
177
|
+
id: (0, uuid_1.v4)(),
|
|
178
|
+
label: isFirst ? label : '',
|
|
179
|
+
value: "- ".concat(item)
|
|
180
|
+
});
|
|
181
|
+
_q.label = 4;
|
|
182
|
+
case 4:
|
|
183
|
+
isFirst = false;
|
|
184
|
+
_q.label = 5;
|
|
185
|
+
case 5:
|
|
183
186
|
_j++;
|
|
184
187
|
return [3, 1];
|
|
185
|
-
case
|
|
186
|
-
case
|
|
187
|
-
if (!(typeof value === 'object' && value !== null && value !== undefined)) return [3,
|
|
188
|
+
case 6: return [3, 14];
|
|
189
|
+
case 7:
|
|
190
|
+
if (!(typeof value === 'object' && value !== null && value !== undefined)) return [3, 9];
|
|
188
191
|
_o = (_m = rows).concat;
|
|
189
192
|
return [4, (0, exports.toCredentialDetailsRow)({ object: value, subject: subject, issuer: issuer, branding: branding, parentKey: parentKey ? "".concat(parentKey, ".").concat(key) : key })];
|
|
190
|
-
case
|
|
193
|
+
case 8:
|
|
191
194
|
rows = _o.apply(_m, [_q.sent()]);
|
|
192
|
-
return [3,
|
|
193
|
-
case
|
|
195
|
+
return [3, 14];
|
|
196
|
+
case 9:
|
|
194
197
|
if (key === '0' || value === undefined || value === null) {
|
|
195
198
|
return [2, "continue"];
|
|
196
199
|
}
|
|
@@ -203,16 +206,16 @@ var toCredentialDetailsRow = function (args) { return __awaiter(void 0, void 0,
|
|
|
203
206
|
value = findCorrelationIdName(value, contacts);
|
|
204
207
|
}
|
|
205
208
|
return [4, (0, utils_2.isImageAddress)(value)];
|
|
206
|
-
case
|
|
207
|
-
if (!(_q.sent())) return [3,
|
|
209
|
+
case 10:
|
|
210
|
+
if (!(_q.sent())) return [3, 12];
|
|
208
211
|
return [4, getImageSize(value)];
|
|
209
|
-
case
|
|
212
|
+
case 11:
|
|
210
213
|
_p = _q.sent();
|
|
211
|
-
return [3,
|
|
212
|
-
case
|
|
214
|
+
return [3, 13];
|
|
215
|
+
case 12:
|
|
213
216
|
_p = undefined;
|
|
214
|
-
_q.label =
|
|
215
|
-
case
|
|
217
|
+
_q.label = 13;
|
|
218
|
+
case 13:
|
|
216
219
|
imageSize = _p;
|
|
217
220
|
rows.push({
|
|
218
221
|
id: (0, uuid_1.v4)(),
|
|
@@ -220,8 +223,8 @@ var toCredentialDetailsRow = function (args) { return __awaiter(void 0, void 0,
|
|
|
220
223
|
value: value,
|
|
221
224
|
imageSize: imageSize
|
|
222
225
|
});
|
|
223
|
-
_q.label =
|
|
224
|
-
case
|
|
226
|
+
_q.label = 14;
|
|
227
|
+
case 14: return [2];
|
|
225
228
|
}
|
|
226
229
|
});
|
|
227
230
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.credential-branding",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.1-unstable.
|
|
4
|
+
"version": "0.4.1-unstable.161+ee5b24d",
|
|
5
5
|
"description": "SSI UI components credential branding",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.45.94",
|
|
32
32
|
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.45.94",
|
|
33
33
|
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.45.94",
|
|
34
|
-
"@sphereon/ui-components.core": "0.4.1-unstable.
|
|
34
|
+
"@sphereon/ui-components.core": "0.4.1-unstable.161+ee5b24d",
|
|
35
35
|
"@veramo/core": "4.2.0",
|
|
36
36
|
"@veramo/utils": "4.2.0",
|
|
37
37
|
"i18n-js": "^3.8.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">= 18.2"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "ee5b24d61e75955da6e2e4e43572807db7c4aa40"
|
|
55
55
|
}
|