@arsedizioni/ars-utils 20.3.62 → 20.3.64

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.
@@ -2877,8 +2877,14 @@ class ClipperSearchFreeTextQueryBuilderComponent {
2877
2877
  let parts = this.queryOr.split(',');
2878
2878
  for (let i = 0; i < parts.length; i++) {
2879
2879
  if (query.length > 0)
2880
- query += ', ';
2881
- query += parts[i].replace('"', '').trim();
2880
+ query += ' ';
2881
+ const p = parts[i].trim();
2882
+ const phrase = p.indexOf(' ') !== -1;
2883
+ if (phrase)
2884
+ query += '"';
2885
+ query += p.replace('"', '').trim();
2886
+ if (phrase)
2887
+ query += '"';
2882
2888
  }
2883
2889
  query += ' ';
2884
2890
  }
@@ -2887,15 +2893,22 @@ class ClipperSearchFreeTextQueryBuilderComponent {
2887
2893
  let parts = this.queryAnd.split(',');
2888
2894
  for (let i = 0; i < parts.length; i++) {
2889
2895
  if (query.length > 0)
2890
- query += ', +';
2891
- query += parts[i].replace('"', '').trim();
2896
+ query += ' ';
2897
+ query += '+';
2898
+ const p = parts[i].trim();
2899
+ const phrase = p.indexOf(' ') !== -1;
2900
+ if (phrase)
2901
+ query += '"';
2902
+ query += p.replace('"', '').trim();
2903
+ if (phrase)
2904
+ query += '"';
2892
2905
  }
2893
2906
  query += ' ';
2894
2907
  }
2895
2908
  // Start with
2896
2909
  if (this.queryStart.length > 0) {
2897
2910
  if (query.length > 0)
2898
- query += ', +';
2911
+ query += ' +';
2899
2912
  query += this.queryStart.replace('"', '').trim();
2900
2913
  query += '*';
2901
2914
  query += ' ';
@@ -2910,14 +2923,21 @@ class ClipperSearchFreeTextQueryBuilderComponent {
2910
2923
  let parts = this.queryNot.split(',');
2911
2924
  for (let i = 0; i < parts.length; i++) {
2912
2925
  if (query.length > 0)
2913
- query += ', -';
2914
- query += parts[i].replace('"', '').trim();
2926
+ query += ' ';
2927
+ query += '-';
2928
+ const p = parts[i].trim();
2929
+ const phrase = p.indexOf(' ') !== -1;
2930
+ if (phrase)
2931
+ query += '"';
2932
+ query += p.replace('"', '').trim();
2933
+ if (phrase)
2934
+ query += '"';
2915
2935
  }
2916
2936
  query += ' ';
2917
2937
  }
2918
2938
  // Notify
2919
2939
  if (query.length > 0)
2920
- this.done.emit({ query: query });
2940
+ this.done.emit({ query: query.trim() });
2921
2941
  }
2922
2942
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ClipperSearchFreeTextQueryBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2923
2943
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: ClipperSearchFreeTextQueryBuilderComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, host: { attributes: { "Bind": SystemUtils.generateUUID() } }, ngImport: i0, template: "<h2 mat-dialog-title>Trova gli elementi che contengono...</h2>\r\n<mat-dialog-content>\r\n <form name=\"form\" #f=\"ngForm\" (keyup.Enter)=\"!f.form.invalid ? ok() : null\" novalidate>\r\n <div fxLayout=\"column\" style=\"padding-bottom: 20px;\">\r\n <mat-form-field>\r\n <mat-label>Questa esatta parola o frase</mat-label>\r\n <input matInput name=\"queryPhrase\" [(ngModel)]=\"queryPhrase\" maxlength=\"200\" />\r\n @if (queryPhrase) {\r\n <a matSuffix mat-icon-button aria-label=\"Azzera\" (click)=\"queryPhrase=''\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Tutte queste parole</mat-label>\r\n <input matInput name=\"queryAnd\" [(ngModel)]=\"queryAnd\" maxlength=\"200\" />\r\n @if (queryAnd) {\r\n <a matSuffix mat-icon-button aria-label=\"Azzera\" (click)=\"queryAnd=''\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n <mat-hint>Separate da virgola</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Una qualunque di queste parole</mat-label>\r\n <input matInput name=\"queryOr\" [(ngModel)]=\"queryOr\" maxlength=\"200\" />\r\n @if (queryOr) {\r\n <a matSuffix mat-icon-button aria-label=\"Azzera\" (click)=\"queryOr=''\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n <mat-hint>Separate da virgola</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Parole che iniziano con</mat-label>\r\n <input matInput name=\"queryStart\" [(ngModel)]=\"queryStart\" maxlength=\"200\" />\r\n @if (queryStart) {\r\n <a matSuffix mat-icon-button aria-label=\"Azzera\" (click)=\"queryStart=''\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Nessuna qualunque di queste parole</mat-label>\r\n <input matInput name=\"queryNot\" [(ngModel)]=\"queryNot\" maxlength=\"200\" />\r\n @if (queryNot) {\r\n <a matSuffix mat-icon-button aria-label=\"Azzera\" (click)=\"queryNot=''\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n <mat-hint>Separate da virgola. L'operatore di esclusione funziona solo se prima \u00E8 stato inserito un valore in\r\n almeno uno degli altri quattro campi. </mat-hint>\r\n </mat-form-field>\r\n </div> \r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"30\" fxLayoutAlign=\"start\">\r\n <button type=\"button\" mat-stroked-button (click)=\"clear()\" color=\"primary\">Pulisci</button>\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button color=\"primary\" (click)=\"ok()\">Ok</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\">Annulla</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [""], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FlexModule$1 }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }