iss-ctrl 0.0.22 → 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 +1 -1
- package/fesm2022/iss-ctrl-base.mjs +20 -1
- package/fesm2022/iss-ctrl-base.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-checkbox.field-Dj5EGLUr.mjs → iss-ctrl-checkbox.field-CILXADas.mjs} +25 -29
- package/fesm2022/iss-ctrl-checkbox.field-CILXADas.mjs.map +1 -0
- package/fesm2022/iss-ctrl-checkbox.mjs +10 -7
- package/fesm2022/iss-ctrl-checkbox.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-chips.field-BLLAjBbP.mjs → iss-ctrl-chips.field-445Ds3V7.mjs} +2 -2
- package/fesm2022/{iss-ctrl-chips.field-BLLAjBbP.mjs.map → iss-ctrl-chips.field-445Ds3V7.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-date-picker.field-BSpXukpO.mjs → iss-ctrl-date-picker.field-Djhh1FsR.mjs} +2 -2
- package/fesm2022/{iss-ctrl-date-picker.field-BSpXukpO.mjs.map → iss-ctrl-date-picker.field-Djhh1FsR.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-date-range-picker.field-CjNHU1RW.mjs → iss-ctrl-date-range-picker.field-Dv636SAm.mjs} +2 -2
- package/fesm2022/{iss-ctrl-date-range-picker.field-CjNHU1RW.mjs.map → iss-ctrl-date-range-picker.field-Dv636SAm.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-datetime-picker.field-DGMY9PaU.mjs → iss-ctrl-datetime-picker.field-DldY8vke.mjs} +2 -2
- package/fesm2022/{iss-ctrl-datetime-picker.field-DGMY9PaU.mjs.map → iss-ctrl-datetime-picker.field-DldY8vke.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-select.field-DoU4G_8t.mjs → iss-ctrl-dropdownlist.field-DikBAtc_.mjs} +21 -21
- package/fesm2022/iss-ctrl-dropdownlist.field-DikBAtc_.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-select.mjs → iss-ctrl-dropdownlist.mjs} +36 -25
- package/fesm2022/iss-ctrl-dropdownlist.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-select.viewer-Dv9M-lG-.mjs → iss-ctrl-dropdownlist.viewer-OWJxDpr8.mjs} +7 -7
- package/fesm2022/iss-ctrl-dropdownlist.viewer-OWJxDpr8.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-file-picker.field-CbepZaX6.mjs → iss-ctrl-file-picker.field-BMZaJxvj.mjs} +2 -2
- package/fesm2022/{iss-ctrl-file-picker.field-CbepZaX6.mjs.map → iss-ctrl-file-picker.field-BMZaJxvj.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-file-picker.mjs +3 -1
- package/fesm2022/iss-ctrl-file-picker.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-input.field-Ctlf3OCN.mjs → iss-ctrl-input.field-BiwBFYx3.mjs} +2 -2
- package/fesm2022/{iss-ctrl-input.field-Ctlf3OCN.mjs.map → iss-ctrl-input.field-BiwBFYx3.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-iss-ctrl-DvnkwSMG.mjs → iss-ctrl-iss-ctrl-BG-QWWdq.mjs} +51 -70
- package/fesm2022/iss-ctrl-iss-ctrl-BG-QWWdq.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-event-CuZ7pMjk.mjs → iss-ctrl-load-event-T4L3k9XO.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-event-CuZ7pMjk.mjs.map → iss-ctrl-load-event-T4L3k9XO.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-options-event-B10rhdqh.mjs → iss-ctrl-load-options-event-tG258cbP.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-options-event-B10rhdqh.mjs.map → iss-ctrl-load-options-event-tG258cbP.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-value-event-C-aRgKLx.mjs → iss-ctrl-load-value-event--7zt90Dl.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-value-event-C-aRgKLx.mjs.map → iss-ctrl-load-value-event--7zt90Dl.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-mobile.field-DXVYT3q-.mjs → iss-ctrl-mobile.field-DLccnWKX.mjs} +2 -2
- package/fesm2022/{iss-ctrl-mobile.field-DXVYT3q-.mjs.map → iss-ctrl-mobile.field-DLccnWKX.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-note.field-C8X9-mgD.mjs → iss-ctrl-note.field-CT1wVmfF.mjs} +2 -2
- package/fesm2022/{iss-ctrl-note.field-C8X9-mgD.mjs.map → iss-ctrl-note.field-CT1wVmfF.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-plate.field-aI81tAOV.mjs → iss-ctrl-plate.field-CQQY8rnE.mjs} +2 -2
- package/fesm2022/{iss-ctrl-plate.field-aI81tAOV.mjs.map → iss-ctrl-plate.field-CQQY8rnE.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-plate.mjs +3 -1
- package/fesm2022/iss-ctrl-plate.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-radio.field-B_JjPIlb.mjs → iss-ctrl-radio.field-Dp5D-AXQ.mjs} +11 -19
- package/fesm2022/iss-ctrl-radio.field-Dp5D-AXQ.mjs.map +1 -0
- package/fesm2022/iss-ctrl-radio.mjs +9 -6
- package/fesm2022/iss-ctrl-radio.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-replace-api-keys-DLnagkOr.mjs → iss-ctrl-replace-api-keys-COUv4Kin.mjs} +2 -2
- package/fesm2022/{iss-ctrl-replace-api-keys-DLnagkOr.mjs.map → iss-ctrl-replace-api-keys-COUv4Kin.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-set-value-event-Dhw0Vj5J.mjs → iss-ctrl-set-value-event-D0-_qIyS.mjs} +2 -2
- package/fesm2022/{iss-ctrl-set-value-event-Dhw0Vj5J.mjs.map → iss-ctrl-set-value-event-D0-_qIyS.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-slide-toggle.field-TVVbAr6p.mjs → iss-ctrl-slide-toggle.field-vCJHOiSG.mjs} +2 -2
- package/fesm2022/{iss-ctrl-slide-toggle.field-TVVbAr6p.mjs.map → iss-ctrl-slide-toggle.field-vCJHOiSG.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-slide-toggle.mjs +5 -11
- package/fesm2022/iss-ctrl-slide-toggle.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-table.field-E0r9w0os.mjs → iss-ctrl-table.field-DdFjH-D8.mjs} +2 -2
- package/fesm2022/{iss-ctrl-table.field-E0r9w0os.mjs.map → iss-ctrl-table.field-DdFjH-D8.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-textarea.field-CmHPDpk-.mjs → iss-ctrl-textarea.field-Dqhhu2m4.mjs} +2 -2
- package/fesm2022/{iss-ctrl-textarea.field-CmHPDpk-.mjs.map → iss-ctrl-textarea.field-Dqhhu2m4.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-time-picker.field-Cb0I5Ut1.mjs → iss-ctrl-time-picker.field-CdmxRiH8.mjs} +2 -2
- package/fesm2022/{iss-ctrl-time-picker.field-Cb0I5Ut1.mjs.map → iss-ctrl-time-picker.field-CdmxRiH8.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-toggle-button.field-Bj8WrkB-.mjs → iss-ctrl-toggle-button.field-rAT7dVFC.mjs} +39 -43
- package/fesm2022/iss-ctrl-toggle-button.field-rAT7dVFC.mjs.map +1 -0
- package/fesm2022/iss-ctrl-toggle-button.mjs +9 -7
- package/fesm2022/iss-ctrl-toggle-button.mjs.map +1 -1
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-D9rTXVD1.mjs → iss-ctrl-trigger-based-on-json-value-I92SNsv9.mjs} +2 -2
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-D9rTXVD1.mjs.map → iss-ctrl-trigger-based-on-json-value-I92SNsv9.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-user-picker.field-BIzB5ZX6.mjs → iss-ctrl-user-picker.field-DpmYCfpD.mjs} +10 -10
- package/fesm2022/iss-ctrl-user-picker.field-DpmYCfpD.mjs.map +1 -0
- package/fesm2022/iss-ctrl.mjs +1 -1
- package/package.json +5 -5
- package/types/iss-ctrl-base.d.ts +15 -3
- package/types/iss-ctrl-checkbox.d.ts +4 -3
- package/types/{iss-ctrl-select.d.ts → iss-ctrl-dropdownlist.d.ts} +11 -8
- package/types/iss-ctrl-file-picker.d.ts +2 -2
- package/types/iss-ctrl-plate.d.ts +2 -2
- package/types/iss-ctrl-radio.d.ts +3 -3
- package/types/iss-ctrl-slide-toggle.d.ts +2 -2
- package/types/iss-ctrl-toggle-button.d.ts +3 -3
- package/types/iss-ctrl.d.ts +5 -17
- package/fesm2022/iss-ctrl-checkbox.field-Dj5EGLUr.mjs.map +0 -1
- package/fesm2022/iss-ctrl-iss-ctrl-DvnkwSMG.mjs.map +0 -1
- package/fesm2022/iss-ctrl-radio.field-B_JjPIlb.mjs.map +0 -1
- package/fesm2022/iss-ctrl-select.field-DoU4G_8t.mjs.map +0 -1
- package/fesm2022/iss-ctrl-select.mjs.map +0 -1
- package/fesm2022/iss-ctrl-select.viewer-Dv9M-lG-.mjs.map +0 -1
- package/fesm2022/iss-ctrl-toggle-button.field-Bj8WrkB-.mjs.map +0 -1
- package/fesm2022/iss-ctrl-user-picker.field-BIzB5ZX6.mjs.map +0 -1
package/fesm2022/{iss-ctrl-user-picker.field-BIzB5ZX6.mjs → iss-ctrl-user-picker.field-DpmYCfpD.mjs}
RENAMED
|
@@ -3,14 +3,14 @@ import { inject, signal, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core
|
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { MatSidenav, MatSidenavContainer } from '@angular/material/sidenav';
|
|
5
5
|
import { Subject, debounceTime, distinctUntilChanged, switchMap, map } from 'rxjs';
|
|
6
|
-
import { F as FieldBase, E as Employee, V as VIEW_PROVIDER, a as ValidationMessage, b as FieldViewer } from './iss-ctrl-iss-ctrl-
|
|
7
|
-
import {
|
|
6
|
+
import { F as FieldBase, E as Employee, V as VIEW_PROVIDER, a as ValidationMessage, b as FieldViewer } from './iss-ctrl-iss-ctrl-BG-QWWdq.mjs';
|
|
7
|
+
import { DropdownlistControl } from 'iss-ctrl/dropdownlist';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* `<iss-user-picker>` — employee lookup, searched against the directory API.
|
|
11
11
|
*
|
|
12
12
|
* Rendered by the outlet for fields of type `userPicker`. In `edit` mode it renders
|
|
13
|
-
* {@link
|
|
13
|
+
* {@link DropdownlistControl} — always multi-select — over the employees returned by the search;
|
|
14
14
|
* in `view` mode the stored value as plain text. Selecting a user opens a details drawer.
|
|
15
15
|
*
|
|
16
16
|
* ### Supported `config` keys
|
|
@@ -71,7 +71,7 @@ class UserPickerField extends FieldBase {
|
|
|
71
71
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: UserPickerField, isStandalone: true, selector: "iss-user-picker", usesInheritance: true, ngImport: i0, template: `
|
|
72
72
|
@if (field.visible()) {
|
|
73
73
|
@if (field.mode() === "edit") {
|
|
74
|
-
<iss-ctrl-
|
|
74
|
+
<iss-ctrl-dropdownlist
|
|
75
75
|
[formControlName]="field.name"
|
|
76
76
|
[min]="field.config.min() ?? null"
|
|
77
77
|
[max]="field.config.max() ?? null"
|
|
@@ -93,7 +93,7 @@ class UserPickerField extends FieldBase {
|
|
|
93
93
|
{{ item.name }}
|
|
94
94
|
</div>
|
|
95
95
|
</ng-template>
|
|
96
|
-
</iss-ctrl-
|
|
96
|
+
</iss-ctrl-dropdownlist>
|
|
97
97
|
<iss-validation-message-viewer [errors]="ctrl.errors" [showMessage]="!ctrl.untouched"/>
|
|
98
98
|
} @else {
|
|
99
99
|
<iss-field-viewer>
|
|
@@ -142,12 +142,12 @@ class UserPickerField extends FieldBase {
|
|
|
142
142
|
</div>
|
|
143
143
|
</mat-sidenav>
|
|
144
144
|
</mat-sidenav-container>
|
|
145
|
-
`, isInline: true, styles: [".mat-drawer{position:fixed;left:0}\n"], dependencies: [{ kind: "component", type:
|
|
145
|
+
`, isInline: true, styles: [".mat-drawer{position:fixed;left:0}\n"], dependencies: [{ kind: "component", type: DropdownlistControl, selector: "iss-ctrl-dropdownlist", inputs: ["options", "height", "loading"], outputs: ["onQueryChange"] }, { kind: "component", type: ValidationMessage, selector: "iss-validation-message-viewer", inputs: ["errors", "showMessage"] }, { kind: "component", type: MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: FieldViewer, selector: "iss-field-viewer" }], viewProviders: [VIEW_PROVIDER] });
|
|
146
146
|
}
|
|
147
147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: UserPickerField, decorators: [{
|
|
148
148
|
type: Component,
|
|
149
149
|
args: [{ selector: "iss-user-picker", viewProviders: [VIEW_PROVIDER], imports: [
|
|
150
|
-
|
|
150
|
+
DropdownlistControl,
|
|
151
151
|
ValidationMessage,
|
|
152
152
|
MatSidenav,
|
|
153
153
|
MatSidenavContainer,
|
|
@@ -155,7 +155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
155
155
|
], template: `
|
|
156
156
|
@if (field.visible()) {
|
|
157
157
|
@if (field.mode() === "edit") {
|
|
158
|
-
<iss-ctrl-
|
|
158
|
+
<iss-ctrl-dropdownlist
|
|
159
159
|
[formControlName]="field.name"
|
|
160
160
|
[min]="field.config.min() ?? null"
|
|
161
161
|
[max]="field.config.max() ?? null"
|
|
@@ -177,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
177
177
|
{{ item.name }}
|
|
178
178
|
</div>
|
|
179
179
|
</ng-template>
|
|
180
|
-
</iss-ctrl-
|
|
180
|
+
</iss-ctrl-dropdownlist>
|
|
181
181
|
<iss-validation-message-viewer [errors]="ctrl.errors" [showMessage]="!ctrl.untouched"/>
|
|
182
182
|
} @else {
|
|
183
183
|
<iss-field-viewer>
|
|
@@ -230,4 +230,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
230
230
|
}], ctorParameters: () => [] });
|
|
231
231
|
|
|
232
232
|
export { UserPickerField };
|
|
233
|
-
//# sourceMappingURL=iss-ctrl-user-picker.field-
|
|
233
|
+
//# sourceMappingURL=iss-ctrl-user-picker.field-DpmYCfpD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iss-ctrl-user-picker.field-DpmYCfpD.mjs","sources":["../../../projects/iss/src/components/controls/user-picker/user-picker.field.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, signal } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { MatSidenav, MatSidenavContainer } from \"@angular/material/sidenav\";\nimport { debounceTime, distinctUntilChanged, map, Subject, switchMap } from \"rxjs\";\nimport { FieldViewer } from \"../../shared/field-viewer\";\nimport { ValidationMessage } from \"../../shared/validation-message\";\nimport { FieldBase } from \"../base/field-base\";\nimport { DropdownlistControl } from \"iss-ctrl/dropdownlist\";\nimport { Employee } from \"./employee\";\nimport { VIEW_PROVIDER } from \"../../../shared/constants/view-provider.const\";\n\n/**\n * `<iss-user-picker>` — employee lookup, searched against the directory API.\n *\n * Rendered by the outlet for fields of type `userPicker`. In `edit` mode it renders\n * {@link DropdownlistControl} — always multi-select — over the employees returned by the search;\n * in `view` mode the stored value as plain text. Selecting a user opens a details drawer.\n *\n * ### Supported `config` keys\n * | Key | Type | Description |\n * | --- | --- | --- |\n * | `min` | `number` | Minimum number of users required. |\n * | `max` | `number` | Maximum number of users allowed. |\n * | `readonly` | `boolean` | Shows the value but blocks interaction. |\n *\n * ### Other field members used\n * `label()` · `value` · `ctrlJsonValue()`\n *\n * Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and\n * `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.\n *\n * @example\n * ```json\n * { \"name\": \"approvers\", \"type\": \"userPicker\", \"label\": \"Approvers\", \"config\": { \"max\": 3 } }\n * ```\n */\n@Component({\n selector: \"iss-user-picker\",\n viewProviders: [VIEW_PROVIDER],\n imports: [\n DropdownlistControl,\n ValidationMessage,\n MatSidenav,\n MatSidenavContainer,\n FieldViewer\n ],\n template: `\n @if (field.visible()) {\n @if (field.mode() === \"edit\") {\n <iss-ctrl-dropdownlist\n [formControlName]=\"field.name\"\n [min]=\"field.config.min() ?? null\"\n [max]=\"field.config.max() ?? null\"\n [options]=\"options()\"\n [multiple]=\"true\"\n [readonly]=\"field.config.readonly() ?? false\"\n (onQueryChange)=\"search($event)\"\n (onChange)=\"updateField($event)\"\n >\n <label>{{ field.label() }}</label>\n <ng-template let-item #optionTemplate>\n <div class=\"d-flex align-items-center gap-2\">\n <ds-avatar size=\"x-small\" [attr.image]=\"item.image\"></ds-avatar>\n <span class=\"fs-14 fw-medium fc-black\">{{ item.name }}</span>\n </div>\n </ng-template>\n <ng-template let-item #cardViewerTemplate>\n <div (click)=\"showUserData(item);drawer.open()\">\n {{ item.name }}\n </div>\n </ng-template>\n </iss-ctrl-dropdownlist>\n <iss-validation-message-viewer [errors]=\"ctrl.errors\" [showMessage]=\"!ctrl.untouched\"/>\n } @else {\n <iss-field-viewer>\n <label>{{ field.label() }}</label>\n <p>{{ field.value }}</p>\n </iss-field-viewer>\n }\n }\n <mat-sidenav-container [hasBackdrop]=\"true\">\n <mat-sidenav #drawer [mode]=\"'over'\" [position]=\"'start'\" [autoFocus]=\"false\">\n <div class=\"main-sidenav\">\n <div class=\"sidenav-title bc-white\">\n <h3> Employee Information </h3>\n <ds-icon icon=\"close\" class=\"fc-black fs-20 p-3 cursor-pointer\" (click)=\"drawer.close()\"></ds-icon>\n </div>\n <div class=\"sidenav-body p-0\">\n <div class=\"d-flex flex-column align-items-center gap-3 sidenav-user bc-off-white text-center\">\n <ds-avatar [attr.image]=\"userImage()\" [attr.label]=\"userData?.name\"></ds-avatar>\n @if (userData?.employeeNumber) {\n <div class=\"d-flex flex-column gap-1\">\n <h4 class=\"fs-16 fc-black fw-medium mb-0\">{{ userData?.name }}</h4>\n @if (!userData?.job?.name) {\n <h6 class=\"fs-12 fc-dark-gray fw-normal mb-0\">{{ userData?.position?.name }}</h6>\n }\n @if (!userData?.position?.name) {\n <h6 class=\"fs-12 fc-dark-gray fw-normal mb-0\">{{ userData?.job?.name }}</h6>\n }\n </div>\n }\n <div class=\"d-flex flex-wrap gap-2\">\n <div class=\"fs-12 fc-black d-flex align-items-center gap-2 box-shadow bc-white radius-4 p-2 profile-box\">\n <ds-icon icon=\"mail-o\" class=\"fc-coral fs-20\"></ds-icon>\n <a [href]=\"'mailTo:' + userData?.email\" class=\"fc-black\">{{ userData?.email }}</a>\n </div>\n @if (userData?.contact?.mobile) {\n <div class=\"fs-12 fc-black d-flex align-items-center gap-2 box-shadow bc-white radius-4 p-2 profile-box\">\n <ds-icon icon=\"phone\" class=\"fc-coral fs-20\"></ds-icon>\n <a [href]=\"'tel:' + userData?.contact?.mobile\" class=\"fc-black\">\n <bdi>{{ userData?.contact?.mobile }}</bdi>\n </a>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </mat-sidenav>\n </mat-sidenav-container>\n `,\n styles: `\n .mat-drawer {\n position: fixed;\n left: 0;\n }`,\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class UserPickerField extends FieldBase {\n userImageHost = \"https://igateapp.stc.com.sa\";\n employeeService = inject(Employee);\n options: any = signal([]);\n userData: any;\n #query: Subject<string> = new Subject<string>();\n\n constructor() {\n super();\n this.#query.pipe(\n debounceTime(300),\n distinctUntilChanged(),\n // a new query cancels the request still in flight\n switchMap((query: string) => this.employeeService.search(query)),\n map((res: any) => {\n return res.map((user: any) => {\n user.value = user.email;\n user.label = user.name;\n return user;\n });\n }),\n takeUntilDestroyed(this.destroyRef)\n ).subscribe((res: any) => {\n this.options.set(res);\n });\n }\n\n userImage(): string | null {\n const image: string | undefined = this.userData?.profileImage ?? this.userData?.profileImageUrl;\n if (!image) {\n return null;\n }\n return image.startsWith(\"http\") ? image : this.userImageHost + image;\n }\n\n search(event: string) {\n this.#query.next(event);\n }\n\n updateField($event: string | FormData) {\n this.options.set([]);\n }\n\n showUserData(item: any) {\n this.userData = item;\n }\n}\n"],"names":[],"mappings":"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"}
|
package/fesm2022/iss-ctrl.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ArabicNumberPipe, C as COMPONENTS, E as Employee, j as FIELD_DATA, F as FieldBase, e as FieldDataInjector, b as FieldViewer, c as FileHandler, o as FileValidators, d as FormEngine, n as IssValidators, L as Loader, O as Outlet, P as PLACEHOLDER_REGEX, k as PlateLetterPipe, S as SERVICES,
|
|
1
|
+
export { A as ArabicNumberPipe, C as COMPONENTS, E as Employee, j as FIELD_DATA, F as FieldBase, e as FieldDataInjector, b as FieldViewer, c as FileHandler, o as FileValidators, d as FormEngine, n as IssValidators, L as Loader, O as Outlet, P as PLACEHOLDER_REGEX, k as PlateLetterPipe, S as SERVICES, T as TimeValidator, f as VALIDATION_MESSAGES, h as VALIDATORS, V as VIEW_PROVIDER, a as ValidationMessage, l as arrayFrom, m as formatFileSize, g as getPropertyByPath, i as isActiveValidationRule, r as replacePlaceholders } from './iss-ctrl-iss-ctrl-BG-QWWdq.mjs';
|
|
2
2
|
export * from 'iss-ctrl/base';
|
|
3
3
|
export * from 'iss-ctrl/tokens';
|
|
4
4
|
//# sourceMappingURL=iss-ctrl.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iss-ctrl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^21.0.6",
|
|
6
6
|
"@angular/core": "^21.0.6",
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"types": "./types/iss-ctrl-datetime-picker.d.ts",
|
|
49
49
|
"default": "./fesm2022/iss-ctrl-datetime-picker.mjs"
|
|
50
50
|
},
|
|
51
|
+
"./dropdownlist": {
|
|
52
|
+
"types": "./types/iss-ctrl-dropdownlist.d.ts",
|
|
53
|
+
"default": "./fesm2022/iss-ctrl-dropdownlist.mjs"
|
|
54
|
+
},
|
|
51
55
|
"./file-picker": {
|
|
52
56
|
"types": "./types/iss-ctrl-file-picker.d.ts",
|
|
53
57
|
"default": "./fesm2022/iss-ctrl-file-picker.mjs"
|
|
@@ -68,10 +72,6 @@
|
|
|
68
72
|
"types": "./types/iss-ctrl-radio.d.ts",
|
|
69
73
|
"default": "./fesm2022/iss-ctrl-radio.mjs"
|
|
70
74
|
},
|
|
71
|
-
"./select": {
|
|
72
|
-
"types": "./types/iss-ctrl-select.d.ts",
|
|
73
|
-
"default": "./fesm2022/iss-ctrl-select.mjs"
|
|
74
|
-
},
|
|
75
75
|
"./slide-toggle": {
|
|
76
76
|
"types": "./types/iss-ctrl-slide-toggle.d.ts",
|
|
77
77
|
"default": "./fesm2022/iss-ctrl-slide-toggle.mjs"
|
package/types/iss-ctrl-base.d.ts
CHANGED
|
@@ -230,6 +230,11 @@ declare class Hints {
|
|
|
230
230
|
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>;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
interface I18n {
|
|
234
|
+
ar: string | null | undefined;
|
|
235
|
+
en: string | null | undefined;
|
|
236
|
+
}
|
|
237
|
+
|
|
233
238
|
/**
|
|
234
239
|
* The single date adapter behind every `iss-ctrl-*` picker.
|
|
235
240
|
*
|
|
@@ -287,7 +292,7 @@ declare function provideIssDateAdapter(): Provider[];
|
|
|
287
292
|
|
|
288
293
|
interface Option {
|
|
289
294
|
value: string;
|
|
290
|
-
|
|
295
|
+
title: string | I18n | undefined;
|
|
291
296
|
}
|
|
292
297
|
|
|
293
298
|
declare class SelectStatusPipe implements PipeTransform {
|
|
@@ -296,11 +301,18 @@ declare class SelectStatusPipe implements PipeTransform {
|
|
|
296
301
|
static ɵpipe: i0.ɵɵPipeDeclaration<SelectStatusPipe, "selectStatus", true>;
|
|
297
302
|
}
|
|
298
303
|
|
|
304
|
+
declare class TranslatePipe implements PipeTransform {
|
|
305
|
+
currentLanguage: string;
|
|
306
|
+
transform(value: I18n | string | null | undefined, locale?: string): string;
|
|
307
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
|
|
308
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
|
|
309
|
+
}
|
|
310
|
+
|
|
299
311
|
declare class ViewerBase {
|
|
300
312
|
field: InputSignal<any>;
|
|
301
313
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewerBase, never>;
|
|
302
314
|
static ɵcmp: i0.ɵɵComponentDeclaration<ViewerBase, "ng-component", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
303
315
|
}
|
|
304
316
|
|
|
305
|
-
export { ControlBase, DATETIME_FORMAT, DATE_FORMAT_ADAPTER, HIJRI_LOCALE, HIJRI_MONTH_NAMES, Hints, IssDateAdapter, SelectStatusPipe, ViewerBase, createHijriDate, formatHijriDate, getHijriDaysInMonth, getHijriParts, parseHijriDate, provideIssDateAdapter, startOfHijriMonth, toHijriDisplay };
|
|
306
|
-
export type { HijriParts, Hint, HintAlignment, Option };
|
|
317
|
+
export { ControlBase, DATETIME_FORMAT, DATE_FORMAT_ADAPTER, HIJRI_LOCALE, HIJRI_MONTH_NAMES, Hints, IssDateAdapter, SelectStatusPipe, TranslatePipe, ViewerBase, createHijriDate, formatHijriDate, getHijriDaysInMonth, getHijriParts, parseHijriDate, provideIssDateAdapter, startOfHijriMonth, toHijriDisplay };
|
|
318
|
+
export type { HijriParts, Hint, HintAlignment, I18n, Option };
|
|
@@ -21,12 +21,13 @@ import { ControlBase, Option } from 'iss-ctrl/base';
|
|
|
21
21
|
* ### Inherited from {@link ControlBase}
|
|
22
22
|
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Projected content is rendered above the list — the wrapping `iss-field-*` passes the
|
|
25
|
+
* field label in that way.
|
|
25
26
|
*/
|
|
26
27
|
declare class CheckboxControl extends ControlBase {
|
|
27
28
|
#private;
|
|
28
29
|
/**
|
|
29
|
-
* Selectable choices, each a `{ value,
|
|
30
|
+
* Selectable choices, each a `{ value, title }` pair. Required.
|
|
30
31
|
*/
|
|
31
32
|
options: InputSignal<Option[]>;
|
|
32
33
|
/**
|
|
@@ -39,7 +40,7 @@ declare class CheckboxControl extends ControlBase {
|
|
|
39
40
|
stringifySelectedOptions(): string | null;
|
|
40
41
|
getEmissionValue(options: any): void;
|
|
41
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxControl, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxControl, "iss-ctrl-checkbox", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never,
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxControl, "iss-ctrl-checkbox", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
export { CheckboxControl };
|
|
@@ -3,14 +3,14 @@ import { OnDestroy, WritableSignal, InputSignal, Signal, OutputEmitterRef } from
|
|
|
3
3
|
import { ControlBase, Option } from 'iss-ctrl/base';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* `<iss-ctrl-
|
|
6
|
+
* `<iss-ctrl-dropdownlist>` — dropdown selection, single or multiple, with a search box.
|
|
7
7
|
*
|
|
8
8
|
* Typing in the search box emits `(onQueryChange)`, so options can be loaded remotely; set
|
|
9
9
|
* `loading` while that request is in flight.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```html
|
|
13
|
-
* <iss-ctrl-
|
|
13
|
+
* <iss-ctrl-dropdownlist
|
|
14
14
|
* formControlName="city"
|
|
15
15
|
* [options]="cities()"
|
|
16
16
|
* [multiple]="false"
|
|
@@ -18,7 +18,7 @@ import { ControlBase, Option } from 'iss-ctrl/base';
|
|
|
18
18
|
* (onQueryChange)="search($event)"
|
|
19
19
|
* >
|
|
20
20
|
* <label>City</label>
|
|
21
|
-
* </iss-ctrl-
|
|
21
|
+
* </iss-ctrl-dropdownlist>
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
24
|
* ### Own inputs
|
|
@@ -36,11 +36,12 @@ import { ControlBase, Option } from 'iss-ctrl/base';
|
|
|
36
36
|
*
|
|
37
37
|
* Projects `<label>` into the floating label; omit it to render the control without one.
|
|
38
38
|
*/
|
|
39
|
-
declare class
|
|
39
|
+
declare class DropdownlistControl extends ControlBase implements OnDestroy {
|
|
40
40
|
#private;
|
|
41
|
+
UI_LANGUAGE: string;
|
|
41
42
|
selectedOptions: WritableSignal<Map<string, Option>>;
|
|
42
43
|
/**
|
|
43
|
-
* Selectable choices, each a `{ value,
|
|
44
|
+
* Selectable choices, each a `{ value, title }` pair. Required.
|
|
44
45
|
*/
|
|
45
46
|
options: InputSignal<Option[]>;
|
|
46
47
|
/**
|
|
@@ -61,6 +62,8 @@ declare class SelectControl extends ControlBase implements OnDestroy {
|
|
|
61
62
|
protected cardViewerTemplate: any;
|
|
62
63
|
protected allSelected: WritableSignal<boolean>;
|
|
63
64
|
displayFn: (options: Option | Option[]) => string;
|
|
65
|
+
/** Resolves an option title to plain text for the active UI language. */
|
|
66
|
+
titleOf(option: Option | undefined): string;
|
|
64
67
|
writeValue(value: string | null): void;
|
|
65
68
|
captureValue($event: any): void;
|
|
66
69
|
removeFromSelectedOptionsMap(option: Option): void;
|
|
@@ -68,8 +71,8 @@ declare class SelectControl extends ControlBase implements OnDestroy {
|
|
|
68
71
|
toggleAllSelection(): void;
|
|
69
72
|
ngOnDestroy(): void;
|
|
70
73
|
protected isEmpty(): boolean;
|
|
71
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
72
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownlistControl, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownlistControl, "iss-ctrl-dropdownlist", 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>;
|
|
73
76
|
}
|
|
74
77
|
|
|
75
|
-
export {
|
|
78
|
+
export { DropdownlistControl };
|
|
@@ -52,7 +52,7 @@ interface IssFile {
|
|
|
52
52
|
* ### Inherited from {@link ControlBase}
|
|
53
53
|
* `formControlName` · `readonly` · `className` · `(onChange)` · `multiple` · `hints`
|
|
54
54
|
*
|
|
55
|
-
*
|
|
55
|
+
* Projects a `<label>` above the control — the wrapping `iss-field-*` passes the field label in that way.
|
|
56
56
|
*/
|
|
57
57
|
declare class FilePickerControl extends ControlBase implements OnDestroy {
|
|
58
58
|
#private;
|
|
@@ -88,7 +88,7 @@ declare class FilePickerControl extends ControlBase implements OnDestroy {
|
|
|
88
88
|
protected captureFile($event: FileList): void;
|
|
89
89
|
protected openFilePicker(input: HTMLInputElement): void;
|
|
90
90
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilePickerControl, never>;
|
|
91
|
-
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,
|
|
91
|
+
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, ["label"], true, never>;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export { Droppable, FilePickerControl };
|
|
@@ -29,7 +29,7 @@ declare const PLATE_LETTERS: PlateLetter[];
|
|
|
29
29
|
* ### Inherited from {@link ControlBase}
|
|
30
30
|
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
31
31
|
*
|
|
32
|
-
*
|
|
32
|
+
* Projects a `<label>` above the control — the wrapping `iss-field-*` passes the field label in that way.
|
|
33
33
|
*/
|
|
34
34
|
declare class PlateControl extends ControlBase {
|
|
35
35
|
#private;
|
|
@@ -47,7 +47,7 @@ declare class PlateControl extends ControlBase {
|
|
|
47
47
|
private focusInput;
|
|
48
48
|
private convertDigit;
|
|
49
49
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PlateControl, never>;
|
|
50
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PlateControl, "iss-ctrl-plate-number", never, {}, {}, never,
|
|
50
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PlateControl, "iss-ctrl-plate-number", never, {}, {}, never, ["label"], true, never>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export { PLATE_LETTERS, PlateControl };
|
|
@@ -18,17 +18,17 @@ import { ControlBase, Option } from 'iss-ctrl/base';
|
|
|
18
18
|
* ### Inherited from {@link ControlBase}
|
|
19
19
|
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* Projects a `<label>` above the control — the wrapping `iss-field-*` passes the field label in that way.
|
|
22
22
|
*/
|
|
23
23
|
declare class RadioControl extends ControlBase {
|
|
24
24
|
/**
|
|
25
|
-
* Selectable choices, each a `{ value,
|
|
25
|
+
* Selectable choices, each a `{ value, title }` pair. Required.
|
|
26
26
|
*/
|
|
27
27
|
options: InputSignal<Option[]>;
|
|
28
28
|
writeValue(value: string | null): void;
|
|
29
29
|
onRadioChange(value: string): void;
|
|
30
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<RadioControl, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RadioControl, "iss-ctrl-radio", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never,
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioControl, "iss-ctrl-radio", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export { RadioControl };
|
|
@@ -15,12 +15,12 @@ import * as i0 from '@angular/core';
|
|
|
15
15
|
* ### Inherited from {@link ControlBase}
|
|
16
16
|
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* Projects a `<label>` above the control — the wrapping `iss-field-*` passes the field label in that way.
|
|
19
19
|
*/
|
|
20
20
|
declare class SlideToggleControl extends ControlBase {
|
|
21
21
|
onSlideToggleChange(checked: boolean): void;
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<SlideToggleControl, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlideToggleControl, "iss-ctrl-slide-toggle", never, {}, {}, never,
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlideToggleControl, "iss-ctrl-slide-toggle", never, {}, {}, never, ["label"], true, never>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export { SlideToggleControl };
|
|
@@ -20,12 +20,12 @@ import { ControlBase, Option } from 'iss-ctrl/base';
|
|
|
20
20
|
* ### Inherited from {@link ControlBase}
|
|
21
21
|
* `formControlName` · `readonly` · `className` · `(onChange)` · `multiple`
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* Projects a `<label>` above the control — the wrapping `iss-field-*` passes the field label in that way.
|
|
24
24
|
*/
|
|
25
25
|
declare class ToggleButtonControl extends ControlBase {
|
|
26
26
|
#private;
|
|
27
27
|
/**
|
|
28
|
-
* Selectable choices, each a `{ value,
|
|
28
|
+
* Selectable choices, each a `{ value, title }` pair. Required.
|
|
29
29
|
*/
|
|
30
30
|
options: InputSignal<Option[]>;
|
|
31
31
|
selectedOptions: WritableSignal<Map<string, Option>>;
|
|
@@ -35,7 +35,7 @@ declare class ToggleButtonControl extends ControlBase {
|
|
|
35
35
|
stringifySelectedOptions(): string | null;
|
|
36
36
|
getEmissionValue(options: any): void;
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleButtonControl, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonControl, "iss-ctrl-toggle-button", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never,
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonControl, "iss-ctrl-toggle-button", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, ["label"], true, never>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export { ToggleButtonControl };
|
package/types/iss-ctrl.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Option } from 'iss-ctrl/base';
|
|
1
|
+
import { Option, I18n } from 'iss-ctrl/base';
|
|
2
2
|
export * from 'iss-ctrl/base';
|
|
3
3
|
import { IssAttachment } from 'iss-ctrl/tokens';
|
|
4
4
|
export * from 'iss-ctrl/tokens';
|
|
@@ -394,11 +394,6 @@ declare const VIEW_PROVIDER: StaticProvider;
|
|
|
394
394
|
|
|
395
395
|
declare const PLACEHOLDER_REGEX: RegExp;
|
|
396
396
|
|
|
397
|
-
interface I18n {
|
|
398
|
-
ar: string;
|
|
399
|
-
en: string;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
397
|
type ValidationMessageFn<T> = (args: T) => I18n;
|
|
403
398
|
|
|
404
399
|
interface IssValidator {
|
|
@@ -421,7 +416,7 @@ interface DynamicImport<T> {
|
|
|
421
416
|
* | --- | --- | --- | --- |
|
|
422
417
|
* | `text_input` | `InputField` | `iss-ctrl-input` | Single line text, number, email, password. |
|
|
423
418
|
* | `textarea` | `TextareaField` | `iss-ctrl-textarea` | Multi line free text. |
|
|
424
|
-
* | `dropdown_list` | `
|
|
419
|
+
* | `dropdown_list` | `DropdownlistField` | `iss-ctrl-dropdownlist` | Searchable single/multi select. |
|
|
425
420
|
* | `toggle_button` | `ToggleButtonField` | `iss-ctrl-toggle-button` | Options as a button group. |
|
|
426
421
|
* | `checkbox` | `CheckboxField` | `iss-ctrl-checkbox` | Multi choice checkbox list. |
|
|
427
422
|
* | `radio` | `RadioField` | `iss-ctrl-radio` | Single choice radio list. |
|
|
@@ -430,7 +425,7 @@ interface DynamicImport<T> {
|
|
|
430
425
|
* | `datetime` | `DatetimePickerField` | `iss-ctrl-datetime-picker` | Date and time together. |
|
|
431
426
|
* | `date_range` | `DateRangePickerField` | `iss-ctrl-date-range-picker` | A start/end date range. |
|
|
432
427
|
* | `attachment` | `FilePickerField` | `iss-ctrl-file-picker` | File upload. |
|
|
433
|
-
* | `userPicker` | `UserPickerField` | `iss-ctrl-
|
|
428
|
+
* | `userPicker` | `UserPickerField` | `iss-ctrl-dropdownlist` | Employee lookup. |
|
|
434
429
|
* | `vehicle_plate` | `PlateField` | `iss-ctrl-plate-number` | Saudi vehicle plate. |
|
|
435
430
|
* | `enrichment` | `NoteField` | — | Read-only explanatory text. |
|
|
436
431
|
* | `mobile` | `MobileField` | `iss-ctrl-mobile` | International phone number. |
|
|
@@ -497,13 +492,6 @@ declare class ArabicNumberPipe implements PipeTransform {
|
|
|
497
492
|
static ɵpipe: i0.ɵɵPipeDeclaration<ArabicNumberPipe, "arabicNumber", true>;
|
|
498
493
|
}
|
|
499
494
|
|
|
500
|
-
declare class TranslatePipe implements PipeTransform {
|
|
501
|
-
currentLanguage: string;
|
|
502
|
-
transform(value: I18n | string, locale?: string): string;
|
|
503
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
|
|
504
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
495
|
declare class PlateLetterPipe implements PipeTransform {
|
|
508
496
|
transform(value: string): unknown;
|
|
509
497
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlateLetterPipe, never>;
|
|
@@ -571,5 +559,5 @@ declare abstract class TimeValidator {
|
|
|
571
559
|
static afterDate(otherFieldName: string): ValidatorFn;
|
|
572
560
|
}
|
|
573
561
|
|
|
574
|
-
export { ArabicNumberPipe, COMPONENTS, Employee, FIELD_DATA, FieldBase, FieldDataInjector, FieldViewer, FileHandler, FileValidators, FormEngine, IssValidators, Loader, Outlet, PLACEHOLDER_REGEX, PlateLetterPipe, SERVICES, TimeValidator,
|
|
575
|
-
export type { ActionTriggerFn, ComponentOutlet, DynamicImport, EventArgument, EventConfigFn, EventStrategy, FieldChange,
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iss-ctrl-checkbox.field-Dj5EGLUr.mjs","sources":["../../../projects/iss/src/components/controls/checkbox/checkbox.field.ts"],"sourcesContent":["import { Component } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { VIEW_PROVIDER } from \"../../../shared/constants/view-provider.const\";\nimport { FieldViewer } from \"../../shared/field-viewer\";\nimport { ValidationMessage } from \"../../shared/validation-message\";\nimport { FieldBase } from \"../base/field-base\";\nimport { CheckboxControl } from \"iss-ctrl/checkbox\";\nimport { CheckboxViewer } from \"./checkbox.viewer\";\n\n/**\n * `<iss-field-checkbox>` — a list of checkboxes over a fixed set of options.\n *\n * Rendered by the outlet for fields of type `checkbox`. In `edit` mode it renders\n * {@link CheckboxControl} plus the validation message; in `view` mode the matching viewer.\n *\n * ### Supported `config` keys\n * | Key | Type | Description |\n * | --- | --- | --- |\n * | `hideLabel` | `boolean` | Hides the field label. |\n * | `readonly` | `boolean` | Shows the value but blocks interaction. |\n *\n * ### Other field members used\n * `label()` · `options()`\n *\n * Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and\n * `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.\n *\n * @example\n * ```json\n * { \"name\": \"days\", \"type\": \"checkbox\", \"label\": \"Days\", \"options\": [{ \"value\": \"sun\", \"label\": \"Sunday\" }] }\n * ```\n */\n@Component({\n selector: \"iss-field-checkbox\",\n viewProviders: [VIEW_PROVIDER],\n imports: [\n ReactiveFormsModule,\n CheckboxControl,\n ValidationMessage,\n CheckboxViewer,\n FieldViewer\n ],\n template: `\n @if (field.visible()) {\n @if (field.mode() === \"edit\") {\n <iss-ctrl-checkbox [formControlName]=\"field.name\" [options]=\"field.options()\" [readonly]=\"field.config.readonly() ?? false\" (onChange)=\"updateField($event)\">\n @if (!field.config.hideLabel()) {\n <label>{{ field.label() }}</label>\n }\n </iss-ctrl-checkbox>\n <iss-validation-message-viewer [errors]=\"ctrl.errors\" [showMessage]=\"!ctrl.untouched\"/>\n } @else {\n <iss-field-viewer>\n @if (!field.config.hideLabel()) {\n <label>{{ field.label() }}</label>\n }\n <iss-viewer-checkbox [field]=\"field\"/>\n </iss-field-viewer>\n }\n }\n `\n})\nexport class CheckboxField extends FieldBase {\n updateField($event: any) {\n this.field.ctrlJsonValue.set($event);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AA+BG,MAAO,aAAc,SAAQ,SAAS,CAAA;AAC1C,IAAA,WAAW,CAAC,MAAW,EAAA;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC;IACtC;uGAHW,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EApBd;;;;;;;;;;;;;;;;;;AAkBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAxBC,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,eAAe,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,iBAAiB,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACjB,cAAc,EAAA,QAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACd,WAAW,EAAA,QAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,aAAA,EANE,CAAC,aAAa,CAAC,EAAA,CAAA;;2FA4BnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBA9BzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,aAAa,EAAE,CAAC,aAAa,CAAC;AAC9B,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,eAAe;wBACf,iBAAiB;wBACjB,cAAc;wBACd;AACD,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;AAkBT,EAAA;AACF,iBAAA;;;;;"}
|