@colijnit/corecomponents_v12 260.1.15 → 260.1.17
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 +74 -34
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/base/base-input.component.js +5 -16
- package/esm2015/lib/components/base/commit-buttons/commit-buttons.component.js +2 -2
- package/esm2015/lib/components/filter-item/filter-item.component.js +55 -8
- package/esm2015/lib/components/input-text/input-text.component.js +3 -1
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +53 -53
- package/esm2015/lib/core/enum/filterItem-mode.enum.js +9 -3
- package/esm2015/lib/directives/screen-configuration/screen-configuration.directive.js +2 -2
- package/fesm2015/colijnit-corecomponents_v12.js +122 -78
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +1 -3
- package/lib/components/filter-item/filter-item.component.d.ts +3 -0
- package/lib/core/enum/filterItem-mode.enum.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1835,7 +1835,7 @@ CommitButtonsComponent.decorators = [
|
|
|
1835
1835
|
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52" *ngIf="firstShow || commitFinished">
|
|
1836
1836
|
<path class="checkmark-check" [class.first-show]="firstShow" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/></svg>
|
|
1837
1837
|
</div>
|
|
1838
|
-
<div class="commit-buttons-button cancel" (click)="cancelClick.emit($event)">
|
|
1838
|
+
<div class="commit-buttons-button cancel" (mousedown)="$event.preventDefault()" (click)="cancelClick.emit($event)">
|
|
1839
1839
|
<div class="cancel-button"></div>
|
|
1840
1840
|
</div>
|
|
1841
1841
|
</div>
|
|
@@ -1907,8 +1907,8 @@ class BaseInputComponent {
|
|
|
1907
1907
|
this.excludeUserModelChange = false;
|
|
1908
1908
|
this.noFormGroupControl = false;
|
|
1909
1909
|
this.keepFocus = false;
|
|
1910
|
-
this.canceled = false;
|
|
1911
1910
|
this.validationError = '';
|
|
1911
|
+
this.shouldCommit = true;
|
|
1912
1912
|
this._markedAsUserTouched = false;
|
|
1913
1913
|
this._destroyed = false;
|
|
1914
1914
|
this._hasOnPushCdStrategy = false;
|
|
@@ -2207,8 +2207,7 @@ class BaseInputComponent {
|
|
|
2207
2207
|
this.input = undefined;
|
|
2208
2208
|
}
|
|
2209
2209
|
cancelClick(event) {
|
|
2210
|
-
this.
|
|
2211
|
-
this.conditionResolver(this.canceled);
|
|
2210
|
+
this.shouldCommit = false;
|
|
2212
2211
|
this.keepFocus = true;
|
|
2213
2212
|
if (this._initialModelSet) {
|
|
2214
2213
|
this.model = this._initialModel;
|
|
@@ -2262,20 +2261,9 @@ class BaseInputComponent {
|
|
|
2262
2261
|
}
|
|
2263
2262
|
this.focus.next();
|
|
2264
2263
|
}
|
|
2265
|
-
waitForCancelCondition() {
|
|
2266
|
-
return new Promise((resolve) => {
|
|
2267
|
-
this.conditionResolver = resolve; // Save the resolver to be called later
|
|
2268
|
-
});
|
|
2269
|
-
}
|
|
2270
2264
|
doBlur(event, handleCommit = true) {
|
|
2271
2265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2272
|
-
|
|
2273
|
-
const result = yield Promise.race([this.waitForCancelCondition(), cancelTimeout]);
|
|
2274
|
-
// If canceled
|
|
2275
|
-
if (result) {
|
|
2276
|
-
return;
|
|
2277
|
-
}
|
|
2278
|
-
if (this.showSaveCancel && handleCommit && this._modelDirtyForCommit) {
|
|
2266
|
+
if (this.showSaveCancel && handleCommit && this._modelDirtyForCommit && this.shouldCommit) {
|
|
2279
2267
|
yield this._handleCommit(event, false);
|
|
2280
2268
|
}
|
|
2281
2269
|
setTimeout(() => {
|
|
@@ -2411,6 +2399,7 @@ class BaseInputComponent {
|
|
|
2411
2399
|
return true;
|
|
2412
2400
|
}
|
|
2413
2401
|
this.keepFocus = true;
|
|
2402
|
+
this.shouldCommit = true;
|
|
2414
2403
|
if (this._commitButtonsComponentRef) {
|
|
2415
2404
|
this._commitButtonsComponentRef.instance.commitFinished = false;
|
|
2416
2405
|
this._commitButtonsComponentRef.instance.committing = true;
|
|
@@ -5253,12 +5242,18 @@ var FilterItemMode;
|
|
|
5253
5242
|
// It's value will be passed along directly as a boolean.
|
|
5254
5243
|
FilterItemMode["Checkbox"] = "checkbox";
|
|
5255
5244
|
//This mode makes the Filter display a simple checkBox.
|
|
5256
|
-
// It's value will be passed along as either a '
|
|
5245
|
+
// It's value will be passed along as either a 'J' or and 'N'.
|
|
5257
5246
|
FilterItemMode["CheckboxToSimpleText"] = "checkboxToSimpleText";
|
|
5258
5247
|
//This mode makes the Filter display a simple checkBox.
|
|
5259
|
-
// It's value will be passed along as either a "?='
|
|
5248
|
+
// It's value will be passed along as either a "?='J'" or and "?='N'".
|
|
5260
5249
|
FilterItemMode["CheckboxToText"] = "checkboxToText";
|
|
5261
5250
|
//This mode makes the Filter display a simple checkBox.
|
|
5251
|
+
// It's value will be passed along as either a 'T' or and 'F'.
|
|
5252
|
+
FilterItemMode["CheckboxToTFSimpleText"] = "checkboxToTFSimpleText";
|
|
5253
|
+
//This mode makes the Filter display a simple checkBox.
|
|
5254
|
+
// It's value will be passed along as either a "?='T'" or and "?='F'".
|
|
5255
|
+
FilterItemMode["CheckboxToTFText"] = "checkboxToTFText";
|
|
5256
|
+
//This mode makes the Filter display a simple checkBox.
|
|
5262
5257
|
// It's value will be passed along as either a 1 or and 0.
|
|
5263
5258
|
FilterItemMode["CheckboxToBinary"] = "checkboxToBinary";
|
|
5264
5259
|
})(FilterItemMode || (FilterItemMode = {}));
|
|
@@ -5909,6 +5904,8 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
5909
5904
|
}
|
|
5910
5905
|
clearInput(event) {
|
|
5911
5906
|
this.setModel(null);
|
|
5907
|
+
this.keepFocus = true;
|
|
5908
|
+
this.shouldCommit = false;
|
|
5912
5909
|
this.clearIconClick.emit(event);
|
|
5913
5910
|
}
|
|
5914
5911
|
handleKeyDownInput(event) {
|
|
@@ -11755,58 +11752,58 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
11755
11752
|
ListOfValuesComponent.decorators = [
|
|
11756
11753
|
{ type: Component, args: [{
|
|
11757
11754
|
selector: 'co-list-of-values',
|
|
11758
|
-
template: `
|
|
11759
|
-
<co-input-text
|
|
11760
|
-
*ngIf="!largeCollection"
|
|
11761
|
-
aria-haspopup="listbox"
|
|
11762
|
-
[attr.aria-expanded]="isSelectOpen"
|
|
11763
|
-
aria-controls="lov-popup"
|
|
11764
|
-
role="combobox"
|
|
11765
|
-
class="no-focus-line"
|
|
11766
|
-
overlayParent
|
|
11767
|
-
#parentForOverlay="overlayParent"
|
|
11768
|
-
type="text"
|
|
11769
|
-
[id]="label"
|
|
11770
|
-
[model]="multiselect ? selectedModels : selectedModel"
|
|
11771
|
-
[placeholder]="label"
|
|
11772
|
-
[myFormInputInstance]="this"
|
|
11773
|
-
[readonly]="readonly"
|
|
11774
|
-
[disabled]="disabled"
|
|
11775
|
-
[required]="required"
|
|
11776
|
-
[noClickFocus]="false"
|
|
11777
|
-
[leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
|
|
11778
|
-
[rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
|
|
11779
|
-
[showClearButton]="true"
|
|
11780
|
-
[useContent]="multiselect"
|
|
11781
|
-
[customHeight]="multiselect"
|
|
11782
|
-
[keepFocussed]="keepFocussed"
|
|
11783
|
-
(modelChange)="handleInputModelChange($event)"
|
|
11784
|
-
(click)="openPopup()"
|
|
11785
|
-
(rightIconClick)="toggleSelect()"
|
|
11786
|
-
(keydown)="handleInputKeyDown($event)"
|
|
11787
|
-
(clearIconClick)="clearModel($event)"
|
|
11788
|
-
(blur)="checkModel()">
|
|
11789
|
-
<ng-container *ngIf="multiselect && showChips">
|
|
11790
|
-
<div class="multiselect-chips-wrapper">
|
|
11791
|
-
<div class="chips" *ngFor="let chip of model">
|
|
11792
|
-
<span class="chips-description" [textContent]="chip[displayField]"></span>
|
|
11793
|
-
<co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
|
|
11794
|
-
</div>
|
|
11795
|
-
</div>
|
|
11796
|
-
</ng-container>
|
|
11797
|
-
</co-input-text>
|
|
11798
|
-
|
|
11799
|
-
<co-input-text
|
|
11800
|
-
*ngIf="largeCollection"
|
|
11801
|
-
[model]="filterText"
|
|
11802
|
-
[placeholder]="label"
|
|
11803
|
-
[required]="required"
|
|
11804
|
-
[disabled]="disabled"
|
|
11805
|
-
[readonly]="readonly"
|
|
11806
|
-
(modelChange)="onModelChange($event)">
|
|
11807
|
-
</co-input-text>
|
|
11808
|
-
<div *ngIf="isLoading" class="filter-loader"><span></span></div>
|
|
11809
|
-
<input type="hidden" [ngModel]="model">
|
|
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">
|
|
11810
11807
|
`,
|
|
11811
11808
|
providers: [
|
|
11812
11809
|
OverlayService,
|
|
@@ -12609,10 +12606,18 @@ class FilterItemComponent {
|
|
|
12609
12606
|
this.showButton = true;
|
|
12610
12607
|
this._createModelForCheckboxToText();
|
|
12611
12608
|
break;
|
|
12609
|
+
case this.modes.CheckboxToTFText:
|
|
12610
|
+
this.showButton = true;
|
|
12611
|
+
this._createModelForCheckboxToTFText();
|
|
12612
|
+
break;
|
|
12612
12613
|
case this.modes.CheckboxToSimpleText:
|
|
12613
12614
|
this.showButton = true;
|
|
12614
12615
|
this._createModelForCheckboxToSimpleText();
|
|
12615
12616
|
break;
|
|
12617
|
+
case this.modes.CheckboxToTFSimpleText:
|
|
12618
|
+
this.showButton = true;
|
|
12619
|
+
this._createModelForCheckboxToTFSimpleText();
|
|
12620
|
+
break;
|
|
12616
12621
|
case this.modes.CheckboxToBinary:
|
|
12617
12622
|
this.showButton = true;
|
|
12618
12623
|
this._createModelForCheckboxToBinary();
|
|
@@ -12736,6 +12741,10 @@ class FilterItemComponent {
|
|
|
12736
12741
|
case this.modes.CheckboxToSimpleText:
|
|
12737
12742
|
this._readModelForCheckboxToText(newModel);
|
|
12738
12743
|
break;
|
|
12744
|
+
case this.modes.CheckboxToTFText:
|
|
12745
|
+
case this.modes.CheckboxToTFSimpleText:
|
|
12746
|
+
this._readModelForCheckboxToTFText(newModel);
|
|
12747
|
+
break;
|
|
12739
12748
|
case this.modes.CheckboxToBinary:
|
|
12740
12749
|
this._readModelForCheckboxToBinary(newModel);
|
|
12741
12750
|
break;
|
|
@@ -12840,6 +12849,14 @@ class FilterItemComponent {
|
|
|
12840
12849
|
this._model = "?='N'";
|
|
12841
12850
|
}
|
|
12842
12851
|
}
|
|
12852
|
+
_createModelForCheckboxToTFText() {
|
|
12853
|
+
if (this.checkBoxToTextModel) {
|
|
12854
|
+
this._model = "?='T'";
|
|
12855
|
+
}
|
|
12856
|
+
else {
|
|
12857
|
+
this._model = "?='F'";
|
|
12858
|
+
}
|
|
12859
|
+
}
|
|
12843
12860
|
_createModelForCheckboxToSimpleText() {
|
|
12844
12861
|
if (this.checkBoxToTextModel) {
|
|
12845
12862
|
this._model = "J";
|
|
@@ -12848,6 +12865,14 @@ class FilterItemComponent {
|
|
|
12848
12865
|
this._model = "N";
|
|
12849
12866
|
}
|
|
12850
12867
|
}
|
|
12868
|
+
_createModelForCheckboxToTFSimpleText() {
|
|
12869
|
+
if (this.checkBoxToTextModel) {
|
|
12870
|
+
this._model = "T";
|
|
12871
|
+
}
|
|
12872
|
+
else {
|
|
12873
|
+
this._model = "F";
|
|
12874
|
+
}
|
|
12875
|
+
}
|
|
12851
12876
|
_createModelForCheckboxToBinary() {
|
|
12852
12877
|
if (this.checkBoxToTextModel) {
|
|
12853
12878
|
this._model = 1;
|
|
@@ -12965,6 +12990,15 @@ class FilterItemComponent {
|
|
|
12965
12990
|
this.checkBoxToTextModel = false;
|
|
12966
12991
|
}
|
|
12967
12992
|
}
|
|
12993
|
+
_readModelForCheckboxToTFText(checkboxToTextModel) {
|
|
12994
|
+
this._model = checkboxToTextModel;
|
|
12995
|
+
if (checkboxToTextModel !== undefined && checkboxToTextModel !== null) {
|
|
12996
|
+
this.checkBoxToTextModel = (checkboxToTextModel.indexOf('T') > -1);
|
|
12997
|
+
}
|
|
12998
|
+
else {
|
|
12999
|
+
this.checkBoxToTextModel = false;
|
|
13000
|
+
}
|
|
13001
|
+
}
|
|
12968
13002
|
_readModelForCheckboxToBinary(checkboxToBinary) {
|
|
12969
13003
|
this._model = checkboxToBinary;
|
|
12970
13004
|
if (checkboxToBinary !== undefined && checkboxToBinary !== null) {
|
|
@@ -13085,12 +13119,20 @@ class FilterItemComponent {
|
|
|
13085
13119
|
}
|
|
13086
13120
|
_applyDefaultForCheckboxToText() {
|
|
13087
13121
|
const defaultString = this.defaultValue.toString().toUpperCase();
|
|
13088
|
-
this.checkBoxToTextModel = (defaultString === 'J' || defaultString === 'Y' || defaultString === 'TRUE');
|
|
13089
|
-
|
|
13090
|
-
this.
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
this.
|
|
13122
|
+
this.checkBoxToTextModel = (defaultString === 'J' || defaultString === 'T' || defaultString === 'Y' || defaultString === 'TRUE');
|
|
13123
|
+
switch (this.mode) {
|
|
13124
|
+
case this.modes.CheckboxToText:
|
|
13125
|
+
this._createModelForCheckboxToText();
|
|
13126
|
+
break;
|
|
13127
|
+
case this.modes.CheckboxToSimpleText:
|
|
13128
|
+
this._createModelForCheckboxToSimpleText();
|
|
13129
|
+
break;
|
|
13130
|
+
case this.modes.CheckboxToTFText:
|
|
13131
|
+
this._createModelForCheckboxToTFText();
|
|
13132
|
+
break;
|
|
13133
|
+
case this.modes.CheckboxToTFSimpleText:
|
|
13134
|
+
this._createModelForCheckboxToTFSimpleText();
|
|
13135
|
+
break;
|
|
13094
13136
|
}
|
|
13095
13137
|
this.modelChange.emit(this._model);
|
|
13096
13138
|
this.showButton = true;
|
|
@@ -13195,6 +13237,8 @@ class FilterItemComponent {
|
|
|
13195
13237
|
break;
|
|
13196
13238
|
case this.modes.CheckboxToText:
|
|
13197
13239
|
case this.modes.CheckboxToSimpleText:
|
|
13240
|
+
case this.modes.CheckboxToTFText:
|
|
13241
|
+
case this.modes.CheckboxToTFSimpleText:
|
|
13198
13242
|
this._applyDefaultForCheckboxToText();
|
|
13199
13243
|
break;
|
|
13200
13244
|
case this.modes.CheckboxToBinary:
|
|
@@ -13348,7 +13392,7 @@ FilterItemComponent.decorators = [
|
|
|
13348
13392
|
</co-input-checkbox>
|
|
13349
13393
|
</div>
|
|
13350
13394
|
<div class="co-filter-item-checkbox-content"
|
|
13351
|
-
*ngIf="mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary">
|
|
13395
|
+
*ngIf="mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary || mode === modes.CheckboxToTFSimpleText || mode === modes.CheckboxToTFText">
|
|
13352
13396
|
<co-input-checkbox
|
|
13353
13397
|
[(model)]="checkBoxToTextModel"
|
|
13354
13398
|
(modelChange)="handleModelChange($event)"
|
|
@@ -14509,7 +14553,7 @@ class ScreenConfigurationDirective {
|
|
|
14509
14553
|
if (myCfgObj) {
|
|
14510
14554
|
this._setHostVisible(myCfgObj.immediatelyVisible());
|
|
14511
14555
|
if (!this.screenConfigNativeElement) {
|
|
14512
|
-
this.hostComponent.required = myCfgObj.isRequired();
|
|
14556
|
+
this.hostComponent.required = this.hostComponent.required || myCfgObj.isRequired();
|
|
14513
14557
|
this.hostComponent.readonly = this.hostComponent.forceReadonly || this._moduleInReadonlyMode() || myCfgObj.isReadonly();
|
|
14514
14558
|
this.hostComponent.decimals = myCfgObj.scale;
|
|
14515
14559
|
this.hostComponent.maxLength = myCfgObj.maxLength;
|