@colijnit/corecomponents_v12 262.1.1 → 262.1.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.
- package/fesm2022/colijnit-corecomponents_v12.mjs +152 -108
- package/fesm2022/colijnit-corecomponents_v12.mjs.map +1 -1
- package/index.d.ts +17 -2
- package/lib/components/simple-grid/style/_layout.scss +0 -2
- package/lib/components/simple-grid/style/_material-definition.scss +0 -2
- package/package.json +1 -1
|
@@ -7823,7 +7823,11 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
7823
7823
|
event.preventDefault();
|
|
7824
7824
|
}
|
|
7825
7825
|
}
|
|
7826
|
-
|
|
7826
|
+
const value = String(this.model ?? "");
|
|
7827
|
+
if (this.type === "number" &&
|
|
7828
|
+
this.maxLength > 0 &&
|
|
7829
|
+
value.length >= this.maxLength &&
|
|
7830
|
+
/^\d$/.test(key)) {
|
|
7827
7831
|
event.preventDefault();
|
|
7828
7832
|
}
|
|
7829
7833
|
}
|
|
@@ -11834,6 +11838,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11834
11838
|
args: ['document:mouseup', ['$event']]
|
|
11835
11839
|
}] } });
|
|
11836
11840
|
|
|
11841
|
+
var ScrollDirection;
|
|
11842
|
+
(function (ScrollDirection) {
|
|
11843
|
+
ScrollDirection["top"] = "top";
|
|
11844
|
+
ScrollDirection["bottom"] = "bottom";
|
|
11845
|
+
})(ScrollDirection || (ScrollDirection = {}));
|
|
11846
|
+
|
|
11837
11847
|
class ObserveVisibilityDirective {
|
|
11838
11848
|
_element;
|
|
11839
11849
|
threshold = 0;
|
|
@@ -12407,6 +12417,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12407
12417
|
changeDetection;
|
|
12408
12418
|
_formMaster;
|
|
12409
12419
|
defaultTextAlign = ColumnAlign.Left;
|
|
12420
|
+
scrollDirections = ScrollDirection;
|
|
12410
12421
|
set headerCells(cells) {
|
|
12411
12422
|
const headerElements = cells.toArray();
|
|
12412
12423
|
for (let i = 0; i < headerElements.length; i++) {
|
|
@@ -12425,6 +12436,8 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12425
12436
|
showColumnSort = false;
|
|
12426
12437
|
showRowButtons = false;
|
|
12427
12438
|
resetPageOnDataChange = true;
|
|
12439
|
+
scrollOnRowAction = true;
|
|
12440
|
+
scrollDirection = ScrollDirection.top;
|
|
12428
12441
|
/**
|
|
12429
12442
|
* Promise function, if provided should return boolean
|
|
12430
12443
|
*/
|
|
@@ -12575,7 +12588,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12575
12588
|
if (this.currentPage !== 1) {
|
|
12576
12589
|
this.currentPage = 1;
|
|
12577
12590
|
this.selectedRowIndex = -1;
|
|
12578
|
-
|
|
12591
|
+
this._scrollAfterRowAction();
|
|
12579
12592
|
}
|
|
12580
12593
|
this._detectChanges();
|
|
12581
12594
|
}
|
|
@@ -12588,7 +12601,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12588
12601
|
if (this.currentPage !== 1) {
|
|
12589
12602
|
this.currentPage = 1;
|
|
12590
12603
|
this.selectedRowIndex = -1;
|
|
12591
|
-
|
|
12604
|
+
this._scrollAfterRowAction();
|
|
12592
12605
|
}
|
|
12593
12606
|
this._detectChanges();
|
|
12594
12607
|
}
|
|
@@ -12932,7 +12945,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12932
12945
|
if (this._newRow) {
|
|
12933
12946
|
this.saveRow.next(this._newRowReference);
|
|
12934
12947
|
this._newRowReference = null; // clear
|
|
12935
|
-
|
|
12948
|
+
this._scrollAfterRowAction();
|
|
12936
12949
|
}
|
|
12937
12950
|
else {
|
|
12938
12951
|
let index = -1; // existing row
|
|
@@ -12963,8 +12976,20 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12963
12976
|
this.editing = false;
|
|
12964
12977
|
this.rowToEdit = undefined;
|
|
12965
12978
|
}
|
|
12979
|
+
_scrollAfterRowAction() {
|
|
12980
|
+
if (!this.scrollOnRowAction) {
|
|
12981
|
+
return;
|
|
12982
|
+
}
|
|
12983
|
+
const top = this.scrollDirection === ScrollDirection.top
|
|
12984
|
+
? 0
|
|
12985
|
+
: document.documentElement.scrollHeight;
|
|
12986
|
+
window.scrollTo({
|
|
12987
|
+
top: top,
|
|
12988
|
+
behavior: "smooth"
|
|
12989
|
+
});
|
|
12990
|
+
}
|
|
12966
12991
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridComponent, deps: [{ token: IconCacheService }, { token: i0.ChangeDetectorRef }, { token: FormMasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12967
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridComponent, isStandalone: false, selector: "co-simple-grid", inputs: { showAdd: "showAdd", showDelete: "showDelete", deselectAllowed: "deselectAllowed", editOnCellClick: "editOnCellClick", rightToolbar: "rightToolbar", showGridSettings: "showGridSettings", rowsPerPage: "rowsPerPage", rowDisabledFn: "rowDisabledFn", showColumnSort: "showColumnSort", showRowButtons: "showRowButtons", resetPageOnDataChange: "resetPageOnDataChange", canRowBeEdittedFn: "canRowBeEdittedFn" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.co-simple-grid": "this.showClass" } }, providers: [FormMasterService], viewQueries: [{ propertyName: "headerCells", predicate: ["headerCell"], descendants: true }, { propertyName: "rowElements", predicate: ["rowElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
12992
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridComponent, isStandalone: false, selector: "co-simple-grid", inputs: { showAdd: "showAdd", showDelete: "showDelete", deselectAllowed: "deselectAllowed", editOnCellClick: "editOnCellClick", rightToolbar: "rightToolbar", showGridSettings: "showGridSettings", rowsPerPage: "rowsPerPage", rowDisabledFn: "rowDisabledFn", showColumnSort: "showColumnSort", showRowButtons: "showRowButtons", resetPageOnDataChange: "resetPageOnDataChange", scrollOnRowAction: "scrollOnRowAction", scrollDirection: "scrollDirection", canRowBeEdittedFn: "canRowBeEdittedFn" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.co-simple-grid": "this.showClass" } }, providers: [FormMasterService], viewQueries: [{ propertyName: "headerCells", predicate: ["headerCell"], descendants: true }, { propertyName: "rowElements", predicate: ["rowElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
12968
12993
|
@if (showToolbar) {
|
|
12969
12994
|
<co-grid-toolbar
|
|
12970
12995
|
[class.right]="rightToolbar"
|
|
@@ -13404,6 +13429,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
13404
13429
|
type: Input
|
|
13405
13430
|
}], resetPageOnDataChange: [{
|
|
13406
13431
|
type: Input
|
|
13432
|
+
}], scrollOnRowAction: [{
|
|
13433
|
+
type: Input
|
|
13434
|
+
}], scrollDirection: [{
|
|
13435
|
+
type: Input
|
|
13407
13436
|
}], canRowBeEdittedFn: [{
|
|
13408
13437
|
type: Input
|
|
13409
13438
|
}], showClass: [{
|
|
@@ -13917,9 +13946,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
13917
13946
|
}]
|
|
13918
13947
|
}] });
|
|
13919
13948
|
|
|
13949
|
+
class LovUtils {
|
|
13950
|
+
static getDisplayValue(model, displayField) {
|
|
13951
|
+
if (!model || !displayField) {
|
|
13952
|
+
return '';
|
|
13953
|
+
}
|
|
13954
|
+
return displayField
|
|
13955
|
+
.split('|')
|
|
13956
|
+
.map(field => model[field.trim()])
|
|
13957
|
+
.filter(val => val != null && val !== '')
|
|
13958
|
+
.join(' - ');
|
|
13959
|
+
}
|
|
13960
|
+
}
|
|
13961
|
+
|
|
13920
13962
|
class ListOfValuesPopupComponent {
|
|
13921
13963
|
iconCacheService;
|
|
13922
13964
|
_elementRef;
|
|
13965
|
+
lovUtils = LovUtils;
|
|
13923
13966
|
set lovItems(children) {
|
|
13924
13967
|
this._lovItems = children.toArray();
|
|
13925
13968
|
this._scrollIntoView();
|
|
@@ -14050,7 +14093,7 @@ class ListOfValuesPopupComponent {
|
|
|
14050
14093
|
this.selectNextOption();
|
|
14051
14094
|
}
|
|
14052
14095
|
if (!this.model && this.searchTerm) {
|
|
14053
|
-
const wishModel = this.viewModelsMain.find(vmm => vmm.model
|
|
14096
|
+
const wishModel = this.viewModelsMain.find(vmm => LovUtils.getDisplayValue(vmm.model, this.displayField) === this.searchTerm);
|
|
14054
14097
|
if (wishModel) {
|
|
14055
14098
|
this.selectViewModel(wishModel);
|
|
14056
14099
|
}
|
|
@@ -14123,8 +14166,8 @@ class ListOfValuesPopupComponent {
|
|
|
14123
14166
|
}
|
|
14124
14167
|
if (!this.model)
|
|
14125
14168
|
return false;
|
|
14126
|
-
const selected = this.model
|
|
14127
|
-
const current = vm.model
|
|
14169
|
+
const selected = LovUtils.getDisplayValue(this.model, this.displayField);
|
|
14170
|
+
const current = LovUtils.getDisplayValue(vm.model, this.displayField);
|
|
14128
14171
|
return selected != null && current != null && selected === current;
|
|
14129
14172
|
}
|
|
14130
14173
|
_prepareViewModelsMain() {
|
|
@@ -14173,102 +14216,102 @@ class ListOfValuesPopupComponent {
|
|
|
14173
14216
|
}
|
|
14174
14217
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ListOfValuesPopupComponent, deps: [{ token: IconCacheService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
14175
14218
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListOfValuesPopupComponent, isStandalone: false, selector: "co-list-of-values-popup", inputs: { model: "model", multiselect: "multiselect", showToggleAll: "showToggleAll", displayField: "displayField", searchPlaceholder: "searchPlaceholder", customCssClass: "customCssClass", searchDisabled: "searchDisabled", parentForOverlay: "parentForOverlay", optionIcon: "optionIcon", collection: "collection" }, outputs: { modelChange: "modelChange", closePopup: "closePopup", keyDown: "keyDown" }, host: { properties: { "class.co-list-of-values-popup": "this.showClass", "class.lov-anim": "this.animBase", "class.lov-anim--open": "this.isOpen" } }, viewQueries: [{ propertyName: "dropDownList", first: true, predicate: ["dropDownList"], descendants: true, read: ElementRef }, { propertyName: "inputSearch", first: true, predicate: InputSearchComponent, descendants: true }, { propertyName: "lovItems", predicate: ["lovItem"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
-
|
|
14191
|
-
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14199
|
-
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
|
-
|
|
14205
|
-
|
|
14206
|
-
|
|
14207
|
-
|
|
14219
|
+
<div class="lov-options" [overlay]="parentForOverlay" [inheritWidth]="true" [ngClass]="customCssClass"
|
|
14220
|
+
id="lov-popup"
|
|
14221
|
+
role="listbox" [tabindex]="-1"
|
|
14222
|
+
(clickOutside)="closePopup.emit($event)">
|
|
14223
|
+
@if (multiselect) {
|
|
14224
|
+
<co-input-search
|
|
14225
|
+
tabindex="-1"
|
|
14226
|
+
[(model)]="searchTerm"
|
|
14227
|
+
[placeholder]="searchPlaceholder"
|
|
14228
|
+
(keydown)="handleInputKeyDown($event)"
|
|
14229
|
+
(modelChange)="filterViewModels()"></co-input-search>
|
|
14230
|
+
}
|
|
14231
|
+
@if (showToggleAll && multiselect) {
|
|
14232
|
+
<div class="row gap">
|
|
14233
|
+
<co-input-checkbox [model]="allSelected" (modelChange)="toggleAll()"></co-input-checkbox>
|
|
14234
|
+
<span [textContent]="'DESELECT_ALL' | coreLocalize" (click)="toggleAll()"></span>
|
|
14235
|
+
</div>
|
|
14236
|
+
}
|
|
14237
|
+
<ul class="dropdown-list" #dropDownList>
|
|
14238
|
+
@for (viewModel of viewModels; track viewModel; let index = $index) {
|
|
14239
|
+
<li
|
|
14240
|
+
#lovItem
|
|
14241
|
+
[class.selected]="viewModel === highLightModel || viewModels.length === 1"
|
|
14242
|
+
[class.active]="isActive(viewModel)"
|
|
14243
|
+
[class.highlighted]="viewModel === highLightModel"
|
|
14244
|
+
[attr.aria-selected]="isActive(viewModel)"
|
|
14245
|
+
(click)="selectViewModel(viewModel, !multiselect)"
|
|
14246
|
+
role="option">
|
|
14247
|
+
@if (!multiselect) {
|
|
14248
|
+
@if (viewModel.model[optionIcon]) {
|
|
14249
|
+
<co-icon class="input-text-left-icon" [iconData]="iconCacheService.getIcon(viewModel.model[optionIcon])">
|
|
14250
|
+
</co-icon>
|
|
14251
|
+
}
|
|
14252
|
+
<span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
|
|
14253
|
+
}
|
|
14254
|
+
@if (multiselect) {
|
|
14255
|
+
<co-input-checkbox [model]="viewModel.checked"
|
|
14256
|
+
(modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
|
|
14257
|
+
<span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
|
|
14258
|
+
}
|
|
14259
|
+
</li>
|
|
14208
14260
|
}
|
|
14209
|
-
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
<co-input-checkbox [model]="viewModel.checked"
|
|
14213
|
-
(modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
|
|
14214
|
-
<span class="lov-options-text" [textContent]="viewModel.model[displayField]"></span>
|
|
14215
|
-
}
|
|
14216
|
-
</li>
|
|
14217
|
-
}
|
|
14218
|
-
</ul>
|
|
14219
|
-
</div>
|
|
14220
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: InputCheckboxComponent, selector: "co-input-checkbox", inputs: ["cssClass", "clickableLabel"], outputs: ["modelChange"] }, { kind: "directive", type: OverlayDirective, selector: "[overlay]", inputs: ["overlay", "view", "inline", "keepInView", "inheritWidth", "rightAlign", "fullSize"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutside", "alwaysTrigger"], outputs: ["clickOutside"], exportAs: ["clickOutside"] }, { kind: "component", type: IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: InputSearchComponent, selector: "co-input-search", inputs: ["placeholder", "handleKeydown", "useLeftIcon", "useRightIcon", "leftIconData", "rightIconData", "centerLabel"], outputs: ["search", "isFocused", "leftIconClick", "rightIconClick"] }, { kind: "pipe", type: CoreLocalizePipe, name: "coreLocalize" }], encapsulation: i0.ViewEncapsulation.None });
|
|
14261
|
+
</ul>
|
|
14262
|
+
</div>
|
|
14263
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: InputCheckboxComponent, selector: "co-input-checkbox", inputs: ["cssClass", "clickableLabel"], outputs: ["modelChange"] }, { kind: "directive", type: OverlayDirective, selector: "[overlay]", inputs: ["overlay", "view", "inline", "keepInView", "inheritWidth", "rightAlign", "fullSize"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutside", "alwaysTrigger"], outputs: ["clickOutside"], exportAs: ["clickOutside"] }, { kind: "component", type: IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: InputSearchComponent, selector: "co-input-search", inputs: ["placeholder", "handleKeydown", "useLeftIcon", "useRightIcon", "leftIconData", "rightIconData", "centerLabel"], outputs: ["search", "isFocused", "leftIconClick", "rightIconClick"] }, { kind: "pipe", type: CoreLocalizePipe, name: "coreLocalize" }], encapsulation: i0.ViewEncapsulation.None });
|
|
14221
14264
|
}
|
|
14222
14265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ListOfValuesPopupComponent, decorators: [{
|
|
14223
14266
|
type: Component,
|
|
14224
14267
|
args: [{
|
|
14225
14268
|
selector: 'co-list-of-values-popup',
|
|
14226
14269
|
template: `
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14270
|
+
<div class="lov-options" [overlay]="parentForOverlay" [inheritWidth]="true" [ngClass]="customCssClass"
|
|
14271
|
+
id="lov-popup"
|
|
14272
|
+
role="listbox" [tabindex]="-1"
|
|
14273
|
+
(clickOutside)="closePopup.emit($event)">
|
|
14274
|
+
@if (multiselect) {
|
|
14275
|
+
<co-input-search
|
|
14276
|
+
tabindex="-1"
|
|
14277
|
+
[(model)]="searchTerm"
|
|
14278
|
+
[placeholder]="searchPlaceholder"
|
|
14279
|
+
(keydown)="handleInputKeyDown($event)"
|
|
14280
|
+
(modelChange)="filterViewModels()"></co-input-search>
|
|
14281
|
+
}
|
|
14282
|
+
@if (showToggleAll && multiselect) {
|
|
14283
|
+
<div class="row gap">
|
|
14284
|
+
<co-input-checkbox [model]="allSelected" (modelChange)="toggleAll()"></co-input-checkbox>
|
|
14285
|
+
<span [textContent]="'DESELECT_ALL' | coreLocalize" (click)="toggleAll()"></span>
|
|
14286
|
+
</div>
|
|
14287
|
+
}
|
|
14288
|
+
<ul class="dropdown-list" #dropDownList>
|
|
14289
|
+
@for (viewModel of viewModels; track viewModel; let index = $index) {
|
|
14290
|
+
<li
|
|
14291
|
+
#lovItem
|
|
14292
|
+
[class.selected]="viewModel === highLightModel || viewModels.length === 1"
|
|
14293
|
+
[class.active]="isActive(viewModel)"
|
|
14294
|
+
[class.highlighted]="viewModel === highLightModel"
|
|
14295
|
+
[attr.aria-selected]="isActive(viewModel)"
|
|
14296
|
+
(click)="selectViewModel(viewModel, !multiselect)"
|
|
14297
|
+
role="option">
|
|
14298
|
+
@if (!multiselect) {
|
|
14299
|
+
@if (viewModel.model[optionIcon]) {
|
|
14300
|
+
<co-icon class="input-text-left-icon" [iconData]="iconCacheService.getIcon(viewModel.model[optionIcon])">
|
|
14301
|
+
</co-icon>
|
|
14302
|
+
}
|
|
14303
|
+
<span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
|
|
14304
|
+
}
|
|
14305
|
+
@if (multiselect) {
|
|
14306
|
+
<co-input-checkbox [model]="viewModel.checked"
|
|
14307
|
+
(modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
|
|
14308
|
+
<span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
|
|
14309
|
+
}
|
|
14310
|
+
</li>
|
|
14259
14311
|
}
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
<co-input-checkbox [model]="viewModel.checked"
|
|
14264
|
-
(modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
|
|
14265
|
-
<span class="lov-options-text" [textContent]="viewModel.model[displayField]"></span>
|
|
14266
|
-
}
|
|
14267
|
-
</li>
|
|
14268
|
-
}
|
|
14269
|
-
</ul>
|
|
14270
|
-
</div>
|
|
14271
|
-
`,
|
|
14312
|
+
</ul>
|
|
14313
|
+
</div>
|
|
14314
|
+
`,
|
|
14272
14315
|
encapsulation: ViewEncapsulation.None,
|
|
14273
14316
|
standalone: false
|
|
14274
14317
|
}]
|
|
@@ -14327,6 +14370,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14327
14370
|
ngZoneWrapper;
|
|
14328
14371
|
elementRef;
|
|
14329
14372
|
icons = CoreComponentsIcon;
|
|
14373
|
+
lovUtils = LovUtils;
|
|
14330
14374
|
set model(value) {
|
|
14331
14375
|
super.model = value;
|
|
14332
14376
|
this._setSelectedModel();
|
|
@@ -14501,12 +14545,12 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14501
14545
|
optionChosen(option) {
|
|
14502
14546
|
if (option) {
|
|
14503
14547
|
if (this.multiselect) {
|
|
14504
|
-
this.selectedModels = option.map(o => o
|
|
14548
|
+
this.selectedModels = option.map(o => LovUtils.getDisplayValue(o, this.displayField));
|
|
14505
14549
|
}
|
|
14506
14550
|
else {
|
|
14507
|
-
this.selectedModel = option
|
|
14551
|
+
this.selectedModel = LovUtils.getDisplayValue(option, this.displayField);
|
|
14508
14552
|
if (this.largeCollection) {
|
|
14509
|
-
this.filterText = option
|
|
14553
|
+
this.filterText = LovUtils.getDisplayValue(option, this.displayField);
|
|
14510
14554
|
}
|
|
14511
14555
|
}
|
|
14512
14556
|
}
|
|
@@ -14531,7 +14575,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14531
14575
|
}
|
|
14532
14576
|
checkModel() {
|
|
14533
14577
|
if (!this.multiselect && this.selectedModel && this.collection) {
|
|
14534
|
-
const model = this.collection.find(c => c
|
|
14578
|
+
const model = this.collection.find(c => LovUtils.getDisplayValue(c, this.displayField) === this.selectedModel);
|
|
14535
14579
|
if (model) {
|
|
14536
14580
|
this.model = model;
|
|
14537
14581
|
}
|
|
@@ -14546,7 +14590,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14546
14590
|
if (this.model) {
|
|
14547
14591
|
this.selectedModels.length = 0;
|
|
14548
14592
|
this.model.forEach(m => {
|
|
14549
|
-
this.selectedModels.push(m
|
|
14593
|
+
this.selectedModels.push(LovUtils.getDisplayValue(m, this.displayField));
|
|
14550
14594
|
});
|
|
14551
14595
|
}
|
|
14552
14596
|
else {
|
|
@@ -14555,9 +14599,9 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14555
14599
|
}
|
|
14556
14600
|
else {
|
|
14557
14601
|
if (this.model) {
|
|
14558
|
-
this.selectedModel = this.model
|
|
14602
|
+
this.selectedModel = LovUtils.getDisplayValue(this.model, this.displayField);
|
|
14559
14603
|
if (this.largeCollection) {
|
|
14560
|
-
this.filterText = this.model
|
|
14604
|
+
this.filterText = LovUtils.getDisplayValue(this.model, this.displayField);
|
|
14561
14605
|
}
|
|
14562
14606
|
}
|
|
14563
14607
|
else {
|
|
@@ -14607,8 +14651,8 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14607
14651
|
<div class="multiselect-chips-wrapper">
|
|
14608
14652
|
@for (chip of model; track chip) {
|
|
14609
14653
|
<div class="chips">
|
|
14610
|
-
|
|
14611
|
-
|
|
14654
|
+
<span class="chips-description" [textContent]="lovUtils.getDisplayValue(chip, displayField)"></span>
|
|
14655
|
+
<co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
|
|
14612
14656
|
</div>
|
|
14613
14657
|
}
|
|
14614
14658
|
</div>
|
|
@@ -14671,8 +14715,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14671
14715
|
<div class="multiselect-chips-wrapper">
|
|
14672
14716
|
@for (chip of model; track chip) {
|
|
14673
14717
|
<div class="chips">
|
|
14674
|
-
|
|
14675
|
-
|
|
14718
|
+
<span class="chips-description" [textContent]="lovUtils.getDisplayValue(chip, displayField)"></span>
|
|
14719
|
+
<co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
|
|
14676
14720
|
</div>
|
|
14677
14721
|
}
|
|
14678
14722
|
</div>
|
|
@@ -20886,5 +20930,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
20886
20930
|
* Generated bundle index. Do not edit.
|
|
20887
20931
|
*/
|
|
20888
20932
|
|
|
20889
|
-
export { AlignWithDirective, AlignWithModule, AppendPipe, AppendPipeModule, ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CalendarTemplateComponent, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayComponent, CheckmarkOverlayModule, ClickOutsideDirective, ClickoutsideModule, CoCurrencyPipe, CoCurrencyPipeModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, CoreLocalizePipe, DoubleCalendarComponent, DoubleCalendarModule, DragDropContainer, DragDropContainerComponent, DragDropManagerService, DragDropModule, DraggableDirective, ElementPosition, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, HourSchedulingExpandableTemplateModule, HourSchedulingTestObjectComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, InputTimeComponent, InputTimeModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityDirective, ObserveVisibilityModule, OrientationOfDirection, OverlayDirective, OverlayModule, OverlayParentDirective, OverlayService, PaginatePipe, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PrependPipe, PrependPipeModule, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, ScrollContainerComponent, ScrollContainerModule, SimpleGridCellComponent, SimpleGridColumnDirective, SimpleGridColumnTemplateDirective, SimpleGridColumnTemplateType, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirective, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog };
|
|
20933
|
+
export { AlignWithDirective, AlignWithModule, AppendPipe, AppendPipeModule, ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CalendarTemplateComponent, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayComponent, CheckmarkOverlayModule, ClickOutsideDirective, ClickoutsideModule, CoCurrencyPipe, CoCurrencyPipeModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, CoreLocalizePipe, DoubleCalendarComponent, DoubleCalendarModule, DragDropContainer, DragDropContainerComponent, DragDropManagerService, DragDropModule, DraggableDirective, ElementPosition, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, HourSchedulingExpandableTemplateModule, HourSchedulingTestObjectComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, InputTimeComponent, InputTimeModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityDirective, ObserveVisibilityModule, OrientationOfDirection, OverlayDirective, OverlayModule, OverlayParentDirective, OverlayService, PaginatePipe, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PrependPipe, PrependPipeModule, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, ScrollContainerComponent, ScrollContainerModule, ScrollDirection, SimpleGridCellComponent, SimpleGridColumnDirective, SimpleGridColumnTemplateDirective, SimpleGridColumnTemplateType, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirective, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog };
|
|
20890
20934
|
//# sourceMappingURL=colijnit-corecomponents_v12.mjs.map
|