@advanced-rest-client/cc-authorization-method
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -79,1 +79,55 @@ <a name="0.1.0"></a> | ||
<a name="0.1.3"></a> | ||
## [0.1.3](https://github.com/advanced-rest-client/cc-authorization-method/compare/0.1.1...0.1.3) (2019-12-31) | ||
### Build | ||
* bumping version [eed6c57](https://github.com/advanced-rest-client/cc-authorization-method/commit/eed6c578e5dbfb3f2e0f6527e035daf358e3c9e1) by Pawel Psztyc | ||
* bumping version [e145b7b](https://github.com/advanced-rest-client/cc-authorization-method/commit/e145b7bf1a99b6279567e5db82ae7f67be1859ee) by Pawel | ||
* bumping version [c498117](https://github.com/advanced-rest-client/cc-authorization-method/commit/c4981179cac2d0551e04d695512d30d71faf0f0c) by Pawel | ||
### Update | ||
* adding styles for empty message [f2df2c5](https://github.com/advanced-rest-client/cc-authorization-method/commit/f2df2c55b5c9ebe6e55419048cb45bc36164854a) by Pawel Psztyc | ||
* updating dependencies [38ed9f4](https://github.com/advanced-rest-client/cc-authorization-method/commit/38ed9f4273a14e1165e862637534fa569a01bf5a) by Pawel Psztyc | ||
* adding `importButton` option [1b64287](https://github.com/advanced-rest-client/cc-authorization-method/commit/1b642874aed3c5f5602c91f209b0bbc103a92a5e) by Pawel Psztyc | ||
* upgrading dependency [998ab59](https://github.com/advanced-rest-client/cc-authorization-method/commit/998ab59e17f7abb0609a678c3f3c01774c75c256) by Pawel | ||
* removing error throwing when setting "type" [b014b0e](https://github.com/advanced-rest-client/cc-authorization-method/commit/b014b0e050060ca611562507dd34a0335cc7e354) by Pawel | ||
* updating dependencies [8da4bd8](https://github.com/advanced-rest-client/cc-authorization-method/commit/8da4bd86e01f19606cc9d550de4eae16e25296cf) by Pawel | ||
* adding gen t.ds config file [09b93a2](https://github.com/advanced-rest-client/cc-authorization-method/commit/09b93a29d998a872df8a9c09ca4a71de2de8c029) by Pawel Psztyc | ||
* publishig stable release [f7bab81](https://github.com/advanced-rest-client/cc-authorization-method/commit/f7bab81f5d16f06ffa6afba069abf246766f6544) by Pawel Psztyc | ||
### Documentation | ||
* updating custom-elements.json [df956a4](https://github.com/advanced-rest-client/cc-authorization-method/commit/df956a4c2002aa154d537daff464aeccff92ce52) by Pawel Psztyc | ||
* updating readme [09eefa6](https://github.com/advanced-rest-client/cc-authorization-method/commit/09eefa6e7260d971966bf2daaf96ba71ab6e3066) by Pawel Psztyc | ||
### Features | ||
* making "none" option optional [ad08fde](https://github.com/advanced-rest-client/cc-authorization-method/commit/ad08fde038b5ca74c3189029548a911687abd1e0) by Pawel Psztyc | ||
### Bug Fixes | ||
* fixing `:host` css definition [3081be1](https://github.com/advanced-rest-client/cc-authorization-method/commit/3081be1bd154aec1a4717f3d40e0c0d1233af57e) by Pawel | ||
### Refactor | ||
* removing panel title [766d0cb](https://github.com/advanced-rest-client/cc-authorization-method/commit/766d0cb07e856303e8f2959a352b4ec6ff000db9) by Pawel Psztyc | ||
### Testing | ||
* fixing tests [e368834](https://github.com/advanced-rest-client/cc-authorization-method/commit/e368834626a9b41b3563ca0af0f0fed4454f52bd) by Pawel | ||
### Other | ||
* Update: Updated Travis configuration to connect to Sauce Labs. | ||
[1f21aa5](https://github.com/advanced-rest-client/cc-authorization-method/commit/1f21aa5e1d7d81aebf5aa7ab53637ffea6e56954) by Pawel Psztyc | ||
@@ -10,3 +10,3 @@ { | ||
"name": "selected", | ||
"type": "Booelan" | ||
"type": "Boolean" | ||
}, | ||
@@ -21,8 +21,20 @@ { | ||
"name": "hasItems", | ||
"type": "Booelan", | ||
"type": "Boolean", | ||
"readOnly": true | ||
}, | ||
{ | ||
"name": "importButton", | ||
"type": "Boolean" | ||
}, | ||
{ | ||
"name": "none", | ||
"type": "Boolean" | ||
} | ||
], | ||
"events": [], | ||
"slots": [], | ||
"slots": [ | ||
{ | ||
"name": "client-certificate-import" | ||
} | ||
], | ||
"cssProperties": [] | ||
@@ -29,0 +41,0 @@ } |
{ | ||
"name": "@advanced-rest-client/cc-authorization-method", | ||
"description": "An element to render an UI for client certificate authorization method", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"license": "Apache-2.0", | ||
@@ -44,5 +44,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@advanced-rest-client/authorization-method": "^0.1.5", | ||
"@advanced-rest-client/client-certificates-consumer-mixin": "^1.0.1", | ||
"@advanced-rest-client/authorization-method": "^0.1.7", | ||
"@advanced-rest-client/client-certificates-consumer-mixin": "^1.0.2", | ||
"@advanced-rest-client/date-time": "^3.0.2", | ||
"@anypoint-web-components/anypoint-button": "^1.0.15", | ||
"@anypoint-web-components/anypoint-item": "^1.0.5", | ||
@@ -54,18 +55,20 @@ "@anypoint-web-components/anypoint-radio-button": "^0.1.4", | ||
"devDependencies": { | ||
"@advanced-rest-client/arc-data-generator": "^3.0.6", | ||
"@advanced-rest-client/arc-data-generator": "^3.0.7", | ||
"@advanced-rest-client/arc-demo-helper": "^1.0.17", | ||
"@advanced-rest-client/arc-models": "^3.0.3", | ||
"@advanced-rest-client/client-certificates-panel": "^1.0.6", | ||
"@advanced-rest-client/eslint-config": "^1.1.4", | ||
"@advanced-rest-client/prettier-config": "^0.1.0", | ||
"@advanced-rest-client/testing-karma-sl": "^1.1.0", | ||
"@anypoint-web-components/anypoint-button": "^1.0.15", | ||
"@anypoint-web-components/anypoint-checkbox": "^1.0.2", | ||
"@anypoint-web-components/anypoint-dialog": "^0.1.1", | ||
"@commitlint/cli": "^8.2.0", | ||
"@commitlint/config-conventional": "^8.2.0", | ||
"@open-wc/testing": "^2.0.0", | ||
"@open-wc/testing-karma": "^3.2.20", | ||
"@open-wc/testing-karma-bs": "^1.3.20", | ||
"@open-wc/testing-karma": "^3.2.24", | ||
"@open-wc/testing-karma-bs": "^1.3.24", | ||
"@polymer/gen-typescript-declarations": "^1.6.2", | ||
"@polymer/iron-test-helpers": "^3.0.1", | ||
"es-dev-server": "^1.32.0", | ||
"eslint": "^6.1.0", | ||
"es-dev-server": "^1.34.0", | ||
"eslint": "^6.8.0", | ||
"husky": "^3.1.0", | ||
@@ -72,0 +75,0 @@ "lint-staged": "^9.5.0", |
@@ -7,2 +7,3 @@ import { html } from 'lit-element'; | ||
import '@anypoint-web-components/anypoint-radio-button/anypoint-radio-group.js'; | ||
import '@anypoint-web-components/anypoint-button/anypoint-button.js'; | ||
import '@anypoint-web-components/anypoint-item/anypoint-item.js'; | ||
@@ -18,3 +19,5 @@ import '@advanced-rest-client/date-time/date-time.js'; | ||
export const dateTimeTemplate = Symbol(); | ||
export const importTemplate = Symbol(); | ||
export const selectedHandler = Symbol(); | ||
export const importHandler = Symbol(); | ||
@@ -24,6 +27,3 @@ export class CcAuthorizationMethod extends CcConsumerMixin(AuthorizationMethod) { | ||
get styles() { | ||
return [ | ||
// super.styles, | ||
styles, | ||
]; | ||
return styles; | ||
} | ||
@@ -37,2 +37,16 @@ | ||
selected: { type: String }, | ||
/** | ||
* When set it renders `none` option in the list of certificates. | ||
*/ | ||
none: { type: Boolean }, | ||
/** | ||
* When set it renders `import certificate` button. | ||
* When enabled the application must handle | ||
* `client-certificate-import` event dispatched by this element | ||
* to render some kind of UI to import a certificate. | ||
* The element does not have an UI to import certificates. | ||
* | ||
* The event bubbles and is cancelable. | ||
*/ | ||
importButton: { type: Boolean } | ||
}; | ||
@@ -100,5 +114,14 @@ } | ||
[importHandler]() { | ||
this.dispatchEvent(new CustomEvent('client-certificate-import', { | ||
bubbles: true, | ||
composed: true, | ||
cancelable: true, | ||
})); | ||
} | ||
render() { | ||
const { hasItems } = this; | ||
return html`<style>${this.styles}</style> | ||
${this[importTemplate]()} | ||
${hasItems ? this[contentTemplate]() : this[emptyTemplate]()}`; | ||
@@ -113,3 +136,3 @@ } | ||
} = this; | ||
return html`<div class="form-title">Select a certificate</div> | ||
return html` | ||
<div class="list"> | ||
@@ -133,3 +156,6 @@ <anypoint-radio-group | ||
[defaultItemTemplate]() { | ||
const { compatibility } = this; | ||
const { compatibility, none } = this; | ||
if (!none) { | ||
return ''; | ||
} | ||
return html`<anypoint-radio-button | ||
@@ -165,2 +191,23 @@ data-id="none" | ||
} | ||
[importTemplate]() { | ||
const { importButton } = this; | ||
if (!importButton) { | ||
return ''; | ||
} | ||
return html` | ||
<anypoint-button | ||
title="Opens a dialog that allows to import client certificate" | ||
aria-label="Activate to open import certificate dialog" | ||
@click="${this[importHandler]}" | ||
>Import certificate</anypoint-button>`; | ||
} | ||
/** | ||
* Dispatched when the user requested to import a certificate. | ||
* | ||
* The event bubbles and is cancelable. | ||
* | ||
* @event client-certificate-import | ||
*/ | ||
} |
@@ -34,3 +34,2 @@ import { css } from 'lit-element'; | ||
align-items: center; | ||
} | ||
@@ -55,2 +54,6 @@ | ||
} | ||
.empty-screen { | ||
margin: 1em 12px; | ||
} | ||
`; |
49097
373
8
22