@axi-engine/fields 0.2.1 → 0.2.2
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 +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -6
- package/dist/index.mjs +9 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -410,8 +410,9 @@ declare const DefaultFields_base: {
|
|
|
410
410
|
};
|
|
411
411
|
} & {
|
|
412
412
|
new (...args: any[]): {
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
createGeneric<T>(name: string, initialValue: T, options?: FieldOptions<T> | undefined): DefaultField<T>;
|
|
414
|
+
upsetGeneric<T>(name: string, value: T, options?: FieldOptions<T> | undefined): DefaultField<T>;
|
|
415
|
+
getGeneric<T>(name: string): DefaultField<T>;
|
|
415
416
|
readonly typeName: "fields";
|
|
416
417
|
readonly _fields: Map<string, Field<any>>;
|
|
417
418
|
readonly _fieldRegistry: FieldRegistry;
|
package/dist/index.d.ts
CHANGED
|
@@ -410,8 +410,9 @@ declare const DefaultFields_base: {
|
|
|
410
410
|
};
|
|
411
411
|
} & {
|
|
412
412
|
new (...args: any[]): {
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
createGeneric<T>(name: string, initialValue: T, options?: FieldOptions<T> | undefined): DefaultField<T>;
|
|
414
|
+
upsetGeneric<T>(name: string, value: T, options?: FieldOptions<T> | undefined): DefaultField<T>;
|
|
415
|
+
getGeneric<T>(name: string): DefaultField<T>;
|
|
415
416
|
readonly typeName: "fields";
|
|
416
417
|
readonly _fields: Map<string, Field<any>>;
|
|
417
418
|
readonly _fieldRegistry: FieldRegistry;
|
package/dist/index.js
CHANGED
|
@@ -544,20 +544,23 @@ function WithNumericFields(Base) {
|
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
// src/mixins/with-default-fields.mixin.ts
|
|
548
|
-
function
|
|
549
|
-
return class
|
|
550
|
-
|
|
547
|
+
// src/mixins/with-default-generic-fields.mixin.ts
|
|
548
|
+
function WithDefaultGenericFields(Base) {
|
|
549
|
+
return class FieldsWithDefaultGeneric extends Base {
|
|
550
|
+
createGeneric(name, initialValue, options) {
|
|
551
551
|
return this.create(DefaultField.typeName, name, initialValue, options);
|
|
552
552
|
}
|
|
553
|
-
|
|
553
|
+
upsetGeneric(name, value, options) {
|
|
554
554
|
return this.upset(DefaultField.typeName, name, value, options);
|
|
555
555
|
}
|
|
556
|
+
getGeneric(name) {
|
|
557
|
+
return this.get(name);
|
|
558
|
+
}
|
|
556
559
|
};
|
|
557
560
|
}
|
|
558
561
|
|
|
559
562
|
// src/default-fields.ts
|
|
560
|
-
var DefaultFields = class extends WithBooleanFields(WithStringFields(WithNumericFields(
|
|
563
|
+
var DefaultFields = class extends WithBooleanFields(WithStringFields(WithNumericFields(WithDefaultGenericFields(Fields)))) {
|
|
561
564
|
};
|
|
562
565
|
|
|
563
566
|
// src/field-tree.ts
|
package/dist/index.mjs
CHANGED
|
@@ -495,20 +495,23 @@ function WithNumericFields(Base) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
// src/mixins/with-default-fields.mixin.ts
|
|
499
|
-
function
|
|
500
|
-
return class
|
|
501
|
-
|
|
498
|
+
// src/mixins/with-default-generic-fields.mixin.ts
|
|
499
|
+
function WithDefaultGenericFields(Base) {
|
|
500
|
+
return class FieldsWithDefaultGeneric extends Base {
|
|
501
|
+
createGeneric(name, initialValue, options) {
|
|
502
502
|
return this.create(DefaultField.typeName, name, initialValue, options);
|
|
503
503
|
}
|
|
504
|
-
|
|
504
|
+
upsetGeneric(name, value, options) {
|
|
505
505
|
return this.upset(DefaultField.typeName, name, value, options);
|
|
506
506
|
}
|
|
507
|
+
getGeneric(name) {
|
|
508
|
+
return this.get(name);
|
|
509
|
+
}
|
|
507
510
|
};
|
|
508
511
|
}
|
|
509
512
|
|
|
510
513
|
// src/default-fields.ts
|
|
511
|
-
var DefaultFields = class extends WithBooleanFields(WithStringFields(WithNumericFields(
|
|
514
|
+
var DefaultFields = class extends WithBooleanFields(WithStringFields(WithNumericFields(WithDefaultGenericFields(Fields)))) {
|
|
512
515
|
};
|
|
513
516
|
|
|
514
517
|
// src/field-tree.ts
|