ps-toolkit-ui 1.5.51 → 1.5.54
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 +15 -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/form.class.js +15 -2
- package/esm2015/lib/components/form/star/form.star.component.js +2 -3
- package/fesm2015/ps-toolkit-ui.js +15 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1678,7 +1678,20 @@
|
|
|
1678
1678
|
this.inputs.forEach(function (inp) {
|
|
1679
1679
|
var vl = inp.data();
|
|
1680
1680
|
if (vl !== null) {
|
|
1681
|
-
|
|
1681
|
+
if (d[inp.name] === undefined) {
|
|
1682
|
+
_.set(d, inp.name, vl);
|
|
1683
|
+
console.log(d, inp.name, vl, 'undefined');
|
|
1684
|
+
}
|
|
1685
|
+
else {
|
|
1686
|
+
if (d[inp.name] instanceof Array) {
|
|
1687
|
+
d[inp.name].push(vl);
|
|
1688
|
+
console.log(d, inp.name, vl, 'instanceof Array');
|
|
1689
|
+
}
|
|
1690
|
+
else {
|
|
1691
|
+
d[inp.name] = [d[inp.name], vl];
|
|
1692
|
+
console.log(d, inp.name, vl, 'instanceof obj');
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1682
1695
|
}
|
|
1683
1696
|
});
|
|
1684
1697
|
}
|
|
@@ -7333,7 +7346,6 @@
|
|
|
7333
7346
|
};
|
|
7334
7347
|
FormStarComponent.prototype.onChange = function (s) {
|
|
7335
7348
|
this.inp.value = s;
|
|
7336
|
-
console.log(this.inp.value);
|
|
7337
7349
|
if (this.inp.onChange) {
|
|
7338
7350
|
this.inp.onChange(this.inp);
|
|
7339
7351
|
}
|
|
@@ -7362,7 +7374,7 @@
|
|
|
7362
7374
|
FormStarComponent.decorators = [
|
|
7363
7375
|
{ type: core.Component, args: [{
|
|
7364
7376
|
selector: 'lib-form-star',
|
|
7365
|
-
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [style]=\"inp.style\" [className]=\"'form-input-con star w-100' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' 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 <input #inputBase type=\"text\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div class=\"control\">\r\n <input type=\"radio\" id=\"
|
|
7377
|
+
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [style]=\"inp.style\" [className]=\"'form-input-con star w-100' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' 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 <input #inputBase type=\"text\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div class=\"control\">\r\n <input type=\"radio\" id=\"star5\" name=\"star\" [checked]=\"inp.value == 5 ? 'checked' : ''\" (change)=\"onChange(5)\">\r\n <label [className]=\"'option' + (inp.value == 5 ? ' checked' : '')\" for=\"star5\"></label>\r\n <input type=\"radio\" id=\"star4\" name=\"star\" [checked]=\"inp.value == 4 ? 'checked' : ''\" (change)=\"onChange(4)\">\r\n <label [className]=\"'option' + (inp.value == 4 ? ' checked' : '')\" class=\"option\" for=\"star4\"></label>\r\n <input type=\"radio\" id=\"star3\" name=\"star\" [checked]=\"inp.value == 3 ? 'checked' : ''\" (change)=\"onChange(3)\">\r\n <label [className]=\"'option' + (inp.value == 3 ? ' checked' : '')\" class=\"option\" for=\"star3\"></label>\r\n <input type=\"radio\" id=\"star2\" name=\"star\" [checked]=\"inp.value == 2 ? 'checked' : ''\" (change)=\"onChange(2)\">\r\n <label [className]=\"'option' + (inp.value == 2 ? ' checked' : '')\" class=\"option\" for=\"star2\"></label>\r\n <input type=\"radio\" id=\"star1\" name=\"star\" [checked]=\"inp.value == 1 ? 'checked' : ''\" (change)=\"onChange(1)\">\r\n <label [className]=\"'option' + (inp.value == 1 ? ' checked' : '')\" class=\"option\" for=\"star1\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
7366
7378
|
styles: [".form-input-con.star{padding:0 15px;position:relative}.form-input-con.star .form-input{align-items:center;display:flex;float:right;justify-content:center;position:relative;width:100%}.form-input-con.star .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.star.error .form-input .label{color:var(--red);font-size:10px}.form-input-con.star .form-input .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input-con.star .form-input>.control{background-color:#fff;display:table;height:35px;position:relative;z-index:2}.form-input-con.star .form-input .input-base{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.star .form-input .input-base:focus+.control,.form-input-con.star .form-input:hover .control{outline:none}.form-input-con.star.error .form-input>.control{border:var(--border-input-red)}.form-input-con.star .form-input>.control input{display:none}.form-input-con.star .form-input>.control>.option{background-image:url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='126.729' height='126.73'%3e%3cpath fill='%23e3e3e3' d='M121.215 44.212l-34.899-3.3c-2.2-.2-4.101-1.6-5-3.7l-12.5-30.3c-2-5-9.101-5-11.101 0l-12.4 30.3c-.8 2.1-2.8 3.5-5 3.7l-34.9 3.3c-5.2.5-7.3 7-3.4 10.5l26.3 23.1c1.7 1.5 2.4 3.7 1.9 5.9l-7.9 32.399c-1.2 5.101 4.3 9.3 8.9 6.601l29.1-17.101c1.9-1.1 4.2-1.1 6.1 0l29.101 17.101c4.6 2.699 10.1-1.4 8.899-6.601l-7.8-32.399c-.5-2.2.2-4.4 1.9-5.9l26.3-23.1c3.8-3.5 1.6-10-3.6-10.5z'/%3e%3c/svg%3e\");background-position:50%;background-repeat:no-repeat;background-size:76%;cursor:pointer;float:right;height:35px;margin-top:auto;transition:.3s;width:35px}.form-input-con.star .form-input>.control input:checked~.option,.form-input-con.star .form-input>.control input:checked~.option~.option{background-image:url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='126.729' height='126.73'%3e%3cpath fill='%23f7d000' d='M121.215 44.212l-34.899-3.3c-2.2-.2-4.101-1.6-5-3.7l-12.5-30.3c-2-5-9.101-5-11.101 0l-12.4 30.3c-.8 2.1-2.8 3.5-5 3.7l-34.9 3.3c-5.2.5-7.3 7-3.4 10.5l26.3 23.1c1.7 1.5 2.4 3.7 1.9 5.9l-7.9 32.399c-1.2 5.101 4.3 9.3 8.9 6.601l29.1-17.101c1.9-1.1 4.2-1.1 6.1 0l29.101 17.101c4.6 2.699 10.1-1.4 8.899-6.601l-7.8-32.399c-.5-2.2.2-4.4 1.9-5.9l26.3-23.1c3.8-3.5 1.6-10-3.6-10.5z'/%3e%3c/svg%3e\")}.form-input-con.star .form-input>.control input:not(:checked)~.option:hover,.form-input-con.star .form-input>.control input:not(:checked)~.option:hover~.option{background-image:url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='126.729' height='126.73'%3e%3cpath fill='%23e3bc00' d='M121.215 44.212l-34.899-3.3c-2.2-.2-4.101-1.6-5-3.7l-12.5-30.3c-2-5-9.101-5-11.101 0l-12.4 30.3c-.8 2.1-2.8 3.5-5 3.7l-34.9 3.3c-5.2.5-7.3 7-3.4 10.5l26.3 23.1c1.7 1.5 2.4 3.7 1.9 5.9l-7.9 32.399c-1.2 5.101 4.3 9.3 8.9 6.601l29.1-17.101c1.9-1.1 4.2-1.1 6.1 0l29.101 17.101c4.6 2.699 10.1-1.4 8.899-6.601l-7.8-32.399c-.5-2.2.2-4.4 1.9-5.9l26.3-23.1c3.8-3.5 1.6-10-3.6-10.5z'/%3e%3c/svg%3e\")}"]
|
|
7367
7379
|
},] }
|
|
7368
7380
|
];
|