CB-3454 ai (#2033)

* CB-3999 add ai plugin

* CB-3454 review fixes

* CB-3454 gql since directive fix

* CB-3454 update tsconfig

* fix: npm dependencies

* CB-4045 add hint property

* CB-3454 add hints

---------

Co-authored-by: Ainur <yagudin10@yandex.ru>
Co-authored-by: Alexey <wrouds@gmail.com>
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
This commit is contained in:
alex
2023-10-13 17:03:33 +03:00
committed by GitHub
co-authored by Ainur Alexey Daria Marutkina
parent d0a820d27b
commit 49f321462e
46 changed files with 63 additions and 45 deletions
@@ -88,6 +88,11 @@ public class WebPropertyInfo {
}
}
@Property
public String getHint() {
return property.getHint();
}
@Property
public int getOrder() {
return property instanceof ObjectPropertyDescriptor ? ((ObjectPropertyDescriptor) property).getOrderNumber() : -1;
@@ -8,7 +8,7 @@ input PageInput {
offset: Int
}
directive @since(version: String!) on OBJECT|SCALAR|QUERY|MUTATION|FIELD|VARIABLE_DEFINITION|OBJECT|FIELD_DEFINITION|ARGUMENT_DEFINITION|INTERFACE|ENUM|ENUM_VALUE|INPUT_OBJECT|INPUT_FIELD_DEFINITION
directive @since(version: String!) repeatable on OBJECT|SCALAR|QUERY|MUTATION|FIELD|VARIABLE_DEFINITION|OBJECT|FIELD_DEFINITION|ARGUMENT_DEFINITION|INTERFACE|ENUM|ENUM_VALUE|INPUT_OBJECT|INPUT_FIELD_DEFINITION
type Query
@@ -12,6 +12,8 @@ type ObjectPropertyInfo {
displayName: String
# Property description
description: String
# Property hint
hint: String @since(version: "23.2.3")
# Property category (may be used if object has a lot of properties)
category: String
# Property data type (int, String, etc)
@@ -33,7 +33,7 @@
"@cloudbeaver/core-theming": "~0.1.0",
"@cloudbeaver/core-utils": "~0.1.0",
"mobx": "^6.10.2",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
+1 -1
View File
@@ -35,7 +35,7 @@
"react": "^18.2.0",
"reakit": "~1.x.x",
"reakit-utils": "^0.15.2",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -158,6 +158,7 @@ export const RenderField = observer<RenderFieldProps>(function RenderField({
title={property.description}
disabled={disabled}
readOnly={readOnly}
description={property.hint}
className={className}
>
{property.displayName ?? ''}
@@ -175,6 +176,7 @@ export const RenderField = observer<RenderFieldProps>(function RenderField({
title={property.description}
disabled={disabled}
readOnly={readOnly}
description={property.hint}
className={className}
>
{property.displayName ?? ''}
@@ -225,7 +227,7 @@ export const RenderField = observer<RenderFieldProps>(function RenderField({
name={property.id!}
state={state}
defaultValue={defaultValue}
description={description}
description={description ?? property.hint}
disabled={disabled}
readOnly={readOnly}
autoHide={autoHide}
@@ -247,7 +249,7 @@ export const RenderField = observer<RenderFieldProps>(function RenderField({
name={property.id!}
value={value}
defaultValue={defaultValue}
description={description}
description={description ?? property.hint}
disabled={disabled}
readOnly={readOnly}
autoComplete={RESERVED_KEYWORDS.includes(autofillToken) ? autofillToken : `${autofillToken} ${property.id}`}
+1 -1
View File
@@ -48,7 +48,7 @@
"mobx": "^6.10.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -25,7 +25,7 @@
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reakit": "~1.x.x",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -2,6 +2,7 @@ fragment ObjectPropertyInfo on ObjectPropertyInfo {
id
displayName
description
hint
category
dataType
value
@@ -9,5 +10,5 @@ fragment ObjectPropertyInfo on ObjectPropertyInfo {
defaultValue
length
features
order
}
order
}
+1 -1
View File
@@ -35,7 +35,7 @@
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"reakit": "~1.x.x",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
+9 -1
View File
@@ -122,6 +122,10 @@ export abstract class FormPart<TPartState, TFormState = any> implements IFormPar
await this.load();
}
reset() {
this.setState(toJS(this.initialState));
}
protected setInitialState(initialState: TPartState) {
this.initialState = initialState;
@@ -129,7 +133,11 @@ export abstract class FormPart<TPartState, TFormState = any> implements IFormPar
return;
}
this.state = toJS(this.initialState);
this.setState(toJS(this.initialState));
}
protected setState(state: TPartState) {
this.state = state;
}
protected configure(data: IFormState<TFormState>, contexts: IExecutionContextProvider<IFormState<TFormState>>): void | Promise<void> {}
@@ -15,4 +15,5 @@ export interface IFormPart<TState> extends ILoadableState {
load(): Promise<void>;
save(): Promise<void>;
reset(): void;
}
+1 -1
View File
@@ -28,7 +28,7 @@
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"react-hotkeys-hook": "^4.4.1",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -37,7 +37,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -39,7 +39,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -37,7 +37,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -36,7 +36,7 @@
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -36,7 +36,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -34,7 +34,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -36,7 +36,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -43,7 +43,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -37,7 +37,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -38,7 +38,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-popper": "^2.3.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -32,7 +32,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -43,7 +43,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -35,7 +35,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -34,7 +34,7 @@
"@cloudbeaver/plugin-sql-editor-new": "~0.1.0",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
+1 -1
View File
@@ -31,7 +31,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -28,7 +28,7 @@
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"react-leaflet": "^4.2.1",
"reshadow": "~0.x.x",
"reshadow": "^0.0.1",
"wellknown": "^0.5.0"
},
"peerDependencies": {},
+1 -1
View File
@@ -31,7 +31,7 @@
"@cloudbeaver/plugin-sql-editor": "~0.1.0",
"@cloudbeaver/plugin-top-app-bar": "~0.1.0",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -33,7 +33,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -35,7 +35,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -38,7 +38,7 @@
"@cloudbeaver/plugin-resource-manager": "~0.1.0",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -40,7 +40,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -41,7 +41,7 @@
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reakit": "~1.x.x",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -37,7 +37,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
+1 -1
View File
@@ -27,7 +27,7 @@
"@cloudbeaver/core-utils": "~0.1.0",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -24,7 +24,7 @@
"@cloudbeaver/plugin-top-app-bar": "~0.1.0",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -29,7 +29,7 @@
"@cloudbeaver/plugin-settings-menu": "~0.1.0",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -41,7 +41,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -42,7 +42,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -29,7 +29,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -28,7 +28,7 @@
"@cloudbeaver/core-view": "~0.1.0",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -34,7 +34,7 @@
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"reshadow": "~0.x.x"
"reshadow": "^0.0.1"
},
"peerDependencies": {},
"devDependencies": {
@@ -28,7 +28,7 @@
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"react-markdown": "^9.0.0",
"reshadow": "~0.x.x",
"reshadow": "^0.0.1",
"semver": "^7.5.4"
},
"peerDependencies": {},
@@ -23,7 +23,6 @@ export class PluginBootstrap extends Bootstrap {
this.administrationItemService.create({
name: 'version-update',
type: AdministrationItemType.Administration,
order: 5,
getContentComponent: () => VersionUpdate,
getDrawerComponent: () => VersionUpdateDrawerItem,
});