@colijnit/corecomponents_v12 12.2.28 → 253.1.1
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 +14328 -14144
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/list-of-values/list-of-values-popup.component.js +33 -24
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +9 -3
- package/esm2015/lib/service/color-sequence.service.js +27 -1
- package/fesm2015/colijnit-corecomponents_v12.js +66 -25
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/button/style/_layout.scss +31 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +1 -0
- package/lib/components/simple-grid/style/_layout.scss +3 -6
- package/lib/service/color-sequence.service.d.ts +3 -0
- package/package.json +4 -3
|
@@ -9254,6 +9254,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9254
9254
|
this.showDelete = false;
|
|
9255
9255
|
this.editOnCellClick = true;
|
|
9256
9256
|
this.rightToolbar = false;
|
|
9257
|
+
this.showGridSettings = false;
|
|
9257
9258
|
this.rowsPerPage = 1000;
|
|
9258
9259
|
this.editing = false;
|
|
9259
9260
|
this.isSettingsMenuOpen = false;
|
|
@@ -9457,6 +9458,9 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9457
9458
|
this.isSettingsMenuOpen = !this.isSettingsMenuOpen;
|
|
9458
9459
|
}
|
|
9459
9460
|
toggleColumnMenu(col) {
|
|
9461
|
+
if (!this.showGridSettings) {
|
|
9462
|
+
return;
|
|
9463
|
+
}
|
|
9460
9464
|
this.isSettingsMenuOpen = false;
|
|
9461
9465
|
if (col.isSelected) {
|
|
9462
9466
|
col.isSelected = false;
|
|
@@ -9726,6 +9730,7 @@ SimpleGridComponent.decorators = [
|
|
|
9726
9730
|
<ng-template #noHeaderTemplate>
|
|
9727
9731
|
<div class="simple-grid-column-header-label"
|
|
9728
9732
|
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
|
|
9733
|
+
[class.with-menu]="showGridSettings"
|
|
9729
9734
|
[textContent]="column.headerText || ' '"
|
|
9730
9735
|
(click)="toggleColumnMenu(column)">
|
|
9731
9736
|
</div>
|
|
@@ -9743,7 +9748,7 @@ SimpleGridComponent.decorators = [
|
|
|
9743
9748
|
></div>
|
|
9744
9749
|
</div>
|
|
9745
9750
|
</th>
|
|
9746
|
-
<th class="simple-grid-column-header grid-settings">
|
|
9751
|
+
<th *ngIf="showGridSettings" class="simple-grid-column-header grid-settings">
|
|
9747
9752
|
<co-button
|
|
9748
9753
|
[class.selected]="isSettingsMenuOpen"
|
|
9749
9754
|
[iconData]="icons.getIcon(Icons.CogWheels)"
|
|
@@ -9801,7 +9806,7 @@ SimpleGridComponent.decorators = [
|
|
|
9801
9806
|
</td>
|
|
9802
9807
|
</ng-container>
|
|
9803
9808
|
</ng-container>
|
|
9804
|
-
<td></td>
|
|
9809
|
+
<td *ngIf="showGridSettings"></td>
|
|
9805
9810
|
</co-form>
|
|
9806
9811
|
</tr>
|
|
9807
9812
|
</tbody>
|
|
@@ -9834,6 +9839,7 @@ SimpleGridComponent.propDecorators = {
|
|
|
9834
9839
|
showDelete: [{ type: Input }],
|
|
9835
9840
|
editOnCellClick: [{ type: Input }],
|
|
9836
9841
|
rightToolbar: [{ type: Input }],
|
|
9842
|
+
showGridSettings: [{ type: Input }],
|
|
9837
9843
|
rowsPerPage: [{ type: Input }],
|
|
9838
9844
|
rowDisabledFn: [{ type: Input }],
|
|
9839
9845
|
canRowBeEdittedFn: [{ type: Input }],
|
|
@@ -10795,6 +10801,9 @@ class ListOfValuesPopupComponent {
|
|
|
10795
10801
|
}
|
|
10796
10802
|
// for single select
|
|
10797
10803
|
selectOptionAndClosePopup() {
|
|
10804
|
+
if (this.viewModels.length === 1) {
|
|
10805
|
+
this.selectNextOption();
|
|
10806
|
+
}
|
|
10798
10807
|
if (!this.model && this.searchTerm) {
|
|
10799
10808
|
const wishModel = this.viewModelsMain.find(vmm => vmm.model[this.displayField] === this.searchTerm);
|
|
10800
10809
|
if (wishModel) {
|
|
@@ -10877,29 +10886,35 @@ ListOfValuesPopupComponent.decorators = [
|
|
|
10877
10886
|
{ type: Component, args: [{
|
|
10878
10887
|
selector: 'co-list-of-values-popup',
|
|
10879
10888
|
template: `
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10889
|
+
<div class="lov-options" [overlay]="parentForOverlay" [inheritWidth]="true" [ngClass]="customCssClass"
|
|
10890
|
+
id="lov-popup"
|
|
10891
|
+
role="listbox" [tabindex]="-1"
|
|
10892
|
+
(clickOutside)="closePopup.emit($event)">
|
|
10893
|
+
<co-input-search *ngIf="multiselect"
|
|
10894
|
+
tabindex="-1"
|
|
10895
|
+
[(model)]="searchTerm"
|
|
10896
|
+
[placeholder]="searchPlaceholder"
|
|
10897
|
+
(keydown)="handleInputKeyDown($event)"
|
|
10898
|
+
(modelChange)="filterViewModels()"></co-input-search>
|
|
10899
|
+
<ul class="dropdown-list" #dropDownList>
|
|
10900
|
+
<li
|
|
10901
|
+
#lovItem
|
|
10902
|
+
*ngFor="let viewModel of viewModels; let index = index"
|
|
10903
|
+
[class.selected]="viewModel === highLightModel || viewModels.length === 1"
|
|
10904
|
+
(click)="selectViewModel(viewModel, !multiselect)"
|
|
10905
|
+
role="option">
|
|
10906
|
+
<ng-container *ngIf="!multiselect">
|
|
10907
|
+
<span class="lov-options-text" [textContent]="viewModel.model[displayField]"></span>
|
|
10908
|
+
</ng-container>
|
|
10909
|
+
<ng-container *ngIf="multiselect">
|
|
10910
|
+
<co-input-checkbox [model]="viewModel.checked"
|
|
10911
|
+
(modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
|
|
10912
|
+
<span class="lov-options-text" [textContent]="viewModel.model[displayField]"></span>
|
|
10913
|
+
</ng-container>
|
|
10914
|
+
</li>
|
|
10915
|
+
</ul>
|
|
10916
|
+
</div>
|
|
10917
|
+
`,
|
|
10903
10918
|
encapsulation: ViewEncapsulation.None
|
|
10904
10919
|
},] }
|
|
10905
10920
|
];
|
|
@@ -13520,6 +13535,32 @@ class ColorSequenceService {
|
|
|
13520
13535
|
this.colors.set(id, result);
|
|
13521
13536
|
return result;
|
|
13522
13537
|
}
|
|
13538
|
+
GetRandomColorWithSettings(h, s, l, a) {
|
|
13539
|
+
if (!h || !Array.isArray(h) || h.length < 2) {
|
|
13540
|
+
h = [0, 360];
|
|
13541
|
+
}
|
|
13542
|
+
if (!s || !Array.isArray(s) || s.length < 2) {
|
|
13543
|
+
s = [0, 100];
|
|
13544
|
+
}
|
|
13545
|
+
if (!l || !Array.isArray(l) || l.length < 2) {
|
|
13546
|
+
l = [0, 100];
|
|
13547
|
+
}
|
|
13548
|
+
if (!a || !Array.isArray(a) || a.length < 2) {
|
|
13549
|
+
a = [0, 1];
|
|
13550
|
+
}
|
|
13551
|
+
let hue = this.GetRandomNumber(h[0], h[1]);
|
|
13552
|
+
let saturation = this.GetRandomNumber(s[0], s[1]);
|
|
13553
|
+
let lightness = this.GetRandomNumber(l[0], l[1]);
|
|
13554
|
+
let alpha = this.GetRandomNumber(a[0] * 100, a[1] * 100) / 100;
|
|
13555
|
+
return this.GetHSLAColor(hue, saturation, lightness, alpha);
|
|
13556
|
+
}
|
|
13557
|
+
GetRandomNumber(low, high) {
|
|
13558
|
+
let r = Math.floor(Math.random() * (high - low + 1)) + low;
|
|
13559
|
+
return r;
|
|
13560
|
+
}
|
|
13561
|
+
GetHSLAColor(h, s, l, a) {
|
|
13562
|
+
return `hsl(${h}, ${s}%, ${l}%, ${a})`;
|
|
13563
|
+
}
|
|
13523
13564
|
}
|
|
13524
13565
|
ColorSequenceService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ColorSequenceService_Factory() { return new ColorSequenceService(); }, token: ColorSequenceService, providedIn: "root" });
|
|
13525
13566
|
ColorSequenceService.decorators = [
|