Skip to content

Commit

Permalink
Merge 992a2aa into fec1db8
Browse files Browse the repository at this point in the history
  • Loading branch information
Caio M. Veloso Dias committed Sep 18, 2018
2 parents fec1db8 + 992a2aa commit 63256e2
Show file tree
Hide file tree
Showing 35 changed files with 1,212 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"es-package": {
"plugins": [
"transform-object-rest-spread",
"transform-async-to-generator"
"transform-async-to-generator",
]
},
"es-bundle": {
"plugins": [
"external-helpers",
"transform-object-rest-spread",
"transform-async-to-generator"
"transform-async-to-generator",
]
},
"cjs-package": {
Expand All @@ -19,7 +19,7 @@
],
"plugins": [
"transform-object-rest-spread",
"transform-async-to-generator"
"transform-async-to-generator",
]
},
"cjs-bundle": {
Expand All @@ -29,7 +29,7 @@
"plugins": [
"external-helpers",
"transform-object-rest-spread",
"transform-async-to-generator"
"transform-async-to-generator",
]
}
}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<a name="unreleased"></a>
## Unreleased (2018-09-18)

* feat: Add babel/polyfil dependency and sncackbar, sdk-conect and brandicon component ([b7e9ede](https://github.com/stone-payments/sling-web-framework/commit/b7e9ede))


<a name="1.2.0"></a>
## 1.2.0 (2018-09-14)

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = (config) => {
emitWarning: false,
global: {
statements: 50,
branches: 35,
branches: 30,
functions: 40,
lines: 50,
},
Expand Down
58 changes: 57 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
"lint": "./node_modules/.bin/eslint ./packages/**/*.js",
"pretest": "./node_modules/.bin/eslint ./packages/**/*.js",
"test": "./node_modules/.bin/cross-env NODE_ENV=karma karma start karma.conf.js",
"test-debug": "./node_modules/.bin/cross-env NODE_ENV=karma karma start karma.conf.js --browsers=Chrome --single-run=false",
"test-unit": "mocha-webpack --colors --webpack-config webpack.config-test.js \"packages/*/src/**/*.spec.js\"",
"coverage": "cross-env NODE_ENV=coverage nyc npm run test-unit --colors",
"send-coverage": "cat ./coverage/unit/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"postinstall": "./node_modules/.bin/lerna bootstrap"
},
"devDependencies": {
"@babel/polyfill": "^7.0.0",
"babel-core": "^6.26.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-async-to-generator": "^6.24.1",
Expand Down
1 change: 1 addition & 0 deletions packages/sling-helpers/src/sdk/onSdkAccessible.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@babel/polyfill';
import * as domHelper from '../dom/domHelper.js';

export const onSdkAccessible = async () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/sling-web-component-brand-icon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.cache
package-lock.json
2 changes: 2 additions & 0 deletions packages/sling-web-component-brand-icon/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dev/
56 changes: 56 additions & 0 deletions packages/sling-web-component-brand-icon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# sling-web-component-brand-icon

## Install

```
npm instal sling-web-component-brand-icon
```

## Tag

```HTML
<sling-brand-icon></sling-brand-icon>
```

## Dependencies

* **sling-framework**
* **sling-helpers**

## Attributes and properties

|Name|Type|Default Values|ReflectToAttribute|Observer|callSdk|
|:--|:--|:--|:--:|:--|:--:|
|brandid|Number||:heavy_check_mark:|
|width|Number||:heavy_check_mark:|
|height|Number||:heavy_check_mark:|

### Description

|Name|Description|
|:---|:---|
|brandid |Id that identifies the flag that will be displayed.|
|width|Value that defines the width.|
|height|Value that defines the heigth.|

## Events

This component have no event.

## Examples

All component examples can be emulated using the `npm start sling-web-component-brand-icon` command.

### Use

```HTML
<sling-brand-icon brandid="2" width="50" height="50"></sling-brand-icon>
```

![image](https://user-images.githubusercontent.com/22959060/45705866-0f67b500-bb51-11e8-8e18-72721604c669.png)

```HTML
<sling-brand-icon brandid="5" width="50" height="50"></sling-brand-icon>
```

![image](https://user-images.githubusercontent.com/22959060/45706462-b6008580-bb52-11e8-9a58-0811263e7881.png)
24 changes: 24 additions & 0 deletions packages/sling-web-component-brand-icon/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-sd-ce.js"></script>
<script type="module" src="./index.js"></script>
<title>Sling Brand Icon</title>
</head>
<body>
<sling-brand-icon brandid="1" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="2" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="3" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="5" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="6" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="7" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="8" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="9" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="12" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="171" width="50" height="50"></sling-brand-icon>
<sling-brand-icon brandid="" width="50" height="50"></sling-brand-icon>
</body>
</html>
1 change: 1 addition & 0 deletions packages/sling-web-component-brand-icon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './src/index.js';
15 changes: 15 additions & 0 deletions packages/sling-web-component-brand-icon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "sling-web-component-brand-icon",
"version": "0.17.0",
"description": "",
"main": "dist/cjs/index.js",
"jsnext:main": "dist/es/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Stone Pagamentos",
"dependencies": {
"sling-framework": "^1.2.0",
"sling-helpers": "^1.2.0"
}
}
Loading

0 comments on commit 63256e2

Please sign in to comment.