@m1z23r/ngx-ui 1.1.30 → 1.1.32

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.
@@ -5988,6 +5988,327 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
5988
5988
  args: [{ selector: 'ui-tree', standalone: true, imports: [TreeNodeComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: TREE_HOST, useExisting: TreeComponent }], template: "<div class=\"ui-tree\">\n @for (node of nodes(); track node) {\n <ui-tree-node\n [node]=\"node\"\n [level]=\"0\"\n [indent]=\"indent()\"\n (nodeClick)=\"_onNodeClick($event)\"\n (nodeExpand)=\"_onNodeExpand($event)\"\n (nodeCollapse)=\"_onNodeCollapse($event)\"\n />\n }\n</div>\n", styles: [":host{display:block}.ui-tree{font-size:var(--ui-font-sm);color:var(--ui-text);-webkit-user-select:none;user-select:none}\n"] }]
5989
5989
  }], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], indent: [{ type: i0.Input, args: [{ isSignal: true, alias: "indent", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], nodeClick: [{ type: i0.Output, args: ["nodeClick"] }], nodeExpand: [{ type: i0.Output, args: ["nodeExpand"] }], nodeCollapse: [{ type: i0.Output, args: ["nodeCollapse"] }], nodeDrop: [{ type: i0.Output, args: ["nodeDrop"] }] } });
5990
5990
 
5991
+ /** Directive to mark a custom variable popover template */
5992
+ class VariablePopoverDirective {
5993
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: VariablePopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5994
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: VariablePopoverDirective, isStandalone: true, selector: "ng-template[uiVariablePopover]", ngImport: i0 });
5995
+ }
5996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: VariablePopoverDirective, decorators: [{
5997
+ type: Directive,
5998
+ args: [{
5999
+ selector: 'ng-template[uiVariablePopover]',
6000
+ standalone: true,
6001
+ }]
6002
+ }] });
6003
+ class TemplateInputComponent {
6004
+ renderer;
6005
+ label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
6006
+ placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
6007
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
6008
+ error = input('', ...(ngDevMode ? [{ debugName: "error" }] : []));
6009
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
6010
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
6011
+ required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
6012
+ id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
6013
+ /** The template string value. Two-way bindable. */
6014
+ value = model.required(...(ngDevMode ? [{ debugName: "value" }] : []));
6015
+ /**
6016
+ * Known variables with their values. Two-way bindable.
6017
+ *
6018
+ * The component detects `{{key}}` patterns in the value and resolves state:
6019
+ * - Key found with a truthy value → 'resolved' (green)
6020
+ * - Key found with empty/falsy value → 'unset' (amber)
6021
+ * - Key NOT found in array → 'unknown' (red)
6022
+ */
6023
+ variables = model.required(...(ngDevMode ? [{ debugName: "variables" }] : []));
6024
+ /** Emits the variable key on hover, or null when hover ends. */
6025
+ variableHover = output();
6026
+ /** Custom popover template for variables. Receives VariablePopoverContext. */
6027
+ popoverTemplate = contentChild(VariablePopoverDirective, { ...(ngDevMode ? { debugName: "popoverTemplate" } : {}), read: TemplateRef });
6028
+ static nextId = 0;
6029
+ generatedId = `ui-template-input-${++TemplateInputComponent.nextId}`;
6030
+ inputId = computed(() => this.id() || this.generatedId, ...(ngDevMode ? [{ debugName: "inputId" }] : []));
6031
+ mirrorRef = viewChild('mirror', ...(ngDevMode ? [{ debugName: "mirrorRef" }] : []));
6032
+ inputRef = viewChild('inputEl', ...(ngDevMode ? [{ debugName: "inputRef" }] : []));
6033
+ popoverRef;
6034
+ hostRef = inject(ElementRef);
6035
+ positionCleanup = null;
6036
+ currentSpanRect = null;
6037
+ isPortaled = false;
6038
+ // Popover state
6039
+ popoverVisible = signal(false, ...(ngDevMode ? [{ debugName: "popoverVisible" }] : []));
6040
+ openAbove = signal(true, ...(ngDevMode ? [{ debugName: "openAbove" }] : []));
6041
+ popoverText = signal('', ...(ngDevMode ? [{ debugName: "popoverText" }] : []));
6042
+ popoverVarKey = signal('', ...(ngDevMode ? [{ debugName: "popoverVarKey" }] : []));
6043
+ popoverContext = computed(() => {
6044
+ const key = this.popoverVarKey();
6045
+ const vars = this.variables();
6046
+ const entry = vars.find(v => v.key === key);
6047
+ return {
6048
+ $implicit: key,
6049
+ key,
6050
+ value: entry?.value ?? '',
6051
+ state: this.resolveVarState(key, vars),
6052
+ close: () => this.closePopover(),
6053
+ };
6054
+ }, ...(ngDevMode ? [{ debugName: "popoverContext" }] : []));
6055
+ hoveredVar = null;
6056
+ hideTimer = null;
6057
+ constructor(renderer) {
6058
+ this.renderer = renderer;
6059
+ this.injectStyles();
6060
+ }
6061
+ highlightedHtml = computed(() => {
6062
+ const text = this.value();
6063
+ if (!text)
6064
+ return '\u200b';
6065
+ const vars = this.variables();
6066
+ const escaped = this.escapeHtml(text);
6067
+ // Use CSS classes instead of data-* attributes since Angular's
6068
+ // innerHTML sanitizer strips data attributes.
6069
+ return (escaped.replace(/\{\{([^}]+)\}\}/g, (_match, varKey) => {
6070
+ const state = this.resolveVarState(varKey, vars);
6071
+ return `<span class="ui-tmpl__var ui-tmpl__var--${state}">{{${this.escapeHtml(varKey)}}}</span>`;
6072
+ }) + '\u200b');
6073
+ }, ...(ngDevMode ? [{ debugName: "highlightedHtml" }] : []));
6074
+ syncScroll() {
6075
+ const inputEl = this.inputRef()?.nativeElement;
6076
+ const mirrorEl = this.mirrorRef()?.nativeElement;
6077
+ if (inputEl && mirrorEl) {
6078
+ mirrorEl.scrollLeft = inputEl.scrollLeft;
6079
+ }
6080
+ }
6081
+ onInput() {
6082
+ this.syncScroll();
6083
+ }
6084
+ onKeyDown() {
6085
+ requestAnimationFrame(() => this.syncScroll());
6086
+ }
6087
+ onMouseMove(event) {
6088
+ const mirrorEl = this.mirrorRef()?.nativeElement;
6089
+ if (!mirrorEl) {
6090
+ this.scheduleHide();
6091
+ return;
6092
+ }
6093
+ const spans = mirrorEl.querySelectorAll('.ui-tmpl__var');
6094
+ const { clientX, clientY } = event;
6095
+ for (const span of spans) {
6096
+ const rect = span.getBoundingClientRect();
6097
+ if (clientX >= rect.left &&
6098
+ clientX <= rect.right &&
6099
+ clientY >= rect.top &&
6100
+ clientY <= rect.bottom) {
6101
+ // Extract variable key from text content: "{{varKey}}" → "varKey"
6102
+ const varKey = (span.textContent || '').replace(/^\{\{|\}\}$/g, '');
6103
+ this.cancelHide();
6104
+ this.showPopover(varKey, rect);
6105
+ return;
6106
+ }
6107
+ }
6108
+ this.scheduleHide();
6109
+ }
6110
+ onContainerMouseLeave() {
6111
+ this.scheduleHide();
6112
+ }
6113
+ onPopoverMouseEnter() {
6114
+ this.cancelHide();
6115
+ }
6116
+ onPopoverMouseLeave() {
6117
+ this.scheduleHide();
6118
+ }
6119
+ resolveVarState(varKey, vars) {
6120
+ const entry = vars.find(v => v.key === varKey);
6121
+ if (!entry)
6122
+ return 'unknown';
6123
+ return entry.value ? 'resolved' : 'unset';
6124
+ }
6125
+ showPopover(varKey, spanRect) {
6126
+ if (this.hoveredVar !== varKey) {
6127
+ this.hoveredVar = varKey;
6128
+ this.variableHover.emit(varKey);
6129
+ }
6130
+ const vars = this.variables();
6131
+ const entry = vars.find(v => v.key === varKey);
6132
+ this.popoverVarKey.set(varKey);
6133
+ this.popoverText.set(entry ? (entry.value || varKey) : varKey);
6134
+ this.currentSpanRect = spanRect;
6135
+ this.popoverVisible.set(true);
6136
+ if (!this.isPortaled) {
6137
+ this.portalPopover();
6138
+ }
6139
+ else {
6140
+ this.updatePopoverPosition();
6141
+ }
6142
+ }
6143
+ closePopover() {
6144
+ this.cancelHide();
6145
+ this.popoverVisible.set(false);
6146
+ this.unportalPopover();
6147
+ if (this.hoveredVar !== null) {
6148
+ this.hoveredVar = null;
6149
+ this.variableHover.emit(null);
6150
+ }
6151
+ }
6152
+ scheduleHide() {
6153
+ if (this.hideTimer)
6154
+ return;
6155
+ this.hideTimer = setTimeout(() => {
6156
+ this.hideTimer = null;
6157
+ this.closePopover();
6158
+ }, 200);
6159
+ }
6160
+ cancelHide() {
6161
+ if (this.hideTimer) {
6162
+ clearTimeout(this.hideTimer);
6163
+ this.hideTimer = null;
6164
+ }
6165
+ }
6166
+ escapeHtml(text) {
6167
+ return text
6168
+ .replace(/&/g, '&amp;')
6169
+ .replace(/</g, '&lt;')
6170
+ .replace(/>/g, '&gt;')
6171
+ .replace(/"/g, '&quot;');
6172
+ }
6173
+ static STYLE_CONTENT = `
6174
+ .ui-tmpl__var {
6175
+ border-radius: 0.125rem;
6176
+ }
6177
+ .ui-tmpl__var--resolved {
6178
+ color: var(--ui-tmpl-resolved-color, var(--ui-success));
6179
+ background: var(--ui-tmpl-resolved-bg, color-mix(in srgb, var(--ui-success) 12%, transparent));
6180
+ }
6181
+ .ui-tmpl__var--unset {
6182
+ color: var(--ui-tmpl-unset-color, var(--ui-warning));
6183
+ background: var(--ui-tmpl-unset-bg, color-mix(in srgb, var(--ui-warning) 12%, transparent));
6184
+ }
6185
+ .ui-tmpl__var--unknown {
6186
+ color: var(--ui-tmpl-unknown-color, var(--ui-danger));
6187
+ background: var(--ui-tmpl-unknown-bg, color-mix(in srgb, var(--ui-danger) 12%, transparent));
6188
+ }
6189
+ `;
6190
+ injectStyles() {
6191
+ const styleId = 'ui-tmpl-styles';
6192
+ let existing = document.getElementById(styleId);
6193
+ // Always replace to handle HMR / version upgrades
6194
+ if (existing) {
6195
+ existing.textContent = TemplateInputComponent.STYLE_CONTENT;
6196
+ return;
6197
+ }
6198
+ const style = this.renderer.createElement('style');
6199
+ this.renderer.setProperty(style, 'id', styleId);
6200
+ this.renderer.setProperty(style, 'textContent', TemplateInputComponent.STYLE_CONTENT);
6201
+ this.renderer.appendChild(document.head, style);
6202
+ }
6203
+ portalPopover() {
6204
+ const el = this.popoverRef.nativeElement;
6205
+ document.body.appendChild(el);
6206
+ el.style.display = 'block';
6207
+ this.isPortaled = true;
6208
+ requestAnimationFrame(() => this.updatePopoverPosition());
6209
+ this.addPositionListeners();
6210
+ }
6211
+ unportalPopover() {
6212
+ if (!this.isPortaled)
6213
+ return;
6214
+ const el = this.popoverRef.nativeElement;
6215
+ el.style.display = '';
6216
+ el.style.position = '';
6217
+ el.style.top = '';
6218
+ el.style.bottom = '';
6219
+ el.style.left = '';
6220
+ el.style.zIndex = '';
6221
+ this.hostRef.nativeElement.appendChild(el);
6222
+ this.isPortaled = false;
6223
+ this.currentSpanRect = null;
6224
+ this.removePositionListeners();
6225
+ }
6226
+ updatePopoverPosition() {
6227
+ const el = this.popoverRef.nativeElement;
6228
+ const spanRect = this.getCurrentSpanRect() ?? this.currentSpanRect;
6229
+ if (!spanRect)
6230
+ return;
6231
+ this.currentSpanRect = spanRect;
6232
+ const gap = 6;
6233
+ const edgePadding = 8;
6234
+ const spaceAbove = spanRect.top;
6235
+ const spaceBelow = window.innerHeight - spanRect.bottom;
6236
+ const popoverHeight = el.offsetHeight;
6237
+ const above = spaceAbove >= popoverHeight + gap || spaceAbove >= spaceBelow;
6238
+ this.openAbove.set(above);
6239
+ el.style.position = 'fixed';
6240
+ el.style.zIndex = '10000';
6241
+ if (above) {
6242
+ el.style.top = '';
6243
+ el.style.bottom = `${window.innerHeight - spanRect.top + gap}px`;
6244
+ }
6245
+ else {
6246
+ el.style.top = `${spanRect.bottom + gap}px`;
6247
+ el.style.bottom = '';
6248
+ }
6249
+ // Horizontal: center on span, clamp to viewport
6250
+ const centerX = spanRect.left + spanRect.width / 2;
6251
+ const popoverWidth = el.offsetWidth;
6252
+ let left = centerX - popoverWidth / 2;
6253
+ left = Math.max(edgePadding, Math.min(left, window.innerWidth - popoverWidth - edgePadding));
6254
+ el.style.left = `${left}px`;
6255
+ }
6256
+ getCurrentSpanRect() {
6257
+ const mirrorEl = this.mirrorRef()?.nativeElement;
6258
+ if (!mirrorEl)
6259
+ return null;
6260
+ const varKey = this.popoverVarKey();
6261
+ if (!varKey)
6262
+ return null;
6263
+ const spans = mirrorEl.querySelectorAll('.ui-tmpl__var');
6264
+ for (const span of spans) {
6265
+ const text = (span.textContent || '').replace(/^\{\{|\}\}$/g, '');
6266
+ if (text === varKey) {
6267
+ return span.getBoundingClientRect();
6268
+ }
6269
+ }
6270
+ return null;
6271
+ }
6272
+ onPositionUpdate = () => {
6273
+ if (this.isPortaled && this.popoverVisible()) {
6274
+ this.updatePopoverPosition();
6275
+ }
6276
+ };
6277
+ addPositionListeners() {
6278
+ window.addEventListener('scroll', this.onPositionUpdate, true);
6279
+ window.addEventListener('resize', this.onPositionUpdate);
6280
+ this.positionCleanup = () => {
6281
+ window.removeEventListener('scroll', this.onPositionUpdate, true);
6282
+ window.removeEventListener('resize', this.onPositionUpdate);
6283
+ };
6284
+ }
6285
+ removePositionListeners() {
6286
+ if (this.positionCleanup) {
6287
+ this.positionCleanup();
6288
+ this.positionCleanup = null;
6289
+ }
6290
+ }
6291
+ ngOnDestroy() {
6292
+ this.cancelHide();
6293
+ // Remove from body if still portaled
6294
+ if (this.isPortaled) {
6295
+ const el = this.popoverRef.nativeElement;
6296
+ el.remove();
6297
+ this.removePositionListeners();
6298
+ this.isPortaled = false;
6299
+ }
6300
+ }
6301
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TemplateInputComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
6302
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: TemplateInputComponent, isStandalone: true, selector: "ui-template-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, variables: { classPropertyName: "variables", publicName: "variables", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { value: "valueChange", variables: "variablesChange", variableHover: "variableHover" }, queries: [{ propertyName: "popoverTemplate", first: true, predicate: VariablePopoverDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "mirrorRef", first: true, predicate: ["mirror"], descendants: true, isSignal: true }, { propertyName: "inputRef", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"ui-template-input-wrapper\"\n [class.ui-template-input-wrapper--error]=\"error()\"\n [class.ui-template-input-wrapper--disabled]=\"disabled()\"\n>\n @if (label()) {\n <label class=\"ui-template-input__label\" [attr.for]=\"inputId()\">\n {{ label() }}\n @if (required()) {\n <span class=\"ui-template-input__required\">*</span>\n }\n </label>\n }\n <div\n class=\"ui-template-input__container\"\n (mousemove)=\"onMouseMove($event)\"\n (mouseleave)=\"onContainerMouseLeave()\"\n >\n <div\n class=\"ui-template-input__mirror\"\n #mirror\n [innerHTML]=\"highlightedHtml()\"\n ></div>\n <input\n class=\"ui-template-input__input\"\n #inputEl\n [id]=\"inputId()\"\n type=\"text\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [(ngModel)]=\"value\"\n (input)=\"onInput()\"\n (scroll)=\"syncScroll()\"\n (click)=\"syncScroll()\"\n (keydown)=\"onKeyDown()\"\n />\n </div>\n @if (error()) {\n <span class=\"ui-template-input__error\">{{ error() }}</span>\n }\n @if (hint() && !error()) {\n <span class=\"ui-template-input__hint\">{{ hint() }}</span>\n }\n</div>\n\n<div\n #popoverRef\n class=\"ui-tmpl-popover\"\n [class.ui-tmpl-popover--open]=\"popoverVisible()\"\n [class.ui-tmpl-popover--above]=\"openAbove()\"\n [class.ui-tmpl-popover--below]=\"!openAbove()\"\n (mouseenter)=\"onPopoverMouseEnter()\"\n (mouseleave)=\"onPopoverMouseLeave()\"\n>\n @if (popoverVisible()) {\n @if (popoverTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"popoverTemplate()!\"\n [ngTemplateOutletContext]=\"popoverContext()\"\n />\n } @else {\n <span class=\"ui-tmpl-popover__text\">{{ popoverText() }}</span>\n }\n }\n</div>\n", styles: [":host{display:block}.ui-template-input-wrapper{display:flex;flex-direction:column;gap:var(--ui-spacing-xs)}.ui-template-input__label{font-size:var(--ui-font-sm);font-weight:500;color:var(--ui-text)}.ui-template-input__required{color:var(--ui-danger);margin-left:2px}.ui-template-input__container{position:relative;border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);background-color:var(--ui-bg);transition:border-color var(--ui-transition-fast),box-shadow var(--ui-transition-fast);overflow:hidden}.ui-template-input__container:hover{border-color:var(--ui-border-hover)}.ui-template-input__container:focus-within{border-color:var(--ui-border-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-primary) 20%,transparent)}.ui-template-input__mirror{padding:var(--ui-spacing-sm) var(--ui-spacing-md);font-family:inherit;font-size:var(--ui-font-md);color:var(--ui-text);white-space:pre;overflow:hidden;pointer-events:none}.ui-template-input__input{position:absolute;top:0;left:0;width:100%;height:100%;padding:var(--ui-spacing-sm) var(--ui-spacing-md);font-family:inherit;font-size:var(--ui-font-md);color:transparent;caret-color:var(--ui-text);background:transparent;border:none;outline:none}.ui-template-input__input::placeholder{color:var(--ui-text-muted)}.ui-template-input__input:disabled{cursor:not-allowed}.ui-template-input-wrapper--disabled .ui-template-input__container{background-color:var(--ui-bg-secondary)}.ui-template-input-wrapper--disabled .ui-template-input__container:hover{border-color:var(--ui-border)}.ui-template-input-wrapper--disabled .ui-template-input__mirror{color:var(--ui-text-disabled)}.ui-template-input-wrapper--error .ui-template-input__container{border-color:var(--ui-danger)}.ui-template-input-wrapper--error .ui-template-input__container:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-danger) 20%,transparent)}.ui-template-input__error{font-size:var(--ui-font-sm);color:var(--ui-danger)}.ui-template-input__hint{font-size:var(--ui-font-sm);color:var(--ui-text-muted)}.ui-tmpl-popover{display:none;line-height:1.5;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);box-shadow:var(--ui-shadow-lg);opacity:0;transition:opacity var(--ui-transition-fast),transform var(--ui-transition-fast)}.ui-tmpl-popover--open{opacity:1}.ui-tmpl-popover--above{transform:translateY(4px)}.ui-tmpl-popover--above.ui-tmpl-popover--open{transform:translateY(0)}.ui-tmpl-popover--below{transform:translateY(-4px)}.ui-tmpl-popover--below.ui-tmpl-popover--open{transform:translateY(0)}.ui-tmpl-popover__text{display:block;padding:.375rem .625rem;font-size:var(--ui-font-sm);color:var(--ui-text);white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6303
+ }
6304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TemplateInputComponent, decorators: [{
6305
+ type: Component,
6306
+ args: [{ selector: 'ui-template-input', standalone: true, imports: [FormsModule, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"ui-template-input-wrapper\"\n [class.ui-template-input-wrapper--error]=\"error()\"\n [class.ui-template-input-wrapper--disabled]=\"disabled()\"\n>\n @if (label()) {\n <label class=\"ui-template-input__label\" [attr.for]=\"inputId()\">\n {{ label() }}\n @if (required()) {\n <span class=\"ui-template-input__required\">*</span>\n }\n </label>\n }\n <div\n class=\"ui-template-input__container\"\n (mousemove)=\"onMouseMove($event)\"\n (mouseleave)=\"onContainerMouseLeave()\"\n >\n <div\n class=\"ui-template-input__mirror\"\n #mirror\n [innerHTML]=\"highlightedHtml()\"\n ></div>\n <input\n class=\"ui-template-input__input\"\n #inputEl\n [id]=\"inputId()\"\n type=\"text\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [(ngModel)]=\"value\"\n (input)=\"onInput()\"\n (scroll)=\"syncScroll()\"\n (click)=\"syncScroll()\"\n (keydown)=\"onKeyDown()\"\n />\n </div>\n @if (error()) {\n <span class=\"ui-template-input__error\">{{ error() }}</span>\n }\n @if (hint() && !error()) {\n <span class=\"ui-template-input__hint\">{{ hint() }}</span>\n }\n</div>\n\n<div\n #popoverRef\n class=\"ui-tmpl-popover\"\n [class.ui-tmpl-popover--open]=\"popoverVisible()\"\n [class.ui-tmpl-popover--above]=\"openAbove()\"\n [class.ui-tmpl-popover--below]=\"!openAbove()\"\n (mouseenter)=\"onPopoverMouseEnter()\"\n (mouseleave)=\"onPopoverMouseLeave()\"\n>\n @if (popoverVisible()) {\n @if (popoverTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"popoverTemplate()!\"\n [ngTemplateOutletContext]=\"popoverContext()\"\n />\n } @else {\n <span class=\"ui-tmpl-popover__text\">{{ popoverText() }}</span>\n }\n }\n</div>\n", styles: [":host{display:block}.ui-template-input-wrapper{display:flex;flex-direction:column;gap:var(--ui-spacing-xs)}.ui-template-input__label{font-size:var(--ui-font-sm);font-weight:500;color:var(--ui-text)}.ui-template-input__required{color:var(--ui-danger);margin-left:2px}.ui-template-input__container{position:relative;border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);background-color:var(--ui-bg);transition:border-color var(--ui-transition-fast),box-shadow var(--ui-transition-fast);overflow:hidden}.ui-template-input__container:hover{border-color:var(--ui-border-hover)}.ui-template-input__container:focus-within{border-color:var(--ui-border-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-primary) 20%,transparent)}.ui-template-input__mirror{padding:var(--ui-spacing-sm) var(--ui-spacing-md);font-family:inherit;font-size:var(--ui-font-md);color:var(--ui-text);white-space:pre;overflow:hidden;pointer-events:none}.ui-template-input__input{position:absolute;top:0;left:0;width:100%;height:100%;padding:var(--ui-spacing-sm) var(--ui-spacing-md);font-family:inherit;font-size:var(--ui-font-md);color:transparent;caret-color:var(--ui-text);background:transparent;border:none;outline:none}.ui-template-input__input::placeholder{color:var(--ui-text-muted)}.ui-template-input__input:disabled{cursor:not-allowed}.ui-template-input-wrapper--disabled .ui-template-input__container{background-color:var(--ui-bg-secondary)}.ui-template-input-wrapper--disabled .ui-template-input__container:hover{border-color:var(--ui-border)}.ui-template-input-wrapper--disabled .ui-template-input__mirror{color:var(--ui-text-disabled)}.ui-template-input-wrapper--error .ui-template-input__container{border-color:var(--ui-danger)}.ui-template-input-wrapper--error .ui-template-input__container:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-danger) 20%,transparent)}.ui-template-input__error{font-size:var(--ui-font-sm);color:var(--ui-danger)}.ui-template-input__hint{font-size:var(--ui-font-sm);color:var(--ui-text-muted)}.ui-tmpl-popover{display:none;line-height:1.5;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);box-shadow:var(--ui-shadow-lg);opacity:0;transition:opacity var(--ui-transition-fast),transform var(--ui-transition-fast)}.ui-tmpl-popover--open{opacity:1}.ui-tmpl-popover--above{transform:translateY(4px)}.ui-tmpl-popover--above.ui-tmpl-popover--open{transform:translateY(0)}.ui-tmpl-popover--below{transform:translateY(-4px)}.ui-tmpl-popover--below.ui-tmpl-popover--open{transform:translateY(0)}.ui-tmpl-popover__text{display:block;padding:.375rem .625rem;font-size:var(--ui-font-sm);color:var(--ui-text);white-space:nowrap}\n"] }]
6307
+ }], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }, { type: i0.Output, args: ["valueChange"] }], variables: [{ type: i0.Input, args: [{ isSignal: true, alias: "variables", required: true }] }, { type: i0.Output, args: ["variablesChange"] }], variableHover: [{ type: i0.Output, args: ["variableHover"] }], popoverTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => VariablePopoverDirective), { ...{ read: TemplateRef }, isSignal: true }] }], mirrorRef: [{ type: i0.ViewChild, args: ['mirror', { isSignal: true }] }], inputRef: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], popoverRef: [{
6308
+ type: ViewChild,
6309
+ args: ['popoverRef', { static: true }]
6310
+ }] } });
6311
+
5991
6312
  /*
5992
6313
  * Public API Surface of @m1z23r/ngx-ui
5993
6314
  */
@@ -5997,5 +6318,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
5997
6318
  * Generated bundle index. Do not edit.
5998
6319
  */
5999
6320
 
6000
- export { AccordionComponent, AccordionHeaderDirective, AccordionItemComponent, AlertComponent, BadgeComponent, ButtonComponent, CardComponent, CellTemplateDirective, CellValuePipe, CheckboxComponent, ChipInputComponent, ChipTemplateDirective, CircularProgressComponent, ContentComponent, ContextMenuDirective, DIALOG_DATA, DIALOG_REF, DatepickerComponent, DatetimepickerComponent, DialogRef, DialogService, DropdownComponent, DropdownDividerComponent, DropdownItemComponent, DropdownTriggerDirective, DynamicTabsComponent, FileChooserComponent, FilePreviewPipe, FileSizePipe, FooterComponent, InputComponent, LOADABLE, LoadingDirective, LoadingService, ModalComponent, NavbarComponent, OptionComponent, OptionTemplateDirective, PaginationComponent, ProgressComponent, RadioComponent, RadioGroupComponent, SelectComponent, ShellComponent, SidebarComponent, SidebarService, SidebarToggleComponent, SliderComponent, SpinnerComponent, SplitComponent, SplitPaneComponent, SwitchComponent, TAB_DATA, TAB_REF, TREE_HOST, TabActivePipe, TabComponent, TabIconDirective, TabRef, TableComponent, TabsComponent, TabsService, TextareaComponent, TimepickerComponent, ToastRef, ToastService, TooltipDirective, TreeComponent, TreeNodeComponent, Validators };
6321
+ export { AccordionComponent, AccordionHeaderDirective, AccordionItemComponent, AlertComponent, BadgeComponent, ButtonComponent, CardComponent, CellTemplateDirective, CellValuePipe, CheckboxComponent, ChipInputComponent, ChipTemplateDirective, CircularProgressComponent, ContentComponent, ContextMenuDirective, DIALOG_DATA, DIALOG_REF, DatepickerComponent, DatetimepickerComponent, DialogRef, DialogService, DropdownComponent, DropdownDividerComponent, DropdownItemComponent, DropdownTriggerDirective, DynamicTabsComponent, FileChooserComponent, FilePreviewPipe, FileSizePipe, FooterComponent, InputComponent, LOADABLE, LoadingDirective, LoadingService, ModalComponent, NavbarComponent, OptionComponent, OptionTemplateDirective, PaginationComponent, ProgressComponent, RadioComponent, RadioGroupComponent, SelectComponent, ShellComponent, SidebarComponent, SidebarService, SidebarToggleComponent, SliderComponent, SpinnerComponent, SplitComponent, SplitPaneComponent, SwitchComponent, TAB_DATA, TAB_REF, TREE_HOST, TabActivePipe, TabComponent, TabIconDirective, TabRef, TableComponent, TabsComponent, TabsService, TemplateInputComponent, TextareaComponent, TimepickerComponent, ToastRef, ToastService, TooltipDirective, TreeComponent, TreeNodeComponent, Validators, VariablePopoverDirective };
6001
6322
  //# sourceMappingURL=m1z23r-ngx-ui.mjs.map