pinia-orm-edge 1.9.3-28676556.ba65169 → 1.10.0-28683029.86bd359

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/casts.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.ae01a7ce.cjs';
1
+ import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.52557866.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/casts.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.ae01a7ce.mjs';
1
+ import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.52557866.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/casts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.ae01a7ce.js';
1
+ import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.52557866.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -143,6 +143,16 @@ function MorphToMany(related, pivot, relatedId, id, type, parentKey, relatedKey)
143
143
  };
144
144
  }
145
145
 
146
+ function MorphedByMany(related, pivot, relatedId, id, type, parentKey, relatedKey) {
147
+ return (target, propertyKey) => {
148
+ const self = target.$self();
149
+ self.setRegistry(
150
+ propertyKey,
151
+ () => self.morphedByMany(related(), pivot(), relatedId, id, type, parentKey, relatedKey)
152
+ );
153
+ };
154
+ }
155
+
146
156
  function MorphMany(related, id, type, localKey) {
147
157
  return (target, propertyKey) => {
148
158
  const self = target.$self();
@@ -211,6 +221,7 @@ exports.MorphMany = MorphMany;
211
221
  exports.MorphOne = MorphOne;
212
222
  exports.MorphTo = MorphTo;
213
223
  exports.MorphToMany = MorphToMany;
224
+ exports.MorphedByMany = MorphedByMany;
214
225
  exports.Mutate = Mutate;
215
226
  exports.NonEnumerable = NonEnumerable;
216
227
  exports.Num = Num;
@@ -1,5 +1,5 @@
1
- import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.ae01a7ce.cjs';
2
- export { aq as NanoidOptions } from './shared/pinia-orm.ae01a7ce.cjs';
1
+ import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.52557866.cjs';
2
+ export { aq as NanoidOptions } from './shared/pinia-orm.52557866.cjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -74,6 +74,11 @@ declare function MorphTo(related: () => typeof Model[], id: string, type: string
74
74
  */
75
75
  declare function MorphToMany(related: () => typeof Model, pivot: () => typeof Model, relatedId: string, id: string, type: string, parentKey?: string, relatedKey?: string): PropertyDecorator;
76
76
 
77
+ /**
78
+ * Create a morph-to-many attribute property decorator.
79
+ */
80
+ declare function MorphedByMany(related: () => typeof Model, pivot: () => typeof Model, relatedId: string, id: string, type: string, parentKey?: string, relatedKey?: string): PropertyDecorator;
81
+
77
82
  /**
78
83
  * Create a morph-many attribute property decorator.
79
84
  */
@@ -104,4 +109,4 @@ declare function Hidden(): PropertyDecorator;
104
109
  */
105
110
  declare function NonEnumerable(target: any, propertyKey: string): void;
106
111
 
107
- export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid, UidOptions };
112
+ export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, MorphedByMany, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid, UidOptions };
@@ -1,5 +1,5 @@
1
- import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.ae01a7ce.mjs';
2
- export { aq as NanoidOptions } from './shared/pinia-orm.ae01a7ce.mjs';
1
+ import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.52557866.mjs';
2
+ export { aq as NanoidOptions } from './shared/pinia-orm.52557866.mjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -74,6 +74,11 @@ declare function MorphTo(related: () => typeof Model[], id: string, type: string
74
74
  */
75
75
  declare function MorphToMany(related: () => typeof Model, pivot: () => typeof Model, relatedId: string, id: string, type: string, parentKey?: string, relatedKey?: string): PropertyDecorator;
76
76
 
77
+ /**
78
+ * Create a morph-to-many attribute property decorator.
79
+ */
80
+ declare function MorphedByMany(related: () => typeof Model, pivot: () => typeof Model, relatedId: string, id: string, type: string, parentKey?: string, relatedKey?: string): PropertyDecorator;
81
+
77
82
  /**
78
83
  * Create a morph-many attribute property decorator.
79
84
  */
@@ -104,4 +109,4 @@ declare function Hidden(): PropertyDecorator;
104
109
  */
105
110
  declare function NonEnumerable(target: any, propertyKey: string): void;
106
111
 
107
- export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid, UidOptions };
112
+ export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, MorphedByMany, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid, UidOptions };
@@ -1,5 +1,5 @@
1
- import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.ae01a7ce.js';
2
- export { aq as NanoidOptions } from './shared/pinia-orm.ae01a7ce.js';
1
+ import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.52557866.js';
2
+ export { aq as NanoidOptions } from './shared/pinia-orm.52557866.js';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -74,6 +74,11 @@ declare function MorphTo(related: () => typeof Model[], id: string, type: string
74
74
  */
75
75
  declare function MorphToMany(related: () => typeof Model, pivot: () => typeof Model, relatedId: string, id: string, type: string, parentKey?: string, relatedKey?: string): PropertyDecorator;
76
76
 
77
+ /**
78
+ * Create a morph-to-many attribute property decorator.
79
+ */
80
+ declare function MorphedByMany(related: () => typeof Model, pivot: () => typeof Model, relatedId: string, id: string, type: string, parentKey?: string, relatedKey?: string): PropertyDecorator;
81
+
77
82
  /**
78
83
  * Create a morph-many attribute property decorator.
79
84
  */
@@ -104,4 +109,4 @@ declare function Hidden(): PropertyDecorator;
104
109
  */
105
110
  declare function NonEnumerable(target: any, propertyKey: string): void;
106
111
 
107
- export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid, UidOptions };
112
+ export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, MorphedByMany, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid, UidOptions };
@@ -141,6 +141,16 @@ function MorphToMany(related, pivot, relatedId, id, type, parentKey, relatedKey)
141
141
  };
142
142
  }
143
143
 
144
+ function MorphedByMany(related, pivot, relatedId, id, type, parentKey, relatedKey) {
145
+ return (target, propertyKey) => {
146
+ const self = target.$self();
147
+ self.setRegistry(
148
+ propertyKey,
149
+ () => self.morphedByMany(related(), pivot(), relatedId, id, type, parentKey, relatedKey)
150
+ );
151
+ };
152
+ }
153
+
144
154
  function MorphMany(related, id, type, localKey) {
145
155
  return (target, propertyKey) => {
146
156
  const self = target.$self();
@@ -195,4 +205,4 @@ function NonEnumerable(target, propertyKey) {
195
205
  }
196
206
  }
197
207
 
198
- export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, Mutate, NonEnumerable, Num, OnDelete, Str, Uid };
208
+ export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, MorphToMany, MorphedByMany, Mutate, NonEnumerable, Num, OnDelete, Str, Uid };
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.ae01a7ce.cjs';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.52557866.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.ae01a7ce.mjs';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.52557866.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/helpers.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.ae01a7ce.js';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.52557866.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';