@dovetail-v2/refine 0.4.3 → 0.4.4

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.
Files changed (33) hide show
  1. package/dist/{PodShell-43c7028e.cjs → PodShell-a335b2b2.cjs} +4 -2
  2. package/dist/{PodShell-76331418.js → PodShell-a6ed3498.js} +4 -2
  3. package/dist/components/CopyButton/index.d.ts +7 -0
  4. package/dist/components/FormWidgets/NameInputWidget.d.ts +0 -48
  5. package/dist/components/ServiceComponents/index.d.ts +10 -0
  6. package/dist/components/Shell/ShellToolbar.d.ts +1 -1
  7. package/dist/components/ShowContent/fields.d.ts +4 -0
  8. package/dist/components/index.d.ts +2 -3
  9. package/dist/contexts/component.d.ts +14 -5
  10. package/dist/contexts/index.d.ts +1 -0
  11. package/dist/hooks/useDeleteModal/index.d.ts +1 -0
  12. package/dist/hooks/useEagleTable/columns.d.ts +5 -4
  13. package/dist/hooks/useSubmitForm.d.ts +1 -1
  14. package/dist/hooks/useTableData.d.ts +1 -1
  15. package/dist/i18n.d.ts +25 -0
  16. package/dist/{index-31874f77.cjs → index-053ee180.cjs} +1 -1
  17. package/dist/{index-ab97826a.js → index-d7bc2ee6.js} +1 -1
  18. package/dist/index.d.ts +0 -1
  19. package/dist/locales/en-US/index.d.ts +12 -0
  20. package/dist/locales/zh-CN/index.d.ts +13 -0
  21. package/dist/models/daemonset-model.d.ts +0 -3
  22. package/dist/models/statefulset-model.d.ts +0 -3
  23. package/dist/models/workload-base-model.d.ts +3 -0
  24. package/dist/models/workload-model.d.ts +3 -0
  25. package/dist/pages/deployments/form/index.d.ts +2 -1
  26. package/dist/plugins/model-plugin.d.ts +1 -1
  27. package/dist/refine.cjs +1220 -1083
  28. package/dist/refine.js +1223 -1086
  29. package/dist/shell.cjs +1 -1
  30. package/dist/shell.js +1 -1
  31. package/dist/style.css +133 -4
  32. package/dist/types/resource.d.ts +9 -9
  33. package/package.json +17 -6
package/dist/shell.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-31874f77.cjs");
3
+ const index = require("./index-053ee180.cjs");
4
4
  const common = require("./common-1eb43414.cjs");
5
5
  require("@cloudtower/eagle");
6
6
  require("@xterm/addon-canvas");
package/dist/shell.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S } from "./index-ab97826a.js";
1
+ import { S } from "./index-d7bc2ee6.js";
2
2
  import { S as S2 } from "./common-241b21f8.js";
3
3
  import "@cloudtower/eagle";
4
4
  import "@xterm/addon-canvas";
package/dist/style.css CHANGED
@@ -960,6 +960,56 @@
960
960
  /* box shadow */
961
961
  /* fisheye */
962
962
  /* z-index */
963
+ .c1oll6q9 {
964
+ cursor: pointer;
965
+ margin: 1px 0;
966
+ }/* // basic */
967
+ /* FishEye Color Variables and Functions */
968
+ /*
969
+ --------------------------- Primary Color ---------------------------
970
+ */
971
+ /*
972
+ ---------------------------When necessary to add at any time---------------------------
973
+ */
974
+ /* computed */
975
+ /* blue */
976
+ /* green */
977
+ /* yellow */
978
+ /* red */
979
+ /* purple */
980
+ /* palette global token*/
981
+ /* color opaque */
982
+ /* color transparent */
983
+ /* blue transparent */
984
+ /* green transparent */
985
+ /* yellow transparent */
986
+ /* red transparent */
987
+ /* gray transparent */
988
+ /* white transparent */
989
+ /* gradient opaque */
990
+ /* blue radial gradient */
991
+ /* blue linear gradient */
992
+ /* green radial gradient */
993
+ /* yellow radial gradient */
994
+ /* red radial gradient */
995
+ /* gray radial gradient */
996
+ /* white to gray radial gradient */
997
+ /* white to gray linear gradient */
998
+ /* gradient transparent */
999
+ /* secondary palette */
1000
+ /* purple radial gradient */
1001
+ /* refine alias color */
1002
+ /* text */
1003
+ /* link */
1004
+ /* fill */
1005
+ /* fill element */
1006
+ /* fill interaction */
1007
+ /* stroke */
1008
+ /* background */
1009
+ /* dim */
1010
+ /* box shadow */
1011
+ /* fisheye */
1012
+ /* z-index */
963
1013
  .b1vtjd4k.ant-btn.ant-btn-link {
964
1014
  display: block;
965
1015
  }
@@ -984,6 +1034,13 @@
984
1034
  height: 18px;
985
1035
  line-height: 18px;
986
1036
  border-bottom: 1px dashed rgba(107, 128, 167, 0.6);
1037
+ }
1038
+
1039
+ .azmggeh {
1040
+ display: inline-flex;
1041
+ align-items: center;
1042
+ gap: 4px;
1043
+ vertical-align: top;
987
1044
  }/* // basic */
988
1045
  /* FishEye Color Variables and Functions */
989
1046
  /*
@@ -1041,14 +1098,14 @@
1041
1098
  .t12ikbmp.ant-tag {
1042
1099
  overflow: hidden;
1043
1100
  text-overflow: ellipsis;
1044
- color: #1D326C;
1101
+ color: #1d326c;
1045
1102
  }
1046
1103
  .t12ikbmp.ant-tag.outside-tag {
1047
- border: 1px solid #A3B4CC;
1048
- background-color: #E4E9F2;
1104
+ border: 1px solid #a3b4cc;
1105
+ background-color: #e4e9f2;
1049
1106
  }
1050
1107
  .t12ikbmp.ant-tag .inside-tag {
1051
- background-color: #CCD4E3;
1108
+ background-color: #ccd4e3;
1052
1109
  }/* // basic */
1053
1110
  /* FishEye Color Variables and Functions */
1054
1111
  /*
@@ -1766,6 +1823,78 @@
1766
1823
  /* box shadow */
1767
1824
  /* fisheye */
1768
1825
  /* z-index */
1826
+ .pmi0ggi {
1827
+ display: flex;
1828
+ align-items: center;
1829
+ width: 100%;
1830
+ min-width: 0;
1831
+ }
1832
+
1833
+ .p1gmjxeo {
1834
+ flex: 1 1 auto;
1835
+ min-width: 0;
1836
+ overflow: hidden;
1837
+ text-overflow: ellipsis;
1838
+ white-space: nowrap;
1839
+ }
1840
+ .p1gmjxeo > * {
1841
+ display: block;
1842
+ max-width: 100%;
1843
+ overflow: hidden;
1844
+ text-overflow: ellipsis;
1845
+ white-space: nowrap;
1846
+ }
1847
+
1848
+ .p1379cb5 {
1849
+ flex: 0 0 16px;
1850
+ margin-left: auto;
1851
+ }/* // basic */
1852
+ /* FishEye Color Variables and Functions */
1853
+ /*
1854
+ --------------------------- Primary Color ---------------------------
1855
+ */
1856
+ /*
1857
+ ---------------------------When necessary to add at any time---------------------------
1858
+ */
1859
+ /* computed */
1860
+ /* blue */
1861
+ /* green */
1862
+ /* yellow */
1863
+ /* red */
1864
+ /* purple */
1865
+ /* palette global token*/
1866
+ /* color opaque */
1867
+ /* color transparent */
1868
+ /* blue transparent */
1869
+ /* green transparent */
1870
+ /* yellow transparent */
1871
+ /* red transparent */
1872
+ /* gray transparent */
1873
+ /* white transparent */
1874
+ /* gradient opaque */
1875
+ /* blue radial gradient */
1876
+ /* blue linear gradient */
1877
+ /* green radial gradient */
1878
+ /* yellow radial gradient */
1879
+ /* red radial gradient */
1880
+ /* gray radial gradient */
1881
+ /* white to gray radial gradient */
1882
+ /* white to gray linear gradient */
1883
+ /* gradient transparent */
1884
+ /* secondary palette */
1885
+ /* purple radial gradient */
1886
+ /* refine alias color */
1887
+ /* text */
1888
+ /* link */
1889
+ /* fill */
1890
+ /* fill element */
1891
+ /* fill interaction */
1892
+ /* stroke */
1893
+ /* background */
1894
+ /* dim */
1895
+ /* box shadow */
1896
+ /* fisheye */
1897
+ /* z-index */
1769
1898
  .c8jy7dc {
1770
1899
  display: flex;
1771
1900
  padding: 8px 10px;
@@ -55,10 +55,10 @@ export type RefineFormConfig<Model extends ResourceModel = ResourceModel> = {
55
55
  text?: string;
56
56
  };
57
57
  /**
58
- * 表单字段配置函数
59
- * @param props 包含记录和动作类型的配置对象
60
- * @returns 表单字段配置数组
61
- */
58
+ * 表单字段配置函数
59
+ * @param props 包含记录和动作类型的配置对象
60
+ * @returns 表单字段配置数组
61
+ */
62
62
  fields?: (props: {
63
63
  record?: Model;
64
64
  records: Model[];
@@ -78,9 +78,9 @@ export type RefineFormConfig<Model extends ResourceModel = ResourceModel> = {
78
78
  */
79
79
  labelWidth?: string;
80
80
  /**
81
- * 自定义表单渲染函数
82
- * @returns React节点
83
- */
81
+ * 自定义表单渲染函数
82
+ * @returns React节点
83
+ */
84
84
  renderForm?: () => React.ReactNode;
85
85
  };
86
86
  export type YamlFormConfig = {
@@ -129,7 +129,7 @@ export type CommonFormConfig<Model extends ResourceModel = ResourceModel> = {
129
129
  beforeSubmit?: (values: Record<string, unknown>, setErrors: (errors: string[]) => void) => Promise<Model['_rawYaml']>;
130
130
  /** 表单容器类型:页面形式或模态框形式
131
131
  * PAGE 或者 MODAL
132
- */
132
+ */
133
133
  formContainerType?: FormContainerType;
134
134
  /**
135
135
  * 表单标题,可以是字符串或根据操作类型返回不同标题的函数
@@ -189,7 +189,7 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
189
189
  basePath: string;
190
190
  /** Kubernetes API 版本,会影响请求 URL
191
191
  * 实际效果为:{apiUrl}{basePath}{apiVersion}{name}
192
- */
192
+ */
193
193
  apiVersion: string;
194
194
  /** 资源使用的 DataProvider 的名称 */
195
195
  dataProviderName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -9,6 +9,20 @@
9
9
  "main": "./dist/refine.cjs",
10
10
  "module": "./dist/refine.js",
11
11
  "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/refine.js",
15
+ "require": "./dist/refine.cjs",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./shell": {
19
+ "import": "./dist/shell.js",
20
+ "require": "./dist/shell.cjs",
21
+ "types": "./dist/shell.d.ts"
22
+ },
23
+ "./dist/*": "./dist/*",
24
+ "./package.json": "./package.json"
25
+ },
12
26
  "dependencies": {
13
27
  "@cloudtower/eagle": "^490.0.1",
14
28
  "@cloudtower/icons-react": "^490.0.1",
@@ -55,7 +69,6 @@
55
69
  "@linaria/react": "^4.5.4",
56
70
  "@linaria/utils": "^4.5.3",
57
71
  "@linaria/vite": "^4.5.4",
58
- "@playwright/test": "^1.39.0",
59
72
  "@refinedev/cli": "^2.9.0",
60
73
  "@rollup/pluginutils": "^4.2.1",
61
74
  "@tanstack/react-query": "^4.35.3",
@@ -82,10 +95,9 @@
82
95
  "eslint-plugin-react-refresh": "^0.3.4",
83
96
  "jest": "^29",
84
97
  "json-schema": "^0.4.0",
85
- "jest-environment-jsdom": "^30.0.0",
98
+ "jest-environment-jsdom": "^29.0.0",
86
99
  "kubernetes-types": "^1.26.0",
87
100
  "lodash": "^4.17.21",
88
- "prettier": "2.8.8",
89
101
  "sass": "1.51.0",
90
102
  "ts-jest": "^29",
91
103
  "vite": "^4.5.2",
@@ -109,8 +121,7 @@
109
121
  "preview": "refine start",
110
122
  "refine": "refine",
111
123
  "unit-test": "jest",
112
- "playwright-test": "npx playwright test --workers 1",
113
- "test": "pnpm unit-test && pnpm playwright-test",
124
+ "test": "pnpm unit-test",
114
125
  "lint": "eslint src --ext .ts,.tsx"
115
126
  },
116
127
  "browserslist": {