From 044a5f6fe43b59eb6f5f32306b1b945e46f8e09c Mon Sep 17 00:00:00 2001 From: Erin Hughes Date: Tue, 8 Oct 2019 16:30:15 +0100 Subject: [PATCH] Created skeleton transaction web view Signed-off-by: Erin Hughes --- azure-pipelines.yml | 60 ++++ azure-templates/cypress-steps.yml | 19 ++ azure-templates/jest-test-steps.yml | 19 ++ cypress/integration/init.spec.ts | 16 +- enzyme/tests/TransactionViewPage.test.tsx | 29 ++ enzyme/tests/TransactionViewSidebar.test.tsx | 29 ++ .../TransactionViewSidebarPanel.test.tsx | 58 ++++ .../TransactionViewPage.test.tsx.snap | 305 +++++++++++++++++ .../TransactionViewSidebar.test.tsx.snap | 50 +++ .../TransactionViewSidebarPanel.test.tsx.snap | 51 +++ enzyme/tests/enzyme.test.tsx | 23 -- extension/webview/ReactView.ts | 2 +- package-lock.json | 315 ++++++------------ package.json | 25 +- src/App.scss | 31 +- src/App.tsx | 9 +- src/components/OneComponent.scss | 28 -- src/components/OneComponent.tsx | 33 -- .../TransactionViewPage.scss | 47 +++ .../TransactionViewPage.tsx | 67 ++++ .../TransactionViewSidebar.scss | 5 + .../TransactionViewSidebar.tsx | 16 + .../TransactionViewSidebarPanel.scss | 19 ++ .../TransactionViewSidebarPanel.tsx | 62 ++++ src/components/TwoComponent.scss | 32 -- src/components/TwoComponent.tsx | 25 -- src/index.scss | 48 +-- src/mixins.scss | 43 +++ 28 files changed, 1041 insertions(+), 425 deletions(-) create mode 100644 azure-templates/cypress-steps.yml create mode 100644 azure-templates/jest-test-steps.yml create mode 100644 enzyme/tests/TransactionViewPage.test.tsx create mode 100644 enzyme/tests/TransactionViewSidebar.test.tsx create mode 100644 enzyme/tests/TransactionViewSidebarPanel.test.tsx create mode 100644 enzyme/tests/__snapshots__/TransactionViewPage.test.tsx.snap create mode 100644 enzyme/tests/__snapshots__/TransactionViewSidebar.test.tsx.snap create mode 100644 enzyme/tests/__snapshots__/TransactionViewSidebarPanel.test.tsx.snap delete mode 100644 enzyme/tests/enzyme.test.tsx delete mode 100644 src/components/OneComponent.scss delete mode 100644 src/components/OneComponent.tsx create mode 100644 src/components/TransactionViewPage/TransactionViewPage.scss create mode 100644 src/components/TransactionViewPage/TransactionViewPage.tsx create mode 100644 src/components/TransactionViewSidebar/TransactionViewSidebar.scss create mode 100644 src/components/TransactionViewSidebar/TransactionViewSidebar.tsx create mode 100644 src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.scss create mode 100644 src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.tsx delete mode 100644 src/components/TwoComponent.scss delete mode 100644 src/components/TwoComponent.tsx create mode 100644 src/mixins.scss diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 315b071aff..a1320904a9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -60,10 +60,68 @@ stages: - template: azure-templates/setup-steps.yml - template: azure-templates/cucumber-steps.yml + - stage: jestTest + condition: ne(variables['Build.Reason'], 'Schedule') + dependsOn: [] + jobs: + - job: jest + strategy: + matrix: + linux: + imageName: 'ubuntu-16.04' + VERSION: '1.35.1' + MODULES: '64' + ELECTRON: '3.0' + TARGET: '3.0.0' + mac: + imageName: 'macos-10.14' + VERSION: '1.35.1' + MODULES: '64' + ELECTRON: '3.0' + TARGET: '3.0.0' + pool: + vmImage: $(imageName) + + steps: + - template: azure-templates/setup-steps.yml + - template: azure-templates/rebuild-steps.yml + - template: azure-templates/jest-test-steps.yml + + - stage: cypressTest + condition: ne(variables['Build.Reason'], 'Schedule') + dependsOn: [] + jobs: + - job: cypress + strategy: + matrix: + linux: + imageName: 'ubuntu-16.04' + VERSION: '1.35.1' + MODULES: '64' + ELECTRON: '3.0' + TARGET: '3.0.0' + mac: + imageName: 'macos-10.14' + VERSION: '1.35.1' + MODULES: '64' + ELECTRON: '3.0' + TARGET: '3.0.0' + pool: + vmImage: $(imageName) + + steps: + - template: azure-templates/setup-steps.yml + - template: azure-templates/rebuild-steps.yml + - template: azure-templates/cypress-steps.yml + + + - stage: buildPackage dependsOn: - unitTest - cucumberTest + - jestTest + - cypress jobs: - job: buildPackage @@ -93,6 +151,8 @@ stages: dependsOn: - unitTest - cucumberTest + - jestTest + - cypressTest - buildPackage jobs: - job: diff --git a/azure-templates/cypress-steps.yml b/azure-templates/cypress-steps.yml new file mode 100644 index 0000000000..289084fe16 --- /dev/null +++ b/azure-templates/cypress-steps.yml @@ -0,0 +1,19 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +steps: + - bash: | + npm run cypressCli + env: + DISPLAY: ':99.0' + displayName: Run jest tests + condition: succeeded() diff --git a/azure-templates/jest-test-steps.yml b/azure-templates/jest-test-steps.yml new file mode 100644 index 0000000000..7305364934 --- /dev/null +++ b/azure-templates/jest-test-steps.yml @@ -0,0 +1,19 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +steps: + - bash: | + npm run jestTest + env: + DISPLAY: ':99.0' + displayName: Run jest tests + condition: succeeded() diff --git a/cypress/integration/init.spec.ts b/cypress/integration/init.spec.ts index 2a8e9ecd34..6f2711678d 100644 --- a/cypress/integration/init.spec.ts +++ b/cypress/integration/init.spec.ts @@ -4,18 +4,14 @@ chai.should(); describe('Cypress', () => { it('is working', () => { cy.visit('build/index.html').then((window) => { - window.postMessage('/one', '*'); // This is needed to trigger the `window.addEventListener` + window.postMessage('/transaction', '*'); // This is needed to trigger the `window.addEventListener` }); - cy.get('#checkboxOne').then((checkbox: any) => { - const label: any[] = checkbox.siblings('label'); - label.should.have.text('checkboxOne Label'); - }); - - cy.get('#buttonOne').contains('Do Nothing').click(); - - cy.focused().should('have.id', 'buttonOne').and('have.class', 'bx--btn--primary'); - cy.focused().should('have.css', 'border-color').and('eq', 'rgb(255, 255, 255)'); + cy.get('#create-button').click(); + cy.focused().should('have.id', 'create-button'); + cy.get('#import-button').click(); + cy.focused().should('have.id', 'import-button'); }); + }); diff --git a/enzyme/tests/TransactionViewPage.test.tsx b/enzyme/tests/TransactionViewPage.test.tsx new file mode 100644 index 0000000000..cfb7218a18 --- /dev/null +++ b/enzyme/tests/TransactionViewPage.test.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import TransactionViewPage from '../../src/components/TransactionViewPage/TransactionViewPage'; +import chai from 'chai'; +import sinon from 'sinon'; +import sinonChai from 'sinon-chai'; +chai.should(); +chai.use(sinonChai); + +describe('TransactionViewPage component', () => { + + let mySandBox: sinon.SinonSandbox; + + beforeEach(async () => { + mySandBox = sinon.createSandbox(); + }); + + afterEach(async () => { + mySandBox.restore(); + }); + + it('should render the expected snapshot', async () => { + const component: any = renderer + .create() + .toJSON(); + expect(component).toMatchSnapshot(); + }); + +}); diff --git a/enzyme/tests/TransactionViewSidebar.test.tsx b/enzyme/tests/TransactionViewSidebar.test.tsx new file mode 100644 index 0000000000..e4b3f9bcd4 --- /dev/null +++ b/enzyme/tests/TransactionViewSidebar.test.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import TransactionViewSidebar from '../../src/components/TransactionViewSidebar/TransactionViewSidebar'; +import chai from 'chai'; +import sinon from 'sinon'; +import sinonChai from 'sinon-chai'; +chai.should(); +chai.use(sinonChai); + +describe('TransactionViewSidebar component', () => { + + let mySandBox: sinon.SinonSandbox; + + beforeEach(async () => { + mySandBox = sinon.createSandbox(); + }); + + afterEach(async () => { + mySandBox.restore(); + }); + + it('should render the expected snapshot', async () => { + const component: any = renderer + .create() + .toJSON(); + expect(component).toMatchSnapshot(); + }); + +}); diff --git a/enzyme/tests/TransactionViewSidebarPanel.test.tsx b/enzyme/tests/TransactionViewSidebarPanel.test.tsx new file mode 100644 index 0000000000..2d793aae8e --- /dev/null +++ b/enzyme/tests/TransactionViewSidebarPanel.test.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import { mount } from 'enzyme'; +import SidebarPanel from '../../src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel'; +import chai from 'chai'; +import sinon from 'sinon'; +import sinonChai from 'sinon-chai'; +chai.should(); +chai.use(sinonChai); + +describe('SidebarPanel component', () => { + + let mySandBox: sinon.SinonSandbox; + + beforeEach(async () => { + mySandBox = sinon.createSandbox(); + }); + + afterEach(async () => { + mySandBox.restore(); + }); + + it('should render the expected snapshot when panelType = \`buttons\`', async () => { + const component: any = renderer + .create() + .toJSON(); + expect(component).toMatchSnapshot(); + }); + + it('should render the expected snapshot when panelType = \`filters\`', async () => { + const component: any = renderer + .create() + .toJSON(); + expect(component).toMatchSnapshot(); + }); + + it('should render the expected snapshot when panelType = \`log\`', async () => { + const component: any = renderer + .create() + .toJSON(); + expect(component).toMatchSnapshot(); + }); + + it('will one day allow a user to create a new transaction', async() => { + const createTxnSpy: sinon.SinonSpy = sinon.spy(SidebarPanel.prototype, 'createTxn'); + const component: any = mount(); + component.find('button[id=\'create-button\']').simulate('click'); + createTxnSpy.should.have.been.called; + }); + + it('will one day allow a user to create a new transaction', async() => { + const importTxnSpy: sinon.SinonSpy = sinon.spy(SidebarPanel.prototype, 'importTxn'); + const component: any = mount(); + component.find('button[id=\'import-button\']').simulate('click'); + importTxnSpy.should.have.been.called; + }); + +}); diff --git a/enzyme/tests/__snapshots__/TransactionViewPage.test.tsx.snap b/enzyme/tests/__snapshots__/TransactionViewPage.test.tsx.snap new file mode 100644 index 0000000000..23f76bf5be --- /dev/null +++ b/enzyme/tests/__snapshots__/TransactionViewPage.test.tsx.snap @@ -0,0 +1,305 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TransactionViewPage component should render the expected snapshot 1`] = ` +
+
+ +
+
+ + penguinContract@0.0.1 + +

+ Transactions +

+
+
+
+

+ Welcome to your transaction web view for + + penguinContract@0.0.1 + + ; use this to submit and evaluate new and existing transactions. +

+

+ Unsure of where to start? Follow our introductory Getting Started section opposite. +

+
+
+ Smart Contracts +
+

+ To switch to the web view for a different smart contract, select the smart contract below +

+ + penguinContract@0.0.1 + +
+ + congaContract@0.0.1 + +
+
+
+ Getting Started +
+
    +
  • + +
    +
  • +
+
    +
  • + +
    +
  • +
+
    +
  • + +
    +
  • +
+
    +
  • + +
    +
  • +
+
+
+
+
+
+`; diff --git a/enzyme/tests/__snapshots__/TransactionViewSidebar.test.tsx.snap b/enzyme/tests/__snapshots__/TransactionViewSidebar.test.tsx.snap new file mode 100644 index 0000000000..819c4d7780 --- /dev/null +++ b/enzyme/tests/__snapshots__/TransactionViewSidebar.test.tsx.snap @@ -0,0 +1,50 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TransactionViewSidebar component should render the expected snapshot 1`] = ` + +`; diff --git a/enzyme/tests/__snapshots__/TransactionViewSidebarPanel.test.tsx.snap b/enzyme/tests/__snapshots__/TransactionViewSidebarPanel.test.tsx.snap new file mode 100644 index 0000000000..376e815eeb --- /dev/null +++ b/enzyme/tests/__snapshots__/TransactionViewSidebarPanel.test.tsx.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`SidebarPanel component should render the expected snapshot when panelType = \`buttons\` 1`] = ` +
+ + +
+`; + +exports[`SidebarPanel component should render the expected snapshot when panelType = \`filters\` 1`] = ` +
+
+ Filters +
+
+`; + +exports[`SidebarPanel component should render the expected snapshot when panelType = \`log\` 1`] = ` +
+
+ Transactions +
+
+`; diff --git a/enzyme/tests/enzyme.test.tsx b/enzyme/tests/enzyme.test.tsx deleted file mode 100644 index 3d450a86fc..0000000000 --- a/enzyme/tests/enzyme.test.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { Component } from 'react'; -import { mount, ShallowWrapper, shallow } from 'enzyme'; -import OneComponent from '../../src/components/OneComponent'; -import chai from 'chai'; -import sinon from 'sinon'; -import sinonChai from 'sinon-chai'; -chai.should(); -chai.use(sinonChai); -const should: Chai.Should = chai.should(); -describe('hello', () => { - - let mySandBox: sinon.SinonSandbox; - beforeEach(async () => { - mySandBox = sinon.createSandbox(); - }); - - it('should do something', async () => { - const mountedComponent: any = mount(); - const html: string = mountedComponent.html(); - should.exist(html); - }); -}); diff --git a/extension/webview/ReactView.ts b/extension/webview/ReactView.ts index 7c59f04d03..8072efc12f 100644 --- a/extension/webview/ReactView.ts +++ b/extension/webview/ReactView.ts @@ -39,7 +39,7 @@ export class ReactView extends View { loadComponent(panel: vscode.WebviewPanel): void { // Tell the React app to open up the component where the route is '/one' - panel.webview.postMessage('/one'); + panel.webview.postMessage('/transaction'); } async getHTMLString(): Promise { diff --git a/package-lock.json b/package-lock.json index 44c23890e5..fffbb9f5cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1142,6 +1142,15 @@ "resolved": "https://registry.npmjs.org/@carbon/colors/-/colors-10.4.1.tgz", "integrity": "sha512-BBAUTYtarrBbeRnbtcx8HsWfMBHdzAef5jd3U4JkiBH54fL5rizK/HjVVEjRol2YYcPH3uGpYBjGx/7s5vR9ww==" }, + "@carbon/grid": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-10.6.0.tgz", + "integrity": "sha512-w2mezmOSnwIoK2VZTiFsGc2rx9441c3/kxkYJK/uVxykvN4hDXBmJBJidFTtnWgB4VENhdHvZcXKpJi5C+MyJQ==", + "requires": { + "@carbon/import-once": "10.3.0", + "@carbon/layout": "10.5.0" + } + }, "@carbon/icon-helpers": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/@carbon/icon-helpers/-/icon-helpers-10.4.0.tgz", @@ -1942,7 +1951,6 @@ "version": "5.0.40", "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", - "optional": true, "requires": { "@types/long": "*", "@types/node": "*" @@ -2083,8 +2091,7 @@ "@types/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", - "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==", - "optional": true + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/minimatch": { "version": "3.0.3", @@ -2151,6 +2158,15 @@ "@types/react-router": "*" } }, + "@types/react-test-renderer": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-16.9.0.tgz", + "integrity": "sha512-bN5EyjtuTY35xX7N5j0KP1vg5MpUXHpFTX6tGsqkNOthjNvet4VQOYRxFh+NT5cDSJrATmAFK9NLeYZ4mp/o0Q==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/rimraf": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.2.tgz", @@ -2884,7 +2900,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", - "optional": true, "requires": { "colour": "~0.7.1", "optjs": "~3.2.2" @@ -3647,8 +3662,7 @@ "browser-request": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", - "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", - "optional": true + "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=" }, "browser-resolve": { "version": "1.11.3", @@ -3842,7 +3856,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", - "optional": true, "requires": { "long": "~3" }, @@ -3850,8 +3863,7 @@ "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", - "optional": true + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" } } }, @@ -4215,8 +4227,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -4237,14 +4248,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4259,20 +4268,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -4389,8 +4395,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -4402,7 +4407,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4417,7 +4421,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4425,14 +4428,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4451,7 +4452,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4532,8 +4532,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -4545,7 +4544,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4631,8 +4629,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -4668,7 +4665,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4688,7 +4684,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4732,14 +4727,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -4941,7 +4934,6 @@ "version": "0.17.0", "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz", "integrity": "sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==", - "optional": true, "requires": { "browser-request": "~0.3.0", "debug": "^3.0.0", @@ -5057,8 +5049,7 @@ "colour": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=", - "optional": true + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" }, "combined-stream": { "version": "1.0.8", @@ -5895,8 +5886,7 @@ "cycle": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", - "optional": true + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" }, "cyclist": { "version": "1.0.1", @@ -6875,8 +6865,7 @@ "errs": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", - "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", - "optional": true + "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=" }, "es-abstract": { "version": "1.14.2", @@ -7875,8 +7864,7 @@ "eyes": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", - "optional": true + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" }, "fabric-ca-client": { "version": "1.4.5-snapshot.69", @@ -7971,7 +7959,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", - "optional": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -8012,7 +7999,6 @@ "version": "1.4.5-snapshot.69", "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-1.4.5-snapshot.69.tgz", "integrity": "sha512-y/GuNLrkWJ6QtJQI7jT+0szV41qzeP3+pvlZvWxTA50f5akpjbAJfyGBDO9GnfytPtrrgQ9tvmUGcOa3ahQJ5Q==", - "optional": true, "requires": { "@types/bytebuffer": "^5.0.34", "bn.js": "^4.11.3", @@ -8066,7 +8052,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", - "optional": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -11443,7 +11428,6 @@ "version": "1.23.3", "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz", "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==", - "optional": true, "requires": { "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", @@ -11455,23 +11439,19 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, - "optional": true + "bundled": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", - "bundled": true, - "optional": true + "bundled": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, - "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -11479,13 +11459,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -11493,69 +11471,57 @@ }, "chownr": { "version": "1.1.2", - "bundled": true, - "optional": true + "bundled": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "debug": { "version": "3.2.6", "bundled": true, - "optional": true, "requires": { "ms": "^2.1.1" } }, "deep-extend": { "version": "0.6.0", - "bundled": true, - "optional": true + "bundled": true }, "delegates": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, - "optional": true + "bundled": true }, "fs-minipass": { "version": "1.2.6", "bundled": true, - "optional": true, "requires": { "minipass": "^2.2.1" } }, "fs.realpath": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "gauge": { "version": "2.7.4", "bundled": true, - "optional": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -11570,7 +11536,6 @@ "glob": { "version": "7.1.4", "bundled": true, - "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -11582,13 +11547,11 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, - "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -11596,7 +11559,6 @@ "ignore-walk": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "minimatch": "^3.0.4" } @@ -11604,7 +11566,6 @@ "inflight": { "version": "1.0.6", "bundled": true, - "optional": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -11612,44 +11573,37 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", - "bundled": true, - "optional": true + "bundled": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -11658,7 +11612,6 @@ "minizlib": { "version": "1.2.1", "bundled": true, - "optional": true, "requires": { "minipass": "^2.2.1" } @@ -11666,27 +11619,23 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" }, "dependencies": { "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true } } }, "ms": { "version": "2.1.2", - "bundled": true, - "optional": true + "bundled": true }, "needle": { "version": "2.4.0", "bundled": true, - "optional": true, "requires": { "debug": "^3.2.6", "iconv-lite": "^0.4.4", @@ -11696,7 +11645,6 @@ "node-pre-gyp": { "version": "0.13.0", "bundled": true, - "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -11713,7 +11661,6 @@ "nopt": { "version": "4.0.1", "bundled": true, - "optional": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" @@ -11721,13 +11668,11 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, - "optional": true + "bundled": true }, "npm-packlist": { "version": "1.4.4", "bundled": true, - "optional": true, "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" @@ -11736,7 +11681,6 @@ "npmlog": { "version": "4.1.2", "bundled": true, - "optional": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -11746,36 +11690,30 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", - "bundled": true, - "optional": true + "bundled": true }, "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "osenv": { "version": "0.1.5", "bundled": true, - "optional": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -11783,18 +11721,15 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "process-nextick-args": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "rc": { "version": "1.2.8", "bundled": true, - "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -11805,7 +11740,6 @@ "readable-stream": { "version": "2.3.6", "bundled": true, - "optional": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -11819,45 +11753,37 @@ "rimraf": { "version": "2.7.1", "bundled": true, - "optional": true, "requires": { "glob": "^7.1.3" } }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, - "optional": true + "bundled": true }, "sax": { "version": "1.2.4", - "bundled": true, - "optional": true + "bundled": true }, "semver": { "version": "5.7.1", - "bundled": true, - "optional": true + "bundled": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, - "optional": true + "bundled": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, - "optional": true + "bundled": true }, "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -11867,7 +11793,6 @@ "string_decoder": { "version": "1.1.1", "bundled": true, - "optional": true, "requires": { "safe-buffer": "~5.1.0" } @@ -11875,20 +11800,17 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "tar": { "version": "4.4.10", "bundled": true, - "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -11901,26 +11823,22 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "wide-align": { "version": "1.1.3", "bundled": true, - "optional": true, "requires": { "string-width": "^1.0.2 || 2" } }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.3", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -13838,8 +13756,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -13860,14 +13777,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -13882,20 +13797,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -14012,8 +13924,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -14025,7 +13936,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -14040,7 +13950,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -14048,14 +13957,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -14074,7 +13981,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -14155,8 +14061,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -14168,7 +14073,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -14254,8 +14158,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -14291,7 +14194,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -14311,7 +14213,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -14355,14 +14256,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } } @@ -15305,8 +15204,7 @@ "js-sha3": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", - "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==", - "optional": true + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==" }, "js-tokens": { "version": "4.0.0", @@ -15498,14 +15396,12 @@ "jsrsasign": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-7.2.2.tgz", - "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=", - "optional": true + "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=" }, "jssha": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/jssha/-/jssha-2.3.1.tgz", - "integrity": "sha1-FHshJTaQNcpLL30hDcU58Amz3po=", - "optional": true + "integrity": "sha1-FHshJTaQNcpLL30hDcU58Amz3po=" }, "jsx-ast-utils": { "version": "2.2.1", @@ -15902,8 +15798,7 @@ "lodash.clone": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", - "optional": true + "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" }, "lodash.debounce": { "version": "4.0.8", @@ -15931,8 +15826,7 @@ "lodash.isempty": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", - "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=", - "optional": true + "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=" }, "lodash.isequal": { "version": "4.5.0", @@ -16087,8 +15981,7 @@ "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "optional": true + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "loose-envify": { "version": "1.4.0", @@ -16972,7 +16865,6 @@ "version": "6.4.4", "resolved": "https://registry.npmjs.org/nano/-/nano-6.4.4.tgz", "integrity": "sha512-7sldMrZI1ZH8QE29PnzohxLfR67WNVzMKLa7EMl3x9Hr+0G+YpOUCq50qZ9G66APrjcb0Of2BTOZLNBCutZGag==", - "optional": true, "requires": { "cloudant-follow": "~0.17.0", "debug": "^2.2.0", @@ -16985,7 +16877,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "optional": true, "requires": { "ms": "2.0.0" } @@ -17020,7 +16911,6 @@ "version": "0.10.0", "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", - "optional": true, "requires": { "async": "^1.4.0", "ini": "^1.3.0", @@ -17680,8 +17570,7 @@ "optjs": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=", - "optional": true + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" }, "ora": { "version": "0.2.3", @@ -19565,7 +19454,6 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "optional": true, "requires": { "ascli": "~1", "bytebuffer": "~5", @@ -21410,8 +21298,7 @@ "secure-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", - "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", - "optional": true + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" }, "select-hose": { "version": "2.0.0", @@ -21839,8 +21726,7 @@ "sjcl": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", - "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=", - "optional": true + "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=" }, "slash": { "version": "1.0.0", @@ -22250,8 +22136,7 @@ "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "optional": true + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, "stack-utils": { "version": "1.0.2", @@ -23786,7 +23671,6 @@ "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "optional": true, "requires": { "inherits": "2.0.3" }, @@ -23794,8 +23678,7 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "optional": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" } } }, @@ -24754,14 +24637,12 @@ "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", - "optional": true + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" }, "winston": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz", "integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==", - "optional": true, "requires": { "async": "~1.0.0", "colors": "1.0.x", @@ -24774,8 +24655,7 @@ "async": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", - "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", - "optional": true + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" } } }, @@ -25107,7 +24987,6 @@ "version": "3.32.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "optional": true, "requires": { "camelcase": "^2.0.1", "cliui": "^3.0.3", diff --git a/package.json b/package.json index 3f05d9dee8..4c9a77c058 100755 --- a/package.json +++ b/package.json @@ -734,6 +734,14 @@ "command": "gatewaysExplorer.testSmartContractEntry", "when": "view == gatewaysExplorer && viewItem == blockchain-instantiated-multi-contract-item || viewItem == blockchain-instantiated-contract-item || viewItem == blockchain-contract-item || viewItem == blockchain-instantiated-unknown-item" }, + { + "command": "reactPage.open", + "when": "view == gatewaysExplorer && viewItem == blockchain-instantiated-unknown-item && false" + }, + { + "command": "reactPage.open", + "when": "view == gatewaysExplorer && viewItem == blockchain-instantiated-contract-item && false" + }, { "command": "gatewaysExplorer.submitTransactionEntry", "when": "view == gatewaysExplorer && viewItem == blockchain-transaction-item" @@ -1264,7 +1272,8 @@ "build": "cp ./ExtensionCommands.ts ./src/ExtensionCommands.ts && ./scripts/build-non-split.js && tsc -p tsconfig.extension.json && tsc -p tsconfig.json", "cypress": "cypress open", "cypressCli": "cypress run", - "jestTest": "./node_modules/.bin/jest" + "jestTest": "./node_modules/.bin/jest", + "start": "react-scripts start" }, "devDependencies": { "@bahmutov/add-typescript-to-cypress": "^2.1.2", @@ -1280,6 +1289,7 @@ "@types/node": "10.14.5", "@types/react": "^16.3.14", "@types/react-dom": "^16.0.5", + "@types/react-test-renderer": "^16.9.0", "@types/rimraf": "^2.0.2", "@types/semver": "^6.0.0", "@types/sinon": "5.0.1", @@ -1322,6 +1332,7 @@ "vscode-test": "1.2.0" }, "dependencies": { + "@carbon/grid": "^10.6.0", "@carbon/themes": "^10.6.0", "@carbon/type": "^10.5.0", "@fidm/x509": "1.1.3", @@ -1463,6 +1474,7 @@ ".+\\.(css|styl|less|sass|scss)$": "jest-transform-css" }, "moduleNameMapper": { + "^.+\\.(css|less|scss)$": "babel-jest", "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/enzyme/__mocks__/fileMock.js" }, "testMatch": [ @@ -1470,6 +1482,15 @@ ], "setupFilesAfterEnv": [ "/enzyme/setupTests.ts" - ] + ], + "collectCoverage": true, + "coverageThreshold": { + "global": { + "branches": 100, + "functions": 100, + "lines": 100, + "statements": -1 + } + } } } diff --git a/src/App.scss b/src/App.scss index f1df19059c..f1aea6368c 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,28 +1,3 @@ -.App { - text-align: center; -} - -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 80px; -} - -.App-header { -// background-color: #222; - height: 150px; - padding: 20px; -// color: white; -} - -.App-title { - font-size: 1.5em; -} - -.App-intro { - font-size: large; -} - -@keyframes App-logo-spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} +@import 'node_modules/carbon-components/scss/components/accordion/_accordion'; +@import 'node_modules/carbon-components/scss/components/button/_button'; +@import 'node_modules/carbon-components/scss/components/link/link'; diff --git a/src/App.tsx b/src/App.tsx index c7b30e22cb..cb72a3f87c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,8 +2,7 @@ import * as React from 'react'; import './App.scss'; import { HashRouter as Router, Route, Redirect } from 'react-router-dom'; -import OneComponent from './components/OneComponent'; -import TwoComponent from './components/TwoComponent'; +import TransactionViewPage from './components/TransactionViewPage/TransactionViewPage'; class App extends React.Component { state: any; @@ -28,14 +27,13 @@ class App extends React.Component { console.log('Rendering app, this.state.redirectPath is', this.state.redirectPath); if (this.state.redirectPath === undefined) { // Maybe we should display a loading spinner instead? - return (
No component asked to be loaded
); + return
; } else { return (
}> - - + }>
); @@ -45,7 +43,6 @@ class App extends React.Component { public redirectComponent(path: string) { this.setState({redirectPath: path}); - } } diff --git a/src/components/OneComponent.scss b/src/components/OneComponent.scss deleted file mode 100644 index bc9fdad580..0000000000 --- a/src/components/OneComponent.scss +++ /dev/null @@ -1,28 +0,0 @@ -.App { - text-align: center; -} -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 80px; -} - -.App-header { -// background-color: #222; - height: 150px; - padding: 20px; -// color: white; -} - -.App-title { - font-size: 1.5em; -} - -.App-intro { - font-size: large; -// background-color: $ui-background; -} - -@keyframes App-logo-spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} diff --git a/src/components/OneComponent.tsx b/src/components/OneComponent.tsx deleted file mode 100644 index 49c4ce3000..0000000000 --- a/src/components/OneComponent.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import * as React from 'react'; -import './OneComponent.scss'; -import { Button, Checkbox, TextInput } from 'carbon-components-react'; -import logo from '../logo.svg'; -import { ExtensionCommands } from '../ExtensionCommands'; - -class OneComponent extends React.Component { - - public someFcn() { - return 'actual value'; - } - - public render() { - return ( -
-
- logo -

This is Component #1

-
-

- Component #1 -

- - - - -
- - ); - } -} - -export default OneComponent; diff --git a/src/components/TransactionViewPage/TransactionViewPage.scss b/src/components/TransactionViewPage/TransactionViewPage.scss new file mode 100644 index 0000000000..d4002fccdd --- /dev/null +++ b/src/components/TransactionViewPage/TransactionViewPage.scss @@ -0,0 +1,47 @@ +@import '@carbon/layout/scss/_spacing'; +@import '@carbon/grid/scss/grid'; + +body { + font-size: 14px; + letter-spacing: 0.01px; + font-weight: 400; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + -o-font-smoothing: antialiased; +} + +.page-container { + margin: 0; + padding: 0; + h5 { + padding-bottom: $spacing-06; + } +} + +.inner-container { + height: 100vh; +} + +.page-contents { + padding: $spacing-07; +} + +.titles-container { + padding: 0px $spacing-04; + + h1 { + padding: $spacing-09 0px; + } +} + +.contents-container { + margin: $spacing-02; + padding: 0px $spacing-04; +} + +.contents-left { + + h5 { + padding-top: $spacing-09; + } +} diff --git a/src/components/TransactionViewPage/TransactionViewPage.tsx b/src/components/TransactionViewPage/TransactionViewPage.tsx new file mode 100644 index 0000000000..b512bba9ef --- /dev/null +++ b/src/components/TransactionViewPage/TransactionViewPage.tsx @@ -0,0 +1,67 @@ +import React, { Component } from 'react'; +import './TransactionViewPage.scss'; +import Sidebar from '../TransactionViewSidebar/TransactionViewSidebar'; +import { Accordion, AccordionItem, Link } from 'carbon-components-react'; + +type PageProps = { + activeSmartContract: string +}; + +type PageState = { + activeSmartContract: string +} + +class TransactionViewPage extends Component { + + constructor(props: Readonly) { + super(props); + this.state = { + activeSmartContract: this.props.activeSmartContract + } + } + + public render() { + return ( +
+
+ +
+
+ {this.state.activeSmartContract} +

Transactions

+
+
+
+

Welcome to your transaction web view for {this.props.activeSmartContract}; use this to submit and evaluate new and existing transactions.

+

Unsure of where to start? Follow our introductory Getting Started section opposite.

+
+
Smart Contracts
+

To switch to the web view for a different smart contract, select the smart contract below

+ {this.state.activeSmartContract} +
+ congaContract@0.0.1 +
+
+
Getting Started
+ + + + + + + + + + + + +
+
+
+
+
+ ); + } +} + +export default TransactionViewPage; diff --git a/src/components/TransactionViewSidebar/TransactionViewSidebar.scss b/src/components/TransactionViewSidebar/TransactionViewSidebar.scss new file mode 100644 index 0000000000..2c785ee364 --- /dev/null +++ b/src/components/TransactionViewSidebar/TransactionViewSidebar.scss @@ -0,0 +1,5 @@ +@import '@carbon/colors/scss/colors'; + +.sidebar-container { + border-right: 1px solid $carbon--gray-20; +} diff --git a/src/components/TransactionViewSidebar/TransactionViewSidebar.tsx b/src/components/TransactionViewSidebar/TransactionViewSidebar.tsx new file mode 100644 index 0000000000..e2fb0ac481 --- /dev/null +++ b/src/components/TransactionViewSidebar/TransactionViewSidebar.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import './TransactionViewSidebar.scss'; +import SidebarPanel from '../TransactionViewSidebarPanel/TransactionViewSidebarPanel'; + +function TransactionViewSidebar(): any { + + return ( + + ); +} + +export default TransactionViewSidebar; diff --git a/src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.scss b/src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.scss new file mode 100644 index 0000000000..8f4bec5024 --- /dev/null +++ b/src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.scss @@ -0,0 +1,19 @@ +@import '@carbon/layout/scss/_spacing'; +@import '@carbon/colors/scss/colors'; + +.panel-container { + display: flex; + flex-direction: column; + margin-left: $spacing-04; + padding: $spacing-06 $spacing-08; + border-bottom: 1px solid $carbon--gray-20; + + &:first-of-type { + border: none; + padding: $spacing-08 $spacing-08 $spacing-06 $spacing-08; + } + + #create-button, #import-button { + margin: $spacing-03 0px; + } +} diff --git a/src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.tsx b/src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.tsx new file mode 100644 index 0000000000..3c7642942b --- /dev/null +++ b/src/components/TransactionViewSidebarPanel/TransactionViewSidebarPanel.tsx @@ -0,0 +1,62 @@ +import React, { Component } from 'react'; +import './TransactionViewSidebarPanel.scss'; +import { Button } from 'carbon-components-react'; + +type SidebarPanelProps = { + panelType: 'buttons' | 'filters' | 'log' +}; + +type SidebarPanelState = { + panelType: 'buttons' | 'filters' | 'log' +}; + +class TransactionViewSidebarPanel extends Component { + + constructor(props: Readonly) { + super(props); + this.state = { + panelType: this.props.panelType + } + } + + public createTxn() { + console.log('create a new transaction'); + } + + public importTxn() { + console.log('import an existing transaction'); + } + + private getContents(): any { + let panelTSX: any; + + if (this.state.panelType === 'buttons') { + panelTSX = ( +
+ + +
+ ); + } else if (this.state.panelType === 'filters') { + panelTSX = ( +
+
Filters
+
+ ); + } else { + panelTSX = ( +
+
Transactions
+
+ ); + } + + return panelTSX; + } + + public render() { + return this.getContents(); + } +} + +export default TransactionViewSidebarPanel; diff --git a/src/components/TwoComponent.scss b/src/components/TwoComponent.scss deleted file mode 100644 index bfc19b1b1d..0000000000 --- a/src/components/TwoComponent.scss +++ /dev/null @@ -1,32 +0,0 @@ - -// @import '@carbon/themes/scss/themes'; - -// @include carbon--theme($carbon--theme--g100); -// .App { -// text-align: center; -// } - -// .App-logo { -// animation: App-logo-spin infinite 20s linear; -// height: 80px; -// } - -// .App-header { -// background-color: #222; -// height: 150px; -// padding: 20px; -// color: white; -// } - -// .App-title { -// font-size: 1.5em; -// } - -// .App-intro { -// font-size: large; -// } - -// @keyframes App-logo-spin { -// from { transform: rotate(0deg); } -// to { transform: rotate(360deg); } -// } diff --git a/src/components/TwoComponent.tsx b/src/components/TwoComponent.tsx deleted file mode 100644 index abe4753582..0000000000 --- a/src/components/TwoComponent.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react'; -import './TwoComponent.scss'; -import { Button, Checkbox } from 'carbon-components-react'; -import logo from '../logo.svg'; - -class TwoComponent extends React.Component { - public render() { - return ( -
-

hello world

-
- logo -

This is another component!

-
-

- Show some other stuff here! -

- - -
- ); - } -} - -export default TwoComponent; diff --git a/src/index.scss b/src/index.scss index 2c96b334db..1ec29b4a5c 100644 --- a/src/index.scss +++ b/src/index.scss @@ -4,6 +4,7 @@ @import '@carbon/type/scss/type'; @import '@carbon/type/scss/font-face/_mono'; @import '@carbon/type/scss/font-face/_sans'; +@import './mixins.scss'; @include carbon--type-reset(); @include carbon--font-face-mono(); @@ -11,36 +12,45 @@ html { - - - .vscode-dark{ - @include carbon--theme($carbon--theme--g90){ - - @import 'node_modules/carbon-components/scss/globals/scss/styles.scss'; - + .vscode-dark { + @include carbon--theme($carbon--theme--g90) { + // Could we include a generic mixin here (?) - #root{ - background-color: $ui-background; + #root { // Color will default to #000000 otherwise - color: $text-01; + @include borders-dark; + color: $text-01; + } + + // Accordion Components (Getting Started section) + #contents-right { + @include accordion-dark; } + // Button Components (create and import buttons in sidebar) + #create-button, #import-button { + @include button-dark; + } + // borders for sidebar + #sidebar-container, #sidebar-container > div { + @include borders-dark; + } } } - .vscode-light{ - @include carbon--theme($carbon--theme--g10){ - // This could be horribly inefficient, but it doesn't work otherwise - @import 'node_modules/carbon-components/scss/globals/scss/styles.scss'; - - #root{ - background-color: $ui-background; + .vscode-light { + @include carbon--theme($carbon--theme--g10) { + + #root { color: $text-01; } + + // Button Components (create and import buttons in sidebar) + #create-button, #import-button { + @include button-light; + } } } - } - diff --git a/src/mixins.scss b/src/mixins.scss new file mode 100644 index 0000000000..4b794d4c0e --- /dev/null +++ b/src/mixins.scss @@ -0,0 +1,43 @@ + +@import '@carbon/colors/scss/colors'; +@import '@carbon/type/scss/type'; + + +//------------------------- +// dark theme styles +//------------------------- + +@mixin accordion-dark { + ul, li, button { + color: $text-01; + } + + li { + border-color: $carbon--gray-80; + } + + button:hover:before { + background-color: $carbon--gray-80; + } + + svg { + fill: $text-01; + } +} + +@mixin borders-dark { + border-color: $carbon--gray-80; +} + +@mixin button-dark { + background-color: $carbon--gray-80; +} + +//------------------------- +// light theme styles +//------------------------- + +@mixin button-light { + background-color: $carbon--gray-20; + color: black; +}