@zambon-dev/ui 1.1.0 → 1.1.1
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/CHANGELOG.md +34 -0
- package/fesm2022/zambon-dev-ui-library.mjs +21 -8
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +6 -4
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/types/zambon-dev-ui-library.d.ts +27 -1
package/CHANGELOG.md
CHANGED
|
@@ -23,6 +23,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
23
|
|
|
24
24
|
### ⚠ Breaking Changes / Migration
|
|
25
25
|
|
|
26
|
+
## [1.1.1] - 2026-10-25
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **`MultiEditorComponent` announces its form's status when it disables the form.** It still
|
|
31
|
+
disables the controls quietly, as before, so nothing subscribed to one of them hears about it.
|
|
32
|
+
The form as a whole now emits one status and value event afterwards: when the editor opens, when
|
|
33
|
+
it starts with no row selected and when the selected row is removed. Code subscribed to the
|
|
34
|
+
editor's own `FormGroup` sees that one extra event.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **A field in a multi-editor turns into an input when a row is picked.** `lib-form-input`
|
|
39
|
+
decided between an input and a read-only value by reading `form.enabled` and the control's value
|
|
40
|
+
straight from the form, which is not a signal. Under `OnPush` nothing told it the multi-editor
|
|
41
|
+
had enabled its form, so the editor showed every field read-only and nothing could be typed.
|
|
42
|
+
The field now follows the form's events.
|
|
43
|
+
|
|
44
|
+
- **A field leaves edit mode when the edit is cancelled, even if its control stayed disabled.** A
|
|
45
|
+
control kept disabled through an edit -- a read-only username, say -- went on showing a disabled
|
|
46
|
+
input after the view cancelled, instead of its value. Same cause, same fix.
|
|
47
|
+
|
|
48
|
+
- **A read-only field shows a value patched into a disabled form.** It used to keep the value it
|
|
49
|
+
painted first.
|
|
50
|
+
|
|
51
|
+
- **The sign-in screen shows `AppConfig.loginBackgroundUrl`.** The photograph sat at a negative
|
|
52
|
+
z-index under a host that painted the backdrop and had no stacking context of its own, so it was
|
|
53
|
+
always hidden behind the backdrop. When a photograph is set, the footer under the card now gets a
|
|
54
|
+
glass surface, so its text stays readable over the picture.
|
|
55
|
+
|
|
56
|
+
### ⚠ Breaking Changes / Migration
|
|
57
|
+
|
|
58
|
+
- None.
|
|
59
|
+
|
|
26
60
|
## [1.1.0] - 2026-10-25
|
|
27
61
|
|
|
28
62
|
### Added
|
|
@@ -1347,6 +1347,17 @@ var FormInputComponent = class FormInputComponent extends BaseComponent {
|
|
|
1347
1347
|
formGroupDirective = inject(FormGroupDirective);
|
|
1348
1348
|
formGroupName = inject(FormGroupName, { optional: true });
|
|
1349
1349
|
formService = inject(FormService);
|
|
1350
|
+
formChanged = signal(0, ...ngDevMode ? [{ debugName: "formChanged" }] : /* istanbul ignore next */ []);
|
|
1351
|
+
isEditable = computed(() => {
|
|
1352
|
+
this.formChanged();
|
|
1353
|
+
const isFormEnabled = this.formGroupDirective.form?.enabled ?? false;
|
|
1354
|
+
const isEditMode = this.formService.isEditMode;
|
|
1355
|
+
return isFormEnabled || isEditMode;
|
|
1356
|
+
}, ...ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []);
|
|
1357
|
+
shownValue = computed(() => {
|
|
1358
|
+
this.formChanged();
|
|
1359
|
+
return this.fixedValue() ?? this.formGroupDirective.form?.get(this.disabledControlName() ?? this.controlName())?.value;
|
|
1360
|
+
}, ...ngDevMode ? [{ debugName: "shownValue" }] : /* istanbul ignore next */ []);
|
|
1350
1361
|
get formControl() {
|
|
1351
1362
|
return this.controlName() ? this.formGroup.get(this.controlName()) : null;
|
|
1352
1363
|
}
|
|
@@ -1361,9 +1372,6 @@ var FormInputComponent = class FormInputComponent extends BaseComponent {
|
|
|
1361
1372
|
get isFormControl() {
|
|
1362
1373
|
return !!this.controlName() && this.controlName().length > 0;
|
|
1363
1374
|
}
|
|
1364
|
-
get isFormEditMode() {
|
|
1365
|
-
return this.formService.isEditMode;
|
|
1366
|
-
}
|
|
1367
1375
|
get parentGroups() {
|
|
1368
1376
|
return this.formGroupName?.path ?? [];
|
|
1369
1377
|
}
|
|
@@ -1379,6 +1387,7 @@ var FormInputComponent = class FormInputComponent extends BaseComponent {
|
|
|
1379
1387
|
super();
|
|
1380
1388
|
}
|
|
1381
1389
|
ngOnInit() {
|
|
1390
|
+
this.formGroupDirective.form?.events.pipe(takeUntil(this.destroy$)).subscribe(() => this.formChanged.update((count) => count + 1));
|
|
1382
1391
|
switch (this.type()) {
|
|
1383
1392
|
case "number":
|
|
1384
1393
|
if (this.formControl) this.formControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
@@ -1548,7 +1557,7 @@ var FormInputComponent = class FormInputComponent extends BaseComponent {
|
|
|
1548
1557
|
} },
|
|
1549
1558
|
usesInheritance: true,
|
|
1550
1559
|
ngImport: i0,
|
|
1551
|
-
template: "@if (
|
|
1560
|
+
template: "@if (isEditable()) {\n @switch (type()) {\n @case ('textarea') {\n <textarea\n [attr.maxLength]=\"maxLength() ?? null\"\n [attr.rows]=\"rows()\"\n [class.invalid]=\"invalid()\"\n [formControlName]=\"controlName()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n ></textarea>\n }\n @case ('checkbox') {\n @if (isFormControl) {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [class.invalid]=\"invalid()\"\n [formControlName]=\"controlName()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [(ngModel)]=\"fixedValue\"\n [attr.readonly]=\"true\"\n [class.invalid]=\"invalid()\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled()\"\n [disabled]=\"isDisabled()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n @default {\n @if (isFormControl) {\n <input\n [attr.maxLength]=\"maxLength() ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"readOnly() ? true : null\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid()\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled()\"\n [formControlName]=\"controlName()\"\n [type]=\"type()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n type=\"text\"\n [attr.maxLength]=\"maxLength() ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"true\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid()\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled()\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"\n type() === 'date' || type() === 'datetime-local'\n ? (fixedValue() | date: format())\n : type() === 'number'\n ? (fixedValue() | number)\n : fixedValue()\n \"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n }\n} @else {\n @switch (type()) {\n @case ('checkbox') {\n <span class=\"value\">\n <i [ngClass]=\"shownValue() ? 'fa-solid fa-square-check' : 'fa-regular fa-square'\"></i>\n </span>\n }\n @case ('date') {\n <span class=\"value\">\n {{ shownValue() | date: format() }}\n </span>\n }\n @case ('datetime-local') {\n <span class=\"value\">\n {{ shownValue() | date: format() }}\n </span>\n }\n @case ('number') {\n <span class=\"value\">\n {{ shownValue() | number: format() }}\n </span>\n }\n @default {\n <span class=\"value text\">{{ shownValue() }}</span>\n }\n }\n}\n\n<ng-template #fixedTextbox let-fixedValue=\"fixedValue\"> </ng-template>\n",
|
|
1552
1561
|
styles: ["@layer properties;:host{display:block}:host.full-height{height:100%}:host.full-height textarea{height:100%}input,textarea{border-color:var(--color-line-strong)}input:focus-visible,textarea:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;--tw-ring-color: var(--color-focus-ring)}@media(forced-colors:active){input:focus-visible,textarea:focus-visible{outline:2px solid transparent;outline-offset:2px}}input,textarea{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}input:invalid,textarea:invalid{border-color:var(--color-danger)}input:disabled,input.readonly-as-disabled[readonly],textarea:disabled,textarea.readonly-as-disabled[readonly]{background-color:var(--color-surface-inset)}input.ng-invalid.ng-touched,input.invalid,textarea.ng-invalid.ng-touched,textarea.invalid{border-color:var(--color-danger)}input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=month],input[type=tel],input[type=time],input[type=url],input[type=week],textarea{display:block;width:100%;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:var(--radius-field)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{margin-right:calc(var(--spacing, .25rem) * -9);padding-right:calc(var(--spacing, .25rem) * 9);transition-property:none}input[type=text].ng-invalid.ng-touched:focus-visible,input[type=text].invalid:focus-visible,input[type=number].ng-invalid.ng-touched:focus-visible,input[type=number].invalid:focus-visible,input[type=password].ng-invalid.ng-touched:focus-visible,input[type=password].invalid:focus-visible,input[type=date].ng-invalid.ng-touched:focus-visible,input[type=date].invalid:focus-visible,input[type=datetime-local].ng-invalid.ng-touched:focus-visible,input[type=datetime-local].invalid:focus-visible,input[type=email].ng-invalid.ng-touched:focus-visible,input[type=email].invalid:focus-visible,input[type=file].ng-invalid.ng-touched:focus-visible,input[type=file].invalid:focus-visible,input[type=month].ng-invalid.ng-touched:focus-visible,input[type=month].invalid:focus-visible,input[type=tel].ng-invalid.ng-touched:focus-visible,input[type=tel].invalid:focus-visible,input[type=time].ng-invalid.ng-touched:focus-visible,input[type=time].invalid:focus-visible,input[type=url].ng-invalid.ng-touched:focus-visible,input[type=url].invalid:focus-visible,input[type=week].ng-invalid.ng-touched:focus-visible,input[type=week].invalid:focus-visible,textarea.ng-invalid.ng-touched:focus-visible,textarea.invalid:focus-visible{--tw-ring-color: var(--color-danger)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\")}input[type=checkbox]{position:relative;margin-block:var(--spacing, .25rem);height:calc(var(--spacing, .25rem) * 5);width:calc(var(--spacing, .25rem) * 5);border-radius:var(--radius-sm, .25rem);padding:calc(var(--spacing, .25rem) * .5);display:inline-flex;flex-direction:row;justify-content:flex-end;appearance:none;background-color:var(--color-surface-solid)}input[type=checkbox]:disabled{pointer-events:none}input[type=checkbox]:disabled{opacity:50%}input[type=checkbox]:not(.switch){border-style:var(--tw-border-style);border-width:2px;--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input[type=checkbox]:not(.switch):focus-visible{--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input[type=checkbox]:not(.switch):before{border-radius:var(--radius-sm, .25rem);--tw-content: \"\";content:var(--tw-content);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--spacing, .25rem);font-family:var(--fa-family-classic, \"Font Awesome 6 Free\");font-weight:900}input[type=checkbox]:checked{background-image:none;background-color:var(--color-accent);border-color:var(--color-accent)}input[type=checkbox]:checked:before{--tw-content: \"\\f00c\";content:var(--tw-content);color:var(--color-content-on-accent)}input[type=checkbox]:disabled~label{opacity:50%}input[type=checkbox]~label{margin-left:calc(var(--spacing, .25rem) * 2);-webkit-user-select:none;user-select:none}input[type=checkbox].switch{height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 12);border-radius:2rem;appearance:none;background-color:var(--color-surface-solid)}input[type=checkbox].switch:before{aspect-ratio:1 / 1;height:100%;border-radius:calc(infinity * 1px);--tw-content: \"\";content:var(--tw-content);background-color:var(--color-content-subtle)}input[type=checkbox].switch:after{flex-grow:1;--tw-content: \"\";content:var(--tw-content);transition:flex-grow .15s ease-in-out}input[type=checkbox].switch:focus-visible:before{background-color:var(--color-accent)}input[type=checkbox].switch:checked{background-image:none;background-color:var(--color-accent);border-color:var(--color-accent)}input[type=checkbox].switch:checked:before{--tw-content: \"\";content:var(--tw-content);background-color:var(--color-surface-solid)}input[type=checkbox].switch:checked:after{flex-grow:0}label,.value{display:block;padding-block:var(--spacing, .25rem);overflow-wrap:break-word}label.text,.value.text{white-space:pre-wrap}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-content{syntax: \"*\"; inherits: false; initial-value: \"\";}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-border-style: solid;--tw-content: \"\"}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
1553
1562
|
dependencies: [
|
|
1554
1563
|
{
|
|
@@ -1647,7 +1656,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1647
1656
|
"[class.full-height]": "isFullHeight()",
|
|
1648
1657
|
"[attr.type]": "null"
|
|
1649
1658
|
},
|
|
1650
|
-
template: "@if (
|
|
1659
|
+
template: "@if (isEditable()) {\n @switch (type()) {\n @case ('textarea') {\n <textarea\n [attr.maxLength]=\"maxLength() ?? null\"\n [attr.rows]=\"rows()\"\n [class.invalid]=\"invalid()\"\n [formControlName]=\"controlName()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n ></textarea>\n }\n @case ('checkbox') {\n @if (isFormControl) {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [class.invalid]=\"invalid()\"\n [formControlName]=\"controlName()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [(ngModel)]=\"fixedValue\"\n [attr.readonly]=\"true\"\n [class.invalid]=\"invalid()\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled()\"\n [disabled]=\"isDisabled()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n @default {\n @if (isFormControl) {\n <input\n [attr.maxLength]=\"maxLength() ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"readOnly() ? true : null\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid()\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled()\"\n [formControlName]=\"controlName()\"\n [type]=\"type()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n type=\"text\"\n [attr.maxLength]=\"maxLength() ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"true\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid()\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled()\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"\n type() === 'date' || type() === 'datetime-local'\n ? (fixedValue() | date: format())\n : type() === 'number'\n ? (fixedValue() | number)\n : fixedValue()\n \"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n }\n} @else {\n @switch (type()) {\n @case ('checkbox') {\n <span class=\"value\">\n <i [ngClass]=\"shownValue() ? 'fa-solid fa-square-check' : 'fa-regular fa-square'\"></i>\n </span>\n }\n @case ('date') {\n <span class=\"value\">\n {{ shownValue() | date: format() }}\n </span>\n }\n @case ('datetime-local') {\n <span class=\"value\">\n {{ shownValue() | date: format() }}\n </span>\n }\n @case ('number') {\n <span class=\"value\">\n {{ shownValue() | number: format() }}\n </span>\n }\n @default {\n <span class=\"value text\">{{ shownValue() }}</span>\n }\n }\n}\n\n<ng-template #fixedTextbox let-fixedValue=\"fixedValue\"> </ng-template>\n",
|
|
1651
1660
|
styles: ["@layer properties;:host{display:block}:host.full-height{height:100%}:host.full-height textarea{height:100%}input,textarea{border-color:var(--color-line-strong)}input:focus-visible,textarea:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;--tw-ring-color: var(--color-focus-ring)}@media(forced-colors:active){input:focus-visible,textarea:focus-visible{outline:2px solid transparent;outline-offset:2px}}input,textarea{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}input:invalid,textarea:invalid{border-color:var(--color-danger)}input:disabled,input.readonly-as-disabled[readonly],textarea:disabled,textarea.readonly-as-disabled[readonly]{background-color:var(--color-surface-inset)}input.ng-invalid.ng-touched,input.invalid,textarea.ng-invalid.ng-touched,textarea.invalid{border-color:var(--color-danger)}input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=month],input[type=tel],input[type=time],input[type=url],input[type=week],textarea{display:block;width:100%;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:var(--radius-field)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{margin-right:calc(var(--spacing, .25rem) * -9);padding-right:calc(var(--spacing, .25rem) * 9);transition-property:none}input[type=text].ng-invalid.ng-touched:focus-visible,input[type=text].invalid:focus-visible,input[type=number].ng-invalid.ng-touched:focus-visible,input[type=number].invalid:focus-visible,input[type=password].ng-invalid.ng-touched:focus-visible,input[type=password].invalid:focus-visible,input[type=date].ng-invalid.ng-touched:focus-visible,input[type=date].invalid:focus-visible,input[type=datetime-local].ng-invalid.ng-touched:focus-visible,input[type=datetime-local].invalid:focus-visible,input[type=email].ng-invalid.ng-touched:focus-visible,input[type=email].invalid:focus-visible,input[type=file].ng-invalid.ng-touched:focus-visible,input[type=file].invalid:focus-visible,input[type=month].ng-invalid.ng-touched:focus-visible,input[type=month].invalid:focus-visible,input[type=tel].ng-invalid.ng-touched:focus-visible,input[type=tel].invalid:focus-visible,input[type=time].ng-invalid.ng-touched:focus-visible,input[type=time].invalid:focus-visible,input[type=url].ng-invalid.ng-touched:focus-visible,input[type=url].invalid:focus-visible,input[type=week].ng-invalid.ng-touched:focus-visible,input[type=week].invalid:focus-visible,textarea.ng-invalid.ng-touched:focus-visible,textarea.invalid:focus-visible{--tw-ring-color: var(--color-danger)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\")}input[type=checkbox]{position:relative;margin-block:var(--spacing, .25rem);height:calc(var(--spacing, .25rem) * 5);width:calc(var(--spacing, .25rem) * 5);border-radius:var(--radius-sm, .25rem);padding:calc(var(--spacing, .25rem) * .5);display:inline-flex;flex-direction:row;justify-content:flex-end;appearance:none;background-color:var(--color-surface-solid)}input[type=checkbox]:disabled{pointer-events:none}input[type=checkbox]:disabled{opacity:50%}input[type=checkbox]:not(.switch){border-style:var(--tw-border-style);border-width:2px;--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input[type=checkbox]:not(.switch):focus-visible{--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input[type=checkbox]:not(.switch):before{border-radius:var(--radius-sm, .25rem);--tw-content: \"\";content:var(--tw-content);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--spacing, .25rem);font-family:var(--fa-family-classic, \"Font Awesome 6 Free\");font-weight:900}input[type=checkbox]:checked{background-image:none;background-color:var(--color-accent);border-color:var(--color-accent)}input[type=checkbox]:checked:before{--tw-content: \"\\f00c\";content:var(--tw-content);color:var(--color-content-on-accent)}input[type=checkbox]:disabled~label{opacity:50%}input[type=checkbox]~label{margin-left:calc(var(--spacing, .25rem) * 2);-webkit-user-select:none;user-select:none}input[type=checkbox].switch{height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 12);border-radius:2rem;appearance:none;background-color:var(--color-surface-solid)}input[type=checkbox].switch:before{aspect-ratio:1 / 1;height:100%;border-radius:calc(infinity * 1px);--tw-content: \"\";content:var(--tw-content);background-color:var(--color-content-subtle)}input[type=checkbox].switch:after{flex-grow:1;--tw-content: \"\";content:var(--tw-content);transition:flex-grow .15s ease-in-out}input[type=checkbox].switch:focus-visible:before{background-color:var(--color-accent)}input[type=checkbox].switch:checked{background-image:none;background-color:var(--color-accent);border-color:var(--color-accent)}input[type=checkbox].switch:checked:before{--tw-content: \"\";content:var(--tw-content);background-color:var(--color-surface-solid)}input[type=checkbox].switch:checked:after{flex-grow:0}label,.value{display:block;padding-block:var(--spacing, .25rem);overflow-wrap:break-word}label.text,.value.text{white-space:pre-wrap}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-content{syntax: \"*\"; inherits: false; initial-value: \"\";}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-border-style: solid;--tw-content: \"\"}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
1652
1661
|
}]
|
|
1653
1662
|
}],
|
|
@@ -4216,7 +4225,7 @@ var MultiEditorComponent = class MultiEditorComponent extends ModalComponent {
|
|
|
4216
4225
|
this.formGroup().valueChanges.pipe(takeUntil(this.destroy$)).subscribe((_) => {
|
|
4217
4226
|
if (this.selectedKey() && this.formGroup().dirty) this.multiEditorDataset.updateValues(this.selectedKey(), this.formGroup().getRawValue());
|
|
4218
4227
|
});
|
|
4219
|
-
this.
|
|
4228
|
+
this.disableFormQuietly();
|
|
4220
4229
|
}
|
|
4221
4230
|
onDeleteClick() {
|
|
4222
4231
|
if (!this.selectedKey()) return;
|
|
@@ -4224,7 +4233,7 @@ var MultiEditorComponent = class MultiEditorComponent extends ModalComponent {
|
|
|
4224
4233
|
this.selectedKey.set(void 0);
|
|
4225
4234
|
this.formGroup().reset({ emitEvent: false });
|
|
4226
4235
|
this.clearAllFormArrays(this.formGroup());
|
|
4227
|
-
this.
|
|
4236
|
+
this.disableFormQuietly();
|
|
4228
4237
|
}
|
|
4229
4238
|
onNewClick() {
|
|
4230
4239
|
const fakeNewID = (Math.floor(Math.random() * 899999) + 1e5) * -1;
|
|
@@ -4270,7 +4279,7 @@ var MultiEditorComponent = class MultiEditorComponent extends ModalComponent {
|
|
|
4270
4279
|
this.selectedKey.set(void 0);
|
|
4271
4280
|
this.formGroup().reset({ emitEvent: false });
|
|
4272
4281
|
this.clearAllFormArrays(this.formGroup());
|
|
4273
|
-
this.
|
|
4282
|
+
this.disableFormQuietly();
|
|
4274
4283
|
}
|
|
4275
4284
|
}
|
|
4276
4285
|
clearAllFormArrays(form) {
|
|
@@ -4280,6 +4289,10 @@ var MultiEditorComponent = class MultiEditorComponent extends ModalComponent {
|
|
|
4280
4289
|
if (control instanceof FormGroup) this.clearAllFormArrays(control);
|
|
4281
4290
|
});
|
|
4282
4291
|
}
|
|
4292
|
+
disableFormQuietly() {
|
|
4293
|
+
this.formGroup().disable({ emitEvent: false });
|
|
4294
|
+
this.formGroup().updateValueAndValidity({ onlySelf: true });
|
|
4295
|
+
}
|
|
4283
4296
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4284
4297
|
minVersion: "12.0.0",
|
|
4285
4298
|
version: "22.2.0",
|