@dovetail-v2/refine 0.3.26-alpha.3 → 0.3.28-alpha.0
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,12 @@ interface K8sDropdownProps {
|
|
|
9
9
|
customButton?: React.ReactNode;
|
|
10
10
|
resourceConfig?: Pick<ResourceConfig, 'name' | 'displayName' | 'kind' | 'initValue' | 'apiVersion' | 'basePath' | 'formConfig' | 'hideEdit'>;
|
|
11
11
|
deleteDialogProps?: Partial<DeleteDialogProps>;
|
|
12
|
+
/**
|
|
13
|
+
* 为 true 时跳过基于路由上下文的操作隐藏逻辑,始终显示全部操作按钮(编辑、编辑 YAML、下载 YAML)。
|
|
14
|
+
* 适用于在详情页或表单中嵌套渲染的子资源列表(如 AccessMethodForm 中的 Service/Ingress),
|
|
15
|
+
* 这些场景下子资源需要独立的编辑和下载能力,不应被父资源详情页的隐藏规则影响。
|
|
16
|
+
*/
|
|
17
|
+
forceShowAllActions?: boolean;
|
|
12
18
|
}
|
|
13
19
|
export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
|
|
14
20
|
export default K8sDropdown;
|
package/dist/refine.cjs
CHANGED
|
@@ -12005,7 +12005,8 @@ function K8sDropdown(props) {
|
|
|
12005
12005
|
size = "normal",
|
|
12006
12006
|
resourceConfig,
|
|
12007
12007
|
customButton,
|
|
12008
|
-
deleteDialogProps
|
|
12008
|
+
deleteDialogProps,
|
|
12009
|
+
forceShowAllActions
|
|
12009
12010
|
} = props;
|
|
12010
12011
|
const globalStore = useGlobalStore();
|
|
12011
12012
|
const useResourceResult = core.useResource();
|
|
@@ -12027,8 +12028,8 @@ function K8sDropdown(props) {
|
|
|
12027
12028
|
});
|
|
12028
12029
|
const download2 = useDownloadYAML();
|
|
12029
12030
|
const openForm = useOpenForm();
|
|
12030
|
-
const isInShowPage = useResourceResult.action === "show";
|
|
12031
|
-
const isChildResource = isInShowPage && ((_b = useResourceResult.resource) == null ? void 0 : _b.name) !== resourceName;
|
|
12031
|
+
const isInShowPage = forceShowAllActions ? false : useResourceResult.action === "show";
|
|
12032
|
+
const isChildResource = forceShowAllActions ? false : isInShowPage && ((_b = useResourceResult.resource) == null ? void 0 : _b.name) !== resourceName;
|
|
12032
12033
|
const { data: canEditData } = core.useCan({
|
|
12033
12034
|
resource: resourceName,
|
|
12034
12035
|
action: AccessControlAuth.Edit,
|
|
@@ -13026,6 +13027,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13026
13027
|
const renderAutoCompleteFunc = ({
|
|
13027
13028
|
value: value22,
|
|
13028
13029
|
onChange: onChange2,
|
|
13030
|
+
onBlur,
|
|
13029
13031
|
rowIndex,
|
|
13030
13032
|
disabled
|
|
13031
13033
|
}) => {
|
|
@@ -13034,6 +13036,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13034
13036
|
options: keyOptions || [],
|
|
13035
13037
|
value: value22,
|
|
13036
13038
|
onChange: onChange2,
|
|
13039
|
+
onBlur,
|
|
13037
13040
|
size: "small",
|
|
13038
13041
|
filterOption: (inputValue, option) => {
|
|
13039
13042
|
var _a;
|
|
@@ -13046,6 +13049,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13046
13049
|
const renderTextAreaFunc = ({
|
|
13047
13050
|
value: value22,
|
|
13048
13051
|
onChange: onChange2,
|
|
13052
|
+
onBlur,
|
|
13049
13053
|
rowIndex,
|
|
13050
13054
|
disabled
|
|
13051
13055
|
}) => {
|
|
@@ -13058,7 +13062,8 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13058
13062
|
disabled: disabled || disabledChagneDefaultValues && defaultValue.some((row) => lodashEs.isEqual(row, record)),
|
|
13059
13063
|
onChange: (e2) => {
|
|
13060
13064
|
onChange2(e2.target.value);
|
|
13061
|
-
}
|
|
13065
|
+
},
|
|
13066
|
+
onBlur
|
|
13062
13067
|
});
|
|
13063
13068
|
};
|
|
13064
13069
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
|
package/dist/refine.js
CHANGED
|
@@ -11986,7 +11986,8 @@ function K8sDropdown(props) {
|
|
|
11986
11986
|
size = "normal",
|
|
11987
11987
|
resourceConfig,
|
|
11988
11988
|
customButton,
|
|
11989
|
-
deleteDialogProps
|
|
11989
|
+
deleteDialogProps,
|
|
11990
|
+
forceShowAllActions
|
|
11990
11991
|
} = props;
|
|
11991
11992
|
const globalStore = useGlobalStore();
|
|
11992
11993
|
const useResourceResult = useResource();
|
|
@@ -12008,8 +12009,8 @@ function K8sDropdown(props) {
|
|
|
12008
12009
|
});
|
|
12009
12010
|
const download2 = useDownloadYAML();
|
|
12010
12011
|
const openForm = useOpenForm();
|
|
12011
|
-
const isInShowPage = useResourceResult.action === "show";
|
|
12012
|
-
const isChildResource = isInShowPage && ((_b = useResourceResult.resource) == null ? void 0 : _b.name) !== resourceName;
|
|
12012
|
+
const isInShowPage = forceShowAllActions ? false : useResourceResult.action === "show";
|
|
12013
|
+
const isChildResource = forceShowAllActions ? false : isInShowPage && ((_b = useResourceResult.resource) == null ? void 0 : _b.name) !== resourceName;
|
|
12013
12014
|
const { data: canEditData } = useCan({
|
|
12014
12015
|
resource: resourceName,
|
|
12015
12016
|
action: AccessControlAuth.Edit,
|
|
@@ -13007,6 +13008,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13007
13008
|
const renderAutoCompleteFunc = ({
|
|
13008
13009
|
value: value22,
|
|
13009
13010
|
onChange: onChange2,
|
|
13011
|
+
onBlur,
|
|
13010
13012
|
rowIndex,
|
|
13011
13013
|
disabled
|
|
13012
13014
|
}) => {
|
|
@@ -13015,6 +13017,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13015
13017
|
options: keyOptions || [],
|
|
13016
13018
|
value: value22,
|
|
13017
13019
|
onChange: onChange2,
|
|
13020
|
+
onBlur,
|
|
13018
13021
|
size: "small",
|
|
13019
13022
|
filterOption: (inputValue, option) => {
|
|
13020
13023
|
var _a;
|
|
@@ -13027,6 +13030,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13027
13030
|
const renderTextAreaFunc = ({
|
|
13028
13031
|
value: value22,
|
|
13029
13032
|
onChange: onChange2,
|
|
13033
|
+
onBlur,
|
|
13030
13034
|
rowIndex,
|
|
13031
13035
|
disabled
|
|
13032
13036
|
}) => {
|
|
@@ -13039,7 +13043,8 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13039
13043
|
disabled: disabled || disabledChagneDefaultValues && defaultValue.some((row) => isEqual$1(row, record)),
|
|
13040
13044
|
onChange: (e2) => {
|
|
13041
13045
|
onChange2(e2.target.value);
|
|
13042
|
-
}
|
|
13046
|
+
},
|
|
13047
|
+
onBlur
|
|
13043
13048
|
});
|
|
13044
13049
|
};
|
|
13045
13050
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|