@acorex/components 6.5.75 → 6.5.76

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.
@@ -7900,7 +7900,7 @@ class AXSearchBoxComponent extends AXBaseTextComponent {
7900
7900
  cdr;
7901
7901
  textChanged = new EventEmitter();
7902
7902
  onButtonClick = new EventEmitter();
7903
- placeholder = 'جستجو ...';
7903
+ placeholder = AXTranslator.get('common.search');
7904
7904
  onDemandTranslate = false;
7905
7905
  constructor(cdr, ref) {
7906
7906
  super(cdr, ref);
@@ -8475,10 +8475,33 @@ class AXSelectBoxComponent extends AXValidatableComponent {
8475
8475
  fetch(params = {}) {
8476
8476
  // this.params = params;
8477
8477
  if (this.dataSource) {
8478
+ if (this.onDemandTranslate && params?.searchText) {
8479
+ params.searchText = this.translateSearch(params?.searchText);
8480
+ }
8478
8481
  this.showLoading = true;
8479
8482
  this.dataSource.fetch(params);
8480
8483
  }
8481
8484
  }
8485
+ translateSearch(searchText) {
8486
+ const latinPattern = /[A-Za-z;'\/\\[\],]/;
8487
+ const asciiToPersianMap = {
8488
+ 113: "ض", 119: "ص", 101: "ث", 114: "ق", 116: "ف", 121: "غ", 117: "ع", 105: "ه", 111: "خ", 112: "ح",
8489
+ 97: "ش", 115: "س", 100: "ی", 102: "ب", 103: "ل", 104: "ا", 106: "ت", 107: "ن", 108: "م", 59: "ک",
8490
+ 122: "ظ", 120: "ط", 99: "ز", 118: "ر", 98: "ذ", 110: "د", 44: "و", 39: "گ", 67: "ژ", 93: "چ", 91: "ج", 92: "پ", 109: "ئ"
8491
+ };
8492
+ if (latinPattern.test(searchText)) {
8493
+ searchText = searchText.split('').map((char) => {
8494
+ const asciiValue = char.charCodeAt(0);
8495
+ if (asciiToPersianMap[asciiValue]) {
8496
+ return asciiToPersianMap[asciiValue];
8497
+ }
8498
+ else {
8499
+ return char;
8500
+ }
8501
+ }).join('');
8502
+ }
8503
+ return searchText;
8504
+ }
8482
8505
  refresh() {
8483
8506
  const params = {};
8484
8507
  if (this.remoteOperation) {
@@ -12918,7 +12941,7 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
12918
12941
  clearButton = false;
12919
12942
  mask;
12920
12943
  maskGuid = false;
12921
- showMask = true;
12944
+ showMask = false;
12922
12945
  constructor(cdr) {
12923
12946
  super(cdr);
12924
12947
  this.cdr = cdr;
@@ -12931,11 +12954,11 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
12931
12954
  this.onRenderCompleted.emit();
12932
12955
  }
12933
12956
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTextPropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
12934
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXTextPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\"\n [allowClear]=\"clearButton\" [mask]=\"mask\" [maskGuid]=\"maskGuid\" [showMask]=\"showMask\">\n <ax-validation [rules]=\"validation?.rules\">\n </ax-validation>\n</ax-text-box>", dependencies: [{ kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { kind: "component", type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
12957
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXTextPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\"\n [allowClear]=\"clearButton\" [mask]=\"mask\" [showMask]=\"showMask\">\n <ax-validation [rules]=\"validation?.rules\">\n </ax-validation>\n</ax-text-box>", dependencies: [{ kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { kind: "component", type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
12935
12958
  }
12936
12959
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTextPropertyEditorComponent, decorators: [{
12937
12960
  type: Component,
12938
- args: [{ template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\"\n [allowClear]=\"clearButton\" [mask]=\"mask\" [maskGuid]=\"maskGuid\" [showMask]=\"showMask\">\n <ax-validation [rules]=\"validation?.rules\">\n </ax-validation>\n</ax-text-box>" }]
12961
+ args: [{ template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\"\n [allowClear]=\"clearButton\" [mask]=\"mask\" [showMask]=\"showMask\">\n <ax-validation [rules]=\"validation?.rules\">\n </ax-validation>\n</ax-text-box>" }]
12939
12962
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { textBox: [{
12940
12963
  type: ViewChild,
12941
12964
  args: [AXTextBoxComponent]