iss-ctrl 0.0.17 → 0.0.18
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/fesm2022/{iss-ctrl-iss-ctrl-BHW3shB0.mjs → iss-ctrl-iss-ctrl-C_ZiixeF.mjs} +41 -41
- package/fesm2022/iss-ctrl-iss-ctrl-C_ZiixeF.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-event-BBKfb4GM.mjs → iss-ctrl-load-event-DIPikCdF.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-event-BBKfb4GM.mjs.map → iss-ctrl-load-event-DIPikCdF.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-options-event-jsZAQloX.mjs → iss-ctrl-load-options-event-DOlkFXz5.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-options-event-jsZAQloX.mjs.map → iss-ctrl-load-options-event-DOlkFXz5.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-value-event-ClkNTtds.mjs → iss-ctrl-load-value-event-BjsuFpPf.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-value-event-ClkNTtds.mjs.map → iss-ctrl-load-value-event-BjsuFpPf.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-note.field-Co2Og2eO.mjs → iss-ctrl-note.field-CakHrlcq.mjs} +2 -2
- package/fesm2022/{iss-ctrl-note.field-Co2Og2eO.mjs.map → iss-ctrl-note.field-CakHrlcq.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-replace-api-keys-Bx7wo5zl.mjs → iss-ctrl-replace-api-keys-C-G34VNS.mjs} +2 -2
- package/fesm2022/{iss-ctrl-replace-api-keys-Bx7wo5zl.mjs.map → iss-ctrl-replace-api-keys-C-G34VNS.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-set-value-event-D38jsLlO.mjs → iss-ctrl-set-value-event-C-uD228s.mjs} +2 -2
- package/fesm2022/{iss-ctrl-set-value-event-D38jsLlO.mjs.map → iss-ctrl-set-value-event-C-uD228s.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-table.field-BcuL_fSr.mjs → iss-ctrl-table.field-Ce1KnlZO.mjs} +2 -2
- package/fesm2022/{iss-ctrl-table.field-BcuL_fSr.mjs.map → iss-ctrl-table.field-Ce1KnlZO.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-B6M5dYnm.mjs → iss-ctrl-trigger-based-on-json-value-D5S3shyl.mjs} +2 -2
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-B6M5dYnm.mjs.map → iss-ctrl-trigger-based-on-json-value-D5S3shyl.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-user-picker.field-BCd6g9jz.mjs → iss-ctrl-user-picker.field-C7DZ3ck2.mjs} +2 -2
- package/fesm2022/{iss-ctrl-user-picker.field-BCd6g9jz.mjs.map → iss-ctrl-user-picker.field-C7DZ3ck2.mjs.map} +1 -1
- package/fesm2022/iss-ctrl.mjs +1 -1
- package/package.json +1 -1
- package/types/iss-ctrl.d.ts +3 -3
- package/fesm2022/iss-ctrl-iss-ctrl-BHW3shB0.mjs.map +0 -1
|
@@ -167,6 +167,9 @@ class ControlBase {
|
|
|
167
167
|
this.touched.set(true);
|
|
168
168
|
this.onTouch();
|
|
169
169
|
}
|
|
170
|
+
validate(control) {
|
|
171
|
+
return this.ctrl.errors;
|
|
172
|
+
}
|
|
170
173
|
/**
|
|
171
174
|
* Whether the control currently holds no value.
|
|
172
175
|
*
|
|
@@ -182,9 +185,6 @@ class ControlBase {
|
|
|
182
185
|
}
|
|
183
186
|
return value === null || value === undefined || value === "";
|
|
184
187
|
}
|
|
185
|
-
validate(control) {
|
|
186
|
-
return this.ctrl.errors;
|
|
187
|
-
}
|
|
188
188
|
onTouch = () => { };
|
|
189
189
|
onPropagateValue = (_) => { };
|
|
190
190
|
emitValue(value) {
|
|
@@ -381,10 +381,6 @@ class ChipsControl extends ControlBase {
|
|
|
381
381
|
this.keywords.set([]);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
// the chips are the value here; `ctrl` stays untouched
|
|
385
|
-
isEmpty() {
|
|
386
|
-
return this.keywords().length === 0;
|
|
387
|
-
}
|
|
388
384
|
remove(keyword) {
|
|
389
385
|
if (this.disabled() || this.readonly()) {
|
|
390
386
|
return;
|
|
@@ -412,6 +408,10 @@ class ChipsControl extends ControlBase {
|
|
|
412
408
|
event.chipInput.clear();
|
|
413
409
|
this.emitValue(this.#stringifyValues());
|
|
414
410
|
}
|
|
411
|
+
// the chips are the value here; `ctrl` stays untouched
|
|
412
|
+
isEmpty() {
|
|
413
|
+
return this.keywords().length === 0;
|
|
414
|
+
}
|
|
415
415
|
#stringifyValues() {
|
|
416
416
|
return this.keywords().map((s) => s.trim()).join();
|
|
417
417
|
}
|
|
@@ -1114,11 +1114,6 @@ class DateRangePickerControl extends ControlBase {
|
|
|
1114
1114
|
this.onDateRangeObjectChange.emit(this.#getEmissionObject(values.start, values.end));
|
|
1115
1115
|
}));
|
|
1116
1116
|
}
|
|
1117
|
-
// the endpoints live on `range`; `ctrl` only holds the emitted value of a complete range
|
|
1118
|
-
isEmpty() {
|
|
1119
|
-
const { start, end } = this.range.getRawValue();
|
|
1120
|
-
return !start && !end;
|
|
1121
|
-
}
|
|
1122
1117
|
setDisabledState(isDisabled) {
|
|
1123
1118
|
super.setDisabledState(isDisabled);
|
|
1124
1119
|
// the template binds `range`, disabling ctrl alone leaves the inputs live
|
|
@@ -1160,6 +1155,11 @@ class DateRangePickerControl extends ControlBase {
|
|
|
1160
1155
|
ngOnDestroy() {
|
|
1161
1156
|
this.#sub.unsubscribe();
|
|
1162
1157
|
}
|
|
1158
|
+
// the endpoints live on `range`; `ctrl` only holds the emitted value of a complete range
|
|
1159
|
+
isEmpty() {
|
|
1160
|
+
const { start, end } = this.range.getRawValue();
|
|
1161
|
+
return !start && !end;
|
|
1162
|
+
}
|
|
1163
1163
|
openPicker(picker) {
|
|
1164
1164
|
if (this.readonly()) {
|
|
1165
1165
|
return;
|
|
@@ -6383,22 +6383,22 @@ const COMPONENTS = {
|
|
|
6383
6383
|
datetime: () => Promise.resolve().then(function () { return datetimePicker_field; }).then((c) => c.DatetimePickerField),
|
|
6384
6384
|
date_range: () => Promise.resolve().then(function () { return dateRangePicker_field; }).then((c) => c.DateRangePickerField),
|
|
6385
6385
|
attachment: () => Promise.resolve().then(function () { return filePicker_field; }).then((c) => c.FilePickerField),
|
|
6386
|
-
userPicker: () => import('./iss-ctrl-user-picker.field-
|
|
6386
|
+
userPicker: () => import('./iss-ctrl-user-picker.field-C7DZ3ck2.mjs').then((c) => c.UserPickerField),
|
|
6387
6387
|
vehicle_plate: () => Promise.resolve().then(function () { return plate_field; }).then((c) => c.PlateField),
|
|
6388
|
-
enrichment: () => import('./iss-ctrl-note.field-
|
|
6388
|
+
enrichment: () => import('./iss-ctrl-note.field-CakHrlcq.mjs').then((c) => c.NoteField),
|
|
6389
6389
|
mobile: () => Promise.resolve().then(function () { return mobile_field; }).then((c) => c.MobileField),
|
|
6390
|
-
table: () => import('./iss-ctrl-table.field-
|
|
6390
|
+
table: () => import('./iss-ctrl-table.field-Ce1KnlZO.mjs').then((c) => c.TableField),
|
|
6391
6391
|
chips: () => Promise.resolve().then(function () { return chips_field; }).then((c) => c.ChipsField),
|
|
6392
6392
|
switch: () => Promise.resolve().then(function () { return slideToggle_field; }).then((c) => c.SlideToggleField),
|
|
6393
6393
|
};
|
|
6394
6394
|
|
|
6395
6395
|
const SERVICES = {
|
|
6396
|
-
setValue: () => import('./iss-ctrl-set-value-event-
|
|
6396
|
+
setValue: () => import('./iss-ctrl-set-value-event-C-uD228s.mjs').then((s) => s.SetValueEvent),
|
|
6397
6397
|
show: () => import('./iss-ctrl-show-event-BcRCwAfo.mjs').then((s) => s.ShowEvent),
|
|
6398
|
-
load: () => import('./iss-ctrl-load-value-event-
|
|
6399
|
-
loadOptions: () => import('./iss-ctrl-load-options-event-
|
|
6400
|
-
triggerBasedOnJsonValue: () => import('./iss-ctrl-trigger-based-on-json-value-
|
|
6401
|
-
replaceApiKeyDefaultImpl: () => import('./iss-ctrl-replace-api-keys-
|
|
6398
|
+
load: () => import('./iss-ctrl-load-value-event-BjsuFpPf.mjs').then((s) => s.LoadValueEvent),
|
|
6399
|
+
loadOptions: () => import('./iss-ctrl-load-options-event-DOlkFXz5.mjs').then((s) => s.LoadOptionsEvent),
|
|
6400
|
+
triggerBasedOnJsonValue: () => import('./iss-ctrl-trigger-based-on-json-value-D5S3shyl.mjs').then((s) => s.TriggerBasedOnJsonValue),
|
|
6401
|
+
replaceApiKeyDefaultImpl: () => import('./iss-ctrl-replace-api-keys-C-G34VNS.mjs').then((s) => s.ReplaceApiKeys),
|
|
6402
6402
|
};
|
|
6403
6403
|
|
|
6404
6404
|
// Read-only counterpart of COMPONENTS: the component used to render a field's value
|
|
@@ -6621,7 +6621,7 @@ class Outlet {
|
|
|
6621
6621
|
/>
|
|
6622
6622
|
}
|
|
6623
6623
|
}
|
|
6624
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:
|
|
6624
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:2rem}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: FieldDataInjector, name: "FieldDataInjector" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6625
6625
|
}
|
|
6626
6626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: Outlet, decorators: [{
|
|
6627
6627
|
type: Component,
|
|
@@ -6639,7 +6639,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
6639
6639
|
/>
|
|
6640
6640
|
}
|
|
6641
6641
|
}
|
|
6642
|
-
`, styles: [":host{display:flex;flex-direction:column;gap:
|
|
6642
|
+
`, styles: [":host{display:flex;flex-direction:column;gap:2rem}\n"] }]
|
|
6643
6643
|
}], propDecorators: { ready: [{ type: i0.Output, args: ["ready"] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: true }] }] } });
|
|
6644
6644
|
|
|
6645
6645
|
const VIEW_PROVIDER = {
|
|
@@ -6793,33 +6793,33 @@ class ValidationMessageComponent {
|
|
|
6793
6793
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ValidationMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6794
6794
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ValidationMessageComponent, isStandalone: true, selector: "iss-validation-message-viewer", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
6795
6795
|
@if (errors() !== null && showMessage()) {
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
<
|
|
6799
|
-
|
|
6800
|
-
|
|
6796
|
+
<div class="messages">
|
|
6797
|
+
@for (error of errors() ?? {} | keyvalue; track error) {
|
|
6798
|
+
<p>
|
|
6799
|
+
<mat-error>{{ getValidationMessage(error) | translate }}</mat-error>
|
|
6800
|
+
</p>
|
|
6801
|
+
}
|
|
6802
|
+
</div>
|
|
6801
6803
|
}
|
|
6802
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
6804
|
+
`, isInline: true, styles: [":host{display:block;position:relative}.messages{position:absolute;inset-inline:0;top:0;z-index:1}p{margin:0}\n"], dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
6803
6805
|
}
|
|
6804
6806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ValidationMessageComponent, decorators: [{
|
|
6805
6807
|
type: Component,
|
|
6806
|
-
args: [{
|
|
6807
|
-
selector: "iss-validation-message-viewer",
|
|
6808
|
-
imports: [
|
|
6808
|
+
args: [{ selector: "iss-validation-message-viewer", imports: [
|
|
6809
6809
|
KeyValuePipe,
|
|
6810
6810
|
TranslatePipe,
|
|
6811
6811
|
MatError
|
|
6812
|
-
],
|
|
6813
|
-
template: `
|
|
6812
|
+
], template: `
|
|
6814
6813
|
@if (errors() !== null && showMessage()) {
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
<
|
|
6818
|
-
|
|
6819
|
-
|
|
6814
|
+
<div class="messages">
|
|
6815
|
+
@for (error of errors() ?? {} | keyvalue; track error) {
|
|
6816
|
+
<p>
|
|
6817
|
+
<mat-error>{{ getValidationMessage(error) | translate }}</mat-error>
|
|
6818
|
+
</p>
|
|
6819
|
+
}
|
|
6820
|
+
</div>
|
|
6820
6821
|
}
|
|
6821
|
-
`,
|
|
6822
|
-
}]
|
|
6822
|
+
`, styles: [":host{display:block;position:relative}.messages{position:absolute;inset-inline:0;top:0;z-index:1}p{margin:0}\n"] }]
|
|
6823
6823
|
}], propDecorators: { errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: true }] }], showMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMessage", required: true }] }] } });
|
|
6824
6824
|
|
|
6825
6825
|
class EventTrigger {
|
|
@@ -9438,4 +9438,4 @@ var time_validator = /*#__PURE__*/Object.freeze({
|
|
|
9438
9438
|
*/
|
|
9439
9439
|
|
|
9440
9440
|
export { PlateViewer as $, TimePickerField as A, DatePickerField as B, ControlBase as C, DatePickerControl as D, Employee as E, FieldBase as F, DatetimePickerField as G, HOST as H, IssField as I, DateRangePickerField as J, InputViewer as K, Loader as L, MobileControl as M, TextareaViewer as N, Outlet as O, PLACEHOLDER_REGEX as P, ChipsViewer as Q, RadioControl as R, SelectControl as S, TextareaControl as T, RadioViewer as U, VIEW_PROVIDER as V, SelectViewer as W, MobileViewer as X, CheckboxViewer as Y, ToggleButtonViewer as Z, SlideToggleViewer as _, ValidationMessageComponent as a, AttachmentViewer as a0, TimePickerViewer as a1, DatePickerViewer as a2, DatePickerTimeViewer as a3, DateRangePickerViewer as a4, DEFAULT_COUNTRY as a5, COUNTRIES as a6, DATE_FORMAT_ADAPTER as a7, DATETIME_FORMAT as a8, PLATE_LETTERS as a9, startOfHijriMonth as aA, getHijriDaysInMonth as aB, createHijriDate as aC, formatHijriDate as aD, parseHijriDate as aE, toHijriDisplay as aF, IssValidators as aG, FileValidators as aH, TimeValidator as aI, VALIDATION_MESSAGES as aa, COMPONENTS as ab, SERVICES as ac, VALIDATORS as ad, FIELD_DATA as ae, UI_LANGUAGE as af, ATTACHMENT_UPLOAD_URL as ag, ATTACHMENT_UPLOAD_RESPONSE_MAPPER as ah, ATTACHMENT_DOWNLOAD_URL as ai, USER_SEARCH_API as aj, HintsComponent as ak, Droppable as al, ArabicNumberPipe as am, FieldDataInjector as an, PlateLetterPipe as ao, SelectStatusPipe as ap, TranslatePipe as aq, FileHandler as ar, IssDateAdapter as as, provideIssDateAdapter as at, Phone as au, arrayFrom as av, formatFileSize as aw, HIJRI_LOCALE as ax, HIJRI_MONTH_NAMES as ay, getHijriParts as az, ViewerBase as b, FormEngine as c, CheckboxControl as d, ChipsControl as e, DateRangePickerControl as f, getPropertyByPath as g, DatetimePickerControl as h, FilePickerControl as i, InputControl as j, PlateControl as k, SlideToggleControl as l, TimePickerControl as m, ToggleButtonControl as n, InputField as o, TextareaField as p, ChipsField as q, replacePlaceholders as r, RadioField as s, SelectField as t, MobileField as u, CheckboxField as v, ToggleButtonField as w, SlideToggleField as x, PlateField as y, FilePickerField as z };
|
|
9441
|
-
//# sourceMappingURL=iss-ctrl-iss-ctrl-
|
|
9441
|
+
//# sourceMappingURL=iss-ctrl-iss-ctrl-C_ZiixeF.mjs.map
|