iss-ctrl 0.0.21 → 0.0.22
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 +663 -0
- package/fesm2022/iss-ctrl-base.mjs.map +1 -0
- package/fesm2022/iss-ctrl-checkbox.field-Dj5EGLUr.mjs +92 -0
- package/fesm2022/iss-ctrl-checkbox.field-Dj5EGLUr.mjs.map +1 -0
- package/fesm2022/iss-ctrl-checkbox.mjs +143 -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-BLLAjBbP.mjs +76 -0
- package/fesm2022/iss-ctrl-chips.field-BLLAjBbP.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-BSpXukpO.mjs +98 -0
- package/fesm2022/iss-ctrl-date-picker.field-BSpXukpO.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-CjNHU1RW.mjs +97 -0
- package/fesm2022/iss-ctrl-date-range-picker.field-CjNHU1RW.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-DGMY9PaU.mjs +98 -0
- package/fesm2022/iss-ctrl-datetime-picker.field-DGMY9PaU.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-file-picker.field-CbepZaX6.mjs +210 -0
- package/fesm2022/iss-ctrl-file-picker.field-CbepZaX6.mjs.map +1 -0
- package/fesm2022/iss-ctrl-file-picker.mjs +272 -0
- package/fesm2022/iss-ctrl-file-picker.mjs.map +1 -0
- package/fesm2022/iss-ctrl-input.field-Ctlf3OCN.mjs +104 -0
- package/fesm2022/iss-ctrl-input.field-Ctlf3OCN.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-DvnkwSMG.mjs +1789 -0
- package/fesm2022/iss-ctrl-iss-ctrl-DvnkwSMG.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-event-bOt6IlIo.mjs → iss-ctrl-load-event-CuZ7pMjk.mjs} +4 -3
- package/fesm2022/iss-ctrl-load-event-CuZ7pMjk.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-options-event-CxyAyNMe.mjs → iss-ctrl-load-options-event-B10rhdqh.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-options-event-CxyAyNMe.mjs.map → iss-ctrl-load-options-event-B10rhdqh.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-value-event-DJKJ5S3h.mjs → iss-ctrl-load-value-event-C-aRgKLx.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-value-event-DJKJ5S3h.mjs.map → iss-ctrl-load-value-event-C-aRgKLx.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-mobile.field-DXVYT3q-.mjs +77 -0
- package/fesm2022/iss-ctrl-mobile.field-DXVYT3q-.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-C8X9-mgD.mjs} +2 -2
- package/fesm2022/{iss-ctrl-note.field-B_Lbp28X.mjs.map → iss-ctrl-note.field-C8X9-mgD.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-plate.field-aI81tAOV.mjs +92 -0
- package/fesm2022/iss-ctrl-plate.field-aI81tAOV.mjs.map +1 -0
- package/fesm2022/iss-ctrl-plate.mjs +491 -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-B_JjPIlb.mjs +96 -0
- package/fesm2022/iss-ctrl-radio.field-B_JjPIlb.mjs.map +1 -0
- package/fesm2022/iss-ctrl-radio.mjs +101 -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-DLnagkOr.mjs} +2 -2
- package/fesm2022/{iss-ctrl-replace-api-keys-C0XYQW4i.mjs.map → iss-ctrl-replace-api-keys-DLnagkOr.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-select.field-DoU4G_8t.mjs +87 -0
- package/fesm2022/iss-ctrl-select.field-DoU4G_8t.mjs.map +1 -0
- package/fesm2022/iss-ctrl-select.mjs +387 -0
- package/fesm2022/iss-ctrl-select.mjs.map +1 -0
- package/fesm2022/iss-ctrl-select.viewer-Dv9M-lG-.mjs +30 -0
- package/fesm2022/iss-ctrl-select.viewer-Dv9M-lG-.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-set-value-event-CgXhi0Bv.mjs → iss-ctrl-set-value-event-Dhw0Vj5J.mjs} +2 -2
- package/fesm2022/{iss-ctrl-set-value-event-CgXhi0Bv.mjs.map → iss-ctrl-set-value-event-Dhw0Vj5J.mjs.map} +1 -1
- package/fesm2022/iss-ctrl-slide-toggle.field-TVVbAr6p.mjs +85 -0
- package/fesm2022/iss-ctrl-slide-toggle.field-TVVbAr6p.mjs.map +1 -0
- package/fesm2022/iss-ctrl-slide-toggle.mjs +72 -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-E0r9w0os.mjs} +142 -140
- package/fesm2022/iss-ctrl-table.field-E0r9w0os.mjs.map +1 -0
- package/fesm2022/iss-ctrl-textarea.field-CmHPDpk-.mjs +82 -0
- package/fesm2022/iss-ctrl-textarea.field-CmHPDpk-.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-Cb0I5Ut1.mjs +77 -0
- package/fesm2022/iss-ctrl-time-picker.field-Cb0I5Ut1.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-Bj8WrkB-.mjs +105 -0
- package/fesm2022/iss-ctrl-toggle-button.field-Bj8WrkB-.mjs.map +1 -0
- package/fesm2022/iss-ctrl-toggle-button.mjs +156 -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-D9rTXVD1.mjs} +2 -2
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-2v1kLVHZ.mjs.map → iss-ctrl-trigger-based-on-json-value-D9rTXVD1.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-user-picker.field-BH63sZ-X.mjs → iss-ctrl-user-picker.field-BIzB5ZX6.mjs} +151 -150
- package/fesm2022/iss-ctrl-user-picker.field-BIzB5ZX6.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 +306 -0
- package/types/iss-ctrl-checkbox.d.ts +45 -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-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-select.d.ts +75 -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 +120 -1810
- 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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import * as i1 from '@angular/material/slide-toggle';
|
|
6
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
7
|
+
import { ControlBase } from 'iss-ctrl/base';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* `<iss-ctrl-slide-toggle>` — an on/off switch for a boolean value.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <iss-ctrl-slide-toggle formControlName="active" (onChange)="save($event)"/>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* ### Own inputs
|
|
18
|
+
* None — the control is configured entirely through the inherited properties.
|
|
19
|
+
*
|
|
20
|
+
* ### Inherited from {@link ControlBase}
|
|
21
|
+
* `formControlName` · `readonly` · `className` · `(onChange)`
|
|
22
|
+
*
|
|
23
|
+
* Does not project a label — the field label is rendered by the wrapping `iss-field-*`.
|
|
24
|
+
*/
|
|
25
|
+
class SlideToggleControl extends ControlBase {
|
|
26
|
+
onSlideToggleChange(checked) {
|
|
27
|
+
if (this.readonly()) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this.markAsTouched();
|
|
31
|
+
this.emitValue(checked);
|
|
32
|
+
}
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SlideToggleControl, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: SlideToggleControl, isStandalone: true, selector: "iss-ctrl-slide-toggle", providers: [
|
|
35
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SlideToggleControl, multi: true }
|
|
36
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
37
|
+
<mat-slide-toggle
|
|
38
|
+
class="d-block" [formControl]="ctrl"
|
|
39
|
+
[disabled]="readonly()"
|
|
40
|
+
(change)="onSlideToggleChange($event.checked)"
|
|
41
|
+
>
|
|
42
|
+
</mat-slide-toggle>
|
|
43
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SlideToggleControl, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: "iss-ctrl-slide-toggle",
|
|
49
|
+
imports: [MatSlideToggleModule, ReactiveFormsModule],
|
|
50
|
+
providers: [
|
|
51
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SlideToggleControl, multi: true }
|
|
52
|
+
],
|
|
53
|
+
template: `
|
|
54
|
+
<mat-slide-toggle
|
|
55
|
+
class="d-block" [formControl]="ctrl"
|
|
56
|
+
[disabled]="readonly()"
|
|
57
|
+
(change)="onSlideToggleChange($event.checked)"
|
|
58
|
+
>
|
|
59
|
+
</mat-slide-toggle>
|
|
60
|
+
`
|
|
61
|
+
}]
|
|
62
|
+
}] });
|
|
63
|
+
|
|
64
|
+
// The slide-toggle control. Its field and viewer stay in the primary entry point and reach it
|
|
65
|
+
// from there, so the control ships only to an app that renders it or imports it directly.
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Generated bundle index. Do not edit.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
export { SlideToggleControl };
|
|
72
|
+
//# sourceMappingURL=iss-ctrl-slide-toggle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iss-ctrl-slide-toggle.mjs","sources":["../../../projects/iss/slide-toggle/src/slide-toggle.control.ts","../../../projects/iss/slide-toggle/src/public-api.ts","../../../projects/iss/slide-toggle/src/iss-ctrl-slide-toggle.ts"],"sourcesContent":["import { Component } from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, ReactiveFormsModule } from \"@angular/forms\";\nimport { MatSlideToggleModule } from \"@angular/material/slide-toggle\";\nimport { ControlBase } from \"iss-ctrl/base\";\n\n/**\n * `<iss-ctrl-slide-toggle>` — an on/off switch for a boolean value.\n *\n * @example\n * ```html\n * <iss-ctrl-slide-toggle formControlName=\"active\" (onChange)=\"save($event)\"/>\n * ```\n *\n * ### Own inputs\n * None — the control is configured entirely through the inherited properties.\n *\n * ### Inherited from {@link ControlBase}\n * `formControlName` · `readonly` · `className` · `(onChange)`\n *\n * Does not project a label — the field label is rendered by the wrapping `iss-field-*`.\n */\n@Component({\n selector: \"iss-ctrl-slide-toggle\",\n imports: [MatSlideToggleModule, ReactiveFormsModule],\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: SlideToggleControl, multi: true }\n ],\n template: `\n <mat-slide-toggle\n class=\"d-block\" [formControl]=\"ctrl\"\n [disabled]=\"readonly()\"\n (change)=\"onSlideToggleChange($event.checked)\"\n >\n </mat-slide-toggle>\n `\n})\nexport class SlideToggleControl extends ControlBase {\n onSlideToggleChange(checked: boolean) {\n if (this.readonly()) {\n return;\n }\n this.markAsTouched();\n this.emitValue(checked);\n }\n}\n","// The slide-toggle control. Its field and viewer stay in the primary entry point and reach it\n// from there, so the control ships only to an app that renders it or imports it directly.\n\nexport * from \"./slide-toggle.control\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;;;;;;;;;;;;AAeG;AAgBG,MAAO,kBAAmB,SAAQ,WAAW,CAAA;AACjD,IAAA,mBAAmB,CAAC,OAAgB,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB;QACF;QACA,IAAI,CAAC,aAAa,EAAE;AACpB,QAAA,IAAI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E,KAAK,EAAE,IAAI;AAC3E,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA;AACF,iBAAA;;;ACnCD;AACA;;ACDA;;AAEG;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import { ViewerBase } from 'iss-ctrl/base';
|
|
4
|
+
|
|
5
|
+
class SlideToggleViewer extends ViewerBase {
|
|
6
|
+
// the control writes a boolean, while a value coming from the server is a string
|
|
7
|
+
isChecked(value) {
|
|
8
|
+
return value === true || value === "true";
|
|
9
|
+
}
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SlideToggleViewer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: SlideToggleViewer, isStandalone: true, selector: "iss-viewer-slide-toggle", usesInheritance: true, ngImport: i0, template: `
|
|
12
|
+
@if (isChecked(field().ctrlValue())) {
|
|
13
|
+
{{ field().label() + ' Yes' }}
|
|
14
|
+
} @else {
|
|
15
|
+
{{ field().label() + ' No' }}
|
|
16
|
+
}
|
|
17
|
+
`, isInline: true });
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SlideToggleViewer, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: "iss-viewer-slide-toggle",
|
|
23
|
+
template: `
|
|
24
|
+
@if (isChecked(field().ctrlValue())) {
|
|
25
|
+
{{ field().label() + ' Yes' }}
|
|
26
|
+
} @else {
|
|
27
|
+
{{ field().label() + ' No' }}
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
}]
|
|
31
|
+
}] });
|
|
32
|
+
|
|
33
|
+
export { SlideToggleViewer };
|
|
34
|
+
//# sourceMappingURL=iss-ctrl-slide-toggle.viewer-hsIHwDj3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iss-ctrl-slide-toggle.viewer-hsIHwDj3.mjs","sources":["../../../projects/iss/src/components/controls/slide-toggle/slide-toggle.viewer.ts"],"sourcesContent":["import { Component } from \"@angular/core\";\nimport { ViewerBase } from \"iss-ctrl/base\";\n\n@Component({\n selector: \"iss-viewer-slide-toggle\",\n template: `\n @if (isChecked(field().ctrlValue())) {\n {{ field().label() + ' Yes' }}\n } @else {\n {{ field().label() + ' No' }}\n }\n `,\n})\nexport class SlideToggleViewer extends ViewerBase {\n // the control writes a boolean, while a value coming from the server is a string\n isChecked(value: unknown): boolean {\n return value === true || value === \"true\";\n }\n}\n"],"names":[],"mappings":";;;;AAaM,MAAO,iBAAkB,SAAQ,UAAU,CAAA;;AAE/C,IAAA,SAAS,CAAC,KAAc,EAAA;AACtB,QAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM;IAC3C;uGAJW,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EARlB;;;;;;AAMT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,QAAQ,EAAE;;;;;;AAMT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -2,19 +2,21 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { viewChild, ViewContainerRef, inject, DestroyRef, effect, Component, input, signal, computed, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/forms';
|
|
4
4
|
import { FormGroup, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
-
import {
|
|
5
|
+
import { L as Loader, d as FormEngine, I as IssField, O as Outlet, F as FieldBase, V as VIEW_PROVIDER, a as ValidationMessage } from './iss-ctrl-iss-ctrl-DvnkwSMG.mjs';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import * as i1 from '@angular/material/form-field';
|
|
7
8
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
8
|
-
import * as
|
|
9
|
+
import * as i2 from '@angular/material/input';
|
|
9
10
|
import { MatInputModule } from '@angular/material/input';
|
|
10
|
-
import * as
|
|
11
|
+
import * as i5 from '@angular/material/paginator';
|
|
11
12
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
12
|
-
import * as
|
|
13
|
+
import * as i6 from '@angular/material/sidenav';
|
|
13
14
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
14
|
-
import * as
|
|
15
|
+
import * as i4 from '@angular/material/sort';
|
|
15
16
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
16
|
-
import * as
|
|
17
|
+
import * as i3 from '@angular/material/table';
|
|
17
18
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
19
|
+
import { ViewerBase, ControlBase } from 'iss-ctrl/base';
|
|
18
20
|
import { take } from 'rxjs';
|
|
19
21
|
|
|
20
22
|
class FieldViewer extends ViewerBase {
|
|
@@ -359,73 +361,73 @@ class TableControl extends ControlBase {
|
|
|
359
361
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableControl, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
360
362
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableControl, isStandalone: true, selector: "iss-ctrl-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, withFilter: { classPropertyName: "withFilter", publicName: "withFilter", isSignal: true, isRequired: false, transformFunction: null }, withSort: { classPropertyName: "withSort", publicName: "withSort", isSignal: true, isRequired: false, transformFunction: null }, withPagination: { classPropertyName: "withPagination", publicName: "withPagination", isSignal: true, isRequired: false, transformFunction: null }, jsonValue: { classPropertyName: "jsonValue", publicName: "jsonValue", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
361
363
|
{ provide: NG_VALUE_ACCESSOR, useExisting: TableControl, multi: true },
|
|
362
|
-
], viewQueries: [{ propertyName: "drawer", first: true, predicate: ["drawer"], descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
363
|
-
<mat-sidenav-container [hasBackdrop]="true">
|
|
364
|
-
<mat-sidenav #drawer [mode]="'over'" [position]="'start'" [autoFocus]="false">
|
|
365
|
-
<form [formGroup]="tableOutletForm">
|
|
366
|
-
<iss-form-outlet [fields]="fields()"/>
|
|
367
|
-
</form>
|
|
368
|
-
<ds-button (click)="saveRow(true)">save
|
|
369
|
-
</ds-button>
|
|
370
|
-
<ds-button (click)="saveRow(false)">save and add more</ds-button>
|
|
371
|
-
</mat-sidenav>
|
|
372
|
-
<mat-sidenav-content>
|
|
373
|
-
<div>
|
|
374
|
-
<ds-button icon="true" (click)="openNewRow()">
|
|
375
|
-
<ds-icon icon="plus"></ds-icon>
|
|
376
|
-
</ds-button>
|
|
377
|
-
<!--<button mat-raised-button (click)="removeRow()" class="demo-button">Remove data</button>-->
|
|
378
|
-
</div>
|
|
379
|
-
@if (withFilter()) {
|
|
380
|
-
<mat-form-field>
|
|
381
|
-
<mat-label>Filter</mat-label>
|
|
382
|
-
<input matInput (keyup)="applyFilter($event)" placeholder="Search in table" #input>
|
|
383
|
-
</mat-form-field>
|
|
384
|
-
}
|
|
385
|
-
<div class="mat-elevation-z8">
|
|
386
|
-
<table mat-table [dataSource]="dataSource" matSort>
|
|
387
|
-
<tr mat-header-row *matHeaderRowDef="fieldNames()"></tr>
|
|
388
|
-
<tr mat-row *matRowDef="let row; columns: fieldNames();" (click)="onRowClick(row)"></tr>
|
|
389
|
-
|
|
390
|
-
@for (col of fieldNames(); track col) {
|
|
391
|
-
@if (col !== "actions") {
|
|
392
|
-
<ng-container [matColumnDef]="col">
|
|
393
|
-
<th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]="!fieldsMap().get(col)?.config?.tableWithSort()">
|
|
394
|
-
{{ columnLabels()[$index] }}
|
|
395
|
-
</th>
|
|
396
|
-
<td mat-cell *matCellDef="let row">
|
|
397
|
-
@if (viewFieldOf(row, $index); as viewField) {
|
|
398
|
-
<iss-viewer-field [field]="viewField"/>
|
|
399
|
-
}
|
|
400
|
-
</td>
|
|
401
|
-
</ng-container>
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
<!-- Actions -->
|
|
406
|
-
<ng-container matColumnDef="actions">
|
|
407
|
-
<th mat-header-cell *matHeaderCellDef mat-sort-header></th>
|
|
408
|
-
<td mat-cell *matCellDef="let row">
|
|
409
|
-
<ds-icon icon="eye" class="cursor-pointer" (click)="viewRow(row)"></ds-icon>
|
|
410
|
-
<ds-icon icon="pen" class="cursor-pointer" (click)="editRow(row)"></ds-icon>
|
|
411
|
-
<ds-icon icon="trash" class="cursor-pointer fc-red" (click)="removeRow(row)"></ds-icon>
|
|
412
|
-
</td>
|
|
413
|
-
</ng-container>
|
|
414
|
-
|
|
415
|
-
<tr class="mat-row" *matNoDataRow>
|
|
416
|
-
<td class="mat-cell" colspan="4">
|
|
417
|
-
<ds-message type="emptyCard"></ds-message>
|
|
418
|
-
</td>
|
|
419
|
-
</tr>
|
|
420
|
-
</table>
|
|
421
|
-
|
|
422
|
-
@if (withPagination()) {
|
|
423
|
-
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]" aria-label="Select page number"></mat-paginator>
|
|
424
|
-
}
|
|
425
|
-
</div>
|
|
426
|
-
</mat-sidenav-content>
|
|
427
|
-
</mat-sidenav-container>
|
|
428
|
-
`, isInline: true, styles: [".mat-drawer{position:fixed;left:0}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type:
|
|
364
|
+
], viewQueries: [{ propertyName: "drawer", first: true, predicate: ["drawer"], descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
365
|
+
<mat-sidenav-container [hasBackdrop]="true">
|
|
366
|
+
<mat-sidenav #drawer [mode]="'over'" [position]="'start'" [autoFocus]="false">
|
|
367
|
+
<form [formGroup]="tableOutletForm">
|
|
368
|
+
<iss-form-outlet [fields]="fields()"/>
|
|
369
|
+
</form>
|
|
370
|
+
<ds-button (click)="saveRow(true)">save
|
|
371
|
+
</ds-button>
|
|
372
|
+
<ds-button (click)="saveRow(false)">save and add more</ds-button>
|
|
373
|
+
</mat-sidenav>
|
|
374
|
+
<mat-sidenav-content>
|
|
375
|
+
<div>
|
|
376
|
+
<ds-button icon="true" (click)="openNewRow()">
|
|
377
|
+
<ds-icon icon="plus"></ds-icon>
|
|
378
|
+
</ds-button>
|
|
379
|
+
<!--<button mat-raised-button (click)="removeRow()" class="demo-button">Remove data</button>-->
|
|
380
|
+
</div>
|
|
381
|
+
@if (withFilter()) {
|
|
382
|
+
<mat-form-field>
|
|
383
|
+
<mat-label>Filter</mat-label>
|
|
384
|
+
<input matInput (keyup)="applyFilter($event)" placeholder="Search in table" #input>
|
|
385
|
+
</mat-form-field>
|
|
386
|
+
}
|
|
387
|
+
<div class="mat-elevation-z8">
|
|
388
|
+
<table mat-table [dataSource]="dataSource" matSort>
|
|
389
|
+
<tr mat-header-row *matHeaderRowDef="fieldNames()"></tr>
|
|
390
|
+
<tr mat-row *matRowDef="let row; columns: fieldNames();" (click)="onRowClick(row)"></tr>
|
|
391
|
+
|
|
392
|
+
@for (col of fieldNames(); track col) {
|
|
393
|
+
@if (col !== "actions") {
|
|
394
|
+
<ng-container [matColumnDef]="col">
|
|
395
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]="!fieldsMap().get(col)?.config?.tableWithSort()">
|
|
396
|
+
{{ columnLabels()[$index] }}
|
|
397
|
+
</th>
|
|
398
|
+
<td mat-cell *matCellDef="let row">
|
|
399
|
+
@if (viewFieldOf(row, $index); as viewField) {
|
|
400
|
+
<iss-viewer-field [field]="viewField"/>
|
|
401
|
+
}
|
|
402
|
+
</td>
|
|
403
|
+
</ng-container>
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
<!-- Actions -->
|
|
408
|
+
<ng-container matColumnDef="actions">
|
|
409
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header></th>
|
|
410
|
+
<td mat-cell *matCellDef="let row">
|
|
411
|
+
<ds-icon icon="eye" class="cursor-pointer" (click)="viewRow(row)"></ds-icon>
|
|
412
|
+
<ds-icon icon="pen" class="cursor-pointer" (click)="editRow(row)"></ds-icon>
|
|
413
|
+
<ds-icon icon="trash" class="cursor-pointer fc-red" (click)="removeRow(row)"></ds-icon>
|
|
414
|
+
</td>
|
|
415
|
+
</ng-container>
|
|
416
|
+
|
|
417
|
+
<tr class="mat-row" *matNoDataRow>
|
|
418
|
+
<td class="mat-cell" colspan="4">
|
|
419
|
+
<ds-message type="emptyCard"></ds-message>
|
|
420
|
+
</td>
|
|
421
|
+
</tr>
|
|
422
|
+
</table>
|
|
423
|
+
|
|
424
|
+
@if (withPagination()) {
|
|
425
|
+
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]" aria-label="Select page number"></mat-paginator>
|
|
426
|
+
}
|
|
427
|
+
</div>
|
|
428
|
+
</mat-sidenav-content>
|
|
429
|
+
</mat-sidenav-container>
|
|
430
|
+
`, isInline: true, styles: [".mat-drawer{position:fixed;left:0}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i3.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i5.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i6.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i6.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i6.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: Outlet, selector: "iss-form-outlet", inputs: ["fields"], outputs: ["ready"] }, { kind: "component", type: FieldViewer, selector: "iss-viewer-field" }] });
|
|
429
431
|
}
|
|
430
432
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableControl, decorators: [{
|
|
431
433
|
type: Component,
|
|
@@ -441,72 +443,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
441
443
|
FieldViewer,
|
|
442
444
|
], providers: [
|
|
443
445
|
{ provide: NG_VALUE_ACCESSOR, useExisting: TableControl, multi: true },
|
|
444
|
-
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: `
|
|
445
|
-
<mat-sidenav-container [hasBackdrop]="true">
|
|
446
|
-
<mat-sidenav #drawer [mode]="'over'" [position]="'start'" [autoFocus]="false">
|
|
447
|
-
<form [formGroup]="tableOutletForm">
|
|
448
|
-
<iss-form-outlet [fields]="fields()"/>
|
|
449
|
-
</form>
|
|
450
|
-
<ds-button (click)="saveRow(true)">save
|
|
451
|
-
</ds-button>
|
|
452
|
-
<ds-button (click)="saveRow(false)">save and add more</ds-button>
|
|
453
|
-
</mat-sidenav>
|
|
454
|
-
<mat-sidenav-content>
|
|
455
|
-
<div>
|
|
456
|
-
<ds-button icon="true" (click)="openNewRow()">
|
|
457
|
-
<ds-icon icon="plus"></ds-icon>
|
|
458
|
-
</ds-button>
|
|
459
|
-
<!--<button mat-raised-button (click)="removeRow()" class="demo-button">Remove data</button>-->
|
|
460
|
-
</div>
|
|
461
|
-
@if (withFilter()) {
|
|
462
|
-
<mat-form-field>
|
|
463
|
-
<mat-label>Filter</mat-label>
|
|
464
|
-
<input matInput (keyup)="applyFilter($event)" placeholder="Search in table" #input>
|
|
465
|
-
</mat-form-field>
|
|
466
|
-
}
|
|
467
|
-
<div class="mat-elevation-z8">
|
|
468
|
-
<table mat-table [dataSource]="dataSource" matSort>
|
|
469
|
-
<tr mat-header-row *matHeaderRowDef="fieldNames()"></tr>
|
|
470
|
-
<tr mat-row *matRowDef="let row; columns: fieldNames();" (click)="onRowClick(row)"></tr>
|
|
471
|
-
|
|
472
|
-
@for (col of fieldNames(); track col) {
|
|
473
|
-
@if (col !== "actions") {
|
|
474
|
-
<ng-container [matColumnDef]="col">
|
|
475
|
-
<th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]="!fieldsMap().get(col)?.config?.tableWithSort()">
|
|
476
|
-
{{ columnLabels()[$index] }}
|
|
477
|
-
</th>
|
|
478
|
-
<td mat-cell *matCellDef="let row">
|
|
479
|
-
@if (viewFieldOf(row, $index); as viewField) {
|
|
480
|
-
<iss-viewer-field [field]="viewField"/>
|
|
481
|
-
}
|
|
482
|
-
</td>
|
|
483
|
-
</ng-container>
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
<!-- Actions -->
|
|
488
|
-
<ng-container matColumnDef="actions">
|
|
489
|
-
<th mat-header-cell *matHeaderCellDef mat-sort-header></th>
|
|
490
|
-
<td mat-cell *matCellDef="let row">
|
|
491
|
-
<ds-icon icon="eye" class="cursor-pointer" (click)="viewRow(row)"></ds-icon>
|
|
492
|
-
<ds-icon icon="pen" class="cursor-pointer" (click)="editRow(row)"></ds-icon>
|
|
493
|
-
<ds-icon icon="trash" class="cursor-pointer fc-red" (click)="removeRow(row)"></ds-icon>
|
|
494
|
-
</td>
|
|
495
|
-
</ng-container>
|
|
496
|
-
|
|
497
|
-
<tr class="mat-row" *matNoDataRow>
|
|
498
|
-
<td class="mat-cell" colspan="4">
|
|
499
|
-
<ds-message type="emptyCard"></ds-message>
|
|
500
|
-
</td>
|
|
501
|
-
</tr>
|
|
502
|
-
</table>
|
|
503
|
-
|
|
504
|
-
@if (withPagination()) {
|
|
505
|
-
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]" aria-label="Select page number"></mat-paginator>
|
|
506
|
-
}
|
|
507
|
-
</div>
|
|
508
|
-
</mat-sidenav-content>
|
|
509
|
-
</mat-sidenav-container>
|
|
446
|
+
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: `
|
|
447
|
+
<mat-sidenav-container [hasBackdrop]="true">
|
|
448
|
+
<mat-sidenav #drawer [mode]="'over'" [position]="'start'" [autoFocus]="false">
|
|
449
|
+
<form [formGroup]="tableOutletForm">
|
|
450
|
+
<iss-form-outlet [fields]="fields()"/>
|
|
451
|
+
</form>
|
|
452
|
+
<ds-button (click)="saveRow(true)">save
|
|
453
|
+
</ds-button>
|
|
454
|
+
<ds-button (click)="saveRow(false)">save and add more</ds-button>
|
|
455
|
+
</mat-sidenav>
|
|
456
|
+
<mat-sidenav-content>
|
|
457
|
+
<div>
|
|
458
|
+
<ds-button icon="true" (click)="openNewRow()">
|
|
459
|
+
<ds-icon icon="plus"></ds-icon>
|
|
460
|
+
</ds-button>
|
|
461
|
+
<!--<button mat-raised-button (click)="removeRow()" class="demo-button">Remove data</button>-->
|
|
462
|
+
</div>
|
|
463
|
+
@if (withFilter()) {
|
|
464
|
+
<mat-form-field>
|
|
465
|
+
<mat-label>Filter</mat-label>
|
|
466
|
+
<input matInput (keyup)="applyFilter($event)" placeholder="Search in table" #input>
|
|
467
|
+
</mat-form-field>
|
|
468
|
+
}
|
|
469
|
+
<div class="mat-elevation-z8">
|
|
470
|
+
<table mat-table [dataSource]="dataSource" matSort>
|
|
471
|
+
<tr mat-header-row *matHeaderRowDef="fieldNames()"></tr>
|
|
472
|
+
<tr mat-row *matRowDef="let row; columns: fieldNames();" (click)="onRowClick(row)"></tr>
|
|
473
|
+
|
|
474
|
+
@for (col of fieldNames(); track col) {
|
|
475
|
+
@if (col !== "actions") {
|
|
476
|
+
<ng-container [matColumnDef]="col">
|
|
477
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]="!fieldsMap().get(col)?.config?.tableWithSort()">
|
|
478
|
+
{{ columnLabels()[$index] }}
|
|
479
|
+
</th>
|
|
480
|
+
<td mat-cell *matCellDef="let row">
|
|
481
|
+
@if (viewFieldOf(row, $index); as viewField) {
|
|
482
|
+
<iss-viewer-field [field]="viewField"/>
|
|
483
|
+
}
|
|
484
|
+
</td>
|
|
485
|
+
</ng-container>
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
<!-- Actions -->
|
|
490
|
+
<ng-container matColumnDef="actions">
|
|
491
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header></th>
|
|
492
|
+
<td mat-cell *matCellDef="let row">
|
|
493
|
+
<ds-icon icon="eye" class="cursor-pointer" (click)="viewRow(row)"></ds-icon>
|
|
494
|
+
<ds-icon icon="pen" class="cursor-pointer" (click)="editRow(row)"></ds-icon>
|
|
495
|
+
<ds-icon icon="trash" class="cursor-pointer fc-red" (click)="removeRow(row)"></ds-icon>
|
|
496
|
+
</td>
|
|
497
|
+
</ng-container>
|
|
498
|
+
|
|
499
|
+
<tr class="mat-row" *matNoDataRow>
|
|
500
|
+
<td class="mat-cell" colspan="4">
|
|
501
|
+
<ds-message type="emptyCard"></ds-message>
|
|
502
|
+
</td>
|
|
503
|
+
</tr>
|
|
504
|
+
</table>
|
|
505
|
+
|
|
506
|
+
@if (withPagination()) {
|
|
507
|
+
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]" aria-label="Select page number"></mat-paginator>
|
|
508
|
+
}
|
|
509
|
+
</div>
|
|
510
|
+
</mat-sidenav-content>
|
|
511
|
+
</mat-sidenav-container>
|
|
510
512
|
`, styles: [".mat-drawer{position:fixed;left:0}\n"] }]
|
|
511
513
|
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], withFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "withFilter", required: false }] }], withSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "withSort", required: false }] }], withPagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "withPagination", required: false }] }], jsonValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "jsonValue", required: false }] }], drawer: [{ type: i0.ViewChild, args: ["drawer", { isSignal: true }] }], paginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatPaginator), { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] } });
|
|
512
514
|
|
|
@@ -589,4 +591,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
589
591
|
}] });
|
|
590
592
|
|
|
591
593
|
export { TableField };
|
|
592
|
-
//# sourceMappingURL=iss-ctrl-table.field-
|
|
594
|
+
//# sourceMappingURL=iss-ctrl-table.field-E0r9w0os.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iss-ctrl-table.field-E0r9w0os.mjs","sources":["../../../projects/iss/src/components/controls/table/field.viewer.ts","../../../projects/iss/src/components/controls/table/table.control.ts","../../../projects/iss/src/components/controls/table/table.field.ts"],"sourcesContent":["import { Component, ComponentRef, DestroyRef, effect, EffectRef, inject, OnDestroy, Signal, Type, viewChild, ViewContainerRef } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { take } from \"rxjs\";\nimport { Loader } from \"../../../shared/services/loader\";\nimport { ViewerBase } from \"iss-ctrl/base\";\n\n@Component({\n selector: \"iss-viewer-field\",\n template: `\n <ng-container #container></ng-container>\n `,\n})\nexport class FieldViewer extends ViewerBase implements OnDestroy {\n containerRef: Signal<ViewContainerRef | undefined> = viewChild(\"container\", { read: ViewContainerRef });\n #loader: Loader = inject(Loader);\n #destroyRef: DestroyRef = inject(DestroyRef);\n #fieldEffectRef: EffectRef = effect(() => {\n const container: ViewContainerRef | undefined = this.containerRef();\n const field: any = this.field();\n if (!container || !field) {\n return;\n }\n\n this.#loader.loadViewer(field.type)\n .pipe(take(1), takeUntilDestroyed(this.#destroyRef))\n .subscribe((viewer: Type<any> | null) => {\n // the effect re-runs whenever the field changes, so the previously rendered\n // viewer has to go before a new one takes its place\n container.clear();\n if (!viewer) {\n return;\n }\n const componentRef: ComponentRef<any> = container.createComponent(viewer);\n componentRef.setInput(\"field\", field);\n });\n });\n\n ngOnDestroy(): void {\n this.#fieldEffectRef.destroy();\n }\n}\n","import { AfterViewInit, Component, computed, CUSTOM_ELEMENTS_SCHEMA, DestroyRef, effect, EffectRef, inject, input, InputSignal, OnDestroy, OnInit, signal, Signal, viewChild, WritableSignal } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormGroup, NG_VALUE_ACCESSOR, ReactiveFormsModule } from \"@angular/forms\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { MatPaginator, MatPaginatorModule } from \"@angular/material/paginator\";\nimport { MatSidenav, MatSidenavModule } from \"@angular/material/sidenav\";\nimport { MatSort, MatSortModule } from \"@angular/material/sort\";\nimport { MatTableDataSource, MatTableModule } from \"@angular/material/table\";\nimport { IssField } from \"../../../shared/classes/iss-field\";\nimport { FormEngine } from \"../../../shared/services/form-engine\";\nimport { Loader } from \"../../../shared/services/loader\";\nimport { Outlet } from \"../../outlet/outlet\";\nimport { ControlBase } from \"iss-ctrl/base\";\nimport { FieldViewer } from \"./field.viewer\";\n\n/**\n * `<iss-ctrl-table>` — repeatable rows, where each row is itself a small form.\n *\n * `columns` are field definitions: the control renders them as the row editor and as the\n * table columns. The form value holds the raw row values, while `jsonValue` carries the\n * resolved payload of each row in and out.\n *\n * @example\n * ```html\n * <iss-ctrl-table\n * formControlName=\"items\"\n * [columns]=\"columns\"\n * [withFilter]=\"true\"\n * [withSort]=\"true\"\n * [withPagination]=\"true\"\n * />\n * ```\n *\n * ### Own inputs\n * | Property | Type | Default | Description |\n * | --- | --- | --- | --- |\n * | `columns` | `any[]` | **required** | Field definitions rendered as columns and as the row editor. |\n * | `jsonValue` | `any` | `null` | Resolved row payload pushed in from outside. |\n * | `withFilter` | `boolean` | `false` | Shows the filter row. |\n * | `withSort` | `boolean` | `false` | Enables column sorting. |\n * | `withPagination` | `boolean` | `false` | Shows the paginator. |\n *\n * ### Inherited from {@link ControlBase}\n * `formControlName` · `readonly` · `className` · `(onChange)`\n *\n * Does not project a label — the field label is rendered by the wrapping `iss-field-*`.\n */\n@Component({\n selector: \"iss-ctrl-table\",\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatPaginatorModule,\n MatSidenavModule,\n ReactiveFormsModule,\n Outlet,\n FieldViewer,\n ],\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: TableControl, multi: true },\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: `\n <mat-sidenav-container [hasBackdrop]=\"true\">\n <mat-sidenav #drawer [mode]=\"'over'\" [position]=\"'start'\" [autoFocus]=\"false\">\n <form [formGroup]=\"tableOutletForm\">\n <iss-form-outlet [fields]=\"fields()\"/>\n </form>\n <ds-button (click)=\"saveRow(true)\">save\n </ds-button>\n <ds-button (click)=\"saveRow(false)\">save and add more</ds-button>\n </mat-sidenav>\n <mat-sidenav-content>\n <div>\n <ds-button icon=\"true\" (click)=\"openNewRow()\">\n <ds-icon icon=\"plus\"></ds-icon>\n </ds-button>\n <!--<button mat-raised-button (click)=\"removeRow()\" class=\"demo-button\">Remove data</button>-->\n </div>\n @if (withFilter()) {\n <mat-form-field>\n <mat-label>Filter</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\" placeholder=\"Search in table\" #input>\n </mat-form-field>\n }\n <div class=\"mat-elevation-z8\">\n <table mat-table [dataSource]=\"dataSource\" matSort>\n <tr mat-header-row *matHeaderRowDef=\"fieldNames()\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: fieldNames();\" (click)=\"onRowClick(row)\"></tr>\n\n @for (col of fieldNames(); track col) {\n @if (col !== \"actions\") {\n <ng-container [matColumnDef]=\"col\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]=\"!fieldsMap().get(col)?.config?.tableWithSort()\">\n {{ columnLabels()[$index] }}\n </th>\n <td mat-cell *matCellDef=\"let row\">\n @if (viewFieldOf(row, $index); as viewField) {\n <iss-viewer-field [field]=\"viewField\"/>\n }\n </td>\n </ng-container>\n }\n }\n\n <!-- Actions -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header></th>\n <td mat-cell *matCellDef=\"let row\">\n <ds-icon icon=\"eye\" class=\"cursor-pointer\" (click)=\"viewRow(row)\"></ds-icon>\n <ds-icon icon=\"pen\" class=\"cursor-pointer\" (click)=\"editRow(row)\"></ds-icon>\n <ds-icon icon=\"trash\" class=\"cursor-pointer fc-red\" (click)=\"removeRow(row)\"></ds-icon>\n </td>\n </ng-container>\n\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" colspan=\"4\">\n <ds-message type=\"emptyCard\"></ds-message>\n </td>\n </tr>\n </table>\n\n @if (withPagination()) {\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\" aria-label=\"Select page number\"></mat-paginator>\n }\n </div>\n </mat-sidenav-content>\n </mat-sidenav-container>\n `,\n styles: `\n .mat-drawer {\n position: fixed;\n left: 0;\n }\n `\n})\nexport class TableControl extends ControlBase implements OnInit, AfterViewInit, OnDestroy {\n // raw child field configs (the same json shape IssField takes), not IssField/host-field\n // instances: this is what lets the control be dropped into a consumer's own wrapper\n // without depending on the outlet/form-engine machinery a host IssField carries\n /**\n * Field definitions rendered both as table columns and as the row editor. Required.\n */\n columns: InputSignal<any[]> = input.required<any[]>();\n /**\n * Shows the filter row above the table.\n */\n withFilter: InputSignal<boolean> = input(false);\n /**\n * Enables sorting by clicking a column header.\n */\n withSort: InputSignal<boolean> = input(false);\n /**\n * Shows the paginator under the table.\n */\n withPagination: InputSignal<boolean> = input(false);\n // the control value stays the \"*\"/null sentinel (see #emitRows); the row data itself is\n // carried separately here so a wrapper can push a value in on top of a plain ctrl.setValue,\n // e.g. `field.ctrl.setValue(\"*\"); field.ctrlJsonValue.set(rows);`\n /**\n * Resolved row payload pushed in from outside; the control ignores payloads it emitted itself.\n */\n jsonValue: InputSignal<any> = input<any>(null);\n\n loader: Loader = inject(Loader);\n drawer: Signal<MatSidenav | undefined> = viewChild(\"drawer\");\n tableOutletForm: FormGroup = new FormGroup({});\n fields: WritableSignal<IssField[]> = signal<IssField[]>([]);\n columnLabels: Signal<string[]> = computed(() => {\n const labels: string[] = this.fields().map((f: IssField) => f.label());\n labels.push(\"\");\n return labels;\n });\n fieldNames: Signal<string[]> = computed(() => {\n const names = this.fields().map((f: IssField) => f.name);\n names.push(\"actions\");\n return names;\n });\n fieldsMap: Signal<Map<string, IssField>> = computed(() => {\n const m: Map<string, IssField> = new Map<string, IssField>();\n this.fields().forEach((f: IssField) => {\n m.set(f.name, f);\n });\n return m;\n });\n dataSource: MatTableDataSource<TableRow> = this.#newDataSource([]);\n clickedRows = new Set<any>();\n paginator: Signal<MatPaginator | undefined> = viewChild(MatPaginator);\n sort: Signal<MatSort | undefined> = viewChild(MatSort);\n #formEngine: FormEngine = inject(FormEngine);\n #destroyRef: DestroyRef = inject(DestroyRef);\n // view-mode cells are keyed by the row object itself, not by position: sorting and\n // paging reorder dataSource.data while keeping the row references, so an array indexed\n // by the rendered row index would show another row's values\n #rowViewFields: WeakMap<TableRow, IssField[]> = new WeakMap<TableRow, IssField[]>();\n // the values the row editor's fields were built with; viewRow overwrites them to show a\n // stored row, so they have to be put back before the editor is used to add a new one\n #pristineFieldValues: Map<string, string> = new Map<string, string>();\n #fieldValuesOverridden: boolean = false;\n // the last payload this control itself emitted; without this, feeding jsonValue() back\n // into the wrapper's ctrlJsonValue would echo straight back in as a hydration and rebuild\n // dataSource (and the WeakMap-cached view fields) on every single row edit\n #lastEmitted: any = null;\n #hydrateEffectRef: EffectRef = effect(() => {\n const incoming: any = this.jsonValue();\n if (incoming === null || incoming === undefined || incoming === this.#lastEmitted) {\n return;\n }\n this.#hydrateRows(incoming);\n });\n\n // columns() is an input, so it is only guaranteed to be set once Angular runs ngOnInit,\n // not while this class' field initializers run\n ngOnInit(): void {\n const built: IssField[] = this.constructFieldChildren(this.columns());\n this.fields.set(built);\n this.#pristineFieldValues = new Map<string, string>(built.map((f: IssField) => [f.name, f.value]));\n }\n\n // the drawer is a viewChild, so it only exists once the view is initialised\n ngAfterViewInit() {\n this.dataSource.paginator = this.paginator() ?? null;\n this.dataSource.sort = this.sort() ?? null;\n\n this.drawer()?.closedStart\n .pipe(takeUntilDestroyed(this.#destroyRef))\n .subscribe(() => {\n this.tableOutletForm.reset();\n this.tableOutletForm.enable();\n this.#restoreFieldValues();\n });\n }\n\n ngOnDestroy(): void {\n this.#hydrateEffectRef.destroy();\n }\n\n applyFilter(event: Event) {\n const filterValue: string = (event.target as HTMLInputElement).value;\n this.dataSource.filter = filterValue.trim().toLowerCase();\n\n if (this.dataSource.paginator) {\n this.dataSource.paginator.firstPage();\n }\n }\n\n onRowClick(row: any) {\n this.clickedRows.add(row);\n }\n\n // the cell of a row rendered in view mode; the row's view fields are built once and cached\n // against the row itself, so they follow it through sorting, filtering and paging\n viewFieldOf(row: TableRow, index: number): IssField | undefined {\n let viewFields: IssField[] | undefined = this.#rowViewFields.get(row);\n if (!viewFields) {\n viewFields = this.#fieldValuesMapper(row);\n this.#rowViewFields.set(row, viewFields);\n }\n return viewFields[index];\n }\n\n // rows carry a stable id (see #buildRow) but sorting/filtering/paging only ever hand back\n // the same row references, so lookup by reference is simplest\n removeRow(row: TableRow) {\n if (!this.#canModify()) {\n return;\n }\n const index: number = this.dataSource.data.indexOf(row);\n if (index === -1) {\n return;\n }\n const newData = this.dataSource.data.filter((_, i: number) => i !== index);\n this.renderRows(newData);\n }\n\n addRow(values: any, jsonValues?: Map<string, any>) {\n if (!this.#canModify()) {\n return;\n }\n const row: TableRow = this.#buildRow(values, jsonValues);\n this.#rowViewFields.set(row, this.#fieldValuesMapper(row));\n this.renderRows([...this.dataSource.data, row]);\n }\n\n renderRows(rows: TableRow[]) {\n this.dataSource = this.#newDataSource(rows);\n this.dataSource.paginator = this.paginator() ?? null;\n this.dataSource.sort = this.sort() ?? null;\n this.#emitRows(rows);\n }\n\n viewRow(row: TableRow) {\n this.#applyFieldValues(\n (field: IssField) => this.#cellValue(row, field.name),\n (field: IssField) => this.#cellJsonValue(row, field.name)\n );\n this.#fieldValuesOverridden = true;\n this.tableOutletForm.patchValue(this.#toFlatValue(row));\n this.tableOutletForm.disable();\n this.drawer()?.open();\n }\n\n editRow(row: TableRow) {\n if (!this.#canModify()) {\n return;\n }\n this.tableOutletForm.enable();\n this.tableOutletForm.patchValue(this.#toFlatValue(row));\n this.drawer()?.open();\n }\n\n openNewRow(): void {\n if (!this.#canModify()) {\n return;\n }\n this.drawer()?.toggle();\n }\n\n saveRow(closeDrawer: boolean): void {\n if (!this.#canModify()) {\n return;\n }\n const jsonValues = new Map<string, any>(this.fields().map((f: IssField) => [f.name, f.ctrlJsonValue()]));\n this.addRow(this.tableOutletForm.getRawValue(), jsonValues);\n this.tableOutletForm.reset();\n if (closeDrawer) {\n this.drawer()?.close();\n }\n }\n\n private constructFieldChildren(fields: any): IssField[] {\n return fields.map((f: any) => new IssField(f, this.loader));\n }\n\n #restoreFieldValues(): void {\n if (!this.#fieldValuesOverridden) {\n return;\n }\n this.#applyFieldValues(\n (field: IssField) => this.#pristineFieldValues.get(field.name) as string,\n () => null\n );\n this.#fieldValuesOverridden = false;\n }\n\n #applyFieldValues(valueOf: (field: IssField) => string, jsonValueOf: (field: IssField) => any): void {\n this.fields.update((fields: IssField[]): IssField[] => fields.map((field: IssField) => {\n field.value = valueOf(field);\n field.ctrlJsonValue.set(jsonValueOf(field));\n return field;\n }));\n }\n\n // builds the view-mode fields for a row directly from its stored cells, so the value and\n // jsonValue shown always match what was captured when the row was saved\n #fieldValuesMapper(row: TableRow): IssField[] {\n return this.fields().map((field: IssField): any => {\n const fieldWithJsonValue: IssField = this.#formEngine.getField(this.tableOutletForm, field.name) ?? field;\n return {\n name: fieldWithJsonValue.name,\n type: fieldWithJsonValue.type,\n ctrlValue: signal(this.#cellValue(row, field.name)),\n ctrlJsonValue: signal(this.#cellJsonValue(row, field.name)),\n config: fieldWithJsonValue.config,\n };\n });\n }\n\n #canModify(): boolean {\n return !this.ctrl.disabled && !this.readonly();\n }\n\n // sets the CVA-bound control value to the \"*\" sentinel (or null when the table is empty)\n // and emits the full {rows} payload through the onChange output for a wrapper to consume\n #emitRows(rows: TableRow[]): void {\n const submission: { rows: TableRow[] } = this.#toSubmission(rows);\n this.#lastEmitted = submission;\n this.ctrl.setValue(rows.length ? \"*\" : null);\n this.propagateValue();\n this.emitOnChangeEvent(submission);\n }\n\n // rebuilds dataSource from a jsonValue payload pushed in from outside (see the `jsonValue`\n // input); accepts either our own {rows: TableRow[]} shape or a plain array of flat\n // {fieldName: value} row objects\n #hydrateRows(payload: any): void {\n const incomingRows: any[] = Array.isArray(payload?.rows) ? payload.rows : Array.isArray(payload) ? payload : [];\n const rows: TableRow[] = incomingRows.map((row: any) => this.#normalizeRow(row));\n rows.forEach((row: TableRow) => this.#rowViewFields.set(row, this.#fieldValuesMapper(row)));\n this.dataSource = this.#newDataSource(rows);\n this.dataSource.paginator = this.paginator() ?? null;\n this.dataSource.sort = this.sort() ?? null;\n this.ctrl.setValue(rows.length ? \"*\" : null, { emitEvent: false });\n }\n\n #normalizeRow(row: any): TableRow {\n if (Array.isArray(row?.cells)) {\n return { id: row.id ?? crypto.randomUUID(), index: row.index ?? 0, cells: row.cells };\n }\n return this.#buildRow(row);\n }\n\n // the canonical row shape (see TableRow) is used for dataSource.data itself, so the\n // submission is just that shape with the current, post-sort/filter position stamped in\n #toSubmission(rows: TableRow[]): { rows: TableRow[] } {\n return { rows: rows.map((row: TableRow, index: number) => ({ ...row, index })) };\n }\n\n #buildRow(values: any, jsonValues?: Map<string, any>): TableRow {\n return {\n id: crypto.randomUUID(),\n index: this.dataSource.data.length,\n cells: this.fields().map((field: IssField) => ({\n fieldName: field.name,\n value: values[field.name],\n jsonValue: jsonValues?.get(field.name) ?? null,\n })),\n };\n }\n\n #cellValue(row: TableRow, fieldName: string): string {\n return row.cells.find((cell) => cell.fieldName === fieldName)?.value as string;\n }\n\n #cellJsonValue(row: TableRow, fieldName: string): any {\n return row.cells.find((cell) => cell.fieldName === fieldName)?.jsonValue ?? null;\n }\n\n #toFlatValue(row: TableRow): any {\n return Object.fromEntries(row.cells.map((cell) => [cell.fieldName, cell.value]));\n }\n\n #newDataSource(rows: TableRow[]): MatTableDataSource<TableRow> {\n const dataSource: MatTableDataSource<TableRow> = new MatTableDataSource<TableRow>(rows);\n dataSource.filterPredicate = (row: TableRow, filter: string): boolean =>\n row.cells.some((cell) => `${cell.value ?? \"\"}`.toLowerCase().includes(filter));\n dataSource.sortingDataAccessor = (row: TableRow, sortHeaderId: string): string | number =>\n this.#cellValue(row, sortHeaderId) ?? \"\";\n return dataSource;\n }\n}\n\ninterface TableRow {\n id: string;\n index: number;\n cells: { fieldName: string; value: string; jsonValue: any }[];\n}\n","import { Component } from \"@angular/core\";\r\nimport { ReactiveFormsModule } from \"@angular/forms\";\r\nimport { VIEW_PROVIDER } from \"../../../shared/constants/view-provider.const\";\r\nimport { ValidationMessage } from \"../../shared/validation-message\";\r\nimport { FieldBase } from \"../base/field-base\";\r\nimport { TableControl } from \"./table.control\";\r\n\r\n/**\r\n * `<iss-field-table>` — repeatable rows, each row being a small form built from the child fields.\r\n *\r\n * Rendered by the outlet for fields of type `table`. It renders {@link TableControl} plus the\r\n * validation message in `edit` mode; there is no `view` mode template, so the field renders\r\n * nothing outside edit mode.\r\n *\r\n * ### Supported `config` keys\r\n * | Key | Type | Description |\r\n * | --- | --- | --- |\r\n * | `tableWithFilter` | `boolean` | Shows the filter row. |\r\n * | `tableWithSort` | `boolean` | Enables column sorting. |\r\n * | `tableWithPagination` | `boolean` | Shows the paginator. |\r\n * | `readonly` | `boolean` | Shows the value but blocks interaction. |\r\n *\r\n * ### Other field members used\r\n * `children` · `ctrlJsonValue()`\r\n *\r\n * Every field also honours `visible`, `mode`, `validation`, `asyncValidation` and\r\n * `events` — see {@link IssField} for the full model and {@link FieldConfig} for all keys.\r\n *\r\n * Columns come from `field.children`: every child is both a column and an editor input.\r\n *\r\n * @example\r\n * ```json\r\n * { \"name\": \"items\", \"type\": \"table\", \"children\": [{ \"name\": \"qty\", \"type\": \"text_input\", \"label\": \"Qty\" }] }\r\n * ```\r\n */\r\n@Component({\r\n selector: \"iss-field-table\",\r\n viewProviders: [VIEW_PROVIDER],\r\n imports: [\r\n ReactiveFormsModule,\r\n TableControl,\r\n ValidationMessage,\r\n ],\r\n template: `\r\n @if (field.visible()) {\r\n @if (field.mode() === \"edit\") {\r\n <iss-ctrl-table\r\n [formControlName]=\"field.name\"\r\n [columns]=\"field.children\"\r\n [withFilter]=\"field.config.tableWithFilter() ?? false\"\r\n [withSort]=\"field.config.tableWithSort() ?? false\"\r\n [withPagination]=\"field.config.tableWithPagination() ?? false\"\r\n [readonly]=\"field.config.readonly() ?? false\"\r\n [jsonValue]=\"field.ctrlJsonValue()\"\r\n (onChange)=\"field.ctrlJsonValue.set($event)\"\r\n />\r\n <iss-validation-message-viewer [errors]=\"ctrl.errors\" [showMessage]=\"!ctrl.untouched\"/>\r\n }\r\n }\r\n `\r\n})\r\nexport class TableField extends FieldBase {\r\n}\r\n"],"names":["i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYM,MAAO,WAAY,SAAQ,UAAU,CAAA;IACzC,YAAY,GAAyC,SAAS,CAAC,WAAW,oFAAI,IAAI,EAAE,gBAAgB,EAAA,CAAG;AACvG,IAAA,OAAO,GAAW,MAAM,CAAC,MAAM,CAAC;AAChC,IAAA,WAAW,GAAe,MAAM,CAAC,UAAU,CAAC;AAC5C,IAAA,eAAe,GAAc,MAAM,CAAC,MAAK;AACvC,QAAA,MAAM,SAAS,GAAiC,IAAI,CAAC,YAAY,EAAE;AACnE,QAAA,MAAM,KAAK,GAAQ,IAAI,CAAC,KAAK,EAAE;AAC/B,QAAA,IAAI,CAAC,SAAS,IAAI,CAAC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