Skip to content

Commit f19fa65

Browse files
committed
temp stuff
1 parent 7aed3af commit f19fa65

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+452
-235
lines changed

apps/showcase/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@ngx-translate/core": "~15.0.0",
5555
"@nx/jest": "~19.5.0",
5656
"@o3r-training/showcase-sdk": "workspace:^",
57+
"@o3r-training/training-sdk": "workspace:^",
5758
"@o3r-training/training-tools": "workspace:^",
5859
"@o3r/application": "workspace:^",
5960
"@o3r/components": "workspace:^",

apps/showcase/project.json

+5
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@
9696
"glob": "*.json",
9797
"input": "packages/@o3r-training/training-sdk/dist/structure",
9898
"output": "/assets/@o3r-training/training-sdk/structure"
99+
},
100+
{
101+
"glob": "*.json",
102+
"input": "packages/@o3r-training/showcase-sdk/dist/structure",
103+
"output": "/assets/@o3r-training/showcase-sdk/structure"
99104
}
100105
],
101106
"styles": [

apps/showcase/src/app/component-replacement/component-replacement.component.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavPresComponent } from '../../compo
55
import { AsyncPipe } from '@angular/common';
66
import { ComponentReplacementPresComponent } from '../../components/showcase/component-replacement/component-replacement-pres.component';
77
import { RouterModule } from '@angular/router';
8-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
8+
import { MarkdownModule } from 'ngx-markdown';
99

1010
@O3rComponent({ componentType: 'Page' })
1111
@Component({
@@ -22,8 +22,7 @@ import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
2222
IN_PAGE_NAV_PRES_DIRECTIVES,
2323
ComponentReplacementPresComponent,
2424
MarkdownModule
25-
],
26-
providers: [provideMarkdown()]
25+
]
2726
})
2827
export class ComponentReplacementComponent implements AfterViewInit {
2928
private readonly inPageNavPresService = inject(InPageNavPresService);

apps/showcase/src/app/component-replacement/component-replacement.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { ComponentReplacementComponent } from './component-replacement.component';
44
import { RouterModule } from '@angular/router';
55
import { AsyncPipe } from '@angular/common';
6+
import { provideMarkdown } from 'ngx-markdown';
67
import { ComponentReplacementPresComponent } from '../../components/showcase/component-replacement/component-replacement-pres.component';
78

89
describe('ComponentReplacementComponent', () => {
@@ -13,7 +14,8 @@ describe('ComponentReplacementComponent', () => {
1314
await TestBed.configureTestingModule({
1415
imports: [ComponentReplacementComponent,
1516
RouterModule.forRoot([]),
16-
AsyncPipe]
17+
AsyncPipe],
18+
providers: [provideMarkdown()]
1719
}).overrideComponent(ComponentReplacementComponent, {
1820
remove: { imports: [ComponentReplacementPresComponent] }
1921
}).compileComponents();

apps/showcase/src/app/configuration/configuration.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, computed, inject, Qu
33
import { RouterModule } from '@angular/router';
44
import { ConfigurationBaseServiceModule } from '@o3r/configuration';
55
import { O3rComponent } from '@o3r/core';
6-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
6+
import { MarkdownModule } from 'ngx-markdown';
77
import { ConfigurationPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/index';
88
import { ConfigurationPresConfig } from '../../components/showcase/configuration/configuration-pres.config';
99

@@ -29,7 +29,6 @@ const CONFIG_OVERRIDE: ConfigurationPresConfig = {
2929
AsyncPipe,
3030
MarkdownModule
3131
],
32-
providers: [provideMarkdown()],
3332
templateUrl: './configuration.template.html',
3433
styleUrls: ['./configuration.style.scss'],
3534
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/configuration/configuration.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { RouterModule } from '@angular/router';
44
import { StoreModule } from '@ngrx/store';
55
import { O3rElement } from '@o3r/testing/core';
6+
import { provideMarkdown } from 'ngx-markdown';
67
import { ConfigurationComponent } from './configuration.component';
78
import { ConfigurationFixtureComponent } from './configuration.fixture';
89
let componentFixture: ConfigurationFixtureComponent;
@@ -18,7 +19,8 @@ describe('ConfigurationComponent', () => {
1819
StoreModule.forRoot(),
1920
RouterModule.forRoot([]),
2021
AsyncPipe
21-
]
22+
],
23+
providers: [provideMarkdown()]
2224
});
2325
fixture = TestBed.createComponent(ConfigurationComponent);
2426
component = fixture.componentInstance;

apps/showcase/src/app/design-token/design-token.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AsyncPipe } from '@angular/common';
22
import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core';
33
import { RouterLink } from '@angular/router';
44
import { O3rComponent } from '@o3r/core';
5-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
5+
import { MarkdownModule } from 'ngx-markdown';
66
import { DesignTokenPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components';
77

88
@O3rComponent({ componentType: 'Page' })
@@ -16,7 +16,6 @@ import { DesignTokenPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, I
1616
IN_PAGE_NAV_PRES_DIRECTIVES,
1717
MarkdownModule
1818
],
19-
providers: [provideMarkdown()],
2019
templateUrl: './design-token.template.html',
2120
styleUrl: './design-token.style.scss',
2221
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/design-token/design-token.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22
import { RouterModule } from '@angular/router';
3+
import { provideMarkdown } from 'ngx-markdown';
34

45
import { DesignTokenComponent } from './design-token.component';
56

@@ -12,7 +13,8 @@ describe('DesignTokenComponent', () => {
1213
imports: [
1314
DesignTokenComponent,
1415
RouterModule.forRoot([])
15-
]
16+
],
17+
providers: [provideMarkdown()]
1618
})
1719
.compileComponents();
1820

apps/showcase/src/app/dynamic-content/dynamic-content.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, V
33
import { RouterModule } from '@angular/router';
44
import { O3rComponent } from '@o3r/core';
55
import { DynamicContentModule } from '@o3r/dynamic-content';
6-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
6+
import { MarkdownModule } from 'ngx-markdown';
77
import { DynamicContentPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService } from '../../components/index';
88

99
@O3rComponent({ componentType: 'Page' })
@@ -18,7 +18,6 @@ import { DynamicContentPresComponent, IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink
1818
AsyncPipe,
1919
MarkdownModule
2020
],
21-
providers: [provideMarkdown()],
2221
templateUrl: './dynamic-content.template.html',
2322
styleUrls: ['./dynamic-content.style.scss'],
2423
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/dynamic-content/dynamic-content.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { AsyncPipe } from '@angular/common';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { RouterModule } from '@angular/router';
44
import { O3rElement } from '@o3r/testing/core';
5+
import { provideMarkdown } from 'ngx-markdown';
56
import { DynamicContentComponent } from './dynamic-content.component';
67
import { DynamicContentFixtureComponent } from './dynamic-content.fixture';
78
let componentFixture: DynamicContentFixtureComponent;
@@ -16,7 +17,8 @@ describe('DynamicContentComponent', () => {
1617
DynamicContentComponent,
1718
RouterModule.forRoot([]),
1819
AsyncPipe
19-
]
20+
],
21+
providers: [provideMarkdown()]
2022
});
2123
fixture = TestBed.createComponent(DynamicContentComponent);
2224
component = fixture.componentInstance;

apps/showcase/src/app/home/home.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
22
import { O3rComponent } from '@o3r/core';
33
import { DynamicContentModule } from '@o3r/dynamic-content';
4-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
4+
import { MarkdownModule } from 'ngx-markdown';
55

66
@O3rComponent({ componentType: 'Page' })
77
@Component({
88
selector: 'o3r-home',
99
standalone: true,
1010
imports: [DynamicContentModule, MarkdownModule],
11-
providers: [provideMarkdown()],
1211
templateUrl: './home.template.html',
1312
styleUrls: ['./home.style.scss'],
1413
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/home/home.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { provideMarkdown } from 'ngx-markdown';
23
import { HomeComponent } from './home.component';
34

45
describe('HomeComponent', () => {
@@ -7,7 +8,8 @@ describe('HomeComponent', () => {
78

89
beforeEach(() => {
910
TestBed.configureTestingModule({
10-
imports: [HomeComponent]
11+
imports: [HomeComponent],
12+
providers: [provideMarkdown()]
1113
});
1214
fixture = TestBed.createComponent(HomeComponent);
1315
component = fixture.componentInstance;

apps/showcase/src/app/localization/localization.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AsyncPipe } from '@angular/common';
22
import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core';
33
import { RouterModule } from '@angular/router';
44
import { O3rComponent } from '@o3r/core';
5-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
5+
import { MarkdownModule } from 'ngx-markdown';
66
import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService, LocalizationPresComponent } from '../../components/index';
77

88
@O3rComponent({ componentType: 'Page' })
@@ -16,7 +16,6 @@ import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InP
1616
AsyncPipe,
1717
MarkdownModule
1818
],
19-
providers: [provideMarkdown()],
2019
templateUrl: './localization.template.html',
2120
styleUrls: ['./localization.style.scss'],
2221
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/localization/localization.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { RouterModule } from '@angular/router';
55
import { TranslateCompiler, TranslateFakeCompiler } from '@ngx-translate/core';
66
import { LocalizationService } from '@o3r/localization';
77
import { mockTranslationModules } from '@o3r/testing/localization';
8+
import { provideMarkdown } from 'ngx-markdown';
89
import { LocalizationComponent } from './localization.component';
910
const localizationConfiguration = { language: 'en' };
1011
const mockTranslations = {
@@ -25,7 +26,8 @@ describe('LocalizationComponent', () => {
2526
LocalizationComponent,
2627
...mockTranslationModules(localizationConfiguration, mockTranslations, mockTranslationsCompilerProvider),
2728
AsyncPipe
28-
]
29+
],
30+
providers: [provideMarkdown()]
2931
});
3032
fixture = TestBed.createComponent(LocalizationComponent);
3133
component = fixture.componentInstance;

apps/showcase/src/app/rules-engine/rules-engine.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
Ruleset,
2727
UnaryOperator
2828
} from '@o3r/rules-engine';
29-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
29+
import { MarkdownModule } from 'ngx-markdown';
3030
import { firstValueFrom } from 'rxjs';
3131
import { IN_PAGE_NAV_PRES_DIRECTIVES, InPageNavLink, InPageNavLinkDirective, InPageNavPresService, RulesEnginePresComponent } from '../../components/index';
3232
import { environment } from '../../environments/environment.development';
@@ -58,7 +58,6 @@ import { duringSummer } from '../../operators/index';
5858
AsyncPipe,
5959
MarkdownModule
6060
],
61-
providers: [provideMarkdown()],
6261
templateUrl: './rules-engine.template.html',
6362
styleUrls: ['./rules-engine.style.scss'],
6463
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/rules-engine/rules-engine.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { TranslateCompiler, TranslateFakeCompiler } from '@ngx-translate/core';
77
import { LocalizationService } from '@o3r/localization';
88
import { RulesEngineRunnerModule } from '@o3r/rules-engine';
99
import { mockTranslationModules } from '@o3r/testing/localization';
10+
import { provideMarkdown } from 'ngx-markdown';
1011
import { RulesEngineComponent } from './rules-engine.component';
1112
import { RouterModule } from '@angular/router';
1213

@@ -33,7 +34,8 @@ describe('RulesEngineComponent', () => {
3334
RouterModule.forRoot([]),
3435
...mockTranslationModules(localizationConfiguration, mockTranslations, mockTranslationsCompilerProvider),
3536
AsyncPipe
36-
]
37+
],
38+
providers: [provideMarkdown()]
3739
});
3840
global.fetch = jest.fn(() =>
3941
Promise.resolve({

apps/showcase/src/app/run-app-locally/run-app-locally.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
22
import { O3rComponent } from '@o3r/core';
3-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
3+
import { MarkdownModule } from 'ngx-markdown';
44

55
@O3rComponent({ componentType: 'Page' })
66
@Component({
77
selector: 'o3r-run-app-locally',
88
standalone: true,
99
imports: [MarkdownModule],
10-
providers: [provideMarkdown()],
1110
templateUrl: './run-app-locally.template.html',
1211
styleUrls: ['./run-app-locally.style.scss'],
1312
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/run-app-locally/run-app-locally.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { provideMarkdown } from 'ngx-markdown';
23

34
import { RunAppLocallyComponent } from './run-app-locally.component';
45

@@ -8,7 +9,8 @@ describe('RunAppLocallyComponent', () => {
89

910
beforeEach(() => {
1011
TestBed.configureTestingModule({
11-
imports: [RunAppLocallyComponent]
12+
imports: [RunAppLocallyComponent],
13+
providers: [provideMarkdown()]
1214
});
1315
fixture = TestBed.createComponent(RunAppLocallyComponent);
1416
component = fixture.componentInstance;

apps/showcase/src/app/sdk/sdk.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AsyncPipe } from '@angular/common';
22
import { AfterViewInit, ChangeDetectionStrategy, Component, inject, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core';
33
import { RouterLink } from '@angular/router';
44
import { O3rComponent } from '@o3r/core';
5-
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
5+
import { MarkdownModule } from 'ngx-markdown';
66
import {
77
IN_PAGE_NAV_PRES_DIRECTIVES,
88
InPageNavLink,
@@ -22,7 +22,6 @@ import {
2222
AsyncPipe,
2323
MarkdownModule
2424
],
25-
providers: [provideMarkdown()],
2625
templateUrl: './sdk.template.html',
2726
styleUrls: ['./sdk.style.scss'],
2827
encapsulation: ViewEncapsulation.None,

apps/showcase/src/app/sdk/sdk.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { PetApiFixture } from '@o3r-training/showcase-sdk/fixtures';
33
import { AsyncPipe } from '@angular/common';
44
import { ComponentFixture, TestBed } from '@angular/core/testing';
55
import { RouterModule } from '@angular/router';
6+
import { provideMarkdown } from 'ngx-markdown';
67

78
import { SdkComponent } from './sdk.component';
89
import '@angular/localize/init';
@@ -21,7 +22,8 @@ describe('SdkComponent', () => {
2122
AsyncPipe
2223
],
2324
providers: [
24-
{provide: PetApi, useValue: petApiFixture}
25+
{provide: PetApi, useValue: petApiFixture},
26+
provideMarkdown()
2527
]
2628
});
2729
fixture = TestBed.createComponent(SdkComponent);

apps/showcase/src/assets/trainings/sdk/program.json

+34-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,40 @@
77
},
88
{
99
"stepTitle": "How to use the Otter SDK?",
10-
"htmlContentUrl": "./steps/typescript-sdk/instructions.md"
10+
"htmlContentUrl": "./steps/typescript-sdk/instructions.md",
11+
"filesConfiguration": {
12+
"name": "how-to-use-otter-sdk",
13+
"startingFile": "apps/tutorial-app/src/app/app.component.ts",
14+
"urls": [
15+
{
16+
"path": ".",
17+
"contentUrl": "./shared/monorepo-template.json"
18+
},
19+
{
20+
"path": "./libs/sdk",
21+
"contentUrl": "@o3r-training/showcase-sdk/structure/spec.json"
22+
},
23+
{
24+
"path": "./libs/sdk/src",
25+
"contentUrl": "@o3r-training/showcase-sdk/structure/src.json"
26+
},
27+
{
28+
"path": "./apps/tutorial-app/src/app",
29+
"contentUrl": "./steps/typescript-sdk/exercise.json"
30+
}
31+
],
32+
"solutionUrls": [
33+
{
34+
"path": "./apps/tutorial-app/src/app",
35+
"contentUrl": "./steps/typescript-sdk/solution.json"
36+
}
37+
],
38+
"mode": "interactive",
39+
"commands": [
40+
"npm install --legacy-peer-deps --ignore-scripts --force",
41+
"npm run ng run tutorial-app:serve"
42+
]
43+
}
1144
},
1245
{
1346
"stepTitle": "Customize your fetch client with plugins",

0 commit comments

Comments
 (0)