@colijnit/corecomponents_v12 260.1.17 → 261.1.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.
- package/bundles/colijnit-corecomponents_v12.umd.js +38 -21
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/filter-item/filter-item-viewmodel.js +2 -2
- package/esm2015/lib/components/filter-item/filter-item.component.js +14 -3
- package/esm2015/lib/components/input-text/input-text.component.js +27 -7
- package/esm2015/lib/components/list-of-values/list-of-values-popup.component.js +3 -3
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +53 -53
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +3 -13
- package/esm2015/lib/directives/screen-configuration/screen-configuration.directive.js +1 -1
- package/fesm2015/colijnit-corecomponents_v12.js +96 -75
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/filter-item/filter-item.component.d.ts +2 -0
- package/lib/components/input-text/input-text.component.d.ts +3 -1
- package/package.json +2 -2
|
@@ -5809,12 +5809,14 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
5809
5809
|
get hasRightIcon() {
|
|
5810
5810
|
return this.rightIcon !== undefined && this.rightIcon !== null;
|
|
5811
5811
|
}
|
|
5812
|
-
|
|
5812
|
+
handleDocumentPointerUp(event) {
|
|
5813
5813
|
if (this._isLeftIconMouseDown) {
|
|
5814
|
-
this.
|
|
5814
|
+
this._isLeftIconMouseDown = false;
|
|
5815
|
+
this.leftIconMouseUp.emit(event);
|
|
5815
5816
|
}
|
|
5816
5817
|
if (this._isRightIconMouseDown) {
|
|
5817
|
-
this.
|
|
5818
|
+
this._isRightIconMouseDown = false;
|
|
5819
|
+
this.rightIconMouseUp.emit(event);
|
|
5818
5820
|
}
|
|
5819
5821
|
}
|
|
5820
5822
|
set model(value) {
|
|
@@ -5878,6 +5880,22 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
5878
5880
|
this._isRightIconMouseDown = false;
|
|
5879
5881
|
this.rightIconMouseUp.emit(event);
|
|
5880
5882
|
}
|
|
5883
|
+
handleRightIconPointerDown(event) {
|
|
5884
|
+
var _a;
|
|
5885
|
+
event.preventDefault();
|
|
5886
|
+
event.stopPropagation();
|
|
5887
|
+
this._isRightIconMouseDown = true;
|
|
5888
|
+
this.rightIconMouseDown.emit(event);
|
|
5889
|
+
(_a = event.target) === null || _a === void 0 ? void 0 : _a.setPointerCapture(event.pointerId);
|
|
5890
|
+
}
|
|
5891
|
+
handleRightIconPointerUp(event) {
|
|
5892
|
+
var _a;
|
|
5893
|
+
event.preventDefault();
|
|
5894
|
+
event.stopPropagation();
|
|
5895
|
+
this._isRightIconMouseDown = false;
|
|
5896
|
+
this.rightIconMouseUp.emit(event);
|
|
5897
|
+
(_a = event.target) === null || _a === void 0 ? void 0 : _a.releasePointerCapture(event.pointerId);
|
|
5898
|
+
}
|
|
5881
5899
|
handleInputFocus(event) {
|
|
5882
5900
|
event.preventDefault();
|
|
5883
5901
|
event.stopPropagation();
|
|
@@ -6037,8 +6055,10 @@ InputTextComponent.decorators = [
|
|
|
6037
6055
|
<div *ngIf="rightIcon || rightIconData" class="spacer right-icon"></div>
|
|
6038
6056
|
<co-icon *ngIf="rightIcon || rightIconData" class="input-text-right-icon" [icon]="rightIcon"
|
|
6039
6057
|
[iconData]="rightIconData"
|
|
6040
|
-
(click)="handleRightIconClick($event)"
|
|
6041
|
-
(
|
|
6058
|
+
(click)="handleRightIconClick($event)"
|
|
6059
|
+
(pointerdown)="handleRightIconPointerDown($event)"
|
|
6060
|
+
(pointerup)="handleRightIconPointerUp($event)"
|
|
6061
|
+
(pointercancel)="handleRightIconPointerUp($event)"></co-icon>
|
|
6042
6062
|
</div>
|
|
6043
6063
|
<!--
|
|
6044
6064
|
<co-commit-buttons *ngIf="showSaveCancel && focused && canSaveOrCancel"
|
|
@@ -6108,7 +6128,7 @@ InputTextComponent.propDecorators = {
|
|
|
6108
6128
|
hasLeftIcon: [{ type: HostBinding, args: ['class.has-left-icon',] }],
|
|
6109
6129
|
hasRightIcon: [{ type: HostBinding, args: ['class.has-right-icon',] }],
|
|
6110
6130
|
hasOwnLabel: [{ type: HostBinding, args: ['class.has-own-label',] }],
|
|
6111
|
-
|
|
6131
|
+
handleDocumentPointerUp: [{ type: HostListener, args: ['document:pointerup', ['$event'],] }, { type: HostListener, args: ['document:pointercancel', ['$event'],] }],
|
|
6112
6132
|
model: [{ type: Input }]
|
|
6113
6133
|
};
|
|
6114
6134
|
|
|
@@ -10136,24 +10156,14 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
10136
10156
|
if (this._newRow) {
|
|
10137
10157
|
this.saveRow.next(this._newRowReference);
|
|
10138
10158
|
this._newRowReference = null; // clear
|
|
10159
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
10139
10160
|
}
|
|
10140
10161
|
else {
|
|
10141
10162
|
let index = -1; // existing row
|
|
10142
|
-
if (this.rowsPerPage) {
|
|
10143
|
-
index = (this.currentPage - 1) * this.rowsPerPage + this.editRowIndex;
|
|
10144
|
-
}
|
|
10145
|
-
else {
|
|
10146
|
-
index = this.editRowIndex;
|
|
10147
|
-
}
|
|
10148
10163
|
if (index >= 0 && index < this.data.length) {
|
|
10149
|
-
this.saveRow.next(this.data[
|
|
10164
|
+
this.saveRow.next(this.data[this.editRowIndex]);
|
|
10150
10165
|
}
|
|
10151
10166
|
}
|
|
10152
|
-
if (this.currentPage !== 1) {
|
|
10153
|
-
this.currentPage = 1;
|
|
10154
|
-
this.selectedRowIndex = -1;
|
|
10155
|
-
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
10156
|
-
}
|
|
10157
10167
|
this._newRow = false;
|
|
10158
10168
|
if (stopediting) {
|
|
10159
10169
|
this._resetEdit();
|
|
@@ -11420,11 +11430,11 @@ class ListOfValuesPopupComponent {
|
|
|
11420
11430
|
this.viewModels.length = 0;
|
|
11421
11431
|
this.viewModels = this.viewModelsMain.filter(vm => {
|
|
11422
11432
|
return Object.values(vm.model).some((value) => {
|
|
11423
|
-
if (!this.searchTerm
|
|
11433
|
+
if (!this.searchTerm) {
|
|
11424
11434
|
return true;
|
|
11425
11435
|
}
|
|
11426
11436
|
else {
|
|
11427
|
-
return value.toString().toLowerCase().includes(this.searchTerm.toLowerCase());
|
|
11437
|
+
return value && value.toString().toLowerCase().includes(this.searchTerm.toLowerCase());
|
|
11428
11438
|
}
|
|
11429
11439
|
});
|
|
11430
11440
|
});
|
|
@@ -11752,58 +11762,58 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
11752
11762
|
ListOfValuesComponent.decorators = [
|
|
11753
11763
|
{ type: Component, args: [{
|
|
11754
11764
|
selector: 'co-list-of-values',
|
|
11755
|
-
template: `
|
|
11756
|
-
<co-input-text
|
|
11757
|
-
*ngIf="!largeCollection"
|
|
11758
|
-
aria-haspopup="listbox"
|
|
11759
|
-
[attr.aria-expanded]="isSelectOpen"
|
|
11760
|
-
aria-controls="lov-popup"
|
|
11761
|
-
role="combobox"
|
|
11762
|
-
class="no-focus-line"
|
|
11763
|
-
overlayParent
|
|
11764
|
-
#parentForOverlay="overlayParent"
|
|
11765
|
-
type="text"
|
|
11766
|
-
[id]="label"
|
|
11767
|
-
[model]="multiselect ? ((!selectedModels || selectedModels.length === 0) ? null : selectedModels ) : selectedModel"
|
|
11768
|
-
[placeholder]="label"
|
|
11769
|
-
[myFormInputInstance]="this"
|
|
11770
|
-
[readonly]="readonly"
|
|
11771
|
-
[disabled]="disabled"
|
|
11772
|
-
[required]="required"
|
|
11773
|
-
[noClickFocus]="false"
|
|
11774
|
-
[leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
|
|
11775
|
-
[rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
|
|
11776
|
-
[showClearButton]="true"
|
|
11777
|
-
[useContent]="multiselect"
|
|
11778
|
-
[customHeight]="multiselect"
|
|
11779
|
-
[keepFocussed]="keepFocussed"
|
|
11780
|
-
(modelChange)="handleInputModelChange($event)"
|
|
11781
|
-
(click)="openPopup()"
|
|
11782
|
-
(rightIconClick)="toggleSelect()"
|
|
11783
|
-
(keydown)="handleInputKeyDown($event)"
|
|
11784
|
-
(clearIconClick)="clearModel($event)"
|
|
11785
|
-
(blur)="checkModel()">
|
|
11786
|
-
<ng-container *ngIf="multiselect && showChips">
|
|
11787
|
-
<div class="multiselect-chips-wrapper">
|
|
11788
|
-
<div class="chips" *ngFor="let chip of model">
|
|
11789
|
-
<span class="chips-description" [textContent]="chip[displayField]"></span>
|
|
11790
|
-
<co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
|
|
11791
|
-
</div>
|
|
11792
|
-
</div>
|
|
11793
|
-
</ng-container>
|
|
11794
|
-
</co-input-text>
|
|
11795
|
-
|
|
11796
|
-
<co-input-text
|
|
11797
|
-
*ngIf="largeCollection"
|
|
11798
|
-
[model]="filterText"
|
|
11799
|
-
[placeholder]="label"
|
|
11800
|
-
[required]="required"
|
|
11801
|
-
[disabled]="disabled"
|
|
11802
|
-
[readonly]="readonly"
|
|
11803
|
-
(modelChange)="onModelChange($event)">
|
|
11804
|
-
</co-input-text>
|
|
11805
|
-
<div *ngIf="isLoading" class="filter-loader"><span></span></div>
|
|
11806
|
-
<input type="hidden" [ngModel]="(selectedModels && selectedModels.length) || selectedModel ? model : null">
|
|
11765
|
+
template: `
|
|
11766
|
+
<co-input-text
|
|
11767
|
+
*ngIf="!largeCollection"
|
|
11768
|
+
aria-haspopup="listbox"
|
|
11769
|
+
[attr.aria-expanded]="isSelectOpen"
|
|
11770
|
+
aria-controls="lov-popup"
|
|
11771
|
+
role="combobox"
|
|
11772
|
+
class="no-focus-line"
|
|
11773
|
+
overlayParent
|
|
11774
|
+
#parentForOverlay="overlayParent"
|
|
11775
|
+
type="text"
|
|
11776
|
+
[id]="label"
|
|
11777
|
+
[model]="multiselect ? ((!selectedModels || selectedModels.length === 0) ? null : selectedModels ) : selectedModel"
|
|
11778
|
+
[placeholder]="label"
|
|
11779
|
+
[myFormInputInstance]="this"
|
|
11780
|
+
[readonly]="readonly"
|
|
11781
|
+
[disabled]="disabled"
|
|
11782
|
+
[required]="required"
|
|
11783
|
+
[noClickFocus]="false"
|
|
11784
|
+
[leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
|
|
11785
|
+
[rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
|
|
11786
|
+
[showClearButton]="true"
|
|
11787
|
+
[useContent]="multiselect"
|
|
11788
|
+
[customHeight]="multiselect"
|
|
11789
|
+
[keepFocussed]="keepFocussed"
|
|
11790
|
+
(modelChange)="handleInputModelChange($event)"
|
|
11791
|
+
(click)="openPopup()"
|
|
11792
|
+
(rightIconClick)="toggleSelect()"
|
|
11793
|
+
(keydown)="handleInputKeyDown($event)"
|
|
11794
|
+
(clearIconClick)="clearModel($event)"
|
|
11795
|
+
(blur)="checkModel()">
|
|
11796
|
+
<ng-container *ngIf="multiselect && showChips">
|
|
11797
|
+
<div class="multiselect-chips-wrapper">
|
|
11798
|
+
<div class="chips" *ngFor="let chip of model">
|
|
11799
|
+
<span class="chips-description" [textContent]="chip[displayField]"></span>
|
|
11800
|
+
<co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
|
|
11801
|
+
</div>
|
|
11802
|
+
</div>
|
|
11803
|
+
</ng-container>
|
|
11804
|
+
</co-input-text>
|
|
11805
|
+
|
|
11806
|
+
<co-input-text
|
|
11807
|
+
*ngIf="largeCollection"
|
|
11808
|
+
[model]="filterText"
|
|
11809
|
+
[placeholder]="label"
|
|
11810
|
+
[required]="required"
|
|
11811
|
+
[disabled]="disabled"
|
|
11812
|
+
[readonly]="readonly"
|
|
11813
|
+
(modelChange)="onModelChange($event)">
|
|
11814
|
+
</co-input-text>
|
|
11815
|
+
<div *ngIf="isLoading" class="filter-loader"><span></span></div>
|
|
11816
|
+
<input type="hidden" [ngModel]="(selectedModels && selectedModels.length) || selectedModel ? model : null">
|
|
11807
11817
|
`,
|
|
11808
11818
|
providers: [
|
|
11809
11819
|
OverlayService,
|
|
@@ -12488,6 +12498,7 @@ class FilterItemComponent {
|
|
|
12488
12498
|
this.sliderDefaultMax = 100000;
|
|
12489
12499
|
this.fullRangeIsNull = false;
|
|
12490
12500
|
this.canFilterByCode = false;
|
|
12501
|
+
this.alwaysShowButton = false;
|
|
12491
12502
|
this.modelChange = new EventEmitter();
|
|
12492
12503
|
this.collectionChange = new EventEmitter();
|
|
12493
12504
|
this.filterButtonClicked = new EventEmitter();
|
|
@@ -12691,6 +12702,7 @@ class FilterItemComponent {
|
|
|
12691
12702
|
return true;
|
|
12692
12703
|
}
|
|
12693
12704
|
});
|
|
12705
|
+
this._sortCollectionByChecked();
|
|
12694
12706
|
this.isLoading = false;
|
|
12695
12707
|
this._changeDetector.detectChanges();
|
|
12696
12708
|
});
|
|
@@ -13211,6 +13223,8 @@ class FilterItemComponent {
|
|
|
13211
13223
|
var _a;
|
|
13212
13224
|
const modeWithoutCollection = this.mode === this.modes.DateField ||
|
|
13213
13225
|
this.mode === this.modes.DateRangeField ||
|
|
13226
|
+
this.mode === this.modes.TextField ||
|
|
13227
|
+
this.mode === this.modes.CheckboxToText ||
|
|
13214
13228
|
this.mode === this.modes.Slider;
|
|
13215
13229
|
const canApplyDefaults = (modeWithoutCollection || (!modeWithoutCollection && this.collection && this.collection.length > 0)) &&
|
|
13216
13230
|
this.defaultValue &&
|
|
@@ -13257,8 +13271,12 @@ class FilterItemComponent {
|
|
|
13257
13271
|
this._applyDefaultForCheckbox();
|
|
13258
13272
|
break;
|
|
13259
13273
|
}
|
|
13274
|
+
this._sortCollectionByChecked();
|
|
13260
13275
|
this._defaultSet = true;
|
|
13261
13276
|
}
|
|
13277
|
+
_sortCollectionByChecked() {
|
|
13278
|
+
this.filteredCollection.sort((a, b) => (a.checked === b.checked) ? 0 : a.checked ? -1 : 1);
|
|
13279
|
+
}
|
|
13262
13280
|
}
|
|
13263
13281
|
FilterItemComponent.decorators = [
|
|
13264
13282
|
{ type: Component, args: [{
|
|
@@ -13270,7 +13288,7 @@ FilterItemComponent.decorators = [
|
|
|
13270
13288
|
[expandButtonLast]="true"
|
|
13271
13289
|
[iconData]="iconService.getIcon(icons.ArrowPointDown)"
|
|
13272
13290
|
[expanded]="expanded"
|
|
13273
|
-
[showButton]="showButton"
|
|
13291
|
+
[showButton]="showButton || alwaysShowButton"
|
|
13274
13292
|
[buttonText]="filterButtonLabel"
|
|
13275
13293
|
(buttonClicked)="onButtonClicked()"
|
|
13276
13294
|
>
|
|
@@ -13383,9 +13401,10 @@ FilterItemComponent.decorators = [
|
|
|
13383
13401
|
(modelChange)="handleModelChange(sliderMax)"
|
|
13384
13402
|
></co-input-text>
|
|
13385
13403
|
</div>
|
|
13386
|
-
<div class="co-filter-item-checkbox-content" *ngIf="mode === modes.Checkbox
|
|
13404
|
+
<div class="co-filter-item-checkbox-content" *ngIf="mode === modes.Checkbox">
|
|
13387
13405
|
<co-input-checkbox
|
|
13388
13406
|
[(model)]="model"
|
|
13407
|
+
[clickableLabel]="false"
|
|
13389
13408
|
(modelChange)="handleModelChange($event)"
|
|
13390
13409
|
[readonly]="readonly"
|
|
13391
13410
|
[label]="placeholder">
|
|
@@ -13395,6 +13414,7 @@ FilterItemComponent.decorators = [
|
|
|
13395
13414
|
*ngIf="mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary || mode === modes.CheckboxToTFSimpleText || mode === modes.CheckboxToTFText">
|
|
13396
13415
|
<co-input-checkbox
|
|
13397
13416
|
[(model)]="checkBoxToTextModel"
|
|
13417
|
+
[clickableLabel]="false"
|
|
13398
13418
|
(modelChange)="handleModelChange($event)"
|
|
13399
13419
|
[readonly]="readonly"
|
|
13400
13420
|
[label]="placeholder"></co-input-checkbox>
|
|
@@ -13457,6 +13477,7 @@ FilterItemComponent.propDecorators = {
|
|
|
13457
13477
|
fullRangeIsNull: [{ type: Input }],
|
|
13458
13478
|
canFilterByCode: [{ type: Input }],
|
|
13459
13479
|
firstDayOfWeek: [{ type: Input }],
|
|
13480
|
+
alwaysShowButton: [{ type: Input }],
|
|
13460
13481
|
model: [{ type: Input }],
|
|
13461
13482
|
modelChange: [{ type: Output }],
|
|
13462
13483
|
collectionChange: [{ type: Output }],
|
|
@@ -13630,7 +13651,7 @@ class FilterItemViewmodel {
|
|
|
13630
13651
|
constructor(code, description, checked, count, valueName) {
|
|
13631
13652
|
this.checked = false;
|
|
13632
13653
|
this.code = code;
|
|
13633
|
-
this.description = description
|
|
13654
|
+
this.description = description ? description.toString() : (code ? code.toString() : '');
|
|
13634
13655
|
this.checked = checked;
|
|
13635
13656
|
this.count = count;
|
|
13636
13657
|
this.valueName = valueName;
|