cozy-search 0.1.0
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/LICENSE +21 -0
- package/README.md +89 -0
- package/dist/components/AssistantDesktop.d.ts +16 -0
- package/dist/components/AssistantDesktop.js +44 -0
- package/dist/components/AssistantIcon/AssistantIcon.d.ts +6 -0
- package/dist/components/AssistantIcon/AssistantIcon.js +43 -0
- package/dist/components/AssistantMobile.d.ts +2 -0
- package/dist/components/AssistantMobile.js +50 -0
- package/dist/components/AssistantProvider.d.ts +7 -0
- package/dist/components/AssistantProvider.js +174 -0
- package/dist/components/Conversations/ChatAssistantItem.d.ts +8 -0
- package/dist/components/Conversations/ChatAssistantItem.js +53 -0
- package/dist/components/Conversations/ChatConversation.d.ts +5 -0
- package/dist/components/Conversations/ChatConversation.js +110 -0
- package/dist/components/Conversations/ChatItem.d.ts +7 -0
- package/dist/components/Conversations/ChatItem.js +39 -0
- package/dist/components/Conversations/ChatItemLabel.d.ts +5 -0
- package/dist/components/Conversations/ChatItemLabel.js +29 -0
- package/dist/components/Conversations/ChatRealtimeAnswer.d.ts +5 -0
- package/dist/components/Conversations/ChatRealtimeAnswer.js +30 -0
- package/dist/components/Conversations/ChatUserItem.d.ts +7 -0
- package/dist/components/Conversations/ChatUserItem.js +41 -0
- package/dist/components/Conversations/Conversation.d.ts +4 -0
- package/dist/components/Conversations/Conversation.js +41 -0
- package/dist/components/Conversations/ConversationBar.d.ts +4 -0
- package/dist/components/Conversations/ConversationBar.js +164 -0
- package/dist/components/Conversations/Sources/Sources.d.ts +5 -0
- package/dist/components/Conversations/Sources/Sources.js +134 -0
- package/dist/components/Conversations/Sources/SourcesItem.d.ts +4 -0
- package/dist/components/Conversations/Sources/SourcesItem.js +55 -0
- package/dist/components/Conversations/Sources/styles.styl +5 -0
- package/dist/components/Conversations/styles.styl +15 -0
- package/dist/components/ResultMenu/NoResultItem.d.ts +2 -0
- package/dist/components/ResultMenu/NoResultItem.js +30 -0
- package/dist/components/ResultMenu/NotEnoughItem.d.ts +2 -0
- package/dist/components/ResultMenu/NotEnoughItem.js +30 -0
- package/dist/components/ResultMenu/ResultMenu.d.ts +6 -0
- package/dist/components/ResultMenu/ResultMenu.js +47 -0
- package/dist/components/ResultMenu/ResultMenuContent.d.ts +3 -0
- package/dist/components/ResultMenu/ResultMenuContent.js +117 -0
- package/dist/components/ResultMenu/ResultMenuItem.d.ts +12 -0
- package/dist/components/ResultMenu/ResultMenuItem.js +65 -0
- package/dist/components/ResultMenu/SuggestionItemTextHighlighted.d.ts +5 -0
- package/dist/components/ResultMenu/SuggestionItemTextHighlighted.js +100 -0
- package/dist/components/ResultMenu/SuggestionItemTextSecondary.d.ts +7 -0
- package/dist/components/ResultMenu/SuggestionItemTextSecondary.js +70 -0
- package/dist/components/ResultMenu/styles.styl +8 -0
- package/dist/components/Search/EncryptedFolderIcon.d.ts +2 -0
- package/dist/components/Search/EncryptedFolderIcon.js +34 -0
- package/dist/components/Search/SearchBar.d.ts +4 -0
- package/dist/components/Search/SearchBar.js +71 -0
- package/dist/components/Search/SearchBarDesktop.d.ts +15 -0
- package/dist/components/Search/SearchBarDesktop.js +167 -0
- package/dist/components/Search/SearchBarMobile.d.ts +6 -0
- package/dist/components/Search/SearchBarMobile.js +71 -0
- package/dist/components/Search/SearchProvider.d.ts +7 -0
- package/dist/components/Search/SearchProvider.js +81 -0
- package/dist/components/Search/SearchSubmitFab.d.ts +5 -0
- package/dist/components/Search/SearchSubmitFab.js +59 -0
- package/dist/components/Search/SuggestionsPlaceholder.d.ts +2 -0
- package/dist/components/Search/SuggestionsPlaceholder.js +55 -0
- package/dist/components/Search/getFileMimetype.d.ts +1 -0
- package/dist/components/Search/getFileMimetype.js +54 -0
- package/dist/components/Search/getIconForSearchResult.d.ts +12 -0
- package/dist/components/Search/getIconForSearchResult.js +127 -0
- package/dist/components/Search/styles.styl +7 -0
- package/dist/components/Search/useFetchResult.d.ts +4 -0
- package/dist/components/Search/useFetchResult.js +191 -0
- package/dist/components/Views/AssistantDialog.d.ts +2 -0
- package/dist/components/Views/AssistantDialog.js +79 -0
- package/dist/components/Views/SearchDialog.d.ts +2 -0
- package/dist/components/Views/SearchDialog.js +96 -0
- package/dist/components/helpers.d.ts +5 -0
- package/dist/components/helpers.js +58 -0
- package/dist/components/queries.d.ts +25 -0
- package/dist/components/queries.js +58 -0
- package/dist/components/styles.styl +18 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +39 -0
- package/dist/locales/en.json +21 -0
- package/dist/locales/fr.json +21 -0
- package/dist/locales/index.d.ts +6 -0
- package/dist/locales/index.js +53 -0
- package/dist/stylesheet.css +48 -0
- package/package.json +91 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.locales = void 0;
|
|
7
|
+
var en = {
|
|
8
|
+
assistant: {
|
|
9
|
+
search: {
|
|
10
|
+
placeholder: "Any question?",
|
|
11
|
+
send: "Send",
|
|
12
|
+
result: "Ask the assistant",
|
|
13
|
+
noItem: "No results",
|
|
14
|
+
notEnough: "Your query must contain at least 3 characters"
|
|
15
|
+
},
|
|
16
|
+
dialog: {
|
|
17
|
+
close: "Close"
|
|
18
|
+
},
|
|
19
|
+
name: "Cozy Assistant",
|
|
20
|
+
sources: "%{smart_count} source |||| %{smart_count} sources",
|
|
21
|
+
suggestions: {
|
|
22
|
+
find_file: "Search a file",
|
|
23
|
+
reimbursements: "Check my repayments",
|
|
24
|
+
reorganise_files: "Reorganise my files"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var fr = {
|
|
29
|
+
assistant: {
|
|
30
|
+
search: {
|
|
31
|
+
placeholder: "Une question\xA0?",
|
|
32
|
+
send: "Envoyer",
|
|
33
|
+
result: "Demander \xE0 l'assistant",
|
|
34
|
+
noItem: "Aucun r\xE9sultat",
|
|
35
|
+
notEnough: "Votre recherche doit contenir au moins 3 caract\xE8res"
|
|
36
|
+
},
|
|
37
|
+
dialog: {
|
|
38
|
+
close: "Fermer"
|
|
39
|
+
},
|
|
40
|
+
name: "Assistant Cozy",
|
|
41
|
+
sources: "%{smart_count} source |||| %{smart_count} sources",
|
|
42
|
+
suggestions: {
|
|
43
|
+
find_file: "Rechercher un fichier",
|
|
44
|
+
reimbursements: "V\xE9rifier mes remboursements",
|
|
45
|
+
reorganise_files: "R\xE9organiser mes fichiers"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var locales = {
|
|
50
|
+
en: en,
|
|
51
|
+
fr: fr
|
|
52
|
+
};
|
|
53
|
+
exports.locales = locales;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* imported from styles.styl */
|
|
2
|
+
|
|
3
|
+
.styles__conversationBar___2J-Us {
|
|
4
|
+
max-height: 95px;
|
|
5
|
+
min-height: 48px;
|
|
6
|
+
z-index: calc(var(--zIndex-modal) + 15);
|
|
7
|
+
}
|
|
8
|
+
@media (min-width: 48.063rem) {
|
|
9
|
+
.styles__conversationBar___2J-Us {
|
|
10
|
+
max-height: 178px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
.styles__conversationBar-input___2DfdZ {
|
|
14
|
+
max-height: 80px;
|
|
15
|
+
}
|
|
16
|
+
@media (min-width: 48.063rem) {
|
|
17
|
+
.styles__conversationBar-input___2DfdZ {
|
|
18
|
+
max-height: 155px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/* imported from styles.styl */
|
|
22
|
+
|
|
23
|
+
.styles__sourcesItem___204Zw {
|
|
24
|
+
margin-bottom: 0.25rem !important;
|
|
25
|
+
border: 1px solid var(--borderMainColor) !important;
|
|
26
|
+
border-radius: 8px !important;
|
|
27
|
+
}
|
|
28
|
+
/* imported from styles.styl */
|
|
29
|
+
|
|
30
|
+
.styles__resultMenu___o76q- {
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
max-height: 16.5rem;
|
|
33
|
+
border-radius: 0 0 28px 28px;
|
|
34
|
+
}
|
|
35
|
+
.styles__resultMenu-inner___2Lf0d {
|
|
36
|
+
max-height: 16.5rem;
|
|
37
|
+
overflow: auto;
|
|
38
|
+
}
|
|
39
|
+
/* imported from styles.styl */
|
|
40
|
+
|
|
41
|
+
.styles__searchBarDesktop--result___2bQQy {
|
|
42
|
+
border-radius: 28px 28px 0 0 !important;
|
|
43
|
+
}
|
|
44
|
+
.styles__suggestionsPlaceholder___y-vsv {
|
|
45
|
+
position: absolute;
|
|
46
|
+
opacity: 0.42;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cozy-search",
|
|
3
|
+
"description": "UI components about search bar and IA assistant",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Cozy Cloud",
|
|
7
|
+
"url": "https://github.com/cozy"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/cozy/cozy-libs/issues"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"classnames": "2.5.1",
|
|
14
|
+
"lodash": "4.17.21",
|
|
15
|
+
"mime-types": "2.1.35",
|
|
16
|
+
"react-type-animation": "3.2.0",
|
|
17
|
+
"rooks": "7.14.1"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@babel/cli": "7.16.8",
|
|
21
|
+
"@babel/core": "7.16.12",
|
|
22
|
+
"@testing-library/react": "10.4.9",
|
|
23
|
+
"@testing-library/react-hooks": "7.0.2",
|
|
24
|
+
"babel-plugin-inline-react-svg": "1.1.2",
|
|
25
|
+
"babel-plugin-module-resolver": "^4.0.0",
|
|
26
|
+
"babel-plugin-tsconfig-paths": "^1.0.3",
|
|
27
|
+
"babel-preset-cozy-app": "^2.8.1",
|
|
28
|
+
"cozy-client": "^54.0.0",
|
|
29
|
+
"cozy-device-helper": "^3.8.0",
|
|
30
|
+
"cozy-flags": "^4.7.0",
|
|
31
|
+
"cozy-intent": "^2.30.0",
|
|
32
|
+
"cozy-logger": "^1.17.0",
|
|
33
|
+
"cozy-minilog": "^3.10.0",
|
|
34
|
+
"cozy-pouch-link": "^54.0.0",
|
|
35
|
+
"cozy-realtime": "^5.6.4",
|
|
36
|
+
"cozy-ui": "^111.19.0",
|
|
37
|
+
"cross-fetch": "^4.0.0",
|
|
38
|
+
"jest": "26.6.3",
|
|
39
|
+
"react": "16.12.0",
|
|
40
|
+
"react-dom": "16.13.0",
|
|
41
|
+
"react-router-dom": "6.14.2",
|
|
42
|
+
"stylus": "^0.64.0",
|
|
43
|
+
"typescript": "5.5.2"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist"
|
|
47
|
+
],
|
|
48
|
+
"homepage": "https://github.com/cozy/cozy-libs/packages/cozy-search",
|
|
49
|
+
"keywords": [
|
|
50
|
+
"cozy",
|
|
51
|
+
"cozy-libs"
|
|
52
|
+
],
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"main": "dist/index.js",
|
|
55
|
+
"exports": {
|
|
56
|
+
".": "./dist/index.js",
|
|
57
|
+
"./dist/stylesheet.css": "./dist/stylesheet.css"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"cozy-client": ">=54.0.0",
|
|
61
|
+
"cozy-device-helper": ">=3.7.1",
|
|
62
|
+
"cozy-flags": ">=4.6.1",
|
|
63
|
+
"cozy-intent": ">=2.26.0",
|
|
64
|
+
"cozy-logger": ">=1.10.4",
|
|
65
|
+
"cozy-minilog": ">=3.3.1",
|
|
66
|
+
"cozy-pouch-link": "54.0.0",
|
|
67
|
+
"cozy-realtime": ">=5.6.4",
|
|
68
|
+
"cozy-ui": ">=111.19.0",
|
|
69
|
+
"react": ">=16.12.0",
|
|
70
|
+
"react-dom": ">=16.12.0",
|
|
71
|
+
"react-router-dom": "^6.28.0"
|
|
72
|
+
},
|
|
73
|
+
"repository": {
|
|
74
|
+
"type": "git",
|
|
75
|
+
"url": "https://github.com/cozy/cozy-libs.git",
|
|
76
|
+
"directory": "packages/cozy-search"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"build": "yarn build:clean && yarn build:types && babel --extensions .ts,.tsx,.js,.jsx --ignore '**/*.spec.tsx','**/*.spec.ts','**/*.d.ts' ./src -d ./dist --copy-files",
|
|
80
|
+
"build:clean": "rm -rf ./dist",
|
|
81
|
+
"build:types": "tsc -p tsconfig-build.json",
|
|
82
|
+
"build:watch": "yarn build --watch",
|
|
83
|
+
"prepublishOnly": "yarn build",
|
|
84
|
+
"test": "jest --config=./tests/jest.config.js --passWithNoTests",
|
|
85
|
+
"test:watch": "yarn test --watchAll",
|
|
86
|
+
"start": "yarn build:watch",
|
|
87
|
+
"lint": "cd .. && yarn eslint --ext js,jsx,ts packages/cozy-search"
|
|
88
|
+
},
|
|
89
|
+
"types": "dist/index.d.ts",
|
|
90
|
+
"gitHead": "e549fc8843a6b090ea5cf53a8695bf70a953ffce"
|
|
91
|
+
}
|