@sinequa/atomic-angular 0.3.22 → 0.3.25
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.
- package/fesm2022/sinequa-atomic-angular.mjs +48 -30
- package/fesm2022/sinequa-atomic-angular.mjs.map +1 -1
- package/index.d.ts +254 -159
- package/package.json +1 -1
|
@@ -1589,7 +1589,7 @@ class QueryService {
|
|
|
1589
1589
|
// basket overrides this rule,
|
|
1590
1590
|
// open action (to open aggregations's children) also overrides this rule
|
|
1591
1591
|
// determine if there are any filters applied
|
|
1592
|
-
const currentFilters = this.queryParamsStore.filters
|
|
1592
|
+
const currentFilters = this.queryParamsStore.filters || [];
|
|
1593
1593
|
const hasFilters = currentFilters.length > 0;
|
|
1594
1594
|
if (!hasFilters && !query.basket && query.action !== "open") {
|
|
1595
1595
|
const allowEmptySearch = this.appStore.allowEmptySearch(query?.name || "");
|
|
@@ -3878,7 +3878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3878
3878
|
* - `article`: The selected article.
|
|
3879
3879
|
* - `id`: The ID of the selected article.
|
|
3880
3880
|
* - `queryText`: The query text associated with the selection.
|
|
3881
|
-
*
|
|
3881
|
+
* - `queryName`: The query name associated with the selection.
|
|
3882
3882
|
* @methods
|
|
3883
3883
|
* - `update(article: Article, queryText?: string)`: Updates the store with a new article and optional query text.
|
|
3884
3884
|
* - `updateQueryText(queryText: string)`: Updates the query text in the store.
|
|
@@ -3890,6 +3890,7 @@ function withSelectionFeatures() {
|
|
|
3890
3890
|
article: undefined,
|
|
3891
3891
|
id: undefined,
|
|
3892
3892
|
queryText: undefined,
|
|
3893
|
+
queryName: undefined,
|
|
3893
3894
|
previewHighlights: undefined,
|
|
3894
3895
|
assistantIdsToAttach: []
|
|
3895
3896
|
}), withMethods((store) => ({
|
|
@@ -3915,6 +3916,7 @@ function withSelectionFeatures() {
|
|
|
3915
3916
|
article: undefined,
|
|
3916
3917
|
id: undefined,
|
|
3917
3918
|
queryText: undefined,
|
|
3919
|
+
queryName: undefined,
|
|
3918
3920
|
previewHighlights: undefined,
|
|
3919
3921
|
assistantIdsToAttach: undefined
|
|
3920
3922
|
};
|
|
@@ -6645,8 +6647,9 @@ class SelectArticleOnClickDirective {
|
|
|
6645
6647
|
drawerStack = inject(DrawerStackService);
|
|
6646
6648
|
router = inject(Router);
|
|
6647
6649
|
article = input.required(...(ngDevMode ? [{ debugName: "article" }] : []));
|
|
6648
|
-
strategy = input(
|
|
6649
|
-
redirectUrl = input(
|
|
6650
|
+
strategy = input("stack", ...(ngDevMode ? [{ debugName: "strategy" }] : []));
|
|
6651
|
+
redirectUrl = input("/preview", ...(ngDevMode ? [{ debugName: "redirectUrl" }] : []));
|
|
6652
|
+
selected = output();
|
|
6650
6653
|
onEnter(e) {
|
|
6651
6654
|
if (e && isNotInputEvent(e)) {
|
|
6652
6655
|
this.onClick();
|
|
@@ -6656,10 +6659,10 @@ class SelectArticleOnClickDirective {
|
|
|
6656
6659
|
if (!this.article())
|
|
6657
6660
|
return;
|
|
6658
6661
|
switch (this.strategy()) {
|
|
6659
|
-
case
|
|
6662
|
+
case "replace":
|
|
6660
6663
|
this.drawerStack.replace(this.article());
|
|
6661
6664
|
break;
|
|
6662
|
-
case
|
|
6665
|
+
case "redirect":
|
|
6663
6666
|
if (this.article()?.id) {
|
|
6664
6667
|
this.router.navigate([this.redirectUrl(), this.article().id]);
|
|
6665
6668
|
}
|
|
@@ -6667,27 +6670,30 @@ class SelectArticleOnClickDirective {
|
|
|
6667
6670
|
this.drawerStack.stack(this.article());
|
|
6668
6671
|
}
|
|
6669
6672
|
break;
|
|
6670
|
-
case
|
|
6673
|
+
case "emit":
|
|
6674
|
+
this.selected.emit();
|
|
6675
|
+
break;
|
|
6676
|
+
case "stack":
|
|
6671
6677
|
default:
|
|
6672
6678
|
this.drawerStack.stack(this.article());
|
|
6673
6679
|
break;
|
|
6674
6680
|
}
|
|
6675
6681
|
}
|
|
6676
6682
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SelectArticleOnClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6677
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: SelectArticleOnClickDirective, isStandalone: true, selector: "[selectArticleOnClick]", inputs: { article: { classPropertyName: "article", publicName: "article", isSignal: true, isRequired: true, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null }, redirectUrl: { classPropertyName: "redirectUrl", publicName: "redirectUrl", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.enter": "onEnter($event)", "click": "onClick()" } }, ngImport: i0 });
|
|
6683
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: SelectArticleOnClickDirective, isStandalone: true, selector: "[selectArticleOnClick]", inputs: { article: { classPropertyName: "article", publicName: "article", isSignal: true, isRequired: true, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null }, redirectUrl: { classPropertyName: "redirectUrl", publicName: "redirectUrl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "keydown.enter": "onEnter($event)", "click": "onClick()" } }, ngImport: i0 });
|
|
6678
6684
|
}
|
|
6679
6685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SelectArticleOnClickDirective, decorators: [{
|
|
6680
6686
|
type: Directive,
|
|
6681
6687
|
args: [{
|
|
6682
|
-
selector:
|
|
6688
|
+
selector: "[selectArticleOnClick]",
|
|
6683
6689
|
standalone: true,
|
|
6684
6690
|
host: {
|
|
6685
|
-
|
|
6691
|
+
"(keydown.enter)": "onEnter($event)"
|
|
6686
6692
|
}
|
|
6687
6693
|
}]
|
|
6688
|
-
}], propDecorators: { article: [{ type: i0.Input, args: [{ isSignal: true, alias: "article", required: true }] }], strategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "strategy", required: false }] }], redirectUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "redirectUrl", required: false }] }], onClick: [{
|
|
6694
|
+
}], propDecorators: { article: [{ type: i0.Input, args: [{ isSignal: true, alias: "article", required: true }] }], strategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "strategy", required: false }] }], redirectUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "redirectUrl", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], onClick: [{
|
|
6689
6695
|
type: HostListener,
|
|
6690
|
-
args: [
|
|
6696
|
+
args: ["click"]
|
|
6691
6697
|
}] } });
|
|
6692
6698
|
|
|
6693
6699
|
/**
|
|
@@ -10293,6 +10299,7 @@ class SimilarDocumentsPanel {
|
|
|
10293
10299
|
queryParamsStore = inject(QueryParamsStore);
|
|
10294
10300
|
article = input.required(...(ngDevMode ? [{ debugName: "article" }] : []));
|
|
10295
10301
|
strategy = input("stack", ...(ngDevMode ? [{ debugName: "strategy" }] : []));
|
|
10302
|
+
selected = output();
|
|
10296
10303
|
queryName = computed(() => this.queryParamsStore.getQuery().name, ...(ngDevMode ? [{ debugName: "queryName" }] : []));
|
|
10297
10304
|
similarDocumentsResource = resource({
|
|
10298
10305
|
params: () => {
|
|
@@ -10312,7 +10319,7 @@ class SimilarDocumentsPanel {
|
|
|
10312
10319
|
return [];
|
|
10313
10320
|
}, ...(ngDevMode ? [{ debugName: "similarDocuments" }] : []));
|
|
10314
10321
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimilarDocumentsPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10315
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimilarDocumentsPanel, isStandalone: true, selector: "similar-documents-panel, SimilarDocumentsPanel, similardocumentspanel", inputs: { article: { classPropertyName: "article", publicName: "article", isSignal: true, isRequired: true, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
10322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimilarDocumentsPanel, isStandalone: true, selector: "similar-documents-panel, SimilarDocumentsPanel, similardocumentspanel", inputs: { article: { classPropertyName: "article", publicName: "article", isSignal: true, isRequired: true, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: `
|
|
10316
10323
|
@if (similarDocuments().length > 0) {
|
|
10317
10324
|
<details class="group" name="advanced-search-panels">
|
|
10318
10325
|
<summary class="sticky top-0 flex cursor-pointer select-none items-baseline justify-between p-3">
|
|
@@ -10327,7 +10334,7 @@ class SimilarDocumentsPanel {
|
|
|
10327
10334
|
<div>
|
|
10328
10335
|
<ul class="mb-2 mt-4 flex flex-col flex-wrap px-2" role="list">
|
|
10329
10336
|
@for (document of similarDocuments(); track $index) {
|
|
10330
|
-
<li role="listitem" selectArticleOnClick [article]="document" [strategy]="strategy() || 'stack'">
|
|
10337
|
+
<li role="listitem" selectArticleOnClick [article]="document" [strategy]="strategy() || 'stack'" (selected)="selected.emit(document)">
|
|
10331
10338
|
<div class="text-primary flex size-5 items-center justify-center rounded-full">
|
|
10332
10339
|
<source [collection]="article().collection" [connector]="article().connector" class="text-xs" />
|
|
10333
10340
|
</div>
|
|
@@ -10339,7 +10346,7 @@ class SimilarDocumentsPanel {
|
|
|
10339
10346
|
</div>
|
|
10340
10347
|
</details>
|
|
10341
10348
|
}
|
|
10342
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: SelectArticleOnClickDirective, selector: "[selectArticleOnClick]", inputs: ["article", "strategy", "redirectUrl"] }, { kind: "component", type: SourceComponent, selector: "source, Source", inputs: ["collection", "connector"] }, { kind: "directive", type: ListItemComponent, selector: "[role=\"listitem\"], [role=\"option\"]", inputs: ["class", "variant", "decoration"] }, { kind: "component", type: ChevronRightIcon, selector: "chevron-right, ChevronRight, chevronright, ChevronRightIcon", inputs: ["class"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
10349
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: SelectArticleOnClickDirective, selector: "[selectArticleOnClick]", inputs: ["article", "strategy", "redirectUrl"], outputs: ["selected"] }, { kind: "component", type: SourceComponent, selector: "source, Source", inputs: ["collection", "connector"] }, { kind: "directive", type: ListItemComponent, selector: "[role=\"listitem\"], [role=\"option\"]", inputs: ["class", "variant", "decoration"] }, { kind: "component", type: ChevronRightIcon, selector: "chevron-right, ChevronRight, chevronright, ChevronRightIcon", inputs: ["class"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
10343
10350
|
}
|
|
10344
10351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimilarDocumentsPanel, decorators: [{
|
|
10345
10352
|
type: Component,
|
|
@@ -10361,7 +10368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10361
10368
|
<div>
|
|
10362
10369
|
<ul class="mb-2 mt-4 flex flex-col flex-wrap px-2" role="list">
|
|
10363
10370
|
@for (document of similarDocuments(); track $index) {
|
|
10364
|
-
<li role="listitem" selectArticleOnClick [article]="document" [strategy]="strategy() || 'stack'">
|
|
10371
|
+
<li role="listitem" selectArticleOnClick [article]="document" [strategy]="strategy() || 'stack'" (selected)="selected.emit(document)">
|
|
10365
10372
|
<div class="text-primary flex size-5 items-center justify-center rounded-full">
|
|
10366
10373
|
<source [collection]="article().collection" [connector]="article().connector" class="text-xs" />
|
|
10367
10374
|
</div>
|
|
@@ -10375,29 +10382,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10375
10382
|
}
|
|
10376
10383
|
`
|
|
10377
10384
|
}]
|
|
10378
|
-
}], propDecorators: { article: [{ type: i0.Input, args: [{ isSignal: true, alias: "article", required: true }] }], strategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "strategy", required: false }] }] } });
|
|
10385
|
+
}], propDecorators: { article: [{ type: i0.Input, args: [{ isSignal: true, alias: "article", required: true }] }], strategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "strategy", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
10379
10386
|
|
|
10380
10387
|
class AdvancedSearchComponent {
|
|
10381
10388
|
cn = cn;
|
|
10382
10389
|
article = input.required(...(ngDevMode ? [{ debugName: "article" }] : []));
|
|
10383
10390
|
previewStrategy = input(undefined, ...(ngDevMode ? [{ debugName: "previewStrategy" }] : []));
|
|
10391
|
+
selected = output();
|
|
10384
10392
|
selectionStore = inject(SelectionStore);
|
|
10385
10393
|
queryParamsStore = inject(QueryParamsStore);
|
|
10386
10394
|
queryText = linkedSignal(...(ngDevMode ? [{ debugName: "queryText", source: () => {
|
|
10387
10395
|
const { queryText } = getState(this.selectionStore);
|
|
10388
10396
|
return queryText;
|
|
10389
10397
|
},
|
|
10390
|
-
computation: queryText => {
|
|
10391
|
-
const text = queryText ||
|
|
10392
|
-
return text ? text.trim() :
|
|
10398
|
+
computation: (queryText) => {
|
|
10399
|
+
const text = queryText || "";
|
|
10400
|
+
return text ? text.trim() : "";
|
|
10393
10401
|
} }] : [{
|
|
10394
10402
|
source: () => {
|
|
10395
10403
|
const { queryText } = getState(this.selectionStore);
|
|
10396
10404
|
return queryText;
|
|
10397
10405
|
},
|
|
10398
|
-
computation: queryText => {
|
|
10399
|
-
const text = queryText ||
|
|
10400
|
-
return text ? text.trim() :
|
|
10406
|
+
computation: (queryText) => {
|
|
10407
|
+
const text = queryText || "";
|
|
10408
|
+
return text ? text.trim() : "";
|
|
10401
10409
|
}
|
|
10402
10410
|
}]));
|
|
10403
10411
|
queryName = computed(() => this.queryParamsStore.getQuery().name, ...(ngDevMode ? [{ debugName: "queryName" }] : []));
|
|
@@ -10405,15 +10413,23 @@ class AdvancedSearchComponent {
|
|
|
10405
10413
|
this.selectionStore.update({ queryText: this.queryText() });
|
|
10406
10414
|
}
|
|
10407
10415
|
clearInput() {
|
|
10408
|
-
this.queryText.set(
|
|
10416
|
+
this.queryText.set("");
|
|
10409
10417
|
}
|
|
10410
10418
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AdvancedSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10411
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AdvancedSearchComponent, isStandalone: true, selector: "advanced-search", inputs: { article: { classPropertyName: "article", publicName: "article", isSignal: true, isRequired: true, transformFunction: null }, previewStrategy: { classPropertyName: "previewStrategy", publicName: "previewStrategy", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideTranslocoScope(
|
|
10419
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AdvancedSearchComponent, isStandalone: true, selector: "advanced-search", inputs: { article: { classPropertyName: "article", publicName: "article", isSignal: true, isRequired: true, transformFunction: null }, previewStrategy: { classPropertyName: "previewStrategy", publicName: "previewStrategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, providers: [provideTranslocoScope("drawers")], ngImport: i0, template: "@if (article()) {\n <div\n [class]=\"\n cn(\n 'scroll-stable flex flex-col overflow-y-auto pb-6 pl-6 pr-3',\n '[&_details]:border-muted-foreground/18 [&_details]:border-b',\n '[&_details>summary]:bg-menu [&_details_details]:last:border-b-0',\n '[&_details>summary>i>svg]:transition-transform [&_details>summary>i>svg]:duration-300',\n '[&>details>summary>i>svg]:group-open/parent:rotate-180'\n )\n \">\n <section class=\"mb-4 mt-6 flex w-full flex-col gap-6\">\n <header\n id=\"panel-control\"\n class=\"focus-within:outline-primary not-focus-within:hover:outline-muted-foreground group flex rounded focus-within:outline hover:outline\">\n <div class=\"bg-muted flex grow items-center gap-2 rounded-e-none rounded-s px-3\">\n <input\n id=\"advanced-search-input\"\n type=\"search\"\n class=\"grow focus:outline-none\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [attr.placeholder]=\"'drawers.inputPlaceholder' | transloco\"\n [attr.aria-label]=\"'drawers.inputPlaceholder' | transloco\"\n [ngModel]=\"queryText()\"\n (ngModelChange)=\"queryText.set($event)\"\n (keydown.enter)=\"executeSearch()\" />\n\n @if (queryText() !== '') {\n <button\n variant=\"icon\"\n size=\"xs\"\n [attr.title]=\"'clear' | transloco\"\n [attr.aria-label]=\"'clear' | transloco\"\n (click)=\"clearInput()\"\n (keydown.enter)=\"clearInput()\">\n <i class=\"fa-fw far fa-xmark\"></i>\n </button>\n }\n </div>\n\n <button\n size=\"default\"\n class=\"size-8 rounded-e rounded-s-none\"\n [disabled]=\"queryText() === '' || null\"\n [attr.title]=\"'search' | transloco\"\n [attr.aria-label]=\"'search' | transloco\"\n (click)=\"executeSearch()\">\n <i class=\"fa-fw far fa-magnifying-glass\"></i>\n </button>\n </header>\n </section>\n\n <!-- the same name is used everywhere to simulate an accordion -->\n <!-- extracts -->\n <ExtractsPanel [article]=\"article()\" />\n\n <!-- labels -->\n <LabelsPanel [article]=\"article()\" />\n\n <!-- entities -->\n <EntitiesPanel [article]=\"article()\" />\n\n <!-- similar documents -->\n <SimilarDocumentsPanel [article]=\"article()\" [strategy]=\"previewStrategy()\" (selected)=\"selected.emit($event)\" />\n </div>\n}\n", styles: [":host{--panel-max-height: none}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ButtonComponent, selector: "button,a[role=\"button\"]", inputs: ["class", "variant", "decoration", "size"] }, { kind: "component", type: SimilarDocumentsPanel, selector: "similar-documents-panel, SimilarDocumentsPanel, similardocumentspanel", inputs: ["article", "strategy"], outputs: ["selected"] }, { kind: "component", type: EntitiesPanel, selector: "entities-panel,EntitiesPanel,entitiesPanel", inputs: ["article"] }, { kind: "component", type: LabelsPanel, selector: "labels-panel, LabelsPanel, labelspanel", inputs: ["article"] }, { kind: "component", type: ExtractsPanel, selector: "extracts-panel, ExtractsPanel, extractspanel", inputs: ["article"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
10412
10420
|
}
|
|
10413
10421
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AdvancedSearchComponent, decorators: [{
|
|
10414
10422
|
type: Component,
|
|
10415
|
-
args: [{ selector:
|
|
10416
|
-
|
|
10423
|
+
args: [{ selector: "advanced-search", standalone: true, providers: [provideTranslocoScope("drawers")], imports: [
|
|
10424
|
+
FormsModule,
|
|
10425
|
+
ButtonComponent,
|
|
10426
|
+
TranslocoPipe,
|
|
10427
|
+
SimilarDocumentsPanel,
|
|
10428
|
+
EntitiesPanel,
|
|
10429
|
+
LabelsPanel,
|
|
10430
|
+
ExtractsPanel
|
|
10431
|
+
], template: "@if (article()) {\n <div\n [class]=\"\n cn(\n 'scroll-stable flex flex-col overflow-y-auto pb-6 pl-6 pr-3',\n '[&_details]:border-muted-foreground/18 [&_details]:border-b',\n '[&_details>summary]:bg-menu [&_details_details]:last:border-b-0',\n '[&_details>summary>i>svg]:transition-transform [&_details>summary>i>svg]:duration-300',\n '[&>details>summary>i>svg]:group-open/parent:rotate-180'\n )\n \">\n <section class=\"mb-4 mt-6 flex w-full flex-col gap-6\">\n <header\n id=\"panel-control\"\n class=\"focus-within:outline-primary not-focus-within:hover:outline-muted-foreground group flex rounded focus-within:outline hover:outline\">\n <div class=\"bg-muted flex grow items-center gap-2 rounded-e-none rounded-s px-3\">\n <input\n id=\"advanced-search-input\"\n type=\"search\"\n class=\"grow focus:outline-none\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [attr.placeholder]=\"'drawers.inputPlaceholder' | transloco\"\n [attr.aria-label]=\"'drawers.inputPlaceholder' | transloco\"\n [ngModel]=\"queryText()\"\n (ngModelChange)=\"queryText.set($event)\"\n (keydown.enter)=\"executeSearch()\" />\n\n @if (queryText() !== '') {\n <button\n variant=\"icon\"\n size=\"xs\"\n [attr.title]=\"'clear' | transloco\"\n [attr.aria-label]=\"'clear' | transloco\"\n (click)=\"clearInput()\"\n (keydown.enter)=\"clearInput()\">\n <i class=\"fa-fw far fa-xmark\"></i>\n </button>\n }\n </div>\n\n <button\n size=\"default\"\n class=\"size-8 rounded-e rounded-s-none\"\n [disabled]=\"queryText() === '' || null\"\n [attr.title]=\"'search' | transloco\"\n [attr.aria-label]=\"'search' | transloco\"\n (click)=\"executeSearch()\">\n <i class=\"fa-fw far fa-magnifying-glass\"></i>\n </button>\n </header>\n </section>\n\n <!-- the same name is used everywhere to simulate an accordion -->\n <!-- extracts -->\n <ExtractsPanel [article]=\"article()\" />\n\n <!-- labels -->\n <LabelsPanel [article]=\"article()\" />\n\n <!-- entities -->\n <EntitiesPanel [article]=\"article()\" />\n\n <!-- similar documents -->\n <SimilarDocumentsPanel [article]=\"article()\" [strategy]=\"previewStrategy()\" (selected)=\"selected.emit($event)\" />\n </div>\n}\n", styles: [":host{--panel-max-height: none}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}\n"] }]
|
|
10432
|
+
}], propDecorators: { article: [{ type: i0.Input, args: [{ isSignal: true, alias: "article", required: true }] }], previewStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewStrategy", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
10417
10433
|
|
|
10418
10434
|
const COMPONENTS_FOR_DOCUMENT_TYPE = new InjectionToken('COMPONENTS_FOR_DOCUMENT_TYPE');
|
|
10419
10435
|
const GLOBAL_QUERY_NAME = new InjectionToken('GLOBAL_QUERY_NAME', {
|
|
@@ -10460,7 +10476,7 @@ class DrawerPreviewComponent extends DrawerComponent {
|
|
|
10460
10476
|
});
|
|
10461
10477
|
}
|
|
10462
10478
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DrawerPreviewComponent, deps: [{ token: GLOBAL_QUERY_NAME }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10463
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: DrawerPreviewComponent, isStandalone: true, selector: "DrawerPreview, drawerpreview", inputs: { articleId: { classPropertyName: "articleId", publicName: "articleId", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "bg-transparent text-foreground" }, providers: [DrawerService, PreviewService], usesInheritance: true, ngImport: i0, template: "<!-- when the extended panel is open clicking in the backdrop panel close it -->\n<div (click)=\"drawer.toggleExtension()\" (keydown.escape)=\"drawer.toggleExtension()\" [attr.aria-hidden]=\"true\"></div>\n\n<div class=\"bg-menu flex overflow-auto\">\n <!-- Drawer handle when extended -->\n <div\n #drawerHandle\n class=\"fixed h-full w-[5px] select-none hover:cursor-ew-resize hover:bg-orange-300\"\n [ngClass]=\"{ hidden: drawer.isExtended() === false }\"></div>\n\n @if (previewType()) {\n <ng-container *ngComponentOutlet=\"previewType()\" />\n }\n</div>\n\n<!-- this is the extended panel -->\n@if (article()) {\n <div [class.invisible]=\"!drawer.isExtended()\" class=\"bg-menu border-foreground/18 flex flex-col border-l\">\n <div class=\"relative flex grow flex-col\">\n <advanced-search class=\"absolute h-full w-full overflow-y-auto\" [article]=\"article()!\" (close)=\"drawer.collapse()\" />\n </div>\n </div>\n}\n", styles: [":host{--drawer-width: 46;--drawer-subdrawer-width: 400px;display:grid;height:100%;top:0;right:-100%;justify-content:flex-end;width:calc(100vw / 100 * var(--drawer-width) + var(--drawer-subdrawer-width));z-index:var(--z-drawer);grid-template-columns:0 1fr var(--drawer-subdrawer-width);transition:right .3s ease-in-out,transform .3s ease-in-out}:host[drawer-opened=true]{right:calc(var(--drawer-subdrawer-width) * -1);box-shadow:var(--drawer-box-shadow)}:host[drawer-extended=true]{right:0;width:100vw;grid-template-columns:1fr calc(var(--drawer-width) * 1%) var(--drawer-subdrawer-width);box-shadow:unset}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: AdvancedSearchComponent, selector: "advanced-search", inputs: ["article", "previewStrategy"] }] });
|
|
10479
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: DrawerPreviewComponent, isStandalone: true, selector: "DrawerPreview, drawerpreview", inputs: { articleId: { classPropertyName: "articleId", publicName: "articleId", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "bg-transparent text-foreground" }, providers: [DrawerService, PreviewService], usesInheritance: true, ngImport: i0, template: "<!-- when the extended panel is open clicking in the backdrop panel close it -->\n<div (click)=\"drawer.toggleExtension()\" (keydown.escape)=\"drawer.toggleExtension()\" [attr.aria-hidden]=\"true\"></div>\n\n<div class=\"bg-menu flex overflow-auto\">\n <!-- Drawer handle when extended -->\n <div\n #drawerHandle\n class=\"fixed h-full w-[5px] select-none hover:cursor-ew-resize hover:bg-orange-300\"\n [ngClass]=\"{ hidden: drawer.isExtended() === false }\"></div>\n\n @if (previewType()) {\n <ng-container *ngComponentOutlet=\"previewType()\" />\n }\n</div>\n\n<!-- this is the extended panel -->\n@if (article()) {\n <div [class.invisible]=\"!drawer.isExtended()\" class=\"bg-menu border-foreground/18 flex flex-col border-l\">\n <div class=\"relative flex grow flex-col\">\n <advanced-search class=\"absolute h-full w-full overflow-y-auto\" [article]=\"article()!\" (close)=\"drawer.collapse()\" />\n </div>\n </div>\n}\n", styles: [":host{--drawer-width: 46;--drawer-subdrawer-width: 400px;display:grid;height:100%;top:0;right:-100%;justify-content:flex-end;width:calc(100vw / 100 * var(--drawer-width) + var(--drawer-subdrawer-width));z-index:var(--z-drawer);grid-template-columns:0 1fr var(--drawer-subdrawer-width);transition:right .3s ease-in-out,transform .3s ease-in-out}:host[drawer-opened=true]{right:calc(var(--drawer-subdrawer-width) * -1);box-shadow:var(--drawer-box-shadow)}:host[drawer-extended=true]{right:0;width:100vw;grid-template-columns:1fr calc(var(--drawer-width) * 1%) var(--drawer-subdrawer-width);box-shadow:unset}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: AdvancedSearchComponent, selector: "advanced-search", inputs: ["article", "previewStrategy"], outputs: ["selected"] }] });
|
|
10464
10480
|
}
|
|
10465
10481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DrawerPreviewComponent, decorators: [{
|
|
10466
10482
|
type: Component,
|
|
@@ -10762,6 +10778,8 @@ class AggregationItemComponent {
|
|
|
10762
10778
|
appStore = inject(AppStore);
|
|
10763
10779
|
queryParamsStore = inject(QueryParamsStore);
|
|
10764
10780
|
searchText = inject(AggregationComponent).searchText;
|
|
10781
|
+
// is the count of items displayed, default to false
|
|
10782
|
+
showCount = computed(() => this.appStore.general()?.features?.showAggregationItemCount ?? false, ...(ngDevMode ? [{ debugName: "showCount" }] : []));
|
|
10765
10783
|
quickFilter = computed(() => this.appStore.general()?.features?.quickFilter, ...(ngDevMode ? [{ debugName: "quickFilter" }] : []));
|
|
10766
10784
|
linkChildren = computed(() => this.appStore.general()?.features?.filterLinkChildren, ...(ngDevMode ? [{ debugName: "linkChildren" }] : []));
|
|
10767
10785
|
isFiltered = computed(() => {
|
|
@@ -10845,11 +10863,11 @@ class AggregationItemComponent {
|
|
|
10845
10863
|
}
|
|
10846
10864
|
}
|
|
10847
10865
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AggregationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10848
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AggregationItemComponent, isStandalone: true, selector: "aggregation-item, AggregationItem, aggregationitem", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: true, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect", onOpen: "onOpen", onFilter: "onFilter" }, host: { properties: { "attr.disabled": "this.disabled" } }, ngImport: i0, template: "<a\n role=\"listitem\"\n [attr.aria-selected]=\"node().$selected || node().$selectedVisually\"\n [attr.aria-label]=\"name() | syslang\"\n [style.--level]=\"level()\"\n [class]=\"\n cn(\n 'flex grow items-center gap-2 p-1 leading-7',\n node().count === 0 && 'disabled pointer-events-none text-neutral-300',\n (node().$selected || node().$selectedVisually) && 'bg-primary-100 text-primary'\n )\n \"\n (click)=\"select(node(), $event, true)\">\n <!-- chrevron is visible only if the node has children -->\n <button (click)=\"open($event, node())\" class=\"transition-transform ease-in hover:scale-125\" aria-label=\"Open\">\n <ChevronRight [class]=\"cn('size-4 translate-x-1', node().$opened && 'rotate-90', !node().hasChildren && 'hidden')\" width=\"16\" height=\"16\" />\n </button>\n\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n value=\"{{ node().value }}\"\n [attr.disabled]=\"node().count === 0 ? true : null\"\n [attr.aria-disabled]=\"node().count === 0\"\n (keydown.enter)=\"select(node(), $event)\"\n [checked]=\"node().$selected || node().$selectedVisually\" />\n\n @if (node().icon) {\n <i class=\"fa-fw {{ node().icon }} self-center justify-self-center\" aria-hidden=\"true\"></i>\n }\n <
|
|
10866
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AggregationItemComponent, isStandalone: true, selector: "aggregation-item, AggregationItem, aggregationitem", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: true, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect", onOpen: "onOpen", onFilter: "onFilter" }, host: { properties: { "attr.disabled": "this.disabled" } }, ngImport: i0, template: "<a\n role=\"listitem\"\n [attr.aria-selected]=\"node().$selected || node().$selectedVisually\"\n [attr.aria-label]=\"name() | syslang\"\n [style.--level]=\"level()\"\n [class]=\"\n cn(\n 'flex grow items-center gap-2 p-1 leading-7',\n node().count === 0 && 'disabled pointer-events-none text-neutral-300',\n (node().$selected || node().$selectedVisually) && 'bg-primary-100 text-primary'\n )\n \"\n (click)=\"select(node(), $event, true)\">\n <!-- chrevron is visible only if the node has children -->\n <button (click)=\"open($event, node())\" class=\"transition-transform ease-in hover:scale-125\" aria-label=\"Open\">\n <ChevronRight [class]=\"cn('size-4 translate-x-1', node().$opened && 'rotate-90', !node().hasChildren && 'hidden')\" width=\"16\" height=\"16\" />\n </button>\n\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n value=\"{{ node().value }}\"\n [attr.disabled]=\"node().count === 0 ? true : null\"\n [attr.aria-disabled]=\"node().count === 0\"\n (keydown.enter)=\"select(node(), $event)\"\n [checked]=\"node().$selected || node().$selectedVisually\" />\n\n @if (node().icon) {\n <i class=\"fa-fw {{ node().icon }} self-center justify-self-center\" aria-hidden=\"true\"></i>\n }\n <span\n [class]=\"cn('line-clamp-1 text-ellipsis break-all', quickFilter() && 'hover:underline')\"\n [title]=\"quickFilter() ? ((isFiltered() ? 'filters.removeFilter' : 'filters.filter') | transloco) : (name() | syslang)\"\n (click)=\"onTextClick($event)\">\n @for (chunk of (name() | syslang) ?? '' | highlightWord: searchText() : 10; track $index) {\n <span [class]=\"{ 'font-bold': chunk.match }\" aria-hidden=\"true\">{{ chunk.text }}</span>\n }\n </span>\n @if(showCount() && node().count > 0) {\n <span class=\"ml-auto empty:hidden px-1 text-xs\" aria-hidden=\"true\">{{ node().count }}</span>\n }\n</a>\n\n@if (node().hasChildren && node().$opened) {\n @for (item of node().items; track $index) {\n <AggregationItem\n [node]=\"item\"\n [path]=\"childrenPath()\"\n [field]=\"field()\"\n (onOpen)=\"onOpen.emit($event)\"\n (onFilter)=\"onFilter.emit($event)\"\n (onSelect)=\"onChildSelect($event)\" />\n }\n}\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none}:host a{padding-left:calc((var(--agg-tree-indent, .5rem) * var(--level)))}a{line-height:var(--agg-item-height, inherit)}\n"], dependencies: [{ kind: "component", type: AggregationItemComponent, selector: "aggregation-item, AggregationItem, aggregationitem", inputs: ["node", "path", "field"], outputs: ["onSelect", "onOpen", "onFilter"] }, { kind: "directive", type: ListItemComponent, selector: "[role=\"listitem\"], [role=\"option\"]", inputs: ["class", "variant", "decoration"] }, { kind: "component", type: ChevronRightIcon, selector: "chevron-right, ChevronRight, chevronright, ChevronRightIcon", inputs: ["class"] }, { kind: "pipe", type: HighlightWordPipe, name: "highlightWord" }, { kind: "pipe", type: SyslangPipe, name: "syslang" }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
10849
10867
|
}
|
|
10850
10868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AggregationItemComponent, decorators: [{
|
|
10851
10869
|
type: Component,
|
|
10852
|
-
args: [{ selector: "aggregation-item, AggregationItem, aggregationitem", standalone: true, imports: [HighlightWordPipe, ListItemComponent, SyslangPipe, ChevronRightIcon, TranslocoPipe], template: "<a\n role=\"listitem\"\n [attr.aria-selected]=\"node().$selected || node().$selectedVisually\"\n [attr.aria-label]=\"name() | syslang\"\n [style.--level]=\"level()\"\n [class]=\"\n cn(\n 'flex grow items-center gap-2 p-1 leading-7',\n node().count === 0 && 'disabled pointer-events-none text-neutral-300',\n (node().$selected || node().$selectedVisually) && 'bg-primary-100 text-primary'\n )\n \"\n (click)=\"select(node(), $event, true)\">\n <!-- chrevron is visible only if the node has children -->\n <button (click)=\"open($event, node())\" class=\"transition-transform ease-in hover:scale-125\" aria-label=\"Open\">\n <ChevronRight [class]=\"cn('size-4 translate-x-1', node().$opened && 'rotate-90', !node().hasChildren && 'hidden')\" width=\"16\" height=\"16\" />\n </button>\n\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n value=\"{{ node().value }}\"\n [attr.disabled]=\"node().count === 0 ? true : null\"\n [attr.aria-disabled]=\"node().count === 0\"\n (keydown.enter)=\"select(node(), $event)\"\n [checked]=\"node().$selected || node().$selectedVisually\" />\n\n @if (node().icon) {\n <i class=\"fa-fw {{ node().icon }} self-center justify-self-center\" aria-hidden=\"true\"></i>\n }\n <
|
|
10870
|
+
args: [{ selector: "aggregation-item, AggregationItem, aggregationitem", standalone: true, imports: [HighlightWordPipe, ListItemComponent, SyslangPipe, ChevronRightIcon, TranslocoPipe], template: "<a\n role=\"listitem\"\n [attr.aria-selected]=\"node().$selected || node().$selectedVisually\"\n [attr.aria-label]=\"name() | syslang\"\n [style.--level]=\"level()\"\n [class]=\"\n cn(\n 'flex grow items-center gap-2 p-1 leading-7',\n node().count === 0 && 'disabled pointer-events-none text-neutral-300',\n (node().$selected || node().$selectedVisually) && 'bg-primary-100 text-primary'\n )\n \"\n (click)=\"select(node(), $event, true)\">\n <!-- chrevron is visible only if the node has children -->\n <button (click)=\"open($event, node())\" class=\"transition-transform ease-in hover:scale-125\" aria-label=\"Open\">\n <ChevronRight [class]=\"cn('size-4 translate-x-1', node().$opened && 'rotate-90', !node().hasChildren && 'hidden')\" width=\"16\" height=\"16\" />\n </button>\n\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n value=\"{{ node().value }}\"\n [attr.disabled]=\"node().count === 0 ? true : null\"\n [attr.aria-disabled]=\"node().count === 0\"\n (keydown.enter)=\"select(node(), $event)\"\n [checked]=\"node().$selected || node().$selectedVisually\" />\n\n @if (node().icon) {\n <i class=\"fa-fw {{ node().icon }} self-center justify-self-center\" aria-hidden=\"true\"></i>\n }\n <span\n [class]=\"cn('line-clamp-1 text-ellipsis break-all', quickFilter() && 'hover:underline')\"\n [title]=\"quickFilter() ? ((isFiltered() ? 'filters.removeFilter' : 'filters.filter') | transloco) : (name() | syslang)\"\n (click)=\"onTextClick($event)\">\n @for (chunk of (name() | syslang) ?? '' | highlightWord: searchText() : 10; track $index) {\n <span [class]=\"{ 'font-bold': chunk.match }\" aria-hidden=\"true\">{{ chunk.text }}</span>\n }\n </span>\n @if(showCount() && node().count > 0) {\n <span class=\"ml-auto empty:hidden px-1 text-xs\" aria-hidden=\"true\">{{ node().count }}</span>\n }\n</a>\n\n@if (node().hasChildren && node().$opened) {\n @for (item of node().items; track $index) {\n <AggregationItem\n [node]=\"item\"\n [path]=\"childrenPath()\"\n [field]=\"field()\"\n (onOpen)=\"onOpen.emit($event)\"\n (onFilter)=\"onFilter.emit($event)\"\n (onSelect)=\"onChildSelect($event)\" />\n }\n}\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none}:host a{padding-left:calc((var(--agg-tree-indent, .5rem) * var(--level)))}a{line-height:var(--agg-item-height, inherit)}\n"] }]
|
|
10853
10871
|
}], propDecorators: { disabled: [{
|
|
10854
10872
|
type: HostBinding,
|
|
10855
10873
|
args: ["attr.disabled"]
|