hds-web 1.25.6 → 1.25.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.es.css +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/HDS/helpers/Algorithms/invertedIndex.js +19 -17
- package/src/styles/tailwind.css +29 -42
package/package.json
CHANGED
@@ -2,14 +2,17 @@ function buildInvertedIndex(data) {
|
|
2
2
|
const invertedIndex = {};
|
3
3
|
|
4
4
|
for (const item of data) {
|
5
|
-
const
|
6
|
-
const tags = item[key];
|
5
|
+
const attributes = item.attributes;
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
if (attributes && attributes.hashtags) {
|
8
|
+
const tags = attributes.hashtags.map(tag => tag.tag);
|
9
|
+
|
10
|
+
for (const tag of tags) {
|
11
|
+
if (!invertedIndex[tag]) {
|
12
|
+
invertedIndex[tag] = new Set();
|
13
|
+
}
|
14
|
+
invertedIndex[tag].add(item);
|
11
15
|
}
|
12
|
-
invertedIndex[tag].add(key);
|
13
16
|
}
|
14
17
|
}
|
15
18
|
|
@@ -18,17 +21,18 @@ function buildInvertedIndex(data) {
|
|
18
21
|
|
19
22
|
export default function getSimilarAndRemainingKeys(data, inputKey) {
|
20
23
|
const invertedIndex = buildInvertedIndex(data);
|
21
|
-
const
|
24
|
+
const inputTagsItem = data.find(item => item.attributes && item.attributes.slug === inputKey);
|
22
25
|
const similarKeys = new Set();
|
23
26
|
const allKeys = new Set();
|
24
27
|
|
25
|
-
if (
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
if (inputTagsItem && inputTagsItem.attributes && inputTagsItem.attributes.hashtags) {
|
29
|
+
const tags = inputTagsItem.attributes.hashtags.map(tag => tag.tag);
|
30
|
+
for (const tag of tags) {
|
31
|
+
const itemsWithSimilarTag = invertedIndex[tag];
|
32
|
+
if (itemsWithSimilarTag) {
|
33
|
+
itemsWithSimilarTag.forEach(item => {
|
34
|
+
if (item.attributes.slug !== inputKey) {
|
35
|
+
similarKeys.add(item.attributes.slug);
|
32
36
|
}
|
33
37
|
});
|
34
38
|
}
|
@@ -36,12 +40,10 @@ export default function getSimilarAndRemainingKeys(data, inputKey) {
|
|
36
40
|
}
|
37
41
|
|
38
42
|
for (const item of data) {
|
39
|
-
|
40
|
-
allKeys.add(key);
|
43
|
+
allKeys.add(item.attributes.slug);
|
41
44
|
}
|
42
45
|
|
43
46
|
const remainingKeys = [...allKeys].filter(key => !similarKeys.has(key));
|
44
47
|
|
45
48
|
return [...similarKeys, ...remainingKeys];
|
46
49
|
}
|
47
|
-
|
package/src/styles/tailwind.css
CHANGED
@@ -1724,10 +1724,18 @@ select{
|
|
1724
1724
|
height: 100vh;
|
1725
1725
|
}
|
1726
1726
|
|
1727
|
+
.max-h-\[144px\]{
|
1728
|
+
max-height: 144px;
|
1729
|
+
}
|
1730
|
+
|
1727
1731
|
.max-h-\[181px\]{
|
1728
1732
|
max-height: 181px;
|
1729
1733
|
}
|
1730
1734
|
|
1735
|
+
.max-h-\[200px\]{
|
1736
|
+
max-height: 200px;
|
1737
|
+
}
|
1738
|
+
|
1731
1739
|
.max-h-\[20px\]{
|
1732
1740
|
max-height: 20px;
|
1733
1741
|
}
|
@@ -1760,14 +1768,6 @@ select{
|
|
1760
1768
|
max-height: 100vh;
|
1761
1769
|
}
|
1762
1770
|
|
1763
|
-
.max-h-\[144px\]{
|
1764
|
-
max-height: 144px;
|
1765
|
-
}
|
1766
|
-
|
1767
|
-
.max-h-\[200px\]{
|
1768
|
-
max-height: 200px;
|
1769
|
-
}
|
1770
|
-
|
1771
1771
|
.min-h-\[12px\]{
|
1772
1772
|
min-height: 12px;
|
1773
1773
|
}
|
@@ -1928,6 +1928,10 @@ select{
|
|
1928
1928
|
width: 400px;
|
1929
1929
|
}
|
1930
1930
|
|
1931
|
+
.w-\[45px\]{
|
1932
|
+
width: 45px;
|
1933
|
+
}
|
1934
|
+
|
1931
1935
|
.w-\[580px\]{
|
1932
1936
|
width: 580px;
|
1933
1937
|
}
|
@@ -1986,10 +1990,6 @@ select{
|
|
1986
1990
|
width: 100vw;
|
1987
1991
|
}
|
1988
1992
|
|
1989
|
-
.w-\[45px\]{
|
1990
|
-
width: 45px;
|
1991
|
-
}
|
1992
|
-
|
1993
1993
|
.min-w-\[11\.5rem\]{
|
1994
1994
|
min-width: 11.5rem;
|
1995
1995
|
}
|
@@ -2006,6 +2006,10 @@ select{
|
|
2006
2006
|
min-width: 130px;
|
2007
2007
|
}
|
2008
2008
|
|
2009
|
+
.min-w-\[152px\]{
|
2010
|
+
min-width: 152px;
|
2011
|
+
}
|
2012
|
+
|
2009
2013
|
.min-w-\[18rem\]{
|
2010
2014
|
min-width: 18rem;
|
2011
2015
|
}
|
@@ -2052,10 +2056,6 @@ select{
|
|
2052
2056
|
min-width: 100%;
|
2053
2057
|
}
|
2054
2058
|
|
2055
|
-
.min-w-\[152px\]{
|
2056
|
-
min-width: 152px;
|
2057
|
-
}
|
2058
|
-
|
2059
2059
|
.max-w-2xl{
|
2060
2060
|
max-width: 42rem;
|
2061
2061
|
}
|
@@ -2132,10 +2132,6 @@ select{
|
|
2132
2132
|
max-width: 380px;
|
2133
2133
|
}
|
2134
2134
|
|
2135
|
-
.max-w-\[400\]{
|
2136
|
-
max-width: 400;
|
2137
|
-
}
|
2138
|
-
|
2139
2135
|
.max-w-\[400px\]{
|
2140
2136
|
max-width: 400px;
|
2141
2137
|
}
|
@@ -6432,6 +6428,11 @@ select{
|
|
6432
6428
|
padding-bottom: 2.5rem;
|
6433
6429
|
}
|
6434
6430
|
|
6431
|
+
.py-11{
|
6432
|
+
padding-top: 2.75rem;
|
6433
|
+
padding-bottom: 2.75rem;
|
6434
|
+
}
|
6435
|
+
|
6435
6436
|
.py-12{
|
6436
6437
|
padding-top: 3rem;
|
6437
6438
|
padding-bottom: 3rem;
|
@@ -6502,11 +6503,6 @@ select{
|
|
6502
6503
|
padding-bottom: 3.5px;
|
6503
6504
|
}
|
6504
6505
|
|
6505
|
-
.py-11{
|
6506
|
-
padding-top: 2.75rem;
|
6507
|
-
padding-bottom: 2.75rem;
|
6508
|
-
}
|
6509
|
-
|
6510
6506
|
.pb-0{
|
6511
6507
|
padding-bottom: 0px;
|
6512
6508
|
}
|
@@ -6607,6 +6603,10 @@ select{
|
|
6607
6603
|
padding-left: 2rem;
|
6608
6604
|
}
|
6609
6605
|
|
6606
|
+
.pl-\[18px\]{
|
6607
|
+
padding-left: 18px;
|
6608
|
+
}
|
6609
|
+
|
6610
6610
|
.pl-\[30px\]{
|
6611
6611
|
padding-left: 30px;
|
6612
6612
|
}
|
@@ -6711,10 +6711,6 @@ select{
|
|
6711
6711
|
padding-top: 81px;
|
6712
6712
|
}
|
6713
6713
|
|
6714
|
-
.pl-\[18px\]{
|
6715
|
-
padding-left: 18px;
|
6716
|
-
}
|
6717
|
-
|
6718
6714
|
.text-left{
|
6719
6715
|
text-align: left;
|
6720
6716
|
}
|
@@ -9936,10 +9932,6 @@ select{
|
|
9936
9932
|
background-color: rgb(133 77 24 / var(--tw-bg-opacity));
|
9937
9933
|
}
|
9938
9934
|
|
9939
|
-
.hover\:stroke-neutral-0:hover{
|
9940
|
-
stroke: #FFFFFF;
|
9941
|
-
}
|
9942
|
-
|
9943
9935
|
.hover\:pl-\[9px\]:hover{
|
9944
9936
|
padding-left: 9px;
|
9945
9937
|
}
|
@@ -10289,11 +10281,6 @@ select{
|
|
10289
10281
|
outline-offset: 2px;
|
10290
10282
|
}
|
10291
10283
|
|
10292
|
-
.enabled\:bg-pink-400:enabled{
|
10293
|
-
--tw-bg-opacity: 1;
|
10294
|
-
background-color: rgb(246 119 170 / var(--tw-bg-opacity));
|
10295
|
-
}
|
10296
|
-
|
10297
10284
|
.disabled\:cursor-not-allowed:disabled{
|
10298
10285
|
cursor: not-allowed;
|
10299
10286
|
}
|
@@ -10522,14 +10509,14 @@ select{
|
|
10522
10509
|
color: rgb(0 6 21 / var(--tw-text-opacity));
|
10523
10510
|
}
|
10524
10511
|
|
10525
|
-
.group:hover .group-hover\:text-neutral-
|
10512
|
+
.group:hover .group-hover\:text-neutral-0{
|
10526
10513
|
--tw-text-opacity: 1;
|
10527
|
-
color: rgb(
|
10514
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
10528
10515
|
}
|
10529
10516
|
|
10530
|
-
.group:hover .group-hover\:text-neutral-
|
10517
|
+
.group:hover .group-hover\:text-neutral-1000{
|
10531
10518
|
--tw-text-opacity: 1;
|
10532
|
-
color: rgb(
|
10519
|
+
color: rgb(0 6 21 / var(--tw-text-opacity));
|
10533
10520
|
}
|
10534
10521
|
|
10535
10522
|
.group\/img:hover .group-hover\/img\:opacity-0{
|