@gooddata/sdk-ui-semantic-search 10.8.0-alpha.0 → 10.8.0-alpha.10
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/esm/ResultsItem.d.ts +6 -5
- package/esm/ResultsItem.d.ts.map +1 -1
- package/esm/ResultsItem.js +34 -9
- package/esm/ResultsItem.js.map +1 -1
- package/esm/{SearchResults.d.ts → SearchResultsDropdownList.d.ts} +6 -6
- package/esm/SearchResultsDropdownList.d.ts.map +1 -0
- package/esm/SearchResultsDropdownList.js +16 -0
- package/esm/SearchResultsDropdownList.js.map +1 -0
- package/esm/SemanticSearch.d.ts +28 -0
- package/esm/SemanticSearch.d.ts.map +1 -1
- package/esm/SemanticSearch.js +17 -14
- package/esm/SemanticSearch.js.map +1 -1
- package/esm/hooks/index.d.ts +1 -0
- package/esm/hooks/index.d.ts.map +1 -1
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/useListSelector.d.ts +7 -0
- package/esm/hooks/useListSelector.d.ts.map +1 -0
- package/esm/hooks/useListSelector.js +42 -0
- package/esm/hooks/useListSelector.js.map +1 -0
- package/esm/hooks/useSemanticSearch.d.ts +7 -3
- package/esm/hooks/useSemanticSearch.d.ts.map +1 -1
- package/esm/hooks/useSemanticSearch.js +15 -5
- package/esm/hooks/useSemanticSearch.js.map +1 -1
- package/esm/internal/HeaderSearchButton.d.ts +8 -0
- package/esm/internal/HeaderSearchButton.d.ts.map +1 -0
- package/esm/internal/HeaderSearchButton.js +37 -0
- package/esm/internal/HeaderSearchButton.js.map +1 -0
- package/esm/internal/SearchOverlay.d.ts +41 -0
- package/esm/internal/SearchOverlay.d.ts.map +1 -0
- package/esm/internal/SearchOverlay.js +64 -0
- package/esm/internal/SearchOverlay.js.map +1 -0
- package/esm/internal/SearchResultsList.d.ts +26 -0
- package/esm/internal/SearchResultsList.d.ts.map +1 -0
- package/esm/internal/SearchResultsList.js +16 -0
- package/esm/internal/SearchResultsList.js.map +1 -0
- package/esm/internal.d.ts +8 -0
- package/esm/internal.d.ts.map +1 -0
- package/esm/internal.js +9 -0
- package/esm/internal.js.map +1 -0
- package/esm/sdk-ui-semantic-search.d.ts +42 -2
- package/esm/utils/getUIPath.d.ts +14 -0
- package/esm/utils/getUIPath.d.ts.map +1 -0
- package/esm/utils/getUIPath.js +37 -0
- package/esm/utils/getUIPath.js.map +1 -0
- package/package.json +9 -7
- package/styles/css/internal.css +158 -0
- package/styles/css/internal.css.map +1 -0
- package/styles/css/main.css +43 -3
- package/styles/css/main.css.map +1 -1
- package/styles/scss/internal.scss +102 -0
- package/styles/scss/main.scss +50 -4
- package/esm/SearchResults.d.ts.map +0 -1
- package/esm/SearchResults.js +0 -43
- package/esm/SearchResults.js.map +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Input, LoadingMask, useDebouncedState } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { useSemanticSearch } from "../hooks/index.js";
|
|
5
|
+
import { SearchResultsList } from "./SearchResultsList.js";
|
|
6
|
+
import { FormattedMessage } from "react-intl";
|
|
7
|
+
/**
|
|
8
|
+
* A time in milliseconds to wait before sending a search request after the user stops typing.
|
|
9
|
+
*/
|
|
10
|
+
const DEBOUNCE = 300;
|
|
11
|
+
/**
|
|
12
|
+
* A height of the loading mask.
|
|
13
|
+
*/
|
|
14
|
+
const LOADING_HEIGHT = 100;
|
|
15
|
+
/**
|
|
16
|
+
* A width of the search drop-down.
|
|
17
|
+
*/
|
|
18
|
+
const SEARCH_OVERLAY_WIDTH = 440;
|
|
19
|
+
/**
|
|
20
|
+
* A component that allows users to search for insights, metrics, attributes, and other objects using semantic search.
|
|
21
|
+
* The internal version is meant to be used in an overlay inside the Header.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export const SearchOverlay = ({ onSelect, backend, workspace, objectTypes, deepSearch, limit = 6, intl, }) => {
|
|
25
|
+
// Input value handling
|
|
26
|
+
const [value, setValue, searchTerm] = useDebouncedState("", DEBOUNCE);
|
|
27
|
+
// Search results
|
|
28
|
+
const { searchStatus, searchResults, searchError } = useSemanticSearch({
|
|
29
|
+
backend,
|
|
30
|
+
workspace,
|
|
31
|
+
searchTerm,
|
|
32
|
+
objectTypes,
|
|
33
|
+
deepSearch,
|
|
34
|
+
limit,
|
|
35
|
+
});
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
if (searchStatus === "error") {
|
|
38
|
+
// Report error to the console
|
|
39
|
+
// UI will display a generic error message
|
|
40
|
+
console.error(searchError);
|
|
41
|
+
}
|
|
42
|
+
}, [searchStatus, searchError]);
|
|
43
|
+
return (React.createElement("div", { className: "gd-semantic-search__overlay" },
|
|
44
|
+
React.createElement(Input, { className: "gd-semantic-search__overlay-input", autofocus: true, placeholder: intl.formatMessage({ id: "semantic-search.placeholder" }), isSearch: true, clearOnEsc: true, value: value, onChange: (e) => setValue(String(e)) }),
|
|
45
|
+
(() => {
|
|
46
|
+
switch (searchStatus) {
|
|
47
|
+
case "loading":
|
|
48
|
+
return React.createElement(LoadingMask, { width: SEARCH_OVERLAY_WIDTH, height: LOADING_HEIGHT });
|
|
49
|
+
case "error":
|
|
50
|
+
return (React.createElement("div", { className: "gd-semantic-search__overlay-error" },
|
|
51
|
+
React.createElement(FormattedMessage, { id: "semantic-search.error" })));
|
|
52
|
+
case "success":
|
|
53
|
+
if (!searchResults.length) {
|
|
54
|
+
return (React.createElement("div", { className: "gd-semantic-search__overlay-no-results" },
|
|
55
|
+
React.createElement(FormattedMessage, { id: "semantic-search.no-results", values: { query: searchTerm } })));
|
|
56
|
+
}
|
|
57
|
+
return (React.createElement(SearchResultsList, { searchResults: searchResults, width: SEARCH_OVERLAY_WIDTH, onSelect: onSelect }));
|
|
58
|
+
case "idle":
|
|
59
|
+
default:
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
})()));
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=SearchOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchOverlay.js","sourceRoot":"","sources":["../../src/internal/SearchOverlay.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAyB,MAAM,YAAY,CAAC;AAErE;;GAEG;AACH,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB;;GAEG;AACH,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B;;GAEG;AACH,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAiCjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EACxD,QAAQ,EACR,OAAO,EACP,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,GAAG,CAAC,EACT,IAAI,GACP,EAAE,EAAE;IACD,uBAAuB;IACvB,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,iBAAiB,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAEtE,iBAAiB;IACjB,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,iBAAiB,CAAC;QACnE,OAAO;QACP,SAAS;QACT,UAAU;QACV,WAAW;QACX,UAAU;QACV,KAAK;KACR,CAAC,CAAC;IAEH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,YAAY,KAAK,OAAO,EAAE,CAAC;YAC3B,8BAA8B;YAC9B,0CAA0C;YAC1C,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC/B,CAAC;IACL,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IAEhC,OAAO,CACH,6BAAK,SAAS,EAAC,6BAA6B;QACxC,oBAAC,KAAK,IACF,SAAS,EAAC,mCAAmC,EAC7C,SAAS,QACT,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,6BAA6B,EAAE,CAAC,EACtE,QAAQ,QACR,UAAU,QACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GACtC;QACD,CAAC,GAAG,EAAE;YACH,QAAQ,YAAY,EAAE,CAAC;gBACnB,KAAK,SAAS;oBACV,OAAO,oBAAC,WAAW,IAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,cAAc,GAAI,CAAC;gBAChF,KAAK,OAAO;oBACR,OAAO,CACH,6BAAK,SAAS,EAAC,mCAAmC;wBAC9C,oBAAC,gBAAgB,IAAC,EAAE,EAAC,uBAAuB,GAAG,CAC7C,CACT,CAAC;gBACN,KAAK,SAAS;oBACV,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;wBACxB,OAAO,CACH,6BAAK,SAAS,EAAC,wCAAwC;4BACnD,oBAAC,gBAAgB,IACb,EAAE,EAAC,4BAA4B,EAC/B,MAAM,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,GAC/B,CACA,CACT,CAAC;oBACN,CAAC;oBAED,OAAO,CACH,oBAAC,iBAAiB,IACd,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,oBAAoB,EAC3B,QAAQ,EAAE,QAAQ,GACpB,CACL,CAAC;gBACN,KAAK,MAAM,CAAC;gBACZ;oBACI,OAAO,IAAI,CAAC;YACpB,CAAC;QACL,CAAC,CAAC,EAAE,CACF,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ISemanticSearchResultItemWithUrl } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Search results props.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export type SearchResultsListProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Search result items.
|
|
10
|
+
*/
|
|
11
|
+
searchResults: ISemanticSearchResultItemWithUrl[];
|
|
12
|
+
/**
|
|
13
|
+
* Width of the list.
|
|
14
|
+
*/
|
|
15
|
+
width: number;
|
|
16
|
+
/**
|
|
17
|
+
* Callback for item selection.
|
|
18
|
+
*/
|
|
19
|
+
onSelect: (item: ISemanticSearchResultItemWithUrl) => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A dropdown list with the search results.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const SearchResultsList: React.FC<SearchResultsListProps>;
|
|
26
|
+
//# sourceMappingURL=SearchResultsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResultsList.d.ts","sourceRoot":"","sources":["../../src/internal/SearchResultsList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAKvE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC;;OAEG;IACH,aAAa,EAAE,gCAAgC,EAAE,CAAC;IAClD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,gCAAgC,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuB9D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { List } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { ITEM_HEIGHT, ResultsItem } from "../ResultsItem.js";
|
|
5
|
+
import { useListSelector } from "../hooks/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* A dropdown list with the search results.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export const SearchResultsList = ({ searchResults, width, onSelect }) => {
|
|
11
|
+
const [selected, setSelected] = useListSelector(searchResults, onSelect);
|
|
12
|
+
return (React.createElement(List, { width: width, height: ITEM_HEIGHT * searchResults.length, itemHeight: ITEM_HEIGHT, renderItem: ({ item, width, height }) => {
|
|
13
|
+
return (React.createElement(ResultsItem, { onHover: setSelected, onSelect: onSelect, active: item === selected, item: item, width: width, height: height }));
|
|
14
|
+
}, items: searchResults }));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=SearchResultsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResultsList.js","sourceRoot":"","sources":["../../src/internal/SearchResultsList.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqBpD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtG,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAEzE,OAAO,CACH,oBAAC,IAAI,IACD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,WAAW,GAAG,aAAa,CAAC,MAAM,EAC1C,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;YACpC,OAAO,CACH,oBAAC,WAAW,IACR,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,IAAI,KAAK,QAAQ,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GAChB,CACL,CAAC;QACN,CAAC,EACD,KAAK,EAAE,aAAa,GACtB,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This package provides React hooks and components for semantic search integration with GoodData apps,
|
|
3
|
+
* like AD, KD, data modeler, home ui etc.
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export * from "./internal/HeaderSearchButton.js";
|
|
8
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,cAAc,kCAAkC,CAAC"}
|
package/esm/internal.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
/**
|
|
3
|
+
* This package provides React hooks and components for semantic search integration with GoodData apps,
|
|
4
|
+
* like AD, KD, data modeler, home ui etc.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export * from "./internal/HeaderSearchButton.js";
|
|
9
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC;;;;;GAKG;AAEH,cAAc,kCAAkC,CAAC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { GenAISemanticSearchType } from '@gooddata/sdk-model';
|
|
8
8
|
import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
|
|
9
9
|
import { ISemanticSearchResultItem } from '@gooddata/sdk-model';
|
|
10
|
+
import { ISemanticSearchResultItemWithUrl } from '@gooddata/sdk-model';
|
|
10
11
|
import * as React_2 from 'react';
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -20,14 +21,42 @@ export declare const SemanticSearch: React_2.FC<SemanticSearchProps>;
|
|
|
20
21
|
* @alpha
|
|
21
22
|
*/
|
|
22
23
|
export declare type SemanticSearchCoreProps = {
|
|
24
|
+
/**
|
|
25
|
+
* An analytical backend to use for the search. Can be omitted and taken from context.
|
|
26
|
+
*/
|
|
23
27
|
backend?: IAnalyticalBackend;
|
|
28
|
+
/**
|
|
29
|
+
* A workspace to search in. Can be omitted and taken from context.
|
|
30
|
+
*/
|
|
24
31
|
workspace?: string;
|
|
32
|
+
/**
|
|
33
|
+
* A function called when the user selects an item from the search results.
|
|
34
|
+
*/
|
|
25
35
|
onSelect: (item: ISemanticSearchResultItem) => void;
|
|
36
|
+
/**
|
|
37
|
+
* A function called when an error occurs during the search.
|
|
38
|
+
*/
|
|
26
39
|
onError?: (errorMessage: string) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Additional CSS class for the component.
|
|
42
|
+
*/
|
|
27
43
|
className?: string;
|
|
44
|
+
/**
|
|
45
|
+
* A list of object types to search for.
|
|
46
|
+
*/
|
|
28
47
|
objectTypes?: GenAISemanticSearchType[];
|
|
48
|
+
/**
|
|
49
|
+
* A flag to enable deep search, i.e. search dashboard by their contents.
|
|
50
|
+
*/
|
|
29
51
|
deepSearch?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* A limit of search results to return.
|
|
54
|
+
*/
|
|
30
55
|
limit?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Placeholder text for the search input.
|
|
58
|
+
*/
|
|
59
|
+
placeholder?: string;
|
|
31
60
|
};
|
|
32
61
|
|
|
33
62
|
/**
|
|
@@ -71,8 +100,12 @@ export declare type SemanticSearchHookInput = {
|
|
|
71
100
|
export declare type SemanticSearchInputResult = {
|
|
72
101
|
/**
|
|
73
102
|
* Flag indicating whether the search is in progress.
|
|
103
|
+
* - idle - means we did not search yet
|
|
104
|
+
* - loading - means we are currently searching
|
|
105
|
+
* - error - means the search failed
|
|
106
|
+
* - success - means the search succeeded
|
|
74
107
|
*/
|
|
75
|
-
|
|
108
|
+
searchStatus: "idle" | "loading" | "error" | "success";
|
|
76
109
|
/**
|
|
77
110
|
* Error message if the search failed.
|
|
78
111
|
*/
|
|
@@ -80,7 +113,7 @@ export declare type SemanticSearchInputResult = {
|
|
|
80
113
|
/**
|
|
81
114
|
* The search results.
|
|
82
115
|
*/
|
|
83
|
-
searchResults:
|
|
116
|
+
searchResults: ISemanticSearchResultItemWithUrl[];
|
|
84
117
|
};
|
|
85
118
|
|
|
86
119
|
/**
|
|
@@ -91,6 +124,13 @@ export declare type SemanticSearchProps = SemanticSearchCoreProps & {
|
|
|
91
124
|
locale?: string;
|
|
92
125
|
};
|
|
93
126
|
|
|
127
|
+
/**
|
|
128
|
+
* This hook provides keyboard navigation for a list of items. It listens to ArrowUp, ArrowDown and Enter keys and
|
|
129
|
+
* calls the onSelect callback when Enter is pressed.
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
export declare const useListSelector: <T>(items: T[], onSelect: (item: T) => void) => [T, (item: T) => void];
|
|
133
|
+
|
|
94
134
|
/**
|
|
95
135
|
* Hook to perform semantic search.
|
|
96
136
|
* Makes the request to server and returns the search results.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of objects that we can navigate to in UI.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type UIPathObjectTypes = "dashboard" | "visualization" | "metric" | "dataset" | "date" | "fact" | "attribute" | "label";
|
|
6
|
+
/**
|
|
7
|
+
* Get the UI path for the given object type, object ID, and workspace ID.
|
|
8
|
+
* TODO - this logic should live in gdc-ui repo, would require refactoring of the sdk-ui-semantic-search
|
|
9
|
+
* - ui components need URL right away to be able to render native anchor tags
|
|
10
|
+
* - gdc-ui would need to inject the URL between the data is loaded and the render
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare const getUIPath: (objectType: UIPathObjectTypes, objectId: string, workspaceId: string) => string;
|
|
14
|
+
//# sourceMappingURL=getUIPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUIPath.d.ts","sourceRoot":"","sources":["../../src/utils/getUIPath.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACvB,WAAW,GACX,eAAe,GACf,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,WAAW,GACX,OAAO,CAAC;AAEd;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAgB,iBAAiB,YAAY,MAAM,eAAe,MAAM,KAAG,MAqBhG,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
/**
|
|
3
|
+
* Get the UI path for the given object type, object ID, and workspace ID.
|
|
4
|
+
* TODO - this logic should live in gdc-ui repo, would require refactoring of the sdk-ui-semantic-search
|
|
5
|
+
* - ui components need URL right away to be able to render native anchor tags
|
|
6
|
+
* - gdc-ui would need to inject the URL between the data is loaded and the render
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export const getUIPath = (objectType, objectId, workspaceId) => {
|
|
10
|
+
switch (objectType) {
|
|
11
|
+
case "dashboard":
|
|
12
|
+
return `/dashboards/#/workspace/${workspaceId}/dashboard/${objectId}`;
|
|
13
|
+
case "visualization":
|
|
14
|
+
return `/analyze/#/${workspaceId}/${objectId}/edit`;
|
|
15
|
+
case "metric":
|
|
16
|
+
return `/metrics/#/${workspaceId}/metric/${objectId}`;
|
|
17
|
+
case "dataset":
|
|
18
|
+
return `/modeler/#/${workspaceId}`; // TODO - deep links
|
|
19
|
+
case "attribute":
|
|
20
|
+
return `/modeler/#/${workspaceId}`; // TODO - deep links
|
|
21
|
+
case "label":
|
|
22
|
+
return `/modeler/#/${workspaceId}`; // TODO - deep links
|
|
23
|
+
case "fact":
|
|
24
|
+
return `/modeler/#/${workspaceId}`; // TODO - deep links
|
|
25
|
+
case "date":
|
|
26
|
+
return `/modeler/#/${workspaceId}`; // TODO - deep links
|
|
27
|
+
default:
|
|
28
|
+
return exhaustiveCheck(objectType);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Ensure exhaustive switch to prevent missing cases.
|
|
33
|
+
*/
|
|
34
|
+
const exhaustiveCheck = (x) => {
|
|
35
|
+
throw new Error(`Unknown item type ${x}`);
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=getUIPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUIPath.js","sourceRoot":"","sources":["../../src/utils/getUIPath.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAgBhC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,UAA6B,EAAE,QAAgB,EAAE,WAAmB,EAAU,EAAE;IACtG,QAAQ,UAAU,EAAE,CAAC;QACjB,KAAK,WAAW;YACZ,OAAO,2BAA2B,WAAW,cAAc,QAAQ,EAAE,CAAC;QAC1E,KAAK,eAAe;YAChB,OAAO,cAAc,WAAW,IAAI,QAAQ,OAAO,CAAC;QACxD,KAAK,QAAQ;YACT,OAAO,cAAc,WAAW,WAAW,QAAQ,EAAE,CAAC;QAC1D,KAAK,SAAS;YACV,OAAO,cAAc,WAAW,EAAE,CAAC,CAAC,oBAAoB;QAC5D,KAAK,WAAW;YACZ,OAAO,cAAc,WAAW,EAAE,CAAC,CAAC,oBAAoB;QAC5D,KAAK,OAAO;YACR,OAAO,cAAc,WAAW,EAAE,CAAC,CAAC,oBAAoB;QAC5D,KAAK,MAAM;YACP,OAAO,cAAc,WAAW,EAAE,CAAC,CAAC,oBAAoB;QAC5D,KAAK,MAAM;YACP,OAAO,cAAc,WAAW,EAAE,CAAC,CAAC,oBAAoB;QAC5D;YACI,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAAG,CAAC,CAAQ,EAAS,EAAE;IACxC,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-semantic-search",
|
|
3
|
-
"version": "10.8.0-alpha.
|
|
3
|
+
"version": "10.8.0-alpha.10",
|
|
4
4
|
"description": "GoodData SDK TypeScript & React skeleton",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"browser": "./esm/index.js",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": "./esm/index.js",
|
|
16
|
-
"./styles/css/*": "./styles/css/*"
|
|
16
|
+
"./styles/css/*": "./styles/css/*",
|
|
17
|
+
"./internal": "./esm/internal.js"
|
|
17
18
|
},
|
|
18
19
|
"types": "./esm/index.d.ts",
|
|
19
20
|
"sideEffects": [
|
|
@@ -36,10 +37,11 @@
|
|
|
36
37
|
"react-intl": "^6.4.1",
|
|
37
38
|
"tslib": "^2.5.0",
|
|
38
39
|
"classnames": "^2.3.1",
|
|
39
|
-
"@gooddata/sdk-
|
|
40
|
-
"@gooddata/sdk-
|
|
41
|
-
"@gooddata/sdk-ui-
|
|
42
|
-
"@gooddata/sdk-
|
|
40
|
+
"@gooddata/sdk-ui-kit": "10.8.0-alpha.10",
|
|
41
|
+
"@gooddata/sdk-model": "10.8.0-alpha.10",
|
|
42
|
+
"@gooddata/sdk-ui-theme-provider": "10.8.0-alpha.10",
|
|
43
|
+
"@gooddata/sdk-ui": "10.8.0-alpha.10",
|
|
44
|
+
"@gooddata/sdk-backend-spi": "10.8.0-alpha.10"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
47
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
"stylelint": "^13.8.0",
|
|
82
84
|
"stylelint-checkstyle-formatter": "^0.1.2",
|
|
83
85
|
"stylelint-config-prettier": "^8.0.2",
|
|
84
|
-
"@gooddata/sdk-backend-mockingbird": "10.8.0-alpha.
|
|
86
|
+
"@gooddata/sdk-backend-mockingbird": "10.8.0-alpha.10"
|
|
85
87
|
},
|
|
86
88
|
"scripts": {
|
|
87
89
|
"clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/* allow vendor prefixes and disable max length */
|
|
2
|
+
/* allow vendor prefixes and disable max length */
|
|
3
|
+
.gd-semantic-search__results-item {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
align-items: center;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
gap: 1em;
|
|
9
|
+
padding: 0 1em;
|
|
10
|
+
height: 45px;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
}
|
|
13
|
+
.gd-semantic-search__results-item--active {
|
|
14
|
+
color: var(--gd-palette-complementary-9, #000);
|
|
15
|
+
background: var(--gd-palette-complementary-2, #ebeff4);
|
|
16
|
+
}
|
|
17
|
+
.gd-semantic-search__results-item__icon {
|
|
18
|
+
width: 16px;
|
|
19
|
+
height: 16px;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
.gd-semantic-search__results-item__icon > svg {
|
|
24
|
+
width: 16px;
|
|
25
|
+
height: 16px;
|
|
26
|
+
}
|
|
27
|
+
.gd-semantic-search__results-item__text {
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
line-height: 1.4rem;
|
|
32
|
+
color: var(--gd-palette-complementary-8, #464e56);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
38
|
+
.gd-semantic-search__results-item__details {
|
|
39
|
+
display: none;
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
align-items: center;
|
|
43
|
+
}
|
|
44
|
+
.gd-semantic-search__results-item__details__contents {
|
|
45
|
+
width: 190px;
|
|
46
|
+
padding: 5px;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
}
|
|
51
|
+
.gd-semantic-search__results-item__details__contents > * {
|
|
52
|
+
margin-bottom: 15px;
|
|
53
|
+
}
|
|
54
|
+
.gd-semantic-search__results-item__details__contents h3 {
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
margin: 0 0 10px;
|
|
57
|
+
}
|
|
58
|
+
.gd-semantic-search__results-item__details__contents .gd-ellipsis-text-content {
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
.gd-semantic-search__results-item__details__contents h4 {
|
|
62
|
+
margin: 0;
|
|
63
|
+
text-transform: uppercase;
|
|
64
|
+
font-size: 10px;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
color: var(--gd-palette-complementary-6, #94a1ad);
|
|
67
|
+
}
|
|
68
|
+
.gd-semantic-search__results-item--active .gd-semantic-search__results-item__details {
|
|
69
|
+
display: unset;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.gd-semantic-search__bubble.bubble.bubble-light {
|
|
73
|
+
background: var(--gd-palette-complementary-0, #fff);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.gd-semantic-search__overlay {
|
|
77
|
+
width: 440px;
|
|
78
|
+
background: var(--gd-palette-complementary-0, #fff);
|
|
79
|
+
margin: 10px 0;
|
|
80
|
+
}
|
|
81
|
+
.gd-semantic-search__overlay-input {
|
|
82
|
+
margin: 0 10px;
|
|
83
|
+
}
|
|
84
|
+
.gd-semantic-search__overlay-error, .gd-semantic-search__overlay-no-results {
|
|
85
|
+
height: 100px;
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
color: var(--gd-palette-complementary-6, #94a1ad);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.gd-header-search {
|
|
93
|
+
height: 100%;
|
|
94
|
+
margin: 0;
|
|
95
|
+
line-height: 42px;
|
|
96
|
+
opacity: 0.8;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
transition: all 0.2s;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
font-weight: 400;
|
|
101
|
+
padding: 0 13px 2px;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
}
|
|
106
|
+
.gd-header-search:hover, .gd-header-search.is-open {
|
|
107
|
+
opacity: 1;
|
|
108
|
+
}
|
|
109
|
+
.gd-header-search.is-open {
|
|
110
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.gd-header-search {
|
|
114
|
+
position: relative;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
padding-right: 34px;
|
|
117
|
+
}
|
|
118
|
+
.gd-header-search:hover {
|
|
119
|
+
background: rgba(255, 255, 255, 0.3);
|
|
120
|
+
}
|
|
121
|
+
.gd-header-search::after {
|
|
122
|
+
content: "\e612";
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 0;
|
|
125
|
+
right: 11px;
|
|
126
|
+
margin-left: 11px;
|
|
127
|
+
width: 12px;
|
|
128
|
+
opacity: 0.5;
|
|
129
|
+
text-align: center;
|
|
130
|
+
font-family: "Indigo", sans-serif;
|
|
131
|
+
font-size: 18px;
|
|
132
|
+
font-weight: 700;
|
|
133
|
+
}
|
|
134
|
+
.gd-header-search.is-open::after {
|
|
135
|
+
content: "\e613";
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.gd-icon-header-search {
|
|
139
|
+
vertical-align: middle;
|
|
140
|
+
opacity: 0.8;
|
|
141
|
+
margin-right: 6px;
|
|
142
|
+
}
|
|
143
|
+
.gd-icon-header-search::before {
|
|
144
|
+
content: "\e62b";
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.gd-header-search-dropdown {
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
}
|
|
150
|
+
.gd-header-search-dropdown .gd-list {
|
|
151
|
+
min-width: 210px;
|
|
152
|
+
}
|
|
153
|
+
.gd-header-search-dropdown .gd-list .gd-list-item {
|
|
154
|
+
font-family: gdcustomfont, avenir, "Helvetica Neue", arial, sans-serif;
|
|
155
|
+
font-weight: 400;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/*# sourceMappingURL=internal.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../node_modules/@gooddata/sdk-ui-kit/styles/scss/mixins.scss","../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss","../scss/internal.scss"],"names":[],"mappings":"AA0HA;AA4DA;AC/KI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;EASd;;AAEA;EACI,OCgBI;EDfJ,YCwFY;;ADrFhB;EAEI,OADY;EAEZ,QAFY;EAGZ;EACA;;AAEA;EAEI,OARQ;EASR,QATQ;;AAahB;EACI;EACA;EACA;EACA;EACA,OCbI;EDcJ;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA,OC1DG;;AD+Df;EACI;;;AAKZ;EACI,YC5Ea;;;ACRb;EACI;EACA,YDMS;ECLT;;AAGJ;EACI;;AAGJ;EAEI;EACA;EACA;EACA;EACA,ODFe;;;ACMvB;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EH+EA;EACA;EACA,eAHwB;;AG1ExB;EAEI;;AAGJ;EACI;;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aDyBS;ECxBT;EACA;;AAGJ;EACI;;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;AAEA;EACI;;AAEA;EACI,aDHM;ECIN","file":"internal.css"}
|
package/styles/css/main.css
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
gap: 1em;
|
|
7
7
|
padding: 0 1em;
|
|
8
8
|
height: 45px;
|
|
9
|
+
text-decoration: none;
|
|
9
10
|
}
|
|
10
|
-
.gd-semantic-search__results-item--
|
|
11
|
+
.gd-semantic-search__results-item--active {
|
|
11
12
|
color: var(--gd-palette-complementary-9, #000);
|
|
12
13
|
background: var(--gd-palette-complementary-2, #ebeff4);
|
|
13
14
|
}
|
|
@@ -24,11 +25,50 @@
|
|
|
24
25
|
.gd-semantic-search__results-item__text {
|
|
25
26
|
flex-grow: 1;
|
|
26
27
|
min-width: 0;
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
line-height: 1.4rem;
|
|
30
|
+
color: var(--gd-palette-complementary-8, #464e56);
|
|
31
|
+
font-size: 14px;
|
|
29
32
|
overflow: hidden;
|
|
30
33
|
text-overflow: ellipsis;
|
|
31
34
|
white-space: nowrap;
|
|
32
35
|
}
|
|
36
|
+
.gd-semantic-search__results-item__details {
|
|
37
|
+
display: none;
|
|
38
|
+
width: 16px;
|
|
39
|
+
height: 16px;
|
|
40
|
+
align-items: center;
|
|
41
|
+
}
|
|
42
|
+
.gd-semantic-search__results-item__details__contents {
|
|
43
|
+
width: 190px;
|
|
44
|
+
padding: 5px;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
}
|
|
49
|
+
.gd-semantic-search__results-item__details__contents > * {
|
|
50
|
+
margin-bottom: 15px;
|
|
51
|
+
}
|
|
52
|
+
.gd-semantic-search__results-item__details__contents h3 {
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
margin: 0 0 10px;
|
|
55
|
+
}
|
|
56
|
+
.gd-semantic-search__results-item__details__contents .gd-ellipsis-text-content {
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
}
|
|
59
|
+
.gd-semantic-search__results-item__details__contents h4 {
|
|
60
|
+
margin: 0;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
font-size: 10px;
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
color: var(--gd-palette-complementary-6, #94a1ad);
|
|
65
|
+
}
|
|
66
|
+
.gd-semantic-search__results-item--active .gd-semantic-search__results-item__details {
|
|
67
|
+
display: unset;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.gd-semantic-search__bubble.bubble.bubble-light {
|
|
71
|
+
background: var(--gd-palette-complementary-0, #fff);
|
|
72
|
+
}
|
|
33
73
|
|
|
34
74
|
/*# sourceMappingURL=main.css.map */
|
package/styles/css/main.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss"],"names":[],"mappings":"AAOI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss"],"names":[],"mappings":"AAOI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;EASd;;AAEA;EACI,OCgBI;EDfJ,YCwFY;;ADrFhB;EAEI,OADY;EAEZ,QAFY;EAGZ;EACA;;AAEA;EAEI,OARQ;EASR,QATQ;;AAahB;EACI;EACA;EACA;EACA;EACA,OCbI;EDcJ;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA,OC1DG;;AD+Df;EACI;;;AAKZ;EACI,YC5Ea","file":"main.css"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
|
|
3
|
+
@use "sass:color";
|
|
4
|
+
@use "sass:meta";
|
|
5
|
+
@use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
|
|
6
|
+
@use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
|
|
7
|
+
@use "./main.scss";
|
|
8
|
+
|
|
9
|
+
.gd-semantic-search {
|
|
10
|
+
&__overlay {
|
|
11
|
+
width: 440px;
|
|
12
|
+
background: kit-variables.$gd-color-white;
|
|
13
|
+
margin: 10px 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__overlay-input {
|
|
17
|
+
margin: 0 10px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__overlay-error,
|
|
21
|
+
&__overlay-no-results {
|
|
22
|
+
height: 100px;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
color: kit-variables.$gd-color-state-blank;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.gd-header-search {
|
|
31
|
+
height: 100%;
|
|
32
|
+
margin: 0;
|
|
33
|
+
line-height: 42px;
|
|
34
|
+
opacity: 0.8;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition: all 0.2s;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
padding: 0 13px 2px;
|
|
40
|
+
|
|
41
|
+
@include kit-mixins.text-overflow;
|
|
42
|
+
|
|
43
|
+
&:hover,
|
|
44
|
+
&.is-open {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.is-open {
|
|
49
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.gd-header-search {
|
|
54
|
+
position: relative;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
padding-right: 34px;
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
background: rgba(255, 255, 255, 0.3);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::after {
|
|
63
|
+
content: "\e612";
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0;
|
|
66
|
+
right: 11px;
|
|
67
|
+
margin-left: 11px;
|
|
68
|
+
width: 12px;
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
text-align: center;
|
|
71
|
+
font-family: kit-variables.$gd-font-indigo;
|
|
72
|
+
font-size: 18px;
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.is-open::after {
|
|
77
|
+
content: "\e613";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.gd-icon-header-search {
|
|
82
|
+
vertical-align: middle;
|
|
83
|
+
opacity: 0.8;
|
|
84
|
+
margin-right: 6px;
|
|
85
|
+
|
|
86
|
+
&::before {
|
|
87
|
+
content: "\e62b";
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.gd-header-search-dropdown {
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
|
|
94
|
+
.gd-list {
|
|
95
|
+
min-width: 210px;
|
|
96
|
+
|
|
97
|
+
.gd-list-item {
|
|
98
|
+
font-family: kit-variables.$gd-font-primary;
|
|
99
|
+
font-weight: 400;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|