@acorex/platform 20.3.0-next.21 → 20.3.0-next.22

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.
@@ -16711,7 +16711,7 @@ class AXPTimeDurationWidgetColumnComponent extends AXPColumnWidgetComponent {
16711
16711
  this.internalValue = signal('', ...(ngDevMode ? [{ debugName: "internalValue" }] : []));
16712
16712
  }
16713
16713
  async ngAfterViewInit() {
16714
- this.internalValue.set(await this.timeDurationFormatter.millisecondsToMask(this.rawValue, this.from, this.to));
16714
+ this.internalValue.set(await this.timeDurationFormatter.millisecondsToMask(this.rawValue, this.from, this.to, false, '00:00:00:00:00:00:00:000', true));
16715
16715
  }
16716
16716
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTimeDurationWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
16717
16717
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPTimeDurationWidgetColumnComponent, isStandalone: true, selector: "axp-time-duration-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `{{ internalValue() }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -16738,6 +16738,8 @@ class AXPTimerDurationWidgetEditComponent extends AXPValueWidgetComponent {
16738
16738
  this.disabled = computed(() => this.options()['disabled'], ...(ngDevMode ? [{ debugName: "disabled" }] : []));
16739
16739
  this.from = computed(() => this.options()['from'].title, ...(ngDevMode ? [{ debugName: "from" }] : []));
16740
16740
  this.to = computed(() => this.options()['to'].title, ...(ngDevMode ? [{ debugName: "to" }] : []));
16741
+ this.minValue = computed(() => this.options()['minValue'], ...(ngDevMode ? [{ debugName: "minValue" }] : []));
16742
+ this.maxValue = computed(() => this.options()['maxValue'], ...(ngDevMode ? [{ debugName: "maxValue" }] : []));
16741
16743
  this.label = computed(() => this.options()['label'] ?? false, ...(ngDevMode ? [{ debugName: "label" }] : []));
16742
16744
  }
16743
16745
  handleChangeValue(e) {
@@ -16751,6 +16753,8 @@ class AXPTimerDurationWidgetEditComponent extends AXPValueWidgetComponent {
16751
16753
  [valueStart]="from()"
16752
16754
  [valueEnd]="to()"
16753
16755
  [label]="label()"
16756
+ [minValue]="minValue()"
16757
+ [maxValue]="maxValue()"
16754
16758
  [disabled]="disabled()"
16755
16759
  >
16756
16760
  @for (validation of validationRules(); track $index) {
@@ -16760,7 +16764,7 @@ class AXPTimerDurationWidgetEditComponent extends AXPValueWidgetComponent {
16760
16764
  [options]="validation.options"
16761
16765
  ></ax-validation-rule>
16762
16766
  }
16763
- </ax-time-duration>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i3$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTimeDurationModule }, { kind: "component", type: i3$7.AXTimeDurationComponent, selector: "ax-time-duration", inputs: ["disabled", "tabIndex", "readonly", "look", "valueStart", "valueEnd", "label", "maskDigits"], outputs: ["onValueChanged"] }, { kind: "ngmodule", type: AXValidationModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16767
+ </ax-time-duration>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i3$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTimeDurationModule }, { kind: "component", type: i3$7.AXTimeDurationComponent, selector: "ax-time-duration", inputs: ["disabled", "tabIndex", "readonly", "look", "valueStart", "valueEnd", "label", "maskDigits", "minValue", "maxValue"], outputs: ["onValueChanged"] }, { kind: "ngmodule", type: AXValidationModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16764
16768
  }
16765
16769
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTimerDurationWidgetEditComponent, decorators: [{
16766
16770
  type: Component,
@@ -16772,6 +16776,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
16772
16776
  [valueStart]="from()"
16773
16777
  [valueEnd]="to()"
16774
16778
  [label]="label()"
16779
+ [minValue]="minValue()"
16780
+ [maxValue]="maxValue()"
16775
16781
  [disabled]="disabled()"
16776
16782
  >
16777
16783
  @for (validation of validationRules(); track $index) {
@@ -16799,7 +16805,8 @@ class AXPTimerDurationWidgetViewComponent extends AXPValueWidgetComponent {
16799
16805
  this.translate = inject(AXTranslationService);
16800
16806
  this.from = computed(() => this.options()['from'].title, ...(ngDevMode ? [{ debugName: "from" }] : []));
16801
16807
  this.to = computed(() => this.options()['to'].title, ...(ngDevMode ? [{ debugName: "to" }] : []));
16802
- this.internalValue = computed(() => this.timeDurationFormatter.millisecondsToMask(this.getValue(), this.from(), this.to()), ...(ngDevMode ? [{ debugName: "internalValue" }] : []));
16808
+ this.label = computed(() => this.options()['label'] ?? false, ...(ngDevMode ? [{ debugName: "label" }] : []));
16809
+ this.internalValue = computed(() => this.timeDurationFormatter.millisecondsToMask(this.getValue(), this.from(), this.to(), this.label(), '00:00:00:00:00:00:00:000', true), ...(ngDevMode ? [{ debugName: "internalValue" }] : []));
16803
16810
  }
16804
16811
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTimerDurationWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
16805
16812
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPTimerDurationWidgetViewComponent, isStandalone: true, selector: "axp-time-duration-widget-view", usesInheritance: true, ngImport: i0, template: `<p class="ax-text-muted">{{ internalValue() | async }}</p>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -16826,7 +16833,7 @@ const AXPTimeDurationWidget = {
16826
16833
  icon: 'fa-light fa-clock',
16827
16834
  categories: AXP_WIDGETS_EDITOR_CATEGORY,
16828
16835
  groups: [AXPWidgetGroupEnum.FormElement],
16829
- defaultFilterWidgetName: 'number-filter',
16836
+ defaultFilterWidgetName: 'time-duration-filter',
16830
16837
  type: 'editor',
16831
16838
  properties: [
16832
16839
  AXP_DISABLED_PROPERTY,
@@ -17323,7 +17330,7 @@ class AXPNumberFilterWidgetEditComponent extends AXPValueWidgetComponent {
17323
17330
  constructor() {
17324
17331
  super(...arguments);
17325
17332
  this.value = computed(() => this.getValue()?.value, ...(ngDevMode ? [{ debugName: "value" }] : []));
17326
- this.operation = computed(() => this.getValue()?.operation || { type: 'contains' }, ...(ngDevMode ? [{ debugName: "operation" }] : []));
17333
+ this.operation = computed(() => this.getValue()?.operation || { type: 'equal' }, ...(ngDevMode ? [{ debugName: "operation" }] : []));
17327
17334
  this.placeholder = computed(() => this.options()['placeholder'], ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
17328
17335
  this.seprator = computed(() => this.options()['seprator'] ?? null, ...(ngDevMode ? [{ debugName: "seprator" }] : []));
17329
17336
  }
@@ -17682,6 +17689,108 @@ const AXPStringFilterWidget = {
17682
17689
  },
17683
17690
  };
17684
17691
 
17692
+ class AXPTimeDurationFilterComponent extends AXPValueWidgetComponent {
17693
+ constructor() {
17694
+ super(...arguments);
17695
+ this.timeDurationFormatter = inject(AXTimeDurationFormatter);
17696
+ this.editorPath = `__${this.path}EditorValue`;
17697
+ this.operation = computed(() => this.getValue()?.operation || { type: 'equal' }, ...(ngDevMode ? [{ debugName: "operation" }] : []));
17698
+ this.value = computed(() => this.getValue()?.value, ...(ngDevMode ? [{ debugName: "value" }] : []));
17699
+ this.hasClearButton = computed(() => this.options()['hasClearButton'], ...(ngDevMode ? [{ debugName: "hasClearButton" }] : []));
17700
+ this.timeDurationNode = signal({
17701
+ type: 'time-duration',
17702
+ defaultValue: undefined,
17703
+ options: {},
17704
+ path: this.editorPath,
17705
+ }, ...(ngDevMode ? [{ debugName: "timeDurationNode" }] : []));
17706
+ this.#efUpdateTimeDurationNode = effect(() => {
17707
+ const node = {
17708
+ type: 'time-duration',
17709
+ path: this.editorPath,
17710
+ options: {
17711
+ hasClearButton: this.hasClearButton(),
17712
+ from: { title: 'HOUR' },
17713
+ to: { title: 'MINUTE' },
17714
+ },
17715
+ };
17716
+ this.timeDurationNode.set(node);
17717
+ }, ...(ngDevMode ? [{ debugName: "#efUpdateTimeDurationNode" }] : []));
17718
+ this.displayText = async () => {
17719
+ return await this.timeDurationFormatter.millisecondsToMask(this.value(), 'HOUR', 'MINUTE', false, '00:00:00:00:00:00:00:000', true);
17720
+ };
17721
+ this.#efUpdateValue = effect(async () => {
17722
+ const newValue = this.contextService.getValue(this.editorPath);
17723
+ untracked(async () => {
17724
+ this.setValue({
17725
+ value: newValue,
17726
+ operation: this.operation(),
17727
+ displayText: await this.displayText(),
17728
+ });
17729
+ });
17730
+ }, ...(ngDevMode ? [{ debugName: "#efUpdateValue" }] : []));
17731
+ }
17732
+ #efUpdateTimeDurationNode;
17733
+ #efUpdateValue;
17734
+ handleOperationChanged(e) {
17735
+ this.setValue({
17736
+ value: this.value(),
17737
+ operation: { type: e },
17738
+ displayText: this.displayText(),
17739
+ });
17740
+ }
17741
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTimeDurationFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
17742
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPTimeDurationFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
17743
+ <div class="ax-flex ax-items-center ax-gap-2">
17744
+ <div class="ax-flex-1">
17745
+ <ng-container axp-widget-renderer [node]="timeDurationNode()" mode="edit"></ng-container>
17746
+ </div>
17747
+ <axp-filter-operations
17748
+ [type]="'number'"
17749
+ [selectedOperation]="operation().type"
17750
+ (selectedOperationChange)="handleOperationChanged($event)"
17751
+ ></axp-filter-operations>
17752
+ </div>
17753
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i1$5.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "component", type: AXPFilterOperationsComponent, selector: "axp-filter-operations", inputs: ["selectedOperation", "type"], outputs: ["selectedOperationChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17754
+ }
17755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTimeDurationFilterComponent, decorators: [{
17756
+ type: Component,
17757
+ args: [{
17758
+ template: `
17759
+ <div class="ax-flex ax-items-center ax-gap-2">
17760
+ <div class="ax-flex-1">
17761
+ <ng-container axp-widget-renderer [node]="timeDurationNode()" mode="edit"></ng-container>
17762
+ </div>
17763
+ <axp-filter-operations
17764
+ [type]="'number'"
17765
+ [selectedOperation]="operation().type"
17766
+ (selectedOperationChange)="handleOperationChanged($event)"
17767
+ ></axp-filter-operations>
17768
+ </div>
17769
+ `,
17770
+ standalone: true,
17771
+ changeDetection: ChangeDetectionStrategy.OnPush,
17772
+ imports: [CommonModule, AXPWidgetCoreModule, AXPFilterOperationsComponent],
17773
+ }]
17774
+ }] });
17775
+
17776
+ var timeDurationFilter_component = /*#__PURE__*/Object.freeze({
17777
+ __proto__: null,
17778
+ AXPTimeDurationFilterComponent: AXPTimeDurationFilterComponent
17779
+ });
17780
+
17781
+ const AXPTimeDurationFilterWidget = {
17782
+ name: 'time-duration-filter',
17783
+ title: 'Time Duration Filter',
17784
+ type: 'filter',
17785
+ icon: 'fa-light fa-square',
17786
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
17787
+ components: {
17788
+ edit: {
17789
+ component: () => Promise.resolve().then(function () { return timeDurationFilter_component; }).then((c) => c.AXPTimeDurationFilterComponent),
17790
+ },
17791
+ },
17792
+ };
17793
+
17685
17794
  const AXPDocumentWidget = {
17686
17795
  name: 'document-layout',
17687
17796
  title: 'Document',
@@ -19286,6 +19395,7 @@ class AXPWidgetsModule {
19286
19395
  AXPNumberFilterWidget,
19287
19396
  AXPDateTimeFilterWidget,
19288
19397
  AXPSelectFilterWidget,
19398
+ AXPTimeDurationFilterWidget,
19289
19399
  AXPFlexOptionsWidget,
19290
19400
  AXPFlexItemOptionsWidget,
19291
19401
  AXPGridOptionsWidget,
@@ -19374,6 +19484,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
19374
19484
  AXPNumberFilterWidget,
19375
19485
  AXPDateTimeFilterWidget,
19376
19486
  AXPSelectFilterWidget,
19487
+ AXPTimeDurationFilterWidget,
19377
19488
  AXPFlexOptionsWidget,
19378
19489
  AXPFlexItemOptionsWidget,
19379
19490
  AXPGridOptionsWidget,