@antelopejs/dms 0.20.8-next.924.g86a8e40 → 0.20.8-next.926.gdaa3203
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/implementations/dms-builder/database.d.ts +1 -2
- package/dist/implementations/dms-builder/database.js +0 -17
- package/dist/implementations/dms-builder/database.js.map +1 -1
- package/dist/implementations/dms-builder/engine/catalog-connection.d.ts +1 -1
- package/dist/implementations/dms-builder/engine/catalog-connection.js +0 -2
- package/dist/implementations/dms-builder/engine/catalog-connection.js.map +1 -1
- package/dist/implementations/dms-builder/index.d.ts +1 -2
- package/dist/implementations/dms-builder/index.js +0 -1
- package/dist/implementations/dms-builder/index.js.map +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/sortable/SortableList.vue +7 -12
- package/frontend-vue/layers/dms-ui/app/build/components/sortable/sortableGroup.ts +24 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuImport.vue +2 -3
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuRoot.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexRawOptions.ts +76 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/form/repeaterTable.ts +2 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableConfigClipboard.ts +2 -2
- package/frontend-vue/layers/dms-ui/app/components/chart/ApexChartHost.vue +7 -67
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRepeater.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +4 -1
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexAnnotations.ts +2 -2
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexPlotOptions.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.types.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/entries/components/sortable/SortableList.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnalysisState, CatalogConnectionEntry, DatabaseAccess, DatabaseCheckInput, DatabaseConnection, DatabaseProject, EntryConnection, OpResult, ProjectConfigOpts, ProjectConfigResult
|
|
1
|
+
import type { AnalysisState, CatalogConnectionEntry, DatabaseAccess, DatabaseCheckInput, DatabaseConnection, DatabaseProject, EntryConnection, OpResult, ProjectConfigOpts, ProjectConfigResult } from "@antelopejs/interface-dms-builder";
|
|
2
2
|
export declare function ListDatabaseConnections(): Promise<CatalogConnectionEntry[]>;
|
|
3
3
|
export declare function CheckDatabaseConnection(input: DatabaseCheckInput): Promise<OpResult<DatabaseAccess>>;
|
|
4
4
|
export declare function RepairDatabaseConnections(opts?: ProjectConfigOpts): Promise<OpResult<ProjectConfigResult>>;
|
|
@@ -9,5 +9,4 @@ export declare function SetDatabaseConnectionUrl(connection: string, url: string
|
|
|
9
9
|
variable: string;
|
|
10
10
|
}>>;
|
|
11
11
|
export declare function GetLatestAnalysis(connection: string): Promise<OpResult<AnalysisState>>;
|
|
12
|
-
export declare function SampleDatabaseRows(connection: string, request: RowSampleRequest): Promise<OpResult<RowSample>>;
|
|
13
12
|
export declare function ListEntryConnections(module: string): Promise<OpResult<EntryConnection[]>>;
|
|
@@ -8,7 +8,6 @@ exports.GetDatabaseConnection = GetDatabaseConnection;
|
|
|
8
8
|
exports.RemoveDatabaseConnection = RemoveDatabaseConnection;
|
|
9
9
|
exports.SetDatabaseConnectionUrl = SetDatabaseConnectionUrl;
|
|
10
10
|
exports.GetLatestAnalysis = GetLatestAnalysis;
|
|
11
|
-
exports.SampleDatabaseRows = SampleDatabaseRows;
|
|
12
11
|
exports.ListEntryConnections = ListEntryConnections;
|
|
13
12
|
const runtime_1 = require("@antelopejs/interface-core/runtime");
|
|
14
13
|
const analysis_job_1 = require("./engine/analysis-job");
|
|
@@ -104,22 +103,6 @@ async function SetDatabaseConnectionUrl(connection, url) {
|
|
|
104
103
|
async function GetLatestAnalysis(connection) {
|
|
105
104
|
return (0, analysis_job_1.latestAnalysis)(connection);
|
|
106
105
|
}
|
|
107
|
-
async function SampleDatabaseRows(connection, request) {
|
|
108
|
-
try {
|
|
109
|
-
const catalog = (0, catalog_connection_1.catalogOf)(connection);
|
|
110
|
-
if (!catalog) {
|
|
111
|
-
return (0, ops_1.notFound)(connection);
|
|
112
|
-
}
|
|
113
|
-
return succeeded(await catalog.SampleRows({
|
|
114
|
-
relation: request.relation,
|
|
115
|
-
columns: request.columns,
|
|
116
|
-
limit: request.limit,
|
|
117
|
-
}));
|
|
118
|
-
}
|
|
119
|
-
catch (error) {
|
|
120
|
-
return (0, ops_1.invalidConfig)(error instanceof Error ? error.message : String(error));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
106
|
async function ListEntryConnections(module) {
|
|
124
107
|
return (0, connection_access_config_1.withConnectionAccess)(() => (0, entry_connections_1.entryConnections)(module));
|
|
125
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../../src/implementations/dms-builder/database.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../../src/implementations/dms-builder/database.ts"],"names":[],"mappings":";;AAsEA,0DAQC;AAED,0DAIC;AAED,8DAIC;AAED,gDAcC;AAED,sDAcC;AAED,4DAKC;AAED,4DAKC;AAED,8CAIC;AAED,oDAIC;AApJD,gEAAoE;AAapE,wDAAuD;AACvD,oEAAgF;AAChF,wEAGuC;AACvC,sEAKsC;AACtC,oFAA+E;AAC/E,wDAAqD;AACrD,8DAAqE;AACrE,wDAAsD;AACtD,gFAAyE;AACzE,kEAA8D;AAC9D,8DAGkC;AAClC,8CAAuD;AACvD,sCAAuD;AACvD,8DAAuD;AAEvD,SAAS,SAAS,CAAI,IAAO;IAC3B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC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E,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AACxE,CAAC;AAEM,KAAK,UAAU,wBAAwB,CAC5C,UAAkB,EAClB,GAAW;IAEX,OAAO,IAAA,sCAAgB,EAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAC3C,CAAC;AAEM,KAAK,UAAU,iBAAiB,CACrC,UAAkB;IAElB,OAAO,IAAA,6BAAc,EAAC,UAAU,CAAC,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,oBAAoB,CACxC,MAAc;IAEd,OAAO,IAAA,+CAAoB,EAAC,GAAG,EAAE,CAAC,IAAA,oCAAgB,EAAC,MAAM,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Catalog from "@antelopejs/interface-database-catalog";
|
|
2
|
-
export type CatalogConnection = Pick<typeof Catalog, "Info" | "ListRelations" | "DescribeRelations" | "Profile" | "CheckReference"
|
|
2
|
+
export type CatalogConnection = Pick<typeof Catalog, "Info" | "ListRelations" | "DescribeRelations" | "Profile" | "CheckReference">;
|
|
3
3
|
export declare function listCatalogConnections(): string[];
|
|
4
4
|
export declare function catalogOf(id: string): CatalogConnection | undefined;
|
|
5
5
|
export declare function setCatalogConnectionsForTests(catalogs?: Record<string, Partial<CatalogConnection>>): void;
|
|
@@ -21,7 +21,6 @@ const CATALOG_FUNCTIONS = [
|
|
|
21
21
|
"DescribeRelations",
|
|
22
22
|
"Profile",
|
|
23
23
|
"CheckReference",
|
|
24
|
-
"SampleRows",
|
|
25
24
|
];
|
|
26
25
|
function isCatalogConnection(value) {
|
|
27
26
|
return ((0, guards_1.isIndexable)(value) &&
|
|
@@ -50,7 +49,6 @@ function specCatalog(supplied) {
|
|
|
50
49
|
DescribeRelations: unsupplied("DescribeRelations"),
|
|
51
50
|
Profile: unsupplied("Profile"),
|
|
52
51
|
CheckReference: unsupplied("CheckReference"),
|
|
53
|
-
SampleRows: unsupplied("SampleRows"),
|
|
54
52
|
...supplied,
|
|
55
53
|
};
|
|
56
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-connection.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/catalog-connection.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"catalog-connection.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/catalog-connection.ts"],"names":[],"mappings":";;AAsFA,wDAEC;AAGD,8BAEC;AAGD,sEAUC;AAxGD,qCAAmD;AACnD,mDAA6C;AAC7C,mDAAoD;AACpD,uDAAmD;AAEnD,SAAS,kBAAkB;IACzB,OAAO,IAAA,gCAAc,EAAC,iCAAiB,CAAC,CAAC;AAC3C,CAAC;AAcD,SAAS,mBAAmB;IAC1B,OAAO,kBAAkB,EAAE;SACxB,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;SAClC,MAAM,CAAC,CAAC,EAAE,EAAgB,EAAE,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,MAAM;IACN,eAAe;IACf,mBAAmB;IACnB,SAAS;IACT,gBAAgB;CACqB,CAAC;AAGxC,SAAS,mBAAmB,CAAC,KAAc;IACzC,OAAO,CACL,IAAA,oBAAW,EAAC,KAAK,CAAC;QAClB,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAU,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3D,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,MAAM,UAAU,GAAG,kBAAkB,EAAE,CAAC,IAAI,CAC1C,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CACnC,CAAC;IACF,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,S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AE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QACvE,CAAC,CAAC,eAAe,CAAC;AACtB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AddBlockInput, AnalyseDatabaseInput, AnalysisState, MappedRelation, MapResourcesInput, MapResourcesPreview, MapResourcesResult, ModuleEntryInput, ConfigureProjectOpts, CreateLocalModuleOpts, ProjectConfigOpts, ProjectConfigResult, ProjectConfigStep, AddQueryInput, BlockCatalog, ComposePageData, ComposePageInput, BlockPath, CategoryRef, CategorySummary, ConfigureBlock as ConfigureBlockContract, ConfigureBlockOpts, ConfigureTableViewOpts, TableViewSettings, CreateCategoryInput, CreatePageInput, CreateResourceInput, DataSourceDescriptor, DeleteResourceOpts, EditableCategoryMeta, EditablePageMeta, EditableResourceMeta, FieldAspects, FieldPath, FieldSpec, MoveDest, MutationOpts, OpResult, PageDraft, PageLayoutPreview, PageRef, PageStructure, PageSummary, QueryPreview, QueryPreviewRequest, QueryRef, QueryTemplateDescriptor, RefreshScope, ResourceFiles, ResourceRef, ResourceStructure, ResourceSummary, ThemeDraft, ThemeLayer, ThemeStructure } from "@antelopejs/interface-dms-builder";
|
|
2
|
-
import { CheckDatabaseConnection, GetDatabaseConnection, GetDatabaseProject, GetLatestAnalysis, ListDatabaseConnections, ListEntryConnections, RemoveDatabaseConnection, RepairDatabaseConnections,
|
|
2
|
+
import { CheckDatabaseConnection, GetDatabaseConnection, GetDatabaseProject, GetLatestAnalysis, ListDatabaseConnections, ListEntryConnections, RemoveDatabaseConnection, RepairDatabaseConnections, SetDatabaseConnectionUrl } from "./database";
|
|
3
3
|
export * from "./database";
|
|
4
4
|
export declare function ListPages(): Promise<PageSummary[]>;
|
|
5
5
|
export declare function ListCategories(): Promise<CategorySummary[]>;
|
|
@@ -122,7 +122,6 @@ export declare const Operations: {
|
|
|
122
122
|
RemoveField: typeof RemoveField;
|
|
123
123
|
RemoveQuery: typeof RemoveQuery;
|
|
124
124
|
RepairDatabaseConnections: typeof RepairDatabaseConnections;
|
|
125
|
-
SampleDatabaseRows: typeof SampleDatabaseRows;
|
|
126
125
|
SetDatabaseConnectionUrl: typeof SetDatabaseConnectionUrl;
|
|
127
126
|
SetPageBlocks: typeof SetPageBlocks;
|
|
128
127
|
SetTheme: typeof SetTheme;
|
|
@@ -285,7 +285,6 @@ exports.Operations = {
|
|
|
285
285
|
RemoveField,
|
|
286
286
|
RemoveQuery,
|
|
287
287
|
RepairDatabaseConnections: database_1.RepairDatabaseConnections,
|
|
288
|
-
SampleDatabaseRows: database_1.SampleDatabaseRows,
|
|
289
288
|
SetDatabaseConnectionUrl: database_1.SetDatabaseConnectionUrl,
|
|
290
289
|
SetPageBlocks,
|
|
291
290
|
SetTheme,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/dms-builder/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/dms-builder/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAiIA,8BAEC;AAED,wCAEC;AAED,gCAEC;AAED,0CAIC;AAED,4CAIC;AAED,sCAMC;AAED,oCAIC;AAED,sCAKC;AAED,gDAKC;AAED,gCAIC;AAED,sCAMC;AAED,gCAKC;AAED,wCAIC;AAED,8CAKC;AAED,wCAEC;AAED,4BAKC;AAED,wCAMC;AAED,8BAMC;AAED,kCAKC;AAED,oCAIC;AAED,kDAIC;AAED,0CAIC;AAED,kCAIC;AAED,gCAKC;AAUD,4CASC;AAUD,8BAMC;AAUD,0CAMC;AAUD,8CAWC;AAED,wCAIC;AAED,gDAMC;AAED,8CAMC;AAED,wCAKC;AAED,4BAMC;AAED,wCAMC;AAED,kCAKC;AAED,sCAEC;AAED,oDAIC;AAED,gDAIC;AAED,4BAMC;AAED,kC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;IACT,aAAa;IACb,YAAY;IACZ,kBAAkB;IAClB,WAAW;IACX,wBAAwB,EAAxB,mCAAwB;IACxB,WAAW;IACX,WAAW;IACX,yBAAyB,EAAzB,oCAAyB;IACzB,wBAAwB,EAAxB,mCAAwB;IACxB,aAAa;IACb,QAAQ;CAC0B,CAAC"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { useSortable } from "@vueuse/integrations/useSortable";
|
|
13
13
|
import { type VNode, ref, watch } from "vue";
|
|
14
|
+
import type { SortableGroup } from "./sortableGroup";
|
|
14
15
|
|
|
15
16
|
export interface SortableListChange<Item> {
|
|
16
17
|
added?: { element: Item; newIndex: number };
|
|
@@ -24,8 +25,8 @@ const list = defineModel<Item[]>("list", { required: true });
|
|
|
24
25
|
const props = defineProps<{
|
|
25
26
|
/** A stable key of an item: Vue keeps each element with its item. */
|
|
26
27
|
itemKey: (item: Item) => PropertyKey | undefined;
|
|
27
|
-
/** Lists
|
|
28
|
-
group?:
|
|
28
|
+
/** Lists given one group exchange items, the dragged one through it. */
|
|
29
|
+
group?: SortableGroup<Item>;
|
|
29
30
|
disabled?: boolean;
|
|
30
31
|
/** Only an item grabbed by an element matching this selector moves. */
|
|
31
32
|
handle?: string;
|
|
@@ -54,8 +55,6 @@ interface SortableEvent {
|
|
|
54
55
|
newIndex?: number;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
const draggedKey = () => props.group ?? "";
|
|
58
|
-
|
|
59
58
|
const root = ref<HTMLElement | null>(null);
|
|
60
59
|
|
|
61
60
|
/**
|
|
@@ -78,7 +77,7 @@ function without(index: number): [Item[], Item | undefined] {
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
const { option } = useSortable(root, list, {
|
|
81
|
-
group: props.group,
|
|
80
|
+
group: props.group?.name,
|
|
82
81
|
disabled: props.disabled,
|
|
83
82
|
handle: props.handle,
|
|
84
83
|
filter: props.filter,
|
|
@@ -93,7 +92,7 @@ const { option } = useSortable(root, list, {
|
|
|
93
92
|
const { parentNode, nextSibling } = event.item;
|
|
94
93
|
origin = parentNode ? { parent: parentNode, next: nextSibling } : undefined;
|
|
95
94
|
const element = list.value[event.oldIndex ?? -1];
|
|
96
|
-
|
|
95
|
+
props.group?.hold(element);
|
|
97
96
|
},
|
|
98
97
|
onUpdate: (event: SortableEvent) => {
|
|
99
98
|
const { oldIndex, newIndex } = event;
|
|
@@ -106,7 +105,7 @@ const { option } = useSortable(root, list, {
|
|
|
106
105
|
emit("change", { moved: { element, oldIndex, newIndex } });
|
|
107
106
|
},
|
|
108
107
|
onAdd: (event: SortableEvent) => {
|
|
109
|
-
const element =
|
|
108
|
+
const element = props.group?.held();
|
|
110
109
|
const { newIndex } = event;
|
|
111
110
|
if (element === undefined || newIndex === undefined) return;
|
|
112
111
|
|
|
@@ -127,7 +126,7 @@ const { option } = useSortable(root, list, {
|
|
|
127
126
|
},
|
|
128
127
|
onEnd: () => {
|
|
129
128
|
origin = undefined;
|
|
130
|
-
|
|
129
|
+
props.group?.hold(undefined);
|
|
131
130
|
},
|
|
132
131
|
});
|
|
133
132
|
|
|
@@ -137,10 +136,6 @@ watch(
|
|
|
137
136
|
);
|
|
138
137
|
</script>
|
|
139
138
|
|
|
140
|
-
<script lang="ts">
|
|
141
|
-
const sharedDragged = new Map<string, unknown>();
|
|
142
|
-
</script>
|
|
143
|
-
|
|
144
139
|
<template>
|
|
145
140
|
<div ref="root">
|
|
146
141
|
<template v-for="(element, index) in list" :key="itemKey(element)">
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lists that exchange items, typed by their item: SortableJS moves an
|
|
3
|
+
* element between them, and the group carries the item it stands for.
|
|
4
|
+
*/
|
|
5
|
+
export interface SortableGroup<Item> {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
hold: (item: Item | undefined) => void;
|
|
8
|
+
held: () => Item | undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let groupCount = 0;
|
|
12
|
+
|
|
13
|
+
/** A new group, for every list that is to exchange items with the others. */
|
|
14
|
+
export function sortableGroup<Item>(): SortableGroup<Item> {
|
|
15
|
+
groupCount += 1;
|
|
16
|
+
let dragged: Item | undefined;
|
|
17
|
+
return {
|
|
18
|
+
name: `dms-sortable-${groupCount}`,
|
|
19
|
+
hold: (item) => {
|
|
20
|
+
dragged = item;
|
|
21
|
+
},
|
|
22
|
+
held: () => dragged,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
<script setup lang="ts"
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { themeOverride } from "./tableComponentTheme";
|
|
3
3
|
import { tv } from "tailwind-variants";
|
|
4
|
-
import type { Data } from "./TableRoot.vue";
|
|
5
4
|
import { useTableConfigClipboard } from "../../composables/table/useTableConfigClipboard";
|
|
6
5
|
|
|
7
6
|
export interface MenuImportEmits {
|
|
@@ -21,7 +20,7 @@ const theme = tv({
|
|
|
21
20
|
const emits = defineEmits<MenuImportEmits>();
|
|
22
21
|
const { t } = useI18n();
|
|
23
22
|
|
|
24
|
-
const { importConfig } = useTableConfigClipboard
|
|
23
|
+
const { importConfig } = useTableConfigClipboard();
|
|
25
24
|
|
|
26
25
|
const code = ref("");
|
|
27
26
|
|
|
@@ -34,7 +34,7 @@ const appConfig = useDmsAppConfig();
|
|
|
34
34
|
const tableSharedData =
|
|
35
35
|
injectLocal<ShallowRef<TableSharedData<T>>>("tableSharedData");
|
|
36
36
|
|
|
37
|
-
const { exportConfig } = useTableConfigClipboard
|
|
37
|
+
const { exportConfig } = useTableConfigClipboard();
|
|
38
38
|
|
|
39
39
|
const navItems = computed((): NavItem[] => {
|
|
40
40
|
const capabilities = tableSharedData?.value?.activeCapabilities.value;
|
|
@@ -1,12 +1,42 @@
|
|
|
1
|
+
import type { ApexOptions } from "apexcharts";
|
|
2
|
+
import { toRaw } from "vue";
|
|
1
3
|
import {
|
|
4
|
+
isBigint,
|
|
2
5
|
isBoolean,
|
|
6
|
+
isFunction,
|
|
7
|
+
isNull,
|
|
3
8
|
isNumber,
|
|
4
9
|
isObject,
|
|
5
10
|
isString,
|
|
11
|
+
isSymbol,
|
|
12
|
+
isUndefined,
|
|
6
13
|
} from "../../../../../dms-core/app/utils/type-check";
|
|
7
14
|
import type { UseApexChartInput } from "../../../composables/chart/useApexChart.types";
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
type ApexFunction = typeof isFunction extends (
|
|
17
|
+
value: unknown,
|
|
18
|
+
) => value is infer F
|
|
19
|
+
? F
|
|
20
|
+
: never;
|
|
21
|
+
|
|
22
|
+
/** A value Apex is handed: its options and series, formatters and dates included. */
|
|
23
|
+
export type ApexInput =
|
|
24
|
+
| string
|
|
25
|
+
| number
|
|
26
|
+
| boolean
|
|
27
|
+
| bigint
|
|
28
|
+
| symbol
|
|
29
|
+
| null
|
|
30
|
+
| undefined
|
|
31
|
+
| Date
|
|
32
|
+
| ApexFunction
|
|
33
|
+
| ApexInput[]
|
|
34
|
+
| RawOptionSection;
|
|
35
|
+
|
|
36
|
+
/** A section of Apex's options (`chart`, `xaxis`, …), or the options themselves. */
|
|
37
|
+
export interface RawOptionSection {
|
|
38
|
+
[option: string]: ApexInput;
|
|
39
|
+
}
|
|
10
40
|
|
|
11
41
|
/** A value an override is written as: JSON, or the text itself when it is not JSON. */
|
|
12
42
|
type RawOptionJson =
|
|
@@ -14,7 +44,7 @@ type RawOptionJson =
|
|
|
14
44
|
| number
|
|
15
45
|
| boolean
|
|
16
46
|
| null
|
|
17
|
-
|
|
|
47
|
+
| RawOptionJson[]
|
|
18
48
|
| { readonly [option: string]: RawOptionJson };
|
|
19
49
|
|
|
20
50
|
const RAW_OPTION_PATH_SEPARATOR = ".";
|
|
@@ -41,7 +71,43 @@ function parseRawOptionValue(value: string): RawOptionJson {
|
|
|
41
71
|
}
|
|
42
72
|
}
|
|
43
73
|
|
|
44
|
-
function
|
|
74
|
+
function isApexLeaf(
|
|
75
|
+
value: unknown,
|
|
76
|
+
): value is Exclude<ApexInput, ApexInput[] | RawOptionSection> {
|
|
77
|
+
return (
|
|
78
|
+
isString(value) ||
|
|
79
|
+
isNumber(value) ||
|
|
80
|
+
isBoolean(value) ||
|
|
81
|
+
isBigint(value) ||
|
|
82
|
+
isSymbol(value) ||
|
|
83
|
+
isNull(value) ||
|
|
84
|
+
isUndefined(value) ||
|
|
85
|
+
isFunction(value) ||
|
|
86
|
+
value instanceof Date
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A plain copy of a value handed to Apex, out of any Vue proxy. Functions
|
|
92
|
+
* (formatters, event handlers) and dates are kept as they are.
|
|
93
|
+
*/
|
|
94
|
+
// oxlint-disable-next-line anti-slop/no-unknown-parameters -- Recursive copy of the untyped series and Apex options: each nested value it walks is only known once isApexLeaf, Array.isArray or isObject classifies it.
|
|
95
|
+
export function toApexInput(value: unknown): ApexInput {
|
|
96
|
+
const raw = toRaw(value);
|
|
97
|
+
if (isApexLeaf(raw)) return raw;
|
|
98
|
+
if (Array.isArray(raw)) {
|
|
99
|
+
return raw.map((entry) => toApexInput(entry));
|
|
100
|
+
}
|
|
101
|
+
const copy: RawOptionSection = {};
|
|
102
|
+
if (isObject(raw)) {
|
|
103
|
+
for (const [key, entry] of Object.entries(raw)) {
|
|
104
|
+
copy[key] = toApexInput(entry);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return copy;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function isOptionSection(value: ApexInput): value is RawOptionSection {
|
|
45
111
|
return isObject(value) && value !== null && !Array.isArray(value);
|
|
46
112
|
}
|
|
47
113
|
|
|
@@ -50,7 +116,7 @@ function setOptionPath(
|
|
|
50
116
|
options: RawOptionSection,
|
|
51
117
|
path: string[],
|
|
52
118
|
value: RawOptionJson,
|
|
53
|
-
):
|
|
119
|
+
): RawOptionSection {
|
|
54
120
|
const [head, ...rest] = path;
|
|
55
121
|
if (head === undefined) return options;
|
|
56
122
|
if (rest.length === 0) return { ...options, [head]: value };
|
|
@@ -61,9 +127,13 @@ function setOptionPath(
|
|
|
61
127
|
|
|
62
128
|
/** Applies raw overrides without mutating generated options. */
|
|
63
129
|
export function injectRawOptions(
|
|
64
|
-
options:
|
|
130
|
+
options: ApexOptions,
|
|
65
131
|
rawOptions: UseApexChartInput["rawOptions"],
|
|
66
132
|
): RawOptionSection {
|
|
133
|
+
const copy: RawOptionSection = {};
|
|
134
|
+
for (const [key, entry] of Object.entries(options)) {
|
|
135
|
+
copy[key] = toApexInput(entry);
|
|
136
|
+
}
|
|
67
137
|
return (rawOptions ?? []).reduce(
|
|
68
138
|
(merged, entry) =>
|
|
69
139
|
setOptionPath(
|
|
@@ -71,6 +141,6 @@ export function injectRawOptions(
|
|
|
71
141
|
entry.key.split(RAW_OPTION_PATH_SEPARATOR),
|
|
72
142
|
parseRawOptionValue(entry.value),
|
|
73
143
|
),
|
|
74
|
-
|
|
144
|
+
copy,
|
|
75
145
|
);
|
|
76
146
|
}
|
|
@@ -11,7 +11,7 @@ export interface RepeaterTableColumn {
|
|
|
11
11
|
id: string;
|
|
12
12
|
label?: string;
|
|
13
13
|
type?: string;
|
|
14
|
-
component: ComponentInfo
|
|
14
|
+
component: ComponentInfo<ComponentOptionsData>;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/** Where a relation column reads the rows its values name. */
|
|
@@ -31,7 +31,7 @@ export function renderableColumn(
|
|
|
31
31
|
compareModes: [],
|
|
32
32
|
filterComponents: {},
|
|
33
33
|
|
|
34
|
-
inputComponent: column.component
|
|
34
|
+
inputComponent: column.component,
|
|
35
35
|
};
|
|
36
36
|
return { id: column.id, type };
|
|
37
37
|
}
|
|
@@ -108,9 +108,9 @@ const decodeConfig = (code: string): SerializedTableConfig => {
|
|
|
108
108
|
return parsed;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
export const useTableConfigClipboard =
|
|
111
|
+
export const useTableConfigClipboard = () => {
|
|
112
112
|
const tableSharedData =
|
|
113
|
-
injectLocal<ShallowRef<TableSharedData<
|
|
113
|
+
injectLocal<ShallowRef<TableSharedData<Data>>>("tableSharedData");
|
|
114
114
|
const toast = useToast();
|
|
115
115
|
const { t } = useI18n();
|
|
116
116
|
const presenter = useApiErrorPresenter();
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
isBigint,
|
|
4
|
-
isBoolean,
|
|
5
|
-
isFunction,
|
|
6
|
-
isNull,
|
|
7
|
-
isNumber,
|
|
8
|
-
isObject,
|
|
9
|
-
isString,
|
|
10
|
-
isSymbol,
|
|
11
|
-
isUndefined,
|
|
12
|
-
} from "../../../../dms-core/app/utils/type-check";
|
|
2
|
+
import { isNull, isObject } from "../../../../dms-core/app/utils/type-check";
|
|
13
3
|
import {
|
|
14
4
|
computed,
|
|
15
5
|
defineAsyncComponent,
|
|
@@ -18,12 +8,15 @@ import {
|
|
|
18
8
|
onMounted,
|
|
19
9
|
ref,
|
|
20
10
|
shallowRef,
|
|
21
|
-
toRaw,
|
|
22
11
|
watch,
|
|
23
12
|
type Component,
|
|
24
13
|
} from "vue";
|
|
25
14
|
import type { VueApexChartsComponentMethods } from "vue3-apexcharts";
|
|
26
|
-
import
|
|
15
|
+
import {
|
|
16
|
+
type ApexInput,
|
|
17
|
+
type RawOptionSection,
|
|
18
|
+
toApexInput,
|
|
19
|
+
} from "../../build/composables/chart/apexRawOptions";
|
|
27
20
|
import { ensureApexLocale } from "../../composables/chart/apexLocales";
|
|
28
21
|
|
|
29
22
|
interface Props {
|
|
@@ -89,67 +82,14 @@ onBeforeUnmount(() => {
|
|
|
89
82
|
hostResizes?.disconnect();
|
|
90
83
|
});
|
|
91
84
|
|
|
92
|
-
type ApexFunction = typeof isFunction extends (
|
|
93
|
-
value: unknown,
|
|
94
|
-
) => value is infer F
|
|
95
|
-
? F
|
|
96
|
-
: never;
|
|
97
|
-
|
|
98
|
-
/** A value Apex is handed: its options and series, formatters and dates included. */
|
|
99
|
-
type ApexInput =
|
|
100
|
-
| string
|
|
101
|
-
| number
|
|
102
|
-
| boolean
|
|
103
|
-
| bigint
|
|
104
|
-
| symbol
|
|
105
|
-
| null
|
|
106
|
-
| undefined
|
|
107
|
-
| Date
|
|
108
|
-
| ApexFunction
|
|
109
|
-
| ApexInput[]
|
|
110
|
-
| { [key: string]: ApexInput };
|
|
111
|
-
|
|
112
|
-
function isApexLeaf(
|
|
113
|
-
value: unknown,
|
|
114
|
-
): value is Exclude<ApexInput, ApexInput[] | { [key: string]: ApexInput }> {
|
|
115
|
-
return (
|
|
116
|
-
isString(value) ||
|
|
117
|
-
isNumber(value) ||
|
|
118
|
-
isBoolean(value) ||
|
|
119
|
-
isBigint(value) ||
|
|
120
|
-
isSymbol(value) ||
|
|
121
|
-
isNull(value) ||
|
|
122
|
-
isUndefined(value) ||
|
|
123
|
-
isFunction(value) ||
|
|
124
|
-
value instanceof Date
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
85
|
/**
|
|
129
86
|
* A plain, non-reactive copy of a value handed to Apex. Apex writes into the
|
|
130
87
|
* series and options it is given, and the wrapper deep-watches its `series`
|
|
131
88
|
* prop: a reactive series (fetched data, a card's reactive context) turns
|
|
132
89
|
* each of Apex's own writes into another update, until Vue gives up with
|
|
133
90
|
* "Maximum recursive updates". A copy Apex may scribble on, marked raw so the
|
|
134
|
-
* deep watcher only reacts to a new series, breaks that loop.
|
|
135
|
-
* (formatters, event handlers) and dates are kept as they are.
|
|
91
|
+
* deep watcher only reacts to a new series, breaks that loop.
|
|
136
92
|
*/
|
|
137
|
-
// oxlint-disable-next-line anti-slop/no-unknown-parameters -- Recursive copy of the untyped Props.series and RawOptionSection values: each nested value it walks is only known once isApexLeaf, Array.isArray or isObject classifies it.
|
|
138
|
-
function toApexInput(value: unknown): ApexInput {
|
|
139
|
-
const raw = toRaw(value);
|
|
140
|
-
if (isApexLeaf(raw)) return raw;
|
|
141
|
-
if (Array.isArray(raw)) {
|
|
142
|
-
return raw.map((entry) => toApexInput(entry));
|
|
143
|
-
}
|
|
144
|
-
const copy: { [key: string]: ApexInput } = {};
|
|
145
|
-
if (isObject(raw)) {
|
|
146
|
-
for (const [key, entry] of Object.entries(raw)) {
|
|
147
|
-
copy[key] = toApexInput(entry);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return copy;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
93
|
// oxlint-disable-next-line anti-slop/no-unknown-parameters -- Takes Props.series, which the component declares unknown, and the RawOptionSection options, and hands both to toApexInput.
|
|
154
94
|
function rawApexInput(value: unknown): ApexInput {
|
|
155
95
|
const copy = toApexInput(value);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { ComponentOptionsData } from "#dms-core/app/types/component";
|
|
2
3
|
import type { ComponentInfo } from "#dms-core/app/types/page";
|
|
3
4
|
import { EYEBROW_CLASS } from "../../../build/utils/eyebrow";
|
|
4
5
|
import {
|
|
@@ -15,7 +16,7 @@ interface RepeaterColumn {
|
|
|
15
16
|
id: string;
|
|
16
17
|
label?: string;
|
|
17
18
|
type?: string;
|
|
18
|
-
component: ComponentInfo
|
|
19
|
+
component: ComponentInfo<ComponentOptionsData>;
|
|
19
20
|
required?: boolean;
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { ComponentOptionsData } from "#dms-core/app/types/component";
|
|
2
3
|
import type { ComponentInfo } from "#dms-core/app/types/page";
|
|
3
4
|
import { useControlError } from "../../../composables/form/useControlError";
|
|
4
5
|
import {
|
|
@@ -11,7 +12,7 @@ import DmsInputRepeater from "./InputRepeater.vue";
|
|
|
11
12
|
|
|
12
13
|
interface KeyValueColumn {
|
|
13
14
|
type?: string;
|
|
14
|
-
component: ComponentInfo
|
|
15
|
+
component: ComponentInfo<ComponentOptionsData>;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
interface KeyValueProps {
|
|
@@ -6,6 +6,7 @@ import type { RowActionConfig } from "#dms-core/app/types/row-action";
|
|
|
6
6
|
import SortableList, {
|
|
7
7
|
type SortableListChange,
|
|
8
8
|
} from "../../build/components/sortable/SortableList.vue";
|
|
9
|
+
import { sortableGroup } from "../../build/components/sortable/sortableGroup";
|
|
9
10
|
import {
|
|
10
11
|
AccessMode,
|
|
11
12
|
type TableViewColumn,
|
|
@@ -311,6 +312,8 @@ const notifyMoveError = (error: Parameters<typeof presentError>[0]) => {
|
|
|
311
312
|
);
|
|
312
313
|
};
|
|
313
314
|
|
|
315
|
+
const columnGroup = sortableGroup<T>();
|
|
316
|
+
|
|
314
317
|
const onColumnChange = async (
|
|
315
318
|
target: KanbanColumnDef,
|
|
316
319
|
event: SortableListChange<T>,
|
|
@@ -488,7 +491,7 @@ const FieldValue = (fieldProps: { column: TableViewColumn; item: T }) =>
|
|
|
488
491
|
<SortableList
|
|
489
492
|
v-else
|
|
490
493
|
:list="cells[col.value]?.items ?? []"
|
|
491
|
-
:group="
|
|
494
|
+
:group="columnGroup"
|
|
492
495
|
:disabled="!isDragEnabled"
|
|
493
496
|
:item-key="getRowId"
|
|
494
497
|
filter=".kanban-card-locked"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChartAnnotation } from "./types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ApexOptions } from "apexcharts";
|
|
3
3
|
import { resolveChartColor } from "./useChartTheme";
|
|
4
4
|
|
|
5
5
|
const ANNOTATION_DASH = 4;
|
|
@@ -69,7 +69,7 @@ function buildYAxisAnnotation(
|
|
|
69
69
|
|
|
70
70
|
export function buildAnnotations(
|
|
71
71
|
annotations: ChartAnnotation[] | undefined,
|
|
72
|
-
):
|
|
72
|
+
): NonNullable<ApexOptions["annotations"]> | null {
|
|
73
73
|
if (!annotations || annotations.length === 0) return null;
|
|
74
74
|
return { yaxis: annotations.map(buildYAxisAnnotation) };
|
|
75
75
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ApexOptions } from "apexcharts";
|
|
2
2
|
import type { UseApexChartInput } from "./useApexChart.types";
|
|
3
3
|
import type { ChartType } from "./types";
|
|
4
|
-
import type { RawOptionSection } from "../../build/composables/chart/apexRawOptions";
|
|
5
4
|
import {
|
|
6
5
|
readThemeDimmed,
|
|
7
6
|
readThemeHighlighted,
|
|
@@ -138,6 +137,6 @@ const PLOT_BUILDERS: Partial<Record<ChartType, PlotBuilder>> = {
|
|
|
138
137
|
heatmap: buildHeatmapPlot,
|
|
139
138
|
};
|
|
140
139
|
|
|
141
|
-
export function buildPlotOptions(input: UseApexChartInput):
|
|
140
|
+
export function buildPlotOptions(input: UseApexChartInput): PlotOptions {
|
|
142
141
|
return PLOT_BUILDERS[input.type]?.(input) ?? {};
|
|
143
142
|
}
|
|
@@ -82,7 +82,7 @@ export interface UseApexChartInput {
|
|
|
82
82
|
export interface UseApexChartOutput {
|
|
83
83
|
apexType: ComputedRef<string>;
|
|
84
84
|
options: ComputedRef<RawOptionSection>;
|
|
85
|
-
series: ComputedRef<
|
|
85
|
+
series: ComputedRef<number[] | ChartSeries[]>;
|
|
86
86
|
/**
|
|
87
87
|
* The index, in the series as given, of the point Apex drew at
|
|
88
88
|
* `dataPointIndex` (they differ when the chart lays dates out in buckets).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms",
|
|
3
|
-
"version": "0.20.8-next.
|
|
3
|
+
"version": "0.20.8-next.926.gdaa3203",
|
|
4
4
|
"description": "AntelopeJS DMS. Plug in your PostgreSQL, MySQL, MariaDB, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"optional": true
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
|
-
"gitHead": "
|
|
199
|
+
"gitHead": "daa3203f433e0985e65a61e91f3e51295204890a",
|
|
200
200
|
"scripts": {
|
|
201
201
|
"build": "pnpm --filter @antelopejs/interface-dms --filter @antelopejs/interface-dms-builder build && rimraf dist && tsc && tsc-alias",
|
|
202
202
|
"dev": "ajs project run --inspect -w -p playground",
|