eco-vue-js 0.8.32 → 0.8.34
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.js +8 -6
- package/dist/components/List/WList.vue.d.ts +1 -1
- package/dist/components/List/WList.vue.js +3 -3
- package/dist/components/List/WListHeader.vue.js +1 -1
- package/dist/components/List/components/ListCardFieldNested.vue.js +1 -1
- package/dist/components/List/use/useFieldConfigMap.d.ts.map +1 -1
- package/dist/components/List/use/useFieldConfigMap.js +2 -0
- package/dist/components/Skeleton/WSkeleton.vue.js +1 -1
- package/package.json +1 -1
- package/tailwind-base/plugins/default.cjs +35 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"InfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPages.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"InfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPages.vue"],"names":[],"mappings":"yBA4TiB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,eACvE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA8kBxD,mBAAmB,CAAC;;;;;oBA1kBd,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;qBACnC,WAAW;yBACP,MAAM;wBACP,OAAO;2BACJ,OAAO;eACnB,OAAO;gBACN,OAAO;qBACF,OAAO;qBACP,MAAM;2BACA,OAAO,GAAG,IAAI;oBACrB,MAAM;u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EAAE,OAAO,CAAA;YAClB,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;SACd,KAAK,IAAI;;;YA1KN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;;;;;YAgiBH,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxlBvE,wBAwlB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -128,7 +128,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
128
128
|
if (pages.value.length === 1 && pages.value[0] === 1) return;
|
129
129
|
resetPage();
|
130
130
|
});
|
131
|
-
watch(count, (value) => emit("update:count", value), { immediate: true });
|
132
131
|
watch(pagesCount, (value) => {
|
133
132
|
if (pages.value[pages.value.length - 1] > value) {
|
134
133
|
const newPages = pages.value.filter((page) => page <= value);
|
@@ -184,15 +183,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
184
183
|
"reverse-selection": _ctx.reverseSelection,
|
185
184
|
"allow-page-selection": _ctx.allowPageSelection,
|
186
185
|
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:selected", $event)),
|
187
|
-
"onUpdate:count":
|
186
|
+
"onUpdate:count": _cache[2] || (_cache[2] = ($event) => {
|
187
|
+
updateCount($event);
|
188
|
+
_ctx.$emit("update:count", $event);
|
189
|
+
}),
|
188
190
|
"onUpdate:pagesCount": updatePagesCount,
|
189
|
-
"onUpdate:nextPage": _cache[
|
190
|
-
"onUpdate:previousPage": _cache[
|
191
|
+
"onUpdate:nextPage": _cache[3] || (_cache[3] = ($event) => updateNextPage($event)),
|
192
|
+
"onUpdate:previousPage": _cache[4] || (_cache[4] = ($event) => updatePreviousPage($event)),
|
191
193
|
"onUpdate:scroll": updateScroll,
|
192
|
-
"onUpdateFromHeader:scroll": _cache[
|
194
|
+
"onUpdateFromHeader:scroll": _cache[5] || (_cache[5] = ($event) => _ctx.headerTop > 0 && nextTick(() => updateScroll(_ctx.headerTop))),
|
193
195
|
"onRemove:page": removePage,
|
194
196
|
onRefetch: ($event) => unref(refetchNextPages)(index),
|
195
|
-
onFetched: _cache[
|
197
|
+
onFetched: _cache[6] || (_cache[6] = ($event) => isResettingPage.value = false)
|
196
198
|
}, {
|
197
199
|
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last, page: itemPage, index: itemIndex }) => [
|
198
200
|
renderSlot(_ctx.$slots, "default", {
|
@@ -40,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
40
|
setup(__props) {
|
41
41
|
const isMobile = getIsMobile();
|
42
42
|
const props = __props;
|
43
|
-
const listCount = ref(0);
|
43
|
+
const listCount = ref(void 0);
|
44
44
|
const selectionCount = ref(0);
|
45
45
|
const fieldsVisible = computed(() => filterFields(props.fields, (field) => field.visibleGetter?.(props.queryParams) ?? true));
|
46
46
|
const { fieldConfigMap, hasSaved, reset } = useFieldConfigMap(toRef(props, "configKey"), fieldsVisible, toRef(props, "defaultConfigMap"));
|
@@ -101,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
101
101
|
return openBlock(), createBlock(_sfc_main$1, {
|
102
102
|
"use-query-fn": _ctx.useQueryFn,
|
103
103
|
"query-params": _ctx.queryParams,
|
104
|
-
"skeleton-length": _ctx.count ?? listCount.value,
|
104
|
+
"skeleton-length": _ctx.count ?? listCount.value ?? unref(PAGE_LENGTH),
|
105
105
|
"header-margin": unref(isMobile) ? 0 : 24,
|
106
106
|
"hide-page-title": "",
|
107
107
|
"allow-select": allowSelect.value,
|
@@ -161,7 +161,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
161
161
|
class: "sm-not:hidden",
|
162
162
|
"query-params": _ctx.queryParams,
|
163
163
|
"allow-select": allowSelect.value,
|
164
|
-
"tooltip-text": _ctx.selectAllTextGetter(selectAllValue !== true, _ctx.count ?? listCount.value),
|
164
|
+
"tooltip-text": _ctx.selectAllTextGetter(selectAllValue !== true, _ctx.count ?? listCount.value ?? 0),
|
165
165
|
count: _ctx.count ?? listCount.value,
|
166
166
|
selection: selectAllValue,
|
167
167
|
"onToggle:selection": _cache[5] || (_cache[5] = ($event) => $event ? unref(setSelectedReverse)([]) : unref(setSelected)([]))
|
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
27
|
"width-4": !_ctx.allowSelect
|
28
28
|
}])
|
29
29
|
}, [
|
30
|
-
_ctx.allowSelect && _ctx.selection !== void 0 && _ctx.count !== 0 ? (openBlock(), createBlock(_sfc_main$1, {
|
30
|
+
_ctx.allowSelect && _ctx.selection !== void 0 && _ctx.count !== 0 && _ctx.count !== void 0 ? (openBlock(), createBlock(_sfc_main$1, {
|
31
31
|
key: 0,
|
32
32
|
disabled: _ctx.disabled,
|
33
33
|
"model-value": _ctx.selection,
|
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
28
|
}), {
|
29
29
|
default: withCtx(() => [
|
30
30
|
createVNode(_sfc_main$1, {
|
31
|
-
items: "keyArray" in field ? _ctx.item[field.keyArray] : field.getterArray(_ctx.item)
|
31
|
+
items: _ctx.skeleton ? [_ctx.item] : "keyArray" in field ? _ctx.item[field.keyArray] : field.getterArray(_ctx.item)
|
32
32
|
}, {
|
33
33
|
default: withCtx(({ inner, index, last, first }) => [
|
34
34
|
(openBlock(), createBlock(resolveDynamicComponent(field.componentItem ?? _sfc_main$2), mergeProps({ ref_for: true }, field.componentItem ? { item: _ctx.item, skeleton: _ctx.skeleton, mobile: _ctx.mobile, index, last, first } : void 0), {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFieldConfigMap.d.ts","sourceRoot":"","sources":["../../../../src/components/List/use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eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAU,QAAQ,CAAC,MAAM,CAAC,oBAAoB,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;;;;CAoCzK,CAAA"}
|
@@ -71,10 +71,12 @@ const useFieldConfigMap = (key, fields, defaultConfigMap) => {
|
|
71
71
|
if (isRef(key)) {
|
72
72
|
watch(key, (newKey) => {
|
73
73
|
value.value = parseFieldConfigMap(getFieldConfigMap(unref(newKey)), unref(fields), unref(defaultConfigMap));
|
74
|
+
hasSaved.value = localStorage.getItem(unref(key)) !== null;
|
74
75
|
});
|
75
76
|
}
|
76
77
|
if (isRef(defaultConfigMap)) watch(defaultConfigMap, (newValue) => {
|
77
78
|
value.value = parseFieldConfigMap(getFieldConfigMap(unref(key)), unref(fields), newValue);
|
79
|
+
hasSaved.value = localStorage.getItem(unref(key)) !== null;
|
78
80
|
});
|
79
81
|
return {
|
80
82
|
fieldConfigMap,
|
@@ -6,7 +6,7 @@ const _sfc_main = {};
|
|
6
6
|
function _sfc_render(_ctx, _cache) {
|
7
7
|
return (openBlock(), createElementBlock("div", {
|
8
8
|
class: "bg-primary-light dark:bg-primary-darkest w-skeleton before:animate-ticker",
|
9
|
-
style: normalizeStyle({'--skeleton-width': (Math.round(Math.random() * 40) + 40) + '%'})
|
9
|
+
style: normalizeStyle({'--skeleton-width-internal': (Math.round(Math.random() * 40) + 40) + '%'})
|
10
10
|
}, " ", 4))
|
11
11
|
}
|
12
12
|
const WSkeleton = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
|
package/package.json
CHANGED
@@ -427,11 +427,12 @@ module.exports = plugin(function ({matchUtilities, addVariant, addUtilities, add
|
|
427
427
|
|
428
428
|
'.w-skeleton': {
|
429
429
|
'position': 'relative',
|
430
|
-
'width': 'var(--skeleton-width,70%)',
|
430
|
+
'width': 'var(--skeleton-width,var(--skeleton-width-internal,70%))',
|
431
|
+
'height': 'var(--skeleton-height)',
|
431
432
|
'border-radius': 'var(--skeleton-rounded,0.5rem)',
|
432
433
|
'overflow': 'hidden',
|
433
434
|
'cursor': 'progress',
|
434
|
-
'&:before': {
|
435
|
+
'&:not(.w-skeleton-static):before': {
|
435
436
|
'content': '""',
|
436
437
|
'position': 'absolute',
|
437
438
|
'top': '0',
|
@@ -445,6 +446,12 @@ module.exports = plugin(function ({matchUtilities, addVariant, addUtilities, add
|
|
445
446
|
},
|
446
447
|
},
|
447
448
|
},
|
449
|
+
'.w-skeleton-static': {
|
450
|
+
'& .w-skeleton:before, &.w-skeleton:before': {
|
451
|
+
'display': 'none',
|
452
|
+
'animation': 'none',
|
453
|
+
},
|
454
|
+
},
|
448
455
|
})
|
449
456
|
|
450
457
|
matchUtilities(
|
@@ -459,4 +466,30 @@ module.exports = plugin(function ({matchUtilities, addVariant, addUtilities, add
|
|
459
466
|
values: theme('borderRadius'),
|
460
467
|
},
|
461
468
|
)
|
469
|
+
|
470
|
+
matchUtilities(
|
471
|
+
{
|
472
|
+
'w-skeleton-w': (value) => {
|
473
|
+
return {
|
474
|
+
'--skeleton-width': value,
|
475
|
+
}
|
476
|
+
},
|
477
|
+
},
|
478
|
+
{
|
479
|
+
values: theme('width'),
|
480
|
+
},
|
481
|
+
)
|
482
|
+
|
483
|
+
matchUtilities(
|
484
|
+
{
|
485
|
+
'w-skeleton-h': (value) => {
|
486
|
+
return {
|
487
|
+
'--skeleton-height': value,
|
488
|
+
}
|
489
|
+
},
|
490
|
+
},
|
491
|
+
{
|
492
|
+
values: theme('height'),
|
493
|
+
},
|
494
|
+
)
|
462
495
|
})
|