@dovetail-v2/refine 0.3.17-alpha.1 → 0.3.18-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.
@@ -1,3 +1,4 @@
1
+ import { DeleteDialogProps } from '@cloudtower/eagle';
1
2
  import React from 'react';
2
3
  import { ResourceModel } from '../../../models';
3
4
  export type DropdownSize = 'normal' | 'large';
@@ -5,6 +6,10 @@ interface K8sDropdownProps {
5
6
  record: ResourceModel;
6
7
  size?: DropdownSize;
7
8
  customButton?: React.ReactNode;
9
+ resourceName?: string;
10
+ displayName?: string;
11
+ deleteDialogProps?: Partial<DeleteDialogProps>;
12
+ hideEdit?: boolean;
8
13
  }
9
14
  export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
10
15
  export default K8sDropdown;
@@ -6,6 +6,8 @@ interface ListPageProps<T extends ResourceModel> {
6
6
  tableProps: InternalTableProps<T>;
7
7
  contentClassName?: string;
8
8
  belowToolBarContent?: React.ReactNode;
9
+ customNamespaceFilter?: React.ReactNode;
10
+ isSearching?: boolean;
9
11
  }
10
12
  export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
11
13
  export {};
@@ -10,7 +10,6 @@ export type ShowContentViewProps<Model extends ResourceModel> = React.PropsWithC
10
10
  record: Model;
11
11
  }>;
12
12
  hideBackButton?: boolean;
13
- canCollapseTabs?: boolean;
14
13
  hideTopBar?: boolean;
15
14
  className?: string;
16
15
  size?: 'small' | 'medium';
@@ -6,6 +6,7 @@ interface TableProps<Model extends ResourceModel> {
6
6
  tableProps: InternalTableProps<Model>;
7
7
  displayName: string;
8
8
  errorContentProps?: WidgetErrorContentProps;
9
+ isSearching?: boolean;
9
10
  }
10
11
  export declare function Table<Model extends ResourceModel>(props: TableProps<Model>): JSX.Element;
11
12
  export {};
@@ -1,12 +1,14 @@
1
1
  import { DeleteDialogProps } from '@cloudtower/eagle';
2
2
  type useDeleteDialogProps = {
3
3
  resourceName: string;
4
+ displayName?: string;
5
+ meta?: Record<string, string>;
4
6
  deleteDialogProps?: Partial<DeleteDialogProps>;
5
7
  };
6
8
  /**
7
9
  * 打开确认删除弹窗,如果失败会自动弹出回绝弹窗
8
10
  */
9
- export declare const useDeleteModal: ({ resourceName, deleteDialogProps, }: useDeleteDialogProps) => {
11
+ export declare const useDeleteModal: ({ resourceName, displayName, meta, deleteDialogProps, }: useDeleteDialogProps) => {
10
12
  openDeleteConfirmModal: (id: string) => void;
11
13
  closeDeleteConfirmModal: () => void;
12
14
  };
@@ -2,10 +2,12 @@ import { DeleteDialogProps } from '@cloudtower/eagle';
2
2
  import { HttpError } from '@refinedev/core';
3
3
  type useDeleteModalOnlyProps = {
4
4
  resource: string;
5
+ displayName?: string;
6
+ meta?: Record<string, string>;
5
7
  onError?: (resourceId: string, error?: HttpError) => void;
6
8
  deleteDialogProps?: Partial<DeleteDialogProps>;
7
9
  };
8
- export declare const useDeleteModalOnly: ({ resource: resourceFromProps, deleteDialogProps, onError, }: useDeleteModalOnlyProps) => {
10
+ export declare const useDeleteModalOnly: ({ resource: resourceFromProps, displayName: displayNameFromProps, deleteDialogProps, meta, onError, }: useDeleteModalOnlyProps) => {
9
11
  openDeleteConfirmModal: (id: string) => void;
10
12
  closeDeleteConfirmModal: () => void;
11
13
  };
@@ -1,4 +1,7 @@
1
- export declare const useFailedModal: (resource: string) => {
1
+ export declare const useFailedModal: (props: {
2
+ resource: string;
3
+ displayName?: string;
4
+ }) => {
2
5
  openFailedModal: (id: string, errorMsgs: string[]) => void;
3
6
  closeFailedModal: () => void;
4
7
  };
@@ -3,12 +3,12 @@ import { i18n as I18nType } from 'i18next';
3
3
  import { Unstructured } from 'k8s-api-provider';
4
4
  import { ConfigMap, Secret } from 'kubernetes-types/core/v1';
5
5
  import { Column } from '../../components/InternalBaseTable';
6
- import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
6
+ import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel, DeploymentModel } from '../../models';
7
7
  export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
8
8
  export declare const NameColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
9
9
  export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
10
10
  export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
11
- export declare const StateDisplayColumnRenderer: <Model extends PodModel | ServiceModel | WorkloadModel | JobModel | CronJobModel | DaemonSetModel>(i18n: I18nType) => Column<Model>;
11
+ export declare const StateDisplayColumnRenderer: <Model extends PodModel | ServiceModel | WorkloadModel | DeploymentModel | JobModel | CronJobModel | DaemonSetModel>(i18n: I18nType) => Column<Model>;
12
12
  export declare const WorkloadImageColumnRenderer: <Model extends WorkloadBaseModel>(i18n: I18nType) => Column<Model>;
13
13
  export declare const RestartsColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
14
14
  export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
@@ -25,6 +25,7 @@ export declare function addDefaultRenderToColumns<Data, Col extends RequiredColu
25
25
  render(value: unknown): JSX.Element;
26
26
  } & Col)[];
27
27
  export declare const useEagleTable: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(params: Params<Model>) => {
28
+ setCurrent: (current: number) => void;
28
29
  tableQueryResult: import("@tanstack/query-core").QueryObserverResult<import("@refinedev/core").GetListResponse<Model>, import("@refinedev/core").HttpError>;
29
30
  sorter: import("@refinedev/core").CrudSorting;
30
31
  sorters: import("@refinedev/core").CrudSorting;
@@ -42,7 +43,6 @@ export declare const useEagleTable: <Model extends ResourceModel<import("k8s-api
42
43
  filters: import("@refinedev/core").CrudFilters;
43
44
  }) => string;
44
45
  current: number;
45
- setCurrent: (value: React.SetStateAction<number>) => void;
46
46
  pageSize: number;
47
47
  setPageSize: (value: React.SetStateAction<number>) => void;
48
48
  pageCount: number;
package/dist/i18n.d.ts CHANGED
@@ -500,8 +500,6 @@ export declare const resources: {
500
500
  cant_delete_resource_with_name: string;
501
501
  close: string;
502
502
  import_from_file: string;
503
- view_all_info: string;
504
- collapse: string;
505
503
  tcp: string;
506
504
  udp: string;
507
505
  specify_workload: string;
@@ -530,6 +528,7 @@ export declare const resources: {
530
528
  clear_search_condition: string;
531
529
  no_labels: string;
532
530
  no_annotations: string;
531
+ pause_scheduling: string;
533
532
  };
534
533
  };
535
534
  };
@@ -243,8 +243,6 @@ declare const _default: {
243
243
  cant_delete_resource_with_name: string;
244
244
  close: string;
245
245
  import_from_file: string;
246
- view_all_info: string;
247
- collapse: string;
248
246
  tcp: string;
249
247
  udp: string;
250
248
  specify_workload: string;
@@ -273,6 +271,7 @@ declare const _default: {
273
271
  clear_search_condition: string;
274
272
  no_labels: string;
275
273
  no_annotations: string;
274
+ pause_scheduling: string;
276
275
  };
277
276
  };
278
277
  export default _default;
@@ -13,6 +13,7 @@ export declare class DeploymentModel extends WorkloadModel {
13
13
  getReplicaSets(replicaSets: ReplicaSetModel[]): ReplicaSetModel[];
14
14
  get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
15
15
  get revision(): string | undefined;
16
+ get isPaused(): boolean;
16
17
  getCurrentReplicaSet(replicaSets: ReplicaSetModel[]): ReplicaSetModel | undefined;
17
18
  }
18
19
  export {};
@@ -14,6 +14,7 @@ export type RuleItem = {
14
14
  export declare class IngressModel extends ResourceModel<IngressTypes> {
15
15
  _rawYaml: IngressTypes;
16
16
  constructor(_rawYaml: IngressTypes, _globalStore: GlobalStore);
17
+ get spec(): import("kubernetes-types/networking/v1").IngressSpec;
17
18
  private getFullPath;
18
19
  getFlattenedRules(services?: Service[]): RuleItem[];
19
20
  }
package/dist/refine.cjs CHANGED
@@ -1202,8 +1202,6 @@ const cant_delete_resource = "无法删除{{resource}}";
1202
1202
  const cant_delete_resource_with_name = "无法删除{{resource}} <0>{{name}}</0> 。";
1203
1203
  const close = "关闭";
1204
1204
  const import_from_file = "从文件读取";
1205
- const view_all_info = "查看全部信息";
1206
- const collapse = "收起";
1207
1205
  const tcp = "TCP";
1208
1206
  const udp = "UDP";
1209
1207
  const specify_workload = "指定工作负载";
@@ -1232,6 +1230,7 @@ const no_search_result = "无搜索结果";
1232
1230
  const clear_search_condition = "清空搜索条件";
1233
1231
  const no_labels = "无标签";
1234
1232
  const no_annotations = "无注解";
1233
+ const pause_scheduling = "暂停调度";
1235
1234
  const dovetail = {
1236
1235
  copy,
1237
1236
  reset_arguments,
@@ -1476,8 +1475,6 @@ const dovetail = {
1476
1475
  cant_delete_resource_with_name,
1477
1476
  close,
1478
1477
  import_from_file,
1479
- view_all_info,
1480
- collapse,
1481
1478
  tcp,
1482
1479
  udp,
1483
1480
  specify_workload,
@@ -1505,7 +1502,8 @@ const dovetail = {
1505
1502
  no_search_result,
1506
1503
  clear_search_condition,
1507
1504
  no_labels,
1508
- no_annotations
1505
+ no_annotations,
1506
+ pause_scheduling
1509
1507
  };
1510
1508
  const ZH = {
1511
1509
  dovetail
@@ -7435,18 +7433,21 @@ function transformResourceKindInSentence(str, language) {
7435
7433
  }
7436
7434
  const useDeleteModalOnly = ({
7437
7435
  resource: resourceFromProps,
7436
+ displayName: displayNameFromProps,
7438
7437
  deleteDialogProps,
7438
+ meta,
7439
7439
  onError
7440
7440
  }) => {
7441
7441
  const { resource } = core.useResource();
7442
7442
  const configs = React.useContext(ConfigsContext);
7443
7443
  const config = configs[resourceFromProps];
7444
7444
  const { mutateAsync } = core.useDelete();
7445
+ const [deleting, setDeleting] = React.useState(false);
7445
7446
  const pushModal = eagle.usePushModal();
7446
7447
  const popModal = eagle.usePopModal();
7447
7448
  const navigation = core.useNavigation();
7448
7449
  const { t: t2, i18n: i18n2 } = common.useTranslation();
7449
- const displayName = config.displayName || config.kind;
7450
+ const displayName = displayNameFromProps || (config == null ? void 0 : config.displayName) || (meta == null ? void 0 : meta.kind) || (config == null ? void 0 : config.kind);
7450
7451
  const resourceDisplayName = transformResourceKindInSentence(displayName, i18n2.language);
7451
7452
  function openDeleteConfirmModal(id) {
7452
7453
  pushModal({
@@ -7469,10 +7470,13 @@ const useDeleteModalOnly = ({
7469
7470
  ),
7470
7471
  secondaryDesc: t2("dovetail.delete_tip"),
7471
7472
  okText: t2("dovetail.delete"),
7473
+ confirmLoading: deleting,
7472
7474
  onOk: async (popModal2) => {
7473
7475
  try {
7476
+ setDeleting(true);
7474
7477
  await mutateAsync({
7475
7478
  resource: resourceFromProps,
7479
+ meta,
7476
7480
  id,
7477
7481
  successNotification() {
7478
7482
  return {
@@ -7496,6 +7500,7 @@ const useDeleteModalOnly = ({
7496
7500
  }
7497
7501
  popModal2();
7498
7502
  } finally {
7503
+ setDeleting(false);
7499
7504
  }
7500
7505
  },
7501
7506
  ...deleteDialogProps
@@ -7504,13 +7509,14 @@ const useDeleteModalOnly = ({
7504
7509
  }
7505
7510
  return { openDeleteConfirmModal, closeDeleteConfirmModal: popModal };
7506
7511
  };
7507
- const useFailedModal = (resource) => {
7512
+ const useFailedModal = (props) => {
7513
+ const { resource, displayName: displayNameFromProps } = props;
7508
7514
  const configs = React.useContext(ConfigsContext);
7509
7515
  const config = configs[resource];
7510
7516
  const { t: t2, i18n: i18n2 } = common.useTranslation();
7511
7517
  const pushModal = eagle.usePushModal();
7512
7518
  const popModal = eagle.usePopModal();
7513
- const displayName = config.displayName || config.kind;
7519
+ const displayName = displayNameFromProps || (config == null ? void 0 : config.displayName) || (config == null ? void 0 : config.kind);
7514
7520
  const resourceDisplayName = transformResourceKindInSentence(displayName, i18n2.language);
7515
7521
  function openFailedModal(id, errorMsgs) {
7516
7522
  pushModal({
@@ -7544,15 +7550,25 @@ const useFailedModal = (resource) => {
7544
7550
  };
7545
7551
  const useDeleteModal = ({
7546
7552
  resourceName,
7553
+ displayName,
7554
+ meta,
7547
7555
  deleteDialogProps
7548
7556
  }) => {
7549
7557
  const { i18n: i18n2 } = common.useTranslation();
7550
7558
  const configs = React.useContext(ConfigsContext);
7551
7559
  const config = configs[resourceName];
7552
- const { openFailedModal } = useFailedModal(resourceName);
7560
+ const { openFailedModal } = useFailedModal({
7561
+ resource: resourceName,
7562
+ displayName
7563
+ });
7553
7564
  const { openDeleteConfirmModal, closeDeleteConfirmModal } = useDeleteModalOnly({
7554
7565
  resource: resourceName,
7555
- deleteDialogProps: { secondaryDesc: config.deleteTip, ...deleteDialogProps },
7566
+ displayName,
7567
+ meta,
7568
+ deleteDialogProps: {
7569
+ secondaryDesc: (config == null ? void 0 : config.deleteTip) || i18n2.t("dovetail.delete_tip"),
7570
+ ...deleteDialogProps
7571
+ },
7556
7572
  onError: async (id, error) => {
7557
7573
  closeDeleteConfirmModal();
7558
7574
  openFailedModal(id, getCommonErrors(await (error == null ? void 0 : error.response.json()), i18n2));
@@ -8718,6 +8734,9 @@ class IngressModel extends ResourceModel {
8718
8734
  super(_rawYaml, _globalStore);
8719
8735
  this._rawYaml = _rawYaml;
8720
8736
  }
8737
+ get spec() {
8738
+ return this._rawYaml.spec;
8739
+ }
8721
8740
  getFullPath(rule2, path2 = "", port2) {
8722
8741
  if (!rule2.host) {
8723
8742
  return path2 || "";
@@ -9856,6 +9875,10 @@ class DeploymentModel extends WorkloadModel {
9856
9875
  var _a, _b;
9857
9876
  return (_b = (_a = this.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b["deployment.kubernetes.io/revision"];
9858
9877
  }
9878
+ get isPaused() {
9879
+ var _a;
9880
+ return !!((_a = this.spec) == null ? void 0 : _a.paused);
9881
+ }
9859
9882
  getCurrentReplicaSet(replicaSets) {
9860
9883
  const myReplicaSets = this.getReplicaSets(replicaSets);
9861
9884
  return myReplicaSets.find((rs) => rs.revision === this.revision);
@@ -10809,18 +10832,34 @@ function validateNodePort(nodePort, allNodePorts, i18n2) {
10809
10832
  return { isValid: true };
10810
10833
  }
10811
10834
  function K8sDropdown(props) {
10812
- var _a, _b;
10813
- const { record, size = "normal", customButton } = props;
10835
+ var _a, _b, _c;
10836
+ const {
10837
+ record,
10838
+ size = "normal",
10839
+ resourceName: resourceNameFromProps,
10840
+ customButton,
10841
+ deleteDialogProps,
10842
+ displayName,
10843
+ hideEdit
10844
+ } = props;
10814
10845
  const globalStore = useGlobalStore();
10815
10846
  const useResourceResult = core.useResource();
10816
10847
  const configs = React.useContext(ConfigsContext);
10817
- const resourceName = getResourceNameByKind(record.kind || "", configs);
10848
+ const resourceName = resourceNameFromProps || getResourceNameByKind(record.kind || "", configs);
10818
10849
  const config = configs[resourceName || ""];
10819
10850
  const { t: t2, i18n: i18n2 } = common.useTranslation();
10820
- const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
10851
+ const { openDeleteConfirmModal } = useDeleteModal({
10852
+ resourceName: resourceName || "",
10853
+ deleteDialogProps,
10854
+ displayName,
10855
+ meta: record.apiVersion ? {
10856
+ kind: record.kind || "",
10857
+ resourceBasePath: (((_a = record.apiVersion) == null ? void 0 : _a.includes("/")) ? "apis" : "api") + `/${record.apiVersion}`
10858
+ } : void 0
10859
+ });
10821
10860
  const download2 = useDownloadYAML();
10822
10861
  const openForm = useOpenForm();
10823
- const isInShowPage = useResourceResult.action === "show" && ((_a = useResourceResult.resource) == null ? void 0 : _a.name) === config.name;
10862
+ const isInShowPage = useResourceResult.action === "show" && ((_b = useResourceResult.resource) == null ? void 0 : _b.name) === resourceName;
10824
10863
  const { data: canEditData } = core.useCan({
10825
10864
  resource: resourceName,
10826
10865
  action: AccessControlAuth.Edit,
@@ -10835,12 +10874,12 @@ function K8sDropdown(props) {
10835
10874
  namespace: record.namespace
10836
10875
  }
10837
10876
  });
10838
- const formType = ((_b = config.formConfig) == null ? void 0 : _b.formType) || FormType.FORM;
10877
+ const formType = (_c = config == null ? void 0 : config.formConfig) == null ? void 0 : _c.formType;
10839
10878
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(common.jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
10840
10879
  eagle.Dropdown,
10841
10880
  {
10842
10881
  overlay: /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Menu, { children: [
10843
- isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: formType === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(
10882
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || hideEdit || (config == null ? void 0 : config.hideEdit) ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: formType === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(
10844
10883
  (config == null ? void 0 : config.displayName) || record.kind || "",
10845
10884
  i18n2.language
10846
10885
  )}` : t2("dovetail.edit_yaml") }) }),
@@ -10905,12 +10944,7 @@ var ColumnKeys = /* @__PURE__ */ ((ColumnKeys2) => {
10905
10944
  function addDefaultRenderToColumns(columns) {
10906
10945
  return columns.map((col) => ({
10907
10946
  render(value2) {
10908
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
10909
- ValueDisplay,
10910
- {
10911
- value: value2
10912
- }
10913
- );
10947
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, { value: value2 });
10914
10948
  },
10915
10949
  ...col
10916
10950
  }));
@@ -10946,18 +10980,23 @@ const useEagleTable = (params) => {
10946
10980
  },
10947
10981
  [setCurrentPage, table]
10948
10982
  );
10949
- const onSorterChange = React.useCallback((order, key2) => {
10950
- var _a2;
10951
- const ORDER_MAP = {
10952
- descend: "desc",
10953
- ascend: "asc"
10954
- };
10955
- const sorters = [{
10956
- field: (_a2 = columns.find((col) => col.key === key2)) == null ? void 0 : _a2.dataIndex,
10957
- order: order ? ORDER_MAP[order] : order
10958
- }];
10959
- table.setSorters(sorters);
10960
- }, [table, columns]);
10983
+ const onSorterChange = React.useCallback(
10984
+ (order, key2) => {
10985
+ var _a2;
10986
+ const ORDER_MAP = {
10987
+ descend: "desc",
10988
+ ascend: "asc"
10989
+ };
10990
+ const sorters = [
10991
+ {
10992
+ field: (_a2 = columns.find((col) => col.key === key2)) == null ? void 0 : _a2.dataIndex,
10993
+ order: order ? ORDER_MAP[order] : order
10994
+ }
10995
+ ];
10996
+ table.setSorters(sorters);
10997
+ },
10998
+ [table, columns]
10999
+ );
10961
11000
  const data2 = (_a = table.tableQueryResult.data) == null ? void 0 : _a.data;
10962
11001
  const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
10963
11002
  const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
@@ -10980,12 +11019,23 @@ const useEagleTable = (params) => {
10980
11019
  defaultSize: currentSize
10981
11020
  };
10982
11021
  React.useEffect(() => {
10983
- table.setSorters([{
10984
- field: "metadata.creationTimestamp",
10985
- order: "desc"
10986
- }]);
11022
+ table.setSorters([
11023
+ {
11024
+ field: "metadata.creationTimestamp",
11025
+ order: "desc"
11026
+ }
11027
+ ]);
10987
11028
  }, []);
10988
- return { tableProps: finalProps, selectedKeys, ...table };
11029
+ return {
11030
+ tableProps: finalProps,
11031
+ selectedKeys,
11032
+ ...table,
11033
+ setCurrent: (current) => {
11034
+ var _a2;
11035
+ setCurrentPage(current);
11036
+ (_a2 = table.setCurrent) == null ? void 0 : _a2.call(table, current);
11037
+ }
11038
+ };
10989
11039
  };
10990
11040
  function CreateButton(props) {
10991
11041
  var _a;
@@ -12160,7 +12210,7 @@ function PVVolumeModeDisplay(props) {
12160
12210
  }
12161
12211
  function Table(props) {
12162
12212
  var _a;
12163
- const { tableProps, displayName, errorContentProps } = props;
12213
+ const { tableProps, displayName, errorContentProps, isSearching } = props;
12164
12214
  const { Table: TableComponent } = React.useContext(ComponentContext);
12165
12215
  const Table2 = TableComponent || Table$1;
12166
12216
  const { params } = core.useParsed();
@@ -12168,7 +12218,7 @@ function Table(props) {
12168
12218
  const resourceType = transformResourceKindInSentence(displayName, i18n2.language);
12169
12219
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12170
12220
  const nameKeyword = (params == null ? void 0 : params[NAME_KEYWORD_PARAM]) || "";
12171
- if (nameKeyword) {
12221
+ if (nameKeyword || isSearching) {
12172
12222
  const onClear = () => {
12173
12223
  var _a2;
12174
12224
  (_a2 = tableProps.onClearSearchKeyword) == null ? void 0 : _a2.call(tableProps);
@@ -13806,7 +13856,7 @@ function Tabs(props) {
13806
13856
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13807
13857
  }) });
13808
13858
  }
13809
- const ShowContentView_1gmp0tu = "";
13859
+ const ShowContentView_196cma3 = "";
13810
13860
  const ShowContentWrapperStyle = "soapvs9";
13811
13861
  const BackButton = "b13d603q";
13812
13862
  const ToolBarWrapper = "tm8eaia";
@@ -13863,7 +13913,6 @@ const ShowContentView = (props) => {
13863
13913
  children,
13864
13914
  Dropdown = K8sDropdown,
13865
13915
  hideBackButton = false,
13866
- canCollapseTabs = false,
13867
13916
  className,
13868
13917
  hideTopBar = false,
13869
13918
  size = "medium"
@@ -13985,6 +14034,7 @@ const ShowContentView = (props) => {
13985
14034
  }, group.title);
13986
14035
  }
13987
14036
  const stateDisplay = lodashEs.get(record, "stateDisplay");
14037
+ const isPausedDeployment = record.kind === "Deployment" && record.isPaused;
13988
14038
  const topBar = /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13989
14039
  className: ToolBarWrapper,
13990
14040
  style: {
@@ -14023,7 +14073,11 @@ const ShowContentView = (props) => {
14023
14073
  }), stateDisplay ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
14024
14074
  state: stateDisplay,
14025
14075
  customResourceStateMap: showConfig.resourceStateMap
14026
- }) : void 0]
14076
+ }) : void 0, isPausedDeployment ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.StatusCapsule, {
14077
+ className: common.cx_default(StateTagStyle, "c18272tc"),
14078
+ color: "yellow",
14079
+ children: i18n2.t("dovetail.pause_scheduling")
14080
+ }) : null]
14027
14081
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
14028
14082
  children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(core.CanAccess, {
14029
14083
  resource: resourceName,
@@ -14074,42 +14128,12 @@ const ShowContentView = (props) => {
14074
14128
  direction: "vertical",
14075
14129
  className: ShowContentHeaderStyle,
14076
14130
  children: topBar
14077
- }), basicInfo, canCollapseTabs ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(CollapseTabs, {
14078
- children: tabs
14079
- }) : tabs, children]
14080
- });
14081
- };
14082
- const CollapseTabs = (props) => {
14083
- const [isCollapsed, setIsCollapsed] = React.useState(true);
14084
- const {
14085
- t: t2
14086
- } = common.useTranslation();
14087
- return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, {
14088
- children: [isCollapsed ? null : props.children, /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
14089
- style: {
14090
- display: "flex"
14091
- },
14092
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
14093
- style: {
14094
- margin: "8px auto",
14095
- cursor: "pointer"
14096
- },
14097
- size: "small",
14098
- type: "link",
14099
- onClick: () => setIsCollapsed((v) => !v),
14100
- suffixIcon: isCollapsed ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14101
- src: iconsReact.ArrowChevronDownSmall16BlueIcon
14102
- }) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14103
- src: iconsReact.ArrowChevronUpSmall16BlueIcon
14104
- }),
14105
- children: isCollapsed ? t2("dovetail.view_all_info") : t2("dovetail.collapse")
14106
- })
14107
- })]
14131
+ }), basicInfo, tabs, children]
14108
14132
  });
14109
14133
  };
14110
14134
  const ShowContent = (props) => {
14111
14135
  var _a;
14112
- const { showConfig, formatter, Dropdown = K8sDropdown, children, canCollapseTabs } = props;
14136
+ const { showConfig, formatter, Dropdown = K8sDropdown, children } = props;
14113
14137
  const parsed = core.useParsed();
14114
14138
  const { resource } = core.useResource();
14115
14139
  const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
@@ -14121,7 +14145,6 @@ const ShowContent = (props) => {
14121
14145
  showConfig,
14122
14146
  formatter,
14123
14147
  Dropdown,
14124
- canCollapseTabs,
14125
14148
  children
14126
14149
  }
14127
14150
  );
@@ -14569,7 +14592,9 @@ function ListPage(props) {
14569
14592
  selectedKeys,
14570
14593
  tableProps,
14571
14594
  contentClassName,
14572
- belowToolBarContent
14595
+ belowToolBarContent,
14596
+ customNamespaceFilter,
14597
+ isSearching
14573
14598
  } = props;
14574
14599
  const {
14575
14600
  resource
@@ -14597,7 +14622,7 @@ function ListPage(props) {
14597
14622
  style: config.hideNamespacesFilter ? {
14598
14623
  paddingTop: 0
14599
14624
  } : {},
14600
- children: [!config.hideNamespacesFilter ? config.customNamespaceFilter || /* @__PURE__ */ common.jsxRuntimeExports.jsx(NamespacesFilter, {
14625
+ children: [!config.hideNamespacesFilter ? customNamespaceFilter || config.customNamespaceFilter || /* @__PURE__ */ common.jsxRuntimeExports.jsx(NamespacesFilter, {
14601
14626
  className: NamespaceFilterStyle
14602
14627
  }) : void 0, /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
14603
14628
  className: TableStyle,
@@ -14608,7 +14633,8 @@ function ListPage(props) {
14608
14633
  y: "calc(100% - 48px)"
14609
14634
  }
14610
14635
  },
14611
- displayName: (config == null ? void 0 : config.displayName) || config.kind
14636
+ displayName: (config == null ? void 0 : config.displayName) || config.kind,
14637
+ isSearching
14612
14638
  })
14613
14639
  })]
14614
14640
  })]
@@ -14752,14 +14778,14 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14752
14778
  const {
14753
14779
  t: t2
14754
14780
  } = common.useTranslation();
14755
- const [collapse2, setCollapse] = React.useState(defaultCollapse);
14781
+ const [collapse, setCollapse] = React.useState(defaultCollapse);
14756
14782
  React.useImperativeHandle(ref, () => ({
14757
14783
  setCollapse
14758
14784
  }), [setCollapse]);
14759
14785
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
14760
14786
  className: common.cx_default(className),
14761
14787
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
14762
- className: common.cx_default(TitleWrapperStyle$1, collapse2 && CollapsedTitleStyle),
14788
+ className: common.cx_default(TitleWrapperStyle$1, collapse && CollapsedTitleStyle),
14763
14789
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
14764
14790
  className: eagle.Typo.Label.l4_bold_title,
14765
14791
  children: title
@@ -14767,18 +14793,18 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14767
14793
  type: "link",
14768
14794
  size: "small",
14769
14795
  className: common.cx_default(ButtonStyle),
14770
- onClick: () => setCollapse(!collapse2),
14771
- children: [collapse2 ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14796
+ onClick: () => setCollapse(!collapse),
14797
+ children: [collapse ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14772
14798
  style: {
14773
14799
  marginLeft: 4
14774
14800
  },
14775
- src: collapse2 ? iconsReact.ArrowChevronDown16BlueIcon : iconsReact.ArrowChevronUp16BlueIcon
14801
+ src: collapse ? iconsReact.ArrowChevronDown16BlueIcon : iconsReact.ArrowChevronUp16BlueIcon
14776
14802
  })]
14777
14803
  }) : null]
14778
14804
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
14779
14805
  className: common.cx_default(contentClassName),
14780
14806
  style: {
14781
- display: collapse2 ? "none" : "block"
14807
+ display: collapse ? "none" : "block"
14782
14808
  },
14783
14809
  children
14784
14810
  })]
@@ -18989,13 +19015,25 @@ const IngressRulesComponent = ({ ingress }) => {
18989
19015
  });
18990
19016
  const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [];
18991
19017
  const result = flattenedRules.map((r2) => {
18992
- const divider = " > ";
19018
+ var _a, _b;
19019
+ const arrow = " → ";
19020
+ const divider = " | ";
19021
+ const secretName = (_b = (_a = ingress.spec.tls) == null ? void 0 : _a.find(
19022
+ ({ hosts }) => hosts == null ? void 0 : hosts.includes(r2.host || "")
19023
+ )) == null ? void 0 : _b.secretName;
19024
+ let tooltip = r2.fullPath;
19025
+ if (r2.serviceName) {
19026
+ tooltip += `${arrow}${r2.serviceName}:${r2.servicePort}`;
19027
+ }
19028
+ if (secretName) {
19029
+ tooltip += `${divider}${secretName}`;
19030
+ }
18993
19031
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
18994
19032
  eagle.OverflowTooltip,
18995
19033
  {
18996
19034
  content: /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
18997
19035
  /* @__PURE__ */ common.jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
18998
- /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: divider }),
19036
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: arrow }),
18999
19037
  r2.serviceName ? /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
19000
19038
  /* @__PURE__ */ common.jsxRuntimeExports.jsx(
19001
19039
  ResourceLink,
@@ -19009,9 +19047,20 @@ const IngressRulesComponent = ({ ingress }) => {
19009
19047
  ":",
19010
19048
  r2.servicePort
19011
19049
  ] })
19012
- ] }) : r2.resourceName
19050
+ ] }) : r2.resourceName,
19051
+ secretName ? /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
19052
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: divider }),
19053
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx(
19054
+ ResourceLink,
19055
+ {
19056
+ resourceName: "secrets",
19057
+ namespace: ingress.metadata.namespace || "default",
19058
+ name: secretName
19059
+ }
19060
+ )
19061
+ ] }) : void 0
19013
19062
  ] }),
19014
- tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
19063
+ tooltip
19015
19064
  },
19016
19065
  r2.fullPath
19017
19066
  );
@@ -19118,10 +19167,26 @@ const StateDisplayColumnRenderer = (i18n2) => {
19118
19167
  sortable: true,
19119
19168
  width: 120,
19120
19169
  sorter: CommonSorter(dataIndex),
19121
- render: (v) => /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
19122
- state: v,
19123
- hideBackground: true
19124
- })
19170
+ render: (v, record) => {
19171
+ if (record.kind === "Deployment" && record.isPaused) {
19172
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("span", {
19173
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
19174
+ state: v,
19175
+ hideBackground: true
19176
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tag, {
19177
+ color: "yellow",
19178
+ style: {
19179
+ marginLeft: "4px"
19180
+ },
19181
+ children: i18n2.t("dovetail.pause_scheduling")
19182
+ })]
19183
+ });
19184
+ }
19185
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
19186
+ state: v,
19187
+ hideBackground: true
19188
+ });
19189
+ }
19125
19190
  };
19126
19191
  };
19127
19192
  const WorkloadImageColumnRenderer = (i18n2) => {
package/dist/refine.js CHANGED
@@ -12,7 +12,7 @@ import { parse, stringify } from "qs";
12
12
  import React, { createElement, isValidElement, cloneElement, Children, useContext, useCallback, createContext, useState, useEffect, useMemo, useRef, useImperativeHandle, lazy, Suspense, memo, forwardRef } from "react";
13
13
  import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
14
14
  import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, StatusCapsule, Dropdown, Menu as Menu$1, Icon, Divider, LegacyModal, Popover, AntdTable, Upload, TableForm, AutoComplete, getOptions, DonutChart, SegmentControl, Checkbox, Tabs as Tabs$1, TabsTabPane, Col, Row, useMessage, SearchInput, Token, AntdSelectOptGroup, WizardDialog, MenuItemGroup, Layout as Layout$1, InputGroup, InputInteger, Time as Time$1, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
15
- import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16BlueIcon, ArrowChevronUpSmall16BlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
15
+ import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
16
16
  import { first, get as get$2, cloneDeep, set, omit as omit$1, merge, isEqual as isEqual$1, debounce, last, setWith, clone, isObject as isObject$4, uniq, keyBy } from "lodash-es";
17
17
  import yaml$2 from "js-yaml";
18
18
  import { useLocalStorage } from "usehooks-ts";
@@ -1183,8 +1183,6 @@ const cant_delete_resource = "无法删除{{resource}}";
1183
1183
  const cant_delete_resource_with_name = "无法删除{{resource}} <0>{{name}}</0> 。";
1184
1184
  const close = "关闭";
1185
1185
  const import_from_file = "从文件读取";
1186
- const view_all_info = "查看全部信息";
1187
- const collapse = "收起";
1188
1186
  const tcp = "TCP";
1189
1187
  const udp = "UDP";
1190
1188
  const specify_workload = "指定工作负载";
@@ -1213,6 +1211,7 @@ const no_search_result = "无搜索结果";
1213
1211
  const clear_search_condition = "清空搜索条件";
1214
1212
  const no_labels = "无标签";
1215
1213
  const no_annotations = "无注解";
1214
+ const pause_scheduling = "暂停调度";
1216
1215
  const dovetail = {
1217
1216
  copy,
1218
1217
  reset_arguments,
@@ -1457,8 +1456,6 @@ const dovetail = {
1457
1456
  cant_delete_resource_with_name,
1458
1457
  close,
1459
1458
  import_from_file,
1460
- view_all_info,
1461
- collapse,
1462
1459
  tcp,
1463
1460
  udp,
1464
1461
  specify_workload,
@@ -1486,7 +1483,8 @@ const dovetail = {
1486
1483
  no_search_result,
1487
1484
  clear_search_condition,
1488
1485
  no_labels,
1489
- no_annotations
1486
+ no_annotations,
1487
+ pause_scheduling
1490
1488
  };
1491
1489
  const ZH = {
1492
1490
  dovetail
@@ -7416,18 +7414,21 @@ function transformResourceKindInSentence(str, language) {
7416
7414
  }
7417
7415
  const useDeleteModalOnly = ({
7418
7416
  resource: resourceFromProps,
7417
+ displayName: displayNameFromProps,
7419
7418
  deleteDialogProps,
7419
+ meta,
7420
7420
  onError
7421
7421
  }) => {
7422
7422
  const { resource } = useResource();
7423
7423
  const configs = useContext(ConfigsContext);
7424
7424
  const config = configs[resourceFromProps];
7425
7425
  const { mutateAsync } = useDelete();
7426
+ const [deleting, setDeleting] = useState(false);
7426
7427
  const pushModal = usePushModal();
7427
7428
  const popModal = usePopModal();
7428
7429
  const navigation = useNavigation();
7429
7430
  const { t: t2, i18n: i18n2 } = useTranslation();
7430
- const displayName = config.displayName || config.kind;
7431
+ const displayName = displayNameFromProps || (config == null ? void 0 : config.displayName) || (meta == null ? void 0 : meta.kind) || (config == null ? void 0 : config.kind);
7431
7432
  const resourceDisplayName = transformResourceKindInSentence(displayName, i18n2.language);
7432
7433
  function openDeleteConfirmModal(id) {
7433
7434
  pushModal({
@@ -7450,10 +7451,13 @@ const useDeleteModalOnly = ({
7450
7451
  ),
7451
7452
  secondaryDesc: t2("dovetail.delete_tip"),
7452
7453
  okText: t2("dovetail.delete"),
7454
+ confirmLoading: deleting,
7453
7455
  onOk: async (popModal2) => {
7454
7456
  try {
7457
+ setDeleting(true);
7455
7458
  await mutateAsync({
7456
7459
  resource: resourceFromProps,
7460
+ meta,
7457
7461
  id,
7458
7462
  successNotification() {
7459
7463
  return {
@@ -7477,6 +7481,7 @@ const useDeleteModalOnly = ({
7477
7481
  }
7478
7482
  popModal2();
7479
7483
  } finally {
7484
+ setDeleting(false);
7480
7485
  }
7481
7486
  },
7482
7487
  ...deleteDialogProps
@@ -7485,13 +7490,14 @@ const useDeleteModalOnly = ({
7485
7490
  }
7486
7491
  return { openDeleteConfirmModal, closeDeleteConfirmModal: popModal };
7487
7492
  };
7488
- const useFailedModal = (resource) => {
7493
+ const useFailedModal = (props) => {
7494
+ const { resource, displayName: displayNameFromProps } = props;
7489
7495
  const configs = useContext(ConfigsContext);
7490
7496
  const config = configs[resource];
7491
7497
  const { t: t2, i18n: i18n2 } = useTranslation();
7492
7498
  const pushModal = usePushModal();
7493
7499
  const popModal = usePopModal();
7494
- const displayName = config.displayName || config.kind;
7500
+ const displayName = displayNameFromProps || (config == null ? void 0 : config.displayName) || (config == null ? void 0 : config.kind);
7495
7501
  const resourceDisplayName = transformResourceKindInSentence(displayName, i18n2.language);
7496
7502
  function openFailedModal(id, errorMsgs) {
7497
7503
  pushModal({
@@ -7525,15 +7531,25 @@ const useFailedModal = (resource) => {
7525
7531
  };
7526
7532
  const useDeleteModal = ({
7527
7533
  resourceName,
7534
+ displayName,
7535
+ meta,
7528
7536
  deleteDialogProps
7529
7537
  }) => {
7530
7538
  const { i18n: i18n2 } = useTranslation();
7531
7539
  const configs = useContext(ConfigsContext);
7532
7540
  const config = configs[resourceName];
7533
- const { openFailedModal } = useFailedModal(resourceName);
7541
+ const { openFailedModal } = useFailedModal({
7542
+ resource: resourceName,
7543
+ displayName
7544
+ });
7534
7545
  const { openDeleteConfirmModal, closeDeleteConfirmModal } = useDeleteModalOnly({
7535
7546
  resource: resourceName,
7536
- deleteDialogProps: { secondaryDesc: config.deleteTip, ...deleteDialogProps },
7547
+ displayName,
7548
+ meta,
7549
+ deleteDialogProps: {
7550
+ secondaryDesc: (config == null ? void 0 : config.deleteTip) || i18n2.t("dovetail.delete_tip"),
7551
+ ...deleteDialogProps
7552
+ },
7537
7553
  onError: async (id, error) => {
7538
7554
  closeDeleteConfirmModal();
7539
7555
  openFailedModal(id, getCommonErrors(await (error == null ? void 0 : error.response.json()), i18n2));
@@ -8699,6 +8715,9 @@ class IngressModel extends ResourceModel {
8699
8715
  super(_rawYaml, _globalStore);
8700
8716
  this._rawYaml = _rawYaml;
8701
8717
  }
8718
+ get spec() {
8719
+ return this._rawYaml.spec;
8720
+ }
8702
8721
  getFullPath(rule2, path2 = "", port2) {
8703
8722
  if (!rule2.host) {
8704
8723
  return path2 || "";
@@ -9837,6 +9856,10 @@ class DeploymentModel extends WorkloadModel {
9837
9856
  var _a, _b;
9838
9857
  return (_b = (_a = this.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b["deployment.kubernetes.io/revision"];
9839
9858
  }
9859
+ get isPaused() {
9860
+ var _a;
9861
+ return !!((_a = this.spec) == null ? void 0 : _a.paused);
9862
+ }
9840
9863
  getCurrentReplicaSet(replicaSets) {
9841
9864
  const myReplicaSets = this.getReplicaSets(replicaSets);
9842
9865
  return myReplicaSets.find((rs) => rs.revision === this.revision);
@@ -10790,18 +10813,34 @@ function validateNodePort(nodePort, allNodePorts, i18n2) {
10790
10813
  return { isValid: true };
10791
10814
  }
10792
10815
  function K8sDropdown(props) {
10793
- var _a, _b;
10794
- const { record, size = "normal", customButton } = props;
10816
+ var _a, _b, _c;
10817
+ const {
10818
+ record,
10819
+ size = "normal",
10820
+ resourceName: resourceNameFromProps,
10821
+ customButton,
10822
+ deleteDialogProps,
10823
+ displayName,
10824
+ hideEdit
10825
+ } = props;
10795
10826
  const globalStore = useGlobalStore();
10796
10827
  const useResourceResult = useResource();
10797
10828
  const configs = useContext(ConfigsContext);
10798
- const resourceName = getResourceNameByKind(record.kind || "", configs);
10829
+ const resourceName = resourceNameFromProps || getResourceNameByKind(record.kind || "", configs);
10799
10830
  const config = configs[resourceName || ""];
10800
10831
  const { t: t2, i18n: i18n2 } = useTranslation();
10801
- const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
10832
+ const { openDeleteConfirmModal } = useDeleteModal({
10833
+ resourceName: resourceName || "",
10834
+ deleteDialogProps,
10835
+ displayName,
10836
+ meta: record.apiVersion ? {
10837
+ kind: record.kind || "",
10838
+ resourceBasePath: (((_a = record.apiVersion) == null ? void 0 : _a.includes("/")) ? "apis" : "api") + `/${record.apiVersion}`
10839
+ } : void 0
10840
+ });
10802
10841
  const download2 = useDownloadYAML();
10803
10842
  const openForm = useOpenForm();
10804
- const isInShowPage = useResourceResult.action === "show" && ((_a = useResourceResult.resource) == null ? void 0 : _a.name) === config.name;
10843
+ const isInShowPage = useResourceResult.action === "show" && ((_b = useResourceResult.resource) == null ? void 0 : _b.name) === resourceName;
10805
10844
  const { data: canEditData } = useCan({
10806
10845
  resource: resourceName,
10807
10846
  action: AccessControlAuth.Edit,
@@ -10816,12 +10855,12 @@ function K8sDropdown(props) {
10816
10855
  namespace: record.namespace
10817
10856
  }
10818
10857
  });
10819
- const formType = ((_b = config.formConfig) == null ? void 0 : _b.formType) || FormType.FORM;
10858
+ const formType = (_c = config == null ? void 0 : config.formConfig) == null ? void 0 : _c.formType;
10820
10859
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10821
10860
  Dropdown,
10822
10861
  {
10823
10862
  overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
10824
- isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { src: EditPen16PrimaryIcon, children: formType === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(
10863
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || hideEdit || (config == null ? void 0 : config.hideEdit) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { src: EditPen16PrimaryIcon, children: formType === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(
10825
10864
  (config == null ? void 0 : config.displayName) || record.kind || "",
10826
10865
  i18n2.language
10827
10866
  )}` : t2("dovetail.edit_yaml") }) }),
@@ -10886,12 +10925,7 @@ var ColumnKeys = /* @__PURE__ */ ((ColumnKeys2) => {
10886
10925
  function addDefaultRenderToColumns(columns) {
10887
10926
  return columns.map((col) => ({
10888
10927
  render(value2) {
10889
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
10890
- ValueDisplay,
10891
- {
10892
- value: value2
10893
- }
10894
- );
10928
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: value2 });
10895
10929
  },
10896
10930
  ...col
10897
10931
  }));
@@ -10927,18 +10961,23 @@ const useEagleTable = (params) => {
10927
10961
  },
10928
10962
  [setCurrentPage, table]
10929
10963
  );
10930
- const onSorterChange = useCallback((order, key2) => {
10931
- var _a2;
10932
- const ORDER_MAP = {
10933
- descend: "desc",
10934
- ascend: "asc"
10935
- };
10936
- const sorters = [{
10937
- field: (_a2 = columns.find((col) => col.key === key2)) == null ? void 0 : _a2.dataIndex,
10938
- order: order ? ORDER_MAP[order] : order
10939
- }];
10940
- table.setSorters(sorters);
10941
- }, [table, columns]);
10964
+ const onSorterChange = useCallback(
10965
+ (order, key2) => {
10966
+ var _a2;
10967
+ const ORDER_MAP = {
10968
+ descend: "desc",
10969
+ ascend: "asc"
10970
+ };
10971
+ const sorters = [
10972
+ {
10973
+ field: (_a2 = columns.find((col) => col.key === key2)) == null ? void 0 : _a2.dataIndex,
10974
+ order: order ? ORDER_MAP[order] : order
10975
+ }
10976
+ ];
10977
+ table.setSorters(sorters);
10978
+ },
10979
+ [table, columns]
10980
+ );
10942
10981
  const data2 = (_a = table.tableQueryResult.data) == null ? void 0 : _a.data;
10943
10982
  const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
10944
10983
  const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
@@ -10961,12 +11000,23 @@ const useEagleTable = (params) => {
10961
11000
  defaultSize: currentSize
10962
11001
  };
10963
11002
  useEffect(() => {
10964
- table.setSorters([{
10965
- field: "metadata.creationTimestamp",
10966
- order: "desc"
10967
- }]);
11003
+ table.setSorters([
11004
+ {
11005
+ field: "metadata.creationTimestamp",
11006
+ order: "desc"
11007
+ }
11008
+ ]);
10968
11009
  }, []);
10969
- return { tableProps: finalProps, selectedKeys, ...table };
11010
+ return {
11011
+ tableProps: finalProps,
11012
+ selectedKeys,
11013
+ ...table,
11014
+ setCurrent: (current) => {
11015
+ var _a2;
11016
+ setCurrentPage(current);
11017
+ (_a2 = table.setCurrent) == null ? void 0 : _a2.call(table, current);
11018
+ }
11019
+ };
10970
11020
  };
10971
11021
  function CreateButton(props) {
10972
11022
  var _a;
@@ -12141,7 +12191,7 @@ function PVVolumeModeDisplay(props) {
12141
12191
  }
12142
12192
  function Table(props) {
12143
12193
  var _a;
12144
- const { tableProps, displayName, errorContentProps } = props;
12194
+ const { tableProps, displayName, errorContentProps, isSearching } = props;
12145
12195
  const { Table: TableComponent } = useContext(ComponentContext);
12146
12196
  const Table2 = TableComponent || Table$1;
12147
12197
  const { params } = useParsed();
@@ -12149,7 +12199,7 @@ function Table(props) {
12149
12199
  const resourceType = transformResourceKindInSentence(displayName, i18n2.language);
12150
12200
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12151
12201
  const nameKeyword = (params == null ? void 0 : params[NAME_KEYWORD_PARAM]) || "";
12152
- if (nameKeyword) {
12202
+ if (nameKeyword || isSearching) {
12153
12203
  const onClear = () => {
12154
12204
  var _a2;
12155
12205
  (_a2 = tableProps.onClearSearchKeyword) == null ? void 0 : _a2.call(tableProps);
@@ -13787,7 +13837,7 @@ function Tabs(props) {
13787
13837
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13788
13838
  }) });
13789
13839
  }
13790
- const ShowContentView_1gmp0tu = "";
13840
+ const ShowContentView_196cma3 = "";
13791
13841
  const ShowContentWrapperStyle = "soapvs9";
13792
13842
  const BackButton = "b13d603q";
13793
13843
  const ToolBarWrapper = "tm8eaia";
@@ -13844,7 +13894,6 @@ const ShowContentView = (props) => {
13844
13894
  children,
13845
13895
  Dropdown: Dropdown2 = K8sDropdown,
13846
13896
  hideBackButton = false,
13847
- canCollapseTabs = false,
13848
13897
  className,
13849
13898
  hideTopBar = false,
13850
13899
  size = "medium"
@@ -13966,6 +14015,7 @@ const ShowContentView = (props) => {
13966
14015
  }, group.title);
13967
14016
  }
13968
14017
  const stateDisplay = get$2(record, "stateDisplay");
14018
+ const isPausedDeployment = record.kind === "Deployment" && record.isPaused;
13969
14019
  const topBar = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13970
14020
  className: ToolBarWrapper,
13971
14021
  style: {
@@ -14004,7 +14054,11 @@ const ShowContentView = (props) => {
14004
14054
  }), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
14005
14055
  state: stateDisplay,
14006
14056
  customResourceStateMap: showConfig.resourceStateMap
14007
- }) : void 0]
14057
+ }) : void 0, isPausedDeployment ? /* @__PURE__ */ jsxRuntimeExports.jsx(StatusCapsule, {
14058
+ className: cx_default(StateTagStyle, "c18272tc"),
14059
+ color: "yellow",
14060
+ children: i18n2.t("dovetail.pause_scheduling")
14061
+ }) : null]
14008
14062
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
14009
14063
  children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
14010
14064
  resource: resourceName,
@@ -14055,42 +14109,12 @@ const ShowContentView = (props) => {
14055
14109
  direction: "vertical",
14056
14110
  className: ShowContentHeaderStyle,
14057
14111
  children: topBar
14058
- }), basicInfo, canCollapseTabs ? /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseTabs, {
14059
- children: tabs
14060
- }) : tabs, children]
14061
- });
14062
- };
14063
- const CollapseTabs = (props) => {
14064
- const [isCollapsed, setIsCollapsed] = useState(true);
14065
- const {
14066
- t: t2
14067
- } = useTranslation();
14068
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
14069
- children: [isCollapsed ? null : props.children, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
14070
- style: {
14071
- display: "flex"
14072
- },
14073
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
14074
- style: {
14075
- margin: "8px auto",
14076
- cursor: "pointer"
14077
- },
14078
- size: "small",
14079
- type: "link",
14080
- onClick: () => setIsCollapsed((v) => !v),
14081
- suffixIcon: isCollapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14082
- src: ArrowChevronDownSmall16BlueIcon
14083
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14084
- src: ArrowChevronUpSmall16BlueIcon
14085
- }),
14086
- children: isCollapsed ? t2("dovetail.view_all_info") : t2("dovetail.collapse")
14087
- })
14088
- })]
14112
+ }), basicInfo, tabs, children]
14089
14113
  });
14090
14114
  };
14091
14115
  const ShowContent = (props) => {
14092
14116
  var _a;
14093
- const { showConfig, formatter, Dropdown: Dropdown2 = K8sDropdown, children, canCollapseTabs } = props;
14117
+ const { showConfig, formatter, Dropdown: Dropdown2 = K8sDropdown, children } = props;
14094
14118
  const parsed = useParsed();
14095
14119
  const { resource } = useResource();
14096
14120
  const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
@@ -14102,7 +14126,6 @@ const ShowContent = (props) => {
14102
14126
  showConfig,
14103
14127
  formatter,
14104
14128
  Dropdown: Dropdown2,
14105
- canCollapseTabs,
14106
14129
  children
14107
14130
  }
14108
14131
  );
@@ -14550,7 +14573,9 @@ function ListPage(props) {
14550
14573
  selectedKeys,
14551
14574
  tableProps,
14552
14575
  contentClassName,
14553
- belowToolBarContent
14576
+ belowToolBarContent,
14577
+ customNamespaceFilter,
14578
+ isSearching
14554
14579
  } = props;
14555
14580
  const {
14556
14581
  resource
@@ -14578,7 +14603,7 @@ function ListPage(props) {
14578
14603
  style: config.hideNamespacesFilter ? {
14579
14604
  paddingTop: 0
14580
14605
  } : {},
14581
- children: [!config.hideNamespacesFilter ? config.customNamespaceFilter || /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
14606
+ children: [!config.hideNamespacesFilter ? customNamespaceFilter || config.customNamespaceFilter || /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
14582
14607
  className: NamespaceFilterStyle
14583
14608
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
14584
14609
  className: TableStyle,
@@ -14589,7 +14614,8 @@ function ListPage(props) {
14589
14614
  y: "calc(100% - 48px)"
14590
14615
  }
14591
14616
  },
14592
- displayName: (config == null ? void 0 : config.displayName) || config.kind
14617
+ displayName: (config == null ? void 0 : config.displayName) || config.kind,
14618
+ isSearching
14593
14619
  })
14594
14620
  })]
14595
14621
  })]
@@ -14733,14 +14759,14 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14733
14759
  const {
14734
14760
  t: t2
14735
14761
  } = useTranslation();
14736
- const [collapse2, setCollapse] = useState(defaultCollapse);
14762
+ const [collapse, setCollapse] = useState(defaultCollapse);
14737
14763
  useImperativeHandle(ref, () => ({
14738
14764
  setCollapse
14739
14765
  }), [setCollapse]);
14740
14766
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
14741
14767
  className: cx_default(className),
14742
14768
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
14743
- className: cx_default(TitleWrapperStyle$1, collapse2 && CollapsedTitleStyle),
14769
+ className: cx_default(TitleWrapperStyle$1, collapse && CollapsedTitleStyle),
14744
14770
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
14745
14771
  className: Typo.Label.l4_bold_title,
14746
14772
  children: title
@@ -14748,18 +14774,18 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14748
14774
  type: "link",
14749
14775
  size: "small",
14750
14776
  className: cx_default(ButtonStyle),
14751
- onClick: () => setCollapse(!collapse2),
14752
- children: [collapse2 ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14777
+ onClick: () => setCollapse(!collapse),
14778
+ children: [collapse ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14753
14779
  style: {
14754
14780
  marginLeft: 4
14755
14781
  },
14756
- src: collapse2 ? ArrowChevronDown16BlueIcon : ArrowChevronUp16BlueIcon
14782
+ src: collapse ? ArrowChevronDown16BlueIcon : ArrowChevronUp16BlueIcon
14757
14783
  })]
14758
14784
  }) : null]
14759
14785
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
14760
14786
  className: cx_default(contentClassName),
14761
14787
  style: {
14762
- display: collapse2 ? "none" : "block"
14788
+ display: collapse ? "none" : "block"
14763
14789
  },
14764
14790
  children
14765
14791
  })]
@@ -18970,13 +18996,25 @@ const IngressRulesComponent = ({ ingress }) => {
18970
18996
  });
18971
18997
  const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [];
18972
18998
  const result = flattenedRules.map((r2) => {
18973
- const divider = " > ";
18999
+ var _a, _b;
19000
+ const arrow = " → ";
19001
+ const divider = " | ";
19002
+ const secretName = (_b = (_a = ingress.spec.tls) == null ? void 0 : _a.find(
19003
+ ({ hosts }) => hosts == null ? void 0 : hosts.includes(r2.host || "")
19004
+ )) == null ? void 0 : _b.secretName;
19005
+ let tooltip = r2.fullPath;
19006
+ if (r2.serviceName) {
19007
+ tooltip += `${arrow}${r2.serviceName}:${r2.servicePort}`;
19008
+ }
19009
+ if (secretName) {
19010
+ tooltip += `${divider}${secretName}`;
19011
+ }
18974
19012
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18975
19013
  OverflowTooltip,
18976
19014
  {
18977
19015
  content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18978
19016
  /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
18979
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: divider }),
19017
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: arrow }),
18980
19018
  r2.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18981
19019
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18982
19020
  ResourceLink,
@@ -18990,9 +19028,20 @@ const IngressRulesComponent = ({ ingress }) => {
18990
19028
  ":",
18991
19029
  r2.servicePort
18992
19030
  ] })
18993
- ] }) : r2.resourceName
19031
+ ] }) : r2.resourceName,
19032
+ secretName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
19033
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: divider }),
19034
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
19035
+ ResourceLink,
19036
+ {
19037
+ resourceName: "secrets",
19038
+ namespace: ingress.metadata.namespace || "default",
19039
+ name: secretName
19040
+ }
19041
+ )
19042
+ ] }) : void 0
18994
19043
  ] }),
18995
- tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
19044
+ tooltip
18996
19045
  },
18997
19046
  r2.fullPath
18998
19047
  );
@@ -19099,10 +19148,26 @@ const StateDisplayColumnRenderer = (i18n2) => {
19099
19148
  sortable: true,
19100
19149
  width: 120,
19101
19150
  sorter: CommonSorter(dataIndex),
19102
- render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
19103
- state: v,
19104
- hideBackground: true
19105
- })
19151
+ render: (v, record) => {
19152
+ if (record.kind === "Deployment" && record.isPaused) {
19153
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
19154
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
19155
+ state: v,
19156
+ hideBackground: true
19157
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, {
19158
+ color: "yellow",
19159
+ style: {
19160
+ marginLeft: "4px"
19161
+ },
19162
+ children: i18n2.t("dovetail.pause_scheduling")
19163
+ })]
19164
+ });
19165
+ }
19166
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
19167
+ state: v,
19168
+ hideBackground: true
19169
+ });
19170
+ }
19106
19171
  };
19107
19172
  };
19108
19173
  const WorkloadImageColumnRenderer = (i18n2) => {
package/dist/style.css CHANGED
@@ -3637,6 +3637,10 @@
3637
3637
  .c1lh8loq.ant-row {
3638
3638
  row-gap: 4px;
3639
3639
  margin-right: 0 !important;
3640
+ }
3641
+
3642
+ .c18272tc {
3643
+ margin-left: 8px;
3640
3644
  }/* // basic */
3641
3645
  /* FishEye Color Variables and Functions */
3642
3646
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.3.17-alpha.1",
3
+ "version": "0.3.18-alpha.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",