Skip to content

Commit

Permalink
1.13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusmirandaalmeida committed Apr 19, 2018
1 parent 0bf40ba commit 2adc6d9
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 26 deletions.
98 changes: 80 additions & 18 deletions dist/capivara.js
Original file line number Diff line number Diff line change
Expand Up @@ -18033,7 +18033,7 @@ module.exports = function(module) {
/*! exports provided: name, version, description, main, repository, scripts, author, license, dependencies, keywords, nyc, devDependencies, default */
/***/ (function(module) {

module.exports = {"name":"capivarajs","version":"1.13.0","description":"Um framework para criação de componentes.","main":"./index.js","repository":{"url":"https://github.com/CapivaraJS/capivarajs","type":"git"},"scripts":{"dev":"webpack-dev-server --config ./webpack.config.js","prod":"npm run test-single && webpack --config ./webpack.config.js && NODE_ENV=production webpack --config ./webpack.config.js","test":"karma start","test-single":"karma start --single-run","e2e":"webpack-dev-server --config ./webpack.config.js --env.tests true","generate-report":"nyc --report-dir coverage npm run test && nyc report --reporter=text","coverage":"npm run generate-report && nyc report --reporter=text-lcov > coverage.lcov && codecov"},"author":"Capivara Team.","license":"MIT","dependencies":{"lodash":"^4.17.5","melanke-watchjs":"^1.3.1"},"keywords":["frameworkjs","web components","front end","documentation","components","gumga","capivara","capivarajs","js","javascript","framework"],"nyc":{"include":["src/*.ts","src/**/*.ts"],"exclude":["typings"],"extension":[".ts",".js"],"reporter":["json","html"],"all":true},"devDependencies":{"@babel/core":"^7.0.0-beta.42","@babel/preset-env":"^7.0.0-beta.42","@types/jasmine":"^2.6.3","@types/node":"^9.6.4","babel-loader":"^7.1.4","babel-preset-stage-0":"^6.24.1","codecov":"^3.0.0","css-loader":"^0.28.7","eslint":"^4.19.1","extract-text-webpack-plugin":"^4.0.0-beta.0","file-loader":"^1.1.5","html-loader":"^0.5.1","jasmine":"^3.1.0","jasmine-core":"^3.1.0","karma":"^2.0.0","karma-cli":"^1.0.1","karma-es6-shim":"^1.0.0","karma-jasmine":"^1.1.1","karma-phantomjs-launcher":"^1.0.4","karma-typescript":"^3.0.8","nightwatch":"^0.9.20","node-sass":"^4.7.2","nyc":"^11.6.0","style-loader":"^0.20.3","ts-loader":"^4.1.0","tslint":"^5.9.1","typescript":"^2.7.2","uglifyjs-webpack-plugin":"^1.1.2","weakset":"^1.0.0","webpack":"^4.3.0","webpack-cli":"^2.0.13","webpack-dev-server":"^3.1.1"}};
module.exports = {"name":"capivarajs","version":"1.13.2","description":"Um framework para criação de componentes.","main":"./index.js","repository":{"url":"https://github.com/CapivaraJS/capivarajs","type":"git"},"scripts":{"dev":"webpack-dev-server --config ./webpack.config.js","prod":"npm run test-single && webpack --config ./webpack.config.js && NODE_ENV=production webpack --config ./webpack.config.js","test":"karma start","test-single":"karma start --single-run","e2e":"webpack-dev-server --config ./webpack.config.js --env.tests true","generate-report":"nyc --report-dir coverage npm run test && nyc report --reporter=text","coverage":"npm run generate-report && nyc report --reporter=text-lcov > coverage.lcov && codecov"},"author":"Capivara Team.","license":"MIT","dependencies":{"lodash":"^4.17.5","melanke-watchjs":"^1.3.1"},"keywords":["frameworkjs","web components","front end","documentation","components","gumga","capivara","capivarajs","js","javascript","framework"],"nyc":{"include":["src/*.ts","src/**/*.ts"],"exclude":["typings"],"extension":[".ts",".js"],"reporter":["json","html"],"all":true},"devDependencies":{"@babel/core":"^7.0.0-beta.42","@babel/preset-env":"^7.0.0-beta.42","@types/jasmine":"^2.6.3","@types/node":"^9.6.4","babel-loader":"^7.1.4","babel-preset-stage-0":"^6.24.1","codecov":"^3.0.0","css-loader":"^0.28.7","eslint":"^4.19.1","extract-text-webpack-plugin":"^4.0.0-beta.0","file-loader":"^1.1.5","html-loader":"^0.5.1","jasmine":"^3.1.0","jasmine-core":"^3.1.0","karma":"^2.0.0","karma-cli":"^1.0.1","karma-es6-shim":"^1.0.0","karma-jasmine":"^1.1.1","karma-phantomjs-launcher":"^1.0.4","karma-typescript":"^3.0.8","nightwatch":"^0.9.20","node-sass":"^4.7.2","nyc":"^11.6.0","style-loader":"^0.21.0","ts-loader":"^4.1.0","tslint":"^5.9.1","typescript":"^2.7.2","uglifyjs-webpack-plugin":"^1.1.2","weakset":"^1.0.0","webpack":"^4.3.0","webpack-cli":"^2.0.13","webpack-dev-server":"^3.1.1"}};

/***/ }),

Expand Down Expand Up @@ -18110,6 +18110,10 @@ var Common;
return element.getAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].MAX_ATTRIBUTE_NAME);
}
Common.getAttributeCpMax = getAttributeCpMax;
function getAttributeCpMaxLength(element) {
return element.getAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].MAX_LENGTH_ATTRIBUTE_NAME);
}
Common.getAttributeCpMaxLength = getAttributeCpMaxLength;
function getAttributeCpStyle(element) {
return element.getAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].STYLE_ATTRIBUTE_NAME);
}
Expand Down Expand Up @@ -18271,6 +18275,7 @@ var Constants = {
IF_ATTRIBUTE_NAME: 'cp-if',
STEP_ATTRIBUTE_NAME: 'cp-step',
MAX_ATTRIBUTE_NAME: 'cp-max',
MAX_LENGTH_ATTRIBUTE_NAME: 'cp-maxlength',
MIN_ATTRIBUTE_NAME: 'cp-min',
ELSE_ATTRIBUTE_NAME: 'cp-else',
ELSE_IF_ATTRIBUTE_NAME: 'cp-else-if',
Expand Down Expand Up @@ -19300,7 +19305,7 @@ var CPClass = /** @class */ (function () {
var _this = this;
if (classObj && window['capivara'].isObject(classObj)) {
Object.keys(classObj).forEach(function (key) {
if (classObj[key] === true) {
if (classObj[key]) {
_this.addClass(key.replace(/ /g, ''));
}
else {
Expand All @@ -19324,7 +19329,7 @@ var CPClass = /** @class */ (function () {
_this.setClassByObject(cpClass.value);
}
else {
if (cpClass.value === true) {
if (cpClass.value) {
_this.addClass(cpClass.key.replace(/ /g, ''));
}
else {
Expand Down Expand Up @@ -19898,6 +19903,49 @@ var CPMax = /** @class */ (function () {



/***/ }),

/***/ "./src/map/directive/cp-maxlength.ts":
/*!*******************************************!*\
!*** ./src/map/directive/cp-maxlength.ts ***!
\*******************************************/
/*! exports provided: CPMaxLength */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMaxLength", function() { return CPMaxLength; });
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common */ "./src/common.ts");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ "./src/constants.ts");


var CPMaxLength = /** @class */ (function () {
function CPMaxLength(_element, _map) {
this.element = _element;
this.map = _map;
this.attribute = _common__WEBPACK_IMPORTED_MODULE_0__["Common"].getAttributeCpMaxLength(this.element);
if (this.attribute === undefined) {
throw new Error("syntax error " + _constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].MAX_LENGTH_ATTRIBUTE_NAME + " expected arguments");
}
}
CPMaxLength.prototype.create = function () {
this.init();
};
CPMaxLength.prototype.init = function () {
this.attribute = this.attribute.replace(/ /g, '');
try {
var value = _common__WEBPACK_IMPORTED_MODULE_0__["Common"].evalInContext(this.attribute, _common__WEBPACK_IMPORTED_MODULE_0__["Common"].getScope(this.element).scope);
if (value !== undefined) {
this.element.setAttribute('maxlength', value);
}
}
catch (e) { }
};
return CPMaxLength;
}());



/***/ }),

/***/ "./src/map/directive/cp-min.ts":
Expand Down Expand Up @@ -20319,13 +20367,15 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _directive_cp_init__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./directive/cp-init */ "./src/map/directive/cp-init.ts");
/* harmony import */ var _directive_cp_key__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./directive/cp-key */ "./src/map/directive/cp-key.ts");
/* harmony import */ var _directive_cp_max__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./directive/cp-max */ "./src/map/directive/cp-max.ts");
/* harmony import */ var _directive_cp_min__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./directive/cp-min */ "./src/map/directive/cp-min.ts");
/* harmony import */ var _directive_cp_model__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./directive/cp-model */ "./src/map/directive/cp-model.ts");
/* harmony import */ var _directive_cp_repeat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./directive/cp-repeat */ "./src/map/directive/cp-repeat.ts");
/* harmony import */ var _directive_cp_show__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./directive/cp-show */ "./src/map/directive/cp-show.ts");
/* harmony import */ var _directive_cp_src__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./directive/cp-src */ "./src/map/directive/cp-src.ts");
/* harmony import */ var _directive_cp_step__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./directive/cp-step */ "./src/map/directive/cp-step.ts");
/* harmony import */ var _directive_cp_style__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./directive/cp-style */ "./src/map/directive/cp-style.ts");
/* harmony import */ var _directive_cp_maxlength__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./directive/cp-maxlength */ "./src/map/directive/cp-maxlength.ts");
/* harmony import */ var _directive_cp_min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./directive/cp-min */ "./src/map/directive/cp-min.ts");
/* harmony import */ var _directive_cp_model__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./directive/cp-model */ "./src/map/directive/cp-model.ts");
/* harmony import */ var _directive_cp_repeat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./directive/cp-repeat */ "./src/map/directive/cp-repeat.ts");
/* harmony import */ var _directive_cp_show__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./directive/cp-show */ "./src/map/directive/cp-show.ts");
/* harmony import */ var _directive_cp_src__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./directive/cp-src */ "./src/map/directive/cp-src.ts");
/* harmony import */ var _directive_cp_step__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./directive/cp-step */ "./src/map/directive/cp-step.ts");
/* harmony import */ var _directive_cp_style__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./directive/cp-style */ "./src/map/directive/cp-style.ts");




Expand Down Expand Up @@ -20371,6 +20421,7 @@ var MapDom = /** @class */ (function () {
cpKeys: [],
cpMins: [],
cpMaxs: [],
cpMaxsLength: [],
cpSteps: [],
cpDisables: [],
cpFocus: [],
Expand Down Expand Up @@ -20478,6 +20529,9 @@ var MapDom = /** @class */ (function () {
if (child.hasAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].STEP_ATTRIBUTE_NAME)) {
this.createCPStep(child);
}
if (child.hasAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].MAX_LENGTH_ATTRIBUTE_NAME)) {
this.createCPMaxLength(child);
}
if (child.hasAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].DISABLE_ATTRIBUTE_NAME)) {
this.createCPDisabled(child);
}
Expand Down Expand Up @@ -20535,6 +20589,8 @@ var MapDom = /** @class */ (function () {
this.directives.cpMaxs.forEach(function (cpMax) { return cpMax.init(); });
// Update cp step
this.directives.cpSteps.forEach(function (cpStep) { return cpStep.init(); });
// Update cp max length
this.directives.cpMaxsLength.forEach(function (cpMaxLength) { return cpMaxLength.init(); });
// Update cp disable
this.directives.cpDisables.forEach(function (cpDisable) { return cpDisable.init(); });
// Update cp focus
Expand Down Expand Up @@ -20618,7 +20674,7 @@ var MapDom = /** @class */ (function () {
var _this = this;
if (!childNode.$immutableInterpolation) {
var nodeModified_2 = childNode.originalValue;
(nodeModified_2.match(/\${.+?\}/g) || []).forEach(function (key) {
(nodeModified_2.match(/\${.+?}/g) || []).forEach(function (key) {
var content = key.replace('${', '').replace('}', '');
try {
var evalValue = _this.getInterpolationValue(content, childNode, '$ctrl');
Expand Down Expand Up @@ -20648,7 +20704,7 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind de model
*/
MapDom.prototype.createCPModel = function (child) {
this.directives.cpModels.push(new _directive_cp_model__WEBPACK_IMPORTED_MODULE_15__["CPModel"](child, this));
this.directives.cpModels.push(new _directive_cp_model__WEBPACK_IMPORTED_MODULE_16__["CPModel"](child, this));
};
/**
*
Expand All @@ -20662,7 +20718,7 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind de show
*/
MapDom.prototype.createCPShow = function (child) {
this.directives.cpShows.push(new _directive_cp_show__WEBPACK_IMPORTED_MODULE_17__["CPShow"](child, this));
this.directives.cpShows.push(new _directive_cp_show__WEBPACK_IMPORTED_MODULE_18__["CPShow"](child, this));
};
/**
*
Expand Down Expand Up @@ -20690,7 +20746,7 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind de repeat.
*/
MapDom.prototype.createCPRepeat = function (child) {
this.directives.repeats.push(new _directive_cp_repeat__WEBPACK_IMPORTED_MODULE_16__["CPRepeat"](child, this));
this.directives.repeats.push(new _directive_cp_repeat__WEBPACK_IMPORTED_MODULE_17__["CPRepeat"](child, this));
};
/**
*
Expand All @@ -20704,7 +20760,7 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind do style.
*/
MapDom.prototype.createCPStyle = function (child) {
this.directives.cpStyles.push(new _directive_cp_style__WEBPACK_IMPORTED_MODULE_20__["CPStyle"](child, this));
this.directives.cpStyles.push(new _directive_cp_style__WEBPACK_IMPORTED_MODULE_21__["CPStyle"](child, this));
};
/**
*
Expand All @@ -20718,7 +20774,7 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind do key.
*/
MapDom.prototype.createCPSrc = function (child) {
this.directives.cpSrcs.push(new _directive_cp_src__WEBPACK_IMPORTED_MODULE_18__["CPSrc"](child, this));
this.directives.cpSrcs.push(new _directive_cp_src__WEBPACK_IMPORTED_MODULE_19__["CPSrc"](child, this));
};
/**
*
Expand All @@ -20731,7 +20787,7 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind do min.
*/
MapDom.prototype.createCPMin = function (child) {
this.directives.cpMins.push(new _directive_cp_min__WEBPACK_IMPORTED_MODULE_14__["CPMin"](child, this));
this.directives.cpMins.push(new _directive_cp_min__WEBPACK_IMPORTED_MODULE_15__["CPMin"](child, this));
};
/**
* @param child Elemento que está sendo criado o bind do max.
Expand All @@ -20743,7 +20799,13 @@ var MapDom = /** @class */ (function () {
* @param child Elemento que está sendo criado o bind do step.
*/
MapDom.prototype.createCPStep = function (child) {
this.directives.cpSteps.push(new _directive_cp_step__WEBPACK_IMPORTED_MODULE_19__["CPStep"](child, this));
this.directives.cpSteps.push(new _directive_cp_step__WEBPACK_IMPORTED_MODULE_20__["CPStep"](child, this));
};
/**
* @param child Elemento que está sendo criado o bind do max length.
*/
MapDom.prototype.createCPMaxLength = function (child) {
this.directives.cpMaxsLength.push(new _directive_cp_maxlength__WEBPACK_IMPORTED_MODULE_14__["CPMaxLength"](child, this));
};
/**
* @param child Elemento que está sendo criado o bind do disable.
Expand Down
2 changes: 1 addition & 1 deletion dist/capivara.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 2adc6d9

Please sign in to comment.