@koobiq/components 19.5.0 → 19.6.0
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/accordion/accordion-content.directive.d.ts +4 -0
- package/accordion/accordion-trigger.directive.d.ts +4 -0
- package/actions-panel/actions-panel-container.scss +6 -0
- package/actions-panel/actions-panel-tokens.scss +4 -1
- package/autocomplete/autocomplete.component.d.ts +6 -1
- package/autocomplete/autocomplete.module.d.ts +1 -1
- package/autocomplete/autocomplete.scss +14 -3
- package/badge/badge-tokens.scss +3 -3
- package/button/button-group.d.ts +45 -0
- package/button/button-group.scss +17 -0
- package/button/button.component.d.ts +3 -0
- package/button/button.module.d.ts +2 -1
- package/button/public-api.d.ts +1 -0
- package/button-toggle/button-toggle-tokens.scss +1 -1
- package/checkbox/checkbox.d.ts +5 -4
- package/code-block/code-block-tokens.scss +35 -16
- package/code-block/code-block.d.ts +8 -3
- package/core/error/error-state-matcher.d.ts +10 -0
- package/core/forms/_forms.scss +10 -3
- package/core/option/_option-action-theme.scss +1 -0
- package/core/option/action-container.scss +4 -6
- package/core/option/option.scss +5 -0
- package/core/pop-up/pop-up-trigger.d.ts +1 -1
- package/core/select/common.d.ts +4 -4
- package/core/styles/common/_groups-mixins.scss +79 -0
- package/core/styles/common/_groups.scss +4 -34
- package/core/styles/common/_overlay.scss +4 -0
- package/core/styles/common/_select.scss +4 -0
- package/core/styles/theming/scrollbar-tokens.scss +6 -6
- package/core/styles/visual/_layout.scss +0 -2
- package/core/utils/utils.d.ts +2 -0
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/dropdown/dropdown-trigger.directive.d.ts +5 -0
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -1
- package/fesm2022/koobiq-components-accordion.mjs +52 -30
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +12 -12
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +25 -25
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +39 -23
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +14 -14
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-button-toggle.mjs +12 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +146 -24
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +17 -19
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +13 -13
- package/fesm2022/koobiq-components-code-block.mjs +33 -20
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +28 -28
- package/fesm2022/koobiq-components-core.mjs +260 -238
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +40 -64
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +13 -13
- package/fesm2022/koobiq-components-dropdown.mjs +38 -21
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +8 -9
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +39 -39
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +109 -97
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +67 -60
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +31 -27
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +108 -68
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +22 -22
- package/fesm2022/koobiq-components-link.mjs +17 -17
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +19 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs +28 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +54 -22
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +34 -28
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +34 -34
- package/fesm2022/koobiq-components-navbar.mjs +45 -45
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +16 -16
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -16
- package/fesm2022/koobiq-components-popover.mjs +52 -23
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +14 -14
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +10 -10
- package/fesm2022/koobiq-components-risk-level.mjs +7 -7
- package/fesm2022/koobiq-components-scrollbar.mjs +12 -12
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +17 -8
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +340 -57
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +13 -13
- package/fesm2022/koobiq-components-sidepanel.mjs +27 -27
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +51 -18
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +9 -9
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +16 -16
- package/fesm2022/koobiq-components-table.mjs +10 -10
- package/fesm2022/koobiq-components-tabs.mjs +52 -52
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +30 -30
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -7
- package/fesm2022/koobiq-components-time-range.mjs +24 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +10 -10
- package/fesm2022/koobiq-components-timezone.mjs +26 -26
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +8 -9
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +16 -16
- package/fesm2022/koobiq-components-toggle.mjs +12 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +84 -51
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +15 -15
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +12 -10
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +40 -41
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +28 -28
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/filter-bar/filter-search.d.ts +10 -1
- package/filter-bar/pipes/pipe-date.scss +2 -1
- package/form-field/form-field.d.ts +19 -1
- package/form-field/form-field.scss +22 -2
- package/icon/icon-button.component.d.ts +3 -0
- package/inline-edit/inline-edit-tokens.scss +3 -3
- package/inline-edit/inline-edit.d.ts +30 -11
- package/inline-edit/inline-edit.scss +28 -30
- package/link/_link-theme.scss +3 -1
- package/link/link-tokens.scss +7 -6
- package/link/link.component.d.ts +5 -4
- package/loader-overlay/_loader-overlay-theme.scss +12 -0
- package/loader-overlay/loader-overlay-tokens.scss +1 -0
- package/loader-overlay/loader-overlay.component.d.ts +7 -1
- package/markdown/_markdown-theme.scss +3 -31
- package/markdown/markdown-tokens.scss +0 -11
- package/markdown/markdown.component.d.ts +11 -6
- package/markdown/markdown.scss +0 -11
- package/navbar/navbar.scss +3 -0
- package/package.json +4 -5
- package/popover/popover.component.d.ts +15 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-spinner/progress-spinner.scss +1 -0
- package/schematics/ng-add/index.js +4 -5
- package/scrollbar/scrollbar-tokens.scss +7 -7
- package/search-expandable/search-expandable.d.ts +6 -2
- package/select/public-api.d.ts +1 -0
- package/select/select-common.d.ts +30 -0
- package/select/select.component.d.ts +192 -29
- package/select/select.module.d.ts +3 -2
- package/sidepanel/sidepanel-config.d.ts +6 -1
- package/skeleton/skeleton.d.ts +8 -4
- package/skeleton/skeleton.scss +19 -5
- package/split-button/_split-button-theme.scss +2 -1
- package/tags/tag-tokens.scss +4 -4
- package/title/title.directive.d.ts +0 -1
- package/toggle/toggle.component.d.ts +4 -3
- package/tooltip/tooltip-tokens.scss +4 -4
- package/tooltip/tooltip.component.d.ts +20 -2
- package/top-bar/top-bar.scss +3 -0
- package/tree/tree-option.scss +7 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
2
|
-
import
|
|
2
|
+
import * as i1 from '@angular/cdk/a11y';
|
|
3
|
+
import { CdkTrapFocus, CdkMonitorFocus } from '@angular/cdk/a11y';
|
|
3
4
|
import { hasModifierKey } from '@angular/cdk/keycodes';
|
|
4
5
|
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
5
|
-
import { Overlay,
|
|
6
|
+
import { Overlay, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
6
7
|
import { DOCUMENT } from '@angular/common';
|
|
7
8
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { output, Directive, inject, ElementRef, input, booleanAttribute, numberAttribute, contentChild, viewChild, viewChildren, signal,
|
|
9
|
+
import { output, Directive, inject, ElementRef, input, booleanAttribute, numberAttribute, contentChild, computed, contentChildren, viewChild, viewChildren, signal, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
9
10
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
10
11
|
import { AbstractControl, NgControl } from '@angular/forms';
|
|
11
|
-
import * as
|
|
12
|
+
import * as i2 from '@koobiq/components/button';
|
|
12
13
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
13
|
-
import { KbqAnimationDurations, KbqAnimationCurves, PopUpPlacements, KbqComponentColors } from '@koobiq/components/core';
|
|
14
|
+
import { KbqAnimationDurations, KbqAnimationCurves, PopUpPlacements, KbqComponentColors, isElement } from '@koobiq/components/core';
|
|
14
15
|
import { KbqDropdownTrigger } from '@koobiq/components/dropdown';
|
|
15
16
|
import { KbqLabel, KbqFormField } from '@koobiq/components/form-field';
|
|
16
17
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
17
18
|
import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
18
|
-
import { skip } from 'rxjs';
|
|
19
|
+
import { skip, merge } from 'rxjs';
|
|
19
20
|
import { takeUntil } from 'rxjs/operators';
|
|
20
21
|
|
|
21
22
|
const KBQ_INLINE_EDIT_ACTION_BUTTONS_ANIMATION = trigger('panelAnimation', [
|
|
@@ -37,10 +38,10 @@ class KbqFocusRegionItem {
|
|
|
37
38
|
}
|
|
38
39
|
this.isFocused = !this.isFocused;
|
|
39
40
|
}
|
|
40
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
41
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
41
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqFocusRegionItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqFocusRegionItem, isStandalone: true, selector: "[kbqFocusRegionItem]", outputs: { tabOut: "tabOut" }, host: { listeners: { "focusin": "isFocused = true", "keydown.tab": "onTabOut($event)", "keydown.shift.tab": "onTabOut($event)" } }, exportAs: ["kbqFocusRegionItem"], ngImport: i0 }); }
|
|
42
43
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqFocusRegionItem, decorators: [{
|
|
44
45
|
type: Directive,
|
|
45
46
|
args: [{
|
|
46
47
|
selector: '[kbqFocusRegionItem]',
|
|
@@ -54,10 +55,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
54
55
|
}] });
|
|
55
56
|
/** Directive for easy using styles of inline edit placeholder publicly. */
|
|
56
57
|
class KbqInlineEditPlaceholder {
|
|
57
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
58
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
58
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
59
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqInlineEditPlaceholder, isStandalone: true, selector: "[kbqInlineEditPlaceholder]", host: { classAttribute: "kbq-inline-edit__placeholder" }, exportAs: ["kbqInlineEditPlaceholder"], ngImport: i0 }); }
|
|
59
60
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditPlaceholder, decorators: [{
|
|
61
62
|
type: Directive,
|
|
62
63
|
args: [{
|
|
63
64
|
selector: '[kbqInlineEditPlaceholder]',
|
|
@@ -77,10 +78,10 @@ class KbqInlineEditMenu {
|
|
|
77
78
|
/** @docs-private */
|
|
78
79
|
this.dropdownTrigger = inject(KbqDropdownTrigger, { optional: true });
|
|
79
80
|
}
|
|
80
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
81
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
81
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
82
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqInlineEditMenu, isStandalone: true, selector: "[kbqInlineEditMenu]", host: { attributes: { "role": "button" }, listeners: { "click": "$event.stopPropagation()", "keydown.enter": "$event.stopPropagation()", "keydown.space": "$event.stopPropagation()" }, properties: { "class.kbq-active": "dropdownTrigger?.opened" }, classAttribute: "kbq-inline-edit__menu" }, exportAs: ["kbqInlineEditMenu"], ngImport: i0 }); }
|
|
82
83
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditMenu, decorators: [{
|
|
84
85
|
type: Directive,
|
|
85
86
|
args: [{
|
|
86
87
|
selector: '[kbqInlineEditMenu]',
|
|
@@ -102,11 +103,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
102
103
|
*/
|
|
103
104
|
class KbqInlineEdit {
|
|
104
105
|
constructor() {
|
|
105
|
-
this.elementRef = inject(ElementRef);
|
|
106
|
-
this.focusMonitor = inject(FocusMonitor);
|
|
107
106
|
this.overlay = inject(Overlay);
|
|
108
107
|
this.document = inject(DOCUMENT);
|
|
109
108
|
this.resizeObserver = inject(SharedResizeObserver);
|
|
109
|
+
this.elementRef = inject(ElementRef);
|
|
110
110
|
/**
|
|
111
111
|
* Whether to show save/cancel action buttons in edit mode.
|
|
112
112
|
* @default false
|
|
@@ -132,10 +132,16 @@ class KbqInlineEdit {
|
|
|
132
132
|
this.getValueHandler = input();
|
|
133
133
|
/** Handler function to update the value */
|
|
134
134
|
this.setValueHandler = input();
|
|
135
|
+
/** Customizable function that checks if saving on enter available. */
|
|
136
|
+
this.canSaveOnEnter = input((event) => hasModifierKey(event, 'ctrlKey', 'metaKey') || !(event.target instanceof HTMLTextAreaElement));
|
|
135
137
|
/**
|
|
136
|
-
*
|
|
138
|
+
* CSS selectors for elements in view mode that should handle clicks instead of opening edit mode.
|
|
139
|
+
* Override to replace or extend the default list.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* `<kbq-inline-edit [interactiveSelectors]="['a', 'kbq-tag', 'button']">`
|
|
137
143
|
*/
|
|
138
|
-
this.
|
|
144
|
+
this.interactiveSelectors = input(['a', 'kbq-tag']);
|
|
139
145
|
/** Emitted when the inline edit is saved successfully. */
|
|
140
146
|
this.saved = output();
|
|
141
147
|
/** Emitted when the inline edit is canceled and changes are discarded. */
|
|
@@ -147,12 +153,16 @@ class KbqInlineEdit {
|
|
|
147
153
|
/** @docs-private */
|
|
148
154
|
this.label = contentChild(KbqLabel);
|
|
149
155
|
/** @docs-private */
|
|
150
|
-
this.formFieldRef =
|
|
156
|
+
this.formFieldRef = computed(() => this.formFieldRefList()[0]);
|
|
151
157
|
/** @docs-private */
|
|
152
|
-
this.
|
|
158
|
+
this.formFieldRefList = contentChildren(KbqFormField, { descendants: true });
|
|
159
|
+
/** @docs-private */
|
|
160
|
+
this.overlayOrigin = this.elementRef.nativeElement;
|
|
153
161
|
/** @docs-private */
|
|
154
162
|
this.tooltipTrigger = viewChild(KbqTooltipTrigger);
|
|
155
163
|
/** @docs-private */
|
|
164
|
+
this.viewContainer = viewChild.required('viewContainer');
|
|
165
|
+
/** @docs-private */
|
|
156
166
|
this.overlayDir = viewChild(CdkConnectedOverlay);
|
|
157
167
|
/** @docs-private */
|
|
158
168
|
this.regionItems = viewChildren(KbqFocusRegionItem);
|
|
@@ -177,6 +187,9 @@ class KbqInlineEdit {
|
|
|
177
187
|
toObservable(this.mode)
|
|
178
188
|
.pipe(skip(1), takeUntilDestroyed())
|
|
179
189
|
.subscribe((currentMode) => this.modeChange.emit(currentMode));
|
|
190
|
+
effect(() => {
|
|
191
|
+
this.overlayOrigin = this.label() ? this.viewContainer().nativeElement : this.elementRef.nativeElement;
|
|
192
|
+
});
|
|
180
193
|
}
|
|
181
194
|
/** Manually switch mode */
|
|
182
195
|
toggleMode() {
|
|
@@ -184,19 +197,18 @@ class KbqInlineEdit {
|
|
|
184
197
|
}
|
|
185
198
|
/** @docs-private */
|
|
186
199
|
onClick(event) {
|
|
187
|
-
if (this.disabled() || this.isEditMode())
|
|
200
|
+
if (this.disabled() || this.isEditMode() || this.isInteractiveElement(event.target))
|
|
188
201
|
return;
|
|
189
202
|
event.preventDefault();
|
|
190
203
|
event.stopPropagation();
|
|
191
|
-
this.focusMonitor.focusVia(this.overlayOrigin().elementRef, 'program');
|
|
192
204
|
this.toggleMode();
|
|
193
205
|
}
|
|
194
206
|
/** @docs-private */
|
|
195
207
|
onAttach() {
|
|
196
208
|
this.setOverlayWidth();
|
|
197
209
|
this.setOverlayKeydownListener();
|
|
198
|
-
const
|
|
199
|
-
|
|
210
|
+
const formFieldRefList = this.formFieldRefList();
|
|
211
|
+
merge(formFieldRefList.map((ref) => ref.control.stateChanges))
|
|
200
212
|
.pipe(takeUntil(this.overlayDir().overlayRef.detachments()))
|
|
201
213
|
.subscribe(() => {
|
|
202
214
|
if (!this.isInvalid()) {
|
|
@@ -205,14 +217,15 @@ class KbqInlineEdit {
|
|
|
205
217
|
}
|
|
206
218
|
});
|
|
207
219
|
setTimeout(() => {
|
|
208
|
-
formFieldRef
|
|
220
|
+
const formFieldRef = this.formFieldRef();
|
|
221
|
+
if (!formFieldRef)
|
|
222
|
+
return;
|
|
223
|
+
formFieldRef.focus();
|
|
209
224
|
this.initialValue = this.getValue();
|
|
210
225
|
const input = this.getInputNativeElement();
|
|
211
226
|
if (this.initialValue)
|
|
212
227
|
input?.select();
|
|
213
|
-
|
|
214
|
-
this.openPanel(formFieldRef);
|
|
215
|
-
}
|
|
228
|
+
this.openPanel(formFieldRef);
|
|
216
229
|
}, 0);
|
|
217
230
|
}
|
|
218
231
|
/** @docs-private */
|
|
@@ -238,7 +251,7 @@ class KbqInlineEdit {
|
|
|
238
251
|
}
|
|
239
252
|
/** @docs-private */
|
|
240
253
|
onOverlayKeydown(event) {
|
|
241
|
-
this.
|
|
254
|
+
this.markAllAsTouched();
|
|
242
255
|
const canSaveOnEnter = this.canSaveOnEnter();
|
|
243
256
|
switch (event.key) {
|
|
244
257
|
case 'Escape': {
|
|
@@ -248,7 +261,7 @@ class KbqInlineEdit {
|
|
|
248
261
|
case 'Enter': {
|
|
249
262
|
if (canSaveOnEnter(event)) {
|
|
250
263
|
event.preventDefault();
|
|
251
|
-
this.
|
|
264
|
+
this.markAllAsTouched();
|
|
252
265
|
setTimeout(() => this.save(event));
|
|
253
266
|
}
|
|
254
267
|
break;
|
|
@@ -258,6 +271,24 @@ class KbqInlineEdit {
|
|
|
258
271
|
}
|
|
259
272
|
}
|
|
260
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* Block propagation of overlay outside click.
|
|
276
|
+
* Used to prevent reopening when target is inline edit itself.
|
|
277
|
+
* @docs-private
|
|
278
|
+
*/
|
|
279
|
+
onOverlayOutsideClick($event) {
|
|
280
|
+
if (isElement($event.target) && this.elementRef.nativeElement.contains($event.target)) {
|
|
281
|
+
$event.preventDefault();
|
|
282
|
+
$event.stopPropagation();
|
|
283
|
+
}
|
|
284
|
+
this.save($event);
|
|
285
|
+
}
|
|
286
|
+
isInteractiveElement(target) {
|
|
287
|
+
const selectors = this.interactiveSelectors();
|
|
288
|
+
if (!selectors.length)
|
|
289
|
+
return false;
|
|
290
|
+
return isElement(target) && !!target.closest(this.interactiveSelectors().join(','));
|
|
291
|
+
}
|
|
261
292
|
/**
|
|
262
293
|
* Sets up Tab key listeners on region items.
|
|
263
294
|
* Single item: Tab moves to next edit.
|
|
@@ -283,44 +314,48 @@ class KbqInlineEdit {
|
|
|
283
314
|
return;
|
|
284
315
|
setTimeout(() => {
|
|
285
316
|
const activeElement = this.document.activeElement;
|
|
286
|
-
if (activeElement?.classList?.contains('kbq-inline-
|
|
317
|
+
if (activeElement?.classList?.contains('kbq-inline-edit')) {
|
|
287
318
|
activeElement.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter' }));
|
|
288
319
|
}
|
|
289
320
|
});
|
|
290
321
|
}
|
|
291
322
|
isInvalid() {
|
|
292
|
-
const
|
|
293
|
-
if (!
|
|
323
|
+
const formFieldRefList = this.formFieldRefList();
|
|
324
|
+
if (!formFieldRefList.length)
|
|
294
325
|
return false;
|
|
295
|
-
return
|
|
326
|
+
return formFieldRefList.some((ref) => ref.invalid);
|
|
296
327
|
}
|
|
297
328
|
getValue() {
|
|
298
329
|
const getValueHandler = this.getValueHandler();
|
|
299
330
|
if (getValueHandler)
|
|
300
331
|
return getValueHandler();
|
|
301
|
-
const
|
|
302
|
-
|
|
332
|
+
const formFieldRefList = this.formFieldRefList();
|
|
333
|
+
if (!formFieldRefList.length)
|
|
334
|
+
return;
|
|
335
|
+
return this.formFieldRefList().map((ref) => this.coerceControl(ref)?.value);
|
|
303
336
|
}
|
|
304
337
|
setValue(value) {
|
|
305
338
|
const setValue = this.setValueHandler();
|
|
306
339
|
if (setValue) {
|
|
307
|
-
setValue(
|
|
340
|
+
setValue(value);
|
|
308
341
|
return;
|
|
309
342
|
}
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
343
|
+
const formFieldRefList = this.formFieldRefList();
|
|
344
|
+
if (!formFieldRefList.length || !Array.isArray(value))
|
|
312
345
|
return;
|
|
313
|
-
|
|
314
|
-
control.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
control
|
|
318
|
-
|
|
346
|
+
value.forEach((controlValue, index) => {
|
|
347
|
+
const control = this.coerceControl(formFieldRefList[index]);
|
|
348
|
+
if (!control)
|
|
349
|
+
return;
|
|
350
|
+
if (control instanceof AbstractControl) {
|
|
351
|
+
control.setValue(controlValue);
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
control.value = controlValue;
|
|
355
|
+
}
|
|
356
|
+
});
|
|
319
357
|
}
|
|
320
|
-
coerceControl() {
|
|
321
|
-
const formFieldRef = this.formFieldRef();
|
|
322
|
-
if (!formFieldRef)
|
|
323
|
-
return null;
|
|
358
|
+
coerceControl(formFieldRef) {
|
|
324
359
|
if (formFieldRef.control.ngControl instanceof NgControl) {
|
|
325
360
|
return formFieldRef.control.ngControl.control;
|
|
326
361
|
}
|
|
@@ -332,18 +367,18 @@ class KbqInlineEdit {
|
|
|
332
367
|
this.overlayWidth.set(editModeWidth);
|
|
333
368
|
return;
|
|
334
369
|
}
|
|
335
|
-
const
|
|
336
|
-
? this.
|
|
337
|
-
: this.elementRef;
|
|
338
|
-
if (
|
|
370
|
+
const element = this.label()
|
|
371
|
+
? this.elementRef.nativeElement.querySelector('.kbq-inline-edit__focus_container')
|
|
372
|
+
: this.elementRef.nativeElement;
|
|
373
|
+
if (element) {
|
|
339
374
|
this.resizeObserver
|
|
340
|
-
.observe(
|
|
375
|
+
.observe(element)
|
|
341
376
|
.pipe(takeUntil(this.overlayDir().overlayRef.detachments()))
|
|
342
377
|
.subscribe(() => {
|
|
343
|
-
this.overlayWidth.set(
|
|
378
|
+
this.overlayWidth.set(element.offsetWidth);
|
|
344
379
|
});
|
|
345
380
|
}
|
|
346
|
-
this.overlayWidth.set(
|
|
381
|
+
this.overlayWidth.set(element?.offsetWidth ?? '');
|
|
347
382
|
}
|
|
348
383
|
openPanel(formFieldRef) {
|
|
349
384
|
const control = formFieldRef.control;
|
|
@@ -352,22 +387,25 @@ class KbqInlineEdit {
|
|
|
352
387
|
getInputNativeElement() {
|
|
353
388
|
return this.overlayDir()?.overlayRef.overlayElement.querySelector('input:not([type="file"]),textarea') ?? null;
|
|
354
389
|
}
|
|
355
|
-
|
|
356
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: KbqInlineEdit, isStandalone: true, selector: "kbq-inline-edit", inputs: { showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showTooltipOnError: { classPropertyName: "showTooltipOnError", publicName: "showTooltipOnError", isSignal: true, isRequired: false, transformFunction: null }, validationTooltip: { classPropertyName: "validationTooltip", publicName: "validationTooltip", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, editModeWidth: { classPropertyName: "editModeWidth", publicName: "editModeWidth", isSignal: true, isRequired: false, transformFunction: null }, tooltipPlacement: { classPropertyName: "tooltipPlacement", publicName: "tooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, getValueHandler: { classPropertyName: "getValueHandler", publicName: "getValueHandler", isSignal: true, isRequired: false, transformFunction: null }, setValueHandler: { classPropertyName: "setValueHandler", publicName: "setValueHandler", isSignal: true, isRequired: false, transformFunction: null }, canSaveOnEnter: { classPropertyName: "canSaveOnEnter", publicName: "canSaveOnEnter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved", canceled: "canceled", modeChange: "modeChange" }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onClick($event)", "keydown.space": "onClick($event)" }, properties: { "class": "className()", "class.kbq-inline-edit_with-label": "!!label()", "class.kbq-inline-edit_with-menu": "!!menu()", "class.kbq-inline-edit_disabled": "disabled()" }, classAttribute: "kbq-inline-edit" }, queries: [{ propertyName: "menu", first: true, predicate: KbqInlineEditMenu, descendants: true, isSignal: true }, { propertyName: "label", first: true, predicate: KbqLabel, descendants: true, isSignal: true }, { propertyName: "formFieldRef", first: true, predicate: KbqFormField, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }, { propertyName: "tooltipTrigger", first: true, predicate: KbqTooltipTrigger, descendants: true, isSignal: true }, { propertyName: "overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "regionItems", predicate: KbqFocusRegionItem, descendants: true, isSignal: true }], exportAs: ["kbqInlineEdit"], ngImport: i0, template: "@if (label()) {\n <div class=\"kbq-inline-edit__label\">\n <ng-content select=\"kbq-label\" />\n </div>\n}\n\n<div class=\"kbq-inline-edit__view-container\">\n <ng-content select=\"[kbqInlineEditViewMode]\" />\n\n <div\n #overlayOrigin\n class=\"kbq-inline-edit__focus_container kbq-inline-edit__overlay-origin\"\n cdkMonitorElementFocus\n cdkOverlayOrigin\n [tabIndex]=\"tabIndex()\"\n (keydown.enter)=\"onClick($event)\"\n ></div>\n\n @if (menu() && mode() === 'view') {\n <div class=\"kbq-inline-edit__menu-mask kbq-mask\">\n <div class=\"kbq-inline-edit__menu-mask-fade kbq-mask__fade\"></div>\n <div class=\"kbq-inline-edit__menu-mask-container kbq-mask__container\">\n <ng-content select=\"[kbqInlineEditMenu]\" />\n </div>\n </div>\n }\n\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOpen]=\"isEditMode()\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOffsetY]=\"-overlayOrigin.offsetHeight\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n (attach)=\"onAttach()\"\n (overlayOutsideClick)=\"save($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n >\n <div class=\"kbq-inline-edit__panel\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <div\n class=\"kbq-inline-edit__control-container\"\n kbqFocusRegionItem\n [kbqTooltipColor]=\"colors.Error\"\n [kbqTooltip]=\"validationTooltip() ?? ''\"\n [kbqTooltipArrow]=\"false\"\n [kbqTrigger]=\"'manual'\"\n [kbqPlacement]=\"tooltipPlacement() ?? placements.TopLeft\"\n >\n <ng-content select=\"[kbqInlineEditEditMode]\" />\n </div>\n\n @if (showActions()) {\n <div class=\"kbq-inline-edit__action-buttons\" role=\"group\" [@panelAnimation]>\n <button kbq-button [color]=\"'contrast'\" (click)=\"save($event)\">\n <i kbq-icon=\"kbq-check_16\"></i>\n </button>\n <button\n kbqFocusRegionItem\n kbq-button\n [color]=\"'contrast-fade'\"\n (click)=\"cancel()\"\n (keydown.enter)=\"cancel()\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n }\n </div>\n </ng-template>\n</div>\n", styles: [".kbq-inline-edit{display:flex;flex-direction:column;justify-content:center;border-radius:var(--kbq-size-border-radius);padding:var(--kbq-inline-edit-padding-vertical) var(--kbq-inline-edit-padding-horizontal);min-height:var(--kbq-inline-edit-height);box-sizing:border-box}.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):hover{--kbq-inline-edit-background: var(--kbq-states-background-transparent-hover);--kbq-mask-background: var(--kbq-states-background-contrast-less-hover);cursor:pointer}.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):active,.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):has(.kbq-inline-edit__menu.kbq-active){--kbq-inline-edit-background: var(--kbq-states-background-transparent-active);--kbq-mask-background: var(--kbq-states-background-contrast-less-active)}.kbq-inline-edit.kbq-inline-edit_view.kbq-inline-edit_disabled:hover,.kbq-inline-edit.kbq-inline-edit_view.kbq-inline-edit_disabled:has(.kbq-inline-edit__menu.kbq-active){--kbq-mask-background: var(--kbq-background-bg)}.kbq-inline-edit .kbq-label{color:var(--kbq-inline-edit-label-color)}.kbq-inline-edit .kbq-inline-edit__focus_container{background:var(--kbq-inline-edit-background);border-color:var(--kbq-inline-edit-background)}.kbq-inline-edit .kbq-inline-edit__focus_container:focus-visible{outline:none}.kbq-inline-edit .kbq-inline-edit__focus_container.cdk-keyboard-focused{outline:1px solid var(--kbq-states-line-focus-theme);border-color:var(--kbq-states-line-focus-theme)}.kbq-inline-edit{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-inline-edit:not(.kbq-inline-edit_with-label){--kbq-inline-edit-padding-horizontal: var(--kbq-size-m)}.kbq-inline-edit.kbq-inline-edit_with-label{padding-top:var(--kbq-inline-edit-padding-vertical);padding-bottom:var(--kbq-inline-edit-padding-vertical)}.kbq-inline-edit.kbq-inline-edit_with-label.kbq-inline-edit_edit .kbq-inline-edit__view-container{position:relative}.kbq-inline-edit.kbq-inline-edit_with-label .kbq-inline-edit__label{margin-bottom:var(--kbq-size-3xs)}.kbq-inline-edit.kbq-inline-edit_view .kbq-inline-edit__view-container{text-overflow:ellipsis}.kbq-inline-edit:hover .kbq-inline-edit__menu-mask,.kbq-inline-edit.cdk-keyboard-focused .kbq-inline-edit__menu-mask{opacity:1}.kbq-inline-edit .kbq-inline-edit__placeholder{color:var(--kbq-foreground-contrast-secondary)}.kbq-inline-edit{position:relative}.kbq-inline-edit .kbq-mask{display:flex;position:absolute;top:0;right:0}.kbq-inline-edit .kbq-mask .kbq-mask__fade{background:var(--kbq-mask-background, transparent);mask-image:linear-gradient(90deg,transparent,var(--kbq-black-default))}.kbq-inline-edit .kbq-mask .kbq-mask__container{background:var(--kbq-mask-background, transparent)}.kbq-inline-edit .kbq-inline-edit__menu-mask{opacity:0;height:100%;justify-content:flex-end;border-top-right-radius:var(--kbq-size-border-radius);border-bottom-right-radius:var(--kbq-size-border-radius)}.kbq-inline-edit .kbq-inline-edit__menu-mask:has(.kbq-inline-edit__menu.kbq-pressed,.kbq-inline-edit__menu.cdk-keyboard-focused){opacity:1}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu-mask-fade{width:32px}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu-mask-container{display:flex;justify-content:flex-end;min-width:40px;border-radius:inherit}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu{display:inline-flex;align-self:flex-start;padding:var(--kbq-size-s);z-index:2}.kbq-inline-edit .kbq-inline-edit__focus_container{position:absolute;top:0;left:0;width:calc(100% - 2 * var(--kbq-size-border-width));height:calc(100% - 2 * var(--kbq-size-border-width));border:var(--kbq-size-border-width) solid transparent;border-radius:var(--kbq-size-border-radius);z-index:1}.kbq-inline-edit__panel{width:100%}.kbq-inline-edit__panel .kbq-inline-edit__control-container{border-radius:var(--kbq-size-border-radius)}.kbq-inline-edit__panel .kbq-inline-edit__action-buttons{position:absolute;left:calc(-1 * var(--kbq-inline-edit-padding-horizontal));display:inline-flex;flex-direction:row;gap:var(--kbq-size-xxs);padding:var(--kbq-size-xxs) var(--kbq-size-s) var(--kbq-size-s)}.kbq-inline-edit__panel .kbq-inline-edit__control-container,.kbq-inline-edit__panel .kbq-inline-edit__action-buttons>.kbq-button-icon{box-shadow:var(--kbq-shadow-popup)}\n", ":where(.kbq-inline-edit,.kbq-inline-edit__panel){--kbq-inline-edit-background: transparent;--kbq-inline-edit-height: var(--kbq-size-3xl);--kbq-inline-edit-padding-horizontal: var(--kbq-size-s);--kbq-inline-edit-padding-vertical: var(--kbq-size-xs);--kbq-inline-edit-panel-shadow: var(--kbq-shadow-popup);--kbq-inline-edit-label-color: var(--kbq-foreground-contrast-secondary)}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "directive", type: KbqFocusRegionItem, selector: "[kbqFocusRegionItem]", outputs: ["tabOut"], exportAs: ["kbqFocusRegionItem"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }], animations: [KBQ_INLINE_EDIT_ACTION_BUTTONS_ANIMATION], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
390
|
+
markAllAsTouched() {
|
|
391
|
+
this.formFieldRefList().forEach((formField) => formField.control.ngControl?.control?.markAsTouched());
|
|
392
|
+
}
|
|
393
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEdit, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
394
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: KbqInlineEdit, isStandalone: true, selector: "kbq-inline-edit", inputs: { showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showTooltipOnError: { classPropertyName: "showTooltipOnError", publicName: "showTooltipOnError", isSignal: true, isRequired: false, transformFunction: null }, validationTooltip: { classPropertyName: "validationTooltip", publicName: "validationTooltip", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, editModeWidth: { classPropertyName: "editModeWidth", publicName: "editModeWidth", isSignal: true, isRequired: false, transformFunction: null }, tooltipPlacement: { classPropertyName: "tooltipPlacement", publicName: "tooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, getValueHandler: { classPropertyName: "getValueHandler", publicName: "getValueHandler", isSignal: true, isRequired: false, transformFunction: null }, setValueHandler: { classPropertyName: "setValueHandler", publicName: "setValueHandler", isSignal: true, isRequired: false, transformFunction: null }, canSaveOnEnter: { classPropertyName: "canSaveOnEnter", publicName: "canSaveOnEnter", isSignal: true, isRequired: false, transformFunction: null }, interactiveSelectors: { classPropertyName: "interactiveSelectors", publicName: "interactiveSelectors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved", canceled: "canceled", modeChange: "modeChange" }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onClick($event)", "keydown.space": "onClick($event)" }, properties: { "attr.tabindex": "tabIndex()", "class": "className()", "class.kbq-inline-edit_with-label": "!!label()", "class.kbq-inline-edit_with-menu": "!!menu()", "class.kbq-inline-edit_disabled": "disabled()" }, classAttribute: "kbq-inline-edit" }, queries: [{ propertyName: "menu", first: true, predicate: KbqInlineEditMenu, descendants: true, isSignal: true }, { propertyName: "label", first: true, predicate: KbqLabel, descendants: true, isSignal: true }, { propertyName: "formFieldRefList", predicate: KbqFormField, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tooltipTrigger", first: true, predicate: KbqTooltipTrigger, descendants: true, isSignal: true }, { propertyName: "viewContainer", first: true, predicate: ["viewContainer"], descendants: true, isSignal: true }, { propertyName: "overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "regionItems", predicate: KbqFocusRegionItem, descendants: true, isSignal: true }], exportAs: ["kbqInlineEdit"], hostDirectives: [{ directive: i1.CdkMonitorFocus }], ngImport: i0, template: "<div class=\"kbq-inline-edit__focus_container\">\n @if (label()) {\n <div class=\"kbq-inline-edit__label\">\n <ng-content select=\"kbq-label\" />\n </div>\n }\n\n <div #viewContainer class=\"kbq-inline-edit__view-container\">\n <div class=\"kbq-inline-edit__view-content\">\n <ng-content select=\"[kbqInlineEditViewMode]\" />\n </div>\n\n @if (menu() && mode() === 'view') {\n <div class=\"kbq-inline-edit__menu-mask kbq-mask\">\n <div class=\"kbq-inline-edit__menu-mask-fade kbq-mask__fade\"></div>\n <div class=\"kbq-inline-edit__menu-mask-container kbq-mask__container\">\n <ng-content select=\"[kbqInlineEditMenu]\" />\n </div>\n </div>\n }\n\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOpen]=\"isEditMode()\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOffsetY]=\"-overlayOrigin.offsetHeight\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n (attach)=\"onAttach()\"\n (overlayOutsideClick)=\"onOverlayOutsideClick($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n >\n <div class=\"cdk-visually-hidden\" aria-hidden=\"true\" kbqFocusRegionItem tabindex=\"0\"></div>\n <div class=\"kbq-inline-edit__panel\" cdkTrapFocusAutoCapture [cdkTrapFocus]=\"false\">\n <div\n class=\"kbq-inline-edit__control-container\"\n [kbqTooltipColor]=\"colors.Error\"\n [kbqTooltip]=\"validationTooltip() ?? ''\"\n [kbqTooltipArrow]=\"false\"\n [kbqTrigger]=\"'manual'\"\n [kbqPlacement]=\"tooltipPlacement() ?? placements.TopLeft\"\n >\n <ng-content select=\"[kbqInlineEditEditMode]\" />\n </div>\n\n @if (showActions()) {\n <div class=\"kbq-inline-edit__action-buttons\" role=\"group\" [@panelAnimation]>\n <button kbq-button [color]=\"'contrast'\" (click)=\"save($event)\">\n <i kbq-icon=\"kbq-check_16\"></i>\n </button>\n <button kbq-button [color]=\"'contrast-fade'\" (click)=\"cancel()\">\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n }\n </div>\n <div class=\"cdk-visually-hidden\" aria-hidden=\"true\" kbqFocusRegionItem tabindex=\"0\"></div>\n </ng-template>\n </div>\n</div>\n", styles: [".kbq-inline-edit{display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;border:var(--kbq-size-border-width) solid transparent;border-radius:var(--kbq-size-border-radius);padding:var(--kbq-inline-edit-padding-vertical) var(--kbq-inline-edit-padding-horizontal);min-height:var(--kbq-inline-edit-height);background:var(--kbq-inline-edit-background)}.kbq-inline-edit:focus-visible{outline:none}.kbq-inline-edit.cdk-keyboard-focused{box-shadow:inset 0 0 .1px 1px var(--kbq-states-line-focus-theme);border-color:var(--kbq-states-line-focus-theme)}.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):hover{--kbq-inline-edit-background: var(--kbq-states-background-transparent-hover);--kbq-mask-background: var(--kbq-states-background-contrast-less-hover);cursor:pointer}.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):active,.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):has(.kbq-inline-edit__menu.kbq-active){--kbq-inline-edit-background: var(--kbq-states-background-transparent-active);--kbq-mask-background: var(--kbq-states-background-contrast-less-active)}.kbq-inline-edit.kbq-inline-edit_view.kbq-inline-edit_disabled:hover,.kbq-inline-edit.kbq-inline-edit_view.kbq-inline-edit_disabled:has(.kbq-inline-edit__menu.kbq-active){--kbq-mask-background: var(--kbq-background-bg)}.kbq-inline-edit .kbq-label{color:var(--kbq-inline-edit-label-color)}.kbq-inline-edit .kbq-inline-edit__focus_container{display:flex;flex-direction:column}.kbq-inline-edit{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-inline-edit:not(.kbq-inline-edit_with-label){--kbq-inline-edit-padding-horizontal: calc(var(--kbq-size-m) - var(--kbq-size-border-width))}.kbq-inline-edit.kbq-inline-edit_with-label{padding-top:var(--kbq-inline-edit-padding-vertical);padding-bottom:var(--kbq-inline-edit-padding-vertical)}.kbq-inline-edit.kbq-inline-edit_with-label.kbq-inline-edit_edit .kbq-inline-edit__view-container{position:relative}.kbq-inline-edit.kbq-inline-edit_with-label .kbq-inline-edit__label{margin-bottom:var(--kbq-size-3xs)}.kbq-inline-edit.kbq-inline-edit_view .kbq-inline-edit__view-container{display:flex;text-overflow:ellipsis}.kbq-inline-edit.kbq-inline-edit_view .kbq-inline-edit__view-content{display:inline-block;text-overflow:ellipsis}.kbq-inline-edit:hover .kbq-inline-edit__menu-mask,.kbq-inline-edit.cdk-keyboard-focused .kbq-inline-edit__menu-mask{opacity:1}.kbq-inline-edit .kbq-inline-edit__placeholder{color:var(--kbq-foreground-contrast-secondary)}.kbq-inline-edit{position:relative}.kbq-inline-edit .kbq-mask{display:flex;position:absolute;top:calc(var(--kbq-size-border-width) * -1);right:calc(var(--kbq-size-border-width) * -1)}.kbq-inline-edit .kbq-mask .kbq-mask__fade{background:var(--kbq-mask-background, transparent);mask-image:linear-gradient(90deg,transparent,var(--kbq-plt-black, var(--kbq-black-default)))}.kbq-inline-edit .kbq-mask .kbq-mask__container{background:var(--kbq-mask-background, transparent)}.kbq-inline-edit .kbq-inline-edit__menu-mask{opacity:0;height:calc(100% + 2 * var(--kbq-size-border-width));justify-content:flex-end;border-top-right-radius:var(--kbq-size-border-radius);border-bottom-right-radius:var(--kbq-size-border-radius)}.kbq-inline-edit .kbq-inline-edit__menu-mask:has(.kbq-inline-edit__menu.kbq-pressed,.kbq-inline-edit__menu.cdk-keyboard-focused){opacity:1}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu-mask-fade{width:32px}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu-mask-container{display:flex;justify-content:flex-end;min-width:40px;border-radius:inherit}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu{display:inline-flex;align-self:flex-start;padding:var(--kbq-size-s);z-index:2}.kbq-inline-edit__panel{width:100%}.kbq-inline-edit__panel .kbq-inline-edit__control-container{border-radius:var(--kbq-size-border-radius)}.kbq-inline-edit__panel .kbq-inline-edit__action-buttons{position:absolute;left:calc(-1 * var(--kbq-inline-edit-padding-horizontal));display:inline-flex;flex-direction:row;gap:var(--kbq-size-xxs);padding:var(--kbq-size-xxs) var(--kbq-size-s) var(--kbq-size-s)}.kbq-inline-edit__panel .kbq-inline-edit__control-container,.kbq-inline-edit__panel .kbq-inline-edit__action-buttons>.kbq-button-icon{box-shadow:var(--kbq-shadow-popup)}\n", ":where(.kbq-inline-edit,.kbq-inline-edit__panel){--kbq-inline-edit-background: transparent;--kbq-inline-edit-height: calc(var(--kbq-size-3xl) - 2 * var(--kbq-size-border-width));--kbq-inline-edit-padding-horizontal: calc(var(--kbq-size-s) - var(--kbq-size-border-width));--kbq-inline-edit-padding-vertical: calc(var(--kbq-size-xs) - var(--kbq-size-border-width));--kbq-inline-edit-panel-shadow: var(--kbq-shadow-popup);--kbq-inline-edit-label-color: var(--kbq-foreground-contrast-secondary)}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i2.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i2.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "directive", type: KbqFocusRegionItem, selector: "[kbqFocusRegionItem]", outputs: ["tabOut"], exportAs: ["kbqFocusRegionItem"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [KBQ_INLINE_EDIT_ACTION_BUTTONS_ANIMATION], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
357
395
|
}
|
|
358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEdit, decorators: [{
|
|
359
397
|
type: Component,
|
|
360
398
|
args: [{ selector: 'kbq-inline-edit', imports: [
|
|
361
399
|
CdkConnectedOverlay,
|
|
362
|
-
CdkOverlayOrigin,
|
|
363
400
|
KbqButtonModule,
|
|
364
401
|
KbqIcon,
|
|
365
402
|
KbqTooltipTrigger,
|
|
366
403
|
KbqFocusRegionItem,
|
|
367
|
-
CdkTrapFocus
|
|
368
|
-
CdkMonitorFocus
|
|
404
|
+
CdkTrapFocus
|
|
369
405
|
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'kbqInlineEdit', host: {
|
|
370
406
|
class: baseClass,
|
|
407
|
+
// @TODO: resolve tab queue with content-first (DS-4810)
|
|
408
|
+
'[attr.tabindex]': 'tabIndex()',
|
|
371
409
|
'[class]': 'className()',
|
|
372
410
|
'[class.kbq-inline-edit_with-label]': '!!label()',
|
|
373
411
|
'[class.kbq-inline-edit_with-menu]': '!!menu()',
|
|
@@ -375,7 +413,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
375
413
|
'(click)': 'onClick($event)',
|
|
376
414
|
'(keydown.enter)': 'onClick($event)',
|
|
377
415
|
'(keydown.space)': 'onClick($event)'
|
|
378
|
-
},
|
|
416
|
+
}, hostDirectives: [
|
|
417
|
+
CdkMonitorFocus
|
|
418
|
+
], animations: [KBQ_INLINE_EDIT_ACTION_BUTTONS_ANIMATION], template: "<div class=\"kbq-inline-edit__focus_container\">\n @if (label()) {\n <div class=\"kbq-inline-edit__label\">\n <ng-content select=\"kbq-label\" />\n </div>\n }\n\n <div #viewContainer class=\"kbq-inline-edit__view-container\">\n <div class=\"kbq-inline-edit__view-content\">\n <ng-content select=\"[kbqInlineEditViewMode]\" />\n </div>\n\n @if (menu() && mode() === 'view') {\n <div class=\"kbq-inline-edit__menu-mask kbq-mask\">\n <div class=\"kbq-inline-edit__menu-mask-fade kbq-mask__fade\"></div>\n <div class=\"kbq-inline-edit__menu-mask-container kbq-mask__container\">\n <ng-content select=\"[kbqInlineEditMenu]\" />\n </div>\n </div>\n }\n\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOpen]=\"isEditMode()\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOffsetY]=\"-overlayOrigin.offsetHeight\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n (attach)=\"onAttach()\"\n (overlayOutsideClick)=\"onOverlayOutsideClick($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n >\n <div class=\"cdk-visually-hidden\" aria-hidden=\"true\" kbqFocusRegionItem tabindex=\"0\"></div>\n <div class=\"kbq-inline-edit__panel\" cdkTrapFocusAutoCapture [cdkTrapFocus]=\"false\">\n <div\n class=\"kbq-inline-edit__control-container\"\n [kbqTooltipColor]=\"colors.Error\"\n [kbqTooltip]=\"validationTooltip() ?? ''\"\n [kbqTooltipArrow]=\"false\"\n [kbqTrigger]=\"'manual'\"\n [kbqPlacement]=\"tooltipPlacement() ?? placements.TopLeft\"\n >\n <ng-content select=\"[kbqInlineEditEditMode]\" />\n </div>\n\n @if (showActions()) {\n <div class=\"kbq-inline-edit__action-buttons\" role=\"group\" [@panelAnimation]>\n <button kbq-button [color]=\"'contrast'\" (click)=\"save($event)\">\n <i kbq-icon=\"kbq-check_16\"></i>\n </button>\n <button kbq-button [color]=\"'contrast-fade'\" (click)=\"cancel()\">\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n }\n </div>\n <div class=\"cdk-visually-hidden\" aria-hidden=\"true\" kbqFocusRegionItem tabindex=\"0\"></div>\n </ng-template>\n </div>\n</div>\n", styles: [".kbq-inline-edit{display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;border:var(--kbq-size-border-width) solid transparent;border-radius:var(--kbq-size-border-radius);padding:var(--kbq-inline-edit-padding-vertical) var(--kbq-inline-edit-padding-horizontal);min-height:var(--kbq-inline-edit-height);background:var(--kbq-inline-edit-background)}.kbq-inline-edit:focus-visible{outline:none}.kbq-inline-edit.cdk-keyboard-focused{box-shadow:inset 0 0 .1px 1px var(--kbq-states-line-focus-theme);border-color:var(--kbq-states-line-focus-theme)}.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):hover{--kbq-inline-edit-background: var(--kbq-states-background-transparent-hover);--kbq-mask-background: var(--kbq-states-background-contrast-less-hover);cursor:pointer}.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):active,.kbq-inline-edit.kbq-inline-edit_view:not(.kbq-inline-edit_disabled):has(.kbq-inline-edit__menu.kbq-active){--kbq-inline-edit-background: var(--kbq-states-background-transparent-active);--kbq-mask-background: var(--kbq-states-background-contrast-less-active)}.kbq-inline-edit.kbq-inline-edit_view.kbq-inline-edit_disabled:hover,.kbq-inline-edit.kbq-inline-edit_view.kbq-inline-edit_disabled:has(.kbq-inline-edit__menu.kbq-active){--kbq-mask-background: var(--kbq-background-bg)}.kbq-inline-edit .kbq-label{color:var(--kbq-inline-edit-label-color)}.kbq-inline-edit .kbq-inline-edit__focus_container{display:flex;flex-direction:column}.kbq-inline-edit{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-inline-edit:not(.kbq-inline-edit_with-label){--kbq-inline-edit-padding-horizontal: calc(var(--kbq-size-m) - var(--kbq-size-border-width))}.kbq-inline-edit.kbq-inline-edit_with-label{padding-top:var(--kbq-inline-edit-padding-vertical);padding-bottom:var(--kbq-inline-edit-padding-vertical)}.kbq-inline-edit.kbq-inline-edit_with-label.kbq-inline-edit_edit .kbq-inline-edit__view-container{position:relative}.kbq-inline-edit.kbq-inline-edit_with-label .kbq-inline-edit__label{margin-bottom:var(--kbq-size-3xs)}.kbq-inline-edit.kbq-inline-edit_view .kbq-inline-edit__view-container{display:flex;text-overflow:ellipsis}.kbq-inline-edit.kbq-inline-edit_view .kbq-inline-edit__view-content{display:inline-block;text-overflow:ellipsis}.kbq-inline-edit:hover .kbq-inline-edit__menu-mask,.kbq-inline-edit.cdk-keyboard-focused .kbq-inline-edit__menu-mask{opacity:1}.kbq-inline-edit .kbq-inline-edit__placeholder{color:var(--kbq-foreground-contrast-secondary)}.kbq-inline-edit{position:relative}.kbq-inline-edit .kbq-mask{display:flex;position:absolute;top:calc(var(--kbq-size-border-width) * -1);right:calc(var(--kbq-size-border-width) * -1)}.kbq-inline-edit .kbq-mask .kbq-mask__fade{background:var(--kbq-mask-background, transparent);mask-image:linear-gradient(90deg,transparent,var(--kbq-plt-black, var(--kbq-black-default)))}.kbq-inline-edit .kbq-mask .kbq-mask__container{background:var(--kbq-mask-background, transparent)}.kbq-inline-edit .kbq-inline-edit__menu-mask{opacity:0;height:calc(100% + 2 * var(--kbq-size-border-width));justify-content:flex-end;border-top-right-radius:var(--kbq-size-border-radius);border-bottom-right-radius:var(--kbq-size-border-radius)}.kbq-inline-edit .kbq-inline-edit__menu-mask:has(.kbq-inline-edit__menu.kbq-pressed,.kbq-inline-edit__menu.cdk-keyboard-focused){opacity:1}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu-mask-fade{width:32px}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu-mask-container{display:flex;justify-content:flex-end;min-width:40px;border-radius:inherit}.kbq-inline-edit .kbq-inline-edit__menu-mask .kbq-inline-edit__menu{display:inline-flex;align-self:flex-start;padding:var(--kbq-size-s);z-index:2}.kbq-inline-edit__panel{width:100%}.kbq-inline-edit__panel .kbq-inline-edit__control-container{border-radius:var(--kbq-size-border-radius)}.kbq-inline-edit__panel .kbq-inline-edit__action-buttons{position:absolute;left:calc(-1 * var(--kbq-inline-edit-padding-horizontal));display:inline-flex;flex-direction:row;gap:var(--kbq-size-xxs);padding:var(--kbq-size-xxs) var(--kbq-size-s) var(--kbq-size-s)}.kbq-inline-edit__panel .kbq-inline-edit__control-container,.kbq-inline-edit__panel .kbq-inline-edit__action-buttons>.kbq-button-icon{box-shadow:var(--kbq-shadow-popup)}\n", ":where(.kbq-inline-edit,.kbq-inline-edit__panel){--kbq-inline-edit-background: transparent;--kbq-inline-edit-height: calc(var(--kbq-size-3xl) - 2 * var(--kbq-size-border-width));--kbq-inline-edit-padding-horizontal: calc(var(--kbq-size-s) - var(--kbq-size-border-width));--kbq-inline-edit-padding-vertical: calc(var(--kbq-size-xs) - var(--kbq-size-border-width));--kbq-inline-edit-panel-shadow: var(--kbq-shadow-popup);--kbq-inline-edit-label-color: var(--kbq-foreground-contrast-secondary)}\n"] }]
|
|
379
419
|
}], ctorParameters: () => [] });
|
|
380
420
|
|
|
381
421
|
const COMPONENTS = [
|
|
@@ -384,15 +424,15 @@ const COMPONENTS = [
|
|
|
384
424
|
KbqInlineEditMenu
|
|
385
425
|
];
|
|
386
426
|
class KbqInlineEditModule {
|
|
387
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
388
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
427
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
428
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditModule, imports: [KbqInlineEdit,
|
|
389
429
|
KbqInlineEditPlaceholder,
|
|
390
430
|
KbqInlineEditMenu], exports: [KbqInlineEdit,
|
|
391
431
|
KbqInlineEditPlaceholder,
|
|
392
432
|
KbqInlineEditMenu] }); }
|
|
393
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
433
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditModule, imports: [KbqInlineEdit] }); }
|
|
394
434
|
}
|
|
395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqInlineEditModule, decorators: [{
|
|
396
436
|
type: NgModule,
|
|
397
437
|
args: [{
|
|
398
438
|
imports: COMPONENTS,
|