@ecodev/natural 65.0.4 → 65.0.7

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.
@@ -196,17 +196,18 @@ function formatIsoDateTime(date) {
196
196
  const timezoneOffsetInMinutes = Math.round(date.getTimezoneOffset());
197
197
  const timezoneOffsetInHours = -Math.trunc(timezoneOffsetInMinutes / 60); // UTC minus local time
198
198
  const sign = timezoneOffsetInHours >= 0 ? '+' : '-';
199
- const remainderMinutes = -(timezoneOffsetInMinutes % 60);
199
+ const remainderMinutes = -timezoneOffsetInMinutes % 60;
200
200
  // It's a bit unfortunate that we need to construct a new Date instance,
201
201
  // but we don't want the original Date instance to be modified
202
202
  const correctedDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
203
203
  correctedDate.setHours(date.getHours() + timezoneOffsetInHours);
204
+ correctedDate.setMinutes(date.getMinutes() + remainderMinutes);
204
205
  const iso = correctedDate
205
206
  .toISOString()
206
207
  .replace(/\.\d{3}Z/, '')
207
208
  .replace('Z', '');
208
209
  const hours = Math.abs(timezoneOffsetInHours).toString().padStart(2, '0');
209
- const minutes = remainderMinutes.toString().padStart(2, '0');
210
+ const minutes = Math.abs(remainderMinutes).toString().padStart(2, '0');
210
211
  return iso + sign + hours + ':' + minutes;
211
212
  }
212
213
  /**
@@ -6502,7 +6503,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
6502
6503
  class TypeSelectComponent {
6503
6504
  destroyRef = inject(DestroyRef);
6504
6505
  renderedValue = new BehaviorSubject('');
6505
- list = viewChild(MatSelectionList, ...(ngDevMode ? [{ debugName: "list" }] : []));
6506
6506
  requireValueCtrl = false;
6507
6507
  operators = possibleDiscreteOperators;
6508
6508
  operatorCtrl = new FormControl('is', { nonNullable: true });
@@ -6529,12 +6529,6 @@ class TypeSelectComponent {
6529
6529
  });
6530
6530
  this.reloadCondition(data.condition);
6531
6531
  }
6532
- ngAfterViewInit() {
6533
- const list = this.list();
6534
- if (!this.isMultiple() && list) {
6535
- list.selectedOptions._multiple = false;
6536
- }
6537
- }
6538
6532
  getId(item) {
6539
6533
  if (typeof item === 'object' && item) {
6540
6534
  return item.id || item.value;
@@ -6648,7 +6642,7 @@ class TypeSelectComponent {
6648
6642
  }
6649
6643
  }
6650
6644
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TypeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6651
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.7", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\">\n @for (item of items; track item) {\n <mat-list-option togglePosition=\"before\" [value]=\"getId(item)\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] });
6645
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.7", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\" [multiple]=\"configuration.multiple\">\n @for (item of items; track item) {\n <mat-list-option togglePosition=\"before\" [value]=\"getId(item)\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] });
6652
6646
  }
6653
6647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TypeSelectComponent, decorators: [{
6654
6648
  type: Component,
@@ -6661,8 +6655,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
6661
6655
  MatOption,
6662
6656
  MatSelectionList,
6663
6657
  MatListOption,
6664
- ], template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\">\n @for (item of items; track item) {\n <mat-list-option togglePosition=\"before\" [value]=\"getId(item)\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n" }]
6665
- }], ctorParameters: () => [], propDecorators: { list: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSelectionList), { isSignal: true }] }] } });
6658
+ ], template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\" [multiple]=\"configuration.multiple\">\n @for (item of items; track item) {\n <mat-list-option togglePosition=\"before\" [value]=\"getId(item)\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n" }]
6659
+ }], ctorParameters: () => [] });
6666
6660
 
6667
6661
  class AbstractAssociationSelectComponent {
6668
6662
  configuration;
@@ -8315,13 +8309,13 @@ class NaturalHierarchicSelectorComponent {
8315
8309
  * Get list of children, considering given FlatNode id as a parent.
8316
8310
  * Mark loading status individually on nodes.
8317
8311
  */
8318
- loadChildren(node, contextFilter = null) {
8312
+ loadChildren(node) {
8319
8313
  if (node.hasChildren) {
8320
8314
  return;
8321
8315
  }
8322
8316
  node.isLoading = true;
8323
8317
  this.hierarchicSelectorService
8324
- .getList(node, contextFilter, null, this.config())
8318
+ .getList(node, this.filters(), null, this.config())
8325
8319
  .pipe(finalize$1(() => (node.isLoading = false)))
8326
8320
  .subscribe(items => node.childrenChange.next(items));
8327
8321
  }