@ni/nimble-angular 1.0.0-beta.13 → 1.0.0-beta.130
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 +46 -20
- package/bundles/ni-nimble-angular.umd.js +1320 -0
- package/bundles/ni-nimble-angular.umd.js.map +1 -0
- package/directives/button/nimble-button.directive.d.ts +15 -0
- package/directives/button/nimble-button.module.d.ts +3 -0
- package/directives/button/nimble-button.module.ngfactory.d.ts +3 -0
- package/directives/checkbox/nimble-checkbox-control-value-accessor.directive.d.ts +9 -0
- package/directives/checkbox/nimble-checkbox.directive.d.ts +5 -0
- package/directives/checkbox/nimble-checkbox.module.d.ts +3 -0
- package/directives/checkbox/nimble-checkbox.module.ngfactory.d.ts +3 -0
- package/directives/drawer/nimble-drawer.directive.d.ts +23 -0
- package/directives/drawer/nimble-drawer.module.d.ts +3 -0
- package/directives/drawer/nimble-drawer.module.ngfactory.d.ts +3 -0
- package/directives/listbox-option/nimble-listbox-option.directive.d.ts +14 -0
- package/directives/listbox-option/nimble-listbox-option.module.d.ts +3 -0
- package/directives/listbox-option/nimble-listbox-option.module.ngfactory.d.ts +3 -0
- package/directives/menu/nimble-menu.directive.d.ts +5 -0
- package/directives/menu/nimble-menu.module.d.ts +3 -0
- package/directives/menu/nimble-menu.module.ngfactory.d.ts +3 -0
- package/directives/menu-item/nimble-menu-item.directive.d.ts +12 -0
- package/directives/menu-item/nimble-menu-item.module.d.ts +3 -0
- package/directives/menu-item/nimble-menu-item.module.ngfactory.d.ts +3 -0
- package/directives/number-field/nimble-number-field-control-value-accessor.directive.d.ts +9 -0
- package/directives/number-field/nimble-number-field.directive.d.ts +20 -0
- package/directives/number-field/nimble-number-field.module.d.ts +3 -0
- package/directives/number-field/nimble-number-field.module.ngfactory.d.ts +3 -0
- package/directives/select/nimble-select-control-value-accessor.directive.d.ts +11 -0
- package/directives/select/nimble-select.directive.d.ts +5 -0
- package/directives/select/nimble-select.module.d.ts +3 -0
- package/directives/select/nimble-select.module.ngfactory.d.ts +3 -0
- package/directives/tab/nimble-tab.directive.d.ts +12 -0
- package/directives/tab/nimble-tab.module.d.ts +3 -0
- package/directives/tab/nimble-tab.module.ngfactory.d.ts +3 -0
- package/directives/tab-panel/nimble-tab-panel.directive.d.ts +5 -0
- package/directives/tab-panel/nimble-tab-panel.module.d.ts +3 -0
- package/directives/tab-panel/nimble-tab-panel.module.ngfactory.d.ts +3 -0
- package/directives/tabs/nimble-tabs.directive.d.ts +14 -0
- package/directives/tabs/nimble-tabs.module.d.ts +3 -0
- package/directives/tabs/nimble-tabs.module.ngfactory.d.ts +3 -0
- package/directives/tabs-toolbar/nimble-tabs-toolbar.directive.d.ts +5 -0
- package/directives/tabs-toolbar/nimble-tabs-toolbar.module.d.ts +3 -0
- package/directives/tabs-toolbar/nimble-tabs-toolbar.module.ngfactory.d.ts +3 -0
- package/directives/text-field/nimble-text-field-control-value-accessor.directive.d.ts +9 -0
- package/directives/text-field/nimble-text-field.directive.d.ts +12 -0
- package/directives/text-field/nimble-text-field.module.d.ts +3 -0
- package/directives/text-field/nimble-text-field.module.ngfactory.d.ts +3 -0
- package/directives/theme-provider/nimble-theme-provider.directive.d.ts +14 -0
- package/directives/theme-provider/nimble-theme-provider.module.d.ts +3 -0
- package/directives/theme-provider/nimble-theme-provider.module.ngfactory.d.ts +3 -0
- package/directives/tree-item/nimble-tree-item.directive.d.ts +19 -0
- package/directives/tree-item/nimble-tree-item.module.d.ts +3 -0
- package/directives/tree-item/nimble-tree-item.module.ngfactory.d.ts +3 -0
- package/directives/tree-view/nimble-tree-view.directive.d.ts +15 -0
- package/directives/tree-view/nimble-tree-view.module.d.ts +3 -0
- package/directives/tree-view/nimble-tree-view.module.ngfactory.d.ts +3 -0
- package/directives/utilities/template-value-helpers.d.ts +18 -0
- package/esm2015/directives/button/nimble-button.directive.js +37 -0
- package/esm2015/directives/button/nimble-button.directive.ngsummary.json +1 -0
- package/esm2015/directives/button/nimble-button.module.js +14 -0
- package/esm2015/directives/button/nimble-button.module.ngfactory.js +12 -0
- package/esm2015/directives/button/nimble-button.module.ngsummary.json +1 -0
- package/esm2015/directives/checkbox/nimble-checkbox-control-value-accessor.directive.js +24 -0
- package/esm2015/directives/checkbox/nimble-checkbox-control-value-accessor.directive.ngsummary.json +1 -0
- package/esm2015/directives/checkbox/nimble-checkbox.directive.js +12 -0
- package/esm2015/directives/checkbox/nimble-checkbox.directive.ngsummary.json +1 -0
- package/esm2015/directives/checkbox/nimble-checkbox.module.js +15 -0
- package/esm2015/directives/checkbox/nimble-checkbox.module.ngfactory.js +12 -0
- package/esm2015/directives/checkbox/nimble-checkbox.module.ngsummary.json +1 -0
- package/esm2015/directives/drawer/nimble-drawer.directive.js +61 -0
- package/esm2015/directives/drawer/nimble-drawer.directive.ngsummary.json +1 -0
- package/esm2015/directives/drawer/nimble-drawer.module.js +14 -0
- package/esm2015/directives/drawer/nimble-drawer.module.ngfactory.js +12 -0
- package/esm2015/directives/drawer/nimble-drawer.module.ngsummary.json +1 -0
- package/esm2015/directives/listbox-option/nimble-listbox-option.directive.js +34 -0
- package/esm2015/directives/listbox-option/nimble-listbox-option.directive.ngsummary.json +1 -0
- package/esm2015/directives/listbox-option/nimble-listbox-option.module.js +14 -0
- package/esm2015/directives/listbox-option/nimble-listbox-option.module.ngfactory.js +12 -0
- package/esm2015/directives/listbox-option/nimble-listbox-option.module.ngsummary.json +1 -0
- package/esm2015/directives/menu/nimble-menu.directive.js +12 -0
- package/esm2015/directives/menu/nimble-menu.directive.ngsummary.json +1 -0
- package/esm2015/directives/menu/nimble-menu.module.js +14 -0
- package/esm2015/directives/menu/nimble-menu.module.ngfactory.js +12 -0
- package/esm2015/directives/menu/nimble-menu.module.ngsummary.json +1 -0
- package/esm2015/directives/menu-item/nimble-menu-item.directive.js +30 -0
- package/esm2015/directives/menu-item/nimble-menu-item.directive.ngsummary.json +1 -0
- package/esm2015/directives/menu-item/nimble-menu-item.module.js +14 -0
- package/esm2015/directives/menu-item/nimble-menu-item.module.ngfactory.js +12 -0
- package/esm2015/directives/menu-item/nimble-menu-item.module.ngsummary.json +1 -0
- package/esm2015/directives/number-field/nimble-number-field-control-value-accessor.directive.js +24 -0
- package/esm2015/directives/number-field/nimble-number-field-control-value-accessor.directive.ngsummary.json +1 -0
- package/esm2015/directives/number-field/nimble-number-field.directive.js +58 -0
- package/esm2015/directives/number-field/nimble-number-field.directive.ngsummary.json +1 -0
- package/esm2015/directives/number-field/nimble-number-field.module.js +15 -0
- package/esm2015/directives/number-field/nimble-number-field.module.ngfactory.js +12 -0
- package/esm2015/directives/number-field/nimble-number-field.module.ngsummary.json +1 -0
- package/esm2015/directives/select/nimble-select-control-value-accessor.directive.js +26 -0
- package/esm2015/directives/select/nimble-select-control-value-accessor.directive.ngsummary.json +1 -0
- package/esm2015/directives/select/nimble-select.directive.js +12 -0
- package/esm2015/directives/select/nimble-select.directive.ngsummary.json +1 -0
- package/esm2015/directives/select/nimble-select.module.js +15 -0
- package/esm2015/directives/select/nimble-select.module.ngfactory.js +12 -0
- package/esm2015/directives/select/nimble-select.module.ngsummary.json +1 -0
- package/esm2015/directives/tab/nimble-tab.directive.js +30 -0
- package/esm2015/directives/tab/nimble-tab.directive.ngsummary.json +1 -0
- package/esm2015/directives/tab/nimble-tab.module.js +14 -0
- package/esm2015/directives/tab/nimble-tab.module.ngfactory.js +12 -0
- package/esm2015/directives/tab/nimble-tab.module.ngsummary.json +1 -0
- package/esm2015/directives/tab-panel/nimble-tab-panel.directive.js +12 -0
- package/esm2015/directives/tab-panel/nimble-tab-panel.directive.ngsummary.json +1 -0
- package/esm2015/directives/tab-panel/nimble-tab-panel.module.js +14 -0
- package/esm2015/directives/tab-panel/nimble-tab-panel.module.ngfactory.js +12 -0
- package/esm2015/directives/tab-panel/nimble-tab-panel.module.ngsummary.json +1 -0
- package/esm2015/directives/tabs/nimble-tabs.directive.js +37 -0
- package/esm2015/directives/tabs/nimble-tabs.directive.ngsummary.json +1 -0
- package/esm2015/directives/tabs/nimble-tabs.module.js +14 -0
- package/esm2015/directives/tabs/nimble-tabs.module.ngfactory.js +12 -0
- package/esm2015/directives/tabs/nimble-tabs.module.ngsummary.json +1 -0
- package/esm2015/directives/tabs-toolbar/nimble-tabs-toolbar.directive.js +12 -0
- package/esm2015/directives/tabs-toolbar/nimble-tabs-toolbar.directive.ngsummary.json +1 -0
- package/esm2015/directives/tabs-toolbar/nimble-tabs-toolbar.module.js +14 -0
- package/esm2015/directives/tabs-toolbar/nimble-tabs-toolbar.module.ngfactory.js +12 -0
- package/esm2015/directives/tabs-toolbar/nimble-tabs-toolbar.module.ngsummary.json +1 -0
- package/esm2015/directives/text-field/nimble-text-field-control-value-accessor.directive.js +29 -0
- package/esm2015/directives/text-field/nimble-text-field-control-value-accessor.directive.ngsummary.json +1 -0
- package/esm2015/directives/text-field/nimble-text-field.directive.js +30 -0
- package/esm2015/directives/text-field/nimble-text-field.directive.ngsummary.json +1 -0
- package/esm2015/directives/text-field/nimble-text-field.module.js +15 -0
- package/esm2015/directives/text-field/nimble-text-field.module.ngfactory.js +12 -0
- package/esm2015/directives/text-field/nimble-text-field.module.ngsummary.json +1 -0
- package/esm2015/directives/theme-provider/nimble-theme-provider.directive.js +31 -0
- package/esm2015/directives/theme-provider/nimble-theme-provider.directive.ngsummary.json +1 -0
- package/esm2015/directives/theme-provider/nimble-theme-provider.module.js +14 -0
- package/esm2015/directives/theme-provider/nimble-theme-provider.module.ngfactory.js +12 -0
- package/esm2015/directives/theme-provider/nimble-theme-provider.module.ngsummary.json +1 -0
- package/esm2015/directives/tree-item/nimble-tree-item.directive.js +55 -0
- package/esm2015/directives/tree-item/nimble-tree-item.directive.ngsummary.json +1 -0
- package/esm2015/directives/tree-item/nimble-tree-item.module.js +14 -0
- package/esm2015/directives/tree-item/nimble-tree-item.module.ngfactory.js +12 -0
- package/esm2015/directives/tree-item/nimble-tree-item.module.ngsummary.json +1 -0
- package/esm2015/directives/tree-view/nimble-tree-view.directive.js +32 -0
- package/esm2015/directives/tree-view/nimble-tree-view.directive.ngsummary.json +1 -0
- package/esm2015/directives/tree-view/nimble-tree-view.module.js +14 -0
- package/esm2015/directives/tree-view/nimble-tree-view.module.ngfactory.js +12 -0
- package/esm2015/directives/tree-view/nimble-tree-view.module.ngsummary.json +1 -0
- package/esm2015/directives/utilities/template-value-helpers.js +32 -0
- package/esm2015/directives/utilities/template-value-helpers.ngsummary.json +1 -0
- package/esm2015/ni-nimble-angular.js +5 -0
- package/esm2015/ni-nimble-angular.ngsummary.json +1 -0
- package/esm2015/public-api.js +40 -0
- package/esm2015/public-api.ngsummary.json +1 -0
- package/fesm2015/ni-nimble-angular.js +781 -0
- package/fesm2015/ni-nimble-angular.js.map +1 -0
- package/ni-nimble-angular.d.ts +4 -0
- package/ni-nimble-angular.metadata.json +1 -0
- package/package.json +11 -18
- package/public-api.d.ts +36 -0
- package/.eslintrc.js +0 -38
- package/karma.conf.js +0 -46
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<p
|
|
2
|
+
<p><b>ni | nimble | angular</b></p>
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
# Nimble Angular
|
|
@@ -8,37 +8,63 @@
|
|
|
8
8
|
|
|
9
9
|
NI-styled UI components for Angular applications
|
|
10
10
|
|
|
11
|
-
## Getting
|
|
11
|
+
## Getting started
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
*This guide assumes you have an existing Angular application and are using NPM 7 or greater.*
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
1. Install Nimble Angular from the [public NPM registry](https://www.npmjs.com/package/@ni/nimble-angular) by running `npm install @ni/nimble-angular`.
|
|
16
|
+
2. The steps to use components from Nimble Angular are similar to using components from any other Angular library. You can see the [Example Client App](/angular-workspace/projects/example-client-app) project for an example.
|
|
17
|
+
1. Update your `app.module.ts` to import the module for each component you want to use:
|
|
18
|
+
```ts
|
|
19
|
+
import { NimbleDrawerModule } from '@ni/nimble-angular';
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
@NgModule ({
|
|
22
|
+
imports: [
|
|
23
|
+
NimbleDrawerModule,
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
class AppModule {}
|
|
27
|
+
```
|
|
28
|
+
2. Add the component to your `app.component.html` (or to the template for another component in your application):
|
|
29
|
+
```html
|
|
30
|
+
<nimble-drawer #drawerReference [location]="location">This is a drawer</nimble-drawer>
|
|
31
|
+
```
|
|
32
|
+
3. If needed, import the Nimble component's directive and types in `app.component.ts` (or the TypeScript file backing another component) to use its programmatic API:
|
|
33
|
+
```ts
|
|
34
|
+
import { DrawerLocation, NimbleDrawerDirective } from '@ni/nimble-angular';
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
@Component({ /* ... */ })
|
|
37
|
+
class AppComponent {
|
|
38
|
+
@Input() public location: DrawerLocation = DrawerLocation.Right;
|
|
39
|
+
@ViewChild('drawerReference', { read: NimbleDrawerDirective }) public drawer: NimbleDrawerDirective;
|
|
21
40
|
|
|
22
|
-
|
|
41
|
+
public openDrawer() {
|
|
42
|
+
this.drawer.show();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
23
46
|
|
|
24
|
-
|
|
47
|
+
### Learn more
|
|
25
48
|
|
|
26
|
-
|
|
27
|
-
> Note: Don't forget to add `--project nimble-angular` or else it will be added to the default project in your `angular.json` file.
|
|
49
|
+
See the [README.md for the ni/nimble repository](/README.md) for documentation of individual components.
|
|
28
50
|
|
|
29
|
-
|
|
51
|
+
### Using Nimble form controls
|
|
30
52
|
|
|
31
|
-
|
|
53
|
+
For best results, always use `ngModel`, `formControl`, or `formControlName` bindings when integrating Nimble form controls in Angular. Binding to the control's native value property or event (e.g. `[value]` or `(change)`) is not supported, and can cause build failures and other issues. If a value change event is necessary, use `ngModel (ngModelChange)="onChange()"`.
|
|
32
54
|
|
|
33
|
-
##
|
|
55
|
+
## Known Issues
|
|
34
56
|
|
|
35
|
-
|
|
57
|
+
Currently the fast-animation library we depend on only exports CommonJS modules, which triggers an Angular project build warning (and potentially suboptimal bundle optimizations).
|
|
36
58
|
|
|
37
|
-
|
|
59
|
+
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:
|
|
60
|
+
```json
|
|
61
|
+
"allowedCommonJsDependencies": [
|
|
62
|
+
"@microsoft/fast-animation"
|
|
63
|
+
]
|
|
64
|
+
```
|
|
38
65
|
|
|
39
|
-
|
|
66
|
+
[nimble issue #189](https://github.com/ni/nimble/issues/189) tracks this issue.
|
|
40
67
|
|
|
41
|
-
##
|
|
68
|
+
## Contributing
|
|
42
69
|
|
|
43
|
-
|
|
44
|
-
-->
|
|
70
|
+
Follow the instructions in [CONTRIBUTING.md](/angular-workspace/projects/ni/nimble-angular/CONTRIBUTING.md) to modify this library.
|