@ni/nimble-angular 10.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 +61 -46
- package/bundles/ni-nimble-angular.umd.js.map +1 -1
- package/directives/dialog/nimble-dialog.directive.d.ts +5 -3
- 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/dialog/nimble-dialog.directive.js +20 -9
- 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 +44 -33
- 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
|
@@ -1157,14 +1157,26 @@
|
|
|
1157
1157
|
enumerable: false,
|
|
1158
1158
|
configurable: true
|
|
1159
1159
|
});
|
|
1160
|
-
Object.defineProperty(NimbleDialogDirective.prototype, "
|
|
1160
|
+
Object.defineProperty(NimbleDialogDirective.prototype, "headerHidden", {
|
|
1161
1161
|
get: function () {
|
|
1162
|
-
return this.elementRef.nativeElement.
|
|
1162
|
+
return this.elementRef.nativeElement.headerHidden;
|
|
1163
1163
|
},
|
|
1164
|
-
//
|
|
1164
|
+
// Renaming because property should have camel casing, but attribute should not
|
|
1165
1165
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1166
1166
|
set: function (value) {
|
|
1167
|
-
this.renderer.setProperty(this.elementRef.nativeElement, '
|
|
1167
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'headerHidden', toBooleanProperty(value));
|
|
1168
|
+
},
|
|
1169
|
+
enumerable: false,
|
|
1170
|
+
configurable: true
|
|
1171
|
+
});
|
|
1172
|
+
Object.defineProperty(NimbleDialogDirective.prototype, "footerHidden", {
|
|
1173
|
+
get: function () {
|
|
1174
|
+
return this.elementRef.nativeElement.footerHidden;
|
|
1175
|
+
},
|
|
1176
|
+
// Renaming because property should have camel casing, but attribute should not
|
|
1177
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1178
|
+
set: function (value) {
|
|
1179
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'footerHidden', toBooleanProperty(value));
|
|
1168
1180
|
},
|
|
1169
1181
|
enumerable: false,
|
|
1170
1182
|
configurable: true
|
|
@@ -1189,7 +1201,7 @@
|
|
|
1189
1201
|
return NimbleDialogDirective;
|
|
1190
1202
|
}());
|
|
1191
1203
|
NimbleDialogDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleDialogDirective, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1192
|
-
NimbleDialogDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: NimbleDialogDirective, selector: "nimble-dialog", inputs: { preventDismiss: ["prevent-dismiss", "preventDismiss"],
|
|
1204
|
+
NimbleDialogDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: NimbleDialogDirective, selector: "nimble-dialog", inputs: { preventDismiss: ["prevent-dismiss", "preventDismiss"], headerHidden: ["header-hidden", "headerHidden"], footerHidden: ["footer-hidden", "footerHidden"] }, ngImport: i0__namespace });
|
|
1193
1205
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleDialogDirective, decorators: [{
|
|
1194
1206
|
type: i0.Directive,
|
|
1195
1207
|
args: [{
|
|
@@ -1198,9 +1210,12 @@
|
|
|
1198
1210
|
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { preventDismiss: [{
|
|
1199
1211
|
type: i0.Input,
|
|
1200
1212
|
args: ['prevent-dismiss']
|
|
1201
|
-
}],
|
|
1213
|
+
}], headerHidden: [{
|
|
1202
1214
|
type: i0.Input,
|
|
1203
|
-
args: ['
|
|
1215
|
+
args: ['header-hidden']
|
|
1216
|
+
}], footerHidden: [{
|
|
1217
|
+
type: i0.Input,
|
|
1218
|
+
args: ['footer-hidden']
|
|
1204
1219
|
}] } });
|
|
1205
1220
|
|
|
1206
1221
|
var NimbleDialogModule = /** @class */ (function () {
|
|
@@ -7326,30 +7341,30 @@
|
|
|
7326
7341
|
/**
|
|
7327
7342
|
* Control Value Accessor implementation for the radio group.
|
|
7328
7343
|
*/
|
|
7329
|
-
var
|
|
7330
|
-
__extends(
|
|
7344
|
+
var NimbleRadioControlValueAccessorDirective = /** @class */ (function (_super) {
|
|
7345
|
+
__extends(NimbleRadioControlValueAccessorDirective, _super);
|
|
7331
7346
|
// Type ɵangular_packages_forms_forms_r from base class isn't in camelcase
|
|
7332
7347
|
// eslint-disable-next-line camelcase
|
|
7333
|
-
function
|
|
7348
|
+
function NimbleRadioControlValueAccessorDirective(renderer, elementRef, _registry, _injector) {
|
|
7334
7349
|
var _this = _super.call(this, renderer, elementRef, _registry, _injector) || this;
|
|
7335
7350
|
_this.elementRef = elementRef;
|
|
7336
7351
|
return _this;
|
|
7337
7352
|
}
|
|
7338
|
-
|
|
7339
|
-
var id =
|
|
7340
|
-
|
|
7353
|
+
NimbleRadioControlValueAccessorDirective.allocateId = function () {
|
|
7354
|
+
var id = NimbleRadioControlValueAccessorDirective._nextOpenId.toString();
|
|
7355
|
+
NimbleRadioControlValueAccessorDirective._nextOpenId += 1;
|
|
7341
7356
|
return id;
|
|
7342
7357
|
};
|
|
7343
|
-
|
|
7358
|
+
NimbleRadioControlValueAccessorDirective.prototype.ngOnInit = function () {
|
|
7344
7359
|
// We need each button element to have a unique string value, because the FAST radio group looks at
|
|
7345
7360
|
// these values when trying to manage the checked state.
|
|
7346
|
-
this.elementRef.nativeElement.value =
|
|
7361
|
+
this.elementRef.nativeElement.value = NimbleRadioControlValueAccessorDirective.allocateId();
|
|
7347
7362
|
};
|
|
7348
7363
|
/**
|
|
7349
7364
|
* Sets the "checked" property value on the radio input element.
|
|
7350
7365
|
* @nodoc
|
|
7351
7366
|
*/
|
|
7352
|
-
|
|
7367
|
+
NimbleRadioControlValueAccessorDirective.prototype.writeValue = function (value) {
|
|
7353
7368
|
_super.prototype.writeValue.call(this, value);
|
|
7354
7369
|
var parentGroup = this.elementRef.nativeElement.parentElement;
|
|
7355
7370
|
if (this.value === value && parentGroup && parentGroup instanceof radioGroup.RadioGroup) {
|
|
@@ -7372,35 +7387,35 @@
|
|
|
7372
7387
|
// To work around this, we effectively disable the base class's onChange handler and replace it with
|
|
7373
7388
|
// our own nimbleOnChange. NimbleOnChange calls the original onChange (now cached as _privateOnChange)
|
|
7374
7389
|
// only if the changed item became checked.
|
|
7375
|
-
|
|
7390
|
+
NimbleRadioControlValueAccessorDirective.prototype.nimbleOnChange = function (checked) {
|
|
7376
7391
|
if (checked && this._privateOnChange) {
|
|
7377
7392
|
this._privateOnChange();
|
|
7378
7393
|
}
|
|
7379
7394
|
};
|
|
7380
|
-
|
|
7395
|
+
NimbleRadioControlValueAccessorDirective.prototype.registerOnChange = function (fn) {
|
|
7381
7396
|
_super.prototype.registerOnChange.call(this, fn);
|
|
7382
7397
|
this._privateOnChange = this.onChange;
|
|
7383
7398
|
this.onChange = function () { };
|
|
7384
7399
|
};
|
|
7385
|
-
return
|
|
7400
|
+
return NimbleRadioControlValueAccessorDirective;
|
|
7386
7401
|
}(i1.RadioControlValueAccessor));
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
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: [{
|
|
7390
7405
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7391
|
-
useExisting: i0.forwardRef(function () { return
|
|
7406
|
+
useExisting: i0.forwardRef(function () { return NimbleRadioControlValueAccessorDirective; }),
|
|
7392
7407
|
multi: true
|
|
7393
7408
|
}], usesInheritance: true, ngImport: i0__namespace });
|
|
7394
|
-
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: [{
|
|
7395
7410
|
type: i0.Directive,
|
|
7396
7411
|
args: [{
|
|
7397
|
-
selector: 'nimble-radio
|
|
7412
|
+
selector: 'nimble-radio[formControlName],nimble-radio[formControl],nimble-radio[ngModel]',
|
|
7398
7413
|
// The following host metadata is duplicated from RadioControlValueAccessor
|
|
7399
7414
|
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
|
7400
7415
|
host: { '(change)': 'nimbleOnChange($event.target.checked)', '(blur)': 'onTouched()' },
|
|
7401
7416
|
providers: [{
|
|
7402
7417
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7403
|
-
useExisting: i0.forwardRef(function () { return
|
|
7418
|
+
useExisting: i0.forwardRef(function () { return NimbleRadioControlValueAccessorDirective; }),
|
|
7404
7419
|
multi: true
|
|
7405
7420
|
}]
|
|
7406
7421
|
}]
|
|
@@ -7409,12 +7424,12 @@
|
|
|
7409
7424
|
/**
|
|
7410
7425
|
* Directive to provide Angular integration for the radio button.
|
|
7411
7426
|
*/
|
|
7412
|
-
var
|
|
7413
|
-
function
|
|
7427
|
+
var NimbleRadioDirective = /** @class */ (function () {
|
|
7428
|
+
function NimbleRadioDirective(renderer, elementRef) {
|
|
7414
7429
|
this.renderer = renderer;
|
|
7415
7430
|
this.elementRef = elementRef;
|
|
7416
7431
|
}
|
|
7417
|
-
Object.defineProperty(
|
|
7432
|
+
Object.defineProperty(NimbleRadioDirective.prototype, "disabled", {
|
|
7418
7433
|
get: function () {
|
|
7419
7434
|
return this.elementRef.nativeElement.disabled;
|
|
7420
7435
|
},
|
|
@@ -7424,33 +7439,33 @@
|
|
|
7424
7439
|
enumerable: false,
|
|
7425
7440
|
configurable: true
|
|
7426
7441
|
});
|
|
7427
|
-
return
|
|
7442
|
+
return NimbleRadioDirective;
|
|
7428
7443
|
}());
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
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: [{
|
|
7432
7447
|
type: i0.Directive,
|
|
7433
7448
|
args: [{
|
|
7434
|
-
selector: 'nimble-radio
|
|
7449
|
+
selector: 'nimble-radio'
|
|
7435
7450
|
}]
|
|
7436
7451
|
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { disabled: [{
|
|
7437
7452
|
type: i0.Input
|
|
7438
7453
|
}] } });
|
|
7439
7454
|
|
|
7440
|
-
var
|
|
7441
|
-
function
|
|
7455
|
+
var NimbleRadioModule = /** @class */ (function () {
|
|
7456
|
+
function NimbleRadioModule() {
|
|
7442
7457
|
}
|
|
7443
|
-
return
|
|
7458
|
+
return NimbleRadioModule;
|
|
7444
7459
|
}());
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
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: [{
|
|
7449
7464
|
type: i0.NgModule,
|
|
7450
7465
|
args: [{
|
|
7451
|
-
declarations: [
|
|
7466
|
+
declarations: [NimbleRadioControlValueAccessorDirective, NimbleRadioDirective],
|
|
7452
7467
|
imports: [common.CommonModule],
|
|
7453
|
-
exports: [
|
|
7468
|
+
exports: [NimbleRadioControlValueAccessorDirective, NimbleRadioDirective]
|
|
7454
7469
|
}]
|
|
7455
7470
|
}] });
|
|
7456
7471
|
|
|
@@ -9203,11 +9218,11 @@
|
|
|
9203
9218
|
exports.NimbleNumberFieldControlValueAccessorDirective = NimbleNumberFieldControlValueAccessorDirective;
|
|
9204
9219
|
exports.NimbleNumberFieldDirective = NimbleNumberFieldDirective;
|
|
9205
9220
|
exports.NimbleNumberFieldModule = NimbleNumberFieldModule;
|
|
9206
|
-
exports.
|
|
9207
|
-
exports.
|
|
9208
|
-
exports.NimbleRadioButtonModule = NimbleRadioButtonModule;
|
|
9221
|
+
exports.NimbleRadioControlValueAccessorDirective = NimbleRadioControlValueAccessorDirective;
|
|
9222
|
+
exports.NimbleRadioDirective = NimbleRadioDirective;
|
|
9209
9223
|
exports.NimbleRadioGroupDirective = NimbleRadioGroupDirective;
|
|
9210
9224
|
exports.NimbleRadioGroupModule = NimbleRadioGroupModule;
|
|
9225
|
+
exports.NimbleRadioModule = NimbleRadioModule;
|
|
9211
9226
|
exports.NimbleSelectControlValueAccessorDirective = NimbleSelectControlValueAccessorDirective;
|
|
9212
9227
|
exports.NimbleSelectDirective = NimbleSelectDirective;
|
|
9213
9228
|
exports.NimbleSelectListOptionDirective = NimbleSelectListOptionDirective;
|