Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aae5d04

Browse files
Re-export after merge
1 parent 8ecf17c commit aae5d04

6 files changed

+43
-13
lines changed

‎.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,3 @@ crashlytics-build.properties
100100

101101
bower_components
102102
node_modules
103-
104-
material-decorator.js
105-
material-decorator.min.js

‎dist/angular-schema-form-material.js

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ return /******/ (function(modules) { // webpackBootstrap
6565
__webpack_require__(4);
6666
__webpack_require__(5);
6767
__webpack_require__(6);
68+
__webpack_require__(7);
6869

6970
/***/ },
7071
/* 1 */
@@ -3700,11 +3701,11 @@ return /******/ (function(modules) { // webpackBootstrap
37003701
$templateCache.put("decorators/material/autocomplete.html", "<div class=\"form-group {{form.htmlClass}} schema-form-select\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false}\" sf-messages=\"\" sf-layout=\"\"><md-autocomplete flex=\"\" ng-disabled=\"form.readonly\" ng-model=\"$$value$$\" sf-autocomplete=\"\" sf-field-model=\"replaceAll\" schema-validate=\"form\" md-selected-item=\"$$value$$\" md-search-text=\"searchText\" md-selected-item-change=\"\'todo\';\" md-items=\"item in evalExpr(\'this[\\\'\'+form.optionFilter+\'\\\'](\\\'\'+searchText+\'\\\')\')\" md-item-text=\"item.name\" md-floating-label=\"{{::form.title}}\" md-menu-class=\"autocomplete-custom-template\"><md-item-template><span md-highlight-text=\"searchText\">{{item.name}}</span></md-item-template><md-not-found>No matches found</md-not-found></md-autocomplete></div>");
37013702
$templateCache.put("decorators/material/card-content.html", "<md-card-content class=\"schema-form-card-content {{form.htmlClass}}\"></md-card-content>");
37023703
$templateCache.put("decorators/material/card.html", "<md-card class=\"schema-form-card {{form.htmlClass}}\"></md-card>");
3703-
$templateCache.put("decorators/material/checkbox.html", "<div class=\"checkbox schema-form-checkbox {{::form.htmlClass}}\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess()}\" sf-messages=\"\"><md-checkbox sf-field-model=\"\" sf-changed=\"form\" ng-disabled=\"form.readonly\" schema-validate=\"form\" class=\"{{::form.fieldHtmlClass}}\" name=\"{{::form.key|sfCamelKey}}\" aria-label=\"{{::form.title}}\"><span>{{::form.title}}</span></md-checkbox></div>");
3704+
$templateCache.put("decorators/material/checkbox.html", "<div class=\"checkbox schema-form-checkbox {{::form.htmlClass}}\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess()}\" sf-messages=\"\"><md-checkbox sf-field-model=\"\" sf-changed=\"form\" ng-disabled=\"form.readonly\" schema-validate=\"form\" sf-material-class=\"md-checked\" class=\"{{::form.fieldHtmlClass}}\" name=\"{{::form.key|sfCamelKey}}\" aria-label=\"{{::form.title}}\"><span>{{::form.title}}</span></md-checkbox></div>");
37043705
$templateCache.put("decorators/material/checkboxes.html", "<div sf-array=\"form\" sf-field-model=\"\" class=\"form-group schema-form-checkboxes {{::form.htmlClass}}\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess()}\" sf-messages=\"\"><label class=\"control-label\" ng-show=\"showTitle()\">{{::form.title}}</label><div class=\"checkbox\" ng-repeat=\"val in titleMapValues track by $index\"><md-checkbox ng-model=\"titleMapValues[$index]\" sf-changed=\"form\" ng-disabled=\"::form.readonly\" name=\"{{::form.key|sfCamelKey}}\" ng-true-value=\"true\" ng-false-value=\"false\" aria-label=\"{{::form.title}}\">{{::form.titleMap[$index].name}}</md-checkbox></div></div>");
37053706
$templateCache.put("decorators/material/chips.html", "<div class=\"form-group schema-form-chips {{form.htmlClass}}\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false}\"><md-chips sf-field-model=\"\" readonly=\"form.readonly\" flex=\"\" placeholder=\"{{::form.title}}\"><md-chip-template><strong ng-if=\"!form.template\">{{$chip}}</strong></md-chip-template></md-chips><div ng-messages=\"ngModel.$error\"><div sf-message=\"\" ng-message=\"\"></div></div></div>");
37063707
$templateCache.put("decorators/material/date.html", "<div class=\"schema-form-date {{::form.htmlClass}}\"><label ng-show=\"showTitle()\" for=\"{{::form.key|sfCamelKey}}\">{{::form.title}}</label><md-datepicker sf-field-model=\"\" sf-changed=\"form\" schema-validate=\"form\" sf-type-parser=\"form.schema\" id=\"{{::form.key|sfCamelKey}}\" ng-show=\"::form.key\" ng-class=\"::form.fieldHtmlClass\" ng-disabled=\"::form.readonly\" md-placeholder=\"Enter date\" sf-messages=\"\"></md-datepicker></div>");
3707-
$templateCache.put("decorators/material/default.html", "<md-input-container class=\"schema-form-{{::form.type}} {{::form.htmlClass}}\" ng-class=\"{\'md-input-has-value\': model[\'{{form.key.join(\'\\\'][\\\'\')}}\'], \'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false}\" sf-messages=\"\" sf-layout=\"\"><label ng-show=\"showTitle()\" for=\"{{::form.key|sfCamelKey}}\">{{::form.title}}</label> <input sf-field-model=\"\" ng-show=\"::form.key\" type=\"{{::form.type}}\" step=\"any\" sf-changed=\"form\" placeholder=\"{{form.placeholder}}\" id=\"{{::form.key|sfCamelKey}}\" ng-class=\"::form.fieldHtmlClass\" sf-type-parser=\"form.schema\" ng-disabled=\"::form.readonly\" schema-validate=\"form\" name=\"{{::form.key|sfCamelKey}}\" aria-describedby=\"{{::form.key|sfCamelKey}}Status\"></md-input-container>");
3708+
$templateCache.put("decorators/material/default.html", "<md-input-container class=\"schema-form-{{::form.type}} {{::form.htmlClass}}\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false}\" sf-messages=\"\" sf-layout=\"\" sf-material-class=\"md-input-has-value\"><label ng-show=\"showTitle()\" for=\"{{::form.key|sfCamelKey}}\">{{::form.title}}</label> <input sf-field-model=\"\" ng-show=\"::form.key\" type=\"{{::form.type}}\" step=\"any\" sf-changed=\"form\" placeholder=\"{{form.placeholder}}\" id=\"{{::form.key|sfCamelKey}}\" ng-class=\"::form.fieldHtmlClass\" sf-type-parser=\"form.schema\" ng-disabled=\"::form.readonly\" schema-validate=\"form\" name=\"{{::form.key|sfCamelKey}}\" aria-describedby=\"{{::form.key|sfCamelKey}}Status\"></md-input-container>");
37083709
$templateCache.put("decorators/material/fieldset-trcl.html", "<fieldset ng-disabled=\"form.readonly\" class=\"standard {{form.htmlClass}}\" flex=\"\"><legend ng-show=\"form.title\">{{ form.title }}</legend><div ng-transclude=\"\"></div></fieldset>");
37093710
$templateCache.put("decorators/material/fieldset.html", "<fieldset ng-disabled=\"form.readonly\" class=\"standard {{form.htmlClass}}\" flex=\"\"><legend ng-show=\"form.title\">{{ form.title }}</legend></fieldset>");
37103711
$templateCache.put("decorators/material/help.html", "<div class=\"helpvalue schema-form-helpvalue {{form.htmlClass}}\" ng-bind-html=\"form.helpvalue\"></div>");
@@ -3848,7 +3849,7 @@ return /******/ (function(modules) { // webpackBootstrap
38483849
};
38493850

38503851
function sfMessagesNodeHandler() {
3851-
var html = '<div ng-if="ngModel.$invalid" ng-messages="ngModel.$error"><div sf-message ng-message></div></div>';
3852+
var html = '<div ng-if="ngModel.$invalid" ng-messages="{dummy: true}" >'+'<div ng-message="dummy" class="md-input-message-animation" sf-message="form.description"></div></div>';
38523853
var div = document.createElement('div');
38533854
div.innerHTML = html;
38543855
return div.firstChild;
@@ -3857,7 +3858,7 @@ return /******/ (function(modules) { // webpackBootstrap
38573858
function sfMessagesBuilder(args) {
38583859
var messagesDiv = args.fieldFrag.querySelector('[sf-messages]');
38593860
if (messagesDiv && sfMessagesNode) {
3860-
var child = sfMessagesNode.cloneNode();
3861+
var child = sfMessagesNode.cloneNode(true);
38613862
messagesDiv.appendChild(child);
38623863
}
38633864
};
@@ -3942,7 +3943,7 @@ return /******/ (function(modules) { // webpackBootstrap
39423943
var minDate = args.form.minimum || false;
39433944
var maxDate = args.form.maximum || false;
39443945
if (minDate) {
3945-
mdDatepickerFrag.setAttribute('md-max-date', minDate);
3946+
mdDatepickerFrag.setAttribute('md-min-date', minDate);
39463947
}
39473948
if (maxDate) {
39483949
mdDatepickerFrag.setAttribute('md-max-date', maxDate);
@@ -4081,6 +4082,37 @@ return /******/ (function(modules) { // webpackBootstrap
40814082
})
40824083
*/
40834084

4085+
/***/ },
4086+
/* 7 */
4087+
/***/ function(module, exports) {
4088+
4089+
angular.module('schemaForm').directive('sfMaterialClass', function ($compile, $timeout) {
4090+
return {
4091+
restrict: 'A',
4092+
scope: false,
4093+
link: function (scope, element, attrs, ngModel) {
4094+
function reduceHelper(obj, i) {
4095+
return obj[i];
4096+
}
4097+
4098+
var modelValue;
4099+
try {
4100+
modelValue = scope.form.key.reduce(reduceHelper, scope.model);
4101+
} catch (e) {
4102+
modelValue = undefined;
4103+
}
4104+
4105+
// Element class is not set in DOM if executed immediately.
4106+
// I don't understand exactly why but it's probably related to other directive job.
4107+
$timeout(function () {
4108+
if (modelValue !== null && typeof modelValue !== 'undefined' && modelValue !== false) {
4109+
element.addClass(attrs.sfMaterialClass);
4110+
}
4111+
}, 0);
4112+
}
4113+
};
4114+
});
4115+
40844116
/***/ }
40854117
/******/ ])
40864118
});

‎dist/angular-schema-form-material.min.js

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

‎src/angular-schema-form-material-templates.js

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /