@arpproject/recrate 0.1.25 → 0.1.27
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
CHANGED
|
@@ -7927,9 +7927,9 @@ var CheckCircleFilled = function CheckCircleFilled2(props, ref) {
|
|
|
7927
7927
|
icon: CheckCircleFilled$1
|
|
7928
7928
|
}));
|
|
7929
7929
|
};
|
|
7930
|
-
var RefIcon$
|
|
7930
|
+
var RefIcon$z = /* @__PURE__ */ React.forwardRef(CheckCircleFilled);
|
|
7931
7931
|
if (process.env.NODE_ENV !== "production") {
|
|
7932
|
-
RefIcon$
|
|
7932
|
+
RefIcon$z.displayName = "CheckCircleFilled";
|
|
7933
7933
|
}
|
|
7934
7934
|
var CloseCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
|
|
7935
7935
|
var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
@@ -7938,9 +7938,9 @@ var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
|
7938
7938
|
icon: CloseCircleFilled$1
|
|
7939
7939
|
}));
|
|
7940
7940
|
};
|
|
7941
|
-
var RefIcon$
|
|
7941
|
+
var RefIcon$y = /* @__PURE__ */ React.forwardRef(CloseCircleFilled);
|
|
7942
7942
|
if (process.env.NODE_ENV !== "production") {
|
|
7943
|
-
RefIcon$
|
|
7943
|
+
RefIcon$y.displayName = "CloseCircleFilled";
|
|
7944
7944
|
}
|
|
7945
7945
|
var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
|
|
7946
7946
|
var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
@@ -7949,9 +7949,9 @@ var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
|
7949
7949
|
icon: CloseOutlined$1
|
|
7950
7950
|
}));
|
|
7951
7951
|
};
|
|
7952
|
-
var RefIcon$
|
|
7952
|
+
var RefIcon$x = /* @__PURE__ */ React.forwardRef(CloseOutlined);
|
|
7953
7953
|
if (process.env.NODE_ENV !== "production") {
|
|
7954
|
-
RefIcon$
|
|
7954
|
+
RefIcon$x.displayName = "CloseOutlined";
|
|
7955
7955
|
}
|
|
7956
7956
|
var ExclamationCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
|
|
7957
7957
|
var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
@@ -7960,9 +7960,9 @@ var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
|
7960
7960
|
icon: ExclamationCircleFilled$1
|
|
7961
7961
|
}));
|
|
7962
7962
|
};
|
|
7963
|
-
var RefIcon$
|
|
7963
|
+
var RefIcon$w = /* @__PURE__ */ React.forwardRef(ExclamationCircleFilled);
|
|
7964
7964
|
if (process.env.NODE_ENV !== "production") {
|
|
7965
|
-
RefIcon$
|
|
7965
|
+
RefIcon$w.displayName = "ExclamationCircleFilled";
|
|
7966
7966
|
}
|
|
7967
7967
|
var InfoCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
|
|
7968
7968
|
var InfoCircleFilled = function InfoCircleFilled2(props, ref) {
|
|
@@ -7971,9 +7971,9 @@ var InfoCircleFilled = function InfoCircleFilled2(props, ref) {
|
|
|
7971
7971
|
icon: InfoCircleFilled$1
|
|
7972
7972
|
}));
|
|
7973
7973
|
};
|
|
7974
|
-
var RefIcon$
|
|
7974
|
+
var RefIcon$v = /* @__PURE__ */ React.forwardRef(InfoCircleFilled);
|
|
7975
7975
|
if (process.env.NODE_ENV !== "production") {
|
|
7976
|
-
RefIcon$
|
|
7976
|
+
RefIcon$v.displayName = "InfoCircleFilled";
|
|
7977
7977
|
}
|
|
7978
7978
|
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
|
|
7979
7979
|
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
|
|
@@ -8714,9 +8714,9 @@ var LoadingOutlined = function LoadingOutlined2(props, ref) {
|
|
|
8714
8714
|
icon: LoadingOutlined$1
|
|
8715
8715
|
}));
|
|
8716
8716
|
};
|
|
8717
|
-
var RefIcon$
|
|
8717
|
+
var RefIcon$u = /* @__PURE__ */ React.forwardRef(LoadingOutlined);
|
|
8718
8718
|
if (process.env.NODE_ENV !== "production") {
|
|
8719
|
-
RefIcon$
|
|
8719
|
+
RefIcon$u.displayName = "LoadingOutlined";
|
|
8720
8720
|
}
|
|
8721
8721
|
function mergeProps$1(...items) {
|
|
8722
8722
|
const ret = {};
|
|
@@ -8775,7 +8775,7 @@ const useClosable = (propCloseCollection, contextCloseCollection, fallbackCloseC
|
|
|
8775
8775
|
const [contextLocale] = useLocale$1("global", localeValues.global);
|
|
8776
8776
|
const closeBtnIsDisabled = typeof propCloseConfig !== "boolean" ? !!(propCloseConfig === null || propCloseConfig === void 0 ? void 0 : propCloseConfig.disabled) : false;
|
|
8777
8777
|
const mergedFallbackCloseCollection = React__default.useMemo(() => Object.assign({
|
|
8778
|
-
closeIcon: /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
8778
|
+
closeIcon: /* @__PURE__ */ React__default.createElement(RefIcon$x, null)
|
|
8779
8779
|
}, fallbackCloseCollection), [fallbackCloseCollection]);
|
|
8780
8780
|
const mergedClosableConfig = React__default.useMemo(() => {
|
|
8781
8781
|
if (propCloseConfig === false) {
|
|
@@ -9100,11 +9100,11 @@ const useStyle$u = genStyleHooks("Message", (token2) => {
|
|
|
9100
9100
|
return t2;
|
|
9101
9101
|
});
|
|
9102
9102
|
const TypeIcon = {
|
|
9103
|
-
info: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9104
|
-
success: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9105
|
-
error: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9106
|
-
warning: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9107
|
-
loading: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9103
|
+
info: /* @__PURE__ */ React.createElement(RefIcon$v, null),
|
|
9104
|
+
success: /* @__PURE__ */ React.createElement(RefIcon$z, null),
|
|
9105
|
+
error: /* @__PURE__ */ React.createElement(RefIcon$y, null),
|
|
9106
|
+
warning: /* @__PURE__ */ React.createElement(RefIcon$w, null),
|
|
9107
|
+
loading: /* @__PURE__ */ React.createElement(RefIcon$u, null)
|
|
9108
9108
|
};
|
|
9109
9109
|
const PureContent$1 = ({
|
|
9110
9110
|
prefixCls,
|
|
@@ -9191,7 +9191,7 @@ const Holder$1 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
9191
9191
|
const getNotificationMotion = () => getMotion$3(prefixCls, transitionName);
|
|
9192
9192
|
const mergedCloseIcon = /* @__PURE__ */ React.createElement("span", {
|
|
9193
9193
|
className: `${prefixCls}-close-x`
|
|
9194
|
-
}, /* @__PURE__ */ React.createElement(RefIcon$
|
|
9194
|
+
}, /* @__PURE__ */ React.createElement(RefIcon$x, {
|
|
9195
9195
|
className: `${prefixCls}-close-icon`
|
|
9196
9196
|
}));
|
|
9197
9197
|
const [api2, holder] = useNotification$1({
|
|
@@ -10231,7 +10231,7 @@ const InnerLoadingIcon = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
10231
10231
|
className: mergedIconCls,
|
|
10232
10232
|
style: style2,
|
|
10233
10233
|
ref
|
|
10234
|
-
}, /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
10234
|
+
}, /* @__PURE__ */ React__default.createElement(RefIcon$u, {
|
|
10235
10235
|
className: iconClassName
|
|
10236
10236
|
}));
|
|
10237
10237
|
});
|
|
@@ -10967,9 +10967,9 @@ var RightOutlined = function RightOutlined2(props, ref) {
|
|
|
10967
10967
|
icon: RightOutlined$1
|
|
10968
10968
|
}));
|
|
10969
10969
|
};
|
|
10970
|
-
var RefIcon$
|
|
10970
|
+
var RefIcon$t = /* @__PURE__ */ React.forwardRef(RightOutlined);
|
|
10971
10971
|
if (process.env.NODE_ENV !== "production") {
|
|
10972
|
-
RefIcon$
|
|
10972
|
+
RefIcon$t.displayName = "RightOutlined";
|
|
10973
10973
|
}
|
|
10974
10974
|
const genCollapseMotion = (token2) => ({
|
|
10975
10975
|
[token2.componentCls]: {
|
|
@@ -17078,7 +17078,7 @@ const NormalOkBtn = () => {
|
|
|
17078
17078
|
function renderCloseIcon(prefixCls, closeIcon) {
|
|
17079
17079
|
return /* @__PURE__ */ React__default.createElement("span", {
|
|
17080
17080
|
className: `${prefixCls}-close-x`
|
|
17081
|
-
}, closeIcon || /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
17081
|
+
}, closeIcon || /* @__PURE__ */ React__default.createElement(RefIcon$x, {
|
|
17082
17082
|
className: `${prefixCls}-close-icon`
|
|
17083
17083
|
}));
|
|
17084
17084
|
}
|
|
@@ -17670,7 +17670,7 @@ const Modal = (props) => {
|
|
|
17670
17670
|
})) : null;
|
|
17671
17671
|
const [mergedClosable, mergedCloseIcon, closeBtnIsDisabled, ariaProps] = useClosable(pickClosable(props), pickClosable(modalContext), {
|
|
17672
17672
|
closable: true,
|
|
17673
|
-
closeIcon: /* @__PURE__ */ React.createElement(RefIcon$
|
|
17673
|
+
closeIcon: /* @__PURE__ */ React.createElement(RefIcon$x, {
|
|
17674
17674
|
className: `${prefixCls}-close-icon`
|
|
17675
17675
|
}),
|
|
17676
17676
|
closeIconRender: (icon2) => renderCloseIcon(prefixCls, icon2)
|
|
@@ -17867,16 +17867,16 @@ const ConfirmContent = (props) => {
|
|
|
17867
17867
|
if (!icon2 && icon2 !== null) {
|
|
17868
17868
|
switch (type4) {
|
|
17869
17869
|
case "info":
|
|
17870
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17870
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$v, null);
|
|
17871
17871
|
break;
|
|
17872
17872
|
case "success":
|
|
17873
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17873
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$z, null);
|
|
17874
17874
|
break;
|
|
17875
17875
|
case "error":
|
|
17876
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17876
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$y, null);
|
|
17877
17877
|
break;
|
|
17878
17878
|
default:
|
|
17879
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17879
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$w, null);
|
|
17880
17880
|
}
|
|
17881
17881
|
}
|
|
17882
17882
|
const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type4 === "confirm";
|
|
@@ -18640,15 +18640,15 @@ function getCloseIcon(prefixCls, closeIcon) {
|
|
|
18640
18640
|
if (closeIcon === null || closeIcon === false) {
|
|
18641
18641
|
return null;
|
|
18642
18642
|
}
|
|
18643
|
-
return closeIcon || /* @__PURE__ */ React.createElement(RefIcon$
|
|
18643
|
+
return closeIcon || /* @__PURE__ */ React.createElement(RefIcon$x, {
|
|
18644
18644
|
className: `${prefixCls}-close-icon`
|
|
18645
18645
|
});
|
|
18646
18646
|
}
|
|
18647
18647
|
const typeToIcon = {
|
|
18648
|
-
success: RefIcon$
|
|
18649
|
-
info: RefIcon$
|
|
18650
|
-
error: RefIcon$
|
|
18651
|
-
warning: RefIcon$
|
|
18648
|
+
success: RefIcon$z,
|
|
18649
|
+
info: RefIcon$v,
|
|
18650
|
+
error: RefIcon$y,
|
|
18651
|
+
warning: RefIcon$w
|
|
18652
18652
|
};
|
|
18653
18653
|
const PureContent = (props) => {
|
|
18654
18654
|
const {
|
|
@@ -25259,9 +25259,9 @@ var CheckOutlined = function CheckOutlined2(props, ref) {
|
|
|
25259
25259
|
icon: CheckOutlined$1
|
|
25260
25260
|
}));
|
|
25261
25261
|
};
|
|
25262
|
-
var RefIcon$
|
|
25262
|
+
var RefIcon$s = /* @__PURE__ */ React.forwardRef(CheckOutlined);
|
|
25263
25263
|
if (process.env.NODE_ENV !== "production") {
|
|
25264
|
-
RefIcon$
|
|
25264
|
+
RefIcon$s.displayName = "CheckOutlined";
|
|
25265
25265
|
}
|
|
25266
25266
|
var DownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
25267
25267
|
var DownOutlined = function DownOutlined2(props, ref) {
|
|
@@ -25270,9 +25270,9 @@ var DownOutlined = function DownOutlined2(props, ref) {
|
|
|
25270
25270
|
icon: DownOutlined$1
|
|
25271
25271
|
}));
|
|
25272
25272
|
};
|
|
25273
|
-
var RefIcon$
|
|
25273
|
+
var RefIcon$r = /* @__PURE__ */ React.forwardRef(DownOutlined);
|
|
25274
25274
|
if (process.env.NODE_ENV !== "production") {
|
|
25275
|
-
RefIcon$
|
|
25275
|
+
RefIcon$r.displayName = "DownOutlined";
|
|
25276
25276
|
}
|
|
25277
25277
|
var SearchOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
|
|
25278
25278
|
var SearchOutlined = function SearchOutlined2(props, ref) {
|
|
@@ -25281,9 +25281,9 @@ var SearchOutlined = function SearchOutlined2(props, ref) {
|
|
|
25281
25281
|
icon: SearchOutlined$1
|
|
25282
25282
|
}));
|
|
25283
25283
|
};
|
|
25284
|
-
var RefIcon$
|
|
25284
|
+
var RefIcon$q = /* @__PURE__ */ React.forwardRef(SearchOutlined);
|
|
25285
25285
|
if (process.env.NODE_ENV !== "production") {
|
|
25286
|
-
RefIcon$
|
|
25286
|
+
RefIcon$q.displayName = "SearchOutlined";
|
|
25287
25287
|
}
|
|
25288
25288
|
function useIcons$1({
|
|
25289
25289
|
suffixIcon,
|
|
@@ -25303,7 +25303,7 @@ function useIcons$1({
|
|
|
25303
25303
|
const warning3 = devUseWarning(componentName);
|
|
25304
25304
|
warning3.deprecated(!clearIcon, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
25305
25305
|
}
|
|
25306
|
-
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$
|
|
25306
|
+
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$y, null);
|
|
25307
25307
|
const getSuffixIconNode = (arrowIcon) => {
|
|
25308
25308
|
if (suffixIcon === null && !hasFeedback && !showArrow) {
|
|
25309
25309
|
return null;
|
|
@@ -25314,7 +25314,7 @@ function useIcons$1({
|
|
|
25314
25314
|
if (suffixIcon !== void 0) {
|
|
25315
25315
|
mergedSuffixIcon = getSuffixIconNode(suffixIcon);
|
|
25316
25316
|
} else if (loading) {
|
|
25317
|
-
mergedSuffixIcon = getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$
|
|
25317
|
+
mergedSuffixIcon = getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$u, {
|
|
25318
25318
|
spin: true
|
|
25319
25319
|
}));
|
|
25320
25320
|
} else {
|
|
@@ -25324,11 +25324,11 @@ function useIcons$1({
|
|
|
25324
25324
|
showSearch
|
|
25325
25325
|
}) => {
|
|
25326
25326
|
if (open && showSearch) {
|
|
25327
|
-
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$
|
|
25327
|
+
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$q, {
|
|
25328
25328
|
className: iconCls
|
|
25329
25329
|
}));
|
|
25330
25330
|
}
|
|
25331
|
-
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$
|
|
25331
|
+
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$r, {
|
|
25332
25332
|
className: iconCls
|
|
25333
25333
|
}));
|
|
25334
25334
|
};
|
|
@@ -25337,7 +25337,7 @@ function useIcons$1({
|
|
|
25337
25337
|
if (menuItemSelectedIcon !== void 0) {
|
|
25338
25338
|
mergedItemIcon = menuItemSelectedIcon;
|
|
25339
25339
|
} else if (multiple) {
|
|
25340
|
-
mergedItemIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
25340
|
+
mergedItemIcon = /* @__PURE__ */ React.createElement(RefIcon$s, null);
|
|
25341
25341
|
} else {
|
|
25342
25342
|
mergedItemIcon = null;
|
|
25343
25343
|
}
|
|
@@ -25345,7 +25345,7 @@ function useIcons$1({
|
|
|
25345
25345
|
if (removeIcon !== void 0) {
|
|
25346
25346
|
mergedRemoveIcon = removeIcon;
|
|
25347
25347
|
} else {
|
|
25348
|
-
mergedRemoveIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
25348
|
+
mergedRemoveIcon = /* @__PURE__ */ React.createElement(RefIcon$x, null);
|
|
25349
25349
|
}
|
|
25350
25350
|
return {
|
|
25351
25351
|
clearIcon: mergedClearIcon,
|
|
@@ -27672,9 +27672,9 @@ var LeftOutlined = function LeftOutlined2(props, ref) {
|
|
|
27672
27672
|
icon: LeftOutlined$1
|
|
27673
27673
|
}));
|
|
27674
27674
|
};
|
|
27675
|
-
var RefIcon$
|
|
27675
|
+
var RefIcon$p = /* @__PURE__ */ React.forwardRef(LeftOutlined);
|
|
27676
27676
|
if (process.env.NODE_ENV !== "production") {
|
|
27677
|
-
RefIcon$
|
|
27677
|
+
RefIcon$p.displayName = "LeftOutlined";
|
|
27678
27678
|
}
|
|
27679
27679
|
var ESC$1 = KeyCode.ESC, TAB = KeyCode.TAB;
|
|
27680
27680
|
function useAccessibility$1(_ref) {
|
|
@@ -29263,9 +29263,9 @@ var EllipsisOutlined = function EllipsisOutlined2(props, ref) {
|
|
|
29263
29263
|
icon: EllipsisOutlined$1
|
|
29264
29264
|
}));
|
|
29265
29265
|
};
|
|
29266
|
-
var RefIcon$
|
|
29266
|
+
var RefIcon$o = /* @__PURE__ */ React.forwardRef(EllipsisOutlined);
|
|
29267
29267
|
if (process.env.NODE_ENV !== "production") {
|
|
29268
|
-
RefIcon$
|
|
29268
|
+
RefIcon$o.displayName = "EllipsisOutlined";
|
|
29269
29269
|
}
|
|
29270
29270
|
var dayjs_min$1 = { exports: {} };
|
|
29271
29271
|
var dayjs_min = dayjs_min$1.exports;
|
|
@@ -37374,9 +37374,9 @@ var PlusOutlined = function PlusOutlined2(props, ref) {
|
|
|
37374
37374
|
icon: PlusOutlined$1
|
|
37375
37375
|
}));
|
|
37376
37376
|
};
|
|
37377
|
-
var RefIcon$
|
|
37377
|
+
var RefIcon$n = /* @__PURE__ */ React.forwardRef(PlusOutlined);
|
|
37378
37378
|
if (process.env.NODE_ENV !== "production") {
|
|
37379
|
-
RefIcon$
|
|
37379
|
+
RefIcon$n.displayName = "PlusOutlined";
|
|
37380
37380
|
}
|
|
37381
37381
|
const TabContext = /* @__PURE__ */ createContext(null);
|
|
37382
37382
|
var useIndicator = function useIndicator2(options) {
|
|
@@ -39672,8 +39672,8 @@ const InternalTabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
39672
39672
|
}) => {
|
|
39673
39673
|
onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === "add" ? event : key, editType);
|
|
39674
39674
|
},
|
|
39675
|
-
removeIcon: (_a2 = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a2 !== void 0 ? _a2 : /* @__PURE__ */ React.createElement(RefIcon$
|
|
39676
|
-
addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /* @__PURE__ */ React.createElement(RefIcon$
|
|
39675
|
+
removeIcon: (_a2 = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a2 !== void 0 ? _a2 : /* @__PURE__ */ React.createElement(RefIcon$x, null),
|
|
39676
|
+
addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /* @__PURE__ */ React.createElement(RefIcon$n, null),
|
|
39677
39677
|
showAdd: hideAdd !== true
|
|
39678
39678
|
};
|
|
39679
39679
|
}
|
|
@@ -39708,7 +39708,7 @@ const InternalTabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
39708
39708
|
style: mergedStyle,
|
|
39709
39709
|
editable: editable2,
|
|
39710
39710
|
more: Object.assign({
|
|
39711
|
-
icon: (_l = (_k = (_j = (_h = tabs === null || tabs === void 0 ? void 0 : tabs.more) === null || _h === void 0 ? void 0 : _h.icon) !== null && _j !== void 0 ? _j : tabs === null || tabs === void 0 ? void 0 : tabs.moreIcon) !== null && _k !== void 0 ? _k : moreIcon) !== null && _l !== void 0 ? _l : /* @__PURE__ */ React.createElement(RefIcon$
|
|
39711
|
+
icon: (_l = (_k = (_j = (_h = tabs === null || tabs === void 0 ? void 0 : tabs.more) === null || _h === void 0 ? void 0 : _h.icon) !== null && _j !== void 0 ? _j : tabs === null || tabs === void 0 ? void 0 : tabs.moreIcon) !== null && _k !== void 0 ? _k : moreIcon) !== null && _l !== void 0 ? _l : /* @__PURE__ */ React.createElement(RefIcon$o, null),
|
|
39712
39712
|
transitionName: `${rootPrefixCls}-slide-up`
|
|
39713
39713
|
}, more),
|
|
39714
39714
|
prefixCls,
|
|
@@ -41217,6 +41217,17 @@ const Divider = (props) => {
|
|
|
41217
41217
|
if (process.env.NODE_ENV !== "production") {
|
|
41218
41218
|
Divider.displayName = "Divider";
|
|
41219
41219
|
}
|
|
41220
|
+
var UpOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
|
|
41221
|
+
var UpOutlined = function UpOutlined2(props, ref) {
|
|
41222
|
+
return /* @__PURE__ */ React.createElement(Icon$2, _extends$1({}, props, {
|
|
41223
|
+
ref,
|
|
41224
|
+
icon: UpOutlined$1
|
|
41225
|
+
}));
|
|
41226
|
+
};
|
|
41227
|
+
var RefIcon$m = /* @__PURE__ */ React.forwardRef(UpOutlined);
|
|
41228
|
+
if (process.env.NODE_ENV !== "production") {
|
|
41229
|
+
RefIcon$m.displayName = "UpOutlined";
|
|
41230
|
+
}
|
|
41220
41231
|
function hasAddon(props) {
|
|
41221
41232
|
return !!(props.addonBefore || props.addonAfter);
|
|
41222
41233
|
}
|
|
@@ -41575,7 +41586,7 @@ const getAllowClear = (allowClear) => {
|
|
|
41575
41586
|
mergedAllowClear = allowClear;
|
|
41576
41587
|
} else if (allowClear) {
|
|
41577
41588
|
mergedAllowClear = {
|
|
41578
|
-
clearIcon: /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
41589
|
+
clearIcon: /* @__PURE__ */ React__default.createElement(RefIcon$y, null)
|
|
41579
41590
|
};
|
|
41580
41591
|
}
|
|
41581
41592
|
return mergedAllowClear;
|
|
@@ -44587,10 +44598,10 @@ const FormItemLabel = ({
|
|
|
44587
44598
|
}, labelChildren));
|
|
44588
44599
|
};
|
|
44589
44600
|
const iconMap = {
|
|
44590
|
-
success: RefIcon$
|
|
44591
|
-
warning: RefIcon$
|
|
44592
|
-
error: RefIcon$
|
|
44593
|
-
validating: RefIcon$
|
|
44601
|
+
success: RefIcon$z,
|
|
44602
|
+
warning: RefIcon$w,
|
|
44603
|
+
error: RefIcon$y,
|
|
44604
|
+
validating: RefIcon$u
|
|
44594
44605
|
};
|
|
44595
44606
|
function StatusProvider({
|
|
44596
44607
|
children,
|
|
@@ -45607,7 +45618,7 @@ const Search = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
45607
45618
|
customOnPressEnter === null || customOnPressEnter === void 0 ? void 0 : customOnPressEnter(e3);
|
|
45608
45619
|
onSearch(e3);
|
|
45609
45620
|
};
|
|
45610
|
-
const searchIcon = typeof enterButton === "boolean" ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
45621
|
+
const searchIcon = typeof enterButton === "boolean" ? /* @__PURE__ */ React.createElement(RefIcon$q, null) : null;
|
|
45611
45622
|
const btnClassName = `${prefixCls}-button`;
|
|
45612
45623
|
let button;
|
|
45613
45624
|
const enterButtonAsElement = enterButton || {};
|
|
@@ -47521,12 +47532,12 @@ const Pagination2 = (props) => {
|
|
|
47521
47532
|
className: `${prefixCls}-item-link`,
|
|
47522
47533
|
type: "button",
|
|
47523
47534
|
tabIndex: -1
|
|
47524
|
-
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
47535
|
+
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$t, null) : /* @__PURE__ */ React.createElement(RefIcon$p, null));
|
|
47525
47536
|
const nextIcon = /* @__PURE__ */ React.createElement("button", {
|
|
47526
47537
|
className: `${prefixCls}-item-link`,
|
|
47527
47538
|
type: "button",
|
|
47528
47539
|
tabIndex: -1
|
|
47529
|
-
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
47540
|
+
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$p, null) : /* @__PURE__ */ React.createElement(RefIcon$t, null));
|
|
47530
47541
|
const jumpPrevIcon = (
|
|
47531
47542
|
// biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
|
|
47532
47543
|
/* @__PURE__ */ React.createElement("a", {
|
|
@@ -47986,7 +47997,7 @@ const InternalSwitch = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
47986
47997
|
const prefixCls = getPrefixCls("switch", customizePrefixCls);
|
|
47987
47998
|
const loadingIcon = /* @__PURE__ */ React.createElement("div", {
|
|
47988
47999
|
className: `${prefixCls}-handle`
|
|
47989
|
-
}, loading && /* @__PURE__ */ React.createElement(RefIcon$
|
|
48000
|
+
}, loading && /* @__PURE__ */ React.createElement(RefIcon$u, {
|
|
47990
48001
|
className: `${prefixCls}-loading-icon`
|
|
47991
48002
|
}));
|
|
47992
48003
|
const [wrapCSSVar, hashId, cssVarCls] = useStyle$2(prefixCls);
|
|
@@ -49122,7 +49133,7 @@ const CopyBtn = ({
|
|
|
49122
49133
|
onClick: onCopy,
|
|
49123
49134
|
"aria-label": ariaLabel,
|
|
49124
49135
|
tabIndex
|
|
49125
|
-
}, copied ? getNode(iconNodes[1], /* @__PURE__ */ React.createElement(RefIcon$
|
|
49136
|
+
}, copied ? getNode(iconNodes[1], /* @__PURE__ */ React.createElement(RefIcon$s, null), true) : getNode(iconNodes[0], btnLoading ? /* @__PURE__ */ React.createElement(RefIcon$u, null) : /* @__PURE__ */ React.createElement(RefIcon$a, null), true)));
|
|
49126
49137
|
};
|
|
49127
49138
|
const MeasureText = /* @__PURE__ */ React.forwardRef(({
|
|
49128
49139
|
style: style2,
|
|
@@ -60049,7 +60060,7 @@ const Text$2 = ({
|
|
|
60049
60060
|
color: "green",
|
|
60050
60061
|
size: "middle",
|
|
60051
60062
|
danger: !isValidTextValue,
|
|
60052
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
60063
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$s, {})
|
|
60053
60064
|
}
|
|
60054
60065
|
)
|
|
60055
60066
|
] }),
|
|
@@ -67987,7 +67998,7 @@ const NumberComponent = ({
|
|
|
67987
67998
|
color: "green",
|
|
67988
67999
|
size: "middle",
|
|
67989
68000
|
disabled: !isValidNumber || !isValidConstraints,
|
|
67990
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
68001
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$s, {})
|
|
67991
68002
|
}
|
|
67992
68003
|
)
|
|
67993
68004
|
] }),
|
|
@@ -68125,7 +68136,7 @@ const Url = ({
|
|
|
68125
68136
|
color: "green",
|
|
68126
68137
|
size: "middle",
|
|
68127
68138
|
danger: !isValidUrl,
|
|
68128
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
68139
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$s, {})
|
|
68129
68140
|
}
|
|
68130
68141
|
)
|
|
68131
68142
|
] }),
|
|
@@ -79852,7 +79863,8 @@ const PaginateLinkedEntities = ({
|
|
|
79852
79863
|
readonly = false,
|
|
79853
79864
|
className = "",
|
|
79854
79865
|
onLoadEntity,
|
|
79855
|
-
onUnlinkEntity
|
|
79866
|
+
onUnlinkEntity,
|
|
79867
|
+
onPageChange
|
|
79856
79868
|
}) => {
|
|
79857
79869
|
var _a2, _b;
|
|
79858
79870
|
const { t: t2 } = useTranslation();
|
|
@@ -79903,6 +79915,10 @@ const PaginateLinkedEntities = ({
|
|
|
79903
79915
|
useEffect(() => {
|
|
79904
79916
|
filterAndChunkEntitiesForDisplay();
|
|
79905
79917
|
}, [filter2, currentPage]);
|
|
79918
|
+
const handlePageChange = (page) => {
|
|
79919
|
+
onPageChange == null ? void 0 : onPageChange();
|
|
79920
|
+
setCurrentPage(page);
|
|
79921
|
+
};
|
|
79906
79922
|
const handleFilterChange = (event) => {
|
|
79907
79923
|
setFilter(event.target.value);
|
|
79908
79924
|
};
|
|
@@ -79913,7 +79929,7 @@ const PaginateLinkedEntities = ({
|
|
|
79913
79929
|
current: currentPage,
|
|
79914
79930
|
pageSize,
|
|
79915
79931
|
total,
|
|
79916
|
-
onChange:
|
|
79932
|
+
onChange: handlePageChange,
|
|
79917
79933
|
showSizeChanger: false,
|
|
79918
79934
|
hideOnSinglePage: true,
|
|
79919
79935
|
showTotal: (total2) => t2("pagination_total", { total: total2 })
|
|
@@ -79947,7 +79963,7 @@ const PaginateLinkedEntities = ({
|
|
|
79947
79963
|
current: currentPage,
|
|
79948
79964
|
pageSize,
|
|
79949
79965
|
total,
|
|
79950
|
-
onChange:
|
|
79966
|
+
onChange: handlePageChange,
|
|
79951
79967
|
showSizeChanger: false,
|
|
79952
79968
|
hideOnSinglePage: true,
|
|
79953
79969
|
showTotal: (total2) => t2("pagination_total", { total: total2 })
|
|
@@ -80014,7 +80030,7 @@ const AddControl = ({
|
|
|
80014
80030
|
type: "primary",
|
|
80015
80031
|
size: "middle",
|
|
80016
80032
|
className: "focus:outline-none focus:border-2 focus:border-green-600",
|
|
80017
|
-
icon: !selectedType || selectedType !== type4 ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
80033
|
+
icon: !selectedType || selectedType !== type4 ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$x, {}),
|
|
80018
80034
|
children: [
|
|
80019
80035
|
" ",
|
|
80020
80036
|
getTypeLabelFromProfile(type4)
|
|
@@ -80028,7 +80044,7 @@ const AddControl = ({
|
|
|
80028
80044
|
type: "primary",
|
|
80029
80045
|
size: "middle",
|
|
80030
80046
|
className: "focus:outline-none focus:border-2 focus:border-green-600",
|
|
80031
|
-
icon: !selectedType || selectedType !== "bulkAdd" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
80047
|
+
icon: !selectedType || selectedType !== "bulkAdd" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$x, {}),
|
|
80032
80048
|
children: " Bulk Add"
|
|
80033
80049
|
}
|
|
80034
80050
|
) })
|
|
@@ -81176,7 +81192,7 @@ const AutoComplete = ({ type: type4, onLinkEntity, onCreateEntity }) => {
|
|
|
81176
81192
|
variant: "solid",
|
|
81177
81193
|
color: "green",
|
|
81178
81194
|
block: true,
|
|
81179
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
81195
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {}),
|
|
81180
81196
|
children: [
|
|
81181
81197
|
t2("create_new_of_type", { type: entity["@type"] }),
|
|
81182
81198
|
": ",
|
|
@@ -81323,7 +81339,7 @@ const BulkAdd = ({ types: types2, primitives, onCreateEntity }) => {
|
|
|
81323
81339
|
{
|
|
81324
81340
|
type: "primary",
|
|
81325
81341
|
onClick: addRow,
|
|
81326
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
81342
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {}),
|
|
81327
81343
|
children: "Add row"
|
|
81328
81344
|
}
|
|
81329
81345
|
),
|
|
@@ -81576,6 +81592,7 @@ const EntityProperty = ({
|
|
|
81576
81592
|
const profileManager = useContext(ProfileManagerContext);
|
|
81577
81593
|
const crateManager = useContext(CrateManagerContext);
|
|
81578
81594
|
const state = useStateStore();
|
|
81595
|
+
const propertyRef = useRef(null);
|
|
81579
81596
|
const propertyDefinition = (_a2 = profileManager == null ? void 0 : profileManager.getPropertyDefinition({
|
|
81580
81597
|
property,
|
|
81581
81598
|
entity
|
|
@@ -81603,9 +81620,17 @@ const EntityProperty = ({
|
|
|
81603
81620
|
["value.@id"]
|
|
81604
81621
|
);
|
|
81605
81622
|
}, [values]);
|
|
81623
|
+
const scrollToPropertyTop = useCallback(() => {
|
|
81624
|
+
var _a3;
|
|
81625
|
+
(_a3 = propertyRef.current) == null ? void 0 : _a3.scrollIntoView({
|
|
81626
|
+
block: "start",
|
|
81627
|
+
behavior: "auto"
|
|
81628
|
+
});
|
|
81629
|
+
}, []);
|
|
81606
81630
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
81607
81631
|
"div",
|
|
81608
81632
|
{
|
|
81633
|
+
ref: propertyRef,
|
|
81609
81634
|
className: `flex flex-row flex-grow p-2 describo-property-background ${highlightRequired && isRequired && !isValid ? "bg-red-200" : ""} ${savedProperty ? "bg-green-100 transition-colors duration-1000" : ""} describo-property describo-property-name-${property}`,
|
|
81610
81635
|
children: [
|
|
81611
81636
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-32 w-1/3 xl:w-1/5 flex flex-col describo-property-heading", children: [
|
|
@@ -81661,7 +81686,8 @@ const EntityProperty = ({
|
|
|
81661
81686
|
property,
|
|
81662
81687
|
readonly: propertyDefinition == null ? void 0 : propertyDefinition.readonly,
|
|
81663
81688
|
onLoadEntity,
|
|
81664
|
-
onUnlinkEntity
|
|
81689
|
+
onUnlinkEntity,
|
|
81690
|
+
onPageChange: scrollToPropertyTop
|
|
81665
81691
|
}
|
|
81666
81692
|
),
|
|
81667
81693
|
showAddControl && !((_b = state.configuration) == null ? void 0 : _b.readonly) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -81691,26 +81717,49 @@ const DialogAddProperty = ({
|
|
|
81691
81717
|
const { t: t2 } = useTranslation();
|
|
81692
81718
|
const profileManager = useContext(ProfileManagerContext);
|
|
81693
81719
|
const [filter2, setFilter] = useState("");
|
|
81720
|
+
const [selectedPropertyName, setSelectedPropertyName] = useState(null);
|
|
81721
|
+
useEffect(() => {
|
|
81722
|
+
if (open) {
|
|
81723
|
+
setSelectedPropertyName(null);
|
|
81724
|
+
}
|
|
81725
|
+
}, [open]);
|
|
81694
81726
|
const inputs = React__default.useMemo(() => {
|
|
81695
81727
|
if (!(entity == null ? void 0 : entity["@type"])) return [];
|
|
81696
81728
|
const { inputs: inputs2 } = profileManager.getAllInputs({ entity });
|
|
81697
81729
|
if (!filter2) return inputs2;
|
|
81730
|
+
const query = filter2.toLowerCase();
|
|
81698
81731
|
return inputs2.filter((i) => {
|
|
81699
|
-
|
|
81700
|
-
const re2 = new RegExp(filter2, "i");
|
|
81701
|
-
return ((_a2 = i == null ? void 0 : i.name) == null ? void 0 : _a2.match(re2)) || ((_b = i == null ? void 0 : i.help) == null ? void 0 : _b.match(re2));
|
|
81732
|
+
return String((i == null ? void 0 : i.name) || "").toLowerCase().includes(query) || String((i == null ? void 0 : i.help) || "").toLowerCase().includes(query);
|
|
81702
81733
|
});
|
|
81703
81734
|
}, [entity, filter2, profileManager]);
|
|
81704
81735
|
const handlePropertySelection = (item) => {
|
|
81705
|
-
|
|
81736
|
+
if (!(item == null ? void 0 : item.name) || selectedPropertyName === item.name) return;
|
|
81737
|
+
setSelectedPropertyName(item.name);
|
|
81738
|
+
window.setTimeout(() => {
|
|
81739
|
+
onAddPropertyPlaceholder(item.name);
|
|
81740
|
+
onClose();
|
|
81741
|
+
}, 120);
|
|
81742
|
+
};
|
|
81743
|
+
const handlePropertyKeyDown = (event, item) => {
|
|
81744
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
81745
|
+
event.preventDefault();
|
|
81746
|
+
handlePropertySelection(item);
|
|
81747
|
+
};
|
|
81748
|
+
const handleDrawerClose = () => {
|
|
81749
|
+
setSelectedPropertyName(null);
|
|
81706
81750
|
onClose();
|
|
81707
81751
|
};
|
|
81752
|
+
const renderPropertyType = (type4) => {
|
|
81753
|
+
if (Array.isArray(type4)) return type4.join(", ");
|
|
81754
|
+
return type4 || "";
|
|
81755
|
+
};
|
|
81708
81756
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81709
81757
|
Drawer2,
|
|
81710
81758
|
{
|
|
81711
|
-
|
|
81759
|
+
rootClassName: "describo-add-property-drawer",
|
|
81760
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Title, { className: "describo-add-property-title", level: 4, children: t2("add_properties_to_this_entity") || "Add properties to this entity" }),
|
|
81712
81761
|
placement: "left",
|
|
81713
|
-
onClose,
|
|
81762
|
+
onClose: handleDrawerClose,
|
|
81714
81763
|
open,
|
|
81715
81764
|
width: 600,
|
|
81716
81765
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, gap: 16, className: "overflow-auto flex-grow", children: [
|
|
@@ -81726,22 +81775,30 @@ const DialogAddProperty = ({
|
|
|
81726
81775
|
),
|
|
81727
81776
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { type: "primary", size: "middle", children: t2("search") || "Search" })
|
|
81728
81777
|
] }),
|
|
81729
|
-
inputs.map((item, idx) =>
|
|
81730
|
-
|
|
81731
|
-
|
|
81732
|
-
|
|
81733
|
-
|
|
81734
|
-
|
|
81735
|
-
|
|
81736
|
-
|
|
81737
|
-
|
|
81738
|
-
|
|
81739
|
-
|
|
81740
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
81741
|
-
|
|
81742
|
-
|
|
81743
|
-
|
|
81744
|
-
|
|
81778
|
+
inputs.map((item, idx) => {
|
|
81779
|
+
const isSelected = selectedPropertyName === item.name;
|
|
81780
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81781
|
+
"div",
|
|
81782
|
+
{
|
|
81783
|
+
className: `describo-add-property-row ${isSelected ? "describo-add-property-row-selected" : ""}`,
|
|
81784
|
+
role: "button",
|
|
81785
|
+
tabIndex: 0,
|
|
81786
|
+
"aria-pressed": isSelected,
|
|
81787
|
+
onClick: () => handlePropertySelection(item),
|
|
81788
|
+
onKeyDown: (event) => handlePropertyKeyDown(event, item),
|
|
81789
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, children: [
|
|
81790
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 6, className: "describo-add-property-row-header", children: [
|
|
81791
|
+
item.label ? /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "describo-add-property-row-name", children: item.label }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "describo-add-property-row-name", children: item.name }),
|
|
81792
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
|
|
81793
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "describo-add-property-row-type", children: renderPropertyType(item.type) }),
|
|
81794
|
+
isSelected && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$s, { className: "describo-add-property-row-check" })
|
|
81795
|
+
] }),
|
|
81796
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", className: "describo-add-property-row-help", children: item.help })
|
|
81797
|
+
] })
|
|
81798
|
+
},
|
|
81799
|
+
`${item.name}-${idx}`
|
|
81800
|
+
);
|
|
81801
|
+
})
|
|
81745
81802
|
] }) })
|
|
81746
81803
|
}
|
|
81747
81804
|
);
|
|
@@ -106842,7 +106899,7 @@ const RenderControls = ({
|
|
|
106842
106899
|
{
|
|
106843
106900
|
onClick: () => toggle("addProperty"),
|
|
106844
106901
|
type: "primary",
|
|
106845
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
106902
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {}),
|
|
106846
106903
|
children: t2("add_label")
|
|
106847
106904
|
}
|
|
106848
106905
|
),
|
|
@@ -110642,8 +110699,61 @@ xe.displayName = "Allotment";
|
|
|
110642
110699
|
var Ve = Object.assign(xe, {
|
|
110643
110700
|
Pane: Ie
|
|
110644
110701
|
});
|
|
110702
|
+
const getProfileTabKey = (tab) => String((tab == null ? void 0 : tab.profileUrl) || (tab == null ? void 0 : tab.name) || "");
|
|
110703
|
+
const isProfileTab = (tab) => {
|
|
110704
|
+
const name2 = String((tab == null ? void 0 : tab.name) || "").toLowerCase();
|
|
110705
|
+
const label = String((tab == null ? void 0 : tab.label) || (tab == null ? void 0 : tab.name) || "").toLowerCase();
|
|
110706
|
+
return !["about", "overflow", "other"].includes(name2) && !["about", "other"].includes(label);
|
|
110707
|
+
};
|
|
110708
|
+
const findAddedProfileTab = (tabs, previousTabKeys) => {
|
|
110709
|
+
const profileTabs = tabs.filter(isProfileTab);
|
|
110710
|
+
return profileTabs.find((tab) => !previousTabKeys.has(getProfileTabKey(tab))) ?? profileTabs[profileTabs.length - 1];
|
|
110711
|
+
};
|
|
110712
|
+
const findTabForProperty = (tabs, property) => tabs.find((tab) => {
|
|
110713
|
+
var _a2;
|
|
110714
|
+
return (_a2 = tab == null ? void 0 : tab.inputs) == null ? void 0 : _a2.some((input) => (input == null ? void 0 : input.name) === property);
|
|
110715
|
+
}) ?? tabs.find((tab) => ["overflow", "other"].includes(String((tab == null ? void 0 : tab.name) || "").toLowerCase()));
|
|
110716
|
+
const getPendingAddedProfileStorageKey = (entityId) => `recrate.pending-added-profile-tab.${entityId}`;
|
|
110717
|
+
const DEFAULT_TAB_PANE_WIDTH = 240;
|
|
110718
|
+
const ICON_TAB_PANE_WIDTH = 80;
|
|
110719
|
+
const MIN_LABEL_TAB_PANE_WIDTH = 100;
|
|
110720
|
+
const MAX_LABEL_TAB_PANE_WIDTH = 250;
|
|
110721
|
+
const clampLabelTabPaneWidth = (width) => Math.max(MIN_LABEL_TAB_PANE_WIDTH, Math.min(MAX_LABEL_TAB_PANE_WIDTH, Math.round(width)));
|
|
110722
|
+
const readPendingAddedProfileTabKeys = (entityId) => {
|
|
110723
|
+
if (typeof window === "undefined") return null;
|
|
110724
|
+
try {
|
|
110725
|
+
const raw = window.sessionStorage.getItem(getPendingAddedProfileStorageKey(entityId));
|
|
110726
|
+
if (!raw) return null;
|
|
110727
|
+
const parsed = JSON.parse(raw);
|
|
110728
|
+
const requestedAt = Number(parsed == null ? void 0 : parsed.requestedAt) || 0;
|
|
110729
|
+
if (requestedAt && Date.now() - requestedAt > 10 * 60 * 1e3) {
|
|
110730
|
+
clearPendingAddedProfileTabKeys(entityId);
|
|
110731
|
+
return null;
|
|
110732
|
+
}
|
|
110733
|
+
return Array.isArray(parsed == null ? void 0 : parsed.tabKeys) ? parsed.tabKeys : null;
|
|
110734
|
+
} catch {
|
|
110735
|
+
return null;
|
|
110736
|
+
}
|
|
110737
|
+
};
|
|
110738
|
+
const writePendingAddedProfileTabKeys = (entityId, tabKeys) => {
|
|
110739
|
+
if (typeof window === "undefined") return;
|
|
110740
|
+
try {
|
|
110741
|
+
window.sessionStorage.setItem(
|
|
110742
|
+
getPendingAddedProfileStorageKey(entityId),
|
|
110743
|
+
JSON.stringify({ tabKeys, requestedAt: Date.now() })
|
|
110744
|
+
);
|
|
110745
|
+
} catch {
|
|
110746
|
+
}
|
|
110747
|
+
};
|
|
110748
|
+
const clearPendingAddedProfileTabKeys = (entityId) => {
|
|
110749
|
+
if (typeof window === "undefined") return;
|
|
110750
|
+
try {
|
|
110751
|
+
window.sessionStorage.removeItem(getPendingAddedProfileStorageKey(entityId));
|
|
110752
|
+
} catch {
|
|
110753
|
+
}
|
|
110754
|
+
};
|
|
110645
110755
|
const RenderEntity = forwardRef((props, ref) => {
|
|
110646
|
-
var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m
|
|
110756
|
+
var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
110647
110757
|
const { entity, onLoadEntity, onSaveCrate, onSaveEntityTemplate, onWarning, onError, onAddNewProfileRequest, onRemoveProfile } = props;
|
|
110648
110758
|
const state = useStateStore();
|
|
110649
110759
|
const profileManager = useContext(ProfileManagerContext);
|
|
@@ -110663,24 +110773,29 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110663
110773
|
const [hoveredTabKey, setHoveredTabKey] = useState(null);
|
|
110664
110774
|
const initialTabPaneWidth = useMemo$1(() => {
|
|
110665
110775
|
const raw = localStorage.getItem("recrate.verticalTabWidth");
|
|
110666
|
-
const n2 = raw ? parseInt(raw, 10) :
|
|
110667
|
-
return
|
|
110776
|
+
const n2 = raw ? parseInt(raw, 10) : DEFAULT_TAB_PANE_WIDTH;
|
|
110777
|
+
return clampLabelTabPaneWidth(isNaN(n2) ? DEFAULT_TAB_PANE_WIDTH : n2);
|
|
110668
110778
|
}, []);
|
|
110669
110779
|
const [tabPaneWidth, setTabPaneWidth] = useState(initialTabPaneWidth);
|
|
110780
|
+
const labelTabPaneWidthRef = useRef(initialTabPaneWidth);
|
|
110670
110781
|
const persistTabWidth = useMemo$1(() => debounce((w2) => {
|
|
110671
|
-
|
|
110672
|
-
const
|
|
110673
|
-
|
|
110782
|
+
if (iconView) return;
|
|
110783
|
+
const clamped = clampLabelTabPaneWidth(w2);
|
|
110784
|
+
labelTabPaneWidthRef.current = clamped;
|
|
110674
110785
|
localStorage.setItem("recrate.verticalTabWidth", String(clamped));
|
|
110675
110786
|
}, 200), [iconView]);
|
|
110676
110787
|
const [scrollViewportHeight, setScrollViewportHeight] = useState(0);
|
|
110677
110788
|
const [scrollRestoreNonce, setScrollRestoreNonce] = useState(0);
|
|
110678
110789
|
const contentContainerRef = useRef(null);
|
|
110679
110790
|
const activeContentRef = useRef(null);
|
|
110791
|
+
const tabRailListRef = useRef(null);
|
|
110680
110792
|
const editorPanelRef = useRef(null);
|
|
110681
110793
|
const navigationRestoreReadyRef = useRef(false);
|
|
110682
110794
|
const pendingRestoredTabRef = useRef(null);
|
|
110683
110795
|
const restoreInProgressRef = useRef(false);
|
|
110796
|
+
const pendingAddedProfileSelectionRef = useRef(null);
|
|
110797
|
+
const pendingAddedPropertyRef = useRef(null);
|
|
110798
|
+
const [tabRailScrollState, setTabRailScrollState] = useState({ canScrollUp: false, canScrollDown: false });
|
|
110684
110799
|
const debugScroll = (...args) => console.log("[recrate-scroll-debug]", ...args);
|
|
110685
110800
|
const getVisibleContextMarkers = (selector, dataAttribute) => {
|
|
110686
110801
|
const source = activeContentRef.current;
|
|
@@ -110781,6 +110896,33 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110781
110896
|
window.clearTimeout(delayedMeasure);
|
|
110782
110897
|
};
|
|
110783
110898
|
}, [computeScrollViewportHeight, activeTab, renderTabs, tabs.length, contextEntity == null ? void 0 : contextEntity["@id"], reverseSidebarVisible]);
|
|
110899
|
+
const updateTabRailScrollState = () => {
|
|
110900
|
+
const list = tabRailListRef.current;
|
|
110901
|
+
if (!list) {
|
|
110902
|
+
setTabRailScrollState({ canScrollUp: false, canScrollDown: false });
|
|
110903
|
+
return;
|
|
110904
|
+
}
|
|
110905
|
+
const maxScrollTop = Math.max(0, list.scrollHeight - list.clientHeight);
|
|
110906
|
+
const nextState = {
|
|
110907
|
+
canScrollUp: list.scrollTop > 2,
|
|
110908
|
+
canScrollDown: list.scrollTop < maxScrollTop - 2
|
|
110909
|
+
};
|
|
110910
|
+
setTabRailScrollState((previousState) => previousState.canScrollUp === nextState.canScrollUp && previousState.canScrollDown === nextState.canScrollDown ? previousState : nextState);
|
|
110911
|
+
};
|
|
110912
|
+
useEffect(() => {
|
|
110913
|
+
const list = tabRailListRef.current;
|
|
110914
|
+
if (!list || !renderTabs) return;
|
|
110915
|
+
const activeTabElement = list.querySelector('[aria-selected="true"]');
|
|
110916
|
+
activeTabElement == null ? void 0 : activeTabElement.scrollIntoView({ block: "nearest" });
|
|
110917
|
+
updateTabRailScrollState();
|
|
110918
|
+
const resizeObserver2 = new ResizeObserver(updateTabRailScrollState);
|
|
110919
|
+
resizeObserver2.observe(list);
|
|
110920
|
+
const frame = requestAnimationFrame(updateTabRailScrollState);
|
|
110921
|
+
return () => {
|
|
110922
|
+
resizeObserver2.disconnect();
|
|
110923
|
+
cancelAnimationFrame(frame);
|
|
110924
|
+
};
|
|
110925
|
+
}, [activeTab, iconView, renderTabs, scrollViewportHeight, tabPaneWidth, tabs.length]);
|
|
110784
110926
|
useImperativeHandle(ref, () => ({
|
|
110785
110927
|
setTab: (tabName) => {
|
|
110786
110928
|
setActiveTab(tabName);
|
|
@@ -110790,7 +110932,14 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110790
110932
|
}
|
|
110791
110933
|
}));
|
|
110792
110934
|
useEffect(() => {
|
|
110935
|
+
var _a3, _b2;
|
|
110793
110936
|
navigationRestoreReadyRef.current = false;
|
|
110937
|
+
if (((_a3 = pendingAddedProfileSelectionRef.current) == null ? void 0 : _a3.entityId) !== (entity == null ? void 0 : entity["@id"])) {
|
|
110938
|
+
pendingAddedProfileSelectionRef.current = null;
|
|
110939
|
+
}
|
|
110940
|
+
if (((_b2 = pendingAddedPropertyRef.current) == null ? void 0 : _b2.entityId) !== (entity == null ? void 0 : entity["@id"])) {
|
|
110941
|
+
pendingAddedPropertyRef.current = null;
|
|
110942
|
+
}
|
|
110794
110943
|
if ((contextEntity == null ? void 0 : contextEntity["@id"]) && (entity == null ? void 0 : entity["@id"]) && contextEntity["@id"] !== entity["@id"]) {
|
|
110795
110944
|
captureViewContext(activeTab);
|
|
110796
110945
|
}
|
|
@@ -110803,8 +110952,8 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110803
110952
|
init2({ entity: entityObj });
|
|
110804
110953
|
}
|
|
110805
110954
|
}, [profileManager == null ? void 0 : profileManager.$key]);
|
|
110806
|
-
const init2 = ({ entity: entity2 }) => {
|
|
110807
|
-
var _a3, _b2, _c2, _d2, _e3;
|
|
110955
|
+
const init2 = ({ entity: entity2, extraPropertiesOverride }) => {
|
|
110956
|
+
var _a3, _b2, _c2, _d2, _e3, _f2;
|
|
110808
110957
|
if (!entity2["@id"]) return;
|
|
110809
110958
|
const latestEntry = state.editorState.latest();
|
|
110810
110959
|
const isCurrentHistoryEntity = (latestEntry == null ? void 0 : latestEntry.id) === entity2["@id"];
|
|
@@ -110812,7 +110961,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110812
110961
|
configuration: state.configuration,
|
|
110813
110962
|
profileManager,
|
|
110814
110963
|
entity: entity2,
|
|
110815
|
-
extraProperties
|
|
110964
|
+
extraProperties: extraPropertiesOverride ?? extraProperties
|
|
110816
110965
|
});
|
|
110817
110966
|
setContextEntity(layout.entity);
|
|
110818
110967
|
setRenderTabs(layout.renderTabs);
|
|
@@ -110822,6 +110971,53 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110822
110971
|
const tabNames = layout.tabs.map((tab) => tab.name);
|
|
110823
110972
|
const fallbackTab = tabNames.includes("about") ? "about" : tabNames[0] ?? "about";
|
|
110824
110973
|
const restoredTab = layout.renderTabs && (navState == null ? void 0 : navState.activeTab) && tabNames.includes(navState.activeTab) ? navState.activeTab : fallbackTab;
|
|
110974
|
+
const pendingAddedProfileSelection = pendingAddedProfileSelectionRef.current;
|
|
110975
|
+
const pendingAddedProfileTabKeys = Array.isArray((_a3 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _a3.pendingAddedProfileTabKeys) ? navState.uiState.pendingAddedProfileTabKeys : readPendingAddedProfileTabKeys(entity2["@id"]);
|
|
110976
|
+
let nextActiveTab = restoredTab;
|
|
110977
|
+
if (layout.renderTabs && pendingAddedProfileSelection && pendingAddedProfileSelection.entityId === entity2["@id"]) {
|
|
110978
|
+
const previousTabKeys = new Set(pendingAddedProfileSelection.tabKeys);
|
|
110979
|
+
const addedProfileTab = findAddedProfileTab(layout.tabs, previousTabKeys);
|
|
110980
|
+
if (addedProfileTab == null ? void 0 : addedProfileTab.name) {
|
|
110981
|
+
nextActiveTab = addedProfileTab.name;
|
|
110982
|
+
pendingAddedProfileSelectionRef.current = null;
|
|
110983
|
+
clearPendingAddedProfileTabKeys(entity2["@id"]);
|
|
110984
|
+
}
|
|
110985
|
+
}
|
|
110986
|
+
if (layout.renderTabs && pendingAddedProfileTabKeys) {
|
|
110987
|
+
const previousTabKeys = new Set(pendingAddedProfileTabKeys);
|
|
110988
|
+
const addedProfileTab = findAddedProfileTab(layout.tabs, previousTabKeys);
|
|
110989
|
+
if (addedProfileTab == null ? void 0 : addedProfileTab.name) {
|
|
110990
|
+
nextActiveTab = addedProfileTab.name;
|
|
110991
|
+
pendingAddedProfileSelectionRef.current = null;
|
|
110992
|
+
clearPendingAddedProfileTabKeys(entity2["@id"]);
|
|
110993
|
+
const clearPendingSelection = {
|
|
110994
|
+
uiState: {
|
|
110995
|
+
pendingAddedProfileTabKeys: void 0,
|
|
110996
|
+
pendingAddedProfileRequestedAt: void 0
|
|
110997
|
+
}
|
|
110998
|
+
};
|
|
110999
|
+
if (isCurrentHistoryEntity) {
|
|
111000
|
+
state.editorState.updateNavigationState(clearPendingSelection);
|
|
111001
|
+
} else {
|
|
111002
|
+
state.editorState.updateNavigationStateForId(entity2["@id"], clearPendingSelection);
|
|
111003
|
+
}
|
|
111004
|
+
}
|
|
111005
|
+
}
|
|
111006
|
+
const pendingAddedProperty = pendingAddedPropertyRef.current;
|
|
111007
|
+
let willScrollToAddedProperty = false;
|
|
111008
|
+
if (pendingAddedProperty && pendingAddedProperty.entityId === entity2["@id"]) {
|
|
111009
|
+
const propertyTab = layout.renderTabs ? findTabForProperty(layout.tabs, pendingAddedProperty.property) : null;
|
|
111010
|
+
if (propertyTab == null ? void 0 : propertyTab.name) {
|
|
111011
|
+
nextActiveTab = propertyTab.name;
|
|
111012
|
+
pendingAddedPropertyRef.current = {
|
|
111013
|
+
...pendingAddedProperty,
|
|
111014
|
+
tabName: propertyTab.name
|
|
111015
|
+
};
|
|
111016
|
+
willScrollToAddedProperty = true;
|
|
111017
|
+
} else if (!layout.renderTabs) {
|
|
111018
|
+
willScrollToAddedProperty = true;
|
|
111019
|
+
}
|
|
111020
|
+
}
|
|
110825
111021
|
debugScroll("init", {
|
|
110826
111022
|
entityId: entity2["@id"],
|
|
110827
111023
|
latestId: latestEntry == null ? void 0 : latestEntry.id,
|
|
@@ -110829,21 +111025,35 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110829
111025
|
renderTabs: layout.renderTabs,
|
|
110830
111026
|
tabNames,
|
|
110831
111027
|
restoredTab,
|
|
111028
|
+
nextActiveTab,
|
|
110832
111029
|
navState
|
|
110833
111030
|
});
|
|
110834
|
-
pendingRestoredTabRef.current =
|
|
110835
|
-
setActiveTab(
|
|
110836
|
-
if (typeof ((
|
|
110837
|
-
if (typeof ((
|
|
110838
|
-
if (typeof ((
|
|
110839
|
-
if (typeof ((
|
|
110840
|
-
|
|
111031
|
+
pendingRestoredTabRef.current = willScrollToAddedProperty ? null : nextActiveTab;
|
|
111032
|
+
setActiveTab(nextActiveTab);
|
|
111033
|
+
if (typeof ((_b2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _b2.showAddPanel) === "boolean") setShowAddPanel(navState.uiState.showAddPanel);
|
|
111034
|
+
if (typeof ((_c2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _c2.reverseSidebarVisible) === "boolean") setReverseSidebarVisible(navState.uiState.reverseSidebarVisible);
|
|
111035
|
+
if (typeof ((_d2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _d2.highlightRequiredProperties) === "boolean") setHighlightRequiredProperties(navState.uiState.highlightRequiredProperties);
|
|
111036
|
+
if (typeof ((_e3 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _e3.iconView) === "boolean") {
|
|
111037
|
+
setIconView(navState.uiState.iconView);
|
|
111038
|
+
}
|
|
111039
|
+
if (typeof ((_f2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _f2.tabPaneWidth) === "number") {
|
|
111040
|
+
if (navState.uiState.iconView) {
|
|
111041
|
+
setTabPaneWidth(ICON_TAB_PANE_WIDTH);
|
|
111042
|
+
} else {
|
|
111043
|
+
const restoredWidth = clampLabelTabPaneWidth(navState.uiState.tabPaneWidth);
|
|
111044
|
+
labelTabPaneWidthRef.current = restoredWidth;
|
|
111045
|
+
setTabPaneWidth(restoredWidth);
|
|
111046
|
+
}
|
|
111047
|
+
}
|
|
110841
111048
|
if (isCurrentHistoryEntity) {
|
|
110842
111049
|
if (layout.renderTabs) {
|
|
110843
|
-
state.editorState.update({ id: entity2["@id"], tab:
|
|
111050
|
+
state.editorState.update({ id: entity2["@id"], tab: nextActiveTab });
|
|
111051
|
+
state.editorState.updateNavigationState({ activeTab: nextActiveTab });
|
|
110844
111052
|
} else {
|
|
110845
111053
|
state.editorState.deleteFromState({ property: "tab" });
|
|
110846
111054
|
}
|
|
111055
|
+
} else if (layout.renderTabs) {
|
|
111056
|
+
state.editorState.updateNavigationStateForId(entity2["@id"], { activeTab: nextActiveTab });
|
|
110847
111057
|
}
|
|
110848
111058
|
};
|
|
110849
111059
|
const refresh = () => {
|
|
@@ -110875,12 +111085,13 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110875
111085
|
}
|
|
110876
111086
|
}, [extraProperties]);
|
|
110877
111087
|
useEffect(() => {
|
|
110878
|
-
var _a3, _b2, _c2;
|
|
111088
|
+
var _a3, _b2, _c2, _d2;
|
|
110879
111089
|
if (!navigationRestoreReadyRef.current) return;
|
|
110880
111090
|
if (!(contextEntity == null ? void 0 : contextEntity["@id"])) return;
|
|
111091
|
+
if (((_a3 = pendingAddedPropertyRef.current) == null ? void 0 : _a3.entityId) === contextEntity["@id"]) return;
|
|
110881
111092
|
const viewport = activeContentRef.current;
|
|
110882
111093
|
if (!viewport) return;
|
|
110883
|
-
const restoreTarget = ((
|
|
111094
|
+
const restoreTarget = ((_d2 = (_c2 = (_b2 = state.editorState.getNavigationState(contextEntity["@id"])) == null ? void 0 : _b2.tabStates) == null ? void 0 : _c2[activeTab]) == null ? void 0 : _d2.scrollTop) ?? 0;
|
|
110884
111095
|
debugScroll("restore.start", {
|
|
110885
111096
|
entityId: contextEntity["@id"],
|
|
110886
111097
|
activeTab,
|
|
@@ -110955,8 +111166,10 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110955
111166
|
};
|
|
110956
111167
|
}, [activeTab, contextEntity == null ? void 0 : contextEntity["@id"], renderTabs, tabs.length, scrollRestoreNonce]);
|
|
110957
111168
|
useEffect(() => {
|
|
111169
|
+
var _a3;
|
|
110958
111170
|
const pendingTab = pendingRestoredTabRef.current;
|
|
110959
111171
|
if (!(contextEntity == null ? void 0 : contextEntity["@id"])) return;
|
|
111172
|
+
if (((_a3 = pendingAddedPropertyRef.current) == null ? void 0 : _a3.entityId) === contextEntity["@id"]) return;
|
|
110960
111173
|
if (pendingTab) {
|
|
110961
111174
|
debugScroll("restore.pending-tab", {
|
|
110962
111175
|
entityId: contextEntity["@id"],
|
|
@@ -110975,18 +111188,112 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110975
111188
|
if (!navigationRestoreReadyRef.current) return;
|
|
110976
111189
|
captureViewContext(activeTab);
|
|
110977
111190
|
}, [activeTab, showAddPanel, reverseSidebarVisible, highlightRequiredProperties, iconView, tabPaneWidth, contextEntity == null ? void 0 : contextEntity["@id"]]);
|
|
111191
|
+
useEffect(() => {
|
|
111192
|
+
const pendingAddedProperty = pendingAddedPropertyRef.current;
|
|
111193
|
+
if (!pendingAddedProperty || pendingAddedProperty.entityId !== (contextEntity == null ? void 0 : contextEntity["@id"])) return;
|
|
111194
|
+
if (pendingAddedProperty.tabName && pendingAddedProperty.tabName !== activeTab) return;
|
|
111195
|
+
let cancelled = false;
|
|
111196
|
+
let attempts = 0;
|
|
111197
|
+
let timerId = 0;
|
|
111198
|
+
let rafId = 0;
|
|
111199
|
+
const maxAttempts = 30;
|
|
111200
|
+
const finishAddedPropertyScroll = (viewport) => {
|
|
111201
|
+
navigationRestoreReadyRef.current = true;
|
|
111202
|
+
pendingAddedPropertyRef.current = null;
|
|
111203
|
+
captureViewContext(activeTab, viewport == null ? void 0 : viewport.scrollTop);
|
|
111204
|
+
setScrollRestoreNonce((prev2) => prev2 + 1);
|
|
111205
|
+
};
|
|
111206
|
+
const scheduleRetry = () => {
|
|
111207
|
+
if (attempts < maxAttempts) {
|
|
111208
|
+
timerId = window.setTimeout(() => {
|
|
111209
|
+
rafId = window.requestAnimationFrame(scrollToAddedProperty);
|
|
111210
|
+
}, 50);
|
|
111211
|
+
return;
|
|
111212
|
+
}
|
|
111213
|
+
finishAddedPropertyScroll(activeContentRef.current);
|
|
111214
|
+
};
|
|
111215
|
+
const scrollToAddedProperty = () => {
|
|
111216
|
+
var _a3;
|
|
111217
|
+
if (cancelled) return;
|
|
111218
|
+
attempts += 1;
|
|
111219
|
+
const propertyElement = Array.from(
|
|
111220
|
+
((_a3 = activeContentRef.current) == null ? void 0 : _a3.querySelectorAll("[data-recrate-property]")) ?? []
|
|
111221
|
+
).find((element) => element.dataset.recrateProperty === pendingAddedProperty.property);
|
|
111222
|
+
if (propertyElement) {
|
|
111223
|
+
const viewport = activeContentRef.current;
|
|
111224
|
+
const viewportRect = viewport == null ? void 0 : viewport.getBoundingClientRect();
|
|
111225
|
+
const propertyRect = propertyElement.getBoundingClientRect();
|
|
111226
|
+
if (viewport && viewportRect) {
|
|
111227
|
+
const targetTop = viewport.scrollTop + propertyRect.top - viewportRect.top;
|
|
111228
|
+
const maxScrollable = Math.max(0, viewport.scrollHeight - viewport.clientHeight);
|
|
111229
|
+
const target = Math.max(0, Math.min(targetTop, maxScrollable));
|
|
111230
|
+
viewport.scrollTo({ top: target, behavior: "auto" });
|
|
111231
|
+
rafId = window.requestAnimationFrame(() => {
|
|
111232
|
+
if (cancelled) return;
|
|
111233
|
+
const nextViewportRect = viewport.getBoundingClientRect();
|
|
111234
|
+
const nextPropertyRect = propertyElement.getBoundingClientRect();
|
|
111235
|
+
const nextMaxScrollable = Math.max(0, viewport.scrollHeight - viewport.clientHeight);
|
|
111236
|
+
const expectedTop = Math.max(0, Math.min(targetTop, nextMaxScrollable));
|
|
111237
|
+
const targetReachable = targetTop <= nextMaxScrollable + 2;
|
|
111238
|
+
const propertyTopVisible = nextPropertyRect.top >= nextViewportRect.top - 2 && nextPropertyRect.top <= nextViewportRect.bottom - 24;
|
|
111239
|
+
const reachedExpectedTop = Math.abs(viewport.scrollTop - expectedTop) <= 2;
|
|
111240
|
+
if (propertyTopVisible || targetReachable && reachedExpectedTop) {
|
|
111241
|
+
finishAddedPropertyScroll(viewport);
|
|
111242
|
+
return;
|
|
111243
|
+
}
|
|
111244
|
+
scheduleRetry();
|
|
111245
|
+
});
|
|
111246
|
+
return;
|
|
111247
|
+
} else {
|
|
111248
|
+
propertyElement.scrollIntoView({ block: "start", behavior: "auto" });
|
|
111249
|
+
finishAddedPropertyScroll();
|
|
111250
|
+
return;
|
|
111251
|
+
}
|
|
111252
|
+
}
|
|
111253
|
+
scheduleRetry();
|
|
111254
|
+
};
|
|
111255
|
+
rafId = requestAnimationFrame(scrollToAddedProperty);
|
|
111256
|
+
return () => {
|
|
111257
|
+
cancelled = true;
|
|
111258
|
+
window.cancelAnimationFrame(rafId);
|
|
111259
|
+
window.clearTimeout(timerId);
|
|
111260
|
+
};
|
|
111261
|
+
}, [activeTab, contextEntity == null ? void 0 : contextEntity["@id"], tabs.length, extraProperties.length]);
|
|
110978
111262
|
const handleAddPropertyPlaceholder = (property) => {
|
|
110979
111263
|
try {
|
|
111264
|
+
pendingAddedPropertyRef.current = {
|
|
111265
|
+
entityId: entity["@id"],
|
|
111266
|
+
property
|
|
111267
|
+
};
|
|
110980
111268
|
const newExtraProperties = [...extraProperties, property];
|
|
110981
111269
|
setExtraProperties(newExtraProperties);
|
|
111270
|
+
init2({ entity: contextEntity, extraPropertiesOverride: newExtraProperties });
|
|
110982
111271
|
} catch (error2) {
|
|
110983
111272
|
console.error(error2);
|
|
110984
111273
|
onError();
|
|
110985
111274
|
}
|
|
110986
111275
|
};
|
|
110987
111276
|
const handleAddNewProfile = () => {
|
|
111277
|
+
var _a3;
|
|
110988
111278
|
try {
|
|
110989
111279
|
const next2 = !showAddPanel;
|
|
111280
|
+
const currentProfileTabKeys = tabs.filter(isProfileTab).map(getProfileTabKey).filter(Boolean);
|
|
111281
|
+
pendingAddedProfileSelectionRef.current = {
|
|
111282
|
+
entityId: entity["@id"],
|
|
111283
|
+
tabKeys: currentProfileTabKeys
|
|
111284
|
+
};
|
|
111285
|
+
writePendingAddedProfileTabKeys(entity["@id"], currentProfileTabKeys);
|
|
111286
|
+
const pendingSelectionState = {
|
|
111287
|
+
uiState: {
|
|
111288
|
+
pendingAddedProfileTabKeys: currentProfileTabKeys,
|
|
111289
|
+
pendingAddedProfileRequestedAt: Date.now()
|
|
111290
|
+
}
|
|
111291
|
+
};
|
|
111292
|
+
if (((_a3 = state.editorState.latest()) == null ? void 0 : _a3.id) === entity["@id"]) {
|
|
111293
|
+
state.editorState.updateNavigationState(pendingSelectionState);
|
|
111294
|
+
} else {
|
|
111295
|
+
state.editorState.updateNavigationStateForId(entity["@id"], pendingSelectionState);
|
|
111296
|
+
}
|
|
110990
111297
|
setShowAddPanel(next2);
|
|
110991
111298
|
onAddNewProfileRequest == null ? void 0 : onAddNewProfileRequest(true);
|
|
110992
111299
|
} catch (error2) {
|
|
@@ -111150,58 +111457,22 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111150
111457
|
};
|
|
111151
111458
|
const toggleIconView = () => {
|
|
111152
111459
|
if (!iconView) {
|
|
111460
|
+
labelTabPaneWidthRef.current = clampLabelTabPaneWidth(tabPaneWidth);
|
|
111153
111461
|
setIconView(true);
|
|
111154
|
-
setTabPaneWidth(
|
|
111155
|
-
localStorage.setItem("recrate.verticalTabWidth", "50");
|
|
111462
|
+
setTabPaneWidth(ICON_TAB_PANE_WIDTH);
|
|
111156
111463
|
} else {
|
|
111464
|
+
const restoredWidth = clampLabelTabPaneWidth(labelTabPaneWidthRef.current || DEFAULT_TAB_PANE_WIDTH);
|
|
111157
111465
|
setIconView(false);
|
|
111158
|
-
setTabPaneWidth(
|
|
111159
|
-
localStorage.setItem("recrate.verticalTabWidth",
|
|
111466
|
+
setTabPaneWidth(restoredWidth);
|
|
111467
|
+
localStorage.setItem("recrate.verticalTabWidth", String(restoredWidth));
|
|
111160
111468
|
}
|
|
111161
111469
|
};
|
|
111162
|
-
const makeTabLabel = (tab, idx) => iconView ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-tab-icon", children: (idx ?? 0) + 1 }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full group", onMouseEnter: () => setHoveredTabKey(tab.name), onMouseLeave: () => setHoveredTabKey(null), children: [
|
|
111163
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-center justify-between w-full relative", children: [
|
|
111164
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111165
|
-
"div",
|
|
111166
|
-
{
|
|
111167
|
-
className: "text-left text-base font-medium text-gray-700 describo-tab-label whitespace-normal break-words",
|
|
111168
|
-
style: { maxWidth: "100%" },
|
|
111169
|
-
children: tab.label || tab.name
|
|
111170
|
-
}
|
|
111171
|
-
),
|
|
111172
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-2 flex items-center space-x-2", children: [
|
|
111173
|
-
tab.missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-red-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCircleXmark, size: "lg" }) }),
|
|
111174
|
-
tab.hasData && !tab.missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-green-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCircleCheck, size: "lg" }) }),
|
|
111175
|
-
!(["about", "overflow", "other"].includes((tab.name || "").toLowerCase()) || ["about", "other"].includes((tab.label || tab.name || "").toLowerCase())) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111176
|
-
Button$1,
|
|
111177
|
-
{
|
|
111178
|
-
"aria-label": "Remove profile",
|
|
111179
|
-
type: "text",
|
|
111180
|
-
style: { display: hoveredTabKey === tab.name ? "inline-flex" : "none" },
|
|
111181
|
-
onClick: (e3) => {
|
|
111182
|
-
e3.stopPropagation();
|
|
111183
|
-
handleRemoveProfile(tab);
|
|
111184
|
-
},
|
|
111185
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$d, { style: { color: "oklch(57.7% 0.245 27.325)" } })
|
|
111186
|
-
}
|
|
111187
|
-
)
|
|
111188
|
-
] })
|
|
111189
|
-
] }),
|
|
111190
|
-
tab.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111191
|
-
"div",
|
|
111192
|
-
{
|
|
111193
|
-
className: "text-left text-gray-500 font-light text-xs describo-tab-description whitespace-normal break-words",
|
|
111194
|
-
style: { maxWidth: "100%" },
|
|
111195
|
-
children: tab.description
|
|
111196
|
-
}
|
|
111197
|
-
)
|
|
111198
|
-
] });
|
|
111199
111470
|
const addProfileTabLabel = /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("add_profile_button_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111200
111471
|
Button$1,
|
|
111201
111472
|
{
|
|
111202
111473
|
type: "default",
|
|
111203
111474
|
shape: "circle",
|
|
111204
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
111475
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {}),
|
|
111205
111476
|
"aria-label": "Add Profile",
|
|
111206
111477
|
"aria-controls": "add-property-panel",
|
|
111207
111478
|
"aria-expanded": showAddPanel,
|
|
@@ -111232,11 +111503,146 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111232
111503
|
) }),
|
|
111233
111504
|
className: "ant-tabs-tab-toggle-view"
|
|
111234
111505
|
};
|
|
111235
|
-
const
|
|
111236
|
-
|
|
111237
|
-
|
|
111238
|
-
|
|
111239
|
-
|
|
111506
|
+
const handleSelectTab = (tabName) => {
|
|
111507
|
+
if (tabName === activeTab) return;
|
|
111508
|
+
captureViewContext(activeTab);
|
|
111509
|
+
setActiveTab(tabName);
|
|
111510
|
+
saveTabToState(tabName);
|
|
111511
|
+
};
|
|
111512
|
+
const scrollTabRail = (direction) => {
|
|
111513
|
+
const list = tabRailListRef.current;
|
|
111514
|
+
if (!list) return;
|
|
111515
|
+
const distance = Math.max(120, Math.floor(list.clientHeight * 0.6));
|
|
111516
|
+
list.scrollBy({
|
|
111517
|
+
top: direction === "up" ? -distance : distance,
|
|
111518
|
+
behavior: "smooth"
|
|
111519
|
+
});
|
|
111520
|
+
window.setTimeout(updateTabRailScrollState, 260);
|
|
111521
|
+
};
|
|
111522
|
+
const renderProfileRailActions = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-tab-rail-actions", children: [
|
|
111523
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: iconView ? t2("switch_to_label_view") : t2("switch_to_icon_view"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111524
|
+
Button$1,
|
|
111525
|
+
{
|
|
111526
|
+
type: iconView ? "primary" : "default",
|
|
111527
|
+
shape: "circle",
|
|
111528
|
+
icon: iconView ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$9, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon, {}),
|
|
111529
|
+
"aria-pressed": iconView,
|
|
111530
|
+
onClick: (e3) => {
|
|
111531
|
+
e3.stopPropagation();
|
|
111532
|
+
toggleIconView();
|
|
111533
|
+
}
|
|
111534
|
+
}
|
|
111535
|
+
) }),
|
|
111536
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("add_profile_button_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111537
|
+
Button$1,
|
|
111538
|
+
{
|
|
111539
|
+
type: "default",
|
|
111540
|
+
shape: "circle",
|
|
111541
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {}),
|
|
111542
|
+
"aria-label": "Add Profile",
|
|
111543
|
+
"aria-controls": "add-property-panel",
|
|
111544
|
+
"aria-expanded": showAddPanel,
|
|
111545
|
+
onClick: handleAddNewProfile
|
|
111546
|
+
}
|
|
111547
|
+
) })
|
|
111548
|
+
] });
|
|
111549
|
+
const renderProfileActionRail = () => /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: "describo-tab-rail describo-tab-rail-actions-only", "aria-label": "Profile actions", children: renderProfileRailActions() });
|
|
111550
|
+
const renderProfileTabRail = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
111551
|
+
"nav",
|
|
111552
|
+
{
|
|
111553
|
+
className: `describo-tab-rail ${tabRailScrollState.canScrollUp ? "describo-tab-rail-can-scroll-up" : ""} ${tabRailScrollState.canScrollDown ? "describo-tab-rail-can-scroll-down" : ""}`,
|
|
111554
|
+
"aria-label": "Profile sections",
|
|
111555
|
+
children: [
|
|
111556
|
+
renderProfileRailActions(),
|
|
111557
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111558
|
+
"div",
|
|
111559
|
+
{
|
|
111560
|
+
ref: tabRailListRef,
|
|
111561
|
+
className: "describo-tab-rail-list",
|
|
111562
|
+
role: "tablist",
|
|
111563
|
+
"aria-orientation": "vertical",
|
|
111564
|
+
onScroll: updateTabRailScrollState,
|
|
111565
|
+
children: tabs.map((tab, idx) => {
|
|
111566
|
+
const isActive2 = tab.name === activeTab;
|
|
111567
|
+
const canRemove = !(["about", "overflow", "other"].includes((tab.name || "").toLowerCase()) || ["about", "other"].includes((tab.label || tab.name || "").toLowerCase()));
|
|
111568
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111569
|
+
"div",
|
|
111570
|
+
{
|
|
111571
|
+
role: "tab",
|
|
111572
|
+
tabIndex: 0,
|
|
111573
|
+
"aria-selected": isActive2,
|
|
111574
|
+
className: `describo-tab-rail-item ${isActive2 ? "describo-tab-rail-item-active" : ""} ${iconView ? "describo-tab-rail-item-icon" : ""}`,
|
|
111575
|
+
onClick: () => handleSelectTab(tab.name),
|
|
111576
|
+
onKeyDown: (e3) => {
|
|
111577
|
+
if (e3.key === "Enter" || e3.key === " ") {
|
|
111578
|
+
e3.preventDefault();
|
|
111579
|
+
handleSelectTab(tab.name);
|
|
111580
|
+
}
|
|
111581
|
+
},
|
|
111582
|
+
onMouseEnter: () => setHoveredTabKey(tab.name),
|
|
111583
|
+
onMouseLeave: () => setHoveredTabKey(null),
|
|
111584
|
+
children: iconView ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-tab-icon", children: idx + 1 }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
111585
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "describo-tab-rail-row", children: [
|
|
111586
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "describo-tab-rail-title", children: tab.label || tab.name }),
|
|
111587
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "describo-tab-rail-status", children: [
|
|
111588
|
+
tab.missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCircleXmark, size: "lg" }) }),
|
|
111589
|
+
tab.hasData && !tab.missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-green-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCircleCheck, size: "lg" }) }),
|
|
111590
|
+
canRemove && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111591
|
+
Button$1,
|
|
111592
|
+
{
|
|
111593
|
+
"aria-label": "Remove profile",
|
|
111594
|
+
type: "text",
|
|
111595
|
+
size: "small",
|
|
111596
|
+
className: "describo-tab-rail-remove-button",
|
|
111597
|
+
style: {
|
|
111598
|
+
visibility: hoveredTabKey === tab.name ? "visible" : "hidden",
|
|
111599
|
+
opacity: hoveredTabKey === tab.name ? 1 : 0,
|
|
111600
|
+
pointerEvents: hoveredTabKey === tab.name ? "auto" : "none"
|
|
111601
|
+
},
|
|
111602
|
+
onClick: (e3) => {
|
|
111603
|
+
e3.stopPropagation();
|
|
111604
|
+
handleRemoveProfile(tab);
|
|
111605
|
+
},
|
|
111606
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$d, { style: { color: "oklch(57.7% 0.245 27.325)" } })
|
|
111607
|
+
}
|
|
111608
|
+
)
|
|
111609
|
+
] })
|
|
111610
|
+
] }),
|
|
111611
|
+
tab.description && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "describo-tab-rail-description", children: tab.description })
|
|
111612
|
+
] })
|
|
111613
|
+
},
|
|
111614
|
+
tab.name
|
|
111615
|
+
);
|
|
111616
|
+
})
|
|
111617
|
+
}
|
|
111618
|
+
),
|
|
111619
|
+
tabRailScrollState.canScrollUp && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111620
|
+
Button$1,
|
|
111621
|
+
{
|
|
111622
|
+
type: "default",
|
|
111623
|
+
shape: "circle",
|
|
111624
|
+
size: "small",
|
|
111625
|
+
className: "describo-tab-rail-scroll-button describo-tab-rail-scroll-button-up",
|
|
111626
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$m, {}),
|
|
111627
|
+
"aria-label": "Scroll profile tabs up",
|
|
111628
|
+
onClick: () => scrollTabRail("up")
|
|
111629
|
+
}
|
|
111630
|
+
),
|
|
111631
|
+
tabRailScrollState.canScrollDown && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111632
|
+
Button$1,
|
|
111633
|
+
{
|
|
111634
|
+
type: "default",
|
|
111635
|
+
shape: "circle",
|
|
111636
|
+
size: "small",
|
|
111637
|
+
className: "describo-tab-rail-scroll-button describo-tab-rail-scroll-button-down",
|
|
111638
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$r, {}),
|
|
111639
|
+
"aria-label": "Scroll profile tabs down",
|
|
111640
|
+
onClick: () => scrollTabRail("down")
|
|
111641
|
+
}
|
|
111642
|
+
)
|
|
111643
|
+
]
|
|
111644
|
+
}
|
|
111645
|
+
);
|
|
111240
111646
|
if (!entity || !entity["@id"]) {
|
|
111241
111647
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No entity selected" });
|
|
111242
111648
|
}
|
|
@@ -111278,20 +111684,8 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111278
111684
|
setTabPaneWidth(w2);
|
|
111279
111685
|
persistTabWidth(w2);
|
|
111280
111686
|
}, children: [
|
|
111281
|
-
((_e2 = state.configuration) == null ? void 0 : _e2.tabLocation) === "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ?
|
|
111282
|
-
|
|
111283
|
-
Tabs,
|
|
111284
|
-
{
|
|
111285
|
-
className: "describo-add-only-tabs",
|
|
111286
|
-
tabPosition: "left",
|
|
111287
|
-
items: [
|
|
111288
|
-
toggleViewTabItem,
|
|
111289
|
-
addProfileTabItem
|
|
111290
|
-
],
|
|
111291
|
-
style: { width: "100%" },
|
|
111292
|
-
tabBarStyle: { width: "100%" }
|
|
111293
|
-
}
|
|
111294
|
-
),
|
|
111687
|
+
((_e2 = state.configuration) == null ? void 0 : _e2.tabLocation) === "left" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full border-r border-slate-200", children: [
|
|
111688
|
+
renderProfileActionRail(),
|
|
111295
111689
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0 bottom-0 w-1 bg-slate-300 opacity-0 group-hover:opacity-100" })
|
|
111296
111690
|
] }) }),
|
|
111297
111691
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: activeContentRef, className: "describo-editor-scroll flex-1 overflow-y-auto scroll-smooth min-h-0 p-3", children: [
|
|
@@ -111325,6 +111719,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111325
111719
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111326
111720
|
"div",
|
|
111327
111721
|
{
|
|
111722
|
+
"data-recrate-property": property,
|
|
111328
111723
|
className: `my-2 hover:bg-sky-100 ${savedProperty === property ? "bg-green-200 hover:bg-green-200" : ""}`,
|
|
111329
111724
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111330
111725
|
EntityProperty,
|
|
@@ -111350,23 +111745,11 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111350
111745
|
return null;
|
|
111351
111746
|
})
|
|
111352
111747
|
] }) }),
|
|
111353
|
-
((_g = state.configuration) == null ? void 0 : _g.tabLocation) === "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ?
|
|
111354
|
-
|
|
111355
|
-
Tabs,
|
|
111356
|
-
{
|
|
111357
|
-
className: "describo-add-only-tabs",
|
|
111358
|
-
tabPosition: "right",
|
|
111359
|
-
items: [
|
|
111360
|
-
toggleViewTabItem,
|
|
111361
|
-
addProfileTabItem
|
|
111362
|
-
],
|
|
111363
|
-
style: { width: "100%" },
|
|
111364
|
-
tabBarStyle: { width: "100%" }
|
|
111365
|
-
}
|
|
111366
|
-
),
|
|
111748
|
+
((_g = state.configuration) == null ? void 0 : _g.tabLocation) === "right" && /* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full border-l border-slate-200", children: [
|
|
111749
|
+
renderProfileActionRail(),
|
|
111367
111750
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-slate-300 opacity-0 group-hover:opacity-100" })
|
|
111368
111751
|
] }) })
|
|
111369
|
-
] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: contentContainerRef, className: "flex min-h-0 overflow-hidden", style: {
|
|
111752
|
+
] }, `untabbed-${(_h = state.configuration) == null ? void 0 : _h.tabLocation}-${iconView ? "icon" : "label"}`) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: contentContainerRef, className: "flex min-h-0 overflow-hidden", style: {
|
|
111370
111753
|
flexDirection: "column",
|
|
111371
111754
|
height: scrollViewportHeight ? `${scrollViewportHeight}px` : "calc(100vh - 200px)"
|
|
111372
111755
|
}, children: [
|
|
@@ -111391,7 +111774,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111391
111774
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(EntityId, { entity: contextEntity, onUpdate: handleUpdateEntity })
|
|
111392
111775
|
}
|
|
111393
111776
|
),
|
|
111394
|
-
!((
|
|
111777
|
+
!((_i = state.configuration) == null ? void 0 : _i.readonly) && missingRequiredData && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111395
111778
|
"button",
|
|
111396
111779
|
{
|
|
111397
111780
|
className: "bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",
|
|
@@ -111413,6 +111796,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111413
111796
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111414
111797
|
"div",
|
|
111415
111798
|
{
|
|
111799
|
+
"data-recrate-property": property,
|
|
111416
111800
|
className: `my-2 hover:bg-sky-100 ${savedProperty === property ? "bg-green-200 hover:bg-green-200" : ""}`,
|
|
111417
111801
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111418
111802
|
EntityProperty,
|
|
@@ -111445,27 +111829,12 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111445
111829
|
setTabPaneWidth(w2);
|
|
111446
111830
|
persistTabWidth(w2);
|
|
111447
111831
|
}, children: [
|
|
111448
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ?
|
|
111449
|
-
|
|
111450
|
-
Tabs,
|
|
111451
|
-
{
|
|
111452
|
-
className: "describo-tabs-vertical-center-add",
|
|
111453
|
-
activeKey: activeTab,
|
|
111454
|
-
onChange: (key) => {
|
|
111455
|
-
captureViewContext(activeTab);
|
|
111456
|
-
setActiveTab(key);
|
|
111457
|
-
saveTabToState(key);
|
|
111458
|
-
},
|
|
111459
|
-
tabPosition: ((_i = state.configuration) == null ? void 0 : _i.tabLocation) === "left" ? "left" : ((_j = state.configuration) == null ? void 0 : _j.tabLocation) === "right" ? "right" : "top",
|
|
111460
|
-
style: { width: "100%" },
|
|
111461
|
-
tabBarStyle: ((_k = state.configuration) == null ? void 0 : _k.tabLocation) === "left" || ((_l = state.configuration) == null ? void 0 : _l.tabLocation) === "right" ? { width: "100%" } : void 0,
|
|
111462
|
-
items: tabItems
|
|
111463
|
-
}
|
|
111464
|
-
),
|
|
111832
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { minSize: iconView ? ICON_TAB_PANE_WIDTH : MIN_LABEL_TAB_PANE_WIDTH, maxSize: iconView ? ICON_TAB_PANE_WIDTH : MAX_LABEL_TAB_PANE_WIDTH, preferredSize: iconView ? ICON_TAB_PANE_WIDTH : tabPaneWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group h-full", children: [
|
|
111833
|
+
renderProfileTabRail(),
|
|
111465
111834
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0 bottom-0 w-1 bg-slate-300 opacity-0 group-hover:opacity-100" })
|
|
111466
111835
|
] }) }),
|
|
111467
111836
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Ve.Pane, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: activeContentRef, className: "describo-editor-scroll h-full overflow-y-auto scroll-smooth min-h-0 p-3", children: [
|
|
111468
|
-
!((
|
|
111837
|
+
!((_j = state.configuration) == null ? void 0 : _j.readonly) && ((_k = tabs.find((t22) => t22.name === activeTab)) == null ? void 0 : _k.missingRequiredData) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-red-600 float-right mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111469
111838
|
"button",
|
|
111470
111839
|
{
|
|
111471
111840
|
className: "bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded text-sm",
|
|
@@ -111489,25 +111858,33 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111489
111858
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(EntityName, { entity: contextEntity, onUpdate: handleUpdateEntity })
|
|
111490
111859
|
}
|
|
111491
111860
|
),
|
|
111492
|
-
(
|
|
111861
|
+
(_l = tabs.find((tab) => tab.name === "about")) == null ? void 0 : _l.inputs.map((input) => {
|
|
111493
111862
|
if (!["@id", "@type", "name", "@reverse"].includes(input.name)) {
|
|
111494
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111495
|
-
|
|
111863
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111864
|
+
"div",
|
|
111496
111865
|
{
|
|
111497
|
-
|
|
111498
|
-
|
|
111499
|
-
|
|
111500
|
-
|
|
111501
|
-
|
|
111502
|
-
|
|
111503
|
-
|
|
111504
|
-
|
|
111505
|
-
|
|
111506
|
-
|
|
111507
|
-
|
|
111508
|
-
|
|
111509
|
-
|
|
111510
|
-
|
|
111866
|
+
"data-recrate-property": input.name,
|
|
111867
|
+
className: `p-2 hover:bg-sky-100 ${savedProperty === input.name ? "bg-green-200 hover:bg-green-200" : ""}`,
|
|
111868
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111869
|
+
EntityProperty,
|
|
111870
|
+
{
|
|
111871
|
+
entity: contextEntity,
|
|
111872
|
+
property: input.name,
|
|
111873
|
+
values: Array.isArray(contextEntity[input.name]) ? contextEntity[input.name] : [contextEntity[input.name]],
|
|
111874
|
+
highlightRequired: highlightRequiredProperties,
|
|
111875
|
+
savedProperty: savedProperty === input.name,
|
|
111876
|
+
onLoadEntity: handleLoadEntityWithContext,
|
|
111877
|
+
onCreateEntity: handleCreateEntity,
|
|
111878
|
+
onLinkEntity: handleLinkEntity,
|
|
111879
|
+
onUnlinkEntity: handleUnlinkEntity,
|
|
111880
|
+
onCreateProperty: handleCreateProperty,
|
|
111881
|
+
onSaveProperty: handleUpdateEntity,
|
|
111882
|
+
onDeleteProperty: handleDeleteProperty
|
|
111883
|
+
}
|
|
111884
|
+
)
|
|
111885
|
+
},
|
|
111886
|
+
input.name
|
|
111887
|
+
);
|
|
111511
111888
|
}
|
|
111512
111889
|
return null;
|
|
111513
111890
|
})
|
|
@@ -111519,6 +111896,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111519
111896
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111520
111897
|
"div",
|
|
111521
111898
|
{
|
|
111899
|
+
"data-recrate-property": input.name,
|
|
111522
111900
|
className: `p-2 hover:bg-sky-100 ${savedProperty === input.name ? "bg-green-200 hover:bg-green-200" : ""}`,
|
|
111523
111901
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111524
111902
|
EntityProperty,
|
|
@@ -111547,7 +111925,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111547
111925
|
return null;
|
|
111548
111926
|
})
|
|
111549
111927
|
] }) })
|
|
111550
|
-
] }) })
|
|
111928
|
+
] }, `tabbed-${(_m = state.configuration) == null ? void 0 : _m.tabLocation}-${iconView ? "icon" : "label"}`) })
|
|
111551
111929
|
] }),
|
|
111552
111930
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111553
111931
|
Drawer2,
|
|
@@ -119894,7 +120272,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
|
|
|
119894
120272
|
}) : null
|
|
119895
120273
|
);
|
|
119896
120274
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
119897
|
-
const version = "0.1.
|
|
120275
|
+
const version = "0.1.27";
|
|
119898
120276
|
const pkg = {
|
|
119899
120277
|
version
|
|
119900
120278
|
};
|