@acorex/components 20.7.3 → 20.7.5

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.
@@ -1,7 +1,7 @@
1
1
  import { AXEvent, MXInteractiveComponent, AXComponent, MXValueComponent, AXPagedComponent } from '@acorex/cdk/common';
2
2
  import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, afterNextRender, signal, EventEmitter, forwardRef, HostBinding, Output, NgModule } from '@angular/core';
4
+ import { Injectable, inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, computed, afterNextRender, signal, EventEmitter, forwardRef, HostBinding, Output, NgModule } from '@angular/core';
5
5
  import { AXDecoratorGenericComponent, AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
6
6
  import { AXTranslationService, AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
7
7
  import { AsyncPipe, NgClass, CommonModule } from '@angular/common';
@@ -9,6 +9,7 @@ import { AXNumberBoxComponent, AXNumberBoxModule } from '@acorex/components/numb
9
9
  import * as i1 from '@angular/forms';
10
10
  import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
11
11
  import { AXButtonComponent, AXButtonItemListComponent, AXButtonItemComponent, AXButtonModule } from '@acorex/components/button';
12
+ import { AXLocaleService } from '@acorex/core/locale';
12
13
  import { AXDropdownPanelComponent, AXDropdownModule } from '@acorex/components/dropdown';
13
14
  import { isNumber, isEqual, cloneDeep } from 'lodash-es';
14
15
  import { AXButtonGroupModule } from '@acorex/components/button-group';
@@ -328,6 +329,11 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
328
329
  this._currentPage = 1;
329
330
  this._lastPage = 1;
330
331
  this._loading = false;
332
+ this.localeService = inject(AXLocaleService);
333
+ this.rtlstatus = computed(() => {
334
+ // console.log(this.localeService.activeProfile().i18nMeta?.rtl ?? false);
335
+ return this.localeService.activeProfile().i18nMeta?.rtl ?? false;
336
+ }, ...(ngDevMode ? [{ debugName: "rtlstatus" }] : []));
331
337
  /**
332
338
  * @ignore
333
339
  */
@@ -383,10 +389,20 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
383
389
  _handleOnItemClick(e) {
384
390
  if (this._parent.readonly || this._parent.disabled)
385
391
  return;
386
- if (e.iconClass === 'ax-icon-chevron-right') {
392
+ // if (e.iconClass === 'ax-icon-chevron-right') {
393
+ // debugger;
394
+ // this._parent.goNextPage();
395
+ // } else if (e.iconClass === 'ax-icon-chevron-left') {
396
+ // this._parent.goPrevPage();
397
+ // } else {
398
+ // this._parent.goToPage(Number(e.data));
399
+ // }
400
+ const nextIcon = this.rtl ? 'ax-icon-chevron-left' : 'ax-icon-chevron-right';
401
+ const prevIcon = this.rtl ? 'ax-icon-chevron-right' : 'ax-icon-chevron-left';
402
+ if (e.iconClass === nextIcon) {
387
403
  this._parent.goNextPage();
388
404
  }
389
- else if (e.iconClass === 'ax-icon-chevron-left') {
405
+ else if (e.iconClass === prevIcon) {
390
406
  this._parent.goPrevPage();
391
407
  }
392
408
  else {