diff --git a/docs/articles/.gitkeep b/docs/articles/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/articles/auth/custom-ui.md b/docs/articles/auth/custom-ui.md index d37393e0bd..1999a000be 100644 --- a/docs/articles/auth/custom-ui.md +++ b/docs/articles/auth/custom-ui.md @@ -25,7 +25,7 @@ you configured routes to the out of the box auth components.
Note
- In case your setup is based on the ngx-admin your configuration is a bit different - the Strategy is configured under `core.module`, which providers are imported into the `app.module`. This should be the only difference for this setup. + In case your setup is based on the ngx-admin your configuration is a bit different - the Strategy is configured under core.module, which providers are imported into the app.module. This should be the only difference for this setup.

@@ -77,7 +77,6 @@ import { }) export class NgxAuthModule { } - ``` A couple of required modules for future components. Also, notice how we imported the `NbAuthModule` but without the `forRoot` call. @@ -256,7 +255,7 @@ Unfortunately, the library isn't distributed with the sources, so we need to cop
Note
- Make sure are you copying sources from the same Nebular version as you have locally, and not from the `master` branch. + Make sure are you copying sources from the same Nebular version as you have locally, and not from the master branch.
diff --git a/docs/articles/auth/firebase-authentication.md b/docs/articles/auth/firebase-authentication.md index 03f48219c2..b7f2588580 100644 --- a/docs/articles/auth/firebase-authentication.md +++ b/docs/articles/auth/firebase-authentication.md @@ -14,7 +14,7 @@ The package provides the following strategies:
Note
- The package connects firebase auth with nebular/auth so you need `firebase` and `@angular/fire` installed + The package connects firebase auth with nebular/auth so you need firebase and @angular/fire installed and configured for your application. For more instructions please see [@angular/fire docs](https://github.com/angular/angularfire). Also make sure you import AngularFireAuthModule.
@@ -23,9 +23,9 @@ The package provides the following strategies: Install Nebular Auth and Nebular Firebase Auth. - ```sh - npm i @nebular/auth @nebular/firebase-auth - ``` +```sh +npm i @nebular/auth @nebular/firebase-auth +``` Import the NbAuthModule with some firebase strategies, in that example we use NbFirebasePasswordStrategy. diff --git a/docs/articles/auth/install.md b/docs/articles/auth/install.md index 5df5122107..705247c3ff 100644 --- a/docs/articles/auth/install.md +++ b/docs/articles/auth/install.md @@ -3,7 +3,7 @@
Note
- If you use our [ngx-admin starter kit](docs/guides/install-based-on-starter-kit) then you already have the Auth module in place. + If you use our ngx-admin starter kit then you already have the Auth module in place.
diff --git a/docs/articles/auth/oauth2.md b/docs/articles/auth/oauth2.md index e9421764b6..d7cb965970 100644 --- a/docs/articles/auth/oauth2.md +++ b/docs/articles/auth/oauth2.md @@ -43,8 +43,8 @@ We also assigned a `name` - `google`. Later on, we will use this alias to call t ## Step 3. Configure -Let's fill in our strategy with some settings. We add the `client_id` obtained in Step 1. We don't need client_secret for this authentication flow, so we leave it empty. -Then we set `authorize` endpoint, response_type (which is `token` in our case) and [scope](https://tools.ietf.org/html/rfc6749#section-3.3) of the authentication: +Let's fill in our strategy with some settings. We add the `client_id` obtained in Step 1. We don't need `client_secret` for this authentication flow, so we leave it empty. +Then we set `authorize` endpoint, `response_type` (which is `token` in our case) and [scope](https://tools.ietf.org/html/rfc6749#section-3.3) of the authentication: ```ts @NgModule({ diff --git a/docs/articles/auth/strategy.md b/docs/articles/auth/strategy.md index b5c6efa01e..6b34204260 100644 --- a/docs/articles/auth/strategy.md +++ b/docs/articles/auth/strategy.md @@ -69,7 +69,7 @@ Now, let's add API endpoints. According to the [NbPasswordAuthStrategy documenta }); ``` -Let's assume that our API is localed on a separate server `http://example.com/app-api/v1` and change the `baseEndpoint` accordingly: +Let's assume that our API is located on a separate server `http://example.com/app-api/v1` and change the `baseEndpoint` accordingly: ```typescript { diff --git a/docs/articles/auth/token.md b/docs/articles/auth/token.md index 2efc9d8ff3..8f40ea0076 100644 --- a/docs/articles/auth/token.md +++ b/docs/articles/auth/token.md @@ -18,23 +18,22 @@ Let's tell Nebular that we are waiting for a JWT token instead of a simple strin We just need to provide a respective class to do that. Open your `app.module.ts` and adjust your `Strategy` configuration: ```typescript - @NgModule({ imports: [ - // ... - - NbAuthModule.forRoot({ - strategies: [ - NbPasswordAuthStrategy.setup({ - name: 'email', - - token: { - class: NbAuthJWTToken, - } - }), - ], - forms: {}, - }), + // ... + + NbAuthModule.forRoot({ + strategies: [ + NbPasswordAuthStrategy.setup({ + name: 'email', + + token: { + class: NbAuthJWTToken, + } + }), + ], + forms: {}, + }), ], }); @@ -58,25 +57,24 @@ By default `NbPasswordAuthStrategy` expects that your token is located under the We'll assume that our API returns a token as just `{ token: 'some-jwt-token' }` not wrapping your response in `data` property, let's tell that to Nebular: ```typescript - @NgModule({ imports: [ - // ... - - NbAuthModule.forRoot({ - strategies: [ - NbPasswordAuthStrategy.setup({ - name: 'email', - - token: { - class: NbAuthJWTToken, - - key: 'token', // this parameter tells where to look for the token - } - }), - ], - forms: {}, - }), + // ... + + NbAuthModule.forRoot({ + strategies: [ + NbPasswordAuthStrategy.setup({ + name: 'email', + + token: { + class: NbAuthJWTToken, + + key: 'token', // this parameter tells where to look for the token + } + }), + ], + forms: {}, + }), ], }); @@ -94,7 +92,6 @@ import { NbAuthJWTToken, NbAuthService } from '@nebular/auth'; Then, let's create a `user` variable, which will store the token payload inside of the component: ```typescript - @Component({ ... }) @@ -110,7 +107,6 @@ Then, let's inject the `NbAuthService` and subscribe to an `onTokenChange` metho is up-to-date with the information received from the backend and there is no need to additionally refresh/request the data: ```typescript - @Component({ ... }) @@ -135,12 +131,9 @@ export class HeaderComponent { Lastly, let's grab a `user` variable and put it in the template to show the user info. The `nb-user` component is a great fit for this: - ```typescript - @Component({ template: ` - diff --git a/docs/articles/auth/ui.md b/docs/articles/auth/ui.md index 8d287882b3..a6f69a79ed 100644 --- a/docs/articles/auth/ui.md +++ b/docs/articles/auth/ui.md @@ -15,7 +15,6 @@ Auth module comes with a list of authentication components: Alongside with the strategies' configuration `AuthModule` also accepts a list of settings for UI side under the `forms` key: ```typescript - @NgModule({ imports: [ // ... @@ -36,7 +35,6 @@ Alongside with the strategies' configuration `AuthModule` also accepts a list of You can configure each specific form separately, here're the default values: ```typescript - export interface NbAuthSocialLink { link?: string, url?: string, @@ -116,47 +114,46 @@ export const defaultSettings: any = { So, for instance, to remove the redirectDelay setting and disable the success message, we can do the following: ```typescript - @NgModule({ imports: [ // ... NbAuthModule.forRoot({ - strategies: [ - NbPasswordAuthStrategy.setup({ - name: 'email', - }), - ], - forms: { - login: { - redirectDelay: 0, - showMessages: { - success: true, - }, - }, - register: { - redirectDelay: 0, - showMessages: { - success: true, - }, - }, - requestPassword: { - redirectDelay: 0, - showMessages: { - success: true, - }, - }, - resetPassword: { - redirectDelay: 0, - showMessages: { - success: true, - }, - }, - logout: { - redirectDelay: 0, - }, - }, - }), + strategies: [ + NbPasswordAuthStrategy.setup({ + name: 'email', + }), + ], + forms: { + login: { + redirectDelay: 0, + showMessages: { + success: true, + }, + }, + register: { + redirectDelay: 0, + showMessages: { + success: true, + }, + }, + requestPassword: { + redirectDelay: 0, + showMessages: { + success: true, + }, + }, + resetPassword: { + redirectDelay: 0, + showMessages: { + success: true, + }, + }, + logout: { + redirectDelay: 0, + }, + }, + }), ], }); @@ -165,7 +162,6 @@ So, for instance, to remove the redirectDelay setting and disable the success me If it looks a bit verbose, we can move the repeating part into a variable like this: ```typescript - const formSetting: any = { redirectDelay: 0, showMessages: { @@ -178,21 +174,21 @@ const formSetting: any = { // ... NbAuthModule.forRoot({ - strategies: [ - NbPasswordAuthStrategy.setup({ - name: 'email', - }), - ], - forms: { - login: formSetting, - register: formSetting, - requestPassword: formSetting, - resetPassword: formSetting, - logout: { - redirectDelay: 0, - }, - }, - }), + strategies: [ + NbPasswordAuthStrategy.setup({ + name: 'email', + }), + ], + forms: { + login: formSetting, + register: formSetting, + requestPassword: formSetting, + resetPassword: formSetting, + logout: { + redirectDelay: 0, + }, + }, + }), ], }); diff --git a/docs/articles/design-system/enable-customizable-theme.md b/docs/articles/design-system/enable-customizable-theme.md index 9b657697ef..abe440b6f4 100644 --- a/docs/articles/design-system/enable-customizable-theme.md +++ b/docs/articles/design-system/enable-customizable-theme.md @@ -6,7 +6,7 @@ In order to be able to customize theme variables, scss files should be enabled.
Note
- You may already have this setup in place, if you used `ng add @nebular/theme` and selected customizable themes during the installation process. + You may already have this setup in place, if you used ng add @nebular/theme and selected customizable themes during the installation process.

diff --git a/docs/articles/design-system/theme.md b/docs/articles/design-system/theme.md index 0726b2cd94..4e9c096096 100644 --- a/docs/articles/design-system/theme.md +++ b/docs/articles/design-system/theme.md @@ -168,9 +168,8 @@ text-caption-font-size: 0.75rem, text-caption-font-weight: 400, text-caption-line-height: 1rem, ``` -
- Adjust these styles to change text style of specific groups of elements. +
## General Theme Variables diff --git a/docs/articles/getting-started/where-to-start.md b/docs/articles/getting-started/where-to-start.md index c74b95d394..5e095368b3 100644 --- a/docs/articles/getting-started/where-to-start.md +++ b/docs/articles/getting-started/where-to-start.md @@ -21,5 +21,5 @@ This way you can get help from the community faster, sharing answers with others ## I'm new to Angular or web development in general Quite often we receive emails and messages from people who ask us for the advice we can give them if they are completely new to software engineering and/or Angular in particular. -We can't say that there's some general way, unfortunately. Each advice should be aimed at a particular person, his current skills set and goals. T -hat's why we believe that each person knows better for himself. But in any case, there are multiple resources like https://www.coursera.org/ or https://egghead.io/ which focus on providing online education. +We can't say that there's some general way, unfortunately. Each advice should be aimed at a particular person, his current skills set and goals. +That's why we believe that each person knows better for himself. But in any case, there are multiple resources like or which focus on providing online education. diff --git a/docs/articles/guides/create-page.md b/docs/articles/guides/create-page.md index ab37c1093c..4a90dbd36f 100644 --- a/docs/articles/guides/create-page.md +++ b/docs/articles/guides/create-page.md @@ -52,7 +52,7 @@ As a result, you should have a page with a simple layout on it looking similar t
Adding into existing page
In case you already have some code on your page and want to mix it with Nebular components you would need to place your page code inside of the Nebular layout. - `` is a required root component for Nebular to work. + <nb-layout></nb-layout> is a required root component for Nebular to work.

diff --git a/docs/articles/guides/install-starter-kit.md b/docs/articles/guides/install-starter-kit.md index 2a9f573ce1..2ee06ea8ad 100644 --- a/docs/articles/guides/install-starter-kit.md +++ b/docs/articles/guides/install-starter-kit.md @@ -11,14 +11,14 @@ The Nebular team doesn't consider providing generic integration layer as a part To install ngx-admin on your machine you need to have the following tools installed: - Git - https://git-scm.com -- Node.js - https://nodejs.org. Please note the **version** should be **>=8** -- Npm - Node.js package manager, comes with Node.js. Please make sure npm **version** is **>=5** +- Node.js - https://nodejs.org. Please note the **version** should be **^18.13.0 || ^20.9.0** +- Npm - Node.js package manager, comes with Node.js. Please make sure npm **version** is **>=8.19** - You might also need some specific native packages depending on your operating system like `build-essential` on Ubuntu
Warning!
- Please note that **it is not possible** to build ngx-admin **without these tools** and it will not be possible because of the way how Angular is built. + Please note that it is not possible to build ngx-admin without these tools and it will not be possible because of the way how Angular is built.

diff --git a/docs/articles/guides/install.md b/docs/articles/guides/install.md index 910a3dfe4a..cad542281c 100644 --- a/docs/articles/guides/install.md +++ b/docs/articles/guides/install.md @@ -68,7 +68,6 @@ Additionally, you can install Auth and Security `npm install --save @nebular/aut At this stage you have everything in place, let's configure Nebular in the app module. ```ts - import { NbThemeModule } from '@nebular/theme'; ... @@ -83,6 +82,20 @@ import { NbThemeModule } from '@nebular/theme'; export class AppModule { ``` + +or if your application is Standalone add it in the bootstrap: + +```ts +import { NbThemeModule } from '@nebular/theme'; + +export const appConfig: ApplicationConfig = { + providers: [ + importProvidersFrom(NbThemeModule.forRoot()), + ... + ], +} +``` + Same way you can enable Auth Module (more details under [Auth Module Concepts](docs/auth/introduction) & [Install](docs/auth/installation) articles). ### Install Styles @@ -100,7 +113,7 @@ Include default Nebular theme CSS file into your `angular.json` file:
Customizable Theme Configuration
In this article we describe the basic styles installation. If you need more advanced features, like customizable theme variables, - or even multiple themes switching - check out [Enabling Customizable Theme](docs/design-system/enable-customizable-theme) and then [Multiple Runtime Themes](docs/design-system/enable-multiple-runtime-themes) articles. + or even multiple themes switching - check out Enabling Customizable Theme and then Multiple Runtime Themes articles.
diff --git a/docs/articles/migration/200rc8-200rc9-auth.md b/docs/articles/migration/200rc8-200rc9-auth.md index 590a16b2eb..b2d668e942 100644 --- a/docs/articles/migration/200rc8-200rc9-auth.md +++ b/docs/articles/migration/200rc8-200rc9-auth.md @@ -15,24 +15,24 @@ Here are the steps to migrate: ###### 2. Change auth forms configuration `provider` key to `strategy`, so instead of ```ts -`NbAuthModule.forRoot({ +NbAuthModule.forRoot({ forms: { - login: { - provider: 'email', - }, + login: { + provider: 'email', + }, }, -})` +}) ``` should be: ```ts -`NbAuthModule.forRoot({ +NbAuthModule.forRoot({ forms: { - login: { - strategy: 'email', // provider -> strategy - }, + login: { + strategy: 'email', // provider -> strategy + }, }, -})` +}) ``` ###### 3. Register strategies through special `setup` method, so instead of the `providers` object, @@ -64,19 +64,19 @@ Token class is passed through strategy configuration, like this: ```ts @NgModule({ imports: [ - // ... - - NbAuthModule.forRoot({ - strategies: [ - NbPasswordAuthStrategy.setup({ - name: 'email', - - token: { - class: NbAuthJWTToken, // <---- - } - }), - ], - }), + // ... + + NbAuthModule.forRoot({ + strategies: [ + NbPasswordAuthStrategy.setup({ + name: 'email', + + token: { + class: NbAuthJWTToken, // <---- + } + }), + ], + }), ], }); ``` diff --git a/docs/articles/security/acl-configuration.md b/docs/articles/security/acl-configuration.md index b3f0200f75..86549a142f 100644 --- a/docs/articles/security/acl-configuration.md +++ b/docs/articles/security/acl-configuration.md @@ -17,27 +17,25 @@ Now, let's convert this into an ACL configuration object which Nebular can under ```ts @NgModule({ imports: [ - // ... + // ... - NbSecurityModule.forRoot({ - accessControl: { - guest: { - view: ['news', 'comments'], - }, - user: { - parent: 'guest', - create: 'comments', - }, - moderator: { - parent: 'user', - create: 'news', - remove: '*', - }, - }, - }), - - ], - + NbSecurityModule.forRoot({ + accessControl: { + guest: { + view: ['news', 'comments'], + }, + user: { + parent: 'guest', + create: 'comments', + }, + moderator: { + parent: 'user', + create: 'news', + remove: '*', + }, + }, + }), + ], ``` As you can see the configuration is pretty much straightforward, each role can have a list of permissions (view, create, remove) and resources that are allowed for those permissions. We can also specify a `*` resource, @@ -53,20 +51,18 @@ In the simplest form we can provide this service directly in the main module: ```ts // ... - import { of as observableOf } from 'rxjs/observable/of'; import { NbSecurityModule, NbRoleProvider } from '@nebular/security'; @NgModule({ imports: [ - // ... - - NbSecurityModule.forRoot({ // ... - }), - - ], + + NbSecurityModule.forRoot({ + // ... + }), + ], providers: [ // ... { @@ -95,7 +91,7 @@ Let's create a separate `role.provider.ts` service in order not to put a lot of ```typescript import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; -import { map } from 'rxjs/operators/map'; +import { map } from 'rxjs/operators'; import { NbAuthService, NbAuthJWTToken } from '@nebular/auth'; import { NbRoleProvider } from '@nebular/security'; @@ -151,18 +147,17 @@ And let's provide the service in the app module: ```typescript // ... - import { RoleProvider } from './role.provider'; import { NbSecurityModule, NbRoleProvider } from '@nebular/security'; @NgModule({ imports: [ - // ... - - NbSecurityModule.forRoot({ // ... - }), + + NbSecurityModule.forRoot({ + // ... + }), ], providers: [ @@ -184,8 +179,8 @@ Nebular Security provides us with a simple `*nbIsGranted` conditional directive, @Component({ // ... template: ` - - `, + + `, }) export class CommentFormComponent { // ... @@ -214,8 +209,8 @@ And let's add an `if` statement to the `Post Comment` button so that it is only @Component({ // ... template: ` - - `, + + `, }) export class CommentFormComponent { // ... @@ -223,4 +218,4 @@ export class CommentFormComponent { We call `isGranted` method, which listens to the currently provided role and checks it permissions against specified in the ACL configuration. Moreover, as it listens to the *role change*, it hides the button if authentication gets changed during the app usage. -The same way we can call the `isGranted` method from any part of the app, including router guards and services, which gives us a transparent and flexibly configurable way to manage user access to various resources. +The same way we can call the `isGranted` method from any part of the app, including router guards and services, which gives us a transparent and flexibly configurable way to manage user access to various resources. diff --git a/docs/articles/security/install.md b/docs/articles/security/install.md index c696283d1e..62989ddc2e 100644 --- a/docs/articles/security/install.md +++ b/docs/articles/security/install.md @@ -3,7 +3,7 @@
Note
- If you use our [ngx-admin starter kit](docs/guides/install-based-on-starter-kit) then you already have Security module in place. + If you use our ngx-admin starter kit then you already have Security module in place.
@@ -15,7 +15,7 @@ npm i @nebular/security ```
-## Import the module: +## Import the module ```ts import { NbSecurityModule } from '@nebular/security'; @@ -29,9 +29,9 @@ Now, let's register the module in the root module: ```ts @NgModule({ imports: [ - // ... + // ... - NbSecurityModule.forRoot(), + NbSecurityModule.forRoot(), ``` Great, at this stage we have installed Nebular Security and ready to configure it. diff --git a/docs/articles/security/multiple-roles.md b/docs/articles/security/multiple-roles.md index 152dec4f8a..6ff88e2b2c 100644 --- a/docs/articles/security/multiple-roles.md +++ b/docs/articles/security/multiple-roles.md @@ -15,13 +15,13 @@ import { NbSecurityModule, NbRoleProvider } from '@nebular/security'; @NgModule({ imports: [ - // ... - - NbSecurityModule.forRoot({ // ... - }), + + NbSecurityModule.forRoot({ + // ... + }), - ], + ], providers: [ // ... { diff --git a/docs/articles/usability/rtl.md b/docs/articles/usability/rtl.md index 98b5c11e34..b7d57fa939 100644 --- a/docs/articles/usability/rtl.md +++ b/docs/articles/usability/rtl.md @@ -24,7 +24,7 @@ Default value is `ltr`.
Note
- Components must be placed inside of the `` component to correctly support language direction. + Components must be placed inside of the <nb-layout></nb-layout> component to correctly support language direction.
diff --git a/src/framework/theme/components/stepper/stepper.component.ts b/src/framework/theme/components/stepper/stepper.component.ts index 94f80ab9ba..c674102149 100644 --- a/src/framework/theme/components/stepper/stepper.component.ts +++ b/src/framework/theme/components/stepper/stepper.component.ts @@ -87,7 +87,7 @@ export interface NbStepChangeEvent { * @stacked-example(Vertical, stepper/stepper-vertical.component) * * `disableStepNavigation` disables navigation by clicking on steps, so user can navigate only using - * 'nbStepperPrevious' and 'nbStepperNext' buttons. + * `nbStepperPrevious` and `nbStepperNext` buttons. * @stacked-example(Disabled steps navigation, stepper/stepper-disabled-step-nav.component) * * Use `stepChange` output to listening to step change event. This event emits `NbStepChangeEvent` object.