@empathyco/x-components 4.0.2-alpha.0 → 4.1.0-alpha.0
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/CHANGELOG.md +9 -0
- package/design-system/deprecated-full-theme.css +227 -227
- package/docs/API-reference/api/x-components.queriespreviewxevents.md +1 -1
- package/docs/API-reference/api/{x-components.queriespreviewxevents.querypreviewunmountedhook.md → x-components.queriespreviewxevents.noncacheablequerypreviewunmounted.md} +3 -3
- package/docs/API-reference/api/x-components.querypreview.md +1 -1
- package/docs/API-reference/api/{x-components.querypreview.clearondestroy.md → x-components.querypreview.persistincache.md} +3 -3
- package/docs/API-reference/components/queries-preview/x-components.query-preview.md +8 -7
- package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue_rollup-plugin-vue_script.vue.js +14 -6
- package/js/x-modules/queries-preview/components/query-preview.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
- package/js/x-modules/queries-preview/wiring.js +1 -1
- package/js/x-modules/queries-preview/wiring.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +43 -43
- package/report/x-components.api.md +3 -3
- package/types/x-modules/queries-preview/components/query-preview.vue.d.ts +2 -2
- package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
- package/types/x-modules/queries-preview/events.types.d.ts +1 -1
- package/types/x-modules/queries-preview/events.types.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
- package/types/x-modules/queries-preview/wiring.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.1.0-alpha.0](https://github.com/empathyco/x/compare/@empathyco/x-components@4.0.2-alpha.0...@empathyco/x-components@4.1.0-alpha.0) (2023-12-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **query-preview:** use cached query-previews (#1360) ([2579ca4](https://github.com/empathyco/x/commit/2579ca42d52c6f6c428b9129d63dc4a0ddb4788c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [4.0.2-alpha.0](https://github.com/empathyco/x/compare/@empathyco/x-components@4.0.1...@empathyco/x-components@4.0.2-alpha.0) (2023-11-29)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @empathyco/x-components
|
|
@@ -1187,18 +1187,6 @@
|
|
|
1187
1187
|
.x-self-baseline {
|
|
1188
1188
|
align-self: baseline !important;
|
|
1189
1189
|
}
|
|
1190
|
-
.dev-mode .slot-helper {
|
|
1191
|
-
font-family: inherit;
|
|
1192
|
-
color: grey;
|
|
1193
|
-
box-sizing: border-box;
|
|
1194
|
-
display: flex;
|
|
1195
|
-
height: 100%;
|
|
1196
|
-
width: 100%;
|
|
1197
|
-
justify-content: center;
|
|
1198
|
-
align-items: center;
|
|
1199
|
-
border: dashed 1px grey;
|
|
1200
|
-
border-radius: 10px;
|
|
1201
|
-
}
|
|
1202
1190
|
.x-fill--lead {
|
|
1203
1191
|
fill: var(--x-color-base-lead) !important;
|
|
1204
1192
|
}
|
|
@@ -1242,6 +1230,18 @@
|
|
|
1242
1230
|
.x-fill--transparent {
|
|
1243
1231
|
fill: var(--x-color-base-transparent) !important;
|
|
1244
1232
|
}
|
|
1233
|
+
.dev-mode .slot-helper {
|
|
1234
|
+
font-family: inherit;
|
|
1235
|
+
color: grey;
|
|
1236
|
+
box-sizing: border-box;
|
|
1237
|
+
display: flex;
|
|
1238
|
+
height: 100%;
|
|
1239
|
+
width: 100%;
|
|
1240
|
+
justify-content: center;
|
|
1241
|
+
align-items: center;
|
|
1242
|
+
border: dashed 1px grey;
|
|
1243
|
+
border-radius: 10px;
|
|
1244
|
+
}
|
|
1245
1245
|
/* Material Elevations extracted from:
|
|
1246
1246
|
https://gist.github.com/serglo/f9f0be9a66fd6755a0bda85f9c64e85f
|
|
1247
1247
|
*/
|
|
@@ -1310,6 +1310,71 @@
|
|
|
1310
1310
|
--x-string-box-shadow-bottom-10: 0 34px 38px -7px rgba(0, 0, 0, 0.14),
|
|
1311
1311
|
0 29px 46px -12px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
|
|
1312
1312
|
}
|
|
1313
|
+
|
|
1314
|
+
.x-shadow--none {
|
|
1315
|
+
box-shadow: none !important;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.x-shadow--01 {
|
|
1319
|
+
box-shadow: var(--x-string-box-shadow-01) !important;
|
|
1320
|
+
}
|
|
1321
|
+
.x-shadow--bottom-01 {
|
|
1322
|
+
box-shadow: var(--x-string-box-shadow-bottom-01) !important;
|
|
1323
|
+
}
|
|
1324
|
+
.x-shadow--02 {
|
|
1325
|
+
box-shadow: var(--x-string-box-shadow-02) !important;
|
|
1326
|
+
}
|
|
1327
|
+
.x-shadow--bottom-02 {
|
|
1328
|
+
box-shadow: var(--x-string-box-shadow-bottom-02) !important;
|
|
1329
|
+
}
|
|
1330
|
+
.x-shadow--03 {
|
|
1331
|
+
box-shadow: var(--x-string-box-shadow-03) !important;
|
|
1332
|
+
}
|
|
1333
|
+
.x-shadow--bottom-03 {
|
|
1334
|
+
box-shadow: var(--x-string-box-shadow-bottom-03) !important;
|
|
1335
|
+
}
|
|
1336
|
+
.x-shadow--04 {
|
|
1337
|
+
box-shadow: var(--x-string-box-shadow-04) !important;
|
|
1338
|
+
}
|
|
1339
|
+
.x-shadow--bottom-04 {
|
|
1340
|
+
box-shadow: var(--x-string-box-shadow-bottom-04) !important;
|
|
1341
|
+
}
|
|
1342
|
+
.x-shadow--05 {
|
|
1343
|
+
box-shadow: var(--x-string-box-shadow-05) !important;
|
|
1344
|
+
}
|
|
1345
|
+
.x-shadow--bottom-05 {
|
|
1346
|
+
box-shadow: var(--x-string-box-shadow-bottom-05) !important;
|
|
1347
|
+
}
|
|
1348
|
+
.x-shadow--06 {
|
|
1349
|
+
box-shadow: var(--x-string-box-shadow-06) !important;
|
|
1350
|
+
}
|
|
1351
|
+
.x-shadow--bottom-06 {
|
|
1352
|
+
box-shadow: var(--x-string-box-shadow-bottom-06) !important;
|
|
1353
|
+
}
|
|
1354
|
+
.x-shadow--07 {
|
|
1355
|
+
box-shadow: var(--x-string-box-shadow-07) !important;
|
|
1356
|
+
}
|
|
1357
|
+
.x-shadow--bottom-07 {
|
|
1358
|
+
box-shadow: var(--x-string-box-shadow-bottom-07) !important;
|
|
1359
|
+
}
|
|
1360
|
+
.x-shadow--08 {
|
|
1361
|
+
box-shadow: var(--x-string-box-shadow-08) !important;
|
|
1362
|
+
}
|
|
1363
|
+
.x-shadow--bottom-08 {
|
|
1364
|
+
box-shadow: var(--x-string-box-shadow-bottom-08) !important;
|
|
1365
|
+
}
|
|
1366
|
+
.x-shadow--09 {
|
|
1367
|
+
box-shadow: var(--x-string-box-shadow-09) !important;
|
|
1368
|
+
}
|
|
1369
|
+
.x-shadow--bottom-09 {
|
|
1370
|
+
box-shadow: var(--x-string-box-shadow-bottom-09) !important;
|
|
1371
|
+
}
|
|
1372
|
+
.x-shadow--10 {
|
|
1373
|
+
box-shadow: var(--x-string-box-shadow-10) !important;
|
|
1374
|
+
}
|
|
1375
|
+
.x-shadow--bottom-10 {
|
|
1376
|
+
box-shadow: var(--x-string-box-shadow-bottom-10) !important;
|
|
1377
|
+
}
|
|
1313
1378
|
/* Material Elevations extracted from:
|
|
1314
1379
|
https://gist.github.com/serglo/f9f0be9a66fd6755a0bda85f9c64e85f
|
|
1315
1380
|
*/
|
|
@@ -1378,71 +1443,6 @@
|
|
|
1378
1443
|
--x-string-box-shadow-bottom-10: 0 34px 38px -7px rgba(0, 0, 0, 0.14),
|
|
1379
1444
|
0 29px 46px -12px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
|
|
1380
1445
|
}
|
|
1381
|
-
|
|
1382
|
-
.x-shadow--none {
|
|
1383
|
-
box-shadow: none !important;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
.x-shadow--01 {
|
|
1387
|
-
box-shadow: var(--x-string-box-shadow-01) !important;
|
|
1388
|
-
}
|
|
1389
|
-
.x-shadow--bottom-01 {
|
|
1390
|
-
box-shadow: var(--x-string-box-shadow-bottom-01) !important;
|
|
1391
|
-
}
|
|
1392
|
-
.x-shadow--02 {
|
|
1393
|
-
box-shadow: var(--x-string-box-shadow-02) !important;
|
|
1394
|
-
}
|
|
1395
|
-
.x-shadow--bottom-02 {
|
|
1396
|
-
box-shadow: var(--x-string-box-shadow-bottom-02) !important;
|
|
1397
|
-
}
|
|
1398
|
-
.x-shadow--03 {
|
|
1399
|
-
box-shadow: var(--x-string-box-shadow-03) !important;
|
|
1400
|
-
}
|
|
1401
|
-
.x-shadow--bottom-03 {
|
|
1402
|
-
box-shadow: var(--x-string-box-shadow-bottom-03) !important;
|
|
1403
|
-
}
|
|
1404
|
-
.x-shadow--04 {
|
|
1405
|
-
box-shadow: var(--x-string-box-shadow-04) !important;
|
|
1406
|
-
}
|
|
1407
|
-
.x-shadow--bottom-04 {
|
|
1408
|
-
box-shadow: var(--x-string-box-shadow-bottom-04) !important;
|
|
1409
|
-
}
|
|
1410
|
-
.x-shadow--05 {
|
|
1411
|
-
box-shadow: var(--x-string-box-shadow-05) !important;
|
|
1412
|
-
}
|
|
1413
|
-
.x-shadow--bottom-05 {
|
|
1414
|
-
box-shadow: var(--x-string-box-shadow-bottom-05) !important;
|
|
1415
|
-
}
|
|
1416
|
-
.x-shadow--06 {
|
|
1417
|
-
box-shadow: var(--x-string-box-shadow-06) !important;
|
|
1418
|
-
}
|
|
1419
|
-
.x-shadow--bottom-06 {
|
|
1420
|
-
box-shadow: var(--x-string-box-shadow-bottom-06) !important;
|
|
1421
|
-
}
|
|
1422
|
-
.x-shadow--07 {
|
|
1423
|
-
box-shadow: var(--x-string-box-shadow-07) !important;
|
|
1424
|
-
}
|
|
1425
|
-
.x-shadow--bottom-07 {
|
|
1426
|
-
box-shadow: var(--x-string-box-shadow-bottom-07) !important;
|
|
1427
|
-
}
|
|
1428
|
-
.x-shadow--08 {
|
|
1429
|
-
box-shadow: var(--x-string-box-shadow-08) !important;
|
|
1430
|
-
}
|
|
1431
|
-
.x-shadow--bottom-08 {
|
|
1432
|
-
box-shadow: var(--x-string-box-shadow-bottom-08) !important;
|
|
1433
|
-
}
|
|
1434
|
-
.x-shadow--09 {
|
|
1435
|
-
box-shadow: var(--x-string-box-shadow-09) !important;
|
|
1436
|
-
}
|
|
1437
|
-
.x-shadow--bottom-09 {
|
|
1438
|
-
box-shadow: var(--x-string-box-shadow-bottom-09) !important;
|
|
1439
|
-
}
|
|
1440
|
-
.x-shadow--10 {
|
|
1441
|
-
box-shadow: var(--x-string-box-shadow-10) !important;
|
|
1442
|
-
}
|
|
1443
|
-
.x-shadow--bottom-10 {
|
|
1444
|
-
box-shadow: var(--x-string-box-shadow-bottom-10) !important;
|
|
1445
|
-
}
|
|
1446
1446
|
*[class*=x-border-width--] {
|
|
1447
1447
|
border-width: 0;
|
|
1448
1448
|
}
|
|
@@ -3683,52 +3683,6 @@
|
|
|
3683
3683
|
--x-number-font-weight-tag-default-selected
|
|
3684
3684
|
);
|
|
3685
3685
|
}
|
|
3686
|
-
:root {
|
|
3687
|
-
--x-color-background-tag-default: var(--x-color-base-neutral-100);
|
|
3688
|
-
--x-color-border-tag-default: var(--x-color-text-tag-default);
|
|
3689
|
-
--x-color-text-tag-default: var(--x-color-text-default);
|
|
3690
|
-
--x-color-background-tag-default-selected: var(--x-color-base-neutral-95);
|
|
3691
|
-
--x-color-border-tag-default-selected: var(--x-color-border-tag-default);
|
|
3692
|
-
--x-color-text-tag-default-selected: var(--x-color-text-tag-default);
|
|
3693
|
-
--x-color-background-tag-default-curated: var(--x-color-background-tag-default);
|
|
3694
|
-
--x-color-border-tag-default-curated: var(--x-color-border-tag-default);
|
|
3695
|
-
--x-color-text-tag-default-curated: var(--x-color-text-tag-default);
|
|
3696
|
-
--x-color-background-tag-default-curated-selected: var(--x-color-background-tag-default-selected);
|
|
3697
|
-
--x-color-border-tag-default-curated-selected: var(--x-color-border-tag-default-selected);
|
|
3698
|
-
--x-color-text-tag-default-curated-selected: var(--x-color-text-tag-default-selected);
|
|
3699
|
-
--x-size-border-width-tag-default: var(--x-size-border-width-base);
|
|
3700
|
-
--x-size-border-width-top-tag-default: var(--x-size-border-width-tag-default);
|
|
3701
|
-
--x-size-border-width-right-tag-default: var(--x-size-border-width-tag-default);
|
|
3702
|
-
--x-size-border-width-bottom-tag-default: var(--x-size-border-width-tag-default);
|
|
3703
|
-
--x-size-border-width-left-tag-default: var(--x-size-border-width-tag-default);
|
|
3704
|
-
--x-size-border-radius-tag-default: var(--x-size-border-radius-base-none);
|
|
3705
|
-
--x-size-border-radius-top-left-tag-default: var(--x-size-border-radius-tag-default);
|
|
3706
|
-
--x-size-border-radius-top-right-tag-default: var(--x-size-border-radius-tag-default);
|
|
3707
|
-
--x-size-border-radius-bottom-right-tag-default: var(--x-size-border-radius-tag-default);
|
|
3708
|
-
--x-size-border-radius-bottom-left-tag-default: var(--x-size-border-radius-tag-default);
|
|
3709
|
-
--x-size-height-tag-default: var(--x-size-base-07);
|
|
3710
|
-
--x-size-padding-right-tag-default: var(--x-size-base-04);
|
|
3711
|
-
--x-size-padding-left-tag-default: var(--x-size-base-04);
|
|
3712
|
-
--x-size-gap-tag-default: var(--x-size-base-02);
|
|
3713
|
-
--x-font-family-tag-default: var(--x-font-family-text);
|
|
3714
|
-
--x-size-font-tag-default: var(--x-size-font-text);
|
|
3715
|
-
--x-size-line-height-tag-default: var(--x-size-line-height-text);
|
|
3716
|
-
--x-number-font-weight-tag-default: var(--x-number-font-weight-text);
|
|
3717
|
-
--x-font-family-tag-default-selected: var(--x-font-family-tag-default);
|
|
3718
|
-
--x-size-font-tag-default-selected: var(--x-size-font-tag-default);
|
|
3719
|
-
--x-size-line-height-tag-default-selected: var(--x-size-line-height-tag-default);
|
|
3720
|
-
--x-number-font-weight-tag-default-selected: var(--x-number-font-weight-tag-default);
|
|
3721
|
-
--x-font-family-tag-default-curated: var(--x-font-family-tag-default);
|
|
3722
|
-
--x-size-font-tag-default-curated: var(--x-size-font-tag-default);
|
|
3723
|
-
--x-size-line-height-tag-default-curated: var(--x-size-line-height-tag-default);
|
|
3724
|
-
--x-number-font-weight-tag-default-curated: var(--x-number-font-weight-tag-default);
|
|
3725
|
-
--x-font-family-tag-default-curated-selected: var(--x-font-family-tag-default-selected);
|
|
3726
|
-
--x-size-font-tag-default-curated-selected: var(--x-size-font-tag-default-selected);
|
|
3727
|
-
--x-size-line-height-tag-default-curated-selected: var(--x-size-line-height-tag-default-selected);
|
|
3728
|
-
--x-number-font-weight-tag-default-curated-selected: var(
|
|
3729
|
-
--x-number-font-weight-tag-default-selected
|
|
3730
|
-
);
|
|
3731
|
-
}
|
|
3732
3686
|
|
|
3733
3687
|
[dir="ltr"] .x-tag {
|
|
3734
3688
|
border-left-width: var(--x-size-border-width-left-tag-default);
|
|
@@ -3904,6 +3858,52 @@
|
|
|
3904
3858
|
);
|
|
3905
3859
|
--x-size-line-height-filter-default-selected: var(--x-size-line-height-tag-default-selected);
|
|
3906
3860
|
}
|
|
3861
|
+
:root {
|
|
3862
|
+
--x-color-background-tag-default: var(--x-color-base-neutral-100);
|
|
3863
|
+
--x-color-border-tag-default: var(--x-color-text-tag-default);
|
|
3864
|
+
--x-color-text-tag-default: var(--x-color-text-default);
|
|
3865
|
+
--x-color-background-tag-default-selected: var(--x-color-base-neutral-95);
|
|
3866
|
+
--x-color-border-tag-default-selected: var(--x-color-border-tag-default);
|
|
3867
|
+
--x-color-text-tag-default-selected: var(--x-color-text-tag-default);
|
|
3868
|
+
--x-color-background-tag-default-curated: var(--x-color-background-tag-default);
|
|
3869
|
+
--x-color-border-tag-default-curated: var(--x-color-border-tag-default);
|
|
3870
|
+
--x-color-text-tag-default-curated: var(--x-color-text-tag-default);
|
|
3871
|
+
--x-color-background-tag-default-curated-selected: var(--x-color-background-tag-default-selected);
|
|
3872
|
+
--x-color-border-tag-default-curated-selected: var(--x-color-border-tag-default-selected);
|
|
3873
|
+
--x-color-text-tag-default-curated-selected: var(--x-color-text-tag-default-selected);
|
|
3874
|
+
--x-size-border-width-tag-default: var(--x-size-border-width-base);
|
|
3875
|
+
--x-size-border-width-top-tag-default: var(--x-size-border-width-tag-default);
|
|
3876
|
+
--x-size-border-width-right-tag-default: var(--x-size-border-width-tag-default);
|
|
3877
|
+
--x-size-border-width-bottom-tag-default: var(--x-size-border-width-tag-default);
|
|
3878
|
+
--x-size-border-width-left-tag-default: var(--x-size-border-width-tag-default);
|
|
3879
|
+
--x-size-border-radius-tag-default: var(--x-size-border-radius-base-none);
|
|
3880
|
+
--x-size-border-radius-top-left-tag-default: var(--x-size-border-radius-tag-default);
|
|
3881
|
+
--x-size-border-radius-top-right-tag-default: var(--x-size-border-radius-tag-default);
|
|
3882
|
+
--x-size-border-radius-bottom-right-tag-default: var(--x-size-border-radius-tag-default);
|
|
3883
|
+
--x-size-border-radius-bottom-left-tag-default: var(--x-size-border-radius-tag-default);
|
|
3884
|
+
--x-size-height-tag-default: var(--x-size-base-07);
|
|
3885
|
+
--x-size-padding-right-tag-default: var(--x-size-base-04);
|
|
3886
|
+
--x-size-padding-left-tag-default: var(--x-size-base-04);
|
|
3887
|
+
--x-size-gap-tag-default: var(--x-size-base-02);
|
|
3888
|
+
--x-font-family-tag-default: var(--x-font-family-text);
|
|
3889
|
+
--x-size-font-tag-default: var(--x-size-font-text);
|
|
3890
|
+
--x-size-line-height-tag-default: var(--x-size-line-height-text);
|
|
3891
|
+
--x-number-font-weight-tag-default: var(--x-number-font-weight-text);
|
|
3892
|
+
--x-font-family-tag-default-selected: var(--x-font-family-tag-default);
|
|
3893
|
+
--x-size-font-tag-default-selected: var(--x-size-font-tag-default);
|
|
3894
|
+
--x-size-line-height-tag-default-selected: var(--x-size-line-height-tag-default);
|
|
3895
|
+
--x-number-font-weight-tag-default-selected: var(--x-number-font-weight-tag-default);
|
|
3896
|
+
--x-font-family-tag-default-curated: var(--x-font-family-tag-default);
|
|
3897
|
+
--x-size-font-tag-default-curated: var(--x-size-font-tag-default);
|
|
3898
|
+
--x-size-line-height-tag-default-curated: var(--x-size-line-height-tag-default);
|
|
3899
|
+
--x-number-font-weight-tag-default-curated: var(--x-number-font-weight-tag-default);
|
|
3900
|
+
--x-font-family-tag-default-curated-selected: var(--x-font-family-tag-default-selected);
|
|
3901
|
+
--x-size-font-tag-default-curated-selected: var(--x-size-font-tag-default-selected);
|
|
3902
|
+
--x-size-line-height-tag-default-curated-selected: var(--x-size-line-height-tag-default-selected);
|
|
3903
|
+
--x-number-font-weight-tag-default-curated-selected: var(
|
|
3904
|
+
--x-number-font-weight-tag-default-selected
|
|
3905
|
+
);
|
|
3906
|
+
}
|
|
3907
3907
|
:root {
|
|
3908
3908
|
--x-size-border-radius-tag-card: var(--x-size-border-radius-base-s);
|
|
3909
3909
|
--x-size-border-radius-top-left-tag-card: var(--x-size-border-radius-tag-card);
|
|
@@ -4404,13 +4404,6 @@
|
|
|
4404
4404
|
--x-size-padding-sliding-panel-button: var(--x-size-base-03);
|
|
4405
4405
|
--x-size-horizontal-margin-sliding-panel-button-overflow: var(--x-size-base-02);
|
|
4406
4406
|
}
|
|
4407
|
-
:root {
|
|
4408
|
-
--x-string-overflow-scroll: auto;
|
|
4409
|
-
--x-color-background-scroll-bar: transparent;
|
|
4410
|
-
--x-color-thumb-scroll-bar: var(--x-color-base-neutral-95);
|
|
4411
|
-
--x-color-background-scroll-bar-hover: transparent;
|
|
4412
|
-
--x-color-thumb-scroll-bar-hover: var(--x-color-base-neutral-70);
|
|
4413
|
-
}
|
|
4414
4407
|
.x-sliding-panel {
|
|
4415
4408
|
z-index: 0;
|
|
4416
4409
|
background-color: var(--x-color-background-sliding-panel);
|
|
@@ -4476,6 +4469,13 @@
|
|
|
4476
4469
|
--x-color-background-scroll-bar-hover: transparent;
|
|
4477
4470
|
--x-color-thumb-scroll-bar-hover: var(--x-color-base-neutral-70);
|
|
4478
4471
|
}
|
|
4472
|
+
:root {
|
|
4473
|
+
--x-string-overflow-scroll: auto;
|
|
4474
|
+
--x-color-background-scroll-bar: transparent;
|
|
4475
|
+
--x-color-thumb-scroll-bar: var(--x-color-base-neutral-95);
|
|
4476
|
+
--x-color-background-scroll-bar-hover: transparent;
|
|
4477
|
+
--x-color-thumb-scroll-bar-hover: var(--x-color-base-neutral-70);
|
|
4478
|
+
}
|
|
4479
4479
|
|
|
4480
4480
|
.x-scroll {
|
|
4481
4481
|
overflow-y: var(--x-string-overflow-scroll);
|
|
@@ -4821,6 +4821,23 @@
|
|
|
4821
4821
|
--x-size-border-width-result-description-default: 0;
|
|
4822
4822
|
--x-size-border-width-result-picture-default: 0;
|
|
4823
4823
|
}
|
|
4824
|
+
:root {
|
|
4825
|
+
--x-color-border-result-default: var(--x-color-base-lead);
|
|
4826
|
+
--x-color-border-result-overlay-default: var(--x-color-border-result-default);
|
|
4827
|
+
--x-color-border-result-description-default: var(--x-color-border-result-default);
|
|
4828
|
+
--x-color-border-result-picture-default: var(--x-color-border-result-default);
|
|
4829
|
+
--x-color-background-result-default: transparent;
|
|
4830
|
+
--x-size-padding-result-default: 0;
|
|
4831
|
+
--x-size-padding-result-overlay-default: 0;
|
|
4832
|
+
--x-size-padding-result-description-default: 0;
|
|
4833
|
+
--x-size-gap-result-default: var(--x-size-base-03);
|
|
4834
|
+
--x-size-padding-result-picture-default: 0;
|
|
4835
|
+
--x-size-border-radius-result-default: var(--x-size-border-radius-base-none);
|
|
4836
|
+
--x-size-border-width-result-default: 0;
|
|
4837
|
+
--x-size-border-width-result-overlay-default: 0;
|
|
4838
|
+
--x-size-border-width-result-description-default: 0;
|
|
4839
|
+
--x-size-border-width-result-picture-default: 0;
|
|
4840
|
+
}
|
|
4824
4841
|
|
|
4825
4842
|
.x-result {
|
|
4826
4843
|
display: grid;
|
|
@@ -4874,23 +4891,6 @@
|
|
|
4874
4891
|
opacity: 1;
|
|
4875
4892
|
}
|
|
4876
4893
|
}
|
|
4877
|
-
:root {
|
|
4878
|
-
--x-color-border-result-default: var(--x-color-base-lead);
|
|
4879
|
-
--x-color-border-result-overlay-default: var(--x-color-border-result-default);
|
|
4880
|
-
--x-color-border-result-description-default: var(--x-color-border-result-default);
|
|
4881
|
-
--x-color-border-result-picture-default: var(--x-color-border-result-default);
|
|
4882
|
-
--x-color-background-result-default: transparent;
|
|
4883
|
-
--x-size-padding-result-default: 0;
|
|
4884
|
-
--x-size-padding-result-overlay-default: 0;
|
|
4885
|
-
--x-size-padding-result-description-default: 0;
|
|
4886
|
-
--x-size-gap-result-default: var(--x-size-base-03);
|
|
4887
|
-
--x-size-padding-result-picture-default: 0;
|
|
4888
|
-
--x-size-border-radius-result-default: var(--x-size-border-radius-base-none);
|
|
4889
|
-
--x-size-border-width-result-default: 0;
|
|
4890
|
-
--x-size-border-width-result-overlay-default: 0;
|
|
4891
|
-
--x-size-border-width-result-description-default: 0;
|
|
4892
|
-
--x-size-border-width-result-picture-default: 0;
|
|
4893
|
-
}
|
|
4894
4894
|
:root {
|
|
4895
4895
|
--x-size-border-radius-result-card: var(--x-size-border-radius-base-s);
|
|
4896
4896
|
}
|
|
@@ -5092,21 +5092,6 @@
|
|
|
5092
5092
|
--x-size-border-radius-bottom-picture-card: var(--x-size-border-radius-picture-card);
|
|
5093
5093
|
--x-size-border-radius-left-picture-card: var(--x-size-border-radius-picture-card);
|
|
5094
5094
|
}
|
|
5095
|
-
:root {
|
|
5096
|
-
--x-size-border-radius-picture-card: var(--x-size-border-radius-base-s);
|
|
5097
|
-
--x-size-border-radius-top-picture-card: var(--x-size-border-radius-picture-card);
|
|
5098
|
-
--x-size-border-radius-right-picture-card: var(--x-size-border-radius-picture-card);
|
|
5099
|
-
--x-size-border-radius-bottom-picture-card: var(--x-size-border-radius-picture-card);
|
|
5100
|
-
--x-size-border-radius-left-picture-card: var(--x-size-border-radius-picture-card);
|
|
5101
|
-
}
|
|
5102
|
-
|
|
5103
|
-
.x-picture--card.x-picture {
|
|
5104
|
-
--x-size-border-radius-picture-default: var(--x-size-border-radius-picture-card);
|
|
5105
|
-
--x-size-border-radius-top-picture-default: var(--x-size-border-radius-top-picture-card);
|
|
5106
|
-
--x-size-border-radius-right-picture-default: var(--x-size-border-radius-right-picture-card);
|
|
5107
|
-
--x-size-border-radius-bottom-picture-default: var(--x-size-border-radius-bottom-picture-card);
|
|
5108
|
-
--x-size-border-radius-left-picture-default: var(--x-size-border-radius-left-picture-card);
|
|
5109
|
-
}
|
|
5110
5095
|
:root {
|
|
5111
5096
|
--x-color-background-option-list-button-default: transparent;
|
|
5112
5097
|
--x-color-border-option-list-button-default: transparent;
|
|
@@ -5187,6 +5172,21 @@
|
|
|
5187
5172
|
--x-number-font-weight-option-list-button-default: var(--x-number-font-weight-base-regular);
|
|
5188
5173
|
--x-number-font-weight-option-list-button-default-selected: var(--x-number-font-weight-base-bold);
|
|
5189
5174
|
}
|
|
5175
|
+
:root {
|
|
5176
|
+
--x-size-border-radius-picture-card: var(--x-size-border-radius-base-s);
|
|
5177
|
+
--x-size-border-radius-top-picture-card: var(--x-size-border-radius-picture-card);
|
|
5178
|
+
--x-size-border-radius-right-picture-card: var(--x-size-border-radius-picture-card);
|
|
5179
|
+
--x-size-border-radius-bottom-picture-card: var(--x-size-border-radius-picture-card);
|
|
5180
|
+
--x-size-border-radius-left-picture-card: var(--x-size-border-radius-picture-card);
|
|
5181
|
+
}
|
|
5182
|
+
|
|
5183
|
+
.x-picture--card.x-picture {
|
|
5184
|
+
--x-size-border-radius-picture-default: var(--x-size-border-radius-picture-card);
|
|
5185
|
+
--x-size-border-radius-top-picture-default: var(--x-size-border-radius-top-picture-card);
|
|
5186
|
+
--x-size-border-radius-right-picture-default: var(--x-size-border-radius-right-picture-card);
|
|
5187
|
+
--x-size-border-radius-bottom-picture-default: var(--x-size-border-radius-bottom-picture-card);
|
|
5188
|
+
--x-size-border-radius-left-picture-default: var(--x-size-border-radius-left-picture-card);
|
|
5189
|
+
}
|
|
5190
5190
|
:root {
|
|
5191
5191
|
--x-color-background-option-list-button-default: transparent;
|
|
5192
5192
|
--x-color-border-option-list-button-default: transparent;
|
|
@@ -6716,6 +6716,16 @@
|
|
|
6716
6716
|
.x-list > .x-list__item--12 {
|
|
6717
6717
|
flex: 12 1 auto;
|
|
6718
6718
|
}
|
|
6719
|
+
|
|
6720
|
+
:root {
|
|
6721
|
+
--x-size-border-radius-input-group-pill: var(--x-size-border-radius-base-pill);
|
|
6722
|
+
--x-size-border-radius-top-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
6723
|
+
--x-size-border-radius-top-right-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
6724
|
+
--x-size-border-radius-bottom-right-input-group-pill: var(
|
|
6725
|
+
--x-size-border-radius-input-group-pill
|
|
6726
|
+
);
|
|
6727
|
+
--x-size-border-radius-bottom-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
6728
|
+
}
|
|
6719
6729
|
:root {
|
|
6720
6730
|
--x-size-border-radius-input-group-pill: var(--x-size-border-radius-base-pill);
|
|
6721
6731
|
--x-size-border-radius-top-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
@@ -6726,6 +6736,22 @@
|
|
|
6726
6736
|
--x-size-border-radius-bottom-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
6727
6737
|
}
|
|
6728
6738
|
|
|
6739
|
+
.x-input-group--pill.x-input-group,
|
|
6740
|
+
.x-input-group--pill .x-input-group {
|
|
6741
|
+
--x-size-border-radius-input-group-default: var(--x-size-border-radius-input-group-pill);
|
|
6742
|
+
--x-size-border-radius-top-left-input-group-default: var(
|
|
6743
|
+
--x-size-border-radius-top-left-input-group-pill
|
|
6744
|
+
);
|
|
6745
|
+
--x-size-border-radius-top-right-input-group-default: var(
|
|
6746
|
+
--x-size-border-radius-top-right-input-group-pill
|
|
6747
|
+
);
|
|
6748
|
+
--x-size-border-radius-bottom-right-input-group-default: var(
|
|
6749
|
+
--x-size-border-radius-bottom-right-input-group-pill
|
|
6750
|
+
);
|
|
6751
|
+
--x-size-border-radius-bottom-left-input-group-default: var(
|
|
6752
|
+
--x-size-border-radius-bottom-left-input-group-pill
|
|
6753
|
+
);
|
|
6754
|
+
}
|
|
6729
6755
|
:root {
|
|
6730
6756
|
--x-size-padding-left-input-group-line: 0;
|
|
6731
6757
|
--x-size-padding-right-input-group-line: 0;
|
|
@@ -7953,6 +7979,9 @@
|
|
|
7953
7979
|
--x-size-border-width-bottom-dropdown-list-line: var(--x-size-border-width-dropdown-list-line);
|
|
7954
7980
|
--x-size-border-width-left-dropdown-list-line: var(--x-size-border-width-dropdown-list-line);
|
|
7955
7981
|
}
|
|
7982
|
+
:root {
|
|
7983
|
+
--x-size-width-dropdown-l: 202px;
|
|
7984
|
+
}
|
|
7956
7985
|
:root {
|
|
7957
7986
|
--x-size-padding-block-dropdown-item-line: var(--x-size-base-03);
|
|
7958
7987
|
--x-size-padding-inline-dropdown-item-line: 0 var(--x-size-base-03);
|
|
@@ -8019,9 +8048,6 @@
|
|
|
8019
8048
|
:root {
|
|
8020
8049
|
--x-size-width-dropdown-l: 202px;
|
|
8021
8050
|
}
|
|
8022
|
-
:root {
|
|
8023
|
-
--x-size-width-dropdown-l: 202px;
|
|
8024
|
-
}
|
|
8025
8051
|
|
|
8026
8052
|
.x-dropdown.x-dropdown--l {
|
|
8027
8053
|
--x-size-width-dropdown-toggle-default: var(--x-size-width-dropdown-l);
|
|
@@ -8529,6 +8555,13 @@
|
|
|
8529
8555
|
--x-size-border-radius-bottom-right-button-pill: var(--x-size-border-radius-button-pill);
|
|
8530
8556
|
--x-size-border-radius-bottom-left-button-pill: var(--x-size-border-radius-button-pill);
|
|
8531
8557
|
}
|
|
8558
|
+
:root {
|
|
8559
|
+
--x-size-border-radius-button-pill: var(--x-size-border-radius-base-pill);
|
|
8560
|
+
--x-size-border-radius-top-left-button-pill: var(--x-size-border-radius-button-pill);
|
|
8561
|
+
--x-size-border-radius-top-right-button-pill: var(--x-size-border-radius-button-pill);
|
|
8562
|
+
--x-size-border-radius-bottom-right-button-pill: var(--x-size-border-radius-button-pill);
|
|
8563
|
+
--x-size-border-radius-bottom-left-button-pill: var(--x-size-border-radius-button-pill);
|
|
8564
|
+
}
|
|
8532
8565
|
|
|
8533
8566
|
.x-button--pill.x-button,
|
|
8534
8567
|
.x-button--pill .x-button {
|
|
@@ -8549,13 +8582,6 @@
|
|
|
8549
8582
|
--x-color-border-button-ghost: transparent;
|
|
8550
8583
|
--x-color-text-button-ghost: var(--x-color-base-lead);
|
|
8551
8584
|
}
|
|
8552
|
-
:root {
|
|
8553
|
-
--x-size-border-radius-button-pill: var(--x-size-border-radius-base-pill);
|
|
8554
|
-
--x-size-border-radius-top-left-button-pill: var(--x-size-border-radius-button-pill);
|
|
8555
|
-
--x-size-border-radius-top-right-button-pill: var(--x-size-border-radius-button-pill);
|
|
8556
|
-
--x-size-border-radius-bottom-right-button-pill: var(--x-size-border-radius-button-pill);
|
|
8557
|
-
--x-size-border-radius-bottom-left-button-pill: var(--x-size-border-radius-button-pill);
|
|
8558
|
-
}
|
|
8559
8585
|
:root {
|
|
8560
8586
|
--x-color-background-button-ghost: transparent;
|
|
8561
8587
|
--x-color-border-button-ghost: transparent;
|
|
@@ -8601,13 +8627,6 @@
|
|
|
8601
8627
|
--x-number-font-weight-button-default: var(--x-number-font-weight-base-bold);
|
|
8602
8628
|
--x-size-line-height-button-default: var(--x-size-line-height-text);
|
|
8603
8629
|
}
|
|
8604
|
-
:root {
|
|
8605
|
-
--x-size-border-radius-button-card: var(--x-size-border-radius-base-s);
|
|
8606
|
-
--x-size-border-radius-top-left-button-card: var(--x-size-border-radius-button-card);
|
|
8607
|
-
--x-size-border-radius-top-right-button-card: var(--x-size-border-radius-button-card);
|
|
8608
|
-
--x-size-border-radius-bottom-right-button-card: var(--x-size-border-radius-button-card);
|
|
8609
|
-
--x-size-border-radius-bottom-left-button-card: var(--x-size-border-radius-button-card);
|
|
8610
|
-
}
|
|
8611
8630
|
:root {
|
|
8612
8631
|
--x-color-background-button-default: var(--x-color-base-lead);
|
|
8613
8632
|
--x-color-border-button-default: var(--x-color-background-button-default);
|
|
@@ -8693,6 +8712,13 @@
|
|
|
8693
8712
|
margin-right: var(--x-size-gap-button-default);
|
|
8694
8713
|
}
|
|
8695
8714
|
}
|
|
8715
|
+
:root {
|
|
8716
|
+
--x-size-border-radius-button-card: var(--x-size-border-radius-base-s);
|
|
8717
|
+
--x-size-border-radius-top-left-button-card: var(--x-size-border-radius-button-card);
|
|
8718
|
+
--x-size-border-radius-top-right-button-card: var(--x-size-border-radius-button-card);
|
|
8719
|
+
--x-size-border-radius-bottom-right-button-card: var(--x-size-border-radius-button-card);
|
|
8720
|
+
--x-size-border-radius-bottom-left-button-card: var(--x-size-border-radius-button-card);
|
|
8721
|
+
}
|
|
8696
8722
|
:root {
|
|
8697
8723
|
--x-color-background-badge-default: var(--x-color-base-neutral-10);
|
|
8698
8724
|
--x-color-text-badge-default: var(--x-color-base-neutral-100);
|
|
@@ -8703,6 +8729,28 @@
|
|
|
8703
8729
|
--x-number-font-weight-badge-default: var(--x-number-font-weight-base-regular);
|
|
8704
8730
|
--x-size-font-badge-default: var(--x-size-font-base-xs);
|
|
8705
8731
|
}
|
|
8732
|
+
:root {
|
|
8733
|
+
--x-size-border-radius-button-card: var(--x-size-border-radius-base-s);
|
|
8734
|
+
--x-size-border-radius-top-left-button-card: var(--x-size-border-radius-button-card);
|
|
8735
|
+
--x-size-border-radius-top-right-button-card: var(--x-size-border-radius-button-card);
|
|
8736
|
+
--x-size-border-radius-bottom-right-button-card: var(--x-size-border-radius-button-card);
|
|
8737
|
+
--x-size-border-radius-bottom-left-button-card: var(--x-size-border-radius-button-card);
|
|
8738
|
+
}
|
|
8739
|
+
|
|
8740
|
+
.x-button--card.x-button,
|
|
8741
|
+
.x-button--card .x-button {
|
|
8742
|
+
--x-size-border-radius-button-default: var(--x-size-border-radius-button-card);
|
|
8743
|
+
--x-size-border-radius-top-left-button-default: var(--x-size-border-radius-top-left-button-card);
|
|
8744
|
+
--x-size-border-radius-top-right-button-default: var(
|
|
8745
|
+
--x-size-border-radius-top-right-button-card
|
|
8746
|
+
);
|
|
8747
|
+
--x-size-border-radius-bottom-right-button-default: var(
|
|
8748
|
+
--x-size-border-radius-bottom-right-button-card
|
|
8749
|
+
);
|
|
8750
|
+
--x-size-border-radius-bottom-left-button-default: var(
|
|
8751
|
+
--x-size-border-radius-bottom-left-button-card
|
|
8752
|
+
);
|
|
8753
|
+
}
|
|
8706
8754
|
:root {
|
|
8707
8755
|
--x-color-background-badge-default: var(--x-color-base-neutral-10);
|
|
8708
8756
|
--x-color-text-badge-default: var(--x-color-base-neutral-100);
|
|
@@ -8752,28 +8800,6 @@
|
|
|
8752
8800
|
.x-badge-container {
|
|
8753
8801
|
position: relative;
|
|
8754
8802
|
}
|
|
8755
|
-
:root {
|
|
8756
|
-
--x-size-border-radius-button-card: var(--x-size-border-radius-base-s);
|
|
8757
|
-
--x-size-border-radius-top-left-button-card: var(--x-size-border-radius-button-card);
|
|
8758
|
-
--x-size-border-radius-top-right-button-card: var(--x-size-border-radius-button-card);
|
|
8759
|
-
--x-size-border-radius-bottom-right-button-card: var(--x-size-border-radius-button-card);
|
|
8760
|
-
--x-size-border-radius-bottom-left-button-card: var(--x-size-border-radius-button-card);
|
|
8761
|
-
}
|
|
8762
|
-
|
|
8763
|
-
.x-button--card.x-button,
|
|
8764
|
-
.x-button--card .x-button {
|
|
8765
|
-
--x-size-border-radius-button-default: var(--x-size-border-radius-button-card);
|
|
8766
|
-
--x-size-border-radius-top-left-button-default: var(--x-size-border-radius-top-left-button-card);
|
|
8767
|
-
--x-size-border-radius-top-right-button-default: var(
|
|
8768
|
-
--x-size-border-radius-top-right-button-card
|
|
8769
|
-
);
|
|
8770
|
-
--x-size-border-radius-bottom-right-button-default: var(
|
|
8771
|
-
--x-size-border-radius-bottom-right-button-card
|
|
8772
|
-
);
|
|
8773
|
-
--x-size-border-radius-bottom-left-button-default: var(
|
|
8774
|
-
--x-size-border-radius-bottom-left-button-card
|
|
8775
|
-
);
|
|
8776
|
-
}
|
|
8777
8803
|
:root {
|
|
8778
8804
|
--x-size-base-01: 2px;
|
|
8779
8805
|
--x-size-base-02: 4px;
|
|
@@ -8815,30 +8841,4 @@
|
|
|
8815
8841
|
--x-size-border-radius-base-m: var(--x-size-base-06);
|
|
8816
8842
|
--x-size-border-radius-base-pill: 99999px;
|
|
8817
8843
|
--x-size-border-width-base: 1px;
|
|
8818
|
-
}
|
|
8819
|
-
:root {
|
|
8820
|
-
--x-size-border-radius-input-group-pill: var(--x-size-border-radius-base-pill);
|
|
8821
|
-
--x-size-border-radius-top-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
8822
|
-
--x-size-border-radius-top-right-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
8823
|
-
--x-size-border-radius-bottom-right-input-group-pill: var(
|
|
8824
|
-
--x-size-border-radius-input-group-pill
|
|
8825
|
-
);
|
|
8826
|
-
--x-size-border-radius-bottom-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
|
|
8827
|
-
}
|
|
8828
|
-
|
|
8829
|
-
.x-input-group--pill.x-input-group,
|
|
8830
|
-
.x-input-group--pill .x-input-group {
|
|
8831
|
-
--x-size-border-radius-input-group-default: var(--x-size-border-radius-input-group-pill);
|
|
8832
|
-
--x-size-border-radius-top-left-input-group-default: var(
|
|
8833
|
-
--x-size-border-radius-top-left-input-group-pill
|
|
8834
|
-
);
|
|
8835
|
-
--x-size-border-radius-top-right-input-group-default: var(
|
|
8836
|
-
--x-size-border-radius-top-right-input-group-pill
|
|
8837
|
-
);
|
|
8838
|
-
--x-size-border-radius-bottom-right-input-group-default: var(
|
|
8839
|
-
--x-size-border-radius-bottom-right-input-group-pill
|
|
8840
|
-
);
|
|
8841
|
-
--x-size-border-radius-bottom-left-input-group-default: var(
|
|
8842
|
-
--x-size-border-radius-bottom-left-input-group-pill
|
|
8843
|
-
);
|
|
8844
8844
|
}
|
|
@@ -16,8 +16,8 @@ export interface QueriesPreviewXEvents
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| [NonCacheableQueryPreviewUnmounted](./x-components.queriespreviewxevents.noncacheablequerypreviewunmounted.md) | | string | The component that shows a Query preview has been unmounted. Payload: The query whose preview has been removed. |
|
|
19
20
|
| [QueryPreviewRequestUpdated](./x-components.queriespreviewxevents.querypreviewrequestupdated.md) | | SearchRequest | Any property of the queries preview request has changed. Payload: The new [request](./x-types.searchrequest.md)<!-- -->. |
|
|
20
|
-
| [QueryPreviewUnmountedHook](./x-components.queriespreviewxevents.querypreviewunmountedhook.md) | | string | The component that shows a Query preview has been unmounted. Payload: The query whose preview has been removed. |
|
|
21
21
|
| [QueryPreviewUnselected](./x-components.queriespreviewxevents.querypreviewunselected.md) | | Dictionary<unknown> | The query preview has been unselected. Payload: The extra params to be restored in the modules affected by the query preview selection. |
|
|
22
22
|
| [UserAcceptedAQueryPreview](./x-components.queriespreviewxevents.useracceptedaquerypreview.md) | | [QueryPreviewInfo](./x-components.querypreviewinfo.md) | User has clicked on a query preview. Payload: The [query preview info](./x-components.querypreviewinfo.md) of the selected [item](./x-components.querypreviewitem.md)<!-- -->. |
|
|
23
23
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [QueriesPreviewXEvents](./x-components.queriespreviewxevents.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [QueriesPreviewXEvents](./x-components.queriespreviewxevents.md) > [NonCacheableQueryPreviewUnmounted](./x-components.queriespreviewxevents.noncacheablequerypreviewunmounted.md)
|
|
4
4
|
|
|
5
|
-
## QueriesPreviewXEvents.
|
|
5
|
+
## QueriesPreviewXEvents.NonCacheableQueryPreviewUnmounted property
|
|
6
6
|
|
|
7
7
|
The component that shows a Query preview has been unmounted. Payload: The query whose preview has been removed.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
|
|
12
|
+
NonCacheableQueryPreviewUnmounted: string;
|
|
13
13
|
```
|
|
@@ -17,11 +17,11 @@ export default class QueryPreview extends Vue
|
|
|
17
17
|
|
|
18
18
|
| Property | Modifiers | Type | Description |
|
|
19
19
|
| --- | --- | --- | --- |
|
|
20
|
-
| [clearOnDestroy](./x-components.querypreview.clearondestroy.md) | | boolean | Controls whether the QueryPreview should be removed from the state when the component is destroyed. |
|
|
21
20
|
| [config](./x-components.querypreview.config.md) | | [QueriesPreviewConfig](./x-components.queriespreviewconfig.md) | As the request is handled in this component, we need the config that will be used in the request. |
|
|
22
21
|
| [debounceTimeMs](./x-components.querypreview.debouncetimems.md) | | number | Debounce time in milliseconds for triggering the search requests. It will default to 0 to fit the most common use case (pre-search), and it would work properly with a 250 value inside empathize. |
|
|
23
22
|
| [maxItemsToRender?](./x-components.querypreview.maxitemstorender.md) | <code>protected</code> | number | _(Optional)_ Number of query preview results to be rendered. |
|
|
24
23
|
| [params](./x-components.querypreview.params.md) | | Dictionary<unknown> | As the request is handled in this component, we need the extra params that will be used in the request. |
|
|
24
|
+
| [persistInCache](./x-components.querypreview.persistincache.md) | | boolean | Controls whether the QueryPreview should be removed from the state when the component is destroyed. |
|
|
25
25
|
| [previewResults](./x-components.querypreview.previewresults.md) | | Dictionary<[QueryPreviewItem](./x-components.querypreviewitem.md)<!-- -->> | The results preview of the queries preview mounted. It is a dictionary, indexed by the query preview query. |
|
|
26
26
|
| [queryFeature?](./x-components.querypreview.queryfeature.md) | <code>protected</code> | [QueryFeature](./x-components.queryfeature.md) | _(Optional)_ The origin property for the request. |
|
|
27
27
|
| [queryPreviewInfo](./x-components.querypreview.querypreviewinfo.md) | <code>protected</code> | [QueryPreviewInfo](./x-components.querypreviewinfo.md) | The information about the request of the query preview. |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [QueryPreview](./x-components.querypreview.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [QueryPreview](./x-components.querypreview.md) > [persistInCache](./x-components.querypreview.persistincache.md)
|
|
4
4
|
|
|
5
|
-
## QueryPreview.
|
|
5
|
+
## QueryPreview.persistInCache property
|
|
6
6
|
|
|
7
7
|
Controls whether the QueryPreview should be removed from the state when the component is destroyed.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
|
|
12
|
+
persistInCache: boolean;
|
|
13
13
|
```
|
|
@@ -12,18 +12,19 @@ results.
|
|
|
12
12
|
|
|
13
13
|
## Props
|
|
14
14
|
|
|
15
|
-
| Name | Description | Type | Default
|
|
16
|
-
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- |
|
|
17
|
-
| <code>queryPreviewInfo</code> | The information about the request of the query preview. | <code>QueryPreviewInfo</code> | <code></code>
|
|
18
|
-
| <code>queryFeature</code> | The origin property for the request. | <code>QueryFeature</code> | <code></code>
|
|
19
|
-
| <code>maxItemsToRender</code> | Number of query preview results to be rendered. | <code>number</code> | <code></code>
|
|
20
|
-
| <code>debounceTimeMs</code> | Debounce time in milliseconds for triggering the search requests.<br />It will default to 0 to fit the most common use case (pre-search),<br />and it would work properly with a 250 value inside empathize. | <code>number</code> | <code>0</code>
|
|
21
|
-
| <code>
|
|
15
|
+
| Name | Description | Type | Default |
|
|
16
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | ------------------ |
|
|
17
|
+
| <code>queryPreviewInfo</code> | The information about the request of the query preview. | <code>QueryPreviewInfo</code> | <code></code> |
|
|
18
|
+
| <code>queryFeature</code> | The origin property for the request. | <code>QueryFeature</code> | <code></code> |
|
|
19
|
+
| <code>maxItemsToRender</code> | Number of query preview results to be rendered. | <code>number</code> | <code></code> |
|
|
20
|
+
| <code>debounceTimeMs</code> | Debounce time in milliseconds for triggering the search requests.<br />It will default to 0 to fit the most common use case (pre-search),<br />and it would work properly with a 250 value inside empathize. | <code>number</code> | <code>0</code> |
|
|
21
|
+
| <code>persistInCache</code> | Controls whether the QueryPreview should be removed from the state<br />when the component is destroyed. | <code>boolean</code> | <code>false</code> |
|
|
22
22
|
|
|
23
23
|
## Events
|
|
24
24
|
|
|
25
25
|
| Event name | Properties | Description |
|
|
26
26
|
| ---------- | ---------- | ----------- |
|
|
27
|
+
| load | |
|
|
27
28
|
| error | |
|
|
28
29
|
|
|
29
30
|
## Slots
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"queryPreviewResults && queryPreviewResults.totalResults\">\n <!--\n @slot Query Preview default slot.\n @binding {QueryPreviewInfo} queryPreviewInfo - The information about the request of the\n query preview\n @binding {Result[]} results - The results preview of the query preview\n @binding {number} totalResults - The total results of the search request\n -->\n <slot\n :queryPreviewInfo=\"queryPreviewInfo\"\n :results=\"queryPreviewResults.results\"\n :totalResults=\"queryPreviewResults.totalResults\"\n >\n <ul data-test=\"query-preview\" class=\"x-query-preview\">\n <li\n v-for=\"result in queryPreviewResults.results\"\n :key=\"result.id\"\n class=\"x-query-preview__item\"\n data-test=\"query-preview-item\"\n >\n <!--\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </ul>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { SearchRequest, Result, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n import { createRawFilter } from '../../../__stubs__/index';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: true })\n public clearOnDestroy!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilter(filterId);\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n filters: filters,\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'clearOnDestroy' is set to true, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n\n if (this.clearOnDestroy) {\n this.$x.emit('QueryPreviewUnmountedHook', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n</script>\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`QueryPreviewRequestUpdated`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted when the component is mounted and when the properties of the request object\n changes. The event payload is the `queryPreviewRequest` object.\n\n## Vue Events\n\nA list of vue events that the component will emit:\n\n- `load`: the event is emitted when the query results have been loaded.\n- `error`: the event is emitted if there is some error when retrieving the query results.\n\n## See it in action\n\nHere you have a basic example of how the QueryPreview is rendered. Keep in mind that this component\nis intended to be used overriding its default slot. By default it will only render the names of the\nresults.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'sandals' }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #default=\"{ totalResults, results }\">\n <section>\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </section>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreview,\n SlidingPanel\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemoOverridingResultSlot',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the query preview has been limited to render a maximum of 4 results.\n\n```vue\n<template>\n <QueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :queryPreviewInfo=\"queryPreviewInfo\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </QueryPreview>\n</template>\n\n<script>\n import { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components';\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n QueryPreview\n },\n data() {\n return {\n maxItemsToRender: 4,\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"query-preview.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"queryPreviewResults && queryPreviewResults.totalResults\">\n <!--\n @slot Query Preview default slot.\n @binding {QueryPreviewInfo} queryPreviewInfo - The information about the request of the\n query preview\n @binding {Result[]} results - The results preview of the query preview\n @binding {number} totalResults - The total results of the search request\n -->\n <slot\n :queryPreviewInfo=\"queryPreviewInfo\"\n :results=\"queryPreviewResults.results\"\n :totalResults=\"queryPreviewResults.totalResults\"\n >\n <ul data-test=\"query-preview\" class=\"x-query-preview\">\n <li\n v-for=\"result in queryPreviewResults.results\"\n :key=\"result.id\"\n class=\"x-query-preview__item\"\n data-test=\"query-preview-item\"\n >\n <!--\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </ul>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { SearchRequest, Result, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n import { createRawFilter } from '../../../__stubs__/index';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: false })\n public persistInCache!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilter(filterId);\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n filters: filters,\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n\n const previewItemQuery = this.queryPreviewInfo.query;\n const cachedQueryPreview = this.previewResults[previewItemQuery];\n\n // If the query has been saved it will emit load instead of the emitting the updated request.\n if (cachedQueryPreview?.status === 'success' && this.persistInCache) {\n this.$emit('load', this.queryPreviewInfo.query);\n } else {\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'persistInCache' is set to false, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n if (!this.persistInCache) {\n this.$x.emit('NonCacheableQueryPreviewUnmounted', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n</script>\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`QueryPreviewRequestUpdated`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted when the component is mounted and when the properties of the request object\n changes. The event payload is the `queryPreviewRequest` object.\n\n## Vue Events\n\nA list of vue events that the component will emit:\n\n- `load`: the event is emitted when the query results have been loaded.\n- `error`: the event is emitted if there is some error when retrieving the query results.\n\n## See it in action\n\nHere you have a basic example of how the QueryPreview is rendered. Keep in mind that this component\nis intended to be used overriding its default slot. By default it will only render the names of the\nresults.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'sandals' }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #default=\"{ totalResults, results }\">\n <section>\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </section>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreview,\n SlidingPanel\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemoOverridingResultSlot',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the query preview has been limited to render a maximum of 4 results.\n\n```vue\n<template>\n <QueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :queryPreviewInfo=\"queryPreviewInfo\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </QueryPreview>\n</template>\n\n<script>\n import { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components';\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n QueryPreview\n },\n data() {\n return {\n maxItemsToRender: 4,\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/js/x-modules/queries-preview/components/query-preview.vue_rollup-plugin-vue_script.vue.js
CHANGED
|
@@ -97,20 +97,28 @@ let QueryPreview = class QueryPreview extends Vue {
|
|
|
97
97
|
this.emitQueryPreviewRequestUpdated(newRequest);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
-
this.
|
|
100
|
+
const previewItemQuery = this.queryPreviewInfo.query;
|
|
101
|
+
const cachedQueryPreview = this.previewResults[previewItemQuery];
|
|
102
|
+
// If the query has been saved it will emit load instead of the emitting the updated request.
|
|
103
|
+
if (cachedQueryPreview?.status === 'success' && this.persistInCache) {
|
|
104
|
+
this.$emit('load', this.queryPreviewInfo.query);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);
|
|
108
|
+
}
|
|
101
109
|
}
|
|
102
110
|
/**
|
|
103
111
|
* Cancels the (remaining) requests when the component is destroyed
|
|
104
112
|
* via the `debounce.cancel()` method.
|
|
105
|
-
* If the prop '
|
|
113
|
+
* If the prop 'persistInCache' is set to false, it also removes the QueryPreview
|
|
106
114
|
* from the state when the component is destroyed.
|
|
107
115
|
*
|
|
108
116
|
* @internal
|
|
109
117
|
*/
|
|
110
118
|
beforeDestroy() {
|
|
111
119
|
this.emitQueryPreviewRequestUpdated.cancel();
|
|
112
|
-
if (this.
|
|
113
|
-
this.$x.emit('
|
|
120
|
+
if (!this.persistInCache) {
|
|
121
|
+
this.$x.emit('NonCacheableQueryPreviewUnmounted', this.queryPreviewInfo.query, {
|
|
114
122
|
priority: 0,
|
|
115
123
|
replaceable: false
|
|
116
124
|
});
|
|
@@ -155,8 +163,8 @@ __decorate([
|
|
|
155
163
|
Prop({ default: 0 })
|
|
156
164
|
], QueryPreview.prototype, "debounceTimeMs", void 0);
|
|
157
165
|
__decorate([
|
|
158
|
-
Prop({ default:
|
|
159
|
-
], QueryPreview.prototype, "
|
|
166
|
+
Prop({ default: false })
|
|
167
|
+
], QueryPreview.prototype, "persistInCache", void 0);
|
|
160
168
|
__decorate([
|
|
161
169
|
State('queriesPreview', 'queriesPreview')
|
|
162
170
|
], QueryPreview.prototype, "previewResults", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { SearchRequest, Result, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n import { createRawFilter } from '../../../__stubs__/index';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: true })\n public clearOnDestroy!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilter(filterId);\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n filters: filters,\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'clearOnDestroy' is set to true, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n\n if (this.clearOnDestroy) {\n this.$x.emit('QueryPreviewUnmountedHook', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsDE;;;;;;AAMG;AAOY,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,GAAG,CAAA;AA+D3C;;;;;;;;;AASG;AAEH,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC;KAC1C;AAUD;;;;;AAKG;AACH,IAAA,IAAc,mBAAmB,GAAA;QAC/B,MAAM,MAAM,GAAG,YAAY,CAAC;YAC1B,OAAO,EAAE,IAAI,CAAC,YAAY;YAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,SAAA,CAAC,CAAC;AACH,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,WAAW,EAAE,QAAQ,KAAI;YAC9E,MA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AA,CAAA;IADC,QAAQ,CAAC,cAAc,CAAC;AAGxB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,IAAA,CAAA,CAAA;AAQD,UAAA,CAAA;AADC,IAAA,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACM,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAwGrC,UAAA,CAAA;IADC,KAAK,CAAC,gCAAgC,CAAC;AAMvC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,iCAAA,EAAA,IAAA,CAAA,CAAA;AASD,UAAA,CAAA;IADC,KAAK,CAAC,4BAA4B,CAAC;AAOnC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,IAAA,CAAA,CAAA;AAhNkB,YAAY,GAAA,UAAA,CAAA;AANhC,IAAA,SAAS,CAAC;AACT,QAAA,UAAU,EAAE;YACV,SAAS;AACV,SAAA;AACD,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;KACjD,CAAC;AACmB,CAAA,EAAA,YAAY,CAiNhC,CAAA;aAjNoB,YAAY;;;;"}
|
|
1
|
+
{"version":3,"file":"query-preview.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { SearchRequest, Result, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n import { createRawFilter } from '../../../__stubs__/index';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: false })\n public persistInCache!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilter(filterId);\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n filters: filters,\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n\n const previewItemQuery = this.queryPreviewInfo.query;\n const cachedQueryPreview = this.previewResults[previewItemQuery];\n\n // If the query has been saved it will emit load instead of the emitting the updated request.\n if (cachedQueryPreview?.status === 'success' && this.persistInCache) {\n this.$emit('load', this.queryPreviewInfo.query);\n } else {\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'persistInCache' is set to false, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n if (!this.persistInCache) {\n this.$x.emit('NonCacheableQueryPreviewUnmounted', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsDE;;;;;;AAMG;AAOY,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,GAAG,CAAA;AA+D3C;;;;;;;;;AASG;AAEH,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC;KAC1C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AACT,QAAA,UAAU,EAAE;YACV,SAAS;AACV,SAAA;AACD,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;KACjD,CAAC;AACmB,CAAA,EAAA,YAAY,CAyNhC,CAAA;aAzNoB,YAAY;;;;"}
|
package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-query-preview.action.js","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.ts"],"sourcesContent":["import { QueriesPreviewXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link QueriesPreviewActions.fetchAndSaveQueryPreview}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The query preview request to make.\n * @returns A Promise of a SearchResponse when it fetches the results.\n *\n * @public\n */\n// eslint-disable-next-line max-len\nexport const fetchAndSaveQueryPreview: QueriesPreviewXStoreModule['actions']['fetchAndSaveQueryPreview'] =\n ({ dispatch, commit }, request) => {\n const { query } = request;\n if (!query) {\n return;\n }\n commit('setQueryPreview', {\n request,\n results: [],\n status: 'loading',\n totalResults: 0\n });\n return dispatch('fetchQueryPreview', request)\n .then(response => {\n commit('setQueryPreview', {\n request,\n results: response?.results ?? [],\n status: 'success',\n totalResults: response?.totalResults ?? 0\n });\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.error(error);\n commit('setStatus', { query, status: 'error' });\n });\n };\n"],"names":[],"mappings":"AAEA;;;;;;;;;AASG;AACH;AACO,MAAM,wBAAwB,GACnC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;AAChC,IAAA,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch-and-save-query-preview.action.js","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.ts"],"sourcesContent":["import { QueriesPreviewXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link QueriesPreviewActions.fetchAndSaveQueryPreview}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The query preview request to make.\n * @returns A Promise of a SearchResponse when it fetches the results.\n *\n * @public\n */\n// eslint-disable-next-line max-len\nexport const fetchAndSaveQueryPreview: QueriesPreviewXStoreModule['actions']['fetchAndSaveQueryPreview'] =\n ({ dispatch, commit }, request) => {\n const { query } = request;\n\n if (!query) {\n return;\n }\n\n commit('setQueryPreview', {\n request,\n results: [],\n status: 'loading',\n totalResults: 0\n });\n\n return dispatch('fetchQueryPreview', request)\n .then(response => {\n commit('setQueryPreview', {\n request,\n results: response?.results ?? [],\n status: 'success',\n totalResults: response?.totalResults ?? 0\n });\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.error(error);\n commit('setStatus', { query, status: 'error' });\n });\n };\n"],"names":[],"mappings":"AAEA;;;;;;;;;AASG;AACH;AACO,MAAM,wBAAwB,GACnC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;AAChC,IAAA,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO;AACR,KAAA;IAED,MAAM,CAAC,iBAAiB,EAAE;QACxB,OAAO;AACP,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,YAAY,EAAE,CAAC;AAChB,KAAA,CAAC,CAAC;AAEH,IAAA,OAAO,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;SAC1C,IAAI,CAAC,QAAQ,IAAG;QACf,MAAM,CAAC,iBAAiB,EAAE;YACxB,OAAO;AACP,YAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,EAAE;AAChC,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,YAAY,EAAE,QAAQ,EAAE,YAAY,IAAI,CAAC;AAC1C,SAAA,CAAC,CAAC;AACL,KAAC,CAAC;SACD,KAAK,CAAC,KAAK,IAAG;;AAEb,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,MAAM,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,KAAC,CAAC,CAAC;AACP;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/queries-preview/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `queriesPreview` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'queriesPreview';\n\n/**\n * WireCommit for {@link QueriesPreviewXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link QueriesPreviewXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * Requests and stores the query preview results.\n *\n * @public\n */\nexport const fetchAndSaveQueryPreviewWire = wireDispatch('fetchAndSaveQueryPreview');\n\n/**\n * Clears a query preview from queries preview module.\n *\n * @public\n */\nexport const clearQueryPreviewWire = wireCommit('clearQueryPreview');\n\n/**\n * Sets the queries preview state `params`.\n *\n * @public\n */\nexport const setQueriesPreviewExtraParamsWire = wireCommit('setParams');\n\n/**\n * Updates the state with the selected query preview object.\n *\n * @public\n */\nexport const setSelectedQueryPreviewWire = wireCommit('setSelectedQueryPreview');\n\n/**\n * Clears the selected query preview object from queries preview module.\n *\n * @public\n */\nexport const clearSelectedQueryPreviewWire = wireCommit('setSelectedQueryPreview', null);\n\n/**\n * Wiring configuration for the {@link QueriesPreviewXModule | queriesPreview module}.\n *\n * @internal\n */\nexport const queriesPreviewWiring = createWiring({\n QueryPreviewRequestUpdated: {\n fetchAndSaveQueryPreviewWire\n },\n
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/queries-preview/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `queriesPreview` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'queriesPreview';\n\n/**\n * WireCommit for {@link QueriesPreviewXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link QueriesPreviewXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * Requests and stores the query preview results.\n *\n * @public\n */\nexport const fetchAndSaveQueryPreviewWire = wireDispatch('fetchAndSaveQueryPreview');\n\n/**\n * Clears a query preview from queries preview module.\n *\n * @public\n */\nexport const clearQueryPreviewWire = wireCommit('clearQueryPreview');\n\n/**\n * Sets the queries preview state `params`.\n *\n * @public\n */\nexport const setQueriesPreviewExtraParamsWire = wireCommit('setParams');\n\n/**\n * Updates the state with the selected query preview object.\n *\n * @public\n */\nexport const setSelectedQueryPreviewWire = wireCommit('setSelectedQueryPreview');\n\n/**\n * Clears the selected query preview object from queries preview module.\n *\n * @public\n */\nexport const clearSelectedQueryPreviewWire = wireCommit('setSelectedQueryPreview', null);\n\n/**\n * Wiring configuration for the {@link QueriesPreviewXModule | queriesPreview module}.\n *\n * @internal\n */\nexport const queriesPreviewWiring = createWiring({\n QueryPreviewRequestUpdated: {\n fetchAndSaveQueryPreviewWire\n },\n NonCacheableQueryPreviewUnmounted: {\n clearQueryPreviewWire\n },\n UserAcceptedAQueryPreview: {\n setSelectedQueryPreviewWire\n },\n ExtraParamsChanged: {\n setQueriesPreviewExtraParamsWire\n },\n UserClearedQuery: {\n clearSelectedQueryPreviewWire\n },\n UserClickedCloseX: {\n clearSelectedQueryPreviewWire\n },\n UserClickedOutOfMainModal: {\n clearSelectedQueryPreviewWire\n },\n UserSelectedAHistoryQuery: {\n clearSelectedQueryPreviewWire\n }\n});\n"],"names":[],"mappings":";;;AAMA;;;;AAIG;AACH,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEpC;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;;;AAIG;MACU,4BAA4B,GAAG,YAAY,CAAC,0BAA0B,EAAE;AAErF;;;;AAIG;MACU,qBAAqB,GAAG,UAAU,CAAC,mBAAmB,EAAE;AAErE;;;;AAIG;MACU,gCAAgC,GAAG,UAAU,CAAC,WAAW,EAAE;AAExE;;;;AAIG;MACU,2BAA2B,GAAG,UAAU,CAAC,yBAAyB,EAAE;AAEjF;;;;AAIG;AACU,MAAA,6BAA6B,GAAG,UAAU,CAAC,yBAAyB,EAAE,IAAI,EAAE;AAEzF;;;;AAIG;AACI,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAC/C,IAAA,0BAA0B,EAAE;QAC1B,4BAA4B;AAC7B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,qBAAqB;AACtB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,2BAA2B;AAC5B,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,gCAAgC;AACjC,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,6BAA6B;AAC9B,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,6BAA6B;AAC9B,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,6BAA6B;AAC9B,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,6BAA6B;AAC9B,KAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0-alpha.0",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"access": "public",
|
|
145
145
|
"directory": "dist"
|
|
146
146
|
},
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "dddc280bbe0659e77a1307282f13b97c678d9f0f"
|
|
148
148
|
}
|
|
@@ -38411,17 +38411,16 @@
|
|
|
38411
38411
|
"members": [
|
|
38412
38412
|
{
|
|
38413
38413
|
"kind": "PropertySignature",
|
|
38414
|
-
"canonicalReference": "@empathyco/x-components!QueriesPreviewXEvents#
|
|
38415
|
-
"docComment": "/**\n *
|
|
38414
|
+
"canonicalReference": "@empathyco/x-components!QueriesPreviewXEvents#NonCacheableQueryPreviewUnmounted:member",
|
|
38415
|
+
"docComment": "/**\n * The component that shows a Query preview has been unmounted. Payload: The query whose preview has been removed.\n */\n",
|
|
38416
38416
|
"excerptTokens": [
|
|
38417
38417
|
{
|
|
38418
38418
|
"kind": "Content",
|
|
38419
|
-
"text": "
|
|
38419
|
+
"text": "NonCacheableQueryPreviewUnmounted: "
|
|
38420
38420
|
},
|
|
38421
38421
|
{
|
|
38422
|
-
"kind": "
|
|
38423
|
-
"text": "
|
|
38424
|
-
"canonicalReference": "@empathyco/x-components!SearchRequest:interface"
|
|
38422
|
+
"kind": "Content",
|
|
38423
|
+
"text": "string"
|
|
38425
38424
|
},
|
|
38426
38425
|
{
|
|
38427
38426
|
"kind": "Content",
|
|
@@ -38431,7 +38430,7 @@
|
|
|
38431
38430
|
"isReadonly": false,
|
|
38432
38431
|
"isOptional": false,
|
|
38433
38432
|
"releaseTag": "Public",
|
|
38434
|
-
"name": "
|
|
38433
|
+
"name": "NonCacheableQueryPreviewUnmounted",
|
|
38435
38434
|
"propertyTypeTokenRange": {
|
|
38436
38435
|
"startIndex": 1,
|
|
38437
38436
|
"endIndex": 2
|
|
@@ -38439,16 +38438,17 @@
|
|
|
38439
38438
|
},
|
|
38440
38439
|
{
|
|
38441
38440
|
"kind": "PropertySignature",
|
|
38442
|
-
"canonicalReference": "@empathyco/x-components!QueriesPreviewXEvents#
|
|
38443
|
-
"docComment": "/**\n *
|
|
38441
|
+
"canonicalReference": "@empathyco/x-components!QueriesPreviewXEvents#QueryPreviewRequestUpdated:member",
|
|
38442
|
+
"docComment": "/**\n * Any property of the queries preview request has changed. Payload: The new {@link @empathyco/x-types#SearchRequest | request}.\n */\n",
|
|
38444
38443
|
"excerptTokens": [
|
|
38445
38444
|
{
|
|
38446
38445
|
"kind": "Content",
|
|
38447
|
-
"text": "
|
|
38446
|
+
"text": "QueryPreviewRequestUpdated: "
|
|
38448
38447
|
},
|
|
38449
38448
|
{
|
|
38450
|
-
"kind": "
|
|
38451
|
-
"text": "
|
|
38449
|
+
"kind": "Reference",
|
|
38450
|
+
"text": "SearchRequest",
|
|
38451
|
+
"canonicalReference": "@empathyco/x-components!SearchRequest:interface"
|
|
38452
38452
|
},
|
|
38453
38453
|
{
|
|
38454
38454
|
"kind": "Content",
|
|
@@ -38458,7 +38458,7 @@
|
|
|
38458
38458
|
"isReadonly": false,
|
|
38459
38459
|
"isOptional": false,
|
|
38460
38460
|
"releaseTag": "Public",
|
|
38461
|
-
"name": "
|
|
38461
|
+
"name": "QueryPreviewRequestUpdated",
|
|
38462
38462
|
"propertyTypeTokenRange": {
|
|
38463
38463
|
"startIndex": 1,
|
|
38464
38464
|
"endIndex": 2
|
|
@@ -38802,36 +38802,6 @@
|
|
|
38802
38802
|
"name": "QueryPreview",
|
|
38803
38803
|
"preserveMemberOrder": false,
|
|
38804
38804
|
"members": [
|
|
38805
|
-
{
|
|
38806
|
-
"kind": "Property",
|
|
38807
|
-
"canonicalReference": "@empathyco/x-components!QueryPreview#clearOnDestroy:member",
|
|
38808
|
-
"docComment": "/**\n * Controls whether the QueryPreview should be removed from the state when the component is destroyed.\n *\n * @public\n */\n",
|
|
38809
|
-
"excerptTokens": [
|
|
38810
|
-
{
|
|
38811
|
-
"kind": "Content",
|
|
38812
|
-
"text": "clearOnDestroy: "
|
|
38813
|
-
},
|
|
38814
|
-
{
|
|
38815
|
-
"kind": "Content",
|
|
38816
|
-
"text": "boolean"
|
|
38817
|
-
},
|
|
38818
|
-
{
|
|
38819
|
-
"kind": "Content",
|
|
38820
|
-
"text": ";"
|
|
38821
|
-
}
|
|
38822
|
-
],
|
|
38823
|
-
"isReadonly": false,
|
|
38824
|
-
"isOptional": false,
|
|
38825
|
-
"releaseTag": "Public",
|
|
38826
|
-
"name": "clearOnDestroy",
|
|
38827
|
-
"propertyTypeTokenRange": {
|
|
38828
|
-
"startIndex": 1,
|
|
38829
|
-
"endIndex": 2
|
|
38830
|
-
},
|
|
38831
|
-
"isStatic": false,
|
|
38832
|
-
"isProtected": false,
|
|
38833
|
-
"isAbstract": false
|
|
38834
|
-
},
|
|
38835
38805
|
{
|
|
38836
38806
|
"kind": "Property",
|
|
38837
38807
|
"canonicalReference": "@empathyco/x-components!QueryPreview#config:member",
|
|
@@ -38958,6 +38928,36 @@
|
|
|
38958
38928
|
"isProtected": false,
|
|
38959
38929
|
"isAbstract": false
|
|
38960
38930
|
},
|
|
38931
|
+
{
|
|
38932
|
+
"kind": "Property",
|
|
38933
|
+
"canonicalReference": "@empathyco/x-components!QueryPreview#persistInCache:member",
|
|
38934
|
+
"docComment": "/**\n * Controls whether the QueryPreview should be removed from the state when the component is destroyed.\n *\n * @public\n */\n",
|
|
38935
|
+
"excerptTokens": [
|
|
38936
|
+
{
|
|
38937
|
+
"kind": "Content",
|
|
38938
|
+
"text": "persistInCache: "
|
|
38939
|
+
},
|
|
38940
|
+
{
|
|
38941
|
+
"kind": "Content",
|
|
38942
|
+
"text": "boolean"
|
|
38943
|
+
},
|
|
38944
|
+
{
|
|
38945
|
+
"kind": "Content",
|
|
38946
|
+
"text": ";"
|
|
38947
|
+
}
|
|
38948
|
+
],
|
|
38949
|
+
"isReadonly": false,
|
|
38950
|
+
"isOptional": false,
|
|
38951
|
+
"releaseTag": "Public",
|
|
38952
|
+
"name": "persistInCache",
|
|
38953
|
+
"propertyTypeTokenRange": {
|
|
38954
|
+
"startIndex": 1,
|
|
38955
|
+
"endIndex": 2
|
|
38956
|
+
},
|
|
38957
|
+
"isStatic": false,
|
|
38958
|
+
"isProtected": false,
|
|
38959
|
+
"isAbstract": false
|
|
38960
|
+
},
|
|
38961
38961
|
{
|
|
38962
38962
|
"kind": "Property",
|
|
38963
38963
|
"canonicalReference": "@empathyco/x-components!QueryPreview#previewResults:member",
|
|
@@ -3581,7 +3581,7 @@ export const queriesPreviewWiring: {
|
|
|
3581
3581
|
QueryPreviewRequestUpdated: {
|
|
3582
3582
|
fetchAndSaveQueryPreviewWire: Wire<SearchRequest>;
|
|
3583
3583
|
};
|
|
3584
|
-
|
|
3584
|
+
NonCacheableQueryPreviewUnmounted: {
|
|
3585
3585
|
clearQueryPreviewWire: Wire<string>;
|
|
3586
3586
|
};
|
|
3587
3587
|
UserAcceptedAQueryPreview: {
|
|
@@ -3606,8 +3606,8 @@ export const queriesPreviewWiring: {
|
|
|
3606
3606
|
|
|
3607
3607
|
// @public
|
|
3608
3608
|
export interface QueriesPreviewXEvents {
|
|
3609
|
+
NonCacheableQueryPreviewUnmounted: string;
|
|
3609
3610
|
QueryPreviewRequestUpdated: SearchRequest;
|
|
3610
|
-
QueryPreviewUnmountedHook: string;
|
|
3611
3611
|
QueryPreviewUnselected: Dictionary<unknown>;
|
|
3612
3612
|
UserAcceptedAQueryPreview: QueryPreviewInfo;
|
|
3613
3613
|
}
|
|
@@ -3642,7 +3642,6 @@ export class QueryPreview extends Vue_2 {
|
|
|
3642
3642
|
protected beforeDestroy(): void;
|
|
3643
3643
|
// @internal
|
|
3644
3644
|
protected cancelEmitPreviewRequestUpdated(_new: DebouncedFunction<[SearchRequest]>, old: DebouncedFunction<[SearchRequest]>): void;
|
|
3645
|
-
clearOnDestroy: boolean;
|
|
3646
3645
|
config: QueriesPreviewConfig;
|
|
3647
3646
|
// @internal
|
|
3648
3647
|
protected created(): void;
|
|
@@ -3655,6 +3654,7 @@ export class QueryPreview extends Vue_2 {
|
|
|
3655
3654
|
protected location?: FeatureLocation;
|
|
3656
3655
|
protected maxItemsToRender?: number;
|
|
3657
3656
|
params: Dictionary<unknown>;
|
|
3657
|
+
persistInCache: boolean;
|
|
3658
3658
|
previewResults: Dictionary<QueryPreviewItem>;
|
|
3659
3659
|
protected queryFeature?: QueryFeature;
|
|
3660
3660
|
protected queryPreviewInfo: QueryPreviewInfo;
|
|
@@ -44,7 +44,7 @@ export default class QueryPreview extends Vue {
|
|
|
44
44
|
*
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
persistInCache: boolean;
|
|
48
48
|
/**
|
|
49
49
|
* The results preview of the queries preview mounted.
|
|
50
50
|
* It is a dictionary, indexed by the query preview query.
|
|
@@ -106,7 +106,7 @@ export default class QueryPreview extends Vue {
|
|
|
106
106
|
/**
|
|
107
107
|
* Cancels the (remaining) requests when the component is destroyed
|
|
108
108
|
* via the `debounce.cancel()` method.
|
|
109
|
-
* If the prop '
|
|
109
|
+
* If the prop 'persistInCache' is set to false, it also removes the QueryPreview
|
|
110
110
|
* from the state when the component is destroyed.
|
|
111
111
|
*
|
|
112
112
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAmCE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,EAAU,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAa,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAM3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,E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SAAS,KAAK,mBAAmB,IAAI,aAAa,CAsBjD;IAED;;;;OAIG;IACH,IAAW,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAQtE;IAED;;;;;OAKG;IACH,SAAS,KAAK,8BAA8B,IAAI,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,CAIjF;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAO,IAAI,IAAI;IAqBzB;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAU/B;;;;;;;OAOG;IAEH,SAAS,CAAC,+BAA+B,CACvC,IAAI,EAAE,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,EACxC,GAAG,EAAE,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,GACtC,IAAI;IAIP;;;;;OAKG;IAEH,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;CAOlD"}
|
|
@@ -17,7 +17,7 @@ export interface QueriesPreviewXEvents {
|
|
|
17
17
|
* The component that shows a Query preview has been unmounted.
|
|
18
18
|
* Payload: The query whose preview has been removed.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
NonCacheableQueryPreviewUnmounted: string;
|
|
21
21
|
/**
|
|
22
22
|
* User has clicked on a query preview.
|
|
23
23
|
* Payload: The {@link QueryPreviewInfo | query preview info}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,0BAA0B,EAAE,aAAa,CAAC;IAC1C;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,0BAA0B,EAAE,aAAa,CAAC;IAC1C;;;OAGG;IACH,iCAAiC,EAAE,MAAM,CAAC;IAC1C;;;;OAIG;IACH,yBAAyB,EAAE,gBAAgB,CAAC;IAC5C;;;;OAIG;IACH,sBAAsB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC7C"}
|
package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-query-preview.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;GASG;AAEH,eAAO,MAAM,wBAAwB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"fetch-and-save-query-preview.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;GASG;AAEH,eAAO,MAAM,wBAAwB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,0BAA0B,CA6BpG,CAAC"}
|
|
@@ -37,7 +37,7 @@ export declare const queriesPreviewWiring: {
|
|
|
37
37
|
QueryPreviewRequestUpdated: {
|
|
38
38
|
fetchAndSaveQueryPreviewWire: import("../..").Wire<import("@empathyco/x-types").SearchRequest>;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
NonCacheableQueryPreviewUnmounted: {
|
|
41
41
|
clearQueryPreviewWire: import("../..").Wire<string>;
|
|
42
42
|
};
|
|
43
43
|
UserAcceptedAQueryPreview: {
|