@ludo.ninja/components 2.3.40 → 2.3.42
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/build/api/server-search/queries/useFetchProjectsByTerm/index.d.ts +37 -0
- package/build/api/server-search/queries/useFetchProjectsByTerm/index.js +48 -0
- package/build/components/search/SearchInputContainer.js +16 -7
- package/build/components/search/searchSuggestions/index.d.ts +5 -3
- package/build/components/search/searchSuggestions/index.js +76 -28
- package/build/components/search/searchSuggestions/searchSuggestionsItem/index.d.ts +1 -1
- package/build/components/search/searchSuggestions/searchSuggestionsItem/index.js +1 -1
- package/build/components/search/searchSuggestions/searchSuggestionsItem/searchSuggestionsItemSkeleton/index.js +6 -1
- package/build/components/submitNewProjectForm/index.d.ts +2 -0
- package/build/components/submitNewProjectForm/index.js +202 -0
- package/build/components/submitNewProjectForm/resultSubmitNewProjectModal/index.d.ts +6 -0
- package/build/components/submitNewProjectForm/resultSubmitNewProjectModal/index.js +95 -0
- package/build/public/badge.js +62 -0
- package/build/public/success.js +29 -0
- package/build/system/Modals/ModalSidebar/index.js +0 -3
- package/build/utils/seacrhTabs.js +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
|
|
2
|
+
import { searchSchema } from "@ludo.ninja/api";
|
|
3
|
+
export declare const prefetchFetchProjectsByTerm: ({ searchInput, pageSize }: searchSchema.IQueryFetchProjectsByTermArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
|
|
4
|
+
data: {
|
|
5
|
+
findAllTopEntitiesByName: null;
|
|
6
|
+
};
|
|
7
|
+
}>;
|
|
8
|
+
export declare const useFetchProjectsByTerm: () => {
|
|
9
|
+
data: searchSchema.IFetchProjectsByTermQuery | undefined;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
error: import("@apollo/client").ApolloError | undefined;
|
|
12
|
+
load: ({ searchInput, pageSize }: searchSchema.IQueryFetchProjectsByTermArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFetchProjectsByTermQuery, searchSchema.Exact<{
|
|
13
|
+
searchInput: string;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
}>>>;
|
|
16
|
+
projects: searchSchema.IProject[];
|
|
17
|
+
clearProjectsState: () => void;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: {
|
|
20
|
+
useFetchProjectsByTerm: () => {
|
|
21
|
+
data: searchSchema.IFetchProjectsByTermQuery | undefined;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
error: import("@apollo/client").ApolloError | undefined;
|
|
24
|
+
load: ({ searchInput, pageSize }: searchSchema.IQueryFetchProjectsByTermArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFetchProjectsByTermQuery, searchSchema.Exact<{
|
|
25
|
+
searchInput: string;
|
|
26
|
+
pageSize: number;
|
|
27
|
+
}>>>;
|
|
28
|
+
projects: searchSchema.IProject[];
|
|
29
|
+
clearProjectsState: () => void;
|
|
30
|
+
};
|
|
31
|
+
prefetchFetchProjectsByTerm: ({ searchInput, pageSize }: searchSchema.IQueryFetchProjectsByTermArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
|
|
32
|
+
data: {
|
|
33
|
+
findAllTopEntitiesByName: null;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFetchProjectsByTerm = exports.prefetchFetchProjectsByTerm = void 0;
|
|
4
|
+
const api_1 = require("@ludo.ninja/api");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const prefetchFetchProjectsByTerm = ({ searchInput, pageSize }, apolloClient) => {
|
|
7
|
+
return apolloClient
|
|
8
|
+
.query({
|
|
9
|
+
query: api_1.searchSchema.FetchProjectsByTermDocument,
|
|
10
|
+
context: { uri: api_1.hosts.serverSearchHost },
|
|
11
|
+
variables: { searchInput, pageSize },
|
|
12
|
+
fetchPolicy: "network-only",
|
|
13
|
+
})
|
|
14
|
+
.catch(() => {
|
|
15
|
+
return {
|
|
16
|
+
data: { findAllTopEntitiesByName: null },
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
exports.prefetchFetchProjectsByTerm = prefetchFetchProjectsByTerm;
|
|
21
|
+
const useFetchProjectsByTerm = () => {
|
|
22
|
+
const [projects, setProjects] = (0, react_1.useState)([]);
|
|
23
|
+
const [findAllTopEntitiesByName, { data, error, loading }] = api_1.searchSchema.useFetchProjectsByTermLazyQuery({
|
|
24
|
+
context: {
|
|
25
|
+
uri: api_1.hosts.searchHost,
|
|
26
|
+
},
|
|
27
|
+
onCompleted: ({ fetchProjectsByTerm }) => {
|
|
28
|
+
setProjects(fetchProjectsByTerm);
|
|
29
|
+
},
|
|
30
|
+
onError: () => {
|
|
31
|
+
setProjects([]);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
function clearProjectsState() {
|
|
35
|
+
setProjects([]);
|
|
36
|
+
}
|
|
37
|
+
function load({ searchInput, pageSize }) {
|
|
38
|
+
return findAllTopEntitiesByName({
|
|
39
|
+
variables: { searchInput, pageSize },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return { data, loading, error, load, projects, clearProjectsState };
|
|
43
|
+
};
|
|
44
|
+
exports.useFetchProjectsByTerm = useFetchProjectsByTerm;
|
|
45
|
+
exports.default = {
|
|
46
|
+
useFetchProjectsByTerm: exports.useFetchProjectsByTerm,
|
|
47
|
+
prefetchFetchProjectsByTerm: exports.prefetchFetchProjectsByTerm,
|
|
48
|
+
};
|
|
@@ -35,7 +35,6 @@ const styled_components_1 = __importStar(require("styled-components"));
|
|
|
35
35
|
const colors_1 = require("@ludo.ninja/ui/build/styles/colors");
|
|
36
36
|
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
37
37
|
const utils_1 = require("@ludo.ninja/utils");
|
|
38
|
-
const useFetchFindAllTopEntitiesByName_1 = require("../../api/server-search/queries/useFetchFindAllTopEntitiesByName");
|
|
39
38
|
const searchCloseMoreButtons_1 = __importDefault(require("./searchCloseMoreButtons"));
|
|
40
39
|
const searchSuggestions_1 = __importDefault(require("./searchSuggestions"));
|
|
41
40
|
const env_1 = require("../../store/env");
|
|
@@ -45,6 +44,7 @@ const screen_1 = require("../../utils/screen");
|
|
|
45
44
|
const seacrhTabs_1 = require("../../utils/seacrhTabs");
|
|
46
45
|
const back_svg_1 = __importDefault(require("../../public/search/back"));
|
|
47
46
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
47
|
+
const useFetchProjectsByTerm_1 = require("../../api/server-search/queries/useFetchProjectsByTerm");
|
|
48
48
|
const enterKey = "Enter";
|
|
49
49
|
const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputComponent, }) => {
|
|
50
50
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
@@ -59,7 +59,9 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
59
59
|
closeOverlay: state.closeOverlay,
|
|
60
60
|
}));
|
|
61
61
|
const { isMobile } = (0, screen_1.useWindowDimensionsWithServerInitial)();
|
|
62
|
-
const { load, topEntities, loading, clearTopEntitiesState } =
|
|
62
|
+
// const { load, topEntities, loading, clearTopEntitiesState } =
|
|
63
|
+
// useFetchFindAllTopEntitiesByName();
|
|
64
|
+
const { load, projects, loading, clearProjectsState } = (0, useFetchProjectsByTerm_1.useFetchProjectsByTerm)();
|
|
63
65
|
// const router = useRouter();
|
|
64
66
|
(0, react_1.useEffect)(() => {
|
|
65
67
|
// const term = router.query?.term;
|
|
@@ -77,7 +79,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
77
79
|
}, [searchValue]);
|
|
78
80
|
(0, react_1.useEffect)(() => {
|
|
79
81
|
if (debouncedValue.length) {
|
|
80
|
-
load({
|
|
82
|
+
load({ searchInput: debouncedValue, pageSize: 4 }).then(() => {
|
|
81
83
|
setIsDebounceLoading(false);
|
|
82
84
|
});
|
|
83
85
|
}
|
|
@@ -87,19 +89,25 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
87
89
|
const SearchContainer = isMobileOpen
|
|
88
90
|
? SMobileSearchContainer
|
|
89
91
|
: react_1.default.Fragment;
|
|
90
|
-
const searchSuggestion = ((0, jsx_runtime_1.jsx)(searchSuggestions_1.default, { isLoading: loading || isDebounceLoading, searchTerm: debouncedValue,
|
|
92
|
+
const searchSuggestion = ((0, jsx_runtime_1.jsx)(searchSuggestions_1.default, { isLoading: loading || isDebounceLoading, searchTerm: debouncedValue,
|
|
93
|
+
// assets={topEntities?.assets || []}
|
|
94
|
+
// profiles={topEntities?.profiles || []}
|
|
95
|
+
// collections={topEntities?.collections || []}
|
|
96
|
+
projects: projects || [] }));
|
|
91
97
|
return ((0, jsx_runtime_1.jsxs)(Container, { children: [(0, jsx_runtime_1.jsxs)(SearchContainer, { children: [isMobileOpen && ((0, jsx_runtime_1.jsx)(back_svg_1.default, { onClick: () => {
|
|
92
98
|
setIsMobileOpen(false);
|
|
93
99
|
(0, utils_1.rootRemoveOverflow)();
|
|
94
100
|
if (isClearOnBlur) {
|
|
95
101
|
setSearchValue("");
|
|
96
|
-
|
|
102
|
+
clearProjectsState();
|
|
103
|
+
// clearTopEntitiesState();
|
|
97
104
|
}
|
|
98
105
|
} })), initializeInputComponent({
|
|
99
106
|
isMobileOpen,
|
|
100
107
|
mobileOrDesktopPlaceHolder: isMobile
|
|
101
108
|
? "Search"
|
|
102
|
-
: "Search for NFTs, collections, profiles, ENS and blockchain addresses",
|
|
109
|
+
// : "Search for NFTs, collections, profiles, ENS and blockchain addresses",
|
|
110
|
+
: "Search for projects",
|
|
103
111
|
isSearchFocused,
|
|
104
112
|
searchValue,
|
|
105
113
|
inputRef: inputSearch,
|
|
@@ -135,7 +143,8 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
135
143
|
closeOverlay();
|
|
136
144
|
if (isClearOnBlur) {
|
|
137
145
|
setSearchValue("");
|
|
138
|
-
|
|
146
|
+
clearProjectsState();
|
|
147
|
+
// clearTopEntitiesState();
|
|
139
148
|
}
|
|
140
149
|
}, 100);
|
|
141
150
|
},
|
|
@@ -2,10 +2,12 @@ import { TAsset } from '../../../entities/asset/types';
|
|
|
2
2
|
import { collectionsSchema as schema } from "@ludo.ninja/api";
|
|
3
3
|
import { ProfileEntity } from "@ludo.ninja/core";
|
|
4
4
|
import React from "react";
|
|
5
|
+
import { IProject } from "@ludo.ninja/api/build/graphql_tools/__generated__/searchHost/schema";
|
|
5
6
|
interface Props {
|
|
6
|
-
assets
|
|
7
|
-
profiles
|
|
8
|
-
collections
|
|
7
|
+
assets?: TAsset[];
|
|
8
|
+
profiles?: ProfileEntity[];
|
|
9
|
+
collections?: schema.ICollection[];
|
|
10
|
+
projects?: IProject[];
|
|
9
11
|
searchTerm: string;
|
|
10
12
|
isLoading: boolean;
|
|
11
13
|
isMobile?: boolean;
|
|
@@ -9,12 +9,8 @@ const searchSuggestionsFooter_1 = __importDefault(require("./searchSuggestionsFo
|
|
|
9
9
|
const searchSuggestionsItem_1 = __importDefault(require("./searchSuggestionsItem"));
|
|
10
10
|
const searchSuggestionsItemSkeleton_1 = require("./searchSuggestionsItem/searchSuggestionsItemSkeleton");
|
|
11
11
|
const searchSuggestionsNotFound_1 = __importDefault(require("./searchSuggestionsNotFound"));
|
|
12
|
-
const getAssetMiniatureUrl_1 = require("../../../entities/asset/getAssetMiniatureUrl");
|
|
13
|
-
const types_1 = require("../../../entities/labelCreationType/types");
|
|
14
12
|
const env_1 = require("../../../store/env");
|
|
15
13
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
16
|
-
const Badge_1 = __importDefault(require("../../../system/Badge"));
|
|
17
|
-
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
18
14
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
19
15
|
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
20
16
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
@@ -70,42 +66,94 @@ const StyledSearchSuggestions = styled_components_1.default.div `
|
|
|
70
66
|
}
|
|
71
67
|
`;
|
|
72
68
|
// Components
|
|
73
|
-
const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoading }) => {
|
|
69
|
+
const SearchSuggestions = ({ searchTerm, assets = [], profiles = [], collections = [], projects = [], isLoading }) => {
|
|
74
70
|
const { getMediaENVDomain, NEXT_PUBLIC_ENV_VALUE, getAudioDomain, getVideoDomain } = (0, env_1.useEnvStore)((state) => ({
|
|
75
71
|
getMediaENVDomain: state.getMediaDomain,
|
|
76
72
|
NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
|
|
77
73
|
getAudioDomain: state.getAudioDomain,
|
|
78
74
|
getVideoDomain: state.getVideoDomain,
|
|
79
75
|
}));
|
|
80
|
-
const isNotFound = !assets?.length && !profiles?.length && !collections?.length;
|
|
76
|
+
const isNotFound = !assets?.length && !profiles?.length && !collections?.length && !projects?.length;
|
|
81
77
|
return ((0, jsx_runtime_1.jsx)(StyledSearchSuggestions, { children: (0, jsx_runtime_1.jsxs)("div", { className: "content", children: [isLoading && (0, jsx_runtime_1.jsx)(searchSuggestionsItemSkeleton_1.SearchSuggestionsItemsSkeleton, {}), !isLoading &&
|
|
82
|
-
(isNotFound ? ((0, jsx_runtime_1.jsx)(searchSuggestionsNotFound_1.default, { notFoundText: searchTerm })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "scroller", children: [
|
|
83
|
-
...(assets?.length
|
|
78
|
+
(isNotFound ? ((0, jsx_runtime_1.jsx)(searchSuggestionsNotFound_1.default, { notFoundText: searchTerm })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "scroller", children: [...(projects?.length
|
|
84
79
|
? [
|
|
85
80
|
{
|
|
86
|
-
caption: "
|
|
87
|
-
children:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
: []),
|
|
91
|
-
...(collections?.length
|
|
92
|
-
? [
|
|
93
|
-
{
|
|
94
|
-
caption: "Collections",
|
|
95
|
-
children: collections.map((collection) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: collection?.collectionTitle, link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["collections"]}/${collection?.collectionId}`, imgUrl: `${constants_1.staticLink}/public/noContent/noContent.svg`, searchTerm: searchTerm }, `${collection?.collectionId}.${Math.random()}`))),
|
|
96
|
-
},
|
|
97
|
-
]
|
|
98
|
-
: []),
|
|
99
|
-
...(profiles?.length
|
|
100
|
-
? [
|
|
101
|
-
{
|
|
102
|
-
caption: "Profiles",
|
|
103
|
-
children: profiles.map((profile) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { borderRadius: true, name: profile.getName() || "", link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${profile.getUserId()}/nfts`, imgUrl: profile.getUserPic({
|
|
104
|
-
mediaDomain: getMediaENVDomain(),
|
|
105
|
-
}), additionalHTML: Boolean(profile.getFollowings()) && ((0, jsx_runtime_1.jsxs)("span", { className: "additional", children: [profile.getFollowings(), " followers"] })), afterText: (0, jsx_runtime_1.jsx)(Badge_1.default, { className: "badge", color: profile.getReferralTypeColor(), title: profile.getReferralTypeName() }), searchTerm: searchTerm }, profile.getUserId()))),
|
|
81
|
+
caption: "Projects",
|
|
82
|
+
children: projects.map((project) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: project?.name, link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]}/x/${project?.slug}`,
|
|
83
|
+
// imgUrl={`${staticLink}/public/noContent/noContent.svg`}
|
|
84
|
+
searchTerm: searchTerm }, `${project?.id}.${Math.random()}`))),
|
|
106
85
|
},
|
|
107
86
|
]
|
|
108
87
|
: []),
|
|
88
|
+
// ...(assets?.length
|
|
89
|
+
// ? [
|
|
90
|
+
// {
|
|
91
|
+
// caption: "NFTs",
|
|
92
|
+
// children: assets.map((asset) => (
|
|
93
|
+
// <SearchSuggestionsItem
|
|
94
|
+
// key={`${asset?.assetId}.${Math.random()}`}
|
|
95
|
+
// name={asset?.name as string}
|
|
96
|
+
// link={`${
|
|
97
|
+
// ludoDomains[NEXT_PUBLIC_ENV_VALUE as TEnvValue]["asset"]
|
|
98
|
+
// }${asset.assetLink.replace(`${LabelKeys.asset}/`, "")}`}
|
|
99
|
+
// imgUrl={getAssetMiniatureUrl({ asset, nextPublicDomain: NEXT_PUBLIC_ENV_VALUE, getAudioDomain, getVideoDomain })}
|
|
100
|
+
// searchTerm={searchTerm}
|
|
101
|
+
// />
|
|
102
|
+
// )),
|
|
103
|
+
// },
|
|
104
|
+
// ]
|
|
105
|
+
// : []),
|
|
106
|
+
// ...(collections?.length
|
|
107
|
+
// ? [
|
|
108
|
+
// {
|
|
109
|
+
// caption: "Collections",
|
|
110
|
+
// children: collections.map((collection) => (
|
|
111
|
+
// <SearchSuggestionsItem
|
|
112
|
+
// key={`${collection?.collectionId}.${Math.random()}`}
|
|
113
|
+
// name={collection?.collectionTitle as string}
|
|
114
|
+
// link={`${ludoDomains[NEXT_PUBLIC_ENV_VALUE as TEnvValue]["collections"]}/${
|
|
115
|
+
// collection?.collectionId
|
|
116
|
+
// }`}
|
|
117
|
+
// imgUrl={`${staticLink}/public/noContent/noContent.svg`}
|
|
118
|
+
// searchTerm={searchTerm}
|
|
119
|
+
// />
|
|
120
|
+
// )),
|
|
121
|
+
// },
|
|
122
|
+
// ]
|
|
123
|
+
// : []),
|
|
124
|
+
// ...(profiles?.length
|
|
125
|
+
// ? [
|
|
126
|
+
// {
|
|
127
|
+
// caption: "Profiles",
|
|
128
|
+
// children: profiles.map((profile) => (
|
|
129
|
+
// <SearchSuggestionsItem
|
|
130
|
+
// key={profile.getUserId()}
|
|
131
|
+
// borderRadius
|
|
132
|
+
// name={profile.getName() || ""}
|
|
133
|
+
// link={`${
|
|
134
|
+
// ludoDomains[NEXT_PUBLIC_ENV_VALUE as TEnvValue]["profile"]
|
|
135
|
+
// }/${profile.getUserId()}/nfts`}
|
|
136
|
+
// imgUrl={profile.getUserPic({
|
|
137
|
+
// mediaDomain: getMediaENVDomain(),
|
|
138
|
+
// })}
|
|
139
|
+
// additionalHTML={
|
|
140
|
+
// Boolean(profile.getFollowings()) && (
|
|
141
|
+
// <span className={"additional"}>{profile.getFollowings()} followers</span>
|
|
142
|
+
// )
|
|
143
|
+
// }
|
|
144
|
+
// afterText={
|
|
145
|
+
// <Badge
|
|
146
|
+
// className={"badge"}
|
|
147
|
+
// color={profile.getReferralTypeColor()}
|
|
148
|
+
// title={profile.getReferralTypeName()}
|
|
149
|
+
// />
|
|
150
|
+
// }
|
|
151
|
+
// searchTerm={searchTerm}
|
|
152
|
+
// />
|
|
153
|
+
// )),
|
|
154
|
+
// },
|
|
155
|
+
// ]
|
|
156
|
+
// : []),
|
|
109
157
|
].map(({ caption, children }) => ((0, jsx_runtime_1.jsx)(searchSuggestionsCaption_1.default, { caption: caption, children: children }, caption))) }), (0, jsx_runtime_1.jsx)(searchSuggestionsFooter_1.default, {})] })))] }) }));
|
|
110
158
|
};
|
|
111
159
|
// Export
|
|
@@ -119,7 +119,7 @@ const StyledSearchSuggestionsItem = styled_components_1.default.div `
|
|
|
119
119
|
}
|
|
120
120
|
`;
|
|
121
121
|
// Components
|
|
122
|
-
const SearchSuggestionsItem = ({ name, link, imgUrl, borderRadius, additionalHTML, searchTerm, afterText }) => ((0, jsx_runtime_1.jsx)(StyledSearchSuggestionsItem, { borderRadius: borderRadius, children: (0, jsx_runtime_1.jsxs)("a", { href: link, className: 'link', children: [(0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: borderRadius && 16, children: (0, jsx_runtime_1.jsx)("img", { src: imgUrl, alt: 'pirate', width: 32, height: 32 }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'text', children: [(0, jsx_runtime_1.jsx)("p", { className: 'regular', children: (0, utils_1.searchQueryLetters)({
|
|
122
|
+
const SearchSuggestionsItem = ({ name, link, imgUrl, borderRadius, additionalHTML, searchTerm, afterText }) => ((0, jsx_runtime_1.jsx)(StyledSearchSuggestionsItem, { borderRadius: borderRadius, children: (0, jsx_runtime_1.jsxs)("a", { href: link, className: 'link', children: [Boolean(imgUrl) && ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: borderRadius && 16, children: (0, jsx_runtime_1.jsx)("img", { src: imgUrl, alt: 'pirate', width: 32, height: 32 }) })), (0, jsx_runtime_1.jsxs)("div", { className: 'text', children: [(0, jsx_runtime_1.jsx)("p", { className: 'regular', children: (0, utils_1.searchQueryLetters)({
|
|
123
123
|
text: name,
|
|
124
124
|
searchQuery: searchTerm,
|
|
125
125
|
className: 'strong',
|
|
@@ -110,7 +110,12 @@ const SSkeleton = styled_components_1.default.div `
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
`;
|
|
113
|
-
const SearchSuggestionsItemsSkeleton = () => ((0, jsx_runtime_1.jsx)(SSkeleton, { children: [
|
|
113
|
+
const SearchSuggestionsItemsSkeleton = () => ((0, jsx_runtime_1.jsx)(SSkeleton, { children: [
|
|
114
|
+
'Projects',
|
|
115
|
+
// 'NFTs',
|
|
116
|
+
// 'Collections',
|
|
117
|
+
// 'Profiles'
|
|
118
|
+
].map((item) => ((0, jsx_runtime_1.jsx)(searchSuggestionsCaption_1.default, { caption: item, children: (0, jsx_runtime_1.jsx)(SContainer, { children: Array.from({ length: 3 }, (_, index) => ((0, jsx_runtime_1.jsx)(SearchSuggestionsItemSkeleton, {}, index))) }) }, item))) }));
|
|
114
119
|
exports.SearchSuggestionsItemsSkeleton = SearchSuggestionsItemsSkeleton;
|
|
115
120
|
// Export
|
|
116
121
|
exports.default = SearchSuggestionsItemSkeleton;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const resultSubmitNewProjectModal_1 = __importDefault(require("./resultSubmitNewProjectModal"));
|
|
8
|
+
const ui_1 = require("../../store/ui");
|
|
9
|
+
const Forms_1 = require("../../system/Forms");
|
|
10
|
+
const DesktopSelect_1 = __importDefault(require("../../system/Forms/Selects/DesktopSelect"));
|
|
11
|
+
const api_1 = require("@ludo.ninja/api");
|
|
12
|
+
const schema_1 = require("@ludo.ninja/api/build/graphql_tools/__generated__/opportunitiesHost/schema");
|
|
13
|
+
const blockchains_1 = require("@ludo.ninja/core/build/blockchains");
|
|
14
|
+
const data_1 = require("@ludo.ninja/core/build/blockchains/data");
|
|
15
|
+
const ScreenWidth_1 = require("@ludo.ninja/ui/build/styles/ScreenWidth");
|
|
16
|
+
const colors_1 = require("@ludo.ninja/ui/build/styles/colors");
|
|
17
|
+
const typography_1 = require("@ludo.ninja/ui/build/styles/typography");
|
|
18
|
+
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
19
|
+
const MainButton_1 = __importDefault(require("@ludo.ninja/ui/build/system/Buttons/MainButton"));
|
|
20
|
+
const Text_1 = require("@ludo.ninja/ui/build/system/Text");
|
|
21
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
22
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
23
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
24
|
+
const getBlockchainOptions = () => {
|
|
25
|
+
const data = [];
|
|
26
|
+
for (const buildBlockchainsDatum in data_1.blockChainData) {
|
|
27
|
+
const key = buildBlockchainsDatum;
|
|
28
|
+
if (key !== blockchains_1.BlockChainKeys.no_blockchain) {
|
|
29
|
+
data.push({
|
|
30
|
+
id: data_1.blockChainData[key].blockchainPrivateLabel,
|
|
31
|
+
label: data_1.blockChainData[key].blockchainPublicLabel,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return data;
|
|
36
|
+
};
|
|
37
|
+
const StyledCreateForm = styled_components_1.default.div `
|
|
38
|
+
min-width: 392px;
|
|
39
|
+
margin-top: -18px;
|
|
40
|
+
position: relative;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
form {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.head {
|
|
52
|
+
margin-bottom: 24px;
|
|
53
|
+
|
|
54
|
+
.tittle {
|
|
55
|
+
${typography_1.FH3};
|
|
56
|
+
color: ${colors_1.BlackColor};
|
|
57
|
+
margin-bottom: 8px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.content {
|
|
62
|
+
margin-bottom: 44px;
|
|
63
|
+
flex-grow: 1;
|
|
64
|
+
|
|
65
|
+
.input_group {
|
|
66
|
+
position: relative;
|
|
67
|
+
margin-bottom: 16px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.btns {
|
|
72
|
+
margin-bottom: 4px;
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
gap: 16px;
|
|
76
|
+
|
|
77
|
+
button {
|
|
78
|
+
width: 138px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (max-width: 767px) {
|
|
83
|
+
margin-right: 0;
|
|
84
|
+
min-width: unset;
|
|
85
|
+
height: calc(100vh - 48px);
|
|
86
|
+
.content {
|
|
87
|
+
width: auto;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
92
|
+
min-width: ${(0, _4k_1.adaptiveValueCalc)(392)};
|
|
93
|
+
margin-top: ${(0, _4k_1.adaptiveValueCalc)(-18)};
|
|
94
|
+
|
|
95
|
+
.head {
|
|
96
|
+
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(24)};
|
|
97
|
+
|
|
98
|
+
.tittle {
|
|
99
|
+
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.content {
|
|
104
|
+
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(44)};
|
|
105
|
+
|
|
106
|
+
.input_group {
|
|
107
|
+
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.btns {
|
|
112
|
+
margin-bottom: 8px;: ${(0, _4k_1.adaptiveValueCalc)(4)};
|
|
113
|
+
gap: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
114
|
+
|
|
115
|
+
button {
|
|
116
|
+
width: ${(0, _4k_1.adaptiveValueCalc)(138)};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
`;
|
|
121
|
+
const StyledSelect = (0, styled_components_1.default)(DesktopSelect_1.default) `
|
|
122
|
+
border-radius: 6px;
|
|
123
|
+
border: 1px solid ${(props) => (props.isError ? colors_1.ErrorColor : colors_1.BorderColorLight)};
|
|
124
|
+
height: 46px;
|
|
125
|
+
|
|
126
|
+
.react-select__menu {
|
|
127
|
+
box-shadow: 0 8px 16px 0 rgba(33, 21, 95, 0.1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.react-select__placeholder {
|
|
131
|
+
${typography_1.MainText};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
135
|
+
height: ${(0, _4k_1.adaptiveValueCalc)(46)};
|
|
136
|
+
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
137
|
+
border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid #cfd5ea;
|
|
138
|
+
|
|
139
|
+
.react-select__menu {
|
|
140
|
+
box-shadow: 0 ${(0, _4k_1.adaptiveValueCalc)(8)} ${(0, _4k_1.adaptiveValueCalc)(16)} 0 rgba(33, 21, 95, 0.1);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
`;
|
|
144
|
+
const SubmitNewProjectForm = () => {
|
|
145
|
+
const { control, register, handleSubmit, formState: { errors }, setError, } = (0, react_hook_form_1.useForm)({
|
|
146
|
+
mode: "all",
|
|
147
|
+
});
|
|
148
|
+
const openAlert = (0, ui_1.useUiStore)((state) => state.openAlert);
|
|
149
|
+
const closeModalSidebarPortal = (0, ui_1.useUiStore)((state) => state.closeModalSidebarPortal);
|
|
150
|
+
const openModalSidebarPortal = (0, ui_1.useUiStore)((state) => state.openModalSidebarPortal);
|
|
151
|
+
const [registerNewProjectMutation, { loading }] = (0, schema_1.useRegisterNewProjectMutation)({
|
|
152
|
+
context: {
|
|
153
|
+
uri: api_1.hosts.opportunitiesHost,
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
const dataForContract = {
|
|
157
|
+
labelText: "Project contract ID",
|
|
158
|
+
name: "contract",
|
|
159
|
+
placeHolder: "Project contract ID",
|
|
160
|
+
};
|
|
161
|
+
const registerContract = register("contract", {
|
|
162
|
+
required: { message: "Project contract ID is required", value: true },
|
|
163
|
+
});
|
|
164
|
+
const errorContract = {
|
|
165
|
+
isNeedShowError: Boolean(errors?.contract),
|
|
166
|
+
message: errors?.contract && errors?.contract.message,
|
|
167
|
+
};
|
|
168
|
+
const onSubmit = async ({ contract, blockchain }) => {
|
|
169
|
+
await registerNewProjectMutation({
|
|
170
|
+
variables: {
|
|
171
|
+
input: {
|
|
172
|
+
blockchain,
|
|
173
|
+
contract,
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
onCompleted: ({ registerNewProject }) => {
|
|
177
|
+
// openAlert({
|
|
178
|
+
// type: alertVariants.success,
|
|
179
|
+
// caption: 'Project successfully submitted',
|
|
180
|
+
// });
|
|
181
|
+
closeModalSidebarPortal();
|
|
182
|
+
openModalSidebarPortal((0, jsx_runtime_1.jsx)(resultSubmitNewProjectModal_1.default, { status: registerNewProject.status, projectInfo: registerNewProject.project }));
|
|
183
|
+
},
|
|
184
|
+
onError: () => {
|
|
185
|
+
setError("contract", {
|
|
186
|
+
type: "custom",
|
|
187
|
+
message: "Provided address is not matching the token address",
|
|
188
|
+
});
|
|
189
|
+
openAlert({
|
|
190
|
+
type: type_1.alertVariants.error,
|
|
191
|
+
caption: "Project can not be registered",
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
return ((0, jsx_runtime_1.jsxs)(StyledCreateForm, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "head", children: [(0, jsx_runtime_1.jsx)("h3", { className: "tittle", children: "Submit New Project" }), (0, jsx_runtime_1.jsx)(Text_1.MainText, { color: colors_1.TextGrayColor, children: "Add your favorite project to follow up it on Ludo" })] }), (0, jsx_runtime_1.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [(0, jsx_runtime_1.jsxs)("div", { className: "content", children: [(0, jsx_runtime_1.jsx)("div", { className: "input_group", children: (0, jsx_runtime_1.jsx)(Forms_1.Input, { register: registerContract, error: errorContract, data: dataForContract }) }), (0, jsx_runtime_1.jsx)("div", { className: "input_group", children: (0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { name: "blockchain", control: control, rules: {
|
|
197
|
+
required: { message: "Blockchain is required", value: true },
|
|
198
|
+
}, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(StyledSelect, { isError: Boolean(errors.blockchain), options: getBlockchainOptions(), isLoading: false, onChangeHandler: async (fieldName, fieldValue) => field.onChange(fieldValue), name: field.name, placeholder: "Blockchain" }), errors.blockchain && (0, jsx_runtime_1.jsx)(Forms_1.BasicErrorLabel, { children: errors.blockchain.message })] })) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "btns", children: [(0, jsx_runtime_1.jsx)(MainButton_1.default, { text: "Add", type: "submit", variant: "primaryM", disabled: loading, onClick: () => null }), (0, jsx_runtime_1.jsx)(MainButton_1.default, { text: "Cancel", variant: "outline", onClick: () => {
|
|
199
|
+
closeModalSidebarPortal();
|
|
200
|
+
} })] })] })] }));
|
|
201
|
+
};
|
|
202
|
+
exports.default = SubmitNewProjectForm;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IProject, IProjectRegistrationStatus } from "@ludo.ninja/api/build/graphql_tools/__generated__/opportunitiesHost/schema";
|
|
2
|
+
declare const ResultSubmitNewProjectModal: ({ status, projectInfo, }: {
|
|
3
|
+
status: IProjectRegistrationStatus;
|
|
4
|
+
projectInfo?: Pick<IProject, "contract" | "name" | "slug" | "symbol" | "verified"> | null;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default ResultSubmitNewProjectModal;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const badge_svg_1 = __importDefault(require("../../../public/badge"));
|
|
8
|
+
const success_svg_1 = __importDefault(require("../../../public/success"));
|
|
9
|
+
const env_1 = require("../../../store/env");
|
|
10
|
+
const ui_1 = require("../../../store/ui");
|
|
11
|
+
const schema_1 = require("@ludo.ninja/api/build/graphql_tools/__generated__/opportunitiesHost/schema");
|
|
12
|
+
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
13
|
+
const ui_2 = require("@ludo.ninja/ui");
|
|
14
|
+
const ScreenWidth_1 = require("@ludo.ninja/ui/build/styles/ScreenWidth");
|
|
15
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
16
|
+
const utils_1 = require("@ludo.ninja/utils");
|
|
17
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
18
|
+
const Wrapper = styled_components_1.default.div `
|
|
19
|
+
width: 290px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 16px;
|
|
25
|
+
|
|
26
|
+
margin: 0 50px 24px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
|
|
29
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
30
|
+
width: ${(0, _4k_1.adaptiveValueCalc)(290)};
|
|
31
|
+
gap: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
32
|
+
margin: 0 ${(0, _4k_1.adaptiveValueCalc)(50)} ${(0, _4k_1.adaptiveValueCalc)(24)};
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
const ProjectExist = styled_components_1.default.div `
|
|
36
|
+
min-width: 367px;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 16px;
|
|
42
|
+
|
|
43
|
+
margin: 60px 0 56px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
|
|
46
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
47
|
+
min-width: ${(0, _4k_1.adaptiveValueCalc)(367)};
|
|
48
|
+
gap: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
49
|
+
margin: ${(0, _4k_1.adaptiveValueCalc)(60)} 0 ${(0, _4k_1.adaptiveValueCalc)(56)};
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
const ProjectTitleWrapper = styled_components_1.default.div `
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 16px;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
|
|
59
|
+
.name {
|
|
60
|
+
display: flex;
|
|
61
|
+
gap: 16px;
|
|
62
|
+
align-items: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
66
|
+
gap: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
67
|
+
|
|
68
|
+
.name {
|
|
69
|
+
gap: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
${ScreenWidth_1.mediaQuery.mobile} {
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
align-items: start;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
const ResultSubmitNewProjectModal = ({ status, projectInfo, }) => {
|
|
80
|
+
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
81
|
+
const closeModalSidebarPortal = (0, ui_1.useUiStore)((state) => state.closeModalSidebarPortal);
|
|
82
|
+
const handleProjectClick = () => {
|
|
83
|
+
if (projectInfo?.slug) {
|
|
84
|
+
window.open(`${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]}/x/${projectInfo.slug}`, "_blank");
|
|
85
|
+
closeModalSidebarPortal();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
switch (status) {
|
|
89
|
+
case schema_1.IProjectRegistrationStatus.Submitted:
|
|
90
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper, { children: [(0, jsx_runtime_1.jsx)(success_svg_1.default, {}), (0, jsx_runtime_1.jsx)(ui_2.H3, { children: "Project submitted successfully and added to the review queue" })] }));
|
|
91
|
+
case schema_1.IProjectRegistrationStatus.Exists:
|
|
92
|
+
return ((0, jsx_runtime_1.jsxs)(ProjectExist, { children: [(0, jsx_runtime_1.jsx)(ui_2.H3, { children: "This project already exists in our system" }), Boolean(projectInfo) && ((0, jsx_runtime_1.jsxs)(ProjectTitleWrapper, { onClick: handleProjectClick, children: [(0, jsx_runtime_1.jsxs)("div", { className: "name", children: [(0, jsx_runtime_1.jsx)(ui_2.H1, { color: "#6048FF", children: projectInfo?.name || (0, utils_1.shortenedText)(projectInfo?.contract) }), projectInfo?.verified && (0, jsx_runtime_1.jsx)(badge_svg_1.default, { style: { color: "#43A5FF" } })] }), (0, jsx_runtime_1.jsx)(ui_2.H2, { color: "#696F90", children: projectInfo?.symbol })] }))] }));
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
exports.default = ResultSubmitNewProjectModal;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
var BadgeIcon = function BadgeIcon(props) {
|
|
11
|
+
return /*#__PURE__*/_react["default"].createElement("svg", _extends({}, props, {
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
width: "24",
|
|
14
|
+
height: "24",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
fill: "none"
|
|
17
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
18
|
+
d: "M10.5299 1.25768C10.7927 -0.419228 13.2073 -0.419228 13.4701 1.25768C13.6698 2.53291 15.2874 2.96635 16.0981 1.96186C17.164 0.64096 19.2552 1.84831 18.6443 3.43191C18.1797 4.63618 19.3638 5.82034 20.5681 5.35574C22.1517 4.74479 23.359 6.83598 22.0381 7.90194C21.0337 8.71257 21.4671 10.3302 22.7423 10.5299C24.4192 10.7927 24.4192 13.2073 22.7423 13.4701C21.4671 13.6698 21.0337 15.2874 22.0381 16.0981C23.359 17.164 22.1517 19.2552 20.5681 18.6443C19.3638 18.1797 18.1797 19.3638 18.6443 20.5681C19.2552 22.1517 17.164 23.359 16.0981 22.0381C15.2874 21.0337 13.6698 21.4671 13.4701 22.7423C13.2073 24.4192 10.7927 24.4192 10.5299 22.7423C10.3302 21.4671 8.71257 21.0337 7.90194 22.0381C6.83598 23.359 4.74479 22.1517 5.35574 20.5681C5.82034 19.3638 4.63618 18.1797 3.43191 18.6443C1.84831 19.2552 0.64096 17.164 1.96185 16.0981C2.96635 15.2874 2.53291 13.6698 1.25768 13.4701C-0.419227 13.2073 -0.419228 10.7927 1.25768 10.5299C2.53291 10.3302 2.96635 8.71257 1.96185 7.90194C0.64096 6.83598 1.84831 4.74479 3.43191 5.35574C4.63617 5.82034 5.82034 4.63618 5.35574 3.43191C4.74479 1.84831 6.83598 0.64096 7.90194 1.96186C8.71257 2.96635 10.3302 2.53291 10.5299 1.25768Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}), /*#__PURE__*/_react["default"].createElement("g", {
|
|
21
|
+
filter: "url(#filter0_d_19396_27304)"
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
"fill-rule": "evenodd",
|
|
24
|
+
"clip-rule": "evenodd",
|
|
25
|
+
d: "M6.67275 12.0001C7.14138 11.5315 7.90117 11.5315 8.3698 12.0001L10.5879 14.117L16.3048 8.40005C16.7735 7.93142 17.5333 7.93142 18.0019 8.40005C18.4705 8.86868 18.4705 9.62848 18.0019 10.0971L11.4364 16.6626C10.9678 17.1312 10.208 17.1312 9.73938 16.6626L6.67275 13.6972C6.20412 13.2285 6.20412 12.4687 6.67275 12.0001Z",
|
|
26
|
+
fill: "white"
|
|
27
|
+
})), /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("filter", {
|
|
28
|
+
id: "filter0_d_19396_27304",
|
|
29
|
+
x: "2.32031",
|
|
30
|
+
y: "4.04858",
|
|
31
|
+
width: "20.0312",
|
|
32
|
+
height: "16.9655",
|
|
33
|
+
filterUnits: "userSpaceOnUse",
|
|
34
|
+
"color-interpolation-filters": "sRGB"
|
|
35
|
+
}, /*#__PURE__*/_react["default"].createElement("feFlood", {
|
|
36
|
+
"flood-opacity": "0",
|
|
37
|
+
result: "BackgroundImageFix"
|
|
38
|
+
}), /*#__PURE__*/_react["default"].createElement("feColorMatrix", {
|
|
39
|
+
"in": "SourceAlpha",
|
|
40
|
+
type: "matrix",
|
|
41
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
42
|
+
result: "hardAlpha"
|
|
43
|
+
}), /*#__PURE__*/_react["default"].createElement("feOffset", null), /*#__PURE__*/_react["default"].createElement("feGaussianBlur", {
|
|
44
|
+
stdDeviation: "2"
|
|
45
|
+
}), /*#__PURE__*/_react["default"].createElement("feComposite", {
|
|
46
|
+
in2: "hardAlpha",
|
|
47
|
+
operator: "out"
|
|
48
|
+
}), /*#__PURE__*/_react["default"].createElement("feColorMatrix", {
|
|
49
|
+
type: "matrix",
|
|
50
|
+
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0"
|
|
51
|
+
}), /*#__PURE__*/_react["default"].createElement("feBlend", {
|
|
52
|
+
mode: "normal",
|
|
53
|
+
in2: "BackgroundImageFix",
|
|
54
|
+
result: "effect1_dropShadow_19396_27304"
|
|
55
|
+
}), /*#__PURE__*/_react["default"].createElement("feBlend", {
|
|
56
|
+
mode: "normal",
|
|
57
|
+
"in": "SourceGraphic",
|
|
58
|
+
in2: "effect1_dropShadow_19396_27304",
|
|
59
|
+
result: "shape"
|
|
60
|
+
}))));
|
|
61
|
+
};
|
|
62
|
+
var _default = exports["default"] = BadgeIcon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
var SuccessIcon = function SuccessIcon(props) {
|
|
11
|
+
return /*#__PURE__*/_react["default"].createElement("svg", _extends({}, props, {
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
width: "48",
|
|
14
|
+
height: "48",
|
|
15
|
+
viewBox: "0 0 48 48",
|
|
16
|
+
fill: "none"
|
|
17
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
18
|
+
"fill-rule": "evenodd",
|
|
19
|
+
"clip-rule": "evenodd",
|
|
20
|
+
d: "M16.9903 21.9896C17.5761 21.4038 18.5259 21.4038 19.1117 21.9896L23.0008 25.8787L29.7183 19.1612C30.3041 18.5754 31.2538 18.5754 31.8396 19.1612C32.4254 19.747 32.4254 20.6967 31.8396 21.2825L24.0614 29.0607C23.4756 29.6465 22.5259 29.6465 21.9401 29.0607L16.9903 24.111C16.4046 23.5252 16.4046 22.5754 16.9903 21.9896Z",
|
|
21
|
+
fill: "#43E06F"
|
|
22
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
"fill-rule": "evenodd",
|
|
24
|
+
"clip-rule": "evenodd",
|
|
25
|
+
d: "M24 9.5C15.9919 9.5 9.5 15.9919 9.5 24C9.5 32.0081 15.9919 38.5 24 38.5C32.0081 38.5 38.5 32.0081 38.5 24C38.5 15.9919 32.0081 9.5 24 9.5ZM6.5 24C6.5 14.335 14.335 6.5 24 6.5C33.665 6.5 41.5 14.335 41.5 24C41.5 33.665 33.665 41.5 24 41.5C14.335 41.5 6.5 33.665 6.5 24Z",
|
|
26
|
+
fill: "#43E06F"
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
var _default = exports["default"] = SuccessIcon;
|
|
@@ -13,8 +13,6 @@ const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
|
13
13
|
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
14
14
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
15
15
|
exports.StyledModalSidebar = styled_components_1.default.div `
|
|
16
|
-
//min-height: 300px;
|
|
17
|
-
//max-width: 536px;
|
|
18
16
|
z-index: ${z_indexes_1.zIndexModal.toString()};
|
|
19
17
|
padding: 24px;
|
|
20
18
|
background-color: ${colors_1.WhiteColor};
|
|
@@ -49,7 +47,6 @@ exports.StyledModalSidebar = styled_components_1.default.div `
|
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
52
|
-
min-height: ${(0, _4k_1.adaptiveValueCalc)(300)};
|
|
53
50
|
padding: ${(0, _4k_1.adaptiveValueCalc)(24)};
|
|
54
51
|
border-radius: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
55
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludo.ninja/components",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.42",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"publish": "npm publish --access public -workspace @ludo.ninja/components"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ludo.ninja/api": "^3.0.
|
|
26
|
+
"@ludo.ninja/api": "^3.0.91",
|
|
27
27
|
"@react-three/drei": "^9.68.3",
|
|
28
28
|
"@react-three/fiber": "^8.13.0",
|
|
29
29
|
"chart.js": "^4.4.3",
|