@razaman2/reactive-view 0.0.27 → 0.0.28

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 CHANGED
@@ -159,7 +159,7 @@ var import_vue = require("vue");
159
159
 
160
160
  // package.json
161
161
  var name = "@razaman2/reactive-view";
162
- var version = "0.0.27";
162
+ var version = "0.0.28";
163
163
 
164
164
  // src/ReactiveView.ts
165
165
  var setup = {
@@ -220,11 +220,11 @@ var ReactiveView_default = {
220
220
  const isValid = (0, import_vue.ref)(false);
221
221
  const ready = (0, import_vue.ref)(false);
222
222
  const vue = (0, import_vue.getCurrentInstance)();
223
- const deferred = (0, import_vue.ref)(typeof props.defer === "function" ? props.defer() : props.defer);
223
+ const defer = (0, import_vue.ref)(typeof props.defer === "function" ? props.defer() : props.defer);
224
224
  const data = typeof props.data === "function" ? props.data() : props.data;
225
225
  const async = data instanceof Promise;
226
226
  if (props.debug) {
227
- console.log("[ReactiveView]:", { props, context, isValid, ready, vue, deferred, data, async });
227
+ console.log("[ReactiveView]:", { props, context, isValid, ready, vue, defer, data, async });
228
228
  }
229
229
  if (async && !((_a = vue.vnode.props) == null ? void 0 : _a.hasOwnProperty("defaultData"))) {
230
230
  console.error("[ReactiveView]: defaultData is required for async data.");
@@ -286,7 +286,7 @@ var ReactiveView_default = {
286
286
  });
287
287
  setTimeout(async () => {
288
288
  var _a2;
289
- ready.value = (_a2 = await deferred.value) != null ? _a2 : true;
289
+ ready.value = (_a2 = await defer.value) != null ? _a2 : true;
290
290
  });
291
291
  if (context.attrs["onUpdate:model"]) {
292
292
  const config2 = typeof context.attrs["onUpdate:model"] === "function" ? {
@@ -298,24 +298,22 @@ var ReactiveView_default = {
298
298
  }, config2.options);
299
299
  }
300
300
  const component = (0, import_vue.ref)({ parent: { self: vue.proxy }, self: { template, model, isValid } });
301
- if (access(component).ReactiveView) {
302
- component.value = [access(component)].reduce((options, parent) => {
303
- var _a2;
304
- while (parent) {
305
- if (typeof parent.setup === "function") {
306
- options = { parent: options, self: (_a2 = parent.setup(component, options)) != null ? _a2 : {} };
307
- if (access(parent.$parent).ReactiveView) {
308
- break;
309
- } else {
310
- parent = parent.$parent;
311
- }
312
- } else {
301
+ component.value = [access(component)].reduce((options, parent) => {
302
+ var _a2;
303
+ while (parent) {
304
+ if (typeof parent.setup === "function") {
305
+ options = { parent: options, self: (_a2 = parent.setup(component, options)) != null ? _a2 : {} };
306
+ if (access(parent.$parent).ReactiveView) {
313
307
  break;
308
+ } else {
309
+ parent = access(parent.$parent);
314
310
  }
311
+ } else {
312
+ break;
315
313
  }
316
- return options;
317
- }, component.value);
318
- }
314
+ }
315
+ return options;
316
+ }, component.value);
319
317
  props.instance.value = component.value;
320
318
  return (vue2) => {
321
319
  if (ready.value) {
package/dist/index.mjs CHANGED
@@ -119,7 +119,7 @@ import { ref, reactive, watch, isRef, isReactive, createVNode, getCurrentInstanc
119
119
 
120
120
  // package.json
121
121
  var name = "@razaman2/reactive-view";
122
- var version = "0.0.27";
122
+ var version = "0.0.28";
123
123
 
124
124
  // src/ReactiveView.ts
125
125
  var setup = {
@@ -180,11 +180,11 @@ var ReactiveView_default = {
180
180
  const isValid = ref(false);
181
181
  const ready = ref(false);
182
182
  const vue = getCurrentInstance();
183
- const deferred = ref(typeof props.defer === "function" ? props.defer() : props.defer);
183
+ const defer = ref(typeof props.defer === "function" ? props.defer() : props.defer);
184
184
  const data = typeof props.data === "function" ? props.data() : props.data;
185
185
  const async = data instanceof Promise;
186
186
  if (props.debug) {
187
- console.log("[ReactiveView]:", { props, context, isValid, ready, vue, deferred, data, async });
187
+ console.log("[ReactiveView]:", { props, context, isValid, ready, vue, defer, data, async });
188
188
  }
189
189
  if (async && !((_a = vue.vnode.props) == null ? void 0 : _a.hasOwnProperty("defaultData"))) {
190
190
  console.error("[ReactiveView]: defaultData is required for async data.");
@@ -246,7 +246,7 @@ var ReactiveView_default = {
246
246
  });
247
247
  setTimeout(async () => {
248
248
  var _a2;
249
- ready.value = (_a2 = await deferred.value) != null ? _a2 : true;
249
+ ready.value = (_a2 = await defer.value) != null ? _a2 : true;
250
250
  });
251
251
  if (context.attrs["onUpdate:model"]) {
252
252
  const config2 = typeof context.attrs["onUpdate:model"] === "function" ? {
@@ -258,24 +258,22 @@ var ReactiveView_default = {
258
258
  }, config2.options);
259
259
  }
260
260
  const component = ref({ parent: { self: vue.proxy }, self: { template, model, isValid } });
261
- if (access(component).ReactiveView) {
262
- component.value = [access(component)].reduce((options, parent) => {
263
- var _a2;
264
- while (parent) {
265
- if (typeof parent.setup === "function") {
266
- options = { parent: options, self: (_a2 = parent.setup(component, options)) != null ? _a2 : {} };
267
- if (access(parent.$parent).ReactiveView) {
268
- break;
269
- } else {
270
- parent = parent.$parent;
271
- }
272
- } else {
261
+ component.value = [access(component)].reduce((options, parent) => {
262
+ var _a2;
263
+ while (parent) {
264
+ if (typeof parent.setup === "function") {
265
+ options = { parent: options, self: (_a2 = parent.setup(component, options)) != null ? _a2 : {} };
266
+ if (access(parent.$parent).ReactiveView) {
273
267
  break;
268
+ } else {
269
+ parent = access(parent.$parent);
274
270
  }
271
+ } else {
272
+ break;
275
273
  }
276
- return options;
277
- }, component.value);
278
- }
274
+ }
275
+ return options;
276
+ }, component.value);
279
277
  props.instance.value = component.value;
280
278
  return (vue2) => {
281
279
  if (ready.value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razaman2/reactive-view",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
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",