# Components and features provided by prestations-ng (Standalone)

As of this version, all prestations-ng components and directives are **standalone**.
There are no more `NgModule`s — components are imported directly in the `imports` array of other standalone components, and providers are configured via `provide*()` functions.

## Core setup (required)

[providePrestationsNgCore](projects/prestations-ng/src/provide-prestations-ng-core.ts)

Provides the core prestations-ng configuration: HTTP interceptors, chunk load error handling, and FontAwesome configuration.

**IMPORTANT**: this function **MUST** be called in the providers of `bootstrapApplication`.

```typescript
import { bootstrapApplication } from '@angular/platform-browser';
import { providePrestationsNgCore } from '@dsivd/prestations-ng/provide-prestations-ng-core';
import { provideRouter } from '@angular/router';

import { AppComponent } from './app/app.component';
import { routes } from './app/app.routes';

bootstrapApplication(AppComponent, {
    providers: [providePrestationsNgCore(), provideRouter(routes)],
});
```

Provides:

- `IamExpiredInterceptorService` (HTTP interceptor)
- `oidcNotAuthenticatedInterceptor` (functional interceptor)
- `ChunkLoadErrorHandler` (ErrorHandler)
- FontAwesome configuration (disables CSS auto-injection for CSP compliance)

## Formatter Directives

Import the standalone directives directly:

- `CurrencyFormatterDirective` — selector `currencyFormatter`
- `NdcFormatterDirective` — selector `ndcFormatter`
- `IdeFormatterDirective` — selector `ideFormatter`
- `IbanFormatterDirective` — selector `ibanFormatter`

```typescript
import { CurrencyFormatterDirective } from '@dsivd/prestations-ng';

@Component({
    imports: [CurrencyFormatterDirective]
})
```

## Pipes

Import the standalone pipes directly:

- `DisplayDatePipe` — `displayDate`
- `FormatIdePipe` — `formatIde`
- `CurrencyPipe` — `currency`
- `SdkDictionaryPipe` — `fromDictionary`

```typescript
import { DisplayDatePipe, SdkDictionaryPipe } from '@dsivd/prestations-ng';

@Component({
    imports: [DisplayDatePipe, SdkDictionaryPipe]
})
```

## Foehn Input

Standalone components for input fields:

- `FoehnInputTextComponent` — `foehn-input-text`
- `FoehnInputNumberComponent` — `foehn-input-number`
- `FoehnInputEmailComponent` — `foehn-input-email`
- `FoehnInputHiddenComponent` — `foehn-input-hidden`
- `FoehnInputPasswordComponent` — `foehn-input-password`
- `FoehnInputTextareaComponent` — `foehn-input-textarea`
- `FoehnInputPhoneComponent` — `foehn-input-phone`
- `FoehnInputPrefixedTextComponent` — `foehn-input-prefixed-text`
- `FoehnInputDateComponent` — `foehn-date`
- `FoehnInputDateTimeComponent` — `foehn-date-time`
- `FoehnInputTimeComponent` — `foehn-time`

## Foehn Checkable

Standalone components for checkable/selectable fields:

- `FoehnCheckboxComponent` — `foehn-checkbox` (multiple only; for a simple checkbox use `foehn-boolean-checkbox`)
- `FoehnRadioComponent` — `foehn-radio`
- `FoehnSelectComponent` — `foehn-select`

## Foehn Autocomplete

- `FoehnAutocompleteComponent` — `foehn-autocomplete`
- `FoehnMultiselectAutocompleteComponent` — `foehn-multiselect-autocomplete`

## Foehn Address

- `FoehnInputAddressComponent` — `foehn-input-address`
- `FoehnDisplayAddressComponent` — `foehn-display-address`
- `FoehnInputForeignLocalityComponent` — `foehn-input-foreign-locality`
- `FoehnInputForeignStreetComponent` — `foehn-input-foreign-street`

## Foehn Boolean

- `FoehnBooleanCheckboxComponent` — `foehn-boolean-checkbox`
- `FoehnBooleanRadioComponent` — `foehn-boolean-radio`

## Foehn Breadcrumb

- `FoehnBreadcrumbComponent` — `foehn-breadcrumb`

## Foehn Header

- `FoehnHeaderComponent` — `foehn-header`
- `FoehnSkipLinkComponent` — `foehn-skip-link`

## Foehn Footer

- `FoehnFooterComponent` — `foehn-footer`

## Foehn Form

- `FoehnFormComponent` — `foehn-form`

## Foehn Growl

- `FoehnGrowlComponent` — `foehn-growl`

## Foehn Icons

Standalone icon components:

- `FoehnIconCalendarComponent` — `foehn-icon-calendar`
- `FoehnIconCheckComponent` — `foehn-icon-check`
- `FoehnIconCheckSquareOComponent` — `foehn-icon-check-square-o`
- `FoehnIconChevronDownComponent` — `foehn-icon-chevron-down`
- `FoehnIconChevronUpComponent` — `foehn-icon-chevron-up`
- `FoehnIconChevronRightComponent` — `foehn-icon-chevron-right`
- `FoehnIconChevronLeftComponent` — `foehn-icon-chevron-left`
- `FoehnIconClockComponent` — `foehn-icon-clock`
- `FoehnIconCommentDotsComponent` — `foehn-icon-comment-dots`
- `FoehnIconEditComponent` — `foehn-icon-edit`
- `FoehnIconExternalLinkAltComponent` — `foehn-icon-external-link-alt`
- `FoehnIconInfoCircleComponent` — `foehn-icon-info-circle`
- `FoehnIconLockComponent` — `foehn-icon-lock`
- `FoehnIconMapMarkerComponent` — `foehn-icon-map-marker`
- `FoehnIconMinusCircleComponent` — `foehn-icon-minus-circle`
- `FoehnIconPlusCircleComponent` — `foehn-icon-plus-circle`
- `FoehnIconPlusSquareComponent` — `foehn-icon-plus-square`
- `FoehnIconSearchComponent` — `foehn-icon-search`
- `FoehnIconTimesComponent` — `foehn-icon-times`
- `FoehnIconTrashAltComponent` — `foehn-icon-trash-alt`
- `FoehnIconUnlockAltComponent` — `foehn-icon-unlock-alt`
- `FoehnIconFilePdfComponent` — `foehn-icon-file-pdf`
- `FoehnIconPencilComponent` — `foehn-icon-pencil`
- `FoehnIconUserComponent` — `foehn-icon-user`

## Foehn List

- `FoehnListComponent` — `foehn-list`

## Foehn Table

- `FoehnTableComponent` — `foehn-table`

## Foehn Modal

- `FoehnModalComponent` — `foehn-modal`
- `FoehnPageModalComponent` — `foehn-page-modal`

## Foehn Help Modal

- `FoehnHelpModalComponent` — `foehn-help-modal`

## Foehn Confirm Modal

- `FoehnConfirmModalComponent` — `foehn-confirm-modal`
- `FoehnConfirmModalService` — injectable service

## Foehn Input Nav13 (AVS)

- `FoehnInputNav13Component` — `foehn-input-nav13`

## Foehn Navigation

- `FoehnNavigationComponent` — `foehn-navigation`
- `FoehnSimpleNavigationComponent` — `foehn-simple-navigation`
- `FoehnNavigationService` — injectable service

## Foehn Not Found

- `FoehnNotfoundComponent` — `foehn-notfound` (can be used in the router)

## Foehn Page

- `FoehnPageComponent` — `foehn-page`
- `FoehnPageCounterComponent` — `foehn-page-counter`
- `FoehnPageExpirationTimerComponent` — `foehn-page-expiration-timer`

## Foehn Status Progress Bar

- `FoehnStatusProgressBarComponent` — `foehn-status-progress-bar`

## Foehn Remaining Alerts Summary

- `FoehnRemainingAlertsSummaryComponent` — `foehn-remaining-alerts-summary`

## Foehn Validation Alert Summary

- `FoehnValidationAlertSummaryComponent` — `foehn-validation-alert-summary`

## Foehn Validation Alerts

- `FoehnValidationAlertsComponent` — `foehn-validation-alerts`

## GesDem Confirmation Page

- `GesdemConfirmationComponent` — `gesdem-confirmation` (can be used in the router or as a super-class)

## GesDem Error Page

- `GesdemErrorComponent` — `gesdem-error` (can be used in the router)

## SDK Dictionary

- `SdkDictionaryService` — injectable service
- `SdkDictionaryPipe` — pipe `fromDictionary`

## SDK Captcha

- `SdkRecaptchaComponent` — `captcha`
- `RecaptchaService` — injectable service

## SDK Redirect

- `RedirectComponent` — `redirector`

## Foehn Multi Upload

- `FoehnMultiUploadComponent` — `foehn-multi-upload`

## Foehn Bo Multi Upload

- `FoehnBoMultiUploadComponent` — `foehn-bo-multi-upload`

## Foehn Picture Upload

- `FoehnPictureUploadComponent` — `foehn-picture-upload`

## Foehn Upload Progress Bar

- `FoehnUploadProgressBarComponent` — `foehn-upload-progress-bar`
- `FoehnGlobalUploadProgressBarComponent` — `foehn-global-upload-progress-bar`

## Foehn Recap Section

- `FoehnRecapSectionComponent` — `foehn-recap-section`

## Foehn User Connected As

- `FoehnUserConnectedAsComponent` — `foehn-user-connected-as`

## Foehn Miscellaneous

- `FoehnAbbrComponent` — `foehn-abbr`

## Foehn Menu Prestation

- `FoehnErrorPillComponent` — `foehn-error-pill`
- `FoehnMenuItemComponent` — `foehn-menu-item`
- `FoehnMenuItemTransmitComponent` — `foehn-menu-item-transmit`
- `FoehnListSummaryComponent` — `foehn-list-summary`

## Foehn Date Picker

- `FoehnDatePickerComponent` — `foehn-date-picker`
- `FoehnDatePickerButtonComponent` — `foehn-date-picker-button`

## Foehn Decision Electronique

- `FoehnDecisionElectroniqueComponent` — `foehn-decision-electronique`

## Foehn Agenda

- `FoehnAgendaComponent` — `foehn-agenda`
- `FoehnAgendaNavigationComponent` — `foehn-agenda-navigation`
- `FoehnAgendaTimeslotPanelComponent` — `foehn-agenda-timeslot-panel`

## Foehn Dropdown Menu

- `FoehnDropdownMenuComponent` — `foehn-dropdown-menu`

## Foehn Feedback Notification

- `FoehnFeedbackNotificationComponent` — `foehn-feedback-notification`

## SDK Payment (ePayment)

- `SdkEpaymentComponent` — `sdk-epayment`
- `PendingPaymentComponent` — `pending-payment`
- `SdkEpaymentService` — injectable service

## GesDem Action Recovery

- `GesdemActionRecoveryLoginComponent` — login recovery component
- `GesdemActionRecoveryRegistrationComponent` — registration recovery component

## Foehn Transmit Waiting Modal

- `FoehnTransmitWaitingModalComponent` — `foehn-transmit-waiting-modal`
- `FoehnTransmitWaitingModalService` — injectable service

---

## Migrating from NgModules

If you are migrating from a previous version that uses NgModules:

1. **Replace `PrestationsNgCoreModule`** with `providePrestationsNgCore()` in the providers of `bootstrapApplication`.

2. **Remove all module imports** (`FoehnInputModule`, `FoehnCheckablesModule`, etc.) and import standalone components directly in the `imports` array of your components.

3. **Convert your components to standalone** and directly import the prestations-ng components you need:

```typescript
// Before (with NgModule)
@NgModule({
    imports: [FoehnInputModule, FoehnCheckablesModule],
    declarations: [MyPageComponent],
})
export class MyPageModule {}

// After (standalone) (no need to add "standalone: true" because it's the default behavior)
@Component({
    imports: [FoehnInputTextComponent, FoehnSelectComponent],
    templateUrl: './my-page.component.html',
})
export class MyPageComponent {}
```

4. **Replace module-based `loadChildren`** with route files:

```typescript
// Before
{ path: 'page', loadChildren: () => import('./page/page.module').then(m => m.PageModule) }

// After
{ path: 'page', loadChildren: () => import('./page/page.routes').then(m => m.ROUTES) }
```
