ps-toolkit-ui 1.4.95 → 1.4.98
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/ps-toolkit-ui.umd.js +29 -3
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/helper.class.js +26 -1
- package/esm2015/lib/components/form/radio/form.radio.component.js +2 -2
- package/esm2015/lib/components/table/pagination/table.pagination.component.js +2 -2
- package/esm2015/lib/components/table/row/table.row.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +28 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/helper.class.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -827,6 +827,31 @@ class HelperClass {
|
|
|
827
827
|
}
|
|
828
828
|
return (parseInt(bgColor.replace('#', ''), 16) > 0xffffff / 2) ? '#000' : '#fff';
|
|
829
829
|
}
|
|
830
|
+
static queryStringToJSON(qs = null) {
|
|
831
|
+
qs = qs || location.search.slice(1);
|
|
832
|
+
if (qs === '') {
|
|
833
|
+
return {};
|
|
834
|
+
}
|
|
835
|
+
const pairs = qs.split('&');
|
|
836
|
+
const result = {};
|
|
837
|
+
pairs.forEach((p) => {
|
|
838
|
+
const pair = p.split('=');
|
|
839
|
+
const key = pair[0].replace('%5B%5D', '');
|
|
840
|
+
const value = decodeURIComponent(pair[1] || '');
|
|
841
|
+
if (result[key]) {
|
|
842
|
+
if (Object.prototype.toString.call(result[key]) === '[object Array]') {
|
|
843
|
+
result[key].push(value);
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
result[key] = [result[key], value];
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
else {
|
|
850
|
+
result[key] = value;
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
return JSON.parse(JSON.stringify(result));
|
|
854
|
+
}
|
|
830
855
|
}
|
|
831
856
|
|
|
832
857
|
class RequestClass {
|
|
@@ -1826,7 +1851,7 @@ class TablePaginationComponent {
|
|
|
1826
1851
|
this.table.load(btn);
|
|
1827
1852
|
}
|
|
1828
1853
|
ngOnInit() {
|
|
1829
|
-
this.perPageSelect = new InputClass(this.table.environment, this.table.l, 'PerPage', '', InputType.Select, 'h-25 w-80-p f-l');
|
|
1854
|
+
this.perPageSelect = new InputClass(this.table.environment, this.table.l, 'PerPage', '', InputType.Select, 'h-25 p-0 w-80-p f-l');
|
|
1830
1855
|
this.perPageSelect.value = this.table.perPage.toString();
|
|
1831
1856
|
this.perPageSelect.options = [
|
|
1832
1857
|
new OptionClass('5', '5'),
|
|
@@ -2218,7 +2243,7 @@ class TableRowComponent {
|
|
|
2218
2243
|
return '<a target="_blank" class="ltr" href="' + cv + '">' + cv + '</a>';
|
|
2219
2244
|
}
|
|
2220
2245
|
else if (col.type === TableCollType.Image) {
|
|
2221
|
-
return '<img
|
|
2246
|
+
return '<img style="height: ' + this.table.height + 'px" alt="" src="' + this.service.environment.url + cv + '"/>';
|
|
2222
2247
|
}
|
|
2223
2248
|
else if (col.type === TableCollType.FileSize) {
|
|
2224
2249
|
return HelperClass.getFileSize(cv);
|
|
@@ -4261,7 +4286,7 @@ class FormRadioComponent {
|
|
|
4261
4286
|
FormRadioComponent.decorators = [
|
|
4262
4287
|
{ type: Component, args: [{
|
|
4263
4288
|
selector: 'lib-form-radio',
|
|
4264
|
-
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [className]=\"'form-input-con radio' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onClick()\">\r\n <div *ngIf=\"inp.displayLabel\" class=\"label\"><i *ngIf=\"inp.required\" class=\"fas fa-star-of-life required-icon\"></i>{{inp.getLabel()}}</div>\r\n <i *ngIf=\"inp.icon != null || inp.loading\" #inputIcon [className]=\"(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'\"></i>\r\n <input #inputBase type=\"text\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div class=\"control\">\r\n <div [className]=\"(o.class ? o.class + ' ' : '') + 'option-con'\" *ngFor=\"let o of inp.options\">\r\n <label class=\"option\">\r\n <input [disabled]=\"inp.disabled\" (change)=\"onChange()\" [value]=\"o.value\" [(ngModel)]=\"inp.value\" [checked]=\"inp.value == o.value\" type=\"radio\" [name]=\"inp.name\">\r\n <span></span>\r\n <div class=\"text\">{{inp.l(o.name)}}</div>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
4289
|
+
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [className]=\"'form-input-con radio w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onClick()\">\r\n <div *ngIf=\"inp.displayLabel\" class=\"label\"><i *ngIf=\"inp.required\" class=\"fas fa-star-of-life required-icon\"></i>{{inp.getLabel()}}</div>\r\n <i *ngIf=\"inp.icon != null || inp.loading\" #inputIcon [className]=\"(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'\"></i>\r\n <input #inputBase type=\"text\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div class=\"control\">\r\n <div [className]=\"(o.class ? o.class + ' ' : '') + 'option-con'\" *ngFor=\"let o of inp.options\">\r\n <label class=\"option\">\r\n <input [disabled]=\"inp.disabled\" (change)=\"onChange()\" [value]=\"o.value\" [(ngModel)]=\"inp.value\" [checked]=\"inp.value == o.value\" type=\"radio\" [name]=\"inp.name\">\r\n <span></span>\r\n <div class=\"text\">{{inp.l(o.name)}}</div>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
4265
4290
|
styles: [".form-input-con.radio{padding:0 15px;position:relative}.form-input-con.radio .form-input{float:right;position:relative;width:100%}.form-input-con.radio .form-input .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:rtl;float:right;font-size:12px;height:20px;line-height:20px;margin-bottom:3px;padding:0 10px;text-align:right;width:100%}.form-input-con.radio.error .form-input .label{color:var(--red);font-size:10px}.form-input-con.radio .form-input .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input-con.radio .form-input i.icon{bottom:0;color:var(--primary);cursor:default;font-size:13px;height:35px;left:0;line-height:35px;position:absolute;text-align:center;transition:all .35s ease-in-out;width:35px;z-index:1}.form-input-con.radio .form-input>.control{background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);display:table;height:35px;padding:0 35px;width:100%}.form-input-con.radio .form-input .input-base{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.radio .form-input .input-base:focus+.control,.form-input-con.radio .form-input:hover .control{border:var(--border-input-dark);outline:none}.form-input-con.radio.error .form-input>.control{border:var(--border-input-red)}.form-input-con.radio.error .form-input i.icon{color:var(--red)}.form-input-con.radio .form-input .options{display:table;height:100%;text-align:center;width:100%}.form-input-con.radio .form-input .option{-webkit-user-select:none;align-items:center;cursor:pointer;display:flex;float:right;font-size:11px;justify-content:center;position:relative;text-align:center;user-select:none;width:100%}.form-input-con.radio .form-input .option-con{display:table-cell;height:100%;position:relative;vertical-align:middle}.form-input-con.radio .form-input .option-con .text{float:right;height:25px;line-height:25px;margin-right:10px;padding:0 20px}.form-input-con.radio .form-input .option-con input{cursor:pointer;opacity:0;position:absolute;right:0}.form-input-con.radio .form-input .option-con span:after{color:var(--black-white);content:\"\\f111\";float:right;font-family:Font Awesome\\ 5 Pro;font-size:14px;font-weight:700;height:30px;line-height:30px;width:15px}.form-input-con.radio .form-input .option-con:hover span:after{color:var(--black-light)}.form-input-con.radio .form-input .option-con input:checked~span:after{color:var(--primary);content:\"\\f192\"}"]
|
|
4266
4291
|
},] }
|
|
4267
4292
|
];
|