tsondb 0.10.0 → 0.10.1

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.
@@ -5,7 +5,8 @@ export const GitFileList = ({ filesByEntity, onFileButtonClick, fileButtons, })
5
5
  const { route } = useLocation();
6
6
  return filesByEntity.length === 0 ? (_jsx("p", { class: "no-changes", children: "No changes" })) : (_jsx("ul", { class: "git-entity-list", children: filesByEntity.map(([entityName, entityNamePlural, instances]) => (_jsxs("li", { class: "git-entity-list-item", children: [_jsx("span", { class: "title", children: entityNamePlural }), _jsx("ul", { class: "git-instance-list", children: instances.map(instance => (_jsxs("li", { class: "form-row form-row--compact git-instance-list-item", children: [_jsx("span", { class: "title form-row__fill", children: instance.displayName }), _jsx(GitStatusIndicator, { status: instance.gitStatus }), _jsx("button", { onClick: () => {
7
7
  route(`/entities/${entityName}/instances/${instance.id}`);
8
- }, children: "View" }), fileButtons.map(({ label, action }) => (_jsx("button", { onClick: () => {
8
+ }, disabled: (instance.gitStatus?.index === "D" && instance.gitStatus.workingDir === " ") ||
9
+ instance.gitStatus?.workingDir === "D", children: "View" }), fileButtons.map(({ label, action }) => (_jsx("button", { onClick: () => {
9
10
  void onFileButtonClick(entityName, instance, action);
10
11
  }, children: label }, label)))] }, instance.id))) })] }, entityName))) }));
11
12
  };
@@ -21,7 +21,7 @@ export const ChildEntitiesTypeInput = props => {
21
21
  onChildRemove(i);
22
22
  }, disabled: disabled, children: "Delete Item" })] }), _jsx(TypeInput, { ...props, type: childEntity.type, value: item.content, parentKey: childEntity.parentReferenceKey, onChange: newItem => {
23
23
  onChildChange(originalIndex, newItem);
24
- } })] }, i))) })) : (_jsx("p", { class: "empty", children: "No child entities" })), _jsx("div", { class: "add-item-container", children: _jsx("button", { onClick: () => {
24
+ }, childInstances: item.childInstances })] }, i))) })) : (_jsx("p", { class: "empty", children: "No child entities" })), _jsx("div", { class: "add-item-container", children: _jsx("button", { onClick: () => {
25
25
  onChildAdd(type.entity, createTypeSkeleton(getDeclFromDeclName, childEntity.type));
26
26
  }, disabled: disabled, children: "Add Item" }) })] }));
27
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsondb",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Lukas Obermann",