@yoobic/yobi 8.2.4 → 8.2.7
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/dist/cjs/yoo-card-list-simple.cjs.entry.js +1 -1
- package/dist/cjs/yoo-context-menu.cjs.entry.js +1 -0
- package/dist/cjs/yoo-entity.cjs.entry.js +53 -43
- package/dist/cjs/yoo-form-choice-radio.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-input.cjs.entry.js +3 -0
- package/dist/cjs/yoo-form-text-area.cjs.entry.js +3 -0
- package/dist/cjs/yoo-grid.cjs.entry.js +4 -7
- package/dist/cjs/yoo-text-sequence.cjs.entry.js +5 -2
- package/dist/cjs/yoo-videoplayer-core.cjs.entry.js +1 -1
- package/dist/collection/components/2.molecules/context-menu/context-menu.js +1 -0
- package/dist/collection/components/2.molecules/text-sequence/text-sequence.css +1 -1
- package/dist/collection/components/2.molecules/text-sequence/text-sequence.js +4 -1
- package/dist/collection/components/3.organisms/video-player/videoplayer-core.css +4 -0
- package/dist/collection/components/entities/card-list/simple/card-list-simple.css +4 -0
- package/dist/collection/components/entities/entity/entity.js +53 -43
- package/dist/collection/components/form/form-choice/radio/form-choice-radio.js +1 -1
- package/dist/collection/components/form/form-input/form-input.js +4 -1
- package/dist/collection/components/form/form-text-area/form-text-area.js +4 -1
- package/dist/collection/components/grid/grid/grid.js +4 -7
- package/dist/design-system/yoo-card-list-simple.entry.js +1 -1
- package/dist/design-system/yoo-context-menu.entry.js +1 -0
- package/dist/design-system/yoo-entity.entry.js +53 -43
- package/dist/design-system/yoo-form-choice-radio.entry.js +1 -1
- package/dist/design-system/yoo-form-input.entry.js +4 -1
- package/dist/design-system/yoo-form-text-area.entry.js +4 -1
- package/dist/design-system/yoo-grid.entry.js +4 -7
- package/dist/design-system/yoo-text-sequence.entry.js +5 -2
- package/dist/design-system/yoo-videoplayer-core.entry.js +1 -1
- package/dist/esm/yoo-card-list-simple.entry.js +1 -1
- package/dist/esm/yoo-context-menu.entry.js +1 -0
- package/dist/esm/yoo-entity.entry.js +53 -43
- package/dist/esm/yoo-form-choice-radio.entry.js +1 -1
- package/dist/esm/yoo-form-input.entry.js +4 -1
- package/dist/esm/yoo-form-text-area.entry.js +4 -1
- package/dist/esm/yoo-grid.entry.js +4 -7
- package/dist/esm/yoo-text-sequence.entry.js +5 -2
- package/dist/esm/yoo-videoplayer-core.entry.js +1 -1
- package/dist/types/components/2.molecules/text-sequence/text-sequence.d.ts +1 -0
- package/package.json +1 -1
|
@@ -732,7 +732,7 @@ export class YooEntityComponent {
|
|
|
732
732
|
return address;
|
|
733
733
|
}
|
|
734
734
|
renderCardList(extraClasses) {
|
|
735
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63;
|
|
735
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64;
|
|
736
736
|
let entry = {};
|
|
737
737
|
if (this.entityMapping) {
|
|
738
738
|
entry = this.entityMapping(this.item, this.entityType, this.displayType);
|
|
@@ -1076,6 +1076,16 @@ export class YooEntityComponent {
|
|
|
1076
1076
|
tagElements: compact(f.tags).map((t) => ({ innerHTML: t, color: 'stable-light' })),
|
|
1077
1077
|
subheadings: []
|
|
1078
1078
|
};
|
|
1079
|
+
if (f.stats) {
|
|
1080
|
+
entry.subheadings = [
|
|
1081
|
+
(((_5 = f.container) === null || _5 === void 0 ? void 0 : _5.name) ? f.container.name + ' ' : '') +
|
|
1082
|
+
f.stats
|
|
1083
|
+
.map((s) => {
|
|
1084
|
+
return '<span>' + translate(s.title) + ': ' + s.value.toString() + '</span>';
|
|
1085
|
+
})
|
|
1086
|
+
.join()
|
|
1087
|
+
];
|
|
1088
|
+
}
|
|
1079
1089
|
}
|
|
1080
1090
|
else if (this.entityType === 'unsplash') {
|
|
1081
1091
|
const unsplash = this.item;
|
|
@@ -1163,15 +1173,15 @@ export class YooEntityComponent {
|
|
|
1163
1173
|
}
|
|
1164
1174
|
else if (this.entityType === 'language') {
|
|
1165
1175
|
entry = {
|
|
1166
|
-
heading: ((
|
|
1167
|
-
flag: this.host.classList.contains('hide-icon') ? null : ((
|
|
1176
|
+
heading: ((_6 = this.item) === null || _6 === void 0 ? void 0 : _6.title) ? translate(this.item.title.toUpperCase()) : ((_7 = this.item) === null || _7 === void 0 ? void 0 : _7._id) ? translate(this.item._id.toUpperCase()) : translate(this.item.toUpperCase()),
|
|
1177
|
+
flag: this.host.classList.contains('hide-icon') ? null : ((_8 = this.item) === null || _8 === void 0 ? void 0 : _8._id) ? getLanguageFlag(this.item._id) : getLanguageFlag(this.item)
|
|
1168
1178
|
};
|
|
1169
1179
|
}
|
|
1170
1180
|
else if (this.entityType === 'waitlistvisit') {
|
|
1171
1181
|
const visit = this.item;
|
|
1172
1182
|
const tagElements = getWaitlistVisitTags(visit);
|
|
1173
1183
|
entry = {
|
|
1174
|
-
heading: ((
|
|
1184
|
+
heading: ((_9 = visit.name) === null || _9 === void 0 ? void 0 : _9.startsWith('NOINFO')) ? translate('NOINFO') : visit.name,
|
|
1175
1185
|
tagElements
|
|
1176
1186
|
};
|
|
1177
1187
|
if (!isWeb(this.host)) {
|
|
@@ -1186,7 +1196,7 @@ export class YooEntityComponent {
|
|
|
1186
1196
|
else if (this.entityType === 'waitlistcustomer') {
|
|
1187
1197
|
const customer = this.item;
|
|
1188
1198
|
entry = {
|
|
1189
|
-
heading: ((
|
|
1199
|
+
heading: ((_10 = customer.name) === null || _10 === void 0 ? void 0 : _10.startsWith('NOINFO')) ? translate('NOINFO') : customer.name,
|
|
1190
1200
|
subheadings: compact([customer.phone, customer.email])
|
|
1191
1201
|
};
|
|
1192
1202
|
}
|
|
@@ -1283,7 +1293,7 @@ export class YooEntityComponent {
|
|
|
1283
1293
|
subheadings: this.isAutocompleteSelected() ? null : group.description ? [group.description] : null,
|
|
1284
1294
|
iconText: group.title || group.name || group._id,
|
|
1285
1295
|
heading: group.title || group.name || group._id,
|
|
1286
|
-
imgSrc: (
|
|
1296
|
+
imgSrc: (_11 = group.icon) === null || _11 === void 0 ? void 0 : _11._downloadURL
|
|
1287
1297
|
};
|
|
1288
1298
|
entry.subheadings = group.subheadings || entry.subheadings;
|
|
1289
1299
|
}
|
|
@@ -1293,7 +1303,7 @@ export class YooEntityComponent {
|
|
|
1293
1303
|
avatarSize: this.isAutocompleteSelected() && this.item.avatarSize ? this.item.avatarSize : 'medium',
|
|
1294
1304
|
iconText: tenant.title || tenant.name,
|
|
1295
1305
|
heading: (tenant.title || tenant.name || '').toUpperCase(),
|
|
1296
|
-
imgSrc: (
|
|
1306
|
+
imgSrc: (_12 = tenant.icon) === null || _12 === void 0 ? void 0 : _12._downloadURL,
|
|
1297
1307
|
subheadings: this.isAutocompleteSelected() ? null : compact([tenant.description])
|
|
1298
1308
|
};
|
|
1299
1309
|
}
|
|
@@ -1304,7 +1314,7 @@ export class YooEntityComponent {
|
|
|
1304
1314
|
avatarFrame: 'square',
|
|
1305
1315
|
iconText: translateMulti(model.title || model.name),
|
|
1306
1316
|
heading: translateMulti(model.title || model.name),
|
|
1307
|
-
imgSrc: ((
|
|
1317
|
+
imgSrc: ((_13 = model.background) === null || _13 === void 0 ? void 0 : _13._downloadURL) || model.background,
|
|
1308
1318
|
subheadings: this.isAutocompleteSelected() ? null : compact([translateMulti(model.shortDescription)])
|
|
1309
1319
|
};
|
|
1310
1320
|
}
|
|
@@ -1313,10 +1323,10 @@ export class YooEntityComponent {
|
|
|
1313
1323
|
entry = {
|
|
1314
1324
|
heading: getUserDisplayName(filter.user),
|
|
1315
1325
|
subheadings: compact([
|
|
1316
|
-
((
|
|
1326
|
+
((_14 = filter.locations) === null || _14 === void 0 ? void 0 : _14.length) > 0
|
|
1317
1327
|
? filter.locations.length.toLocaleString() + ' ' + translate(filter.locations.length > 1 ? 'LOCATIONS' : 'LOCATION')
|
|
1318
1328
|
: null,
|
|
1319
|
-
((
|
|
1329
|
+
((_15 = filter.locationtypes) === null || _15 === void 0 ? void 0 : _15.length) > 0
|
|
1320
1330
|
? filter.locationtypes.length.toLocaleString() + ' ' + translate(filter.locationtypes.length > 1 ? 'LOCATIONTYPES' : 'LOCATIONTYPE')
|
|
1321
1331
|
: null
|
|
1322
1332
|
]),
|
|
@@ -1340,8 +1350,8 @@ export class YooEntityComponent {
|
|
|
1340
1350
|
entry = {
|
|
1341
1351
|
heading: catalog.title,
|
|
1342
1352
|
tags: this.isAutocompleteSelected() ? null : groupsResolver(catalog.group),
|
|
1343
|
-
icon: ((
|
|
1344
|
-
imgSrc: ((
|
|
1353
|
+
icon: ((_16 = catalog.image) === null || _16 === void 0 ? void 0 : _16._downloadURL) ? null : 'catalogue',
|
|
1354
|
+
imgSrc: ((_17 = catalog.image) === null || _17 === void 0 ? void 0 : _17._downloadURL) ? catalog.image._downloadURL : null,
|
|
1345
1355
|
avatarSize: this.isAutocompleteSelected() ? 'small' : 'large'
|
|
1346
1356
|
};
|
|
1347
1357
|
}
|
|
@@ -1361,8 +1371,8 @@ export class YooEntityComponent {
|
|
|
1361
1371
|
],
|
|
1362
1372
|
tagElements: product.outofstock ? [{ innerHTML: translate('OUTOFSTOCK'), color: 'danger' }] : null,
|
|
1363
1373
|
tags: this.isAutocompleteSelected() || isWeb(this.host) ? null : product.tags,
|
|
1364
|
-
icon: ((
|
|
1365
|
-
imgSrc: ((
|
|
1374
|
+
icon: ((_18 = product.image) === null || _18 === void 0 ? void 0 : _18._downloadURL) ? null : 'photo-library',
|
|
1375
|
+
imgSrc: ((_19 = product.image) === null || _19 === void 0 ? void 0 : _19._downloadURL) ? product.image._downloadURL : null,
|
|
1366
1376
|
avatarSize: this.isHistory || this.host.classList.contains('simple') ? 'large' : this.isAutocompleteSelected() && this.item.avatarSize ? this.item.avatarSize : 'extra-large',
|
|
1367
1377
|
avatarFrame: 'square',
|
|
1368
1378
|
allowCustomHtml: true
|
|
@@ -1371,7 +1381,7 @@ export class YooEntityComponent {
|
|
|
1371
1381
|
else if (this.entityType === 'violetproducts') {
|
|
1372
1382
|
const product = this.item;
|
|
1373
1383
|
let subheadings = [product.description];
|
|
1374
|
-
if (((
|
|
1384
|
+
if (((_20 = this.item.offers) === null || _20 === void 0 ? void 0 : _20.length) && ((_21 = this.item.offers[0].skus) === null || _21 === void 0 ? void 0 : _21.length) && ((_22 = this.item.offers[0].skus[0]) === null || _22 === void 0 ? void 0 : _22.sale_price)) {
|
|
1375
1385
|
subheadings = [pipes.currency.transform(this.item.offers[0].skus[0].sale_price / 100, false, this.item.offers[0].skus[0].currency, true)];
|
|
1376
1386
|
}
|
|
1377
1387
|
if (!product.available) {
|
|
@@ -1399,7 +1409,7 @@ export class YooEntityComponent {
|
|
|
1399
1409
|
};
|
|
1400
1410
|
}
|
|
1401
1411
|
else if (this.entityType === 'violetbasketitems') {
|
|
1402
|
-
const sku = (
|
|
1412
|
+
const sku = (_23 = this.item) === null || _23 === void 0 ? void 0 : _23.sku;
|
|
1403
1413
|
const price = (sku.sale_price * (this.item.quantity || 1)) / 100;
|
|
1404
1414
|
const subheadings = [pipes.currency.transform(price, false, sku.currency, true)];
|
|
1405
1415
|
entry = {
|
|
@@ -1441,11 +1451,11 @@ export class YooEntityComponent {
|
|
|
1441
1451
|
entry = {
|
|
1442
1452
|
heading: arModel.product ? arModel.product.title : 'YOOBICNA',
|
|
1443
1453
|
tagElements: arModel.experience ? [{ innerHTML: translate((arModel.experience.mode || 'object').toUpperCase()), color: 'dark' }] : null,
|
|
1444
|
-
topLeftBadge: ((
|
|
1454
|
+
topLeftBadge: ((_24 = arModel.photos) === null || _24 === void 0 ? void 0 : _24.length) > 0 ? arModel.photos.length.toLocaleString() : null,
|
|
1445
1455
|
subheadings: [arModel.product ? arModel.product.reference : '', arModel.rating ? translate('RATING') + ' ' + arModel.rating.toLocaleString() : null],
|
|
1446
1456
|
tags: arModel.experience ? [arModel.experience.name] : null,
|
|
1447
|
-
icon: ((
|
|
1448
|
-
imgSrc: ((
|
|
1457
|
+
icon: ((_26 = (_25 = arModel.product) === null || _25 === void 0 ? void 0 : _25.image) === null || _26 === void 0 ? void 0 : _26._downloadURL) ? null : 'photo-library',
|
|
1458
|
+
imgSrc: ((_28 = (_27 = arModel.product) === null || _27 === void 0 ? void 0 : _27.image) === null || _28 === void 0 ? void 0 : _28._downloadURL) ? arModel.product.image._downloadURL : null
|
|
1449
1459
|
};
|
|
1450
1460
|
}
|
|
1451
1461
|
else if (this.entityType === 'algorithm') {
|
|
@@ -1468,14 +1478,14 @@ export class YooEntityComponent {
|
|
|
1468
1478
|
subheadings: [
|
|
1469
1479
|
productBatch.product ? productBatch.product.reference : '',
|
|
1470
1480
|
...(getSession().user && getSession().user.locationRef === productBatch.locationRef
|
|
1471
|
-
? compact([((
|
|
1472
|
-
: ((
|
|
1473
|
-
? [productBatch.location.title + ' - ' + (((
|
|
1481
|
+
? compact([((_29 = this.extraClass) === null || _29 === void 0 ? void 0 : _29.indexOf('show-aisle')) >= 0 && productBatch.aisle ? productBatch.aisle.title : null])
|
|
1482
|
+
: ((_30 = productBatch.location) === null || _30 === void 0 ? void 0 : _30.title)
|
|
1483
|
+
? [productBatch.location.title + ' - ' + (((_31 = productBatch.aisle) === null || _31 === void 0 ? void 0 : _31.title) || '')]
|
|
1474
1484
|
: [])
|
|
1475
1485
|
],
|
|
1476
1486
|
tags: productBatch.tags,
|
|
1477
|
-
icon: productBatch.product.image && ((
|
|
1478
|
-
imgSrc: ((
|
|
1487
|
+
icon: productBatch.product.image && ((_33 = (_32 = productBatch.product) === null || _32 === void 0 ? void 0 : _32.image) === null || _33 === void 0 ? void 0 : _33._downloadURL) ? null : 'photo-library',
|
|
1488
|
+
imgSrc: ((_35 = (_34 = productBatch.product) === null || _34 === void 0 ? void 0 : _34.image) === null || _35 === void 0 ? void 0 : _35._downloadURL) ? productBatch.product.image._downloadURL : null
|
|
1479
1489
|
};
|
|
1480
1490
|
if (productBatch.archived) {
|
|
1481
1491
|
extraClasses += ' archived ';
|
|
@@ -1512,7 +1522,7 @@ export class YooEntityComponent {
|
|
|
1512
1522
|
heading: product.title,
|
|
1513
1523
|
subheadings,
|
|
1514
1524
|
date: isPresent(this.item.description) ? this.item.description : null,
|
|
1515
|
-
imgSrc: ((
|
|
1525
|
+
imgSrc: ((_36 = product === null || product === void 0 ? void 0 : product.image) === null || _36 === void 0 ? void 0 : _36._downloadURL) ? product.image._downloadURL : null,
|
|
1516
1526
|
avatarFrame: 'square',
|
|
1517
1527
|
// keep it explicit here to prevent to be overwritten by the autocomplete, with which the card-list is used in combination with, and that changes the size of the avatar to 'small' when only one product is selected
|
|
1518
1528
|
// this case is described into the form-entity-value-pairs.spec tests
|
|
@@ -1700,10 +1710,10 @@ export class YooEntityComponent {
|
|
|
1700
1710
|
else if (this.entityType === 'topusers') {
|
|
1701
1711
|
entry = {
|
|
1702
1712
|
heading: `${this.item.firstName} ${this.item.lastName}`,
|
|
1703
|
-
rank: (
|
|
1713
|
+
rank: (_37 = this.item) === null || _37 === void 0 ? void 0 : _37.rank,
|
|
1704
1714
|
points: null,
|
|
1705
1715
|
users: [this.item],
|
|
1706
|
-
tagElementsInHeader: { tags: (
|
|
1716
|
+
tagElementsInHeader: { tags: (_38 = this.item) === null || _38 === void 0 ? void 0 : _38.tagElements, location: 'end' }
|
|
1707
1717
|
};
|
|
1708
1718
|
}
|
|
1709
1719
|
else if (this.entityType === 'questions') {
|
|
@@ -1768,17 +1778,17 @@ export class YooEntityComponent {
|
|
|
1768
1778
|
subheadings: [
|
|
1769
1779
|
'Operation Id: ' + op.operationId,
|
|
1770
1780
|
'Request Id: ' + op.requestId,
|
|
1771
|
-
((
|
|
1772
|
-
((
|
|
1773
|
-
((
|
|
1781
|
+
((_39 = op.operation) === null || _39 === void 0 ? void 0 : _39.accessToken) ? 'User:' + getUserDisplayName(op.operation.accessToken) : null,
|
|
1782
|
+
((_42 = (_41 = (_40 = op.requestLog) === null || _40 === void 0 ? void 0 : _40.meta) === null || _41 === void 0 ? void 0 : _41.req) === null || _42 === void 0 ? void 0 : _42.headers) ? 'Origin/Referer:' + op.requestLog.meta.req.headers.origin || op.requestLog.meta.req.headers.referer : null,
|
|
1783
|
+
((_45 = (_44 = (_43 = op.requestLog) === null || _43 === void 0 ? void 0 : _43.meta) === null || _44 === void 0 ? void 0 : _44.req) === null || _45 === void 0 ? void 0 : _45.headers) && op.requestLog.meta.req.headers['yoobic-client-version']
|
|
1774
1784
|
? 'Client Version:' + op.requestLog.meta.req.headers['yoobic-client-version']
|
|
1775
1785
|
: null,
|
|
1776
|
-
((
|
|
1786
|
+
((_48 = (_47 = (_46 = op.requestLog) === null || _46 === void 0 ? void 0 : _46.meta) === null || _47 === void 0 ? void 0 : _47.req) === null || _48 === void 0 ? void 0 : _48.headers) && op.requestLog.meta.req.headers['user-agent']
|
|
1777
1787
|
? 'User Agent:' + op.requestLog.meta.req.headers['user-agent']
|
|
1778
1788
|
: null
|
|
1779
1789
|
],
|
|
1780
1790
|
date: pipes.dateFormat.transform(op._ect, 'L LT'),
|
|
1781
|
-
users: ((
|
|
1791
|
+
users: ((_49 = op.operation) === null || _49 === void 0 ? void 0 : _49.accessToken) ? [op.operation.accessToken] : null,
|
|
1782
1792
|
tagElements: compact([
|
|
1783
1793
|
op.isCreation
|
|
1784
1794
|
? {
|
|
@@ -1832,12 +1842,12 @@ export class YooEntityComponent {
|
|
|
1832
1842
|
entry = {
|
|
1833
1843
|
heading: translateMulti(battleList.title),
|
|
1834
1844
|
subheadings: [lessonsCount + ' ' + translate(lessonsCount > 1 ? 'LESSONS' : 'LESSON')],
|
|
1835
|
-
imgSrc: ((
|
|
1845
|
+
imgSrc: ((_50 = battleList.background) === null || _50 === void 0 ? void 0 : _50._downloadURL) ? battleList.background._downloadURL : null,
|
|
1836
1846
|
avatarSize: this.isAutocompleteSelected() && this.item.avatarSize ? this.item.avatarSize : 'extra-extra-large',
|
|
1837
1847
|
avatarFrame: 'square'
|
|
1838
1848
|
};
|
|
1839
1849
|
}
|
|
1840
|
-
else if (this.entityType !== 'tag' && ((
|
|
1850
|
+
else if (this.entityType !== 'tag' && ((_52 = (_51 = this.customModel) === null || _51 === void 0 ? void 0 : _51.appearance) === null || _52 === void 0 ? void 0 : _52.size)) {
|
|
1841
1851
|
entry = {};
|
|
1842
1852
|
this.customModel.appearance.forEach((value, key) => {
|
|
1843
1853
|
if (key === 'displayTypes') {
|
|
@@ -1878,7 +1888,7 @@ export class YooEntityComponent {
|
|
|
1878
1888
|
else if (this.entityType === 'widgets') {
|
|
1879
1889
|
const widget = this.item;
|
|
1880
1890
|
entry = {
|
|
1881
|
-
heading: widget.title || ((
|
|
1891
|
+
heading: widget.title || ((_53 = widget.page) === null || _53 === void 0 ? void 0 : _53.path),
|
|
1882
1892
|
imgSrc: widget.photo,
|
|
1883
1893
|
icon: widget.icon,
|
|
1884
1894
|
subheadings: compact([]),
|
|
@@ -1955,16 +1965,16 @@ export class YooEntityComponent {
|
|
|
1955
1965
|
}
|
|
1956
1966
|
const title = this.useTranslate ? defaultTitle.toUpperCase() : defaultTitle;
|
|
1957
1967
|
entry.heading = translateMulti(title);
|
|
1958
|
-
if ((
|
|
1968
|
+
if ((_54 = this.item) === null || _54 === void 0 ? void 0 : _54.description) {
|
|
1959
1969
|
entry.subheadings = [translateMulti(this.item.description)];
|
|
1960
1970
|
}
|
|
1961
|
-
if ((
|
|
1971
|
+
if ((_56 = (_55 = this.item) === null || _55 === void 0 ? void 0 : _55.background) === null || _56 === void 0 ? void 0 : _56._downloadURL) {
|
|
1962
1972
|
entry.imgSrc = this.item.background._downloadURL;
|
|
1963
1973
|
}
|
|
1964
|
-
else if (((
|
|
1974
|
+
else if (((_57 = this.item) === null || _57 === void 0 ? void 0 : _57.background) && isString(this.item.background)) {
|
|
1965
1975
|
entry.imgSrc = this.item.background;
|
|
1966
1976
|
}
|
|
1967
|
-
if ((
|
|
1977
|
+
if ((_59 = (_58 = this.item) === null || _58 === void 0 ? void 0 : _58.icon) === null || _59 === void 0 ? void 0 : _59._downloadURL) {
|
|
1968
1978
|
entry.imgSrc = this.item.icon._downloadURL;
|
|
1969
1979
|
}
|
|
1970
1980
|
else if (this.item && isString(this.item.icon)) {
|
|
@@ -1988,7 +1998,7 @@ export class YooEntityComponent {
|
|
|
1988
1998
|
const comment = this.item;
|
|
1989
1999
|
entry = parseEntityCommentsForCardList(comment);
|
|
1990
2000
|
}
|
|
1991
|
-
if ((
|
|
2001
|
+
if ((_60 = this.item) === null || _60 === void 0 ? void 0 : _60.badge) {
|
|
1992
2002
|
entry.tagElements = [{ innerHTML: this.item.badge, color: 'app-color' }];
|
|
1993
2003
|
}
|
|
1994
2004
|
}
|
|
@@ -1997,7 +2007,7 @@ export class YooEntityComponent {
|
|
|
1997
2007
|
!this.isAutocompleteSelected() &&
|
|
1998
2008
|
!this.hideUIFields &&
|
|
1999
2009
|
this.customModel &&
|
|
2000
|
-
((
|
|
2010
|
+
((_62 = (_61 = this.customModel.formFields) === null || _61 === void 0 ? void 0 : _61.filter((f) => f.showInCard)) === null || _62 === void 0 ? void 0 : _62.length) > 0) {
|
|
2001
2011
|
entry.uiFields = {
|
|
2002
2012
|
fields: this.customModel.formFields.filter((f) => f.showInCard),
|
|
2003
2013
|
data: this.item
|
|
@@ -2042,7 +2052,7 @@ export class YooEntityComponent {
|
|
|
2042
2052
|
if (this.host.classList.contains('full-width')) {
|
|
2043
2053
|
extraClasses += ' full-width ';
|
|
2044
2054
|
}
|
|
2045
|
-
if (((
|
|
2055
|
+
if (((_63 = this.item) === null || _63 === void 0 ? void 0 : _63._id) === getSession().userId) {
|
|
2046
2056
|
extraClasses += ' current ';
|
|
2047
2057
|
}
|
|
2048
2058
|
if (this.extraClass) {
|
|
@@ -2071,7 +2081,7 @@ export class YooEntityComponent {
|
|
|
2071
2081
|
[extraClasses]: true,
|
|
2072
2082
|
[this.entityType]: this.entityType !== undefined,
|
|
2073
2083
|
'form-permission': this.host.classList.contains('form-permission')
|
|
2074
|
-
} }, ((
|
|
2084
|
+
} }, ((_64 = this.inlineActions) === null || _64 === void 0 ? void 0 : _64.length) > 0 && (h("span", { class: "slot-container", slot: "content-slot" }, this.inlineActions.map((action) => {
|
|
2075
2085
|
return (h("span", { class: action.cssClass, onClick: () => (action.handler ? action.handler(this.item) : null) }, action.text));
|
|
2076
2086
|
})))));
|
|
2077
2087
|
}
|
|
@@ -98,7 +98,7 @@ export class YooFormChoiceRadioComponent {
|
|
|
98
98
|
}
|
|
99
99
|
return [
|
|
100
100
|
this.choices &&
|
|
101
|
-
h("yoo-grid", { class: "choice radio-button-choice", blockSelectionMode: true, items: valuesEntity, initialSelection: initialEntity, keepSelection: true, multiple: this.multiple, displayType: "card-list", onSelected: (ev) => this.onItemSelectRadio(ev.detail), hideHeader: true, isLocal: true, useTranslate: this.useTranslate, animated: false, valuesColor: this.valuesColor }),
|
|
101
|
+
h("yoo-grid", { class: "choice radio-button-choice", blockSelectionMode: true, items: valuesEntity, initialSelection: initialEntity, keepSelection: true, multiple: this.multiple, displayType: "card-list", onSelected: (ev) => this.onItemSelectRadio(ev.detail), onChecked: (ev) => this.onItemSelectRadio(ev.detail), hideHeader: true, isLocal: true, useTranslate: this.useTranslate, animated: false, valuesColor: this.valuesColor }),
|
|
102
102
|
this.showOther &&
|
|
103
103
|
h("div", { class: "input-zone" },
|
|
104
104
|
h("textarea", { ref: (el) => (this.textareaRef = el), value: this.textareaValue, onInput: (ev) => this.onInput(ev), onFocus: () => this.onTextAreaFocused() }))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { copyToClipboard, debounce as _debounce, extractTextFromStringHTML, isAndroid, isAnimationsDisabled, isHTML, isIOS, isNativeMobile, isNullOrUndefined, isSafari, isWeb, resizeObserve, showToast, translate } from '@shared/utils';
|
|
1
|
+
import { copyToClipboard, debounce as _debounce, enableKeyboardResize, extractTextFromStringHTML, isAndroid, isAnimationsDisabled, isHTML, isIOS, isNativeMobile, isNullOrUndefined, isSafari, isWeb, resizeObserve, showToast, translate } from '@shared/utils';
|
|
2
2
|
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
|
|
3
3
|
import { isFunction, isNumber, isString } from 'lodash-es';
|
|
4
4
|
import { getAppContext } from '../../../utils/helpers/common-helpers';
|
|
@@ -160,6 +160,9 @@ export class YooFormInputComponent {
|
|
|
160
160
|
this.inputElement.value = this.value;
|
|
161
161
|
this.updateRemainingCharacters();
|
|
162
162
|
}
|
|
163
|
+
if (isNativeMobile() && isIOS()) {
|
|
164
|
+
enableKeyboardResize();
|
|
165
|
+
}
|
|
163
166
|
if (this.focusOnRendered) {
|
|
164
167
|
this.setFocus();
|
|
165
168
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Keyboard } from '@capacitor/keyboard';
|
|
2
|
-
import { containsUrls, debounce, findParent, getAsyncExtraData, isFirefox, isNativeMobile, isNullOrUndefined, isWeb, replaceAndGetAllLinks, replaceAtTagToMentionTag, safeScrollIntoView, translate, translateMulti } from '@shared/utils';
|
|
2
|
+
import { containsUrls, debounce, enableKeyboardResize, findParent, getAsyncExtraData, isFirefox, isIOS, isNativeMobile, isNullOrUndefined, isWeb, replaceAndGetAllLinks, replaceAtTagToMentionTag, safeScrollIntoView, translate, translateMulti } from '@shared/utils';
|
|
3
3
|
import { Component, Element, Event, forceUpdate, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';
|
|
4
4
|
import { getAppContext, sanitizeHTML } from '../../../utils/helpers/common-helpers';
|
|
5
5
|
import { onInputBlurred, onInputClear, onInputFocused, setValidator, setValueAndValidateInput } from '../../../utils/helpers/form-input-helpers';
|
|
@@ -123,6 +123,9 @@ export class YooFormTextAreaComponent {
|
|
|
123
123
|
textArea.setAttribute('style', `resize: ${this.resizable};`);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
+
if (isNativeMobile() && isIOS()) {
|
|
127
|
+
enableKeyboardResize();
|
|
128
|
+
}
|
|
126
129
|
if (this.autoInitialRows && this.inputEl) {
|
|
127
130
|
const scrollHeight = this.inputEl.scrollHeight;
|
|
128
131
|
const PADDING = 16;
|
|
@@ -821,12 +821,12 @@ export class YooGridComponent {
|
|
|
821
821
|
if (this.total > 0) {
|
|
822
822
|
rowCount = this.total;
|
|
823
823
|
}
|
|
824
|
+
else if (this.isTree() && ((_a = p.request.groupKeys) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
825
|
+
rowCount = (data === null || data === void 0 ? void 0 : data.length) + p.request.startRow;
|
|
826
|
+
}
|
|
824
827
|
else {
|
|
825
828
|
rowCount = (data === null || data === void 0 ? void 0 : data.length) + (this.gridApi.getDisplayedRowCount() - 1);
|
|
826
829
|
}
|
|
827
|
-
if (this.isTree() && ((_a = p.request.groupKeys) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
828
|
-
rowCount += p.request.startRow;
|
|
829
|
-
}
|
|
830
830
|
}
|
|
831
831
|
p.success({ rowData: data, rowCount });
|
|
832
832
|
this.isEmptyAgGrid = !((data === null || data === void 0 ? void 0 : data.length) > 0 || (this.isTree() && ((_b = p.request.groupKeys) === null || _b === void 0 ? void 0 : _b.length) > 0) || currentPage > 0);
|
|
@@ -850,9 +850,6 @@ export class YooGridComponent {
|
|
|
850
850
|
},
|
|
851
851
|
onRowClicked: (event) => {
|
|
852
852
|
var _a, _b, _c;
|
|
853
|
-
if (this.isReadonly) {
|
|
854
|
-
return;
|
|
855
|
-
}
|
|
856
853
|
if (((_a = event.node) === null || _a === void 0 ? void 0 : _a.data) && !this.disconnected && (((_c = (_b = this.gridApi) === null || _b === void 0 ? void 0 : _b.getEditingCells()) === null || _c === void 0 ? void 0 : _c.length) || 0) === 0 && !this.disableRowClick) {
|
|
857
854
|
this.onItemSelect(event.node.data, false);
|
|
858
855
|
}
|
|
@@ -915,7 +912,7 @@ export class YooGridComponent {
|
|
|
915
912
|
};
|
|
916
913
|
if (this.isTree()) {
|
|
917
914
|
this.finalGridConfig.groupDisplayType = 'custom';
|
|
918
|
-
this.finalGridConfig.serverSideStoreType = 'full';
|
|
915
|
+
// this.finalGridConfig.serverSideStoreType = 'full';
|
|
919
916
|
}
|
|
920
917
|
this.finalGridConfig.rowModelType = this.finalGridConfig.rowModelType || 'serverSide';
|
|
921
918
|
if (this.gridDomLayout) {
|
|
@@ -6,7 +6,7 @@ import './lodash-063b88d5.js';
|
|
|
6
6
|
import './_commonjsHelpers-f4d11124.js';
|
|
7
7
|
import './index-cbc2c080.js';
|
|
8
8
|
|
|
9
|
-
const cardListSimpleCss = ":host{--border-bottom-outer-container:var(--border-width-01, 0.0625rem) solid var(--stable-alt-40, rgba(208, 208, 208, 0.4));--inner-text-color:var(--dark, #000000);display:block;height:100%;cursor:pointer}:host .outer-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;min-height:44px;padding:var(--spacing-08, 0.5rem) 0;border-bottom:var(--border-bottom-outer-container);-webkit-transition:background-color 0.3s ease, padding 0.3s ease;transition:background-color 0.3s ease, padding 0.3s ease}:host .outer-container.tapped{background-color:var(--stable-light, #f1f1f1);-webkit-transition:background-color 0.3s ease;transition:background-color 0.3s ease}:host .outer-container .text{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-width:0px;color:var(--inner-text-color);font-size:var(--font-size-18, 1.125rem);line-height:1.5;word-break:break-word}:host .outer-container .text *{-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0}:host .outer-container .text .subheading{color:var(--text-color, #807f83);font-size:var(--font-size-14, 0.875rem)}:host .outer-container .image-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--spacing-08, 0.5rem);padding:0}:host .outer-container .image-container .flag-container{width:100%;height:100%}:host(.language) .outer-container{-ms-flex-align:center;align-items:center}:host(.language) .outer-container .image-container{width:1.5rem;height:1.5rem;overflow:hidden;font-size:var(--font-size-36, 2.25rem);border-radius:var(--border-radius-16, 1rem)}:host(.language) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.selected-content) .outer-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:auto;padding:0}:host(.selected-content) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.selected-content) .outer-container .text .heading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(.form-choice) .outer-container{padding:0}:host(.form-choice) .outer-container .text{padding-top:0;white-space:normal;word-break:break-word}:host(.form-choice) .outer-container .text .heading{margin:var(--spacing-16, 1rem) 0}:host(.selection-mode.mobile) .outer-container .text{margin-right:var(--spacing-32, 2rem)}:host(.web) .outer-container{min-height:auto;background:transparent}:host(.web) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.web) .outer-container .subheading{font-size:var(--font-size-14, 0.875rem)}:host(.small.selected-content) .outer-container .text{font-size:var(--font-size-12, 0.75rem)}:host(.medium.selected-content) .outer-container .text{font-size:var(--font-size-14, 0.875rem)}:host(.large.selected-content) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.small.autocomplete-selection-mode) .outer-container .text{font-size:var(--font-size-14, 0.875rem)}:host(.medium.autocompelte-selection-mode) .outer-container .text .heading{font-size:var(--font-size-16, 1rem)}:host(.medium.autocompelte-selection-mode) .outer-container .text .subheading-container .subheading{font-size:var(--font-size-14, 0.875rem)}:host(.no-border-bottom.mobile) .outer-container{border-bottom:none}:host(.groups.web) .outer-container .text .subheading-container{display:-ms-flexbox;display:flex}:host(.groups.web) .outer-container .text .subheading-container .subheading{padding-right:var(--spacing-16, 1rem)}:host(.products.outofstock){opacity:0.5}:host(.autocomplete) .outer-container .image-container .play{position:absolute}:host(.web.pages) .outer-container{border-bottom:none}:host(.mobile.autocomplete-selection-mode) .outer-container{border-bottom:none}:host(.outofstock),:host(.hidden){opacity:0.5}";
|
|
9
|
+
const cardListSimpleCss = ":host{--border-bottom-outer-container:var(--border-width-01, 0.0625rem) solid var(--stable-alt-40, rgba(208, 208, 208, 0.4));--inner-text-color:var(--dark, #000000);display:block;height:100%;cursor:pointer}:host .outer-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;min-height:44px;padding:var(--spacing-08, 0.5rem) 0;border-bottom:var(--border-bottom-outer-container);-webkit-transition:background-color 0.3s ease, padding 0.3s ease;transition:background-color 0.3s ease, padding 0.3s ease}:host .outer-container.tapped{background-color:var(--stable-light, #f1f1f1);-webkit-transition:background-color 0.3s ease;transition:background-color 0.3s ease}:host .outer-container .text{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-width:0px;color:var(--inner-text-color);font-size:var(--font-size-18, 1.125rem);line-height:1.5;word-break:break-word}:host .outer-container .text *{-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0}:host .outer-container .text .subheading{color:var(--text-color, #807f83);font-size:var(--font-size-14, 0.875rem)}:host .outer-container .image-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--spacing-08, 0.5rem);padding:0}:host .outer-container .image-container .flag-container{width:100%;height:100%}:host(.grid-cell){height:initial}:host(.language) .outer-container{-ms-flex-align:center;align-items:center}:host(.language) .outer-container .image-container{width:1.5rem;height:1.5rem;overflow:hidden;font-size:var(--font-size-36, 2.25rem);border-radius:var(--border-radius-16, 1rem)}:host(.language) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.selected-content) .outer-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:auto;padding:0}:host(.selected-content) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.selected-content) .outer-container .text .heading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(.form-choice) .outer-container{padding:0}:host(.form-choice) .outer-container .text{padding-top:0;white-space:normal;word-break:break-word}:host(.form-choice) .outer-container .text .heading{margin:var(--spacing-16, 1rem) 0}:host(.selection-mode.mobile) .outer-container .text{margin-right:var(--spacing-32, 2rem)}:host(.web) .outer-container{min-height:auto;background:transparent}:host(.web) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.web) .outer-container .subheading{font-size:var(--font-size-14, 0.875rem)}:host(.small.selected-content) .outer-container .text{font-size:var(--font-size-12, 0.75rem)}:host(.medium.selected-content) .outer-container .text{font-size:var(--font-size-14, 0.875rem)}:host(.large.selected-content) .outer-container .text{font-size:var(--font-size-16, 1rem)}:host(.small.autocomplete-selection-mode) .outer-container .text{font-size:var(--font-size-14, 0.875rem)}:host(.medium.autocompelte-selection-mode) .outer-container .text .heading{font-size:var(--font-size-16, 1rem)}:host(.medium.autocompelte-selection-mode) .outer-container .text .subheading-container .subheading{font-size:var(--font-size-14, 0.875rem)}:host(.no-border-bottom.mobile) .outer-container{border-bottom:none}:host(.groups.web) .outer-container .text .subheading-container{display:-ms-flexbox;display:flex}:host(.groups.web) .outer-container .text .subheading-container .subheading{padding-right:var(--spacing-16, 1rem)}:host(.products.outofstock){opacity:0.5}:host(.autocomplete) .outer-container .image-container .play{position:absolute}:host(.web.pages) .outer-container{border-bottom:none}:host(.mobile.autocomplete-selection-mode) .outer-container{border-bottom:none}:host(.outofstock),:host(.hidden){opacity:0.5}";
|
|
10
10
|
|
|
11
11
|
const YooCardListSimpleComponent = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -55,6 +55,7 @@ const YooContextMenuComponent = class {
|
|
|
55
55
|
selectedItems: this.selectedItems,
|
|
56
56
|
className: this.host.className,
|
|
57
57
|
contextMenuOpened: this.contextMenuOpened,
|
|
58
|
+
contextMenuClosed: this.contextMenuClosed,
|
|
58
59
|
hostElement: ((_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector(this.hostSelector)) || this.host
|
|
59
60
|
};
|
|
60
61
|
}
|