ps-toolkit-ui 1.20.66 → 1.20.68
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 +70 -46
- 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/enum.class.js +44 -43
- package/esm2015/lib/components/form/select/form.select.component.js +21 -3
- package/esm2015/lib/components/form/select/item/form.select.item.component.js +5 -3
- package/fesm2015/ps-toolkit-ui.js +66 -46
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +43 -42
- package/lib/components/form/select/form.select.component.d.ts +1 -0
- package/lib/components/form/select/item/form.select.item.component.d.ts +2 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -454,48 +454,49 @@
|
|
|
454
454
|
InputType[InputType["Number"] = 11] = "Number";
|
|
455
455
|
InputType[InputType["Select"] = 12] = "Select";
|
|
456
456
|
InputType[InputType["SelectSearch"] = 13] = "SelectSearch";
|
|
457
|
-
InputType[InputType["
|
|
458
|
-
InputType[InputType["
|
|
459
|
-
InputType[InputType["
|
|
460
|
-
InputType[InputType["
|
|
461
|
-
InputType[InputType["
|
|
462
|
-
InputType[InputType["
|
|
463
|
-
InputType[InputType["
|
|
464
|
-
InputType[InputType["
|
|
465
|
-
InputType[InputType["
|
|
466
|
-
InputType[InputType["
|
|
467
|
-
InputType[InputType["
|
|
468
|
-
InputType[InputType["
|
|
469
|
-
InputType[InputType["
|
|
470
|
-
InputType[InputType["
|
|
471
|
-
InputType[InputType["
|
|
472
|
-
InputType[InputType["
|
|
473
|
-
InputType[InputType["
|
|
474
|
-
InputType[InputType["
|
|
475
|
-
InputType[InputType["
|
|
476
|
-
InputType[InputType["
|
|
477
|
-
InputType[InputType["
|
|
478
|
-
InputType[InputType["
|
|
479
|
-
InputType[InputType["
|
|
480
|
-
InputType[InputType["
|
|
481
|
-
InputType[InputType["
|
|
482
|
-
InputType[InputType["
|
|
483
|
-
InputType[InputType["
|
|
484
|
-
InputType[InputType["
|
|
485
|
-
InputType[InputType["
|
|
486
|
-
InputType[InputType["
|
|
487
|
-
InputType[InputType["
|
|
488
|
-
InputType[InputType["
|
|
489
|
-
InputType[InputType["
|
|
490
|
-
InputType[InputType["
|
|
491
|
-
InputType[InputType["
|
|
492
|
-
InputType[InputType["
|
|
493
|
-
InputType[InputType["
|
|
494
|
-
InputType[InputType["
|
|
495
|
-
InputType[InputType["
|
|
496
|
-
InputType[InputType["
|
|
497
|
-
InputType[InputType["
|
|
498
|
-
InputType[InputType["
|
|
457
|
+
InputType[InputType["SelectSearchRadio"] = 14] = "SelectSearchRadio";
|
|
458
|
+
InputType[InputType["SelectAutoComplete"] = 15] = "SelectAutoComplete";
|
|
459
|
+
InputType[InputType["Date"] = 16] = "Date";
|
|
460
|
+
InputType[InputType["Month"] = 17] = "Month";
|
|
461
|
+
InputType[InputType["Year"] = 18] = "Year";
|
|
462
|
+
InputType[InputType["Time"] = 19] = "Time";
|
|
463
|
+
InputType[InputType["DateTime"] = 20] = "DateTime";
|
|
464
|
+
InputType[InputType["Check"] = 21] = "Check";
|
|
465
|
+
InputType[InputType["TextArea"] = 22] = "TextArea";
|
|
466
|
+
InputType[InputType["Label"] = 23] = "Label";
|
|
467
|
+
InputType[InputType["Button"] = 24] = "Button";
|
|
468
|
+
InputType[InputType["Submit"] = 25] = "Submit";
|
|
469
|
+
InputType[InputType["Icon"] = 26] = "Icon";
|
|
470
|
+
InputType[InputType["File"] = 27] = "File";
|
|
471
|
+
InputType[InputType["Url"] = 28] = "Url";
|
|
472
|
+
InputType[InputType["Price"] = 29] = "Price";
|
|
473
|
+
InputType[InputType["Radio"] = 30] = "Radio";
|
|
474
|
+
InputType[InputType["Tree"] = 31] = "Tree";
|
|
475
|
+
InputType[InputType["TreeRadio"] = 32] = "TreeRadio";
|
|
476
|
+
InputType[InputType["Plaque"] = 33] = "Plaque";
|
|
477
|
+
InputType[InputType["PlaqueM"] = 34] = "PlaqueM";
|
|
478
|
+
InputType[InputType["PlaqueF"] = 35] = "PlaqueF";
|
|
479
|
+
InputType[InputType["PlaqueG"] = 36] = "PlaqueG";
|
|
480
|
+
InputType[InputType["SelectAutoCompletePlaque"] = 37] = "SelectAutoCompletePlaque";
|
|
481
|
+
InputType[InputType["SelectAutoCompletePlaqueM"] = 38] = "SelectAutoCompletePlaqueM";
|
|
482
|
+
InputType[InputType["SelectAutoCompletePlaqueF"] = 39] = "SelectAutoCompletePlaqueF";
|
|
483
|
+
InputType[InputType["SelectAutoCompletePlaqueG"] = 40] = "SelectAutoCompletePlaqueG";
|
|
484
|
+
InputType[InputType["BankCard"] = 41] = "BankCard";
|
|
485
|
+
InputType[InputType["Constant"] = 42] = "Constant";
|
|
486
|
+
InputType[InputType["Hidden"] = 43] = "Hidden";
|
|
487
|
+
InputType[InputType["Table"] = 44] = "Table";
|
|
488
|
+
InputType[InputType["Tag"] = 45] = "Tag";
|
|
489
|
+
InputType[InputType["VehicleSearch"] = 46] = "VehicleSearch";
|
|
490
|
+
InputType[InputType["Vehicle"] = 47] = "Vehicle";
|
|
491
|
+
InputType[InputType["Finger"] = 48] = "Finger";
|
|
492
|
+
InputType[InputType["Color"] = 49] = "Color";
|
|
493
|
+
InputType[InputType["Star"] = 50] = "Star";
|
|
494
|
+
InputType[InputType["Toggle"] = 51] = "Toggle";
|
|
495
|
+
InputType[InputType["BillNumber"] = 52] = "BillNumber";
|
|
496
|
+
InputType[InputType["Ckeditor"] = 53] = "Ckeditor";
|
|
497
|
+
InputType[InputType["Uploader"] = 54] = "Uploader";
|
|
498
|
+
InputType[InputType["Slide"] = 55] = "Slide";
|
|
499
|
+
InputType[InputType["Username"] = 56] = "Username";
|
|
499
500
|
})(exports.InputType || (exports.InputType = {}));
|
|
500
501
|
(function (OperationEnum) {
|
|
501
502
|
OperationEnum[OperationEnum["All"] = -1] = "All";
|
|
@@ -6058,6 +6059,11 @@
|
|
|
6058
6059
|
this.selectOption = new core.EventEmitter();
|
|
6059
6060
|
this.parent = null;
|
|
6060
6061
|
}
|
|
6062
|
+
Object.defineProperty(FormSelectItemComponent.prototype, "type", {
|
|
6063
|
+
get: function () { return exports.InputType; },
|
|
6064
|
+
enumerable: false,
|
|
6065
|
+
configurable: true
|
|
6066
|
+
});
|
|
6061
6067
|
FormSelectItemComponent.prototype.ngOnInit = function () {
|
|
6062
6068
|
this.item.parent = this.parent;
|
|
6063
6069
|
};
|
|
@@ -6066,8 +6072,8 @@
|
|
|
6066
6072
|
FormSelectItemComponent.decorators = [
|
|
6067
6073
|
{ type: core.Component, args: [{
|
|
6068
6074
|
selector: 'lib-form-select-item',
|
|
6069
|
-
template: "<div [className]=\"'option-con' + (item.value == select.value ? ' selected' : '') + (item.disabled ? ' disabled' : '')\" *ngIf=\"item.show\" [attr.data-value]=\"item.value\">\r\n<!-- <i class=\"fas fa-caret-left caret-icon\" (click)=\"toggleChildren($event)\" *ngIf=\"item.options.length > 0\"></i>-->\r\n <div (click)=\"selectOption.emit(item.value)\" class=\"option\">\r\n <div [className]=\"(item.selected ? 'checked ' : item.selected == null ? 'null ' : '') + ' check'\" *ngIf=\"select.multiple\"></div>\r\n <span [innerHTML]=\"select.l(item.name) | safeHtml\"></span>\r\n <span *ngIf=\"item.option && item.option.Color\" class=\"color\" [style]=\"{backgroundColor: item.option.Color}\"></span>\r\n </div>\r\n <div *ngIf=\"item.options.length > 0 && (select.level === null || select.level > level)\" class=\"children rightline\">\r\n <lib-form-select-item (selectOption)=\"selectOption.emit($event)\" [level]=\"level + 1\" [parent]=\"item\" [item]=\"op\" [select]=\"select\" *ngFor=\"let op of item.options\"></lib-form-select-item>\r\n </div>\r\n</div>\r\n",
|
|
6070
|
-
styles: [".option-con{float:right;width:100%}.option-con .caret-icon{float:right;font-size:20px;height:35px;line-height:33px;text-align:center;width:35px}.option-con .children{float:left;position:relative;width:calc(100% -
|
|
6075
|
+
template: "<div [className]=\"'option-con' + (item.value == select.value ? ' selected' : '') + (item.disabled ? ' disabled' : '') + (select.type == type.SelectSearchRadio ? ' radio' : '')\" *ngIf=\"item.show\" [attr.data-value]=\"item.value\">\r\n<!-- <i class=\"fas fa-caret-left caret-icon\" (click)=\"toggleChildren($event)\" *ngIf=\"item.options.length > 0\"></i>-->\r\n <div (click)=\"selectOption.emit(item.value)\" class=\"option\">\r\n <div [className]=\"(item.selected ? 'checked ' : item.selected == null ? 'null ' : '') + ' check'\" *ngIf=\"select.multiple || (select.type == type.SelectSearchRadio && item.options.length == 0)\"></div>\r\n <span [innerHTML]=\"select.l(item.name) | safeHtml\"></span>\r\n <span *ngIf=\"item.option && item.option.Color\" class=\"color\" [style]=\"{backgroundColor: item.option.Color}\"></span>\r\n </div>\r\n <div *ngIf=\"item.options.length > 0 && (select.level === null || select.level > level)\" class=\"children rightline\">\r\n <lib-form-select-item (selectOption)=\"selectOption.emit($event)\" [level]=\"level + 1\" [parent]=\"item\" [item]=\"op\" [select]=\"select\" *ngFor=\"let op of item.options\"></lib-form-select-item>\r\n </div>\r\n</div>\r\n",
|
|
6076
|
+
styles: [".option-con{float:right;width:100%}.option-con .caret-icon{float:right;font-size:20px;height:35px;line-height:33px;text-align:center;width:35px}.option-con .children{float:left;position:relative;width:calc(100% - 25px)}.option{align-items:center;border-radius:0;cursor:pointer;display:flex;float:left;font-size:10px;justify-content:center;line-height:15px;min-height:30px;padding:3px 10px;position:relative;text-align:center;width:100%}.option:has(.check){padding-right:25px}.option .color{border-radius:var(--border-radius-base);height:15px;position:absolute;right:20px;top:7.5px;width:15px}::ng-deep .plaque-inp .option{direction:ltr}.option .check:after{content:\"\\f0c8\";font-family:Font Awesome\\ 5 Pro;font-size:18px;font-weight:400;height:20px;line-height:20px;position:absolute;right:5px;top:5px;width:20px}.option.radio .check:after{content:\"\\f111\"}.option .check.checked:after{animation:pop .18s ease-in;color:var(--green);content:\"\\f14a\";font-weight:900}.option.radio .check.checked:after{content:\"\\f192\"}.option .check.null:after{animation:pop .18s ease-in;color:var(--green);content:\"\\f146\";font-weight:900}.option-con.hover:not(.disabled)>.option,.option-con.selected>.option{background-color:var(--black-white)}.option-con.disabled>.option{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default;filter:blur(.5px);opacity:.7;pointer-events:none}"]
|
|
6071
6077
|
},] }
|
|
6072
6078
|
];
|
|
6073
6079
|
FormSelectItemComponent.propDecorators = {
|
|
@@ -6311,9 +6317,16 @@
|
|
|
6311
6317
|
};
|
|
6312
6318
|
FormSelectComponent.prototype.selectOption = function (v, isEdit) {
|
|
6313
6319
|
if (isEdit === void 0) { isEdit = false; }
|
|
6314
|
-
this.inp.error = null;
|
|
6315
6320
|
var va = this.getValue(v);
|
|
6316
|
-
if (this.inp.
|
|
6321
|
+
if (this.inp.type === exports.InputType.SelectSearchRadio && va.options.length !== 0) {
|
|
6322
|
+
return;
|
|
6323
|
+
}
|
|
6324
|
+
this.inp.error = null;
|
|
6325
|
+
if (this.inp.type === exports.InputType.SelectSearchRadio) {
|
|
6326
|
+
this.toggleRadio(va);
|
|
6327
|
+
this.inp.search = '';
|
|
6328
|
+
}
|
|
6329
|
+
else if (this.inp.multiple) {
|
|
6317
6330
|
this.toggle(va);
|
|
6318
6331
|
this.inp.search = '';
|
|
6319
6332
|
}
|
|
@@ -6349,6 +6362,17 @@
|
|
|
6349
6362
|
this.cI('Tab');
|
|
6350
6363
|
}
|
|
6351
6364
|
};
|
|
6365
|
+
FormSelectComponent.prototype.toggleRadio = function (op) {
|
|
6366
|
+
if (op.selected) {
|
|
6367
|
+
this.inp.value = null;
|
|
6368
|
+
op.selected = false;
|
|
6369
|
+
}
|
|
6370
|
+
else {
|
|
6371
|
+
this.inp.value = op.value;
|
|
6372
|
+
this.inp.options.filter(function (x) { return x.parent.value === op.parent.value; }).forEach(function (x) { return x.selected = false; });
|
|
6373
|
+
op.selected = true;
|
|
6374
|
+
}
|
|
6375
|
+
};
|
|
6352
6376
|
FormSelectComponent.prototype.toggle = function (op) {
|
|
6353
6377
|
if (op.selected) {
|
|
6354
6378
|
this.inp.value = null;
|