eco-vue-js 0.26.17 → 0.26.19
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/dist/components/DropdownMenu/WDropdownAdaptive.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownAdaptive.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/components/List/components/HeaderSort.vue_vue_type_script_setup_true_lang.js +1 -1
- package/docs/llms.txt +1 -1
- package/docs/recipes/list-with-fields.md +37 -23
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WDropdownAdaptive.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/WDropdownAdaptive.vue"],"names":[],"mappings":"AAOA;
|
|
1
|
+
{"version":3,"file":"WDropdownAdaptive.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/WDropdownAdaptive.vue"],"names":[],"mappings":"AAOA;AAiIA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAA;AAElD,OAAO,EAAC,KAAK,KAAK,EAAqH,MAAM,KAAK,CAAA;AAkBlJ,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QAAC,KAAK,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;KAAC,KAAK,KAAK,EAAE,CAAA;IAC/E,4HAA4H;IAC5H,MAAM,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;IACtB,oIAAoI;IACpI,OAAO,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;CACxB,CAAC;AAkIF,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/components/DropdownMenu/WDropdownAdaptive.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIsMobile } from "../../utils/mobile.js";
|
|
2
2
|
import { useOverlay, useOverlayFrame, useOverlayFrameOptions } from "../../utils/Overlay.js";
|
|
3
3
|
import OverlayRegionPart_default from "../Modal/components/OverlayRegionPart.vue.js";
|
|
4
|
-
import { computed, createBlock, defineComponent, h, markRaw, mergeProps, onMounted, openBlock, ref, resolveDynamicComponent, unref, useSlots, useTemplateRef, watch } from "vue";
|
|
4
|
+
import { computed, createBlock, defineComponent, h, markRaw, mergeProps, onBeforeUpdate, onMounted, openBlock, ref, resolveDynamicComponent, shallowRef, unref, useSlots, useTemplateRef, watch } from "vue";
|
|
5
5
|
//#region src/components/DropdownMenu/WDropdownAdaptive.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var WDropdownAdaptive_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
7
|
inheritAttrs: false,
|
|
@@ -23,6 +23,8 @@ var WDropdownAdaptive_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
23
23
|
const toggleRef = useTemplateRef("toggle");
|
|
24
24
|
const element = computed(() => props.parentElement ?? (toggleRef.value instanceof HTMLElement ? toggleRef.value : toggleRef.value?.$el));
|
|
25
25
|
const isTop = ref(false);
|
|
26
|
+
const slotsVersion = shallowRef(0);
|
|
27
|
+
onBeforeUpdate(() => slotsVersion.value++);
|
|
26
28
|
const renderContent = markRaw(defineComponent({
|
|
27
29
|
emits: ["close:modal"],
|
|
28
30
|
setup: () => {
|
|
@@ -36,7 +38,7 @@ var WDropdownAdaptive_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
36
38
|
unclickable: false
|
|
37
39
|
});
|
|
38
40
|
const renderTitle = () => h("span", { class: "inline-flex items-center gap-2" }, slots.header?.());
|
|
39
|
-
return () => [props.dialog ? h(OverlayRegionPart_default, { region: "title" }, { default: renderTitle }) : isSheet ? h(OverlayRegionPart_default, { region: "header" }, { default: renderHeader }) : null, slots.content?.()];
|
|
41
|
+
return () => (slotsVersion.value, [props.dialog ? h(OverlayRegionPart_default, { region: "title" }, { default: renderTitle }) : isSheet ? h(OverlayRegionPart_default, { region: "header" }, { default: renderHeader }) : null, slots.content?.()]);
|
|
40
42
|
}
|
|
41
43
|
}));
|
|
42
44
|
const overlay = useOverlay();
|
|
@@ -28,7 +28,7 @@ var HeaderSort_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
28
28
|
const isOpen = ref(false);
|
|
29
29
|
const canClear = computed(() => !props.disabled && props.ordering.length !== 0);
|
|
30
30
|
const isFieldRequired = (field) => {
|
|
31
|
-
return "field" in field.meta && field.meta.field
|
|
31
|
+
return "field" in field.meta && (typeof field.meta.field === "string" || typeof field.meta.field?.(props.queryParams) === "string");
|
|
32
32
|
};
|
|
33
33
|
const fieldsFlat = computed(() => {
|
|
34
34
|
const result = [];
|
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eco-vue-js
|
|
2
2
|
|
|
3
|
-
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.26.
|
|
3
|
+
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.26.19, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
|
|
4
4
|
|
|
5
5
|
Release notes, for what changed between versions: https://github.com/rsmple/eco-vue-js/releases. The docs site, with live demos: https://rsmple.github.io/eco-vue-js/
|
|
6
6
|
|
|
@@ -24,30 +24,12 @@
|
|
|
24
24
|
:default-config-map="defaultFieldConfigMapPlant"
|
|
25
25
|
config-key="w-list-docs-plant"
|
|
26
26
|
:expansion="markRaw(PlantContent)"
|
|
27
|
-
:bulk="
|
|
28
|
-
|
|
29
|
-
markRaw(WBulkPlantDry),
|
|
30
|
-
markRaw(WBulkPlantCaretaker),
|
|
31
|
-
markRaw(WBulkPlantRemove),
|
|
32
|
-
]"
|
|
33
|
-
:menu="[
|
|
34
|
-
markRaw(WMenuPlantToggle),
|
|
35
|
-
markRaw(WMenuPlantCaretaker),
|
|
36
|
-
markRaw(WMenuPlantDelete),
|
|
37
|
-
]"
|
|
27
|
+
:bulk="bulk"
|
|
28
|
+
:menu="menu"
|
|
38
29
|
selection-title="plant"
|
|
39
30
|
:select-all-text-getter="selectAllTextGetter"
|
|
40
|
-
:card-columns="
|
|
41
|
-
:card-areas="
|
|
42
|
-
['name', 'name', 'area_select'],
|
|
43
|
-
['species','species', 'area_more'],
|
|
44
|
-
['kind', 'light', 'light'],
|
|
45
|
-
['health', 'growth', 'growth'],
|
|
46
|
-
['watered', 'due', 'due'],
|
|
47
|
-
['height', 'humidity', 'humidity'],
|
|
48
|
-
['water', 'seeds', 'seeds'],
|
|
49
|
-
['caretaker', 'caretaker', 'caretaker'],
|
|
50
|
-
]"
|
|
31
|
+
:card-columns="cardColumns"
|
|
32
|
+
:card-areas="cardAreas"
|
|
51
33
|
card-class="list:h-11 card:gap-1 sm:card:p-4 sm-not:card:py-3 sm:card:w-list-rounded-xl sm:card:border sm:card:shadow-sm border-line-subtle"
|
|
52
34
|
card-wrapper-class="card:self-start"
|
|
53
35
|
min-height
|
|
@@ -74,14 +56,18 @@
|
|
|
74
56
|
</template>
|
|
75
57
|
|
|
76
58
|
<script lang="ts" setup>
|
|
59
|
+
import type {Plant} from './models/Plant'
|
|
60
|
+
|
|
77
61
|
import {markRaw} from 'vue'
|
|
78
62
|
|
|
63
|
+
import type {BulkComponent, CardAreas, GridCol, MenuComponent} from 'eco-vue-js/dist/components/List/types'
|
|
64
|
+
|
|
79
65
|
import WList from 'eco-vue-js/dist/components/List/WList.vue'
|
|
80
66
|
import WListFilter from 'eco-vue-js/dist/components/List/WListFilter.vue'
|
|
81
67
|
import WUniform from 'eco-vue-js/dist/components/Uniform/WUniform.vue'
|
|
82
68
|
|
|
83
69
|
import PlantContent from './PlantContent.vue'
|
|
84
|
-
import {plantModelApi, useQueryParamsPlants} from './api/Plant'
|
|
70
|
+
import {type QueryParamsPlants, plantModelApi, useQueryParamsPlants} from './api/Plant'
|
|
85
71
|
import WBulkPlantCaretaker from './bulk/WBulkPlantCaretaker.vue'
|
|
86
72
|
import WBulkPlantDry from './bulk/WBulkPlantDry.vue'
|
|
87
73
|
import WBulkPlantRemove from './bulk/WBulkPlantRemove.vue'
|
|
@@ -97,6 +83,34 @@ const {queryParams, updateQueryParams} = useQueryParamsPlants.useQueryParamsLoca
|
|
|
97
83
|
|
|
98
84
|
const selectAllTextGetter = (isUnselect: boolean, count: number) => `${ isUnselect ? 'Unselect' : 'Select' } all ${ count } plants`
|
|
99
85
|
</script>
|
|
86
|
+
|
|
87
|
+
<script lang="ts">
|
|
88
|
+
const bulk: BulkComponent<QueryParamsPlants>[] = [
|
|
89
|
+
markRaw(WBulkPlantWatered),
|
|
90
|
+
markRaw(WBulkPlantDry),
|
|
91
|
+
markRaw(WBulkPlantCaretaker),
|
|
92
|
+
markRaw(WBulkPlantRemove),
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
const menu: MenuComponent<Plant>[] = [
|
|
96
|
+
markRaw(WMenuPlantToggle),
|
|
97
|
+
markRaw(WMenuPlantCaretaker),
|
|
98
|
+
markRaw(WMenuPlantDelete),
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
const cardColumns = ['2fr', '1fr', 'auto'] as const satisfies GridCol[]
|
|
102
|
+
|
|
103
|
+
const cardAreas: CardAreas<typeof listFieldsPlant, typeof cardColumns['length']> = [
|
|
104
|
+
['name', 'name', 'area_select'],
|
|
105
|
+
['species', 'species', 'area_more'],
|
|
106
|
+
['kind', 'light', 'light'],
|
|
107
|
+
['health', 'growth', 'growth'],
|
|
108
|
+
['watered', 'due', 'due'],
|
|
109
|
+
['height', 'humidity', 'humidity'],
|
|
110
|
+
['water', 'seeds', 'seeds'],
|
|
111
|
+
['caretaker', 'caretaker', 'caretaker'],
|
|
112
|
+
]
|
|
113
|
+
</script>
|
|
100
114
|
```
|
|
101
115
|
|
|
102
116
|
Try picking a kind from the pinned chip, adding a filter, sorting by a few columns from the sort menu, resizing Name, hiding columns from the header settings, switching to cards, expanding a row, using the `⋯` menu, and selecting a few rows for the bulk actions above the list. The data is in memory here, behind the same model API a real endpoint would use.
|