@mongodb-js/compass-query-history 8.24.0 → 8.26.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -21
- package/dist/browser.js +2 -0
- package/dist/browser.js.LICENSE.txt +14 -0
- package/dist/index.css +190 -0
- package/dist/index.html +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.LICENSE.txt +198 -0
- package/package.json +58 -100
- package/.babelrc.js +0 -24
- package/.browserslistrc +0 -1
- package/.depcheckrc +0 -18
- package/lib/index.js +0 -14
package/README.md
CHANGED
@@ -9,29 +9,18 @@ This plugin keeps track of recently run queries and any queries that are saved a
|
|
9
9
|
method "onQueryChanged". Each query passed to the component gets made into a
|
10
10
|
Query model, and first saved as a RecentQuery within the RecentQueryCollection.
|
11
11
|
The RecentListStore contains the RecentQueryCollection, which saves the queries
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
to disk so that they can be reloaded after Compass is closed and then opened
|
13
|
+
again. When a user clicks 'favorite' on a recent query, the RecentQuery is
|
14
|
+
converted to a FavoriteQuery and is saved in the FavoriteQueryCollection.
|
15
|
+
The FavoriteQueryCollection is kept in the FavoriteListStore.
|
16
16
|
|
17
17
|
## Features
|
18
18
|
|
19
|
-
#### Electron
|
20
|
-
|
21
|
-
Because the default view is "collapsed", running in Electron will not show anything
|
22
|
-
initially. If you want to view queries in Electron, you should change the default
|
23
|
-
`collapsed` value to be false.
|
24
|
-
|
25
|
-
#### Enzyme
|
26
|
-
|
27
|
-
The test environment is configured to test components with [Enzyme][enzyme] (including full `mount` mode through [jsdom][jsdom]) and [enzyme-chai][enzyme-chai]. See the test folder for examples. Run `npm test` to execute the test suite.
|
28
|
-
|
29
19
|
#### Directory Structure
|
30
20
|
|
31
21
|
For completeness, below is a list of directories present in this module:
|
32
22
|
|
33
|
-
- `
|
34
|
-
- `lib` compiled version of your components (plain javascript instead of `jsx`) and styles (`css` instead of `less`).
|
23
|
+
- `dist` compiled version of the plugin
|
35
24
|
- `src` components, actions and stores source code, as well as style files.
|
36
25
|
- Components
|
37
26
|
- `favorite-componet` - the wrapper around `QueryComponent` that supplies interactions for favorite queries (copy, delete).
|
@@ -69,11 +58,6 @@ For completeness, below is a list of directories present in this module:
|
|
69
58
|
- `cancelSave` - the user has pressed 'cancel' on the currently being saved query.
|
70
59
|
- `runQuery` - the user has clicked on the query card and wants to populate the query bar with the contents of this saved query. This action is listened to by Compass.
|
71
60
|
- `namespaceChanged` - the namespace has changed so new queries will be saved with the new namespace and the queries being shown should be limited to the current namespace.
|
72
|
-
- `test`
|
73
|
-
|
74
61
|
|
75
62
|
[npm_img]: https://img.shields.io/npm/v/@mongodb-js/compass-query-history.svg?style=flat-square
|
76
63
|
[npm_url]: https://www.npmjs.org/package/@mongodb-js/compass-query-history
|
77
|
-
[enzyme]: http://airbnb.io/enzyme/
|
78
|
-
[enzyme-chai]: https://github.com/producthunt/chai-enzyme
|
79
|
-
[jsdom]: https://github.com/tmpvar/jsdom
|