mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Compare commits
14 Commits
v0.7.19-be
...
v0.7.19
Author | SHA1 | Date | |
---|---|---|---|
19d9f56f08 | |||
4c89578188 | |||
f6fb266771 | |||
3e739bcaa2 | |||
debc1da289 | |||
3c2e2be40f | |||
581ec6a25d | |||
d30a978cd6 | |||
0015f2e860 | |||
389e6624d8 | |||
275344eb8b | |||
cf24adf99e | |||
2eae580e18 | |||
e4eb27d503 |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -2,6 +2,27 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [0.7.19](https://github.com/antares-sql/antares/compare/v0.7.19-beta.2...v0.7.19) (2023-11-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* table field changes not saved on text fields if pressing enter on textarea modal ([f6fb266](https://github.com/antares-sql/antares/commit/f6fb266771f2d798c8ae42b997c1e33520cf21c3))
|
||||||
|
|
||||||
|
### [0.7.19-beta.2](https://github.com/antares-sql/antares/compare/v0.7.19-beta.1...v0.7.19-beta.2) (2023-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* ssh tunnel keep-alive not working properly ([debc1da](https://github.com/antares-sql/antares/commit/debc1da289d5e35d59adf69d094b329cf93af536))
|
||||||
|
|
||||||
|
### [0.7.19-beta.1](https://github.com/antares-sql/antares/compare/v0.7.19-beta.0...v0.7.19-beta.1) (2023-10-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **MySQL:** RLIKE and NOT RLIKE regular expression filters, closes [#688](https://github.com/antares-sql/antares/issues/688) ([e4eb27d](https://github.com/antares-sql/antares/commit/e4eb27d503e8f912178359c01c62a9b523d17848))
|
||||||
|
|
||||||
### [0.7.19-beta.0](https://github.com/antares-sql/antares/compare/v0.7.18...v0.7.19-beta.0) (2023-10-14)
|
### [0.7.19-beta.0](https://github.com/antares-sql/antares/compare/v0.7.18...v0.7.19-beta.0) (2023-10-14)
|
||||||
|
|
||||||
|
|
||||||
|
14959
package-lock.json
generated
14959
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"productName": "Antares",
|
"productName": "Antares",
|
||||||
"version": "0.7.19-beta.0",
|
"version": "0.7.19",
|
||||||
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "https://github.com/antares-sql/antares.git",
|
"repository": "https://github.com/antares-sql/antares.git",
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
"source-map-support": "~0.5.20",
|
"source-map-support": "~0.5.20",
|
||||||
"spectre.css": "~0.5.9",
|
"spectre.css": "~0.5.9",
|
||||||
"sql-formatter": "~13.0.0",
|
"sql-formatter": "~13.0.0",
|
||||||
"ssh2-promise": "~1.0.2",
|
"@fabio286/ssh2-promise": "~1.0.4-b",
|
||||||
"v-mask": "~2.3.0",
|
"v-mask": "~2.3.0",
|
||||||
"vue": "~3.3.4",
|
"vue": "~3.3.4",
|
||||||
"vue-i18n": "~9.2.2",
|
"vue-i18n": "~9.2.2",
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
"chalk": "~4.1.2",
|
"chalk": "~4.1.2",
|
||||||
"cross-env": "~7.0.2",
|
"cross-env": "~7.0.2",
|
||||||
"css-loader": "~6.5.0",
|
"css-loader": "~6.5.0",
|
||||||
"electron": "~22.3.23",
|
"electron": "~22.3.27",
|
||||||
"electron-builder": "~22.10.3",
|
"electron-builder": "~22.10.3",
|
||||||
"eslint": "~7.32.0",
|
"eslint": "~7.32.0",
|
||||||
"eslint-config-standard": "~16.0.3",
|
"eslint-config-standard": "~16.0.3",
|
||||||
@@ -193,10 +193,10 @@
|
|||||||
"sass-loader": "~12.3.0",
|
"sass-loader": "~12.3.0",
|
||||||
"standard-version": "~9.3.1",
|
"standard-version": "~9.3.1",
|
||||||
"style-loader": "~3.3.1",
|
"style-loader": "~3.3.1",
|
||||||
"stylelint": "~14.9.1",
|
"stylelint": "^15.11.0",
|
||||||
"stylelint-config-recommended-vue": "~1.4.0",
|
"stylelint-config-recommended-vue": "~1.5.0",
|
||||||
"stylelint-config-standard": "~26.0.0",
|
"stylelint-config-standard": "~34.0.0",
|
||||||
"stylelint-scss": "~4.3.0",
|
"stylelint-scss": "~5.3.0",
|
||||||
"tree-kill": "~1.2.2",
|
"tree-kill": "~1.2.2",
|
||||||
"ts-loader": "~9.2.8",
|
"ts-loader": "~9.2.8",
|
||||||
"ts-node": "~10.9.1",
|
"ts-node": "~10.9.1",
|
||||||
@@ -208,10 +208,5 @@
|
|||||||
"webpack-cli": "~4.9.1",
|
"webpack-cli": "~4.9.1",
|
||||||
"webpack-dev-server": "~4.11.1",
|
"webpack-dev-server": "~4.11.1",
|
||||||
"xvfb-maybe": "~0.2.1"
|
"xvfb-maybe": "~0.2.1"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"ssh2-promise": {
|
|
||||||
"ssh2": "github:Fabio286/ssh2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@ export const defaults: Customizations = {
|
|||||||
dataTypes: [],
|
dataTypes: [],
|
||||||
indexTypes: [],
|
indexTypes: [],
|
||||||
foreignActions: [],
|
foreignActions: [],
|
||||||
|
operators: ['=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE', 'BETWEEN', 'IS NULL', 'IS NOT NULL'],
|
||||||
// Core
|
// Core
|
||||||
database: false,
|
database: false,
|
||||||
collations: false,
|
collations: false,
|
||||||
|
@@ -9,6 +9,7 @@ export const customizations: Customizations = {
|
|||||||
defaultUser: 'root',
|
defaultUser: 'root',
|
||||||
defaultDatabase: null,
|
defaultDatabase: null,
|
||||||
dataTypes: mysqlTypes,
|
dataTypes: mysqlTypes,
|
||||||
|
operators: ['=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE', 'RLIKE', 'NOT RLIKE', 'BETWEEN', 'IS NULL', 'IS NOT NULL'],
|
||||||
indexTypes: [
|
indexTypes: [
|
||||||
'PRIMARY',
|
'PRIMARY',
|
||||||
'INDEX',
|
'INDEX',
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import * as mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import { FirebirdSQLClient } from 'src/main/libs/clients/FirebirdSQLClient';
|
import { FirebirdSQLClient } from 'src/main/libs/clients/FirebirdSQLClient';
|
||||||
@@ -5,7 +6,6 @@ import MysqlExporter from 'src/main/libs/exporters/sql/MysqlExporter';
|
|||||||
import PostgreSQLExporter from 'src/main/libs/exporters/sql/PostgreSQLExporter';
|
import PostgreSQLExporter from 'src/main/libs/exporters/sql/PostgreSQLExporter';
|
||||||
import MySQLImporter from 'src/main/libs/importers/sql/MySQLlImporter';
|
import MySQLImporter from 'src/main/libs/importers/sql/MySQLlImporter';
|
||||||
import PostgreSQLImporter from 'src/main/libs/importers/sql/PostgreSQLImporter';
|
import PostgreSQLImporter from 'src/main/libs/importers/sql/PostgreSQLImporter';
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
|
|
||||||
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
|
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
|
||||||
import { PostgreSQLClient } from '../../main/libs/clients/PostgreSQLClient';
|
import { PostgreSQLClient } from '../../main/libs/clients/PostgreSQLClient';
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { TypesGroup } from './antares';
|
import { TypesGroup } from './antares';
|
||||||
|
import { TableFilterOperator } from './tableApis';
|
||||||
|
|
||||||
export interface Customizations {
|
export interface Customizations {
|
||||||
// Defaults
|
// Defaults
|
||||||
@@ -8,6 +9,7 @@ export interface Customizations {
|
|||||||
dataTypes?: TypesGroup[];
|
dataTypes?: TypesGroup[];
|
||||||
indexTypes?: string[];
|
indexTypes?: string[];
|
||||||
foreignActions?: string[];
|
foreignActions?: string[];
|
||||||
|
operators?: TableFilterOperator[];
|
||||||
// Core
|
// Core
|
||||||
database?: boolean;
|
database?: boolean;
|
||||||
collations?: boolean;
|
collations?: boolean;
|
||||||
|
@@ -21,7 +21,7 @@ export interface TableDeleteParams {
|
|||||||
rows: {[key: string]: any};
|
rows: {[key: string]: any};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TableFilterOperator = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'IN' | 'NOT IN' | 'LIKE' | 'NOT LIKE' | 'BETWEEN' | 'IS NULL' | 'IS NOT NULL'
|
export type TableFilterOperator = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'IN' | 'NOT IN' | 'LIKE' | 'NOT LIKE' | 'RLIKE' | 'NOT RLIKE' | 'BETWEEN' | 'IS NULL' | 'IS NOT NULL'
|
||||||
|
|
||||||
export interface TableFilterClausole {
|
export interface TableFilterClausole {
|
||||||
active: boolean;
|
active: boolean;
|
||||||
|
@@ -55,7 +55,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
port: conn.sshPort ? conn.sshPort : 22,
|
port: conn.sshPort ? conn.sshPort : 22,
|
||||||
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
||||||
passphrase: conn.sshPassphrase,
|
passphrase: conn.sshPassphrase,
|
||||||
keepaliveInterval: conn.sshKeepAliveInterval ?? conn.sshKeepAliveInterval*1000
|
keepaliveInterval: conn.sshKeepAliveInterval ? conn.sshKeepAliveInterval*1000 : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
port: conn.sshPort ? conn.sshPort : 22,
|
port: conn.sshPort ? conn.sshPort : 22,
|
||||||
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
||||||
passphrase: conn.sshPassphrase,
|
passphrase: conn.sshPassphrase,
|
||||||
keepaliveInterval: conn.sshKeepAliveInterval ?? conn.sshKeepAliveInterval*1000
|
keepaliveInterval: conn.sshKeepAliveInterval ? conn.sshKeepAliveInterval*1000 : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import mysql from 'mysql2/promise';
|
import mysql from 'mysql2/promise';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import SSH2Promise from 'ssh2-promise';
|
import SSH2Promise = require('@fabio286/ssh2-promise');
|
||||||
|
|
||||||
const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
||||||
// Remove comments, newlines and multiple spaces
|
// Remove comments, newlines and multiple spaces
|
||||||
@@ -16,7 +16,7 @@ const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
|||||||
/**
|
/**
|
||||||
* As Simple As Possible Query Builder Core
|
* As Simple As Possible Query Builder Core
|
||||||
*/
|
*/
|
||||||
export abstract class AntaresCore {
|
export abstract class BaseClient {
|
||||||
_client: antares.ClientCode;
|
_client: antares.ClientCode;
|
||||||
protected _cUid: string
|
protected _cUid: string
|
||||||
protected _params: mysql.ConnectionOptions | pg.ClientConfig | { databasePath: string; readonly: boolean};
|
protected _params: mysql.ConnectionOptions | pg.ClientConfig | { databasePath: string; readonly: boolean};
|
@@ -4,9 +4,9 @@ import * as antares from 'common/interfaces/antares';
|
|||||||
import * as firebird from 'node-firebird';
|
import * as firebird from 'node-firebird';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { BaseClient } from './BaseClient';
|
||||||
|
|
||||||
export class FirebirdSQLClient extends AntaresCore {
|
export class FirebirdSQLClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
private _connectionsToCommit: Map<string, firebird.Transaction>;
|
private _connectionsToCommit: Map<string, firebird.Transaction>;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
|
import SSH2Promise = require('@fabio286/ssh2-promise');
|
||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import dataTypes from 'common/data-types/mysql';
|
import dataTypes from 'common/data-types/mysql';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { BaseClient } from './BaseClient';
|
||||||
import SSH2Promise = require('ssh2-promise');
|
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
|
|
||||||
export class MySQLClient extends AntaresCore {
|
export class MySQLClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
private _connectionsToCommit: Map<string, mysql.Connection | mysql.PoolConnection>;
|
private _connectionsToCommit: Map<string, mysql.Connection | mysql.PoolConnection>;
|
||||||
@@ -168,7 +168,10 @@ export class MySQLClient extends AntaresCore {
|
|||||||
dbConfig.port = tunnel.localPort;
|
dbConfig.port = tunnel.localPort;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -187,7 +190,10 @@ export class MySQLClient extends AntaresCore {
|
|||||||
this._connection.end();
|
this._connection.end();
|
||||||
clearInterval(this._keepaliveTimer);
|
clearInterval(this._keepaliveTimer);
|
||||||
this._keepaliveTimer = undefined;
|
this._keepaliveTimer = undefined;
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getConnection () {
|
async getConnection () {
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
|
import SSH2Promise = require('@fabio286/ssh2-promise');
|
||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import dataTypes from 'common/data-types/postgresql';
|
import dataTypes from 'common/data-types/postgresql';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import * as pgAst from 'pgsql-ast-parser';
|
import * as pgAst from 'pgsql-ast-parser';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
|
||||||
import SSH2Promise = require('ssh2-promise');
|
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
import { ConnectionOptions } from 'tls';
|
import { ConnectionOptions } from 'tls';
|
||||||
|
|
||||||
|
import { BaseClient } from './BaseClient';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function pgToString (value: any) {
|
function pgToString (value: any) {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
@@ -81,7 +81,7 @@ type builtinsTypes =
|
|||||||
'JSONB' |
|
'JSONB' |
|
||||||
'REGNAMESPACE' |
|
'REGNAMESPACE' |
|
||||||
'REGROLE';
|
'REGROLE';
|
||||||
export class PostgreSQLClient extends AntaresCore {
|
export class PostgreSQLClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
private _connectionsToCommit: Map<string, pg.Client | pg.PoolClient>;
|
private _connectionsToCommit: Map<string, pg.Client | pg.PoolClient>;
|
||||||
@@ -180,7 +180,10 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
dbConfig.port = tunnel.localPort;
|
dbConfig.port = tunnel.localPort;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,7 +239,10 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
this._connection.end();
|
this._connection.end();
|
||||||
clearInterval(this._keepaliveTimer);
|
clearInterval(this._keepaliveTimer);
|
||||||
this._keepaliveTimer = undefined;
|
this._keepaliveTimer = undefined;
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async keepAlive () {
|
private async keepAlive () {
|
||||||
|
@@ -3,9 +3,9 @@ import dataTypes from 'common/data-types/sqlite';
|
|||||||
import { DATETIME, FLOAT, NUMBER, TIME } from 'common/fieldTypes';
|
import { DATETIME, FLOAT, NUMBER, TIME } from 'common/fieldTypes';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { BaseClient } from './BaseClient';
|
||||||
|
|
||||||
export class SQLiteClient extends AntaresCore {
|
export class SQLiteClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _connectionsToCommit: Map<string, sqlite.Database>;
|
private _connectionsToCommit: Map<string, sqlite.Database>;
|
||||||
protected _connection?: sqlite.Database;
|
protected _connection?: sqlite.Database;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import { ImportOptions } from 'common/interfaces/importer';
|
import { ImportOptions } from 'common/interfaces/importer';
|
||||||
import * as mysql from 'mysql2';
|
import * as mysql from 'mysql2';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
|
|
||||||
import { MySQLClient } from '../libs/clients/MySQLClient';
|
import { MySQLClient } from '../libs/clients/MySQLClient';
|
||||||
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
|
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
|
||||||
|
@@ -580,7 +580,7 @@ const onKey = (e: KeyboardEvent) => {
|
|||||||
if (!editingField.value && e.key === 'Enter')
|
if (!editingField.value && e.key === 'Enter')
|
||||||
return editON(props.selectedCell);
|
return editON(props.selectedCell);
|
||||||
|
|
||||||
if (editingField.value && e.key === 'Enter' && !isBaseSelectField.value)
|
if (editingField.value && e.key === 'Enter' && !isBaseSelectField.value && !isTextareaEditor.value)
|
||||||
return editOFF();
|
return editOFF();
|
||||||
|
|
||||||
if (editingField.value && e.key === 'Escape') {
|
if (editingField.value && e.key === 'Escape') {
|
||||||
|
@@ -183,6 +183,7 @@
|
|||||||
<WorkspaceTabTableFilters
|
<WorkspaceTabTableFilters
|
||||||
v-if="isSearch"
|
v-if="isSearch"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
|
:is-quering="isQuering"
|
||||||
:conn-client="connection.client"
|
:conn-client="connection.client"
|
||||||
@filter="updateFilters"
|
@filter="updateFilters"
|
||||||
@filter-change="onFilterChange"
|
@filter-change="onFilterChange"
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
<input
|
<input
|
||||||
v-model="row.active"
|
v-model="row.active"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
:disabled="isQuering"
|
||||||
@change="doFilter"
|
@change="doFilter"
|
||||||
><i class="form-icon" />
|
><i class="form-icon" />
|
||||||
</label>
|
</label>
|
||||||
@@ -18,11 +19,13 @@
|
|||||||
:options="fields"
|
:options="fields"
|
||||||
option-track-by="name"
|
option-track-by="name"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
:disabled="isQuering"
|
||||||
/>
|
/>
|
||||||
<BaseSelect
|
<BaseSelect
|
||||||
v-model="row.op"
|
v-model="row.op"
|
||||||
class="form-select ml-2 col-auto select-sm"
|
class="form-select ml-2 col-auto select-sm"
|
||||||
:options="operators"
|
:options="operators"
|
||||||
|
:disabled="isQuering"
|
||||||
/>
|
/>
|
||||||
<div class="workspace-table-filters-row-value ml-2">
|
<div class="workspace-table-filters-row-value ml-2">
|
||||||
<input
|
<input
|
||||||
@@ -30,12 +33,14 @@
|
|||||||
v-model="row.value"
|
v-model="row.value"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-input input-sm"
|
class="form-input input-sm"
|
||||||
|
:disabled="isQuering"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
v-if="row.op === 'BETWEEN'"
|
v-if="row.op === 'BETWEEN'"
|
||||||
v-model="row.value2"
|
v-model="row.value2"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-input ml-2 input-sm"
|
class="form-input ml-2 input-sm"
|
||||||
|
:disabled="isQuering"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
@@ -87,15 +92,14 @@ const { t } = useI18n();
|
|||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fields: Array as Prop<TableField[]>,
|
fields: Array as Prop<TableField[]>,
|
||||||
connClient: String as Prop<ClientCode>
|
connClient: String as Prop<ClientCode>,
|
||||||
|
isQuering: Boolean
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['filter-change', 'filter']);
|
const emit = defineEmits(['filter-change', 'filter']);
|
||||||
|
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
const operators = ref<TableFilterOperator[]>([
|
const operators: TableFilterOperator[] = customizations[props.connClient].operators;
|
||||||
'=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE', 'BETWEEN', 'IS NULL', 'IS NOT NULL'
|
|
||||||
]);
|
|
||||||
|
|
||||||
const clientCustomizations = computed(() => customizations[props.connClient]);
|
const clientCustomizations = computed(() => customizations[props.connClient]);
|
||||||
|
|
||||||
@@ -122,7 +126,7 @@ const createClausole = (filter: TableFilterClausole) => {
|
|||||||
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
|
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
|
||||||
let value;
|
let value;
|
||||||
|
|
||||||
if (isNumeric && !['IN', 'NOT IN'].includes(filter.op)) {
|
if (isNumeric && !['IN', 'NOT IN', 'RLIKE', 'NOT RLIKE'].includes(filter.op)) {
|
||||||
if (isNaN(Number(filter.value)))
|
if (isNaN(Number(filter.value)))
|
||||||
filter.value = '';
|
filter.value = '';
|
||||||
if (isNaN(Number(filter.value2)))
|
if (isNaN(Number(filter.value2)))
|
||||||
|
190
src/renderer/untyped.d.ts
vendored
190
src/renderer/untyped.d.ts
vendored
@@ -4,109 +4,109 @@ declare module '@/App.vue';
|
|||||||
declare module 'v-mask';
|
declare module 'v-mask';
|
||||||
declare module 'json2php';
|
declare module 'json2php';
|
||||||
declare module 'vuedraggable' {// <- to export as default
|
declare module 'vuedraggable' {// <- to export as default
|
||||||
const draggableComponent: import('vue').DefineComponent<{
|
const draggableComponent: import('vue').DefineComponent<{
|
||||||
list: {
|
list: {
|
||||||
type: ArrayConstructor;
|
type: ArrayConstructor;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
default: any;
|
default: any;
|
||||||
};
|
};
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: ArrayConstructor;
|
type: ArrayConstructor;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
default: any;
|
default: any;
|
||||||
};
|
};
|
||||||
itemKey: {
|
itemKey: {
|
||||||
type: (FunctionConstructor | StringConstructor)[];
|
type: (FunctionConstructor | StringConstructor)[];
|
||||||
required: boolean;
|
required: boolean;
|
||||||
};
|
};
|
||||||
clone: {
|
clone: {
|
||||||
type: FunctionConstructor;
|
type: FunctionConstructor;
|
||||||
default: (original: any) => any;
|
default: (original: any) => any;
|
||||||
};
|
};
|
||||||
tag: {
|
tag: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
default: string;
|
default: string;
|
||||||
};
|
};
|
||||||
move: {
|
move: {
|
||||||
type: FunctionConstructor;
|
type: FunctionConstructor;
|
||||||
default: any;
|
default: any;
|
||||||
};
|
};
|
||||||
componentData: {
|
componentData: {
|
||||||
type: ObjectConstructor;
|
type: ObjectConstructor;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
default: any;
|
default: any;
|
||||||
};
|
};
|
||||||
}, unknown, {
|
}, unknown, {
|
||||||
error: boolean;
|
error: boolean;
|
||||||
}, {
|
}, {
|
||||||
realList(): any;
|
realList(): any;
|
||||||
getKey(): any;
|
getKey(): any;
|
||||||
}, {
|
}, {
|
||||||
getUnderlyingVm(domElement: any): any;
|
getUnderlyingVm(domElement: any): any;
|
||||||
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
||||||
emitChanges(evt: any): void;
|
emitChanges(evt: any): void;
|
||||||
alterList(onList: any): void;
|
alterList(onList: any): void;
|
||||||
spliceList(): void;
|
spliceList(): void;
|
||||||
updatePosition(oldIndex: any, newIndex: any): void;
|
updatePosition(oldIndex: any, newIndex: any): void;
|
||||||
getRelatedContextFromMoveEvent({ to, related }: {
|
getRelatedContextFromMoveEvent({ to, related }: {
|
||||||
to: any;
|
to: any;
|
||||||
related: any;
|
related: any;
|
||||||
}): any;
|
}): any;
|
||||||
getVmIndexFromDomIndex(domIndex: any): any;
|
getVmIndexFromDomIndex(domIndex: any): any;
|
||||||
onDragStart(evt: any): void;
|
onDragStart(evt: any): void;
|
||||||
onDragAdd(evt: any): void;
|
onDragAdd(evt: any): void;
|
||||||
onDragRemove(evt: any): void;
|
onDragRemove(evt: any): void;
|
||||||
onDragUpdate(evt: any): void;
|
onDragUpdate(evt: any): void;
|
||||||
computeFutureIndex(relatedContext: any, evt: any): any;
|
computeFutureIndex(relatedContext: any, evt: any): any;
|
||||||
onDragMove(evt: any, originalEvent: any): any;
|
onDragMove(evt: any, originalEvent: any): any;
|
||||||
onDragEnd(): void;
|
onDragEnd(): void;
|
||||||
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, any[], any, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<{
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, any[], any, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<{
|
||||||
move: Function;
|
move: Function;
|
||||||
tag: string;
|
tag: string;
|
||||||
clone: Function;
|
clone: Function;
|
||||||
list: unknown[];
|
list: unknown[];
|
||||||
modelValue: unknown[];
|
modelValue: unknown[];
|
||||||
componentData: Record<string, any>;
|
componentData: Record<string, any>;
|
||||||
} & {
|
} & {
|
||||||
itemKey?: string | Function;
|
itemKey?: string | Function;
|
||||||
}>, {
|
}>, {
|
||||||
move: Function;
|
move: Function;
|
||||||
tag: string;
|
tag: string;
|
||||||
clone: Function;
|
clone: Function;
|
||||||
list: unknown[];
|
list: unknown[];
|
||||||
modelValue: unknown[];
|
modelValue: unknown[];
|
||||||
componentData: Record<string, any>;
|
componentData: Record<string, any>;
|
||||||
}>;
|
}>;
|
||||||
export = draggableComponent;
|
export = draggableComponent;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const SvgIcon: import('vue').DefineComponent<{
|
declare const SvgIcon: import('vue').DefineComponent<{
|
||||||
type: {
|
type: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
default: string;
|
default: string;
|
||||||
};
|
};
|
||||||
path: {
|
path: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
default: string;
|
default: string;
|
||||||
};
|
};
|
||||||
size: {
|
size: {
|
||||||
type: NumberConstructor;
|
type: NumberConstructor;
|
||||||
optional: boolean;
|
optional: boolean;
|
||||||
};
|
};
|
||||||
viewbox: {
|
viewbox: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
optional: boolean;
|
optional: boolean;
|
||||||
};
|
};
|
||||||
flip: {
|
flip: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
optional: boolean;
|
optional: boolean;
|
||||||
};
|
};
|
||||||
rotate: {
|
rotate: {
|
||||||
type: NumberConstructor;
|
type: NumberConstructor;
|
||||||
optional: boolean;
|
optional: boolean;
|
||||||
};
|
};
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
declare module '@jamescoyle/vue-icon' {
|
declare module '@jamescoyle/vue-icon' {
|
||||||
export default SvgIcon;
|
export default SvgIcon;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user