@m1z23r/ngx-ui 1.1.30 → 1.1.31
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,220 @@ 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
|
+
// Popover state
|
|
6034
|
+
popoverVisible = signal(false, ...(ngDevMode ? [{ debugName: "popoverVisible" }] : []));
|
|
6035
|
+
popoverTop = signal(0, ...(ngDevMode ? [{ debugName: "popoverTop" }] : []));
|
|
6036
|
+
popoverLeft = signal(0, ...(ngDevMode ? [{ debugName: "popoverLeft" }] : []));
|
|
6037
|
+
popoverText = signal('', ...(ngDevMode ? [{ debugName: "popoverText" }] : []));
|
|
6038
|
+
popoverVarKey = signal('', ...(ngDevMode ? [{ debugName: "popoverVarKey" }] : []));
|
|
6039
|
+
popoverContext = computed(() => {
|
|
6040
|
+
const key = this.popoverVarKey();
|
|
6041
|
+
const vars = this.variables();
|
|
6042
|
+
const entry = vars.find(v => v.key === key);
|
|
6043
|
+
return {
|
|
6044
|
+
$implicit: key,
|
|
6045
|
+
key,
|
|
6046
|
+
value: entry?.value ?? '',
|
|
6047
|
+
state: this.resolveVarState(key, vars),
|
|
6048
|
+
close: () => this.closePopover(),
|
|
6049
|
+
};
|
|
6050
|
+
}, ...(ngDevMode ? [{ debugName: "popoverContext" }] : []));
|
|
6051
|
+
hoveredVar = null;
|
|
6052
|
+
hideTimer = null;
|
|
6053
|
+
constructor(renderer) {
|
|
6054
|
+
this.renderer = renderer;
|
|
6055
|
+
this.injectStyles();
|
|
6056
|
+
}
|
|
6057
|
+
highlightedHtml = computed(() => {
|
|
6058
|
+
const text = this.value();
|
|
6059
|
+
if (!text)
|
|
6060
|
+
return '\u200b';
|
|
6061
|
+
const vars = this.variables();
|
|
6062
|
+
const escaped = this.escapeHtml(text);
|
|
6063
|
+
// Use CSS classes instead of data-* attributes since Angular's
|
|
6064
|
+
// innerHTML sanitizer strips data attributes.
|
|
6065
|
+
return (escaped.replace(/\{\{([^}]+)\}\}/g, (_match, varKey) => {
|
|
6066
|
+
const state = this.resolveVarState(varKey, vars);
|
|
6067
|
+
return `<span class="ui-tmpl__var ui-tmpl__var--${state}">{{${this.escapeHtml(varKey)}}}</span>`;
|
|
6068
|
+
}) + '\u200b');
|
|
6069
|
+
}, ...(ngDevMode ? [{ debugName: "highlightedHtml" }] : []));
|
|
6070
|
+
syncScroll() {
|
|
6071
|
+
const inputEl = this.inputRef()?.nativeElement;
|
|
6072
|
+
const mirrorEl = this.mirrorRef()?.nativeElement;
|
|
6073
|
+
if (inputEl && mirrorEl) {
|
|
6074
|
+
mirrorEl.scrollLeft = inputEl.scrollLeft;
|
|
6075
|
+
}
|
|
6076
|
+
}
|
|
6077
|
+
onInput() {
|
|
6078
|
+
this.syncScroll();
|
|
6079
|
+
}
|
|
6080
|
+
onKeyDown() {
|
|
6081
|
+
requestAnimationFrame(() => this.syncScroll());
|
|
6082
|
+
}
|
|
6083
|
+
onMouseMove(event) {
|
|
6084
|
+
const mirrorEl = this.mirrorRef()?.nativeElement;
|
|
6085
|
+
if (!mirrorEl) {
|
|
6086
|
+
this.scheduleHide();
|
|
6087
|
+
return;
|
|
6088
|
+
}
|
|
6089
|
+
const spans = mirrorEl.querySelectorAll('.ui-tmpl__var');
|
|
6090
|
+
const { clientX, clientY } = event;
|
|
6091
|
+
for (const span of spans) {
|
|
6092
|
+
const rect = span.getBoundingClientRect();
|
|
6093
|
+
if (clientX >= rect.left &&
|
|
6094
|
+
clientX <= rect.right &&
|
|
6095
|
+
clientY >= rect.top &&
|
|
6096
|
+
clientY <= rect.bottom) {
|
|
6097
|
+
// Extract variable key from text content: "{{varKey}}" → "varKey"
|
|
6098
|
+
const varKey = (span.textContent || '').replace(/^\{\{|\}\}$/g, '');
|
|
6099
|
+
this.cancelHide();
|
|
6100
|
+
this.showPopover(varKey, rect);
|
|
6101
|
+
return;
|
|
6102
|
+
}
|
|
6103
|
+
}
|
|
6104
|
+
this.scheduleHide();
|
|
6105
|
+
}
|
|
6106
|
+
onContainerMouseLeave() {
|
|
6107
|
+
this.scheduleHide();
|
|
6108
|
+
}
|
|
6109
|
+
onPopoverMouseEnter() {
|
|
6110
|
+
this.cancelHide();
|
|
6111
|
+
}
|
|
6112
|
+
onPopoverMouseLeave() {
|
|
6113
|
+
this.scheduleHide();
|
|
6114
|
+
}
|
|
6115
|
+
resolveVarState(varKey, vars) {
|
|
6116
|
+
const entry = vars.find(v => v.key === varKey);
|
|
6117
|
+
if (!entry)
|
|
6118
|
+
return 'unknown';
|
|
6119
|
+
return entry.value ? 'resolved' : 'unset';
|
|
6120
|
+
}
|
|
6121
|
+
showPopover(varKey, spanRect) {
|
|
6122
|
+
if (this.hoveredVar !== varKey) {
|
|
6123
|
+
this.hoveredVar = varKey;
|
|
6124
|
+
this.variableHover.emit(varKey);
|
|
6125
|
+
}
|
|
6126
|
+
const vars = this.variables();
|
|
6127
|
+
const entry = vars.find(v => v.key === varKey);
|
|
6128
|
+
this.popoverVarKey.set(varKey);
|
|
6129
|
+
this.popoverText.set(entry ? (entry.value || varKey) : varKey);
|
|
6130
|
+
this.popoverTop.set(spanRect.top);
|
|
6131
|
+
this.popoverLeft.set(spanRect.left + spanRect.width / 2);
|
|
6132
|
+
this.popoverVisible.set(true);
|
|
6133
|
+
}
|
|
6134
|
+
closePopover() {
|
|
6135
|
+
this.cancelHide();
|
|
6136
|
+
this.popoverVisible.set(false);
|
|
6137
|
+
if (this.hoveredVar !== null) {
|
|
6138
|
+
this.hoveredVar = null;
|
|
6139
|
+
this.variableHover.emit(null);
|
|
6140
|
+
}
|
|
6141
|
+
}
|
|
6142
|
+
scheduleHide() {
|
|
6143
|
+
if (this.hideTimer)
|
|
6144
|
+
return;
|
|
6145
|
+
this.hideTimer = setTimeout(() => {
|
|
6146
|
+
this.hideTimer = null;
|
|
6147
|
+
this.closePopover();
|
|
6148
|
+
}, 200);
|
|
6149
|
+
}
|
|
6150
|
+
cancelHide() {
|
|
6151
|
+
if (this.hideTimer) {
|
|
6152
|
+
clearTimeout(this.hideTimer);
|
|
6153
|
+
this.hideTimer = null;
|
|
6154
|
+
}
|
|
6155
|
+
}
|
|
6156
|
+
escapeHtml(text) {
|
|
6157
|
+
return text
|
|
6158
|
+
.replace(/&/g, '&')
|
|
6159
|
+
.replace(/</g, '<')
|
|
6160
|
+
.replace(/>/g, '>')
|
|
6161
|
+
.replace(/"/g, '"');
|
|
6162
|
+
}
|
|
6163
|
+
static STYLE_CONTENT = `
|
|
6164
|
+
.ui-tmpl__var {
|
|
6165
|
+
border-radius: 0.125rem;
|
|
6166
|
+
}
|
|
6167
|
+
.ui-tmpl__var--resolved {
|
|
6168
|
+
color: var(--ui-tmpl-resolved-color, var(--ui-success));
|
|
6169
|
+
background: var(--ui-tmpl-resolved-bg, color-mix(in srgb, var(--ui-success) 12%, transparent));
|
|
6170
|
+
}
|
|
6171
|
+
.ui-tmpl__var--unset {
|
|
6172
|
+
color: var(--ui-tmpl-unset-color, var(--ui-warning));
|
|
6173
|
+
background: var(--ui-tmpl-unset-bg, color-mix(in srgb, var(--ui-warning) 12%, transparent));
|
|
6174
|
+
}
|
|
6175
|
+
.ui-tmpl__var--unknown {
|
|
6176
|
+
color: var(--ui-tmpl-unknown-color, var(--ui-danger));
|
|
6177
|
+
background: var(--ui-tmpl-unknown-bg, color-mix(in srgb, var(--ui-danger) 12%, transparent));
|
|
6178
|
+
}
|
|
6179
|
+
`;
|
|
6180
|
+
injectStyles() {
|
|
6181
|
+
const styleId = 'ui-tmpl-styles';
|
|
6182
|
+
let existing = document.getElementById(styleId);
|
|
6183
|
+
// Always replace to handle HMR / version upgrades
|
|
6184
|
+
if (existing) {
|
|
6185
|
+
existing.textContent = TemplateInputComponent.STYLE_CONTENT;
|
|
6186
|
+
return;
|
|
6187
|
+
}
|
|
6188
|
+
const style = this.renderer.createElement('style');
|
|
6189
|
+
this.renderer.setProperty(style, 'id', styleId);
|
|
6190
|
+
this.renderer.setProperty(style, 'textContent', TemplateInputComponent.STYLE_CONTENT);
|
|
6191
|
+
this.renderer.appendChild(document.head, style);
|
|
6192
|
+
}
|
|
6193
|
+
ngOnDestroy() {
|
|
6194
|
+
this.cancelHide();
|
|
6195
|
+
this.closePopover();
|
|
6196
|
+
}
|
|
6197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TemplateInputComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
6198
|
+
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 }], 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@if (popoverVisible()) {\n <div\n class=\"ui-tmpl-popover\"\n [style.top.px]=\"popoverTop()\"\n [style.left.px]=\"popoverLeft()\"\n (mouseenter)=\"onPopoverMouseEnter()\"\n (mouseleave)=\"onPopoverMouseLeave()\"\n >\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 </div>\n}\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);line-height:1.5;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);line-height:1.5;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{position:fixed;z-index:10000;transform:translate(-50%,-100%) translateY(-6px);background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);box-shadow:var(--ui-shadow-lg);animation:ui-tmpl-popover-in .15s ease}.ui-tmpl-popover__text{display:block;padding:.375rem .625rem;font-size:var(--ui-font-sm);color:var(--ui-text);white-space:nowrap}@keyframes ui-tmpl-popover-in{0%{opacity:0;transform:translate(-50%,-100%) translateY(-2px)}to{opacity:1;transform:translate(-50%,-100%) translateY(-6px)}}\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 });
|
|
6199
|
+
}
|
|
6200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TemplateInputComponent, decorators: [{
|
|
6201
|
+
type: Component,
|
|
6202
|
+
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@if (popoverVisible()) {\n <div\n class=\"ui-tmpl-popover\"\n [style.top.px]=\"popoverTop()\"\n [style.left.px]=\"popoverLeft()\"\n (mouseenter)=\"onPopoverMouseEnter()\"\n (mouseleave)=\"onPopoverMouseLeave()\"\n >\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 </div>\n}\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);line-height:1.5;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);line-height:1.5;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{position:fixed;z-index:10000;transform:translate(-50%,-100%) translateY(-6px);background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);box-shadow:var(--ui-shadow-lg);animation:ui-tmpl-popover-in .15s ease}.ui-tmpl-popover__text{display:block;padding:.375rem .625rem;font-size:var(--ui-font-sm);color:var(--ui-text);white-space:nowrap}@keyframes ui-tmpl-popover-in{0%{opacity:0;transform:translate(-50%,-100%) translateY(-2px)}to{opacity:1;transform:translate(-50%,-100%) translateY(-6px)}}\n"] }]
|
|
6203
|
+
}], 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 }] }] } });
|
|
6204
|
+
|
|
5991
6205
|
/*
|
|
5992
6206
|
* Public API Surface of @m1z23r/ngx-ui
|
|
5993
6207
|
*/
|
|
@@ -5997,5 +6211,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
5997
6211
|
* Generated bundle index. Do not edit.
|
|
5998
6212
|
*/
|
|
5999
6213
|
|
|
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 };
|
|
6214
|
+
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
6215
|
//# sourceMappingURL=m1z23r-ngx-ui.mjs.map
|