@acorex/platform 20.6.0-next.26 → 20.6.0-next.27

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.
@@ -65,7 +65,7 @@ import { AXSelectionListModule } from '@acorex/components/selection-list';
65
65
  import * as i5$4 from '@acorex/components/tag-box';
66
66
  import { AXTagBoxModule } from '@acorex/components/tag-box';
67
67
  import { AXCalendarService } from '@acorex/core/date-time';
68
- import { AXPFilterOperatorMiddlewareService, ALL_DEFAULT_OPERATORS, AXPFileStorageService } from '@acorex/platform/common';
68
+ import { AXPFilterOperatorMiddlewareService, AXPSettingService, ALL_DEFAULT_OPERATORS, AXPFileStorageService } from '@acorex/platform/common';
69
69
  import * as i1$4 from '@acorex/components/image-editor';
70
70
  import { AXImageEditorContainerComponent, AXImageEditorModule } from '@acorex/components/image-editor';
71
71
  import * as i3$4 from '@acorex/components/toolbar';
@@ -4605,9 +4605,11 @@ class AXPQueryFiltersComponent {
4605
4605
  this.translate = inject(AXTranslationService);
4606
4606
  this.calendarService = inject(AXCalendarService);
4607
4607
  this.filterOperatorMiddleware = inject(AXPFilterOperatorMiddlewareService);
4608
+ this.settingService = inject(AXPSettingService);
4608
4609
  this.filtersDefinitions = input([], ...(ngDevMode ? [{ debugName: "filtersDefinitions" }] : []));
4609
4610
  this.initialFilters = input([], ...(ngDevMode ? [{ debugName: "initialFilters" }] : []));
4610
4611
  this.onFiltersChanged = output();
4612
+ this.dateFormat = signal('YYYY/MM/DD', ...(ngDevMode ? [{ debugName: "dateFormat" }] : []));
4611
4613
  this.tagBox = viewChild('tagBox', ...(ngDevMode ? [{ debugName: "tagBox" }] : []));
4612
4614
  this.widgetRenderer = viewChild('widgetRenderer', ...(ngDevMode ? [{ debugName: "widgetRenderer" }] : []));
4613
4615
  this.selectedField = signal(null, ...(ngDevMode ? [{ debugName: "selectedField" }] : []));
@@ -4658,7 +4660,8 @@ class AXPQueryFiltersComponent {
4658
4660
  this.convertIfISOStringDate = (val) => {
4659
4661
  const isISOStringDate = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(val);
4660
4662
  if (isISOStringDate) {
4661
- return this.calendarService.convert(val).date.toLocaleDateString();
4663
+ const dateResult = this.calendarService.convert(val);
4664
+ return dateResult.format(this.dateFormat());
4662
4665
  }
4663
4666
  return val;
4664
4667
  };
@@ -4670,6 +4673,10 @@ class AXPQueryFiltersComponent {
4670
4673
  }));
4671
4674
  });
4672
4675
  };
4676
+ this.#dateFormatEffect = effect(async () => {
4677
+ const format = await this.settingService.get('regional:short-date');
4678
+ this.dateFormat.set(format || 'YYYY/MM/DD');
4679
+ }, ...(ngDevMode ? [{ debugName: "#dateFormatEffect" }] : []));
4673
4680
  this.#emitFiltersEffect = effect(() => {
4674
4681
  // Prevent emitting while a filter is actively being edited
4675
4682
  const isEditing = this.activeFilter();
@@ -4803,6 +4810,7 @@ class AXPQueryFiltersComponent {
4803
4810
  return acc;
4804
4811
  }, {});
4805
4812
  }
4813
+ #dateFormatEffect;
4806
4814
  ngOnInit() {
4807
4815
  this.tagBoxInput = this.tagBox()?.getHostElement().querySelector('input');
4808
4816
  }
@@ -4905,7 +4913,7 @@ class AXPQueryFiltersComponent {
4905
4913
  handleAddAllInlineFilters() {
4906
4914
  const inputValue = this.tagBox()?.inputValue();
4907
4915
  // Check if input is empty
4908
- if (!inputValue?.trim()) {
4916
+ if (!inputValue?.trim() || !this.filtersDefinitions().some((f) => f.filterType.inline)) {
4909
4917
  return;
4910
4918
  }
4911
4919
  // Remove existing "all" filter (if exists) and add new one with updated value