eco-vue-js 0.10.29 → 0.10.31
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/WButtonSelectionAction.vue.js +1 -1
- package/dist/components/Expansion/WExpansion.vue.js +2 -2
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +2 -5
- package/dist/components/HeaderBar/WHeaderBar.vue.js +4 -4
- package/dist/components/InfoCard/WInfoCard.vue.d.ts +4 -0
- package/dist/components/InfoCard/WInfoCard.vue.d.ts.map +1 -1
- package/dist/components/InfoCard/WInfoCard.vue.js +21 -10
- package/dist/components/InfoCard/models/utils.d.ts +4 -0
- package/dist/components/InfoCard/models/utils.d.ts.map +1 -0
- package/dist/components/InfoCard/models/utils.js +20 -0
- package/dist/components/List/components/ListCardAction.vue.js +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +2 -2
- package/dist/components/Skeleton/WSkeleton.vue.d.ts.map +1 -1
- package/dist/components/Skeleton/WSkeleton.vue.js +1 -1
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +2 -9
- package/dist/main.js +1 -1
- package/dist/utils/useDefaultQuery.d.ts +1 -1
- package/dist/utils/useDefaultQuery.d.ts.map +1 -1
- package/dist/utils/useDefaultQuery.js +19 -15
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +8 -1
- package/package.json +3 -3
- package/tailwind-base/plugins/default.ts +2 -1
@@ -2,7 +2,7 @@ import { defineComponent, createElementBlock, openBlock, normalizeClass, createE
|
|
2
2
|
import _sfc_main$1 from '../Tooltip/WTooltip.vue.js';
|
3
3
|
|
4
4
|
const _hoisted_1 = ["disabled"];
|
5
|
-
const _hoisted_2 = { class: "-h--w-input-height flex items-center gap-2 px-[--w-list-padding,1rem]" };
|
5
|
+
const _hoisted_2 = { class: "-h--w-input-height sm-not:-px--inner-margin flex items-center gap-2 px-[--w-list-padding,1rem]" };
|
6
6
|
const _hoisted_3 = {
|
7
7
|
key: 0,
|
8
8
|
class: "sm-not:hidden whitespace-nowrap font-normal"
|
@@ -15,10 +15,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
15
|
setup(__props) {
|
16
16
|
return (_ctx, _cache) => {
|
17
17
|
return openBlock(), createBlock(Transition, {
|
18
|
-
"enter-active-class": "transition-[grid-template-rows] overflow-hidden grid",
|
18
|
+
"enter-active-class": "transition-[grid-template-rows] overflow-y-hidden grid",
|
19
19
|
"enter-from-class": "grid-rows-[0fr]",
|
20
20
|
"enter-to-class": "grid-rows-[1fr]",
|
21
|
-
"leave-active-class": "transition-[grid-template-rows] overflow-hidden grid",
|
21
|
+
"leave-active-class": "transition-[grid-template-rows] overflow-y-hidden grid",
|
22
22
|
"leave-from-class": "grid-rows-[1fr]",
|
23
23
|
"leave-to-class": "grid-rows-[0fr]",
|
24
24
|
onBeforeEnter: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:visible", true)),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WFieldWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldWrapper/WFieldWrapper.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WFieldWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldWrapper/WFieldWrapper.vue"],"names":[],"mappings":"AAgLA;AAuNA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAuC9C,iBAAS,cAAc;WAuRT,OAAO,IAA6B;;uBAfvB,GAAG;0BACC,GAAG;;;gCA/QP,OAAO,KAAG,IAAI;;YAgRb,GAAG;;;gCAhRJ,OAAO,KAAG,IAAI;;YAiRX,GAAG;uBACL,GAAG;;;;;;EAgB9B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;OAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -73,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
73
73
|
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("label", {
|
74
74
|
key: 0,
|
75
75
|
for: unref(id),
|
76
|
-
class: normalizeClass(["text-accent relative pr-6 text-xs font-semibold leading-loose duration-500", {
|
76
|
+
class: normalizeClass(["text-accent relative block pr-6 text-xs font-semibold leading-loose duration-500", {
|
77
77
|
"cursor-not-allowed opacity-50": _ctx.disabled && !_ctx.readonly && !_ctx.skeleton,
|
78
78
|
"col-start-1": _ctx.subgrid
|
79
79
|
}])
|
@@ -103,10 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
103
103
|
"encoded-query-param": encodedQueryParam.value,
|
104
104
|
class: "absolute -top-0.5 ml-1"
|
105
105
|
}, null, 8, ["filter-field", "encoded-query-param"])) : createCommentVNode("", true)
|
106
|
-
], 64)) : (openBlock(), createBlock(WSkeleton, {
|
107
|
-
key: 1,
|
108
|
-
class: "w-skeleton-w-16"
|
109
|
-
}))
|
106
|
+
], 64)) : (openBlock(), createBlock(WSkeleton, { key: 1 }))
|
110
107
|
], 10, _hoisted_1)) : createCommentVNode("", true),
|
111
108
|
renderSlot(_ctx.$slots, "subtitle"),
|
112
109
|
createElementVNode("div", {
|
@@ -10,10 +10,10 @@ const _hoisted_1 = {
|
|
10
10
|
class: "-h--header-height fixed inset-x-0 top-0 z-10 flex print:hidden"
|
11
11
|
};
|
12
12
|
const _hoisted_2 = { class: "text-accent sm:text-2.5xl flex-1 truncate text-xl font-semibold" };
|
13
|
-
const _hoisted_3 = { class: "w-ripple w-ripple-hover relative flex h-full items-center px-[--w-list-padding,1rem]" };
|
13
|
+
const _hoisted_3 = { class: "w-ripple w-ripple-hover sm-not:-px--inner-margin relative flex h-full items-center px-[--w-list-padding,1rem]" };
|
14
14
|
const _hoisted_4 = {
|
15
15
|
key: 0,
|
16
|
-
class: "
|
16
|
+
class: "xl-not:pl-[3.75rem] -px--inner-margin relative flex w-full flex-1 items-center gap-2"
|
17
17
|
};
|
18
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
19
19
|
__name: "WHeaderBar",
|
@@ -65,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
65
65
|
style: normalizeStyle({ "--header-height-padding": unref(headerPadding) + "px" })
|
66
66
|
}, null, 6)),
|
67
67
|
withDirectives(createElementVNode("div", {
|
68
|
-
class: normalizeClass(["-pl--inner-margin xl-not
|
68
|
+
class: normalizeClass(["-pl--inner-margin xl-not:-pl--header-height relative flex max-w-full flex-1 items-center", {
|
69
69
|
"-pr--inner-margin": !_ctx.searchEnabled
|
70
70
|
}])
|
71
71
|
}, [
|
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
76
|
]),
|
77
77
|
_ctx.searchEnabled ? (openBlock(), createElementBlock("button", {
|
78
78
|
key: 0,
|
79
|
-
class: "w-ripple-trigger
|
79
|
+
class: "w-ripple-trigger sm:-pr--inner-margin h-full select-none",
|
80
80
|
onClick: openSearch
|
81
81
|
}, [
|
82
82
|
createElementVNode("div", _hoisted_3, [
|
@@ -1,10 +1,14 @@
|
|
1
|
+
import { SemanticType } from '../../utils/SemanticType';
|
1
2
|
type __VLS_Props = {
|
2
3
|
noBg?: boolean;
|
3
4
|
noIcon?: boolean;
|
5
|
+
icon?: SVGComponent;
|
6
|
+
semanticType?: SemanticType;
|
4
7
|
};
|
5
8
|
declare function __VLS_template(): {
|
6
9
|
attrs: Partial<{}>;
|
7
10
|
slots: {
|
11
|
+
top?(_: {}): any;
|
8
12
|
default?(_: {}): any;
|
9
13
|
};
|
10
14
|
refs: {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInfoCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoCard/WInfoCard.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInfoCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoCard/WInfoCard.vue"],"names":[],"mappings":"AA0BA;AA4CA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAIjD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAC;AAKF,iBAAS,cAAc;WAsDT,OAAO,IAA6B;;qBAXzB,GAAG;yBACC,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -1,26 +1,37 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass,
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createElementVNode, createBlock, createCommentVNode, resolveDynamicComponent } from 'vue';
|
2
2
|
import IconNegativeInfo from '../../assets/icons/sax/IconNegativeInfo.svg.js';
|
3
|
+
import { SemanticType } from '../../utils/SemanticType.js';
|
4
|
+
import { infoCardSemanticTypeMap, infoCardIconSemanticTypeMap } from './models/utils.js';
|
3
5
|
|
4
|
-
const _hoisted_1 = { class: "
|
6
|
+
const _hoisted_1 = { class: "-gap--inner-margin grid grid-cols-[auto,1fr]" };
|
7
|
+
const _hoisted_2 = { class: "text-pretty py-1 leading-relaxed" };
|
5
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
6
9
|
__name: "WInfoCard",
|
7
10
|
props: {
|
8
11
|
noBg: { type: Boolean },
|
9
|
-
noIcon: { type: Boolean }
|
12
|
+
noIcon: { type: Boolean },
|
13
|
+
icon: {},
|
14
|
+
semanticType: {}
|
10
15
|
},
|
11
16
|
setup(__props) {
|
12
17
|
return (_ctx, _cache) => {
|
13
18
|
return openBlock(), createElementBlock("div", {
|
14
|
-
class: normalizeClass(["sm-not:-px--inner-margin
|
15
|
-
|
19
|
+
class: normalizeClass(["sm-not:-px--inner-margin sm-not:-mx---inner-margin p-4 sm:rounded-3xl", {
|
20
|
+
[unref(infoCardSemanticTypeMap)[_ctx.semanticType ?? unref(SemanticType).SECONDARY]]: !_ctx.noBg
|
16
21
|
}])
|
17
22
|
}, [
|
18
|
-
|
19
|
-
key: 0,
|
20
|
-
class: "square-8 sm-not:square-7 sm-not:-ml-1 text-description inline-block rotate-180"
|
21
|
-
})) : createCommentVNode("", true),
|
23
|
+
renderSlot(_ctx.$slots, "top"),
|
22
24
|
createElementVNode("div", _hoisted_1, [
|
23
|
-
|
25
|
+
!_ctx.noIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ?? unref(IconNegativeInfo)), {
|
26
|
+
key: 0,
|
27
|
+
class: normalizeClass(["square-6 sm-not:-mx-1 inline-block", {
|
28
|
+
[unref(infoCardIconSemanticTypeMap)[_ctx.semanticType ?? unref(SemanticType).SECONDARY]]: true,
|
29
|
+
"rotate-180": !_ctx.icon
|
30
|
+
}])
|
31
|
+
}, null, 8, ["class"])) : createCommentVNode("", true),
|
32
|
+
createElementVNode("div", _hoisted_2, [
|
33
|
+
renderSlot(_ctx.$slots, "default")
|
34
|
+
])
|
24
35
|
])
|
25
36
|
], 2);
|
26
37
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfoCard/models/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAEjD,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAOhE,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAOpE,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { SemanticType } from '../../../utils/SemanticType.js';
|
2
|
+
|
3
|
+
const infoCardSemanticTypeMap = {
|
4
|
+
[SemanticType.PRIMARY]: "bg-primary-default/10 dark:bg-primary-dark/10",
|
5
|
+
[SemanticType.SECONDARY]: "bg-gray-100 dark:bg-gray-800",
|
6
|
+
[SemanticType.POSITIVE]: "bg-positive/10 dark:bg-positive-dark/10",
|
7
|
+
[SemanticType.NEGARIVE]: "bg-negative/10 dark:bg-negative-dark/10",
|
8
|
+
[SemanticType.WARNING]: "bg-warning/10 dark:bg-warning-dark/10",
|
9
|
+
[SemanticType.INFO]: "bg-info/10 dark:bg-info-dark/10"
|
10
|
+
};
|
11
|
+
const infoCardIconSemanticTypeMap = {
|
12
|
+
[SemanticType.PRIMARY]: "text-primary-default dark:text-primary-dark",
|
13
|
+
[SemanticType.SECONDARY]: "text-description",
|
14
|
+
[SemanticType.POSITIVE]: "text-positive dark:text-positive-dark",
|
15
|
+
[SemanticType.NEGARIVE]: "text-negative dark:text-negative-dark",
|
16
|
+
[SemanticType.WARNING]: "text-warning dark:text-warning-dark",
|
17
|
+
[SemanticType.INFO]: "text-info dark:text-info-dark"
|
18
|
+
};
|
19
|
+
|
20
|
+
export { infoCardIconSemanticTypeMap, infoCardSemanticTypeMap };
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
12
|
return (_ctx, _cache) => {
|
13
13
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps(_ctx.props, {
|
14
14
|
class: ["w-ripple w-ripple-hover w-ripple-has w-ripple-opacity-[0.04] absolute inset-0 cursor-pointer select-none", {
|
15
|
-
"w-ripple-rounded-[--w-list-rounded,unset] rounded-[--w-list-rounded,unset]": _ctx.card
|
15
|
+
"sm:w-ripple-rounded-[--w-list-rounded,unset] sm:rounded-[--w-list-rounded,unset]": _ctx.card
|
16
16
|
}],
|
17
17
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
18
18
|
}), null, 16, ["class"]);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineComponent, useSlots, computed, ref, reactive, watch, onBeforeUnmount, createElementBlock, openBlock, createVNode, withCtx, unref, normalizeClass, renderSlot, Fragment, renderList, createBlock, resolveDynamicComponent } from 'vue';
|
2
2
|
import _sfc_main$2 from '../Expansion/WExpansion.vue.js';
|
3
3
|
import IconArrow from '../../assets/icons/default/IconArrow.svg.js';
|
4
|
-
import { debounce } from '../../utils/utils.js';
|
4
|
+
import { unwrapSlots, debounce } from '../../utils/utils.js';
|
5
5
|
import _sfc_main$1 from './WNavItem.vue.js';
|
6
6
|
import WNavItemTransition from './WNavItemTransition.vue.js';
|
7
7
|
|
@@ -21,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
21
|
setup(__props, { emit: __emit }) {
|
22
22
|
const props = __props;
|
23
23
|
const slots = useSlots();
|
24
|
-
const slotsDefault = computed(() => slots.default?.());
|
24
|
+
const slotsDefault = computed(() => unwrapSlots(slots.default?.() ?? []));
|
25
25
|
const emit = __emit;
|
26
26
|
const isOpen = ref(false);
|
27
27
|
const hasActiveCached = ref(false);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSkeleton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton/WSkeleton.vue"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"WSkeleton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton/WSkeleton.vue"],"names":[],"mappings":";AA6CA,wBAMG"}
|
@@ -7,7 +7,7 @@ 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
9
|
style: normalizeStyle({'--skeleton-width-internal': (Math.round(Math.random() * 40) + 40) + '%'})
|
10
|
-
},
|
10
|
+
}, null, 4))
|
11
11
|
}
|
12
12
|
const WSkeleton = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
|
13
13
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAgIA;AAAA,
|
1
|
+
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAgIA;AAAA,OAiZO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAErD,OAAO,EAAC,KAAK,aAAa,EAAsJ,MAAM,KAAK,CAAA;AAE3L,OAAO,KAAK,MAAM,6BAA6B,CAAA;AAwR/C,iBAAS,cAAc;WAyRT,OAAO,IAA6B;;iBA9RvC,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAgGwB,GAAG,8CACL,GAAG,yBAC3B,GAAG,6DACP,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAH2B,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAH2B,GAAG,8CACL,GAAG,yBAC3B,GAAG,6DACP,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAH2B,GAAG,8CACL,GAAG,yBAC3B,GAAG,6DACP,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAH2B,GAAG,8CACL,GAAG,yBAC3B,GAAG,6DACP,GAAG;;;;;;;;;;;;;;;;;;OAoOhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -2,7 +2,7 @@ import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch
|
|
2
2
|
import _sfc_main$1 from '../Form/WForm.vue.js';
|
3
3
|
import { Notify } from '../../utils/Notify.js';
|
4
4
|
import { useIsMobile } from '../../utils/mobile.js';
|
5
|
-
import { throttle, debounce } from '../../utils/utils.js';
|
5
|
+
import { unwrapSlots, throttle, debounce } from '../../utils/utils.js';
|
6
6
|
import _sfc_main$3 from './components/TabItem.vue.js';
|
7
7
|
import _sfc_main$2 from './components/TabTitleButton.vue.js';
|
8
8
|
import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
|
@@ -32,13 +32,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
32
32
|
const formRef = useTemplateRef("form");
|
33
33
|
const buttonContainerRef = useTemplateRef("buttonContainer");
|
34
34
|
const defaultSlotsRaw = computed(() => props.customSlots ?? slots.default?.() ?? []);
|
35
|
-
const unwrapSlots = (slots2) => {
|
36
|
-
return slots2.flatMap((slot) => {
|
37
|
-
if (Array.isArray(slot?.children)) return unwrapSlots(slot.children);
|
38
|
-
else if (typeof slot.type !== "symbol") return slot;
|
39
|
-
else return [];
|
40
|
-
});
|
41
|
-
};
|
42
35
|
const isTabItem = (slot) => {
|
43
36
|
return slot.type instanceof Object && "__name" in slot.type && slot.type.__name === "WTabsItem";
|
44
37
|
};
|
@@ -217,7 +210,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
217
210
|
ref: "buttonContainer",
|
218
211
|
class: normalizeClass(["relative", {
|
219
212
|
"sm-not:snap-start grid grid-cols-[1fr,auto]": _ctx.side,
|
220
|
-
"no-scrollbar sm-not:-pl--inner-margin flex snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain pr-[50%]": !_ctx.side
|
213
|
+
"no-scrollbar sm-not:-pl--inner-margin sm-not:-mx---inner-margin flex snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain pr-[50%]": !_ctx.side
|
221
214
|
}])
|
222
215
|
}, [
|
223
216
|
(openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlotsAll.value, (slot, index) => {
|
package/dist/main.js
CHANGED
@@ -103,5 +103,5 @@ export { getIsMobile, getIsTablet, getIsTouchDevice, useIsMobile } from './utils
|
|
103
103
|
export { PAGE_LENGTH, makeQueryPaginated, useDefaultQuery, wrapUseQueryPaginated } from './utils/useDefaultQuery.js';
|
104
104
|
export { paginatedResponseUpdater, useQueryUpdater } from './utils/useQueryUpdater.js';
|
105
105
|
export { useCopy } from './utils/useCopy.js';
|
106
|
-
export { ListMode, debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIdArray, isIndex, isPage, numberCompactFormatter, numberFormatter, parseId, parseIndex, percentCompactFormatter, percentFormatter, set, throttle } from './utils/utils.js';
|
106
|
+
export { ListMode, debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIdArray, isIndex, isPage, numberCompactFormatter, numberFormatter, parseId, parseIndex, percentCompactFormatter, percentFormatter, set, throttle, unwrapSlots } from './utils/utils.js';
|
107
107
|
export { validateRequired } from './utils/validate.js';
|
@@ -9,7 +9,7 @@ export declare const useDefaultQuery: <TQueryFnData = unknown, TData = TQueryFnD
|
|
9
9
|
export declare const PAGE_LENGTH = 24;
|
10
10
|
export declare const makeQueryPaginated: <Data, QueryParams extends {
|
11
11
|
page?: number;
|
12
|
-
}>(key: string, getter: (queryParams: QueryParams) => Data[], setter?: (data: Data[]) => void, pageLength?: number) => UseQueryPaginated<Data, QueryParams>;
|
12
|
+
}>(key: string, getter: (queryParams: QueryParams) => Data[] | undefined, setter?: (data: Data[]) => void, pageLength?: number) => UseQueryPaginated<Data, QueryParams>;
|
13
13
|
export declare const wrapUseQueryPaginated: <Data, QueryParams extends {
|
14
14
|
page?: number;
|
15
15
|
}>(key: string, queryFn: UseQueryDefault<Data[]>) => UseQueryPaginated<Data, QueryParams>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDefaultQuery.d.ts","sourceRoot":"","sources":["../../../src/utils/useDefaultQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,QAAQ,EAAiB,MAAM,qBAAqB,CAAA;AAGtH,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AAE9B,KAAK,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEvD,KAAK,OAAO,CAAC,YAAY,GAAG,OAAO,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC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AAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEhI,KAAK,yBAAyB,CAAC,YAAY,GAAG,OAAO,EAAE,KAAK,GAAG,YAAY,IAAI,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG;IACnH,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,eAAe,GAC1B,YAAY,GAAG,OAAO,EACtB,KAAK,GAAG,YAAY,EACpB,SAAS,SAAS,QAAQ,GAAG,QAAQ,EACrC,GAAG,MAAM,UAAU,CAAC,OAAO,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,KAAG,yBAAyB,CAAC,YAAY,EAAE,KAAK,CAO/H,CAAA;AAED,eAAO,MAAM,WAAW,KAAK,CAAA;AAE7B,eAAO,MAAM,kBAAkB,GAAI,IAAI,EAAE,WAAW,SAAS;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,EAAE,KAAK,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,EAAE,GAAG,SAAS,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,mBAAwB,KAAG,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAyDnP,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,IAAI,EAAE,WAAW,SAAS;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,EAAE,KAAK,MAAM,EAAE,SAAS,eAAe,CAAC,IAAI,EAAE,CAAC,KAAG,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAanK,CAAA"}
|
@@ -13,20 +13,23 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
|
|
13
13
|
return (queryParams, options = {}) => {
|
14
14
|
const query = useDefaultQuery({
|
15
15
|
queryKey: [key, queryParams],
|
16
|
-
queryFn: () =>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
16
|
+
queryFn: () => {
|
17
|
+
return new Promise((resolve, reject) => {
|
18
|
+
const currentList = getter(unref(queryParams));
|
19
|
+
if (!currentList) return resolve(null);
|
20
|
+
const current = Math.max(unref(queryParams).page ?? 1, 1);
|
21
|
+
const pages_count = Math.max(Math.ceil(currentList.length / pageLength), 1);
|
22
|
+
if (current > pages_count) reject(new ApiError({ status: 404 }));
|
23
|
+
else resolve({
|
24
|
+
count: currentList.length,
|
25
|
+
pages_count,
|
26
|
+
current,
|
27
|
+
next: pages_count > current ? current + 1 : null,
|
28
|
+
previous: current !== 1 ? current - 1 : null,
|
29
|
+
results: currentList.slice(pageLength * (current - 1), pageLength * current)
|
30
|
+
});
|
28
31
|
});
|
29
|
-
}
|
32
|
+
},
|
30
33
|
...options
|
31
34
|
});
|
32
35
|
const setDataOld = query.setData;
|
@@ -34,7 +37,7 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
|
|
34
37
|
if (setter && unref(options2)?.index !== void 0) {
|
35
38
|
const index = unref(unref(options2)?.index);
|
36
39
|
if (index !== void 0) {
|
37
|
-
const newList = getter({})
|
40
|
+
const newList = getter({})?.slice() ?? [];
|
38
41
|
const oldItem = query.data.value?.results[index];
|
39
42
|
if (oldItem !== void 0) {
|
40
43
|
const itemIndex = newList.findIndex((item) => item.id === oldItem.id);
|
@@ -55,8 +58,9 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
|
|
55
58
|
const wrapUseQueryPaginated = (key, queryFn) => {
|
56
59
|
return (queryParams, options = {}) => {
|
57
60
|
const query = queryFn(options);
|
58
|
-
const newQuery = makeQueryPaginated(key, () => query.data.value
|
61
|
+
const newQuery = makeQueryPaginated(key, () => query.data.value, query.setData)(queryParams, options);
|
59
62
|
watch(query.data, () => {
|
63
|
+
console.log("refetch");
|
60
64
|
newQuery.refetch();
|
61
65
|
});
|
62
66
|
return newQuery;
|
package/dist/utils/utils.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { FieldConfigMap, GetFieldLabels, ListFields } from '../components/List/types';
|
2
|
+
import { VNode } from 'vue';
|
2
3
|
export declare const getScrollParent: (node: Element) => Element | null;
|
3
4
|
export declare const getAllScrollParents: (node?: Element, max?: number) => Array<Element>;
|
4
5
|
export declare const hasParent: (parent: Element, current: Element) => boolean;
|
@@ -26,5 +27,6 @@ export declare enum ListMode {
|
|
26
27
|
TABLE = "table",
|
27
28
|
GRID = "grid"
|
28
29
|
}
|
30
|
+
export declare const unwrapSlots: (slots: VNode[]) => VNode[];
|
29
31
|
export {};
|
30
32
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,cAAc,EAAE,cAAc,EAAE,UAAU,EAAC,MAAM,yBAAyB,CAAA;
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,cAAc,EAAE,cAAc,EAAE,UAAU,EAAC,MAAM,yBAAyB,CAAA;AACpG,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,KAAK,CAAA;AAY9B,eAAO,MAAM,eAAe,GAAI,MAAM,OAAO,KAAG,OAAO,GAAG,IAKhD,CAAA;AAEV,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,EAAE,YAAQ,KAAG,KAAK,CAAC,OAAO,CAa3E,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,QAAQ,OAAO,EAAE,SAAS,OAAO,KAAG,OAI7D,CAAA;AAGD,KAAK,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAE1C,wBAAgB,QA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AAI,EAAE,SAAS,CAAC,KAAG,SAAS,GAAG,SAA2J,CAAA;AAEnQ,eAAO,MAAM,GAAG,GAAI,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI,EAAE,MAAM,MAAM,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,SAAS,KAAG,IAe7G,CAAA;AAGD,eAAO,MAAM,wBAAwB,GAAI,MAAM,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,MAAM,EAAE,SAAS,IAAI,SAAS,OAAO,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,KAAG,cAAc,CAAC,MAAM,CAiBhM,CAAA;AAED,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,KAAG,KAAK,EAMjD,CAAA"}
|
package/dist/utils/utils.js
CHANGED
@@ -121,5 +121,12 @@ var ListMode = /* @__PURE__ */ ((ListMode2) => {
|
|
121
121
|
ListMode2["GRID"] = "grid";
|
122
122
|
return ListMode2;
|
123
123
|
})(ListMode || {});
|
124
|
+
const unwrapSlots = (slots) => {
|
125
|
+
return slots.flatMap((slot) => {
|
126
|
+
if (Array.isArray(slot?.children)) return unwrapSlots(slot.children);
|
127
|
+
else if (typeof slot.type !== "symbol") return slot;
|
128
|
+
else return [];
|
129
|
+
});
|
130
|
+
};
|
124
131
|
|
125
|
-
export { ListMode, debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIdArray, isIndex, isPage, numberCompactFormatter, numberFormatter, parseId, parseIndex, percentCompactFormatter, percentFormatter, set, throttle };
|
132
|
+
export { ListMode, debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIdArray, isIndex, isPage, numberCompactFormatter, numberFormatter, parseId, parseIndex, percentCompactFormatter, percentFormatter, set, throttle, unwrapSlots };
|
package/package.json
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
"type": "git",
|
5
5
|
"url": "https://github.com/rsmple/eco-vue-js.git"
|
6
6
|
},
|
7
|
-
"version": "0.10.
|
7
|
+
"version": "0.10.31",
|
8
8
|
"scripts": {
|
9
9
|
"build": "run-p type-check \"build-only {@}\" --",
|
10
|
-
"dev": "vite build --watch",
|
10
|
+
"dev": "vite build --mode development --watch",
|
11
11
|
"build-only": "vite build",
|
12
12
|
"type-check": "vue-tsc --build --force",
|
13
13
|
"lint": "eslint . --fix",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"@stylistic/eslint-plugin-ts": "4.2.0",
|
20
20
|
"@tanstack/eslint-plugin-query": "5.67.2",
|
21
21
|
"@vue/eslint-config-typescript": "14.5.0",
|
22
|
-
"eslint-import-resolver-typescript": "3.8.
|
22
|
+
"eslint-import-resolver-typescript": "3.8.4",
|
23
23
|
"eslint-plugin-import": "2.31.0",
|
24
24
|
"eslint-plugin-tailwindcss": "3.18.0",
|
25
25
|
"eslint-plugin-unused-imports": "4.1.4",
|
@@ -399,10 +399,11 @@ const pluginDefault = plugin(function ({matchUtilities, addVariant, addUtilities
|
|
399
399
|
'.w-skeleton': {
|
400
400
|
position: 'relative',
|
401
401
|
width: 'var(--skeleton-width,var(--skeleton-width-internal,70%))',
|
402
|
-
height: 'var(--skeleton-height)',
|
402
|
+
height: 'var(--skeleton-height,1em)',
|
403
403
|
'border-radius': 'var(--w-skeleton-rounded,0.5rem)',
|
404
404
|
overflow: 'hidden',
|
405
405
|
cursor: 'progress',
|
406
|
+
display: 'inline-block',
|
406
407
|
'&:not(.w-skeleton-static):before': {
|
407
408
|
content: '""',
|
408
409
|
position: 'absolute',
|