xt-plugin-default 0.5.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, computed, ChangeDetectionStrategy, Component, Injector, signal, runInInjectionContext, output, linkedSignal } from '@angular/core';
3
- import { XtCompositeComponent, XtResolverService, XtRenderSubComponent, XtSimpleComponent, XtPluginRegistry } from 'xt-components';
3
+ import { XtCompositeComponent, XtResolverService, XtRenderSubComponent, XtSimpleComponent, XtBaseContext, XtPluginRegistry } from 'xt-components';
4
4
  import { Panel } from 'primeng/panel';
5
5
  import * as i1 from 'primeng/table';
6
6
  import { TableModule } from 'primeng/table';
7
7
  import * as i1$1 from '@angular/forms';
8
- import { ReactiveFormsModule } from '@angular/forms';
8
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
9
9
  import { InputText } from 'primeng/inputtext';
10
10
  import { Checkbox } from 'primeng/checkbox';
11
11
  import { InputNumber } from 'primeng/inputnumber';
12
12
  import { DatePicker } from 'primeng/datepicker';
13
+ import { DecimalPipe, DatePipe } from '@angular/common';
14
+ import { AutoComplete } from 'primeng/autocomplete';
15
+ import { firstValueFrom } from 'rxjs';
13
16
 
14
17
  class DefaultObjectComponent extends XtCompositeComponent {
15
18
  constructor() {
@@ -19,6 +22,12 @@ class DefaultObjectComponent extends XtCompositeComponent {
19
22
  const display = this.context().displayMode;
20
23
  return display == 'INLINE_VIEW' || display == 'LIST_VIEW';
21
24
  }, ...(ngDevMode ? [{ debugName: "displayInline" }] : []));
25
+ this.canCalculateDisplayString = computed(() => {
26
+ return this.resolver.findTypeHandlerOf(this.context())?.handler?.isDisplayTemplateSet() ?? false;
27
+ }, ...(ngDevMode ? [{ debugName: "canCalculateDisplayString" }] : []));
28
+ this.displayString = computed(() => {
29
+ return this.resolver.findTypeHandlerOf(this.context())?.handler?.stringToDisplay(this.context().value());
30
+ }, ...(ngDevMode ? [{ debugName: "displayString" }] : []));
22
31
  }
23
32
  subNames() {
24
33
  const value = this.context().value();
@@ -29,11 +38,11 @@ class DefaultObjectComponent extends XtCompositeComponent {
29
38
  return super.subContext(subName);
30
39
  }
31
40
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DefaultObjectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
32
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DefaultObjectComponent, isStandalone: true, selector: "xt-default-object", usesInheritance: true, ngImport: i0, template: "@let allSubNames=subNames();\n\n@if (displayInline()) {\n <p-table [columns]=\"allSubNames\" [value]=\"[{}]\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body>\n <tr>\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n </p-table>\n\n} @else {\n <p-panel>\n @for (subName of allSubNames; track subName) {\n <div class=\"flex flex-nowrap gap-3\">\n <div class=\"flex-none\">{{subName}}</div>\n <div class=\"flex-auto\"><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></div>\n </div>\n }\n </p-panel>\n\n}\n", styles: [""], dependencies: [{ kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }, { kind: "component", type: Panel, selector: "p-panel", inputs: ["id", "toggleable", "header", "collapsed", "styleClass", "iconPos", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DefaultObjectComponent, isStandalone: true, selector: "xt-default-object", usesInheritance: true, ngImport: i0, template: "@let allSubNames=subNames();\n\n@if (displayInline()) {\n @if (canCalculateDisplayString()) {\n {{displayString()}}\n }@else {\n <p-table [columns]=\"allSubNames\" [value]=\"[{}]\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body>\n <tr>\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n} @else {\n <p-panel>\n @for (subName of allSubNames; track subName) {\n <div class=\"flex flex-nowrap gap-3\">\n <div class=\"flex-none\">{{subName}}</div>\n <div class=\"flex-auto\"><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></div>\n </div>\n }\n </p-panel>\n\n}\n", styles: [""], dependencies: [{ kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }, { kind: "component", type: Panel, selector: "p-panel", inputs: ["id", "toggleable", "header", "collapsed", "styleClass", "iconPos", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33
42
  }
34
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DefaultObjectComponent, decorators: [{
35
44
  type: Component,
36
- args: [{ selector: 'xt-default-object', imports: [XtRenderSubComponent, Panel, TableModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let allSubNames=subNames();\n\n@if (displayInline()) {\n <p-table [columns]=\"allSubNames\" [value]=\"[{}]\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body>\n <tr>\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n </p-table>\n\n} @else {\n <p-panel>\n @for (subName of allSubNames; track subName) {\n <div class=\"flex flex-nowrap gap-3\">\n <div class=\"flex-none\">{{subName}}</div>\n <div class=\"flex-auto\"><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></div>\n </div>\n }\n </p-panel>\n\n}\n" }]
45
+ args: [{ selector: 'xt-default-object', imports: [XtRenderSubComponent, Panel, TableModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let allSubNames=subNames();\n\n@if (displayInline()) {\n @if (canCalculateDisplayString()) {\n {{displayString()}}\n }@else {\n <p-table [columns]=\"allSubNames\" [value]=\"[{}]\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body>\n <tr>\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n} @else {\n <p-panel>\n @for (subName of allSubNames; track subName) {\n <div class=\"flex flex-nowrap gap-3\">\n <div class=\"flex-none\">{{subName}}</div>\n <div class=\"flex-auto\"><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></div>\n </div>\n }\n </p-panel>\n\n}\n" }]
37
46
  }] });
38
47
 
39
48
  /**
@@ -92,7 +101,7 @@ class DefaultPrimitiveComponent extends XtSimpleComponent {
92
101
  }
93
102
  }
94
103
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DefaultPrimitiveComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
95
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DefaultPrimitiveComponent, isStandalone: true, selector: "xt-default-primitive", usesInheritance: true, ngImport: i0, template: "@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n @switch (typeOf ()) {\n @case (\"number\") {\n <p-inputnumber mode=\"decimal\" [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\"></p-inputnumber>\n }\n @case (\"bigint\") {\n <p-inputnumber [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\"></p-inputnumber>\n }\n @case (\"boolean\") {\n <p-checkbox [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [binary]=\"true\" />\n }\n @case (\"time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [timeOnly]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @case (\"date\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"false\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @case (\"date-time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @default {\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\" />\n }\n }\n </ng-container>\n} @else {\n {{ displayValue() }}\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DefaultPrimitiveComponent, isStandalone: true, selector: "xt-default-primitive", usesInheritance: true, ngImport: i0, template: "@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n @switch (typeOf ()) {\n @case (\"number\") {\n <p-inputnumber mode=\"decimal\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"2\" [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\"></p-inputnumber>\n }\n @case (\"bigint\") {\n <p-inputnumber [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\"></p-inputnumber>\n }\n @case (\"boolean\") {\n <p-checkbox [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [binary]=\"true\" />\n }\n @case (\"time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [timeOnly]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\" />\n }\n @case (\"date\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"false\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\"/>\n }\n @case (\"date-time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\" />\n }\n @default {\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\" />\n }\n }\n </ng-container>\n} @else {\n @let value=displayValue();\n @switch (typeOf ()) {\n @case (\"number\") {\n {{value | number}}\n }\n @case (\"bigint\") {\n {{value | number}}\n }\n @case (\"boolean\") {\n <p-checkbox [binary]=\"true\" [readonly]=\"true\" [disabled]=\"true\" [ngModel]=\"value\" />\n }\n @case (\"time\") {\n {{ value | date: 'mediumTime'}}\n }\n @case (\"date\") {\n {{ value | date: 'mediumDate'}}\n }\n @case (\"date-time\") {\n {{ value | date: 'medium'}}\n }\n @default {\n {{ value }}\n }\n }\n\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
96
105
  }
97
106
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DefaultPrimitiveComponent, decorators: [{
98
107
  type: Component,
@@ -101,14 +110,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
101
110
  InputText,
102
111
  Checkbox,
103
112
  InputNumber,
104
- DatePicker
105
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n @switch (typeOf ()) {\n @case (\"number\") {\n <p-inputnumber mode=\"decimal\" [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\"></p-inputnumber>\n }\n @case (\"bigint\") {\n <p-inputnumber [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\"></p-inputnumber>\n }\n @case (\"boolean\") {\n <p-checkbox [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [binary]=\"true\" />\n }\n @case (\"time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [timeOnly]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @case (\"date\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"false\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @case (\"date-time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @default {\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\" />\n }\n }\n </ng-container>\n} @else {\n {{ displayValue() }}\n}\n" }]
113
+ DatePicker,
114
+ DecimalPipe,
115
+ FormsModule,
116
+ DatePipe
117
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n @switch (typeOf ()) {\n @case (\"number\") {\n <p-inputnumber mode=\"decimal\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"2\" [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\"></p-inputnumber>\n }\n @case (\"bigint\") {\n <p-inputnumber [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\"></p-inputnumber>\n }\n @case (\"boolean\") {\n <p-checkbox [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [binary]=\"true\" />\n }\n @case (\"time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [timeOnly]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\" />\n }\n @case (\"date\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"false\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\"/>\n }\n @case (\"date-time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\" />\n }\n @default {\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\" />\n }\n }\n </ng-container>\n} @else {\n @let value=displayValue();\n @switch (typeOf ()) {\n @case (\"number\") {\n {{value | number}}\n }\n @case (\"bigint\") {\n {{value | number}}\n }\n @case (\"boolean\") {\n <p-checkbox [binary]=\"true\" [readonly]=\"true\" [disabled]=\"true\" [ngModel]=\"value\" />\n }\n @case (\"time\") {\n {{ value | date: 'mediumTime'}}\n }\n @case (\"date\") {\n {{ value | date: 'mediumDate'}}\n }\n @case (\"date-time\") {\n {{ value | date: 'medium'}}\n }\n @default {\n {{ value }}\n }\n }\n\n}\n" }]
106
118
  }] });
107
119
 
108
120
  class DefaultObjectSetComponent extends XtCompositeComponent {
109
121
  constructor() {
110
122
  super(...arguments);
111
- this.resolver = inject(XtResolverService);
112
123
  this.selected = output();
113
124
  this.debugValue = false;
114
125
  this.debugSelectedElement = computed(() => {
@@ -129,51 +140,53 @@ class DefaultObjectSetComponent extends XtCompositeComponent {
129
140
  }, ...(ngDevMode ? [{ debugName: "valueSet" }] : []));
130
141
  this.selectedElement = linkedSignal(...(ngDevMode ? [{ debugName: "selectedElement", source: this.valueSet,
131
142
  computation: (source, previous) => {
132
- console.log("Triggering select with current " + source?.length + " and previous " + previous?.source?.length);
143
+ // console.log("Triggering select with current "+source?.length+" and previous "+previous?.source?.length);
133
144
  if ((source != null) && (previous?.source != null)) {
134
- console.log("Recalculating selection");
145
+ // console.log("Recalculating selection");
135
146
  if (previous?.value != null) {
136
- console.log("Trying to reselect existing element");
147
+ // console.log("Trying to reselect existing element");
137
148
  // Otherwise reselect the element if still there
138
149
  return source.find((toCheck) => {
139
150
  const ret = toCheck._id == previous.value._id;
140
- if (ret)
141
- console.log("Found existing element to reselect");
151
+ // if (ret) console.log("Found existing element to reselect");
142
152
  return ret;
143
153
  }) ?? null;
144
154
  }
145
155
  }
146
- console.log("No selection");
156
+ // console.log("No selection");
147
157
  return null;
148
158
  } }] : [{
149
159
  source: this.valueSet,
150
160
  computation: (source, previous) => {
151
- console.log("Triggering select with current " + source?.length + " and previous " + previous?.source?.length);
161
+ // console.log("Triggering select with current "+source?.length+" and previous "+previous?.source?.length);
152
162
  if ((source != null) && (previous?.source != null)) {
153
- console.log("Recalculating selection");
163
+ // console.log("Recalculating selection");
154
164
  if (previous?.value != null) {
155
- console.log("Trying to reselect existing element");
165
+ // console.log("Trying to reselect existing element");
156
166
  // Otherwise reselect the element if still there
157
167
  return source.find((toCheck) => {
158
168
  const ret = toCheck._id == previous.value._id;
159
- if (ret)
160
- console.log("Found existing element to reselect");
169
+ // if (ret) console.log("Found existing element to reselect");
161
170
  return ret;
162
171
  }) ?? null;
163
172
  }
164
173
  }
165
- console.log("No selection");
174
+ // console.log("No selection");
166
175
  return null;
167
176
  }
168
177
  }]));
169
178
  this.subNames = computed(() => {
170
- const ret = this.resolver.listSubNamesOf(this.context(), this.valueSet());
179
+ const ret = this.resolverService.listSubNamesOf(this.context(), this.valueSet());
171
180
  return ret;
172
181
  }, ...(ngDevMode ? [{ debugName: "subNames" }] : []));
173
182
  }
174
183
  elementSetContext(elementIndex) {
175
184
  this.formGroupIfAny();
176
- return this.context().elementSetContext(elementIndex);
185
+ const ret = this.context().elementSetContext(elementIndex);
186
+ /* this.resolverService.loadAllReferencesForContext(ret, StoreSupport.getStoreManager()).then(() => {
187
+ console.debug("Resolved all references for element "+elementIndex+ ' of type '+this.context().valueType);
188
+ } );*/
189
+ return ret;
177
190
  }
178
191
  subElementContextForName(subElementContext, subName, subType) {
179
192
  return subElementContext.subContext(subName, subType, this.resolverService?.typeResolver);
@@ -186,13 +199,107 @@ class DefaultObjectSetComponent extends XtCompositeComponent {
186
199
  this.outputsObject.valueSelected = this.selected;
187
200
  }
188
201
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DefaultObjectSetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
189
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DefaultObjectSetComponent, isStandalone: true, selector: "lib-default-object-set", outputs: { selected: "selected" }, usesInheritance: true, ngImport: i0, template: "@let allSubNames=subNames();\n<p-table [columns]=\"allSubNames\" [scrollable]=\"true\" scrollHeight=\"flex\" [value]=\"valueSet()\" selectionMode=\"single\" [selection]=\"selectedElement()\" (selectionChange)=\"selectionChange($event)\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body let-element let-eltIndex='rowIndex'>\n @let eltContext=elementSetContext(eltIndex);\n <tr [pSelectableRow]=\"element\">\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subElementContextForName(eltContext, subName)\"></xt-render-sub> </td>\n }\n </tr>\n </ng-template>\n</p-table>\n", styles: [""], dependencies: [{ kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DefaultObjectSetComponent, isStandalone: true, selector: "lib-default-object-set", outputs: { selected: "selected" }, usesInheritance: true, ngImport: i0, template: "@let allSubNames=subNames();\n<p-table [columns]=\"allSubNames\" [scrollable]=\"true\" scrollHeight=\"flex\" [value]=\"valueSet()\" selectionMode=\"single\" [selection]=\"selectedElement()\" (selectionChange)=\"selectionChange($event)\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body let-element let-eltIndex='rowIndex'>\n @let eltContext=elementSetContext(eltIndex);\n <tr [pSelectableRow]=\"element\">\n @for (subName of allSubNames; track subName) {\n @let subEltContext=subElementContextForName(eltContext, subName);\n <td><xt-render-sub [context]=\"subEltContext\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n</p-table>\n", styles: [""], dependencies: [{ kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
190
203
  }
191
204
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DefaultObjectSetComponent, decorators: [{
192
205
  type: Component,
193
- args: [{ selector: 'lib-default-object-set', imports: [XtRenderSubComponent, TableModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let allSubNames=subNames();\n<p-table [columns]=\"allSubNames\" [scrollable]=\"true\" scrollHeight=\"flex\" [value]=\"valueSet()\" selectionMode=\"single\" [selection]=\"selectedElement()\" (selectionChange)=\"selectionChange($event)\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body let-element let-eltIndex='rowIndex'>\n @let eltContext=elementSetContext(eltIndex);\n <tr [pSelectableRow]=\"element\">\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subElementContextForName(eltContext, subName)\"></xt-render-sub> </td>\n }\n </tr>\n </ng-template>\n</p-table>\n" }]
206
+ args: [{ selector: 'lib-default-object-set', imports: [XtRenderSubComponent, TableModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let allSubNames=subNames();\n<p-table [columns]=\"allSubNames\" [scrollable]=\"true\" scrollHeight=\"flex\" [value]=\"valueSet()\" selectionMode=\"single\" [selection]=\"selectedElement()\" (selectionChange)=\"selectionChange($event)\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body let-element let-eltIndex='rowIndex'>\n @let eltContext=elementSetContext(eltIndex);\n <tr [pSelectableRow]=\"element\">\n @for (subName of allSubNames; track subName) {\n @let subEltContext=subElementContextForName(eltContext, subName);\n <td><xt-render-sub [context]=\"subEltContext\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n</p-table>\n" }]
194
207
  }], propDecorators: { selected: [{ type: i0.Output, args: ["selected"] }] } });
195
208
 
209
+ class ManyToOneRefComponent extends XtSimpleComponent {
210
+ constructor() {
211
+ super(...arguments);
212
+ this.resolver = inject(XtResolverService);
213
+ this.filteredReferences = signal([], ...(ngDevMode ? [{ debugName: "filteredReferences" }] : []));
214
+ this.allReferences = [];
215
+ this.allSourceReferences = [];
216
+ this.allReferencesLoaded = false;
217
+ this.typeHandler = null;
218
+ /**
219
+ * We have to go through a ngModel for the selection as we need to calculate the displayedLabel
220
+ */
221
+ this.selectedReference = signal(null, ...(ngDevMode ? [{ debugName: "selectedReference" }] : []));
222
+ }
223
+ ngOnInit() {
224
+ super.ngOnInit();
225
+ const context = this.context();
226
+ const value = context.formControlValue();
227
+ this.typeHandler = this.resolver.findTypeHandlerOf(context, undefined, value)?.handler ?? null;
228
+ firstValueFrom(this.resolver.findPossibleReferences(context)).then((references) => {
229
+ this.allReferences = references.map((item) => {
230
+ this.allSourceReferences.push(item); // Store the original value
231
+ return this.withDisplayLabel(item);
232
+ });
233
+ this.allReferencesLoaded = true;
234
+ });
235
+ this.selectedReference.set(this.withDisplayLabel(value));
236
+ }
237
+ withDisplayLabel(item) {
238
+ if (item == null)
239
+ return item;
240
+ let displayLabel = this.typeHandler?.stringToDisplay(item);
241
+ if (displayLabel == null) {
242
+ displayLabel = item._id;
243
+ }
244
+ return { displayLabel, ...item };
245
+ }
246
+ filterReferences($event) {
247
+ const filterValue = $event.query;
248
+ const refInfo = this.context().reference;
249
+ if (refInfo != null) {
250
+ if (this.allReferencesLoaded) {
251
+ this.filteredReferences.set(this.filterPossibleReferences(refInfo, filterValue));
252
+ }
253
+ }
254
+ }
255
+ filterPossibleReferences(refInfo, toSearch) {
256
+ if ((toSearch == null) || (toSearch.length == 0)) {
257
+ return new Array(...this.allReferences);
258
+ }
259
+ else {
260
+ const lowerSearch = toSearch.toLowerCase();
261
+ return this.allReferences.filter((entity) => {
262
+ const targetText = entity[refInfo.field];
263
+ if (typeof targetText == 'string') {
264
+ return targetText.toLowerCase().includes(lowerSearch);
265
+ }
266
+ else {
267
+ // Todo: Support filtering of anything else than string
268
+ return true;
269
+ }
270
+ });
271
+ }
272
+ }
273
+ contextForReference(ref) {
274
+ const thisContext = this.context();
275
+ const ret = new XtBaseContext('INLINE_VIEW');
276
+ ret.setDisplayValue(ref);
277
+ ret.valueType = thisContext.reference?.toType;
278
+ return ret;
279
+ }
280
+ changeSelection($event) {
281
+ this.selectedReference.set($event);
282
+ if ($event == null) {
283
+ this.context().setFormValue($event, true);
284
+ }
285
+ else {
286
+ const ref = this.allSourceReferences.find((ref) => ref._id == $event._id);
287
+ this.context().setFormValue(ref, true);
288
+ }
289
+ }
290
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ManyToOneRefComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
291
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ManyToOneRefComponent, isStandalone: true, selector: "xt-many-to-one-ref", usesInheritance: true, ngImport: i0, template: "@if (isInForm()) {\n <ng-container [formGroup]=\"formGroup()\">\n <p-autocomplete [ngModel]=\"selectedReference()\" (ngModelChange)=\"changeSelection ($event)\" [ngModelOptions]=\"{standalone:true}\" [suggestions]=\"filteredReferences()\" (completeMethod)=\"filterReferences($event)\" [dropdown]=\"true\" [fluid]=\"true\" optionLabel=\"displayLabel\">\n <ng-template let-ref #item>\n <div class=\"flex items-center gap-2\">\n <div><xt-render-sub [context]=\"contextForReference(ref)\"></xt-render-sub></div>\n </div>\n </ng-template>\n <ng-template #header>\n <div class=\"font-medium px-3 py-2\">Available {{formControlName()}}</div>\n </ng-template>\n </p-autocomplete>\n </ng-container>\n} @else {\n <span class=\"text-red-800\">Only uses ManyToOne component when editing reference.</span>\n}\n", styles: [""], dependencies: [{ kind: "component", type: AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
292
+ }
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ManyToOneRefComponent, decorators: [{
294
+ type: Component,
295
+ args: [{ selector: 'xt-many-to-one-ref', imports: [
296
+ AutoComplete,
297
+ ReactiveFormsModule,
298
+ XtRenderSubComponent,
299
+ FormsModule
300
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isInForm()) {\n <ng-container [formGroup]=\"formGroup()\">\n <p-autocomplete [ngModel]=\"selectedReference()\" (ngModelChange)=\"changeSelection ($event)\" [ngModelOptions]=\"{standalone:true}\" [suggestions]=\"filteredReferences()\" (completeMethod)=\"filterReferences($event)\" [dropdown]=\"true\" [fluid]=\"true\" optionLabel=\"displayLabel\">\n <ng-template let-ref #item>\n <div class=\"flex items-center gap-2\">\n <div><xt-render-sub [context]=\"contextForReference(ref)\"></xt-render-sub></div>\n </div>\n </ng-template>\n <ng-template #header>\n <div class=\"font-medium px-3 py-2\">Available {{formControlName()}}</div>\n </ng-template>\n </p-autocomplete>\n </ng-container>\n} @else {\n <span class=\"text-red-800\">Only uses ManyToOne component when editing reference.</span>\n}\n" }]
301
+ }] });
302
+
196
303
  function registerDefaultPlugin(resolverService) {
197
304
  const pluginName = "Plugin Default";
198
305
  console.info('Registering ' + pluginName);
@@ -212,6 +319,10 @@ function registerDefaultPlugin(resolverService) {
212
319
  componentClass: DefaultObjectSetComponent,
213
320
  typesHandled: [XtPluginRegistry.ANY_OBJECT_SET],
214
321
  outputs: ['valueSelected']
322
+ }, {
323
+ componentName: 'ManyToOneReference',
324
+ componentClass: ManyToOneRefComponent,
325
+ typesHandled: [XtPluginRegistry.ANY_SINGLE_REFERENCE]
215
326
  }
216
327
  ]
217
328
  });
@@ -1 +1 @@
1
- {"version":3,"file":"xt-plugin-default.mjs","sources":["../../../projects/default/src/lib/object/default-object.component.ts","../../../projects/default/src/lib/object/default-object.component.html","../../../projects/default/src/lib/primitive/default-primitive.component.ts","../../../projects/default/src/lib/primitive/default-primitive.component.html","../../../projects/default/src/lib/object-set/default-object-set.component.ts","../../../projects/default/src/lib/object-set/default-object-set.component.html","../../../projects/default/src/lib/register.ts","../../../projects/default/src/public-api.ts","../../../projects/default/src/xt-plugin-default.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { XtCompositeComponent, XtContext, XtRenderSubComponent, XtResolverService } from 'xt-components';\nimport { Panel } from 'primeng/panel';\nimport { TableModule } from 'primeng/table';\n\n@Component({\n selector: 'xt-default-object',\n imports: [XtRenderSubComponent, Panel, TableModule],\n templateUrl: './default-object.component.html',\n styleUrl: './default-object.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultObjectComponent extends XtCompositeComponent {\n\n resolver = inject(XtResolverService);\n\n subNames() :string[]\n {\n const value = this.context().value();\n const ret= this.resolver.listSubNamesOf(this.context(), value);\n return ret;\n }\n\n override subContext (subName:string): XtContext<any> {\n return super.subContext(subName);\n }\n\n displayInline= computed (() => {\n const display = this.context().displayMode;\n\n return display=='INLINE_VIEW' || display=='LIST_VIEW';\n });\n}\n","@let allSubNames=subNames();\n\n@if (displayInline()) {\n <p-table [columns]=\"allSubNames\" [value]=\"[{}]\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body>\n <tr>\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n </p-table>\n\n} @else {\n <p-panel>\n @for (subName of allSubNames; track subName) {\n <div class=\"flex flex-nowrap gap-3\">\n <div class=\"flex-none\">{{subName}}</div>\n <div class=\"flex-auto\"><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></div>\n </div>\n }\n </p-panel>\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Injector,\n OnDestroy,\n runInInjectionContext,\n signal\n} from '@angular/core';\nimport { XtSimpleComponent } from 'xt-components';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputText } from 'primeng/inputtext';\nimport { Checkbox } from 'primeng/checkbox';\nimport { InputNumber } from 'primeng/inputnumber';\nimport { DatePicker } from 'primeng/datepicker';\nimport { Subscription } from 'rxjs';\n\n/**\n * Displays / edits primitive types (string, numeric) using text inputs to ensure at least something is managed.\n */\n@Component({\n selector: 'xt-default-primitive',\n imports: [\n ReactiveFormsModule,\n InputText,\n Checkbox,\n InputNumber,\n DatePicker\n ],\n templateUrl: './default-primitive.component.html',\n styleUrl: './default-primitive.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultPrimitiveComponent extends XtSimpleComponent implements OnDestroy{\n\n injector = inject(Injector);\n\n recalculate = signal<boolean> (false);\n valueSubscription: Subscription|null = null;\n\n /**\n * This function tries to guess the type of value to be handled\n */\n typeOf = computed (() => {\n this.recalculate(); // In case recompute is forced\n if(this.context().valueType == null) {\n // The type has not been set, so let's see if we can guess it from the value\n const val = this.context().value(); // We don't use this.getValue(), as it returns a cached value\n if (val == null) { // We really can't know the type\n if (this.valueSubscription==null) {\n // Let's make sure a change of the value is taken into account\n runInInjectionContext(this.injector, () => {\n this.valueSubscription=this.formControl().valueChanges.subscribe({\n next: () => {\n this.recalculate.update((val) => !val);\n }\n });\n });\n }\n return val;\n } else {\n const ret= typeof val;\n if (ret != 'object') {\n this.context().valueType = typeof val;\n return ret;\n }else if (val instanceof Date) {\n this.context().valueType = 'date';\n return 'date';\n } else {\n throw new Error('Primitive Component used to display a non primitive type '+ret);\n }\n }\n } else {\n return this.context().valueType;\n }\n });\n\n ngOnDestroy(): void {\n if (this.valueSubscription!=null) {\n this.valueSubscription.unsubscribe();\n }\n }\n}\n","@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n @switch (typeOf ()) {\n @case (\"number\") {\n <p-inputnumber mode=\"decimal\" [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\"></p-inputnumber>\n }\n @case (\"bigint\") {\n <p-inputnumber [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\"></p-inputnumber>\n }\n @case (\"boolean\") {\n <p-checkbox [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [binary]=\"true\" />\n }\n @case (\"time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [timeOnly]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @case (\"date\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"false\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @case (\"date-time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" inputId=\"icondisplay\" />\n }\n @default {\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" fluid=\"true\" />\n }\n }\n </ng-container>\n} @else {\n {{ displayValue() }}\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, linkedSignal, output, Signal } from '@angular/core';\nimport { XtComponentOutput, XtCompositeComponent, XtContext, XtRenderSubComponent, XtResolverService } from 'xt-components';\nimport { TableModule } from 'primeng/table';\n\n@Component({\n selector: 'lib-default-object-set',\n imports: [XtRenderSubComponent, TableModule],\n templateUrl: './default-object-set.component.html',\n styleUrl: './default-object-set.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultObjectSetComponent<T> extends XtCompositeComponent<T[]> {\n resolver = inject(XtResolverService);\n\n selected= output<T>();\n\n debugValue=false;\n debugSelectedElement:Signal<boolean> = computed<boolean>(() => {\n console.debug(\"Selected element\", this.selectedElement());\n this.debugValue=!this.debugValue;\n return this.debugValue;\n });\n\n valueSet = computed(() => {\n const ret = this.context().value();\n if (Array.isArray(ret)) {\n return ret as T[];\n } else if (ret!=null) {\n return [ret] as T[];\n } else return [];\n });\n\n selectedElement = linkedSignal<T[]|null, T|null> ({\n source: this.valueSet,\n computation: (source, previous) => {\n console.log(\"Triggering select with current \"+source?.length+\" and previous \"+previous?.source?.length);\n if ((source!=null) && (previous?.source!=null)) {\n console.log(\"Recalculating selection\");\n if( previous?.value!=null) {\n console.log(\"Trying to reselect existing element\");\n // Otherwise reselect the element if still there\n return source.find((toCheck) => {\n const ret= (toCheck as any)._id==(previous.value as any)._id;\n if (ret) console.log(\"Found existing element to reselect\");\n return ret;\n })??null;\n }\n }\n console.log(\"No selection\");\n return null;\n }\n });\n\n subNames = computed(() => {\n const ret = this.resolver.listSubNamesOf(this.context(), this.valueSet());\n return ret;\n });\n\n\n elementSetContext(elementIndex: number): XtContext<any> {\n this.formGroupIfAny();\n\n return this.context().elementSetContext(elementIndex);\n }\n\n subElementContextForName(subElementContext: XtContext<any>, subName: string, subType?: string): XtContext<any> {\n return subElementContext.subContext(subName, subType, this.resolverService?.typeResolver);\n }\n\n selectionChange(newElement: any) {\n this.selectedElement.set(newElement);\n this.selected.emit(newElement );\n }\n\n override setupInputOutput () {\n this.outputsObject.valueSelected=this.selected;\n }\n}\n","@let allSubNames=subNames();\n<p-table [columns]=\"allSubNames\" [scrollable]=\"true\" scrollHeight=\"flex\" [value]=\"valueSet()\" selectionMode=\"single\" [selection]=\"selectedElement()\" (selectionChange)=\"selectionChange($event)\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body let-element let-eltIndex='rowIndex'>\n @let eltContext=elementSetContext(eltIndex);\n <tr [pSelectableRow]=\"element\">\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subElementContextForName(eltContext, subName)\"></xt-render-sub> </td>\n }\n </tr>\n </ng-template>\n</p-table>\n","import { XtPluginRegistry, XtResolverService } from 'xt-components';\nimport { DefaultPrimitiveComponent } from './primitive/default-primitive.component';\nimport { DefaultObjectComponent } from './object/default-object.component';\nimport { DefaultObjectSetComponent } from './object-set/default-object-set.component';\n\nexport function registerDefaultPlugin (resolverService:XtResolverService):boolean {\n const pluginName = \"Plugin Default\";\n console.info ('Registering ' +pluginName);\n resolverService.registerPlugin ({\n name:'PluginDefault',\n components: [\n {\n componentName:'DefaultPrimitive',\n componentClass:DefaultPrimitiveComponent,\n typesHandled: [XtPluginRegistry.ANY_PRIMITIVE_TYPE, 'string', 'number', 'boolean', 'date', 'time', 'date-time'],\n },{\n componentName:'DefaultObject',\n componentClass:DefaultObjectComponent,\n typesHandled: [XtPluginRegistry.ANY_OBJECT_TYPE]\n },{\n componentName:'DefaultObjectSet',\n componentClass:DefaultObjectSetComponent,\n typesHandled: [XtPluginRegistry.ANY_OBJECT_SET],\n outputs: ['valueSelected']\n }\n ]\n });\n return true;\n}\n","/*\n * Public API Surface of default\n */\n\nexport * from './lib/object/default-object.component';\nexport * from './lib/primitive/default-primitive.component';\nexport * from './lib/object-set/default-object-set.component';\nexport * from './lib/register';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAYM,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAPhE,IAAA,WAAA,GAAA;;AASE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAapC,QAAA,IAAA,CAAA,aAAa,GAAE,QAAQ,CAAE,MAAK;YAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,WAAW;AAE1C,YAAA,OAAO,OAAO,IAAE,aAAa,IAAI,OAAO,IAAE,WAAW;AACvD,QAAA,CAAC,yDAAC;AACH,IAAA;IAhBC,QAAQ,GAAA;QAEN,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE;AACpC,QAAA,MAAM,GAAG,GAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC;AAC9D,QAAA,OAAO,GAAG;IACZ;AAES,IAAA,UAAU,CAAE,OAAc,EAAA;AACjC,QAAA,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC;IAClC;8GAbW,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,oGCZnC,u0BA+BA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDxBY,oBAAoB,EAAA,QAAA,EAAA,eAAA,EAAA,M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A,aAAa,EAAC,eAAe;AAC7B,gBAAA,cAAc,EAAC,sBAAsB;AACrC,gBAAA,YAAY,EAAE,CAAC,gBAAgB,CAAC,eAAe;aAChD,EAAC;AACA,gBAAA,aAAa,EAAC,kBAAkB;AAChC,gBAAA,cAAc,EAAC,yBAAyB;AACxC,gBAAA,YAAY,EAAE,CAAC,gBAAgB,CAAC,cAAc,CAAC;gBAC/C,OAAO,EAAE,CAAC,eAAe;AAC1B;AACF;AACJ,KAAA,CAAC;AACF,IAAA,OAAO,IAAI;AACf;;AC5BA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"xt-plugin-default.mjs","sources":["../../../projects/default/src/lib/object/default-object.component.ts","../../../projects/default/src/lib/object/default-object.component.html","../../../projects/default/src/lib/primitive/default-primitive.component.ts","../../../projects/default/src/lib/primitive/default-primitive.component.html","../../../projects/default/src/lib/object-set/default-object-set.component.ts","../../../projects/default/src/lib/object-set/default-object-set.component.html","../../../projects/default/src/lib/reference/many-to-one-ref.component.ts","../../../projects/default/src/lib/reference/many-to-one-ref.component.html","../../../projects/default/src/lib/register.ts","../../../projects/default/src/public-api.ts","../../../projects/default/src/xt-plugin-default.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { XtCompositeComponent, XtContext, XtRenderSubComponent, XtResolverService } from 'xt-components';\nimport { Panel } from 'primeng/panel';\nimport { TableModule } from 'primeng/table';\n\n@Component({\n selector: 'xt-default-object',\n imports: [XtRenderSubComponent, Panel, TableModule],\n templateUrl: './default-object.component.html',\n styleUrl: './default-object.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultObjectComponent extends XtCompositeComponent {\n\n resolver = inject(XtResolverService);\n\n subNames() :string[]\n {\n const value = this.context().value();\n const ret= this.resolver.listSubNamesOf(this.context(), value);\n return ret;\n }\n\n override subContext (subName:string): XtContext<any> {\n return super.subContext(subName);\n }\n\n displayInline= computed (() => {\n const display = this.context().displayMode;\n\n return display=='INLINE_VIEW' || display=='LIST_VIEW';\n });\n\n canCalculateDisplayString = computed(() => {\n return this.resolver.findTypeHandlerOf(this.context())?.handler?.isDisplayTemplateSet() ?? false;\n });\n\n displayString = computed(() => {\n return this.resolver.findTypeHandlerOf(this.context())?.handler?.stringToDisplay(this.context().value());\n });\n}\n","@let allSubNames=subNames();\n\n@if (displayInline()) {\n @if (canCalculateDisplayString()) {\n {{displayString()}}\n }@else {\n <p-table [columns]=\"allSubNames\" [value]=\"[{}]\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body>\n <tr>\n @for (subName of allSubNames; track subName) {\n <td><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n} @else {\n <p-panel>\n @for (subName of allSubNames; track subName) {\n <div class=\"flex flex-nowrap gap-3\">\n <div class=\"flex-none\">{{subName}}</div>\n <div class=\"flex-auto\"><xt-render-sub [context]=\"subContext(subName)\"></xt-render-sub></div>\n </div>\n }\n </p-panel>\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Injector,\n OnDestroy,\n runInInjectionContext,\n signal\n} from '@angular/core';\nimport { XtSimpleComponent } from 'xt-components';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { InputText } from 'primeng/inputtext';\nimport { Checkbox } from 'primeng/checkbox';\nimport { InputNumber } from 'primeng/inputnumber';\nimport { DatePicker } from 'primeng/datepicker';\nimport { Subscription } from 'rxjs';\nimport { DatePipe, DecimalPipe } from '@angular/common';\n\n/**\n * Displays / edits primitive types (string, numeric) using text inputs to ensure at least something is managed.\n */\n@Component({\n selector: 'xt-default-primitive',\n imports: [\n ReactiveFormsModule,\n InputText,\n Checkbox,\n InputNumber,\n DatePicker,\n DecimalPipe,\n FormsModule,\n DatePipe\n ],\n templateUrl: './default-primitive.component.html',\n styleUrl: './default-primitive.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultPrimitiveComponent extends XtSimpleComponent implements OnDestroy{\n\n injector = inject(Injector);\n\n recalculate = signal<boolean> (false);\n valueSubscription: Subscription|null = null;\n\n /**\n * This function tries to guess the type of value to be handled\n */\n typeOf = computed (() => {\n this.recalculate(); // In case recompute is forced\n if(this.context().valueType == null) {\n // The type has not been set, so let's see if we can guess it from the value\n const val = this.context().value(); // We don't use this.getValue(), as it returns a cached value\n if (val == null) { // We really can't know the type\n if (this.valueSubscription==null) {\n // Let's make sure a change of the value is taken into account\n runInInjectionContext(this.injector, () => {\n this.valueSubscription=this.formControl().valueChanges.subscribe({\n next: () => {\n this.recalculate.update((val) => !val);\n }\n });\n });\n }\n return val;\n } else {\n const ret= typeof val;\n if (ret != 'object') {\n this.context().valueType = typeof val;\n return ret;\n }else if (val instanceof Date) {\n this.context().valueType = 'date';\n return 'date';\n } else {\n throw new Error('Primitive Component used to display a non primitive type '+ret);\n }\n }\n } else {\n return this.context().valueType;\n }\n });\n\n ngOnDestroy(): void {\n if (this.valueSubscription!=null) {\n this.valueSubscription.unsubscribe();\n }\n }\n}\n","@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n @switch (typeOf ()) {\n @case (\"number\") {\n <p-inputnumber mode=\"decimal\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"2\" [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\"></p-inputnumber>\n }\n @case (\"bigint\") {\n <p-inputnumber [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\"></p-inputnumber>\n }\n @case (\"boolean\") {\n <p-checkbox [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [binary]=\"true\" />\n }\n @case (\"time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [timeOnly]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\" />\n }\n @case (\"date\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"false\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\"/>\n }\n @case (\"date-time\") {\n <p-datepicker [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [showTime]=\"true\" [iconDisplay]=\"'input'\" [showIcon]=\"true\" [inline]=\"false\" inputId=\"icondisplay\" />\n }\n @default {\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" [fluid]=\"true\" />\n }\n }\n </ng-container>\n} @else {\n @let value=displayValue();\n @switch (typeOf ()) {\n @case (\"number\") {\n {{value | number}}\n }\n @case (\"bigint\") {\n {{value | number}}\n }\n @case (\"boolean\") {\n <p-checkbox [binary]=\"true\" [readonly]=\"true\" [disabled]=\"true\" [ngModel]=\"value\" />\n }\n @case (\"time\") {\n {{ value | date: 'mediumTime'}}\n }\n @case (\"date\") {\n {{ value | date: 'mediumDate'}}\n }\n @case (\"date-time\") {\n {{ value | date: 'medium'}}\n }\n @default {\n {{ value }}\n }\n }\n\n}\n","import { ChangeDetectionStrategy, Component, computed, linkedSignal, output, Signal } from '@angular/core';\nimport { StoreSupport, XtCompositeComponent, XtContext, XtRenderSubComponent } from 'xt-components';\nimport { TableModule } from 'primeng/table';\n\n@Component({\n selector: 'lib-default-object-set',\n imports: [XtRenderSubComponent, TableModule],\n templateUrl: './default-object-set.component.html',\n styleUrl: './default-object-set.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultObjectSetComponent<T> extends XtCompositeComponent<T[]> {\n selected= output<T>();\n\n debugValue=false;\n debugSelectedElement:Signal<boolean> = computed<boolean>(() => {\n console.debug(\"Selected element\", this.selectedElement());\n this.debugValue=!this.debugValue;\n return this.debugValue;\n });\n\n valueSet = computed(() => {\n const ret = this.context().value();\n if (Array.isArray(ret)) {\n return ret as T[];\n } else if (ret!=null) {\n return [ret] as T[];\n } else return [];\n });\n\n selectedElement = linkedSignal<T[]|null, T|null> ({\n source: this.valueSet,\n computation: (source, previous) => {\n // console.log(\"Triggering select with current \"+source?.length+\" and previous \"+previous?.source?.length);\n if ((source!=null) && (previous?.source!=null)) {\n // console.log(\"Recalculating selection\");\n if( previous?.value!=null) {\n // console.log(\"Trying to reselect existing element\");\n // Otherwise reselect the element if still there\n return source.find((toCheck) => {\n const ret= (toCheck as any)._id==(previous.value as any)._id;\n // if (ret) console.log(\"Found existing element to reselect\");\n return ret;\n })??null;\n }\n }\n// console.log(\"No selection\");\n return null;\n }\n });\n\n subNames = computed(() => {\n const ret = this.resolverService.listSubNamesOf(this.context(), this.valueSet());\n return ret;\n });\n\n elementSetContext(elementIndex: number): XtContext<any> {\n this.formGroupIfAny();\n\n const ret= this.context().elementSetContext(elementIndex);\n /* this.resolverService.loadAllReferencesForContext(ret, StoreSupport.getStoreManager()).then(() => {\n console.debug(\"Resolved all references for element \"+elementIndex+ ' of type '+this.context().valueType);\n } );*/\n return ret;\n }\n\n subElementContextForName(subElementContext: XtContext<any>, subName: string, subType?: string): XtContext<any> {\n return subElementContext.subContext(subName, subType, this.resolverService?.typeResolver);\n }\n\n selectionChange(newElement: any) {\n this.selectedElement.set(newElement);\n this.selected.emit(newElement );\n }\n\n override setupInputOutput () {\n this.outputsObject.valueSelected=this.selected;\n }\n}\n","@let allSubNames=subNames();\n<p-table [columns]=\"allSubNames\" [scrollable]=\"true\" scrollHeight=\"flex\" [value]=\"valueSet()\" selectionMode=\"single\" [selection]=\"selectedElement()\" (selectionChange)=\"selectionChange($event)\">\n <ng-template #header>\n <tr>\n @for (subName of allSubNames; track subName) {\n <th>{{subName}}</th>\n }\n </tr>\n </ng-template>\n <ng-template #body let-element let-eltIndex='rowIndex'>\n @let eltContext=elementSetContext(eltIndex);\n <tr [pSelectableRow]=\"element\">\n @for (subName of allSubNames; track subName) {\n @let subEltContext=subElementContextForName(eltContext, subName);\n <td><xt-render-sub [context]=\"subEltContext\"></xt-render-sub></td>\n }\n </tr>\n </ng-template>\n</p-table>\n","import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';\nimport { XtBaseContext, XtContext, XtRenderSubComponent, XtResolverService, XtSimpleComponent } from 'xt-components';\nimport { AutoComplete, AutoCompleteCompleteEvent } from 'primeng/autocomplete';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { XtTypeHandler, XtTypeReference } from 'xt-type';\nimport { firstValueFrom } from 'rxjs';\n\n@Component({\n selector: 'xt-many-to-one-ref',\n imports: [\n AutoComplete,\n ReactiveFormsModule,\n XtRenderSubComponent,\n FormsModule\n ],\n templateUrl: './many-to-one-ref.component.html',\n styleUrl: './many-to-one-ref.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManyToOneRefComponent extends XtSimpleComponent implements OnInit{\n resolver = inject(XtResolverService);\n filteredReferences=signal<any[]>([]);\n\n allReferences: any[] = [];\n allSourceReferences: any[] = [];\n allReferencesLoaded = false;\n\n typeHandler:XtTypeHandler<any>|null=null;\n\n /**\n * We have to go through a ngModel for the selection as we need to calculate the displayedLabel\n */\n selectedReference= signal<any>(null);\n\n override ngOnInit(): void {\n super.ngOnInit();\n const context=this.context();\n const value=context.formControlValue();\n\n this.typeHandler =this.resolver.findTypeHandlerOf(context, undefined, value)?.handler??null;\n firstValueFrom(this.resolver.findPossibleReferences(context)).then((references: any[]) => {\n this.allReferences = references.map((item) => {\n this.allSourceReferences.push(item); // Store the original value\n return this.withDisplayLabel(item);\n });\n this.allReferencesLoaded=true;\n });\n this.selectedReference.set(this.withDisplayLabel(value));\n }\n\n withDisplayLabel(item:any):any {\n if (item==null) return item;\n let displayLabel=this.typeHandler?.stringToDisplay(item);\n if( displayLabel==null) {\n displayLabel=item._id;\n }\n return { displayLabel, ...item};\n }\n\n filterReferences($event:AutoCompleteCompleteEvent):void {\n const filterValue = $event.query;\n const refInfo = this.context().reference;\n if( refInfo!=null) {\n if (this.allReferencesLoaded) {\n this.filteredReferences.set(this.filterPossibleReferences(refInfo, filterValue));\n }\n }\n }\n\n protected filterPossibleReferences (refInfo:XtTypeReference, toSearch:string ): any[] {\n if ((toSearch==null) || (toSearch.length==0)) {\n return new Array(...this.allReferences);\n } else {\n const lowerSearch=toSearch.toLowerCase();\n return this.allReferences.filter((entity) => {\n const targetText=entity[refInfo.field];\n if (typeof targetText=='string') {\n return targetText.toLowerCase().includes(lowerSearch);\n } else {\n // Todo: Support filtering of anything else than string\n return true;\n }\n });\n }\n }\n\n contextForReference(ref:any):XtContext<any> {\n const thisContext=this.context() as XtBaseContext<any>;\n const ret = new XtBaseContext('INLINE_VIEW');\n ret.setDisplayValue(ref);\n ret.valueType=thisContext.reference?.toType;\n return ret;\n }\n\n changeSelection($event: any) {\n this.selectedReference.set($event);\n if( $event == null) {\n this.context().setFormValue($event,true);\n }else {\n const ref=this.allSourceReferences.find((ref) => ref._id==$event._id);\n this.context().setFormValue(ref,true);\n }\n }\n\n}\n","@if (isInForm()) {\n <ng-container [formGroup]=\"formGroup()\">\n <p-autocomplete [ngModel]=\"selectedReference()\" (ngModelChange)=\"changeSelection ($event)\" [ngModelOptions]=\"{standalone:true}\" [suggestions]=\"filteredReferences()\" (completeMethod)=\"filterReferences($event)\" [dropdown]=\"true\" [fluid]=\"true\" optionLabel=\"displayLabel\">\n <ng-template let-ref #item>\n <div class=\"flex items-center gap-2\">\n <div><xt-render-sub [context]=\"contextForReference(ref)\"></xt-render-sub></div>\n </div>\n </ng-template>\n <ng-template #header>\n <div class=\"font-medium px-3 py-2\">Available {{formControlName()}}</div>\n </ng-template>\n </p-autocomplete>\n </ng-container>\n} @else {\n <span class=\"text-red-800\">Only uses ManyToOne component when editing reference.</span>\n}\n","import { XtPluginRegistry, XtResolverService } from 'xt-components';\nimport { DefaultPrimitiveComponent } from './primitive/default-primitive.component';\nimport { DefaultObjectComponent } from './object/default-object.component';\nimport { DefaultObjectSetComponent } from './object-set/default-object-set.component';\nimport { ManyToOneRefComponent } from './reference/many-to-one-ref.component';\n\nexport function registerDefaultPlugin (resolverService:XtResolverService):boolean {\n const pluginName = \"Plugin Default\";\n console.info ('Registering ' +pluginName);\n resolverService.registerPlugin ({\n name:'PluginDefault',\n components: [\n {\n componentName:'DefaultPrimitive',\n componentClass:DefaultPrimitiveComponent,\n typesHandled: [XtPluginRegistry.ANY_PRIMITIVE_TYPE, 'string', 'number', 'boolean', 'date', 'time', 'date-time'],\n },{\n componentName:'DefaultObject',\n componentClass:DefaultObjectComponent,\n typesHandled: [XtPluginRegistry.ANY_OBJECT_TYPE]\n },{\n componentName:'DefaultObjectSet',\n componentClass:DefaultObjectSetComponent,\n typesHandled: [XtPluginRegistry.ANY_OBJECT_SET],\n outputs: ['valueSelected']\n },{\n componentName:'ManyToOneReference',\n componentClass:ManyToOneRefComponent,\n typesHandled: [XtPluginRegistry.ANY_SINGLE_REFERENCE]\n }\n ]\n });\n return true;\n}\n","/*\n * Public API Surface of default\n */\n\nexport * from './lib/object/default-object.component';\nexport * from './lib/primitive/default-primitive.component';\nexport * from './lib/object-set/default-object-set.component';\nexport * from './lib/register';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAYM,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAPhE,IAAA,WAAA,GAAA;;AASE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAapC,QAAA,IAAA,CAAA,aAAa,GAAE,QAAQ,CAAE,MAAK;YAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,WAAW;AAE1C,YAAA,OAAO,OAAO,IAAE,aAAa,IAAI,OAAO,IAAE,WAAW;AACvD,QAAA,CAAC,yDAAC;AAEF,QAAA,IAAA,CAAA,yBAAyB,GAAG,QAAQ,CAAC,MAAK;AACxC,YAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,iB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;AAChC,gBAAA,cAAc,EAAC,yBAAyB;AACxC,gBAAA,YAAY,EAAE,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC;aAChH,EAAC;AACF,gBAAA,aAAa,EAAC,eAAe;AAC7B,gBAAA,cAAc,EAAC,sBAAsB;AACrC,gBAAA,YAAY,EAAE,CAAC,gBAAgB,CAAC,eAAe;aAChD,EAAC;AACA,gBAAA,aAAa,EAAC,kBAAkB;AAChC,gBAAA,cAAc,EAAC,yBAAyB;AACxC,gBAAA,YAAY,EAAE,CAAC,gBAAgB,CAAC,cAAc,CAAC;gBAC/C,OAAO,EAAE,CAAC,eAAe;aAC1B,EAAC;AACA,gBAAA,aAAa,EAAC,oBAAoB;AAClC,gBAAA,cAAc,EAAC,qBAAqB;AACpC,gBAAA,YAAY,EAAE,CAAC,gBAAgB,CAAC,oBAAoB;AACrD;AACF;AACJ,KAAA,CAAC;AACF,IAAA,OAAO,IAAI;AACf;;ACjCA;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy, Injector, Signal } from '@angular/core';
3
3
  import { XtCompositeComponent, XtResolverService, XtContext, XtSimpleComponent } from 'xt-components';
4
4
  import { Subscription } from 'rxjs';
@@ -7,9 +7,11 @@ declare class DefaultObjectComponent extends XtCompositeComponent {
7
7
  resolver: XtResolverService;
8
8
  subNames(): string[];
9
9
  subContext(subName: string): XtContext<any>;
10
- displayInline: i0.Signal<boolean>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultObjectComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultObjectComponent, "xt-default-object", never, {}, {}, never, never, true, never>;
10
+ displayInline: _angular_core.Signal<boolean>;
11
+ canCalculateDisplayString: _angular_core.Signal<boolean>;
12
+ displayString: _angular_core.Signal<string | undefined>;
13
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DefaultObjectComponent, never>;
14
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DefaultObjectComponent, "xt-default-object", never, {}, {}, never, never, true, never>;
13
15
  }
14
16
 
15
17
  /**
@@ -17,31 +19,30 @@ declare class DefaultObjectComponent extends XtCompositeComponent {
17
19
  */
18
20
  declare class DefaultPrimitiveComponent extends XtSimpleComponent implements OnDestroy {
19
21
  injector: Injector;
20
- recalculate: i0.WritableSignal<boolean>;
22
+ recalculate: _angular_core.WritableSignal<boolean>;
21
23
  valueSubscription: Subscription | null;
22
24
  /**
23
25
  * This function tries to guess the type of value to be handled
24
26
  */
25
- typeOf: i0.Signal<any>;
27
+ typeOf: _angular_core.Signal<any>;
26
28
  ngOnDestroy(): void;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultPrimitiveComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultPrimitiveComponent, "xt-default-primitive", never, {}, {}, never, never, true, never>;
29
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DefaultPrimitiveComponent, never>;
30
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DefaultPrimitiveComponent, "xt-default-primitive", never, {}, {}, never, never, true, never>;
29
31
  }
30
32
 
31
33
  declare class DefaultObjectSetComponent<T> extends XtCompositeComponent<T[]> {
32
- resolver: XtResolverService;
33
- selected: i0.OutputEmitterRef<T>;
34
+ selected: _angular_core.OutputEmitterRef<T>;
34
35
  debugValue: boolean;
35
36
  debugSelectedElement: Signal<boolean>;
36
37
  valueSet: Signal<T[]>;
37
- selectedElement: i0.WritableSignal<T | null>;
38
+ selectedElement: _angular_core.WritableSignal<T | null>;
38
39
  subNames: Signal<string[]>;
39
40
  elementSetContext(elementIndex: number): XtContext<any>;
40
41
  subElementContextForName(subElementContext: XtContext<any>, subName: string, subType?: string): XtContext<any>;
41
42
  selectionChange(newElement: any): void;
42
43
  setupInputOutput(): void;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultObjectSetComponent<any>, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultObjectSetComponent<any>, "lib-default-object-set", never, {}, { "selected": "selected"; }, never, never, true, never>;
44
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DefaultObjectSetComponent<any>, never>;
45
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DefaultObjectSetComponent<any>, "lib-default-object-set", never, {}, { "selected": "selected"; }, never, never, true, never>;
45
46
  }
46
47
 
47
48
  declare function registerDefaultPlugin(resolverService: XtResolverService): boolean;
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "xt-plugin-default",
3
- "version": "0.5.5",
3
+ "version": "0.6.0",
4
+ "repository": {
5
+ "url": "https://github.com/dont-code/ng-xtend.git"
6
+ },
4
7
  "peerDependencies": {
5
8
  "@angular/common": "^19.0.5",
6
- "@angular/core": "^19.0.5"
9
+ "@angular/core": "^19.0.5",
10
+ "xt-components": "^0.6.0"
7
11
  },
8
12
  "dependencies": {
9
13
  "tslib": "^2.3.0"