hc-busin-components 1.0.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.
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/Actions/index.d.ts +20 -0
- package/dist/Actions/index.js +142 -0
- package/dist/Actions/index.less +9 -0
- package/dist/AuthComponents/authDivider.d.ts +15 -0
- package/dist/AuthComponents/authDivider.js +104 -0
- package/dist/AuthComponents/index.d.ts +4 -0
- package/dist/AuthComponents/index.js +14 -0
- package/dist/BasicFilesRead/images/back.png +0 -0
- package/dist/BasicFilesRead/images/excel.png +0 -0
- package/dist/BasicFilesRead/images/folder.png +0 -0
- package/dist/BasicFilesRead/images/image.png +0 -0
- package/dist/BasicFilesRead/images/jpeg.png +0 -0
- package/dist/BasicFilesRead/images/jpg.png +0 -0
- package/dist/BasicFilesRead/images/normal.png +0 -0
- package/dist/BasicFilesRead/images/png.png +0 -0
- package/dist/BasicFilesRead/images/tar.png +0 -0
- package/dist/BasicFilesRead/images/text.png +0 -0
- package/dist/BasicFilesRead/images/zip.png +0 -0
- package/dist/BasicFilesRead/index.d.ts +31 -0
- package/dist/BasicFilesRead/index.js +286 -0
- package/dist/BasicFilesRead/styles/index.d.ts +3 -0
- package/dist/BasicFilesRead/styles/index.js +9 -0
- package/dist/CombinTable/components/RenderContent.d.ts +9 -0
- package/dist/CombinTable/components/RenderContent.js +201 -0
- package/dist/CombinTable/hooks/useTableParams.d.ts +20 -0
- package/dist/CombinTable/hooks/useTableParams.js +75 -0
- package/dist/CombinTable/hooks/useTableState.d.ts +5 -0
- package/dist/CombinTable/hooks/useTableState.js +22 -0
- package/dist/CombinTable/index.d.ts +4 -0
- package/dist/CombinTable/index.js +225 -0
- package/dist/CombinTable/styles/index.d.ts +3 -0
- package/dist/CombinTable/styles/index.js +11 -0
- package/dist/CombinTable/types/index.d.ts +21 -0
- package/dist/CombinTable/types/index.js +1 -0
- package/dist/CombineSearch/components/Content.d.ts +13 -0
- package/dist/CombineSearch/components/Content.js +249 -0
- package/dist/CombineSearch/components/Tags.d.ts +14 -0
- package/dist/CombineSearch/components/Tags.js +115 -0
- package/dist/CombineSearch/hooks/useCombineState.d.ts +5 -0
- package/dist/CombineSearch/hooks/useCombineState.js +17 -0
- package/dist/CombineSearch/index.d.ts +4 -0
- package/dist/CombineSearch/index.js +168 -0
- package/dist/CombineSearch/style/edit.svg +1 -0
- package/dist/CombineSearch/style/index.d.ts +14 -0
- package/dist/CombineSearch/style/index.js +26 -0
- package/dist/CombineSearch/types/index.d.ts +46 -0
- package/dist/CombineSearch/types/index.js +0 -0
- package/dist/ComponentUninstalled/assets/comp-unintall-background.png +0 -0
- package/dist/ComponentUninstalled/assets/comp-unintall-bg.png +0 -0
- package/dist/ComponentUninstalled/index.d.ts +32 -0
- package/dist/ComponentUninstalled/index.js +164 -0
- package/dist/ComponentUninstalled/index.less +108 -0
- package/dist/ComponentUninstalled/locale.d.ts +14 -0
- package/dist/ComponentUninstalled/locale.js +21 -0
- package/dist/DataCountPopover/index.d.ts +23 -0
- package/dist/DataCountPopover/index.js +121 -0
- package/dist/DataCountPopover/index.less +62 -0
- package/dist/DateRangePicker/index.d.ts +38 -0
- package/dist/DateRangePicker/index.js +483 -0
- package/dist/DateRangePicker/index.less +196 -0
- package/dist/DeleteConfirm/index.d.ts +23 -0
- package/dist/DeleteConfirm/index.js +109 -0
- package/dist/DeleteConfirm/index.less +44 -0
- package/dist/DeleteConfirm/locale.d.ts +7 -0
- package/dist/DeleteConfirm/locale.js +7 -0
- package/dist/DisplayButton/index.d.ts +7 -0
- package/dist/DisplayButton/index.js +23 -0
- package/dist/FileRead/images/back.png +0 -0
- package/dist/FileRead/images/excel.png +0 -0
- package/dist/FileRead/images/folder.png +0 -0
- package/dist/FileRead/images/image.png +0 -0
- package/dist/FileRead/images/jpeg.png +0 -0
- package/dist/FileRead/images/jpg.png +0 -0
- package/dist/FileRead/images/normal.png +0 -0
- package/dist/FileRead/images/png.png +0 -0
- package/dist/FileRead/images/tar.png +0 -0
- package/dist/FileRead/images/text.png +0 -0
- package/dist/FileRead/images/zip.png +0 -0
- package/dist/FileRead/index.d.ts +31 -0
- package/dist/FileRead/index.js +417 -0
- package/dist/FileRead/styles/index.d.ts +3 -0
- package/dist/FileRead/styles/index.js +9 -0
- package/dist/Icon/iconfont.d.ts +1 -0
- package/dist/Icon/iconfont.js +1 -0
- package/dist/Icon/index.d.ts +10 -0
- package/dist/Icon/index.js +20 -0
- package/dist/Icon/index.less +11 -0
- package/dist/IconPopTips/index.d.ts +10 -0
- package/dist/IconPopTips/index.js +26 -0
- package/dist/IconPopTips/index.less +33 -0
- package/dist/IconText/index.d.ts +15 -0
- package/dist/IconText/index.js +19 -0
- package/dist/IconText/index.less +38 -0
- package/dist/LogCenter/assets/empty.png +0 -0
- package/dist/LogCenter/context.d.ts +24 -0
- package/dist/LogCenter/context.js +66 -0
- package/dist/LogCenter/history-log.d.ts +35 -0
- package/dist/LogCenter/history-log.js +1214 -0
- package/dist/LogCenter/index.d.ts +8 -0
- package/dist/LogCenter/index.js +130 -0
- package/dist/LogCenter/index.less +577 -0
- package/dist/LogCenter/locale.d.ts +3 -0
- package/dist/LogCenter/locale.js +81 -0
- package/dist/LogCenter/realtime-log.d.ts +35 -0
- package/dist/LogCenter/realtime-log.js +641 -0
- package/dist/LogCenter/select-with-all.d.ts +28 -0
- package/dist/LogCenter/select-with-all.js +337 -0
- package/dist/LogCenter/select-with-all.less +81 -0
- package/dist/LogCenter/services.d.ts +27 -0
- package/dist/LogCenter/services.js +93 -0
- package/dist/LogCenter/tools.d.ts +9 -0
- package/dist/LogCenter/tools.js +137 -0
- package/dist/LogCenter/types.d.ts +133 -0
- package/dist/LogCenter/types.js +1 -0
- package/dist/LogicalResourceFilter/index.d.ts +7 -0
- package/dist/LogicalResourceFilter/index.js +426 -0
- package/dist/LogicalResourceFilter/index.less +139 -0
- package/dist/LogicalResourceFilter/locale.d.ts +2 -0
- package/dist/LogicalResourceFilter/locale.js +10 -0
- package/dist/LogicalResourceFilter/types.d.ts +58 -0
- package/dist/LogicalResourceFilter/types.js +1 -0
- package/dist/MetadataCount/index.d.ts +16 -0
- package/dist/MetadataCount/index.js +97 -0
- package/dist/MetadataCount/index.less +40 -0
- package/dist/MetadataForm/index.d.ts +18 -0
- package/dist/MetadataForm/index.js +85 -0
- package/dist/MetadataForm/index.less +108 -0
- package/dist/MetadataForm/label.d.ts +13 -0
- package/dist/MetadataForm/label.js +447 -0
- package/dist/MetadataPopoverList/fetchArray.d.ts +3 -0
- package/dist/MetadataPopoverList/fetchArray.js +74 -0
- package/dist/MetadataPopoverList/index.d.ts +13 -0
- package/dist/MetadataPopoverList/index.js +98 -0
- package/dist/MetadataPopoverList/index.less +74 -0
- package/dist/MetadataTags/index.d.ts +17 -0
- package/dist/MetadataTags/index.js +109 -0
- package/dist/MetadataTags/index.less +26 -0
- package/dist/OverFlow/index.d.ts +4 -0
- package/dist/OverFlow/index.js +66 -0
- package/dist/OverFlow/types/index.d.ts +11 -0
- package/dist/OverFlow/types/index.js +1 -0
- package/dist/PageHeader/index.d.ts +16 -0
- package/dist/PageHeader/index.js +41 -0
- package/dist/PageHeader/index.less +89 -0
- package/dist/ResourceProgress/index.d.ts +6 -0
- package/dist/ResourceProgress/index.js +102 -0
- package/dist/ResourceProgress/index.less +86 -0
- package/dist/ResourceProgress/types/index.d.ts +15 -0
- package/dist/ResourceProgress/types/index.js +1 -0
- package/dist/Terminal/index.d.ts +44 -0
- package/dist/Terminal/index.js +390 -0
- package/dist/Terminal/index.less +39 -0
- package/dist/TextCopy/index.d.ts +21 -0
- package/dist/TextCopy/index.js +38 -0
- package/dist/TextCopy/index.less +51 -0
- package/dist/TextEllipsis/index.d.ts +18 -0
- package/dist/TextEllipsis/index.js +31 -0
- package/dist/TextEllipsis/index.less +3 -0
- package/dist/ThemeForm/index.d.ts +6 -0
- package/dist/ThemeForm/index.js +15 -0
- package/dist/ThemeForm/index.less +15 -0
- package/dist/ThemeSubmit/index.d.ts +16 -0
- package/dist/ThemeSubmit/index.js +60 -0
- package/dist/ThemeSubmit/index.less +30 -0
- package/dist/TooltipSpan/index.d.ts +6 -0
- package/dist/TooltipSpan/index.js +72 -0
- package/dist/UsageCycle/index.d.ts +12 -0
- package/dist/UsageCycle/index.js +71 -0
- package/dist/UsageCycle/index.less +56 -0
- package/dist/Yaml/CodeMirrorWrapper.d.ts +14 -0
- package/dist/Yaml/CodeMirrorWrapper.js +106 -0
- package/dist/Yaml/index.d.ts +6 -0
- package/dist/Yaml/index.js +470 -0
- package/dist/Yaml/index.less +190 -0
- package/dist/Yaml/types.d.ts +38 -0
- package/dist/Yaml/types.js +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +32 -0
- package/dist/metadata/locale.d.ts +52 -0
- package/dist/metadata/locale.js +69 -0
- package/dist/showMore/index.d.ts +6 -0
- package/dist/showMore/index.js +40 -0
- package/package.json +121 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface YamlValidateResult {
|
|
3
|
+
success: boolean;
|
|
4
|
+
errorMsg?: string;
|
|
5
|
+
errorDetail?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface YamlTexts {
|
|
8
|
+
inputYaml?: string;
|
|
9
|
+
copySuccess?: string;
|
|
10
|
+
copyFail?: string;
|
|
11
|
+
save?: string;
|
|
12
|
+
cancel?: string;
|
|
13
|
+
edit?: string;
|
|
14
|
+
validate?: string;
|
|
15
|
+
validatePopTip?: string;
|
|
16
|
+
start?: string;
|
|
17
|
+
tipMessage?: string;
|
|
18
|
+
editYaml?: string;
|
|
19
|
+
formatOk?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface YamlProps {
|
|
22
|
+
height?: number | string;
|
|
23
|
+
title?: string | ReactNode;
|
|
24
|
+
mode?: string;
|
|
25
|
+
edit?: boolean;
|
|
26
|
+
changeModeAfterSave?: boolean;
|
|
27
|
+
content?: string | object | null;
|
|
28
|
+
validateMethod?: () => Promise<YamlValidateResult | null | undefined>;
|
|
29
|
+
validator?: boolean;
|
|
30
|
+
canOperate?: boolean;
|
|
31
|
+
changeImmediately?: boolean;
|
|
32
|
+
texts?: YamlTexts;
|
|
33
|
+
onChange?: (value: string | object, reason: 'change' | 'save' | 'cancel', contentChanged?: boolean) => void;
|
|
34
|
+
onCancel?: (value: string | object) => void;
|
|
35
|
+
onEdit?: (value: string | object) => void;
|
|
36
|
+
onSave?: (value: string | object) => void;
|
|
37
|
+
onValidatorChange?: (ok: boolean, type: 1 | 2, message: string | null | unknown) => void;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export { default as ThemeSubmit } from './ThemeSubmit';
|
|
2
|
+
export { default as FileRead } from './FileRead';
|
|
3
|
+
export { default as CombineSearch } from './CombineSearch';
|
|
4
|
+
export { default as ThemeForm } from './ThemeForm';
|
|
5
|
+
export { default as CombinTable } from './CombinTable';
|
|
6
|
+
export { default as OverFlow } from './OverFlow';
|
|
7
|
+
export { default as UsageCycle } from './UsageCycle';
|
|
8
|
+
export { default as ResourceProgress } from './ResourceProgress';
|
|
9
|
+
export type { ResourceProgressProps } from './ResourceProgress';
|
|
10
|
+
export { default as ShowMore } from './showMore';
|
|
11
|
+
export { default as BasicFilesRead } from './BasicFilesRead';
|
|
12
|
+
export { default as DateRangePicker } from './DateRangePicker';
|
|
13
|
+
export type { DateRangePickerProps, QuickTimeOption, TimeRangeInfo, } from './DateRangePicker';
|
|
14
|
+
export { Actions, LinkButton } from './Actions';
|
|
15
|
+
export type { ActionElementProps, ActionsProps, LinkButtonProps, } from './Actions';
|
|
16
|
+
export { default as TextCopy } from './TextCopy';
|
|
17
|
+
export type { TextCopyProps } from './TextCopy';
|
|
18
|
+
export { default as TextEllipsis } from './TextEllipsis';
|
|
19
|
+
export type { TextEllipsisProps } from './TextEllipsis';
|
|
20
|
+
export { default as Icon } from './Icon';
|
|
21
|
+
export type { IconProps } from './Icon';
|
|
22
|
+
export { default as IconText } from './IconText';
|
|
23
|
+
export type { IconTextProps } from './IconText';
|
|
24
|
+
export { default as LogCenter } from './LogCenter';
|
|
25
|
+
export type { LogCenterProps, LogCenterRequest, LogCenterStorage, LogCenterLocale, } from './LogCenter';
|
|
26
|
+
export { logCenterLocaleZhCN, LOG_CENTER_API, createLogCenterServices } from './LogCenter';
|
|
27
|
+
export { default as Terminal } from './Terminal';
|
|
28
|
+
export type { TerminalProps, TerminalTooltips } from './Terminal';
|
|
29
|
+
export { default as Yaml } from './Yaml';
|
|
30
|
+
export type { YamlProps, YamlTexts, YamlValidateResult } from './Yaml';
|
|
31
|
+
export { default as PageHeader } from './PageHeader';
|
|
32
|
+
export type { PageHeaderProps } from './PageHeader';
|
|
33
|
+
export { default as MetadataForm } from './MetadataForm';
|
|
34
|
+
export type { MetadataFormProps, MetadataFormRef } from './MetadataForm';
|
|
35
|
+
export { default as MetadataTags } from './MetadataTags';
|
|
36
|
+
export type { MetadataTagsProps } from './MetadataTags';
|
|
37
|
+
export { default as MetadataCount } from './MetadataCount';
|
|
38
|
+
export type { MetadataCountProps } from './MetadataCount';
|
|
39
|
+
export { default as DataCountPopover } from './DataCountPopover';
|
|
40
|
+
export type { DataCountPopoverProps, DataCountPopoverType, DataCountPopoverDataInterface, } from './DataCountPopover';
|
|
41
|
+
export { metadataLocaleZhCN } from './metadata/locale';
|
|
42
|
+
export type { MetadataTexts } from './metadata/locale';
|
|
43
|
+
export { default as DeleteConfirm, deleteConfirmLocaleZhCN } from './DeleteConfirm';
|
|
44
|
+
export type { DeleteConfirmProps } from './DeleteConfirm';
|
|
45
|
+
export { default as IconPopTips } from './IconPopTips';
|
|
46
|
+
export type { IconPopTipsProps } from './IconPopTips';
|
|
47
|
+
export { default as ComponentUninstalled, componentUninstalledLocaleZhCN, } from './ComponentUninstalled';
|
|
48
|
+
export type { ComponentUninstalledProps, ComponentUninstalledTexts, ComponentUninstalledMenuData, ComponentUninstalledStorage, GetClusterAddons, } from './ComponentUninstalled';
|
|
49
|
+
export { default as LogicalResourceFilter, logicalResourceLocaleZhCN } from './LogicalResourceFilter';
|
|
50
|
+
export type { LogicalResourceFilterProps, LogicalResourceFilterTexts, LogicalResourceInitParams, LogicalResourceChangeValue, LogicalDatacenterItem, LogicalClusterItem, } from './LogicalResourceFilter';
|
|
51
|
+
import useTableParams from './CombinTable/hooks/useTableParams';
|
|
52
|
+
export { useTableParams };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { default as ThemeSubmit } from "./ThemeSubmit";
|
|
2
|
+
export { default as FileRead } from "./FileRead";
|
|
3
|
+
export { default as CombineSearch } from "./CombineSearch";
|
|
4
|
+
export { default as ThemeForm } from "./ThemeForm";
|
|
5
|
+
export { default as CombinTable } from "./CombinTable";
|
|
6
|
+
export { default as OverFlow } from "./OverFlow";
|
|
7
|
+
export { default as UsageCycle } from "./UsageCycle";
|
|
8
|
+
export { default as ResourceProgress } from "./ResourceProgress";
|
|
9
|
+
export { default as ShowMore } from "./showMore";
|
|
10
|
+
export { default as BasicFilesRead } from "./BasicFilesRead";
|
|
11
|
+
export { default as DateRangePicker } from "./DateRangePicker";
|
|
12
|
+
export { Actions, LinkButton } from "./Actions";
|
|
13
|
+
export { default as TextCopy } from "./TextCopy";
|
|
14
|
+
export { default as TextEllipsis } from "./TextEllipsis";
|
|
15
|
+
export { default as Icon } from "./Icon";
|
|
16
|
+
export { default as IconText } from "./IconText";
|
|
17
|
+
export { default as LogCenter } from "./LogCenter";
|
|
18
|
+
export { logCenterLocaleZhCN, LOG_CENTER_API, createLogCenterServices } from "./LogCenter";
|
|
19
|
+
export { default as Terminal } from "./Terminal";
|
|
20
|
+
export { default as Yaml } from "./Yaml";
|
|
21
|
+
export { default as PageHeader } from "./PageHeader";
|
|
22
|
+
export { default as MetadataForm } from "./MetadataForm";
|
|
23
|
+
export { default as MetadataTags } from "./MetadataTags";
|
|
24
|
+
export { default as MetadataCount } from "./MetadataCount";
|
|
25
|
+
export { default as DataCountPopover } from "./DataCountPopover";
|
|
26
|
+
export { metadataLocaleZhCN } from "./metadata/locale";
|
|
27
|
+
export { default as DeleteConfirm, deleteConfirmLocaleZhCN } from "./DeleteConfirm";
|
|
28
|
+
export { default as IconPopTips } from "./IconPopTips";
|
|
29
|
+
export { default as ComponentUninstalled, componentUninstalledLocaleZhCN } from "./ComponentUninstalled";
|
|
30
|
+
export { default as LogicalResourceFilter, logicalResourceLocaleZhCN } from "./LogicalResourceFilter";
|
|
31
|
+
import useTableParams from "./CombinTable/hooks/useTableParams";
|
|
32
|
+
export { useTableParams };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface MetadataTexts {
|
|
2
|
+
key?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
taint?: string;
|
|
6
|
+
annotation?: string;
|
|
7
|
+
labelKey?: string;
|
|
8
|
+
taintKey?: string;
|
|
9
|
+
annotationKey?: string;
|
|
10
|
+
labelValue?: string;
|
|
11
|
+
taintValue?: string;
|
|
12
|
+
annotationValue?: string;
|
|
13
|
+
taintEffect?: string;
|
|
14
|
+
labelEdit?: string;
|
|
15
|
+
taintEdit?: string;
|
|
16
|
+
annotationEdit?: string;
|
|
17
|
+
taintNoScheduleTips?: string;
|
|
18
|
+
taintPreferNoScheduleTips?: string;
|
|
19
|
+
taintNoExecuteTips?: string;
|
|
20
|
+
characterLen1T36?: string;
|
|
21
|
+
characterLen253L63?: string;
|
|
22
|
+
characterLenL63?: string;
|
|
23
|
+
characterLenL10240?: string;
|
|
24
|
+
labelKeyLower?: string;
|
|
25
|
+
taintKeyLower?: string;
|
|
26
|
+
annotationKeyLower?: string;
|
|
27
|
+
labelValueLower?: string;
|
|
28
|
+
taintValueLower?: string;
|
|
29
|
+
annotationValueLower?: string;
|
|
30
|
+
keyTipsSN1?: (name: string) => string;
|
|
31
|
+
keyTipsSN2?: string;
|
|
32
|
+
keyTipsSN3?: string;
|
|
33
|
+
keyTipsSN4?: string;
|
|
34
|
+
keyTipsSN5?: string;
|
|
35
|
+
keyTipsNameRule?: string;
|
|
36
|
+
keyTipsPrefixRule?: string;
|
|
37
|
+
ruleValidCharacterUL?: string;
|
|
38
|
+
ruleBeginAndEnd?: string;
|
|
39
|
+
ruleValidCharacterL?: string;
|
|
40
|
+
ruleBeginAndEndAndMore?: string;
|
|
41
|
+
enterPL?: (name: string) => string;
|
|
42
|
+
enterFirstPL?: (name: string) => string;
|
|
43
|
+
ruleInvalid?: string;
|
|
44
|
+
keyRepeat?: (name: string) => string;
|
|
45
|
+
taintEffectPL?: string;
|
|
46
|
+
NoSchedule?: string;
|
|
47
|
+
PreferNoSchedule?: string;
|
|
48
|
+
NoExecute?: string;
|
|
49
|
+
add?: (name: string) => string;
|
|
50
|
+
}
|
|
51
|
+
export declare const metadataLocaleZhCN: Required<MetadataTexts>;
|
|
52
|
+
export declare function mergeMetadataTexts(texts?: MetadataTexts): Required<MetadataTexts>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
export var metadataLocaleZhCN = {
|
|
8
|
+
key: '键',
|
|
9
|
+
value: '值',
|
|
10
|
+
label: '标签',
|
|
11
|
+
taint: '污点',
|
|
12
|
+
annotation: '注解',
|
|
13
|
+
labelKey: '标签键',
|
|
14
|
+
taintKey: '污点键',
|
|
15
|
+
annotationKey: '注解键',
|
|
16
|
+
labelValue: '标签值',
|
|
17
|
+
taintValue: '污点值',
|
|
18
|
+
annotationValue: '注解值',
|
|
19
|
+
taintEffect: '污点策略',
|
|
20
|
+
labelEdit: '编辑标签',
|
|
21
|
+
taintEdit: '编辑污点',
|
|
22
|
+
annotationEdit: '编辑注解',
|
|
23
|
+
taintNoScheduleTips: '禁止调度(NoSchedule):阻止新 Pod 调度到本节点,但已运行的 Pod 不受影响',
|
|
24
|
+
taintPreferNoScheduleTips: '尽量避免调度(PreferNoSchedule):优先避免将 Pod 调度到本节点,但若无其他可用节点仍会调度',
|
|
25
|
+
taintNoExecuteTips: '驱逐调度(NoExecute):不仅禁止新 Pod 调度,还会驱逐节点上已存在但未容忍本污点的 Pod',
|
|
26
|
+
characterLen1T36: '长度限制在 1-63 个字符间',
|
|
27
|
+
characterLen253L63: '长度限制在 253 个字符内,每个子域标签长度限制在 63 个字符内',
|
|
28
|
+
characterLenL63: '长度限制在 63 个字符内',
|
|
29
|
+
characterLenL10240: '长度限制在 10240 个字符内',
|
|
30
|
+
labelKeyLower: '标签键',
|
|
31
|
+
taintKeyLower: '污点键',
|
|
32
|
+
annotationKeyLower: '注解键',
|
|
33
|
+
labelValueLower: '标签值',
|
|
34
|
+
taintValueLower: '污点值',
|
|
35
|
+
annotationValueLower: '注解值',
|
|
36
|
+
keyTipsSN1: function keyTipsSN1(name) {
|
|
37
|
+
return "\u6709\u6548\u7684".concat(name, "\u7531");
|
|
38
|
+
},
|
|
39
|
+
keyTipsSN2: '前缀',
|
|
40
|
+
keyTipsSN3: '(可选)和',
|
|
41
|
+
keyTipsSN4: '名称',
|
|
42
|
+
keyTipsSN5: '(必需)构成,两者间用斜杠(/)分隔。',
|
|
43
|
+
keyTipsNameRule: '名称规则限制',
|
|
44
|
+
keyTipsPrefixRule: '前缀规则限制',
|
|
45
|
+
ruleValidCharacterUL: '仅允许使用大小写字母、数字、点(.)、中划线(-)和下划线(_)',
|
|
46
|
+
ruleBeginAndEnd: '必须以大小写字母或数字开头结尾',
|
|
47
|
+
ruleValidCharacterL: '仅允许使用小写字母、数字、点(.)、中划线(-)',
|
|
48
|
+
ruleBeginAndEndAndMore: '必须以小写字母或数字开头结尾,每个子域标签不能以中划线(-)开头或结尾,且不能连续使用点(.)',
|
|
49
|
+
enterPL: function enterPL(name) {
|
|
50
|
+
return "\u8BF7\u8F93\u5165".concat(name);
|
|
51
|
+
},
|
|
52
|
+
enterFirstPL: function enterFirstPL(name) {
|
|
53
|
+
return "\u8BF7\u5148\u8F93\u5165".concat(name);
|
|
54
|
+
},
|
|
55
|
+
ruleInvalid: '不符合输入规则',
|
|
56
|
+
keyRepeat: function keyRepeat(name) {
|
|
57
|
+
return "".concat(name, "\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165");
|
|
58
|
+
},
|
|
59
|
+
taintEffectPL: '请选择污点策略',
|
|
60
|
+
NoSchedule: '禁止调度(NoSchedule)',
|
|
61
|
+
PreferNoSchedule: '尽量避免调度(PreferNoSchedule)',
|
|
62
|
+
NoExecute: '驱逐调度(NoExecute)',
|
|
63
|
+
add: function add(name) {
|
|
64
|
+
return "\u6DFB\u52A0".concat(name);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export function mergeMetadataTexts(texts) {
|
|
68
|
+
return _objectSpread(_objectSpread({}, metadataLocaleZhCN), texts);
|
|
69
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Button, Tooltip } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
var ShowMore = function ShowMore(props) {
|
|
4
|
+
var data = props.data,
|
|
5
|
+
_props$maxCount = props.maxCount,
|
|
6
|
+
maxCount = _props$maxCount === void 0 ? 2 : _props$maxCount;
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", null, data.map(function (item, index) {
|
|
8
|
+
if (index >= maxCount) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
key: index
|
|
13
|
+
}, item);
|
|
14
|
+
}), data.length > maxCount && /*#__PURE__*/React.createElement(Tooltip, {
|
|
15
|
+
color: "white",
|
|
16
|
+
styles: {
|
|
17
|
+
body: {
|
|
18
|
+
width: '50vw',
|
|
19
|
+
color: '#000'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
placement: "top",
|
|
23
|
+
showArrow: false,
|
|
24
|
+
title: data.map(function (item, index) {
|
|
25
|
+
if (index < maxCount) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
key: index
|
|
30
|
+
}, item);
|
|
31
|
+
})
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
33
|
+
type: "link",
|
|
34
|
+
size: "small",
|
|
35
|
+
style: {
|
|
36
|
+
padding: 0
|
|
37
|
+
}
|
|
38
|
+
}, "\u67E5\u770B\u66F4\u591A")));
|
|
39
|
+
};
|
|
40
|
+
export default ShowMore;
|
package/package.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hc-busin-components",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "npm run dev",
|
|
9
|
+
"versionUp": "yarn version --patch --message 'Bump version to %s'",
|
|
10
|
+
"dev": "dumi setup && dumi dev",
|
|
11
|
+
"build": "father build",
|
|
12
|
+
"build:watch": "father dev",
|
|
13
|
+
"docs:build": "dumi setup && dumi build",
|
|
14
|
+
"docs:preview": "dumi preview",
|
|
15
|
+
"prepare": "husky install && dumi setup",
|
|
16
|
+
"doctor": "father doctor",
|
|
17
|
+
"lint": "npm run lint:es && npm run lint:css",
|
|
18
|
+
"lint:css": "stylelint \"{components}/**/*.{css,less}\"",
|
|
19
|
+
"lint:es": "eslint \"{components}/**/*.{js,jsx,ts,tsx}\"",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"authors": [],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"commitlint": {
|
|
28
|
+
"extends": [
|
|
29
|
+
"@commitlint/config-conventional"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"lint-staged": {
|
|
33
|
+
"components/**/*.{md,json}": [
|
|
34
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
35
|
+
],
|
|
36
|
+
"components/**/*.{css,less}": [
|
|
37
|
+
"stylelint --fix",
|
|
38
|
+
"prettier --write"
|
|
39
|
+
],
|
|
40
|
+
"components/**/*.{js,jsx}": [
|
|
41
|
+
"eslint --fix",
|
|
42
|
+
"prettier --write"
|
|
43
|
+
],
|
|
44
|
+
"components/**/*.{ts,tsx}": [
|
|
45
|
+
"eslint --fix",
|
|
46
|
+
"prettier --parser=typescript --write"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@ant-design/icons": ">=5.0.0",
|
|
54
|
+
"antd": ">=5.0.0",
|
|
55
|
+
"dayjs": "^1.11.13",
|
|
56
|
+
"rc-picker": ">=4.11.0",
|
|
57
|
+
"react": ">=16.9.0",
|
|
58
|
+
"react-dom": ">=16.9.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@ant-design/compatible": "^5.1.3",
|
|
62
|
+
"@ant-design/happy-work-theme": "^1.0.0",
|
|
63
|
+
"@ant-design/icons": "^5.5.2",
|
|
64
|
+
"@ant-design/plots": "^1.0.9",
|
|
65
|
+
"@codesandbox/sandpack-react": "^2.19.10",
|
|
66
|
+
"@commitlint/cli": "^17.1.2",
|
|
67
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
68
|
+
"@emotion/css": "^11.13.5",
|
|
69
|
+
"@emotion/react": "^11.13.5",
|
|
70
|
+
"@emotion/server": "^11.11.0",
|
|
71
|
+
"@monaco-editor/react": "^4.6.0",
|
|
72
|
+
"@qixian.cs/github-contributors-list": "^2.0.2",
|
|
73
|
+
"@types/js-yaml": "^4.0.9",
|
|
74
|
+
"@types/lodash": "^4.17.13",
|
|
75
|
+
"@types/react": "^18.0.0",
|
|
76
|
+
"@types/react-dom": "^18.0.0",
|
|
77
|
+
"@umijs/lint": "^4.0.0",
|
|
78
|
+
"antd": "^5.24.3",
|
|
79
|
+
"antd-style": "^3.7.1",
|
|
80
|
+
"antd-token-previewer": "^2.0.8",
|
|
81
|
+
"classnames": "^2.5.1",
|
|
82
|
+
"cross-fetch": "^4.0.0",
|
|
83
|
+
"dayjs": "^1.11.13",
|
|
84
|
+
"dumi": "^2.3.0",
|
|
85
|
+
"eslint": "^8.23.0",
|
|
86
|
+
"eslint-plugin-unicorn": "^56.0.1",
|
|
87
|
+
"father": "^4.1.0",
|
|
88
|
+
"husky": "^8.0.1",
|
|
89
|
+
"jsonml-to-react-element": "^1.1.11",
|
|
90
|
+
"lint-staged": "^13.0.3",
|
|
91
|
+
"lodash": "^4.17.21",
|
|
92
|
+
"prettier": "^2.7.1",
|
|
93
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
|
94
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
|
95
|
+
"rc-footer": "^0.6.8",
|
|
96
|
+
"rc-picker": "4.11.3",
|
|
97
|
+
"react": "^18.3.1",
|
|
98
|
+
"react-dom": "^18.3.1",
|
|
99
|
+
"react-intersection-observer": "^9.13.1",
|
|
100
|
+
"styled-components": "^6.1.15",
|
|
101
|
+
"stylelint": "^14.9.1",
|
|
102
|
+
"sylvanas": "^0.6.1",
|
|
103
|
+
"vanilla-tilt": "^1.8.1",
|
|
104
|
+
"@codemirror/lang-javascript": "^6.2.3",
|
|
105
|
+
"@codemirror/lang-yaml": "^6.1.2",
|
|
106
|
+
"@codemirror/language": "^6.11.0",
|
|
107
|
+
"@codemirror/state": "^6.5.2",
|
|
108
|
+
"@codemirror/view": "^6.36.5",
|
|
109
|
+
"@lezer/highlight": "^1.2.1",
|
|
110
|
+
"@uiw/react-codemirror": "^4.23.10",
|
|
111
|
+
"copy-to-clipboard": "^3.3.3",
|
|
112
|
+
"js-yaml": "^4.1.0",
|
|
113
|
+
"moment": "^2.30.1",
|
|
114
|
+
"rc-calendar": "^9.15.11",
|
|
115
|
+
"rc-time-picker": "^3.7.3",
|
|
116
|
+
"xterm": "^4.19.0",
|
|
117
|
+
"xterm-addon-fit": "^0.5.0",
|
|
118
|
+
"yaml": "^1.10.2"
|
|
119
|
+
},
|
|
120
|
+
"dependencies": {}
|
|
121
|
+
}
|