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 +1 -1
- package/dist/casts.d.mts +1 -1
- package/dist/casts.d.ts +1 -1
- package/dist/decorators.cjs +11 -0
- package/dist/decorators.d.cts +8 -3
- package/dist/decorators.d.mts +8 -3
- package/dist/decorators.d.ts +8 -3
- package/dist/decorators.mjs +11 -1
- package/dist/helpers.d.cts +1 -1
- package/dist/helpers.d.mts +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/index.cjs +282 -158
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +282 -158
- package/dist/nanoid/async.d.cts +1 -1
- package/dist/nanoid/async.d.mts +1 -1
- package/dist/nanoid/async.d.ts +1 -1
- package/dist/nanoid/index.d.cts +1 -1
- package/dist/nanoid/index.d.mts +1 -1
- package/dist/nanoid/index.d.ts +1 -1
- package/dist/nanoid/non-secure.d.cts +1 -1
- package/dist/nanoid/non-secure.d.mts +1 -1
- package/dist/nanoid/non-secure.d.ts +1 -1
- package/dist/shared/{pinia-orm.ae01a7ce.d.cts → pinia-orm.52557866.d.cts} +4 -0
- package/dist/shared/{pinia-orm.ae01a7ce.d.mts → pinia-orm.52557866.d.mts} +4 -0
- package/dist/shared/{pinia-orm.ae01a7ce.d.ts → pinia-orm.52557866.d.ts} +4 -0
- package/dist/uuid/v1.d.cts +1 -1
- package/dist/uuid/v1.d.mts +1 -1
- package/dist/uuid/v1.d.ts +1 -1
- package/dist/uuid/v4.d.cts +1 -1
- package/dist/uuid/v4.d.mts +1 -1
- package/dist/uuid/v4.d.ts +1 -1
- package/package.json +2 -2
package/dist/casts.d.cts
CHANGED
package/dist/casts.d.mts
CHANGED
package/dist/casts.d.ts
CHANGED
package/dist/decorators.cjs
CHANGED
@@ -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;
|
package/dist/decorators.d.cts
CHANGED
@@ -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.
|
2
|
-
export { aq as NanoidOptions } from './shared/pinia-orm.
|
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 };
|
package/dist/decorators.d.mts
CHANGED
@@ -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.
|
2
|
-
export { aq as NanoidOptions } from './shared/pinia-orm.
|
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 };
|
package/dist/decorators.d.ts
CHANGED
@@ -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.
|
2
|
-
export { aq as NanoidOptions } from './shared/pinia-orm.
|
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 };
|
package/dist/decorators.mjs
CHANGED
@@ -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 };
|
package/dist/helpers.d.cts
CHANGED
package/dist/helpers.d.mts
CHANGED
package/dist/helpers.d.ts
CHANGED