@phoenix-cg/v-filters 0.2.3 → 0.3.0-beta.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/.gitattributes +1 -0
- package/README.md +37 -36
- package/dist/favicon.ico +0 -0
- package/dist/v-filters.css +1 -1
- package/dist/v-filters.es.js +734 -0
- package/dist/v-filters.umd.js +1 -5841
- package/index.html +13 -0
- package/package.json +25 -36
- package/src/App.vue +17 -19
- package/src/assets/base.css +72 -0
- package/src/assets/main.css +21 -0
- package/src/components/InputStub.vue +12 -0
- package/src/components/VField.vue +51 -0
- package/src/components/VFilters.vue +253 -249
- package/src/components/componentsMap.js +3 -0
- package/src/export.js +1 -1
- package/src/main.js +4 -6
- package/vite.config.js +33 -0
- package/.browserslistrc +0 -3
- package/.eslintrc.js +0 -26
- package/babel.config.js +0 -3
- package/dist/demo.html +0 -10
- package/dist/v-filters.common.js +0 -5831
- package/dist/v-filters.common.js.map +0 -1
- package/dist/v-filters.umd.js.map +0 -1
- package/dist/v-filters.umd.min.js +0 -2
- package/dist/v-filters.umd.min.js.map +0 -1
- package/jest.config.js +0 -3
- package/postcss.config.js +0 -25
- package/public/index.html +0 -17
- package/src/assets/logo.png +0 -0
- package/tests/unit/example.spec.js +0 -12
- package/vue.config.js +0 -7
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
package/README.md
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# tabs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
|
8
|
+
|
|
9
|
+
## Customize configuration
|
|
10
|
+
|
|
11
|
+
See [Vite Configuration Reference](https://vite.dev/config/).
|
|
12
|
+
|
|
13
|
+
## Project Setup
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Compile and Hot-Reload for Development
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm run dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Compile and Minify for Production
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm run build
|
|
4
29
|
```
|
|
5
|
-
|
|
30
|
+
|
|
31
|
+
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm run test:unit
|
|
6
35
|
```
|
|
7
36
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| fieldComponentName | [String] Component for field rendering. Should has "title" prop and a slot for field component | v-filter-field |
|
|
14
|
-
| fields | [Array], required. Array with fields | none |
|
|
15
|
-
| showWords | [Array] Array with words to put before found result count. First element should be in future tense and a last one in past tense. | [] |
|
|
16
|
-
| notFoundTitle | [String] Will be shown in button if count is 0 | '' |
|
|
17
|
-
| declensionWords | [Array] Array of words to put after found result count. | [] |
|
|
18
|
-
| count | [Number] Found count | 0 |
|
|
19
|
-
| showParams | [Boolean] If true current filters state will be reflected in page query params. | true |
|
|
20
|
-
| isResultShown | [Boolean] If true action button title will be constructed in past tense | false |
|
|
21
|
-
| humanLink | [String] Human link feature | '' |
|
|
22
|
-
| editedOutside | [Boolean] If true reset button will be shown even if the v-filters itself is untouched. | false |
|
|
23
|
-
| immediate | [Boolean] If true action button will not be shown and show-result event will fire immediately after change | false |
|
|
24
|
-
|
|
25
|
-
## Slots
|
|
26
|
-
|
|
27
|
-
| Slot | Description | Scope |
|
|
28
|
-
|---------------|-----------------------------------------|--------------------------------------------------------|
|
|
29
|
-
| before-fields | Slot to place anything before fields | none |
|
|
30
|
-
| after-fields | Slot to place anything after fields | none |
|
|
31
|
-
| actions | Slot for actions. Displays after fields | { showResult, resetFilters, count, immediate, edited } |
|
|
32
|
-
| actions-after | Slot for actions. Displays after fields | { showResult, resetFilters, count, immediate, edited } |
|
|
33
|
-
|
|
34
|
-
## Events
|
|
35
|
-
|
|
36
|
-
| Event | Description | Payload |
|
|
37
|
-
|---------------|---------------------|-----------------------------------------|
|
|
38
|
-
| request-count | Request count event | flatFilters: { ..., name: [1, 2] ,... } |
|
|
39
|
-
| show-result | Show result event | flatFilters: { ..., name: [1, 2],... } |
|
|
40
|
-
| reset-filters | Reset filters event | none |
|
|
37
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm run lint
|
|
41
|
+
```
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/v-filters.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.v-filters_fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-gap:30px 38px}
|
|
1
|
+
.v-filters_fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-gap:30px 38px}
|