iss-ctrl 0.0.21 → 0.0.23
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.
- package/README.md +33 -0
- package/fesm2022/iss-ctrl-attachment.viewer-DVUL39xd.mjs +110 -0
- package/fesm2022/iss-ctrl-attachment.viewer-DVUL39xd.mjs.map +1 -0
- package/fesm2022/iss-ctrl-base.mjs +682 -0
- package/fesm2022/iss-ctrl-base.mjs.map +1 -0
- package/fesm2022/iss-ctrl-checkbox.field-CILXADas.mjs +88 -0
- package/fesm2022/iss-ctrl-checkbox.field-CILXADas.mjs.map +1 -0
- package/fesm2022/iss-ctrl-checkbox.mjs +146 -0
- package/fesm2022/iss-ctrl-checkbox.mjs.map +1 -0
- package/fesm2022/iss-ctrl-checkbox.viewer-C3SEUszR.mjs +31 -0
- package/fesm2022/iss-ctrl-checkbox.viewer-C3SEUszR.mjs.map +1 -0
- package/fesm2022/iss-ctrl-chips.field-445Ds3V7.mjs +76 -0
- package/fesm2022/iss-ctrl-chips.field-445Ds3V7.mjs.map +1 -0
- package/fesm2022/iss-ctrl-chips.mjs +168 -0
- package/fesm2022/iss-ctrl-chips.mjs.map +1 -0
- package/fesm2022/iss-ctrl-chips.viewer-BcKT2hcq.mjs +38 -0
- package/fesm2022/iss-ctrl-chips.viewer-BcKT2hcq.mjs.map +1 -0
- package/fesm2022/iss-ctrl-date-picker.field-Djhh1FsR.mjs +98 -0
- package/fesm2022/iss-ctrl-date-picker.field-Djhh1FsR.mjs.map +1 -0
- package/fesm2022/iss-ctrl-date-picker.mjs +200 -0
- package/fesm2022/iss-ctrl-date-picker.mjs.map +1 -0
- package/fesm2022/iss-ctrl-date-picker.viewer-Dsmsf91t.mjs +40 -0
- package/fesm2022/iss-ctrl-date-picker.viewer-Dsmsf91t.mjs.map +1 -0
- package/fesm2022/iss-ctrl-date-range-picker.field-Dv636SAm.mjs +97 -0
- package/fesm2022/iss-ctrl-date-range-picker.field-Dv636SAm.mjs.map +1 -0
- package/fesm2022/iss-ctrl-date-range-picker.mjs +307 -0
- package/fesm2022/iss-ctrl-date-range-picker.mjs.map +1 -0
- package/fesm2022/iss-ctrl-date-range-picker.viewer-tmTQGPFh.mjs +41 -0
- package/fesm2022/iss-ctrl-date-range-picker.viewer-tmTQGPFh.mjs.map +1 -0
- package/fesm2022/iss-ctrl-datetime-picker.field-DldY8vke.mjs +98 -0
- package/fesm2022/iss-ctrl-datetime-picker.field-DldY8vke.mjs.map +1 -0
- package/fesm2022/iss-ctrl-datetime-picker.mjs +226 -0
- package/fesm2022/iss-ctrl-datetime-picker.mjs.map +1 -0
- package/fesm2022/iss-ctrl-datetime-picker.viewer-BeUyEBKo.mjs +42 -0
- package/fesm2022/iss-ctrl-datetime-picker.viewer-BeUyEBKo.mjs.map +1 -0
- package/fesm2022/iss-ctrl-dropdownlist.field-DikBAtc_.mjs +87 -0
- package/fesm2022/iss-ctrl-dropdownlist.field-DikBAtc_.mjs.map +1 -0
- package/fesm2022/iss-ctrl-dropdownlist.mjs +398 -0
- package/fesm2022/iss-ctrl-dropdownlist.mjs.map +1 -0
- package/fesm2022/iss-ctrl-dropdownlist.viewer-OWJxDpr8.mjs +30 -0
- package/fesm2022/iss-ctrl-dropdownlist.viewer-OWJxDpr8.mjs.map +1 -0
- package/fesm2022/iss-ctrl-file-picker.field-BMZaJxvj.mjs +210 -0
- package/fesm2022/iss-ctrl-file-picker.field-BMZaJxvj.mjs.map +1 -0
- package/fesm2022/iss-ctrl-file-picker.mjs +274 -0
- package/fesm2022/iss-ctrl-file-picker.mjs.map +1 -0
- package/fesm2022/iss-ctrl-input.field-BiwBFYx3.mjs +104 -0
- package/fesm2022/iss-ctrl-input.field-BiwBFYx3.mjs.map +1 -0
- package/fesm2022/iss-ctrl-input.mjs +204 -0
- package/fesm2022/iss-ctrl-input.mjs.map +1 -0
- package/fesm2022/iss-ctrl-input.viewer-BOZnW0_e.mjs +22 -0
- package/fesm2022/iss-ctrl-input.viewer-BOZnW0_e.mjs.map +1 -0
- package/fesm2022/iss-ctrl-iss-ctrl-BG-QWWdq.mjs +1770 -0
- package/fesm2022/iss-ctrl-iss-ctrl-BG-QWWdq.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-event-bOt6IlIo.mjs → iss-ctrl-load-event-T4L3k9XO.mjs} +4 -3
- package/fesm2022/iss-ctrl-load-event-T4L3k9XO.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-options-event-CxyAyNMe.mjs → iss-ctrl-load-options-event-tG258cbP.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-options-event-CxyAyNMe.mjs.map → iss-ctrl-load-options-event-tG258cbP.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-value-event-DJKJ5S3h.mjs → iss-ctrl-load-value-event--7zt90Dl.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-value-event-DJKJ5S3h.mjs.map → iss-ctrl-load-value-event--7zt90Dl.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-mobile.field-DLccnWKX.mjs +77 -0
- package/fesm2022/iss-ctrl-mobile.field-DLccnWKX.mjs.map +1 -0
- package/fesm2022/iss-ctrl-mobile.mjs +2465 -0
- package/fesm2022/iss-ctrl-mobile.mjs.map +1 -0
- package/fesm2022/iss-ctrl-mobile.viewer-DQgxAcR-.mjs +22 -0
- package/fesm2022/iss-ctrl-mobile.viewer-DQgxAcR-.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-note.field-B_Lbp28X.mjs → iss-ctrl-note.field-CT1wVmfF.mjs} +2 -2
- package/fesm2022/{iss-ctrl-note.field-B_Lbp28X.mjs.map → iss-ctrl-note.field-CT1wVmfF.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-plate.field-CQQY8rnE.mjs +92 -0
- package/fesm2022/iss-ctrl-plate.field-CQQY8rnE.mjs.map +1 -0
- package/fesm2022/iss-ctrl-plate.mjs +493 -0
- package/fesm2022/iss-ctrl-plate.mjs.map +1 -0
- package/fesm2022/iss-ctrl-plate.viewer-B8PUBLH8.mjs +179 -0
- package/fesm2022/iss-ctrl-plate.viewer-B8PUBLH8.mjs.map +1 -0
- package/fesm2022/iss-ctrl-radio.field-Dp5D-AXQ.mjs +88 -0
- package/fesm2022/iss-ctrl-radio.field-Dp5D-AXQ.mjs.map +1 -0
- package/fesm2022/iss-ctrl-radio.mjs +104 -0
- package/fesm2022/iss-ctrl-radio.mjs.map +1 -0
- package/fesm2022/iss-ctrl-radio.viewer-EiDliZro.mjs +30 -0
- package/fesm2022/iss-ctrl-radio.viewer-EiDliZro.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-replace-api-keys-C0XYQW4i.mjs → iss-ctrl-replace-api-keys-COUv4Kin.mjs} +2 -2
- package/fesm2022/{iss-ctrl-replace-api-keys-C0XYQW4i.mjs.map → iss-ctrl-replace-api-keys-COUv4Kin.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-set-value-event-CgXhi0Bv.mjs → iss-ctrl-set-value-event-D0-_qIyS.mjs} +2 -2
- package/fesm2022/{iss-ctrl-set-value-event-CgXhi0Bv.mjs.map → iss-ctrl-set-value-event-D0-_qIyS.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-slide-toggle.field-vCJHOiSG.mjs +85 -0
- package/fesm2022/iss-ctrl-slide-toggle.field-vCJHOiSG.mjs.map +1 -0
- package/fesm2022/iss-ctrl-slide-toggle.mjs +66 -0
- package/fesm2022/iss-ctrl-slide-toggle.mjs.map +1 -0
- package/fesm2022/iss-ctrl-slide-toggle.viewer-hsIHwDj3.mjs +34 -0
- package/fesm2022/iss-ctrl-slide-toggle.viewer-hsIHwDj3.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-table.field-B5FxF6hn.mjs → iss-ctrl-table.field-DdFjH-D8.mjs} +142 -140
- package/fesm2022/iss-ctrl-table.field-DdFjH-D8.mjs.map +1 -0
- package/fesm2022/iss-ctrl-textarea.field-Dqhhu2m4.mjs +82 -0
- package/fesm2022/iss-ctrl-textarea.field-Dqhhu2m4.mjs.map +1 -0
- package/fesm2022/iss-ctrl-textarea.mjs +115 -0
- package/fesm2022/iss-ctrl-textarea.mjs.map +1 -0
- package/fesm2022/iss-ctrl-textarea.viewer-CpmLauik.mjs +22 -0
- package/fesm2022/iss-ctrl-textarea.viewer-CpmLauik.mjs.map +1 -0
- package/fesm2022/iss-ctrl-time-picker.field-CdmxRiH8.mjs +77 -0
- package/fesm2022/iss-ctrl-time-picker.field-CdmxRiH8.mjs.map +1 -0
- package/fesm2022/iss-ctrl-time-picker.mjs +170 -0
- package/fesm2022/iss-ctrl-time-picker.mjs.map +1 -0
- package/fesm2022/iss-ctrl-time-picker.viewer-CJeFLrdI.mjs +22 -0
- package/fesm2022/iss-ctrl-time-picker.viewer-CJeFLrdI.mjs.map +1 -0
- package/fesm2022/iss-ctrl-toggle-button.field-rAT7dVFC.mjs +101 -0
- package/fesm2022/iss-ctrl-toggle-button.field-rAT7dVFC.mjs.map +1 -0
- package/fesm2022/iss-ctrl-toggle-button.mjs +158 -0
- package/fesm2022/iss-ctrl-toggle-button.mjs.map +1 -0
- package/fesm2022/iss-ctrl-toggle-button.viewer-CC-8_Dy4.mjs +30 -0
- package/fesm2022/iss-ctrl-toggle-button.viewer-CC-8_Dy4.mjs.map +1 -0
- package/fesm2022/iss-ctrl-tokens.mjs +25 -0
- package/fesm2022/iss-ctrl-tokens.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-2v1kLVHZ.mjs → iss-ctrl-trigger-based-on-json-value-I92SNsv9.mjs} +2 -2
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-2v1kLVHZ.mjs.map → iss-ctrl-trigger-based-on-json-value-I92SNsv9.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-user-picker.field-BH63sZ-X.mjs → iss-ctrl-user-picker.field-DpmYCfpD.mjs} +154 -153
- package/fesm2022/iss-ctrl-user-picker.field-DpmYCfpD.mjs.map +1 -0
- package/fesm2022/iss-ctrl.mjs +3 -1
- package/fesm2022/iss-ctrl.mjs.map +1 -1
- package/package.json +69 -1
- package/types/iss-ctrl-base.d.ts +318 -0
- package/types/iss-ctrl-checkbox.d.ts +46 -0
- package/types/iss-ctrl-chips.d.ts +41 -0
- package/types/iss-ctrl-date-picker.d.ts +75 -0
- package/types/iss-ctrl-date-range-picker.d.ts +95 -0
- package/types/iss-ctrl-datetime-picker.d.ts +77 -0
- package/types/iss-ctrl-dropdownlist.d.ts +78 -0
- package/types/iss-ctrl-file-picker.d.ts +95 -0
- package/types/iss-ctrl-input.d.ts +76 -0
- package/types/iss-ctrl-mobile.d.ts +91 -0
- package/types/iss-ctrl-plate.d.ts +54 -0
- package/types/iss-ctrl-radio.d.ts +34 -0
- package/types/iss-ctrl-slide-toggle.d.ts +26 -0
- package/types/iss-ctrl-textarea.d.ts +30 -0
- package/types/iss-ctrl-time-picker.d.ts +48 -0
- package/types/iss-ctrl-toggle-button.d.ts +41 -0
- package/types/iss-ctrl-tokens.d.ts +21 -0
- package/types/iss-ctrl.d.ts +303 -2005
- package/fesm2022/iss-ctrl-iss-ctrl-BKu6a5HF.mjs +0 -9683
- package/fesm2022/iss-ctrl-iss-ctrl-BKu6a5HF.mjs.map +0 -1
- package/fesm2022/iss-ctrl-load-event-bOt6IlIo.mjs.map +0 -1
- package/fesm2022/iss-ctrl-table.field-B5FxF6hn.mjs.map +0 -1
- package/fesm2022/iss-ctrl-user-picker.field-BH63sZ-X.mjs.map +0 -1
package/types/iss-ctrl.d.ts
CHANGED
|
@@ -1,1946 +1,399 @@
|
|
|
1
|
+
import { Option, I18n } from 'iss-ctrl/base';
|
|
2
|
+
export * from 'iss-ctrl/base';
|
|
3
|
+
import { IssAttachment } from 'iss-ctrl/tokens';
|
|
4
|
+
export * from 'iss-ctrl/tokens';
|
|
1
5
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ErrorStateMatcher, MatDateFormats, NativeDateAdapter } from '@angular/material/core';
|
|
5
|
-
import { MatChipInputEvent } from '@angular/material/chips';
|
|
6
|
-
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
7
|
-
import { PhoneNumber } from 'libphonenumber-js/mobile';
|
|
6
|
+
import { Type, WritableSignal, OnInit, OnDestroy, OutputEmitterRef, InputSignal, PipeTransform, Injector, DestroyRef, StaticProvider, InjectionToken } from '@angular/core';
|
|
7
|
+
import { AbstractControl, FormGroup, ValidatorFn, AsyncValidatorFn, ControlContainer, FormControl, ValidationErrors } from '@angular/forms';
|
|
8
8
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
9
|
+
import { IssFile } from 'iss-ctrl/file-picker';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
declare class Loader {
|
|
12
|
+
#private;
|
|
13
|
+
loadComponent(field: IssField): Observable<Type<any> | null>;
|
|
14
|
+
loadViewer(type: string): Observable<Type<any> | null>;
|
|
15
|
+
loadService<T>(serviceName: string): undefined | (() => Promise<T>);
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Loader, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Loader>;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
label: string;
|
|
19
|
-
valid: boolean | undefined;
|
|
20
|
-
align: HintAlignment;
|
|
20
|
+
declare class FieldAsyncValidation {
|
|
21
|
+
alreadyExists: string | undefined;
|
|
22
|
+
constructor(asyncValidation: any);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* Controls are the presentational layer: they know nothing about {@link IssField} and are
|
|
27
|
-
* driven purely by bindings, so they can be used standalone inside any reactive form.
|
|
28
|
-
* Every control below inherits the properties declared here and adds its own on top.
|
|
29
|
-
*
|
|
30
|
-
* ### Inherited inputs
|
|
31
|
-
* | Property | Type | Default | Description |
|
|
32
|
-
* | --- | --- | --- | --- |
|
|
33
|
-
* | `formControlName` | `string` | `""` | Name of the control in the surrounding `FormGroup`. |
|
|
34
|
-
* | `placeholder` | `string` | `""` | Placeholder text shown while the field is empty. |
|
|
35
|
-
* | `readonly` | `boolean` | `false` | Renders the value but blocks every interaction. |
|
|
36
|
-
* | `multiple` | `boolean \| undefined` | `false` | Allows more than one value, where the control supports it. |
|
|
37
|
-
* | `min` | `number \| string \| null` | `null` | Lower bound (number or date/time string). |
|
|
38
|
-
* | `max` | `number \| string \| null` | `null` | Upper bound (number or date/time string). |
|
|
39
|
-
* | `minLength` | `number \| null` | `null` | Minimum number of characters. |
|
|
40
|
-
* | `maxLength` | `number \| null` | `null` | Maximum number of characters. |
|
|
41
|
-
* | `hints` | `Hint[]` | `[]` | Helper messages rendered under the field. |
|
|
42
|
-
* | `className` | `string \| null` | `null` | Extra CSS classes for the host. |
|
|
43
|
-
*
|
|
44
|
-
* ### Inherited outputs
|
|
45
|
-
* | Event | Payload | Description |
|
|
46
|
-
* | --- | --- | --- |
|
|
47
|
-
* | `(onChange)` | `any` | Fires after every committed value change. |
|
|
26
|
+
* Per-field configuration, reachable as `field.config` and consumed by the `iss-field-*`
|
|
27
|
+
* components. Every entry is a signal, so it can be changed at runtime by field events.
|
|
48
28
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* forms API (`ctrl.disable()` or a `disabled` field config), never with a template binding.
|
|
29
|
+
* Not every key applies to every field — the class doc of each `iss-field-*` component
|
|
30
|
+
* lists exactly which of these it reads.
|
|
52
31
|
*
|
|
53
|
-
* ###
|
|
54
|
-
*
|
|
55
|
-
* `
|
|
56
|
-
*
|
|
57
|
-
*
|
|
32
|
+
* ### Keys by area
|
|
33
|
+
* - **Common:** `type` · `disabled` · `readonly` · `placeholder` · `suffix` · `hideLabel` · `multiple`
|
|
34
|
+
* - **Bounds:** `min` · `max` · `minLength` · `maxLength`
|
|
35
|
+
* - **Dates:** `minDate` · `maxDate` · `dateFilter` · `hijriCalendar` · `emitHijri`
|
|
36
|
+
* - **Attachments:** `allowedFileSize` · `allowedFileTypes` · `minFilesCount` · `maxFilesCount` · `templateId` · `templateUrl`
|
|
37
|
+
* - **Users:** `minUsersCount` · `maxUsersCount`
|
|
38
|
+
* - **Table:** `showInTableColumns` · `tableWithFilter` · `tableWithSort` · `tableWithPagination`
|
|
58
39
|
*
|
|
59
40
|
* @example
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* <label>Email</label>
|
|
63
|
-
* </iss-ctrl-input>
|
|
41
|
+
* ```json
|
|
42
|
+
* { "name": "email", "type": "text_input", "config": { "type": "email", "maxLength": 120 } }
|
|
64
43
|
* ```
|
|
65
44
|
*/
|
|
66
|
-
declare class
|
|
67
|
-
#private;
|
|
68
|
-
/**
|
|
69
|
-
* Name of this control inside the surrounding `FormGroup`.
|
|
70
|
-
*/
|
|
71
|
-
formControlName: InputSignal<string>;
|
|
72
|
-
/**
|
|
73
|
-
* Lower bound forwarded to the underlying input — a number, or a date/time string.
|
|
74
|
-
*/
|
|
75
|
-
min: InputSignal<number | string | null>;
|
|
76
|
-
/**
|
|
77
|
-
* Upper bound forwarded to the underlying input — a number, or a date/time string.
|
|
78
|
-
*/
|
|
79
|
-
max: InputSignal<number | string | null>;
|
|
80
|
-
/**
|
|
81
|
-
* Minimum number of characters accepted by the underlying input.
|
|
82
|
-
*/
|
|
83
|
-
minLength: InputSignal<number | null>;
|
|
84
|
-
/**
|
|
85
|
-
* Maximum number of characters accepted by the underlying input.
|
|
86
|
-
*/
|
|
87
|
-
maxLength: InputSignal<number | null>;
|
|
45
|
+
declare class FieldConfig {
|
|
88
46
|
/**
|
|
89
|
-
*
|
|
90
|
-
* {@link ControlBase.setDisabledState}. Disable via `ctrl.disable()` or the field config.
|
|
47
|
+
* Native input type for `text_input` (`text`, `email`, `number`, `password`, …).
|
|
91
48
|
*/
|
|
92
|
-
|
|
49
|
+
type: WritableSignal<string | undefined>;
|
|
93
50
|
/**
|
|
94
|
-
*
|
|
51
|
+
* Disables the control; the underlying `FormControl` is disabled on init.
|
|
95
52
|
*/
|
|
96
|
-
|
|
53
|
+
disabled: WritableSignal<boolean | undefined>;
|
|
97
54
|
/**
|
|
98
|
-
*
|
|
55
|
+
* Shows the value but blocks interaction. Unlike `disabled`, the value is still submitted.
|
|
99
56
|
*/
|
|
100
|
-
|
|
57
|
+
readonly: WritableSignal<boolean | undefined>;
|
|
101
58
|
/**
|
|
102
|
-
* Placeholder text shown while the
|
|
59
|
+
* Placeholder text shown while the field is empty.
|
|
103
60
|
*/
|
|
104
|
-
placeholder:
|
|
61
|
+
placeholder: WritableSignal<string | undefined>;
|
|
105
62
|
/**
|
|
106
|
-
*
|
|
63
|
+
* Text rendered after the value (a unit or currency, for example).
|
|
107
64
|
*/
|
|
108
|
-
|
|
65
|
+
suffix: WritableSignal<string | undefined>;
|
|
109
66
|
/**
|
|
110
|
-
*
|
|
67
|
+
* Hides the field label without removing it from the accessibility tree.
|
|
111
68
|
*/
|
|
112
|
-
|
|
69
|
+
hideLabel: WritableSignal<boolean | undefined>;
|
|
113
70
|
/**
|
|
114
|
-
*
|
|
71
|
+
* Allows more than one value — multi select, multi file upload, multi toggle.
|
|
115
72
|
*/
|
|
116
|
-
|
|
73
|
+
multiple: WritableSignal<boolean | undefined>;
|
|
117
74
|
/**
|
|
118
|
-
*
|
|
75
|
+
* Minimum number of characters. Source: `config.minLength`.
|
|
119
76
|
*/
|
|
120
|
-
|
|
121
|
-
protected ctrl: FormControl;
|
|
77
|
+
minLength: WritableSignal<number | undefined>;
|
|
122
78
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* Material reads `errorState` off the `NgControl` bound to its own `matInput` — here that is
|
|
126
|
-
* {@link ControlBase.ctrl}, which carries no validators and is therefore always valid. Every
|
|
127
|
-
* error a consumer cares about (the field config's validators plus the control's own
|
|
128
|
-
* {@link ControlBase.validate}) lives on the host control instead, so without this matcher an
|
|
129
|
-
* invalid `iss-ctrl-*` would keep rendering the valid outline. Bind it on the `matInput` as
|
|
130
|
-
* `[errorStateMatcher]="errorStateMatcher"`.
|
|
79
|
+
* Maximum number of characters. Source: `config.maxLength`.
|
|
131
80
|
*/
|
|
132
|
-
|
|
133
|
-
registerOnChange(fn: () => void): void;
|
|
134
|
-
registerOnTouched(fn: () => void): void;
|
|
135
|
-
setDisabledState(isDisabled: boolean): void;
|
|
136
|
-
writeValue(value: string | FormData | Date | null): void;
|
|
137
|
-
markAsTouched(): void;
|
|
138
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
81
|
+
maxLength: WritableSignal<number | undefined>;
|
|
139
82
|
/**
|
|
140
|
-
*
|
|
141
|
-
* `[formControl]` or `[ngModel]`), or `null` when it is used without one.
|
|
83
|
+
* Minimum numeric value (also the minimum user count for the user picker).
|
|
142
84
|
*/
|
|
143
|
-
|
|
85
|
+
min: WritableSignal<number | undefined>;
|
|
144
86
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* Reflected on the host as `iss-ctrl-empty`, which is what `upgrade.scss` uses to keep the
|
|
148
|
-
* resting outline of an empty field: Material's own `mat-form-field-hide-placeholder` drops
|
|
149
|
-
* off the moment the field is focused, so the border would change colour on focus alone.
|
|
150
|
-
* Override it in a control whose value does not live on {@link ControlBase.ctrl}.
|
|
87
|
+
* Maximum numeric value (also the maximum user count for the user picker).
|
|
151
88
|
*/
|
|
152
|
-
|
|
153
|
-
protected onTouch: () => void;
|
|
154
|
-
protected onPropagateValue: (_: any) => void;
|
|
155
|
-
protected emitValue(value?: any): void;
|
|
156
|
-
protected propagateValue(value?: any): void;
|
|
157
|
-
protected emitOnChangeEvent($event?: any): void;
|
|
158
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ControlBase, never>;
|
|
159
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ControlBase, "ng-component", never, { "formControlName": { "alias": "formControlName"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hints": { "alias": "hints"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* `<iss-ctrl-checkbox>` — a list of checkboxes over a fixed set of options.
|
|
164
|
-
*
|
|
165
|
-
* The form value is the comma separated list of selected option values, while `(onChange)`
|
|
166
|
-
* emits the resolved `Option[]` (or `null` when nothing is selected).
|
|
167
|
-
*
|
|
168
|
-
* @example
|
|
169
|
-
* ```html
|
|
170
|
-
* <iss-ctrl-checkbox formControlName="days" [options]="days" (onChange)="pick($event)"/>
|
|
171
|
-
* ```
|
|
172
|
-
*
|
|
173
|
-
* ### Own inputs
|
|
174
|
-
* | Property | Type | Default | Description |
|
|
175
|
-
* | --- | --- | --- | --- |
|
|
176
|
-
* | `options` | `Option[]` | **required** | The selectable choices. |
|
|
177
|
-
*
|
|
178
|
-
* ### Inherited from {@link ControlBase}
|
|
179
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
180
|
-
*
|
|
181
|
-
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
182
|
-
*/
|
|
183
|
-
declare class CheckboxControl extends ControlBase {
|
|
184
|
-
#private;
|
|
89
|
+
max: WritableSignal<number | undefined>;
|
|
185
90
|
/**
|
|
186
|
-
*
|
|
91
|
+
* Earliest selectable date for date, datetime and date-range fields.
|
|
187
92
|
*/
|
|
188
|
-
|
|
93
|
+
minDate: WritableSignal<Date | undefined>;
|
|
189
94
|
/**
|
|
190
|
-
*
|
|
95
|
+
* Latest selectable date for date, datetime and date-range fields.
|
|
191
96
|
*/
|
|
192
|
-
|
|
193
|
-
writeValue(value: string | null): void;
|
|
194
|
-
addToSelectedOptionsMap(option: Map<string, Option>): void;
|
|
195
|
-
onCheckboxChange(checked: boolean, value: string): void;
|
|
196
|
-
stringifySelectedOptions(): string | null;
|
|
197
|
-
getEmissionValue(options: any): void;
|
|
198
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxControl, never>;
|
|
199
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxControl, "iss-ctrl-checkbox", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* `<iss-ctrl-chips>` — free text entered as removable chips.
|
|
204
|
-
*
|
|
205
|
-
* Each `Enter` turns the typed text into a chip. The form value is the comma separated list
|
|
206
|
-
* of chip labels.
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* ```html
|
|
210
|
-
* <iss-ctrl-chips formControlName="tags" placeholder="Add a tag">
|
|
211
|
-
* <label>Tags</label>
|
|
212
|
-
* </iss-ctrl-chips>
|
|
213
|
-
* ```
|
|
214
|
-
*
|
|
215
|
-
* ### Own inputs
|
|
216
|
-
* None — the control is configured entirely through the inherited properties.
|
|
217
|
-
*
|
|
218
|
-
* ### Inherited from {@link ControlBase}
|
|
219
|
-
* `formControlName` · `readonly` · `className` · `(onChange)` · `placeholder`
|
|
220
|
-
*
|
|
221
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
222
|
-
*/
|
|
223
|
-
declare class ChipsControl extends ControlBase {
|
|
224
|
-
#private;
|
|
97
|
+
maxDate: WritableSignal<Date | undefined>;
|
|
225
98
|
/**
|
|
226
|
-
*
|
|
99
|
+
* Restricts the calendar to working days. Source: `config.acceptWorkDaysOnly`.
|
|
227
100
|
*/
|
|
228
|
-
|
|
229
|
-
writeValue(value: string | null): void;
|
|
230
|
-
remove(keyword: string): void;
|
|
231
|
-
add(event: MatChipInputEvent): void;
|
|
232
|
-
protected isEmpty(): boolean;
|
|
233
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChipsControl, never>;
|
|
234
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChipsControl, "iss-ctrl-chips", never, {}, {}, never, ["label"], true, never>;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* `<iss-ctrl-date-picker>` — single date selection through a Material calendar.
|
|
239
|
-
*
|
|
240
|
-
* The input itself is read-only; clicking it opens the calendar. The emitted value is a
|
|
241
|
-
* `yyyy-MM-dd` string, and a clear button appears once a date is picked.
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
* ```html
|
|
245
|
-
* <iss-ctrl-date-picker formControlName="startsOn" [minDate]="today" [disabledDays]="[5, 6]">
|
|
246
|
-
* <label>Start date</label>
|
|
247
|
-
* </iss-ctrl-date-picker>
|
|
248
|
-
* ```
|
|
249
|
-
*
|
|
250
|
-
* ### Own inputs
|
|
251
|
-
* | Property | Type | Default | Description |
|
|
252
|
-
* | --- | --- | --- | --- |
|
|
253
|
-
* | `minDate` | `Date \| null` | `null` | Earliest selectable date. |
|
|
254
|
-
* | `maxDate` | `Date \| null` | `null` | Latest selectable date. |
|
|
255
|
-
* | `disabledDays` | `number[]` | `[]` | Week days to block, `0` = Sunday … `6` = Saturday. |
|
|
256
|
-
* | `hijriCalendar` | `boolean` | `false` | Shows an Umm al-Qura Hijri calendar; the value stays Gregorian. |
|
|
257
|
-
* | `emitHijri` | `boolean` | `false` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
|
|
258
|
-
*
|
|
259
|
-
* ### Hijri dates
|
|
260
|
-
* `hijriCalendar` only changes what the user sees: the calendar is Hijri, the input reads
|
|
261
|
-
* `dd/MM/yyyy` in Hijri, and a day shown as `16/03/1447` is still emitted as `2025-09-08`.
|
|
262
|
-
* Turn on `emitHijri` as well when the form value itself has to be the Hijri date. `minDate` and
|
|
263
|
-
* `maxDate` stay Gregorian in both cases — they are bounds on a day, not on a notation.
|
|
264
|
-
*
|
|
265
|
-
* ### Inherited from {@link ControlBase}
|
|
266
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
267
|
-
*
|
|
268
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
269
|
-
*/
|
|
270
|
-
declare class DatePickerControl extends ControlBase implements Validator {
|
|
271
|
-
#private;
|
|
101
|
+
dateFilter: WritableSignal<boolean | undefined>;
|
|
272
102
|
/**
|
|
273
|
-
*
|
|
103
|
+
* Renders the calendar as an Umm al-Qura Hijri calendar. The emitted value stays Gregorian
|
|
104
|
+
* unless {@link FieldConfig.emitHijri} is also on. Source: `config.hijriCalendar`, also
|
|
105
|
+
* accepted as `config.HijriCalendar`.
|
|
274
106
|
*/
|
|
275
|
-
|
|
107
|
+
hijriCalendar: WritableSignal<boolean | undefined>;
|
|
276
108
|
/**
|
|
277
|
-
*
|
|
109
|
+
* Emits the picked date as a Hijri date instead of a Gregorian one — the same day emitted
|
|
110
|
+
* as `1447-03-16` rather than `2025-09-08`. Implies {@link FieldConfig.hijriCalendar}: a
|
|
111
|
+
* Hijri value is always picked from a Hijri calendar.
|
|
278
112
|
*/
|
|
279
|
-
|
|
113
|
+
emitHijri: WritableSignal<boolean | undefined>;
|
|
280
114
|
/**
|
|
281
|
-
*
|
|
115
|
+
* Id of a downloadable template offered next to an attachment field.
|
|
282
116
|
*/
|
|
283
|
-
|
|
117
|
+
templateId: WritableSignal<string | undefined>;
|
|
284
118
|
/**
|
|
285
|
-
*
|
|
119
|
+
* Direct URL of the downloadable template for an attachment field.
|
|
286
120
|
*/
|
|
287
|
-
|
|
121
|
+
templateUrl: WritableSignal<string | undefined>;
|
|
288
122
|
/**
|
|
289
|
-
*
|
|
123
|
+
* Maximum size per uploaded file. Source: `config.allowedSize`.
|
|
290
124
|
*/
|
|
291
|
-
|
|
125
|
+
allowedFileSize: WritableSignal<number | undefined>;
|
|
292
126
|
/**
|
|
293
|
-
*
|
|
127
|
+
* Comma separated list of accepted file extensions or MIME types.
|
|
294
128
|
*/
|
|
295
|
-
|
|
296
|
-
writeValue(value: string | Date | null): void;
|
|
297
|
-
clear(event: MouseEvent): void;
|
|
298
|
-
protected calendarDaysFilter: (d: Date | null) => boolean;
|
|
299
|
-
protected emit($event: MatDatepickerInputEvent<any>): void;
|
|
300
|
-
protected openPicker(picker: any): void;
|
|
301
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerControl, never>;
|
|
302
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerControl, "iss-ctrl-date-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "hijriCalendar": { "alias": "hijriCalendar"; "required": false; "isSignal": true; }; "emitHijri": { "alias": "emitHijri"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
interface DateRangeEmission {
|
|
306
|
-
duration: number;
|
|
307
|
-
start: string;
|
|
308
|
-
end: string;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* `<iss-ctrl-date-range-picker>` — a start/end date range in one field.
|
|
313
|
-
*
|
|
314
|
-
* A half-filled range is not a value: clearing either endpoint clears the form value and
|
|
315
|
-
* emits `null`. The form value is a `yyyy-MM-dd` string pair; `(onDateRangeObjectChange)`
|
|
316
|
-
* emits the same range as a {@link DateRangeEmission} object.
|
|
317
|
-
*
|
|
318
|
-
* @example
|
|
319
|
-
* ```html
|
|
320
|
-
* <iss-ctrl-date-range-picker formControlName="period" (onDateRangeObjectChange)="apply($event)">
|
|
321
|
-
* <label>Period</label>
|
|
322
|
-
* </iss-ctrl-date-range-picker>
|
|
323
|
-
* ```
|
|
324
|
-
*
|
|
325
|
-
* ### Own inputs
|
|
326
|
-
* | Property | Type | Default | Description |
|
|
327
|
-
* | --- | --- | --- | --- |
|
|
328
|
-
* | `minDate` | `Date \| null` | `null` | Earliest selectable date. |
|
|
329
|
-
* | `maxDate` | `Date \| null` | `null` | Latest selectable date. |
|
|
330
|
-
* | `disabledDays` | `number[]` | `[]` | Week days to block, `0` = Sunday … `6` = Saturday. |
|
|
331
|
-
* | `hijriCalendar` | `boolean` | `false` | Shows an Umm al-Qura Hijri calendar; the value stays Gregorian. |
|
|
332
|
-
* | `emitHijri` | `boolean` | `false` | Emits both endpoints as Hijri dates. Implies `hijriCalendar`. |
|
|
333
|
-
*
|
|
334
|
-
* ### Hijri dates
|
|
335
|
-
* `hijriCalendar` only changes what the user sees; the emitted range stays Gregorian until
|
|
336
|
-
* `emitHijri` is on as well, at which point both endpoints carry Hijri dates. `duration` is
|
|
337
|
-
* a count of days either way, and `minDate`/`maxDate` stay Gregorian.
|
|
338
|
-
*
|
|
339
|
-
* ### Inherited from {@link ControlBase}
|
|
340
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
341
|
-
*
|
|
342
|
-
* ### Outputs
|
|
343
|
-
* - `(onDateRangeObjectChange)` — `DateRangeEmission | null`, the range as an object.
|
|
344
|
-
*
|
|
345
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
346
|
-
*/
|
|
347
|
-
declare class DateRangePickerControl extends ControlBase implements OnInit, OnDestroy {
|
|
348
|
-
#private;
|
|
129
|
+
allowedFileTypes: WritableSignal<string | undefined>;
|
|
349
130
|
/**
|
|
350
|
-
*
|
|
131
|
+
* Maximum number of files that may be attached.
|
|
351
132
|
*/
|
|
352
|
-
|
|
133
|
+
maxFilesCount: WritableSignal<number | undefined>;
|
|
353
134
|
/**
|
|
354
|
-
*
|
|
135
|
+
* Minimum number of files required.
|
|
355
136
|
*/
|
|
356
|
-
|
|
137
|
+
minFilesCount: WritableSignal<number | undefined>;
|
|
357
138
|
/**
|
|
358
|
-
*
|
|
139
|
+
* Maximum number of users selectable in a user picker.
|
|
359
140
|
*/
|
|
360
|
-
|
|
141
|
+
maxUsersCount: WritableSignal<number | undefined>;
|
|
361
142
|
/**
|
|
362
|
-
*
|
|
143
|
+
* Minimum number of users required in a user picker.
|
|
363
144
|
*/
|
|
364
|
-
|
|
145
|
+
minUsersCount: WritableSignal<number | undefined>;
|
|
365
146
|
/**
|
|
366
|
-
*
|
|
147
|
+
* Parsed from the field definition but not consumed yet — table columns currently come
|
|
148
|
+
* from `field.children`.
|
|
367
149
|
*/
|
|
368
|
-
|
|
150
|
+
showInTableColumns: WritableSignal<boolean | undefined>;
|
|
369
151
|
/**
|
|
370
|
-
*
|
|
152
|
+
* Enables the filter row on a `table` field.
|
|
371
153
|
*/
|
|
372
|
-
|
|
154
|
+
tableWithFilter: WritableSignal<boolean | undefined>;
|
|
373
155
|
/**
|
|
374
|
-
*
|
|
156
|
+
* Enables column sorting on a `table` field.
|
|
375
157
|
*/
|
|
376
|
-
|
|
158
|
+
tableWithSort: WritableSignal<boolean | undefined>;
|
|
377
159
|
/**
|
|
378
|
-
*
|
|
160
|
+
* Enables the paginator on a `table` field.
|
|
379
161
|
*/
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
setDisabledState(isDisabled: boolean): void;
|
|
383
|
-
clear(event: MouseEvent): void;
|
|
384
|
-
writeValue(value: string | FormData | null): void;
|
|
385
|
-
ngOnDestroy(): void;
|
|
386
|
-
protected isEmpty(): boolean;
|
|
387
|
-
protected openPicker(picker: any): void;
|
|
388
|
-
protected calendarDaysFilter: (d: Date | null) => boolean;
|
|
389
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerControl, never>;
|
|
390
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerControl, "iss-ctrl-date-range-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "hijriCalendar": { "alias": "hijriCalendar"; "required": false; "isSignal": true; }; "emitHijri": { "alias": "emitHijri"; "required": false; "isSignal": true; }; }, { "onDateRangeObjectChange": "onDateRangeObjectChange"; }, never, ["label"], true, never>;
|
|
162
|
+
tableWithPagination: WritableSignal<boolean | undefined>;
|
|
163
|
+
constructor(config: any);
|
|
391
164
|
}
|
|
392
165
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
* Combines the calendar of the date picker with the time list of the time picker; both parts
|
|
397
|
-
* must be set before a value is emitted.
|
|
398
|
-
*
|
|
399
|
-
* @example
|
|
400
|
-
* ```html
|
|
401
|
-
* <iss-ctrl-datetime-picker formControlName="scheduledAt" [minDate]="today" minTime="08:00" maxTime="17:00">
|
|
402
|
-
* <label>Scheduled at</label>
|
|
403
|
-
* </iss-ctrl-datetime-picker>
|
|
404
|
-
* ```
|
|
405
|
-
*
|
|
406
|
-
* ### Own inputs
|
|
407
|
-
* | Property | Type | Default | Description |
|
|
408
|
-
* | --- | --- | --- | --- |
|
|
409
|
-
* | `minDate` | `Date \| null` | `null` | Earliest selectable date. |
|
|
410
|
-
* | `maxDate` | `Date \| null` | `null` | Latest selectable date. |
|
|
411
|
-
* | `minTime` | `string \| null` | `null` | Earliest selectable time, `HH:mm`. |
|
|
412
|
-
* | `maxTime` | `string \| null` | `null` | Latest selectable time, `HH:mm`. |
|
|
413
|
-
* | `disabledDays` | `number[]` | `[]` | Week days to block, `0` = Sunday … `6` = Saturday. |
|
|
414
|
-
* | `hijriCalendar` | `boolean` | `false` | Shows an Umm al-Qura Hijri calendar; the value stays Gregorian. |
|
|
415
|
-
* | `emitHijri` | `boolean` | `false` | Emits the date half as a Hijri date. Implies `hijriCalendar`. |
|
|
416
|
-
*
|
|
417
|
-
* ### Hijri dates
|
|
418
|
-
* Both flags are handed straight to the inner date picker; the time half is untouched, so a
|
|
419
|
-
* Hijri value reads `1447-03-15T09:30:00`.
|
|
420
|
-
*
|
|
421
|
-
* ### Inherited from {@link ControlBase}
|
|
422
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
423
|
-
*
|
|
424
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
425
|
-
*/
|
|
426
|
-
declare class DatetimePickerControl extends ControlBase {
|
|
427
|
-
#private;
|
|
428
|
-
datetimeForm: FormGroup;
|
|
429
|
-
/**
|
|
430
|
-
* Week days that cannot be selected — `0` is Sunday through `6` for Saturday.
|
|
431
|
-
*/
|
|
432
|
-
disabledDays: InputSignal<number[]>;
|
|
433
|
-
/**
|
|
434
|
-
* Earliest selectable date.
|
|
435
|
-
*/
|
|
436
|
-
minDate: InputSignal<Date | null>;
|
|
437
|
-
/**
|
|
438
|
-
* Latest selectable date.
|
|
439
|
-
*/
|
|
440
|
-
maxDate: InputSignal<Date | null>;
|
|
441
|
-
/**
|
|
442
|
-
* Earliest selectable time of day, as `HH:mm`.
|
|
443
|
-
*/
|
|
444
|
-
minTime: InputSignal<string | null>;
|
|
445
|
-
/**
|
|
446
|
-
* Latest selectable time of day, as `HH:mm`.
|
|
447
|
-
*/
|
|
448
|
-
maxTime: InputSignal<string | null>;
|
|
449
|
-
/**
|
|
450
|
-
* Renders the calendar as an Umm al-Qura Hijri calendar, leaving the emitted date Gregorian.
|
|
451
|
-
*/
|
|
452
|
-
hijriCalendar: InputSignal<boolean>;
|
|
453
|
-
/**
|
|
454
|
-
* Emits the date half of the value as a Hijri date. Implies {@link hijriCalendar}.
|
|
455
|
-
*/
|
|
456
|
-
emitHijri: InputSignal<boolean>;
|
|
457
|
-
setDisabledState(isDisabled: boolean): void;
|
|
458
|
-
emit(): void;
|
|
459
|
-
writeValue(value: string | Date | null): void;
|
|
460
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimePickerControl, never>;
|
|
461
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePickerControl, "iss-ctrl-datetime-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "hijriCalendar": { "alias": "hijriCalendar"; "required": false; "isSignal": true; }; "emitHijri": { "alias": "emitHijri"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
166
|
+
interface EventStrategy {
|
|
167
|
+
fire(args: EventArgument): void;
|
|
168
|
+
revert(args: EventArgument): void;
|
|
462
169
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
170
|
+
interface EventArgument {
|
|
171
|
+
control: AbstractControl;
|
|
172
|
+
form: FormGroup;
|
|
173
|
+
field: IssField;
|
|
174
|
+
action: FieldEvent;
|
|
175
|
+
change: FieldChange;
|
|
469
176
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
errorMsg?: string;
|
|
478
|
-
file?: File;
|
|
177
|
+
interface EventConfigFn {
|
|
178
|
+
execute(args: EventArgument): any | void;
|
|
179
|
+
}
|
|
180
|
+
interface FieldChange {
|
|
181
|
+
trackedField: IssField;
|
|
182
|
+
trackedControl: AbstractControl;
|
|
183
|
+
value: string;
|
|
479
184
|
}
|
|
480
185
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
*
|
|
484
|
-
* Uploading is done by the host: the control emits the picked files and renders whatever is
|
|
485
|
-
* fed back through `uploadedFiles`, `uploading` and `uploadingError`.
|
|
486
|
-
*
|
|
487
|
-
* @example
|
|
488
|
-
* ```html
|
|
489
|
-
* <iss-ctrl-file-picker
|
|
490
|
-
* formControlName="attachments"
|
|
491
|
-
* [multiple]="true"
|
|
492
|
-
* accept=".pdf,.png"
|
|
493
|
-
* [uploading]="uploading()"
|
|
494
|
-
* [uploadedFiles]="uploaded()"
|
|
495
|
-
* />
|
|
496
|
-
* ```
|
|
497
|
-
*
|
|
498
|
-
* ### Own inputs
|
|
499
|
-
* | Property | Type | Default | Description |
|
|
500
|
-
* | --- | --- | --- | --- |
|
|
501
|
-
* | `accept` | `string \| undefined` | `undefined` | Accepted extensions or MIME types for the native picker. |
|
|
502
|
-
* | `showDownloadButton` | `boolean` | `true` | Shows the download action on each attachment. |
|
|
503
|
-
* | `showDeleteButton` | `boolean` | `true` | Shows the remove action on each attachment. |
|
|
504
|
-
* | `uploading` | `boolean` | `false` | Renders the in-progress state. |
|
|
505
|
-
* | `uploadedFiles` | `IssAttachment[]` | `[]` | Files already stored on the server. |
|
|
506
|
-
* | `uploadingError` | `string \| undefined` | `undefined` | Error message attached to the failed upload. |
|
|
507
|
-
*
|
|
508
|
-
* ### Inherited from {@link ControlBase}
|
|
509
|
-
* `formControlName` · `readonly` · `className` · `(onChange)` · `multiple` · `hints`
|
|
510
|
-
*
|
|
511
|
-
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
512
|
-
*/
|
|
513
|
-
declare class FilePickerControl extends ControlBase implements OnDestroy {
|
|
514
|
-
#private;
|
|
515
|
-
/**
|
|
516
|
-
* Accepted extensions or MIME types, passed straight to the native file input.
|
|
517
|
-
*/
|
|
518
|
-
accept: InputSignal<string | undefined>;
|
|
519
|
-
/**
|
|
520
|
-
* Shows the download action on each listed attachment.
|
|
521
|
-
*/
|
|
522
|
-
showDownloadButton: InputSignal<boolean>;
|
|
523
|
-
/**
|
|
524
|
-
* Shows the remove action on each listed attachment.
|
|
525
|
-
*/
|
|
526
|
-
showDeleteButton: InputSignal<boolean>;
|
|
527
|
-
/**
|
|
528
|
-
* Renders the upload-in-progress state; set by the host that performs the upload.
|
|
529
|
-
*/
|
|
530
|
-
uploading: InputSignal<boolean>;
|
|
531
|
-
/**
|
|
532
|
-
* Attachments already stored on the server, merged into the rendered list.
|
|
533
|
-
*/
|
|
534
|
-
uploadedFiles: InputSignal<IssAttachment[]>;
|
|
535
|
-
/**
|
|
536
|
-
* Error message shown on the attachment whose upload failed.
|
|
537
|
-
*/
|
|
538
|
-
uploadingError: InputSignal<string | undefined>;
|
|
539
|
-
readonly filesValue: Signal<any>;
|
|
540
|
-
protected attachments: WritableSignal<IssFile[]>;
|
|
541
|
-
ngOnDestroy(): void;
|
|
542
|
-
writeValue(val: FormData | string | null): void;
|
|
543
|
-
protected onDelete(files: IssFile[]): void;
|
|
544
|
-
protected captureFile($event: FileList): void;
|
|
545
|
-
protected openFilePicker(input: HTMLInputElement): void;
|
|
546
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilePickerControl, never>;
|
|
547
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilePickerControl, "iss-ctrl-file-picker", never, { "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "showDownloadButton": { "alias": "showDownloadButton"; "required": false; "isSignal": true; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; "isSignal": true; }; "uploading": { "alias": "uploading"; "required": false; "isSignal": true; }; "uploadedFiles": { "alias": "uploadedFiles"; "required": false; "isSignal": true; }; "uploadingError": { "alias": "uploadingError"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
186
|
+
interface ActionTriggerFn {
|
|
187
|
+
isTriggered(field: IssField, change: FieldChange, action: FieldEvent, masterField?: IssField): boolean;
|
|
548
188
|
}
|
|
549
189
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
* | `prefixText` | `string` | `""` | Text rendered before the value. |
|
|
569
|
-
* | `suffixIcon` | `string` | `""` | Icon rendered after the value. |
|
|
570
|
-
* | `suffixText` | `string` | `""` | Text rendered after the value. |
|
|
571
|
-
*
|
|
572
|
-
* ### Inherited from {@link ControlBase}
|
|
573
|
-
* `formControlName` · `readonly` · `className` · `(onChange)` · `placeholder` · `min` · `max` · `minLength` · `maxLength` · `hints`
|
|
574
|
-
*
|
|
575
|
-
* ### Outputs
|
|
576
|
-
* - `(onPrefixClick)` — `string`, the prefix affix was clicked.
|
|
577
|
-
* - `(onSuffixClick)` — `string`, the suffix affix was clicked.
|
|
578
|
-
*
|
|
579
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
580
|
-
*
|
|
581
|
-
* Also projects `[issPrefix]` and `[issSuffix]` for fully custom affixes.
|
|
582
|
-
*/
|
|
583
|
-
declare class InputControl extends ControlBase implements Validator, OnDestroy {
|
|
584
|
-
#private;
|
|
585
|
-
/**
|
|
586
|
-
* Native input type — `text`, `number`, `email`, `password`, and so on.
|
|
587
|
-
*/
|
|
588
|
-
type: InputSignal<string>;
|
|
589
|
-
/**
|
|
590
|
-
* Icon name rendered before the value.
|
|
591
|
-
*/
|
|
592
|
-
prefixIcon: InputSignal<string>;
|
|
593
|
-
/**
|
|
594
|
-
* Static text rendered before the value.
|
|
595
|
-
*/
|
|
596
|
-
prefixText: InputSignal<string>;
|
|
597
|
-
/**
|
|
598
|
-
* Icon name rendered after the value.
|
|
599
|
-
*/
|
|
600
|
-
suffixIcon: InputSignal<string>;
|
|
601
|
-
/**
|
|
602
|
-
* Static text rendered after the value, a unit or currency for example.
|
|
603
|
-
*/
|
|
604
|
-
suffixText: InputSignal<string>;
|
|
605
|
-
/**
|
|
606
|
-
* Emits when the prefix affix is clicked.
|
|
607
|
-
*/
|
|
608
|
-
onPrefixClick: OutputEmitterRef<string>;
|
|
609
|
-
/**
|
|
610
|
-
* Emits when the suffix affix is clicked.
|
|
611
|
-
*/
|
|
612
|
-
onSuffixClick: OutputEmitterRef<string>;
|
|
613
|
-
emitSuffixClick(): void;
|
|
614
|
-
emitPrefixClick(): void;
|
|
615
|
-
ngOnDestroy(): void;
|
|
616
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InputControl, never>;
|
|
617
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputControl, "iss-ctrl-input", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "prefixText": { "alias": "prefixText"; "required": false; "isSignal": true; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; "isSignal": true; }; "suffixText": { "alias": "suffixText"; "required": false; "isSignal": true; }; }, { "onPrefixClick": "onPrefixClick"; "onSuffixClick": "onSuffixClick"; }, never, ["label", "[issPrefix]", "[issSuffix]"], true, never>;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
type ISO2 = "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "BQ" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CD" | "CG" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UY" | "UZ" | "VU" | "VA" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW" | "AX";
|
|
621
|
-
|
|
622
|
-
interface Country {
|
|
623
|
-
name: string;
|
|
624
|
-
code: ISO2;
|
|
625
|
-
dailCode: string;
|
|
626
|
-
areaCodes?: string[];
|
|
627
|
-
priority: number;
|
|
628
|
-
order: number;
|
|
629
|
-
placeholder: string;
|
|
190
|
+
declare class FieldActionConfig {
|
|
191
|
+
operator: "or" | "and" | undefined;
|
|
192
|
+
setValueFromApiResponse: string | undefined;
|
|
193
|
+
setValueFromRequestDto: string | undefined;
|
|
194
|
+
setValueFromLoggedInUser: string | undefined;
|
|
195
|
+
setValueFromJsonValue: string | undefined;
|
|
196
|
+
triggerFromApiResponse: string | undefined;
|
|
197
|
+
triggerFromJsonValue: string | undefined;
|
|
198
|
+
replaceApiKeyFromField: string | undefined;
|
|
199
|
+
fn: EventConfigFn | undefined;
|
|
200
|
+
fnPromise: Promise<EventConfigFn> | undefined;
|
|
201
|
+
afterFetchFn: EventConfigFn | undefined;
|
|
202
|
+
afterFetchFnPromise: Promise<EventConfigFn> | undefined;
|
|
203
|
+
triggerFn: ActionTriggerFn;
|
|
204
|
+
triggerFnPromise: Promise<ActionTriggerFn> | undefined;
|
|
205
|
+
disableAfterFetching: boolean | undefined;
|
|
206
|
+
disableAfterSetValue: boolean | undefined;
|
|
207
|
+
constructor(action: any, loader: Loader);
|
|
630
208
|
}
|
|
631
209
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
code: ISO2;
|
|
635
|
-
nationalNumber: string;
|
|
636
|
-
internationalNumber: string;
|
|
637
|
-
placeholder: string;
|
|
638
|
-
name: string;
|
|
639
|
-
priority: 0;
|
|
640
|
-
order: 0;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
declare class Phone {
|
|
644
|
-
parse(phoneNumber: string, countryCode?: ISO2): PhoneNumber | undefined;
|
|
645
|
-
getPhoneNumberObject(number: string): Mobile | undefined;
|
|
646
|
-
format(phoneNumber: string, countryCode: ISO2, numberFormat: "E.164" | "INTERNATIONAL" | "NATIONAL"): string;
|
|
647
|
-
validate(number: string): boolean;
|
|
648
|
-
getPlaceholder(countryCode: ISO2): string;
|
|
649
|
-
getCountryIsoCode(dailCode: string, number: PhoneNumber): string;
|
|
650
|
-
getCountryByDailCode(dailCode: string | undefined, number: PhoneNumber): Country | undefined;
|
|
651
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Phone, never>;
|
|
652
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<Phone>;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* `<iss-ctrl-mobile>` — international phone number with a country selector.
|
|
657
|
-
*
|
|
658
|
-
* The number is validated against the selected country and stored in its international form.
|
|
659
|
-
*
|
|
660
|
-
* @example
|
|
661
|
-
* ```html
|
|
662
|
-
* <iss-ctrl-mobile formControlName="mobile" [preferredCountries]="['SA', 'AE']">
|
|
663
|
-
* <label>Mobile</label>
|
|
664
|
-
* </iss-ctrl-mobile>
|
|
665
|
-
* ```
|
|
666
|
-
*
|
|
667
|
-
* ### Own inputs
|
|
668
|
-
* | Property | Type | Default | Description |
|
|
669
|
-
* | --- | --- | --- | --- |
|
|
670
|
-
* | `preferredCountries` | `ISO2[]` | `["SA"]` | Countries pinned to the top of the country list. |
|
|
671
|
-
*
|
|
672
|
-
* ### Inherited from {@link ControlBase}
|
|
673
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
674
|
-
*
|
|
675
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
676
|
-
*/
|
|
677
|
-
declare class MobileControl extends ControlBase implements OnDestroy, Validator {
|
|
678
|
-
#private;
|
|
679
|
-
phoneService: Phone;
|
|
680
|
-
isOpen: WritableSignal<boolean>;
|
|
681
|
-
selectedCountry: WritableSignal<Country>;
|
|
682
|
-
/**
|
|
683
|
-
* ISO-2 country codes pinned to the top of the country list; the first one is preselected.
|
|
684
|
-
*/
|
|
685
|
-
preferredCountries: InputSignal<ISO2[]>;
|
|
686
|
-
searchInput: FormControl;
|
|
687
|
-
filteredCountries: Signal<Country[]>;
|
|
688
|
-
writeValue(value: string | null): void;
|
|
689
|
-
emit(): void;
|
|
690
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
691
|
-
ngOnDestroy(): void;
|
|
692
|
-
protected onInput(event: KeyboardEvent): void;
|
|
693
|
-
protected onSelectCountry(country: Country): void;
|
|
694
|
-
protected closeCountryCodeMenu(): void;
|
|
695
|
-
protected toggleCountryCodeMenu(): void;
|
|
696
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MobileControl, never>;
|
|
697
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MobileControl, "iss-ctrl-mobile", never, { "preferredCountries": { "alias": "preferredCountries"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
/**
|
|
701
|
-
* `<iss-ctrl-plate-number>` — Saudi vehicle plate, entered as digits and letters in both
|
|
702
|
-
* Arabic and English.
|
|
703
|
-
*
|
|
704
|
-
* Typing into one script fills the matching cell in the other automatically, and letters are
|
|
705
|
-
* validated against the allowed plate alphabet.
|
|
706
|
-
*
|
|
707
|
-
* @example
|
|
708
|
-
* ```html
|
|
709
|
-
* <iss-ctrl-plate-number formControlName="plate" [readonly]="false"/>
|
|
710
|
-
* ```
|
|
711
|
-
*
|
|
712
|
-
* ### Own inputs
|
|
713
|
-
* None — the control is configured entirely through the inherited properties.
|
|
714
|
-
*
|
|
715
|
-
* ### Inherited from {@link ControlBase}
|
|
716
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
717
|
-
*
|
|
718
|
-
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
719
|
-
*/
|
|
720
|
-
declare class PlateControl extends ControlBase {
|
|
721
|
-
#private;
|
|
722
|
-
numbersAr: i0.WritableSignal<string[]>;
|
|
723
|
-
numbersEn: i0.WritableSignal<string[]>;
|
|
724
|
-
lettersAr: i0.WritableSignal<string[]>;
|
|
725
|
-
lettersEn: i0.WritableSignal<string[]>;
|
|
726
|
-
letterErrors: i0.WritableSignal<boolean[]>;
|
|
727
|
-
writeValue(value: string | null): void;
|
|
728
|
-
onNumberInput(index: number, event: Event, lang: "ar" | "en"): void;
|
|
729
|
-
onLetterInput(index: number, event: Event, lang: "ar" | "en"): void;
|
|
730
|
-
protected preventNonDigits($event: KeyboardEvent, ar: string): void;
|
|
731
|
-
private emitPlate;
|
|
732
|
-
private stringifyPlate;
|
|
733
|
-
private focusInput;
|
|
734
|
-
private convertDigit;
|
|
735
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PlateControl, never>;
|
|
736
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PlateControl, "iss-ctrl-plate-number", never, {}, {}, never, never, true, never>;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* `<iss-ctrl-radio>` — one choice out of a fixed set of options.
|
|
741
|
-
*
|
|
742
|
-
* @example
|
|
743
|
-
* ```html
|
|
744
|
-
* <iss-ctrl-radio formControlName="gender" [options]="genders"/>
|
|
745
|
-
* ```
|
|
746
|
-
*
|
|
747
|
-
* ### Own inputs
|
|
748
|
-
* | Property | Type | Default | Description |
|
|
749
|
-
* | --- | --- | --- | --- |
|
|
750
|
-
* | `options` | `Option[]` | **required** | The selectable choices. |
|
|
751
|
-
*
|
|
752
|
-
* ### Inherited from {@link ControlBase}
|
|
753
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
754
|
-
*
|
|
755
|
-
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
756
|
-
*/
|
|
757
|
-
declare class RadioControl extends ControlBase {
|
|
758
|
-
/**
|
|
759
|
-
* Selectable choices, each a `{ value, label }` pair. Required.
|
|
760
|
-
*/
|
|
761
|
-
options: InputSignal<Option[]>;
|
|
762
|
-
writeValue(value: string | null): void;
|
|
763
|
-
onRadioChange(value: string): void;
|
|
764
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RadioControl, never>;
|
|
765
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RadioControl, "iss-ctrl-radio", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* `<iss-ctrl-select>` — dropdown selection, single or multiple, with a search box.
|
|
770
|
-
*
|
|
771
|
-
* Typing in the search box emits `(onQueryChange)`, so options can be loaded remotely; set
|
|
772
|
-
* `loading` while that request is in flight.
|
|
773
|
-
*
|
|
774
|
-
* @example
|
|
775
|
-
* ```html
|
|
776
|
-
* <iss-ctrl-select
|
|
777
|
-
* formControlName="city"
|
|
778
|
-
* [options]="cities()"
|
|
779
|
-
* [multiple]="false"
|
|
780
|
-
* [loading]="loading()"
|
|
781
|
-
* (onQueryChange)="search($event)"
|
|
782
|
-
* >
|
|
783
|
-
* <label>City</label>
|
|
784
|
-
* </iss-ctrl-select>
|
|
785
|
-
* ```
|
|
786
|
-
*
|
|
787
|
-
* ### Own inputs
|
|
788
|
-
* | Property | Type | Default | Description |
|
|
789
|
-
* | --- | --- | --- | --- |
|
|
790
|
-
* | `options` | `Option[]` | **required** | The selectable choices. |
|
|
791
|
-
* | `height` | `string` | `"150px"` | Max height of the open panel. |
|
|
792
|
-
* | `loading` | `boolean` | `false` | Shows the loading state inside the panel. |
|
|
793
|
-
*
|
|
794
|
-
* ### Inherited from {@link ControlBase}
|
|
795
|
-
* `formControlName` · `readonly` · `className` · `(onChange)` · `placeholder` · `multiple`
|
|
796
|
-
*
|
|
797
|
-
* ### Outputs
|
|
798
|
-
* - `(onQueryChange)` — `string`, the current search text.
|
|
799
|
-
*
|
|
800
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
801
|
-
*/
|
|
802
|
-
declare class SelectControl extends ControlBase implements OnDestroy {
|
|
803
|
-
#private;
|
|
804
|
-
selectedOptions: WritableSignal<Map<string, Option>>;
|
|
805
|
-
/**
|
|
806
|
-
* Selectable choices, each a `{ value, label }` pair. Required.
|
|
807
|
-
*/
|
|
808
|
-
options: InputSignal<Option[]>;
|
|
809
|
-
/**
|
|
810
|
-
* Maximum height of the open options panel, as a CSS length.
|
|
811
|
-
*/
|
|
812
|
-
height: InputSignal<string>;
|
|
813
|
-
query: Signal<string>;
|
|
814
|
-
readonly filteredOptions: Signal<Option[]>;
|
|
815
|
-
/**
|
|
816
|
-
* Shows the loading state inside the panel while options are being fetched.
|
|
817
|
-
*/
|
|
818
|
-
loading: InputSignal<boolean>;
|
|
819
|
-
/**
|
|
820
|
-
* Emits the search text so the host can load matching options.
|
|
821
|
-
*/
|
|
822
|
-
onQueryChange: OutputEmitterRef<string>;
|
|
823
|
-
protected optionTemplate: any;
|
|
824
|
-
protected cardViewerTemplate: any;
|
|
825
|
-
protected allSelected: WritableSignal<boolean>;
|
|
826
|
-
displayFn: (options: Option | Option[]) => string;
|
|
827
|
-
writeValue(value: string | null): void;
|
|
828
|
-
captureValue($event: any): void;
|
|
829
|
-
removeFromSelectedOptionsMap(option: Option): void;
|
|
830
|
-
clearSelection(): void;
|
|
831
|
-
toggleAllSelection(): void;
|
|
832
|
-
ngOnDestroy(): void;
|
|
833
|
-
protected isEmpty(): boolean;
|
|
834
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectControl, never>;
|
|
835
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectControl, "iss-ctrl-select", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "onQueryChange": "onQueryChange"; }, ["optionTemplate", "cardViewerTemplate"], ["label"], true, never>;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* `<iss-ctrl-slide-toggle>` — an on/off switch for a boolean value.
|
|
840
|
-
*
|
|
841
|
-
* @example
|
|
842
|
-
* ```html
|
|
843
|
-
* <iss-ctrl-slide-toggle formControlName="active" (onChange)="save($event)"/>
|
|
844
|
-
* ```
|
|
845
|
-
*
|
|
846
|
-
* ### Own inputs
|
|
847
|
-
* None — the control is configured entirely through the inherited properties.
|
|
848
|
-
*
|
|
849
|
-
* ### Inherited from {@link ControlBase}
|
|
850
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
851
|
-
*
|
|
852
|
-
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
853
|
-
*/
|
|
854
|
-
declare class SlideToggleControl extends ControlBase {
|
|
855
|
-
onSlideToggleChange(checked: boolean): void;
|
|
856
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SlideToggleControl, never>;
|
|
857
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlideToggleControl, "iss-ctrl-slide-toggle", never, {}, {}, never, never, true, never>;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* `<iss-ctrl-textarea>` — multi line free text.
|
|
862
|
-
*
|
|
863
|
-
* @example
|
|
864
|
-
* ```html
|
|
865
|
-
* <iss-ctrl-textarea formControlName="notes" [maxLength]="500" placeholder="Add a note">
|
|
866
|
-
* <label>Notes</label>
|
|
867
|
-
* </iss-ctrl-textarea>
|
|
868
|
-
* ```
|
|
869
|
-
*
|
|
870
|
-
* ### Own inputs
|
|
871
|
-
* None — the control is configured entirely through the inherited properties.
|
|
872
|
-
*
|
|
873
|
-
* ### Inherited from {@link ControlBase}
|
|
874
|
-
* `formControlName` · `readonly` · `className` · `(onChange)` · `placeholder` · `minLength` · `maxLength` · `hints`
|
|
875
|
-
*
|
|
876
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
877
|
-
*/
|
|
878
|
-
declare class TextareaControl extends ControlBase implements OnDestroy {
|
|
879
|
-
#private;
|
|
880
|
-
ngOnDestroy(): void;
|
|
881
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaControl, never>;
|
|
882
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaControl, "iss-ctrl-textarea", never, {}, {}, never, ["label"], true, never>;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* `<iss-ctrl-time-picker>` — time of day, picked from a list generated at a fixed interval.
|
|
887
|
-
*
|
|
888
|
-
* @example
|
|
889
|
-
* ```html
|
|
890
|
-
* <iss-ctrl-time-picker formControlName="startsAt" interval="15min" minTime="08:00" maxTime="17:00">
|
|
891
|
-
* <label>Starts at</label>
|
|
892
|
-
* </iss-ctrl-time-picker>
|
|
893
|
-
* ```
|
|
894
|
-
*
|
|
895
|
-
* ### Own inputs
|
|
896
|
-
* | Property | Type | Default | Description |
|
|
897
|
-
* | --- | --- | --- | --- |
|
|
898
|
-
* | `interval` | `string` | `"30min"` | Step between the offered times. |
|
|
899
|
-
* | `minTime` | `string \| null` | `null` | Earliest offered time, `HH:mm`. |
|
|
900
|
-
* | `maxTime` | `string \| null` | `null` | Latest offered time, `HH:mm`. |
|
|
901
|
-
*
|
|
902
|
-
* ### Inherited from {@link ControlBase}
|
|
903
|
-
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
904
|
-
*
|
|
905
|
-
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
906
|
-
*/
|
|
907
|
-
declare class TimePickerControl extends ControlBase {
|
|
908
|
-
#private;
|
|
909
|
-
/**
|
|
910
|
-
* Step between the offered times, for example `"15min"` or `"30min"`.
|
|
911
|
-
*/
|
|
912
|
-
interval: InputSignal<string>;
|
|
913
|
-
/**
|
|
914
|
-
* Earliest offered time of day, as `HH:mm`.
|
|
915
|
-
*/
|
|
916
|
-
minTime: InputSignal<string | null>;
|
|
917
|
-
/**
|
|
918
|
-
* Latest offered time of day, as `HH:mm`.
|
|
919
|
-
*/
|
|
920
|
-
maxTime: InputSignal<string | null>;
|
|
921
|
-
emit(evt: any): void;
|
|
922
|
-
clear(event: MouseEvent): void;
|
|
923
|
-
writeValue(value: any): void;
|
|
924
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerControl, never>;
|
|
925
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerControl, "iss-ctrl-time-picker", never, { "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* `<iss-ctrl-toggle-button>` — options rendered as a button group instead of a dropdown.
|
|
930
|
-
*
|
|
931
|
-
* With `multiple` set, several buttons can be active at once.
|
|
932
|
-
*
|
|
933
|
-
* @example
|
|
934
|
-
* ```html
|
|
935
|
-
* <iss-ctrl-toggle-button formControlName="priority" [options]="priorities" [multiple]="false"/>
|
|
936
|
-
* ```
|
|
937
|
-
*
|
|
938
|
-
* ### Own inputs
|
|
939
|
-
* | Property | Type | Default | Description |
|
|
940
|
-
* | --- | --- | --- | --- |
|
|
941
|
-
* | `options` | `Option[]` | **required** | The selectable choices. |
|
|
942
|
-
*
|
|
943
|
-
* ### Inherited from {@link ControlBase}
|
|
944
|
-
* `formControlName` · `readonly` · `className` · `(onChange)` · `multiple`
|
|
945
|
-
*
|
|
946
|
-
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
947
|
-
*/
|
|
948
|
-
declare class ToggleButtonControl extends ControlBase {
|
|
949
|
-
#private;
|
|
950
|
-
/**
|
|
951
|
-
* Selectable choices, each a `{ value, label }` pair. Required.
|
|
952
|
-
*/
|
|
953
|
-
options: InputSignal<Option[]>;
|
|
954
|
-
selectedOptions: WritableSignal<Map<string, Option>>;
|
|
955
|
-
writeValue(value: string | null): void;
|
|
956
|
-
addToSelectedOptionsMap(option: Map<string, Option>): void;
|
|
957
|
-
onToggleButtonChange(checked: boolean, value: string): void;
|
|
958
|
-
stringifySelectedOptions(): string | null;
|
|
959
|
-
getEmissionValue(options: any): void;
|
|
960
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleButtonControl, never>;
|
|
961
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonControl, "iss-ctrl-toggle-button", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
declare class Loader {
|
|
965
|
-
#private;
|
|
966
|
-
loadComponent(field: IssField): Observable<Type<any> | null>;
|
|
967
|
-
loadViewer(type: string): Observable<Type<any> | null>;
|
|
968
|
-
loadService<T>(serviceName: string): undefined | (() => Promise<T>);
|
|
969
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Loader, never>;
|
|
970
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<Loader>;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
declare class FieldAsyncValidation {
|
|
974
|
-
alreadyExists: string | undefined;
|
|
975
|
-
constructor(asyncValidation: any);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Per-field configuration, reachable as `field.config` and consumed by the `iss-field-*`
|
|
980
|
-
* components. Every entry is a signal, so it can be changed at runtime by field events.
|
|
981
|
-
*
|
|
982
|
-
* Not every key applies to every field — the class doc of each `iss-field-*` component
|
|
983
|
-
* lists exactly which of these it reads.
|
|
984
|
-
*
|
|
985
|
-
* ### Keys by area
|
|
986
|
-
* - **Common:** `type` · `disabled` · `readonly` · `placeholder` · `suffix` · `hideLabel` · `multiple`
|
|
987
|
-
* - **Bounds:** `min` · `max` · `minLength` · `maxLength`
|
|
988
|
-
* - **Dates:** `minDate` · `maxDate` · `dateFilter` · `hijriCalendar` · `emitHijri`
|
|
989
|
-
* - **Attachments:** `allowedFileSize` · `allowedFileTypes` · `minFilesCount` · `maxFilesCount` · `templateId` · `templateUrl`
|
|
990
|
-
* - **Users:** `minUsersCount` · `maxUsersCount`
|
|
991
|
-
* - **Table:** `showInTableColumns` · `tableWithFilter` · `tableWithSort` · `tableWithPagination`
|
|
992
|
-
*
|
|
993
|
-
* @example
|
|
994
|
-
* ```json
|
|
995
|
-
* { "name": "email", "type": "text_input", "config": { "type": "email", "maxLength": 120 } }
|
|
996
|
-
* ```
|
|
997
|
-
*/
|
|
998
|
-
declare class FieldConfig {
|
|
999
|
-
/**
|
|
1000
|
-
* Native input type for `text_input` (`text`, `email`, `number`, `password`, …).
|
|
1001
|
-
*/
|
|
1002
|
-
type: WritableSignal<string | undefined>;
|
|
1003
|
-
/**
|
|
1004
|
-
* Disables the control; the underlying `FormControl` is disabled on init.
|
|
1005
|
-
*/
|
|
1006
|
-
disabled: WritableSignal<boolean | undefined>;
|
|
1007
|
-
/**
|
|
1008
|
-
* Shows the value but blocks interaction. Unlike `disabled`, the value is still submitted.
|
|
1009
|
-
*/
|
|
1010
|
-
readonly: WritableSignal<boolean | undefined>;
|
|
1011
|
-
/**
|
|
1012
|
-
* Placeholder text shown while the field is empty.
|
|
1013
|
-
*/
|
|
1014
|
-
placeholder: WritableSignal<string | undefined>;
|
|
1015
|
-
/**
|
|
1016
|
-
* Text rendered after the value (a unit or currency, for example).
|
|
1017
|
-
*/
|
|
1018
|
-
suffix: WritableSignal<string | undefined>;
|
|
1019
|
-
/**
|
|
1020
|
-
* Hides the field label without removing it from the accessibility tree.
|
|
1021
|
-
*/
|
|
1022
|
-
hideLabel: WritableSignal<boolean | undefined>;
|
|
1023
|
-
/**
|
|
1024
|
-
* Allows more than one value — multi select, multi file upload, multi toggle.
|
|
1025
|
-
*/
|
|
1026
|
-
multiple: WritableSignal<boolean | undefined>;
|
|
1027
|
-
/**
|
|
1028
|
-
* Minimum number of characters. Source: `config.minLength`.
|
|
1029
|
-
*/
|
|
1030
|
-
minLength: WritableSignal<number | undefined>;
|
|
1031
|
-
/**
|
|
1032
|
-
* Maximum number of characters. Source: `config.maxLength`.
|
|
1033
|
-
*/
|
|
1034
|
-
maxLength: WritableSignal<number | undefined>;
|
|
1035
|
-
/**
|
|
1036
|
-
* Minimum numeric value (also the minimum user count for the user picker).
|
|
1037
|
-
*/
|
|
1038
|
-
min: WritableSignal<number | undefined>;
|
|
1039
|
-
/**
|
|
1040
|
-
* Maximum numeric value (also the maximum user count for the user picker).
|
|
1041
|
-
*/
|
|
1042
|
-
max: WritableSignal<number | undefined>;
|
|
1043
|
-
/**
|
|
1044
|
-
* Earliest selectable date for date, datetime and date-range fields.
|
|
1045
|
-
*/
|
|
1046
|
-
minDate: WritableSignal<Date | undefined>;
|
|
1047
|
-
/**
|
|
1048
|
-
* Latest selectable date for date, datetime and date-range fields.
|
|
1049
|
-
*/
|
|
1050
|
-
maxDate: WritableSignal<Date | undefined>;
|
|
1051
|
-
/**
|
|
1052
|
-
* Restricts the calendar to working days. Source: `config.acceptWorkDaysOnly`.
|
|
1053
|
-
*/
|
|
1054
|
-
dateFilter: WritableSignal<boolean | undefined>;
|
|
1055
|
-
/**
|
|
1056
|
-
* Renders the calendar as an Umm al-Qura Hijri calendar. The emitted value stays Gregorian
|
|
1057
|
-
* unless {@link FieldConfig.emitHijri} is also on. Source: `config.hijriCalendar`, also
|
|
1058
|
-
* accepted as `config.HijriCalendar`.
|
|
1059
|
-
*/
|
|
1060
|
-
hijriCalendar: WritableSignal<boolean | undefined>;
|
|
1061
|
-
/**
|
|
1062
|
-
* Emits the picked date as a Hijri date instead of a Gregorian one — the same day emitted
|
|
1063
|
-
* as `1447-03-16` rather than `2025-09-08`. Implies {@link FieldConfig.hijriCalendar}: a
|
|
1064
|
-
* Hijri value is always picked from a Hijri calendar.
|
|
1065
|
-
*/
|
|
1066
|
-
emitHijri: WritableSignal<boolean | undefined>;
|
|
1067
|
-
/**
|
|
1068
|
-
* Id of a downloadable template offered next to an attachment field.
|
|
1069
|
-
*/
|
|
1070
|
-
templateId: WritableSignal<string | undefined>;
|
|
1071
|
-
/**
|
|
1072
|
-
* Direct URL of the downloadable template for an attachment field.
|
|
1073
|
-
*/
|
|
1074
|
-
templateUrl: WritableSignal<string | undefined>;
|
|
1075
|
-
/**
|
|
1076
|
-
* Maximum size per uploaded file. Source: `config.allowedSize`.
|
|
1077
|
-
*/
|
|
1078
|
-
allowedFileSize: WritableSignal<number | undefined>;
|
|
1079
|
-
/**
|
|
1080
|
-
* Comma separated list of accepted file extensions or MIME types.
|
|
1081
|
-
*/
|
|
1082
|
-
allowedFileTypes: WritableSignal<string | undefined>;
|
|
1083
|
-
/**
|
|
1084
|
-
* Maximum number of files that may be attached.
|
|
1085
|
-
*/
|
|
1086
|
-
maxFilesCount: WritableSignal<number | undefined>;
|
|
1087
|
-
/**
|
|
1088
|
-
* Minimum number of files required.
|
|
1089
|
-
*/
|
|
1090
|
-
minFilesCount: WritableSignal<number | undefined>;
|
|
1091
|
-
/**
|
|
1092
|
-
* Maximum number of users selectable in a user picker.
|
|
1093
|
-
*/
|
|
1094
|
-
maxUsersCount: WritableSignal<number | undefined>;
|
|
1095
|
-
/**
|
|
1096
|
-
* Minimum number of users required in a user picker.
|
|
1097
|
-
*/
|
|
1098
|
-
minUsersCount: WritableSignal<number | undefined>;
|
|
1099
|
-
/**
|
|
1100
|
-
* Parsed from the field definition but not consumed yet — table columns currently come
|
|
1101
|
-
* from `field.children`.
|
|
1102
|
-
*/
|
|
1103
|
-
showInTableColumns: WritableSignal<boolean | undefined>;
|
|
1104
|
-
/**
|
|
1105
|
-
* Enables the filter row on a `table` field.
|
|
1106
|
-
*/
|
|
1107
|
-
tableWithFilter: WritableSignal<boolean | undefined>;
|
|
1108
|
-
/**
|
|
1109
|
-
* Enables column sorting on a `table` field.
|
|
1110
|
-
*/
|
|
1111
|
-
tableWithSort: WritableSignal<boolean | undefined>;
|
|
1112
|
-
/**
|
|
1113
|
-
* Enables the paginator on a `table` field.
|
|
1114
|
-
*/
|
|
1115
|
-
tableWithPagination: WritableSignal<boolean | undefined>;
|
|
1116
|
-
constructor(config: any);
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
interface EventStrategy {
|
|
1120
|
-
fire(args: EventArgument): void;
|
|
1121
|
-
revert(args: EventArgument): void;
|
|
1122
|
-
}
|
|
1123
|
-
interface EventArgument {
|
|
1124
|
-
control: AbstractControl;
|
|
1125
|
-
form: FormGroup;
|
|
1126
|
-
field: IssField;
|
|
1127
|
-
action: FieldEvent;
|
|
1128
|
-
change: FieldChange;
|
|
1129
|
-
}
|
|
1130
|
-
interface EventConfigFn {
|
|
1131
|
-
execute(args: EventArgument): any | void;
|
|
1132
|
-
}
|
|
1133
|
-
interface FieldChange {
|
|
1134
|
-
trackedField: IssField;
|
|
1135
|
-
trackedControl: AbstractControl;
|
|
1136
|
-
value: string;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
interface ActionTriggerFn {
|
|
1140
|
-
isTriggered(field: IssField, change: FieldChange, action: FieldEvent, masterField?: IssField): boolean;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
declare class FieldActionConfig {
|
|
1144
|
-
operator: "or" | "and" | undefined;
|
|
1145
|
-
setValueFromApiResponse: string | undefined;
|
|
1146
|
-
setValueFromRequestDto: string | undefined;
|
|
1147
|
-
setValueFromLoggedInUser: string | undefined;
|
|
1148
|
-
setValueFromJsonValue: string | undefined;
|
|
1149
|
-
triggerFromApiResponse: string | undefined;
|
|
1150
|
-
triggerFromJsonValue: string | undefined;
|
|
1151
|
-
replaceApiKeyFromField: string | undefined;
|
|
1152
|
-
fn: EventConfigFn | undefined;
|
|
1153
|
-
fnPromise: Promise<EventConfigFn> | undefined;
|
|
1154
|
-
afterFetchFn: EventConfigFn | undefined;
|
|
1155
|
-
afterFetchFnPromise: Promise<EventConfigFn> | undefined;
|
|
1156
|
-
triggerFn: ActionTriggerFn;
|
|
1157
|
-
triggerFnPromise: Promise<ActionTriggerFn> | undefined;
|
|
1158
|
-
disableAfterFetching: boolean | undefined;
|
|
1159
|
-
disableAfterSetValue: boolean | undefined;
|
|
1160
|
-
constructor(action: any, loader: Loader);
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
declare class FieldEvent {
|
|
1164
|
-
id: number;
|
|
210
|
+
declare class FieldEvent {
|
|
211
|
+
id: number;
|
|
1165
212
|
name: string;
|
|
1166
213
|
value: string;
|
|
1167
214
|
trackedFieldName: string;
|
|
1168
215
|
triggered: boolean;
|
|
1169
216
|
config: FieldActionConfig;
|
|
1170
|
-
fn: EventStrategy | undefined;
|
|
1171
|
-
fnPromise: Promise<EventStrategy> | undefined;
|
|
1172
|
-
constructor(action: any, loader: Loader);
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* Runtime model of a single form field, built from the JSON definition returned by the API.
|
|
1177
|
-
*
|
|
1178
|
-
* It is what `iss-field-*` components inject through the `FIELD_DATA` token, and the object
|
|
1179
|
-
* field events read from and write to. Signal-valued members can be changed at runtime and
|
|
1180
|
-
* the rendered field reacts immediately.
|
|
1181
|
-
*
|
|
1182
|
-
* ### Properties
|
|
1183
|
-
* | Property | Type | Description |
|
|
1184
|
-
* | --- | --- | --- |
|
|
1185
|
-
* | `id` | `number` | Unique field id. |
|
|
1186
|
-
* | `name` | `string` | Control name inside the form group. |
|
|
1187
|
-
* | `type` | `string` | Key into the `COMPONENTS` index (`text_input`, `dropdown_list`, …). |
|
|
1188
|
-
* | `base` | `string` | Underlying data type of the field. |
|
|
1189
|
-
* | `label()` | `string` | Visible label. |
|
|
1190
|
-
* | `hint()` | `string` | Helper text under the field. |
|
|
1191
|
-
* | `options()` | `Option[]` | Choices for select, radio, checkbox and toggle fields. |
|
|
1192
|
-
* | `api()` | `string` | Endpoint used to load options or lookups. |
|
|
1193
|
-
* | `mode()` | `"edit" \| "view"` | Renders the control or the read-only viewer. |
|
|
1194
|
-
* | `visible()` | `boolean` | Whether the field is rendered at all. |
|
|
1195
|
-
* | `loading()` | `boolean` | Shows the field's own loading state. |
|
|
1196
|
-
* | `config` | `FieldConfig` | Per-type configuration — see {@link FieldConfig}. |
|
|
1197
|
-
* | `validation` | `any` | Synchronous validation rules, exactly as the JSON declared them. |
|
|
1198
|
-
* | `validationFns` | `Record<string, Function>` | Validator factory behind each active rule, resolved by the outlet. |
|
|
1199
|
-
* | `asyncValidation` | `FieldAsyncValidation` | Remote validation rules. |
|
|
1200
|
-
* | `events` | `FieldEvent[]` | Cross-field reactions (show, hide, set value, …). |
|
|
1201
|
-
* | `children` | `IssField[]` | Nested fields, used by table and group fields. |
|
|
1202
|
-
* | `value` / `defaultValue` | `string` | Initial and fallback raw values. |
|
|
1203
|
-
* | `jsonValue` | `any` | Initial resolved value for controls with a rich payload. |
|
|
1204
|
-
* | `ctrlValue()` | `string \| null` | Live raw value of the control. |
|
|
1205
|
-
* | `ctrlJsonValue()` | `any` | Live resolved value (selected options, files, users, …). |
|
|
1206
|
-
* | `response()` / `apiResponse` | `any` | Latest payload returned for this field. |
|
|
1207
|
-
*/
|
|
1208
|
-
declare class IssField {
|
|
1209
|
-
id: number;
|
|
1210
|
-
name: string;
|
|
1211
|
-
type: string;
|
|
1212
|
-
base: string;
|
|
1213
|
-
label: WritableSignal<string>;
|
|
1214
|
-
hint: WritableSignal<string>;
|
|
1215
|
-
options: WritableSignal<Option[]>;
|
|
1216
|
-
api: WritableSignal<string>;
|
|
1217
|
-
mode: WritableSignal<"edit" | "view">;
|
|
1218
|
-
visible: WritableSignal<boolean>;
|
|
1219
|
-
wasVisible: WritableSignal<boolean>;
|
|
1220
|
-
events: FieldEvent[];
|
|
1221
|
-
validation: any;
|
|
1222
|
-
validationFns: Record<string, Function>;
|
|
1223
|
-
asyncValidation: FieldAsyncValidation;
|
|
1224
|
-
children: IssField[];
|
|
1225
|
-
apiResponse: BehaviorSubject<any>;
|
|
1226
|
-
response: WritableSignal<any>;
|
|
1227
|
-
config: FieldConfig;
|
|
1228
|
-
value: string;
|
|
1229
|
-
jsonValue: any;
|
|
1230
|
-
defaultValue: string;
|
|
1231
|
-
ctrlValue: WritableSignal<string | null>;
|
|
1232
|
-
ctrlJsonValue: WritableSignal<any>;
|
|
1233
|
-
loading: WritableSignal<boolean>;
|
|
1234
|
-
constructor(field: any, loader: Loader);
|
|
1235
|
-
updateVisibility(value: boolean): void;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
interface ComponentOutlet {
|
|
1239
|
-
self$: Observable<Type<any> | null>;
|
|
1240
|
-
data: IssField;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
declare class Outlet implements OnInit, OnDestroy {
|
|
1244
|
-
#private;
|
|
1245
|
-
ready: OutputEmitterRef<boolean>;
|
|
1246
|
-
formReady: WritableSignal<boolean>;
|
|
1247
|
-
fields: InputSignal<IssField[]>;
|
|
1248
|
-
components: WritableSignal<ComponentOutlet[] | null>;
|
|
1249
|
-
get hostFormGroup(): FormGroup;
|
|
1250
|
-
ngOnInit(): void;
|
|
1251
|
-
ngOnDestroy(): void;
|
|
1252
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Outlet, never>;
|
|
1253
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Outlet, "iss-form-outlet", never, { "fields": { "alias": "fields"; "required": true; "isSignal": true; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
declare class EventHandler {
|
|
1257
|
-
#private;
|
|
1258
|
-
fire(control: AbstractControl, form: FormGroup, field: IssField, change: FieldChange): Promise<void>;
|
|
1259
|
-
revert(control: AbstractControl, form: FormGroup, field: IssField, change: FieldChange): Promise<void>;
|
|
1260
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EventHandler, never>;
|
|
1261
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EventHandler>;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
declare class FormEngine {
|
|
1265
|
-
#private;
|
|
1266
|
-
registerFields(form: FormGroup, owner: object, fields: IssField[]): void;
|
|
1267
|
-
registerExpectedFieldNames(form: FormGroup, owner: object, names: string[]): void;
|
|
1268
|
-
unregisterOutlet(form: FormGroup, owner: object): void;
|
|
1269
|
-
getFields(form: FormGroup): IssField[];
|
|
1270
|
-
getExpectedFieldNames(form: FormGroup): string[];
|
|
1271
|
-
getField(form: FormGroup, name: string, fields?: IssField[]): IssField | undefined;
|
|
1272
|
-
getControlValue(form: FormGroup, name: string): any;
|
|
1273
|
-
createValidators(field: IssField): ValidatorFn[];
|
|
1274
|
-
createAsyncValidators(field: IssField): AsyncValidatorFn[];
|
|
1275
|
-
getFieldValue(field: IssField): string;
|
|
1276
|
-
trackChangesEvents(field: IssField, form: FormGroup): Observable<FieldChange>;
|
|
1277
|
-
trackChangesValidations(field: IssField, form: FormGroup): Observable<FieldChange>;
|
|
1278
|
-
processTrackChanges(masterName: any, masterNames: Set<string>, changes$: Observable<FieldChange>[], field: IssField, form: FormGroup): void;
|
|
1279
|
-
fieldHasValidation(field: IssField): boolean;
|
|
1280
|
-
fieldHasAsyncValidation(field: IssField): boolean;
|
|
1281
|
-
isFormValid(form: FormGroup, fields: IssField[]): boolean;
|
|
1282
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormEngine, never>;
|
|
1283
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FormEngine>;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* Base class for every `iss-field-*` field.
|
|
1288
|
-
*
|
|
1289
|
-
* A field is the form-engine layer around a control: it reads its whole configuration from
|
|
1290
|
-
* the injected {@link IssField} (label, options, config, validation, events), registers its
|
|
1291
|
-
* `FormControl` on the parent `FormGroup` on init and removes it again on destroy, and
|
|
1292
|
-
* switches between the control (`mode() === "edit"`) and the viewer (`mode() === "view"`).
|
|
1293
|
-
*
|
|
1294
|
-
* ### Inputs
|
|
1295
|
-
* | Property | Type | Description |
|
|
1296
|
-
* | --- | --- | --- |
|
|
1297
|
-
* | `issField` | `IssField` | **Required.** The field definition; also provided through the `FIELD_DATA` token. |
|
|
1298
|
-
* | `formReady` | `boolean \| undefined` | Set by the outlet once the whole form exists; gates event wiring. |
|
|
1299
|
-
*
|
|
1300
|
-
* ### Properties available on `field`
|
|
1301
|
-
* `name` · `type` · `base` · `label()` · `hint()` · `options()` · `api()` · `mode()` ·
|
|
1302
|
-
* `visible()` · `loading()` · `value` · `jsonValue` · `defaultValue` · `ctrlValue()` ·
|
|
1303
|
-
* `ctrlJsonValue()` · `events` · `validation` · `asyncValidation` · `children` ·
|
|
1304
|
-
* `response()` · `config` — see {@link IssField} and {@link FieldConfig}.
|
|
1305
|
-
*
|
|
1306
|
-
* Fields are not used directly in templates; the outlet resolves them from the field `type`
|
|
1307
|
-
* through the `COMPONENTS` index.
|
|
1308
|
-
*/
|
|
1309
|
-
declare class FieldBase implements OnInit, OnDestroy {
|
|
1310
|
-
#private;
|
|
1311
|
-
/**
|
|
1312
|
-
* The field definition rendered by this component. Required.
|
|
1313
|
-
*/
|
|
1314
|
-
issField: InputSignal<IssField>;
|
|
1315
|
-
/**
|
|
1316
|
-
* Set by the outlet once every field is registered; field events start only after it turns true.
|
|
1317
|
-
*/
|
|
1318
|
-
formReady: InputSignal<boolean | undefined>;
|
|
1319
|
-
/**
|
|
1320
|
-
* The {@link IssField} for this instance, injected through the `FIELD_DATA` token.
|
|
1321
|
-
*/
|
|
1322
|
-
field: IssField;
|
|
1323
|
-
parentFormGroup: ControlContainer;
|
|
1324
|
-
formEngine: FormEngine;
|
|
1325
|
-
eventHandler: EventHandler;
|
|
1326
|
-
destroyRef: DestroyRef;
|
|
1327
|
-
/**
|
|
1328
|
-
* The `FormControl` this field registers on the parent form under `field.name`.
|
|
1329
|
-
*/
|
|
1330
|
-
ctrl: FormControl;
|
|
1331
|
-
ctrlValueChange: i0.Signal<any>;
|
|
1332
|
-
get form(): FormGroup;
|
|
1333
|
-
ngOnInit(): void;
|
|
1334
|
-
ngOnDestroy(): void;
|
|
1335
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldBase, never>;
|
|
1336
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldBase, "ng-component", never, { "issField": { "alias": "issField"; "required": true; "isSignal": true; }; "formReady": { "alias": "formReady"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* `<iss-field-input>` — single line text, number, email or password entry.
|
|
1341
|
-
*
|
|
1342
|
-
* Rendered by the outlet for fields of type `text_input`. In `edit` mode it renders
|
|
1343
|
-
* {@link InputControl} plus the validation message; in `view` mode the matching viewer.
|
|
1344
|
-
*
|
|
1345
|
-
* ### Supported `config` keys
|
|
1346
|
-
* | Key | Type | Description |
|
|
1347
|
-
* | --- | --- | --- |
|
|
1348
|
-
* | `type` | `string` | Native input type — `text`, `number`, `email`, `password`, … |
|
|
1349
|
-
* | `placeholder` | `string` | Placeholder shown while empty. |
|
|
1350
|
-
* | `min` | `number` | Minimum numeric value. |
|
|
1351
|
-
* | `max` | `number` | Maximum numeric value. |
|
|
1352
|
-
* | `minLength` | `number` | Minimum number of characters. |
|
|
1353
|
-
* | `maxLength` | `number` | Maximum number of characters. |
|
|
1354
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1355
|
-
*
|
|
1356
|
-
* ### Other field members used
|
|
1357
|
-
* `label()`
|
|
1358
|
-
*
|
|
1359
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1360
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1361
|
-
*
|
|
1362
|
-
* @example
|
|
1363
|
-
* ```json
|
|
1364
|
-
* { "name": "email", "type": "text_input", "label": "Email", "config": { "type": "email", "maxLength": 120 } }
|
|
1365
|
-
* ```
|
|
1366
|
-
*/
|
|
1367
|
-
declare class InputField extends FieldBase {
|
|
1368
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InputField, never>;
|
|
1369
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputField, "iss-field-input", never, {}, {}, never, never, true, never>;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
/**
|
|
1373
|
-
* `<iss-field-textarea>` — multi line free text.
|
|
1374
|
-
*
|
|
1375
|
-
* Rendered by the outlet for fields of type `textarea`. In `edit` mode it renders
|
|
1376
|
-
* {@link TextareaControl} plus the validation message; in `view` mode the matching viewer.
|
|
1377
|
-
*
|
|
1378
|
-
* ### Supported `config` keys
|
|
1379
|
-
* | Key | Type | Description |
|
|
1380
|
-
* | --- | --- | --- |
|
|
1381
|
-
* | `minLength` | `number` | Minimum number of characters. |
|
|
1382
|
-
* | `maxLength` | `number` | Maximum number of characters. |
|
|
1383
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1384
|
-
*
|
|
1385
|
-
* ### Other field members used
|
|
1386
|
-
* `label()`
|
|
1387
|
-
*
|
|
1388
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1389
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1390
|
-
*
|
|
1391
|
-
* @example
|
|
1392
|
-
* ```json
|
|
1393
|
-
* { "name": "notes", "type": "textarea", "label": "Notes", "config": { "maxLength": 500 } }
|
|
1394
|
-
* ```
|
|
1395
|
-
*/
|
|
1396
|
-
declare class TextareaField extends FieldBase {
|
|
1397
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaField, never>;
|
|
1398
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaField, "iss-field-textarea", never, {}, {}, never, never, true, never>;
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* `<iss-field-chips>` — free text entered as removable chips.
|
|
1403
|
-
*
|
|
1404
|
-
* Rendered by the outlet for fields of type `chips`. In `edit` mode it renders
|
|
1405
|
-
* {@link ChipsControl} plus the validation message; in `view` mode the matching viewer.
|
|
1406
|
-
*
|
|
1407
|
-
* ### Supported `config` keys
|
|
1408
|
-
* | Key | Type | Description |
|
|
1409
|
-
* | --- | --- | --- |
|
|
1410
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1411
|
-
*
|
|
1412
|
-
* ### Other field members used
|
|
1413
|
-
* `label()`
|
|
1414
|
-
*
|
|
1415
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1416
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1417
|
-
*
|
|
1418
|
-
* @example
|
|
1419
|
-
* ```json
|
|
1420
|
-
* { "name": "tags", "type": "chips", "label": "Tags" }
|
|
1421
|
-
* ```
|
|
1422
|
-
*/
|
|
1423
|
-
declare class ChipsField extends FieldBase {
|
|
1424
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChipsField, never>;
|
|
1425
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChipsField, "iss-field-chips", never, {}, {}, never, never, true, never>;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* `<iss-field-radio>` — one choice out of a fixed set of options.
|
|
1430
|
-
*
|
|
1431
|
-
* Rendered by the outlet for fields of type `radio`. In `edit` mode it renders
|
|
1432
|
-
* {@link RadioControl} plus the validation message; in `view` mode the matching viewer.
|
|
1433
|
-
*
|
|
1434
|
-
* ### Supported `config` keys
|
|
1435
|
-
* | Key | Type | Description |
|
|
1436
|
-
* | --- | --- | --- |
|
|
1437
|
-
* | `hideLabel` | `boolean` | Hides the field label. |
|
|
1438
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1439
|
-
*
|
|
1440
|
-
* ### Other field members used
|
|
1441
|
-
* `label()` · `options()`
|
|
1442
|
-
*
|
|
1443
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1444
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1445
|
-
*
|
|
1446
|
-
* @example
|
|
1447
|
-
* ```json
|
|
1448
|
-
* { "name": "gender", "type": "radio", "label": "Gender", "options": [{ "value": "m", "label": "Male" }] }
|
|
1449
|
-
* ```
|
|
1450
|
-
*/
|
|
1451
|
-
declare class RadioField extends FieldBase {
|
|
1452
|
-
onChange($event: any): void;
|
|
1453
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RadioField, never>;
|
|
1454
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RadioField, "iss-field-radio", never, {}, {}, never, never, true, never>;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* `<iss-field-select>` — single or multiple selection from a dropdown.
|
|
1459
|
-
*
|
|
1460
|
-
* Rendered by the outlet for fields of type `dropdown_list`. In `edit` mode it renders
|
|
1461
|
-
* {@link SelectControl} plus the validation message; in `view` mode the matching viewer.
|
|
1462
|
-
*
|
|
1463
|
-
* ### Supported `config` keys
|
|
1464
|
-
* | Key | Type | Description |
|
|
1465
|
-
* | --- | --- | --- |
|
|
1466
|
-
* | `multiple` | `boolean` | Allows selecting more than one option. |
|
|
1467
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1468
|
-
*
|
|
1469
|
-
* ### Other field members used
|
|
1470
|
-
* `label()` · `options()` · `ctrlJsonValue()`
|
|
1471
|
-
*
|
|
1472
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1473
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1474
|
-
*
|
|
1475
|
-
* The raw form value holds the selected option values; the resolved options are written
|
|
1476
|
-
* back to `field.ctrlJsonValue`.
|
|
1477
|
-
*
|
|
1478
|
-
* @example
|
|
1479
|
-
* ```json
|
|
1480
|
-
* { "name": "city", "type": "dropdown_list", "label": "City", "options": [{ "value": "1", "label": "Riyadh" }] }
|
|
1481
|
-
* ```
|
|
1482
|
-
*/
|
|
1483
|
-
declare class SelectField extends FieldBase {
|
|
1484
|
-
onChange($event: string | FormData): void;
|
|
1485
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectField, never>;
|
|
1486
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectField, "iss-field-select", never, {}, {}, never, never, true, never>;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
/**
|
|
1490
|
-
* `<iss-field-mobile>` — an international phone number with a country selector.
|
|
1491
|
-
*
|
|
1492
|
-
* Rendered by the outlet for fields of the type `mobile`. In `edit` mode it renders
|
|
1493
|
-
* {@link MobileControl} plus the validation message; in `view` mode the matching viewer.
|
|
1494
|
-
*
|
|
1495
|
-
* ### Supported `config` keys
|
|
1496
|
-
* | Key | Type | Description |
|
|
1497
|
-
* | --- | --- | --- |
|
|
1498
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1499
|
-
*
|
|
1500
|
-
* ### Other field members used
|
|
1501
|
-
* `label()`
|
|
1502
|
-
*
|
|
1503
|
-
* Every field also honors `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1504
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1505
|
-
*
|
|
1506
|
-
* @example
|
|
1507
|
-
* ```json
|
|
1508
|
-
* { "name": "mobile", "type": "mobile", "label": "Mobile" }
|
|
1509
|
-
* ```
|
|
1510
|
-
*/
|
|
1511
|
-
declare class MobileField extends FieldBase {
|
|
1512
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MobileField, never>;
|
|
1513
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MobileField, "iss-field-mobile", never, {}, {}, never, never, true, never>;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* `<iss-field-checkbox>` — a list of checkboxes over a fixed set of options.
|
|
1518
|
-
*
|
|
1519
|
-
* Rendered by the outlet for fields of type `checkbox`. In `edit` mode it renders
|
|
1520
|
-
* {@link CheckboxControl} plus the validation message; in `view` mode the matching viewer.
|
|
1521
|
-
*
|
|
1522
|
-
* ### Supported `config` keys
|
|
1523
|
-
* | Key | Type | Description |
|
|
1524
|
-
* | --- | --- | --- |
|
|
1525
|
-
* | `hideLabel` | `boolean` | Hides the field label. |
|
|
1526
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1527
|
-
*
|
|
1528
|
-
* ### Other field members used
|
|
1529
|
-
* `label()` · `options()`
|
|
1530
|
-
*
|
|
1531
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1532
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1533
|
-
*
|
|
1534
|
-
* @example
|
|
1535
|
-
* ```json
|
|
1536
|
-
* { "name": "days", "type": "checkbox", "label": "Days", "options": [{ "value": "sun", "label": "Sunday" }] }
|
|
1537
|
-
* ```
|
|
1538
|
-
*/
|
|
1539
|
-
declare class CheckboxField extends FieldBase {
|
|
1540
|
-
updateField($event: any): void;
|
|
1541
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxField, never>;
|
|
1542
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxField, "iss-field-checkbox", never, {}, {}, never, never, true, never>;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* `<iss-field-toggle-button>` — options rendered as a button group.
|
|
1547
|
-
*
|
|
1548
|
-
* Rendered by the outlet for fields of type `toggle_button`. In `edit` mode it renders
|
|
1549
|
-
* {@link ToggleButtonControl} plus the validation message; in `view` mode the matching viewer.
|
|
1550
|
-
*
|
|
1551
|
-
* ### Supported `config` keys
|
|
1552
|
-
* | Key | Type | Description |
|
|
1553
|
-
* | --- | --- | --- |
|
|
1554
|
-
* | `multiple` | `boolean` | Allows more than one active button. |
|
|
1555
|
-
* | `hideLabel` | `boolean` | Hides the field label. |
|
|
1556
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1557
|
-
*
|
|
1558
|
-
* ### Other field members used
|
|
1559
|
-
* `label()` · `options()`
|
|
1560
|
-
*
|
|
1561
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1562
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1563
|
-
*
|
|
1564
|
-
* @example
|
|
1565
|
-
* ```json
|
|
1566
|
-
* { "name": "priority", "type": "toggle_button", "label": "Priority", "options": [{ "value": "high", "label": "High" }] }
|
|
1567
|
-
* ```
|
|
1568
|
-
*/
|
|
1569
|
-
declare class ToggleButtonField extends FieldBase {
|
|
1570
|
-
onChange($event: any): void;
|
|
1571
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleButtonField, never>;
|
|
1572
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonField, "iss-field-toggle-button", never, {}, {}, never, never, true, never>;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
/**
|
|
1576
|
-
* `<iss-field-slide-toggle>` — an on/off switch for a boolean value.
|
|
1577
|
-
*
|
|
1578
|
-
* Rendered by the outlet for fields of type `switch`. In `edit` mode it renders
|
|
1579
|
-
* {@link SlideToggleControl} plus the validation message; in `view` mode the matching viewer.
|
|
1580
|
-
*
|
|
1581
|
-
* ### Supported `config` keys
|
|
1582
|
-
* | Key | Type | Description |
|
|
1583
|
-
* | --- | --- | --- |
|
|
1584
|
-
* | `hideLabel` | `boolean` | Hides the field label. |
|
|
1585
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1586
|
-
*
|
|
1587
|
-
* ### Other field members used
|
|
1588
|
-
* `label()`
|
|
1589
|
-
*
|
|
1590
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1591
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1592
|
-
*
|
|
1593
|
-
* @example
|
|
1594
|
-
* ```json
|
|
1595
|
-
* { "name": "active", "type": "switch", "label": "Active" }
|
|
1596
|
-
* ```
|
|
1597
|
-
*/
|
|
1598
|
-
declare class SlideToggleField extends FieldBase {
|
|
1599
|
-
onChange($event: any): void;
|
|
1600
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SlideToggleField, never>;
|
|
1601
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlideToggleField, "iss-field-slide-toggle", never, {}, {}, never, never, true, never>;
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
/**
|
|
1605
|
-
* `<iss-field-plate-number>` — a Saudi vehicle plate in Arabic and English.
|
|
1606
|
-
*
|
|
1607
|
-
* Rendered by the outlet for fields of type `vehicle_plate`. In `edit` mode it renders
|
|
1608
|
-
* {@link PlateControl} plus the validation message; in `view` mode the matching viewer.
|
|
1609
|
-
*
|
|
1610
|
-
* ### Supported `config` keys
|
|
1611
|
-
* | Key | Type | Description |
|
|
1612
|
-
* | --- | --- | --- |
|
|
1613
|
-
* | `hideLabel` | `boolean` | Hides the field label. |
|
|
1614
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1615
|
-
*
|
|
1616
|
-
* ### Other field members used
|
|
1617
|
-
* `label()`
|
|
1618
|
-
*
|
|
1619
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1620
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1621
|
-
*
|
|
1622
|
-
* @example
|
|
1623
|
-
* ```json
|
|
1624
|
-
* { "name": "plate", "type": "vehicle_plate", "label": "Plate number" }
|
|
1625
|
-
* ```
|
|
1626
|
-
*/
|
|
1627
|
-
declare class PlateField extends FieldBase {
|
|
1628
|
-
updateField($event: any): void;
|
|
1629
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PlateField, never>;
|
|
1630
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PlateField, "iss-field-plate-number", never, {}, {}, never, never, true, never>;
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
declare class FileHandler {
|
|
1634
|
-
#private;
|
|
1635
|
-
ATTACHMENT_UPLOAD_URL: string;
|
|
1636
|
-
ATTACHMENT_DOWNLOAD_URL: string;
|
|
1637
|
-
attachmentAdapter: (res: any) => IssAttachment[];
|
|
1638
|
-
upload(data: FormData): Observable<IssAttachment[]>;
|
|
1639
|
-
formDataFactory(files: IssFile[], multiple: boolean): FormData | null;
|
|
1640
|
-
formDataHasValue(formData: FormData): boolean;
|
|
1641
|
-
getFileFromFormData(formData: FormData, name: string): IssFile[];
|
|
1642
|
-
formatFileSize(x: string | number): string;
|
|
1643
|
-
fetchFileInfo(id: string): Observable<IssFile>;
|
|
1644
|
-
fetchFiles(ids: string): Observable<IssFile[]>;
|
|
1645
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileHandler, never>;
|
|
1646
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FileHandler>;
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
/**
|
|
1650
|
-
* `<iss-field-file-picker>` — attachment upload.
|
|
1651
|
-
*
|
|
1652
|
-
* Rendered by the outlet for fields of type `attachment`. In `edit` mode it renders
|
|
1653
|
-
* {@link FilePickerControl} plus the validation message; in `view` mode the matching viewer.
|
|
1654
|
-
*
|
|
1655
|
-
* ### Supported `config` keys
|
|
1656
|
-
* | Key | Type | Description |
|
|
1657
|
-
* | --- | --- | --- |
|
|
1658
|
-
* | `multiple` | `boolean` | Allows attaching more than one file. |
|
|
1659
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1660
|
-
*
|
|
1661
|
-
* ### Other field members used
|
|
1662
|
-
* `label()` · `value` · `validation` · `ctrlJsonValue()`
|
|
1663
|
-
*
|
|
1664
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1665
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1666
|
-
*
|
|
1667
|
-
* The field uploads the picked files itself, stores the returned ids as the control value
|
|
1668
|
-
* and keeps the resolved attachments in `field.ctrlJsonValue`.
|
|
1669
|
-
*
|
|
1670
|
-
* Accepted extensions come from the `fileType` **validation** rule, not from `config`; the
|
|
1671
|
-
* `allowedFileSize`, `allowedFileTypes`, `minFilesCount`, `maxFilesCount`, `templateId` and
|
|
1672
|
-
* `templateUrl` config keys exist on {@link FieldConfig} but are not read here yet.
|
|
1673
|
-
*
|
|
1674
|
-
* @example
|
|
1675
|
-
* ```json
|
|
1676
|
-
* { "name": "attachments", "type": "attachment", "label": "Attachments", "config": { "multiple": true }, "validation": { "fileType": ["pdf", "png"] } }
|
|
1677
|
-
* ```
|
|
1678
|
-
*/
|
|
1679
|
-
declare class FilePickerField extends FieldBase implements OnDestroy {
|
|
1680
|
-
#private;
|
|
1681
|
-
picker: FormControl<any>;
|
|
1682
|
-
fileHandlerService: FileHandler;
|
|
1683
|
-
uploading: WritableSignal<boolean>;
|
|
1684
|
-
viewField: Signal<any>;
|
|
1685
|
-
attachments: WritableSignal<IssAttachment[]>;
|
|
1686
|
-
uploadingError: WritableSignal<string | undefined>;
|
|
1687
|
-
accept: string;
|
|
1688
|
-
captureFile(formData: FormData | null): void;
|
|
1689
|
-
stringifyIssAttachment(attachments: IssAttachment[]): string;
|
|
1690
|
-
ngOnDestroy(): void;
|
|
1691
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilePickerField, never>;
|
|
1692
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilePickerField, "iss-field-file-picker", never, {}, {}, never, never, true, never>;
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
/**
|
|
1696
|
-
* `<iss-field-time-picker>` — a time of day, picked from a generated list.
|
|
1697
|
-
*
|
|
1698
|
-
* Rendered by the outlet for fields of type `time`. In `edit` mode it renders
|
|
1699
|
-
* {@link TimePickerControl} plus the validation message; in `view` mode the matching viewer.
|
|
1700
|
-
*
|
|
1701
|
-
* ### Supported `config` keys
|
|
1702
|
-
* | Key | Type | Description |
|
|
1703
|
-
* | --- | --- | --- |
|
|
1704
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1705
|
-
*
|
|
1706
|
-
* ### Other field members used
|
|
1707
|
-
* `label()`
|
|
1708
|
-
*
|
|
1709
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1710
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1711
|
-
*
|
|
1712
|
-
* @example
|
|
1713
|
-
* ```json
|
|
1714
|
-
* { "name": "startsAt", "type": "time", "label": "Starts at" }
|
|
1715
|
-
* ```
|
|
1716
|
-
*/
|
|
1717
|
-
declare class TimePickerField extends FieldBase {
|
|
1718
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerField, never>;
|
|
1719
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerField, "iss-field-time-picker", never, {}, {}, never, never, true, never>;
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
/**
|
|
1723
|
-
* `<iss-field-date-picker>` — a single date, picked from a calendar.
|
|
1724
|
-
*
|
|
1725
|
-
* Rendered by the outlet for fields of type `date`. In `edit` mode it renders
|
|
1726
|
-
* {@link DatePickerControl} plus the validation message; in `view` mode the matching viewer.
|
|
1727
|
-
*
|
|
1728
|
-
* ### Supported `config` keys
|
|
1729
|
-
* | Key | Type | Description |
|
|
1730
|
-
* | --- | --- | --- |
|
|
1731
|
-
* | `minDate` | `Date` | Earliest selectable date. |
|
|
1732
|
-
* | `maxDate` | `Date` | Latest selectable date. |
|
|
1733
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1734
|
-
* | `hijriCalendar` | `boolean` | Renders an Umm al-Qura Hijri calendar while the emitted value stays Gregorian. |
|
|
1735
|
-
* | `emitHijri` | `boolean` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
|
|
1736
|
-
*
|
|
1737
|
-
* ### Other field members used
|
|
1738
|
-
* `label()`
|
|
1739
|
-
*
|
|
1740
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1741
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1742
|
-
*
|
|
1743
|
-
* @example
|
|
1744
|
-
* ```json
|
|
1745
|
-
* { "name": "startsOn", "type": "date", "label": "Start date", "config": { "minDate": "2026-01-01" } }
|
|
1746
|
-
* ```
|
|
1747
|
-
*/
|
|
1748
|
-
declare class DatePickerField extends FieldBase {
|
|
1749
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerField, never>;
|
|
1750
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerField, "iss-field-date-picker", never, {}, {}, never, never, true, never>;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
/**
|
|
1754
|
-
* `<iss-field-datetime-picker>` — a date and a time in one field.
|
|
1755
|
-
*
|
|
1756
|
-
* Rendered by the outlet for fields of type `datetime`. In `edit` mode it renders
|
|
1757
|
-
* {@link DatetimePickerControl} plus the validation message; in `view` mode the matching viewer.
|
|
1758
|
-
*
|
|
1759
|
-
* ### Supported `config` keys
|
|
1760
|
-
* | Key | Type | Description |
|
|
1761
|
-
* | --- | --- | --- |
|
|
1762
|
-
* | `minDate` | `Date` | Earliest selectable date. |
|
|
1763
|
-
* | `maxDate` | `Date` | Latest selectable date. |
|
|
1764
|
-
* | `readonly` | `boolean` | Shows the value but blocks interaction. |
|
|
1765
|
-
* | `hijriCalendar` | `boolean` | Renders an Umm al-Qura Hijri calendar while the emitted value stays Gregorian. |
|
|
1766
|
-
* | `emitHijri` | `boolean` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
|
|
1767
|
-
*
|
|
1768
|
-
* ### Other field members used
|
|
1769
|
-
* `label()`
|
|
1770
|
-
*
|
|
1771
|
-
* Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and
|
|
1772
|
-
* `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.
|
|
1773
|
-
*
|
|
1774
|
-
* @example
|
|
1775
|
-
* ```json
|
|
1776
|
-
* { "name": "scheduledAt", "type": "datetime", "label": "Scheduled at" }
|
|
1777
|
-
* ```
|
|
1778
|
-
*/
|
|
1779
|
-
declare class DatetimePickerField extends FieldBase {
|
|
1780
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimePickerField, never>;
|
|
1781
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePickerField, "iss-field-datetime-picker", never, {}, {}, never, never, true, never>;
|
|
217
|
+
fn: EventStrategy | undefined;
|
|
218
|
+
fnPromise: Promise<EventStrategy> | undefined;
|
|
219
|
+
constructor(action: any, loader: Loader);
|
|
1782
220
|
}
|
|
1783
221
|
|
|
1784
222
|
/**
|
|
1785
|
-
*
|
|
223
|
+
* Runtime model of a single form field, built from the JSON definition returned by the API.
|
|
1786
224
|
*
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
225
|
+
* It is what `iss-field-*` components inject through the `FIELD_DATA` token, and the object
|
|
226
|
+
* field events read from and write to. Signal-valued members can be changed at runtime and
|
|
227
|
+
* the rendered field reacts immediately.
|
|
1789
228
|
*
|
|
1790
|
-
* ###
|
|
1791
|
-
* |
|
|
229
|
+
* ### Properties
|
|
230
|
+
* | Property | Type | Description |
|
|
1792
231
|
* | --- | --- | --- |
|
|
1793
|
-
* | `
|
|
1794
|
-
* | `
|
|
1795
|
-
* | `
|
|
1796
|
-
* | `
|
|
1797
|
-
* | `
|
|
1798
|
-
*
|
|
1799
|
-
*
|
|
1800
|
-
* `
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
* `
|
|
1804
|
-
*
|
|
1805
|
-
*
|
|
1806
|
-
*
|
|
1807
|
-
*
|
|
1808
|
-
*
|
|
1809
|
-
*
|
|
1810
|
-
*
|
|
232
|
+
* | `id` | `number` | Unique field id. |
|
|
233
|
+
* | `name` | `string` | Control name inside the form group. |
|
|
234
|
+
* | `type` | `string` | Key into the `COMPONENTS` index (`text_input`, `dropdown_list`, …). |
|
|
235
|
+
* | `base` | `string` | Underlying data type of the field. |
|
|
236
|
+
* | `label()` | `string` | Visible label. |
|
|
237
|
+
* | `hint()` | `string` | Helper text under the field. |
|
|
238
|
+
* | `options()` | `Option[]` | Choices for select, radio, checkbox and toggle fields. |
|
|
239
|
+
* | `api()` | `string` | Endpoint used to load options or lookups. |
|
|
240
|
+
* | `mode()` | `"edit" \| "view"` | Renders the control or the read-only viewer. |
|
|
241
|
+
* | `visible()` | `boolean` | Whether the field is rendered at all. |
|
|
242
|
+
* | `loading()` | `boolean` | Shows the field's own loading state. |
|
|
243
|
+
* | `config` | `FieldConfig` | Per-type configuration — see {@link FieldConfig}. |
|
|
244
|
+
* | `validation` | `any` | Synchronous validation rules, exactly as the JSON declared them. |
|
|
245
|
+
* | `validationFns` | `Record<string, Function>` | Validator factory behind each active rule, resolved by the outlet. |
|
|
246
|
+
* | `asyncValidation` | `FieldAsyncValidation` | Remote validation rules. |
|
|
247
|
+
* | `events` | `FieldEvent[]` | Cross-field reactions (show, hide, set value, …). |
|
|
248
|
+
* | `children` | `IssField[]` | Nested fields, used by table and group fields. |
|
|
249
|
+
* | `value` / `defaultValue` | `string` | Initial and fallback raw values. |
|
|
250
|
+
* | `jsonValue` | `any` | Initial resolved value for controls with a rich payload. |
|
|
251
|
+
* | `ctrlValue()` | `string \| null` | Live raw value of the control. |
|
|
252
|
+
* | `ctrlJsonValue()` | `any` | Live resolved value (selected options, files, users, …). |
|
|
253
|
+
* | `response()` / `apiResponse` | `any` | Latest payload returned for this field. |
|
|
1811
254
|
*/
|
|
1812
|
-
declare class
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RadioViewer, never>;
|
|
1841
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RadioViewer, "iss-viewer-radio", never, {}, {}, never, never, true, never>;
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
declare class SelectViewer extends ViewerBase {
|
|
1845
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectViewer, never>;
|
|
1846
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectViewer, "iss-viewer-select", never, {}, {}, never, never, true, never>;
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
declare class MobileViewer extends ViewerBase {
|
|
1850
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MobileViewer, never>;
|
|
1851
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MobileViewer, "iss-viewer-mobile", never, {}, {}, never, never, true, never>;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
declare class CheckboxViewer extends ViewerBase {
|
|
1855
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxViewer, never>;
|
|
1856
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxViewer, "iss-viewer-checkbox", never, {}, {}, never, never, true, never>;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
declare class ToggleButtonViewer extends ViewerBase {
|
|
1860
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleButtonViewer, never>;
|
|
1861
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonViewer, "iss-viewer-toggle-button", never, {}, {}, never, never, true, never>;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
declare class SlideToggleViewer extends ViewerBase {
|
|
1865
|
-
isChecked(value: unknown): boolean;
|
|
1866
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SlideToggleViewer, never>;
|
|
1867
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlideToggleViewer, "iss-viewer-slide-toggle", never, {}, {}, never, never, true, never>;
|
|
255
|
+
declare class IssField {
|
|
256
|
+
id: number;
|
|
257
|
+
name: string;
|
|
258
|
+
type: string;
|
|
259
|
+
base: string;
|
|
260
|
+
label: WritableSignal<string>;
|
|
261
|
+
hint: WritableSignal<string>;
|
|
262
|
+
options: WritableSignal<Option[]>;
|
|
263
|
+
api: WritableSignal<string>;
|
|
264
|
+
mode: WritableSignal<"edit" | "view">;
|
|
265
|
+
visible: WritableSignal<boolean>;
|
|
266
|
+
wasVisible: WritableSignal<boolean>;
|
|
267
|
+
events: FieldEvent[];
|
|
268
|
+
validation: any;
|
|
269
|
+
validationFns: Record<string, Function>;
|
|
270
|
+
asyncValidation: FieldAsyncValidation;
|
|
271
|
+
children: IssField[];
|
|
272
|
+
apiResponse: BehaviorSubject<any>;
|
|
273
|
+
response: WritableSignal<any>;
|
|
274
|
+
config: FieldConfig;
|
|
275
|
+
value: string;
|
|
276
|
+
jsonValue: any;
|
|
277
|
+
defaultValue: string;
|
|
278
|
+
ctrlValue: WritableSignal<string | null>;
|
|
279
|
+
ctrlJsonValue: WritableSignal<any>;
|
|
280
|
+
loading: WritableSignal<boolean>;
|
|
281
|
+
constructor(field: any, loader: Loader);
|
|
282
|
+
updateVisibility(value: boolean): void;
|
|
1868
283
|
}
|
|
1869
284
|
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
lettersAr: i0.WritableSignal<string[]>;
|
|
1874
|
-
lettersEn: i0.WritableSignal<string[]>;
|
|
1875
|
-
effectRef: i0.EffectRef;
|
|
1876
|
-
private convertDigit;
|
|
1877
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PlateViewer, never>;
|
|
1878
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PlateViewer, "iss-viewer-plate", never, {}, {}, never, never, true, never>;
|
|
285
|
+
interface ComponentOutlet {
|
|
286
|
+
self$: Observable<Type<any> | null>;
|
|
287
|
+
data: IssField;
|
|
1879
288
|
}
|
|
1880
289
|
|
|
1881
|
-
declare class
|
|
290
|
+
declare class Outlet implements OnInit, OnDestroy {
|
|
1882
291
|
#private;
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
static
|
|
292
|
+
ready: OutputEmitterRef<boolean>;
|
|
293
|
+
formReady: WritableSignal<boolean>;
|
|
294
|
+
fields: InputSignal<IssField[]>;
|
|
295
|
+
components: WritableSignal<ComponentOutlet[] | null>;
|
|
296
|
+
get hostFormGroup(): FormGroup;
|
|
297
|
+
ngOnInit(): void;
|
|
298
|
+
ngOnDestroy(): void;
|
|
299
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Outlet, never>;
|
|
300
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Outlet, "iss-form-outlet", never, { "fields": { "alias": "fields"; "required": true; "isSignal": true; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
1891
301
|
}
|
|
1892
302
|
|
|
1893
|
-
declare class
|
|
1894
|
-
|
|
1895
|
-
|
|
303
|
+
declare class FieldDataInjector implements PipeTransform {
|
|
304
|
+
injector: Injector;
|
|
305
|
+
transform(field: IssField | null): Injector;
|
|
306
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldDataInjector, never>;
|
|
307
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FieldDataInjector, "FieldDataInjector", true>;
|
|
1896
308
|
}
|
|
1897
309
|
|
|
1898
|
-
declare class
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
310
|
+
declare class EventHandler {
|
|
311
|
+
#private;
|
|
312
|
+
fire(control: AbstractControl, form: FormGroup, field: IssField, change: FieldChange): Promise<void>;
|
|
313
|
+
revert(control: AbstractControl, form: FormGroup, field: IssField, change: FieldChange): Promise<void>;
|
|
314
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EventHandler, never>;
|
|
315
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EventHandler>;
|
|
1902
316
|
}
|
|
1903
317
|
|
|
1904
|
-
declare class
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
318
|
+
declare class FormEngine {
|
|
319
|
+
#private;
|
|
320
|
+
registerFields(form: FormGroup, owner: object, fields: IssField[]): void;
|
|
321
|
+
registerExpectedFieldNames(form: FormGroup, owner: object, names: string[]): void;
|
|
322
|
+
unregisterOutlet(form: FormGroup, owner: object): void;
|
|
323
|
+
getFields(form: FormGroup): IssField[];
|
|
324
|
+
getExpectedFieldNames(form: FormGroup): string[];
|
|
325
|
+
getField(form: FormGroup, name: string, fields?: IssField[]): IssField | undefined;
|
|
326
|
+
getControlValue(form: FormGroup, name: string): any;
|
|
327
|
+
createValidators(field: IssField): ValidatorFn[];
|
|
328
|
+
createAsyncValidators(field: IssField): AsyncValidatorFn[];
|
|
329
|
+
getFieldValue(field: IssField): string;
|
|
330
|
+
trackChangesEvents(field: IssField, form: FormGroup): Observable<FieldChange>;
|
|
331
|
+
trackChangesValidations(field: IssField, form: FormGroup): Observable<FieldChange>;
|
|
332
|
+
processTrackChanges(masterName: any, masterNames: Set<string>, changes$: Observable<FieldChange>[], field: IssField, form: FormGroup): void;
|
|
333
|
+
fieldHasValidation(field: IssField): boolean;
|
|
334
|
+
fieldHasAsyncValidation(field: IssField): boolean;
|
|
335
|
+
isFormValid(form: FormGroup, fields: IssField[]): boolean;
|
|
336
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormEngine, never>;
|
|
337
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormEngine>;
|
|
1909
338
|
}
|
|
1910
339
|
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
340
|
+
/**
|
|
341
|
+
* Base class for every `iss-field-*` field.
|
|
342
|
+
*
|
|
343
|
+
* A field is the form-engine layer around a control: it reads its whole configuration from
|
|
344
|
+
* the injected {@link IssField} (label, options, config, validation, events), registers its
|
|
345
|
+
* `FormControl` on the parent `FormGroup` on init and removes it again on destroy, and
|
|
346
|
+
* switches between the control (`mode() === "edit"`) and the viewer (`mode() === "view"`).
|
|
347
|
+
*
|
|
348
|
+
* ### Inputs
|
|
349
|
+
* | Property | Type | Description |
|
|
350
|
+
* | --- | --- | --- |
|
|
351
|
+
* | `issField` | `IssField` | **Required.** The field definition; also provided through the `FIELD_DATA` token. |
|
|
352
|
+
* | `formReady` | `boolean \| undefined` | Set by the outlet once the whole form exists; gates event wiring. |
|
|
353
|
+
*
|
|
354
|
+
* ### Properties available on `field`
|
|
355
|
+
* `name` · `type` · `base` · `label()` · `hint()` · `options()` · `api()` · `mode()` ·
|
|
356
|
+
* `visible()` · `loading()` · `value` · `jsonValue` · `defaultValue` · `ctrlValue()` ·
|
|
357
|
+
* `ctrlJsonValue()` · `events` · `validation` · `asyncValidation` · `children` ·
|
|
358
|
+
* `response()` · `config` — see {@link IssField} and {@link FieldConfig}.
|
|
359
|
+
*
|
|
360
|
+
* Fields are not used directly in templates; the outlet resolves them from the field `type`
|
|
361
|
+
* through the `COMPONENTS` index.
|
|
362
|
+
*/
|
|
363
|
+
declare class FieldBase implements OnInit, OnDestroy {
|
|
364
|
+
#private;
|
|
365
|
+
/**
|
|
366
|
+
* The field definition rendered by this component. Required.
|
|
367
|
+
*/
|
|
368
|
+
issField: InputSignal<IssField>;
|
|
369
|
+
/**
|
|
370
|
+
* Set by the outlet once every field is registered; field events start only after it turns true.
|
|
371
|
+
*/
|
|
372
|
+
formReady: InputSignal<boolean | undefined>;
|
|
373
|
+
/**
|
|
374
|
+
* The {@link IssField} for this instance, injected through the `FIELD_DATA` token.
|
|
375
|
+
*/
|
|
376
|
+
field: IssField;
|
|
377
|
+
parentFormGroup: ControlContainer;
|
|
378
|
+
formEngine: FormEngine;
|
|
379
|
+
eventHandler: EventHandler;
|
|
380
|
+
destroyRef: DestroyRef;
|
|
381
|
+
/**
|
|
382
|
+
* The `FormControl` this field registers on the parent form under `field.name`.
|
|
383
|
+
*/
|
|
384
|
+
ctrl: FormControl;
|
|
385
|
+
ctrlValueChange: i0.Signal<any>;
|
|
386
|
+
get form(): FormGroup;
|
|
1914
387
|
ngOnInit(): void;
|
|
1915
|
-
|
|
1916
|
-
static
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
declare const DEFAULT_COUNTRY: Country;
|
|
1920
|
-
declare const COUNTRIES: Country[];
|
|
1921
|
-
|
|
1922
|
-
declare const DATE_FORMAT_ADAPTER: MatDateFormats;
|
|
1923
|
-
declare const DATETIME_FORMAT = "dd/MM/yyyy hh:mm a";
|
|
1924
|
-
|
|
1925
|
-
interface PlateLetter {
|
|
1926
|
-
label: {
|
|
1927
|
-
ar: string;
|
|
1928
|
-
en: string;
|
|
1929
|
-
};
|
|
1930
|
-
value: string;
|
|
388
|
+
ngOnDestroy(): void;
|
|
389
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldBase, never>;
|
|
390
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldBase, "ng-component", never, { "issField": { "alias": "issField"; "required": true; "isSignal": true; }; "formReady": { "alias": "formReady"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1931
391
|
}
|
|
1932
392
|
|
|
1933
|
-
declare const PLATE_LETTERS: PlateLetter[];
|
|
1934
|
-
|
|
1935
393
|
declare const VIEW_PROVIDER: StaticProvider;
|
|
1936
394
|
|
|
1937
395
|
declare const PLACEHOLDER_REGEX: RegExp;
|
|
1938
396
|
|
|
1939
|
-
interface I18n {
|
|
1940
|
-
ar: string;
|
|
1941
|
-
en: string;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
397
|
type ValidationMessageFn<T> = (args: T) => I18n;
|
|
1945
398
|
|
|
1946
399
|
interface IssValidator {
|
|
@@ -1963,7 +416,7 @@ interface DynamicImport<T> {
|
|
|
1963
416
|
* | --- | --- | --- | --- |
|
|
1964
417
|
* | `text_input` | `InputField` | `iss-ctrl-input` | Single line text, number, email, password. |
|
|
1965
418
|
* | `textarea` | `TextareaField` | `iss-ctrl-textarea` | Multi line free text. |
|
|
1966
|
-
* | `dropdown_list` | `
|
|
419
|
+
* | `dropdown_list` | `DropdownlistField` | `iss-ctrl-dropdownlist` | Searchable single/multi select. |
|
|
1967
420
|
* | `toggle_button` | `ToggleButtonField` | `iss-ctrl-toggle-button` | Options as a button group. |
|
|
1968
421
|
* | `checkbox` | `CheckboxField` | `iss-ctrl-checkbox` | Multi choice checkbox list. |
|
|
1969
422
|
* | `radio` | `RadioField` | `iss-ctrl-radio` | Single choice radio list. |
|
|
@@ -1972,7 +425,7 @@ interface DynamicImport<T> {
|
|
|
1972
425
|
* | `datetime` | `DatetimePickerField` | `iss-ctrl-datetime-picker` | Date and time together. |
|
|
1973
426
|
* | `date_range` | `DateRangePickerField` | `iss-ctrl-date-range-picker` | A start/end date range. |
|
|
1974
427
|
* | `attachment` | `FilePickerField` | `iss-ctrl-file-picker` | File upload. |
|
|
1975
|
-
* | `userPicker` | `UserPickerField` | `iss-ctrl-
|
|
428
|
+
* | `userPicker` | `UserPickerField` | `iss-ctrl-dropdownlist` | Employee lookup. |
|
|
1976
429
|
* | `vehicle_plate` | `PlateField` | `iss-ctrl-plate-number` | Saudi vehicle plate. |
|
|
1977
430
|
* | `enrichment` | `NoteField` | — | Read-only explanatory text. |
|
|
1978
431
|
* | `mobile` | `MobileField` | `iss-ctrl-mobile` | International phone number. |
|
|
@@ -1996,25 +449,8 @@ declare const VALIDATORS: DynamicImport<Function>;
|
|
|
1996
449
|
*/
|
|
1997
450
|
declare function isActiveValidationRule(value: unknown): boolean;
|
|
1998
451
|
|
|
1999
|
-
declare const HOST: InjectionToken<string>;
|
|
2000
|
-
|
|
2001
452
|
declare const FIELD_DATA: InjectionToken<IssField>;
|
|
2002
453
|
|
|
2003
|
-
declare const UI_LANGUAGE: InjectionToken<string>;
|
|
2004
|
-
|
|
2005
|
-
declare const ATTACHMENT_UPLOAD_URL: InjectionToken<string>;
|
|
2006
|
-
declare const ATTACHMENT_UPLOAD_RESPONSE_MAPPER: InjectionToken<(res: any) => IssAttachment[]>;
|
|
2007
|
-
declare const ATTACHMENT_DOWNLOAD_URL: InjectionToken<string>;
|
|
2008
|
-
|
|
2009
|
-
declare const USER_SEARCH_API: InjectionToken<string>;
|
|
2010
|
-
|
|
2011
|
-
declare class Hints {
|
|
2012
|
-
hints: InputSignal<Hint[]>;
|
|
2013
|
-
touched: InputSignal<boolean>;
|
|
2014
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Hints, never>;
|
|
2015
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Hints, "iss-ctrl-hints", never, { "hints": { "alias": "hints"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
454
|
declare class ValidationMessage {
|
|
2019
455
|
errors: InputSignal<ValidationErrors | null>;
|
|
2020
456
|
showMessage: InputSignal<boolean>;
|
|
@@ -2050,47 +486,18 @@ declare class FieldViewer {
|
|
|
2050
486
|
static ɵcmp: i0.ɵɵComponentDeclaration<FieldViewer, "iss-field-viewer", never, {}, {}, never, ["label", "*"], true, never>;
|
|
2051
487
|
}
|
|
2052
488
|
|
|
2053
|
-
declare class Droppable {
|
|
2054
|
-
onDrop: OutputEmitterRef<FileList>;
|
|
2055
|
-
onDragOver(evt: any): void;
|
|
2056
|
-
onDragLeave(evt: any): void;
|
|
2057
|
-
onDropped(evt: any): void;
|
|
2058
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Droppable, never>;
|
|
2059
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Droppable, "[droppable]", never, {}, { "onDrop": "onDrop"; }, never, never, true, never>;
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
489
|
declare class ArabicNumberPipe implements PipeTransform {
|
|
2063
490
|
transform(n: string): string;
|
|
2064
491
|
static ɵfac: i0.ɵɵFactoryDeclaration<ArabicNumberPipe, never>;
|
|
2065
492
|
static ɵpipe: i0.ɵɵPipeDeclaration<ArabicNumberPipe, "arabicNumber", true>;
|
|
2066
493
|
}
|
|
2067
494
|
|
|
2068
|
-
declare class FieldDataInjector implements PipeTransform {
|
|
2069
|
-
injector: Injector;
|
|
2070
|
-
transform(field: IssField | null): Injector;
|
|
2071
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldDataInjector, never>;
|
|
2072
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FieldDataInjector, "FieldDataInjector", true>;
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
495
|
declare class PlateLetterPipe implements PipeTransform {
|
|
2076
496
|
transform(value: string): unknown;
|
|
2077
497
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlateLetterPipe, never>;
|
|
2078
498
|
static ɵpipe: i0.ɵɵPipeDeclaration<PlateLetterPipe, "plateLetter", true>;
|
|
2079
499
|
}
|
|
2080
500
|
|
|
2081
|
-
declare class SelectStatusPipe implements PipeTransform {
|
|
2082
|
-
transform(option: Option, ...args: unknown[]): boolean;
|
|
2083
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectStatusPipe, never>;
|
|
2084
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SelectStatusPipe, "selectStatus", true>;
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
declare class TranslatePipe implements PipeTransform {
|
|
2088
|
-
currentLanguage: string;
|
|
2089
|
-
transform(value: I18n | string, locale?: string): string;
|
|
2090
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
|
|
2091
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
501
|
declare class Employee {
|
|
2095
502
|
#private;
|
|
2096
503
|
loggedInUserProfile: any;
|
|
@@ -2104,139 +511,30 @@ declare class Employee {
|
|
|
2104
511
|
static ɵprov: i0.ɵɵInjectableDeclaration<Employee>;
|
|
2105
512
|
}
|
|
2106
513
|
|
|
2107
|
-
|
|
2108
|
-
* The single date adapter behind every `iss-ctrl-*` picker.
|
|
2109
|
-
*
|
|
2110
|
-
* It behaves as a plain Gregorian adapter — `dd/MM/yyyy` in and out — until its locale is
|
|
2111
|
-
* switched to {@link HIJRI_LOCALE}, at which point the whole calendar grid becomes Umm
|
|
2112
|
-
* al-Qura Hijri: the month lengths, the year and month labels and the day numbers all come
|
|
2113
|
-
* from the Hijri calendar.
|
|
2114
|
-
*
|
|
2115
|
-
* The value never changes shape. The adapter always works on a `Date`, so a Hijri calendar
|
|
2116
|
-
* still hands the control an ordinary `Date`, and it stays the control's decision whether to
|
|
2117
|
-
* emit that as a Gregorian or a Hijri string.
|
|
2118
|
-
*
|
|
2119
|
-
* Switch modes through {@link setHijri}, never by assigning `locale` — `setLocale` is what
|
|
2120
|
-
* tells an open calendar to re-render.
|
|
2121
|
-
*/
|
|
2122
|
-
declare class IssDateAdapter extends NativeDateAdapter {
|
|
514
|
+
declare class FileHandler {
|
|
2123
515
|
#private;
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
getMonthNames(style: "long" | "short" | "narrow"): string[];
|
|
2137
|
-
getDateNames(): string[];
|
|
2138
|
-
getDayOfWeekNames(style: "long" | "short" | "narrow"): string[];
|
|
2139
|
-
getYearName(date: Date): string;
|
|
2140
|
-
getFirstDayOfWeek(): number;
|
|
2141
|
-
getNumDaysInMonth(date: Date): number;
|
|
2142
|
-
createDate(year: number, month: number, date: number): Date;
|
|
2143
|
-
addCalendarYears(date: Date, years: number): Date;
|
|
2144
|
-
addCalendarMonths(date: Date, months: number): Date;
|
|
2145
|
-
addCalendarDays(date: Date, days: number): Date;
|
|
2146
|
-
parse(value: any, parseFormat?: any): Date | null;
|
|
2147
|
-
format(date: Date, displayFormat: string): string;
|
|
2148
|
-
deserialize(value: any): Date | null;
|
|
2149
|
-
toIso8601(date: Date): string;
|
|
2150
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IssDateAdapter, never>;
|
|
2151
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<IssDateAdapter>;
|
|
516
|
+
ATTACHMENT_UPLOAD_URL: string;
|
|
517
|
+
ATTACHMENT_DOWNLOAD_URL: string;
|
|
518
|
+
attachmentAdapter: (res: any) => IssAttachment[];
|
|
519
|
+
upload(data: FormData): Observable<IssAttachment[]>;
|
|
520
|
+
formDataFactory(files: IssFile[], multiple: boolean): FormData | null;
|
|
521
|
+
formDataHasValue(formData: FormData): boolean;
|
|
522
|
+
getFileFromFormData(formData: FormData, name: string): IssFile[];
|
|
523
|
+
formatFileSize(x: string | number): string;
|
|
524
|
+
fetchFileInfo(id: string): Observable<IssFile>;
|
|
525
|
+
fetchFiles(ids: string): Observable<IssFile[]>;
|
|
526
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileHandler, never>;
|
|
527
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FileHandler>;
|
|
2152
528
|
}
|
|
2153
|
-
/**
|
|
2154
|
-
* Providers every date-based control needs: the {@link IssDateAdapter} itself, the Gregorian
|
|
2155
|
-
* locale it falls back to, and the `dd/MM/yyyy` formats both of its calendars are rendered in.
|
|
2156
|
-
*
|
|
2157
|
-
* Declared per component, so each picker owns its adapter instance and one field switching to
|
|
2158
|
-
* the Hijri calendar leaves every other field on the form alone.
|
|
2159
|
-
*/
|
|
2160
|
-
declare function provideIssDateAdapter(): Provider[];
|
|
2161
529
|
|
|
2162
530
|
declare function arrayFrom<T>(length: number, valueFunction: (index: number) => T): T[];
|
|
2163
531
|
|
|
2164
|
-
declare function formatFileSize(x: string | number): string;
|
|
2165
|
-
|
|
2166
532
|
declare function getPropertyByPath(obj: any, path: string | undefined): any;
|
|
2167
533
|
|
|
2168
|
-
/**
|
|
2169
|
-
* Umm al-Qura Hijri calendar helpers.
|
|
2170
|
-
*
|
|
2171
|
-
* Every function here works on a plain `Date`: a `Date` is an instant, and the Hijri
|
|
2172
|
-
* calendar is only another way of naming that instant. Nothing stores Hijri numbers on the
|
|
2173
|
-
* date itself, so a value converted to Hijri for display or emission is still the same day.
|
|
2174
|
-
*
|
|
2175
|
-
* The conversion is done by `Intl` with the `islamic-umalqura` calendar, which is the
|
|
2176
|
-
* calendar used officially in Saudi Arabia.
|
|
2177
|
-
*/
|
|
2178
|
-
/** Locale used by the calendar UI when the Hijri calendar is on. */
|
|
2179
|
-
declare const HIJRI_LOCALE = "ar-SA-u-ca-islamic-umalqura";
|
|
2180
|
-
declare const HIJRI_MONTH_NAMES: {
|
|
2181
|
-
ar: string[];
|
|
2182
|
-
en: string[];
|
|
2183
|
-
enShort: string[];
|
|
2184
|
-
};
|
|
2185
|
-
interface HijriParts {
|
|
2186
|
-
/** Hijri year, for example `1447`. */
|
|
2187
|
-
year: number;
|
|
2188
|
-
/** Hijri month, **zero based** like `Date.getMonth()` — `0` is Muharram. */
|
|
2189
|
-
month: number;
|
|
2190
|
-
/** Hijri day of month, starting at `1`. */
|
|
2191
|
-
day: number;
|
|
2192
|
-
}
|
|
2193
|
-
/**
|
|
2194
|
-
* Reads the Hijri year, month and day a `Date` falls on.
|
|
2195
|
-
*/
|
|
2196
|
-
declare function getHijriParts(date: Date): HijriParts;
|
|
2197
|
-
/**
|
|
2198
|
-
* The Gregorian `Date` of the first day of the Hijri month `date` falls in, at midday.
|
|
2199
|
-
*
|
|
2200
|
-
* Midday, not midnight, so a daylight-saving shift can never push the result into the
|
|
2201
|
-
* previous day while the month is being walked.
|
|
2202
|
-
*/
|
|
2203
|
-
declare function startOfHijriMonth(date: Date): Date;
|
|
2204
|
-
/**
|
|
2205
|
-
* Number of days in the Hijri month `date` falls in — 29 or 30, decided by Umm al-Qura.
|
|
2206
|
-
*/
|
|
2207
|
-
declare function getHijriDaysInMonth(date: Date): number;
|
|
2208
|
-
/**
|
|
2209
|
-
* Builds the `Date` for a Hijri year/month/day. The month is zero based, and a day past the
|
|
2210
|
-
* end of the month is clamped to the last day of that month.
|
|
2211
|
-
*/
|
|
2212
|
-
declare function createHijriDate(year: number, month: number, day: number): Date;
|
|
2213
|
-
/**
|
|
2214
|
-
* Formats a date as a Hijri `yyyy-MM-dd` string — the shape the form emits when
|
|
2215
|
-
* `emitHijri` is on.
|
|
2216
|
-
*/
|
|
2217
|
-
declare function formatHijriDate(date: Date): string;
|
|
2218
|
-
/**
|
|
2219
|
-
* Reads a Hijri date back into a `Date`, accepting both the emitted `yyyy-MM-dd` shape and
|
|
2220
|
-
* the `dd/MM/yyyy` shape shown in the input. Returns `null` for anything else.
|
|
2221
|
-
*/
|
|
2222
|
-
declare function parseHijriDate(value: string | null | undefined): Date | null;
|
|
2223
|
-
/**
|
|
2224
|
-
* Renders a stored form value as a Hijri `dd/MM/yyyy` string for the read-only viewers, or
|
|
2225
|
-
* returns `null` when the field is not on the Hijri calendar and the value should be shown
|
|
2226
|
-
* as an ordinary Gregorian date.
|
|
2227
|
-
*
|
|
2228
|
-
* The two Hijri modes store different things, so they are read differently: with `emitHijri`
|
|
2229
|
-
* the value already carries Hijri numbers and only its notation changes, while with
|
|
2230
|
-
* `hijriCalendar` alone the value is Gregorian and has to be converted.
|
|
2231
|
-
*/
|
|
2232
|
-
declare function toHijriDisplay(value: string | null | undefined, options: {
|
|
2233
|
-
hijriCalendar?: boolean;
|
|
2234
|
-
emitHijri?: boolean;
|
|
2235
|
-
withTime?: boolean;
|
|
2236
|
-
}): string | null;
|
|
2237
|
-
|
|
2238
534
|
declare function replacePlaceholders(str: string, values: any): string;
|
|
2239
535
|
|
|
536
|
+
declare function formatFileSize(x: string | number): string;
|
|
537
|
+
|
|
2240
538
|
declare abstract class IssValidators {
|
|
2241
539
|
static required(): ValidatorFn;
|
|
2242
540
|
static max(maxValue: number): ValidatorFn;
|
|
@@ -2261,5 +559,5 @@ declare abstract class TimeValidator {
|
|
|
2261
559
|
static afterDate(otherFieldName: string): ValidatorFn;
|
|
2262
560
|
}
|
|
2263
561
|
|
|
2264
|
-
export {
|
|
2265
|
-
export type { ActionTriggerFn, ComponentOutlet,
|
|
562
|
+
export { ArabicNumberPipe, COMPONENTS, Employee, FIELD_DATA, FieldBase, FieldDataInjector, FieldViewer, FileHandler, FileValidators, FormEngine, IssValidators, Loader, Outlet, PLACEHOLDER_REGEX, PlateLetterPipe, SERVICES, TimeValidator, VALIDATION_MESSAGES, VALIDATORS, VIEW_PROVIDER, ValidationMessage, arrayFrom, formatFileSize, getPropertyByPath, isActiveValidationRule, replacePlaceholders };
|
|
563
|
+
export type { ActionTriggerFn, ComponentOutlet, DynamicImport, EventArgument, EventConfigFn, EventStrategy, FieldChange, IssValidator, ValidationMessageFn };
|