@razaman2/reactive-view 0.0.4 → 0.0.6

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 CHANGED
@@ -31,7 +31,11 @@ declare const setup: {
31
31
  };
32
32
  declare const _default$1: {
33
33
  props: {
34
+ notifications: ObjectConstructor;
35
+ subscriptions: ObjectConstructor;
34
36
  defaultData: {};
37
+ model: {};
38
+ state: {};
35
39
  getDefaultData: {
36
40
  type: FunctionConstructor;
37
41
  default: (data?: {}) => {};
@@ -39,30 +43,10 @@ declare const _default$1: {
39
43
  logging: {
40
44
  validator: (logging: unknown) => boolean;
41
45
  };
42
- model: {};
43
46
  modelName: {
44
47
  type: StringConstructor;
45
48
  default: string;
46
49
  };
47
- notifications: {
48
- type: ObjectConstructor;
49
- };
50
- root: {
51
- type: FunctionConstructor;
52
- };
53
- state: {};
54
- subscriptions: {
55
- type: ObjectConstructor;
56
- default: {
57
- addSubscription(name: string, handler?: () => boolean, data?: any): void;
58
- replaceSubscription(name: string, handler?: () => boolean, data?: any): void;
59
- removeSubscriptions(): void;
60
- removeSubscription(name: string): void;
61
- hasSubscription(name: string): boolean;
62
- subscriptions: any[];
63
- subscription: Subscription;
64
- };
65
- };
66
50
  sync: {
67
51
  type: BooleanConstructor;
68
52
  default: boolean;
package/dist/index.d.ts CHANGED
@@ -31,7 +31,11 @@ declare const setup: {
31
31
  };
32
32
  declare const _default$1: {
33
33
  props: {
34
+ notifications: ObjectConstructor;
35
+ subscriptions: ObjectConstructor;
34
36
  defaultData: {};
37
+ model: {};
38
+ state: {};
35
39
  getDefaultData: {
36
40
  type: FunctionConstructor;
37
41
  default: (data?: {}) => {};
@@ -39,30 +43,10 @@ declare const _default$1: {
39
43
  logging: {
40
44
  validator: (logging: unknown) => boolean;
41
45
  };
42
- model: {};
43
46
  modelName: {
44
47
  type: StringConstructor;
45
48
  default: string;
46
49
  };
47
- notifications: {
48
- type: ObjectConstructor;
49
- };
50
- root: {
51
- type: FunctionConstructor;
52
- };
53
- state: {};
54
- subscriptions: {
55
- type: ObjectConstructor;
56
- default: {
57
- addSubscription(name: string, handler?: () => boolean, data?: any): void;
58
- replaceSubscription(name: string, handler?: () => boolean, data?: any): void;
59
- removeSubscriptions(): void;
60
- removeSubscription(name: string): void;
61
- hasSubscription(name: string): boolean;
62
- subscriptions: any[];
63
- subscription: Subscription;
64
- };
65
- };
66
50
  sync: {
67
51
  type: BooleanConstructor;
68
52
  default: boolean;
package/dist/index.js CHANGED
@@ -191,11 +191,15 @@ var import_vue = require("vue");
191
191
 
192
192
  // package.json
193
193
  var name = "@razaman2/reactive-view";
194
- var version = "0.0.4";
194
+ var version = "0.0.6";
195
195
 
196
196
  // src/ReactiveView.ts
197
197
  var props = {
198
+ notifications: Object,
199
+ subscriptions: Object,
198
200
  defaultData: {},
201
+ model: {},
202
+ state: {},
199
203
  getDefaultData: {
200
204
  type: Function,
201
205
  default: (data = {}) => data
@@ -205,18 +209,10 @@ var props = {
205
209
  return typeof logging === "boolean";
206
210
  }
207
211
  },
208
- model: {},
209
212
  modelName: {
210
213
  type: String,
211
214
  default: "ReactiveView"
212
215
  },
213
- notifications: { type: Object },
214
- root: { type: Function },
215
- state: {},
216
- subscriptions: {
217
- type: Object,
218
- default: getSubscription()
219
- },
220
216
  sync: {
221
217
  type: Boolean,
222
218
  default: true
@@ -233,7 +229,7 @@ var setup = {
233
229
  var ReactiveView_default = {
234
230
  props: __spreadValues(__spreadValues({}, setup), props),
235
231
  setup(props2, context) {
236
- var _a, _b, _c, _d;
232
+ var _a, _b, _c, _d, _f;
237
233
  const template = (vue, options2) => {
238
234
  var _a2, _b2, _c2;
239
235
  const vnode = context.slots.default ? (0, import_vue.h)(
@@ -286,7 +282,7 @@ var ReactiveView_default = {
286
282
  }, config2.options);
287
283
  }
288
284
  if (context.attrs["onUpdate:propsState"] || props2.sync) {
289
- const config2 = typeof context.attrs["onUpdate:propsState"] === "function" ? { callback: context.attrs["onUpdate:propsState"] } : context.attrs["onUpdate:propsState"];
285
+ const config2 = (_f = typeof context.attrs["onUpdate:propsState"] === "function" ? { callback: context.attrs["onUpdate:propsState"] } : context.attrs["onUpdate:propsState"]) != null ? _f : {};
290
286
  const subscription = (0, import_vue.watch)(() => props2.state, (after, before) => {
291
287
  if (props2.sync && typeof config2.callback !== "function") {
292
288
  getState.replaceData(after);
package/dist/index.mjs CHANGED
@@ -148,11 +148,15 @@ import { h, ref, watch } from "vue";
148
148
 
149
149
  // package.json
150
150
  var name = "@razaman2/reactive-view";
151
- var version = "0.0.4";
151
+ var version = "0.0.6";
152
152
 
153
153
  // src/ReactiveView.ts
154
154
  var props = {
155
+ notifications: Object,
156
+ subscriptions: Object,
155
157
  defaultData: {},
158
+ model: {},
159
+ state: {},
156
160
  getDefaultData: {
157
161
  type: Function,
158
162
  default: (data = {}) => data
@@ -162,18 +166,10 @@ var props = {
162
166
  return typeof logging === "boolean";
163
167
  }
164
168
  },
165
- model: {},
166
169
  modelName: {
167
170
  type: String,
168
171
  default: "ReactiveView"
169
172
  },
170
- notifications: { type: Object },
171
- root: { type: Function },
172
- state: {},
173
- subscriptions: {
174
- type: Object,
175
- default: getSubscription()
176
- },
177
173
  sync: {
178
174
  type: Boolean,
179
175
  default: true
@@ -190,7 +186,7 @@ var setup = {
190
186
  var ReactiveView_default = {
191
187
  props: __spreadValues(__spreadValues({}, setup), props),
192
188
  setup(props2, context) {
193
- var _a, _b, _c, _d;
189
+ var _a, _b, _c, _d, _f;
194
190
  const template = (vue, options2) => {
195
191
  var _a2, _b2, _c2;
196
192
  const vnode = context.slots.default ? h(
@@ -243,7 +239,7 @@ var ReactiveView_default = {
243
239
  }, config2.options);
244
240
  }
245
241
  if (context.attrs["onUpdate:propsState"] || props2.sync) {
246
- const config2 = typeof context.attrs["onUpdate:propsState"] === "function" ? { callback: context.attrs["onUpdate:propsState"] } : context.attrs["onUpdate:propsState"];
242
+ const config2 = (_f = typeof context.attrs["onUpdate:propsState"] === "function" ? { callback: context.attrs["onUpdate:propsState"] } : context.attrs["onUpdate:propsState"]) != null ? _f : {};
247
243
  const subscription = watch(() => props2.state, (after, before) => {
248
244
  if (props2.sync && typeof config2.callback !== "function") {
249
245
  getState.replaceData(after);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razaman2/reactive-view",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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",