diff --git a/extensions/notebook/src/dialog/managePackages/installedPackagesTab.ts b/extensions/notebook/src/dialog/managePackages/installedPackagesTab.ts index b9ecb3c3c7..899deb9bb0 100644 --- a/extensions/notebook/src/dialog/managePackages/installedPackagesTab.ts +++ b/extensions/notebook/src/dialog/managePackages/installedPackagesTab.ts @@ -84,12 +84,11 @@ export class InstalledPackagesTab { value: localize('managePackages.newPkgVersionColumn', "Version"), type: azdata.ColumnType.text }, + { value: localize('managePackages.deleteColumn', "Delete"), type: azdata.ColumnType.button, - options: { - icon: IconPathHelper.delete - } + icon: IconPathHelper.delete } ], data: [[]], @@ -227,7 +226,7 @@ export class InstalledPackagesTab { let packageCount: number; if (pythonPackages) { packageCount = pythonPackages.length; - packageData = pythonPackages.map(pkg => [pkg.name, pkg.version]); + packageData = pythonPackages.map(pkg => [pkg.name, pkg.version, undefined]); } else { packageCount = 0; } diff --git a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts index 5374f93dc7..3927c738fe 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts @@ -185,10 +185,11 @@ export class SchemaCompareOptionsDialog { await this.optionsTable.updateProperties({ data: data, columns: [ + { value: 'Include', type: azdata.ColumnType.checkBox, - options: { actionOnCheckbox: azdata.ActionOnCellCheckboxCheck.customAction }, + action: azdata.ActionOnCellCheckboxCheck.customAction, headerCssClass: 'display-none', cssClass: 'no-borders align-with-header', width: 50 @@ -209,10 +210,11 @@ export class SchemaCompareOptionsDialog { await this.objectsTable.updateProperties({ data: data, columns: [ + { value: 'Include', type: azdata.ColumnType.checkBox, - options: { actionOnCheckbox: azdata.ActionOnCellCheckboxCheck.customAction }, + action: azdata.ActionOnCellCheckboxCheck.customAction, headerCssClass: 'display-none', cssClass: 'no-borders align-with-header', width: 50 diff --git a/extensions/schema-compare/src/schemaCompareMainWindow.ts b/extensions/schema-compare/src/schemaCompareMainWindow.ts index 37b2667740..d0cc428c54 100644 --- a/extensions/schema-compare/src/schemaCompareMainWindow.ts +++ b/extensions/schema-compare/src/schemaCompareMainWindow.ts @@ -305,12 +305,13 @@ export class SchemaCompareMainWindow { cssClass: 'align-with-header', width: 90 }, + { value: loc.include, cssClass: 'align-with-header', width: 60, type: azdata.ColumnType.checkBox, - options: { actionOnCheckbox: azdata.ActionOnCellCheckboxCheck.customAction } + action: azdata.ActionOnCellCheckboxCheck.customAction }, { value: loc.action, diff --git a/extensions/sql-assessment/src/assessmentResultGrid.ts b/extensions/sql-assessment/src/assessmentResultGrid.ts index 3676a5949d..34a6acd943 100644 --- a/extensions/sql-assessment/src/assessmentResultGrid.ts +++ b/extensions/sql-assessment/src/assessmentResultGrid.ts @@ -46,14 +46,14 @@ export class AssessmentResultGrid implements vscode.Disposable { dark: extensionContext.asAbsolutePath('resources/dark/database.svg'), light: extensionContext.asAbsolutePath('resources/light/database.svg') }, - ariaLabel: localize('databaseIconLabel', "Database Icon") + title: localize('databaseIconLabel', "Database") }, [azdata.sqlAssessment.SqlAssessmentTargetType.Server]: { icon: { dark: extensionContext.asAbsolutePath('resources/dark/server.svg'), light: extensionContext.asAbsolutePath('resources/light/server.svg') }, - ariaLabel: localize('serverIconLabel', "Server Icon") + title: localize('serverIconLabel', "Server") } }; diff --git a/samples/sqlservices/package.json b/samples/sqlservices/package.json index cff5cb0f88..a5d61e4b7e 100644 --- a/samples/sqlservices/package.json +++ b/samples/sqlservices/package.json @@ -87,9 +87,7 @@ "scripts": { "build": "gulp build", "compile": "gulp compile", - "watch": "gulp watch", - "typings": "gulp copytypings", - "postinstall": "node ./node_modules/vscode/bin/install && node ./node_modules/azdata/bin/install && gulp copytypings" + "watch": "gulp watch" }, "dependencies": { "fs-extra": "^5.0.0", @@ -98,7 +96,8 @@ }, "devDependencies": { "@types/node": "^7.0.43", - "azdata": "^1.0.0", + "@types/azdata": "^1.0.0", + "@types/vscode": "^1.0.0", "braces": "^2.3.2", "child-process-promise": "^2.2.1", "del": "^3.0.0", @@ -108,10 +107,9 @@ "gulp-tslint": "^6.0.2", "gulp-typescript": "^3.2.4", "tslint": "^3.14.0", - "typescript": "^2.6.1", + "typescript": "^4.1.0-dev.20200824", "url-parse": "^1.4.4", - "vsce": "^1.57.1", - "vscode": "^1.1.30" + "vsce": "^1.57.1" }, "repository": { "type": "git", diff --git a/samples/sqlservices/src/controllers/mainController.ts b/samples/sqlservices/src/controllers/mainController.ts index ae290040f8..999a629e1d 100644 --- a/samples/sqlservices/src/controllers/mainController.ts +++ b/samples/sqlservices/src/controllers/mainController.ts @@ -241,11 +241,33 @@ export default class MainController implements vscode.Disposable { const checkedRows: number[] = [2]; + const startIcon = path.join(__dirname, '..', 'media', 'start.svg'); + const monitorIcon = { + light: path.join(__dirname, '..', 'media', 'monitor.svg'), + dark: path.join(__dirname, '..', 'media', 'monitor_inverse.svg') + }; let table = view.modelBuilder.table().withProperties({ data: [ - ['1', '2', '2', { enabled: false, checked: false }], - ['4', '5', '6', false], - ['7', '8', '9', { enabled: true, checked: true }] + ['1', '2', '2', { enabled: false, checked: false }, + undefined, // for button/hyperlink column, 'undefined' means to use the default information provided by the column definition + undefined, + undefined, + undefined + ], + ['4', '5', '6', false, + { // use cell specific icon and title + icon: monitorIcon, + title: 'Monitor' + }, { // use cell specific title + title: 'Monitor' + }, { + icon: monitorIcon, + title: 'Monitor' + }, { + title: 'Monitor', + url: 'https://www.microsoft.com' + }], + ['7', '8', '9', { enabled: true, checked: true }, undefined, undefined, undefined, undefined] ], columns: [ { value: 'c1' }, @@ -254,20 +276,43 @@ export default class MainController implements vscode.Disposable { value: 'checkbox', type: azdata.ColumnType.checkBox, options: { actionOnCheckbox: azdata.ActionOnCellCheckboxCheck.customAction } + }, { // image button + value: 'Start1', + icon: startIcon, + type: azdata.ColumnType.button + }, { // text button + value: 'Start', + showText: true, + type: azdata.ColumnType.button, + name: 'Button 2' + }, { + value: 'Start Image Link', + icon: startIcon, + type: azdata.ColumnType.hyperlink, + name: 'Link 1' + }, { + value: 'Start Link', + type: azdata.ColumnType.hyperlink, + name: 'Link 2' }], height: 250, + width: 800, selectedRows: [0] }).component(); table.onRowSelected(e => { // TODO: }); - table.onCellAction((arg: azdata.ICheckboxCellActionEventArgs) => { - if (arg.checked) { - checkedRows.push(arg.row); + table.onCellAction((arg: azdata.ICellActionEventArgs) => { + if (arg.column === 3) { // checkbox column + if ((arg).checked) { + checkedRows.push(arg.row); + } else { + checkedRows.splice(checkedRows.indexOf(arg.row), 1); + } + vscode.window.showInformationMessage('checked rows: ' + checkedRows.join(',')); } else { - checkedRows.splice(checkedRows.indexOf(arg.row), 1); + vscode.window.showInformationMessage(`cell action triggere. row: ${arg.row}, cell: ${arg.column}`); } - vscode.window.showInformationMessage('checked rows: ' + checkedRows.join(',')); }); let listBox = view.modelBuilder.listBox().withProperties({ @@ -400,7 +445,7 @@ export default class MainController implements vscode.Disposable { } private openDialog(): void { - let dialog = azdata.window.createModelViewDialog('Test dialog'); + let dialog = azdata.window.createModelViewDialog('Test dialog', '', 'wide'); let tab1 = azdata.window.createTab('Test tab 1'); let tab2 = azdata.window.createTab('Test tab 2'); diff --git a/samples/sqlservices/tsconfig.json b/samples/sqlservices/tsconfig.json index 2adb95b459..4917a4f445 100644 --- a/samples/sqlservices/tsconfig.json +++ b/samples/sqlservices/tsconfig.json @@ -1,16 +1,15 @@ { - "compileOnSave": true, - "compilerOptions": { - "module": "commonjs", - "target": "ES6", - "lib": [ "es6" ], - "sourceMap": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "rootDir": "." - }, - "exclude": [ - "node_modules", - ".vscode-test" - ] -} \ No newline at end of file + "compileOnSave": true, + "compilerOptions": { + "module": "commonjs", + "target": "ES2017", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "rootDir": "." + }, + "exclude": [ + "node_modules", + ".vscode-test" + ] +} diff --git a/samples/sqlservices/yarn.lock b/samples/sqlservices/yarn.lock index 0e1f01a46d..b6cc65dba8 100644 --- a/samples/sqlservices/yarn.lock +++ b/samples/sqlservices/yarn.lock @@ -21,6 +21,13 @@ normalize-path "^2.0.1" through2 "^2.0.3" +"@types/azdata@^1.0.0": + version "1.25.0" + resolved "https://registry.yarnpkg.com/@types/azdata/-/azdata-1.25.0.tgz#ae353317408358669f6c27987422d5b56da12429" + integrity sha512-Q13MATghre9+C34/YnitHfAa01tbfZm6z/KJZwrMXJ+RjNAlpEb8ym6gazMS40WQCEr8YBfl3KRoi12dMCjdcg== + dependencies: + "@types/vscode" "*" + "@types/node@*": version "13.11.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.0.tgz#390ea202539c61c8fa6ba4428b57e05bc36dc47b" @@ -31,28 +38,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-7.10.9.tgz#4343e3b009f8cf5e1ed685e36097b74b4101e880" integrity sha512-usSpgoUsRtO5xNV5YEPU8PPnHisFx8u0rokj1BPVn/hDF7zwUDzVLiuKZM38B7z8V2111Fj6kd4rGtQFUZpNOw== +"@types/vscode@*", "@types/vscode@^1.0.0": + version "1.52.0" + resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.52.0.tgz#61917968dd403932127fc4004a21fd8d69e4f61c" + integrity sha512-Kt3bvWzAvvF/WH9YEcrCICDp0Z7aHhJGhLJ1BxeyNP6yRjonWqWnAIh35/pXAjswAnWOABrYlF7SwXR9+1nnLA== + acorn@5.X, acorn@^5.0.3: version "5.7.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -agent-base@4, agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -ajv@^6.5.5: - version "6.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" - integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" @@ -213,18 +208,6 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -252,39 +235,11 @@ async-settle@^1.0.0: dependencies: async-done "^1.2.2" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" - integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== - -azdata@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/azdata/-/azdata-1.0.0.tgz#83535ca3a9b02e414eb5694e18fd448f8331423e" - integrity sha512-aPdpEBOEfSlkB4LY2m3VRujtYNKR6hCtNUksHj51Pga2JtSNEORx9o4HmPMcK6mjESHfz8OQDM7fXuL1VsbdOA== - dependencies: - glob "^7.1.2" - mocha "^4.0.1" - request "^2.88.0" - semver "^5.4.1" - source-map-support "^0.5.0" - url-parse "^1.4.4" - vscode-test "^0.1.4" - azure-devops-node-api@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz#131d4e01cf12ebc6e45569b5e0c5c249e4114d6d" @@ -328,13 +283,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - beeper@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" @@ -390,16 +338,6 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" - integrity sha1-81HTKWnTL6XXpVZxVCY9korjvR8= - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -435,11 +373,6 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - chalk@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -597,23 +530,6 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - integrity sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== - -commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== - commander@^2.8.1, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -659,7 +575,7 @@ copy-props@^2.0.1: each-props "^1.3.0" is-plain-object "^2.0.1" -core-util-is@1.0.2, core-util-is@~1.0.0: +core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= @@ -705,13 +621,6 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - dateformat@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062" @@ -726,14 +635,7 @@ debug-fabulous@1.X: memoizee "0.4.X" object-assign "4.X" -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@3.X, debug@^3.1.0: +debug@3.X: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -810,11 +712,6 @@ del@^3.0.0: pify "^3.0.0" rimraf "^2.2.8" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - denodeify@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" @@ -830,16 +727,6 @@ detect-newline@2.X: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= -diff@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" - integrity sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww== - -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - diff@^2.2.1: version "2.2.3" resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99" @@ -919,14 +806,6 @@ each-props@^1.3.0: is-plain-object "^2.0.1" object.defaults "^1.1.0" -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -969,18 +848,6 @@ es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - es6-symbol@^3.1.1, es6-symbol@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -999,7 +866,7 @@ es6-weak-map@^2.0.1, es6-weak-map@^2.0.2: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -1068,7 +935,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.2: +extend@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -1094,16 +961,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - fancy-log@^1.1.0, fancy-log@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" @@ -1114,16 +971,6 @@ fancy-log@^1.1.0, fancy-log@^1.3.2: parse-node-version "^1.0.0" time-stamp "^1.0.0" -fast-deep-equal@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" @@ -1245,20 +1092,6 @@ for-own@^1.0.0: dependencies: for-in "^1.0.1" -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -1311,13 +1144,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -1383,18 +1209,6 @@ glob-watcher@^5.0.3: just-debounce "^1.0.0" object.defaults "^1.1.0" -glob@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^5.0.3, glob@~5.0.0: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -1406,7 +1220,7 @@ glob@^5.0.3, glob@~5.0.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: +glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.3: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -1461,16 +1275,6 @@ graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, gr resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== -growl@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" - integrity sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - gulp-cli@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.2.0.tgz#5533126eeb7fe415a7e3e84a297d334d5cf70ebc" @@ -1600,19 +1404,6 @@ handlebars@^4.5.3: optionalDependencies: uglify-js "^3.1.4" -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -1620,11 +1411,6 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1673,11 +1459,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -1702,31 +1483,6 @@ htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^3.1.1" -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-proxy-agent@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1965,11 +1721,6 @@ is-stream@^1.0.1: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - is-unc-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" @@ -2024,36 +1775,11 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -2061,16 +1787,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - just-debounce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" @@ -2404,35 +2120,18 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== - dependencies: - mime-db "1.43.0" - mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - minimist@^1.1.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -2451,13 +2150,6 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - mkdirp@^0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -2465,39 +2157,6 @@ mkdirp@^0.5.0: dependencies: minimist "^1.2.5" -mocha@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794" - integrity sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA== - dependencies: - browser-stdout "1.3.0" - commander "2.11.0" - debug "3.1.0" - diff "3.3.1" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.3" - he "1.1.1" - mkdirp "0.5.1" - supports-color "4.4.0" - -mocha@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" - integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== - dependencies: - browser-stdout "1.3.1" - commander "2.15.1" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.5" - he "1.1.1" - minimatch "3.0.4" - mkdirp "0.5.1" - supports-color "5.4.0" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -2608,11 +2267,6 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - object-assign@4.X, object-assign@^4.0.0, object-assign@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -2868,11 +2522,6 @@ pend@~1.2.0: resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -2925,11 +2574,6 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" @@ -2947,16 +2591,6 @@ pumpify@^1.3.5: inherits "^2.0.3" pump "^2.0.0" -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - querystringify@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" @@ -3119,32 +2753,6 @@ replace-homedir@^1.0.0: is-absolute "^1.0.0" remove-trailing-separator "^1.1.0" -request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -3199,7 +2807,7 @@ rimraf@^2.2.8: dependencies: glob "^7.1.3" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -3216,11 +2824,6 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - semver-greatest-satisfied-range@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" @@ -3228,7 +2831,7 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1: +"semver@2 || 3 || 4 || 5", semver@^5.1.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -3289,14 +2892,6 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.0: - version "0.5.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" - integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" @@ -3360,21 +2955,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - stack-trace@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -3453,20 +3033,6 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" -supports-color@4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" - integrity sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ== - dependencies: - has-flag "^2.0.0" - -supports-color@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== - dependencies: - has-flag "^3.0.0" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -3591,14 +3157,6 @@ to-through@^2.0.0: dependencies: through2 "^2.0.3" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - tslint@^3.14.0: version "3.15.1" resolved "https://registry.yarnpkg.com/tslint/-/tslint-3.15.1.tgz#da165ca93d8fdc2c086b51165ee1bacb48c98ea5" @@ -3612,23 +3170,11 @@ tslint@^3.14.0: resolve "^1.1.7" underscore.string "^3.3.4" -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - tunnel@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.4.tgz#2d3785a158c174c9a16dc2c046ec5fc5f1742213" integrity sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM= -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - type@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" @@ -3652,10 +3198,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^2.6.1: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" - integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== +typescript@^4.1.0-dev.20200824: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -3744,13 +3290,6 @@ upath@^1.1.1: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" @@ -3779,11 +3318,6 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - v8flags@^3.0.1: version "3.1.3" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" @@ -3809,15 +3343,6 @@ value-or-function@^3.0.0: resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - vinyl-fs@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" @@ -3938,35 +3463,6 @@ vscode-nls@^4.0.0: resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== -vscode-test@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/vscode-test/-/vscode-test-0.1.5.tgz#250534f90e78d37a84419a00f9bd15341e1a4f8f" - integrity sha512-s+lbF1Dtasc0yXVB9iQTexBe2JK6HJAUJe3fWezHKIjq+xRw5ZwCMEMBaonFIPy7s95qg2HPTRDR5W4h4kbxGw== - dependencies: - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" - -vscode-test@^0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/vscode-test/-/vscode-test-0.4.3.tgz#461ebf25fc4bc93d77d982aed556658a2e2b90b8" - integrity sha512-EkMGqBSefZH2MgW65nY05rdRSko15uvzq4VAPM5jVmwYuFQKE7eikKXNJDRxL+OITXHB6pI+a3XqqD32Y3KC5w== - dependencies: - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" - -vscode@^1.1.30: - version "1.1.36" - resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.36.tgz#5e1a0d1bf4977d0c7bc5159a9a13d5b104d4b1b6" - integrity sha512-cGFh9jmGLcTapCpPCKvn8aG/j9zVQ+0x5hzYJq5h5YyUXVGa1iamOaB2M2PZXoumQPES4qeAP1FwkI0b6tL4bQ== - dependencies: - glob "^7.1.2" - mocha "^5.2.0" - request "^2.88.0" - semver "^5.4.1" - source-map-support "^0.5.0" - url-parse "^1.4.4" - vscode-test "^0.4.1" - which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" diff --git a/src/sql/azdata.d.ts b/src/sql/azdata.d.ts index ca38aaae05..14ae93111d 100644 --- a/src/sql/azdata.d.ts +++ b/src/sql/azdata.d.ts @@ -3222,6 +3222,9 @@ declare module 'azdata' { headerCssClass?: string; toolTip?: string; type?: ColumnType; + /** + * @deprecated options property is deprecated, use specific column types to access the options directly + */ options?: CheckboxColumnOption | TextColumnOption; } diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index 5db289384c..7de6bf8e2c 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -842,21 +842,76 @@ declare module 'azdata' { } export interface IconColumnCellValue { + /** + * The icon to be displayed. + */ icon: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri }; - ariaLabel: string; + /** + * The title of the icon. + */ + title: string; + } + + export interface ButtonColumnCellValue { + /** + * The icon to be displayed. + */ + icon?: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri }; + /** + * The title of the button. + */ + title?: string; + } + + export interface HyperlinkColumnCellValue { + /** + * The icon to be displayed. + */ + icon?: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri }; + /** + * The title of the hyperlink. + */ + title?: string; + + /** + * The url to open. + */ + url?: string; } export enum ColumnType { - icon = 3 + icon = 3, + hyperlink = 4 } export interface TableColumn { /** - * The text to display on the column heading. 'value' property will be used, if not specified - **/ + * The text to display on the column heading. 'value' property will be used, if not specified + */ name?: string; } + export interface IconColumnOptions { + /** + * The icon to use for all the cells in this column. + */ + icon?: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri }; + } + + export interface ButtonColumn extends IconColumnOptions, TableColumn { + /** + * Whether to show the text, default value is false. + */ + showText?: boolean; + } + + export interface HyperlinkColumn extends IconColumnOptions, TableColumn { + } + + export interface CheckboxColumn extends TableColumn { + action: ActionOnCellCheckboxCheck; + } + export enum AzureResource { /** * Microsoft Graph diff --git a/src/sql/base/browser/ui/table/formatters.ts b/src/sql/base/browser/ui/table/formatters.ts index c1f3b29d6d..679fe77fbe 100644 --- a/src/sql/base/browser/ui/table/formatters.ts +++ b/src/sql/base/browser/ui/table/formatters.ts @@ -38,7 +38,7 @@ export interface HyperlinkCellValue { export interface CssIconCellValue { iconCssClass: string, - ariaLabel: string + title: string } @@ -115,7 +115,7 @@ export function textFormatter(row: number | undefined, cell: any | undefined, va export function iconCssFormatter(row: number | undefined, cell: any | undefined, value: any, columnDef: any | undefined, dataContext: any | undefined): string { if (isCssIconCellValue(value)) { - return `
`; + return `
`; } return textFormatter(row, cell, value, columnDef, dataContext); } diff --git a/src/sql/base/browser/ui/table/media/table.css b/src/sql/base/browser/ui/table/media/table.css index fc627af822..aa44372176 100644 --- a/src/sql/base/browser/ui/table/media/table.css +++ b/src/sql/base/browser/ui/table/media/table.css @@ -163,8 +163,7 @@ color: #FFFFFF; } -.slick-icon-cell-content, -.slick-button-cell-content { +.slick-icon-cell-content { background-position: 5px center !important; background-repeat: no-repeat; background-size: 16px !important; @@ -175,9 +174,3 @@ display: flex; align-items: center; } - -.slick-button-cell-content { - cursor: pointer; - border-width: 0px; - padding: 0px; -} diff --git a/src/sql/base/browser/ui/table/plugins/buttonColumn.plugin.ts b/src/sql/base/browser/ui/table/plugins/buttonColumn.plugin.ts index 9bd07a1e2f..3262eeb1e0 100644 --- a/src/sql/base/browser/ui/table/plugins/buttonColumn.plugin.ts +++ b/src/sql/base/browser/ui/table/plugins/buttonColumn.plugin.ts @@ -3,133 +3,44 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { TextWithIconColumnDefinition } from 'sql/base/browser/ui/table/plugins/textWithIconColumn'; -import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { Emitter } from 'vs/base/common/event'; -import { KeyCode } from 'vs/base/common/keyCodes'; +import 'vs/css!./media/buttonColumn.plugin'; +import 'vs/css!./media/iconColumn'; +import { BaseClickableColumn, getIconCellValue, IconColumnOptions } from 'sql/base/browser/ui/table/plugins/tableColumn'; +import { escape } from 'sql/base/common/strings'; -export interface ButtonColumnDefinition extends TextWithIconColumnDefinition { -} - -export interface ButtonColumnOptions { - /** - * The CSS class of the icon (either a common icon or one added by the user of this column) to display in the button - */ +export interface ButtonCellValue { iconCssClass?: string; - /** - * The aria-label title of the button - */ - title?: string; - /** - * The unique ID used by SlickGrid - */ - id?: string; - /** - * Whether the column is sortable or not - */ - sortable?: boolean; + title: string; } -export interface ButtonClickEventArgs { - item: T; - position: { x: number, y: number }; - row: number; - column: number; +export interface ButtonColumnOptions extends IconColumnOptions { + /** + * Whether to show the text. + */ + showText?: boolean } -export class ButtonColumn implements Slick.Plugin { - private _handler = new Slick.EventHandler(); - private _definition: ButtonColumnDefinition; - private _grid!: Slick.Grid; - private _onClick = new Emitter>(); - public onClick = this._onClick.event; +export class ButtonColumn extends BaseClickableColumn { constructor(private options: ButtonColumnOptions) { - this._definition = { - id: options.id, - resizable: false, - name: '', + super(); + } + + public get definition(): Slick.Column { + return { + id: this.options.id || this.options.title || this.options.field, + width: this.options.showText === true ? this.options.width : 26, formatter: (row: number, cell: number, value: any, columnDef: Slick.Column, dataContext: T): string => { - return this.formatter(row, cell, value, columnDef, dataContext); + const iconValue = getIconCellValue(this.options, dataContext); + const escapedTitle = escape(iconValue.title ?? ''); + const iconCssClasses = iconValue.iconCssClass ? `codicon icon slick-plugin-icon ${iconValue.iconCssClass}` : ''; + const buttonTypeCssClass = this.options.showText ? 'slick-plugin-button slick-plugin-text-button' : 'slick-plugin-button slick-plugin-image-only-button'; + const buttonText = this.options.showText ? escapedTitle : ''; + return ``; }, - width: 30, - selectable: false, - iconCssClassField: options.iconCssClass, - sortable: options.sortable + name: this.options.name, + resizable: this.options.showText === true, // Image only button has fixed width. + selectable: false }; } - - public init(grid: Slick.Grid): void { - this._grid = grid; - this._handler.subscribe(grid.onClick, (e: DOMEvent, args: Slick.OnClickEventArgs) => this.handleClick(args)); - this._handler.subscribe(grid.onKeyDown, (e: DOMEvent, args: Slick.OnKeyDownEventArgs) => this.handleKeyboardEvent(e as KeyboardEvent, args)); - this._handler.subscribe(grid.onActiveCellChanged, (e: DOMEvent, args: Slick.OnActiveCellChangedEventArgs) => { this.handleActiveCellChanged(args); }); - } - - public destroy(): void { - this._handler.unsubscribeAll(); - } - - private handleActiveCellChanged(args: Slick.OnActiveCellChangedEventArgs): void { - if (this.isCurrentColumn(args.cell)) { - const cellElement = this._grid.getActiveCellNode(); - if (cellElement && cellElement.children) { - const button = cellElement.children[0] as HTMLButtonElement; - button.focus(); - } - } - } - - private handleClick(args: Slick.OnClickEventArgs): void { - if (this.isCurrentColumn(args.cell)) { - // SlickGrid will automatically set active cell on mouse click event, - // during the process of setting active cell, blur event will be triggered and handled in a setTimeout block, - // on Windows platform, the context menu is html based which will respond the focus related events and hide the context menu. - // If we call the fireClickEvent directly the menu will be set to hidden immediately, to workaround the issue we need to wrap it in a setTimeout block. - setTimeout(() => { - this.fireClickEvent(); - }, 0); - } - } - - private handleKeyboardEvent(e: KeyboardEvent, args: Slick.OnKeyDownEventArgs): void { - let event = new StandardKeyboardEvent(e); - if ((event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) && this.isCurrentColumn(args.cell)) { - event.stopPropagation(); - event.preventDefault(); - this.fireClickEvent(); - } - } - - public get definition(): ButtonColumnDefinition { - return this._definition; - } - - private fireClickEvent(): void { - const activeCell = this._grid.getActiveCell(); - const activeCellPosition = this._grid.getActiveCellPosition(); - if (activeCell && activeCellPosition) { - this._onClick.fire({ - row: activeCell.row, - column: activeCell.cell, - item: this._grid.getDataItem(activeCell.row), - position: { - x: (activeCellPosition.left + activeCellPosition.right) / 2, - y: (activeCellPosition.bottom + activeCellPosition.top) / 2 - } - }); - } - } - - private isCurrentColumn(columnIndex: number): boolean { - return this._grid?.getColumns()[columnIndex]?.id === this.definition.id; - } - - private formatter(row: number, cell: number, value: any, columnDef: Slick.Column, dataContext: T): string { - const buttonColumn = columnDef as ButtonColumnDefinition; - - // tabindex=-1 means it is only focusable programatically, when the button column cell becomes active, we will set to focus to the button inside it, the tab navigation experience is smooth. - // Otherwise, if we set tabindex to 0, the focus will go to the button first and then the first cell of the table. - return ``; - } } diff --git a/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts b/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts new file mode 100644 index 0000000000..6fbc629e26 --- /dev/null +++ b/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import 'vs/css!./media/hyperlinkColumn.plugin'; +import 'vs/css!./media/iconColumn'; +import { BaseClickableColumn, getIconCellValue, IconColumnOptions } from 'sql/base/browser/ui/table/plugins/tableColumn'; +import { escape } from 'sql/base/common/strings'; + +export interface HyperlinkCellValue { + iconCssClass?: string; + title: string; + url?: string; +} + +export interface HyperlinkColumnOptions extends IconColumnOptions { +} + +export class HyperlinkColumn extends BaseClickableColumn { + constructor(private options: HyperlinkColumnOptions) { + super(); + } + + public get definition(): Slick.Column { + return { + id: this.options.id || this.options.title || this.options.field, + width: this.options.width, + formatter: (row: number, cell: number, value: any, columnDef: Slick.Column, dataContext: T): string => { + const iconValue = getIconCellValue(this.options, dataContext); + const escapedTitle = escape(iconValue.title ?? ''); + const cellValue = dataContext[this.options.field] as HyperlinkCellValue; + const cssClasses = iconValue.iconCssClass ? `codicon icon slick-plugin-icon ${iconValue.iconCssClass}` : ''; + const urlPart = cellValue?.url ? `href="${encodeURI(cellValue.url)}" target="blank"` : ''; + return `${escapedTitle}`; + }, + name: this.options.name, + resizable: true, + selectable: false + }; + } +} diff --git a/src/sql/base/browser/ui/table/plugins/media/buttonColumn.plugin.css b/src/sql/base/browser/ui/table/plugins/media/buttonColumn.plugin.css new file mode 100644 index 0000000000..8e25e80d3c --- /dev/null +++ b/src/sql/base/browser/ui/table/plugins/media/buttonColumn.plugin.css @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.slick-plugin-button { + cursor: pointer; + height: 100%; + text-align: center; + padding-right: 0px; + padding-top: 0px; + padding-bottom: 0px; +} + +.slick-plugin-button.slick-plugin-text-button { + border-width: 1px; + width: 100%; +} + +.slick-plugin-icon.slick-plugin-button.slick-plugin-text-button { + text-align: left; + padding-left: 0px; + width: 100%; +} + +.slick-plugin-button.slick-plugin-image-only-button { + border-width: 0px; + background-color: transparent; +} + diff --git a/src/sql/base/browser/ui/table/plugins/media/hyperlinkColumn.plugin.css b/src/sql/base/browser/ui/table/plugins/media/hyperlinkColumn.plugin.css new file mode 100644 index 0000000000..23a63d2048 --- /dev/null +++ b/src/sql/base/browser/ui/table/plugins/media/hyperlinkColumn.plugin.css @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.slick-hyperlink-cell { + cursor: pointer; + display: block; + width: 100%; + height: 100%; + text-align: left; +} diff --git a/src/sql/base/browser/ui/table/plugins/media/iconColumn.css b/src/sql/base/browser/ui/table/plugins/media/iconColumn.css new file mode 100644 index 0000000000..edff524b05 --- /dev/null +++ b/src/sql/base/browser/ui/table/plugins/media/iconColumn.css @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.slick-plugin-icon { + padding-left: 26px; + background-size: 16px !important; + background-position: 5px 50% !important; + background-repeat: no-repeat; +} diff --git a/src/sql/base/browser/ui/table/plugins/tableColumn.ts b/src/sql/base/browser/ui/table/plugins/tableColumn.ts new file mode 100644 index 0000000000..bcf3a3eb70 --- /dev/null +++ b/src/sql/base/browser/ui/table/plugins/tableColumn.ts @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { Emitter } from 'vs/base/common/event'; +import { KeyCode } from 'vs/base/common/keyCodes'; + +export interface TableColumn { + readonly definition: Slick.Column; +} + +export interface TableCellClickEventArgs { + item: T; + position: { x: number, y: number }; + row: number; + column: number; +} + +export abstract class BaseClickableColumn implements Slick.Plugin, TableColumn { + private _handler = new Slick.EventHandler(); + private _grid!: Slick.Grid; + private _onClick = new Emitter>(); + public onClick = this._onClick.event; + + constructor() { + } + + public init(grid: Slick.Grid): void { + this._grid = grid; + this._handler.subscribe(grid.onClick, (e: DOMEvent, args: Slick.OnClickEventArgs) => this.handleClick(args)); + this._handler.subscribe(grid.onKeyDown, (e: DOMEvent, args: Slick.OnKeyDownEventArgs) => this.handleKeyboardEvent(e as KeyboardEvent, args)); + this._handler.subscribe(grid.onActiveCellChanged, (e: DOMEvent, args: Slick.OnActiveCellChangedEventArgs) => { this.handleActiveCellChanged(args); }); + } + + public destroy(): void { + this._handler.unsubscribeAll(); + } + + /** + * Returns the column definition. + * Note when implementing this abstract getter: + * Make sure to set the tabindex to -1 for the element returned by the formatter. tabindex=-1 means it is only focusable programatically, when the cell becomes active, we will set to focus to the element inside it, the tab navigation experience is smooth. + * Otherwise, if we set tabindex to 0, the focus will go to the element first and then the first cell of the table. + */ + public abstract get definition(): Slick.Column; + + private handleActiveCellChanged(args: Slick.OnActiveCellChangedEventArgs): void { + if (this.isCurrentColumn(args.cell)) { + const cellElement = this._grid.getActiveCellNode(); + if (cellElement && cellElement.children) { + const element = cellElement.children[0] as HTMLElement; + element.focus(); + } + } + } + + private handleClick(args: Slick.OnClickEventArgs): void { + if (this.isCurrentColumn(args.cell)) { + // SlickGrid will automatically set active cell on mouse click event, + // during the process of setting active cell, blur event will be triggered and handled in a setTimeout block, + // on Windows platform, the context menu is html based which will respond the focus related events and hide the context menu. + // If we call the fireClickEvent directly the menu will be set to hidden immediately, to workaround the issue we need to wrap it in a setTimeout block. + setTimeout(() => { + this.fireClickEvent(); + }, 0); + } + } + + private handleKeyboardEvent(e: KeyboardEvent, args: Slick.OnKeyDownEventArgs): void { + let event = new StandardKeyboardEvent(e); + if ((event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) && this.isCurrentColumn(args.cell)) { + event.stopPropagation(); + event.preventDefault(); + this.fireClickEvent(); + } + } + + private fireClickEvent(): void { + const activeCell = this._grid.getActiveCell(); + const activeCellPosition = this._grid.getActiveCellPosition(); + if (activeCell && activeCellPosition) { + this._onClick.fire({ + row: activeCell.row, + column: activeCell.cell, + item: this._grid.getDataItem(activeCell.row), + position: { + x: (activeCellPosition.left + activeCellPosition.right) / 2, + y: (activeCellPosition.bottom + activeCellPosition.top) / 2 + } + }); + } + } + + private isCurrentColumn(columnIndex: number): boolean { + return this._grid.getColumns()[columnIndex]?.id === this.definition.id; + } +} + + +/** +* Definition for table column. +*/ +export interface BaseTableColumnOptions { + /** + * Id of the column. + */ + id?: string, + /** + * Width of the column in px. + */ + width?: number, + /** + * Column header text. + */ + name?: string, + /** + * The property name in the data object to pull content from. (This is assumed to be on the root of the data object.) + */ + field?: string, + /** + * Whether the column is resizable. Default is true. + */ + resizable?: boolean, + /** + * The CSS class for the column header. + */ + headerCssClass?: string; +} + +/** +* Definition for table column with icon +*/ +export interface IconColumnOptions extends BaseTableColumnOptions { + /** + * The icon class to use for all the cells in this column. If the 'field' is provided, the cell values will overwrite this value. + */ + iconCssClass?: string; + /** + * The title for all the cells. If the 'field' is provided, the cell values will overwrite this value. + */ + title?: string +} + +export interface IconCellValue { + /** + * The icon css class. + */ + iconCssClass: string; + /** + * The title of the cell. + */ + title: string +} + +export function getIconCellValue(options: IconColumnOptions, dataContext: Slick.SlickData): IconCellValue { + if (options.field && dataContext[options.field]) { + const cellValue = dataContext[options.field]; + if (typeof cellValue === 'string') { + return { + iconCssClass: '', + title: cellValue + }; + } else { + return cellValue as IconCellValue; + } + } else { + return { + iconCssClass: options.iconCssClass!, + title: options.title! + }; + } +} diff --git a/src/sql/base/browser/ui/table/plugins/textWithIconColumn.ts b/src/sql/base/browser/ui/table/plugins/textWithIconColumn.ts index 9cf8b52221..a6d654d741 100644 --- a/src/sql/base/browser/ui/table/plugins/textWithIconColumn.ts +++ b/src/sql/base/browser/ui/table/plugins/textWithIconColumn.ts @@ -4,48 +4,28 @@ *--------------------------------------------------------------------------------------------*/ import { escape } from 'sql/base/common/strings'; +import { getIconCellValue, IconColumnOptions, TableColumn } from 'sql/base/browser/ui/table/plugins/tableColumn'; -/** - * Definition for column with icon on the left of text. - */ -export interface TextWithIconColumnDefinition extends Slick.Column { - iconCssClassField?: string; +export interface TextWithIconColumnOptions extends IconColumnOptions { } -export interface TextWithIconColumnOptions { - iconCssClassField?: string; - field?: string; - width?: number; - id?: string; - resizable?: boolean; - name?: string; - headerCssClass?: string; - formatter?: Slick.Formatter -} +export class TextWithIconColumn implements TableColumn { + constructor(private options: TextWithIconColumnOptions) { + } -export class TextWithIconColumn { - - private _definition: TextWithIconColumnDefinition; - - constructor(options: TextWithIconColumnOptions) { - this._definition = { - id: options.id, - field: options.field, - resizable: options.resizable, - formatter: options.formatter ?? this.formatter, - width: options.width, - name: options.name, - iconCssClassField: options.iconCssClassField, + public get definition(): Slick.Column { + return { + id: this.options.id || this.options.field, + field: this.options.field, + resizable: this.options.resizable, + formatter: (row: number, cell: number, value: any, columnDef: Slick.Column, dataContext: T): string => { + const iconValue = getIconCellValue(this.options, dataContext); + return `
${escape(iconValue.title ?? '')}
`; + }, + width: this.options.width, + name: this.options.name, cssClass: 'slick-icon-cell', - headerCssClass: options.headerCssClass + headerCssClass: this.options.headerCssClass }; } - private formatter(row: number, cell: number, value: any, columnDef: Slick.Column, dataContext: T): string { - const iconColumn = columnDef as TextWithIconColumnDefinition; - return `
${escape(value)}
`; - } - - public get definition(): TextWithIconColumnDefinition { - return this._definition; - } } diff --git a/src/sql/workbench/api/common/sqlExtHostTypes.ts b/src/sql/workbench/api/common/sqlExtHostTypes.ts index 1f984a470a..0e24f4db4c 100644 --- a/src/sql/workbench/api/common/sqlExtHostTypes.ts +++ b/src/sql/workbench/api/common/sqlExtHostTypes.ts @@ -813,7 +813,8 @@ export enum ColumnType { text = 0, checkBox = 1, button = 2, - icon = 3 + icon = 3, + hyperlink = 4 } export enum ActionOnCellCheckboxCheck { diff --git a/src/sql/workbench/browser/editor/resourceViewer/resourceViewerInput.ts b/src/sql/workbench/browser/editor/resourceViewer/resourceViewerInput.ts index dcf1ebfc94..22247cddbd 100644 --- a/src/sql/workbench/browser/editor/resourceViewer/resourceViewerInput.ts +++ b/src/sql/workbench/browser/editor/resourceViewer/resourceViewerInput.ts @@ -44,8 +44,7 @@ export class ResourceViewerInput extends EditorInput { this.actionsColumn = new ButtonColumn({ id: 'actions', iconCssClass: 'toggle-more', - title: nls.localize('resourceViewer.showActions', "Show Actions"), - sortable: false + title: nls.localize('resourceViewer.showActions', "Show Actions") }); this.refresh().catch(err => onUnexpectedError(err)); } diff --git a/src/sql/workbench/browser/modelComponents/media/table.css b/src/sql/workbench/browser/modelComponents/media/table.css index ea52ad73f5..c04a083d45 100644 --- a/src/sql/workbench/browser/modelComponents/media/table.css +++ b/src/sql/workbench/browser/modelComponents/media/table.css @@ -21,7 +21,3 @@ .display-none { display: none; } - -.modelview-table-button-icon { - background-color: transparent; -} diff --git a/src/sql/workbench/browser/modelComponents/table.component.ts b/src/sql/workbench/browser/modelComponents/table.component.ts index b8098e3da9..1193e90ed8 100644 --- a/src/sql/workbench/browser/modelComponents/table.component.ts +++ b/src/sql/workbench/browser/modelComponents/table.component.ts @@ -19,7 +19,7 @@ import { attachTableStyler, attachButtonStyler } from 'sql/platform/theme/common import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { getContentHeight, getContentWidth, Dimension, isAncestor } from 'vs/base/browser/dom'; import { RowSelectionModel } from 'sql/base/browser/ui/table/plugins/rowSelectionModel.plugin'; -import { CheckboxSelectColumn, ICheckboxCellActionEventArgs } from 'sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin'; +import { ActionOnCheck, CheckboxSelectColumn, ICheckboxCellActionEventArgs } from 'sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin'; import { Emitter, Event as vsEvent } from 'vs/base/common/event'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; @@ -27,11 +27,13 @@ import { slickGridDataItemColumnValueWithNoData, textFormatter, iconCssFormatter import { isUndefinedOrNull } from 'vs/base/common/types'; import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType, ModelViewAction } from 'sql/platform/dashboard/browser/interfaces'; import { convertSizeToNumber } from 'sql/base/browser/dom'; -import { ButtonColumn, ButtonClickEventArgs } from 'sql/base/browser/ui/table/plugins/buttonColumn.plugin'; +import { ButtonCellValue, ButtonColumn } from 'sql/base/browser/ui/table/plugins/buttonColumn.plugin'; import { IUserFriendlyIcon, createIconCssClass, getIconKey } from 'sql/workbench/browser/modelComponents/iconUtils'; import { HeaderFilter } from 'sql/base/browser/ui/table/plugins/headerFilter.plugin'; import { onUnexpectedError } from 'vs/base/common/errors'; import { ILogService } from 'vs/platform/log/common/log'; +import { TableCellClickEventArgs } from 'sql/base/browser/ui/table/plugins/tableColumn'; +import { HyperlinkCellValue, HyperlinkColumn } from 'sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin'; export enum ColumnSizingMode { ForceFit = 0, // all columns will be sized to fit in viewable space, no horiz scroll bar @@ -43,9 +45,13 @@ enum ColumnType { text = 0, checkBox = 1, button = 2, - icon = 3 + icon = 3, + hyperlink = 4 } +type TableCellInputDataType = string | azdata.IconColumnCellValue | azdata.ButtonColumnCellValue | azdata.HyperlinkColumnCellValue | undefined; +type TableCellDataType = string | CssIconCellValue | ButtonCellValue | HyperlinkCellValue | undefined; + @Component({ selector: 'modelview-table', template: ` @@ -59,13 +65,14 @@ export default class TableComponent extends ComponentBase; private _tableColumns; private _checkboxColumns: CheckboxSelectColumn<{}>[] = []; - private _buttonsColumns: ButtonColumn<{}>[] = []; + private _buttonColumns: ButtonColumn<{}>[] = []; + private _hyperlinkColumns: HyperlinkColumn<{}>[] = []; private _pluginsRegisterStatus: boolean[] = []; private _filterPlugin: HeaderFilter; private _onCheckBoxChanged = new Emitter(); - private _onButtonClicked = new Emitter>(); + private _onButtonClicked = new Emitter>(); public readonly onCheckBoxChanged: vsEvent = this._onCheckBoxChanged.event; - public readonly onButtonClicked: vsEvent> = this._onButtonClicked.event; + public readonly onButtonClicked: vsEvent> = this._onButtonClicked.event; private _iconCssMap: { [iconKey: string]: string } = {}; @ViewChild('table', { read: ElementRef }) private _inputContainer: ElementRef; @@ -80,7 +87,7 @@ export default class TableComponent extends ComponentBase[] { let tableColumns: any[] = columns; if (tableColumns) { - let mycolumns: Slick.Column[] = []; + const mycolumns: Slick.Column[] = []; let index: number = 0; (columns).map(col => { @@ -90,6 +97,8 @@ export default class TableComponent extends ComponentBase { - let object: { [key: string]: string | CssIconCellValue } = {}; + const object: { [key: string]: TableCellDataType } = {}; if (!Array.isArray(row)) { return object; } - row.forEach((val, index) => { - let columnName: string = (columns[index].value) ? columns[index].value : columns[index]; - if (isIconColumnCellValue(val)) { - const icon: IUserFriendlyIcon = val.icon; - const iconKey: string = getIconKey(icon); - const iconCssClass = this._iconCssMap[iconKey] ?? createIconCssClass(icon); - if (!this._iconCssMap[iconKey]) { - this._iconCssMap[iconKey] = iconCssClass; - } - - object[columnName] = { iconCssClass: iconCssClass, ariaLabel: val.ariaLabel }; + const column = columns[index]; + if (typeof column === 'string') { + object[column] = val; } else { - object[columnName] = val; + const columnType = column.type; + let cellValue = undefined; + switch (columnType) { + case ColumnType.icon: + const iconValue = val; + cellValue = { + iconCssClass: this.createIconCssClassInternal(iconValue.icon), + title: iconValue.title + }; + break; + case ColumnType.button: + if (val) { + const buttonValue = val; + cellValue = { + iconCssClass: buttonValue.icon ? this.createIconCssClassInternal(buttonValue.icon) : undefined, + title: buttonValue.title + }; + } + break; + case ColumnType.hyperlink: + if (val) { + const hyperlinkValue = val; + cellValue = { + iconCssClass: hyperlinkValue.icon ? this.createIconCssClassInternal(hyperlinkValue.icon) : undefined, + title: hyperlinkValue.title, + url: hyperlinkValue.url + }; + break; + } + break; + default: + cellValue = val; + } + object[column.value] = cellValue; } }); return object; @@ -173,6 +206,15 @@ export default class TableComponent extends ComponentBase( @@ -307,7 +349,8 @@ export default class TableComponent extends ComponentBase this.registerPlugins(col, this._checkboxColumns[col])); - Object.keys(this._buttonsColumns).forEach(col => this.registerPlugins(col, this._buttonsColumns[col])); + Object.keys(this._buttonColumns).forEach(col => this.registerPlugins(col, this._buttonColumns[col])); + Object.keys(this._hyperlinkColumns).forEach(col => this.registerPlugins(col, this._hyperlinkColumns[col])); if (this.headerFilter === true) { this.registerFilterPlugin(); @@ -356,16 +399,17 @@ export default class TableComponent extends ComponentBase(col.options ? (col.options).actionOnCheckbox : col.action); this._checkboxColumns[col.value] = new CheckboxSelectColumn({ title: col.value, toolTip: col.toolTip, width: col.width, cssClass: col.cssClass, headerCssClass: col.headerCssClass, - actionOnCheck: col.options ? col.options.actionOnCheckbox : null + actionOnCheck: checkboxAction, }, index); this._register(this._checkboxColumns[col.value].onChange((state) => { @@ -382,15 +426,19 @@ export default class TableComponent extends ComponentBase(col.options ? (col.options).icon : col.icon); + this._buttonColumns[col.value] = new ButtonColumn({ + title: col.value, + iconCssClass: icon ? this.createIconCssClassInternal(icon) : undefined, + field: col.value, + showText: col.showText, + name: col.name }); - this._register(this._buttonsColumns[col.value].onClick((state) => { + this._register(this._buttonColumns[col.value].onClick((state) => { this.fireEvent({ eventType: ComponentEventType.onCellAction, args: { @@ -403,7 +451,33 @@ export default class TableComponent extends ComponentBase | ButtonColumn<{}>): void { + private createHyperlinkPlugin(col: azdata.HyperlinkColumn) { + const name = col.value; + if (!this._hyperlinkColumns[col.value]) { + const hyperlinkColumn = new HyperlinkColumn({ + title: col.value, + width: col.width, + iconCssClass: col.icon ? this.createIconCssClassInternal(col.icon) : undefined, + field: col.value, + name: col.name + }); + + this._hyperlinkColumns[col.value] = hyperlinkColumn; + + this._register(hyperlinkColumn.onClick((state) => { + this.fireEvent({ + eventType: ComponentEventType.onCellAction, + args: { + row: state.row, + column: state.column, + name: name + } + }); + })); + } + } + + private registerPlugins(col: string, plugin: CheckboxSelectColumn<{}> | ButtonColumn<{}> | HyperlinkColumn<{}>): void { const index = 'index' in plugin ? plugin.index : this.columns?.findIndex(x => x === col || ('value' in x && x['value'] === col)); if (index >= 0) { @@ -548,7 +622,3 @@ export default class TableComponent extends ComponentBaseobj)?.icon; -} diff --git a/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts b/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts index 34674257ac..273b4e4445 100644 --- a/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts +++ b/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts @@ -6,6 +6,7 @@ import { Router } from '@angular/router'; import { ButtonColumn } from 'sql/base/browser/ui/table/plugins/buttonColumn.plugin'; import { RowSelectionModel } from 'sql/base/browser/ui/table/plugins/rowSelectionModel.plugin'; +import { IconCellValue } from 'sql/base/browser/ui/table/plugins/tableColumn'; import { TextWithIconColumn } from 'sql/base/browser/ui/table/plugins/textWithIconColumn'; import { Table } from 'sql/base/browser/ui/table/table'; import { TableDataView } from 'sql/base/browser/ui/table/tableDataView'; @@ -33,7 +34,7 @@ import { IEditorProgressService } from 'vs/platform/progress/common/progress'; import { IThemeService } from 'vs/platform/theme/common/themeService'; const ShowActionsText: string = nls.localize('dashboard.explorer.actions', "Show Actions"); -const IconClassProperty: string = 'iconClass'; +const NameWithIconProperty: string = 'NameWithIcon'; export const ConnectionProfilePropertyName: string = 'connection_profile'; /** @@ -171,7 +172,10 @@ export class ExplorerTable extends Disposable { this._view.clear(); this._view.clearFilter(); items.forEach(item => { - item[IconClassProperty] = this._explorerView.getIconClass(item); + item[NameWithIconProperty] = { + iconCssClass: this._explorerView.getIconClass(item), + title: item[NameProperty] + }; }); this._view.push(items); } @@ -190,9 +194,8 @@ export class ExplorerTable extends Disposable { if (property.value === NameProperty) { const nameColumn = new TextWithIconColumn({ id: property.value, - iconCssClassField: IconClassProperty, width: columnWidth, - field: property.value, + field: NameWithIconProperty, name: property.displayName }); return nameColumn.definition; diff --git a/src/sql/workbench/test/electron-browser/modalComponents/table.component.test.ts b/src/sql/workbench/test/electron-browser/modalComponents/table.component.test.ts index fd6f047dc6..2f357f6e19 100644 --- a/src/sql/workbench/test/electron-browser/modalComponents/table.component.test.ts +++ b/src/sql/workbench/test/electron-browser/modalComponents/table.component.test.ts @@ -5,7 +5,6 @@ import * as assert from 'assert'; import TableComponent from 'sql/workbench/browser/modelComponents/table.component'; -import { CssIconCellValue } from 'sql/base/browser/ui/table/formatters'; import { NullLogService } from 'vs/platform/log/common/log'; suite('TableComponent Tests', () => { @@ -22,7 +21,7 @@ suite('TableComponent Tests', () => { let columns = ['c1', 'c2', 'c3']; const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService()); - let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns); + let actual = tableComponent.transformData(data, columns); let expected: { [key: string]: string }[] = [ { 'c1': '1', @@ -42,7 +41,7 @@ suite('TableComponent Tests', () => { let data = undefined; const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService()); let columns = ['c1', 'c2', 'c3']; - let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns); + let actual = tableComponent.transformData(data, columns); let expected: { [key: string]: string }[] = []; assert.deepEqual(actual, expected); }); @@ -54,7 +53,7 @@ suite('TableComponent Tests', () => { ]; let columns; const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService()); - let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns); + let actual = tableComponent.transformData(data, columns); let expected: { [key: string]: string }[] = []; assert.deepEqual(actual, expected); }); @@ -66,7 +65,7 @@ suite('TableComponent Tests', () => { ]; const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService()); let columns = ['c1', 'c2', 'c3']; - let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns); + let actual = tableComponent.transformData(data, columns); let expected: { [key: string]: string }[] = [ { 'c1': '1',