oddsgate-ds 1.0.210 → 1.0.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/organisms/Glossary/Glossary.component.d.ts +16 -1
- package/dist/cjs/types/components/organisms/Glossary/Glossary.interface.d.ts +0 -13
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/organisms/Glossary/Glossary.component.d.ts +16 -1
- package/dist/esm/types/components/organisms/Glossary/Glossary.interface.d.ts +0 -13
- package/dist/types.d.ts +1 -20
- package/package.json +1 -1
- package/src/components/molecules/CategoriesWrapper/CategoriesWrapper.component.tsx +1 -1
- package/src/components/molecules/CategoriesWrapper/CategoriesWrapper.interface.ts +1 -1
- package/src/components/organisms/Glossary/Glossary.component.tsx +13 -1
- package/src/components/organisms/Glossary/Glossary.interface.ts +0 -10
- package/src/components/organisms/Glossary/Glossary.stories.tsx +10 -2
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type GlossaryProps = {
|
|
3
|
+
searchTerm: string;
|
|
4
|
+
setSearchTerm: (term: string) => void;
|
|
5
|
+
selectedCategory: string | null;
|
|
6
|
+
setSelectedCategory: (cat: string | null) => void;
|
|
7
|
+
categoryData: Record<string, {
|
|
8
|
+
title: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
}[]>;
|
|
11
|
+
displayedCategories: string[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
noResults?: boolean;
|
|
14
|
+
backToTopButton?: boolean;
|
|
15
|
+
noResultsText?: string;
|
|
16
|
+
tryAnotherLetterText?: string;
|
|
17
|
+
};
|
|
3
18
|
export declare const Glossary: React.FC<GlossaryProps>;
|
|
4
19
|
export default Glossary;
|
|
@@ -18,18 +18,5 @@ export type GlossaryProps = {
|
|
|
18
18
|
}[];
|
|
19
19
|
}[];
|
|
20
20
|
placeholder?: string;
|
|
21
|
-
searchTerm: string;
|
|
22
|
-
setSearchTerm: (term: string) => void;
|
|
23
|
-
selectedCategory: string | null;
|
|
24
|
-
setSelectedCategory: (cat: string | null) => void;
|
|
25
|
-
categoryData: Record<string, {
|
|
26
|
-
title: string;
|
|
27
|
-
slug: string;
|
|
28
|
-
}[]>;
|
|
29
|
-
displayedCategories: string[];
|
|
30
|
-
noResults?: boolean;
|
|
31
|
-
backToTopButton?: boolean;
|
|
32
|
-
noResultsText?: string;
|
|
33
|
-
tryAnotherLetterText?: string;
|
|
34
21
|
};
|
|
35
22
|
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -720,26 +720,7 @@ type IProductsSlider = {
|
|
|
720
720
|
|
|
721
721
|
declare const ProductsSlider: ({ content, style, className, }: IProductsSlider) => React__default.JSX.Element;
|
|
722
722
|
|
|
723
|
-
type GlossaryItem = {
|
|
724
|
-
title: string;
|
|
725
|
-
categories: {
|
|
726
|
-
name: string;
|
|
727
|
-
items: {
|
|
728
|
-
slug: string;
|
|
729
|
-
name: string;
|
|
730
|
-
}[];
|
|
731
|
-
}[];
|
|
732
|
-
};
|
|
733
723
|
type GlossaryProps = {
|
|
734
|
-
items: GlossaryItem[];
|
|
735
|
-
categories: {
|
|
736
|
-
name: string;
|
|
737
|
-
items: {
|
|
738
|
-
slug: string;
|
|
739
|
-
name: string;
|
|
740
|
-
}[];
|
|
741
|
-
}[];
|
|
742
|
-
placeholder?: string;
|
|
743
724
|
searchTerm: string;
|
|
744
725
|
setSearchTerm: (term: string) => void;
|
|
745
726
|
selectedCategory: string | null;
|
|
@@ -749,12 +730,12 @@ type GlossaryProps = {
|
|
|
749
730
|
slug: string;
|
|
750
731
|
}[]>;
|
|
751
732
|
displayedCategories: string[];
|
|
733
|
+
placeholder?: string;
|
|
752
734
|
noResults?: boolean;
|
|
753
735
|
backToTopButton?: boolean;
|
|
754
736
|
noResultsText?: string;
|
|
755
737
|
tryAnotherLetterText?: string;
|
|
756
738
|
};
|
|
757
|
-
|
|
758
739
|
declare const Glossary: React__default.FC<GlossaryProps>;
|
|
759
740
|
|
|
760
741
|
declare const iconsList: string[];
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ const CategoriesWrapper: React.FC<CategoriesWrapperProps> = ({
|
|
|
24
24
|
<StyledCategoryContent>
|
|
25
25
|
{categoryItems.map((item, index) => (
|
|
26
26
|
<StyledCategoryItem key={index}>
|
|
27
|
-
<Button
|
|
27
|
+
<Button href={item.slug} variant="text">
|
|
28
28
|
{item.title}
|
|
29
29
|
</Button>
|
|
30
30
|
</StyledCategoryItem>
|
|
@@ -13,8 +13,20 @@ import GlossaryCategoryIndex from '@/components/molecules/CategoryIndex/Category
|
|
|
13
13
|
import CategoriesWrapper from '@/components/molecules/CategoriesWrapper/CategoriesWrapper.component'
|
|
14
14
|
import Button from '@/components/atoms/Button'
|
|
15
15
|
import Icon from '@/components/atoms/Icon'
|
|
16
|
-
import { GlossaryProps } from './Glossary.interface'
|
|
17
16
|
|
|
17
|
+
type GlossaryProps = {
|
|
18
|
+
searchTerm: string
|
|
19
|
+
setSearchTerm: (term: string) => void
|
|
20
|
+
selectedCategory: string | null
|
|
21
|
+
setSelectedCategory: (cat: string | null) => void
|
|
22
|
+
categoryData: Record<string, { title: string; slug: string }[]>
|
|
23
|
+
displayedCategories: string[]
|
|
24
|
+
placeholder?: string
|
|
25
|
+
noResults?: boolean
|
|
26
|
+
backToTopButton?: boolean
|
|
27
|
+
noResultsText?: string
|
|
28
|
+
tryAnotherLetterText?: string
|
|
29
|
+
}
|
|
18
30
|
|
|
19
31
|
export const Glossary: React.FC<GlossaryProps> = ({
|
|
20
32
|
searchTerm,
|
|
@@ -7,14 +7,4 @@ export type GlossaryProps = {
|
|
|
7
7
|
items: GlossaryItem[]
|
|
8
8
|
categories: { name: string; items: { slug: string; name: string }[] }[]
|
|
9
9
|
placeholder?: string
|
|
10
|
-
searchTerm: string
|
|
11
|
-
setSearchTerm: (term: string) => void
|
|
12
|
-
selectedCategory: string | null
|
|
13
|
-
setSelectedCategory: (cat: string | null) => void
|
|
14
|
-
categoryData: Record<string, { title: string; slug: string }[]>
|
|
15
|
-
displayedCategories: string[]
|
|
16
|
-
noResults?: boolean
|
|
17
|
-
backToTopButton?: boolean
|
|
18
|
-
noResultsText?: string
|
|
19
|
-
tryAnotherLetterText?: string
|
|
20
10
|
}
|
|
@@ -144,8 +144,13 @@ interface BuildCategoryDataCategory {
|
|
|
144
144
|
items: BuildCategoryDataItem[]
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
interface CategoryDataItem {
|
|
148
|
+
title: string
|
|
149
|
+
slug: string
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
interface CategoryData {
|
|
148
|
-
[categoryName: string]:
|
|
153
|
+
[categoryName: string]: CategoryDataItem[]
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
function buildCategoryData(
|
|
@@ -154,7 +159,10 @@ function buildCategoryData(
|
|
|
154
159
|
): CategoryData {
|
|
155
160
|
const data: CategoryData = {}
|
|
156
161
|
categories.forEach((cat: BuildCategoryDataCategory) => {
|
|
157
|
-
data[cat.name] = cat.items.map((item: BuildCategoryDataItem) =>
|
|
162
|
+
data[cat.name] = cat.items.map((item: BuildCategoryDataItem) => ({
|
|
163
|
+
title: item.name,
|
|
164
|
+
slug: item.slug
|
|
165
|
+
}))
|
|
158
166
|
})
|
|
159
167
|
return data
|
|
160
168
|
}
|