oddsgate-ds 1.0.216 → 1.0.217

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.
@@ -1,17 +1,4 @@
1
1
  import React from 'react';
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
- placeholder?: string;
12
- backToTopButton?: boolean;
13
- noResultsText?: string;
14
- tryAnotherLetterText?: string;
15
- };
2
+ import { GlossaryProps } from './Glossary.interface';
16
3
  export declare const Glossary: React.FC<GlossaryProps>;
17
4
  export default Glossary;
@@ -1,22 +1,18 @@
1
- type GlossaryItem = {
1
+ export type GlossaryItem = {
2
2
  title: string;
3
- categories: {
4
- name: string;
5
- items: {
6
- slug: string;
7
- name: string;
8
- }[];
9
- }[];
3
+ slug: string;
4
+ };
5
+ export type GlossaryCategoryData = {
6
+ [category: string]: GlossaryItem[];
10
7
  };
11
8
  export type GlossaryProps = {
12
- items: GlossaryItem[];
13
- categories: {
14
- name: string;
15
- items: {
16
- slug: string;
17
- name: string;
18
- }[];
19
- }[];
9
+ searchTerm: string;
10
+ setSearchTerm: (term: string) => void;
11
+ selectedCategory: string | null;
12
+ setSelectedCategory: (cat: string | null) => void;
13
+ categoryData: GlossaryCategoryData;
20
14
  placeholder?: string;
15
+ backToTopButton?: string;
16
+ noResultsText?: string;
17
+ tryAnotherLetterText?: string;
21
18
  };
22
- export {};
package/dist/types.d.ts CHANGED
@@ -746,20 +746,25 @@ type IProductsSlider = {
746
746
 
747
747
  declare const ProductsSlider: ({ content, style, className, }: IProductsSlider) => React__default.JSX.Element;
748
748
 
749
+ type GlossaryItem = {
750
+ title: string;
751
+ slug: string;
752
+ };
753
+ type GlossaryCategoryData = {
754
+ [category: string]: GlossaryItem[];
755
+ };
749
756
  type GlossaryProps = {
750
757
  searchTerm: string;
751
758
  setSearchTerm: (term: string) => void;
752
759
  selectedCategory: string | null;
753
760
  setSelectedCategory: (cat: string | null) => void;
754
- categoryData: Record<string, {
755
- title: string;
756
- slug: string;
757
- }[]>;
761
+ categoryData: GlossaryCategoryData;
758
762
  placeholder?: string;
759
- backToTopButton?: boolean;
763
+ backToTopButton?: string;
760
764
  noResultsText?: string;
761
765
  tryAnotherLetterText?: string;
762
766
  };
767
+
763
768
  declare const Glossary: React__default.FC<GlossaryProps>;
764
769
 
765
770
  declare const iconsList: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.216",
3
+ "version": "1.0.217",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -7,24 +7,12 @@ import {
7
7
  StyledNoResultsSubtitle,
8
8
  StyledNoResultsTitle
9
9
  } from './Glossary.themes'
10
-
11
10
  import SearchBar from '@/components/molecules/SearchBar/SearchBar.component'
12
11
  import GlossaryCategoryIndex from '@/components/molecules/CategoryIndex/CategoryIndex.component'
13
12
  import CategoriesWrapper from '@/components/molecules/CategoriesWrapper/CategoriesWrapper.component'
14
13
  import Button from '@/components/atoms/Button'
15
14
  import Icon from '@/components/atoms/Icon'
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
- placeholder?: string
24
- backToTopButton?: boolean
25
- noResultsText?: string
26
- tryAnotherLetterText?: string
27
- }
15
+ import { GlossaryProps } from './Glossary.interface'
28
16
 
29
17
  export const Glossary: React.FC<GlossaryProps> = ({
30
18
  searchTerm,
@@ -37,7 +25,7 @@ export const Glossary: React.FC<GlossaryProps> = ({
37
25
  noResultsText,
38
26
  tryAnotherLetterText
39
27
  }) => {
40
-
28
+
41
29
  const categoryNames = Object.keys(categoryData)
42
30
 
43
31
  const noResults = categoryNames.every(
@@ -1,10 +1,20 @@
1
- type GlossaryItem = {
1
+ export type GlossaryItem = {
2
2
  title: string
3
- categories: { name: string; items: { slug: string; name: string }[] }[]
3
+ slug: string
4
+ }
5
+
6
+ export type GlossaryCategoryData = {
7
+ [category: string]: GlossaryItem[]
4
8
  }
5
9
 
6
10
  export type GlossaryProps = {
7
- items: GlossaryItem[]
8
- categories: { name: string; items: { slug: string; name: string }[] }[]
11
+ searchTerm: string
12
+ setSearchTerm: (term: string) => void
13
+ selectedCategory: string | null
14
+ setSelectedCategory: (cat: string | null) => void
15
+ categoryData: GlossaryCategoryData
9
16
  placeholder?: string
17
+ backToTopButton?: string
18
+ noResultsText?: string
19
+ tryAnotherLetterText?: string
10
20
  }