Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sling-web-business-merchant-contacts

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sling-web-business-merchant-contacts - npm Package Compare versions

Comparing version 0.2.28 to 0.2.29

79

dist/cjs/component/MerchantContacts.js

@@ -10,4 +10,8 @@ 'use strict';

var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _templateObject = _taggedTemplateLiteral(['\n <sling-table srcdata="', '"\n srccolumns="', '">\n </sling-table>\n '], ['\n <sling-table srcdata="', '"\n srccolumns="', '">\n </sling-table>\n ']);
var _redux = require('redux');
var _cjs = require('sling-web-framework/dist/cjs');

@@ -27,22 +31,5 @@

var columns = [{
title: 'Nome',
field: 'name'
}, {
title: 'Cargo',
field: 'type'
}, {
title: 'E-mail',
field: 'email'
}, {
title: 'Telefone',
field: 'phone_number'
}, {
title: 'Celular',
field: 'mobile_phone_number'
}];
var SlingMerchantContacts = exports.SlingMerchantContacts = function (_SlingElement) {
_inherits(SlingMerchantContacts, _SlingElement);
var SlingMerchantContacts = exports.SlingMerchantContacts = function (_SlingBusinessElement) {
_inherits(SlingMerchantContacts, _SlingBusinessElement);
function SlingMerchantContacts() {

@@ -55,14 +42,60 @@ _classCallCheck(this, SlingMerchantContacts);

_createClass(SlingMerchantContacts, [{
key: 'connectedCallback',
value: function connectedCallback() {
var _this2 = this;
if (_get(SlingMerchantContacts.prototype.__proto__ || Object.getPrototypeOf(SlingMerchantContacts.prototype), 'connectedCallback', this)) {
_get(SlingMerchantContacts.prototype.__proto__ || Object.getPrototypeOf(SlingMerchantContacts.prototype), 'connectedCallback', this).call(this);
}
this.merchantdata = [];
this.merchantheaders = [{
title: 'nome',
field: 'name'
}, {
title: 'cargo',
field: 'type'
}, {
title: 'email',
field: 'email'
}, {
title: 'telefone',
field: 'phone_number'
}, {
title: 'celular',
field: 'mobile_phone_number'
}];
(0, _cjs2.onSdkAvailable)().then(function () {
_this2.getData(_this2.stonecode, _this2.apitoken);
});
}
}, {
key: 'render',
value: function render() {
return (0, _cjs.html)(_templateObject, this.apidata, columns);
return (0, _cjs.html)(_templateObject, this.merchantdata, this.merchantheaders);
}
}], [{
key: 'properties',
get: function get() {
return {
stonecode: {
type: String,
reflectToAttribute: true
},
apitoken: {
type: String,
reflectToAttribute: true
},
merchantdata: Array,
merchantheaders: Array
};
}
}]);
return SlingMerchantContacts;
}(_cjs.SlingBusinessElement);
}(_cjs.SlingElement);
var mapStateToProps = exports.mapStateToProps = function mapStateToProps(state) {
return {
apidata: state.merchantReducer.merchantContacts
merchantdata: state.merchantReducer.merchantContacts
};

@@ -73,4 +106,4 @@ };

return {
getdata: (0, _cjs2.bindActionCreators)(_cjs2.merchantActions.getMerchantContacts, dispatch)
getData: (0, _redux.bindActionCreators)(_cjs2.merchantActions.getMerchantContacts, dispatch)
};
};

@@ -1,27 +0,53 @@

import { html, SlingBusinessElement } from 'sling-web-framework/dist/es';
import { merchantActions, bindActionCreators } from 'sling-web-sdk/dist/es';
import { bindActionCreators } from 'redux';
import { html, SlingElement } from 'sling-web-framework/dist/es';
import { merchantActions, onSdkAvailable } from 'sling-web-sdk/dist/es';
import 'sling-web-component-table/dist/es';
const columns = [{
title: 'Nome',
field: 'name'
}, {
title: 'Cargo',
field: 'type'
}, {
title: 'E-mail',
field: 'email'
}, {
title: 'Telefone',
field: 'phone_number'
}, {
title: 'Celular',
field: 'mobile_phone_number'
}];
export class SlingMerchantContacts extends SlingElement {
static get properties() {
return {
stonecode: {
type: String,
reflectToAttribute: true
},
apitoken: {
type: String,
reflectToAttribute: true
},
merchantdata: Array,
merchantheaders: Array
};
}
export class SlingMerchantContacts extends SlingBusinessElement {
connectedCallback() {
if (super.connectedCallback) {
super.connectedCallback();
}
this.merchantdata = [];
this.merchantheaders = [{
title: 'nome',
field: 'name'
}, {
title: 'cargo',
field: 'type'
}, {
title: 'email',
field: 'email'
}, {
title: 'telefone',
field: 'phone_number'
}, {
title: 'celular',
field: 'mobile_phone_number'
}];
onSdkAvailable().then(() => {
this.getData(this.stonecode, this.apitoken);
});
}
render() {
return html`
<sling-table srcdata="${this.apidata}"
srccolumns="${columns}">
<sling-table srcdata="${this.merchantdata}"
srccolumns="${this.merchantheaders}">
</sling-table>

@@ -33,7 +59,7 @@ `;

export const mapStateToProps = state => ({
apidata: state.merchantReducer.merchantContacts
merchantdata: state.merchantReducer.merchantContacts
});
export const mapDispatchToProps = dispatch => ({
getdata: bindActionCreators(merchantActions.getMerchantContacts, dispatch)
getData: bindActionCreators(merchantActions.getMerchantContacts, dispatch)
});
{
"name": "sling-web-business-merchant-contacts",
"version": "0.2.28",
"version": "0.2.29",
"description": "Merchant Contacts business component",

@@ -28,7 +28,7 @@ "author": "Stone Pagamentos",

"dependencies": {
"sling-web-component-table": "^0.2.28",
"sling-web-framework": "^0.2.28",
"sling-web-component-table": "^0.2.29",
"sling-web-framework": "^0.2.29",
"sling-web-helpers": "^0.2.28",
"sling-web-sdk": "^0.2.28"
"sling-web-sdk": "^0.2.29"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc