@dovetail-v2/refine 0.1.14-alpha.4 → 0.1.14

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 (228) hide show
  1. package/dist/{MonacoYamlDiffEditor-2636b66c.js → MonacoYamlDiffEditor-fdc5faf9.js} +1 -1
  2. package/dist/{index-45c3dd0a.js → index-0a0a8e71.js} +51 -36
  3. package/dist/refine.js +1 -1
  4. package/dist/refine.umd.cjs +50 -35
  5. package/lib/components/EditMetadataForm/KeyValueTableForm.d.ts +1 -0
  6. package/lib/components/EditMetadataForm/LabelFormatPopover.d.ts +3 -1
  7. package/lib/utils/string.d.ts +1 -0
  8. package/package.json +1 -1
  9. package/lib/components/CronJobDropdown/index.d.ts +0 -9
  10. package/lib/components/K8sDropdown/index.d.ts +0 -9
  11. package/lib/components/PodDropdown/index.d.ts +0 -9
  12. package/lib/components/ReplicasDropdown/index.d.ts +0 -9
  13. package/lib/components/Table/TableToolBar.d.ts +0 -9
  14. package/lib/components/Table/TableWidgets.d.ts +0 -6
  15. package/lib/components/WorkloadDropdown/index.d.ts +0 -9
  16. package/lib/src/App.d.ts +0 -3
  17. package/lib/src/Dovetail.d.ts +0 -18
  18. package/lib/src/components/Breadcrumb/index.d.ts +0 -6
  19. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +0 -7
  20. package/lib/src/components/ConditionsTable/index.d.ts +0 -1
  21. package/lib/src/components/CreateButton/index.d.ts +0 -2
  22. package/lib/src/components/CronJobDropdown/index.d.ts +0 -9
  23. package/lib/src/components/CronjobJobsTable/index.d.ts +0 -8
  24. package/lib/src/components/DeleteButton/index.d.ts +0 -2
  25. package/lib/src/components/DeleteManyButton/index.d.ts +0 -4
  26. package/lib/src/components/DrawerShow/DrawerShow.d.ts +0 -9
  27. package/lib/src/components/DrawerShow/index.d.ts +0 -1
  28. package/lib/src/components/DurationTime/index.d.ts +0 -6
  29. package/lib/src/components/EditButton/index.d.ts +0 -2
  30. package/lib/src/components/EditField/index.d.ts +0 -15
  31. package/lib/src/components/ErrorContent/index.d.ts +0 -17
  32. package/lib/src/components/EventsTable/EventsTable.d.ts +0 -6
  33. package/lib/src/components/EventsTable/index.d.ts +0 -1
  34. package/lib/src/components/Form/FormModal.d.ts +0 -9
  35. package/lib/src/components/Form/RefineFormContent.d.ts +0 -12
  36. package/lib/src/components/Form/RefineFormPage.d.ts +0 -7
  37. package/lib/src/components/Form/YamlForm.d.ts +0 -29
  38. package/lib/src/components/Form/index.d.ts +0 -7
  39. package/lib/src/components/Form/type.d.ts +0 -17
  40. package/lib/src/components/Form/useFieldsConfig.d.ts +0 -4
  41. package/lib/src/components/Form/useReactHookForm.d.ts +0 -30
  42. package/lib/src/components/Form/useRefineForm.d.ts +0 -13
  43. package/lib/src/components/Form/useYamlForm.d.ts +0 -50
  44. package/lib/src/components/FormErrorAlert/index.d.ts +0 -9
  45. package/lib/src/components/FormLayout/index.d.ts +0 -7
  46. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +0 -6
  47. package/lib/src/components/FormWidgets/MetadataForm.d.ts +0 -2
  48. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +0 -51
  49. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +0 -9
  50. package/lib/src/components/FormWidgets/index.d.ts +0 -4
  51. package/lib/src/components/FormWidgets/widget.d.ts +0 -5
  52. package/lib/src/components/ImageNames/index.d.ts +0 -5
  53. package/lib/src/components/IngressRulesComponent/index.d.ts +0 -5
  54. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +0 -7
  55. package/lib/src/components/IngressRulesTable/index.d.ts +0 -1
  56. package/lib/src/components/K8sDropdown/index.d.ts +0 -9
  57. package/lib/src/components/KeyValue/KeyValue.d.ts +0 -7
  58. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +0 -6
  59. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +0 -5
  60. package/lib/src/components/KeyValue/index.d.ts +0 -3
  61. package/lib/src/components/Layout/index.d.ts +0 -3
  62. package/lib/src/components/LinkFallback/index.d.ts +0 -4
  63. package/lib/src/components/ListPage/index.d.ts +0 -10
  64. package/lib/src/components/Menu/index.d.ts +0 -2
  65. package/lib/src/components/NamespacesFilter/index.d.ts +0 -11
  66. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -8
  67. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +0 -1
  68. package/lib/src/components/PVCDistributeStorage/index.d.ts +0 -16
  69. package/lib/src/components/PageShow/PageShow.d.ts +0 -12
  70. package/lib/src/components/PageShow/index.d.ts +0 -1
  71. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +0 -8
  72. package/lib/src/components/PodContainersTable/index.d.ts +0 -1
  73. package/lib/src/components/PodDropdown/index.d.ts +0 -9
  74. package/lib/src/components/PodLog/index.d.ts +0 -6
  75. package/lib/src/components/PodSelectorTable/index.d.ts +0 -6
  76. package/lib/src/components/PodShellModal/PodShell.d.ts +0 -18
  77. package/lib/src/components/PodShellModal/index.d.ts +0 -10
  78. package/lib/src/components/PortsTable/index.d.ts +0 -7
  79. package/lib/src/components/ReferenceLink/index.d.ts +0 -8
  80. package/lib/src/components/ReplicasDropdown/index.d.ts +0 -9
  81. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +0 -8
  82. package/lib/src/components/ResourceCRUD/create/index.d.ts +0 -8
  83. package/lib/src/components/ResourceCRUD/index.d.ts +0 -4
  84. package/lib/src/components/ResourceCRUD/list/index.d.ts +0 -9
  85. package/lib/src/components/ResourceCRUD/show/index.d.ts +0 -9
  86. package/lib/src/components/ResourceFiledDisplays.d.ts +0 -7
  87. package/lib/src/components/ResourceLink/index.d.ts +0 -8
  88. package/lib/src/components/ResourceSelect/index.d.ts +0 -12
  89. package/lib/src/components/ResourceTable/index.d.ts +0 -9
  90. package/lib/src/components/ResourceUsageBar/index.d.ts +0 -8
  91. package/lib/src/components/Separator/index.d.ts +0 -2
  92. package/lib/src/components/ServiceComponents/index.d.ts +0 -10
  93. package/lib/src/components/Shell/ShellToolbar.d.ts +0 -16
  94. package/lib/src/components/Shell/index.d.ts +0 -74
  95. package/lib/src/components/ShowContent/ShowContent.d.ts +0 -18
  96. package/lib/src/components/ShowContent/fields.d.ts +0 -76
  97. package/lib/src/components/ShowContent/groups.d.ts +0 -24
  98. package/lib/src/components/ShowContent/index.d.ts +0 -4
  99. package/lib/src/components/ShowContent/tabs.d.ts +0 -5
  100. package/lib/src/components/StateTag/StateTag.d.ts +0 -10
  101. package/lib/src/components/StateTag/index.d.ts +0 -1
  102. package/lib/src/components/Table/TableToolBar.d.ts +0 -8
  103. package/lib/src/components/Table/TableWidgets.d.ts +0 -6
  104. package/lib/src/components/Table/index.d.ts +0 -43
  105. package/lib/src/components/Tabs/index.d.ts +0 -10
  106. package/lib/src/components/Tags/index.d.ts +0 -6
  107. package/lib/src/components/TextTags/index.d.ts +0 -6
  108. package/lib/src/components/Time/index.d.ts +0 -8
  109. package/lib/src/components/ValueDisplay/index.d.ts +0 -9
  110. package/lib/src/components/WorkloadDropdown/index.d.ts +0 -9
  111. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -9
  112. package/lib/src/components/WorkloadPodsTable/index.d.ts +0 -1
  113. package/lib/src/components/WorkloadReplicas/index.d.ts +0 -17
  114. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -9
  115. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +0 -19
  116. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +0 -27
  117. package/lib/src/components/YamlEditor/index.d.ts +0 -1
  118. package/lib/src/components/YamlEditor/style.d.ts +0 -11
  119. package/lib/src/components/YamlEditor/yaml.worker.d.ts +0 -1
  120. package/lib/src/components/index.d.ts +0 -49
  121. package/lib/src/constants/auth.d.ts +0 -5
  122. package/lib/src/constants/index.d.ts +0 -3
  123. package/lib/src/constants/k8s.d.ts +0 -522
  124. package/lib/src/constants/state.d.ts +0 -15
  125. package/lib/src/contexts/component.d.ts +0 -8
  126. package/lib/src/contexts/configs.d.ts +0 -4
  127. package/lib/src/contexts/global-store.d.ts +0 -6
  128. package/lib/src/contexts/index.d.ts +0 -3
  129. package/lib/src/hooks/index.d.ts +0 -8
  130. package/lib/src/hooks/useDeleteModal/index.d.ts +0 -1
  131. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +0 -8
  132. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +0 -7
  133. package/lib/src/hooks/useDownloadYAML.d.ts +0 -7
  134. package/lib/src/hooks/useEagleTable/columns.d.ts +0 -47
  135. package/lib/src/hooks/useEagleTable/index.d.ts +0 -2
  136. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +0 -56
  137. package/lib/src/hooks/useEdit.d.ts +0 -4
  138. package/lib/src/hooks/useGlobalStore.d.ts +0 -3
  139. package/lib/src/hooks/useK8sYamlEditor.d.ts +0 -5
  140. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +0 -5
  141. package/lib/src/hooks/useOpenForm.d.ts +0 -8
  142. package/lib/src/hooks/useSchema.d.ts +0 -21
  143. package/lib/src/hooks/useSubmitForm.d.ts +0 -14
  144. package/lib/src/hooks/useTableData.d.ts +0 -20
  145. package/lib/src/i18n.d.ts +0 -371
  146. package/lib/src/index.d.ts +0 -12
  147. package/lib/src/locales/en-US/index.d.ts +0 -175
  148. package/lib/src/locales/index.d.ts +0 -2
  149. package/lib/src/locales/zh-CN/index.d.ts +0 -193
  150. package/lib/src/main.d.ts +0 -3
  151. package/lib/src/models/cronjob-model.d.ts +0 -15
  152. package/lib/src/models/daemonset-model.d.ts +0 -15
  153. package/lib/src/models/deployment-model.d.ts +0 -13
  154. package/lib/src/models/event-model.d.ts +0 -7
  155. package/lib/src/models/index.d.ts +0 -19
  156. package/lib/src/models/ingress-model.d.ts +0 -20
  157. package/lib/src/models/job-model.d.ts +0 -20
  158. package/lib/src/models/network-policy-model.d.ts +0 -9
  159. package/lib/src/models/node-model.d.ts +0 -17
  160. package/lib/src/models/persistent-volume-claim.d.ts +0 -13
  161. package/lib/src/models/persistent-volume.d.ts +0 -13
  162. package/lib/src/models/pod-metrics-model.d.ts +0 -8
  163. package/lib/src/models/pod-model.d.ts +0 -20
  164. package/lib/src/models/resource-model.d.ts +0 -21
  165. package/lib/src/models/service-model.d.ts +0 -24
  166. package/lib/src/models/statefulset-model.d.ts +0 -13
  167. package/lib/src/models/storage-class.d.ts +0 -16
  168. package/lib/src/models/types/index.d.ts +0 -1
  169. package/lib/src/models/types/metric.d.ts +0 -25
  170. package/lib/src/models/workload-base-model.d.ts +0 -12
  171. package/lib/src/models/workload-model.d.ts +0 -18
  172. package/lib/src/pages/configmaps/index.d.ts +0 -4
  173. package/lib/src/pages/cronjobs/create/index.d.ts +0 -3
  174. package/lib/src/pages/cronjobs/index.d.ts +0 -3
  175. package/lib/src/pages/cronjobs/list/index.d.ts +0 -3
  176. package/lib/src/pages/cronjobs/show/index.d.ts +0 -3
  177. package/lib/src/pages/daemonsets/create/index.d.ts +0 -3
  178. package/lib/src/pages/daemonsets/index.d.ts +0 -3
  179. package/lib/src/pages/daemonsets/list/index.d.ts +0 -3
  180. package/lib/src/pages/daemonsets/show/index.d.ts +0 -3
  181. package/lib/src/pages/deployments/index.d.ts +0 -2
  182. package/lib/src/pages/deployments/list/index.d.ts +0 -3
  183. package/lib/src/pages/deployments/show/index.d.ts +0 -3
  184. package/lib/src/pages/ingresses/index.d.ts +0 -4
  185. package/lib/src/pages/jobs/index.d.ts +0 -4
  186. package/lib/src/pages/networkPolicies/index.d.ts +0 -4
  187. package/lib/src/pages/nodes/index.d.ts +0 -2
  188. package/lib/src/pages/nodes/list/index.d.ts +0 -3
  189. package/lib/src/pages/nodes/show/index.d.ts +0 -3
  190. package/lib/src/pages/persistentvolumeclaims/index.d.ts +0 -4
  191. package/lib/src/pages/persistentvolumes/index.d.ts +0 -4
  192. package/lib/src/pages/pods/create/index.d.ts +0 -3
  193. package/lib/src/pages/pods/index.d.ts +0 -3
  194. package/lib/src/pages/pods/list/index.d.ts +0 -3
  195. package/lib/src/pages/pods/show/index.d.ts +0 -3
  196. package/lib/src/pages/secrets/index.d.ts +0 -4
  197. package/lib/src/pages/services/index.d.ts +0 -4
  198. package/lib/src/pages/statefulsets/index.d.ts +0 -4
  199. package/lib/src/pages/storageclasses/form/index.d.ts +0 -9
  200. package/lib/src/pages/storageclasses/index.d.ts +0 -48
  201. package/lib/src/plugins/index.d.ts +0 -4
  202. package/lib/src/plugins/model-plugin.d.ts +0 -13
  203. package/lib/src/plugins/relation-plugin.d.ts +0 -26
  204. package/lib/src/plugins/type.d.ts +0 -8
  205. package/lib/src/providers/index.d.ts +0 -1
  206. package/lib/src/providers/router-provider/index.d.ts +0 -21
  207. package/lib/src/styles/button.d.ts +0 -1
  208. package/lib/src/styles/modal.d.ts +0 -1
  209. package/lib/src/types/index.d.ts +0 -1
  210. package/lib/src/types/resource.d.ts +0 -62
  211. package/lib/src/utils/addId.d.ts +0 -3
  212. package/lib/src/utils/download.d.ts +0 -1
  213. package/lib/src/utils/error.d.ts +0 -20
  214. package/lib/src/utils/form.d.ts +0 -3
  215. package/lib/src/utils/index.d.ts +0 -1
  216. package/lib/src/utils/k8s.d.ts +0 -3
  217. package/lib/src/utils/labels.d.ts +0 -9
  218. package/lib/src/utils/match-selector.d.ts +0 -3
  219. package/lib/src/utils/openapi.d.ts +0 -40
  220. package/lib/src/utils/schema.d.ts +0 -18
  221. package/lib/src/utils/selector.d.ts +0 -3
  222. package/lib/src/utils/shell.d.ts +0 -16
  223. package/lib/src/utils/storage.d.ts +0 -13
  224. package/lib/src/utils/string.d.ts +0 -1
  225. package/lib/src/utils/time.d.ts +0 -13
  226. package/lib/src/utils/unit.d.ts +0 -12
  227. package/lib/src/utils/yaml.d.ts +0 -2
  228. package/lib/vite.config.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "./index-45c3dd0a.js";
1
+ import { j as jsxRuntimeExports } from "./index-0a0a8e71.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "i18next";
@@ -1472,7 +1472,7 @@ const password = "密码";
1472
1472
  const username = "用户名";
1473
1473
  const host = "主机";
1474
1474
  const container_num = "容器数量";
1475
- const edit_resource_success = "编辑{{resource}} {{name}} 成功";
1475
+ const edit_resource_success = "编辑{{kind}} {{name}} 成功";
1476
1476
  const redeploy_success_toast = "重新部署 {{kind}} {{name}} 成功";
1477
1477
  const redeploy_failed_toast = "重新部署 {{kind}} {{name}} 失败";
1478
1478
  const pause_success_toast = "暂停成功";
@@ -8375,6 +8375,9 @@ function shortenedImage(image2) {
8375
8375
  function isFirstLetterEnglish(str) {
8376
8376
  return /^[a-zA-Z]/.test(str);
8377
8377
  }
8378
+ function addSpaceBeforeLetter(str) {
8379
+ return isFirstLetterEnglish(str) ? ` ${str}` : str;
8380
+ }
8378
8381
  const useDeleteModal_mi8he5 = "";
8379
8382
  const TextStyle = "t1vq0ett";
8380
8383
  const TipStyle = "t139onst";
@@ -8393,7 +8396,7 @@ const useDeleteModal = (resource) => {
8393
8396
  t: t2
8394
8397
  } = useTranslation();
8395
8398
  const displayName = config.displayName || config.kind;
8396
- const resourceDisplayName = isFirstLetterEnglish(displayName) ? ` ${displayName}` : displayName;
8399
+ const resourceDisplayName = addSpaceBeforeLetter(displayName);
8397
8400
  const modalProps = {
8398
8401
  className: SmallModalStyle,
8399
8402
  title: t2("dovetail.delete_resource", {
@@ -11408,7 +11411,7 @@ function CreateButton(props) {
11408
11411
  type: "primary",
11409
11412
  onClick: openForm,
11410
11413
  children: t2("dovetail.create_resource", {
11411
- resource: isFirstLetterEnglish(label2) ? ` ${label2}` : label2
11414
+ resource: addSpaceBeforeLetter(label2)
11412
11415
  })
11413
11416
  }
11414
11417
  );
@@ -12181,8 +12184,7 @@ function KeyValueSecret(props) {
12181
12184
  });
12182
12185
  }
12183
12186
  function validateLabelKey(key2) {
12184
- const labelPrefixRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.]*[a-zA-Z0-9]$)/;
12185
- const labelNameRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
12187
+ const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
12186
12188
  let prefix, name2;
12187
12189
  const splitResult = key2.split("/");
12188
12190
  if (splitResult.length === 1) {
@@ -12194,10 +12196,10 @@ function validateLabelKey(key2) {
12194
12196
  if (prefix === "") {
12195
12197
  return { isValid: false, errorMessage: "EMPTY_PREFIX" };
12196
12198
  }
12197
- if (prefix && !labelPrefixRegex.test(prefix)) {
12199
+ if (prefix && !labelRegex.test(prefix)) {
12198
12200
  return { isValid: false, errorMessage: "INVALID_PREFIX" };
12199
12201
  }
12200
- if (!labelNameRegex.test(name2)) {
12202
+ if (!labelRegex.test(name2)) {
12201
12203
  return { isValid: false, errorMessage: "INVALID_NAME" };
12202
12204
  }
12203
12205
  if (prefix && prefix.length > 253) {
@@ -12209,7 +12211,7 @@ function validateLabelKey(key2) {
12209
12211
  return { isValid: true };
12210
12212
  }
12211
12213
  function validateLabelValue(value2) {
12212
- const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
12214
+ const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
12213
12215
  if (value2 === "") {
12214
12216
  return { isValid: true };
12215
12217
  }
@@ -12223,31 +12225,37 @@ function validateLabelValue(value2) {
12223
12225
  }
12224
12226
  const LabelFormatPopover_105yfzn = "";
12225
12227
  const PodLabelFormatRulePopoverStyle = "p5jt6nm";
12226
- const LabelFormatPopover = () => {
12228
+ const LabelFormatPopover = ({
12229
+ noValueValidation
12230
+ }) => {
12227
12231
  const {
12228
12232
  t: t2
12229
12233
  } = useTranslation();
12234
+ const data2 = [{
12235
+ object: t2("dovetail.key"),
12236
+ contains: t2("dovetail.suffix"),
12237
+ optional: t2("dovetail.no"),
12238
+ rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
12239
+ }, {
12240
+ object: t2("dovetail.key"),
12241
+ contains: t2("dovetail.name"),
12242
+ optional: t2("dovetail.yes"),
12243
+ rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12244
+ }];
12245
+ if (!noValueValidation) {
12246
+ data2.push({
12247
+ object: t2("dovetail.value"),
12248
+ contains: t2("dovetail.name"),
12249
+ optional: t2("dovetail.no"),
12250
+ rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12251
+ });
12252
+ }
12230
12253
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, {
12231
12254
  overlayClassName: PodLabelFormatRulePopoverStyle,
12232
12255
  placement: "bottomRight",
12233
12256
  content: /* @__PURE__ */ jsxRuntimeExports.jsx(AntdTable, {
12234
12257
  bordered: true,
12235
- dataSource: [{
12236
- object: t2("dovetail.key"),
12237
- contains: t2("dovetail.suffix"),
12238
- optional: t2("dovetail.no"),
12239
- rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
12240
- }, {
12241
- object: t2("dovetail.key"),
12242
- contains: t2("dovetail.name"),
12243
- optional: t2("dovetail.yes"),
12244
- rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12245
- }, {
12246
- object: t2("dovetail.value"),
12247
- contains: t2("dovetail.name"),
12248
- optional: t2("dovetail.no"),
12249
- rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12250
- }],
12258
+ dataSource: data2,
12251
12259
  columns: [{
12252
12260
  key: "object",
12253
12261
  title: t2("dovetail.object"),
@@ -12299,7 +12307,8 @@ function _KeyValueTableFormForm(props, ref) {
12299
12307
  defaultValue,
12300
12308
  onSubmit,
12301
12309
  extraColumns,
12302
- addButtonText
12310
+ addButtonText,
12311
+ noValueValidation
12303
12312
  } = props;
12304
12313
  const {
12305
12314
  t: t2
@@ -12369,6 +12378,8 @@ function _KeyValueTableFormForm(props, ref) {
12369
12378
  validator: ({
12370
12379
  value: value22
12371
12380
  }) => {
12381
+ if (noValueValidation)
12382
+ return;
12372
12383
  const {
12373
12384
  isValid
12374
12385
  } = validateLabelValue(value22 || "");
@@ -12387,7 +12398,9 @@ function _KeyValueTableFormForm(props, ref) {
12387
12398
  row: {
12388
12399
  deletable: true
12389
12400
  }
12390
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {})]
12401
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
12402
+ noValueValidation
12403
+ })]
12391
12404
  });
12392
12405
  }
12393
12406
  const KeyValueTableFormForm = React__default.forwardRef(_KeyValueTableFormForm);
@@ -12640,7 +12653,7 @@ function Table(props) {
12640
12653
  const { Table: TableComponent } = useContext(ComponentContext);
12641
12654
  const Table2 = TableComponent || Table$1;
12642
12655
  const { i18n: i18n2 } = useTranslation();
12643
- const resourceType = isFirstLetterEnglish(displayName) ? ` ${displayName}` : displayName;
12656
+ const resourceType = addSpaceBeforeLetter(displayName);
12644
12657
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12645
12658
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
12646
12659
  WidgetErrorContent,
@@ -12737,6 +12750,9 @@ const WorkloadPodsTable = ({
12737
12750
  }
12738
12751
  }
12739
12752
  });
12753
+ if (tableProps.loading) {
12754
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
12755
+ }
12740
12756
  if (((_a = tableProps.data) == null ? void 0 : _a.length) === 0) {
12741
12757
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
12742
12758
  errorText: i18n2.t("dovetail.no_resource", {
@@ -33154,7 +33170,7 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
33154
33170
  });
33155
33171
  }
33156
33172
  }, [encode, send, props.fit]);
33157
- const debouncedFit = useCallback(() => debounce(fit, 200), [fit]);
33173
+ const debouncedFit = useMemo(() => debounce(fit, 200), [fit]);
33158
33174
  const flush = useCallback(() => {
33159
33175
  const backlog = backlogRef.current.slice();
33160
33176
  backlogRef.current = [];
@@ -38340,14 +38356,12 @@ const useRefineForm = (props) => {
38340
38356
  errorNotification: false,
38341
38357
  successNotification: () => {
38342
38358
  const formValue = result.getValues();
38343
- const resource = config.displayName || config.kind;
38344
38359
  return {
38345
38360
  message: i18n2.t(
38346
38361
  id ? "dovetail.edit_resource_success" : "dovetail.create_success_toast",
38347
38362
  {
38348
- kind: formValue.kind,
38363
+ kind: addSpaceBeforeLetter(config.displayName || config.kind),
38349
38364
  name: formValue.metadata.name,
38350
- resource: isFirstLetterEnglish(resource) ? ` ${resource}` : resource,
38351
38365
  interpolation: { escapeValue: false }
38352
38366
  }
38353
38367
  ).trim(),
@@ -38386,7 +38400,7 @@ const Separator = () => {
38386
38400
  });
38387
38401
  };
38388
38402
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
38389
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-2636b66c.js"));
38403
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-fdc5faf9.js"));
38390
38404
  const YamlEditorComponent = forwardRef(
38391
38405
  function YamlEditorComponent2(props, ref) {
38392
38406
  const {
@@ -39028,7 +39042,7 @@ function YamlForm(props) {
39028
39042
  const displayName = config.displayName || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
39029
39043
  return {
39030
39044
  message: i18n2.t(action === "create" ? "dovetail.create_success_toast" : "dovetail.save_yaml_success_toast", {
39031
- kind: isFirstLetterEnglish(displayName) ? ` ${displayName}` : displayName,
39045
+ kind: addSpaceBeforeLetter(displayName),
39032
39046
  name: data2 == null ? void 0 : data2.data.id,
39033
39047
  interpolation: {
39034
39048
  escapeValue: false
@@ -39270,7 +39284,7 @@ function FormModal(props) {
39270
39284
  }
39271
39285
  const label2 = config.displayName || (config == null ? void 0 : config.kind);
39272
39286
  return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
39273
- resource: isFirstLetterEnglish(label2) ? ` ${label2}` : label2
39287
+ resource: addSpaceBeforeLetter(label2)
39274
39288
  });
39275
39289
  }, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
39276
39290
  const desc = useMemo(() => {
@@ -39595,7 +39609,8 @@ const EditAnnotationForm = React__default.forwardRef(function EditAnnotationForm
39595
39609
  ref,
39596
39610
  defaultValue,
39597
39611
  onSubmit,
39598
- addButtonText: t2("dovetail.add_annotation")
39612
+ addButtonText: t2("dovetail.add_annotation"),
39613
+ noValueValidation: true
39599
39614
  }
39600
39615
  );
39601
39616
  });
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-45c3dd0a.js";
1
+ import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-0a0a8e71.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "react";
@@ -1478,7 +1478,7 @@ var __publicField = (obj, key, value) => {
1478
1478
  const username = "用户名";
1479
1479
  const host = "主机";
1480
1480
  const container_num = "容器数量";
1481
- const edit_resource_success = "编辑{{resource}} {{name}} 成功";
1481
+ const edit_resource_success = "编辑{{kind}} {{name}} 成功";
1482
1482
  const redeploy_success_toast = "重新部署 {{kind}} {{name}} 成功";
1483
1483
  const redeploy_failed_toast = "重新部署 {{kind}} {{name}} 失败";
1484
1484
  const pause_success_toast = "暂停成功";
@@ -8381,6 +8381,9 @@ var __publicField = (obj, key, value) => {
8381
8381
  function isFirstLetterEnglish(str) {
8382
8382
  return /^[a-zA-Z]/.test(str);
8383
8383
  }
8384
+ function addSpaceBeforeLetter(str) {
8385
+ return isFirstLetterEnglish(str) ? ` ${str}` : str;
8386
+ }
8384
8387
  const useDeleteModal_mi8he5 = "";
8385
8388
  const TextStyle = "t1vq0ett";
8386
8389
  const TipStyle = "t139onst";
@@ -8399,7 +8402,7 @@ var __publicField = (obj, key, value) => {
8399
8402
  t: t2
8400
8403
  } = useTranslation();
8401
8404
  const displayName = config.displayName || config.kind;
8402
- const resourceDisplayName = isFirstLetterEnglish(displayName) ? ` ${displayName}` : displayName;
8405
+ const resourceDisplayName = addSpaceBeforeLetter(displayName);
8403
8406
  const modalProps = {
8404
8407
  className: SmallModalStyle,
8405
8408
  title: t2("dovetail.delete_resource", {
@@ -11414,7 +11417,7 @@ var __publicField = (obj, key, value) => {
11414
11417
  type: "primary",
11415
11418
  onClick: openForm,
11416
11419
  children: t2("dovetail.create_resource", {
11417
- resource: isFirstLetterEnglish(label2) ? ` ${label2}` : label2
11420
+ resource: addSpaceBeforeLetter(label2)
11418
11421
  })
11419
11422
  }
11420
11423
  );
@@ -12187,8 +12190,7 @@ var __publicField = (obj, key, value) => {
12187
12190
  });
12188
12191
  }
12189
12192
  function validateLabelKey(key2) {
12190
- const labelPrefixRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.]*[a-zA-Z0-9]$)/;
12191
- const labelNameRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
12193
+ const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
12192
12194
  let prefix, name2;
12193
12195
  const splitResult = key2.split("/");
12194
12196
  if (splitResult.length === 1) {
@@ -12200,10 +12202,10 @@ var __publicField = (obj, key, value) => {
12200
12202
  if (prefix === "") {
12201
12203
  return { isValid: false, errorMessage: "EMPTY_PREFIX" };
12202
12204
  }
12203
- if (prefix && !labelPrefixRegex.test(prefix)) {
12205
+ if (prefix && !labelRegex.test(prefix)) {
12204
12206
  return { isValid: false, errorMessage: "INVALID_PREFIX" };
12205
12207
  }
12206
- if (!labelNameRegex.test(name2)) {
12208
+ if (!labelRegex.test(name2)) {
12207
12209
  return { isValid: false, errorMessage: "INVALID_NAME" };
12208
12210
  }
12209
12211
  if (prefix && prefix.length > 253) {
@@ -12215,7 +12217,7 @@ var __publicField = (obj, key, value) => {
12215
12217
  return { isValid: true };
12216
12218
  }
12217
12219
  function validateLabelValue(value2) {
12218
- const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
12220
+ const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
12219
12221
  if (value2 === "") {
12220
12222
  return { isValid: true };
12221
12223
  }
@@ -12229,31 +12231,37 @@ var __publicField = (obj, key, value) => {
12229
12231
  }
12230
12232
  const LabelFormatPopover_105yfzn = "";
12231
12233
  const PodLabelFormatRulePopoverStyle = "p5jt6nm";
12232
- const LabelFormatPopover = () => {
12234
+ const LabelFormatPopover = ({
12235
+ noValueValidation
12236
+ }) => {
12233
12237
  const {
12234
12238
  t: t2
12235
12239
  } = useTranslation();
12240
+ const data2 = [{
12241
+ object: t2("dovetail.key"),
12242
+ contains: t2("dovetail.suffix"),
12243
+ optional: t2("dovetail.no"),
12244
+ rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
12245
+ }, {
12246
+ object: t2("dovetail.key"),
12247
+ contains: t2("dovetail.name"),
12248
+ optional: t2("dovetail.yes"),
12249
+ rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12250
+ }];
12251
+ if (!noValueValidation) {
12252
+ data2.push({
12253
+ object: t2("dovetail.value"),
12254
+ contains: t2("dovetail.name"),
12255
+ optional: t2("dovetail.no"),
12256
+ rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12257
+ });
12258
+ }
12236
12259
  return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Popover, {
12237
12260
  overlayClassName: PodLabelFormatRulePopoverStyle,
12238
12261
  placement: "bottomRight",
12239
12262
  content: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdTable, {
12240
12263
  bordered: true,
12241
- dataSource: [{
12242
- object: t2("dovetail.key"),
12243
- contains: t2("dovetail.suffix"),
12244
- optional: t2("dovetail.no"),
12245
- rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
12246
- }, {
12247
- object: t2("dovetail.key"),
12248
- contains: t2("dovetail.name"),
12249
- optional: t2("dovetail.yes"),
12250
- rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12251
- }, {
12252
- object: t2("dovetail.value"),
12253
- contains: t2("dovetail.name"),
12254
- optional: t2("dovetail.no"),
12255
- rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
12256
- }],
12264
+ dataSource: data2,
12257
12265
  columns: [{
12258
12266
  key: "object",
12259
12267
  title: t2("dovetail.object"),
@@ -12305,7 +12313,8 @@ var __publicField = (obj, key, value) => {
12305
12313
  defaultValue,
12306
12314
  onSubmit,
12307
12315
  extraColumns,
12308
- addButtonText
12316
+ addButtonText,
12317
+ noValueValidation
12309
12318
  } = props;
12310
12319
  const {
12311
12320
  t: t2
@@ -12375,6 +12384,8 @@ var __publicField = (obj, key, value) => {
12375
12384
  validator: ({
12376
12385
  value: value22
12377
12386
  }) => {
12387
+ if (noValueValidation)
12388
+ return;
12378
12389
  const {
12379
12390
  isValid
12380
12391
  } = validateLabelValue(value22 || "");
@@ -12393,7 +12404,9 @@ var __publicField = (obj, key, value) => {
12393
12404
  row: {
12394
12405
  deletable: true
12395
12406
  }
12396
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {})]
12407
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
12408
+ noValueValidation
12409
+ })]
12397
12410
  });
12398
12411
  }
12399
12412
  const KeyValueTableFormForm = React.forwardRef(_KeyValueTableFormForm);
@@ -12646,7 +12659,7 @@ var __publicField = (obj, key, value) => {
12646
12659
  const { Table: TableComponent } = React.useContext(ComponentContext);
12647
12660
  const Table2 = TableComponent || Table$1;
12648
12661
  const { i18n: i18n2 } = useTranslation();
12649
- const resourceType = isFirstLetterEnglish(displayName) ? ` ${displayName}` : displayName;
12662
+ const resourceType = addSpaceBeforeLetter(displayName);
12650
12663
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12651
12664
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
12652
12665
  WidgetErrorContent,
@@ -12743,6 +12756,9 @@ var __publicField = (obj, key, value) => {
12743
12756
  }
12744
12757
  }
12745
12758
  });
12759
+ if (tableProps.loading) {
12760
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {});
12761
+ }
12746
12762
  if (((_a = tableProps.data) == null ? void 0 : _a.length) === 0) {
12747
12763
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
12748
12764
  errorText: i18n2.t("dovetail.no_resource", {
@@ -33160,7 +33176,7 @@ WARNING: This link could potentially be dangerous`)) {
33160
33176
  });
33161
33177
  }
33162
33178
  }, [encode, send, props.fit]);
33163
- const debouncedFit = React.useCallback(() => lodashEs.debounce(fit, 200), [fit]);
33179
+ const debouncedFit = React.useMemo(() => lodashEs.debounce(fit, 200), [fit]);
33164
33180
  const flush = React.useCallback(() => {
33165
33181
  const backlog = backlogRef.current.slice();
33166
33182
  backlogRef.current = [];
@@ -38346,14 +38362,12 @@ WARNING: This link could potentially be dangerous`)) {
38346
38362
  errorNotification: false,
38347
38363
  successNotification: () => {
38348
38364
  const formValue = result.getValues();
38349
- const resource = config.displayName || config.kind;
38350
38365
  return {
38351
38366
  message: i18n2.t(
38352
38367
  id ? "dovetail.edit_resource_success" : "dovetail.create_success_toast",
38353
38368
  {
38354
- kind: formValue.kind,
38369
+ kind: addSpaceBeforeLetter(config.displayName || config.kind),
38355
38370
  name: formValue.metadata.name,
38356
- resource: isFirstLetterEnglish(resource) ? ` ${resource}` : resource,
38357
38371
  interpolation: { escapeValue: false }
38358
38372
  }
38359
38373
  ).trim(),
@@ -39034,7 +39048,7 @@ WARNING: This link could potentially be dangerous`)) {
39034
39048
  const displayName = config.displayName || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
39035
39049
  return {
39036
39050
  message: i18n2.t(action === "create" ? "dovetail.create_success_toast" : "dovetail.save_yaml_success_toast", {
39037
- kind: isFirstLetterEnglish(displayName) ? ` ${displayName}` : displayName,
39051
+ kind: addSpaceBeforeLetter(displayName),
39038
39052
  name: data2 == null ? void 0 : data2.data.id,
39039
39053
  interpolation: {
39040
39054
  escapeValue: false
@@ -39276,7 +39290,7 @@ WARNING: This link could potentially be dangerous`)) {
39276
39290
  }
39277
39291
  const label2 = config.displayName || (config == null ? void 0 : config.kind);
39278
39292
  return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
39279
- resource: isFirstLetterEnglish(label2) ? ` ${label2}` : label2
39293
+ resource: addSpaceBeforeLetter(label2)
39280
39294
  });
39281
39295
  }, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
39282
39296
  const desc = React.useMemo(() => {
@@ -39601,7 +39615,8 @@ WARNING: This link could potentially be dangerous`)) {
39601
39615
  ref,
39602
39616
  defaultValue,
39603
39617
  onSubmit,
39604
- addButtonText: t2("dovetail.add_annotation")
39618
+ addButtonText: t2("dovetail.add_annotation"),
39619
+ noValueValidation: true
39605
39620
  }
39606
39621
  );
39607
39622
  });
@@ -10,6 +10,7 @@ interface KeyValueTableFormFormProps<T extends KeyValuePair> {
10
10
  onSubmit: (value: T[]) => Promise<unknown> | undefined;
11
11
  extraColumns?: TableFormColumn[];
12
12
  addButtonText?: string;
13
+ noValueValidation?: boolean;
13
14
  }
14
15
  export declare const KeyValueTableFormForm: React.ForwardRefExoticComponent<KeyValueTableFormFormProps<KeyValuePair> & React.RefAttributes<EditFieldFormHandler>>;
15
16
  export {};
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const PodLabelFormatRulePopoverStyle: import("@linaria/core").LinariaClassName;
3
- export declare const LabelFormatPopover: React.FC;
3
+ export declare const LabelFormatPopover: React.FC<{
4
+ noValueValidation?: boolean;
5
+ }>;
@@ -1,2 +1,3 @@
1
1
  export declare function shortenedImage(image: string): string;
2
2
  export declare function isFirstLetterEnglish(str: string): boolean;
3
+ export declare function addSpaceBeforeLetter(str: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.1.14-alpha.4",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { CronJobModel } from '../../models';
3
- import { DropdownSize } from '../K8sDropdown';
4
- type Props<Model extends CronJobModel> = {
5
- record: Model;
6
- size?: DropdownSize;
7
- };
8
- export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { ResourceModel } from '../../models';
3
- export type DropdownSize = 'normal' | 'large';
4
- interface K8sDropdownProps {
5
- record: ResourceModel;
6
- size?: DropdownSize;
7
- }
8
- export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
9
- export default K8sDropdown;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { PodModel } from '../../models';
3
- import { DropdownSize } from '../K8sDropdown';
4
- type Props<Model extends PodModel> = {
5
- record: Model;
6
- size?: DropdownSize;
7
- };
8
- export declare function PodDropdown<Model extends PodModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { WorkloadModel } from '../../models';
3
- import { DropdownSize } from '../K8sDropdown';
4
- type Props<Model extends WorkloadModel> = {
5
- record: Model;
6
- size?: DropdownSize;
7
- };
8
- export declare function ReplicasDropdown<Model extends WorkloadModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- type Props = {
3
- title?: string;
4
- description?: string;
5
- selectedKeys: string[];
6
- hideCreate?: boolean;
7
- };
8
- export declare const TableToolBar: React.FC<Props>;
9
- export {};
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export declare const ColumnTitle: React.FC<{
3
- sortOrder?: 'descend' | 'ascend' | null;
4
- title: React.ReactNode;
5
- }>;
6
- export declare const AuxiliaryLine: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { WorkloadModel } from '../../models';
3
- import { DropdownSize } from '../K8sDropdown';
4
- type Props<Model extends WorkloadModel> = {
5
- record: Model;
6
- size?: DropdownSize;
7
- };
8
- export declare function WorkloadDropdown<Model extends WorkloadModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
9
- export {};
package/lib/src/App.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function App(): JSX.Element;
3
- export default App;
@@ -1,18 +0,0 @@
1
- import { AccessControlProvider } from '@refinedev/core';
2
- import { History } from 'history';
3
- import { GlobalStore } from 'k8s-api-provider';
4
- import React from 'react';
5
- import { ResourceConfig } from './types';
6
- import './styles.css';
7
- type Props = {
8
- resourcesConfig: ResourceConfig[];
9
- useHashUrl?: boolean;
10
- urlPrefix?: string;
11
- Layout?: React.FC<unknown>;
12
- history: History;
13
- globalStore: GlobalStore;
14
- accessControlProvider?: AccessControlProvider;
15
- routerProvider?: any;
16
- };
17
- export declare const Dovetail: React.FC<Props>;
18
- export {};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface BreadcrumbProps {
3
- className?: string;
4
- }
5
- export declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
6
- export {};
@@ -1,7 +0,0 @@
1
- import { Condition } from 'kubernetes-types/meta/v1';
2
- import React from 'react';
3
- type Props = {
4
- conditions: Condition[];
5
- };
6
- export declare const ConditionsTable: React.FC<Props>;
7
- export {};
@@ -1 +0,0 @@
1
- export * from './ConditionsTable';
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function CreateButton(): JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { CronJobModel } from '../../models';
3
- import { DropdownSize } from '../K8sDropdown';
4
- type Props<Model extends CronJobModel> = {
5
- record: Model;
6
- size?: DropdownSize;
7
- };
8
- export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
9
- export {};
@@ -1,8 +0,0 @@
1
- import { OwnerReference } from 'kubernetes-types/meta/v1';
2
- import React from 'react';
3
- export declare const CronjobJobsTable: React.FC<{
4
- owner?: OwnerReference & {
5
- namespace: string;
6
- };
7
- hideToolBar?: boolean;
8
- }>;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const DeleteButton: React.FC;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const DeleteManyButton: React.FC<{
3
- ids: string[];
4
- }>;