eco-vue-js 0.14.2 → 0.14.4
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/Button/WButtonDropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/FilePicker/WFilePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/List/WListHeaderItem.vue.d.ts.map +1 -1
- package/dist/components/List/WListHeaderItem.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/components/List/components/ListToolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/List/use/useListConfig.d.ts +1 -2
- package/dist/components/List/use/useListConfig.d.ts.map +1 -1
- package/dist/components/List/use/useListConfig.js +16 -14
- package/dist/components/Select/WSelectAsyncList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
- package/tailwind-base/css/default.css +0 -20
- package/tailwind-base/plugins/internal-classes.ts +4 -4
|
@@ -68,7 +68,7 @@ var WButtonDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
68
68
|
text: __props.tooltipText
|
|
69
69
|
}, null, 8, ["text"])) : createCommentVNode("", true)])]),
|
|
70
70
|
content: withCtx(() => [createVNode(WClickOutside_default, {
|
|
71
|
-
class: "bg-default dark:bg-default-dark
|
|
71
|
+
class: "bg-default dark:bg-default-dark my-1 max-h-[inherit] w-full overflow-y-auto overflow-x-hidden overscroll-contain rounded-xl shadow-md dark:border dark:border-solid dark:border-gray-800",
|
|
72
72
|
onClick: close
|
|
73
73
|
}, {
|
|
74
74
|
default: withCtx(() => [renderSlot(_ctx.$slots, "content", { close })]),
|
|
@@ -29,7 +29,7 @@ var _hoisted_7 = {
|
|
|
29
29
|
key: 3,
|
|
30
30
|
class: "flex h-full items-center justify-center"
|
|
31
31
|
};
|
|
32
|
-
var _hoisted_8 = { class: "
|
|
32
|
+
var _hoisted_8 = { class: "flex items-center gap-6 overflow-x-auto" };
|
|
33
33
|
var _hoisted_9 = {
|
|
34
34
|
key: 0,
|
|
35
35
|
class: "text-negative dark:text-negative-dark absolute right-0 text-xs font-normal"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WListHeaderItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListHeaderItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WListHeaderItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListHeaderItem.vue"],"names":[],"mappings":"AAuDA;AAwIA,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,eAAe,CAAA;AAKnD,QAAA,MAAM,YAAY,GAAK,KAAK,EAC3B,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WA0PO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;gBAxP9C,MAAM;eACP,KAAK;kBACF,SAAS,CAAC,KAAK,CAAC,EAAE;mBACjB,OAAO;sBACJ,OAAO;oBACT,MAAM;oBACN,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;kBACpC,OAAO;;;;;KAiPwE,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;kBAVG,CAAC,KAAK,IAAiB,KAAK,GAAG;;;YApOvC,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,YAAY,GAAG,IAAI;YACnB,iBAAiB,SAAS,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI;;EAgPrD,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -29,6 +29,7 @@ var WListHeaderItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
29
29
|
setup(__props, { emit: __emit }) {
|
|
30
30
|
const props = __props;
|
|
31
31
|
const emit = __emit;
|
|
32
|
+
const allowSort = computed(() => !props.disabled && !!props.field);
|
|
32
33
|
const containerRef = useTemplateRef("container");
|
|
33
34
|
const index = computed(() => props.ordering.findIndex((item) => item.field === props.field));
|
|
34
35
|
const setOrdering = () => {
|
|
@@ -69,15 +70,15 @@ var WListHeaderItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
69
70
|
style: [widthStyleInner.value, __props.styleValue],
|
|
70
71
|
"onUpdate:width": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:width", $event))
|
|
71
72
|
}), {
|
|
72
|
-
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(
|
|
73
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(allowSort.value ? "button" : "div"), {
|
|
73
74
|
class: normalizeClass(["group flex size-full gap-2 overflow-clip", {
|
|
74
|
-
"cursor-pointer":
|
|
75
|
+
"cursor-pointer": allowSort.value,
|
|
75
76
|
[__props.itemClass ?? ""]: true,
|
|
76
77
|
"items-center whitespace-nowrap font-semibold": !__props.itemClass
|
|
77
78
|
}]),
|
|
78
|
-
onClick: _cache[0] || (_cache[0] = ($event) =>
|
|
79
|
+
onClick: _cache[0] || (_cache[0] = ($event) => allowSort.value && setOrdering())
|
|
79
80
|
}, {
|
|
80
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(
|
|
81
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(allowSort.value ? "group-hover:underline" : void 0) }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), allowSort.value ? (openBlock(), createBlock(Transition, {
|
|
81
82
|
key: 0,
|
|
82
83
|
"enter-active-class": "transition-opacity",
|
|
83
84
|
"leave-active-class": "transition-opacity",
|
|
@@ -237,7 +237,7 @@ var ListToolbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
237
237
|
title: typeof field.meta.title === "string" ? field.meta.title : field.meta.title(__props.queryParams),
|
|
238
238
|
field: typeof field.meta.field === "string" ? field.meta.field : field.meta.field?.(__props.queryParams),
|
|
239
239
|
ordering: __props.ordering,
|
|
240
|
-
disabled: __props.noOrdering
|
|
240
|
+
disabled: __props.noOrdering,
|
|
241
241
|
"allow-resize": field.meta.allowResize,
|
|
242
242
|
"item-class": field.meta.cssClassHeader,
|
|
243
243
|
"style-value": __props.card ? { gridArea: field.meta.label } : {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
2
1
|
import { ListMode } from '../../../utils/utils';
|
|
3
2
|
import { FieldConfig, FieldConfigMap, ListConfig, ListField, ListFields } from '../types';
|
|
4
3
|
export declare const listModeList: ListMode[];
|
|
@@ -6,7 +5,7 @@ export declare const listModeIconMap: Record<ListMode, SVGComponent>;
|
|
|
6
5
|
export declare const listModeLabelMap: Record<ListMode, string>;
|
|
7
6
|
export declare const filterFields: <F extends ListFields<any, any>>(fields: F, method: (field: ListField<unknown>) => boolean) => F;
|
|
8
7
|
export declare const getFirstFieldLabel: <F extends ListFields<any, any>[number]>(field: F) => string;
|
|
9
|
-
export declare const useListConfig: <Fields extends ListFields<any, any>>(key:
|
|
8
|
+
export declare const useListConfig: <Fields extends ListFields<any, any>>(key: () => string, fields: () => Fields, defaultConfigMap: () => FieldConfigMap<Fields>, defailtMode: () => ListMode, disable?: boolean) => {
|
|
10
9
|
listConfig: import('vue').ComputedRef<ListConfig<Fields>>;
|
|
11
10
|
fieldConfigMap: import('vue').WritableComputedRef<Record<string, FieldConfig>, Record<string, FieldConfig>>;
|
|
12
11
|
isGrid: import('vue').ComputedRef<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useListConfig.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/use/useListConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useListConfig.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/use/useListConfig.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AAEtC,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAC,MAAM,UAAU,CAAA;AAEhH,eAAO,MAAM,YAAY,YAGxB,CAAA;AAUD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,CAG1D,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAGrD,CAAA;AAsED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,OAAO,KAAG,CAUxH,CAAA;AAGD,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,UAAU,CAAC,GAAG,EAAE,G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AE,WAAW,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAU3J,CAAA;AAGD,eAAO,MAAM,mBAAmB,GAAI,MAAM,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,MAAM,EAAE,gBAAgB,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAoB3J,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,gBAAgB,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAG,MAEpF,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { ListMode } from "../../../utils/utils.js";
|
|
|
2
2
|
import { useIsMobile } from "../../../utils/mobile.js";
|
|
3
3
|
import IconGrid_default from "../../../assets/icons/IconGrid.js";
|
|
4
4
|
import IconList_default from "../../../assets/icons/IconList.js";
|
|
5
|
-
import { computed,
|
|
5
|
+
import { computed, markRaw, ref, watch } from "vue";
|
|
6
6
|
//#region src/components/List/use/useListConfig.ts
|
|
7
7
|
var listModeList = [ListMode.TABLE, ListMode.GRID];
|
|
8
8
|
var isListMode = (value) => {
|
|
@@ -84,8 +84,8 @@ var getFirstFieldLabel = (field) => {
|
|
|
84
84
|
};
|
|
85
85
|
var useListConfig = (key, fields, defaultConfigMap, defailtMode, disable) => {
|
|
86
86
|
const { isMobile } = useIsMobile();
|
|
87
|
-
const value = ref(parseListConfig(disable ? void 0 : getListConfig(
|
|
88
|
-
const hasSaved = ref(disable ? false : localStorage.getItem(
|
|
87
|
+
const value = ref(parseListConfig(disable ? void 0 : getListConfig(key()), fields(), defaultConfigMap(), defailtMode()));
|
|
88
|
+
const hasSaved = ref(disable ? false : localStorage.getItem(key()) !== null);
|
|
89
89
|
const listConfig = computed(() => value.value);
|
|
90
90
|
const fieldConfigMap = computed({
|
|
91
91
|
get: () => value.value.fields,
|
|
@@ -97,27 +97,29 @@ var useListConfig = (key, fields, defaultConfigMap, defailtMode, disable) => {
|
|
|
97
97
|
const isGrid = computed(() => isMobile.value || value.value.mode === ListMode.GRID);
|
|
98
98
|
const reset = () => {
|
|
99
99
|
if (disable) return;
|
|
100
|
-
value.value = parseListConfig(void 0,
|
|
100
|
+
value.value = parseListConfig(void 0, fields(), defaultConfigMap(), defailtMode());
|
|
101
101
|
hasSaved.value = false;
|
|
102
|
-
localStorage.removeItem(
|
|
102
|
+
localStorage.removeItem(key());
|
|
103
103
|
};
|
|
104
104
|
const save = () => {
|
|
105
105
|
if (disable) return;
|
|
106
|
-
localStorage.setItem(
|
|
106
|
+
localStorage.setItem(key(), JSON.stringify(value.value));
|
|
107
107
|
hasSaved.value = true;
|
|
108
108
|
};
|
|
109
109
|
const updateMode = (mode) => {
|
|
110
110
|
value.value.mode = mode;
|
|
111
111
|
save();
|
|
112
112
|
};
|
|
113
|
-
if (!disable
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
if (!disable) {
|
|
114
|
+
watch(key, (newKey) => {
|
|
115
|
+
value.value = parseListConfig(getListConfig(newKey), fields(), defaultConfigMap(), defailtMode());
|
|
116
|
+
hasSaved.value = localStorage.getItem(newKey) !== null;
|
|
117
|
+
});
|
|
118
|
+
watch(defaultConfigMap, (newValue) => {
|
|
119
|
+
value.value = parseListConfig(getListConfig(key()), fields(), newValue, defailtMode());
|
|
120
|
+
hasSaved.value = localStorage.getItem(key()) !== null;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
121
123
|
return {
|
|
122
124
|
listConfig,
|
|
123
125
|
fieldConfigMap,
|
|
@@ -52,7 +52,7 @@ var WSelectAsyncList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
52
52
|
class: "w-skeleton-rounded-2xl w-skeleton-h-sm w-skeleton-w-full"
|
|
53
53
|
})) : (openBlock(), createBlock(WInfiniteListScrollingElement_default, {
|
|
54
54
|
key: 2,
|
|
55
|
-
class: "
|
|
55
|
+
class: "sm-not:border-y h-96 overflow-y-auto border-solid border-gray-300 sm:rounded-2xl sm:border dark:border-gray-700"
|
|
56
56
|
}, {
|
|
57
57
|
default: withCtx(() => [createVNode(SelectAsyncList_default, {
|
|
58
58
|
"model-value": __props.modelValue,
|
package/package.json
CHANGED
|
@@ -93,26 +93,6 @@
|
|
|
93
93
|
scrollbar-width: none;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
@utility overflow-y-overlay {
|
|
97
|
-
@supports (overflow: overlay) {
|
|
98
|
-
overflow-y: overlay;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@supports not (overflow: overlay) {
|
|
102
|
-
overflow-y: auto;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@utility overflow-x-overlay {
|
|
107
|
-
@supports (overflow: overlay) {
|
|
108
|
-
overflow-x: overlay;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@supports not (overflow: overlay) {
|
|
112
|
-
overflow-x: auto;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
96
|
@custom-variant dark (.dark &:not(:is(.light *)));
|
|
117
97
|
|
|
118
98
|
@custom-variant supports-backdrop (@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)));
|
|
@@ -85,10 +85,10 @@ const pluginDefault = plugin(function ({addBase, addUtilities, theme}) {
|
|
|
85
85
|
color: theme('colors.gray-300'),
|
|
86
86
|
'--resizer-bg': theme('colors.default'),
|
|
87
87
|
'background-image': 'linear-gradient(135deg, currentColor 10%, var(--resizer-bg) 10%, var(--resizer-bg) 50%, currentColor 50%, currentColor 60%, var(--resizer-bg) 60%, var(--resizer-bg) 100%)',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
},
|
|
89
|
+
'.dark *:not(:is(.light *))::-webkit-resizer': {
|
|
90
|
+
color: theme('colors.gray-700'),
|
|
91
|
+
'--resizer-bg': theme('colors.default-dark'),
|
|
92
92
|
},
|
|
93
93
|
'*:focus-visible': {
|
|
94
94
|
outline: 'none',
|