Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit 41bd8b4

Browse files
author
Kent C. Dodds
committed
6.23.0
1 parent 028a7c1 commit 41bd8b4

File tree

5 files changed

+35
-17
lines changed

5 files changed

+35
-17
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# 6.22.1
1+
# 6.23.0
2+
3+
## New Features
4+
5+
- You can now specify a default `formlyConfig.extras.apiCheckInstance` so you don't have to specify it for all of your types and wrappers.
26

37
## Deprecations
48

dist/formly.js

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! angular-formly version 6.22.0 built with ♥ by Astrism <[email protected]>, Kent C. Dodds <[email protected]> (ó ì_í)=óò=(ì_í ò)
1+
//! angular-formly version 6.23.0 built with ♥ by Astrism <[email protected]>, Kent C. Dodds <[email protected]> (ó ì_í)=óò=(ì_í ò)
22

33
(function webpackUniversalModuleDefinition(root, factory) {
44
if(typeof exports === 'object' && typeof module === 'object')
@@ -147,7 +147,7 @@ return /******/ (function(modules) { // webpackBootstrap
147147

148148
ngModule.constant('formlyApiCheck', _providersFormlyApiCheck2['default']);
149149
ngModule.constant('formlyErrorAndWarningsUrlPrefix', _otherDocsBaseUrl2['default']);
150-
ngModule.constant('formlyVersion', ("6.22.0")); // <-- webpack variable
150+
ngModule.constant('formlyVersion', ("6.23.0")); // <-- webpack variable
151151

152152
ngModule.provider('formlyUsability', _providersFormlyUsability2['default']);
153153
ngModule.provider('formlyConfig', _providersFormlyConfig2['default']);
@@ -448,7 +448,7 @@ return /******/ (function(modules) { // webpackBootstrap
448448
Object.defineProperty(exports, "__esModule", {
449449
value: true
450450
});
451-
exports["default"] = "https://github.com/formly-js/angular-formly/blob/" + ("6.22.0") + "/other/ERRORS_AND_WARNINGS.md#";
451+
exports["default"] = "https://github.com/formly-js/angular-formly/blob/" + ("6.23.0") + "/other/ERRORS_AND_WARNINGS.md#";
452452
module.exports = exports["default"];
453453

454454
/***/ },
@@ -1137,13 +1137,15 @@ return /******/ (function(modules) { // webpackBootstrap
11371137
var isPossiblyAsync = !_angularFix2['default'].isString(validator);
11381138
var validatorCollection = isPossiblyAsync || isAsync ? '$asyncValidators' : '$validators';
11391139

1140+
// UPDATE IN 7.0.0
11401141
// this is temporary until we can have a breaking change. Allow people to get the wins of the explicitAsync api
11411142
if (formlyConfig.extras.explicitAsync && !isAsync) {
11421143
validatorCollection = '$validators';
11431144
}
11441145

11451146
ctrl[validatorCollection][name] = function evalValidity(modelValue, viewValue) {
11461147
var value = formlyUtil.formlyEval(scope, validator, modelValue, viewValue);
1148+
// UPDATE IN 7.0.0
11471149
// In the next breaking change, this code should simply return the value
11481150
if (isAsync) {
11491151
return value;
@@ -1164,6 +1166,7 @@ return /******/ (function(modules) { // webpackBootstrap
11641166
var inFlightValidator = undefined;
11651167
ctrl.$parsers.unshift(function evalValidityOfParser(viewValue) {
11661168
var isValid = formlyUtil.formlyEval(scope, validator, ctrl.$modelValue, viewValue);
1169+
// UPDATE IN 7.0.0
11671170
// In the next breaking change, rather than checking for isPromiseLike, it should just check for isAsync.
11681171

11691172
if (isAsync || isPromiseLike(isValid)) {
@@ -1879,11 +1882,11 @@ return /******/ (function(modules) { // webpackBootstrap
18791882
}
18801883

18811884
function runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options) {
1882-
/* eslint complexity:[2, 8] */
1885+
/* eslint complexity:[2, 9] */
18831886
if (!apiCheck) {
18841887
return;
18851888
}
1886-
var instance = apiCheckInstance || formlyApiCheck;
1889+
var instance = apiCheckInstance || formlyConfig.extras.apiCheckInstance || formlyApiCheck;
18871890
if (instance.config.disabled || _apiCheck2['default'].globalConfig.disabled) {
18881891
return;
18891892
}
@@ -2349,22 +2352,21 @@ return /******/ (function(modules) { // webpackBootstrap
23492352
exports['default'] = addFormlyNgModelAttrsManipulator;
23502353

23512354
// @ngInject
2352-
function addFormlyNgModelAttrsManipulator(formlyConfig, $interpolate) {
2355+
function addFormlyNgModelAttrsManipulator(formlyConfig, $interpolate, formlyWarn) {
23532356
if (formlyConfig.extras.disableNgModelAttrsManipulator) {
23542357
return;
23552358
}
23562359
formlyConfig.templateManipulators.preWrapper.push(ngModelAttrsManipulator);
23572360

23582361
function ngModelAttrsManipulator(template, options, scope) {
23592362
var node = document.createElement('div');
2360-
var data = options.data;
2361-
if (data.skipNgModelAttrsManipulator === true) {
2363+
var skip = getSkip(options);
2364+
if (skip === true) {
23622365
return template;
23632366
}
2364-
23652367
node.innerHTML = template;
23662368

2367-
var modelNodes = getNgModelNodes(node, data.skipNgModelAttrsManipulator);
2369+
var modelNodes = getNgModelNodes(node, skip);
23682370
if (!modelNodes || !modelNodes.length) {
23692371
return template;
23702372
}
@@ -2470,6 +2472,18 @@ return /******/ (function(modules) { // webpackBootstrap
24702472
return node.querySelectorAll(query);
24712473
}
24722474

2475+
function getSkip(options) {
2476+
// UPDATE IN 7.0.0
2477+
var skip = options.extras && options.extras.skipNgModelAttrsManipulator;
2478+
if (!_angularFix2['default'].isDefined(skip)) {
2479+
skip = options.data && options.data.skipNgModelAttrsManipulator;
2480+
if (_angularFix2['default'].isDefined(skip)) {
2481+
formlyWarn('skipngmodelattrsmanipulator-moved', 'The skipNgModelAttrsManipulator property has been moved from the `data` property to the `extras` property', options);
2482+
}
2483+
}
2484+
return skip;
2485+
}
2486+
24732487
function getBuiltInAttributes() {
24742488
var ngModelAttributes = {
24752489
focus: {
@@ -2522,7 +2536,7 @@ return /******/ (function(modules) { // webpackBootstrap
25222536
});
25232537
}
25242538
}
2525-
addFormlyNgModelAttrsManipulator.$inject = ["formlyConfig", "$interpolate"];
2539+
addFormlyNgModelAttrsManipulator.$inject = ["formlyConfig", "$interpolate", "formlyWarn"];
25262540
module.exports = exports['default'];
25272541

25282542
/***/ },

dist/formly.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/formly.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-formly",
3-
"version": "6.22.0",
3+
"version": "6.23.0",
44
"author": "Astrism <[email protected]>",
55
"contributors": [
66
"Astrism <[email protected]>",

0 commit comments

Comments
 (0)