@devtable/dashboard 10.56.0 → 10.56.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.
- package/dist/components/panel/panel-render/full-screen-render/use-panel-full-screen.d.ts +284 -0
- package/dist/components/plugins/plugin-context.d.ts +300 -2
- package/dist/contexts/panel-context.d.ts +590 -8
- package/dist/dashboard-editor/model/panels/panel.d.ts +150 -1
- package/dist/dashboard.es.js +26 -11
- package/dist/dashboard.umd.js +68 -68
- package/dist/model/render-model/dashboard/content/panels/panel.d.ts +142 -0
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -1879,6 +1879,148 @@ export declare const PanelModel: import("mobx-state-tree").IModelType<{
|
|
|
1879
1879
|
} & {
|
|
1880
1880
|
afterCreate(): void;
|
|
1881
1881
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
|
|
1882
|
+
queryByID(queryID: string): ({
|
|
1883
|
+
id: string;
|
|
1884
|
+
name: string;
|
|
1885
|
+
type: import('../../../model').DataSourceType;
|
|
1886
|
+
key: string;
|
|
1887
|
+
sql: string;
|
|
1888
|
+
pre_process: string;
|
|
1889
|
+
post_process: string;
|
|
1890
|
+
run_by: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
1891
|
+
react_to: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
1892
|
+
state: string;
|
|
1893
|
+
data: (string[][] & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string[][] | number[][] | null | undefined, string[][] | number[][], string[][] | number[][]>, [undefined]>>) | (number[][] & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string[][] | number[][] | null | undefined, string[][] | number[][], string[][] | number[][]>, [undefined]>>);
|
|
1894
|
+
error: any;
|
|
1895
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
1896
|
+
readonly valid: boolean;
|
|
1897
|
+
readonly json: {
|
|
1898
|
+
id: string;
|
|
1899
|
+
key: string;
|
|
1900
|
+
sql: string;
|
|
1901
|
+
name: string;
|
|
1902
|
+
type: import('../../../model').DataSourceType;
|
|
1903
|
+
run_by: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
1904
|
+
react_to: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
1905
|
+
pre_process: string;
|
|
1906
|
+
post_process: string;
|
|
1907
|
+
};
|
|
1908
|
+
} & {
|
|
1909
|
+
setName(name: string): void;
|
|
1910
|
+
setKey(key: string): void;
|
|
1911
|
+
setType(type: import('../../../model').DataSourceType): void;
|
|
1912
|
+
setSQL(sql: string): void;
|
|
1913
|
+
setRunBy(v: string[]): void;
|
|
1914
|
+
setReactTo(v: string[]): void;
|
|
1915
|
+
setPreProcess(v: string): void;
|
|
1916
|
+
setPostProcess(v: string): void;
|
|
1917
|
+
} & {
|
|
1918
|
+
readonly rootModel: any;
|
|
1919
|
+
readonly contentModel: any;
|
|
1920
|
+
readonly conditionOptions: import("@mantine/core").SelectItem[];
|
|
1921
|
+
readonly unmetRunByConditions: string[];
|
|
1922
|
+
} & {
|
|
1923
|
+
readonly payload: any;
|
|
1924
|
+
readonly formattedSQL: any;
|
|
1925
|
+
readonly httpConfigString: string;
|
|
1926
|
+
readonly typedAsSQL: boolean;
|
|
1927
|
+
readonly typedAsHTTP: boolean;
|
|
1928
|
+
readonly reQueryKey: string;
|
|
1929
|
+
readonly runByConditionsMet: boolean;
|
|
1930
|
+
readonly conditionNames: {
|
|
1931
|
+
context: string[];
|
|
1932
|
+
filters: any[];
|
|
1933
|
+
};
|
|
1934
|
+
readonly queries: any;
|
|
1935
|
+
readonly inUse: any;
|
|
1936
|
+
readonly dependencies: import("../../../utils/usage").DependencyInfo[];
|
|
1937
|
+
} & {
|
|
1938
|
+
readonly datasource: any;
|
|
1939
|
+
readonly additionalQueryInfo: import("../../..").TAdditionalQueryInfo;
|
|
1940
|
+
} & {
|
|
1941
|
+
readonly stateMessage: string;
|
|
1942
|
+
} & {
|
|
1943
|
+
controller: AbortController;
|
|
1944
|
+
} & {
|
|
1945
|
+
runSQL: () => Promise<void>;
|
|
1946
|
+
runHTTP: () => Promise<void>;
|
|
1947
|
+
} & {
|
|
1948
|
+
fetchData: (force: boolean) => Promise<void> | undefined;
|
|
1949
|
+
beforeDestroy(): void;
|
|
1950
|
+
} & {
|
|
1951
|
+
afterCreate(): void;
|
|
1952
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
1953
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
1954
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
1955
|
+
type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType>;
|
|
1956
|
+
key: import("mobx-state-tree").ISimpleType<string>;
|
|
1957
|
+
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
1958
|
+
pre_process: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1959
|
+
post_process: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1960
|
+
run_by: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
1961
|
+
react_to: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
1962
|
+
} & {
|
|
1963
|
+
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1964
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string[][] | number[][] | null | undefined, string[][] | number[][], string[][] | number[][]>, [undefined]>;
|
|
1965
|
+
error: import("mobx-state-tree").IType<any, any, any>;
|
|
1966
|
+
}, {
|
|
1967
|
+
readonly valid: boolean;
|
|
1968
|
+
readonly json: {
|
|
1969
|
+
id: string;
|
|
1970
|
+
key: string;
|
|
1971
|
+
sql: string;
|
|
1972
|
+
name: string;
|
|
1973
|
+
type: import('../../../model').DataSourceType;
|
|
1974
|
+
run_by: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
1975
|
+
react_to: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
1976
|
+
pre_process: string;
|
|
1977
|
+
post_process: string;
|
|
1978
|
+
};
|
|
1979
|
+
} & {
|
|
1980
|
+
setName(name: string): void;
|
|
1981
|
+
setKey(key: string): void;
|
|
1982
|
+
setType(type: import('../../../model').DataSourceType): void;
|
|
1983
|
+
setSQL(sql: string): void;
|
|
1984
|
+
setRunBy(v: string[]): void;
|
|
1985
|
+
setReactTo(v: string[]): void;
|
|
1986
|
+
setPreProcess(v: string): void;
|
|
1987
|
+
setPostProcess(v: string): void;
|
|
1988
|
+
} & {
|
|
1989
|
+
readonly rootModel: any;
|
|
1990
|
+
readonly contentModel: any;
|
|
1991
|
+
readonly conditionOptions: import("@mantine/core").SelectItem[];
|
|
1992
|
+
readonly unmetRunByConditions: string[];
|
|
1993
|
+
} & {
|
|
1994
|
+
readonly payload: any;
|
|
1995
|
+
readonly formattedSQL: any;
|
|
1996
|
+
readonly httpConfigString: string;
|
|
1997
|
+
readonly typedAsSQL: boolean;
|
|
1998
|
+
readonly typedAsHTTP: boolean;
|
|
1999
|
+
readonly reQueryKey: string;
|
|
2000
|
+
readonly runByConditionsMet: boolean;
|
|
2001
|
+
readonly conditionNames: {
|
|
2002
|
+
context: string[];
|
|
2003
|
+
filters: any[];
|
|
2004
|
+
};
|
|
2005
|
+
readonly queries: any;
|
|
2006
|
+
readonly inUse: any;
|
|
2007
|
+
readonly dependencies: import("../../../utils/usage").DependencyInfo[];
|
|
2008
|
+
} & {
|
|
2009
|
+
readonly datasource: any;
|
|
2010
|
+
readonly additionalQueryInfo: import("../../..").TAdditionalQueryInfo;
|
|
2011
|
+
} & {
|
|
2012
|
+
readonly stateMessage: string;
|
|
2013
|
+
} & {
|
|
2014
|
+
controller: AbortController;
|
|
2015
|
+
} & {
|
|
2016
|
+
runSQL: () => Promise<void>;
|
|
2017
|
+
runHTTP: () => Promise<void>;
|
|
2018
|
+
} & {
|
|
2019
|
+
fetchData: (force: boolean) => Promise<void> | undefined;
|
|
2020
|
+
beforeDestroy(): void;
|
|
2021
|
+
} & {
|
|
2022
|
+
afterCreate(): void;
|
|
2023
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
1882
2024
|
readonly data: TPanelData;
|
|
1883
2025
|
readonly variableStrings: Record<string, import('./react').ReactNode>;
|
|
1884
2026
|
readonly dataLoading: boolean;
|
|
@@ -2202,10 +2344,17 @@ export declare const PanelModel: import("mobx-state-tree").IModelType<{
|
|
|
2202
2344
|
};
|
|
2203
2345
|
downloadSchema(): void;
|
|
2204
2346
|
} & {
|
|
2205
|
-
readonly
|
|
2347
|
+
readonly realDataFieldOptions: {
|
|
2348
|
+
label: string;
|
|
2349
|
+
value: string;
|
|
2350
|
+
group: string;
|
|
2351
|
+
disabled: boolean;
|
|
2352
|
+
}[];
|
|
2353
|
+
dataFieldOptions(selected: TDataKey, clearable: boolean): {
|
|
2206
2354
|
label: string;
|
|
2207
2355
|
value: string;
|
|
2208
2356
|
group: string;
|
|
2357
|
+
disabled: boolean;
|
|
2209
2358
|
}[];
|
|
2210
2359
|
explainDataKey(dataKey: TDataKey): {
|
|
2211
2360
|
queryID: string;
|
package/dist/dashboard.es.js
CHANGED
|
@@ -1317,7 +1317,7 @@ class Mi {
|
|
|
1317
1317
|
}), this.instanceRegistry.clear(), this.factoryRegistry.clear();
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
const Xl = "10.56.
|
|
1320
|
+
const Xl = "10.56.1", nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1321
1321
|
__proto__: null,
|
|
1322
1322
|
version: Xl
|
|
1323
1323
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1653,14 +1653,7 @@ const G = k(de(({
|
|
|
1653
1653
|
}, l) => {
|
|
1654
1654
|
const {
|
|
1655
1655
|
panel: c
|
|
1656
|
-
} = It(), d = L.useMemo(() =>
|
|
1657
|
-
const u = [...c.dataFieldOptions];
|
|
1658
|
-
return i && u.unshift({
|
|
1659
|
-
label: "unset",
|
|
1660
|
-
value: "",
|
|
1661
|
-
group: ""
|
|
1662
|
-
}), u;
|
|
1663
|
-
}, [c.dataFieldOptions]);
|
|
1656
|
+
} = It(), d = L.useMemo(() => c.dataFieldOptions(n, i), [n, i]);
|
|
1664
1657
|
if (d.length === 0) {
|
|
1665
1658
|
const u = c.explainDataKey(n);
|
|
1666
1659
|
return /* @__PURE__ */ r.jsxs(Te, { shadow: "md", position: "bottom-start", withinPortal: !0, zIndex: 320, children: [
|
|
@@ -24795,6 +24788,9 @@ const Wd = pI.views((e) => ({
|
|
|
24795
24788
|
get queries() {
|
|
24796
24789
|
return e.contentModel.queries.findByIDSet(e.queryIDSet);
|
|
24797
24790
|
},
|
|
24791
|
+
queryByID(t) {
|
|
24792
|
+
return this.queries.find((n) => n.id === t);
|
|
24793
|
+
},
|
|
24798
24794
|
get data() {
|
|
24799
24795
|
return this.queries.reduce((t, n) => (t[n.id] = n.data, t), {});
|
|
24800
24796
|
},
|
|
@@ -26866,16 +26862,35 @@ const HD = f.model("EditorModel", {
|
|
|
26866
26862
|
n && e.setPath(n);
|
|
26867
26863
|
}
|
|
26868
26864
|
})), KD = Wd.views((e) => ({
|
|
26869
|
-
get
|
|
26865
|
+
get realDataFieldOptions() {
|
|
26870
26866
|
return e.queryIDs.length === 0 ? [] : e.queries.map((t) => {
|
|
26871
26867
|
const n = t.data;
|
|
26872
26868
|
return n.length === 0 ? [] : Object.keys(n[0]).map((i) => ({
|
|
26873
26869
|
label: i,
|
|
26874
26870
|
value: `${t.id}.${i}`,
|
|
26875
|
-
group: t.name
|
|
26871
|
+
group: t.name,
|
|
26872
|
+
disabled: !1
|
|
26876
26873
|
}));
|
|
26877
26874
|
}).flat();
|
|
26878
26875
|
},
|
|
26876
|
+
dataFieldOptions(t, n) {
|
|
26877
|
+
const s = [...this.realDataFieldOptions];
|
|
26878
|
+
if (t && !s.find((i) => i.value === t)) {
|
|
26879
|
+
const i = $(t), a = e.queryByID(i.queryID);
|
|
26880
|
+
s.unshift({
|
|
26881
|
+
label: i.columnKey,
|
|
26882
|
+
value: t,
|
|
26883
|
+
group: a ? a.name : i.queryID,
|
|
26884
|
+
disabled: !0
|
|
26885
|
+
});
|
|
26886
|
+
}
|
|
26887
|
+
return n && s.unshift({
|
|
26888
|
+
label: "unset",
|
|
26889
|
+
value: "",
|
|
26890
|
+
group: "",
|
|
26891
|
+
disabled: !1
|
|
26892
|
+
}), s;
|
|
26893
|
+
},
|
|
26879
26894
|
explainDataKey(t) {
|
|
26880
26895
|
const {
|
|
26881
26896
|
queryID: n,
|