Skip to content

Commit

Permalink
Merge branch 'v18' of https://github.com/primefaces/primeng into v18
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Nov 15, 2024
2 parents 81029e0 + 2a803b0 commit a8371c1
Show file tree
Hide file tree
Showing 468 changed files with 4,060 additions and 496 deletions.
8 changes: 0 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,5 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"workbench.colorCustomizations": {
"commandCenter.border": "#15202b99",
"sash.hoverBorder": "#d0b79e",
"titleBar.activeBackground": "#c09d7b",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#c09d7b99",
"titleBar.inactiveForeground": "#15202b99"
}
}
11 changes: 6 additions & 5 deletions apps/showcase/doc/configuration/configurationdoc.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CspDoc } from './cspdoc';
import { DynamicDoc } from './dynamicdoc';
import { FilterModeDoc } from './filtermodedoc';
import { ImportDoc } from './importdoc';
import { ApiDoc } from './locale/apidoc';
import { NgxTranslateDoc } from './locale/ngx-translatedoc';
import { RepositoryDoc } from './locale/repositorydoc';
import { SetLocaleDoc } from './locale/setlocaledoc';
import { RuntimeDoc } from './locale/runtimedoc';
import { TranslationDoc } from './locale/translationdoc';
import { ProviderDoc } from './providerdoc';
import { RippleDoc } from './rippledoc';
import { ThemingDoc } from './themingdoc';
import { ThemeDoc } from './themedoc';
import { ZIndexDoc } from './zindexdoc';

@NgModule({
imports: [CommonModule, AppCodeModule, AppDocModule, RouterModule],
exports: [AppDocModule],
declarations: [FilterModeDoc, ImportDoc, CspDoc, RippleDoc, ZIndexDoc, NgxTranslateDoc, ApiDoc, RepositoryDoc, SetLocaleDoc, ThemingDoc]
declarations: [FilterModeDoc, ProviderDoc, DynamicDoc, CspDoc, RippleDoc, ZIndexDoc, RuntimeDoc, ApiDoc, RepositoryDoc, TranslationDoc, ThemeDoc]
})
export class ConfigurationDocModule {}
9 changes: 5 additions & 4 deletions apps/showcase/doc/configuration/cspdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import { Component } from '@angular/core';
})
export class CspDoc {
code: Code = {
basic: `constructor(private primengConfig: PrimeNGConfig) {
this.config.csp.set({nonce: '...'});
}
`
typescript: `providePrimeNG({
csp: {
nonce: '...'
}
})`
};
}
31 changes: 31 additions & 0 deletions apps/showcase/doc/configuration/dynamicdoc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Code } from '@/domain/code';
import { Component } from '@angular/core';

@Component({
selector: 'dynamic-doc',
template: `
<app-docsectiontext>
<p>Inject the <i>PrimeNG</i> to your application to update the initial configuration at runtime.</p>
</app-docsectiontext>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
`
})
export class DynamicDoc {
code: Code = {
typescript: `import { Component, OnInit } from '@angular/core';
import { PrimeNG } from 'primeng/config';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
constructor(private primeng: PrimeNG) {}
ngOnInit() {
this.primeng.ripple.set(true);
}
}`
};
}
17 changes: 0 additions & 17 deletions apps/showcase/doc/configuration/importdoc.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import { Component } from '@angular/core';
selector: 'ngx-translate-doc',
template: `
<app-docsectiontext>
<p>i18n API can easily be integrated with 3rd party libraries such as ngx-translate that even allows dynamically changing the language in the application.</p>
<p>The translations can be changed dynamically at runtime, here is an example with ngx-translate.</p>
</app-docsectiontext>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
`
})
export class NgxTranslateDoc {
export class RuntimeDoc {
code: Code = {
typescript: `
import { Component, OnInit } from '@angular/core';
import { PrimeNGConfig } from 'primeng/api';
import { PrimeNG } from 'primeng/config';
import { TranslateService } from '@ngx-translate/core';
@Component({
Expand All @@ -23,15 +23,15 @@ import { TranslateService } from '@ngx-translate/core';
})
export class AppComponent implements OnInit {
constructor(private config: PrimeNGConfig, private translateService: TranslateService) {}
constructor(private config: PrimeNG, private translateService: TranslateService) {}
ngOnInit() {
this.translateService.setDefaultLang('en');
}
translate(lang: string) {
this.translateService.use(lang);
this.translateService.get('primeng').subscribe(res => this.config.setTranslation(res));
this.translateService.get('primeng').subscribe(res => this.primeng.setTranslation(res));
}
}`
};
Expand Down
39 changes: 0 additions & 39 deletions apps/showcase/doc/configuration/locale/setlocaledoc.ts

This file was deleted.

23 changes: 23 additions & 0 deletions apps/showcase/doc/configuration/locale/translationdoc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Code } from '@/domain/code';
import { Component } from '@angular/core';

@Component({
selector: 'translation-doc',
template: `
<app-docsectiontext>
<p>A translation is specified using the translation property during initialization.</p>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
</app-docsectiontext>
`
})
export class TranslationDoc {
code: Code = {
typescript: `providePrimeNG({
translation: {
accept: 'Aceptar',
reject: 'Rechazar',
//translations
}
})`
};
}
26 changes: 26 additions & 0 deletions apps/showcase/doc/configuration/providerdoc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Code } from '@/domain/code';
import { Component } from '@angular/core';

@Component({
selector: 'provider-doc',
template: `
<app-docsectiontext>
<p>The initial configuration is defined by the <i>providePrimeNG</i> provider during application startup.</p>
</app-docsectiontext>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
`
})
export class ProviderDoc {
code: Code = {
typescript: `import { ApplicationConfig } from '@angular/core';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { providePrimeNG } from 'primeng/config';
export const appConfig: ApplicationConfig = {
providers: [
provideAnimationsAsync(),
providePrimeNG({ /* options */ })
]
};`
};
}
20 changes: 4 additions & 16 deletions apps/showcase/doc/configuration/rippledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,15 @@ import { Component } from '@angular/core';
selector: 'ripple-doc',
template: `
<app-docsectiontext>
<p>Ripple is an optional animation for the supported components such as buttons. It is disabled by default and needs to be enabled globally by injecting <i>PrimeNGConfig</i>.</p>
<p>Ripple is an optional animation for the supported components such as buttons. It is disabled by default.</p>
</app-docsectiontext>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
`
})
export class RippleDoc {
code: Code = {
typescript: `import { Component, OnInit } from '@angular/core';
import { PrimeNGConfig } from 'primeng/api';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
constructor(private primengConfig: PrimeNGConfig) {}
ngOnInit() {
this.primengConfig.ripple.set(true);
}
}`
typescript: `providePrimeNG({
ripple: true
})`
};
}
37 changes: 37 additions & 0 deletions apps/showcase/doc/configuration/themedoc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Code } from '@/domain/code';
import { Component } from '@angular/core';

@Component({
selector: 'theming-doc',
template: `
<app-docsectiontext>
<p>PrimeNG provides 4 predefined themes out of the box; Aura, Material, Lara and Nora. See the <a routerLink="/theming">theming</a> documentation for details.</p>
</app-docsectiontext>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
`
})
export class ThemeDoc {
code: Code = {
typescript: `import { ApplicationConfig } from '@angular/core';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { providePrimeNG } from 'primeng/config';
import Aura from '@primeng/themes/aura';
export const appConfig: ApplicationConfig = {
providers: [
provideAnimationsAsync(),
providePrimeNG({
theme: {
preset: Aura,
options: {
prefix: 'p',
darkModeSelector: 'system',
cssLayer: false
}
}
})
]
};`
};
}
48 changes: 0 additions & 48 deletions apps/showcase/doc/configuration/themingdoc.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/showcase/doc/configuration/zindexdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Component } from '@angular/core';
layout where header section is fixed. In a case like this, dropdown needs to be displayed below the application header but a modal dialog should be displayed above. PrimeNG configuration offers the <i>zIndex</i> property to customize
the default values for components categories. Default values are described below and can be customized when setting up PrimeNG.
</p>
<p class="doc-section-description">The ZIndex of all components is increased according to their groups in harmony with each other. When <i>autoZIndex</i> is false, each group increments its zIndex within itself.</p>
</app-docsectiontext>
<app-code [code]="code" [hideToggleCode]="true"></app-code>
`
Expand Down
Loading

0 comments on commit a8371c1

Please sign in to comment.