backend.ai-ui 25.16.0 → 25.17.0-rc.1

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.
@@ -0,0 +1,7 @@
1
+ import { ButtonProps } from 'antd';
2
+ import { default as React } from 'react';
3
+ export interface BAIButtonProps extends ButtonProps {
4
+ action?: () => Promise<void>;
5
+ }
6
+ declare const BAIButton: React.FC<BAIButtonProps>;
7
+ export default BAIButton;
@@ -3,7 +3,6 @@ import { LinkProps } from 'react-router-dom';
3
3
  export interface BAILinkProps extends Omit<LinkProps, 'to'> {
4
4
  type?: 'hover' | 'disabled' | undefined;
5
5
  to?: LinkProps['to'];
6
- icon?: React.ReactNode;
7
6
  ellipsis?: boolean | {
8
7
  tooltip?: string;
9
8
  };
@@ -1,13 +1,14 @@
1
- import { default as React } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  export interface BAIStatisticProps {
3
- title: string;
3
+ title: ReactNode;
4
4
  current?: number;
5
5
  total?: number;
6
6
  unit?: string;
7
7
  precision?: number;
8
8
  infinityDisplay?: string;
9
- showProgress?: boolean;
9
+ progressMode?: 'ghost' | 'hidden' | 'normal';
10
10
  progressSteps?: number;
11
+ style?: React.CSSProperties;
11
12
  }
12
13
  declare const BAIStatistic: React.FC<BAIStatisticProps>;
13
14
  export default BAIStatistic;
@@ -1,7 +1,9 @@
1
+ import { EllipsisConfig } from 'antd/es/typography/Base';
1
2
  import { TextProps as AntdTextProps } from 'antd/es/typography/Text';
2
3
  import { default as React } from 'react';
3
- export interface BAITextProps extends AntdTextProps {
4
+ export interface BAITextProps extends Omit<AntdTextProps, 'ellipsis'> {
4
5
  monospace?: boolean;
6
+ ellipsis?: boolean | EllipsisConfig;
5
7
  }
6
8
  declare const BAIText: React.FC<BAITextProps>;
7
9
  export default BAIText;
@@ -1,11 +1,12 @@
1
+ import { BAIStatisticProps } from './BAIStatistic';
1
2
  import { default as React } from 'react';
2
3
  interface ResourceData {
3
4
  cpu: {
4
- using: {
5
+ used: {
5
6
  current: number;
6
7
  total?: number;
7
8
  };
8
- remaining: {
9
+ free: {
9
10
  current: number;
10
11
  total?: number;
11
12
  };
@@ -15,11 +16,11 @@ interface ResourceData {
15
16
  };
16
17
  } | null;
17
18
  memory: {
18
- using: {
19
+ used: {
19
20
  current: number;
20
21
  total?: number;
21
22
  };
22
- remaining: {
23
+ free: {
23
24
  current: number;
24
25
  total?: number;
25
26
  };
@@ -30,11 +31,11 @@ interface ResourceData {
30
31
  } | null;
31
32
  accelerators: Array<{
32
33
  key: string;
33
- using: {
34
+ used: {
34
35
  current: number;
35
36
  total?: number;
36
37
  };
37
- remaining: {
38
+ free: {
38
39
  current: number;
39
40
  total?: number;
40
41
  };
@@ -46,8 +47,8 @@ interface ResourceData {
46
47
  }
47
48
  interface ResourceStatisticsProps {
48
49
  resourceData: ResourceData;
49
- displayType: 'using' | 'remaining';
50
- showProgress?: boolean;
50
+ displayType: 'used' | 'free';
51
+ progressMode?: BAIStatisticProps['progressMode'];
51
52
  precision?: number;
52
53
  progressSteps?: number;
53
54
  }
@@ -2,6 +2,8 @@ import { BAISessionClusterModeFragment$key } from '../../__generated__/BAISessio
2
2
  import { default as React } from 'react';
3
3
  export interface BAISessionClusterModeProps {
4
4
  sessionFrgmt: BAISessionClusterModeFragment$key;
5
+ showSize?: boolean;
6
+ mode?: 'text' | 'tag';
5
7
  }
6
8
  declare const BAISessionClusterMode: React.FC<BAISessionClusterModeProps>;
7
9
  export default BAISessionClusterMode;
@@ -0,0 +1,7 @@
1
+ import { BAIVFolderDeleteButtonFragment$key } from '../../__generated__/BAIVFolderDeleteButtonFragment.graphql';
2
+ import { ButtonProps } from 'antd';
3
+ export interface BAIVFolderDeleteButtonProps extends ButtonProps {
4
+ vfolderFrgmt: BAIVFolderDeleteButtonFragment$key;
5
+ }
6
+ declare const BAIVFolderDeleteButton: ({ vfolderFrgmt, ...buttonProps }: BAIVFolderDeleteButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default BAIVFolderDeleteButton;
@@ -30,3 +30,4 @@ export { default as BAISessionClusterMode } from './BAISessionClusterMode';
30
30
  export type { BAIDeactivateArtifactsModalProps, BAIDeactivateArtifactsModalArtifactsFragmentKey, } from './BAIDeactivateArtifactsModal';
31
31
  export { default as BAIActivateArtifactsModal } from './BAIActivateArtifactsModal';
32
32
  export type { BAIActivateArtifactsModalProps, BAIActivateArtifactsModalArtifactsFragmentKey, } from './BAIActivateArtifactsModal';
33
+ export { default as BAIVFolderDeleteButton } from './BAIVFolderDeleteButton';
@@ -31,6 +31,8 @@ export { default as BAIModal } from './BAIModal';
31
31
  export type { BAIModalProps } from './BAIModal';
32
32
  export { default as BAIConfirmModalWithInput } from './BAIConfirmModalWithInput';
33
33
  export type { BAIConfirmModalWithInputProps } from './BAIConfirmModalWithInput';
34
+ export { default as BAIButton } from './BAIButton';
35
+ export type { BAIButtonProps } from './BAIButton';
34
36
  export * from './Table';
35
37
  export * from './fragments';
36
38
  export * from './provider';
@@ -1,10 +1,15 @@
1
1
  import { BAILocale } from '../../../locale';
2
2
  import { BAIClient } from '../BAIClientProvider';
3
3
  import { ConfigProviderProps } from 'antd';
4
- export interface BAIConfigProviderProps extends Omit<ConfigProviderProps, 'locale'> {
4
+ export interface BAIConfigProviderBaseProps extends Omit<ConfigProviderProps, 'locale'> {
5
5
  locale?: BAILocale;
6
+ }
7
+ export type BAIConfigProviderProps = BAIConfigProviderBaseProps & ({
6
8
  clientPromise: Promise<BAIClient>;
7
9
  anonymousClientFactory: (api_endpoint: string) => BAIClient;
8
- }
10
+ } | {
11
+ clientPromise?: never;
12
+ anonymousClientFactory?: never;
13
+ });
9
14
  declare const BAIConfigProvider: ({ children, locale, clientPromise, anonymousClientFactory, ...props }: BAIConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
10
15
  export default BAIConfigProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"objectSpread2-D0Q_N5dg.js","sources":["../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/typeof.js","../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };"],"names":["_typeof","o","toPrimitive","r","e","i","toPropertyKey","_defineProperty","t","ownKeys","_objectSpread2","defineProperty"],"mappings":"AAAA,SAASA,EAAQC,GAAG;AAClB;AAEA,SAAOD,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAUC,GAAG;AAChG,WAAO,OAAOA;AAAA,EACf,IAAG,SAAUA,GAAG;AACf,WAAOA,KAAmB,OAAO,UAArB,cAA+BA,EAAE,gBAAgB,UAAUA,MAAM,OAAO,YAAY,WAAW,OAAOA;AAAA,EACtH,GAAKD,EAAQC,CAAC;AACd;ACPA,SAASC,EAAY,GAAGC,GAAG;AACzB,MAAgBH,EAAQ,CAAC,KAArB,YAA0B,CAAC,EAAG,QAAO;AACzC,MAAII,IAAI,EAAE,OAAO,WAAW;AAC5B,MAAeA,MAAX,QAAc;AAChB,QAAIC,IAAID,EAAE,KAAK,GAAGD,CAAc;AAChC,QAAgBH,EAAQK,CAAC,KAArB,SAAwB,QAAOA;AACnC,UAAM,IAAI,UAAU,8CAA8C;AAAA,EACtE;AACE,UAAqBF,MAAb,WAAiB,SAAS,QAAQ,CAAC;AAC7C;ACRA,SAASG,EAAc,GAAG;AACxB,MAAID,IAAIH,EAAY,GAAG,QAAQ;AAC/B,SAAmBF,EAAQK,CAAC,KAArB,WAAyBA,IAAIA,IAAI;AAC1C;ACJA,SAASE,EAAgBH,GAAGD,GA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js","../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };"],"names":["_typeof","o","toPrimitive","r","e","i","toPropertyKey","_defineProperty","t","ownKeys","_objectSpread2","defineProperty"],"mappings":"AAAA,SAASA,EAAQC,GAAG;AAClB;AAEA,SAAOD,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAUC,GAAG;AAChG,WAAO,OAAOA;AAAA,EACf,IAAG,SAAUA,GAAG;AACf,WAAOA,KAAmB,OAAO,UAArB,cAA+BA,EAAE,gBAAgB,UAAUA,MAAM,OAAO,YAAY,WAAW,OAAOA;AAAA,EACtH,GAAKD,EAAQC,CAAC;AACd;ACPA,SAASC,EAAY,GAAGC,GAAG;AACzB,MAAgBH,EAAQ,CAAC,KAArB,YAA0B,CAAC,EAAG,QAAO;AACzC,MAAII,IAAI,EAAE,OAAO,WAAW;AAC5B,MAAeA,MAAX,QAAc;AAChB,QAAIC,IAAID,EAAE,KAAK,GAAGD,CAAc;AAChC,QAAgBH,EAAQK,CAAC,KAArB,SAAwB,QAAOA;AACnC,UAAM,IAAI,UAAU,8CAA8C;AAAA,EACtE;AACE,UAAqBF,MAAb,WAAiB,SAAS,QAAQ,CAAC;AAC7C;ACRA,SAASG,EAAc,GAAG;AACxB,MAAID,IAAIH,EAAY,GAAG,QAAQ;AAC/B,SAAmBF,EAAQK,CAAC,KAArB,WAAyBA,IAAIA,IAAI;AAC1C;ACJA,SAASE,EAAgBH,GAAGD,GAAGK,GAAG;AAChC,UAAQL,IAAIG,EAAcH,CAAC,MAAMC,IAAI,OAAO,eAAeA,GAAGD,GAAG;AAAA,IAC/D,OAAOK;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EACX,CAAA,IAAIJ,EAAED,CAAC,IAAIK,GAAGJ;AACjB;ACPA,SAASK,EAAQL,GAAGD,GAAG;AACrB,MAAIK,IAAI,OAAO,KAAKJ,CAAC;AACrB,MAAI,OAAO,uBAAuB;AAChC,QAAIH,IAAI,OAAO,sBAAsBG,CAAC;AACtC,IAAAD,MAAMF,IAAIA,EAAE,OAAO,SAAUE,GAAG;AAC9B,aAAO,OAAO,yBAAyBC,GAAGD,CAAC,EAAE;AAAA,IACnD,CAAK,IAAIK,EAAE,KAAK,MAAMA,GAAGP,CAAC;AAAA,EAC1B;AACE,SAAOO;AACT;AACA,SAASE,EAAeN,GAAG;AACzB,WAASD,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACzC,QAAIK,IAAY,UAAUL,CAAC,KAAnB,OAAuB,UAAUA,CAAC,IAAI,CAAE;AAChD,IAAAA,IAAI,IAAIM,EAAQ,OAAOD,CAAC,GAAG,EAAE,EAAE,QAAQ,SAAUL,GAAG;AAClDQ,MAAAA,EAAeP,GAAGD,GAAGK,EAAEL,CAAC,CAAC;AAAA,IAC/B,CAAK,IAAI,OAAO,4BAA4B,OAAO,iBAAiBC,GAAG,OAAO,0BAA0BI,CAAC,CAAC,IAAIC,EAAQ,OAAOD,CAAC,CAAC,EAAE,QAAQ,SAAUL,GAAG;AAChJ,aAAO,eAAeC,GAAGD,GAAG,OAAO,yBAAyBK,GAAGL,CAAC,CAAC;AAAA,IACvE,CAAK;AAAA,EACL;AACE,SAAOC;AACT;","x_google_ignoreList":[0,1,2,3,4]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend.ai-ui",
3
- "version": "25.16.0",
3
+ "version": "25.17.0-rc.1",
4
4
  "description": "React components for Backend.AI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,7 +40,8 @@
40
40
  "test": "NODE_OPTIONS='--no-deprecation' jest",
41
41
  "storybook": "storybook dev -p 6006",
42
42
  "build-storybook": "storybook build",
43
- "lint": "eslint ./src --ignore-pattern '**.graphql.**' --max-warnings=0"
43
+ "lint": "eslint ./src --ignore-pattern '**.graphql.**' --max-warnings=0",
44
+ "prepublishOnly": "pnpm lint && pnpm test && pnpm build"
44
45
  },
45
46
  "eslintConfig": {
46
47
  "extends": [
@@ -80,7 +81,7 @@
80
81
  "prefer-promise-reject-errors": "off",
81
82
  "func-call-spacing": "off",
82
83
  "@typescript-eslint/no-unused-vars": [
83
- "error",
84
+ "warn",
84
85
  {
85
86
  "args": "all",
86
87
  "argsIgnorePattern": "^_",
@@ -112,13 +113,10 @@
112
113
  "relay-runtime": "^20.1.1"
113
114
  },
114
115
  "dependencies": {
115
- "@ant-design/icons": "^5.6.1",
116
116
  "@dnd-kit/core": "^6.3.1",
117
117
  "@dnd-kit/modifiers": "^9.0.0",
118
118
  "@dnd-kit/sortable": "^10.0.0",
119
119
  "@dnd-kit/utilities": "^3.2.2",
120
- "@tanstack/react-query": "^5.69.0",
121
- "ahooks": "^3.9.5",
122
120
  "big.js": "^7.0.1",
123
121
  "classnames": "^2.5.1",
124
122
  "dayjs": "^1.11.18",