@razaman2/reactive-view 0.0.34-beta.24 → 0.0.34-beta.25
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 +6 -6
- package/dist/index.mjs +7 -7
- package/package.json +1 -1
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.25";
|
|
178
178
|
|
|
179
179
|
// src/ReactiveView.ts
|
|
180
180
|
var setup = {
|
|
@@ -259,7 +259,9 @@ var ReactiveView_default = {
|
|
|
259
259
|
);
|
|
260
260
|
const datatype = Array.isArray(defaultData) ? [] : {};
|
|
261
261
|
const normalize = (data) => {
|
|
262
|
-
|
|
262
|
+
if (props.debug) {
|
|
263
|
+
console.warn(`[ReactiveView]: using beta props data in [${props.modelName}] component`, { vue, data, defaultData });
|
|
264
|
+
}
|
|
263
265
|
if ((0, import_vue.isReactive)(data)) {
|
|
264
266
|
return data;
|
|
265
267
|
} else if ((0, import_vue.isRef)(data)) {
|
|
@@ -365,10 +367,8 @@ var ReactiveView_default = {
|
|
|
365
367
|
watchDataProp(data);
|
|
366
368
|
});
|
|
367
369
|
} else if (props.beta && (isFunctionData || isPromiseData)) {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
const [data] = await Promise.all([isFunctionData || isAsyncFunctionData ? props.data() : props.data, (_a2 = defer.value) != null ? _a2 : true]);
|
|
371
|
-
model.replaceData((0, import_vue.toRaw)((0, import_vue.unref)(data)));
|
|
370
|
+
(0, import_vue.watch)(props.data, (data) => {
|
|
371
|
+
model.replaceData(data);
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
setTimeout(async () => {
|
package/dist/index.mjs
CHANGED
|
@@ -124,11 +124,11 @@ var Subscriptions = _Subscriptions;
|
|
|
124
124
|
// src/ReactiveView.ts
|
|
125
125
|
import ObjectManager from "@razaman2/object-manager";
|
|
126
126
|
import DataManager from "@razaman2/data-manager";
|
|
127
|
-
import { ref, reactive, watch, unref,
|
|
127
|
+
import { ref, reactive, watch, unref, isRef, isReactive, createVNode, getCurrentInstance } from "vue";
|
|
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.25";
|
|
132
132
|
|
|
133
133
|
// src/ReactiveView.ts
|
|
134
134
|
var setup = {
|
|
@@ -213,7 +213,9 @@ var ReactiveView_default = {
|
|
|
213
213
|
);
|
|
214
214
|
const datatype = Array.isArray(defaultData) ? [] : {};
|
|
215
215
|
const normalize = (data) => {
|
|
216
|
-
|
|
216
|
+
if (props.debug) {
|
|
217
|
+
console.warn(`[ReactiveView]: using beta props data in [${props.modelName}] component`, { vue, data, defaultData });
|
|
218
|
+
}
|
|
217
219
|
if (isReactive(data)) {
|
|
218
220
|
return data;
|
|
219
221
|
} else if (isRef(data)) {
|
|
@@ -319,10 +321,8 @@ var ReactiveView_default = {
|
|
|
319
321
|
watchDataProp(data);
|
|
320
322
|
});
|
|
321
323
|
} else if (props.beta && (isFunctionData || isPromiseData)) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
const [data] = await Promise.all([isFunctionData || isAsyncFunctionData ? props.data() : props.data, (_a2 = defer.value) != null ? _a2 : true]);
|
|
325
|
-
model.replaceData(toRaw(unref(data)));
|
|
324
|
+
watch(props.data, (data) => {
|
|
325
|
+
model.replaceData(data);
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
setTimeout(async () => {
|
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.25",
|
|
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",
|