@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 ADDED
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
package/README.md CHANGED
@@ -1,40 +1,41 @@
1
- # v-filters
1
+ # tabs
2
2
 
3
- ## Project setup
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
- npm install @phoenix-cg/v-filters
30
+
31
+ ### Run Unit Tests with [Vitest](https://vitest.dev/)
32
+
33
+ ```sh
34
+ npm run test:unit
6
35
  ```
7
36
 
8
- ## Props
9
-
10
- | Props | Description | Default value |
11
- |--------------------|----------------------------------------------------------------------------------------------------------------------------------|----------------|
12
- | componentsMap | [Object], required. Object with components name mapping to field types | none |
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
+ ```
Binary file
@@ -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}