@skyux/forms 5.6.0 → 5.7.0
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/skyux-forms.umd.js +26 -23
- package/documentation.json +259 -599
- package/esm2015/lib/modules/character-counter/character-counter.directive.js +1 -0
- package/esm2015/lib/modules/character-counter/character-counter.directive.js.map +1 -1
- package/esm2015/lib/modules/checkbox/checkbox.component.js +3 -2
- package/esm2015/lib/modules/checkbox/checkbox.component.js.map +1 -1
- package/esm2015/lib/modules/file-attachment/file-attachment.component.js +3 -3
- package/esm2015/lib/modules/file-attachment/file-attachment.component.js.map +1 -1
- package/esm2015/lib/modules/file-attachment/file-drop.component.js +1 -2
- package/esm2015/lib/modules/file-attachment/file-drop.component.js.map +1 -1
- package/esm2015/lib/modules/file-attachment/file-item.component.js +3 -1
- package/esm2015/lib/modules/file-attachment/file-item.component.js.map +1 -1
- package/esm2015/lib/modules/file-attachment/file-item.service.js +2 -2
- package/esm2015/lib/modules/file-attachment/file-item.service.js.map +1 -1
- package/esm2015/lib/modules/file-attachment/file-size.pipe.js +4 -5
- package/esm2015/lib/modules/file-attachment/file-size.pipe.js.map +1 -1
- package/esm2015/lib/modules/radio/radio-group.component.js +3 -3
- package/esm2015/lib/modules/radio/radio-group.component.js.map +1 -1
- package/esm2015/lib/modules/radio/radio.component.js +3 -3
- package/esm2015/lib/modules/radio/radio.component.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-forms-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-forms-resources.module.js.map +1 -1
- package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js +2 -1
- package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js.map +1 -1
- package/fesm2015/skyux-forms.js +26 -23
- package/fesm2015/skyux-forms.js.map +1 -1
- package/lib/modules/checkbox/checkbox.component.d.ts +1 -1
- package/lib/modules/file-attachment/file-attachment.component.d.ts +1 -1
- package/lib/modules/radio/radio-group.component.d.ts +1 -1
- package/lib/modules/shared/sky-forms-resources.module.d.ts +1 -1
- package/package.json +15 -12
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
/**
|
|
34
34
|
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
35
35
|
* The contents of this file were automatically generated by
|
|
36
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-forms' schematic.
|
|
36
|
+
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-forms' schematic.
|
|
37
37
|
* To update this file, simply rerun the command.
|
|
38
38
|
*/
|
|
39
39
|
var RESOURCES = {
|
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
*/
|
|
173
173
|
var SkyCharacterCounterInputDirective = /** @class */ (function () {
|
|
174
174
|
function SkyCharacterCounterInputDirective() {
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
175
176
|
this._validatorChange = function () { };
|
|
176
177
|
}
|
|
177
178
|
Object.defineProperty(SkyCharacterCounterInputDirective.prototype, "skyCharacterCounterLimit", {
|
|
@@ -733,8 +734,9 @@
|
|
|
733
734
|
this._disabledChange = new rxjs.BehaviorSubject(this._disabled);
|
|
734
735
|
this._required = false;
|
|
735
736
|
/** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
|
|
736
|
-
|
|
737
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
737
738
|
this.onTouched = function () { };
|
|
739
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
738
740
|
this._controlValueAccessorChangeFn = function (value) { };
|
|
739
741
|
if (this.ngControl) {
|
|
740
742
|
this.ngControl.valueAccessor = this;
|
|
@@ -822,7 +824,7 @@
|
|
|
822
824
|
/**
|
|
823
825
|
* Indicates whether the input is required for form validation.
|
|
824
826
|
* When you set this property to `true`, the component adds `aria-required` and `required`
|
|
825
|
-
* attributes to the input element so that forms display an invalid state until the
|
|
827
|
+
* attributes to the input element so that forms display an invalid state until the input element
|
|
826
828
|
* is complete.
|
|
827
829
|
* @default false
|
|
828
830
|
*/
|
|
@@ -1119,8 +1121,8 @@
|
|
|
1119
1121
|
/* tslint:enable */
|
|
1120
1122
|
};
|
|
1121
1123
|
SkyFileItemService.prototype.isImage = function (fileItem) {
|
|
1122
|
-
var fileTypeUpper = this.getFileTypeUpper(fileItem)
|
|
1123
|
-
slashIndex = fileTypeUpper.indexOf('/');
|
|
1124
|
+
var fileTypeUpper = this.getFileTypeUpper(fileItem);
|
|
1125
|
+
var slashIndex = fileTypeUpper.indexOf('/');
|
|
1124
1126
|
if (slashIndex >= 0) {
|
|
1125
1127
|
switch (fileTypeUpper.substr(fileTypeUpper.indexOf('/') + 1)) {
|
|
1126
1128
|
case 'BMP':
|
|
@@ -1208,16 +1210,16 @@
|
|
|
1208
1210
|
/**
|
|
1209
1211
|
* Indicates whether the input is required for form validation.
|
|
1210
1212
|
* When you set this property to `true`, the component adds `aria-required` and `required`
|
|
1211
|
-
* attributes to the input element so that forms display an invalid state until the
|
|
1213
|
+
* attributes to the input element so that forms display an invalid state until the input element
|
|
1212
1214
|
* is complete.
|
|
1213
1215
|
*/
|
|
1214
1216
|
this.required = false;
|
|
1215
1217
|
this.fileAttachmentId = uniqueId$1++;
|
|
1216
1218
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
1217
1219
|
this._disabled = false;
|
|
1218
|
-
|
|
1220
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1219
1221
|
this._onChange = function (_) { };
|
|
1220
|
-
|
|
1222
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1221
1223
|
this._onTouched = function () { };
|
|
1222
1224
|
this.labelElementId = "sky-file-attachment-label-" + this.fileAttachmentId;
|
|
1223
1225
|
this.fileDropDescriptionElementId = "sky-file-attachment-drop-description-" + this.fileAttachmentId;
|
|
@@ -1684,7 +1686,6 @@
|
|
|
1684
1686
|
var validFileArray = [];
|
|
1685
1687
|
var rejectedFileArray = [];
|
|
1686
1688
|
var totalFiles = files.length;
|
|
1687
|
-
var fileDrop = this;
|
|
1688
1689
|
// tslint:disable-next-line: max-line-length
|
|
1689
1690
|
var processedFiles = this.fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
|
|
1690
1691
|
try {
|
|
@@ -1694,7 +1695,7 @@
|
|
|
1694
1695
|
this.filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
|
|
1695
1696
|
}
|
|
1696
1697
|
else {
|
|
1697
|
-
this.loadFile(
|
|
1698
|
+
this.loadFile(this, file, validFileArray, rejectedFileArray, totalFiles);
|
|
1698
1699
|
}
|
|
1699
1700
|
}
|
|
1700
1701
|
}
|
|
@@ -1756,7 +1757,7 @@
|
|
|
1756
1757
|
this.resourcesService = resourcesService;
|
|
1757
1758
|
}
|
|
1758
1759
|
SkyFileSizePipe.prototype.transform = function (input) {
|
|
1759
|
-
var decimalPlaces = 0, dividend = 1,
|
|
1760
|
+
var decimalPlaces = 0, dividend = 1, template;
|
|
1760
1761
|
/* tslint:disable */
|
|
1761
1762
|
if (input === null || input === undefined) {
|
|
1762
1763
|
return '';
|
|
@@ -1782,10 +1783,9 @@
|
|
|
1782
1783
|
dividend = 1e9;
|
|
1783
1784
|
decimalPlaces = 1;
|
|
1784
1785
|
}
|
|
1785
|
-
roundedSize =
|
|
1786
|
-
Math.
|
|
1787
|
-
|
|
1788
|
-
formattedSize = this.decimalPipe.transform(roundedSize, '.0-3');
|
|
1786
|
+
var roundedSize = Math.floor(input / (dividend / Math.pow(10, decimalPlaces))) /
|
|
1787
|
+
Math.pow(10, decimalPlaces);
|
|
1788
|
+
var formattedSize = this.decimalPipe.transform(roundedSize, '.0-3');
|
|
1789
1789
|
return this.getString(template, formattedSize);
|
|
1790
1790
|
};
|
|
1791
1791
|
SkyFileSizePipe.prototype.getString = function (key) {
|
|
@@ -1843,7 +1843,9 @@
|
|
|
1843
1843
|
SkyFileItemComponent.prototype.ngDoCheck = function () {
|
|
1844
1844
|
var changes = this.differ.diff(this.fileItem);
|
|
1845
1845
|
if (changes) {
|
|
1846
|
-
var cls = void 0
|
|
1846
|
+
var cls = void 0;
|
|
1847
|
+
var extensionUpper = this.fileItemService.getFileExtensionUpper(this.fileItem);
|
|
1848
|
+
var fileTypeUpper = void 0;
|
|
1847
1849
|
switch (extensionUpper) {
|
|
1848
1850
|
case '.PDF':
|
|
1849
1851
|
cls = 'pdf';
|
|
@@ -2188,11 +2190,11 @@
|
|
|
2188
2190
|
this._checkedChange = new rxjs.BehaviorSubject(this._checked);
|
|
2189
2191
|
this._disabled = false;
|
|
2190
2192
|
this._disabledChange = new rxjs.BehaviorSubject(this._disabled);
|
|
2191
|
-
|
|
2193
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2192
2194
|
this.removeUniqueSelectionListener = function () { };
|
|
2193
|
-
|
|
2195
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2194
2196
|
this.onChangeCallback = function (value) { };
|
|
2195
|
-
|
|
2197
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2196
2198
|
this.onTouchedCallback = function () { };
|
|
2197
2199
|
}
|
|
2198
2200
|
Object.defineProperty(SkyRadioComponent.prototype, "checked", {
|
|
@@ -2469,7 +2471,7 @@
|
|
|
2469
2471
|
/**
|
|
2470
2472
|
* Indicates whether the input is required for form validation.
|
|
2471
2473
|
* When you set this property to `true`, the component adds `aria-required` and `required`
|
|
2472
|
-
* attributes to the input element so that forms display an invalid state until the
|
|
2474
|
+
* attributes to the input element so that forms display an invalid state until the input element
|
|
2473
2475
|
* is complete.
|
|
2474
2476
|
* @default false
|
|
2475
2477
|
*/
|
|
@@ -2477,9 +2479,9 @@
|
|
|
2477
2479
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
2478
2480
|
this._disabled = false;
|
|
2479
2481
|
this._name = "sky-radio-group-" + nextUniqueId++;
|
|
2480
|
-
|
|
2482
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2481
2483
|
this.onChange = function () { };
|
|
2482
|
-
|
|
2484
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2483
2485
|
this.onTouched = function () { };
|
|
2484
2486
|
if (this.ngControl) {
|
|
2485
2487
|
this.ngControl.valueAccessor = this;
|
|
@@ -3231,8 +3233,9 @@
|
|
|
3231
3233
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
3232
3234
|
this.toggleSwitchId = uniqueId++;
|
|
3233
3235
|
this._checked = false;
|
|
3234
|
-
|
|
3236
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3235
3237
|
this.onTouched = function () { };
|
|
3238
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3236
3239
|
this.onChange = function () { };
|
|
3237
3240
|
}
|
|
3238
3241
|
Object.defineProperty(SkyToggleSwitchComponent.prototype, "checked", {
|