diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/component-replacement.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/component-replacement.png index 5955c0d6b0..75663b08b6 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/component-replacement.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/component-replacement.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/configuration.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/configuration.png index 0efb9cd2e2..c8c895fd48 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/configuration.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/configuration.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/design-token.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/design-token.png index 4a2f82b9a4..c81641053a 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/design-token.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/design-token.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/dynamic-content.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/dynamic-content.png index ded1182c5c..c18e3a1fb0 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/dynamic-content.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/dynamic-content.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/home.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/home.png index 2b21a69e58..540a7530a2 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/home.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/home.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/localization.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/localization.png index 8e3d306aca..f4ae4f108b 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/localization.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/localization.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/placeholder.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/placeholder.png index f9c7e35dda..5aa4e3be3c 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/placeholder.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/placeholder.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/rules-engine.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/rules-engine.png index 29c1a84219..82b652e60a 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/rules-engine.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/rules-engine.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/run-app-locally.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/run-app-locally.png index 605ee97601..55605eea6a 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/run-app-locally.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/run-app-locally.png differ diff --git a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/sdk-generator.png b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/sdk-generator.png index 283ccfcce1..b30fb599d0 100644 Binary files a/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/sdk-generator.png and b/apps/showcase/e2e-playwright/sanity/screenshots/visual-sanity.e2e.ts/chromium/sdk-generator.png differ diff --git a/apps/showcase/package.json b/apps/showcase/package.json index f8b90ec8e0..9f4262e8bc 100644 --- a/apps/showcase/package.json +++ b/apps/showcase/package.json @@ -75,11 +75,9 @@ "ag-grid-community": "~32.3.0", "bootstrap": "5.3.3", "clipboard": "^2.0.11", - "highlight.js": "^11.8.0", "intl-messageformat": "~10.7.0", "marked": "^12.0.0", "monaco-editor": "~0.52.0", - "ngx-highlightjs": "^12.0.0", "ngx-markdown": "^18.1.0", "ngx-monaco-editor-v2": "^18.0.0", "ngx-monaco-tree": "^18.1.0", diff --git a/apps/showcase/src/app/app.module.ts b/apps/showcase/src/app/app.module.ts index 6e4ff98db5..1053218f08 100644 --- a/apps/showcase/src/app/app.module.ts +++ b/apps/showcase/src/app/app.module.ts @@ -26,7 +26,6 @@ import { import { ConsoleLogger, Logger, LOGGER_CLIENT_TOKEN, LoggerService } from '@o3r/logger'; import { OTTER_RULES_ENGINE_DEVTOOLS_OPTIONS, RulesEngineRunnerModule } from '@o3r/rules-engine'; import { OTTER_STYLING_DEVTOOLS_OPTIONS, StylingDevtoolsModule } from '@o3r/styling'; -import { HIGHLIGHT_OPTIONS } from 'ngx-highlightjs'; import { CLIPBOARD_OPTIONS, provideMarkdown } from 'ngx-markdown'; import { MonacoEditorModule } from 'ngx-monaco-editor-v2'; import { ClipboardButtonPresComponent, DatePickerHebrewInputPresComponent, ScrollBackTopPresComponent, SidenavPresComponent } from '../components/utilities'; @@ -116,19 +115,6 @@ export function registerCustomComponents(): Map { ], providers: [ {provide: MESSAGE_FORMAT_CONFIG, useValue: {}}, - { - provide: HIGHLIGHT_OPTIONS, - useValue: { - coreLibraryLoader: () => import('highlight.js/lib/core'), - languages: { - bash: () => import('highlight.js/lib/languages/bash'), - css: () => import('highlight.js/lib/languages/css'), - json: () => import('highlight.js/lib/languages/json'), - typescript: () => import('highlight.js/lib/languages/typescript'), - xml: () => import('highlight.js/lib/languages/xml') - } - } - }, {provide: LOGGER_CLIENT_TOKEN, useValue: new ConsoleLogger()}, {provide: PetApi, useFactory: petApiFactory, deps: [LoggerService]}, {provide: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, useValue: {isActivatedOnBootstrap: true}}, diff --git a/apps/showcase/src/app/component-replacement/component-replacement.component.ts b/apps/showcase/src/app/component-replacement/component-replacement.component.ts index 0abdb0ff5a..e510f071be 100644 --- a/apps/showcase/src/app/component-replacement/component-replacement.component.ts +++ b/apps/showcase/src/app/component-replacement/component-replacement.component.ts @@ -5,7 +5,7 @@ import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavPresComponent } from '../../compo import { AsyncPipe } from '@angular/common'; import { ComponentReplacementPresComponent } from '../../components/showcase/component-replacement/component-replacement-pres.component'; import { RouterModule } from '@angular/router'; -import { CopyTextPresComponent } from '../../components/utilities/copy-text/copy-text-pres.component'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; @O3rComponent({ componentType: 'Page' }) @Component({ @@ -15,7 +15,15 @@ import { CopyTextPresComponent } from '../../components/utilities/copy-text/copy encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [RouterModule, InPageNavPresComponent, AsyncPipe, IN_PAGE_NAV_PRES_DIRECTIVES, ComponentReplacementPresComponent, CopyTextPresComponent] + imports: [ + RouterModule, + InPageNavPresComponent, + AsyncPipe, + IN_PAGE_NAV_PRES_DIRECTIVES, + ComponentReplacementPresComponent, + MarkdownModule + ], + providers: [provideMarkdown()] }) export class ComponentReplacementComponent implements AfterViewInit { private readonly inPageNavPresService = inject(InPageNavPresService); diff --git a/apps/showcase/src/app/component-replacement/component-replacement.template.html b/apps/showcase/src/app/component-replacement/component-replacement.template.html index c50894436c..ca51178e9d 100644 --- a/apps/showcase/src/app/component-replacement/component-replacement.template.html +++ b/apps/showcase/src/app/component-replacement/component-replacement.template.html @@ -28,7 +28,11 @@

Example

How to install

To use the component replacement mechanism you'll need to install the @o3r/components package.

- + + ```bash + ng add @o3r/components + ``` +

References

diff --git a/apps/showcase/src/app/configuration/configuration.component.ts b/apps/showcase/src/app/configuration/configuration.component.ts index 728dade313..590fa023e5 100644 --- a/apps/showcase/src/app/configuration/configuration.component.ts +++ b/apps/showcase/src/app/configuration/configuration.component.ts @@ -3,7 +3,8 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, computed, inject, Qu import { RouterModule } from '@angular/router'; import { ConfigurationBaseServiceModule } from '@o3r/configuration'; import { O3rComponent } from '@o3r/core'; -import { ConfigurationPresComponent, CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/index'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; +import { ConfigurationPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/index'; import { ConfigurationPresConfig } from '../../components/showcase/configuration/configuration-pres.config'; const CONFIG_OVERRIDE: ConfigurationPresConfig = { @@ -24,10 +25,11 @@ const CONFIG_OVERRIDE: ConfigurationPresConfig = { RouterModule, ConfigurationPresComponent, ConfigurationBaseServiceModule, - CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, - AsyncPipe + AsyncPipe, + MarkdownModule ], + providers: [provideMarkdown()], templateUrl: './configuration.template.html', styleUrls: ['./configuration.style.scss'], encapsulation: ViewEncapsulation.None, diff --git a/apps/showcase/src/app/configuration/configuration.template.html b/apps/showcase/src/app/configuration/configuration.template.html index ee7e208f5a..3cd03dded2 100644 --- a/apps/showcase/src/app/configuration/configuration.template.html +++ b/apps/showcase/src/app/configuration/configuration.template.html @@ -28,7 +28,7 @@

Examples

- +
@@ -43,19 +43,39 @@

Examples

How to install

- + + ```bash + ng add @o3r/configuration + ``` +

How to generate a configurable component

- + + ```bash + ng g component ComponentName --use-otter-config + ``` +

How to add configuration to a component

- + + ```bash + ng g configuration-to-component --path='path/to/the/component/class/file' + ``` +

Metadata

How to extract

- + + ```bash + ng run project-name:extract-components + ``` +

It will extract components' configuration and generate the two following files: component.config.metadata.json and component.class.metadata.json

Check the list of options available by running:

- + + ```bash + ng run project-name:extract-components --help + ``` +

References

diff --git a/apps/showcase/src/app/design-token/design-token.component.ts b/apps/showcase/src/app/design-token/design-token.component.ts index fca6b8e65c..ecc5e55b12 100644 --- a/apps/showcase/src/app/design-token/design-token.component.ts +++ b/apps/showcase/src/app/design-token/design-token.component.ts @@ -2,7 +2,8 @@ import { AsyncPipe } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core'; import { RouterLink } from '@angular/router'; import { O3rComponent } from '@o3r/core'; -import { CopyTextPresComponent, DesignTokenPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; +import { DesignTokenPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components'; @O3rComponent({ componentType: 'Page' }) @Component({ @@ -10,11 +11,12 @@ import { CopyTextPresComponent, DesignTokenPresComponent, IN_PAGE_NAV_PRES_DIREC standalone: true, imports: [ AsyncPipe, - CopyTextPresComponent, DesignTokenPresComponent, RouterLink, - IN_PAGE_NAV_PRES_DIRECTIVES + IN_PAGE_NAV_PRES_DIRECTIVES, + MarkdownModule ], + providers: [provideMarkdown()], templateUrl: './design-token.template.html', styleUrl: './design-token.style.scss', encapsulation: ViewEncapsulation.None, diff --git a/apps/showcase/src/app/design-token/design-token.template.html b/apps/showcase/src/app/design-token/design-token.template.html index 47190e0750..ac7b0d72e2 100644 --- a/apps/showcase/src/app/design-token/design-token.template.html +++ b/apps/showcase/src/app/design-token/design-token.template.html @@ -37,11 +37,23 @@

Examples

Source code

How to install

- + + ```bash + ng add @o3r/design + ``` +

How to add design-tokens to a component

- -

How to extract design-tokens from Sass files

- + + ```bash + ng g design-token-to-component --path='path/to/the/component/class/file' + ``` + +

How to extract design-tokens from Sass files

+ + ```bash + ng g extract-token --component-file-patterns='path/to/the/components/**/*.scss' + ``` +

References

    diff --git a/apps/showcase/src/app/dynamic-content/dynamic-content.component.ts b/apps/showcase/src/app/dynamic-content/dynamic-content.component.ts index 50d3fb8e02..02c7717415 100644 --- a/apps/showcase/src/app/dynamic-content/dynamic-content.component.ts +++ b/apps/showcase/src/app/dynamic-content/dynamic-content.component.ts @@ -3,8 +3,8 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, V import { RouterModule } from '@angular/router'; import { O3rComponent } from '@o3r/core'; import { DynamicContentModule } from '@o3r/dynamic-content'; -import { DynamicContentPresComponent } from '../../components/showcase/dynamic-content'; -import { CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/utilities'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; +import { DynamicContentPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/index'; @O3rComponent({ componentType: 'Page' }) @Component({ @@ -15,9 +15,10 @@ import { CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPa DynamicContentModule, IN_PAGE_NAV_PRES_DIRECTIVES, DynamicContentPresComponent, - CopyTextPresComponent, - AsyncPipe + AsyncPipe, + MarkdownModule ], + providers: [provideMarkdown()], templateUrl: './dynamic-content.template.html', styleUrls: ['./dynamic-content.style.scss'], encapsulation: ViewEncapsulation.None, diff --git a/apps/showcase/src/app/dynamic-content/dynamic-content.template.html b/apps/showcase/src/app/dynamic-content/dynamic-content.template.html index c3ab3c62cc..c99024999e 100644 --- a/apps/showcase/src/app/dynamic-content/dynamic-content.template.html +++ b/apps/showcase/src/app/dynamic-content/dynamic-content.template.html @@ -22,7 +22,7 @@

    Example

    - +
    @@ -37,7 +37,11 @@

    Example

    How to install

    - + + ```bash + ng add @o3r/dynamic-content + ``` +

    References

    diff --git a/apps/showcase/src/app/home/home.component.ts b/apps/showcase/src/app/home/home.component.ts index 095ced79f9..3e6e3a03b9 100644 --- a/apps/showcase/src/app/home/home.component.ts +++ b/apps/showcase/src/app/home/home.component.ts @@ -1,13 +1,14 @@ import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core'; import { O3rComponent } from '@o3r/core'; import { DynamicContentModule } from '@o3r/dynamic-content'; -import { CopyTextPresComponent } from '../../components'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; @O3rComponent({ componentType: 'Page' }) @Component({ selector: 'o3r-home', standalone: true, - imports: [DynamicContentModule, CopyTextPresComponent], + imports: [DynamicContentModule, MarkdownModule], + providers: [provideMarkdown()], templateUrl: './home.template.html', styleUrls: ['./home.style.scss'], encapsulation: ViewEncapsulation.None, diff --git a/apps/showcase/src/app/home/home.template.html b/apps/showcase/src/app/home/home.template.html index 66c35b884d..f26d6f0d0d 100644 --- a/apps/showcase/src/app/home/home.template.html +++ b/apps/showcase/src/app/home/home.template.html @@ -19,20 +19,40 @@

    Get started with Otter

    Setup the project ...

    Create a new project (npm) - + + ```bash + npm create @o3r <your-project> + ``` + or (yarn) - + + ```bash + yarn create @o3r <your-project> + ``` +

    ... and start to create

    A new application: - + + ```bash + ng g application <app-name> + ``` + A new SDK: - + + ```bash + ng g sdk <sdk-name> + ``` + Or a new library: - + + ```bash + ng g library <lib-name> + ``` +

    diff --git a/apps/showcase/src/app/localization/localization.component.ts b/apps/showcase/src/app/localization/localization.component.ts index d0ba6cbd70..ef02da7511 100644 --- a/apps/showcase/src/app/localization/localization.component.ts +++ b/apps/showcase/src/app/localization/localization.component.ts @@ -2,7 +2,8 @@ import { AsyncPipe } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core'; import { RouterModule } from '@angular/router'; import { O3rComponent } from '@o3r/core'; -import { CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService, LocalizationPresComponent } from '../../components/index'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; +import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService, LocalizationPresComponent } from '../../components/index'; @O3rComponent({ componentType: 'Page' }) @Component({ @@ -11,10 +12,11 @@ import { CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPa imports: [ RouterModule, LocalizationPresComponent, - CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, - AsyncPipe + AsyncPipe, + MarkdownModule ], + providers: [provideMarkdown()], templateUrl: './localization.template.html', styleUrls: ['./localization.style.scss'], encapsulation: ViewEncapsulation.None, diff --git a/apps/showcase/src/app/localization/localization.template.html b/apps/showcase/src/app/localization/localization.template.html index e3e35a4e63..f482579888 100644 --- a/apps/showcase/src/app/localization/localization.template.html +++ b/apps/showcase/src/app/localization/localization.template.html @@ -28,33 +28,73 @@

    Example

    Source code

How to install

- + + ```bash + ng add @o3r/localization + ``` +

How to generate a localized component

- + + ```bash + ng g component ComponentName --use-localization + ``` +

How to add localization to a component

- + + ```bash + ng g localization-to-component --path='path/to/the/component/class/file' + ``` +

How to add a localization key to a component

- + + ```bash + ng g localization-key-to-component --path='path/to/the/component/class/file' --key='localizationKey' --value='defaultValue' + ``` +

Localization bundle

How to generate a component bundle

- + + ```bash + ng run project-name:i18n + ``` +

It will create an i18n folder in the component folder, with an en-GB.json file containing the mapping between the localization key and the associated default value.

Check the list of options available by running:

- + + ```bash + ng run project-name:i18n --help + ``` +

How to generate an application bundle

- + + ```bash + ng run project-name:generate-translations + ``` +

It will create the application bundle for each supported language.

Check the list of options available by running:

- + + ```bash + ng run project-name:generate-translations --help + ``` +

Metadata

How to extract

- + + ```bash + ng run project-name:extract-translations + ``` +

It will extract components' translations and generate the following file: localisation.metadata.json

Check the list of options available by running:

- + + ```bash + ng run project-name:extract-translations --help + ``` +

References

diff --git a/apps/showcase/src/app/rules-engine/rules-engine.component.ts b/apps/showcase/src/app/rules-engine/rules-engine.component.ts index 19de7a2c0c..4061c111e2 100644 --- a/apps/showcase/src/app/rules-engine/rules-engine.component.ts +++ b/apps/showcase/src/app/rules-engine/rules-engine.component.ts @@ -26,9 +26,9 @@ import { Ruleset, UnaryOperator } from '@o3r/rules-engine'; +import { MarkdownModule, provideMarkdown } from 'ngx-markdown'; import { firstValueFrom } from 'rxjs'; -import { RulesEnginePresComponent } from '../../components/showcase/rules-engine'; -import { CopyTextPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/utilities'; +import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService, RulesEnginePresComponent } from '../../components/index'; import { environment } from '../../environments/environment.development'; import { TripFactsService } from '../../facts/index'; import { duringSummer } from '../../operators/index'; @@ -52,12 +52,13 @@ import { duringSummer } from '../../operators/index'; ConfigOverrideStoreModule, AssetPathOverrideStoreModule, LocalizationOverrideStoreModule, - CopyTextPresComponent, RouterModule, IN_PAGE_NAV_PRES_DIRECTIVES, NgbNavModule, - AsyncPipe + AsyncPipe, + MarkdownModule ], + providers: [provideMarkdown()], templateUrl: './rules-engine.template.html', styleUrls: ['./rules-engine.style.scss'], encapsulation: ViewEncapsulation.None, diff --git a/apps/showcase/src/app/rules-engine/rules-engine.template.html b/apps/showcase/src/app/rules-engine/rules-engine.template.html index 8f77711156..9fed5a2e0e 100644 --- a/apps/showcase/src/app/rules-engine/rules-engine.template.html +++ b/apps/showcase/src/app/rules-engine/rules-engine.template.html @@ -42,7 +42,7 @@

Example


You can check that New-York will be available if you select dates during the summer (between June 21st and September 21st).

- + @@ -81,23 +81,43 @@

Example

How to install

- + + ```bash + ng add @o3r/rules-engine + ``` +

How to create a new fact

- + + ```bash + ng g facts-service FactsName + ``` +

How to create a new operator

- + + ```bash + ng g operator OperatorName + ``` +

Metadata

How to extract

- + + ```bash + ng run project-name:extract-rules-engine + ``` +

It will extract application facts and operators in the following files: rules.facts.metadata.json and rules.operators.metadata.json

Check the list of options available by running:

- + + ```bash + ng run project-name:extract-rules-engine --help + ``` +

References