boruto-xrmui 1.22.1 → 1.22.3

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.
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { ViewEncapsulation, ChangeDetectionStrategy, Component, effect, input, output, HostListener, Directive, inject, ElementRef, Input, signal, ChangeDetectorRef, ViewChild, NgModule, Injectable, computed, DestroyRef, model, ViewChildren, EventEmitter, Output } from '@angular/core';
3
- import { NgClass, NgStyle } from '@angular/common';
3
+ import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';
4
4
  import { NativeDateAdapter } from '@angular/material/core';
5
5
  import { MatIcon, MatIconModule } from '@angular/material/icon';
6
6
  import { MatBadge } from '@angular/material/badge';
@@ -1607,6 +1607,8 @@ class XrmuiInput {
1607
1607
  return false;
1608
1608
  }, /* @ts-ignore */
1609
1609
  ...(ngDevMode ? [{ debugName: "autoopenonblank" }] : /* istanbul ignore next */ []));
1610
+ itemTemplate = input(/* @ts-ignore */
1611
+ ...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
1610
1612
  decimalsUsed = output();
1611
1613
  onEnter = output();
1612
1614
  toolIcon = input(null, /* @ts-ignore */
@@ -1730,10 +1732,21 @@ class XrmuiInput {
1730
1732
  effect(() => {
1731
1733
  const ap = this.autocomplete();
1732
1734
  if (ap) {
1733
- this.itemlist.set(ap.items());
1735
+ this.bindItems(ap.items());
1734
1736
  }
1735
1737
  });
1736
1738
  }
1739
+ lastBind = [];
1740
+ bindItems(values) {
1741
+ const same = values.length === this.lastBind.length &&
1742
+ values.every(v => this.lastBind.includes(v));
1743
+ if (same) {
1744
+ return;
1745
+ }
1746
+ this.lastBind = values;
1747
+ this.itemlist.set(values);
1748
+ this.expandedItems = new Map();
1749
+ }
1737
1750
  pickDate(d) {
1738
1751
  this.shadowDate.set(d.value);
1739
1752
  this.value.set(d.value);
@@ -1792,6 +1805,11 @@ class XrmuiInput {
1792
1805
  onBlur() {
1793
1806
  this.handleNumber();
1794
1807
  this.blurThead = setTimeout(() => {
1808
+ if (this.expanding) {
1809
+ this.expanding = false;
1810
+ this.focusMe(undefined, false);
1811
+ return;
1812
+ }
1795
1813
  this.hasfocus.set(false);
1796
1814
  this.showitems.set(false);
1797
1815
  const sel = this.selected();
@@ -1841,6 +1859,10 @@ class XrmuiInput {
1841
1859
  onenter(e) {
1842
1860
  e.stopPropagation();
1843
1861
  e.preventDefault();
1862
+ if (this.current && this.current.expandable == true && !this.isexpanded(this.current)) {
1863
+ this.expand(e, this.current);
1864
+ return;
1865
+ }
1844
1866
  this.onEnter.emit();
1845
1867
  if (this.showitems() == false) {
1846
1868
  this.searchbyname();
@@ -1945,7 +1967,7 @@ class XrmuiInput {
1945
1967
  });
1946
1968
  }
1947
1969
  }
1948
- focusMe(e) {
1970
+ focusMe(e, clicked = true) {
1949
1971
  e?.stopPropagation();
1950
1972
  if (!this.disabled() && this.searchElement != null) {
1951
1973
  this.searchElement.nativeElement.focus();
@@ -1956,7 +1978,9 @@ class XrmuiInput {
1956
1978
  if (!this.disabled() && this.datefieldElement != null) {
1957
1979
  this.datefieldElement.nativeElement.focus();
1958
1980
  }
1959
- this.click.emit();
1981
+ if (clicked) {
1982
+ this.click.emit();
1983
+ }
1960
1984
  }
1961
1985
  toolClicked(e) {
1962
1986
  e.stopPropagation();
@@ -2015,6 +2039,37 @@ class XrmuiInput {
2015
2039
  }
2016
2040
  }
2017
2041
  }
2042
+ expandedItems = new Map();
2043
+ expanding = false;
2044
+ async expand(ev, e) {
2045
+ this.expanding = true;
2046
+ ev.stopImmediatePropagation();
2047
+ if (this.expandedItems.get(e)) {
2048
+ return;
2049
+ }
2050
+ if (e.expand) {
2051
+ const children = await e.expand();
2052
+ if (!children || children.length == 0) {
2053
+ e.expandable = false;
2054
+ return;
2055
+ }
2056
+ const nextlist = [];
2057
+ for (const n of this.itemlist()) {
2058
+ nextlist.push(n);
2059
+ if (n == e) {
2060
+ children.forEach(c => nextlist.push(c));
2061
+ }
2062
+ }
2063
+ this.expandedItems.set(e, children);
2064
+ this.itemlist.set(nextlist);
2065
+ }
2066
+ }
2067
+ isexpanded(e) {
2068
+ return this.expandedItems.get(e) != undefined;
2069
+ }
2070
+ expandedvalues(e) {
2071
+ return this.expandedItems.get(e) ?? null;
2072
+ }
2018
2073
  setNumberValueString() {
2019
2074
  const v = Number(this.value());
2020
2075
  let decimals = this.decimals();
@@ -2029,11 +2084,11 @@ class XrmuiInput {
2029
2084
  }
2030
2085
  }
2031
2086
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: XrmuiInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
2032
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: XrmuiInput, isStandalone: true, selector: "xrmui-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, _shortLabel: { classPropertyName: "_shortLabel", publicName: "short-label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, _showlock: { classPropertyName: "_showlock", publicName: "showlock", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, setfocus: { classPropertyName: "setfocus", publicName: "setfocus", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, optionsetvalue: { classPropertyName: "optionsetvalue", publicName: "optionsetvalue", isSignal: true, isRequired: false, transformFunction: null }, entityreference: { classPropertyName: "entityreference", publicName: "entityreference", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, validate: { classPropertyName: "validate", publicName: "validate", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, resizeable: { classPropertyName: "resizeable", publicName: "resizeable", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, notdark: { classPropertyName: "notdark", publicName: "notdark", isSignal: true, isRequired: false, transformFunction: null }, _autoopenonblank: { classPropertyName: "_autoopenonblank", publicName: "autoopenonblank", isSignal: true, isRequired: false, transformFunction: null }, nullable: { classPropertyName: "nullable", publicName: "nullable", isSignal: true, isRequired: false, transformFunction: null }, toolIcon: { classPropertyName: "toolIcon", publicName: "toolIcon", isSignal: true, isRequired: false, transformFunction: null }, numberoflines: { classPropertyName: "numberoflines", publicName: "numberoflines", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", setfocus: "setfocusChange", selected: "selectedChange", onselect: "onselect", validate: "validateChange", onfocusEvent: "focus", onblurEvent: "blur", click: "click", decimalsUsed: "decimalsUsed", onEnter: "onEnter", toolClick: "toolClick" }, viewQueries: [{ propertyName: "searchElement", first: true, predicate: ["inputfield"], descendants: true }, { propertyName: "textareaElement", first: true, predicate: ["textareafield"], descendants: true }, { propertyName: "datefieldElement", first: true, predicate: ["datefield"], descendants: true }, { propertyName: "options", predicate: ["option"], descendants: true }], ngImport: i0, template: "@if (showitems()) {\r\n <div class=\"autocomplete\" [ngClass]=\"{ nolabel: (!label() || label().length == 0 || shortLabel() == 'above'), shortLabel: shortLabel() == true, notdark: notdark() }\">\r\n @if (itemlist().length == 0) {\r\n <div class=\"element\"><div class=\"item\">Ingen fundet</div>div></div>\r\n }\r\n @for (elm of itemlist(); track elm) {\r\n <div #option class=\"element\" [ngClass]=\"{ current: current == elm, selectable: !elm.disabled }\" (click)=\"select($event, elm)\">\r\n <div class=\"item\">{{ elm.name }}</div>\r\n </div>\r\n }\r\n </div>\r\n}\r\n@if (label() != '' && label().length > 0 && shortLabel() != 'above') {\r\n<div class=\"label\" [ngClass]=\"{ short: shortLabel() == true }\" (click)=\"focusMe($event)\">{{ label() }}</div>\r\n}\r\n@if ((label() != '' || type() == 'number') && showlock()) {\r\n<div class=\"locked\">\r\n @if (required() && shortLabel() != 'above') {\r\n <div style=\"display: inline-block;height: 10px;color: red; position: relative; top: -8px; right: 0\">*</div>\r\n }\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n</div>\r\n}\r\n<div class=\"input\" [ngClass]=\"{ focus: hasfocus(), error: error(), textarea: numberoflines() > 1, labelabove: shortLabel() == 'above', toolicon: toolIcon()?.length ?? 0 > 0 }\" (click)=\"focusMe($event)\">\r\n @if (shortLabel() == 'above' && label() != '') {\r\n <div class=\"label-above\">\r\n {{ label() }}\r\n @if (required()) {<span style=\"color: red\">&nbsp;*</span>}\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() != 'date' && validate() != 'checkbox' && !isselect()) {\r\n <input \r\n #inputfield \r\n [ngClass]=\"inputclasses()\"\r\n [type]=\"type() != 'password'? 'text' : 'password'\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"\r\n [maxlength]=\"maxlength()\"/>\r\n }\r\n @if (validate() == 'checkbox') {\r\n <div class=\"checkbox\">\r\n <input \r\n type=\"checkbox\"\r\n class=\"text checkbox\"\r\n [(ngModel)]=\"shadowBool\"\r\n [disabled]=\"disabled()\"\r\n (ngModelChange)=\"onCheckboxToggle()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlurCheckbox()\"\r\n />\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() == 'date' && !isselect()) {\r\n <input\r\n #datefield\r\n class=\"text datepicker\"\r\n [matDatepicker]=\"picker\"\r\n [value]=\"shadowDate()\"\r\n (dateChange)=\"pickDate($event)\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlurDate()\"/>\r\n @if (!disabled()) {\r\n <mat-icon \r\n class=\"calendar-icon\" \r\n fontSet=\"material-symbols-outlined\"\r\n (click)=\"picker.open()\">calendar_month</mat-icon>\r\n }\r\n <mat-datepicker #picker></mat-datepicker>\r\n }\r\n @if (numberoflines() > 1 && !isselect()) {\r\n <textarea\r\n #textareafield\r\n [maxlength]=\"maxlength()\"\r\n [rows]=\"numberoflines()\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n [ngClass]=\"{ noresize: !resizeable() }\"\r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"></textarea>\r\n }\r\n @let options = selectable();\r\n @if (options && options.length > 0) {\r\n <select \r\n (change)=\"setchoice($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n [disabled]=\"disabled()\">\r\n @for (option of options; track option) {\r\n <option [value]=\"option.id\" [selected]=\"option == selected()\">{{ option.name }}</option>\r\n }\r\n </select>\r\n @if (!disabled()) {\r\n <mat-icon class=\"dropdown\" fontSet=\"material-symbols-outlined\">arrow_drop_down</mat-icon>\r\n }\r\n }\r\n @let ti = toolIcon();\r\n @if (!disabled() && ti && ti.length > 0) {\r\n <mat-icon class=\"toolicon\" fontSet=\"material-symbols-outlined\" (click)=\"toolClicked($event)\">{{ ti }}</mat-icon>\r\n }\r\n</div>\r\n\r\n@if (label() == '' && type() != 'number' && showlock()) {\r\n <div class=\"locked\" style=\"text-align: left;\">\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n </div>\r\n}\r\n\r\n@if (info()) {<div class=\"info\" [title]=\"info()\"><mat-icon class=\"info\">info</mat-icon></div>}\r\n", styles: [":host{position:relative;display:flex;margin-bottom:10px}:host div.autocomplete{position:absolute;z-index:100;top:37px;left:215px;right:0;background-color:red;min-height:40px;background-color:#fff;color:#000;border:solid;border-width:1px 1px 1px 1px;border-color:#d3d3d3;border-radius:4px;padding:5px;max-height:200px;overflow-x:hidden;overflow-y:auto}:host div.autocomplete.nolabel{left:0}:host div.autocomplete.shortLabel{left:124px}:host div.autocomplete div.element.selectable{cursor:pointer}@media(prefers-color-scheme:dark){:host div.autocomplete{background-color:#000;color:#fff}}@media(prefers-color-scheme:dark){:host div.autocomplete.notdark{background-color:#fff;color:#000}}:host div.autocomplete div.element{margin:5px;padding:5px;display:flex;border:solid;border-width:0 0 1px 0;border-color:#d3d3d3;font-size:14px;color:gray}:host div.autocomplete div.element.current{border-color:#0f6cbd;color:#000}:host div.autocomplete div.element div.item{flex-grow:1}:host div.label{width:180px;min-width:180px;max-height:180px;height:32px;line-height:32px}:host div.label.short{width:90px;min-width:90px}:host div.locked{width:30px;min-width:30px;max-width:30px;height:32px;line-height:32px;text-align:right;padding-right:3px}:host div.input{flex-grow:1;height:32px;line-height:32px;background-color:#e6e8e8;border-radius:3px;margin:0;padding:0;border:solid;border-width:0 0 3px 0;border-color:transparent}:host div.input.labelabove{height:48px}:host div.input.labelabove div.label-above{font-size:12px;line-height:12px;width:100%;padding-left:15px;padding-top:5px;color:gray}:host div.input.focus.labelabove div.label-above{color:#0f6cbd}:host div.input.textarea{height:inherit}:host div.info{width:30px}:host div textarea{background-color:#e6e8e8;border-radius:3px;margin:0;padding:10px 15px;border:solid;border-width:0 0 3px 0;border-color:transparent;width:100%;box-sizing:border-box}:host div.input.focus,:host div.textarea.focus,:host div.select.focus{border-color:#0f6cbd}:host div.input.error,:host div.input.focus.error,:host div.select.focus.error{border-color:red;color:red}:host input{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:100%;box-sizing:border-box}:host input.number{text-align:right}:host select{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:calc(100% - 10px);box-sizing:border-box}:host input.datepicker{width:calc(100% - 35px)}:host div.input>div.checkbox{margin-left:15px;margin-top:5px}:host div.input.above>div.checkbox{margin-top:2px}:host input.checkbox{width:15px;height:15px}:host div.input.toolicon input{width:calc(100% - 35px)}@media(prefers-color-scheme:dark){:host input{color:#000}:host input:disabled{color:#5f615f}}:host input.number{text-align:right;padding-right:15px;padding-left:0}:host *:focus{outline:none}:host mat-icon{color:#d3d3d3;font-size:12px;position:relative;top:5px;width:12px}:host textarea.noresize{resize:none}:host mat-icon.info{font-size:30px;width:30px;height:30px;color:gray}:host mat-icon.info:hover{color:#000}:host mat-icon.calendar-icon{font-size:25px;width:25px;height:25px;color:#a9a9a9}:host mat-icon.toolicon{cursor:pointer;font-size:25px;width:25px;height:25px;color:gray}:host mat-icon.dropdown{position:absolute;right:10px;top:4px;font-size:25px;width:25px;height:25px;color:gray;pointer-events:none}:host div.input.labelabove mat-icon.dropdown{top:12px}:host div.input.labelabove mat-icon.toolicon,:host div.input.labelabove mat-icon.calendar-icon{position:relative;top:-5px}:host select{appearance:none;-webkit-appearance:none;-moz-appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: MatCheckboxModule }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2087
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: XrmuiInput, isStandalone: true, selector: "xrmui-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, _shortLabel: { classPropertyName: "_shortLabel", publicName: "short-label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, _showlock: { classPropertyName: "_showlock", publicName: "showlock", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, setfocus: { classPropertyName: "setfocus", publicName: "setfocus", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, optionsetvalue: { classPropertyName: "optionsetvalue", publicName: "optionsetvalue", isSignal: true, isRequired: false, transformFunction: null }, entityreference: { classPropertyName: "entityreference", publicName: "entityreference", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, validate: { classPropertyName: "validate", publicName: "validate", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, resizeable: { classPropertyName: "resizeable", publicName: "resizeable", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, notdark: { classPropertyName: "notdark", publicName: "notdark", isSignal: true, isRequired: false, transformFunction: null }, _autoopenonblank: { classPropertyName: "_autoopenonblank", publicName: "autoopenonblank", isSignal: true, isRequired: false, transformFunction: null }, nullable: { classPropertyName: "nullable", publicName: "nullable", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, toolIcon: { classPropertyName: "toolIcon", publicName: "toolIcon", isSignal: true, isRequired: false, transformFunction: null }, numberoflines: { classPropertyName: "numberoflines", publicName: "numberoflines", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", setfocus: "setfocusChange", selected: "selectedChange", onselect: "onselect", validate: "validateChange", onfocusEvent: "focus", onblurEvent: "blur", click: "click", decimalsUsed: "decimalsUsed", onEnter: "onEnter", toolClick: "toolClick" }, viewQueries: [{ propertyName: "searchElement", first: true, predicate: ["inputfield"], descendants: true }, { propertyName: "textareaElement", first: true, predicate: ["textareafield"], descendants: true }, { propertyName: "datefieldElement", first: true, predicate: ["datefield"], descendants: true }, { propertyName: "options", predicate: ["option"], descendants: true }], ngImport: i0, template: "@if (showitems()) {\r\n <div class=\"autocomplete\" [ngClass]=\"{ nolabel: (!label() || label().length == 0 || shortLabel() == 'above'), shortLabel: shortLabel() == true, notdark: notdark() }\">\r\n @if (itemlist().length == 0) {\r\n <div class=\"element\"><div class=\"item\">Ingen fundet</div>div></div>\r\n }\r\n @for (elm of itemlist(); track elm) {\r\n <div #option class=\"element\" [ngClass]=\"{ current: current == elm, selectable: !elm.disabled }\" (click)=\"select($event, elm)\">\r\n <div class=\"item\">\r\n @if (itemTemplate(); as template) {\r\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: elm }\"></ng-container>\r\n } @else {\r\n {{ elm.name }}\r\n }\r\n </div>\r\n @if (elm.expandable == true) {\r\n <div class=\"icon\" (click)=\"expand($event, elm)\">\r\n <xrmui-icon icon=\"arrow_drop_down\"></xrmui-icon>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n@if (label() != '' && label().length > 0 && shortLabel() != 'above') {\r\n<div class=\"label\" [ngClass]=\"{ short: shortLabel() == true }\" (click)=\"focusMe($event)\">{{ label() }}</div>\r\n}\r\n@if ((label() != '' || type() == 'number') && showlock()) {\r\n<div class=\"locked\">\r\n @if (required() && shortLabel() != 'above') {\r\n <div style=\"display: inline-block;height: 10px;color: red; position: relative; top: -8px; right: 0\">*</div>\r\n }\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n</div>\r\n}\r\n<div class=\"input\" [ngClass]=\"{ focus: hasfocus(), error: error(), textarea: numberoflines() > 1, labelabove: shortLabel() == 'above', toolicon: toolIcon()?.length ?? 0 > 0 }\" (click)=\"focusMe($event)\">\r\n @if (shortLabel() == 'above' && label() != '') {\r\n <div class=\"label-above\">\r\n {{ label() }}\r\n @if (required()) {<span style=\"color: red\">&nbsp;*</span>}\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() != 'date' && validate() != 'checkbox' && !isselect()) {\r\n <input \r\n #inputfield \r\n [ngClass]=\"inputclasses()\"\r\n [type]=\"type() != 'password'? 'text' : 'password'\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"\r\n [maxlength]=\"maxlength()\"/>\r\n }\r\n @if (validate() == 'checkbox') {\r\n <div class=\"checkbox\">\r\n <input \r\n type=\"checkbox\"\r\n class=\"text checkbox\"\r\n [(ngModel)]=\"shadowBool\"\r\n [disabled]=\"disabled()\"\r\n (ngModelChange)=\"onCheckboxToggle()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlurCheckbox()\"\r\n />\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() == 'date' && !isselect()) {\r\n <input\r\n #datefield\r\n class=\"text datepicker\"\r\n [matDatepicker]=\"picker\"\r\n [value]=\"shadowDate()\"\r\n (dateChange)=\"pickDate($event)\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlurDate()\"/>\r\n @if (!disabled()) {\r\n <mat-icon \r\n class=\"calendar-icon\" \r\n fontSet=\"material-symbols-outlined\"\r\n (click)=\"picker.open()\">calendar_month</mat-icon>\r\n }\r\n <mat-datepicker #picker></mat-datepicker>\r\n }\r\n @if (numberoflines() > 1 && !isselect()) {\r\n <textarea\r\n #textareafield\r\n [maxlength]=\"maxlength()\"\r\n [rows]=\"numberoflines()\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n [ngClass]=\"{ noresize: !resizeable() }\"\r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"></textarea>\r\n }\r\n @let options = selectable();\r\n @if (options && options.length > 0) {\r\n <select \r\n (change)=\"setchoice($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n [disabled]=\"disabled()\">\r\n @for (option of options; track option) {\r\n <option [value]=\"option.id\" [selected]=\"option == selected()\">{{ option.name }}</option>\r\n }\r\n </select>\r\n @if (!disabled()) {\r\n <mat-icon class=\"dropdown\" fontSet=\"material-symbols-outlined\">arrow_drop_down</mat-icon>\r\n }\r\n }\r\n @let ti = toolIcon();\r\n @if (!disabled() && ti && ti.length > 0) {\r\n <mat-icon class=\"toolicon\" fontSet=\"material-symbols-outlined\" (click)=\"toolClicked($event)\">{{ ti }}</mat-icon>\r\n }\r\n</div>\r\n\r\n@if (label() == '' && type() != 'number' && showlock()) {\r\n <div class=\"locked\" style=\"text-align: left;\">\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n </div>\r\n}\r\n\r\n@if (info()) {<div class=\"info\" [title]=\"info()\"><mat-icon class=\"info\">info</mat-icon></div>}\r\n", styles: [":host{position:relative;display:flex;margin-bottom:10px}:host div.autocomplete{position:absolute;z-index:100;top:37px;left:215px;right:0;background-color:red;min-height:40px;background-color:#fff;color:#000;border:solid;border-width:1px 1px 1px 1px;border-color:#d3d3d3;border-radius:4px;padding:5px;max-height:200px;overflow-x:hidden;overflow-y:auto}:host div.autocomplete.nolabel{left:0}:host div.autocomplete.shortLabel{left:124px}:host div.autocomplete div.element.selectable{cursor:pointer}@media(prefers-color-scheme:dark){:host div.autocomplete{background-color:#000;color:#fff}}@media(prefers-color-scheme:dark){:host div.autocomplete.notdark{background-color:#fff;color:#000}}:host div.autocomplete div.element{margin:5px;padding:5px;display:flex;border:solid;border-width:0 0 1px 0;border-color:#d3d3d3;font-size:14px;color:gray}:host div.autocomplete div.element.current{border-color:#0f6cbd;color:#000}:host div.autocomplete div.element div.item{flex-grow:1}:host div.label{width:180px;min-width:180px;max-height:180px;height:32px;line-height:32px}:host div.label.short{width:90px;min-width:90px}:host div.locked{width:30px;min-width:30px;max-width:30px;height:32px;line-height:32px;text-align:right;padding-right:3px}:host div.input{flex-grow:1;height:32px;line-height:32px;background-color:#e6e8e8;border-radius:3px;margin:0;padding:0;border:solid;border-width:0 0 3px 0;border-color:transparent}:host div.input.labelabove{height:48px}:host div.input.labelabove div.label-above{font-size:12px;line-height:12px;width:100%;padding-left:15px;padding-top:5px;color:gray}:host div.input.focus.labelabove div.label-above{color:#0f6cbd}:host div.input.textarea{height:inherit}:host div.info{width:30px}:host div textarea{background-color:#e6e8e8;border-radius:3px;margin:0;padding:10px 15px;border:solid;border-width:0 0 3px 0;border-color:transparent;width:100%;box-sizing:border-box}:host div.input.focus,:host div.textarea.focus,:host div.select.focus{border-color:#0f6cbd}:host div.input.error,:host div.input.focus.error,:host div.select.focus.error{border-color:red;color:red}:host input{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:100%;box-sizing:border-box}:host input.number{text-align:right}:host select{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:calc(100% - 10px);box-sizing:border-box}:host input.datepicker{width:calc(100% - 35px)}:host div.input>div.checkbox{margin-left:15px;margin-top:5px}:host div.input.above>div.checkbox{margin-top:2px}:host input.checkbox{width:15px;height:15px}:host div.input.toolicon input{width:calc(100% - 35px)}@media(prefers-color-scheme:dark){:host input{color:#000}:host input:disabled{color:#5f615f}}:host input.number{text-align:right;padding-right:15px;padding-left:0}:host *:focus{outline:none}:host mat-icon{color:#d3d3d3;font-size:12px;position:relative;top:5px;width:12px}:host textarea.noresize{resize:none}:host mat-icon.info{font-size:30px;width:30px;height:30px;color:gray}:host mat-icon.info:hover{color:#000}:host mat-icon.calendar-icon{font-size:25px;width:25px;height:25px;color:#a9a9a9}:host mat-icon.toolicon{cursor:pointer;font-size:25px;width:25px;height:25px;color:gray}:host mat-icon.dropdown{position:absolute;right:10px;top:4px;font-size:25px;width:25px;height:25px;color:gray;pointer-events:none}:host div.input.labelabove mat-icon.dropdown{top:12px}:host div.input.labelabove mat-icon.toolicon,:host div.input.labelabove mat-icon.calendar-icon{position:relative;top:-5px}:host select{appearance:none;-webkit-appearance:none;-moz-appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: XrmuiIcon, selector: "xrmui-icon", inputs: ["icon", "disabled", "type"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2033
2088
  }
2034
2089
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: XrmuiInput, decorators: [{
2035
2090
  type: Component,
2036
- args: [{ selector: 'xrmui-input', changeDetection: ChangeDetectionStrategy.Eager, imports: [FormsModule, NgClass, MatIcon, TextFieldModule, MatDatepickerModule, MatCheckboxModule], template: "@if (showitems()) {\r\n <div class=\"autocomplete\" [ngClass]=\"{ nolabel: (!label() || label().length == 0 || shortLabel() == 'above'), shortLabel: shortLabel() == true, notdark: notdark() }\">\r\n @if (itemlist().length == 0) {\r\n <div class=\"element\"><div class=\"item\">Ingen fundet</div>div></div>\r\n }\r\n @for (elm of itemlist(); track elm) {\r\n <div #option class=\"element\" [ngClass]=\"{ current: current == elm, selectable: !elm.disabled }\" (click)=\"select($event, elm)\">\r\n <div class=\"item\">{{ elm.name }}</div>\r\n </div>\r\n }\r\n </div>\r\n}\r\n@if (label() != '' && label().length > 0 && shortLabel() != 'above') {\r\n<div class=\"label\" [ngClass]=\"{ short: shortLabel() == true }\" (click)=\"focusMe($event)\">{{ label() }}</div>\r\n}\r\n@if ((label() != '' || type() == 'number') && showlock()) {\r\n<div class=\"locked\">\r\n @if (required() && shortLabel() != 'above') {\r\n <div style=\"display: inline-block;height: 10px;color: red; position: relative; top: -8px; right: 0\">*</div>\r\n }\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n</div>\r\n}\r\n<div class=\"input\" [ngClass]=\"{ focus: hasfocus(), error: error(), textarea: numberoflines() > 1, labelabove: shortLabel() == 'above', toolicon: toolIcon()?.length ?? 0 > 0 }\" (click)=\"focusMe($event)\">\r\n @if (shortLabel() == 'above' && label() != '') {\r\n <div class=\"label-above\">\r\n {{ label() }}\r\n @if (required()) {<span style=\"color: red\">&nbsp;*</span>}\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() != 'date' && validate() != 'checkbox' && !isselect()) {\r\n <input \r\n #inputfield \r\n [ngClass]=\"inputclasses()\"\r\n [type]=\"type() != 'password'? 'text' : 'password'\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"\r\n [maxlength]=\"maxlength()\"/>\r\n }\r\n @if (validate() == 'checkbox') {\r\n <div class=\"checkbox\">\r\n <input \r\n type=\"checkbox\"\r\n class=\"text checkbox\"\r\n [(ngModel)]=\"shadowBool\"\r\n [disabled]=\"disabled()\"\r\n (ngModelChange)=\"onCheckboxToggle()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlurCheckbox()\"\r\n />\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() == 'date' && !isselect()) {\r\n <input\r\n #datefield\r\n class=\"text datepicker\"\r\n [matDatepicker]=\"picker\"\r\n [value]=\"shadowDate()\"\r\n (dateChange)=\"pickDate($event)\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlurDate()\"/>\r\n @if (!disabled()) {\r\n <mat-icon \r\n class=\"calendar-icon\" \r\n fontSet=\"material-symbols-outlined\"\r\n (click)=\"picker.open()\">calendar_month</mat-icon>\r\n }\r\n <mat-datepicker #picker></mat-datepicker>\r\n }\r\n @if (numberoflines() > 1 && !isselect()) {\r\n <textarea\r\n #textareafield\r\n [maxlength]=\"maxlength()\"\r\n [rows]=\"numberoflines()\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n [ngClass]=\"{ noresize: !resizeable() }\"\r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"></textarea>\r\n }\r\n @let options = selectable();\r\n @if (options && options.length > 0) {\r\n <select \r\n (change)=\"setchoice($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n [disabled]=\"disabled()\">\r\n @for (option of options; track option) {\r\n <option [value]=\"option.id\" [selected]=\"option == selected()\">{{ option.name }}</option>\r\n }\r\n </select>\r\n @if (!disabled()) {\r\n <mat-icon class=\"dropdown\" fontSet=\"material-symbols-outlined\">arrow_drop_down</mat-icon>\r\n }\r\n }\r\n @let ti = toolIcon();\r\n @if (!disabled() && ti && ti.length > 0) {\r\n <mat-icon class=\"toolicon\" fontSet=\"material-symbols-outlined\" (click)=\"toolClicked($event)\">{{ ti }}</mat-icon>\r\n }\r\n</div>\r\n\r\n@if (label() == '' && type() != 'number' && showlock()) {\r\n <div class=\"locked\" style=\"text-align: left;\">\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n </div>\r\n}\r\n\r\n@if (info()) {<div class=\"info\" [title]=\"info()\"><mat-icon class=\"info\">info</mat-icon></div>}\r\n", styles: [":host{position:relative;display:flex;margin-bottom:10px}:host div.autocomplete{position:absolute;z-index:100;top:37px;left:215px;right:0;background-color:red;min-height:40px;background-color:#fff;color:#000;border:solid;border-width:1px 1px 1px 1px;border-color:#d3d3d3;border-radius:4px;padding:5px;max-height:200px;overflow-x:hidden;overflow-y:auto}:host div.autocomplete.nolabel{left:0}:host div.autocomplete.shortLabel{left:124px}:host div.autocomplete div.element.selectable{cursor:pointer}@media(prefers-color-scheme:dark){:host div.autocomplete{background-color:#000;color:#fff}}@media(prefers-color-scheme:dark){:host div.autocomplete.notdark{background-color:#fff;color:#000}}:host div.autocomplete div.element{margin:5px;padding:5px;display:flex;border:solid;border-width:0 0 1px 0;border-color:#d3d3d3;font-size:14px;color:gray}:host div.autocomplete div.element.current{border-color:#0f6cbd;color:#000}:host div.autocomplete div.element div.item{flex-grow:1}:host div.label{width:180px;min-width:180px;max-height:180px;height:32px;line-height:32px}:host div.label.short{width:90px;min-width:90px}:host div.locked{width:30px;min-width:30px;max-width:30px;height:32px;line-height:32px;text-align:right;padding-right:3px}:host div.input{flex-grow:1;height:32px;line-height:32px;background-color:#e6e8e8;border-radius:3px;margin:0;padding:0;border:solid;border-width:0 0 3px 0;border-color:transparent}:host div.input.labelabove{height:48px}:host div.input.labelabove div.label-above{font-size:12px;line-height:12px;width:100%;padding-left:15px;padding-top:5px;color:gray}:host div.input.focus.labelabove div.label-above{color:#0f6cbd}:host div.input.textarea{height:inherit}:host div.info{width:30px}:host div textarea{background-color:#e6e8e8;border-radius:3px;margin:0;padding:10px 15px;border:solid;border-width:0 0 3px 0;border-color:transparent;width:100%;box-sizing:border-box}:host div.input.focus,:host div.textarea.focus,:host div.select.focus{border-color:#0f6cbd}:host div.input.error,:host div.input.focus.error,:host div.select.focus.error{border-color:red;color:red}:host input{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:100%;box-sizing:border-box}:host input.number{text-align:right}:host select{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:calc(100% - 10px);box-sizing:border-box}:host input.datepicker{width:calc(100% - 35px)}:host div.input>div.checkbox{margin-left:15px;margin-top:5px}:host div.input.above>div.checkbox{margin-top:2px}:host input.checkbox{width:15px;height:15px}:host div.input.toolicon input{width:calc(100% - 35px)}@media(prefers-color-scheme:dark){:host input{color:#000}:host input:disabled{color:#5f615f}}:host input.number{text-align:right;padding-right:15px;padding-left:0}:host *:focus{outline:none}:host mat-icon{color:#d3d3d3;font-size:12px;position:relative;top:5px;width:12px}:host textarea.noresize{resize:none}:host mat-icon.info{font-size:30px;width:30px;height:30px;color:gray}:host mat-icon.info:hover{color:#000}:host mat-icon.calendar-icon{font-size:25px;width:25px;height:25px;color:#a9a9a9}:host mat-icon.toolicon{cursor:pointer;font-size:25px;width:25px;height:25px;color:gray}:host mat-icon.dropdown{position:absolute;right:10px;top:4px;font-size:25px;width:25px;height:25px;color:gray;pointer-events:none}:host div.input.labelabove mat-icon.dropdown{top:12px}:host div.input.labelabove mat-icon.toolicon,:host div.input.labelabove mat-icon.calendar-icon{position:relative;top:-5px}:host select{appearance:none;-webkit-appearance:none;-moz-appearance:none}\n"] }]
2091
+ args: [{ selector: 'xrmui-input', changeDetection: ChangeDetectionStrategy.Eager, imports: [FormsModule, NgClass, MatIcon, TextFieldModule, MatDatepickerModule, MatCheckboxModule, XrmuiIcon, NgTemplateOutlet], template: "@if (showitems()) {\r\n <div class=\"autocomplete\" [ngClass]=\"{ nolabel: (!label() || label().length == 0 || shortLabel() == 'above'), shortLabel: shortLabel() == true, notdark: notdark() }\">\r\n @if (itemlist().length == 0) {\r\n <div class=\"element\"><div class=\"item\">Ingen fundet</div>div></div>\r\n }\r\n @for (elm of itemlist(); track elm) {\r\n <div #option class=\"element\" [ngClass]=\"{ current: current == elm, selectable: !elm.disabled }\" (click)=\"select($event, elm)\">\r\n <div class=\"item\">\r\n @if (itemTemplate(); as template) {\r\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: elm }\"></ng-container>\r\n } @else {\r\n {{ elm.name }}\r\n }\r\n </div>\r\n @if (elm.expandable == true) {\r\n <div class=\"icon\" (click)=\"expand($event, elm)\">\r\n <xrmui-icon icon=\"arrow_drop_down\"></xrmui-icon>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n@if (label() != '' && label().length > 0 && shortLabel() != 'above') {\r\n<div class=\"label\" [ngClass]=\"{ short: shortLabel() == true }\" (click)=\"focusMe($event)\">{{ label() }}</div>\r\n}\r\n@if ((label() != '' || type() == 'number') && showlock()) {\r\n<div class=\"locked\">\r\n @if (required() && shortLabel() != 'above') {\r\n <div style=\"display: inline-block;height: 10px;color: red; position: relative; top: -8px; right: 0\">*</div>\r\n }\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n</div>\r\n}\r\n<div class=\"input\" [ngClass]=\"{ focus: hasfocus(), error: error(), textarea: numberoflines() > 1, labelabove: shortLabel() == 'above', toolicon: toolIcon()?.length ?? 0 > 0 }\" (click)=\"focusMe($event)\">\r\n @if (shortLabel() == 'above' && label() != '') {\r\n <div class=\"label-above\">\r\n {{ label() }}\r\n @if (required()) {<span style=\"color: red\">&nbsp;*</span>}\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() != 'date' && validate() != 'checkbox' && !isselect()) {\r\n <input \r\n #inputfield \r\n [ngClass]=\"inputclasses()\"\r\n [type]=\"type() != 'password'? 'text' : 'password'\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"\r\n [maxlength]=\"maxlength()\"/>\r\n }\r\n @if (validate() == 'checkbox') {\r\n <div class=\"checkbox\">\r\n <input \r\n type=\"checkbox\"\r\n class=\"text checkbox\"\r\n [(ngModel)]=\"shadowBool\"\r\n [disabled]=\"disabled()\"\r\n (ngModelChange)=\"onCheckboxToggle()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlurCheckbox()\"\r\n />\r\n </div>\r\n }\r\n @if (numberoflines() == 1 && validate() == 'date' && !isselect()) {\r\n <input\r\n #datefield\r\n class=\"text datepicker\"\r\n [matDatepicker]=\"picker\"\r\n [value]=\"shadowDate()\"\r\n (dateChange)=\"pickDate($event)\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlurDate()\"/>\r\n @if (!disabled()) {\r\n <mat-icon \r\n class=\"calendar-icon\" \r\n fontSet=\"material-symbols-outlined\"\r\n (click)=\"picker.open()\">calendar_month</mat-icon>\r\n }\r\n <mat-datepicker #picker></mat-datepicker>\r\n }\r\n @if (numberoflines() > 1 && !isselect()) {\r\n <textarea\r\n #textareafield\r\n [maxlength]=\"maxlength()\"\r\n [rows]=\"numberoflines()\"\r\n [disabled]=\"disabled()\" \r\n [placeholder]=\"placeholder()\" \r\n [(ngModel)]=\"shadowValue\" \r\n [ngClass]=\"{ noresize: !resizeable() }\"\r\n (ngModelChange)=\"onValueChanged()\" \r\n (focus)=\"onFocus()\" \r\n (blur)=\"onBlur()\"\r\n (keydown.arrowdown)=\"ondown($event)\"\r\n (keydown.arrowup)=\"onup($event)\"\r\n (keydown.enter)=\"onenter($event)\"\r\n (keydown.esc)=\"onesc($event)\"\r\n (keydown)=\"onkeydown($event)\"></textarea>\r\n }\r\n @let options = selectable();\r\n @if (options && options.length > 0) {\r\n <select \r\n (change)=\"setchoice($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n [disabled]=\"disabled()\">\r\n @for (option of options; track option) {\r\n <option [value]=\"option.id\" [selected]=\"option == selected()\">{{ option.name }}</option>\r\n }\r\n </select>\r\n @if (!disabled()) {\r\n <mat-icon class=\"dropdown\" fontSet=\"material-symbols-outlined\">arrow_drop_down</mat-icon>\r\n }\r\n }\r\n @let ti = toolIcon();\r\n @if (!disabled() && ti && ti.length > 0) {\r\n <mat-icon class=\"toolicon\" fontSet=\"material-symbols-outlined\" (click)=\"toolClicked($event)\">{{ ti }}</mat-icon>\r\n }\r\n</div>\r\n\r\n@if (label() == '' && type() != 'number' && showlock()) {\r\n <div class=\"locked\" style=\"text-align: left;\">\r\n @if (disabled()) {\r\n <mat-icon fontSet=\"material-symbols-outlined\">lock</mat-icon>\r\n }\r\n </div>\r\n}\r\n\r\n@if (info()) {<div class=\"info\" [title]=\"info()\"><mat-icon class=\"info\">info</mat-icon></div>}\r\n", styles: [":host{position:relative;display:flex;margin-bottom:10px}:host div.autocomplete{position:absolute;z-index:100;top:37px;left:215px;right:0;background-color:red;min-height:40px;background-color:#fff;color:#000;border:solid;border-width:1px 1px 1px 1px;border-color:#d3d3d3;border-radius:4px;padding:5px;max-height:200px;overflow-x:hidden;overflow-y:auto}:host div.autocomplete.nolabel{left:0}:host div.autocomplete.shortLabel{left:124px}:host div.autocomplete div.element.selectable{cursor:pointer}@media(prefers-color-scheme:dark){:host div.autocomplete{background-color:#000;color:#fff}}@media(prefers-color-scheme:dark){:host div.autocomplete.notdark{background-color:#fff;color:#000}}:host div.autocomplete div.element{margin:5px;padding:5px;display:flex;border:solid;border-width:0 0 1px 0;border-color:#d3d3d3;font-size:14px;color:gray}:host div.autocomplete div.element.current{border-color:#0f6cbd;color:#000}:host div.autocomplete div.element div.item{flex-grow:1}:host div.label{width:180px;min-width:180px;max-height:180px;height:32px;line-height:32px}:host div.label.short{width:90px;min-width:90px}:host div.locked{width:30px;min-width:30px;max-width:30px;height:32px;line-height:32px;text-align:right;padding-right:3px}:host div.input{flex-grow:1;height:32px;line-height:32px;background-color:#e6e8e8;border-radius:3px;margin:0;padding:0;border:solid;border-width:0 0 3px 0;border-color:transparent}:host div.input.labelabove{height:48px}:host div.input.labelabove div.label-above{font-size:12px;line-height:12px;width:100%;padding-left:15px;padding-top:5px;color:gray}:host div.input.focus.labelabove div.label-above{color:#0f6cbd}:host div.input.textarea{height:inherit}:host div.info{width:30px}:host div textarea{background-color:#e6e8e8;border-radius:3px;margin:0;padding:10px 15px;border:solid;border-width:0 0 3px 0;border-color:transparent;width:100%;box-sizing:border-box}:host div.input.focus,:host div.textarea.focus,:host div.select.focus{border-color:#0f6cbd}:host div.input.error,:host div.input.focus.error,:host div.select.focus.error{border-color:red;color:red}:host input{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:100%;box-sizing:border-box}:host input.number{text-align:right}:host select{background-color:transparent;margin:0;border:none;height:29px;padding:0 0 0 15px;width:calc(100% - 10px);box-sizing:border-box}:host input.datepicker{width:calc(100% - 35px)}:host div.input>div.checkbox{margin-left:15px;margin-top:5px}:host div.input.above>div.checkbox{margin-top:2px}:host input.checkbox{width:15px;height:15px}:host div.input.toolicon input{width:calc(100% - 35px)}@media(prefers-color-scheme:dark){:host input{color:#000}:host input:disabled{color:#5f615f}}:host input.number{text-align:right;padding-right:15px;padding-left:0}:host *:focus{outline:none}:host mat-icon{color:#d3d3d3;font-size:12px;position:relative;top:5px;width:12px}:host textarea.noresize{resize:none}:host mat-icon.info{font-size:30px;width:30px;height:30px;color:gray}:host mat-icon.info:hover{color:#000}:host mat-icon.calendar-icon{font-size:25px;width:25px;height:25px;color:#a9a9a9}:host mat-icon.toolicon{cursor:pointer;font-size:25px;width:25px;height:25px;color:gray}:host mat-icon.dropdown{position:absolute;right:10px;top:4px;font-size:25px;width:25px;height:25px;color:gray;pointer-events:none}:host div.input.labelabove mat-icon.dropdown{top:12px}:host div.input.labelabove mat-icon.toolicon,:host div.input.labelabove mat-icon.calendar-icon{position:relative;top:-5px}:host select{appearance:none;-webkit-appearance:none;-moz-appearance:none}\n"] }]
2037
2092
  }], ctorParameters: () => [], propDecorators: { searchElement: [{
2038
2093
  type: ViewChild,
2039
2094
  args: ['inputfield']
@@ -2046,7 +2101,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2046
2101
  }], options: [{
2047
2102
  type: ViewChildren,
2048
2103
  args: ['option']
2049
- }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], _shortLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "short-label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], _disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], _showlock: [{ type: i0.Input, args: [{ isSignal: true, alias: "showlock", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], setfocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "setfocus", required: false }] }, { type: i0.Output, args: ["setfocusChange"] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], optionsetvalue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsetvalue", required: false }] }], entityreference: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityreference", required: false }] }], onselect: [{ type: i0.Output, args: ["onselect"] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], validate: [{ type: i0.Input, args: [{ isSignal: true, alias: "validate", required: false }] }, { type: i0.Output, args: ["validateChange"] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], onfocusEvent: [{ type: i0.Output, args: ["focus"] }], onblurEvent: [{ type: i0.Output, args: ["blur"] }], click: [{ type: i0.Output, args: ["click"] }], resizeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeable", required: false }] }], info: [{ type: i0.Input, args: [{ isSignal: true, alias: "info", required: false }] }], notdark: [{ type: i0.Input, args: [{ isSignal: true, alias: "notdark", required: false }] }], _autoopenonblank: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoopenonblank", required: false }] }], nullable: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullable", required: false }] }], decimalsUsed: [{ type: i0.Output, args: ["decimalsUsed"] }], onEnter: [{ type: i0.Output, args: ["onEnter"] }], toolIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolIcon", required: false }] }], toolClick: [{ type: i0.Output, args: ["toolClick"] }], numberoflines: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberoflines", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }] } });
2104
+ }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], _shortLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "short-label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], _disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], _showlock: [{ type: i0.Input, args: [{ isSignal: true, alias: "showlock", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], setfocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "setfocus", required: false }] }, { type: i0.Output, args: ["setfocusChange"] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], optionsetvalue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsetvalue", required: false }] }], entityreference: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityreference", required: false }] }], onselect: [{ type: i0.Output, args: ["onselect"] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], validate: [{ type: i0.Input, args: [{ isSignal: true, alias: "validate", required: false }] }, { type: i0.Output, args: ["validateChange"] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], onfocusEvent: [{ type: i0.Output, args: ["focus"] }], onblurEvent: [{ type: i0.Output, args: ["blur"] }], click: [{ type: i0.Output, args: ["click"] }], resizeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeable", required: false }] }], info: [{ type: i0.Input, args: [{ isSignal: true, alias: "info", required: false }] }], notdark: [{ type: i0.Input, args: [{ isSignal: true, alias: "notdark", required: false }] }], _autoopenonblank: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoopenonblank", required: false }] }], nullable: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullable", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], decimalsUsed: [{ type: i0.Output, args: ["decimalsUsed"] }], onEnter: [{ type: i0.Output, args: ["onEnter"] }], toolIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolIcon", required: false }] }], toolClick: [{ type: i0.Output, args: ["toolClick"] }], numberoflines: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberoflines", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }] } });
2050
2105
 
2051
2106
  class XrmuiRibbon {
2052
2107
  fill = input(true, /* @ts-ignore */