@docsvision/management-console 6.2.0-beta.1 → 6.2.0-beta.2
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/index.css +1 -1
- package/index.d.ts +25 -0
- package/index.js +119 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -481,6 +481,8 @@ export declare class DashboardConfigurationService implements IDashboardConfigur
|
|
|
481
481
|
removeDashboardConfiguration(dashboardId: string): Promise<void>;
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
+
export declare function DatabaseSelectionModal(props: IDatabaseSelectionModalProps): JSX.Element;
|
|
485
|
+
|
|
484
486
|
export declare function DatabaseSettingsCard(props: IDatabaseSettingsCardProps): JSX.Element;
|
|
485
487
|
|
|
486
488
|
export declare type DatabaseSettingsCardSize = "sm" | "md";
|
|
@@ -572,6 +574,11 @@ declare type EffectCallbackAsync = () => (Promise<void> | (() => Promise<void |
|
|
|
572
574
|
|
|
573
575
|
export declare const EMAIL_CONNECTION_SETTINGS_LAYOUT = "ea883b59-bb95-446e-879b-97874ac4d82b";
|
|
574
576
|
|
|
577
|
+
export declare enum EngineType {
|
|
578
|
+
MsSQL = 0,
|
|
579
|
+
PgSQL = 1
|
|
580
|
+
}
|
|
581
|
+
|
|
575
582
|
export declare const ERROR_ROW_CLASS_NAME = "page-table__row-error";
|
|
576
583
|
|
|
577
584
|
export declare function ErrorBlock({ text, close }: IErrorBlockProps): JSX.Element;
|
|
@@ -1186,6 +1193,16 @@ declare enum IDatabaseMasterState {
|
|
|
1186
1193
|
ProcessFinished = 2
|
|
1187
1194
|
}
|
|
1188
1195
|
|
|
1196
|
+
export declare interface IDatabaseModel {
|
|
1197
|
+
baseName: string;
|
|
1198
|
+
sqlServerName: string;
|
|
1199
|
+
serverType: EngineType;
|
|
1200
|
+
usesFileService: boolean;
|
|
1201
|
+
hash: string;
|
|
1202
|
+
serverNames: string[];
|
|
1203
|
+
error?: string;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1189
1206
|
declare interface IDatabaseParameters {
|
|
1190
1207
|
alias: string;
|
|
1191
1208
|
databaseName: string;
|
|
@@ -1214,6 +1231,14 @@ declare interface IDatabasesController extends Service {
|
|
|
1214
1231
|
libraries(serviceId: string, databaseAlias: string): Promise<IScriptGenerationModel>
|
|
1215
1232
|
}
|
|
1216
1233
|
|
|
1234
|
+
export declare interface IDatabaseSelectionModalProps {
|
|
1235
|
+
open: boolean;
|
|
1236
|
+
databases: IDatabaseModel[];
|
|
1237
|
+
onCancel: () => void;
|
|
1238
|
+
onApply: (selected: IDatabaseModel[]) => void;
|
|
1239
|
+
resources: IResourcesMap_2;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1217
1242
|
export declare interface IDatabaseSettingsCardProps {
|
|
1218
1243
|
title: string;
|
|
1219
1244
|
label: string;
|
package/index.js
CHANGED
|
@@ -58985,6 +58985,12 @@ const CheckIcon$1 = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
|
58985
58985
|
const Clear = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
58986
58986
|
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
58987
58987
|
}));
|
|
58988
|
+
const Close = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
58989
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
58990
|
+
}));
|
|
58991
|
+
const ComputerRounded = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
58992
|
+
d: "M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H1c-.55 0-1 .45-1 1s.45 1 1 1h22c.55 0 1-.45 1-1s-.45-1-1-1zM5 6h14c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1"
|
|
58993
|
+
}));
|
|
58988
58994
|
const DeleteIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
58989
58995
|
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"
|
|
58990
58996
|
}));
|
|
@@ -85676,6 +85682,12 @@ class RouteContentRenderService {
|
|
|
85676
85682
|
} catch (error) {
|
|
85677
85683
|
console.error(error);
|
|
85678
85684
|
}
|
|
85685
|
+
const { route } = this.application.routingService.getLastRouteResolvedParams() || {};
|
|
85686
|
+
const currentPath = route?.path;
|
|
85687
|
+
if (currentPath !== path) {
|
|
85688
|
+
this.application.logService.trace(`Skip rendering stale route ${path}`);
|
|
85689
|
+
return;
|
|
85690
|
+
}
|
|
85679
85691
|
if (contentComponent) this.setContentComponent(contentComponent);
|
|
85680
85692
|
};
|
|
85681
85693
|
const router = this.application.routingService.getInternalRouterInstance();
|
|
@@ -127122,6 +127134,111 @@ function SectionContentWrapper(props) {
|
|
|
127122
127134
|
}) })
|
|
127123
127135
|
] });
|
|
127124
127136
|
}
|
|
127137
|
+
var EngineType = /* @__PURE__ */ ((EngineType2) => {
|
|
127138
|
+
EngineType2[EngineType2["MsSQL"] = 0] = "MsSQL";
|
|
127139
|
+
EngineType2[EngineType2["PgSQL"] = 1] = "PgSQL";
|
|
127140
|
+
return EngineType2;
|
|
127141
|
+
})(EngineType || {});
|
|
127142
|
+
function renderColumn(values2, iconComponent) {
|
|
127143
|
+
const Icon2 = iconComponent;
|
|
127144
|
+
return values2.map((value, index) => /* @__PURE__ */ jsxs("div", { className: "database-selection-modal__value", children: [
|
|
127145
|
+
/* @__PURE__ */ jsx(Icon2, { fontSize: "small", color: "secondary" }),
|
|
127146
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "body2", children: value })
|
|
127147
|
+
] }, `${value}-${index}`));
|
|
127148
|
+
}
|
|
127149
|
+
function DatabaseSelectionModal(props) {
|
|
127150
|
+
const { open, databases, onCancel, onApply, resources } = props;
|
|
127151
|
+
const [selectedIds, setSelectedIds] = useState(/* @__PURE__ */ new Set());
|
|
127152
|
+
useEffect(() => {
|
|
127153
|
+
if (open) {
|
|
127154
|
+
setSelectedIds(/* @__PURE__ */ new Set());
|
|
127155
|
+
}
|
|
127156
|
+
}, [open]);
|
|
127157
|
+
const handleToggle = (id) => {
|
|
127158
|
+
setSelectedIds((prev) => {
|
|
127159
|
+
const next = new Set(prev);
|
|
127160
|
+
if (next.has(id)) {
|
|
127161
|
+
next.delete(id);
|
|
127162
|
+
} else {
|
|
127163
|
+
next.add(id);
|
|
127164
|
+
}
|
|
127165
|
+
return next;
|
|
127166
|
+
});
|
|
127167
|
+
};
|
|
127168
|
+
const handleApply = () => {
|
|
127169
|
+
const selectedItems = databases.filter((database) => selectedIds.has(database.hash));
|
|
127170
|
+
onApply(selectedItems);
|
|
127171
|
+
};
|
|
127172
|
+
const hasDatabases = databases.length > 0;
|
|
127173
|
+
const isApplyDisabled = !hasDatabases || !selectedIds.size;
|
|
127174
|
+
return /* @__PURE__ */ jsxs(
|
|
127175
|
+
Dialog$2,
|
|
127176
|
+
{
|
|
127177
|
+
open,
|
|
127178
|
+
onClose: onCancel,
|
|
127179
|
+
fullWidth: true,
|
|
127180
|
+
maxWidth: "md",
|
|
127181
|
+
scroll: "paper",
|
|
127182
|
+
className: "database-selection-modal__dialog",
|
|
127183
|
+
slotProps: { paper: { className: "database-selection-modal__paper" } },
|
|
127184
|
+
children: [
|
|
127185
|
+
/* @__PURE__ */ jsxs(DialogTitle, { variant: "h6", className: "database-selection-modal__title", children: [
|
|
127186
|
+
resources.ConnectDatabase,
|
|
127187
|
+
/* @__PURE__ */ jsx(IconButton$3, { onClick: onCancel, children: /* @__PURE__ */ jsx(Close, {}) })
|
|
127188
|
+
] }),
|
|
127189
|
+
/* @__PURE__ */ jsxs(DialogContent$2, { className: "database-selection-modal__content", children: [
|
|
127190
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "body1", className: "database-selection-modal__description", children: resources.SelectDatabasesToConnect }),
|
|
127191
|
+
!hasDatabases ? /* @__PURE__ */ jsx(Typography$3, { variant: "body2", className: "database-selection-modal__empty", children: resources.NoDatabasesAvailableForConnection }) : /* @__PURE__ */ jsx("div", { className: "database-selection-modal__table-wrapper", children: /* @__PURE__ */ jsx(TableContainer, { children: /* @__PURE__ */ jsx(Table$1, { size: "small", children: /* @__PURE__ */ jsx(TableBody$1, { children: databases.map((database) => {
|
|
127192
|
+
const hasError = !!database.error;
|
|
127193
|
+
const isSelected = selectedIds.has(database.hash);
|
|
127194
|
+
const handleRowClick = hasError ? void 0 : () => handleToggle(database.hash);
|
|
127195
|
+
return /* @__PURE__ */ jsx(
|
|
127196
|
+
LightTooltip,
|
|
127197
|
+
{
|
|
127198
|
+
title: database.error ?? "",
|
|
127199
|
+
arrow: true,
|
|
127200
|
+
placement: "top",
|
|
127201
|
+
disableHoverListener: !hasError,
|
|
127202
|
+
disableFocusListener: !hasError,
|
|
127203
|
+
disableTouchListener: !hasError,
|
|
127204
|
+
children: /* @__PURE__ */ jsxs(
|
|
127205
|
+
TableRow$1,
|
|
127206
|
+
{
|
|
127207
|
+
hover: !hasError,
|
|
127208
|
+
onClick: handleRowClick,
|
|
127209
|
+
className: classNames(
|
|
127210
|
+
"database-selection-modal__row",
|
|
127211
|
+
{ "database-selection-modal__row_error": hasError }
|
|
127212
|
+
),
|
|
127213
|
+
children: [
|
|
127214
|
+
/* @__PURE__ */ jsx(TableCell$2, { className: "database-selection-modal__cell", width: "30%", children: renderColumn([database.baseName], StorageRounded) }),
|
|
127215
|
+
/* @__PURE__ */ jsx(TableCell$2, { className: "database-selection-modal__cell", width: "30%", children: renderColumn(database.serverNames, ComputerRounded) }),
|
|
127216
|
+
/* @__PURE__ */ jsx(TableCell$2, { className: "database-selection-modal__cell", width: "30%", children: database.sqlServerName }),
|
|
127217
|
+
/* @__PURE__ */ jsx(TableCell$2, { className: "database-selection-modal__cell", width: "10%", children: /* @__PURE__ */ jsx(
|
|
127218
|
+
Checkbox$1,
|
|
127219
|
+
{
|
|
127220
|
+
checked: isSelected,
|
|
127221
|
+
onChange: () => handleToggle(database.hash),
|
|
127222
|
+
onClick: (event) => event.stopPropagation(),
|
|
127223
|
+
disabled: hasError
|
|
127224
|
+
}
|
|
127225
|
+
) })
|
|
127226
|
+
]
|
|
127227
|
+
}
|
|
127228
|
+
)
|
|
127229
|
+
},
|
|
127230
|
+
database.hash
|
|
127231
|
+
);
|
|
127232
|
+
}) }) }) }) })
|
|
127233
|
+
] }),
|
|
127234
|
+
/* @__PURE__ */ jsxs(DialogActions$2, { className: "database-selection-modal__actions", children: [
|
|
127235
|
+
/* @__PURE__ */ jsx(Button$3, { onClick: onCancel, color: "primary", children: resources.DialogButton_Cancel }),
|
|
127236
|
+
/* @__PURE__ */ jsx(Button$3, { onClick: handleApply, color: "primary", variant: "contained", disabled: isApplyDisabled, children: resources.DialogButton_Accept })
|
|
127237
|
+
] })
|
|
127238
|
+
]
|
|
127239
|
+
}
|
|
127240
|
+
);
|
|
127241
|
+
}
|
|
127125
127242
|
export {
|
|
127126
127243
|
$AboutSettings,
|
|
127127
127244
|
$ApplicationSettings,
|
|
@@ -127155,6 +127272,7 @@ export {
|
|
|
127155
127272
|
DEFAULT_PAGE_SIZE,
|
|
127156
127273
|
DOCSVISION_CONNECTION_SETTINGS_LAYOUT,
|
|
127157
127274
|
DashboardConfigurationService,
|
|
127275
|
+
DatabaseSelectionModal,
|
|
127158
127276
|
DatabaseSettingsCard,
|
|
127159
127277
|
DateRangeCalendarIcon,
|
|
127160
127278
|
DateRangeContainer,
|
|
@@ -127172,6 +127290,7 @@ export {
|
|
|
127172
127290
|
EditorInnerWrapper,
|
|
127173
127291
|
EditorName,
|
|
127174
127292
|
EditorWrapper,
|
|
127293
|
+
EngineType,
|
|
127175
127294
|
ErrorBlock,
|
|
127176
127295
|
ErrorIcon$1 as ErrorIcon,
|
|
127177
127296
|
ErrorMessage,
|