@razaman2/reactive-view 0.0.34-beta.21 → 0.0.34-beta.23
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -6
- package/dist/index.mjs +7 -6
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -128,7 +128,7 @@ declare function showComponent(component: any, options?: {
|
|
|
128
128
|
container?: string;
|
|
129
129
|
key?: string;
|
|
130
130
|
router?: any;
|
|
131
|
-
}):
|
|
131
|
+
}): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, vue.ComponentProvideOptions>, {}, {}, "", {}, any> | undefined;
|
|
132
132
|
declare const getData: (component: any, path: number | string, alternative: any) => any;
|
|
133
133
|
declare const setData: (component: any, data: any, path?: string) => any;
|
|
134
134
|
declare const dataPath: (component: any, path: string | number) => any;
|
package/dist/index.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ declare function showComponent(component: any, options?: {
|
|
|
128
128
|
container?: string;
|
|
129
129
|
key?: string;
|
|
130
130
|
router?: any;
|
|
131
|
-
}):
|
|
131
|
+
}): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, vue.ComponentProvideOptions>, {}, {}, "", {}, any> | undefined;
|
|
132
132
|
declare const getData: (component: any, path: number | string, alternative: any) => any;
|
|
133
133
|
declare const setData: (component: any, data: any, path?: string) => any;
|
|
134
134
|
declare const dataPath: (component: any, path: string | number) => any;
|
package/dist/index.js
CHANGED
|
@@ -174,7 +174,7 @@ var import_vue = require("vue");
|
|
|
174
174
|
|
|
175
175
|
// package.json
|
|
176
176
|
var name = "@razaman2/reactive-view";
|
|
177
|
-
var version = "0.0.34-beta.
|
|
177
|
+
var version = "0.0.34-beta.23";
|
|
178
178
|
|
|
179
179
|
// src/ReactiveView.ts
|
|
180
180
|
var setup = {
|
|
@@ -259,7 +259,7 @@ var ReactiveView_default = {
|
|
|
259
259
|
);
|
|
260
260
|
const datatype = Array.isArray(defaultData) ? [] : {};
|
|
261
261
|
const normalize = (data) => {
|
|
262
|
-
console.warn(`[ReactiveView]: using beta props data in [${props.modelName}] component`, data, defaultData);
|
|
262
|
+
console.warn(`[ReactiveView]: using beta props data in [${props.modelName}] component`, { vue, data, defaultData });
|
|
263
263
|
if ((0, import_vue.isReactive)(data)) {
|
|
264
264
|
return data;
|
|
265
265
|
} else if ((0, import_vue.isRef)(data)) {
|
|
@@ -280,10 +280,10 @@ var ReactiveView_default = {
|
|
|
280
280
|
if (["Array", "Object"].includes(data.constructor.name)) {
|
|
281
281
|
return (0, import_vue.reactive)("data" in vue.vnode.props ? data : defaultData);
|
|
282
282
|
} else {
|
|
283
|
-
return (0, import_vue.reactive)(
|
|
283
|
+
return (0, import_vue.reactive)("data" in vue.vnode.props ? { "": data } : defaultData);
|
|
284
284
|
}
|
|
285
285
|
} catch (e) {
|
|
286
|
-
return (0, import_vue.reactive)(
|
|
286
|
+
return (0, import_vue.reactive)("data" in vue.vnode.props ? { "": data } : defaultData);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -647,13 +647,14 @@ function showComponent(component, options = {}) {
|
|
|
647
647
|
{
|
|
648
648
|
__cleanup__: () => {
|
|
649
649
|
document.querySelectorAll(`#${id}`).forEach((element) => element.remove());
|
|
650
|
+
app.unmount();
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
653
|
);
|
|
653
654
|
if (options.router) {
|
|
654
|
-
app.use(options.router).mount(`#${id}`);
|
|
655
|
+
return app.use(options.router).mount(`#${id}`);
|
|
655
656
|
} else {
|
|
656
|
-
app.mount(`#${id}`);
|
|
657
|
+
return app.mount(`#${id}`);
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
660
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -128,7 +128,7 @@ import { ref, reactive, watch, unref, toRaw, isRef, isReactive, createVNode, get
|
|
|
128
128
|
|
|
129
129
|
// package.json
|
|
130
130
|
var name = "@razaman2/reactive-view";
|
|
131
|
-
var version = "0.0.34-beta.
|
|
131
|
+
var version = "0.0.34-beta.23";
|
|
132
132
|
|
|
133
133
|
// src/ReactiveView.ts
|
|
134
134
|
var setup = {
|
|
@@ -213,7 +213,7 @@ var ReactiveView_default = {
|
|
|
213
213
|
);
|
|
214
214
|
const datatype = Array.isArray(defaultData) ? [] : {};
|
|
215
215
|
const normalize = (data) => {
|
|
216
|
-
console.warn(`[ReactiveView]: using beta props data in [${props.modelName}] component`, data, defaultData);
|
|
216
|
+
console.warn(`[ReactiveView]: using beta props data in [${props.modelName}] component`, { vue, data, defaultData });
|
|
217
217
|
if (isReactive(data)) {
|
|
218
218
|
return data;
|
|
219
219
|
} else if (isRef(data)) {
|
|
@@ -234,10 +234,10 @@ var ReactiveView_default = {
|
|
|
234
234
|
if (["Array", "Object"].includes(data.constructor.name)) {
|
|
235
235
|
return reactive("data" in vue.vnode.props ? data : defaultData);
|
|
236
236
|
} else {
|
|
237
|
-
return reactive(
|
|
237
|
+
return reactive("data" in vue.vnode.props ? { "": data } : defaultData);
|
|
238
238
|
}
|
|
239
239
|
} catch (e) {
|
|
240
|
-
return reactive(
|
|
240
|
+
return reactive("data" in vue.vnode.props ? { "": data } : defaultData);
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -601,13 +601,14 @@ function showComponent(component, options = {}) {
|
|
|
601
601
|
{
|
|
602
602
|
__cleanup__: () => {
|
|
603
603
|
document.querySelectorAll(`#${id}`).forEach((element) => element.remove());
|
|
604
|
+
app.unmount();
|
|
604
605
|
}
|
|
605
606
|
}
|
|
606
607
|
);
|
|
607
608
|
if (options.router) {
|
|
608
|
-
app.use(options.router).mount(`#${id}`);
|
|
609
|
+
return app.use(options.router).mount(`#${id}`);
|
|
609
610
|
} else {
|
|
610
|
-
app.mount(`#${id}`);
|
|
611
|
+
return app.mount(`#${id}`);
|
|
611
612
|
}
|
|
612
613
|
}
|
|
613
614
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razaman2/reactive-view",
|
|
3
|
-
"version": "0.0.34-beta.
|
|
3
|
+
"version": "0.0.34-beta.23",
|
|
4
4
|
"description": "This library enables you to build vue apps in an object oriented way. It provides a convenient approach to extend and override ui components. It provides a built in eventing system along with component data management.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"prepublishOnly": "npm run build",
|
|
10
10
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
11
11
|
"lint": "tsc",
|
|
12
|
-
"test": "cd tests/vue-ts && npm run dev"
|
|
12
|
+
"test": "cd tests/vue-ts && npm run dev",
|
|
13
|
+
"pr": "sh pr.sh"
|
|
13
14
|
},
|
|
14
15
|
"keywords": [
|
|
15
16
|
"vue",
|