@razaman2/reactive-view 0.1.0-beta.11 → 0.1.0-beta.12
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 +4 -7
- package/dist/index.mjs +4 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -177,7 +177,7 @@ var import_data_manager = __toESM(require("@razaman2/data-manager"));
|
|
|
177
177
|
var import_vue = require("vue");
|
|
178
178
|
|
|
179
179
|
// package.json
|
|
180
|
-
var version = "0.1.0-beta.
|
|
180
|
+
var version = "0.1.0-beta.12";
|
|
181
181
|
var package_default = {
|
|
182
182
|
name: "@razaman2/reactive-view",
|
|
183
183
|
version,
|
|
@@ -376,6 +376,9 @@ var ReactiveView_default = {
|
|
|
376
376
|
};
|
|
377
377
|
const model = props.model ? typeof props.model === "function" ? props.model(config) : props.model : import_data_manager.default.setConfig({ beforeGetData: (data) => (0, import_vue.isRef)(data) ? (0, import_vue.unref)(data) : data }, config);
|
|
378
378
|
const component = (0, import_vue.ref)({ parent: { self: vue.proxy }, self: { template, diff, emit, dataPath: dataPath2, model: proxy(model), isValid } });
|
|
379
|
+
if (props.debug) {
|
|
380
|
+
console.warn(`[${props.modelName}]:data`, { props, context, component, config, model });
|
|
381
|
+
}
|
|
379
382
|
if (context.attrs["onUpdate:model"] || context.attrs["update:model"]) {
|
|
380
383
|
const config2 = {
|
|
381
384
|
callback: typeof context.attrs["onUpdate:model"] === "function" ? context.attrs["onUpdate:model"] : context.attrs["update:model"],
|
|
@@ -401,9 +404,6 @@ var ReactiveView_default = {
|
|
|
401
404
|
subscriptions.push((0, import_vue.watch)(source, async (after, before) => {
|
|
402
405
|
const diff2 = access(component).diff(import_object_manager.default.on(before), import_object_manager.default.on(after));
|
|
403
406
|
const callback = context.attrs["data:callback"];
|
|
404
|
-
if (props.debug) {
|
|
405
|
-
console.warn(`[${props.modelName}]:data`, { diff: diff2, callback, before, after, props, context, component });
|
|
406
|
-
}
|
|
407
407
|
if (typeof callback === "function") {
|
|
408
408
|
callback(diff2, { component });
|
|
409
409
|
} else {
|
|
@@ -428,9 +428,6 @@ var ReactiveView_default = {
|
|
|
428
428
|
]) : [props.data];
|
|
429
429
|
track(typeof data === "function" ? data : (() => data));
|
|
430
430
|
} else {
|
|
431
|
-
if (props.debug) {
|
|
432
|
-
console.log(`log output:`, props, (0, import_vue.isRef)(props.data), (0, import_vue.isReactive)(props.data));
|
|
433
|
-
}
|
|
434
431
|
track((0, import_vue.isRef)(props.data) || (0, import_vue.isReactive)(props.data) ? props.data : () => props.data, { immediate: false, deep: false });
|
|
435
432
|
}
|
|
436
433
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -130,7 +130,7 @@ import DataManager from "@razaman2/data-manager";
|
|
|
130
130
|
import { ref, reactive, watch, unref, isRef, isReactive, createVNode, getCurrentInstance, onBeforeUnmount } from "vue";
|
|
131
131
|
|
|
132
132
|
// package.json
|
|
133
|
-
var version = "0.1.0-beta.
|
|
133
|
+
var version = "0.1.0-beta.12";
|
|
134
134
|
var package_default = {
|
|
135
135
|
name: "@razaman2/reactive-view",
|
|
136
136
|
version,
|
|
@@ -329,6 +329,9 @@ var ReactiveView_default = {
|
|
|
329
329
|
};
|
|
330
330
|
const model = props.model ? typeof props.model === "function" ? props.model(config) : props.model : DataManager.setConfig({ beforeGetData: (data) => isRef(data) ? unref(data) : data }, config);
|
|
331
331
|
const component = ref({ parent: { self: vue.proxy }, self: { template, diff, emit, dataPath: dataPath2, model: proxy(model), isValid } });
|
|
332
|
+
if (props.debug) {
|
|
333
|
+
console.warn(`[${props.modelName}]:data`, { props, context, component, config, model });
|
|
334
|
+
}
|
|
332
335
|
if (context.attrs["onUpdate:model"] || context.attrs["update:model"]) {
|
|
333
336
|
const config2 = {
|
|
334
337
|
callback: typeof context.attrs["onUpdate:model"] === "function" ? context.attrs["onUpdate:model"] : context.attrs["update:model"],
|
|
@@ -354,9 +357,6 @@ var ReactiveView_default = {
|
|
|
354
357
|
subscriptions.push(watch(source, async (after, before) => {
|
|
355
358
|
const diff2 = access(component).diff(ObjectManager.on(before), ObjectManager.on(after));
|
|
356
359
|
const callback = context.attrs["data:callback"];
|
|
357
|
-
if (props.debug) {
|
|
358
|
-
console.warn(`[${props.modelName}]:data`, { diff: diff2, callback, before, after, props, context, component });
|
|
359
|
-
}
|
|
360
360
|
if (typeof callback === "function") {
|
|
361
361
|
callback(diff2, { component });
|
|
362
362
|
} else {
|
|
@@ -381,9 +381,6 @@ var ReactiveView_default = {
|
|
|
381
381
|
]) : [props.data];
|
|
382
382
|
track(typeof data === "function" ? data : (() => data));
|
|
383
383
|
} else {
|
|
384
|
-
if (props.debug) {
|
|
385
|
-
console.log(`log output:`, props, isRef(props.data), isReactive(props.data));
|
|
386
|
-
}
|
|
387
384
|
track(isRef(props.data) || isReactive(props.data) ? props.data : () => props.data, { immediate: false, deep: false });
|
|
388
385
|
}
|
|
389
386
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razaman2/reactive-view",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.12",
|
|
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",
|