@c-rex/components 0.0.5 → 0.0.6

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.
Files changed (133) hide show
  1. package/dist/components/src/autocomplete.d.ts +8 -0
  2. package/dist/components/src/autocomplete.d.ts.map +1 -0
  3. package/dist/components/src/autocomplete.js +36 -0
  4. package/dist/components/src/blog-card.d.ts +17 -0
  5. package/dist/components/src/blog-card.d.ts.map +1 -0
  6. package/dist/components/src/blog-card.js +16 -0
  7. package/dist/components/src/blur-image.d.ts +4 -0
  8. package/dist/components/src/blur-image.d.ts.map +1 -0
  9. package/dist/components/src/blur-image.js +16 -0
  10. package/dist/components/src/breadcrumb.d.ts +9 -0
  11. package/dist/components/src/breadcrumb.d.ts.map +1 -0
  12. package/dist/components/src/breadcrumb.js +33 -0
  13. package/dist/components/src/empty.d.ts +3 -0
  14. package/dist/components/src/empty.d.ts.map +1 -0
  15. package/dist/components/src/empty.js +9 -0
  16. package/dist/components/src/navbar.d.ts +8 -0
  17. package/dist/components/src/navbar.d.ts.map +1 -0
  18. package/dist/components/src/navbar.js +14 -0
  19. package/dist/components/src/providers/search-state-wrapper.d.ts +13 -0
  20. package/dist/components/src/providers/search-state-wrapper.d.ts.map +1 -0
  21. package/dist/components/src/providers/search-state-wrapper.js +10 -0
  22. package/dist/components/src/result-list.d.ts +8 -0
  23. package/dist/components/src/result-list.d.ts.map +1 -0
  24. package/dist/components/src/result-list.js +16 -0
  25. package/dist/components/src/result-view/blog-view.stories.d.ts +7 -0
  26. package/dist/components/src/result-view/blog-view.stories.d.ts.map +1 -0
  27. package/dist/components/src/result-view/blog-view.stories.js +58 -0
  28. package/dist/components/src/result-view/blog.d.ts +8 -0
  29. package/dist/components/src/result-view/blog.d.ts.map +1 -0
  30. package/dist/components/src/result-view/blog.js +22 -0
  31. package/dist/components/src/result-view/table-view.stories.d.ts +7 -0
  32. package/dist/components/src/result-view/table-view.stories.d.ts.map +1 -0
  33. package/dist/components/src/result-view/table-view.stories.js +55 -0
  34. package/dist/components/src/result-view/table.d.ts +8 -0
  35. package/dist/components/src/result-view/table.d.ts.map +1 -0
  36. package/dist/components/src/result-view/table.js +26 -0
  37. package/dist/components/src/sidebar.d.ts +10 -0
  38. package/dist/components/src/sidebar.d.ts.map +1 -0
  39. package/dist/components/src/sidebar.js +10 -0
  40. package/dist/components/src/stories/blog-card.stories.d.ts +7 -0
  41. package/dist/components/src/stories/blog-card.stories.d.ts.map +1 -0
  42. package/dist/components/src/stories/blog-card.stories.js +42 -0
  43. package/dist/components/src/stories/blur-image.stories.d.ts +32 -0
  44. package/dist/components/src/stories/blur-image.stories.d.ts.map +1 -0
  45. package/dist/components/src/stories/blur-image.stories.js +47 -0
  46. package/dist/components/src/stories/breadcrumb.stories.d.ts +7 -0
  47. package/dist/components/src/stories/breadcrumb.stories.d.ts.map +1 -0
  48. package/dist/components/src/stories/breadcrumb.stories.js +48 -0
  49. package/dist/components/src/stories/empty.stories.d.ts +10 -0
  50. package/dist/components/src/stories/empty.stories.d.ts.map +1 -0
  51. package/dist/components/src/stories/empty.stories.js +11 -0
  52. package/dist/components/src/stories/navbar.stories.d.ts +6 -0
  53. package/dist/components/src/stories/navbar.stories.d.ts.map +1 -0
  54. package/dist/components/src/stories/navbar.stories.js +14 -0
  55. package/dist/components/src/stories/sidebar.stories.d.ts +24 -0
  56. package/dist/components/src/stories/sidebar.stories.d.ts.map +1 -0
  57. package/dist/components/src/stories/sidebar.stories.js +80 -0
  58. package/dist/components/tailwind.config.d.ts +2 -0
  59. package/dist/components/tailwind.config.d.ts.map +1 -0
  60. package/dist/components/tailwind.config.js +15 -0
  61. package/dist/config/src/index.d.ts +4 -0
  62. package/dist/config/src/index.d.ts.map +1 -0
  63. package/dist/config/src/index.js +67 -0
  64. package/dist/constants/src/index.d.ts +17 -0
  65. package/dist/constants/src/index.d.ts.map +1 -0
  66. package/dist/constants/src/index.js +30 -0
  67. package/dist/contexts/src/index.d.ts +15 -0
  68. package/dist/contexts/src/index.d.ts.map +1 -0
  69. package/dist/contexts/src/index.js +18 -0
  70. package/dist/interfaces/src/common.d.ts +36 -0
  71. package/dist/interfaces/src/common.d.ts.map +1 -0
  72. package/dist/interfaces/src/common.js +2 -0
  73. package/dist/interfaces/src/config.d.ts +26 -0
  74. package/dist/interfaces/src/config.d.ts.map +1 -0
  75. package/dist/interfaces/src/config.js +2 -0
  76. package/dist/interfaces/src/directoryNodes.d.ts +8 -0
  77. package/dist/interfaces/src/directoryNodes.d.ts.map +1 -0
  78. package/dist/interfaces/src/directoryNodes.js +2 -0
  79. package/dist/interfaces/src/documentTypes.d.ts +7 -0
  80. package/dist/interfaces/src/documentTypes.d.ts.map +1 -0
  81. package/dist/interfaces/src/documentTypes.js +2 -0
  82. package/dist/interfaces/src/index.d.ts +7 -0
  83. package/dist/interfaces/src/index.d.ts.map +1 -0
  84. package/dist/interfaces/src/index.js +22 -0
  85. package/dist/interfaces/src/informationUnits.d.ts +53 -0
  86. package/dist/interfaces/src/informationUnits.d.ts.map +1 -0
  87. package/dist/interfaces/src/informationUnits.js +2 -0
  88. package/dist/interfaces/src/treeOfContent.d.ts +8 -0
  89. package/dist/interfaces/src/treeOfContent.d.ts.map +1 -0
  90. package/dist/interfaces/src/treeOfContent.js +2 -0
  91. package/dist/src/autocomplete.d.ts +8 -0
  92. package/dist/src/autocomplete.d.ts.map +1 -0
  93. package/dist/src/blog-card.d.ts +17 -0
  94. package/dist/src/blog-card.d.ts.map +1 -0
  95. package/dist/src/blur-image.d.ts +4 -0
  96. package/dist/src/blur-image.d.ts.map +1 -0
  97. package/dist/src/breadcrumb.d.ts +9 -0
  98. package/dist/src/breadcrumb.d.ts.map +1 -0
  99. package/dist/src/empty.d.ts +3 -0
  100. package/dist/src/empty.d.ts.map +1 -0
  101. package/dist/src/navbar.d.ts +8 -0
  102. package/dist/src/navbar.d.ts.map +1 -0
  103. package/dist/src/providers/search-state-wrapper.d.ts +13 -0
  104. package/dist/src/providers/search-state-wrapper.d.ts.map +1 -0
  105. package/dist/src/result-list.d.ts +8 -0
  106. package/dist/src/result-list.d.ts.map +1 -0
  107. package/dist/src/result-view/blog.d.ts +8 -0
  108. package/dist/src/result-view/blog.d.ts.map +1 -0
  109. package/dist/src/result-view/table.d.ts +8 -0
  110. package/dist/src/result-view/table.d.ts.map +1 -0
  111. package/dist/src/sidebar.d.ts +10 -0
  112. package/dist/src/sidebar.d.ts.map +1 -0
  113. package/dist/tailwind.config.d.ts +2 -0
  114. package/dist/tailwind.config.d.ts.map +1 -0
  115. package/dist/types/src/index.d.ts +8 -0
  116. package/dist/types/src/index.d.ts.map +1 -0
  117. package/dist/types/src/index.js +2 -0
  118. package/dist/utils/src/breadcrumbs.d.ts +3 -0
  119. package/dist/utils/src/breadcrumbs.d.ts.map +1 -0
  120. package/dist/utils/src/breadcrumbs.js +14 -0
  121. package/dist/utils/src/classMerge.d.ts +3 -0
  122. package/dist/utils/src/classMerge.d.ts.map +1 -0
  123. package/dist/utils/src/classMerge.js +8 -0
  124. package/dist/utils/src/index.d.ts +5 -0
  125. package/dist/utils/src/index.d.ts.map +1 -0
  126. package/dist/utils/src/index.js +20 -0
  127. package/dist/utils/src/treeOfContent.d.ts +2 -0
  128. package/dist/utils/src/treeOfContent.d.ts.map +1 -0
  129. package/dist/utils/src/treeOfContent.js +85 -0
  130. package/dist/utils/src/utils.d.ts +8 -0
  131. package/dist/utils/src/utils.d.ts.map +1 -0
  132. package/dist/utils/src/utils.js +37 -0
  133. package/package.json +13 -12
@@ -0,0 +1,53 @@
1
+ import { DirectoryNodes } from "./directoryNodes";
2
+ import { DefaultLinksRequest, DefaultPageInfo, idShortID, Labels } from "./common";
3
+ interface informationUnitsClass extends idShortID {
4
+ labels: Labels[];
5
+ }
6
+ export interface informationUnitsDirectories extends idShortID {
7
+ labels: Labels[];
8
+ links: DefaultLinksRequest[];
9
+ class: informationUnitsClass;
10
+ childNodes?: informationUnitsClass[];
11
+ }
12
+ export interface informationUnitsRenditions extends informationUnitsDirectories {
13
+ source: string;
14
+ format: string;
15
+ }
16
+ export interface informationUnitsItems extends idShortID {
17
+ directories: informationUnitsDirectories[];
18
+ identities: informationUnitsDirectories[];
19
+ class: informationUnitsClass;
20
+ labels: Labels[];
21
+ titles: Labels[];
22
+ links: DefaultLinksRequest[];
23
+ renditions: informationUnitsRenditions[];
24
+ iirdsVersion: {
25
+ value: string;
26
+ };
27
+ revision: string;
28
+ score: number;
29
+ directoryNodes: DirectoryNodes[];
30
+ languages: string[];
31
+ }
32
+ export interface informationUnitsResponse extends idShortID {
33
+ languages: string[];
34
+ labels: Labels[];
35
+ titles: Labels[];
36
+ files: {
37
+ format: string;
38
+ type: string;
39
+ link: string;
40
+ }[];
41
+ }
42
+ export interface informationUnits {
43
+ items: informationUnitsItems[];
44
+ pageInfo: DefaultPageInfo;
45
+ }
46
+ export interface AutocompleteSuggestion {
47
+ suggestions: {
48
+ type: string;
49
+ value: string;
50
+ }[];
51
+ }
52
+ export {};
53
+ //# sourceMappingURL=informationUnits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"informationUnits.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/informationUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,MAAM,EACP,MAAM,UAAU,CAAC;AAElB,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,KAAK,EAAE,qBAAqB,CAAC;IAC7B,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,0BACf,SAAQ,2BAA2B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC3C,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAC1C,KAAK,EAAE,qBAAqB,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,UAAU,EAAE,0BAA0B,EAAE,CAAC;IACzC,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;CACL;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface TreeOfContent {
2
+ label: string;
3
+ id: string;
4
+ link: string;
5
+ active: boolean;
6
+ children: TreeOfContent[];
7
+ }
8
+ //# sourceMappingURL=treeOfContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeOfContent.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/treeOfContent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ type Props = {
2
+ initialValue: string;
3
+ onSelect: (value: string) => void;
4
+ onSearch: (value: string) => Promise<string[]>;
5
+ };
6
+ export declare const AutoComplete: ({ initialValue, onSearch, onSelect, }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=autocomplete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../src/autocomplete.tsx"],"names":[],"mappings":"AAiBA,KAAK,KAAK,GAAG;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,uCAI1B,KAAK,4CAqFP,CAAA"}
@@ -0,0 +1,17 @@
1
+ interface BlogCardProp {
2
+ data: {
3
+ title: string;
4
+ blurDataURL: string;
5
+ image: string;
6
+ description: string;
7
+ authors: string;
8
+ _id: string;
9
+ date: string;
10
+ slug: string;
11
+ };
12
+ priority?: boolean;
13
+ horizontal?: boolean;
14
+ }
15
+ export declare const BlogCard: ({ data, priority, horizontal, }: BlogCardProp) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=blog-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog-card.d.ts","sourceRoot":"","sources":["../../src/blog-card.tsx"],"names":[],"mappings":"AAMA,UAAU,YAAY;IAClB,IAAI,EAAE;QACF,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,GAAI,iCAItB,YAAY,4CA6Dd,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ComponentProps } from "react";
2
+ import Image from "next/image";
3
+ export declare const BlurImage: (props: ComponentProps<typeof Image>) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=blur-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blur-image.d.ts","sourceRoot":"","sources":["../../src/blur-image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,MAAM,YAAY,CAAC;AAG/B,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,CAAC,OAAO,KAAK,CAAC,4CAe5D,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { TreeOfContent } from "@c-rex/interfaces";
3
+ interface BreadcrumbProps {
4
+ items: TreeOfContent[];
5
+ loading?: boolean;
6
+ }
7
+ export declare const Breadcrumb: FC<BreadcrumbProps>;
8
+ export {};
9
+ //# sourceMappingURL=breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAUtC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,UAAU,eAAe;IACrB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+D1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ export declare const Empty: FC;
3
+ //# sourceMappingURL=empty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,eAAO,MAAM,KAAK,EAAE,EASnB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ interface NavBarProps {
3
+ scroll?: boolean;
4
+ large?: boolean;
5
+ }
6
+ export declare const NavBar: FC<NavBarProps>;
7
+ export {};
8
+ //# sourceMappingURL=navbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,UAAU,WAAW;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAsDlC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { FC, ReactNode } from "react";
2
+ interface SearchStateWrapperProps {
3
+ children: ReactNode;
4
+ filters: {
5
+ searchValue: string;
6
+ page: number;
7
+ selectedLanguage: string[];
8
+ availableLanguages: string[];
9
+ };
10
+ }
11
+ export declare const SearchStateWrapper: FC<SearchStateWrapperProps>;
12
+ export {};
13
+ //# sourceMappingURL=search-state-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-state-wrapper.d.ts","sourceRoot":"","sources":["../../../src/providers/search-state-wrapper.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtC,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,kBAAkB,EAAE,MAAM,EAAE,CAAC;KAChC,CAAC;CACL;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAK1D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { informationUnitsItems } from "@c-rex/interfaces";
3
+ interface ResultListProps {
4
+ items: informationUnitsItems[];
5
+ }
6
+ export declare const ResultList: FC<ResultListProps>;
7
+ export {};
8
+ //# sourceMappingURL=result-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-list.d.ts","sourceRoot":"","sources":["../../src/result-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,UAAU,eAAe;IACrB,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAE1C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { informationUnitsItems } from "@c-rex/interfaces";
3
+ interface BlogViewProps {
4
+ items: informationUnitsItems[];
5
+ }
6
+ declare const BlogView: FC<BlogViewProps>;
7
+ export default BlogView;
8
+ //# sourceMappingURL=blog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../../src/result-view/blog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,OAAO,EAAE,qBAAqB,EAAU,MAAM,mBAAmB,CAAC;AAElE,UAAU,aAAa;IACnB,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAClC;AAED,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA0B/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { informationUnitsItems } from "@c-rex/interfaces";
3
+ interface TableViewProps {
4
+ items: informationUnitsItems[];
5
+ }
6
+ declare const TableView: FC<TableViewProps>;
7
+ export default TableView;
8
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/result-view/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAStC,OAAO,EAAE,qBAAqB,EAAU,MAAM,mBAAmB,CAAC;AAGlE,UAAU,cAAc;IACpB,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAClC;AAED,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8CjC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ComponentProps } from "react";
2
+ import { Sidebar } from "@c-rex/ui/sidebar";
3
+ import { TreeOfContent } from "@c-rex/interfaces";
4
+ interface SidebarProps extends ComponentProps<typeof Sidebar> {
5
+ data: TreeOfContent[];
6
+ loading?: boolean;
7
+ }
8
+ export declare function AppSidebar({ data, loading, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACH,OAAO,EAUV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,UAAU,YAAa,SAAQ,cAAc,CAAC,OAAO,OAAO,CAAC;IACzD,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAoDnE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tailwind.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind.config.d.ts","sourceRoot":"","sources":["../tailwind.config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { LOG_CATEGORIES, LOG_LEVELS, ALL } from "@c-rex/constants";
2
+ export type QueryParams = {
3
+ key: string;
4
+ value: string;
5
+ };
6
+ export type LogLevelType = keyof typeof LOG_LEVELS | typeof ALL;
7
+ export type LogCategoriesType = typeof LOG_CATEGORIES[number] | typeof ALL;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../types/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,UAAU,GAAG,OAAO,GAAG,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,GAAG,OAAO,GAAG,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { TreeOfContent } from "@c-rex/interfaces";
2
+ export declare const generateBreadcrumbItems: (treeOfContent: TreeOfContent[]) => TreeOfContent[];
3
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../utils/src/breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,uBAAuB,GAChC,eAAe,aAAa,EAAE,KAC/B,aAAa,EAWf,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateBreadcrumbItems = void 0;
4
+ const generateBreadcrumbItems = (treeOfContent) => {
5
+ const result = [];
6
+ treeOfContent.forEach((item) => {
7
+ if (item.active) {
8
+ const filteredChildren = (0, exports.generateBreadcrumbItems)(item.children);
9
+ result.push(item, ...filteredChildren);
10
+ }
11
+ });
12
+ return result;
13
+ };
14
+ exports.generateBreadcrumbItems = generateBreadcrumbItems;
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=classMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classMerge.d.ts","sourceRoot":"","sources":["../../../../utils/src/classMerge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cn = cn;
4
+ const clsx_1 = require("clsx");
5
+ const tailwind_merge_1 = require("tailwind-merge");
6
+ function cn(...inputs) {
7
+ return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
8
+ }
@@ -0,0 +1,5 @@
1
+ export * from './utils';
2
+ export * from './treeOfContent';
3
+ export * from './breadcrumbs';
4
+ export * from './classMerge';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../utils/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./utils"), exports);
18
+ __exportStar(require("./treeOfContent"), exports);
19
+ __exportStar(require("./breadcrumbs"), exports);
20
+ __exportStar(require("./classMerge"), exports);
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=treeOfContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeOfContent.d.ts","sourceRoot":"","sources":["../../../../utils/src/treeOfContent.ts"],"names":[],"mappings":""}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ import { DirectoryNodesService } from "@c-rex/services";
5
+
6
+ import { DirectoryNodes } from "@c-rex/interfaces";
7
+ import { informationUnitsDirectories } from "@c-rex/interfaces";
8
+ import { TreeOfContent } from "@c-rex/interfaces";
9
+
10
+ export const generateTreeOfContent = async (
11
+ directoryNodes: DirectoryNodes[],
12
+ ): Promise<TreeOfContent[]> => {
13
+
14
+ const service = new DirectoryNodesService();
15
+
16
+ if (directoryNodes.length == 0) return [];
17
+ if (directoryNodes[0] == undefined) return [];
18
+
19
+ let id = directoryNodes[0].shortId;
20
+ let response = await service.getItem(id);
21
+ const childList = await getChildrenInfo(response.childNodes);
22
+ let result: TreeOfContent[] = childList;
23
+
24
+ while (response.parents != undefined) {
25
+ if (response.informationUnits[0] == undefined) return result;
26
+ if (response.labels[0] == undefined) return result;
27
+ if (response.parents[0] == undefined) return result;
28
+
29
+ const infoId = response.informationUnits[0].shortId;
30
+ const aux = {
31
+ active: true,
32
+ label: response.labels[0].value,
33
+ id: response.shortId,
34
+ link: `/info/${infoId}`,
35
+ children: [...result],
36
+ };
37
+ id = response.parents[0].shortId;
38
+ response = await service.getItem(id);
39
+
40
+ const tree = await getChildrenInfo(response.childNodes, aux);
41
+
42
+ result = [...tree];
43
+ }
44
+
45
+ return result;
46
+ };
47
+
48
+ const getChildrenInfo = async (
49
+ childNodes: informationUnitsDirectories[],
50
+ childItem?: TreeOfContent,
51
+ ): Promise<TreeOfContent[]> => {
52
+ const result: TreeOfContent[] = [];
53
+ if (childNodes == undefined) return result;
54
+
55
+ for (const item of childNodes) {
56
+ if (item.labels[0] == undefined) break;
57
+
58
+ const infoId = await getLink(item.shortId);
59
+ let resultItem: TreeOfContent = {
60
+ active: false,
61
+ label: item.labels[0].value,
62
+ link: `/info/${infoId}`,
63
+ id: item.shortId,
64
+ children: [],
65
+ };
66
+
67
+ if (childItem?.id == item.shortId) {
68
+ resultItem = childItem;
69
+ }
70
+ result.push(resultItem);
71
+ }
72
+
73
+ return result;
74
+ };
75
+
76
+ const getLink = async (id: string): Promise<string> => {
77
+
78
+ const service = new DirectoryNodesService();
79
+ const response = await service.getItem(id);
80
+ if (response.informationUnits == undefined) return "";
81
+ if (response.informationUnits[0] == undefined) return "";
82
+
83
+ return response.informationUnits[0].shortId;
84
+ };
85
+ */
@@ -0,0 +1,8 @@
1
+ import { QueryParams } from '@c-rex/types';
2
+ export declare const createParams: (fieldsList: string[], key?: string) => {
3
+ key: string;
4
+ value: string;
5
+ }[];
6
+ export declare const updateUrlWithParams: (router: any, params: QueryParams[]) => void;
7
+ export declare const generateQueryParams: (params: QueryParams[]) => string;
8
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../utils/src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,EAAE,EAAE,MAAK,MAAiB;;;GAIlE,CAAC;AAER,eAAO,MAAM,mBAAmB,GAE5B,QAAQ,GAAG,EACX,QAAQ,WAAW,EAAE,SAUxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,EAAE,KAAG,MAQ3D,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateQueryParams = exports.updateUrlWithParams = exports.createParams = void 0;
4
+ //import * as Flags from 'country-flag-icons/react/3x2';
5
+ //import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';
6
+ const createParams = (fieldsList, key = "Fields") => fieldsList.map((item) => ({
7
+ key: key,
8
+ value: item,
9
+ }));
10
+ exports.createParams = createParams;
11
+ const updateUrlWithParams = (
12
+ //router: AppRouterInstance,
13
+ router, params) => {
14
+ const searchParams = new URLSearchParams(window.location.search);
15
+ params.forEach((param) => {
16
+ searchParams.set(param.key, param.value.toString());
17
+ });
18
+ const queryString = searchParams.toString();
19
+ router.push(`${window.location.pathname}?${queryString}`);
20
+ };
21
+ exports.updateUrlWithParams = updateUrlWithParams;
22
+ const generateQueryParams = (params) => {
23
+ const queryParams = params
24
+ .map((param) => `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`)
25
+ .join("&");
26
+ return queryParams;
27
+ };
28
+ exports.generateQueryParams = generateQueryParams;
29
+ /*
30
+ export const getFlagIcon = (countryCode: string): JSX.Element | null => {
31
+ if (countryCode === undefined) return null;
32
+
33
+ return Flags[countryCode] || null;
34
+ };
35
+
36
+
37
+ */
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@c-rex/components",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "files": [
5
+ "dist",
5
6
  "src"
6
7
  ],
7
8
  "publishConfig": {
@@ -9,47 +10,47 @@
9
10
  },
10
11
  "exports": {
11
12
  "./autocomplete": {
12
- "types": "./src/autocomplete.tsx",
13
+ "types": "./dist/autocomplete.d.ts",
13
14
  "import": "./src/autocomplete.tsx"
14
15
  },
15
16
  "./blog-card": {
16
- "types": "./src/blog-card.tsx",
17
+ "types": "./dist/blog-card.d.ts",
17
18
  "import": "./src/blog-card.tsx"
18
19
  },
19
20
  "./blur-image": {
20
- "types": "./src/blur-image.tsx",
21
+ "types": "./dist/blur-image.d.ts",
21
22
  "import": "./src/blur-image.tsx"
22
23
  },
23
24
  "./breadcrumb": {
24
- "types": "./src/breadcrumb.tsx",
25
+ "types": "./dist/breadcrumb.d.ts",
25
26
  "import": "./src/breadcrumb.tsx"
26
27
  },
27
28
  "./empty": {
28
- "types": "./src/empty.tsx",
29
+ "types": "./dist/empty.d.ts",
29
30
  "import": "./src/empty.tsx"
30
31
  },
31
32
  "./navbar": {
32
- "types": "./src/navbar.tsx",
33
+ "types": "./dist/navbar.d.ts",
33
34
  "import": "./src/navbar.tsx"
34
35
  },
35
36
  "./providers/search-state-wrapper": {
36
- "types": "./src/providers/search-state-wrapper.tsx",
37
+ "types": "./dist/providers/search-state-wrapper.d.ts",
37
38
  "import": "./src/providers/search-state-wrapper.tsx"
38
39
  },
39
40
  "./result-list": {
40
- "types": "./src/result-list.tsx",
41
+ "types": "./dist/result-list.d.ts",
41
42
  "import": "./src/result-list.tsx"
42
43
  },
43
44
  "./result-view/blog": {
44
- "types": "./src/result-view/blog.tsx",
45
+ "types": "./dist/result-view/blog.d.ts",
45
46
  "import": "./src/result-view/blog.tsx"
46
47
  },
47
48
  "./result-view/table": {
48
- "types": "./src/result-view/table.tsx",
49
+ "types": "./dist/result-view/table.d.ts",
49
50
  "import": "./src/result-view/table.tsx"
50
51
  },
51
52
  "./sidebar": {
52
- "types": "./src/sidebar.tsx",
53
+ "types": "./dist/sidebar.d.ts",
53
54
  "import": "./src/sidebar.tsx"
54
55
  },
55
56
  "./package.json": "./package.json"