@payex-ds/angular 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ import { PdsValueAccessorBase, type PdsControlConfig } from '../lib/value-accessor';
2
+ import * as i0 from "@angular/core";
3
+ /** Form-associated elements found in the manifest and how their value is read. */
4
+ export declare const PDS_FORM_CONTROLS: Readonly<Record<string, PdsControlConfig>>;
5
+ /** `ControlValueAccessor` for every form control: works with `formControlName`, `formControl` and `ngModel`. */
6
+ export declare class PdsValueAccessor extends PdsValueAccessorBase {
7
+ constructor();
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<PdsValueAccessor, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PdsValueAccessor, "pds-checkbox[formControlName],pds-checkbox[formControl],pds-checkbox[ngModel],pds-datepicker[formControlName],pds-datepicker[formControl],pds-datepicker[ngModel],pds-input[formControlName],pds-input[formControl],pds-input[ngModel],pds-radio-group[formControlName],pds-radio-group[formControl],pds-radio-group[ngModel],pds-rangeslider[formControlName],pds-rangeslider[formControl],pds-rangeslider[ngModel],pds-select[formControlName],pds-select[formControl],pds-select[ngModel],pds-togglebox[formControlName],pds-togglebox[formControl],pds-togglebox[ngModel]", never, {}, {}, never, never, true, never>;
10
+ }
package/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export * from './generated/components';
2
+ export * from './generated/value-accessor';
3
+ export * from './generated/all';
4
+ export { PdsComponentBase } from './lib/component-base';
5
+ export { PdsValueAccessorBase, type PdsControlConfig } from './lib/value-accessor';
6
+ export { provideDesignSystem, type DesignSystemConfig } from './lib/provide-design-system';
7
+ export { ds, type InitOptions } from '@payex-ds/core';
@@ -0,0 +1,12 @@
1
+ import { type EventEmitter } from '@angular/core';
2
+ /** Shared plumbing for generated components; the component itself IS the custom element host. */
3
+ export declare abstract class PdsComponentBase<E extends HTMLElement = HTMLElement> {
4
+ protected readonly pdsHost: E;
5
+ private readonly pdsZone;
6
+ private readonly pdsDestroyRef;
7
+ /** Defines the element and upgrades the host before Angular assigns inputs. */
8
+ protected constructor(define: () => void);
9
+ protected pdsSetProperty(name: keyof E & string, value: unknown): void;
10
+ protected pdsSetAttribute(name: string, value: unknown): void;
11
+ protected pdsForward(eventName: string, emitter: EventEmitter<CustomEvent>): void;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { type EnvironmentProviders } from '@angular/core';
2
+ import { type InitOptions } from '@payex-ds/core';
3
+ export type DesignSystemConfig = Omit<InitOptions, 'design'> & {
4
+ /** Key of the published design, e.g. `payex`. */
5
+ design: string;
6
+ /** Inline design object (maps to `InitOptions.design`) for offline use. */
7
+ inlineDesign?: unknown;
8
+ };
9
+ /** Loads the design before the application bootstraps. Use in `bootstrapApplication(..., { providers })`. */
10
+ export declare function provideDesignSystem(config: DesignSystemConfig): EnvironmentProviders;
@@ -0,0 +1,21 @@
1
+ import type { ControlValueAccessor } from '@angular/forms';
2
+ export interface PdsControlConfig {
3
+ /** Element property holding the control value. */
4
+ property: 'value' | 'checked';
5
+ /** DOM events that signal a user change. */
6
+ events: readonly string[];
7
+ }
8
+ /** Generic `ControlValueAccessor`; the generated directive supplies selectors and the per-tag config. */
9
+ export declare class PdsValueAccessorBase implements ControlValueAccessor {
10
+ private readonly host;
11
+ private readonly zone;
12
+ private readonly config;
13
+ private onChange;
14
+ private onTouched;
15
+ constructor(controls: Readonly<Record<string, PdsControlConfig>>);
16
+ writeValue(value: unknown): void;
17
+ registerOnChange(fn: (value: unknown) => void): void;
18
+ registerOnTouched(fn: () => void): void;
19
+ setDisabledState(isDisabled: boolean): void;
20
+ private read;
21
+ }
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@payex-ds/angular",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Angular wrappers for the PayEx design system web components",
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "directory": "dist"
9
+ },
10
+ "peerDependencies": {
11
+ "@angular/core": ">=18.0.0",
12
+ "@angular/forms": ">=18.0.0"
13
+ },
14
+ "dependencies": {
15
+ "tslib": "^2.6.0",
16
+ "@payex-ds/core": "0.1.0"
17
+ },
18
+ "module": "fesm2022/payex-ds-angular.mjs",
19
+ "typings": "index.d.ts",
20
+ "exports": {
21
+ "./package.json": {
22
+ "default": "./package.json"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "esm2022": "./esm2022/payex-ds-angular.mjs",
27
+ "esm": "./esm2022/payex-ds-angular.mjs",
28
+ "default": "./fesm2022/payex-ds-angular.mjs"
29
+ }
30
+ },
31
+ "sideEffects": false
6
32
  }