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.
@@ -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["SelectAutoComplete"] = 14] = "SelectAutoComplete";
458
- InputType[InputType["Date"] = 15] = "Date";
459
- InputType[InputType["Month"] = 16] = "Month";
460
- InputType[InputType["Year"] = 17] = "Year";
461
- InputType[InputType["Time"] = 18] = "Time";
462
- InputType[InputType["DateTime"] = 19] = "DateTime";
463
- InputType[InputType["Check"] = 20] = "Check";
464
- InputType[InputType["TextArea"] = 21] = "TextArea";
465
- InputType[InputType["Label"] = 22] = "Label";
466
- InputType[InputType["Button"] = 23] = "Button";
467
- InputType[InputType["Submit"] = 24] = "Submit";
468
- InputType[InputType["Icon"] = 25] = "Icon";
469
- InputType[InputType["File"] = 26] = "File";
470
- InputType[InputType["Url"] = 27] = "Url";
471
- InputType[InputType["Price"] = 28] = "Price";
472
- InputType[InputType["Radio"] = 29] = "Radio";
473
- InputType[InputType["Tree"] = 30] = "Tree";
474
- InputType[InputType["TreeRadio"] = 31] = "TreeRadio";
475
- InputType[InputType["Plaque"] = 32] = "Plaque";
476
- InputType[InputType["PlaqueM"] = 33] = "PlaqueM";
477
- InputType[InputType["PlaqueF"] = 34] = "PlaqueF";
478
- InputType[InputType["PlaqueG"] = 35] = "PlaqueG";
479
- InputType[InputType["SelectAutoCompletePlaque"] = 36] = "SelectAutoCompletePlaque";
480
- InputType[InputType["SelectAutoCompletePlaqueM"] = 37] = "SelectAutoCompletePlaqueM";
481
- InputType[InputType["SelectAutoCompletePlaqueF"] = 38] = "SelectAutoCompletePlaqueF";
482
- InputType[InputType["SelectAutoCompletePlaqueG"] = 39] = "SelectAutoCompletePlaqueG";
483
- InputType[InputType["BankCard"] = 40] = "BankCard";
484
- InputType[InputType["Constant"] = 41] = "Constant";
485
- InputType[InputType["Hidden"] = 42] = "Hidden";
486
- InputType[InputType["Table"] = 43] = "Table";
487
- InputType[InputType["Tag"] = 44] = "Tag";
488
- InputType[InputType["VehicleSearch"] = 45] = "VehicleSearch";
489
- InputType[InputType["Vehicle"] = 46] = "Vehicle";
490
- InputType[InputType["Finger"] = 47] = "Finger";
491
- InputType[InputType["Color"] = 48] = "Color";
492
- InputType[InputType["Star"] = 49] = "Star";
493
- InputType[InputType["Toggle"] = 50] = "Toggle";
494
- InputType[InputType["BillNumber"] = 51] = "BillNumber";
495
- InputType[InputType["Ckeditor"] = 52] = "Ckeditor";
496
- InputType[InputType["Uploader"] = 53] = "Uploader";
497
- InputType[InputType["Slide"] = 54] = "Slide";
498
- InputType[InputType["Username"] = 55] = "Username";
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% - 35px)}.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 .check.checked:after{content:\"\\f14a\"}.option .check.checked:after,.option .check.null:after{animation:pop .18s ease-in;color:var(--green);font-weight:900}.option .check.null:after{content:\"\\f146\"}.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}"]
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.multiple) {
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;