tsondb 0.20.1 → 0.20.3
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.
|
@@ -2,11 +2,12 @@ import { type Result } from "@elyukai/utils/result";
|
|
|
2
2
|
import type { InstanceContent } from "../../shared/utils/instances.ts";
|
|
3
3
|
import type { DefaultTSONDBTypes, EntityName } from "../index.ts";
|
|
4
4
|
import { type EntityDecl } from "../schema/dsl/index.ts";
|
|
5
|
-
import type { AnyChildEntityMap, AnyEntityMap, GetAllChildInstanceContainersForParent, GetAllInstances, GetDisplayName, GetDisplayNameAndId, GetEntityByName, GetInstanceById, GetInstanceOverviewOfEntityById, RegisteredChildEntityMap, RegisteredEntity, RegisteredEntityMap, RegisteredEnumOrTypeAlias } from "../schema/generatedTypeHelpers.ts";
|
|
5
|
+
import type { AnyChildEntityMap, AnyEntityMap, GetAllChildInstanceContainersForParent, GetAllInstanceContainers, GetAllInstances, GetDisplayName, GetDisplayNameAndId, GetEntityByName, GetInstanceById, GetInstanceOverviewOfEntityById, RegisteredChildEntityMap, RegisteredEntity, RegisteredEntityMap, RegisteredEnumOrTypeAlias } from "../schema/generatedTypeHelpers.ts";
|
|
6
6
|
import type { DatabaseInMemory } from "./databaseInMemory.ts";
|
|
7
7
|
export type CustomConstraintHelpers<EM extends AnyEntityMap = RegisteredEntityMap, CEM extends AnyChildEntityMap = RegisteredChildEntityMap> = {
|
|
8
8
|
getInstanceById: GetInstanceById<EM>;
|
|
9
9
|
getAllInstances: GetAllInstances<EM>;
|
|
10
|
+
getAllInstanceContainers: GetAllInstanceContainers<EM>;
|
|
10
11
|
getAllChildInstancesForParent: GetAllChildInstanceContainersForParent<CEM>;
|
|
11
12
|
getDisplayName: GetDisplayName<EM>;
|
|
12
13
|
getDisplayNameAndId: GetDisplayNameAndId<EM>;
|
|
@@ -12,6 +12,7 @@ export const checkCustomConstraintsForAllEntities = (getDisplayName, getDisplayN
|
|
|
12
12
|
const helpers = {
|
|
13
13
|
getInstanceById: data.getInstanceOfEntityById.bind(data),
|
|
14
14
|
getAllInstances: data.getAllInstancesOfEntity.bind(data),
|
|
15
|
+
getAllInstanceContainers: data.getAllInstanceContainersOfEntity.bind(data),
|
|
15
16
|
getAllChildInstancesForParent: data.getAllChildInstanceContainersForParent.bind(data, getEntityByName),
|
|
16
17
|
getDisplayName,
|
|
17
18
|
getDisplayNameAndId,
|
package/dist/src/web/488.js
CHANGED
|
@@ -4783,7 +4783,7 @@ const ChildEntitiesTypeInputElement = (props)=>{
|
|
|
4783
4783
|
}),
|
|
4784
4784
|
/*#__PURE__*/ jsxRuntime_module_u("button", {
|
|
4785
4785
|
onClick: ()=>{
|
|
4786
|
-
onChildDuplicate(
|
|
4786
|
+
onChildDuplicate(originalIndex);
|
|
4787
4787
|
},
|
|
4788
4788
|
disabled: disabled,
|
|
4789
4789
|
children: "Duplicate"
|
|
@@ -4791,7 +4791,7 @@ const ChildEntitiesTypeInputElement = (props)=>{
|
|
|
4791
4791
|
/*#__PURE__*/ jsxRuntime_module_u("button", {
|
|
4792
4792
|
class: "destructive",
|
|
4793
4793
|
onClick: ()=>{
|
|
4794
|
-
onChildRemove(
|
|
4794
|
+
onChildRemove(originalIndex);
|
|
4795
4795
|
},
|
|
4796
4796
|
disabled: disabled,
|
|
4797
4797
|
children: "Delete"
|