@alfresco/adf-content-services 8.4.0-17799840184 → 8.4.0-17806466306

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.
@@ -24,6 +24,7 @@ import * as i4 from '@angular/material/button';
24
24
  import { MatButtonModule } from '@angular/material/button';
25
25
  import * as i5 from '@angular/material/progress-bar';
26
26
  import { MatProgressBarModule } from '@angular/material/progress-bar';
27
+ import { Buffer } from 'buffer';
27
28
  import { Router, ActivatedRoute } from '@angular/router';
28
29
  import * as i1$5 from '@angular/cdk/a11y';
29
30
  import { A11yModule } from '@angular/cdk/a11y';
@@ -4540,13 +4541,7 @@ class BaseQueryBuilderService {
4540
4541
  * Encodes filter configuration stored in filterRawParams object.
4541
4542
  */
4542
4543
  encodeQuery() {
4543
- try {
4544
- this.encodedQuery = btoa(JSON.stringify(this.filterRawParams));
4545
- }
4546
- catch (error) {
4547
- console.error('Failed to encode query parameters:', error);
4548
- this.encodedQuery = '';
4549
- }
4544
+ this.encodedQuery = Buffer.from(JSON.stringify(this.filterRawParams)).toString('base64');
4550
4545
  }
4551
4546
  /**
4552
4547
  * Encodes existing filters configuration and updates search query param value.
@@ -6186,7 +6181,6 @@ var AutocompleteField;
6186
6181
  (function (AutocompleteField) {
6187
6182
  AutocompleteField["TAG"] = "TAG";
6188
6183
  AutocompleteField["CATEGORIES"] = "cm:categories";
6189
- AutocompleteField["LOCATION"] = "SITE";
6190
6184
  })(AutocompleteField || (AutocompleteField = {}));
6191
6185
 
6192
6186
  /*!
@@ -6372,10 +6366,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
6372
6366
  * limitations under the License.
6373
6367
  */
6374
6368
  class SearchFilterAutocompleteChipsComponent {
6375
- constructor(tagService, categoryService, sitesService) {
6369
+ constructor(tagService, categoryService) {
6376
6370
  this.tagService = tagService;
6377
6371
  this.categoryService = categoryService;
6378
- this.sitesService = sitesService;
6379
6372
  this.startValue = [];
6380
6373
  this.displayValue$ = new ReplaySubject(1);
6381
6374
  this.selectedOptions = [];
@@ -6436,13 +6429,8 @@ class SearchFilterAutocompleteChipsComponent {
6436
6429
  this.submitValues();
6437
6430
  }
6438
6431
  onInputChange(value) {
6439
- if (value) {
6440
- if (this.settings.field === AutocompleteField.CATEGORIES) {
6441
- this.searchForExistingCategories(value);
6442
- }
6443
- else if (this.settings.field === AutocompleteField.LOCATION) {
6444
- this.populateSitesOptions();
6445
- }
6432
+ if (this.settings.field === AutocompleteField.CATEGORIES && value) {
6433
+ this.searchForExistingCategories(value);
6446
6434
  }
6447
6435
  }
6448
6436
  optionComparator(option1, option2) {
@@ -6453,16 +6441,11 @@ class SearchFilterAutocompleteChipsComponent {
6453
6441
  this.displayValue$.next(this.selectedOptions.map((option) => option.value).join(', '));
6454
6442
  if (this.context && this.settings && this.settings.field) {
6455
6443
  let queryFragments;
6456
- switch (this.settings.field) {
6457
- case AutocompleteField.CATEGORIES:
6458
- queryFragments = this.selectedOptions.map((val) => `${this.settings.field}:"workspace://SpacesStore/${val.id}"`);
6459
- break;
6460
- case AutocompleteField.LOCATION:
6461
- queryFragments = this.selectedOptions.map((val) => val.query ?? `${this.settings.field}:"${val.id}"`);
6462
- break;
6463
- default:
6464
- queryFragments = this.selectedOptions.map((val) => val.query ?? `${this.settings.field}:"${val.value}"`);
6465
- break;
6444
+ if (this.settings.field === AutocompleteField.CATEGORIES) {
6445
+ queryFragments = this.selectedOptions.map((val) => `${this.settings.field}:"workspace://SpacesStore/${val.id}"`);
6446
+ }
6447
+ else {
6448
+ queryFragments = this.selectedOptions.map((val) => val.query ?? `${this.settings.field}:"${val.value}"`);
6466
6449
  }
6467
6450
  this.context.queryFragments[this.id] = queryFragments.join(' OR ');
6468
6451
  if (updateContext) {
@@ -6482,9 +6465,6 @@ class SearchFilterAutocompleteChipsComponent {
6482
6465
  case AutocompleteField.CATEGORIES:
6483
6466
  this.autocompleteOptionsSubject$.next([]);
6484
6467
  break;
6485
- case AutocompleteField.LOCATION:
6486
- this.autocompleteOptionsSubject$.next([]);
6487
- break;
6488
6468
  default:
6489
6469
  this.autocompleteOptionsSubject$.next(this.settings.autocompleteOptions);
6490
6470
  }
@@ -6498,26 +6478,13 @@ class SearchFilterAutocompleteChipsComponent {
6498
6478
  }));
6499
6479
  });
6500
6480
  }
6501
- populateSitesOptions() {
6502
- this.sitesService
6503
- .getSites()
6504
- .pipe(map((sites) => {
6505
- const predefinedOptions = this.settings?.autocompleteOptions || [];
6506
- const sitesOptions = sites.list.entries.map((siteEntry) => ({
6507
- id: siteEntry.entry.id,
6508
- value: siteEntry.entry.title
6509
- }));
6510
- return [...sitesOptions, ...predefinedOptions];
6511
- }))
6512
- .subscribe((options) => this.autocompleteOptionsSubject$.next(options));
6513
- }
6514
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SearchFilterAutocompleteChipsComponent, deps: [{ token: TagService }, { token: CategoryService }, { token: SitesService }], target: i0.ɵɵFactoryTarget.Component }); }
6481
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SearchFilterAutocompleteChipsComponent, deps: [{ token: TagService }, { token: CategoryService }], target: i0.ɵɵFactoryTarget.Component }); }
6515
6482
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SearchFilterAutocompleteChipsComponent, isStandalone: true, selector: "adf-search-filter-autocomplete-chips", ngImport: i0, template: "<adf-search-chip-autocomplete-input\n [autocompleteOptions]=\"autocompleteOptions$ | async\"\n [preselectedOptions]=\"selectedOptions\"\n [onReset$]=\"reset$\"\n [allowOnlyPredefinedValues]=\"settings.allowOnlyPredefinedValues\"\n (inputChanged)=\"onInputChange($event)\"\n [compareOption]=\"optionComparator\"\n (optionsChanged)=\"onOptionsChange($event)\" />\n\n<div class=\"adf-facet-buttons\" *ngIf=\"!settings?.hideDefaultAction\">\n <button mat-button color=\"primary\" data-automation-id=\"adf-search-chip-autocomplete-btn-clear\" (click)=\"reset()\">\n {{ 'SEARCH.FILTER.ACTIONS.CLEAR' | translate }}\n </button>\n <button mat-button color=\"primary\" data-automation-id=\"adf-search-chip-autocomplete-btn-apply\" (click)=\"submitValues()\">\n {{ 'SEARCH.FILTER.ACTIONS.APPLY' | translate }}\n </button>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: SearchChipAutocompleteInputComponent, selector: "adf-search-chip-autocomplete-input", inputs: ["autocompleteOptions", "preselectedOptions", "onReset$", "allowOnlyPredefinedValues", "placeholder", "compareOption", "formatChipValue", "filter"], outputs: ["optionsChanged", "inputChanged"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], encapsulation: i0.ViewEncapsulation.None }); }
6516
6483
  }
6517
6484
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SearchFilterAutocompleteChipsComponent, decorators: [{
6518
6485
  type: Component,
6519
6486
  args: [{ selector: 'adf-search-filter-autocomplete-chips', imports: [CommonModule, SearchChipAutocompleteInputComponent, TranslatePipe, MatButtonModule], encapsulation: ViewEncapsulation.None, template: "<adf-search-chip-autocomplete-input\n [autocompleteOptions]=\"autocompleteOptions$ | async\"\n [preselectedOptions]=\"selectedOptions\"\n [onReset$]=\"reset$\"\n [allowOnlyPredefinedValues]=\"settings.allowOnlyPredefinedValues\"\n (inputChanged)=\"onInputChange($event)\"\n [compareOption]=\"optionComparator\"\n (optionsChanged)=\"onOptionsChange($event)\" />\n\n<div class=\"adf-facet-buttons\" *ngIf=\"!settings?.hideDefaultAction\">\n <button mat-button color=\"primary\" data-automation-id=\"adf-search-chip-autocomplete-btn-clear\" (click)=\"reset()\">\n {{ 'SEARCH.FILTER.ACTIONS.CLEAR' | translate }}\n </button>\n <button mat-button color=\"primary\" data-automation-id=\"adf-search-chip-autocomplete-btn-apply\" (click)=\"submitValues()\">\n {{ 'SEARCH.FILTER.ACTIONS.APPLY' | translate }}\n </button>\n</div>\n" }]
6520
- }], ctorParameters: () => [{ type: TagService }, { type: CategoryService }, { type: SitesService }] });
6487
+ }], ctorParameters: () => [{ type: TagService }, { type: CategoryService }] });
6521
6488
 
6522
6489
  /*!
6523
6490
  * @license