@burdenoff/microfe-bigconsole 2026.1119.6 → 2026.1119.7
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/dist/bigconsole/components/settings/WidgetCatalogSection.d.ts +3 -0
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +207 -0
- package/dist/bigconsole/constants/backendErrors.js +2 -0
- package/dist/bigconsole/hooks/useWidgetTypeCatalog.d.ts +14 -0
- package/dist/bigconsole/hooks/useWidgetTypeCatalog.js +79 -0
- package/dist/bigconsole/pages/SettingsPage.js +198 -196
- package/dist/bigconsole/utils/widgetCatalog.d.ts +42 -0
- package/dist/bigconsole/utils/widgetCatalog.js +15 -0
- package/dist/constants/permissions.d.ts +2 -1
- package/dist/constants/permissions.js +1 -0
- package/dist/generated/wspace-operations.d.ts +55 -0
- package/dist/generated/wspace-operations.js +301 -30
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers for the Settings "Widget catalog" section (BOFF-10151).
|
|
3
|
+
*
|
|
4
|
+
* The backend `widgetTypeCatalog` query returns every store/custom widget type
|
|
5
|
+
* the workspace may see with its installation state. These helpers decide what
|
|
6
|
+
* an owner can do with each row, so the section component stays declarative and
|
|
7
|
+
* the rules stay unit-testable.
|
|
8
|
+
*/
|
|
9
|
+
/** One catalog row, as returned by `widgetTypeCatalog`. */
|
|
10
|
+
export interface WidgetCatalogRow {
|
|
11
|
+
widgetType: string;
|
|
12
|
+
widgetVersion: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string | null;
|
|
15
|
+
author?: string | null;
|
|
16
|
+
category?: string | null;
|
|
17
|
+
publishType: string;
|
|
18
|
+
status: string;
|
|
19
|
+
isLatest: boolean;
|
|
20
|
+
installedInWorkspace: boolean;
|
|
21
|
+
selfInstallable: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* What the row's action cell offers:
|
|
25
|
+
* - `install` — an AVAILABLE type the caller may self-install (CUSTOM types);
|
|
26
|
+
* - `uninstall` — an installed CUSTOM type (any status, so a DEPRECATED or
|
|
27
|
+
* DISABLED type can still be removed cleanly);
|
|
28
|
+
* - `store` — a STORE type, installed or not: it is installed, billed and
|
|
29
|
+
* removed through the Store, so the row links there;
|
|
30
|
+
* - `none` — not installed and not installable (e.g. a DEPRECATED type).
|
|
31
|
+
*/
|
|
32
|
+
export type WidgetCatalogAction = 'install' | 'uninstall' | 'store' | 'none';
|
|
33
|
+
export declare function widgetCatalogAction(row: WidgetCatalogRow): WidgetCatalogAction;
|
|
34
|
+
/** DEPRECATED and DISABLED rows are shown greyed out. */
|
|
35
|
+
export declare function isWidgetCatalogRowMuted(row: Pick<WidgetCatalogRow, 'status'>): boolean;
|
|
36
|
+
/** Stable identity for a row (type + version is the registry's natural key). */
|
|
37
|
+
export declare function widgetCatalogRowKey(row: Pick<WidgetCatalogRow, 'widgetType' | 'widgetVersion'>): string;
|
|
38
|
+
/**
|
|
39
|
+
* Display order: installed rows first, then AVAILABLE before DEPRECATED before
|
|
40
|
+
* DISABLED, then by name and newest version first.
|
|
41
|
+
*/
|
|
42
|
+
export declare function sortWidgetCatalogRows<T extends WidgetCatalogRow>(rows: readonly T[]): T[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/bigconsole/utils/widgetCatalog.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.publishType === "STORE" ? "store" : e.installedInWorkspace ? "uninstall" : e.selfInstallable ? "install" : "none";
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
return e.status !== "AVAILABLE";
|
|
7
|
+
}
|
|
8
|
+
function n(e) {
|
|
9
|
+
return `${e.widgetType}@${e.widgetVersion}`;
|
|
10
|
+
}
|
|
11
|
+
function r(e) {
|
|
12
|
+
let t = (e) => e === "AVAILABLE" ? 0 : e === "DEPRECATED" ? 1 : 2;
|
|
13
|
+
return [...e].sort((e, n) => Number(n.installedInWorkspace) - Number(e.installedInWorkspace) || t(e.status) - t(n.status) || e.name.localeCompare(n.name) || n.widgetVersion.localeCompare(e.widgetVersion, void 0, { numeric: !0 }));
|
|
14
|
+
}
|
|
15
|
+
export { t as isWidgetCatalogRowMuted, r as sortWidgetCatalogRows, e as widgetCatalogAction, n as widgetCatalogRowKey };
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* - bigconsole-pipeline: read, create, update, delete, execute, test
|
|
32
32
|
* - bigconsole-prompt: read, create, update, delete
|
|
33
33
|
* - bigconsole-workflow: read, create, update, delete, execute
|
|
34
|
-
* - bigconsole-widget: read, create, update, delete
|
|
34
|
+
* - bigconsole-widget: read, create, update, delete, manage_widget_types
|
|
35
35
|
* - bigconsole-widget-action: read, create, update, delete, execute
|
|
36
36
|
* - bigconsole-event-log: read, execute
|
|
37
37
|
* - bigconsole-webhook: read, create, update, delete, test
|
|
@@ -101,6 +101,7 @@ export declare const BIGCONSOLE_PERMISSIONS: {
|
|
|
101
101
|
readonly WIDGET_CREATE: "bigconsole-widget:create";
|
|
102
102
|
readonly WIDGET_UPDATE: "bigconsole-widget:update";
|
|
103
103
|
readonly WIDGET_DELETE: "bigconsole-widget:delete";
|
|
104
|
+
readonly WIDGET_MANAGE_TYPES: "bigconsole-widget:manage_widget_types";
|
|
104
105
|
readonly WIDGET_ACTION_READ: "bigconsole-widget-action:read";
|
|
105
106
|
readonly WIDGET_ACTION_CREATE: "bigconsole-widget-action:create";
|
|
106
107
|
readonly WIDGET_ACTION_UPDATE: "bigconsole-widget-action:update";
|
|
@@ -64,6 +64,7 @@ var e = {
|
|
|
64
64
|
WIDGET_CREATE: "bigconsole-widget:create",
|
|
65
65
|
WIDGET_UPDATE: "bigconsole-widget:update",
|
|
66
66
|
WIDGET_DELETE: "bigconsole-widget:delete",
|
|
67
|
+
WIDGET_MANAGE_TYPES: "bigconsole-widget:manage_widget_types",
|
|
67
68
|
WIDGET_ACTION_READ: "bigconsole-widget-action:read",
|
|
68
69
|
WIDGET_ACTION_CREATE: "bigconsole-widget-action:create",
|
|
69
70
|
WIDGET_ACTION_UPDATE: "bigconsole-widget-action:update",
|
|
@@ -576,6 +576,13 @@ export type BigConsoleImportDashboardInput = {
|
|
|
576
576
|
/** Override visibility */
|
|
577
577
|
visibility?: BigConsoleDashboardVisibility | null | undefined;
|
|
578
578
|
};
|
|
579
|
+
/** Input to install (enable) a registered widget type for a workspace. */
|
|
580
|
+
export type BigConsoleInstallWidgetTypeInput = {
|
|
581
|
+
publishType: string;
|
|
582
|
+
widgetType: string;
|
|
583
|
+
widgetVersion: string;
|
|
584
|
+
workspaceId: string | number;
|
|
585
|
+
};
|
|
579
586
|
/** Input for instantiating a template */
|
|
580
587
|
export type BigConsoleInstantiateDashboardTemplateInput = {
|
|
581
588
|
/** Dashboard description */
|
|
@@ -746,6 +753,12 @@ export type BigConsoleShareDashboardInput = {
|
|
|
746
753
|
/** Type of recipient (user or group) */
|
|
747
754
|
recipientType: BigConsoleDashboardShareRecipientType;
|
|
748
755
|
};
|
|
756
|
+
/** Input to uninstall (disable) a widget type for a workspace. */
|
|
757
|
+
export type BigConsoleUninstallWidgetTypeInput = {
|
|
758
|
+
widgetType: string;
|
|
759
|
+
widgetVersion: string;
|
|
760
|
+
workspaceId: string | number;
|
|
761
|
+
};
|
|
749
762
|
export type BigConsoleUpdateDashboardEmbedPolicyInput = {
|
|
750
763
|
allowedParentOrigins?: Array<string> | null | undefined;
|
|
751
764
|
expiresAt?: string | null | undefined;
|
|
@@ -7259,6 +7272,18 @@ export type EmitWidgetEventMutation = {
|
|
|
7259
7272
|
completedAt: string | null;
|
|
7260
7273
|
};
|
|
7261
7274
|
};
|
|
7275
|
+
export type InstallWidgetTypeMutationVariables = Exact<{
|
|
7276
|
+
input: Types.BigConsoleInstallWidgetTypeInput;
|
|
7277
|
+
}>;
|
|
7278
|
+
export type InstallWidgetTypeMutation = {
|
|
7279
|
+
installWidgetType: {
|
|
7280
|
+
widgetType: string;
|
|
7281
|
+
widgetVersion: string;
|
|
7282
|
+
publishType: string;
|
|
7283
|
+
status: string;
|
|
7284
|
+
installedInWorkspace: boolean | null;
|
|
7285
|
+
};
|
|
7286
|
+
};
|
|
7262
7287
|
export type MoveWidgetToPageMutationVariables = Exact<{
|
|
7263
7288
|
widgetId: string | number;
|
|
7264
7289
|
targetPageId: string | number;
|
|
@@ -7429,6 +7454,12 @@ export type ToggleEventWebhookMappingMutation = {
|
|
|
7429
7454
|
} | null;
|
|
7430
7455
|
};
|
|
7431
7456
|
};
|
|
7457
|
+
export type UninstallWidgetTypeMutationVariables = Exact<{
|
|
7458
|
+
input: Types.BigConsoleUninstallWidgetTypeInput;
|
|
7459
|
+
}>;
|
|
7460
|
+
export type UninstallWidgetTypeMutation = {
|
|
7461
|
+
uninstallWidgetType: boolean;
|
|
7462
|
+
};
|
|
7432
7463
|
export type UpdateEventWebhookMappingMutationVariables = Exact<{
|
|
7433
7464
|
id: string | number;
|
|
7434
7465
|
input: Types.BigConsoleUpdateWidgetEventWebhookMappingInput;
|
|
@@ -8231,6 +8262,27 @@ export type ListWidgetsForPageQuery = {
|
|
|
8231
8262
|
}>;
|
|
8232
8263
|
};
|
|
8233
8264
|
};
|
|
8265
|
+
export type WidgetTypeCatalogQueryVariables = Exact<{
|
|
8266
|
+
[key: string]: never;
|
|
8267
|
+
}>;
|
|
8268
|
+
export type WidgetTypeCatalogQuery = {
|
|
8269
|
+
widgetTypeCatalog: Array<{
|
|
8270
|
+
widgetType: string;
|
|
8271
|
+
widgetVersion: string;
|
|
8272
|
+
name: string;
|
|
8273
|
+
description: string | null;
|
|
8274
|
+
author: string | null;
|
|
8275
|
+
category: string | null;
|
|
8276
|
+
icon: string | null;
|
|
8277
|
+
publishType: string;
|
|
8278
|
+
status: string;
|
|
8279
|
+
renderer: string;
|
|
8280
|
+
isLatest: boolean;
|
|
8281
|
+
installedInWorkspace: boolean;
|
|
8282
|
+
selfInstallable: boolean;
|
|
8283
|
+
updatedAt: string;
|
|
8284
|
+
}>;
|
|
8285
|
+
};
|
|
8234
8286
|
export type DataSinkWorkflowLinkFieldsFragment = {
|
|
8235
8287
|
id: string;
|
|
8236
8288
|
dataSinkId: string;
|
|
@@ -8878,12 +8930,14 @@ export declare const DeleteWidgetActionDocument: DocumentNode<DeleteWidgetAction
|
|
|
8878
8930
|
export declare const DeleteWidgetDrilldownDocument: DocumentNode<DeleteWidgetDrilldownMutation, DeleteWidgetDrilldownMutationVariables>;
|
|
8879
8931
|
export declare const DuplicateWidgetDocument: DocumentNode<DuplicateWidgetMutation, DuplicateWidgetMutationVariables>;
|
|
8880
8932
|
export declare const EmitWidgetEventDocument: DocumentNode<EmitWidgetEventMutation, EmitWidgetEventMutationVariables>;
|
|
8933
|
+
export declare const InstallWidgetTypeDocument: DocumentNode<InstallWidgetTypeMutation, InstallWidgetTypeMutationVariables>;
|
|
8881
8934
|
export declare const MoveWidgetToPageDocument: DocumentNode<MoveWidgetToPageMutation, MoveWidgetToPageMutationVariables>;
|
|
8882
8935
|
export declare const RefreshWidgetDataDocument: DocumentNode<RefreshWidgetDataMutation, RefreshWidgetDataMutationVariables>;
|
|
8883
8936
|
export declare const ReorderWidgetActionsDocument: DocumentNode<ReorderWidgetActionsMutation, ReorderWidgetActionsMutationVariables>;
|
|
8884
8937
|
export declare const RetryEventDeliveryDocument: DocumentNode<RetryEventDeliveryMutation, RetryEventDeliveryMutationVariables>;
|
|
8885
8938
|
export declare const TestWebhookMappingDocument: DocumentNode<TestWebhookMappingMutation, TestWebhookMappingMutationVariables>;
|
|
8886
8939
|
export declare const ToggleEventWebhookMappingDocument: DocumentNode<ToggleEventWebhookMappingMutation, ToggleEventWebhookMappingMutationVariables>;
|
|
8940
|
+
export declare const UninstallWidgetTypeDocument: DocumentNode<UninstallWidgetTypeMutation, UninstallWidgetTypeMutationVariables>;
|
|
8887
8941
|
export declare const UpdateEventWebhookMappingDocument: DocumentNode<UpdateEventWebhookMappingMutation, UpdateEventWebhookMappingMutationVariables>;
|
|
8888
8942
|
export declare const UpdateWidgetDocument: DocumentNode<UpdateWidgetMutation, UpdateWidgetMutationVariables>;
|
|
8889
8943
|
export declare const UpdateWidgetActionDocument: DocumentNode<UpdateWidgetActionMutation, UpdateWidgetActionMutationVariables>;
|
|
@@ -8903,6 +8957,7 @@ export declare const ListEventWebhookMappingsDocument: DocumentNode<ListEventWeb
|
|
|
8903
8957
|
export declare const ListWidgetsDocument: DocumentNode<ListWidgetsQuery, ListWidgetsQueryVariables>;
|
|
8904
8958
|
export declare const ListWidgetsByDashboardDocument: DocumentNode<ListWidgetsByDashboardQuery, ListWidgetsByDashboardQueryVariables>;
|
|
8905
8959
|
export declare const ListWidgetsForPageDocument: DocumentNode<ListWidgetsForPageQuery, ListWidgetsForPageQueryVariables>;
|
|
8960
|
+
export declare const WidgetTypeCatalogDocument: DocumentNode<WidgetTypeCatalogQuery, WidgetTypeCatalogQueryVariables>;
|
|
8906
8961
|
export declare const CreateWorkflowDocument: DocumentNode<CreateWorkflowMutation, CreateWorkflowMutationVariables>;
|
|
8907
8962
|
export declare const DeleteWorkflowDocument: DocumentNode<DeleteWorkflowMutation, DeleteWorkflowMutationVariables>;
|
|
8908
8963
|
export declare const ExecuteWorkflowDocument: DocumentNode<ExecuteWorkflowMutation, ExecuteWorkflowMutationVariables>;
|