angular-ui-controls 0.0.0-stage → 0.1.0-rc.4

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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -2
  3. package/docs/api/README.md +29 -0
  4. package/docs/api/abbreviation-textarea.md +118 -0
  5. package/docs/api/action-menu.md +86 -0
  6. package/docs/api/advanced-select.md +214 -0
  7. package/docs/api/autocomplete.md +134 -0
  8. package/docs/api/checkbox.md +98 -0
  9. package/docs/api/date-picker.md +152 -0
  10. package/docs/api/date-range-picker.md +175 -0
  11. package/docs/api/date-time-picker.md +159 -0
  12. package/docs/api/file-upload.md +85 -0
  13. package/docs/api/number-input.md +162 -0
  14. package/docs/api/password-input.md +142 -0
  15. package/docs/api/pdf-viewer.md +50 -0
  16. package/docs/api/radio-group.md +126 -0
  17. package/docs/api/rich-text-editor.md +86 -0
  18. package/docs/api/search-filter.md +192 -0
  19. package/docs/api/search-input.md +160 -0
  20. package/docs/api/searchable-select.md +195 -0
  21. package/docs/api/segmented-control.md +93 -0
  22. package/docs/api/selection-list.md +120 -0
  23. package/docs/api/slide-toggle.md +105 -0
  24. package/docs/api/text-area.md +148 -0
  25. package/docs/api/text-input.md +159 -0
  26. package/docs/api/time-input.md +99 -0
  27. package/docs/api/time-picker.md +130 -0
  28. package/fesm2022/angular-ui-controls-editor-build-Cm2HSXEy.mjs +2 -0
  29. package/fesm2022/angular-ui-controls-editor-build-Cm2HSXEy.mjs.map +1 -0
  30. package/fesm2022/angular-ui-controls-forms.mjs +865 -0
  31. package/fesm2022/angular-ui-controls-forms.mjs.map +1 -0
  32. package/fesm2022/angular-ui-controls-text-input.mjs +1210 -0
  33. package/fesm2022/angular-ui-controls-text-input.mjs.map +1 -0
  34. package/fesm2022/angular-ui-controls.mjs +7181 -0
  35. package/fesm2022/angular-ui-controls.mjs.map +1 -0
  36. package/forms/index.d.ts +425 -0
  37. package/forms/index.d.ts.map +1 -0
  38. package/index.d.ts +4345 -0
  39. package/index.d.ts.map +1 -0
  40. package/package.json +82 -3
  41. package/text-input/index.d.ts +609 -0
  42. package/text-input/index.d.ts.map +1 -0
@@ -0,0 +1,159 @@
1
+ # DateTimePickerComponent
2
+
3
+ Date and time in one control.
4
+
5
+ Selector `ui-date-time-picker`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { DateTimePickerComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `DateTimePickerComponent` to the host component's imports. Add `FormsModule` for this example.
14
+
15
+ ```html
16
+ <ui-date-time-picker inputId="dateTime" label="Date & time" [(ngModel)]="dateTime" />
17
+ ```
18
+
19
+ Example fields in the host component.
20
+
21
+ ```ts
22
+ dateTime: Date | null = null;
23
+ ```
24
+
25
+ Use Angular Forms or `[(value)]` for binding. The tables include inherited bindings. The Required column refers to whether the template must supply the input.
26
+
27
+ ## Inputs
28
+
29
+ | Input | Type | Required | Default | Description |
30
+ | ---------------------- | ------------------ | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
31
+ | `label` | `string` | No | `''` | Label text or translation key displayed for this control. |
32
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
33
+ | `errorMessage` | `string` | No | `''` | Error message displayed for validation. |
34
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
35
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
36
+ | `placeholder` | `string` | No | `''` | Hint text or translation key displayed while the control is empty. |
37
+ | `readonly` | `boolean` | No | `false` | Requests the existing read-only behavior without disabling the parent form control. |
38
+ | `autoPopulateDateTime` | `boolean` | No | `true` | Automatically populate current date-time. |
39
+ | `minDate` | `Date` | No | `undefined` | Minimum selectable date-time. |
40
+ | `maxDate` | `Date` | No | `undefined` | Maximum selectable date-time. |
41
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
42
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
43
+ | `value` | `Date \| null` | No | `null` | Canonical value binding. Programmatic writes never emit user change events. |
44
+
45
+ ## Outputs
46
+
47
+ | Output | Payload | When it fires |
48
+ | ----------------- | -------------------------------- | ----------------------------------------------------------------------- |
49
+ | `dateChange` | `DateTimePickerDateChangeEvent` | Emits when the date-selection handler runs. |
50
+ | `modelChange` | `DateTimePickerModelChangeEvent` | Emits a model-change event with field metadata. |
51
+ | `changeCommitted` | `DateTimePickerChangeEvent` | Emits from the existing change handler. |
52
+ | `inputChanged` | `DateTimePickerInputEvent` | Emits when the user edits the field. |
53
+ | `focusGained` | `DateTimePickerFocusEvent` | Emits when the inner field gains focus. |
54
+ | `focusLost` | `DateTimePickerBlurEvent` | Emits when the inner field loses focus. |
55
+ | `keyPressed` | `DateTimePickerKeydownEvent` | Emits on the inner field keydown event. |
56
+ | `keyReleased` | `DateTimePickerKeyupEvent` | Emits on the inner field keyup event. |
57
+ | `enterPressed` | `DateTimePickerKeyEnter` | Emits when Enter is released in the inner field. |
58
+ | `valueChange` | `Date \| null` | Emits the raw value once per committed user edit. Supports `[(value)]`. |
59
+
60
+ ## Local option and event types
61
+
62
+ These declarations describe the payload and option shapes. Import availability depends on the package entry point.
63
+
64
+ ```ts
65
+ export interface DateTimePickerDateChangeEvent extends DateTimePickerFieldInfo {
66
+ /** Date-time picker change value */
67
+ dateChangeEvent: NgxMatDatepickerInputEvent<any, any>;
68
+ }
69
+
70
+ export interface DateTimePickerFieldInfo {
71
+ /** Current date-time value */
72
+ modelValue: Date;
73
+
74
+ /** Field name provided by parent */
75
+ textFieldName: string | number;
76
+
77
+ /** Native input element reference (if inputId provided) */
78
+ inputRef?: Element | null;
79
+ }
80
+
81
+ export interface DateTimePickerModelChangeEvent extends DateTimePickerFieldInfo {
82
+ /** Updated model value */
83
+ modelChangeEvent: Date;
84
+ }
85
+
86
+ export interface DateTimePickerChangeEvent extends DateTimePickerFieldInfo {
87
+ /** Native change event */
88
+ changeEvent: Event;
89
+ }
90
+
91
+ export interface DateTimePickerInputEvent extends DateTimePickerFieldInfo {
92
+ /** Native input event */
93
+ inputChangeEvent: Event;
94
+ }
95
+
96
+ export interface DateTimePickerFocusEvent extends DateTimePickerFieldInfo {
97
+ /** Native focus event */
98
+ focusEvent: FocusEvent;
99
+ }
100
+
101
+ export interface DateTimePickerBlurEvent extends DateTimePickerFieldInfo {
102
+ /** Native blur event */
103
+ blurEvent: FocusEvent;
104
+ }
105
+
106
+ export interface DateTimePickerKeydownEvent extends DateTimePickerFieldInfo {
107
+ /** Native keyboard event */
108
+ keyDownEvent: KeyboardEvent;
109
+ }
110
+
111
+ export interface DateTimePickerKeyupEvent extends DateTimePickerFieldInfo {
112
+ /** Native keyboard event */
113
+ keyUpEvent: KeyboardEvent;
114
+ }
115
+
116
+ export interface DateTimePickerKeyEnter extends DateTimePickerFieldInfo {
117
+ /** Native keyboard event */
118
+ keyDownEvent: KeyboardEvent;
119
+ }
120
+ ```
121
+
122
+ ## Public instance properties
123
+
124
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
125
+
126
+ | Property | Type | Description |
127
+ | ------------------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
128
+ | `pickerWithActions` | `NgxMatDatetimepicker<any>` | — |
129
+ | `modelValue` | `Date` | Internal model getter/setter backed by the shared control value. |
130
+ | `onChangeCallback` | `(value: T \| null) => void` | Standard change and touch callbacks. |
131
+ | `onTouchedCallback` | `() => void` | — |
132
+ | `effectiveId` | `string` | Plain string property bound in template [id]="effectiveId" (zero function or CD overhead). |
133
+
134
+ ## Public instance methods
135
+
136
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
137
+
138
+ | Method | Signature | Description |
139
+ | ------------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
140
+ | `isApplyDisabled` | `(_picker?: unknown): boolean` | Compatibility helper. The picker input validates min/max through its public API. |
141
+ | `handleDateChange` | `(dateChange: NgxMatDatepickerInputEvent<any, any>): void` | Handles date-time picker change event. |
142
+ | `handleModelChange` | `(modelValueChange: Date): void` | Handles ngModel value change. |
143
+ | `onFocus` | `(onFocus: FocusEvent): void` | Handles focus event. |
144
+ | `onBlur` | `(onBlur: FocusEvent): void` | Handles blur event. |
145
+ | `onKeyUp` | `(onKeyUp: KeyboardEvent): void` | Handles keyup event. |
146
+ | `onKeyDown` | `(onKeyDown: KeyboardEvent): void` | Handles keydown event. |
147
+ | `onInput` | `(onInputChange: Event): void` | Handles input event. |
148
+ | `onChangeHandler` | `(changeEvent: Event): void` | Handles change event. |
149
+ | `onPickerOpened` | `(): void` | Kept for callers; defaultTime and startAt configure the public picker API. |
150
+ | `onEnter` | `(event: Event): void` | — |
151
+ | `configureId` | `(): void` | — |
152
+ | `commitValue` | `(value?: Date \| null): void` | Commit a view edit after the inner control has updated its local model. |
153
+ | `handleFocusOut` | `(event: FocusEvent): void` | Touch the outer control only when focus leaves the whole composite control. |
154
+ | `writeValue` | `(value: Date \| null): void` | Writes a new value from the form model to the view. |
155
+ | `registerOnChange` | `(fn: (value: Date \| null) => void): void` | Registers a callback function that is called when the control's value changes in the UI. |
156
+ | `registerOnTouched` | `(fn: () => void): void` | Registers a callback function that is called when the control is touched. |
157
+ | `setDisabledState` | `(isDisabled: boolean): void` | Updates the disabled state from the form model. |
158
+
159
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/date-time-picker/date-time-picker.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)
@@ -0,0 +1,85 @@
1
+ # FileUploadComponent
2
+
3
+ Local file selection.
4
+
5
+ Selector `ui-file-upload`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { FileUploadComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `FileUploadComponent` to the host component's imports. Add `FormsModule` for this example.
14
+
15
+ ```html
16
+ <ui-file-upload inputId="attachment" [(ngModel)]="uploadedFiles" />
17
+ ```
18
+
19
+ Example fields in the host component.
20
+
21
+ ```ts
22
+ uploadedFiles: FileList | null = null;
23
+ ```
24
+
25
+ Use Angular Forms or `[(value)]` for binding. The tables include inherited bindings. The Required column refers to whether the template must supply the input.
26
+
27
+ ## Inputs
28
+
29
+ | Input | Type | Required | Default | Description |
30
+ | --------------- | ------------------ | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
31
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
32
+ | `placeholder` | `string` | No | `'Select File'` | Hint text or translation key displayed while the control is empty. |
33
+ | `errorMessage` | `string` | No | `''` | Validation error message for empty/required fields. |
34
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
35
+ | `accept` | `string` | No | `''` | File types allowed (e.g. '.csv, .xlsx', 'image/\*', '.pdf'). |
36
+ | `showClearIcon` | `boolean` | No | `true` | Shows the clear button when a file is selected. |
37
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
38
+ | `showDropZone` | `boolean` | No | `false` | Uses the existing drag/drop presentation with multiple file selection; false uses the single-file browse presentation. |
39
+ | `multiple` | `boolean \| null` | No | `null` | Allow multiple files independently of the visual drop zone. |
40
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
41
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
42
+ | `value` | `any` | No | `null` | Canonical value binding. Programmatic writes never emit user change events. |
43
+
44
+ ## Outputs
45
+
46
+ | Output | Payload | When it fires |
47
+ | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
48
+ | `fileSelected` | `any` | Emits after selected files pass the configured extension/MIME checks. Emits `{ files: FileList; fileName: string; fieldName: string \| number; }`. |
49
+ | `cleared` | `void` | Emits after the selected file is cleared. |
50
+ | `validationError` | `string` | Emits the validation message when a selected file fails the configured format check. |
51
+ | `valueChange` | `any` | Emits the raw value once per committed user edit. Supports `[(value)]`. |
52
+
53
+ ## Public instance properties
54
+
55
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
56
+
57
+ | Property | Type | Description |
58
+ | ------------------------ | ---------------------------- | ------------------------------------------------------------------------------------------ |
59
+ | `fileName` | `string` | — |
60
+ | `selectedFiles` | `FileList \| null` | — |
61
+ | `isInvalidFile` | `boolean` | — |
62
+ | `fileFormatErrorMessage` | `string` | — |
63
+ | `acceptedFiles` | `string` | — |
64
+ | `onChangeCallback` | `(value: T \| null) => void` | Standard change and touch callbacks. |
65
+ | `onTouchedCallback` | `() => void` | — |
66
+ | `effectiveId` | `string` | Plain string property bound in template [id]="effectiveId" (zero function or CD overhead). |
67
+
68
+ ## Public instance methods
69
+
70
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
71
+
72
+ | Method | Signature | Description |
73
+ | ------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------- |
74
+ | `writeValue` | `(value: any): void` | — |
75
+ | `validateFile` | `(file: File): boolean` | — |
76
+ | `onFileChange` | `(event: Event): void` | — |
77
+ | `clearFile` | `(event: MouseEvent): void` | — |
78
+ | `configureId` | `(): void` | — |
79
+ | `commitValue` | `(value?: any \| null): void` | Commit a view edit after the inner control has updated its local model. |
80
+ | `handleFocusOut` | `(event: FocusEvent): void` | Touch the outer control only when focus leaves the whole composite control. |
81
+ | `registerOnChange` | `(fn: (value: any \| null) => void): void` | Registers a callback function that is called when the control's value changes in the UI. |
82
+ | `registerOnTouched` | `(fn: () => void): void` | Registers a callback function that is called when the control is touched. |
83
+ | `setDisabledState` | `(isDisabled: boolean): void` | Updates the disabled state from the form model. |
84
+
85
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/file-upload/file-upload.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)
@@ -0,0 +1,162 @@
1
+ # NumberInputComponent
2
+
3
+ Numeric values.
4
+
5
+ Selector `ui-number-input`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { NumberInputComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `NumberInputComponent` to the host component's imports. Add `FormsModule` for this example.
14
+
15
+ ```html
16
+ <ui-number-input
17
+ inputId="quantity"
18
+ label="Quantity"
19
+ [(ngModel)]="quantity"
20
+ [minValue]="0"
21
+ [maxValue]="100"
22
+ [allowDecimal]="false"
23
+ />
24
+ ```
25
+
26
+ Example fields in the host component.
27
+
28
+ ```ts
29
+ quantity = 1;
30
+ ```
31
+
32
+ Use Angular Forms or `[(value)]` for binding. The tables include inherited bindings. The Required column refers to whether the template must supply the input.
33
+
34
+ ## Inputs
35
+
36
+ | Input | Type | Required | Default | Description |
37
+ | --------------------- | ---------------------------------------- | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
38
+ | `preventCopyPasteCut` | `boolean` | No | `false` | Blocks copy, cut, and paste on the field when enabled. |
39
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
40
+ | `label` | `string` | No | `''` | Label text or translation key displayed for this control. |
41
+ | `errorMessage` | `string` | No | `''` | Error message displayed when validation fails. |
42
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
43
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
44
+ | `placeholder` | `string` | No | `''` | Hint text or translation key displayed while the control is empty. |
45
+ | `readonly` | `boolean` | No | `false` | Requests the existing read-only behavior without disabling the parent form control. |
46
+ | `inputType` | `'number' \| 'percentage' \| 'integers'` | No | `'number'` | Defines input behavior: number or percentage. |
47
+ | `textAlign` | `'left' \| 'right' \| 'center'` | No | `'left'` | Text alignment inside the input: 'left' \| 'right' \| 'center' (defaults to 'left'). |
48
+ | `maxDigits` | `number` | No | `undefined` | Maximum allowed digits. |
49
+ | `minValue` | `number` | No | `undefined` | Minimum allowed numeric value. |
50
+ | `maxValue` | `number` | No | `undefined` | Maximum allowed numeric value. |
51
+ | `allowDecimal` | `boolean` | No | `undefined` | Allows decimal values when true. |
52
+ | `decimalPlaces` | `number` | No | `undefined` | Maximum number of decimal places allowed. |
53
+ | `allowNegative` | `boolean` | No | `false` | Allows negative numbers when true. |
54
+ | `prefix` | `string` | No | `''` | Text displayed before the input value (e.g. '$', '+91', 'kg'). |
55
+ | `showPrefix` | `boolean` | No | `false` | Controls whether the prefix is rendered. Set to `true` only when the prefix should be visible. |
56
+ | `suffix` | `string` | No | `''` | Text displayed after the input, such as a unit or percentage sign. |
57
+ | `showSuffix` | `boolean` | No | `false` | Controls whether the suffix is rendered. |
58
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
59
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
60
+ | `value` | `number \| null` | No | `null` | Canonical value binding. Programmatic writes never emit user change events. |
61
+
62
+ ## Outputs
63
+
64
+ | Output | Payload | When it fires |
65
+ | -------------- | ----------------------------- | ----------------------------------------------------------------------- |
66
+ | `modelChange` | `NumberInputModelChangeEvent` | Emits a model-change event with field metadata. |
67
+ | `inputChanged` | `NumberInputInputEvent` | Emits when the user edits the field. |
68
+ | `focusGained` | `NumberInputFocusEvent` | Emits when the inner field gains focus. |
69
+ | `focusLost` | `NumberInputBlurEvent` | Emits when the inner field loses focus. |
70
+ | `keyPressed` | `NumberInputKeydownEvent` | Emits on the inner field keydown event. |
71
+ | `keyReleased` | `NumberInputKeyupEvent` | Emits on the inner field keyup event. |
72
+ | `enterPressed` | `NumberInputKeyEnterEvent` | Emits when Enter is released in the inner field. |
73
+ | `valueChange` | `number \| null` | Emits the raw value once per committed user edit. Supports `[(value)]`. |
74
+
75
+ ## Local option and event types
76
+
77
+ These declarations describe the payload and option shapes. Import availability depends on the package entry point.
78
+
79
+ ```ts
80
+ export interface NumberInputModelChangeEvent extends NumberInputFieldInfo {
81
+ /** Updated numeric value */
82
+ modelChangeEvent: number;
83
+ }
84
+
85
+ export interface NumberInputFieldInfo {
86
+ /** Current numeric value */
87
+ modelValue: number;
88
+
89
+ /** Field name provided by parent component */
90
+ textFieldName: string | number;
91
+
92
+ /** Native input element reference (if inputId exists) */
93
+ inputRef?: Element | null;
94
+ }
95
+
96
+ export interface NumberInputInputEvent extends NumberInputFieldInfo {
97
+ /** Native input/change event */
98
+ changeEvent: Event;
99
+ }
100
+
101
+ export interface NumberInputFocusEvent extends NumberInputFieldInfo {
102
+ /** Native focus event */
103
+ focusEvent: FocusEvent;
104
+ }
105
+
106
+ export interface NumberInputBlurEvent extends NumberInputFieldInfo {
107
+ /** Native blur event */
108
+ blurEvent: FocusEvent;
109
+ }
110
+
111
+ export interface NumberInputKeydownEvent extends NumberInputFieldInfo {
112
+ /** Native keyboard event */
113
+ keyDownEvent: KeyboardEvent;
114
+ }
115
+
116
+ export interface NumberInputKeyupEvent extends NumberInputFieldInfo {
117
+ /** Native keyboard event */
118
+ keyUpEvent: KeyboardEvent;
119
+ }
120
+
121
+ export interface NumberInputKeyEnterEvent extends NumberInputFieldInfo {
122
+ /** Enter key or input-related event */
123
+ keyEnterEvent: Event;
124
+ }
125
+ ```
126
+
127
+ ## Public instance properties
128
+
129
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
130
+
131
+ | Property | Type | Description |
132
+ | ------------------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
133
+ | `modelValue` | `number` | Internal model getter/setter backed by the shared control value. |
134
+ | `enablePrefix` | `boolean` | — |
135
+ | `enablePostfix` | `boolean` | — |
136
+ | `onChangeCallback` | `(value: T \| null) => void` | Standard change and touch callbacks. |
137
+ | `onTouchedCallback` | `() => void` | — |
138
+ | `effectiveId` | `string` | Plain string property bound in template [id]="effectiveId" (zero function or CD overhead). |
139
+
140
+ ## Public instance methods
141
+
142
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
143
+
144
+ | Method | Signature | Description |
145
+ | ------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------- |
146
+ | `modelValueChange` | `(modelChange: number): void` | Emits when the model value changes. |
147
+ | `inputChange` | `(changeValue: Event): void` | Emits when the input value changes. |
148
+ | `focusChange` | `(onFocus: FocusEvent): void` | Emits when input gains focus. |
149
+ | `blurChange` | `(blurEvent: FocusEvent): void` | Emits when input loses focus. |
150
+ | `keydownHandle` | `(event: KeyboardEvent): void` | Emits on keydown action. |
151
+ | `keyupHandle` | `(event: KeyboardEvent): void` | Emits on keyup action. |
152
+ | `keyEnterHandle` | `(event: Event): void` | Emits when Enter key is pressed. |
153
+ | `onWheel` | `(event: WheelEvent): void` | — |
154
+ | `configureId` | `(): void` | — |
155
+ | `commitValue` | `(value?: number \| null): void` | Commit a view edit after the inner control has updated its local model. |
156
+ | `handleFocusOut` | `(event: FocusEvent): void` | Touch the outer control only when focus leaves the whole composite control. |
157
+ | `writeValue` | `(value: number \| null): void` | Writes a new value from the form model to the view. |
158
+ | `registerOnChange` | `(fn: (value: number \| null) => void): void` | Registers a callback function that is called when the control's value changes in the UI. |
159
+ | `registerOnTouched` | `(fn: () => void): void` | Registers a callback function that is called when the control is touched. |
160
+ | `setDisabledState` | `(isDisabled: boolean): void` | Updates the disabled state from the form model. |
161
+
162
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/number-input/number-input.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)
@@ -0,0 +1,142 @@
1
+ # PasswordInputComponent
2
+
3
+ Password entry with a visibility toggle.
4
+
5
+ Selector `ui-password-input`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { PasswordInputComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `PasswordInputComponent` to the host component's imports. Add `FormsModule` for this example.
14
+
15
+ ```html
16
+ <ui-password-input inputId="password" label="Password" [(ngModel)]="password" />
17
+ ```
18
+
19
+ Example fields in the host component.
20
+
21
+ ```ts
22
+ password = '';
23
+ ```
24
+
25
+ Use Angular Forms or `[(value)]` for binding. The tables include inherited bindings. The Required column refers to whether the template must supply the input.
26
+
27
+ ## Inputs
28
+
29
+ | Input | Type | Required | Default | Description |
30
+ | --------------------- | ------------------ | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
31
+ | `preventCopyPasteCut` | `boolean` | No | `false` | Blocks copy, cut, and paste on the field when enabled. |
32
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
33
+ | `label` | `string` | No | `''` | Label text or translation key displayed for this control. |
34
+ | `errorMessage` | `string` | No | `''` | Error message shown when validation fails. |
35
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
36
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
37
+ | `placeholder` | `string` | No | `''` | Hint text or translation key displayed while the control is empty. |
38
+ | `readonly` | `boolean` | No | `false` | Requests the existing read-only behavior without disabling the parent form control. |
39
+ | `enableArabicInput` | `boolean` | No | `false` | Passes the Arabic typing flag to the existing utility directive. |
40
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
41
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
42
+ | `value` | `string \| null` | No | `null` | Canonical value binding. Programmatic writes never emit user change events. |
43
+
44
+ ## Outputs
45
+
46
+ | Output | Payload | When it fires |
47
+ | -------------- | ------------------------------- | ----------------------------------------------------------------------- |
48
+ | `modelChange` | `PasswordInputModelChangeEvent` | Emits a model-change event with field metadata. |
49
+ | `inputChanged` | `PasswordInputInputEvent` | Emits when the user edits the field. |
50
+ | `focusGained` | `PasswordInputFocusEvent` | Emits when the inner field gains focus. |
51
+ | `focusLost` | `PasswordInputBlurEvent` | Emits when the inner field loses focus. |
52
+ | `keyPressed` | `PasswordInputKeydownEvent` | Emits on the inner field keydown event. |
53
+ | `keyReleased` | `PasswordInputKeyupEvent` | Emits on the inner field keyup event. |
54
+ | `enterPressed` | `PasswordInputKeyEnterEvent` | Emits when Enter is released in the inner field. |
55
+ | `valueChange` | `string \| null` | Emits the raw value once per committed user edit. Supports `[(value)]`. |
56
+
57
+ ## Local option and event types
58
+
59
+ These declarations describe the payload and option shapes. Import availability depends on the package entry point.
60
+
61
+ ```ts
62
+ export interface PasswordInputModelChangeEvent extends PasswordInputFieldInfo {
63
+ /** Updated password value */
64
+ modelChangeEvent: string;
65
+ }
66
+
67
+ export interface PasswordInputFieldInfo {
68
+ /** Current password value */
69
+ modelValue: number;
70
+
71
+ /** Field name provided by parent component */
72
+ textFieldName: string | number;
73
+
74
+ /** Native input element reference (if inputId exists) */
75
+ inputRef?: Element | null;
76
+ }
77
+
78
+ export interface PasswordInputInputEvent extends PasswordInputFieldInfo {
79
+ /** Native input event */
80
+ inputChangeEvent: Event;
81
+ }
82
+
83
+ export interface PasswordInputFocusEvent extends PasswordInputFieldInfo {
84
+ /** Native focus event */
85
+ focusEvent: FocusEvent;
86
+ }
87
+
88
+ export interface PasswordInputBlurEvent extends PasswordInputFieldInfo {
89
+ /** Native blur event */
90
+ blurEvent: FocusEvent;
91
+ }
92
+
93
+ export interface PasswordInputKeydownEvent extends PasswordInputFieldInfo {
94
+ /** Native keyboard event */
95
+ keyDownEvent: KeyboardEvent;
96
+ }
97
+
98
+ export interface PasswordInputKeyupEvent extends PasswordInputFieldInfo {
99
+ /** Native keyboard event */
100
+ keyUpEvent: KeyboardEvent;
101
+ }
102
+
103
+ export interface PasswordInputKeyEnterEvent extends PasswordInputFieldInfo {
104
+ /** Enter key or input-related event */
105
+ keyEnterEvent: Event;
106
+ }
107
+ ```
108
+
109
+ ## Public instance properties
110
+
111
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
112
+
113
+ | Property | Type | Description |
114
+ | ------------------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
115
+ | `modelValue` | `any` | Internal model getter/setter backed by the shared control value. |
116
+ | `showPassword` | `boolean` | Toggles visibility of the password. |
117
+ | `onChangeCallback` | `(value: T \| null) => void` | Standard change and touch callbacks. |
118
+ | `onTouchedCallback` | `() => void` | — |
119
+ | `effectiveId` | `string` | Plain string property bound in template [id]="effectiveId" (zero function or CD overhead). |
120
+
121
+ ## Public instance methods
122
+
123
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
124
+
125
+ | Method | Signature | Description |
126
+ | ------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------- |
127
+ | `modelValueChange` | `(modelValueChange: string): void` | Emits when the password model value changes. |
128
+ | `inputChange` | `(changeValue: Event): void` | Emits on input change event. |
129
+ | `focusChange` | `(onFocusEvent: FocusEvent): void` | Emits when input gains focus. |
130
+ | `blurChange` | `(blurEvent: FocusEvent): void` | Emits when input loses focus. |
131
+ | `keydownHandle` | `(event: KeyboardEvent): void` | Emits on keydown event. |
132
+ | `keyupHandle` | `(event: KeyboardEvent): void` | Emits on keyup event. |
133
+ | `keyEnterHandle` | `(event: Event): void` | Emits when Enter key is pressed. |
134
+ | `configureId` | `(): void` | — |
135
+ | `commitValue` | `(value?: string \| null): void` | Commit a view edit after the inner control has updated its local model. |
136
+ | `handleFocusOut` | `(event: FocusEvent): void` | Touch the outer control only when focus leaves the whole composite control. |
137
+ | `writeValue` | `(value: string \| null): void` | Writes a new value from the form model to the view. |
138
+ | `registerOnChange` | `(fn: (value: string \| null) => void): void` | Registers a callback function that is called when the control's value changes in the UI. |
139
+ | `registerOnTouched` | `(fn: () => void): void` | Registers a callback function that is called when the control is touched. |
140
+ | `setDisabledState` | `(isDisabled: boolean): void` | Updates the disabled state from the form model. |
141
+
142
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/password-input/password-input.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)
@@ -0,0 +1,50 @@
1
+ # PdfViewerComponent
2
+
3
+ An embedded PDF preview.
4
+
5
+ Selector `ui-pdf-viewer`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { PdfViewerComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `PdfViewerComponent` to the host component's imports. Replace the example path with a trusted PDF URL.
14
+
15
+ ```html
16
+ <ui-pdf-viewer [pdfUrl]="pdfUrl" title="Sample PDF preview" />
17
+ ```
18
+
19
+ Example fields in the host component.
20
+
21
+ ```ts
22
+ pdfUrl = 'assets/sample.pdf';
23
+ ```
24
+
25
+ ## Inputs
26
+
27
+ | Input | Type | Required | Default | Description |
28
+ | -------- | -------- | -------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------- |
29
+ | `title` | `string` | No | `'PDF document'` | Accessible title for the embedded document. |
30
+ | `pdfUrl` | `string` | No | No document | Resource URL embedded in the viewer. The current implementation trusts this URL; callers must supply a trusted source. |
31
+
32
+ ## Outputs
33
+
34
+ None.
35
+
36
+ ## Public instance properties
37
+
38
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
39
+
40
+ | Property | Type | Description |
41
+ | --------- | ----------------- | ------------------------------------------------------------------- |
42
+ | `urlSafe` | `SafeResourceUrl` | Safe resource URL processed by DomSanitizer for iframe consumption. |
43
+
44
+ ## Public instance methods
45
+
46
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
47
+
48
+ None.
49
+
50
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/pdf-viewer/pdf-viewer.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)