@ni/nimble-angular 9.0.2 → 11.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/README.md +0 -13
- package/bundles/ni-nimble-angular.umd.js +55 -46
- package/bundles/ni-nimble-angular.umd.js.map +1 -1
- package/directives/dialog/nimble-dialog.directive.d.ts +5 -5
- package/directives/drawer/nimble-drawer.directive.d.ts +20 -17
- package/esm2015/directives/dialog/nimble-dialog.directive.js +20 -11
- package/esm2015/directives/drawer/nimble-drawer.directive.js +33 -36
- package/esm2015/directives/list-option/nimble-list-option.module.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/ni-nimble-angular.js +50 -44
- package/fesm2015/ni-nimble-angular.js.map +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +1 -0
package/README.md
CHANGED
|
@@ -115,19 +115,6 @@ The @ni/nimble-angular package is now compiled with Ivy. The consequence of this
|
|
|
115
115
|
|
|
116
116
|
While Nimble Angular will strive to stay current on the most recent version of Angular, there will be some grace period to allow client applications time to make the migration before-hand (which is [required](https://angular.io/guide/creating-libraries#ensuring-library-version-compatibility) in order to use Nimble Angular).
|
|
117
117
|
|
|
118
|
-
## Known Issues
|
|
119
|
-
|
|
120
|
-
Currently the fast-animation library we depend on only exports CommonJS modules, which triggers an Angular project build warning (and potentially suboptimal bundle optimizations).
|
|
121
|
-
|
|
122
|
-
Currently clients consuming the nimble Angular integration may need to make the following change in their `angular.json`, if they wish to suppress that build warning, in the `projects.[projectName].architect.build.options` section:
|
|
123
|
-
```json
|
|
124
|
-
"allowedCommonJsDependencies": [
|
|
125
|
-
"@microsoft/fast-animation"
|
|
126
|
-
]
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
[nimble issue #189](https://github.com/ni/nimble/issues/189) tracks this issue.
|
|
130
|
-
|
|
131
118
|
## Contributing
|
|
132
119
|
|
|
133
120
|
Follow the instructions in [CONTRIBUTING.md](/angular-workspace/projects/ni/nimble-angular/CONTRIBUTING.md) to modify this library.
|
|
@@ -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 () {
|
|
@@ -1225,13 +1240,19 @@
|
|
|
1225
1240
|
}] });
|
|
1226
1241
|
|
|
1227
1242
|
/**
|
|
1228
|
-
* Directive to provide Angular integration for the drawer.
|
|
1243
|
+
* Directive to provide Angular integration for the drawer element.
|
|
1244
|
+
* @description
|
|
1245
|
+
* In order to provide a custom value for the `CloseReason` for the drawer you need to obtain
|
|
1246
|
+
* a `@ViewChild` reference with the custom type specified. For example, to specify the type as `string`:
|
|
1247
|
+
* ```ts
|
|
1248
|
+
* @ViewChild('drawer', { read: NimbleDrawerDirective }) public drawer: NimbleDrawerDirective<string>;
|
|
1249
|
+
* ```
|
|
1229
1250
|
*/
|
|
1251
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
1230
1252
|
var NimbleDrawerDirective = /** @class */ (function () {
|
|
1231
1253
|
function NimbleDrawerDirective(renderer, elementRef) {
|
|
1232
1254
|
this.renderer = renderer;
|
|
1233
1255
|
this.elementRef = elementRef;
|
|
1234
|
-
this.stateChange = new i0.EventEmitter();
|
|
1235
1256
|
}
|
|
1236
1257
|
Object.defineProperty(NimbleDrawerDirective.prototype, "location", {
|
|
1237
1258
|
get: function () {
|
|
@@ -1243,53 +1264,51 @@
|
|
|
1243
1264
|
enumerable: false,
|
|
1244
1265
|
configurable: true
|
|
1245
1266
|
});
|
|
1246
|
-
Object.defineProperty(NimbleDrawerDirective.prototype, "
|
|
1267
|
+
Object.defineProperty(NimbleDrawerDirective.prototype, "preventDismiss", {
|
|
1247
1268
|
get: function () {
|
|
1248
|
-
return this.elementRef.nativeElement.
|
|
1269
|
+
return this.elementRef.nativeElement.preventDismiss;
|
|
1249
1270
|
},
|
|
1271
|
+
// preventDismiss property intentionally maps to the prevent-dismiss attribute
|
|
1272
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1250
1273
|
set: function (value) {
|
|
1251
|
-
this.renderer.setProperty(this.elementRef.nativeElement, '
|
|
1274
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'preventDismiss', toBooleanProperty(value));
|
|
1252
1275
|
},
|
|
1253
1276
|
enumerable: false,
|
|
1254
1277
|
configurable: true
|
|
1255
1278
|
});
|
|
1256
|
-
Object.defineProperty(NimbleDrawerDirective.prototype, "
|
|
1279
|
+
Object.defineProperty(NimbleDrawerDirective.prototype, "ariaLabel", {
|
|
1257
1280
|
get: function () {
|
|
1258
|
-
return this.elementRef.nativeElement.
|
|
1281
|
+
return this.elementRef.nativeElement.ariaLabel;
|
|
1259
1282
|
},
|
|
1283
|
+
// ariaLabel property intentionally maps to the aria-label attribute
|
|
1284
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1260
1285
|
set: function (value) {
|
|
1261
|
-
this.renderer.setProperty(this.elementRef.nativeElement, '
|
|
1286
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'ariaLabel', value);
|
|
1262
1287
|
},
|
|
1263
1288
|
enumerable: false,
|
|
1264
1289
|
configurable: true
|
|
1265
1290
|
});
|
|
1266
|
-
Object.defineProperty(NimbleDrawerDirective.prototype, "
|
|
1291
|
+
Object.defineProperty(NimbleDrawerDirective.prototype, "open", {
|
|
1267
1292
|
get: function () {
|
|
1268
|
-
return this.elementRef.nativeElement.
|
|
1269
|
-
},
|
|
1270
|
-
// preventDismiss property intentionally maps to the prevent-dismiss attribute
|
|
1271
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1272
|
-
set: function (value) {
|
|
1273
|
-
this.renderer.setProperty(this.elementRef.nativeElement, 'preventDismiss', toBooleanProperty(value));
|
|
1293
|
+
return this.elementRef.nativeElement.open;
|
|
1274
1294
|
},
|
|
1275
1295
|
enumerable: false,
|
|
1276
1296
|
configurable: true
|
|
1277
1297
|
});
|
|
1278
1298
|
NimbleDrawerDirective.prototype.show = function () {
|
|
1279
|
-
this
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1299
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1300
|
+
return __generator(this, function (_a) {
|
|
1301
|
+
return [2 /*return*/, this.elementRef.nativeElement.show()];
|
|
1302
|
+
});
|
|
1303
|
+
});
|
|
1283
1304
|
};
|
|
1284
|
-
NimbleDrawerDirective.prototype.
|
|
1285
|
-
|
|
1286
|
-
this.stateChange.emit(this.state);
|
|
1287
|
-
}
|
|
1305
|
+
NimbleDrawerDirective.prototype.close = function (reason) {
|
|
1306
|
+
this.elementRef.nativeElement.close(reason);
|
|
1288
1307
|
};
|
|
1289
1308
|
return NimbleDrawerDirective;
|
|
1290
1309
|
}());
|
|
1291
1310
|
NimbleDrawerDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleDrawerDirective, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1292
|
-
NimbleDrawerDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: NimbleDrawerDirective, selector: "nimble-drawer", inputs: { location: "location",
|
|
1311
|
+
NimbleDrawerDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: NimbleDrawerDirective, selector: "nimble-drawer", inputs: { location: "location", preventDismiss: ["prevent-dismiss", "preventDismiss"], ariaLabel: ["aria-label", "ariaLabel"] }, ngImport: i0__namespace });
|
|
1293
1312
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NimbleDrawerDirective, decorators: [{
|
|
1294
1313
|
type: i0.Directive,
|
|
1295
1314
|
args: [{
|
|
@@ -1297,18 +1316,12 @@
|
|
|
1297
1316
|
}]
|
|
1298
1317
|
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { location: [{
|
|
1299
1318
|
type: i0.Input
|
|
1300
|
-
}], state: [{
|
|
1301
|
-
type: i0.Input
|
|
1302
|
-
}], modal: [{
|
|
1303
|
-
type: i0.Input
|
|
1304
1319
|
}], preventDismiss: [{
|
|
1305
1320
|
type: i0.Input,
|
|
1306
1321
|
args: ['prevent-dismiss']
|
|
1307
|
-
}],
|
|
1308
|
-
type: i0.
|
|
1309
|
-
|
|
1310
|
-
type: i0.HostListener,
|
|
1311
|
-
args: ['state-change', ['$event']]
|
|
1322
|
+
}], ariaLabel: [{
|
|
1323
|
+
type: i0.Input,
|
|
1324
|
+
args: ['aria-label']
|
|
1312
1325
|
}] } });
|
|
1313
1326
|
|
|
1314
1327
|
var NimbleDrawerModule = /** @class */ (function () {
|
|
@@ -8820,18 +8833,14 @@
|
|
|
8820
8833
|
enumerable: true,
|
|
8821
8834
|
get: function () { return types$5.ComboboxAutocomplete; }
|
|
8822
8835
|
});
|
|
8823
|
-
Object.defineProperty(exports, '
|
|
8836
|
+
Object.defineProperty(exports, 'UserDismissed', {
|
|
8824
8837
|
enumerable: true,
|
|
8825
|
-
get: function () { return dialog.
|
|
8838
|
+
get: function () { return dialog.UserDismissed; }
|
|
8826
8839
|
});
|
|
8827
8840
|
Object.defineProperty(exports, 'DrawerLocation', {
|
|
8828
8841
|
enumerable: true,
|
|
8829
8842
|
get: function () { return types$6.DrawerLocation; }
|
|
8830
8843
|
});
|
|
8831
|
-
Object.defineProperty(exports, 'DrawerState', {
|
|
8832
|
-
enumerable: true,
|
|
8833
|
-
get: function () { return types$6.DrawerState; }
|
|
8834
|
-
});
|
|
8835
8844
|
Object.defineProperty(exports, 'NumberFieldAppearance', {
|
|
8836
8845
|
enumerable: true,
|
|
8837
8846
|
get: function () { return types$7.NumberFieldAppearance; }
|