@arpproject/recrate 0.1.29 → 0.1.30
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.
|
@@ -9,6 +9,7 @@ export interface DescriboCrateBuilderProps {
|
|
|
9
9
|
enableCratePreview?: boolean;
|
|
10
10
|
enableBrowseEntities?: boolean;
|
|
11
11
|
enableTemplateSave?: boolean;
|
|
12
|
+
enableBulkAdd?: boolean;
|
|
12
13
|
enableReverseLinkBrowser?: boolean;
|
|
13
14
|
enableUrlMarkup?: boolean;
|
|
14
15
|
enableEntityTimestamps?: boolean;
|
|
@@ -31,6 +31,11 @@ export declare const propertyDefinitions: {
|
|
|
31
31
|
default: boolean;
|
|
32
32
|
validator: (val: boolean) => boolean;
|
|
33
33
|
};
|
|
34
|
+
enableBulkAdd: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
validator: (val: boolean) => boolean;
|
|
38
|
+
};
|
|
34
39
|
enableReverseLinkBrowser: {
|
|
35
40
|
type: BooleanConstructor;
|
|
36
41
|
default: boolean;
|
package/dist/recrate.es.js
CHANGED
|
@@ -80079,11 +80079,14 @@ const AddControl = ({
|
|
|
80079
80079
|
onBulkAdd,
|
|
80080
80080
|
onClose
|
|
80081
80081
|
}) => {
|
|
80082
|
+
var _a2;
|
|
80082
80083
|
const profileManager = useContext(ProfileManagerContext);
|
|
80084
|
+
const state = useStateStore();
|
|
80083
80085
|
const notOnlyPrimitives = lodashExports.difference(
|
|
80084
80086
|
Array.isArray(types2) ? types2 : [types2],
|
|
80085
80087
|
[...primitives, "ANY"]
|
|
80086
80088
|
);
|
|
80089
|
+
const showBulkAdd = ((_a2 = state.configuration) == null ? void 0 : _a2.enableBulkAdd) !== false && notOnlyPrimitives.length > 0;
|
|
80087
80090
|
const getTypeLabelFromProfile = (type4) => {
|
|
80088
80091
|
return profileManager == null ? void 0 : profileManager.getTypeLabel(type4);
|
|
80089
80092
|
};
|
|
@@ -80116,7 +80119,7 @@ const AddControl = ({
|
|
|
80116
80119
|
]
|
|
80117
80120
|
}
|
|
80118
80121
|
) }, idx)),
|
|
80119
|
-
|
|
80122
|
+
showBulkAdd && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "m-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
80120
80123
|
Button$1,
|
|
80121
80124
|
{
|
|
80122
80125
|
onClick: handleBulkAdd,
|
|
@@ -81446,10 +81449,13 @@ const Add = ({
|
|
|
81446
81449
|
onCreateEntity,
|
|
81447
81450
|
onLinkEntity
|
|
81448
81451
|
}) => {
|
|
81452
|
+
var _a2;
|
|
81449
81453
|
const { t: t2 } = useTranslation();
|
|
81450
81454
|
const profileManager = useContext(ProfileManagerContext);
|
|
81455
|
+
const state = useStateStore();
|
|
81451
81456
|
const [addType, setAddType] = useState();
|
|
81452
81457
|
const [localisedAddType, setLocalisedAddType] = useState();
|
|
81458
|
+
const enableBulkAdd = ((_a2 = state.configuration) == null ? void 0 : _a2.enableBulkAdd) !== false;
|
|
81453
81459
|
const primitives = [
|
|
81454
81460
|
"Text",
|
|
81455
81461
|
"TextArea",
|
|
@@ -81481,6 +81487,11 @@ const Add = ({
|
|
|
81481
81487
|
setAddType(void 0);
|
|
81482
81488
|
setLocalisedAddType(void 0);
|
|
81483
81489
|
};
|
|
81490
|
+
useEffect(() => {
|
|
81491
|
+
if (!enableBulkAdd && addType === "bulkAdd") {
|
|
81492
|
+
close();
|
|
81493
|
+
}
|
|
81494
|
+
}, [enableBulkAdd, addType]);
|
|
81484
81495
|
const add2 = ({ type: type4 }) => {
|
|
81485
81496
|
setAddType(type4);
|
|
81486
81497
|
setLocalisedAddType(profileManager == null ? void 0 : profileManager.getTypeLabel(type4));
|
|
@@ -81621,7 +81632,7 @@ const Add = ({
|
|
|
81621
81632
|
}
|
|
81622
81633
|
)
|
|
81623
81634
|
] }),
|
|
81624
|
-
addType === "bulkAdd" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81635
|
+
enableBulkAdd && addType === "bulkAdd" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81625
81636
|
BulkAdd,
|
|
81626
81637
|
{
|
|
81627
81638
|
types: types2,
|
|
@@ -120072,6 +120083,9 @@ const propertyDefinitions = {
|
|
|
120072
120083
|
enableTemplateSave: {
|
|
120073
120084
|
default: false
|
|
120074
120085
|
},
|
|
120086
|
+
enableBulkAdd: {
|
|
120087
|
+
default: true
|
|
120088
|
+
},
|
|
120075
120089
|
enableReverseLinkBrowser: {
|
|
120076
120090
|
default: false
|
|
120077
120091
|
},
|
|
@@ -120899,7 +120913,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
|
|
|
120899
120913
|
}) : null
|
|
120900
120914
|
);
|
|
120901
120915
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
120902
|
-
const version = "0.1.
|
|
120916
|
+
const version = "0.1.30";
|
|
120903
120917
|
const pkg = {
|
|
120904
120918
|
version
|
|
120905
120919
|
};
|
|
@@ -120921,6 +120935,7 @@ function DescriboCrateBuilderInner(props) {
|
|
|
120921
120935
|
enableCratePreview = propertyDefinitions.enableCratePreview.default,
|
|
120922
120936
|
enableBrowseEntities = propertyDefinitions.enableBrowseEntities.default,
|
|
120923
120937
|
enableTemplateSave = propertyDefinitions.enableTemplateSave.default,
|
|
120938
|
+
enableBulkAdd = propertyDefinitions.enableBulkAdd.default,
|
|
120924
120939
|
enableReverseLinkBrowser = propertyDefinitions.enableReverseLinkBrowser.default,
|
|
120925
120940
|
enableUrlMarkup = propertyDefinitions.enableUrlMarkup.default,
|
|
120926
120941
|
enableEntityTimestamps = propertyDefinitions.enableEntityTimestamps.default,
|
|
@@ -120958,6 +120973,7 @@ function DescriboCrateBuilderInner(props) {
|
|
|
120958
120973
|
enableCratePreview,
|
|
120959
120974
|
enableBrowseEntities,
|
|
120960
120975
|
enableTemplateSave,
|
|
120976
|
+
enableBulkAdd,
|
|
120961
120977
|
enableReverseLinkBrowser,
|
|
120962
120978
|
enableUrlMarkup,
|
|
120963
120979
|
enableEntityTimestamps,
|
|
@@ -120984,6 +121000,7 @@ function DescriboCrateBuilderInner(props) {
|
|
|
120984
121000
|
enableCratePreview,
|
|
120985
121001
|
enableBrowseEntities,
|
|
120986
121002
|
enableTemplateSave,
|
|
121003
|
+
enableBulkAdd,
|
|
120987
121004
|
enableReverseLinkBrowser,
|
|
120988
121005
|
enableUrlMarkup,
|
|
120989
121006
|
enableEntityTimestamps,
|
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type DescriboCrateBuilderProps = {
|
|
|
18
18
|
enableCratePreview?: boolean;
|
|
19
19
|
enableBrowseEntities?: boolean;
|
|
20
20
|
enableTemplateSave?: boolean;
|
|
21
|
+
enableBulkAdd?: boolean;
|
|
21
22
|
readonly?: boolean;
|
|
22
23
|
enableReverseLinkBrowser?: boolean;
|
|
23
24
|
enableInternalRouting?: boolean;
|