@ngx-formly/bootstrap 5.10.32 → 5.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngx-formly-bootstrap.umd.js +1 -1
- package/bundles/ngx-formly-bootstrap.umd.js.map +1 -1
- package/bundles/ngx-formly-bootstrap.umd.min.js +1 -1
- package/bundles/ngx-formly-bootstrap.umd.min.js.map +1 -1
- package/esm2015/lib/types/multicheckbox.js +2 -1
- package/esm5/lib/types/multicheckbox.js +2 -2
- package/fesm2015/ngx-formly-bootstrap.js +1 -0
- package/fesm2015/ngx-formly-bootstrap.js.map +1 -1
- package/fesm5/ngx-formly-bootstrap-addons.js +1 -1
- package/fesm5/ngx-formly-bootstrap.js +1 -1
- package/fesm5/ngx-formly-bootstrap.js.map +1 -1
- package/ngx-formly-bootstrap.metadata.json +1 -1
- package/package.json +2 -2
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
FormlyFieldMultiCheckbox.decorators = [
|
|
159
159
|
{ type: core.Component, args: [{
|
|
160
160
|
selector: 'formly-field-multicheckbox',
|
|
161
|
-
template: "\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "
|
|
161
|
+
template: "\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "
|
|
162
162
|
}] }
|
|
163
163
|
];
|
|
164
164
|
return FormlyFieldMultiCheckbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap.umd.js.map","sources":["node_modules/tslib/tslib.es6.js","ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY_CONFIG),\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n"],"names":["tslib_1.__extends","Component","FieldType","tslib_1.__spread","take","NgZone","ViewChild","SelectControlValueAccessor","FieldWrapper","NgModule","CommonModule","ReactiveFormsModule","FormlySelectModule","FormlyModule","FormlyBootstrapAddonsModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/E,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;AAEF,aAAgB,SAAS,CAAC,CAAC,EAAE,CAAC;QAC1B,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpB,SAAS,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;QACvC,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,I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AI,EAAE,QAAQ;gBACd,SAAS,EAAE,iBAAiB;gBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,SAAS,EAAE,mBAAmB;gBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,SAAS,EAAE,wBAAwB;gBACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;SACF;QACD,QAAQ,EAAE;YACR,EAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE;SACzD;KACF;;;;;;AC5DD;QAQA;SAYqC;;oBAZpCC,aAAQ,SAAC;wBACR,YAAY,EAAE;4BACZ,qBAAqB;yBACtB;wBACD,OAAO,EAAE;4BACPC,mBAAY;4BACZC,yBAAmB;4BACnBC,yBAAkB;4BAClBC,mBAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;4BAC9CC,kCAA2B;yBAC5B;qBACF;;QACmC,4BAAC;KAZrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap.umd.js.map","sources":["node_modules/tslib/tslib.es6.js","ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY_CONFIG),\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n"],"names":["tslib_1.__extends","Component","FieldType","tslib_1.__spread","take","NgZone","ViewChild","SelectControlValueAccessor","FieldWrapper","NgModule","CommonModule","ReactiveFormsModule","FormlySelectModule","FormlyModule","FormlyBootstrapAddonsModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/E,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;AAEF,aAAgB,SAAS,CAAC,CAAC,EAAE,CAAC;QAC1B,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpB,SAAS,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;QACvC,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;AAED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BAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,SAAS,EAAE,wBAAwB;gBACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;SACF;QACD,QAAQ,EAAE;YACR,EAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE;SACzD;KACF;;;;;;AC5DD;QAQA;SAYqC;;oBAZpCC,aAAQ,SAAC;wBACR,YAAY,EAAE;4BACZ,qBAAqB;yBACtB;wBACD,OAAO,EAAE;4BACPC,mBAAY;4BACZC,yBAAmB;4BACnBC,yBAAkB;4BAClBC,mBAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;4BAC9CC,kCAA2B;yBAC5B;qBACF;;QACmC,4BAAC;KAZrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs/operators"),require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@ngx-formly/core"),require("@ngx-formly/core/select"),require("@ngx-formly/bootstrap/addons")):"function"==typeof define&&define.amd?define("@ngx-formly/bootstrap",["exports","rxjs/operators","@angular/core","@angular/common","@angular/forms","@ngx-formly/core","@ngx-formly/core/select","@ngx-formly/bootstrap/addons"],e):e((o["ngx-formly"]=o["ngx-formly"]||{},o["ngx-formly"].bootstrap={}),o.rxjs.operators,o.ng.core,o.ng.common,o.ng.forms,o.core$1,o.select,o["ngx-formly"].bootstrap.addons)}(this,function(o,l,n,e,r,t,i,c){"use strict";var a=function(o,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t])})(o,e)};function s(o,e){function t(){this.constructor=o}a(o,e),o.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var p=function(){return(p=Object.assign||function(o){for(var e,t=1,n=arguments.length;t<n;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o}).apply(this,arguments)};function m(o,e){var t="function"==typeof Symbol&&o[Symbol.iterator];if(!t)return o;var n,r,l=t.call(o),i=[];try{for(;(void 0===e||0<e--)&&!(n=l.next()).done;)i.push(n.value)}catch(c){r={error:c}}finally{try{n&&!n.done&&(t=l["return"])&&t.call(l)}finally{if(r)throw r.error}}return i}function f(){for(var o=[],e=0;e<arguments.length;e++)o=o.concat(m(arguments[e]));return o}var u=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{indeterminate:!0,hideLabel:!0,formCheck:"custom"}},o}return s(o,e),o.decorators=[{type:n.Component,args:[{selector:"formly-field-checkbox",template:"\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n "}]}],o}(t.FieldType),d=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{options:[],formCheck:"custom"}},o}return s(o,e),o.prototype.onChange=function(e,o){var t;"array"===this.to.type?this.formControl.patchValue(o?f(this.formControl.value||[],[e]):f(this.formControl.value||[]).filter(function(o){return o!==e})):this.formControl.patchValue(p({},this.formControl.value,((t={})[e]=o,t))),this.formControl.markAsTouched()},o.prototype.isChecked=function(o){var e=this.formControl.value;return e&&("array"===this.to.type?-1!==e.indexOf(o.value):e[o.value])},o.decorators=[{type:n.Component,args:[{selector:"formly-field-multicheckbox",template:"\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "}]}],o}(t.FieldType),h=function(o){function e(){return null!==o&&o.apply(this,arguments)||this}return s(e,o),Object.defineProperty(e.prototype,"type",{get:function(){return this.to.type||"text"},enumerable:!0,configurable:!0}),e.decorators=[{type:n.Component,args:[{selector:"formly-field-input",template:'\n <input *ngIf="type !== \'number\' else numberTmp" [type]="type" [formControl]="formControl" class="form-control" [formlyAttributes]="field" [class.is-invalid]="showError">\n <ng-template #numberTmp>\n <input type="number" [formControl]="formControl" class="form-control" [formlyAttributes]="field" [class.is-invalid]="showError">\n </ng-template>\n '}]}],e}(t.FieldType),g=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{options:[],formCheck:"custom"}},o}return s(o,e),o.decorators=[{type:n.Component,args:[{selector:"formly-field-radio",template:'\n <div>\n <div *ngFor="let option of to.options | formlySelectOptions:field | async; let i = index;"\n [ngClass]="{\n \'form-check\': to.formCheck.indexOf(\'custom\') === -1,\n \'form-check-inline\': to.formCheck === \'inline\',\n \'custom-control custom-radio\': to.formCheck.indexOf(\'custom\') === 0,\n \'custom-control-inline\': to.formCheck === \'custom-inline\'\n }"\n >\n <input type="radio"\n [id]="id + \'_\' + i"\n [class.form-check-input]="to.formCheck.indexOf(\'custom\') === -1"\n [class.custom-control-input]="to.formCheck.indexOf(\'custom\') === 0"\n [name]="field.name || id"\n [class.is-invalid]="showError"\n [attr.value]="option.value"\n [value]="option.value"\n [formControl]="formControl"\n [formlyAttributes]="field"\n [attr.disabled]="option.disabled || formControl.disabled ? true : null">\n <label\n [class.form-check-label]="to.formCheck.indexOf(\'custom\') === -1"\n [class.custom-control-label]="to.formCheck.indexOf(\'custom\') === 0"\n [for]="id + \'_\' + i">\n {{ option.label }}\n </label>\n </div>\n </div>\n '}]}],o}(t.FieldType),y=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{cols:1,rows:1}},o}return s(o,e),o.decorators=[{type:n.Component,args:[{selector:"formly-field-textarea",template:'\n <textarea [formControl]="formControl" [cols]="to.cols"\n [rows]="to.rows" class="form-control" [class.is-invalid]="showError"\n [formlyAttributes]="field">\n </textarea>\n '}]}],o}(t.FieldType),b=function(t){function o(o){var e=t.call(this)||this;return e.ngZone=o,e.defaultOptions={templateOptions:{options:[],compareWith:function(o,e){return o===e}}},e}return s(o,t),Object.defineProperty(o.prototype,"selectAccessor",{set:function(t){var n=this;if(t){var r=t.writeValue.bind(t);null===t._getOptionId(t.value)&&r(t.value),t.writeValue=function(o){var e=t._idCounter;r(o),null===o&&n.ngZone.onStable.asObservable().pipe(l.take(1)).subscribe(function(){e!==t._idCounter&&null===t._getOptionId(o)&&-1!==t._elementRef.nativeElement.selectedIndex&&r(o)})}}},enumerable:!0,configurable:!0}),o.decorators=[{type:n.Component,args:[{selector:"formly-field-select",template:'\n <select *ngIf="to.multiple; else singleSelect" class="form-control"\n multiple\n [class.custom-select]="to.customSelect"\n [formControl]="formControl"\n [compareWith]="to.compareWith"\n [class.is-invalid]="showError"\n [formlyAttributes]="field">\n <ng-container *ngIf="to.options | formlySelectOptions:field | async as opts">\n <ng-container *ngIf="to._flatOptions else grouplist">\n <ng-container *ngFor="let opt of opts">\n <option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor="let opt of opts">\n <option *ngIf="!opt.group else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]="opt.label">\n <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class="form-control"\n [formControl]="formControl"\n [compareWith]="to.compareWith"\n [class.custom-select]="to.customSelect"\n [class.is-invalid]="showError"\n [formlyAttributes]="field">\n <option *ngIf="to.placeholder" [ngValue]="null">{{ to.placeholder }}</option>\n <ng-container *ngIf="to.options | formlySelectOptions:field | async as opts">\n <ng-container *ngIf="to._flatOptions else grouplist">\n <ng-container *ngFor="let opt of opts">\n <option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor="let opt of opts">\n <option *ngIf="!opt.group else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]="opt.label">\n <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n '}]}],o.ctorParameters=function(){return[{type:n.NgZone}]},o.propDecorators={selectAccessor:[{type:n.ViewChild,args:[r.SelectControlValueAccessor]}]},o}(t.FieldType),C=function(o){function e(){return null!==o&&o.apply(this,arguments)||this}return s(e,o),e.decorators=[{type:n.Component,args:[{selector:"formly-wrapper-form-field",template:'\n <div class="form-group" [class.has-error]="showError">\n <label *ngIf="to.label && to.hideLabel !== true" [attr.for]="id">\n {{ to.label }}\n <span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf="showError" class="invalid-feedback" [style.display]="\'block\'">\n <formly-validation-message [field]="field"></formly-validation-message>\n </div>\n\n <small *ngIf="to.description" class="form-text text-muted">{{ to.description }}</small>\n </div>\n '}]}],e}(t.FieldWrapper),v=[h,u,g,b,y,d,C],k={types:[{name:"input",component:h,wrappers:["form-field"]},{name:"checkbox",component:u,wrappers:["form-field"]},{name:"radio",component:g,wrappers:["form-field"]},{name:"select",component:b,wrappers:["form-field"]},{name:"textarea",component:y,wrappers:["form-field"]},{name:"multicheckbox",component:d,wrappers:["form-field"]}],wrappers:[{name:"form-field",component:C}]},x=function(){function o(){}return o.decorators=[{type:n.NgModule,args:[{declarations:[v],imports:[e.CommonModule,r.ReactiveFormsModule,i.FormlySelectModule,t.FormlyModule.forChild(k),c.FormlyBootstrapAddonsModule]}]}],o}();o.FormlyBootstrapModule=x,o.FormlyFieldCheckbox=u,o.FormlyFieldMultiCheckbox=d,o.FormlyFieldInput=h,o.FormlyFieldRadio=g,o.FormlyFieldTextArea=y,o.FormlyFieldSelect=b,o.FormlyWrapperFormField=C,o.ɵb=k,o.ɵa=v,Object.defineProperty(o,"__esModule",{value:!0})});
|
|
1
|
+
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs/operators"),require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@ngx-formly/core"),require("@ngx-formly/core/select"),require("@ngx-formly/bootstrap/addons")):"function"==typeof define&&define.amd?define("@ngx-formly/bootstrap",["exports","rxjs/operators","@angular/core","@angular/common","@angular/forms","@ngx-formly/core","@ngx-formly/core/select","@ngx-formly/bootstrap/addons"],e):e((o["ngx-formly"]=o["ngx-formly"]||{},o["ngx-formly"].bootstrap={}),o.rxjs.operators,o.ng.core,o.ng.common,o.ng.forms,o.core$1,o.select,o["ngx-formly"].bootstrap.addons)}(this,function(o,l,n,e,r,t,i,a){"use strict";var c=function(o,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t])})(o,e)};function s(o,e){function t(){this.constructor=o}c(o,e),o.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var p=function(){return(p=Object.assign||function(o){for(var e,t=1,n=arguments.length;t<n;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o}).apply(this,arguments)};function m(o,e){var t="function"==typeof Symbol&&o[Symbol.iterator];if(!t)return o;var n,r,l=t.call(o),i=[];try{for(;(void 0===e||0<e--)&&!(n=l.next()).done;)i.push(n.value)}catch(a){r={error:a}}finally{try{n&&!n.done&&(t=l["return"])&&t.call(l)}finally{if(r)throw r.error}}return i}function f(){for(var o=[],e=0;e<arguments.length;e++)o=o.concat(m(arguments[e]));return o}var u=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{indeterminate:!0,hideLabel:!0,formCheck:"custom"}},o}return s(o,e),o.decorators=[{type:n.Component,args:[{selector:"formly-field-checkbox",template:"\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n "}]}],o}(t.FieldType),d=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{options:[],formCheck:"custom"}},o}return s(o,e),o.prototype.onChange=function(e,o){var t;"array"===this.to.type?this.formControl.patchValue(o?f(this.formControl.value||[],[e]):f(this.formControl.value||[]).filter(function(o){return o!==e})):this.formControl.patchValue(p({},this.formControl.value,((t={})[e]=o,t))),this.formControl.markAsTouched()},o.prototype.isChecked=function(o){var e=this.formControl.value;return e&&("array"===this.to.type?-1!==e.indexOf(o.value):e[o.value])},o.decorators=[{type:n.Component,args:[{selector:"formly-field-multicheckbox",template:"\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "}]}],o}(t.FieldType),h=function(o){function e(){return null!==o&&o.apply(this,arguments)||this}return s(e,o),Object.defineProperty(e.prototype,"type",{get:function(){return this.to.type||"text"},enumerable:!0,configurable:!0}),e.decorators=[{type:n.Component,args:[{selector:"formly-field-input",template:'\n <input *ngIf="type !== \'number\' else numberTmp" [type]="type" [formControl]="formControl" class="form-control" [formlyAttributes]="field" [class.is-invalid]="showError">\n <ng-template #numberTmp>\n <input type="number" [formControl]="formControl" class="form-control" [formlyAttributes]="field" [class.is-invalid]="showError">\n </ng-template>\n '}]}],e}(t.FieldType),g=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{options:[],formCheck:"custom"}},o}return s(o,e),o.decorators=[{type:n.Component,args:[{selector:"formly-field-radio",template:'\n <div>\n <div *ngFor="let option of to.options | formlySelectOptions:field | async; let i = index;"\n [ngClass]="{\n \'form-check\': to.formCheck.indexOf(\'custom\') === -1,\n \'form-check-inline\': to.formCheck === \'inline\',\n \'custom-control custom-radio\': to.formCheck.indexOf(\'custom\') === 0,\n \'custom-control-inline\': to.formCheck === \'custom-inline\'\n }"\n >\n <input type="radio"\n [id]="id + \'_\' + i"\n [class.form-check-input]="to.formCheck.indexOf(\'custom\') === -1"\n [class.custom-control-input]="to.formCheck.indexOf(\'custom\') === 0"\n [name]="field.name || id"\n [class.is-invalid]="showError"\n [attr.value]="option.value"\n [value]="option.value"\n [formControl]="formControl"\n [formlyAttributes]="field"\n [attr.disabled]="option.disabled || formControl.disabled ? true : null">\n <label\n [class.form-check-label]="to.formCheck.indexOf(\'custom\') === -1"\n [class.custom-control-label]="to.formCheck.indexOf(\'custom\') === 0"\n [for]="id + \'_\' + i">\n {{ option.label }}\n </label>\n </div>\n </div>\n '}]}],o}(t.FieldType),y=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.defaultOptions={templateOptions:{cols:1,rows:1}},o}return s(o,e),o.decorators=[{type:n.Component,args:[{selector:"formly-field-textarea",template:'\n <textarea [formControl]="formControl" [cols]="to.cols"\n [rows]="to.rows" class="form-control" [class.is-invalid]="showError"\n [formlyAttributes]="field">\n </textarea>\n '}]}],o}(t.FieldType),b=function(t){function o(o){var e=t.call(this)||this;return e.ngZone=o,e.defaultOptions={templateOptions:{options:[],compareWith:function(o,e){return o===e}}},e}return s(o,t),Object.defineProperty(o.prototype,"selectAccessor",{set:function(t){var n=this;if(t){var r=t.writeValue.bind(t);null===t._getOptionId(t.value)&&r(t.value),t.writeValue=function(o){var e=t._idCounter;r(o),null===o&&n.ngZone.onStable.asObservable().pipe(l.take(1)).subscribe(function(){e!==t._idCounter&&null===t._getOptionId(o)&&-1!==t._elementRef.nativeElement.selectedIndex&&r(o)})}}},enumerable:!0,configurable:!0}),o.decorators=[{type:n.Component,args:[{selector:"formly-field-select",template:'\n <select *ngIf="to.multiple; else singleSelect" class="form-control"\n multiple\n [class.custom-select]="to.customSelect"\n [formControl]="formControl"\n [compareWith]="to.compareWith"\n [class.is-invalid]="showError"\n [formlyAttributes]="field">\n <ng-container *ngIf="to.options | formlySelectOptions:field | async as opts">\n <ng-container *ngIf="to._flatOptions else grouplist">\n <ng-container *ngFor="let opt of opts">\n <option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor="let opt of opts">\n <option *ngIf="!opt.group else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]="opt.label">\n <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class="form-control"\n [formControl]="formControl"\n [compareWith]="to.compareWith"\n [class.custom-select]="to.customSelect"\n [class.is-invalid]="showError"\n [formlyAttributes]="field">\n <option *ngIf="to.placeholder" [ngValue]="null">{{ to.placeholder }}</option>\n <ng-container *ngIf="to.options | formlySelectOptions:field | async as opts">\n <ng-container *ngIf="to._flatOptions else grouplist">\n <ng-container *ngFor="let opt of opts">\n <option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor="let opt of opts">\n <option *ngIf="!opt.group else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]="opt.label">\n <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n '}]}],o.ctorParameters=function(){return[{type:n.NgZone}]},o.propDecorators={selectAccessor:[{type:n.ViewChild,args:[r.SelectControlValueAccessor]}]},o}(t.FieldType),C=function(o){function e(){return null!==o&&o.apply(this,arguments)||this}return s(e,o),e.decorators=[{type:n.Component,args:[{selector:"formly-wrapper-form-field",template:'\n <div class="form-group" [class.has-error]="showError">\n <label *ngIf="to.label && to.hideLabel !== true" [attr.for]="id">\n {{ to.label }}\n <span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf="showError" class="invalid-feedback" [style.display]="\'block\'">\n <formly-validation-message [field]="field"></formly-validation-message>\n </div>\n\n <small *ngIf="to.description" class="form-text text-muted">{{ to.description }}</small>\n </div>\n '}]}],e}(t.FieldWrapper),v=[h,u,g,b,y,d,C],k={types:[{name:"input",component:h,wrappers:["form-field"]},{name:"checkbox",component:u,wrappers:["form-field"]},{name:"radio",component:g,wrappers:["form-field"]},{name:"select",component:b,wrappers:["form-field"]},{name:"textarea",component:y,wrappers:["form-field"]},{name:"multicheckbox",component:d,wrappers:["form-field"]}],wrappers:[{name:"form-field",component:C}]},x=function(){function o(){}return o.decorators=[{type:n.NgModule,args:[{declarations:[v],imports:[e.CommonModule,r.ReactiveFormsModule,i.FormlySelectModule,t.FormlyModule.forChild(k),a.FormlyBootstrapAddonsModule]}]}],o}();o.FormlyBootstrapModule=x,o.FormlyFieldCheckbox=u,o.FormlyFieldMultiCheckbox=d,o.FormlyFieldInput=h,o.FormlyFieldRadio=g,o.FormlyFieldTextArea=y,o.FormlyFieldSelect=b,o.FormlyWrapperFormField=C,o.ɵb=k,o.ɵa=v,Object.defineProperty(o,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=ngx-formly-bootstrap.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["node_modules/tslib/tslib.es6.js","ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__read","o","m","Symbol","iterator","r","e","ar","next","done","push","value","error","__spread","concat","FormlyFieldCheckbox","_this","_super","defaultOptions","templateOptions","indeterminate","hideLabel","formCheck","tslib_1.__extends","Component","args","selector","template","FieldType","FormlyFieldMultiCheckbox","options","onChange","checked","to","type","formControl","patchValue","tslib_1.__spread","filter","_a","markAsTouched","isChecked","option","indexOf","FormlyFieldInput","defineProperty","FormlyFieldRadio","FormlyFieldTextArea","cols","rows","FormlyFieldSelect","ngZone","compareWith","o1","o2","writeValue","bind","_getOptionId","id","_idCounter","onStable","asObservable","pipe","take","subscribe","_elementRef","nativeElement","selectedIndex","NgZone","ViewChild","SelectControlValueAccessor","FormlyWrapperFormField","FieldWrapper","FIELD_TYPE_COMPONENTS","BOOTSTRAP_FORMLY_CONFIG","types","name","component","wrappers","FormlyBootstrapModule","NgModule","declarations","imports","CommonModule","ReactiveFormsModule","FormlySelectModule","FormlyModule","forChild","FormlyBootstrapAddonsModule"],"mappings":"0tBAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAG5B,SAAgBO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAG5E,IAAIK,EAAW,WAQlB,OAPAA,EAAWZ,OAAOa,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,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,SAAU,CAAC,eAEb,CACEF,KAAM,WACNC,UAAW9D,EACX+D,SAAU,CAAC,eAEb,CACEF,KAAM,QACNC,UAAW/B,EACXgC,SAAU,CAAC,eAEb,CACEF,KAAM,SACNC,UAAW3B,EACX4B,SAAU,CAAC,eAEb,CACEF,KAAM,WACNC,UAAW9B,EACX+B,SAAU,CAAC,eAEb,CACEF,KAAM,gBACNC,UAAWhD,EACXiD,SAAU,CAAC,gBAGfA,SAAU,CACR,CAACF,KAAM,aAAcC,UAAWN,KC1DpCQ,EAAA,WAQA,SAAAA,KAYoC,2BAZnCC,EAAAA,SAAQvD,KAAA,CAAC,CACRwD,aAAc,CACZR,GAEFS,QAAS,CACPC,EAAAA,aACAC,EAAAA,oBACAC,EAAAA,mBACAC,EAAAA,aAAaC,SAASb,GACtBc,EAAAA,iCAGgCT,EApBpC","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY_CONFIG),\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n"]}
|
|
1
|
+
{"version":3,"sources":["node_modules/tslib/tslib.es6.js","ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__read","o","m","Symbol","iterator","r","e","ar","next","done","push","value","error","__spread","concat","FormlyFieldCheckbox","_this","_super","defaultOptions","templateOptions","indeterminate","hideLabel","formCheck","tslib_1.__extends","Component","args","selector","template","FieldType","FormlyFieldMultiCheckbox","options","onChange","checked","to","type","formControl","patchValue","tslib_1.__spread","filter","_a","markAsTouched","isChecked","option","indexOf","FormlyFieldInput","defineProperty","FormlyFieldRadio","FormlyFieldTextArea","cols","rows","FormlyFieldSelect","ngZone","compareWith","o1","o2","writeValue","bind","_getOptionId","id","_idCounter","onStable","asObservable","pipe","take","subscribe","_elementRef","nativeElement","selectedIndex","NgZone","ViewChild","SelectControlValueAccessor","FormlyWrapperFormField","FieldWrapper","FIELD_TYPE_COMPONENTS","BOOTSTRAP_FORMLY_CONFIG","types","name","component","wrappers","FormlyBootstrapModule","NgModule","declarations","imports","CommonModule","ReactiveFormsModule","FormlySelectModule","FormlyModule","forChild","FormlyBootstrapAddonsModule"],"mappings":"0tBAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAG5B,SAAgBO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAG5E,IAAIK,EAAW,WAQlB,OAPAA,EAAWZ,OAAOa,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,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,UAAWjC,EACXkC,SAAU,CAAC,eAEb,CACEF,KAAM,WACNC,UAAW9D,EACX+D,SAAU,CAAC,eAEb,CACEF,KAAM,QACNC,UAAW/B,EACXgC,SAAU,CAAC,eAEb,CACEF,KAAM,SACNC,UAAW3B,EACX4B,SAAU,CAAC,eAEb,CACEF,KAAM,WACNC,UAAW9B,EACX+B,SAAU,CAAC,eAEb,CACEF,KAAM,gBACNC,UAAWhD,EACXiD,SAAU,CAAC,gBAGfA,SAAU,CACR,CAACF,KAAM,aAAcC,UAAWN,KC1DpCQ,EAAA,WAQA,SAAAA,KAYoC,2BAZnCC,EAAAA,SAAQvD,KAAA,CAAC,CACRwD,aAAc,CACZR,GAEFS,QAAS,CACPC,EAAAA,aACAC,EAAAA,oBACAC,EAAAA,mBACAC,EAAAA,aAAaC,SAASb,GACtBc,EAAAA,iCAGgCT,EApBpC","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY_CONFIG),\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n"]}
|
|
@@ -67,6 +67,7 @@ FormlyFieldMultiCheckbox.decorators = [
|
|
|
67
67
|
[class.custom-control-input]="to.formCheck.indexOf('custom') === 0"
|
|
68
68
|
[value]="option.value"
|
|
69
69
|
[checked]="isChecked(option)"
|
|
70
|
+
[disabled]=" formControl.disabled || option.disabled"
|
|
70
71
|
[formlyAttributes]="field"
|
|
71
72
|
(change)="onChange(option.value, $event.target.checked)">
|
|
72
73
|
<label
|
|
@@ -84,4 +85,4 @@ if (false) {
|
|
|
84
85
|
/** @type {?} */
|
|
85
86
|
F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iAgICAgIHRoaXMuZm9ybUNvbnRyb2wucGF0Y2hWYWx1ZShjaGVja2VkXG4gICAgICAgID8gWy4uLih0aGlzLmZvcm1Db250cm9sLnZhbHVlIHx8IFtdKSwgdmFsdWVdXG4gICAgICAgIDogWy4uLih0aGlzLmZvcm1Db250cm9sLnZhbHVlIHx8IFtdKV0uZmlsdGVyKG8gPT4gbyAhPT0gdmFsdWUpLFxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5mb3JtQ29udHJvbC5wYXRjaFZhbHVlKHsgLi4udGhpcy5mb3JtQ29udHJvbC52YWx1ZSwgW3ZhbHVlXTogY2hlY2tlZCB9KTtcbiAgICB9XG4gICAgdGhpcy5mb3JtQ29udHJvbC5tYXJrQXNUb3VjaGVkKCk7XG4gIH1cblxuICBpc0NoZWNrZWQob3B0aW9uOiBhbnkpIHtcbiAgICBjb25zdCB2YWx1ZSA9IHRoaXMuZm9ybUNvbnRyb2wudmFsdWU7XG5cbiAgICByZXR1cm4gdmFsdWUgJiYgKFxuICAgICAgdGhpcy50by50eXBlID09PSAnYXJyYXknXG4gICAgICAgID8gKHZhbHVlLmluZGV4T2Yob3B0aW9uLnZhbHVlKSAhPT0gLTEpXG4gICAgICAgIDogdmFsdWVbb3B0aW9uLnZhbHVlXVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -60,7 +60,7 @@ var FormlyFieldMultiCheckbox = /** @class */ (function (_super) {
|
|
|
60
60
|
FormlyFieldMultiCheckbox.decorators = [
|
|
61
61
|
{ type: Component, args: [{
|
|
62
62
|
selector: 'formly-field-multicheckbox',
|
|
63
|
-
template: "\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "
|
|
63
|
+
template: "\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "
|
|
64
64
|
}] }
|
|
65
65
|
];
|
|
66
66
|
return FormlyFieldMultiCheckbox;
|
|
@@ -70,4 +70,4 @@ if (false) {
|
|
|
70
70
|
/** @type {?} */
|
|
71
71
|
FormlyFieldMultiCheckbox.prototype.defaultOptions;
|
|
72
72
|
}
|
|
73
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGljaGVja2JveC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3gtZm9ybWx5L2Jvb3RzdHJhcC8iLCJzb3VyY2VzIjpbImxpYi90eXBlcy9tdWx0aWNoZWNrYm94LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFN0M7SUFpQzhDLG9EQUFTO0lBakN2RDtRQUFBLHFFQThEQztRQTVCQyxvQkFBYyxHQUFHO1lBQ2YsZUFBZSxFQUFFO2dCQUNmLE9BQU8sRUFBRSxFQUFFO2dCQUNYLFNBQVMsRUFBRSxRQUFRO2FBQ3BCO1NBQ0YsQ0FBQzs7SUF1QkosQ0FBQzs7Ozs7O0lBckJDLDJDQUFROzs7OztJQUFSLFVBQVMsS0FBVSxFQUFFLE9BQWdCOztRQUNuQyxJQUFJLElBQUksQ0FBQyxFQUFFLENBQUMsSUFBSSxLQUFLLE9BQU8sRUFBRTtZQUM1QixJQUFJLENBQUMsV0FBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPO2dCQUNqQyxDQUFDLGtCQUFLLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDLEdBQUUsS0FBSyxHQUMzQyxDQUFDLENBQUMsaUJBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLEtBQUssSUFBSSxFQUFFLENBQUMsRUFBRSxNQUFNOzs7O1lBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLEtBQUssS0FBSy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ICAgIHRoaXMuZm9ybUNvbnRyb2wucGF0Y2hWYWx1ZShjaGVja2VkXG4gICAgICAgID8gWy4uLih0aGlzLmZvcm1Db250cm9sLnZhbHVlIHx8IFtdKSwgdmFsdWVdXG4gICAgICAgIDogWy4uLih0aGlzLmZvcm1Db250cm9sLnZhbHVlIHx8IFtdKV0uZmlsdGVyKG8gPT4gbyAhPT0gdmFsdWUpLFxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5mb3JtQ29udHJvbC5wYXRjaFZhbHVlKHsgLi4udGhpcy5mb3JtQ29udHJvbC52YWx1ZSwgW3ZhbHVlXTogY2hlY2tlZCB9KTtcbiAgICB9XG4gICAgdGhpcy5mb3JtQ29udHJvbC5tYXJrQXNUb3VjaGVkKCk7XG4gIH1cblxuICBpc0NoZWNrZWQob3B0aW9uOiBhbnkpIHtcbiAgICBjb25zdCB2YWx1ZSA9IHRoaXMuZm9ybUNvbnRyb2wudmFsdWU7XG5cbiAgICByZXR1cm4gdmFsdWUgJiYgKFxuICAgICAgdGhpcy50by50eXBlID09PSAnYXJyYXknXG4gICAgICAgID8gKHZhbHVlLmluZGV4T2Yob3B0aW9uLnZhbHVlKSAhPT0gLTEpXG4gICAgICAgIDogdmFsdWVbb3B0aW9uLnZhbHVlXVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -122,6 +122,7 @@ FormlyFieldMultiCheckbox.decorators = [
|
|
|
122
122
|
[class.custom-control-input]="to.formCheck.indexOf('custom') === 0"
|
|
123
123
|
[value]="option.value"
|
|
124
124
|
[checked]="isChecked(option)"
|
|
125
|
+
[disabled]=" formControl.disabled || option.disabled"
|
|
125
126
|
[formlyAttributes]="field"
|
|
126
127
|
(change)="onChange(option.value, $event.target.checked)">
|
|
127
128
|
<label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap.js.map","sources":["ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY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ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\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'@angular/common';
|
|
|
2
2
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
3
3
|
import { Component, NgModule } from '@angular/core';
|
|
4
4
|
import { FieldWrapper, FormlyModule } from '@ngx-formly/core';
|
|
5
|
-
import {
|
|
5
|
+
import { __extends, __spread } from 'tslib';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @fileoverview added by tsickle
|
|
@@ -92,7 +92,7 @@ var FormlyFieldMultiCheckbox = /** @class */ (function (_super) {
|
|
|
92
92
|
FormlyFieldMultiCheckbox.decorators = [
|
|
93
93
|
{ type: Component, args: [{
|
|
94
94
|
selector: 'formly-field-multicheckbox',
|
|
95
|
-
template: "\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "
|
|
95
|
+
template: "\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "
|
|
96
96
|
}] }
|
|
97
97
|
];
|
|
98
98
|
return FormlyFieldMultiCheckbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap.js.map","sources":["ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY_CONFIG),\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n"],"names":["tslib_1.__extends","tslib_1.__spread"],"mappings":";;;;;;;;;;;;;;IAiCyCA,uCAAS;IA9BlD;QAAA,qEAsCC;QAPC,oBAAc,GAAG;YACf,eAAe,EAAE;gBACf,aAAa,EAAE,IAAI;gBACnB,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,QAAQ;aACpB;SACF,CAAC;;KACH;;gBAtCA,SAAS,SAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,QAAQ,EAAE,mvCA0BT;iBACF;;IASD,0BAAC;CAAA,CARwC,SAAS;;;;;;;ICEJA,4CAAS;IAhCvD;QAAA,qEA6DC;QA5BC,oBAAc,GAAG;YACf,eAAe,EAAE;gBACf,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,QAAQ;aACpB;S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AgB;YAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,iBAAiB;YAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,mBAAmB;YAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,wBAAwB;YACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;KACF;IACD,QAAQ,EAAE;QACR,EAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE;KACzD;CACF;;;;;;AC5DD;IAQA;KAYqC;;gBAZpC,QAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,qBAAqB;qBACtB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;wBAC9C,2BAA2B;qBAC5B;iBACF;;IACmC,4BAAC;CAZrC;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap.js.map","sources":["ng://@ngx-formly/bootstrap/lib/types/checkbox.ts","ng://@ngx-formly/bootstrap/lib/types/multicheckbox.ts","ng://@ngx-formly/bootstrap/lib/types/input.ts","ng://@ngx-formly/bootstrap/lib/types/radio.ts","ng://@ngx-formly/bootstrap/lib/types/textarea.ts","ng://@ngx-formly/bootstrap/lib/types/select.ts","ng://@ngx-formly/bootstrap/lib/wrappers/form-field.wrapper.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.config.ts","ng://@ngx-formly/bootstrap/lib/bootstrap.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n `,\n})\nexport class FormlyFieldCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter(o => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (\n this.to.type === 'array'\n ? (value.indexOf(option.value) !== -1)\n : value[option.value]\n );\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n `,\n})\nexport class FormlyFieldInput extends FieldType {\n get type() {\n return this.to.type || 'text';\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n})\nexport class FormlyFieldRadio extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'stacked' | 'inline'\n },\n };\n}\n","import { Component } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n `,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { Component, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) return;\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (id !== s._idCounter && s._getOptionId(value) === null && s._elementRef.nativeElement.selectedIndex !== -1) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper {\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport {\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n} from './types/types';\nimport { FormlyWrapperFormField } from './wrappers/wrappers';\n\nexport const FIELD_TYPE_COMPONENTS = [\n // types\n FormlyFieldInput,\n FormlyFieldCheckbox,\n FormlyFieldRadio,\n FormlyFieldSelect,\n FormlyFieldTextArea,\n FormlyFieldMultiCheckbox,\n\n // wrappers\n FormlyWrapperFormField,\n];\n\nexport const BOOTSTRAP_FORMLY_CONFIG: ConfigOption = {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n wrappers: [\n {name: 'form-field', component: FormlyWrapperFormField },\n ],\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { BOOTSTRAP_FORMLY_CONFIG, FIELD_TYPE_COMPONENTS } from './bootstrap.config';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n declarations: [\n FIELD_TYPE_COMPONENTS,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlySelectModule,\n FormlyModule.forChild(BOOTSTRAP_FORMLY_CONFIG),\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n"],"names":["tslib_1.__extends","tslib_1.__spread"],"mappings":";;;;;;;;;;;;;;IAiCyCA,uCAAS;IA9BlD;QAAA,qEAsCC;QAPC,oBAAc,GAAG;YACf,eAAe,EAAE;gBACf,aAAa,EAAE,IAAI;gBACnB,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,QAAQ;aACpB;SACF,CAAC;;KACH;;gBAtCA,SAAS,SAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,QAAQ,EAAE,mvCA0BT;iBACF;;IASD,0BAA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CAAC;SACzB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,mBAAmB;YAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,gBAAgB;YAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,iBAAiB;YAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,mBAAmB;YAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,wBAAwB;YACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;KACF;IACD,QAAQ,EAAE;QACR,EAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE;KACzD;CACF;;;;;;AC5DD;IAQA;KAYqC;;gBAZpC,QAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,qBAAqB;qBACtB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;wBAC9C,2BAA2B;qBAC5B;iBACF;;IACmC,4BAAC;CAZrC;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"FormlyFieldCheckbox":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":33,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-checkbox","template":"\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n "}]}],"members":{}},"FormlyFieldMultiCheckbox":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":35,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-multicheckbox","template":"\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "}]}],"members":{"onChange":[{"__symbolic":"method"}],"isChecked":[{"__symbolic":"method"}]}},"FormlyFieldInput":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":12,"character":38},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-input","template":"\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n "}]}],"members":{}},"FormlyFieldRadio":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":36,"character":38},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-radio","template":"\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "}]}],"members":{}},"FormlyFieldTextArea":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":12,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-textarea","template":"\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n "}]}],"members":{}},"FormlyFieldSelect":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":69,"character":39},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"formly-field-select","template":"\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n "}]}],"members":{"selectAccessor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":80,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"SelectControlValueAccessor","line":80,"character":13}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":101,"character":30}]}]}},"FormlyWrapperFormField":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldWrapper","line":22,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-wrapper-form-field","template":"\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n "}]}],"members":{}},"FormlyBootstrapModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":14,"character":4},{"__symbolic":"reference","module":"@ngx-formly/core/select","name":"FormlySelectModule","line":15,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FormlyModule","line":16,"character":4},"member":"forChild"},"arguments":[{"__symbolic":"reference","name":"ɵb"}]},{"__symbolic":"reference","module":"@ngx-formly/bootstrap/addons","name":"FormlyBootstrapAddonsModule","line":17,"character":4}]}]}],"members":{}},"ɵa":[{"__symbolic":"reference","name":"FormlyFieldInput"},{"__symbolic":"reference","name":"FormlyFieldCheckbox"},{"__symbolic":"reference","name":"FormlyFieldRadio"},{"__symbolic":"reference","name":"FormlyFieldSelect"},{"__symbolic":"reference","name":"FormlyFieldTextArea"},{"__symbolic":"reference","name":"FormlyFieldMultiCheckbox"},{"__symbolic":"reference","name":"FormlyWrapperFormField"}],"ɵb":{"types":[{"name":"input","component":{"__symbolic":"reference","name":"FormlyFieldInput"},"wrappers":["form-field"]},{"name":"checkbox","component":{"__symbolic":"reference","name":"FormlyFieldCheckbox"},"wrappers":["form-field"]},{"name":"radio","component":{"__symbolic":"reference","name":"FormlyFieldRadio"},"wrappers":["form-field"]},{"name":"select","component":{"__symbolic":"reference","name":"FormlyFieldSelect"},"wrappers":["form-field"]},{"name":"textarea","component":{"__symbolic":"reference","name":"FormlyFieldTextArea"},"wrappers":["form-field"]},{"name":"multicheckbox","component":{"__symbolic":"reference","name":"FormlyFieldMultiCheckbox"},"wrappers":["form-field"]}],"wrappers":[{"name":"form-field","component":{"__symbolic":"reference","name":"FormlyWrapperFormField"}}]}},"origins":{"FormlyFieldCheckbox":"./lib/types/checkbox","FormlyFieldMultiCheckbox":"./lib/types/multicheckbox","FormlyFieldInput":"./lib/types/input","FormlyFieldRadio":"./lib/types/radio","FormlyFieldTextArea":"./lib/types/textarea","FormlyFieldSelect":"./lib/types/select","FormlyWrapperFormField":"./lib/wrappers/form-field.wrapper","FormlyBootstrapModule":"./lib/bootstrap.module","ɵa":"./lib/bootstrap.config","ɵb":"./lib/bootstrap.config"},"importAs":"@ngx-formly/bootstrap"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"FormlyFieldCheckbox":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":33,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-checkbox","template":"\n <div [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\">\n <input type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.position-static]=\"to.formCheck === 'nolabel'\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [indeterminate]=\"to.indeterminate && formControl.value === null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\">\n <label [for]=\"id\"\n *ngIf=\"to.formCheck !== 'nolabel'\"\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n >\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n "}]}],"members":{}},"FormlyFieldMultiCheckbox":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":36,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-multicheckbox","template":"\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control': to.formCheck.indexOf('custom') === 0,\n 'custom-checkbox': to.formCheck === 'custom' || to.formCheck === 'custom-inline',\n 'custom-control-inline': to.formCheck === 'custom-inline',\n 'custom-switch': to.formCheck === 'custom-switch'\n }\"\n >\n <input type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [disabled]=\" formControl.disabled || option.disabled\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target.checked)\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "}]}],"members":{"onChange":[{"__symbolic":"method"}],"isChecked":[{"__symbolic":"method"}]}},"FormlyFieldInput":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":12,"character":38},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-input","template":"\n <input *ngIf=\"type !== 'number' else numberTmp\" [type]=\"type\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n <ng-template #numberTmp>\n <input type=\"number\" [formControl]=\"formControl\" class=\"form-control\" [formlyAttributes]=\"field\" [class.is-invalid]=\"showError\">\n </ng-template>\n "}]}],"members":{}},"FormlyFieldRadio":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":36,"character":38},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-radio","template":"\n <div>\n <div *ngFor=\"let option of to.options | formlySelectOptions:field | async; let i = index;\"\n [ngClass]=\"{\n 'form-check': to.formCheck.indexOf('custom') === -1,\n 'form-check-inline': to.formCheck === 'inline',\n 'custom-control custom-radio': to.formCheck.indexOf('custom') === 0,\n 'custom-control-inline': to.formCheck === 'custom-inline'\n }\"\n >\n <input type=\"radio\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-input]=\"to.formCheck.indexOf('custom') === 0\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.disabled]=\"option.disabled || formControl.disabled ? true : null\">\n <label\n [class.form-check-label]=\"to.formCheck.indexOf('custom') === -1\"\n [class.custom-control-label]=\"to.formCheck.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </div>\n "}]}],"members":{}},"FormlyFieldTextArea":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":12,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-field-textarea","template":"\n <textarea [formControl]=\"formControl\" [cols]=\"to.cols\"\n [rows]=\"to.rows\" class=\"form-control\" [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n </textarea>\n "}]}],"members":{}},"FormlyFieldSelect":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldType","line":69,"character":39},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"formly-field-select","template":"\n <select *ngIf=\"to.multiple; else singleSelect\" class=\"form-control\"\n multiple\n [class.custom-select]=\"to.customSelect\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select class=\"form-control\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.custom-select]=\"to.customSelect\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\">\n <option *ngIf=\"to.placeholder\" [ngValue]=\"null\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions:field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n "}]}],"members":{"selectAccessor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":80,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"SelectControlValueAccessor","line":80,"character":13}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":101,"character":30}]}]}},"FormlyWrapperFormField":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FieldWrapper","line":22,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"formly-wrapper-form-field","template":"\n <div class=\"form-group\" [class.has-error]=\"showError\">\n <label *ngIf=\"to.label && to.hideLabel !== true\" [attr.for]=\"id\">\n {{ to.label }}\n <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n\n <ng-template #fieldComponent></ng-template>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"to.description\" class=\"form-text text-muted\">{{ to.description }}</small>\n </div>\n "}]}],"members":{}},"FormlyBootstrapModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":14,"character":4},{"__symbolic":"reference","module":"@ngx-formly/core/select","name":"FormlySelectModule","line":15,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-formly/core","name":"FormlyModule","line":16,"character":4},"member":"forChild"},"arguments":[{"__symbolic":"reference","name":"ɵb"}]},{"__symbolic":"reference","module":"@ngx-formly/bootstrap/addons","name":"FormlyBootstrapAddonsModule","line":17,"character":4}]}]}],"members":{}},"ɵa":[{"__symbolic":"reference","name":"FormlyFieldInput"},{"__symbolic":"reference","name":"FormlyFieldCheckbox"},{"__symbolic":"reference","name":"FormlyFieldRadio"},{"__symbolic":"reference","name":"FormlyFieldSelect"},{"__symbolic":"reference","name":"FormlyFieldTextArea"},{"__symbolic":"reference","name":"FormlyFieldMultiCheckbox"},{"__symbolic":"reference","name":"FormlyWrapperFormField"}],"ɵb":{"types":[{"name":"input","component":{"__symbolic":"reference","name":"FormlyFieldInput"},"wrappers":["form-field"]},{"name":"checkbox","component":{"__symbolic":"reference","name":"FormlyFieldCheckbox"},"wrappers":["form-field"]},{"name":"radio","component":{"__symbolic":"reference","name":"FormlyFieldRadio"},"wrappers":["form-field"]},{"name":"select","component":{"__symbolic":"reference","name":"FormlyFieldSelect"},"wrappers":["form-field"]},{"name":"textarea","component":{"__symbolic":"reference","name":"FormlyFieldTextArea"},"wrappers":["form-field"]},{"name":"multicheckbox","component":{"__symbolic":"reference","name":"FormlyFieldMultiCheckbox"},"wrappers":["form-field"]}],"wrappers":[{"name":"form-field","component":{"__symbolic":"reference","name":"FormlyWrapperFormField"}}]}},"origins":{"FormlyFieldCheckbox":"./lib/types/checkbox","FormlyFieldMultiCheckbox":"./lib/types/multicheckbox","FormlyFieldInput":"./lib/types/input","FormlyFieldRadio":"./lib/types/radio","FormlyFieldTextArea":"./lib/types/textarea","FormlyFieldSelect":"./lib/types/select","FormlyWrapperFormField":"./lib/wrappers/form-field.wrapper","FormlyBootstrapModule":"./lib/bootstrap.module","ɵa":"./lib/bootstrap.config","ɵb":"./lib/bootstrap.config"},"importAs":"@ngx-formly/bootstrap"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngx-formly/bootstrap",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/ngx-formly/ngx-formly#readme",
|
|
6
6
|
"description": "ngx-formly is an Angular 2 module which has a Components to help customize and render JavaScript/JSON configured forms. The formly-form Component and the FormlyConfig service are very powerful and bring unmatched maintainability to your application's forms.",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"url": "https://github.com/ngx-formly/ngx-formly/issues"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@ngx-formly/core": "5.
|
|
28
|
+
"@ngx-formly/core": "5.11.1",
|
|
29
29
|
"bootstrap": "^4.0.0"
|
|
30
30
|
},
|
|
31
31
|
"main": "bundles/ngx-formly-bootstrap.umd.js",
|