@uzum-tech/ui 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -14
- package/dist/index.mjs +16 -14
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/_utils/wrap-component.mjs +12 -10
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_utils/wrap-component.js +9 -8
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, getCurrentInstance, h, ref } from 'vue';
|
|
2
2
|
import { configProviderInjectionKey } from "../config-provider/src/context.mjs";
|
|
3
3
|
import useExposeProxy from "./composable/use-expose-proxy.mjs";
|
|
4
4
|
function findConfig(instance) {
|
|
@@ -22,18 +22,20 @@ export function wrap(component) {
|
|
|
22
22
|
const instance = getCurrentInstance();
|
|
23
23
|
const config = instance ? findConfig(instance) : null;
|
|
24
24
|
const componentRef = ref(null);
|
|
25
|
-
const mergedProps = computed(() => {
|
|
26
|
-
var _a, _b, _c;
|
|
27
|
-
if (!config) return props;
|
|
28
|
-
const defaults = (_c = (_b = (_a = config.mergedComponentPropsRef) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b[component.name]) !== null && _c !== void 0 ? _c : {};
|
|
29
|
-
return Object.assign(Object.assign({}, defaults), props);
|
|
30
|
-
});
|
|
31
25
|
if (ctx.expose) {
|
|
32
26
|
ctx.expose(useExposeProxy(componentRef));
|
|
33
27
|
}
|
|
34
|
-
return () =>
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
return () => {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
let finalProps = props;
|
|
31
|
+
if (config) {
|
|
32
|
+
const defaults = (_c = (_b = (_a = config.mergedComponentPropsRef) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b[component.name]) !== null && _c !== void 0 ? _c : {};
|
|
33
|
+
finalProps = Object.assign(Object.assign({}, defaults), props);
|
|
34
|
+
}
|
|
35
|
+
return h(component, Object.assign(Object.assign({
|
|
36
|
+
ref: componentRef
|
|
37
|
+
}, finalProps), ctx.attrs), ctx.slots);
|
|
38
|
+
};
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
41
|
wrapped.__wrapped__ = true;
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0.
|
|
1
|
+
declare const _default: "2.0.4";
|
|
2
2
|
export default _default;
|
package/es/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.0.
|
|
1
|
+
export default '2.0.4';
|
|
@@ -30,17 +30,18 @@ function wrap(component) {
|
|
|
30
30
|
const instance = (0, vue_1.getCurrentInstance)();
|
|
31
31
|
const config = instance ? findConfig(instance) : null;
|
|
32
32
|
const componentRef = (0, vue_1.ref)(null);
|
|
33
|
-
const mergedProps = (0, vue_1.computed)(() => {
|
|
34
|
-
var _a, _b, _c;
|
|
35
|
-
if (!config)
|
|
36
|
-
return props;
|
|
37
|
-
const defaults = (_c = (_b = (_a = config.mergedComponentPropsRef) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b[component.name]) !== null && _c !== void 0 ? _c : {};
|
|
38
|
-
return Object.assign(Object.assign({}, defaults), props);
|
|
39
|
-
});
|
|
40
33
|
if (ctx.expose) {
|
|
41
34
|
ctx.expose((0, use_expose_proxy_1.default)(componentRef));
|
|
42
35
|
}
|
|
43
|
-
return () =>
|
|
36
|
+
return () => {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
let finalProps = props;
|
|
39
|
+
if (config) {
|
|
40
|
+
const defaults = (_c = (_b = (_a = config.mergedComponentPropsRef) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b[component.name]) !== null && _c !== void 0 ? _c : {};
|
|
41
|
+
finalProps = Object.assign(Object.assign({}, defaults), props);
|
|
42
|
+
}
|
|
43
|
+
return (0, vue_1.h)(component, Object.assign(Object.assign({ ref: componentRef }, finalProps), ctx.attrs), ctx.slots);
|
|
44
|
+
};
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
47
|
wrapped.__wrapped__ = true;
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0.
|
|
1
|
+
declare const _default: "2.0.4";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/web-types.json
CHANGED