@arpproject/recrate 0.1.16 → 0.1.18
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/recrate.es.js +3 -15
- package/package.json +1 -1
package/dist/recrate.es.js
CHANGED
|
@@ -106618,7 +106618,6 @@ const RenderControls = ({
|
|
|
106618
106618
|
}) => {
|
|
106619
106619
|
var _a2, _b, _c, _d, _e2, _f;
|
|
106620
106620
|
const { t: t2 } = useTranslation();
|
|
106621
|
-
const profileManager = useContext(ProfileManagerContext);
|
|
106622
106621
|
const state = useStateStore();
|
|
106623
106622
|
const [dialogs, setDialogs] = useState({
|
|
106624
106623
|
previewCrate: false,
|
|
@@ -106628,22 +106627,11 @@ const RenderControls = ({
|
|
|
106628
106627
|
saveEntityAsTemplate: false,
|
|
106629
106628
|
deleteConfirm: false
|
|
106630
106629
|
});
|
|
106631
|
-
const [definition, setDefinition] = useState({});
|
|
106632
106630
|
const isRootDataset = useMemo$1(() => entity["@id"] === "./", [entity]);
|
|
106633
106631
|
const isRootDescriptor = useMemo$1(
|
|
106634
106632
|
() => entity["@id"] === "ro-crate-metadata.json" && entity["@type"].includes("CreativeWork"),
|
|
106635
106633
|
[entity]
|
|
106636
106634
|
);
|
|
106637
|
-
useEffect(() => {
|
|
106638
|
-
loadEntityDefinition();
|
|
106639
|
-
}, [profileManager == null ? void 0 : profileManager.$key, entity["@id"]]);
|
|
106640
|
-
const loadEntityDefinition = () => {
|
|
106641
|
-
if (!(entity == null ? void 0 : entity["@type"]) || !(profileManager == null ? void 0 : profileManager.getTypeDefinition)) {
|
|
106642
|
-
setDefinition("inherit");
|
|
106643
|
-
} else {
|
|
106644
|
-
setDefinition(profileManager.getTypeDefinition({ entity }));
|
|
106645
|
-
}
|
|
106646
|
-
};
|
|
106647
106635
|
const toggle = (dialog) => {
|
|
106648
106636
|
setDialogs((prev2) => {
|
|
106649
106637
|
const newState = { ...prev2 };
|
|
@@ -106714,7 +106702,6 @@ const RenderControls = ({
|
|
|
106714
106702
|
{
|
|
106715
106703
|
onClick: () => toggle("addProperty"),
|
|
106716
106704
|
type: "primary",
|
|
106717
|
-
disabled: definition !== "inherit",
|
|
106718
106705
|
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$m, {}),
|
|
106719
106706
|
children: t2("add_label")
|
|
106720
106707
|
}
|
|
@@ -110853,7 +110840,8 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110853
110840
|
const addProfileTabItem = {
|
|
110854
110841
|
key: "add-schema-button",
|
|
110855
110842
|
label: addProfileTabLabel,
|
|
110856
|
-
className: "ant-tabs-tab-add-button"
|
|
110843
|
+
className: "ant-tabs-tab-add-button",
|
|
110844
|
+
disabled: true
|
|
110857
110845
|
};
|
|
110858
110846
|
const toggleViewTabItem = {
|
|
110859
110847
|
key: "toggle-view",
|
|
@@ -119533,7 +119521,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
|
|
|
119533
119521
|
}) : null
|
|
119534
119522
|
);
|
|
119535
119523
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
119536
|
-
const version = "0.1.
|
|
119524
|
+
const version = "0.1.18";
|
|
119537
119525
|
const pkg = {
|
|
119538
119526
|
version
|
|
119539
119527
|
};
|