@ni/nimble-angular 11.0.0 → 12.0.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/ni-nimble-angular.umd.js +39 -39
- package/bundles/ni-nimble-angular.umd.js.map +1 -1
- package/directives/{radio-button/nimble-radio-button-control-value-accessor.directive.d.ts → radio/nimble-radio-control-value-accessor.directive.d.ts} +3 -3
- package/directives/{radio-button/nimble-radio-button.directive.d.ts → radio/nimble-radio.directive.d.ts} +5 -5
- package/directives/radio/nimble-radio.module.d.ts +9 -0
- package/esm2015/directives/radio/nimble-radio-control-value-accessor.directive.js +86 -0
- package/esm2015/directives/radio/nimble-radio.directive.js +30 -0
- package/esm2015/directives/radio/nimble-radio.module.js +19 -0
- package/esm2015/public-api.js +4 -4
- package/fesm2015/ni-nimble-angular.js +25 -25
- package/fesm2015/ni-nimble-angular.js.map +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +3 -3
- package/directives/radio-button/nimble-radio-button.module.d.ts +0 -9
- package/esm2015/directives/radio-button/nimble-radio-button-control-value-accessor.directive.js +0 -86
- package/esm2015/directives/radio-button/nimble-radio-button.directive.js +0 -30
- package/esm2015/directives/radio-button/nimble-radio-button.module.js +0 -19
|
@@ -7341,30 +7341,30 @@
|
|
|
7341
7341
|
/**
|
|
7342
7342
|
* Control Value Accessor implementation for the radio group.
|
|
7343
7343
|
*/
|
|
7344
|
-
var
|
|
7345
|
-
__extends(
|
|
7344
|
+
var NimbleRadioControlValueAccessorDirective = /** @class */ (function (_super) {
|
|
7345
|
+
__extends(NimbleRadioControlValueAccessorDirective, _super);
|
|
7346
7346
|
// Type ɵangular_packages_forms_forms_r from base class isn't in camelcase
|
|
7347
7347
|
// eslint-disable-next-line camelcase
|
|
7348
|
-
function
|
|
7348
|
+
function NimbleRadioControlValueAccessorDirective(renderer, elementRef, _registry, _injector) {
|
|
7349
7349
|
var _this = _super.call(this, renderer, elementRef, _registry, _injector) || this;
|
|
7350
7350
|
_this.elementRef = elementRef;
|
|
7351
7351
|
return _this;
|
|
7352
7352
|
}
|
|
7353
|
-
|
|
7354
|
-
var id =
|
|
7355
|
-
|
|
7353
|
+
NimbleRadioControlValueAccessorDirective.allocateId = function () {
|
|
7354
|
+
var id = NimbleRadioControlValueAccessorDirective._nextOpenId.toString();
|
|
7355
|
+
NimbleRadioControlValueAccessorDirective._nextOpenId += 1;
|
|
7356
7356
|
return id;
|
|
7357
7357
|
};
|
|
7358
|
-
|
|
7358
|
+
NimbleRadioControlValueAccessorDirective.prototype.ngOnInit = function () {
|
|
7359
7359
|
// We need each button element to have a unique string value, because the FAST radio group looks at
|
|
7360
7360
|
// these values when trying to manage the checked state.
|
|
7361
|
-
this.elementRef.nativeElement.value =
|
|
7361
|
+
this.elementRef.nativeElement.value = NimbleRadioControlValueAccessorDirective.allocateId();
|
|
7362
7362
|
};
|
|
7363
7363
|
/**
|
|
7364
7364
|
* Sets the "checked" property value on the radio input element.
|
|
7365
7365
|
* @nodoc
|
|
7366
7366
|
*/
|
|
7367
|
-
|
|
7367
|
+
NimbleRadioControlValueAccessorDirective.prototype.writeValue = function (value) {
|
|
7368
7368
|
_super.prototype.writeValue.call(this, value);
|
|
7369
7369
|
var parentGroup = this.elementRef.nativeElement.parentElement;
|
|
7370
7370
|
if (this.value === value && parentGroup && parentGroup instanceof radioGroup.RadioGroup) {
|
|
@@ -7387,35 +7387,35 @@
|
|
|
7387
7387
|
// To work around this, we effectively disable the base class's onChange handler and replace it with
|
|
7388
7388
|
// our own nimbleOnChange. NimbleOnChange calls the original onChange (now cached as _privateOnChange)
|
|
7389
7389
|
// only if the changed item became checked.
|
|
7390
|
-
|
|
7390
|
+
NimbleRadioControlValueAccessorDirective.prototype.nimbleOnChange = function (checked) {
|
|
7391
7391
|
if (checked && this._privateOnChange) {
|
|
7392
7392
|
this._privateOnChange();
|
|
7393
7393
|
}
|
|
7394
7394
|
};
|
|
7395
|
-
|
|
7395
|
+
NimbleRadioControlValueAccessorDirective.prototype.registerOnChange = function (fn) {
|
|
7396
7396
|
_super.prototype.registerOnChange.call(this, fn);
|
|
7397
7397
|
this._privateOnChange = this.onChange;
|
|
7398
7398
|
this.onChange = function () { };
|
|
7399
7399
|
};
|
|
7400
|
-
return
|
|
7400
|
+
return NimbleRadioControlValueAccessorDirective;
|
|
7401
7401
|
}(i1.RadioControlValueAccessor));
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7402
|
+
NimbleRadioControlValueAccessorDirective._nextOpenId = 0;
|
|
7403
|
+
NimbleRadioControlValueAccessorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioControlValueAccessorDirective, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i1__namespace.ɵangular_packages_forms_forms_r }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
7404
|
+
NimbleRadioControlValueAccessorDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: NimbleRadioControlValueAccessorDirective, selector: "nimble-radio[formControlName],nimble-radio[formControl],nimble-radio[ngModel]", host: { listeners: { "change": "nimbleOnChange($event.target.checked)", "blur": "onTouched()" } }, providers: [{
|
|
7405
7405
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7406
|
-
useExisting: i0.forwardRef(function () { return
|
|
7406
|
+
useExisting: i0.forwardRef(function () { return NimbleRadioControlValueAccessorDirective; }),
|
|
7407
7407
|
multi: true
|
|
7408
7408
|
}], usesInheritance: true, ngImport: i0__namespace });
|
|
7409
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type:
|
|
7409
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioControlValueAccessorDirective, decorators: [{
|
|
7410
7410
|
type: i0.Directive,
|
|
7411
7411
|
args: [{
|
|
7412
|
-
selector: 'nimble-radio
|
|
7412
|
+
selector: 'nimble-radio[formControlName],nimble-radio[formControl],nimble-radio[ngModel]',
|
|
7413
7413
|
// The following host metadata is duplicated from RadioControlValueAccessor
|
|
7414
7414
|
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
|
7415
7415
|
host: { '(change)': 'nimbleOnChange($event.target.checked)', '(blur)': 'onTouched()' },
|
|
7416
7416
|
providers: [{
|
|
7417
7417
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7418
|
-
useExisting: i0.forwardRef(function () { return
|
|
7418
|
+
useExisting: i0.forwardRef(function () { return NimbleRadioControlValueAccessorDirective; }),
|
|
7419
7419
|
multi: true
|
|
7420
7420
|
}]
|
|
7421
7421
|
}]
|
|
@@ -7424,12 +7424,12 @@
|
|
|
7424
7424
|
/**
|
|
7425
7425
|
* Directive to provide Angular integration for the radio button.
|
|
7426
7426
|
*/
|
|
7427
|
-
var
|
|
7428
|
-
function
|
|
7427
|
+
var NimbleRadioDirective = /** @class */ (function () {
|
|
7428
|
+
function NimbleRadioDirective(renderer, elementRef) {
|
|
7429
7429
|
this.renderer = renderer;
|
|
7430
7430
|
this.elementRef = elementRef;
|
|
7431
7431
|
}
|
|
7432
|
-
Object.defineProperty(
|
|
7432
|
+
Object.defineProperty(NimbleRadioDirective.prototype, "disabled", {
|
|
7433
7433
|
get: function () {
|
|
7434
7434
|
return this.elementRef.nativeElement.disabled;
|
|
7435
7435
|
},
|
|
@@ -7439,33 +7439,33 @@
|
|
|
7439
7439
|
enumerable: false,
|
|
7440
7440
|
configurable: true
|
|
7441
7441
|
});
|
|
7442
|
-
return
|
|
7442
|
+
return NimbleRadioDirective;
|
|
7443
7443
|
}());
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type:
|
|
7444
|
+
NimbleRadioDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioDirective, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
7445
|
+
NimbleRadioDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: NimbleRadioDirective, selector: "nimble-radio", inputs: { disabled: "disabled" }, ngImport: i0__namespace });
|
|
7446
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioDirective, decorators: [{
|
|
7447
7447
|
type: i0.Directive,
|
|
7448
7448
|
args: [{
|
|
7449
|
-
selector: 'nimble-radio
|
|
7449
|
+
selector: 'nimble-radio'
|
|
7450
7450
|
}]
|
|
7451
7451
|
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { disabled: [{
|
|
7452
7452
|
type: i0.Input
|
|
7453
7453
|
}] } });
|
|
7454
7454
|
|
|
7455
|
-
var
|
|
7456
|
-
function
|
|
7455
|
+
var NimbleRadioModule = /** @class */ (function () {
|
|
7456
|
+
function NimbleRadioModule() {
|
|
7457
7457
|
}
|
|
7458
|
-
return
|
|
7458
|
+
return NimbleRadioModule;
|
|
7459
7459
|
}());
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type:
|
|
7460
|
+
NimbleRadioModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
7461
|
+
NimbleRadioModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioModule, declarations: [NimbleRadioControlValueAccessorDirective, NimbleRadioDirective], imports: [common.CommonModule], exports: [NimbleRadioControlValueAccessorDirective, NimbleRadioDirective] });
|
|
7462
|
+
NimbleRadioModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioModule, imports: [[common.CommonModule]] });
|
|
7463
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleRadioModule, decorators: [{
|
|
7464
7464
|
type: i0.NgModule,
|
|
7465
7465
|
args: [{
|
|
7466
|
-
declarations: [
|
|
7466
|
+
declarations: [NimbleRadioControlValueAccessorDirective, NimbleRadioDirective],
|
|
7467
7467
|
imports: [common.CommonModule],
|
|
7468
|
-
exports: [
|
|
7468
|
+
exports: [NimbleRadioControlValueAccessorDirective, NimbleRadioDirective]
|
|
7469
7469
|
}]
|
|
7470
7470
|
}] });
|
|
7471
7471
|
|
|
@@ -9218,11 +9218,11 @@
|
|
|
9218
9218
|
exports.NimbleNumberFieldControlValueAccessorDirective = NimbleNumberFieldControlValueAccessorDirective;
|
|
9219
9219
|
exports.NimbleNumberFieldDirective = NimbleNumberFieldDirective;
|
|
9220
9220
|
exports.NimbleNumberFieldModule = NimbleNumberFieldModule;
|
|
9221
|
-
exports.
|
|
9222
|
-
exports.
|
|
9223
|
-
exports.NimbleRadioButtonModule = NimbleRadioButtonModule;
|
|
9221
|
+
exports.NimbleRadioControlValueAccessorDirective = NimbleRadioControlValueAccessorDirective;
|
|
9222
|
+
exports.NimbleRadioDirective = NimbleRadioDirective;
|
|
9224
9223
|
exports.NimbleRadioGroupDirective = NimbleRadioGroupDirective;
|
|
9225
9224
|
exports.NimbleRadioGroupModule = NimbleRadioGroupModule;
|
|
9225
|
+
exports.NimbleRadioModule = NimbleRadioModule;
|
|
9226
9226
|
exports.NimbleSelectControlValueAccessorDirective = NimbleSelectControlValueAccessorDirective;
|
|
9227
9227
|
exports.NimbleSelectDirective = NimbleSelectDirective;
|
|
9228
9228
|
exports.NimbleSelectListOptionDirective = NimbleSelectListOptionDirective;
|