@devtable/dashboard 10.30.0 → 10.31.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.
@@ -4,7 +4,7 @@ export declare type NavActionType = {
4
4
  label: string;
5
5
  value: string;
6
6
  _type: 'ACTION';
7
- _action_type: '_Add_A_Filter_' | '_Add_A_SQL_SNIPPET_' | '_Add_A_QUERY_' | '_Add_A_VIEW_' | '_Add_A_PANEL_';
7
+ _action_type: '_Add_A_Filter_' | '_Add_A_SQL_SNIPPET_' | '_Add_A_QUERY_' | '_Add_A_VIEW_' | '_Add_A_PANEL_' | '_QUERIES_SETTINGS_';
8
8
  parentID?: string;
9
9
  Icon: null;
10
10
  children: null;
@@ -18,7 +18,7 @@ export declare type NavLinkType = {
18
18
  children?: NavOptionType[];
19
19
  };
20
20
  export declare type NavOptionType = NavLinkType | NavActionType;
21
- export declare type ValidEditorPathType = ['_QUERY_VARS_'] | ['_MOCK_CONTEXT_'] | ['_FILTERS_', string] | ['_SQL_SNIPPETS_', string] | ['_QUERIES_', string] | ['_VIEWS_', string] | ['_VIEWS_', string, '_PANELS_', string] | [];
21
+ export declare type ValidEditorPathType = ['_QUERY_VARS_'] | ['_MOCK_CONTEXT_'] | ['_FILTERS_', string] | ['_SQL_SNIPPETS_', string] | ['_QUERIES_'] | ['_QUERIES_', string] | ['_VIEWS_', string] | ['_VIEWS_', string, '_PANELS_', string] | [];
22
22
  export declare const EditorModel: import("mobx-state-tree").IModelType<{
23
23
  path: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<ValidEditorPathType, ValidEditorPathType, ValidEditorPathType>, [undefined]>;
24
24
  settings_open: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
@@ -359,11 +359,144 @@ export declare const QueriesModel: import("mobx-state-tree").IModelType<{
359
359
  readonly label: string;
360
360
  readonly _type: "query";
361
361
  }[];
362
+ readonly sortedList: ({
363
+ id: string;
364
+ name: string;
365
+ type: import("~/model").DataSourceType;
366
+ key: string;
367
+ sql: string;
368
+ pre_process: string;
369
+ post_process: string;
370
+ 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]>>;
371
+ 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]>>;
372
+ state: "error" | "loading" | "idle";
373
+ 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]>>);
374
+ error: any;
375
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
376
+ readonly valid: boolean;
377
+ readonly json: {
378
+ id: string;
379
+ key: string;
380
+ sql: string;
381
+ name: string;
382
+ type: import("~/model").DataSourceType;
383
+ 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]>>;
384
+ 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]>>;
385
+ pre_process: string;
386
+ post_process: string;
387
+ };
388
+ } & {
389
+ setName(name: string): void;
390
+ setKey(key: string): void;
391
+ setType(type: import("~/model").DataSourceType): void;
392
+ setSQL(sql: string): void;
393
+ setRunBy(v: string[]): void;
394
+ setReactTo(v: string[]): void;
395
+ setPreProcess(v: string): void;
396
+ setPostProcess(v: string): void;
397
+ } & {
398
+ readonly conditionOptions: import("@mantine/core").SelectItem[];
399
+ readonly unmetRunByConditions: string[];
400
+ } & {
401
+ readonly reQueryKey: string;
402
+ readonly runByConditionsMet: boolean;
403
+ readonly conditionNames: {
404
+ context: string[];
405
+ filters: any[];
406
+ };
407
+ readonly queries: any;
408
+ readonly inUse: any;
409
+ } & {
410
+ readonly formattedSQL: any;
411
+ readonly typedAsSQL: boolean;
412
+ readonly typedAsHTTP: boolean;
413
+ readonly datasource: any;
414
+ readonly httpConfigString: string;
415
+ } & {
416
+ readonly stateMessage: string;
417
+ } & {
418
+ controller: AbortController;
419
+ } & {
420
+ runSQL: () => Promise<void>;
421
+ runHTTP: () => Promise<void>;
422
+ } & {
423
+ fetchData: () => Promise<void>;
424
+ beforeDestroy(): void;
425
+ } & {
426
+ afterCreate(): void;
427
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
428
+ id: import("mobx-state-tree").ISimpleType<string>;
429
+ name: import("mobx-state-tree").ISimpleType<string>;
430
+ type: import("mobx-state-tree").ISimpleType<import("~/model").DataSourceType>;
431
+ key: import("mobx-state-tree").ISimpleType<string>;
432
+ sql: import("mobx-state-tree").ISimpleType<string>;
433
+ pre_process: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
434
+ post_process: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
435
+ run_by: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
436
+ react_to: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
437
+ } & {
438
+ state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"error" | "loading" | "idle">, [undefined]>;
439
+ data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string[][] | number[][] | null | undefined, string[][] | number[][], string[][] | number[][]>, [undefined]>;
440
+ error: import("mobx-state-tree").IType<any, any, any>;
441
+ }, {
442
+ readonly valid: boolean;
443
+ readonly json: {
444
+ id: string;
445
+ key: string;
446
+ sql: string;
447
+ name: string;
448
+ type: import("~/model").DataSourceType;
449
+ 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]>>;
450
+ 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]>>;
451
+ pre_process: string;
452
+ post_process: string;
453
+ };
454
+ } & {
455
+ setName(name: string): void;
456
+ setKey(key: string): void;
457
+ setType(type: import("~/model").DataSourceType): void;
458
+ setSQL(sql: string): void;
459
+ setRunBy(v: string[]): void;
460
+ setReactTo(v: string[]): void;
461
+ setPreProcess(v: string): void;
462
+ setPostProcess(v: string): void;
463
+ } & {
464
+ readonly conditionOptions: import("@mantine/core").SelectItem[];
465
+ readonly unmetRunByConditions: string[];
466
+ } & {
467
+ readonly reQueryKey: string;
468
+ readonly runByConditionsMet: boolean;
469
+ readonly conditionNames: {
470
+ context: string[];
471
+ filters: any[];
472
+ };
473
+ readonly queries: any;
474
+ readonly inUse: any;
475
+ } & {
476
+ readonly formattedSQL: any;
477
+ readonly typedAsSQL: boolean;
478
+ readonly typedAsHTTP: boolean;
479
+ readonly datasource: any;
480
+ readonly httpConfigString: string;
481
+ } & {
482
+ readonly stateMessage: string;
483
+ } & {
484
+ controller: AbortController;
485
+ } & {
486
+ runSQL: () => Promise<void>;
487
+ runHTTP: () => Promise<void>;
488
+ } & {
489
+ fetchData: () => Promise<void>;
490
+ beforeDestroy(): void;
491
+ } & {
492
+ afterCreate(): void;
493
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
362
494
  } & {
363
495
  replace(current: Array<QueryRenderModelInstance>): void;
364
496
  append(item: QueryRenderModelInstance): void;
365
497
  remove(index: number): void;
366
498
  replaceByIndex(index: number, replacement: QueryRenderModelInstance): void;
367
499
  removeQuery(queryID: string): void;
500
+ removeQueries(queryIDs: string[]): void;
368
501
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
369
502
  export declare type QueriesModelInstance = Instance<typeof QueriesModel>;
@@ -0,0 +1,3 @@
1
+ export declare const EditQueries: (() => import('./react/jsx-runtime').JSX.Element) & {
2
+ displayName: string;
3
+ };
@@ -4,5 +4,6 @@ export declare function isMockContext(path: ValidEditorPathType): boolean;
4
4
  export declare function isFilter(path: ValidEditorPathType): boolean;
5
5
  export declare function isSQLSnippet(path: ValidEditorPathType): boolean;
6
6
  export declare function isQuery(path: ValidEditorPathType): boolean;
7
+ export declare function isQueries(path: ValidEditorPathType): boolean;
7
8
  export declare function isView(path: ValidEditorPathType): boolean;
8
9
  export declare function isPanel(path: ValidEditorPathType): boolean;
@@ -1,9 +1,9 @@
1
1
  import { NavActionType } from '~/dashboard-editor/model/editor';
2
- interface IAddItemButton {
2
+ interface Props {
3
3
  action_type: NavActionType['_action_type'];
4
4
  parentID?: string;
5
5
  }
6
- export declare const AddItemButton: (({ action_type, parentID }: IAddItemButton) => import('./react/jsx-runtime').JSX.Element | null) & {
6
+ export declare const ActionButton: (({ action_type, parentID }: Props) => import('./react/jsx-runtime').JSX.Element | null) & {
7
7
  displayName: string;
8
8
  };
9
9
  export {};
@@ -0,0 +1,3 @@
1
+ export declare const QueriesSettingsButton: (() => import('./react/jsx-runtime').JSX.Element) & {
2
+ displayName: string;
3
+ };