eco-vue-js 0.10.75 → 0.10.77
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/WRouteAuth.vue.d.ts +7 -0
- package/dist/components/Auth/WRouteAuth.vue.d.ts.map +1 -0
- package/dist/components/Auth/WRouteAuth.vue.js +38 -0
- package/dist/components/Auth/WRouteAuth.vue2.js +5 -0
- package/dist/components/Auth/WRouteAuthNo.vue.d.ts +7 -0
- package/dist/components/Auth/WRouteAuthNo.vue.d.ts.map +1 -0
- package/dist/components/Auth/WRouteAuthNo.vue.js +51 -0
- package/dist/components/Auth/WRouteAuthNo.vue2.js +5 -0
- package/dist/components/Auth/utils/utils.d.ts +7 -0
- package/dist/components/Auth/utils/utils.d.ts.map +1 -0
- package/dist/components/Auth/utils/utils.js +61 -0
- package/dist/components/Button/types.d.ts +2 -5
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/DragContainer/use/useDragContainer.js +2 -2
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue.js +1 -1
- package/dist/components/Input/WInputDate.vue.d.ts +1 -1
- package/dist/components/Modal/WModalStepper.vue.d.ts +4 -4
- package/dist/components/Select/WSelect.vue.d.ts +3 -15
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +10 -4
- package/dist/components/Select/WSelectAsync.vue.d.ts +3 -17
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +6 -4
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +3 -12
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncList.vue.js +4 -2
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +11 -11
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +3 -8
- package/dist/components/Select/WSelectSingle.vue.d.ts +12 -11
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +3 -8
- package/dist/components/Select/WSelectStringified.vue.d.ts +3 -13
- package/dist/components/Select/WSelectStringified.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectStringified.vue.js +3 -8
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +3 -12
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncList.vue.js +8 -4
- package/dist/components/Select/types.d.ts +5 -4
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.d.ts +4 -4
- package/dist/components/Tabs/components/TabItem.vue.d.ts +2 -2
- package/dist/imports/componentsPlugin.d.ts +3 -1
- package/dist/imports/componentsPlugin.d.ts.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -0
- package/dist/types/global.d.ts +9 -1
- package/dist/utils/ApiClient.d.ts +89 -0
- package/dist/utils/ApiClient.d.ts.map +1 -0
- package/dist/utils/ApiClient.js +225 -0
- package/package.json +10 -10
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ApiClientInstance } from '../../utils/ApiClient';
|
2
|
+
type __VLS_Props = {
|
3
|
+
apiClientInstance: ApiClientInstance;
|
4
|
+
};
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
6
|
+
export default _default;
|
7
|
+
//# sourceMappingURL=WRouteAuth.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WRouteAuth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/WRouteAuth.vue"],"names":[],"mappings":"AAGA;AAgDA,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,mBAAmB,CAAA;AAExD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,iBAAiB,CAAA;CACrC,CAAC;;AA2EF,wBAOG"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { defineComponent, watch, onBeforeUnmount, createBlock, openBlock, unref } from 'vue';
|
2
|
+
import { useRouter, useRoute, RouterView } from 'vue-router';
|
3
|
+
import '@tanstack/vue-query';
|
4
|
+
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
6
|
+
__name: "WRouteAuth",
|
7
|
+
props: {
|
8
|
+
apiClientInstance: {}
|
9
|
+
},
|
10
|
+
setup(__props) {
|
11
|
+
const props = __props;
|
12
|
+
const router = useRouter();
|
13
|
+
const route = useRoute();
|
14
|
+
const redirect = () => {
|
15
|
+
router.push({ name: props.apiClientInstance.routeNameAuthNo, query: route.fullPath !== "/" ? { hash: route.fullPath } : void 0 });
|
16
|
+
};
|
17
|
+
const checkAuth = () => {
|
18
|
+
if (props.apiClientInstance.checkAuth()) return;
|
19
|
+
{
|
20
|
+
if (props.apiClientInstance.refreshPromise) {
|
21
|
+
redirect();
|
22
|
+
}
|
23
|
+
}
|
24
|
+
};
|
25
|
+
watch(() => props.apiClientInstance.isAuthFailed.value, (value) => {
|
26
|
+
if (value) redirect();
|
27
|
+
});
|
28
|
+
window.addEventListener("storage", checkAuth);
|
29
|
+
onBeforeUnmount(() => {
|
30
|
+
window.removeEventListener("storage", checkAuth);
|
31
|
+
});
|
32
|
+
return (_ctx, _cache) => {
|
33
|
+
return openBlock(), createBlock(unref(RouterView));
|
34
|
+
};
|
35
|
+
}
|
36
|
+
});
|
37
|
+
|
38
|
+
export { _sfc_main as default };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ApiClientInstance } from '../../utils/ApiClient';
|
2
|
+
type __VLS_Props = {
|
3
|
+
apiClientInstance: ApiClientInstance;
|
4
|
+
};
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
6
|
+
export default _default;
|
7
|
+
//# sourceMappingURL=WRouteAuthNo.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WRouteAuthNo.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/WRouteAuthNo.vue"],"names":[],"mappings":"AAGA;AA6DA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAA;AAMxD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,iBAAiB,CAAA;CACrC,CAAC;;AAyFF,wBAOG"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { defineComponent, ref, watch, onBeforeMount, onBeforeUnmount, resolveComponent, createBlock, openBlock } from 'vue';
|
2
|
+
import { useQueryClient } from '@tanstack/vue-query';
|
3
|
+
import { useRouter, useRoute } from 'vue-router';
|
4
|
+
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
6
|
+
__name: "WRouteAuthNo",
|
7
|
+
props: {
|
8
|
+
apiClientInstance: {}
|
9
|
+
},
|
10
|
+
setup(__props) {
|
11
|
+
const props = __props;
|
12
|
+
const router = useRouter();
|
13
|
+
const route = useRoute();
|
14
|
+
const queryClient = useQueryClient();
|
15
|
+
const queryEnabled = ref(false);
|
16
|
+
const redirect = async () => {
|
17
|
+
if (typeof route.query.hash === "string" && route.query.hash && route.query.hash !== "/") {
|
18
|
+
const resolved = router.resolve(route.query.hash);
|
19
|
+
if (!resolved.matched.length) {
|
20
|
+
await router.replace({ name: props.apiClientInstance.routeNameAuth });
|
21
|
+
} else {
|
22
|
+
await router.replace(resolved);
|
23
|
+
}
|
24
|
+
} else {
|
25
|
+
await router.replace({ name: props.apiClientInstance.routeNameAuth });
|
26
|
+
}
|
27
|
+
};
|
28
|
+
const checkLogin = () => {
|
29
|
+
if (!props.apiClientInstance.checkAuth()) return;
|
30
|
+
redirect();
|
31
|
+
};
|
32
|
+
watch(() => props.apiClientInstance.isAuthFailed.value, (value) => {
|
33
|
+
if (value) return;
|
34
|
+
redirect();
|
35
|
+
});
|
36
|
+
onBeforeMount(() => {
|
37
|
+
window.addEventListener("storage", checkLogin);
|
38
|
+
queryClient.clear();
|
39
|
+
queryEnabled.value = true;
|
40
|
+
});
|
41
|
+
onBeforeUnmount(() => {
|
42
|
+
window.removeEventListener("storage", checkLogin);
|
43
|
+
});
|
44
|
+
return (_ctx, _cache) => {
|
45
|
+
const _component_RouterView = resolveComponent("RouterView");
|
46
|
+
return openBlock(), createBlock(_component_RouterView);
|
47
|
+
};
|
48
|
+
}
|
49
|
+
});
|
50
|
+
|
51
|
+
export { _sfc_main as default };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare function checkExpirationDate(): boolean | null;
|
2
|
+
export declare function setExpirationDate(): void;
|
3
|
+
export declare function removeExpirationDate(): void;
|
4
|
+
export declare function setRefreshTimestamp(): void;
|
5
|
+
export declare function removeRefreshTimestamp(): void;
|
6
|
+
export declare function getLastRefreshPromise(): Promise<void> | null;
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Auth/utils/utils.ts"],"names":[],"mappings":"AAmBA,wBAAgB,mBAAmB,IAAI,OAAO,GAAG,IAAI,CAMpD;AAED,wBAAgB,iBAAiB,SAMhC;AAED,wBAAgB,oBAAoB,SAGnC;AAID,wBAAgB,mBAAmB,SAQlC;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAwB5D"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
const EXPIRATION_DATE_KEY = "exp";
|
2
|
+
const REFRESH_TIMESTAMP_KEY = "refresh-ts";
|
3
|
+
const REFRESH_BUFFER_TIMEOUT = 3 * 1e3;
|
4
|
+
const REFRESH_BUFFER_TICK = 1e3;
|
5
|
+
function getCookie(name) {
|
6
|
+
name = name + "=";
|
7
|
+
for (const item of decodeURIComponent(document.cookie).split("; ")) {
|
8
|
+
if (item.startsWith(name)) return item.substring(name.length);
|
9
|
+
}
|
10
|
+
return "";
|
11
|
+
}
|
12
|
+
function deleteCookie(name) {
|
13
|
+
document.cookie = name + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
|
14
|
+
}
|
15
|
+
function checkExpirationDate() {
|
16
|
+
const exp = Number.parseFloat(getCookie(EXPIRATION_DATE_KEY));
|
17
|
+
if (!exp || !Number.isFinite(exp)) return null;
|
18
|
+
return exp > Date.now() / 1e3;
|
19
|
+
}
|
20
|
+
function setExpirationDate() {
|
21
|
+
const exp = Number.parseFloat(getCookie(EXPIRATION_DATE_KEY));
|
22
|
+
if (!exp || !Number.isFinite(exp)) return;
|
23
|
+
localStorage.setItem(EXPIRATION_DATE_KEY, exp.toString());
|
24
|
+
}
|
25
|
+
function removeExpirationDate() {
|
26
|
+
localStorage.removeItem(EXPIRATION_DATE_KEY);
|
27
|
+
deleteCookie(EXPIRATION_DATE_KEY);
|
28
|
+
}
|
29
|
+
let refreshTimestampTimeout = null;
|
30
|
+
function setRefreshTimestamp() {
|
31
|
+
localStorage.setItem(REFRESH_TIMESTAMP_KEY, (/* @__PURE__ */ new Date()).getTime().toString());
|
32
|
+
if (refreshTimestampTimeout) clearTimeout(refreshTimestampTimeout);
|
33
|
+
refreshTimestampTimeout = setTimeout(() => {
|
34
|
+
localStorage.removeItem(REFRESH_TIMESTAMP_KEY);
|
35
|
+
}, REFRESH_BUFFER_TIMEOUT);
|
36
|
+
}
|
37
|
+
function removeRefreshTimestamp() {
|
38
|
+
localStorage.removeItem(REFRESH_TIMESTAMP_KEY);
|
39
|
+
}
|
40
|
+
function getLastRefreshPromise() {
|
41
|
+
const lastRefreshTimeStamp = Number.parseInt(localStorage.getItem(REFRESH_TIMESTAMP_KEY) ?? "");
|
42
|
+
if (!Number.isInteger(lastRefreshTimeStamp) || lastRefreshTimeStamp <= 0) return null;
|
43
|
+
const diff = (/* @__PURE__ */ new Date()).getTime() - lastRefreshTimeStamp;
|
44
|
+
if (diff <= 0 || diff > REFRESH_BUFFER_TIMEOUT) return null;
|
45
|
+
let count = Math.floor((REFRESH_BUFFER_TIMEOUT - diff) / REFRESH_BUFFER_TICK);
|
46
|
+
return new Promise((resolve, reject) => {
|
47
|
+
const interval = setInterval(async () => {
|
48
|
+
if (count < 1) {
|
49
|
+
clearInterval(interval);
|
50
|
+
reject(new Error("Timed out"));
|
51
|
+
} else if (checkExpirationDate()) {
|
52
|
+
clearInterval(interval);
|
53
|
+
resolve();
|
54
|
+
} else {
|
55
|
+
count--;
|
56
|
+
}
|
57
|
+
}, REFRESH_BUFFER_TICK);
|
58
|
+
});
|
59
|
+
}
|
60
|
+
|
61
|
+
export { checkExpirationDate, getLastRefreshPromise, removeExpirationDate, removeRefreshTimestamp, setExpirationDate, setRefreshTimestamp };
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { SelectOptionProps } from '../Select/types';
|
1
2
|
import { DropdownMenuProps } from '../DropdownMenu/types';
|
2
3
|
import { FieldWrapperProps } from '../FieldWrapper/types';
|
3
4
|
import { LinkProps } from '../../types/types';
|
@@ -17,11 +18,7 @@ export interface ButtonProps extends Partial<LinkProps> {
|
|
17
18
|
download?: string;
|
18
19
|
skeleton?: boolean;
|
19
20
|
}
|
20
|
-
export type
|
21
|
-
option: Option;
|
22
|
-
selected?: boolean;
|
23
|
-
};
|
24
|
-
export type ButtonGroupOptionComponent<Option> = Component<ButtonGroupOptionProps<Option>>;
|
21
|
+
export type ButtonGroupOptionComponent<Option> = Component<SelectOptionProps<Option>>;
|
25
22
|
interface ButtonGroupPropsBase<Model extends number | string | null | boolean> extends Omit<FieldWrapperProps, 'modelValue'>, Omit<ButtonProps, 'tag' | 'type' | 'replace' | 'href' | 'target' | 'join'> {
|
26
23
|
modelValue: Model;
|
27
24
|
wrap?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAElC,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,SAAS,CAAC;IACrD,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IAChD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,i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IAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAA;CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,SAAS,IAAI,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;AAEjT,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAAC,EAC1J,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAAC,CAAC;IAC9E,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
@@ -3,10 +3,11 @@ import '../../Button/WButtonAction.vue.js';
|
|
3
3
|
import '../../../utils/SemanticType.js';
|
4
4
|
import { genId } from '../../../utils/utils.js';
|
5
5
|
import '../../ActionsBar/use/useActionsBarFilter.js';
|
6
|
+
import 'vue-router';
|
7
|
+
import '@tanstack/vue-query';
|
6
8
|
import '../../Button/WButton.vue.js';
|
7
9
|
import '../../../utils/mobile.js';
|
8
10
|
import '../../Button/WButtonDropdown.vue.js';
|
9
|
-
import 'vue-router';
|
10
11
|
import '../../../utils/supportsPassive.js';
|
11
12
|
import '../../Dropdown/utils/DropdownStyle.js';
|
12
13
|
import '../../../utils/Modal.js';
|
@@ -17,7 +18,6 @@ import '../../HeaderBar/use/useHeaderSearchVisible.js';
|
|
17
18
|
import '../../InfoCard/models/utils.js';
|
18
19
|
import '../../Input/WInputDate.vue.js';
|
19
20
|
import '../../Link/WLink.vue.js';
|
20
|
-
import '@tanstack/vue-query';
|
21
21
|
import '../../List/use/useListConfig.js';
|
22
22
|
import '../../Modal/use/useIsBackdrop.js';
|
23
23
|
import '../../Page/use/usePageBreadcrumbs.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputAsync.vue"],"names":[],"mappings":"AAwFA;AAyOA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;yBAW3B,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,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,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;
|
1
|
+
{"version":3,"file":"WInputAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputAsync.vue"],"names":[],"mappings":"AAwFA;AAyOA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;yBAW3B,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,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,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAyXO,mBAAmB,CAAC;;iLAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAhDiB,GAAG;0BACA,GAAG;uBACN,GAAG;;cApUzB,mBAAmB,SAAS,4CAAa,SAAS,KAAG,IAAI;EAsX3D,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AApYzE,wBAoY4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -167,7 +167,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
167
167
|
"onKeypress:enter": handleEnterPress,
|
168
168
|
onClick: open,
|
169
169
|
onBlur: _cache[0] || (_cache[0] = ($event) => {
|
170
|
-
toggle();
|
170
|
+
props.textSecure && !value.value ? cancel() : toggle();
|
171
171
|
focused.value = false;
|
172
172
|
}),
|
173
173
|
onFocus: _cache[1] || (_cache[1] = ($event) => focused.value = true),
|
@@ -25,9 +25,9 @@ declare const __VLS_component: import('vue').DefineComponent<InputDateProps, {},
|
|
25
25
|
"onUpdate:model-value"?: ((value: Date | undefined) => any) | undefined;
|
26
26
|
}>, {
|
27
27
|
maxHeight: number;
|
28
|
+
modelValue: Date;
|
28
29
|
maxWidth: number;
|
29
30
|
horizontalAlign: HorizontalAlign;
|
30
|
-
modelValue: Date;
|
31
31
|
minDate: Date;
|
32
32
|
maxDate: Date;
|
33
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
@@ -128,7 +128,7 @@ declare function __VLS_template(): {
|
|
128
128
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
129
129
|
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
130
130
|
"onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
|
131
|
-
}>, "
|
131
|
+
}>, "isValid" | "hasChanges" | "hasChangesMap" | "hasValue" | "hasValueMap" | "hasShown" | "hasShownMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessage" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
|
132
132
|
isValid: import('vue').ComputedRef<boolean>;
|
133
133
|
hasChanges: import('vue').Ref<boolean, boolean>;
|
134
134
|
hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
|
@@ -383,7 +383,7 @@ declare function __VLS_template(): {
|
|
383
383
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
384
384
|
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
385
385
|
"onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
|
386
|
-
}>, "
|
386
|
+
}>, "isValid" | "hasChanges" | "hasChangesMap" | "hasValue" | "hasValueMap" | "hasShown" | "hasShownMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessage" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
|
387
387
|
isValid: import('vue').ComputedRef<boolean>;
|
388
388
|
hasChanges: import('vue').Ref<boolean, boolean>;
|
389
389
|
hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
|
@@ -683,7 +683,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
683
683
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
684
684
|
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
685
685
|
"onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
|
686
|
-
}>, "
|
686
|
+
}>, "isValid" | "hasChanges" | "hasChangesMap" | "hasValue" | "hasValueMap" | "hasShown" | "hasShownMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessage" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
|
687
687
|
isValid: import('vue').ComputedRef<boolean>;
|
688
688
|
hasChanges: import('vue').Ref<boolean, boolean>;
|
689
689
|
hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
|
@@ -938,7 +938,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
938
938
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
939
939
|
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
940
940
|
"onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
|
941
|
-
}>, "
|
941
|
+
}>, "isValid" | "hasChanges" | "hasChangesMap" | "hasValue" | "hasValueMap" | "hasShown" | "hasShownMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessage" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
|
942
942
|
isValid: import('vue').ComputedRef<boolean>;
|
943
943
|
hasChanges: import('vue').Ref<boolean, boolean>;
|
944
944
|
hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SelectOptionComponent, SelectProps } from './types';
|
1
|
+
import { SelectOptionComponent, SelectOptionProps, SelectProps } from './types';
|
2
2
|
declare const _default: <Model extends number | string, Data extends DefaultData, QueryParamsOptions, OptionComponent extends SelectOptionComponent<Data>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
4
|
readonly onSelect?: ((item: Model) => any) | undefined;
|
@@ -17,24 +17,12 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
17
17
|
slots: Readonly<{
|
18
18
|
title?: () => void;
|
19
19
|
subtitle?: () => void;
|
20
|
-
option?: (props:
|
21
|
-
option: Data | null | undefined;
|
22
|
-
index?: number;
|
23
|
-
selected: boolean;
|
24
|
-
model: boolean;
|
25
|
-
search?: string;
|
26
|
-
}) => void;
|
20
|
+
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
27
21
|
right?: () => void;
|
28
22
|
}> & {
|
29
23
|
title?: () => void;
|
30
24
|
subtitle?: () => void;
|
31
|
-
option?: (props:
|
32
|
-
option: Data | null | undefined;
|
33
|
-
index?: number;
|
34
|
-
selected: boolean;
|
35
|
-
model: boolean;
|
36
|
-
search?: string;
|
37
|
-
}) => void;
|
25
|
+
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
38
26
|
right?: () => void;
|
39
27
|
};
|
40
28
|
emit: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AA8KA;AAgcA,OAAO,KAAK,EAAC,qBAAqB,EAA8B,iBAAiB,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;yBAa7F,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAChJ,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,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAoqBO,mBAAmB,CAAC;;;;;;;sSAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;2BAjdrB,MAAM,KAAG,IAAI;MAid8B,GAAG,IAAI;WACpE,GAAG;;gBAnaD,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;gBACrD,MAAM,IAAI;;gBAHV,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;gBACrD,MAAM,IAAI;;;YA/Pd,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;EA8pBrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA/qBzE,wBA+qB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -304,7 +304,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
304
304
|
renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, optionScope, {
|
305
305
|
selected: true,
|
306
306
|
model: true,
|
307
|
-
index
|
307
|
+
index,
|
308
|
+
skeleton: false
|
308
309
|
}))
|
309
310
|
]),
|
310
311
|
key: "0"
|
@@ -331,10 +332,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
331
332
|
default: withCtx(() => [
|
332
333
|
search.value && !isModelValueSearch.value ? renderSlot(_ctx.$slots, "option", {
|
333
334
|
key: 0,
|
334
|
-
option:
|
335
|
+
option: void 0,
|
335
336
|
search: search.value,
|
336
337
|
selected: false,
|
337
|
-
model: false
|
338
|
+
model: false,
|
339
|
+
index: void 0,
|
340
|
+
skeleton: false
|
338
341
|
}, () => [
|
339
342
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.optionComponent), mergeProps(_ctx.optionComponentProps, {
|
340
343
|
option: null,
|
@@ -372,7 +375,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
372
375
|
renderSlot(_ctx.$slots, "option", {
|
373
376
|
option,
|
374
377
|
selected,
|
375
|
-
model: false
|
378
|
+
model: false,
|
379
|
+
index,
|
380
|
+
skeleton: false,
|
381
|
+
search: search.value
|
376
382
|
}, () => [
|
377
383
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.optionComponent), mergeProps({ ref_for: true }, _ctx.optionComponentProps, {
|
378
384
|
option,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SelectAsyncProps, SelectOptionComponent } from './types';
|
1
|
+
import { SelectAsyncProps, SelectOptionComponent, SelectOptionProps } from './types';
|
2
2
|
declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
4
|
readonly onSelect?: ((item: Model) => any) | undefined;
|
@@ -18,26 +18,12 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
18
18
|
title?: () => void;
|
19
19
|
subtitle?: () => void;
|
20
20
|
right?: (props: Record<string, never>) => void;
|
21
|
-
option?: (props:
|
22
|
-
option: Data | null;
|
23
|
-
index?: number;
|
24
|
-
selected: boolean;
|
25
|
-
skeleton: boolean;
|
26
|
-
model: boolean;
|
27
|
-
search?: string;
|
28
|
-
}) => void;
|
21
|
+
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
29
22
|
}> & {
|
30
23
|
title?: () => void;
|
31
24
|
subtitle?: () => void;
|
32
25
|
right?: (props: Record<string, never>) => void;
|
33
|
-
option?: (props:
|
34
|
-
option: Data | null;
|
35
|
-
index?: number;
|
36
|
-
selected: boolean;
|
37
|
-
skeleton: boolean;
|
38
|
-
model: boolean;
|
39
|
-
search?: string;
|
40
|
-
}) => void;
|
26
|
+
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
41
27
|
};
|
42
28
|
emit: {
|
43
29
|
(e: "select", item: Model): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AA6HA;AAmTA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA8B,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAWlG,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACzI,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,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAwgBO,mBAAmB,CAAC;;;;;;;2RAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;2BAnYrB,MAAM,KAAG,IAAI;MAmY8B,GAAG,IAAI;WACpE,GAAG;;gBAjWD,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;gBAHrD,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;;YA9JzD,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC1C,YAAY,GAAG,IAAI;YACnB,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;EA2flC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAnhBzE,wBAmhB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -232,11 +232,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
232
232
|
name: "option",
|
233
233
|
fn: withCtx(({ option, index }) => [
|
234
234
|
renderSlot(_ctx.$slots, "option", {
|
235
|
-
option
|
235
|
+
option,
|
236
236
|
index,
|
237
237
|
selected: true,
|
238
238
|
model: true,
|
239
|
-
skeleton: false
|
239
|
+
skeleton: false,
|
240
|
+
search: void 0
|
240
241
|
})
|
241
242
|
]),
|
242
243
|
key: "0"
|
@@ -262,13 +263,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
262
263
|
"onCreate:option": _cache[1] || (_cache[1] = ($event) => create(search.value)),
|
263
264
|
"onUpdate:modelValue": updateSelected
|
264
265
|
}, {
|
265
|
-
default: withCtx(({ option, selected, skeleton: skeletonList }) => [
|
266
|
+
default: withCtx(({ option, selected, skeleton: skeletonList, index }) => [
|
266
267
|
renderSlot(_ctx.$slots, "option", {
|
267
268
|
option,
|
268
269
|
selected,
|
269
270
|
skeleton: skeletonList,
|
270
271
|
model: false,
|
271
|
-
search: search.value
|
272
|
+
search: search.value,
|
273
|
+
index
|
272
274
|
}, () => [
|
273
275
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.optionComponent), mergeProps(_ctx.optionComponentProps, {
|
274
276
|
option,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { SelectOptionProps } from './types';
|
1
2
|
declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
2
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
3
4
|
readonly onSelect?: ((value: Model) => any) | undefined;
|
@@ -21,19 +22,9 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
21
22
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
22
23
|
attrs: any;
|
23
24
|
slots: Readonly<{
|
24
|
-
default?: (props:
|
25
|
-
option: Data | null;
|
26
|
-
selected: boolean;
|
27
|
-
skeleton: boolean;
|
28
|
-
model: boolean;
|
29
|
-
}) => void;
|
25
|
+
default?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
30
26
|
}> & {
|
31
|
-
default?: (props:
|
32
|
-
option: Data | null;
|
33
|
-
selected: boolean;
|
34
|
-
skeleton: boolean;
|
35
|
-
model: boolean;
|
36
|
-
}) => void;
|
27
|
+
default?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
37
28
|
};
|
38
29
|
emit: {
|
39
30
|
(e: "select", value: Model): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncList.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncList.vue"],"names":[],"mappings":"AAwDA;AAqGA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAO7B,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EACpF,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,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAgNO,mBAAmB,CAAC;;;;;;gBA9MhB,MAAM;oBACF,MAAM;oBACN,KAAK,EAAE;oBACP,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;qBACnC,WAAW;mBACb,OAAO;wBACF,CAAC,MAAM,WAAW,CAAC,EAAE;qBACxB,OAAO;uBACL,OAAO;yBACL,OAAO;sBACV,CAAC,IAAI,EAAE,IAAI,KAAK,KAAK;uBACpB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;mBAmMe,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;kBA/KC,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;kBAApD,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;;YAR1D,QAAQ,SAAS,KAAK,GAAG,IAAI;YAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC3C,cAAc,SAAS,MAAM,GAAG,IAAI;;EAwLtC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3NzE,wBA2N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -59,12 +59,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
59
|
}, createSlots({ _: 2 }, [
|
60
60
|
_ctx.$slots.default ? {
|
61
61
|
name: "default",
|
62
|
-
fn: withCtx(({ option, selected, skeleton: skeletonList }) => [
|
62
|
+
fn: withCtx(({ option, selected, skeleton: skeletonList, index }) => [
|
63
63
|
renderSlot(_ctx.$slots, "default", {
|
64
64
|
option,
|
65
65
|
selected,
|
66
66
|
skeleton: skeletonList,
|
67
|
-
model: false
|
67
|
+
model: false,
|
68
|
+
index,
|
69
|
+
search: void 0
|
68
70
|
})
|
69
71
|
]),
|
70
72
|
key: "0"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SelectAsyncSingleProps, SelectOptionComponent } from './types';
|
1
|
+
import { SelectAsyncSingleProps, SelectOptionComponent, SelectOptionProps } from './types';
|
2
2
|
declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
4
|
readonly "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
|
@@ -8,16 +8,16 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
8
8
|
blur: () => void;
|
9
9
|
}>): void;
|
10
10
|
attrs: any;
|
11
|
-
slots: {
|
12
|
-
title
|
13
|
-
subtitle
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
slots: Readonly<{
|
12
|
+
title?: () => void;
|
13
|
+
subtitle?: () => void;
|
14
|
+
right?: (props: Record<string, never>) => void;
|
15
|
+
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
16
|
+
}> & {
|
17
|
+
title?: () => void;
|
18
|
+
subtitle?: () => void;
|
19
|
+
right?: (props: Record<string, never>) => void;
|
20
|
+
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
21
21
|
};
|
22
22
|
emit: {
|
23
23
|
(e: "update:modelValue", value: AllowClear extends true ? Model | null : Model): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AAmDA;AAiGA,OAAO,KAAK,EAAC,sBAAsB,EAAE,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAM5E,KAAK,SAAS,MAAM,GAA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E,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, watch, toRef, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot } from 'vue';
|
1
|
+
import { defineComponent, useTemplateRef, computed, watch, toRef, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
2
2
|
import _sfc_main$1 from './WSelectAsync.vue.js';
|
3
3
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -123,13 +123,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
123
123
|
} : void 0,
|
124
124
|
_ctx.$slots.option ? {
|
125
125
|
name: "option",
|
126
|
-
fn: withCtx((
|
127
|
-
renderSlot(_ctx.$slots, "option",
|
128
|
-
option,
|
129
|
-
selected,
|
130
|
-
model,
|
131
|
-
search
|
132
|
-
})
|
126
|
+
fn: withCtx((scope) => [
|
127
|
+
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps(scope)))
|
133
128
|
]),
|
134
129
|
key: "2"
|
135
130
|
} : void 0,
|