@colijnit/corecomponents_v12 254.1.1 → 254.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/bundles/colijnit-corecomponents_v12.umd.js +30 -1
- 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/service/color-sequence.service.js +27 -1
- package/fesm2015/colijnit-corecomponents_v12.js +58 -23
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/list-of-icons/style/_layout.scss +71 -0
- package/lib/components/list-of-icons/style/_material-definition.scss +20 -0
- package/lib/components/list-of-icons/style/_theme.scss +5 -0
- package/lib/components/list-of-icons/style/material.scss +7 -0
- package/lib/service/color-sequence.service.d.ts +3 -0
- package/package.json +1 -1
|
@@ -11370,6 +11370,9 @@
|
|
|
11370
11370
|
// for single select
|
|
11371
11371
|
ListOfValuesPopupComponent.prototype.selectOptionAndClosePopup = function () {
|
|
11372
11372
|
var _this = this;
|
|
11373
|
+
if (this.viewModels.length === 1) {
|
|
11374
|
+
this.selectNextOption();
|
|
11375
|
+
}
|
|
11373
11376
|
if (!this.model && this.searchTerm) {
|
|
11374
11377
|
var wishModel = this.viewModelsMain.find(function (vmm) { return vmm.model[_this.displayField] === _this.searchTerm; });
|
|
11375
11378
|
if (wishModel) {
|
|
@@ -11457,7 +11460,7 @@
|
|
|
11457
11460
|
ListOfValuesPopupComponent.decorators = [
|
|
11458
11461
|
{ type: i0.Component, args: [{
|
|
11459
11462
|
selector: 'co-list-of-values-popup',
|
|
11460
|
-
template: "\n
|
|
11463
|
+
template: "\n <div class=\"lov-options\" [overlay]=\"parentForOverlay\" [inheritWidth]=\"true\" [ngClass]=\"customCssClass\"\n id=\"lov-popup\"\n role=\"listbox\" [tabindex]=\"-1\"\n (clickOutside)=\"closePopup.emit($event)\">\n <co-input-search *ngIf=\"multiselect\"\n tabindex=\"-1\"\n [(model)]=\"searchTerm\"\n [placeholder]=\"searchPlaceholder\"\n (keydown)=\"handleInputKeyDown($event)\"\n (modelChange)=\"filterViewModels()\"></co-input-search>\n <ul class=\"dropdown-list\" #dropDownList>\n <li\n #lovItem\n *ngFor=\"let viewModel of viewModels; let index = index\"\n [class.selected]=\"viewModel === highLightModel || viewModels.length === 1\"\n (click)=\"selectViewModel(viewModel, !multiselect)\"\n role=\"option\">\n <ng-container *ngIf=\"!multiselect\">\n <span class=\"lov-options-text\" [textContent]=\"viewModel.model[displayField]\"></span>\n </ng-container>\n <ng-container *ngIf=\"multiselect\">\n <co-input-checkbox [model]=\"viewModel.checked\"\n (modelChange)=\"selectViewModel(viewModel, false)\"></co-input-checkbox>\n <span class=\"lov-options-text\" [textContent]=\"viewModel.model[displayField]\"></span>\n </ng-container>\n </li>\n </ul>\n </div>\n ",
|
|
11461
11464
|
encapsulation: i0.ViewEncapsulation.None
|
|
11462
11465
|
},] }
|
|
11463
11466
|
];
|
|
@@ -13975,6 +13978,32 @@
|
|
|
13975
13978
|
this.colors.set(id, result);
|
|
13976
13979
|
return result;
|
|
13977
13980
|
};
|
|
13981
|
+
ColorSequenceService.prototype.GetRandomColorWithSettings = function (h, s, l, a) {
|
|
13982
|
+
if (!h || !Array.isArray(h) || h.length < 2) {
|
|
13983
|
+
h = [0, 360];
|
|
13984
|
+
}
|
|
13985
|
+
if (!s || !Array.isArray(s) || s.length < 2) {
|
|
13986
|
+
s = [0, 100];
|
|
13987
|
+
}
|
|
13988
|
+
if (!l || !Array.isArray(l) || l.length < 2) {
|
|
13989
|
+
l = [0, 100];
|
|
13990
|
+
}
|
|
13991
|
+
if (!a || !Array.isArray(a) || a.length < 2) {
|
|
13992
|
+
a = [0, 1];
|
|
13993
|
+
}
|
|
13994
|
+
var hue = this.GetRandomNumber(h[0], h[1]);
|
|
13995
|
+
var saturation = this.GetRandomNumber(s[0], s[1]);
|
|
13996
|
+
var lightness = this.GetRandomNumber(l[0], l[1]);
|
|
13997
|
+
var alpha = this.GetRandomNumber(a[0] * 100, a[1] * 100) / 100;
|
|
13998
|
+
return this.GetHSLAColor(hue, saturation, lightness, alpha);
|
|
13999
|
+
};
|
|
14000
|
+
ColorSequenceService.prototype.GetRandomNumber = function (low, high) {
|
|
14001
|
+
var r = Math.floor(Math.random() * (high - low + 1)) + low;
|
|
14002
|
+
return r;
|
|
14003
|
+
};
|
|
14004
|
+
ColorSequenceService.prototype.GetHSLAColor = function (h, s, l, a) {
|
|
14005
|
+
return "hsl(" + h + ", " + s + "%, " + l + "%, " + a + ")";
|
|
14006
|
+
};
|
|
13978
14007
|
return ColorSequenceService;
|
|
13979
14008
|
}());
|
|
13980
14009
|
ColorSequenceService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ColorSequenceService_Factory() { return new ColorSequenceService(); }, token: ColorSequenceService, providedIn: "root" });
|