eco-vue-js 0.10.98 → 0.10.100
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/Auth/utils/utils.d.ts +1 -0
- package/dist/components/Auth/utils/utils.d.ts.map +1 -1
- package/dist/components/Auth/utils/utils.js +11 -2
- package/dist/components/Chip/WChip.vue.js +1 -1
- package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/WDropdown.vue.js +57 -32
- package/dist/components/Dropdown/types.d.ts +5 -4
- package/dist/components/Dropdown/types.d.ts.map +1 -1
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts +36 -35
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts.map +1 -1
- package/dist/components/Dropdown/utils/DropdownStyle.js +51 -37
- package/dist/components/InfoCard/WInfoCard.vue.js +1 -1
- package/dist/components/InfoCard/WInfoCardNegative.vue.js +2 -2
- package/dist/components/InfoCard/models/utils.js +2 -2
- package/dist/components/Modal/WModal.vue.d.ts +3 -1
- package/dist/components/Modal/WModal.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModal.vue.js +16 -15
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts +9 -15
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts.map +1 -1
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue2.js +27 -15
- package/dist/components/Modal/types.d.ts +6 -5
- package/dist/components/Modal/types.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.js +2 -6
- package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts +0 -4
- package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/components/TooltipContainer.vue.js +3 -66
- package/dist/main.js +1 -0
- package/dist/utils/ApiClient.d.ts +4 -3
- package/dist/utils/ApiClient.d.ts.map +1 -1
- package/dist/utils/ApiClient.js +10 -7
- package/dist/utils/Modal.d.ts +5 -1
- package/dist/utils/Modal.d.ts.map +1 -1
- package/dist/utils/SemanticType.d.ts +1 -1
- package/dist/utils/SemanticType.js +4 -4
- package/eslint/configs/configTypescript.js +0 -1
- package/package.json +6 -6
- package/tailwind-base/plugins/default.ts +9 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, provide, ref, reactive, watch, onBeforeMount, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, unref, createVNode, Transition, withCtx, createCommentVNode, TransitionGroup, Fragment, renderList, createElementVNode, createBlock, withModifiers, resolveDynamicComponent, mergeProps } from 'vue';
|
1
|
+
import { defineComponent, provide, ref, useTemplateRef, reactive, watch, onBeforeMount, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, unref, createVNode, Transition, withCtx, createCommentVNode, TransitionGroup, Fragment, renderList, createElementVNode, createBlock, withModifiers, resolveDynamicComponent, mergeProps } from 'vue';
|
2
2
|
import { Modal, initModal } from '../../utils/Modal.js';
|
3
3
|
import { SemanticType } from '../../utils/SemanticType.js';
|
4
4
|
import { wBaseZIndex, BASE_ZINDEX_MODAL } from '../../utils/utils.js';
|
@@ -11,14 +11,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
11
|
setup(__props) {
|
12
12
|
provide(wBaseZIndex, BASE_ZINDEX_MODAL);
|
13
13
|
provide(wIsModal, true);
|
14
|
-
|
14
|
+
let key = 0;
|
15
15
|
const modalMetaList = ref([]);
|
16
16
|
const isBackdrop = useIsBackdrop();
|
17
|
+
const modalComponentRef = useTemplateRef("modalComponent");
|
17
18
|
const hasChangesMap = reactive({});
|
18
19
|
const addModal = (component, props, cb, autoclose = false) => {
|
19
20
|
const modalMeta = {
|
20
21
|
component,
|
21
|
-
key: key
|
22
|
+
key: `w-modal-${key++}`,
|
22
23
|
props,
|
23
24
|
cb,
|
24
25
|
autoclose
|
@@ -33,14 +34,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
34
|
modalMetaListNew.splice(index, 1);
|
34
35
|
modalMetaList.value = modalMetaListNew;
|
35
36
|
delete hasChangesMap[modalMeta.key];
|
36
|
-
if (
|
37
|
-
key.value = 0;
|
38
|
-
}
|
37
|
+
if (modalMetaListNew.length === 0) key = 0;
|
39
38
|
modalMeta.cb?.();
|
40
39
|
};
|
41
40
|
let closeConfirm = null;
|
42
|
-
const closeModalWithConfirm = (modalMeta) => {
|
43
|
-
if (modalMeta.autoclose || !hasChangesMap[modalMeta.key]) {
|
41
|
+
const closeModalWithConfirm = (modalMeta, index) => {
|
42
|
+
if (modalMeta.autoclose || !hasChangesMap[modalMeta.key] && !modalComponentRef.value?.[index]?.formRef?.hasChanges) {
|
44
43
|
closeModal(modalMeta);
|
45
44
|
return;
|
46
45
|
}
|
@@ -86,7 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
86
85
|
default: withCtx(() => [
|
87
86
|
unref(isBackdrop) ? (openBlock(), createElementBlock("div", {
|
88
87
|
key: 0,
|
89
|
-
style: normalizeStyle({ zIndex:
|
88
|
+
style: normalizeStyle({ zIndex: 99 + modalMetaList.value.length + modalMetaList.value.length }),
|
90
89
|
class: "bg-primary-light dark:bg-primary-darkest fixed left-0 top-0 size-full bg-opacity-40 backdrop-blur dark:bg-opacity-40"
|
91
90
|
}, null, 4)) : createCommentVNode("", true)
|
92
91
|
]),
|
@@ -102,17 +101,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
101
|
(openBlock(true), createElementBlock(Fragment, null, renderList(modalMetaList.value, (modalMeta, index) => {
|
103
102
|
return openBlock(), createElementBlock("div", {
|
104
103
|
key: modalMeta.key,
|
105
|
-
style: normalizeStyle({ zIndex:
|
104
|
+
style: normalizeStyle({ zIndex: 102 + index }),
|
106
105
|
class: "no-scrollbar fixed inset-0 isolate flex items-center justify-center overflow-y-auto overscroll-none"
|
107
106
|
}, [
|
108
107
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-[calc(100%+1px)]" }, null, -1)),
|
109
108
|
createVNode(_sfc_main$1, {
|
110
|
-
onClick: withModifiers(($event) => closeModalWithConfirm(modalMeta), ["stop", "prevent"])
|
109
|
+
onClick: withModifiers(($event) => closeModalWithConfirm(modalMeta, index), ["stop", "prevent"])
|
111
110
|
}, null, 8, ["onClick"]),
|
112
|
-
(openBlock(), createBlock(resolveDynamicComponent(modalMeta.component), mergeProps({
|
113
|
-
|
114
|
-
|
115
|
-
}
|
111
|
+
(openBlock(), createBlock(resolveDynamicComponent(modalMeta.component), mergeProps({
|
112
|
+
ref_for: true,
|
113
|
+
ref: "modalComponent"
|
114
|
+
}, modalMeta.props, {
|
115
|
+
"onClose:modal": ($event) => closeModal(modalMeta)
|
116
|
+
}), null, 16, ["onClose:modal"]))
|
116
117
|
], 4);
|
117
118
|
}), 128))
|
118
119
|
]),
|
@@ -1,20 +1,14 @@
|
|
1
|
+
import { ConfirmModalProps } from '../../types';
|
1
2
|
import { SemanticType } from '../../../../utils/SemanticType';
|
2
|
-
|
3
|
-
title: string;
|
4
|
-
description: string;
|
5
|
-
acceptText?: string;
|
6
|
-
acceptSemanticType?: SemanticType;
|
7
|
-
intermediateText?: string;
|
8
|
-
intermediateSemanticType?: SemanticType;
|
9
|
-
cancelText?: string;
|
10
|
-
onAccept: () => void | Promise<void>;
|
11
|
-
onIntermediate?: () => void | Promise<void>;
|
12
|
-
onCancel?: () => void;
|
13
|
-
};
|
14
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
3
|
+
declare const _default: import('vue').DefineComponent<ConfirmModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
15
4
|
"close:modal": () => any;
|
16
|
-
}, string, import('vue').PublicProps, Readonly<
|
5
|
+
}, string, import('vue').PublicProps, Readonly<ConfirmModalProps> & Readonly<{
|
17
6
|
"onClose:modal"?: (() => any) | undefined;
|
18
|
-
}>, {
|
7
|
+
}>, {
|
8
|
+
acceptText: string | import('vue').VNode | import('vue').Component;
|
9
|
+
acceptSemanticType: SemanticType;
|
10
|
+
intermediateSemanticType: SemanticType;
|
11
|
+
cancelText: string | import('vue').VNode | import('vue').Component;
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
19
13
|
export default _default;
|
20
14
|
//# sourceMappingURL=ConfirmModal.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfirmModal.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Modal/modals/Confirm/ConfirmModal.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ConfirmModal.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Modal/modals/Confirm/ConfirmModal.vue"],"names":[],"mappings":"AA8EA;AA0JA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAOlD,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;;;;;;;;;;;AA4QjD,wBASG"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, ref, createBlock, openBlock, withCtx, createElementVNode, toDisplayString, createVNode, createCommentVNode, withModifiers, unref
|
1
|
+
import { defineComponent, ref, createBlock, openBlock, withCtx, createElementVNode, createElementBlock, Fragment, createTextVNode, toDisplayString, resolveDynamicComponent, createVNode, createCommentVNode, withModifiers, unref } from 'vue';
|
2
2
|
import _sfc_main$2 from '../../../Button/WButton.vue.js';
|
3
3
|
import _sfc_main$1 from '../../WModalWrapper.vue.js';
|
4
4
|
import { SemanticType } from '../../../../utils/SemanticType.js';
|
@@ -9,14 +9,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
props: {
|
10
10
|
title: {},
|
11
11
|
description: {},
|
12
|
-
acceptText: {},
|
13
|
-
acceptSemanticType: {},
|
12
|
+
acceptText: { default: "Accept" },
|
13
|
+
acceptSemanticType: { default: SemanticType.PRIMARY },
|
14
14
|
intermediateText: {},
|
15
|
-
intermediateSemanticType: {},
|
16
|
-
cancelText: {},
|
17
|
-
onAccept: {
|
18
|
-
onIntermediate: {
|
19
|
-
onCancel: {
|
15
|
+
intermediateSemanticType: { default: SemanticType.SECONDARY },
|
16
|
+
cancelText: { default: "Cancel" },
|
17
|
+
onAccept: {},
|
18
|
+
onIntermediate: {},
|
19
|
+
onCancel: {}
|
20
20
|
},
|
21
21
|
emits: ["close:modal"],
|
22
22
|
setup(__props, { emit: __emit }) {
|
@@ -59,7 +59,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
59
|
return (_ctx, _cache) => {
|
60
60
|
return openBlock(), createBlock(_sfc_main$1, { class: "w-modal-wrapper-w-[--w-modal-confirm-width,40rem]" }, {
|
61
61
|
title: withCtx(() => [
|
62
|
-
|
62
|
+
typeof _ctx.title === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
63
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
64
|
+
], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.title), { key: 1 }))
|
63
65
|
]),
|
64
66
|
actions: withCtx(() => [
|
65
67
|
createVNode(_sfc_main$2, {
|
@@ -69,38 +71,48 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
69
71
|
onClick: withModifiers(cancel, ["stop", "prevent"])
|
70
72
|
}, {
|
71
73
|
default: withCtx(() => [
|
72
|
-
|
74
|
+
typeof _ctx.cancelText === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
75
|
+
createTextVNode(toDisplayString(_ctx.cancelText), 1)
|
76
|
+
], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.cancelText), { key: 1 }))
|
73
77
|
]),
|
74
78
|
_: 1
|
75
79
|
}, 8, ["semantic-type", "disabled"]),
|
76
80
|
_ctx.intermediateText ? (openBlock(), createBlock(_sfc_main$2, {
|
77
81
|
key: 0,
|
78
|
-
"semantic-type": _ctx.intermediateSemanticType
|
82
|
+
"semantic-type": _ctx.intermediateSemanticType,
|
79
83
|
loading: loadingIntermediate.value,
|
80
84
|
disabled: loadingAccept.value,
|
81
85
|
class: "w-full",
|
82
86
|
onClick: withModifiers(intermediate, ["stop", "prevent"])
|
83
87
|
}, {
|
84
88
|
default: withCtx(() => [
|
85
|
-
|
89
|
+
typeof _ctx.intermediateText === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
90
|
+
createTextVNode(toDisplayString(_ctx.intermediateText), 1)
|
91
|
+
], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.intermediateText), { key: 1 }))
|
86
92
|
]),
|
87
93
|
_: 1
|
88
94
|
}, 8, ["semantic-type", "loading", "disabled"])) : createCommentVNode("", true),
|
89
95
|
createVNode(_sfc_main$2, {
|
90
|
-
"semantic-type": _ctx.acceptSemanticType
|
96
|
+
"semantic-type": _ctx.acceptSemanticType,
|
91
97
|
loading: loadingAccept.value,
|
92
98
|
disabled: loadingIntermediate.value,
|
93
99
|
class: "w-full",
|
94
100
|
onClick: withModifiers(accept, ["stop", "prevent"])
|
95
101
|
}, {
|
96
102
|
default: withCtx(() => [
|
97
|
-
|
103
|
+
typeof _ctx.acceptText === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
104
|
+
createTextVNode(toDisplayString(_ctx.acceptText), 1)
|
105
|
+
], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.acceptText), { key: 1 }))
|
98
106
|
]),
|
99
107
|
_: 1
|
100
108
|
}, 8, ["semantic-type", "loading", "disabled"])
|
101
109
|
]),
|
102
110
|
default: withCtx(() => [
|
103
|
-
createElementVNode("div", _hoisted_1,
|
111
|
+
createElementVNode("div", _hoisted_1, [
|
112
|
+
typeof _ctx.description === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
113
|
+
createTextVNode(toDisplayString(_ctx.description), 1)
|
114
|
+
], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.description), { key: 1 }))
|
115
|
+
])
|
104
116
|
]),
|
105
117
|
_: 1
|
106
118
|
});
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { SemanticType } from '../../utils/SemanticType';
|
2
|
+
import { Component, VNode } from 'vue';
|
2
3
|
export interface ConfirmModalProps {
|
3
|
-
title: string;
|
4
|
-
description: string;
|
5
|
-
acceptText?: string;
|
4
|
+
title: string | VNode | Component;
|
5
|
+
description: string | VNode | Component;
|
6
|
+
acceptText?: string | VNode | Component;
|
6
7
|
acceptSemanticType?: SemanticType;
|
7
|
-
intermediateText?: string;
|
8
|
+
intermediateText?: string | VNode | Component;
|
8
9
|
intermediateSemanticType?: SemanticType;
|
9
|
-
cancelText?: string;
|
10
|
+
cancelText?: string | VNode | Component;
|
10
11
|
onAccept: () => void | Promise<void>;
|
11
12
|
onIntermediate?: () => void | Promise<void>;
|
12
13
|
onCancel?: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAC,SAAS,EAAE,KAAK,EAAC,MAAM,KAAK,CAAA;AAEzC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IACjC,WAAW,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IAEvC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IACvC,kBAAkB,CAAC,EAAE,YAAY,CAAA;IAEjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IAC7C,wBAAwB,CAAC,EAAE,YAAY,CAAA;IAEvC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IAEvC,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,cAAc,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltipContainer.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WTooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltipContainer.vue"],"names":[],"mappings":"AAgDA;AAmFA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA2L6zf,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;AAT1+f,wBAOG"}
|
@@ -44,13 +44,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
44
|
class: "isolate z-[10000]",
|
45
45
|
"onUpdate:rect": unref(close)
|
46
46
|
}, {
|
47
|
-
default: withCtx(({
|
47
|
+
default: withCtx(({ isTop }) => [
|
48
48
|
createVNode(_sfc_main$2, {
|
49
49
|
"tooltip-meta": unref(tooltipMeta),
|
50
|
-
left,
|
51
|
-
right,
|
52
|
-
top,
|
53
|
-
bottom,
|
54
50
|
"is-top": isTop,
|
55
51
|
"is-left": unref(tooltipMeta).left,
|
56
52
|
"is-right": unref(tooltipMeta).right,
|
@@ -63,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
59
|
})) : unref(tooltipMeta).text ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(unref(tooltipMeta).text), 1)) : createCommentVNode("", true)
|
64
60
|
]),
|
65
61
|
_: 2
|
66
|
-
}, 1032, ["tooltip-meta", "
|
62
|
+
}, 1032, ["tooltip-meta", "is-top", "is-left", "is-right"])
|
67
63
|
]),
|
68
64
|
_: 1
|
69
65
|
}, 8, ["parent-element", "horizontal-align", "max-height", "max-width", "top", "bottom", "onUpdate:rect"])) : createCommentVNode("", true)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/components/TooltipContainer.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"TooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/components/TooltipContainer.vue"],"names":[],"mappings":"AA4DA;AAAA,OA6EO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AAEtD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAWF,iBAAS,cAAc;WA8ET,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kBASnB,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,76 +1,17 @@
|
|
1
|
-
import { defineComponent,
|
2
|
-
import { isClientSide } from '../../../utils/utils.js';
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot } from 'vue';
|
3
2
|
|
4
3
|
const _hoisted_1 = ["viewBox"];
|
5
4
|
const _hoisted_2 = ["transform"];
|
6
|
-
const MARGIN = 12;
|
7
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
8
6
|
__name: "TooltipContainer",
|
9
7
|
props: {
|
10
8
|
tooltipMeta: {},
|
11
9
|
isTop: { type: Boolean },
|
12
|
-
left: {},
|
13
|
-
right: {},
|
14
|
-
top: {},
|
15
|
-
bottom: {},
|
16
10
|
isLeft: { type: Boolean },
|
17
11
|
isRight: { type: Boolean }
|
18
12
|
},
|
19
13
|
emits: ["over", "leave"],
|
20
14
|
setup(__props) {
|
21
|
-
const props = __props;
|
22
|
-
const containerRef = useTemplateRef("container");
|
23
|
-
const transformX = ref(0);
|
24
|
-
const transformY = ref(0);
|
25
|
-
const getTransformX = () => {
|
26
|
-
if (!isClientSide || !containerRef.value) return 0;
|
27
|
-
if (props.isLeft || props.isRight) return 0;
|
28
|
-
const l = props.left ? Number.parseFloat(props.left.slice(0, -2)) : null;
|
29
|
-
if (typeof l === "number") {
|
30
|
-
const containerLeft = l - containerRef.value.offsetWidth / 2 - MARGIN;
|
31
|
-
if (containerLeft < 0) return containerLeft * -1;
|
32
|
-
const containerRight = window.innerWidth - l - containerRef.value.offsetWidth / 2 - MARGIN;
|
33
|
-
if (containerRight < 0) return containerRight;
|
34
|
-
return 0;
|
35
|
-
}
|
36
|
-
const r = props.right ? Number.parseFloat(props.right.slice(0, -2)) : null;
|
37
|
-
if (typeof r === "number") {
|
38
|
-
const containerLeft = window.innerWidth - r - containerRef.value.offsetWidth / 2 - MARGIN;
|
39
|
-
if (containerLeft < 0) return containerLeft * -1;
|
40
|
-
const containerRight = r - containerRef.value.offsetWidth / 2 - MARGIN;
|
41
|
-
if (containerRight < 0) return containerRight;
|
42
|
-
return 0;
|
43
|
-
}
|
44
|
-
return 0;
|
45
|
-
};
|
46
|
-
const getTransformY = () => {
|
47
|
-
if (!isClientSide || !containerRef.value) return 0;
|
48
|
-
if (!props.isLeft && !props.isRight) return 0;
|
49
|
-
const t = props.top ? Number.parseFloat(props.top.slice(0, -2)) : null;
|
50
|
-
if (typeof t === "number") {
|
51
|
-
const containerTop = t - containerRef.value.offsetHeight / 2 - MARGIN;
|
52
|
-
if (containerTop < 0) return containerTop * -1;
|
53
|
-
const containerBottom = window.innerHeight - t - containerRef.value.offsetHeight / 2 - MARGIN;
|
54
|
-
if (containerBottom < 0) return containerBottom;
|
55
|
-
return 0;
|
56
|
-
}
|
57
|
-
const b = props.bottom ? Number.parseFloat(props.bottom.slice(0, -2)) : null;
|
58
|
-
if (typeof b === "number") {
|
59
|
-
const containerTop = window.innerHeight - b - containerRef.value.offsetHeight / 2 - MARGIN;
|
60
|
-
if (containerTop < 0) return containerTop * -1;
|
61
|
-
const containerBottom = b - containerRef.value.offsetHeight / 2 - MARGIN;
|
62
|
-
if (containerBottom < 0) return containerBottom;
|
63
|
-
return 0;
|
64
|
-
}
|
65
|
-
return 0;
|
66
|
-
};
|
67
|
-
const setTransform = async () => {
|
68
|
-
await nextTick();
|
69
|
-
transformX.value = getTransformX();
|
70
|
-
transformY.value = getTransformY();
|
71
|
-
};
|
72
|
-
watch(toRef(props, "tooltipMeta"), setTransform);
|
73
|
-
onMounted(setTransform);
|
74
15
|
return (_ctx, _cache) => {
|
75
16
|
return openBlock(), createElementBlock("div", {
|
76
17
|
class: normalizeClass(["pointer-events-none flex items-center", {
|
@@ -114,16 +55,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
114
55
|
], 42, _hoisted_1)),
|
115
56
|
createElementVNode("div", {
|
116
57
|
ref: "container",
|
117
|
-
class: "bg-black-default text-default pointer-events-auto max-w-[calc(100vw-1.5rem)]
|
118
|
-
style: normalizeStyle({
|
119
|
-
"--t-translate-x": transformX.value + "px",
|
120
|
-
"--t-translate-y": transformY.value + "px"
|
121
|
-
}),
|
58
|
+
class: normalizeClass(["bg-black-default text-default pointer-events-auto max-w-[calc(100vw-1.5rem)] rounded-lg border border-solid border-gray-400 px-3 py-2 text-center text-xs font-medium shadow-md will-change-transform dark:border-gray-600 dark:bg-gray-800", _ctx.isLeft || _ctx.isRight ? void 0 : "w-tooltip-center-x"]),
|
122
59
|
onMouseover: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("over")),
|
123
60
|
onMouseleave: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("leave"))
|
124
61
|
}, [
|
125
62
|
renderSlot(_ctx.$slots, "default")
|
126
|
-
],
|
63
|
+
], 34)
|
127
64
|
], 2);
|
128
65
|
};
|
129
66
|
}
|
package/dist/main.js
CHANGED
@@ -124,3 +124,4 @@ export { paginatedResponseUpdater, useQueryUpdater } from './utils/useQueryUpdat
|
|
124
124
|
export { useCopy } from './utils/useCopy.js';
|
125
125
|
export { BASE_ZINDEX_ACTIONS_BAR, BASE_ZINDEX_BOTTOM_SHEET, BASE_ZINDEX_DROPDOWN, BASE_ZINDEX_HEADER_BAR, BASE_ZINDEX_LIST_HEADER, BASE_ZINDEX_MODAL, BASE_ZINDEX_NAV_BAR, ListMode, Theme, debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getHasScrollbar, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIdArray, isIndex, isPage, numberCompactFormatter, numberFormatter, parseBoolean, parseId, parseIdList, parseIndex, parseInteger, parseIntegerList, parseJson, parseSliceIndexes, parseString, parseStringList, percentCompactFormatter, percentFormatter, set, throttle, unwrapSlots, wBaseZIndex } from './utils/utils.js';
|
126
126
|
export { validateForbiddenRegexp, validateRequired, validateRequiredSymbols } from './utils/validate.js';
|
127
|
+
export { updateExpirationDate } from './components/Auth/utils/utils.js';
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { LocationQuery } from 'vue-router';
|
2
|
+
export { updateExpirationDate } from '../components/Auth/utils/utils';
|
2
3
|
export declare const getURLParams: (params: RequestConfig["params"] | LocationQuery) => string;
|
3
4
|
type ApiUrl = `/${string}/`;
|
4
|
-
type BaseUrl = `/${string}`;
|
5
|
+
type BaseUrl = `/${string}` | `http://${string}` | `https://${string}`;
|
5
6
|
export interface ApiClient {
|
6
7
|
baseUrl: string;
|
7
8
|
get<R>(url: ApiUrl, config?: RequestConfig<never>): Promise<RequestResponse<R, NonNullable<unknown>>>;
|
@@ -15,6 +16,7 @@ export declare class ApiClientInstance implements ApiClient {
|
|
15
16
|
isAuthFailed: import('vue').Ref<boolean, boolean>;
|
16
17
|
constructor(config: {
|
17
18
|
tokenGetter?: () => string | null;
|
19
|
+
tokenRefresh?: () => Promise<void>;
|
18
20
|
refreshUrl?: ApiUrl;
|
19
21
|
onFailure?: (response: Response) => void;
|
20
22
|
credentials?: RequestCredentials;
|
@@ -30,7 +32,7 @@ export declare class ApiClientInstance implements ApiClient {
|
|
30
32
|
private refresh;
|
31
33
|
checkAuth(): boolean | null;
|
32
34
|
private fetch;
|
33
|
-
get baseUrl(): "" |
|
35
|
+
get baseUrl(): "" | BaseUrl;
|
34
36
|
get<R>(url: ApiUrl, config?: RequestConfig<never>): Promise<RequestResponse<R, {}>>;
|
35
37
|
post<R, D extends RequestData = RequestData>(url: ApiUrl, data?: Required<RequestConfig<D>>['data'], config?: Omit<RequestConfig<D>, 'data'>): Promise<RequestResponse<R, D>>;
|
36
38
|
patch<R, D extends RequestData = RequestData>(url: ApiUrl, data?: Required<RequestConfig<D>>['data'], config?: Omit<RequestConfig<D>, 'data'>): Promise<RequestResponse<R, D>>;
|
@@ -86,5 +88,4 @@ export declare class ApiClientInstance implements ApiClient {
|
|
86
88
|
};
|
87
89
|
addInstance(baseUrl: BaseUrl): ApiClient;
|
88
90
|
}
|
89
|
-
export {};
|
90
91
|
//# sourceMappingURL=ApiClient.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ApiClient.d.ts","sourceRoot":"","sources":["../../../src/utils/ApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAiB,MAAM,YAAY,CAAA;AAW7D,eAAO,MAAM,YAAY,GAAI,QAAQ,aAAa,CAAC,QAAQ,CAAC,GAAG,aAAa,KAAG,MAE9E,CAAA;AAWD,KAAK,MAAM,GAAG,IAAK,MAAO,GAAG,CAAA;AAC7B,KAAK,OAAO,GAAG,IAAK,MAAO,EAAE,CAAA;
|
1
|
+
{"version":3,"file":"ApiClient.d.ts","sourceRoot":"","sources":["../../../src/utils/ApiClient.ts"],"names":[],"mappings":"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"}
|
package/dist/utils/ApiClient.js
CHANGED
@@ -2,6 +2,7 @@ import { ref } from 'vue';
|
|
2
2
|
import _sfc_main from '../components/Auth/WRouteAuth.vue.js';
|
3
3
|
import _sfc_main$1 from '../components/Auth/WRouteAuthNo.vue.js';
|
4
4
|
import { removeExpirationDate, getLastRefreshPromise, setRefreshTimestamp, removeRefreshTimestamp, checkExpirationDate, setExpirationDate } from '../components/Auth/utils/utils.js';
|
5
|
+
export { updateExpirationDate } from '../components/Auth/utils/utils.js';
|
5
6
|
import { encodeQueryParams, ApiError, ApiErrorCancel } from './api.js';
|
6
7
|
|
7
8
|
const getURLParams = (params) => {
|
@@ -62,7 +63,8 @@ class ApiClientInstance {
|
|
62
63
|
});
|
63
64
|
} else {
|
64
65
|
setRefreshTimestamp();
|
65
|
-
this.
|
66
|
+
const promise = this.config.tokenRefresh ? this.config.tokenRefresh() : this.fetch("GET", this.config.refreshUrl, { updateToken: true });
|
67
|
+
this.refreshPromise = promise.then(() => {
|
66
68
|
this.refreshPromise = null;
|
67
69
|
}).catch((error) => {
|
68
70
|
this.refreshPromise = null;
|
@@ -75,7 +77,7 @@ class ApiClientInstance {
|
|
75
77
|
}
|
76
78
|
checkAuth() {
|
77
79
|
let result;
|
78
|
-
if (this.config.tokenGetter) result = !!this.config.tokenGetter?.();
|
80
|
+
if (this.config.tokenGetter && !this.config.tokenRefresh) result = !!this.config.tokenGetter?.();
|
79
81
|
else result = checkExpirationDate();
|
80
82
|
if (result) this.isAuthFailed.value = false;
|
81
83
|
return result;
|
@@ -87,12 +89,13 @@ class ApiClientInstance {
|
|
87
89
|
if (this.refreshPromise) await this.refreshPromise;
|
88
90
|
const check = this.checkAuth();
|
89
91
|
if (!check) {
|
90
|
-
if (check
|
92
|
+
if (check !== null && (this.config.refreshUrl || this.config.tokenRefresh)) await this.refresh();
|
93
|
+
if (!this.checkAuth()) {
|
91
94
|
this.isAuthFailed.value = true;
|
92
95
|
return Promise.reject();
|
93
96
|
}
|
94
|
-
|
95
|
-
|
97
|
+
}
|
98
|
+
if (this.config.tokenGetter) {
|
96
99
|
const token = this.config.tokenGetter();
|
97
100
|
if (token) headers.append("Authorization", "Bearer " + token);
|
98
101
|
else return Promise.reject();
|
@@ -124,7 +127,7 @@ class ApiClientInstance {
|
|
124
127
|
});
|
125
128
|
} else {
|
126
129
|
if (response.status === 401) {
|
127
|
-
if (this.config.refreshUrl) return this.refresh().then(() => this.retry(request));
|
130
|
+
if (this.config.refreshUrl || this.config.tokenRefresh) return this.refresh().then(() => this.retry(request));
|
128
131
|
this.isAuthFailed.value = true;
|
129
132
|
}
|
130
133
|
this.config.onFailure?.(response);
|
@@ -174,7 +177,7 @@ class ApiClientInstance {
|
|
174
177
|
if (to.meta.noAuth) return;
|
175
178
|
if (this.refreshPromise) await this.refreshPromise;
|
176
179
|
if (!this.checkAuth()) {
|
177
|
-
if (this.config.refreshUrl) return this.refresh().catch(() => ({
|
180
|
+
if (this.config.refreshUrl || this.config.tokenRefresh) return this.refresh().catch(() => ({
|
178
181
|
name: this.routeNameAuthNo,
|
179
182
|
query: to.fullPath !== "/" ? { hash: to.fullPath } : void 0
|
180
183
|
}));
|
package/dist/utils/Modal.d.ts
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
import { ConfirmModalProps } from '../components/Modal/types';
|
2
2
|
import { Component, ComponentOptions, MethodOptions } from 'vue';
|
3
|
-
export type ModalComponent<Props> = Component<Props,
|
3
|
+
export type ModalComponent<Props> = Component<Props, {
|
4
|
+
formRef?: {
|
5
|
+
hasChanges?: boolean;
|
6
|
+
};
|
7
|
+
}, any, ComponentOptions, MethodOptions, {
|
4
8
|
'close:modal': () => void;
|
5
9
|
}>;
|
6
10
|
export type AddModal<Props> = (component: ModalComponent<Props>, props?: Props, cb?: () => void, autoclose?: boolean) => (() => void);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/utils/Modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAA;AAE/D,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAgC,MAAM,KAAK,CAAA;AAI5G,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,SAAS,CAC3C,KAAK,
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/utils/Modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAA;AAE/D,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAgC,MAAM,KAAK,CAAA;AAI5G,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,SAAS,CAC3C,KAAK,EACL;IAAC,OAAO,CAAC,EAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAC,CAAA;CAAC,EAElC,GAAG,EACH,gBAAgB,EAChB,aAAa,EACb;IACE,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B,CACF,CAAA;AAED,MAAM,MAAM,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC,CAAA;AAKrI,eAAO,MAAM,SAAS,GAAI,KAAK,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,SAAS,SAElE,CAAA;AAED,eAAO,MAAM,KAAK;QACZ,KAAK,aAAa,cAAc,CAAC,KAAK,CAAC,UAAU,KAAK,OAAO,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;oBAIjF,KAAK,aAAa,cAAc,CAAC,KAAK,CAAC,UAAU,KAAK,OAAO,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;sBAI3F,iBAAiB,OAAO,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;CAQ3E,CAAA"}
|
@@ -3,7 +3,7 @@ import { reactive } from 'vue';
|
|
3
3
|
var SemanticType = /* @__PURE__ */ ((SemanticType2) => {
|
4
4
|
SemanticType2["PRIMARY"] = "primary";
|
5
5
|
SemanticType2["SECONDARY"] = "secondary";
|
6
|
-
SemanticType2["
|
6
|
+
SemanticType2["NEGATIVE"] = "negative";
|
7
7
|
SemanticType2["POSITIVE"] = "positive";
|
8
8
|
SemanticType2["WARNING"] = "warning";
|
9
9
|
SemanticType2["INFO"] = "info";
|
@@ -12,7 +12,7 @@ var SemanticType = /* @__PURE__ */ ((SemanticType2) => {
|
|
12
12
|
const semanticTypeConfig = reactive({
|
13
13
|
["primary" /* PRIMARY */]: "bg-primary dark:bg-primary-dark text-default",
|
14
14
|
["secondary" /* SECONDARY */]: "bg-default dark:bg-default-dark text-accent",
|
15
|
-
["negative" /*
|
15
|
+
["negative" /* NEGATIVE */]: "bg-negative dark:bg-negative-dark text-default",
|
16
16
|
["positive" /* POSITIVE */]: "bg-positive dark:bg-positive-dark text-default",
|
17
17
|
["warning" /* WARNING */]: "bg-warning dark:bg-warning-dark text-black-default dark:text-default-dark ",
|
18
18
|
["info" /* INFO */]: "bg-info dark:bg-info-dark text-default"
|
@@ -36,7 +36,7 @@ const setSemanticTypeChipMap = (value) => {
|
|
36
36
|
const semanticTypeBorderMap = reactive({
|
37
37
|
["primary" /* PRIMARY */]: "border-solid border-primary dark:border-primary-dark",
|
38
38
|
["secondary" /* SECONDARY */]: "border-solid border-gray-300 dark:border-gray-700",
|
39
|
-
["negative" /*
|
39
|
+
["negative" /* NEGATIVE */]: "border-solid border-negative dark:border-negative-dark",
|
40
40
|
["positive" /* POSITIVE */]: "border-solid border-positive dark:border-positive-dark",
|
41
41
|
["warning" /* WARNING */]: "border-solid border-warning dark:border-warning-dark",
|
42
42
|
["info" /* INFO */]: "border-solid border-info dark:border-info-dark"
|
@@ -50,7 +50,7 @@ const setSemanticTypeBorderMap = (value) => {
|
|
50
50
|
const semanticTypeTextStylesMap = reactive({
|
51
51
|
["primary" /* PRIMARY */]: "text-primary dark:text-primary-dark",
|
52
52
|
["secondary" /* SECONDARY */]: "text-description",
|
53
|
-
["negative" /*
|
53
|
+
["negative" /* NEGATIVE */]: "text-negative dark:text-negative-dark",
|
54
54
|
["positive" /* POSITIVE */]: "text-positive dark:text-positive-dark",
|
55
55
|
["warning" /* WARNING */]: "text-warning dark:text-warning-dark",
|
56
56
|
["info" /* INFO */]: "text-info dark:text-info-dark"
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import stylistic from '@stylistic/eslint-plugin'
|
2
2
|
import unusedImports from 'eslint-plugin-unused-imports'
|
3
3
|
import pluginVue from 'eslint-plugin-vue'
|
4
|
-
// eslint-disable-next-line import/no-unresolved
|
5
4
|
import {parser as tseslintParser, plugin as tseslintPlugin} from 'typescript-eslint'
|
6
5
|
|
7
6
|
export default [
|
package/package.json
CHANGED
@@ -4,18 +4,18 @@
|
|
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.100",
|
8
8
|
"dependencies": {
|
9
|
-
"@stylistic/eslint-plugin": "5.2.
|
10
|
-
"@tanstack/eslint-plugin-query": "5.
|
9
|
+
"@stylistic/eslint-plugin": "5.2.3",
|
10
|
+
"@tanstack/eslint-plugin-query": "5.83.1",
|
11
11
|
"@vue/eslint-config-typescript": "14.6.0",
|
12
12
|
"eslint-import-resolver-typescript": "4.4.4",
|
13
13
|
"eslint-plugin-import": "2.32.0",
|
14
14
|
"eslint-plugin-jsonc": "2.20.1",
|
15
|
-
"eslint-plugin-svgo": "0.
|
15
|
+
"eslint-plugin-svgo": "0.11.1",
|
16
16
|
"eslint-plugin-tailwindcss": "3.18.2",
|
17
|
-
"eslint-plugin-unused-imports": "4.
|
18
|
-
"eslint-plugin-vue": "10.
|
17
|
+
"eslint-plugin-unused-imports": "4.2.0",
|
18
|
+
"eslint-plugin-vue": "10.4.0"
|
19
19
|
},
|
20
20
|
"peerDependencies": {
|
21
21
|
"@tanstack/vue-query": ">=5.59.0",
|
@@ -188,6 +188,15 @@ const pluginDefault = plugin(function ({matchUtilities, addVariant, addUtilities
|
|
188
188
|
},
|
189
189
|
})
|
190
190
|
|
191
|
+
addBase({
|
192
|
+
'.w-tooltip-center-x': {
|
193
|
+
transform: 'translate(calc(min(100vw - var(--dropdown-x, 0px) - 50% - 12px, max((var(--dropdown-x, 0px) - 50% - 12px) * -1, 0px))), 0)',
|
194
|
+
},
|
195
|
+
'.w-tooltip-center-y': {
|
196
|
+
transform: 'translate(0, calc(min(100vh - var(--dropdown-y, 0px) - 50% - 12px, max((var(--dropdown-y, 0px) - 50% - 12px) * -1, 0px))))',
|
197
|
+
},
|
198
|
+
})
|
199
|
+
|
191
200
|
matchUtilities(
|
192
201
|
{
|
193
202
|
'w-scroll-bar-color': value => {
|