@acorex/components 22.2.10 → 22.2.12
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/emoji/README.md +3 -0
- package/emojipicker/README.md +3 -0
- package/fesm2022/acorex-components-bubble.mjs +71 -0
- package/fesm2022/acorex-components-bubble.mjs.map +1 -0
- package/fesm2022/acorex-components-combo-box.mjs +71 -18
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
- package/fesm2022/{acorex-components-conversation-acorex-components-conversation-CXf00kvo.mjs → acorex-components-conversation-acorex-components-conversation-DDkiZfPb.mjs} +831 -254
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-DDkiZfPb.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-DZINTie8.mjs → acorex-components-conversation-picker-rename-file-dialog.component-CH3Q6Hry.mjs} +2 -2
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-DZINTie8.mjs.map → acorex-components-conversation-picker-rename-file-dialog.component-CH3Q6Hry.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-data-table.mjs +14 -10
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-emoji.mjs +74 -0
- package/fesm2022/acorex-components-emoji.mjs.map +1 -0
- package/fesm2022/acorex-components-emojipicker.mjs +425 -0
- package/fesm2022/acorex-components-emojipicker.mjs.map +1 -0
- package/fesm2022/acorex-components-file-viewer.mjs +46 -22
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-inline-reaction.mjs +111 -0
- package/fesm2022/acorex-components-inline-reaction.mjs.map +1 -0
- package/fesm2022/acorex-components-map.mjs +7 -0
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-message-status.mjs +71 -0
- package/fesm2022/acorex-components-message-status.mjs.map +1 -0
- package/fesm2022/acorex-components-message-time.mjs +36 -0
- package/fesm2022/acorex-components-message-time.mjs.map +1 -0
- package/fesm2022/acorex-components-message.mjs +120 -0
- package/fesm2022/acorex-components-message.mjs.map +1 -0
- package/fesm2022/acorex-components-reaction.mjs +144 -0
- package/fesm2022/acorex-components-reaction.mjs.map +1 -0
- package/fesm2022/acorex-components-tabs.mjs +2 -2
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/inline-reaction/README.md +3 -0
- package/message/README.md +3 -0
- package/message-status/README.md +3 -0
- package/message-time/README.md +3 -0
- package/package.json +35 -3
- package/reaction/README.md +3 -0
- package/types/acorex-components-bubble.d.ts +31 -0
- package/types/acorex-components-combo-box.d.ts +2 -2
- package/types/acorex-components-conversation.d.ts +126 -13
- package/types/acorex-components-data-table.d.ts +1 -1
- package/types/acorex-components-emoji.d.ts +42 -0
- package/types/acorex-components-emojipicker.d.ts +146 -0
- package/types/acorex-components-file-viewer.d.ts +5 -0
- package/types/acorex-components-inline-reaction.d.ts +52 -0
- package/types/acorex-components-map.d.ts +5 -0
- package/types/acorex-components-message-status.d.ts +23 -0
- package/types/acorex-components-message-time.d.ts +19 -0
- package/types/acorex-components-message.d.ts +59 -0
- package/types/acorex-components-reaction.d.ts +85 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-CXf00kvo.mjs.map +0 -1
package/emoji/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { MXColorLookComponent, AXComponent } from '@acorex/cdk/common';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { input, contentChild, computed, HostBinding, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
class AXBubbleComponent extends MXColorLookComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.isown = input(false, /* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "isown" }] : /* istanbul ignore next */ []));
|
|
11
|
+
// tail = input<AXBubbleTail>('none');
|
|
12
|
+
this.templateData = input(null, /* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "templateData" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.itemTemplate = input(null, /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
16
|
+
this.axheader = contentChild('ax-header', /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "axheader" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.axfooter = contentChild('ax-footer', /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "axfooter" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.axcontent = contentChild('ax-content', /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "axcontent" }] : /* istanbul ignore next */ []));
|
|
22
|
+
this.axprefix = contentChild('ax-prefix', /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "axprefix" }] : /* istanbul ignore next */ []));
|
|
24
|
+
this.axsuffix = contentChild('ax-suffix', /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "axsuffix" }] : /* istanbul ignore next */ []));
|
|
26
|
+
this.hasTemplate = computed(() => !!this.itemTemplate(), /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "hasTemplate" }] : /* istanbul ignore next */ []));
|
|
28
|
+
}
|
|
29
|
+
get __hostClass() {
|
|
30
|
+
return [this.isown() ? 'ax-isown' : ''].filter(Boolean).join(' ');
|
|
31
|
+
}
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXBubbleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXBubbleComponent, isStandalone: true, selector: "ax-bubble", inputs: { isown: { classPropertyName: "isown", publicName: "isown", isSignal: true, isRequired: false, transformFunction: null }, templateData: { classPropertyName: "templateData", publicName: "templateData", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: AXComponent,
|
|
36
|
+
useExisting: AXBubbleComponent,
|
|
37
|
+
},
|
|
38
|
+
], queries: [{ propertyName: "axheader", first: true, predicate: ["ax-header"], descendants: true, isSignal: true }, { propertyName: "axfooter", first: true, predicate: ["ax-footer"], descendants: true, isSignal: true }, { propertyName: "axcontent", first: true, predicate: ["ax-content"], descendants: true, isSignal: true }, { propertyName: "axprefix", first: true, predicate: ["ax-prefix"], descendants: true, isSignal: true }, { propertyName: "axsuffix", first: true, predicate: ["ax-suffix"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (hasTemplate()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: templateData() }\" />\n} @else {\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-bubble-content\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-bubble-content-inner\">\n <ng-content select=\"ax-content\"></ng-content>\n\n <ng-content></ng-content>\n </div>\n <ng-content select=\"ax-suffix\"></ng-content>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n}\n", styles: ["@layer properties;@layer components{ax-bubble{--ax-comp-bubble-radius: 12px;--ax-comp-bubble-padding-x: 8px;--ax-comp-bubble-padding-y: 4px;--ax-comp-bubble-font-size: .875rem;--ax-comp-bubble-line-height: 1.375rem;--ax-comp-bubble-color: var(--color-text-default);--ax-comp-bubble-bg: var(--color-lightest);--ax-comp-bubble-bg-self: var(--color-primary-lighter);--ax-comp-bubble-color-self: var(--color-on-primary-lighter);--ax-comp-bubble-tail-self: 0;--ax-comp-bubble-tail-other: 0;--ax-comp-bubble-border-width: 1px;--ax-comp-bubble-border: var(--color-border-lightest);--ax-comp-bubble-border-self: var(--color-border-primary-lightest);position:relative;display:inline-flex;width:fit-content;max-width:100%;flex-direction:column;gap:2px;min-width:0;overflow:visible;color:var(--ax-comp-bubble-color);background-color:var(--ax-comp-bubble-bg);border-radius:var(--ax-comp-bubble-radius);padding:var(--ax-comp-bubble-padding-y) var(--ax-comp-bubble-padding-x);font-size:var(--ax-comp-bubble-font-size);line-height:var(--ax-comp-bubble-line-height)}ax-bubble.ax-isown{color:var(--ax-comp-bubble-color-self);border-color:var(--ax-comp-bubble-border-self);border-width:var(--ax-comp-bubble-border-width);background-color:var(--ax-comp-bubble-bg-self);border-end-end-radius:var(--ax-comp-bubble-tail-self)}ax-bubble.ax-isown .ax-bubble-content{display:flex;flex-direction:row-reverse}ax-bubble:not(.ax-isown){border-color:var(--ax-comp-bubble-border);border-width:var(--ax-comp-bubble-border-width);border-end-start-radius:0;border-end-end-radius:var(--ax-comp-bubble-radius)}ax-bubble .ax-bubble-content{display:flex;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 2)}ax-bubble .ax-bubble-content-inner{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXBubbleComponent, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'ax-bubble', imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, providers: [
|
|
43
|
+
{
|
|
44
|
+
provide: AXComponent,
|
|
45
|
+
useExisting: AXBubbleComponent,
|
|
46
|
+
},
|
|
47
|
+
], template: "@if (hasTemplate()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: templateData() }\" />\n} @else {\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-bubble-content\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-bubble-content-inner\">\n <ng-content select=\"ax-content\"></ng-content>\n\n <ng-content></ng-content>\n </div>\n <ng-content select=\"ax-suffix\"></ng-content>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n}\n", styles: ["@layer properties;@layer components{ax-bubble{--ax-comp-bubble-radius: 12px;--ax-comp-bubble-padding-x: 8px;--ax-comp-bubble-padding-y: 4px;--ax-comp-bubble-font-size: .875rem;--ax-comp-bubble-line-height: 1.375rem;--ax-comp-bubble-color: var(--color-text-default);--ax-comp-bubble-bg: var(--color-lightest);--ax-comp-bubble-bg-self: var(--color-primary-lighter);--ax-comp-bubble-color-self: var(--color-on-primary-lighter);--ax-comp-bubble-tail-self: 0;--ax-comp-bubble-tail-other: 0;--ax-comp-bubble-border-width: 1px;--ax-comp-bubble-border: var(--color-border-lightest);--ax-comp-bubble-border-self: var(--color-border-primary-lightest);position:relative;display:inline-flex;width:fit-content;max-width:100%;flex-direction:column;gap:2px;min-width:0;overflow:visible;color:var(--ax-comp-bubble-color);background-color:var(--ax-comp-bubble-bg);border-radius:var(--ax-comp-bubble-radius);padding:var(--ax-comp-bubble-padding-y) var(--ax-comp-bubble-padding-x);font-size:var(--ax-comp-bubble-font-size);line-height:var(--ax-comp-bubble-line-height)}ax-bubble.ax-isown{color:var(--ax-comp-bubble-color-self);border-color:var(--ax-comp-bubble-border-self);border-width:var(--ax-comp-bubble-border-width);background-color:var(--ax-comp-bubble-bg-self);border-end-end-radius:var(--ax-comp-bubble-tail-self)}ax-bubble.ax-isown .ax-bubble-content{display:flex;flex-direction:row-reverse}ax-bubble:not(.ax-isown){border-color:var(--ax-comp-bubble-border);border-width:var(--ax-comp-bubble-border-width);border-end-start-radius:0;border-end-end-radius:var(--ax-comp-bubble-radius)}ax-bubble .ax-bubble-content{display:flex;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 2)}ax-bubble .ax-bubble-content-inner{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
48
|
+
}], propDecorators: { isown: [{ type: i0.Input, args: [{ isSignal: true, alias: "isown", required: false }] }], templateData: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateData", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], axheader: [{ type: i0.ContentChild, args: ['ax-header', { isSignal: true }] }], axfooter: [{ type: i0.ContentChild, args: ['ax-footer', { isSignal: true }] }], axcontent: [{ type: i0.ContentChild, args: ['ax-content', { isSignal: true }] }], axprefix: [{ type: i0.ContentChild, args: ['ax-prefix', { isSignal: true }] }], axsuffix: [{ type: i0.ContentChild, args: ['ax-suffix', { isSignal: true }] }], __hostClass: [{
|
|
49
|
+
type: HostBinding,
|
|
50
|
+
args: ['class']
|
|
51
|
+
}] } });
|
|
52
|
+
|
|
53
|
+
class AXBubbleModule {
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXBubbleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
55
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXBubbleModule, imports: [AXBubbleComponent], exports: [AXBubbleComponent] }); }
|
|
56
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXBubbleModule }); }
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXBubbleModule, decorators: [{
|
|
59
|
+
type: NgModule,
|
|
60
|
+
args: [{
|
|
61
|
+
imports: [AXBubbleComponent],
|
|
62
|
+
exports: [AXBubbleComponent],
|
|
63
|
+
}]
|
|
64
|
+
}] });
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Generated bundle index. Do not edit.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
export { AXBubbleComponent, AXBubbleModule };
|
|
71
|
+
//# sourceMappingURL=acorex-components-bubble.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-components-bubble.mjs","sources":["../../../../packages/components/bubble/src/lib/bubble.component.ts","../../../../packages/components/bubble/src/lib/bubble.component.html","../../../../packages/components/bubble/src/lib/bubble.module.ts","../../../../packages/components/bubble/src/acorex-components-bubble.ts"],"sourcesContent":["import { AXComponent, MXColorLookComponent } from '@acorex/cdk/common';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, contentChild, HostBinding, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-bubble',\n templateUrl: './bubble.component.html',\n styleUrls: ['./bubble.component.css'],\n imports: [NgTemplateOutlet],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXComponent,\n useExisting: AXBubbleComponent,\n },\n ],\n})\nexport class AXBubbleComponent extends MXColorLookComponent {\n isown = input<boolean>(false);\n\n // tail = input<AXBubbleTail>('none');\n\n templateData = input(null);\n\n itemTemplate = input(null);\n\n private readonly axheader = contentChild('ax-header');\n private readonly axfooter = contentChild('ax-footer');\n private readonly axcontent = contentChild('ax-content');\n private readonly axprefix = contentChild('ax-prefix');\n private readonly axsuffix = contentChild('ax-suffix');\n\n protected readonly hasTemplate = computed(() => !!this.itemTemplate());\n\n @HostBinding('class')\n private get __hostClass(): string {\n return [this.isown() ? 'ax-isown' : ''].filter(Boolean).join(' ');\n }\n}\n","@if (hasTemplate()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: templateData() }\" />\n} @else {\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-bubble-content\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-bubble-content-inner\">\n <ng-content select=\"ax-content\"></ng-content>\n\n <ng-content></ng-content>\n </div>\n <ng-content select=\"ax-suffix\"></ng-content>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n}\n","\nimport { NgModule } from '@angular/core';\nimport { AXBubbleComponent } from './bubble.component';\n\n@NgModule({\n imports: [ AXBubbleComponent],\n exports: [AXBubbleComponent],\n})\nexport class AXBubbleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAiBM,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAb3D,IAAA,WAAA,GAAA;;QAcE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAU,KAAK;kFAAC;;QAI7B,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,IAAI;yFAAC;QAE1B,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,IAAI;yFAAC;QAET,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,WAAW;qFAAC;Q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EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CACb,WAAW,qEACX,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA;sBAInD,WAAW;uBAAC,OAAO;;;ME1BT,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,OAAA,EAAA,CAHd,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAClB,iBAAiB,CAAA,EAAA,CAAA,CAAA;+GAEhB,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAE,iBAAiB,CAAC;oBAC7B,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -42,11 +42,15 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
42
42
|
#platform;
|
|
43
43
|
#destroyRef;
|
|
44
44
|
#translation;
|
|
45
|
+
/** Applied (debounced) search query used for filtering and highlighting. */
|
|
46
|
+
#appliedFilterQuery;
|
|
45
47
|
#document;
|
|
46
48
|
#isUserInteraction;
|
|
47
49
|
#lastValue;
|
|
48
50
|
#lastExpanded;
|
|
49
51
|
#sheetSearchFocused;
|
|
52
|
+
#searchDebounce;
|
|
53
|
+
#SEARCH_DEBOUNCE_MS;
|
|
50
54
|
constructor() {
|
|
51
55
|
super();
|
|
52
56
|
this.#platform = inject(AXPlatform);
|
|
@@ -202,6 +206,9 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
202
206
|
/** Query typed in the actionsheet search field (independent of the trigger display text). */
|
|
203
207
|
this.sheetSearchText = signal('', /* @ts-ignore */
|
|
204
208
|
...(ngDevMode ? [{ debugName: "sheetSearchText" }] : /* istanbul ignore next */ []));
|
|
209
|
+
/** Applied (debounced) search query used for filtering and highlighting. */
|
|
210
|
+
this.#appliedFilterQuery = signal('', /* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "#appliedFilterQuery" }] : /* istanbul ignore next */ []));
|
|
205
212
|
/** The current selection normalized to an array of submitted values. */
|
|
206
213
|
this.selectedValues = computed(() => {
|
|
207
214
|
const value = this.value();
|
|
@@ -264,7 +271,7 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
264
271
|
/** The listbox selection (item ids), kept in sync with the selected value(s). */
|
|
265
272
|
this.selection = linkedSignal(() => this.selectedItems().map((item) => item.id), /* @ts-ignore */
|
|
266
273
|
...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
267
|
-
/**
|
|
274
|
+
/** Resolved search query from the trigger or sheet input (debounced before filtering). */
|
|
268
275
|
this.searchQuery = computed(() => {
|
|
269
276
|
if (!this.searchable()) {
|
|
270
277
|
return '';
|
|
@@ -289,30 +296,19 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
289
296
|
}, /* @ts-ignore */
|
|
290
297
|
...(ngDevMode ? [{ debugName: "searchQuery" }] : /* istanbul ignore next */ []));
|
|
291
298
|
/** Query passed to result-item highlighting (empty when disabled). */
|
|
292
|
-
this.highlightQuery = computed(() => (this.highlightSearch() ? this
|
|
299
|
+
this.highlightQuery = computed(() => (this.highlightSearch() ? this.#appliedFilterQuery() : ''), /* @ts-ignore */
|
|
293
300
|
...(ngDevMode ? [{ debugName: "highlightQuery" }] : /* istanbul ignore next */ []));
|
|
294
|
-
/** Items filtered by typed query against `id` when the combo box is searchable. */
|
|
301
|
+
/** Items filtered by typed query against `id` and `text` when the combo box is searchable. */
|
|
295
302
|
this.filteredItems = computed(() => {
|
|
296
303
|
const items = this.items();
|
|
297
304
|
if (!this.searchable()) {
|
|
298
305
|
return items;
|
|
299
306
|
}
|
|
300
|
-
const query = this
|
|
307
|
+
const query = this.#appliedFilterQuery().toLowerCase();
|
|
301
308
|
if (!query) {
|
|
302
309
|
return items;
|
|
303
310
|
}
|
|
304
|
-
return items.filter((item) =>
|
|
305
|
-
const idMatch = item.id.toLowerCase().includes(query);
|
|
306
|
-
if (idMatch) {
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
const rawText = (item.text ?? '').toLowerCase();
|
|
310
|
-
if (rawText.includes(query)) {
|
|
311
|
-
return true;
|
|
312
|
-
}
|
|
313
|
-
const translatedText = this.#translateItemText(item.text ?? '').toLowerCase();
|
|
314
|
-
return translatedText.includes(query);
|
|
315
|
-
});
|
|
311
|
+
return items.filter((item) => this.#matchesItem(item, query));
|
|
316
312
|
}, /* @ts-ignore */
|
|
317
313
|
...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
|
|
318
314
|
/** Whether the filtered list is empty (empty-state vs hidden listbox). */
|
|
@@ -335,6 +331,7 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
335
331
|
this.#lastValue = undefined;
|
|
336
332
|
this.#lastExpanded = undefined;
|
|
337
333
|
this.#sheetSearchFocused = false;
|
|
334
|
+
this.#SEARCH_DEBOUNCE_MS = 300;
|
|
338
335
|
effect(() => this.#emitValueChanged(this.value()));
|
|
339
336
|
effect(() => this.#emitOpenedOrClosed(this.expanded()));
|
|
340
337
|
effect(() => {
|
|
@@ -381,6 +378,11 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
381
378
|
}
|
|
382
379
|
this.#tryFocusSheetSearch();
|
|
383
380
|
});
|
|
381
|
+
effect(() => {
|
|
382
|
+
const query = this.searchQuery();
|
|
383
|
+
untracked(() => this.#applyFilterDebounced(query));
|
|
384
|
+
});
|
|
385
|
+
this.#destroyRef.onDestroy(() => this.#clearSearchDebounce());
|
|
384
386
|
}
|
|
385
387
|
/** Scrolls the selected option into view after the popover overlay is open and laid out. */
|
|
386
388
|
onPopoverOpened() {
|
|
@@ -566,6 +568,7 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
566
568
|
event.preventDefault();
|
|
567
569
|
event.stopPropagation();
|
|
568
570
|
event.stopImmediatePropagation();
|
|
571
|
+
this.#flushPendingFilter();
|
|
569
572
|
if (this.#shouldClearOnEmptyEnter()) {
|
|
570
573
|
if (!this.multiple()) {
|
|
571
574
|
this.reset(true);
|
|
@@ -638,6 +641,7 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
638
641
|
this.expanded.set(false);
|
|
639
642
|
this.searchText.set(this.multiple() ? '' : this.translatedDisplayText());
|
|
640
643
|
this.#clearSheetSearch();
|
|
644
|
+
this.#applyFilterNow('');
|
|
641
645
|
}
|
|
642
646
|
/**
|
|
643
647
|
* Removes a single chip from the multi selection.
|
|
@@ -731,6 +735,9 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
731
735
|
this.commit();
|
|
732
736
|
}
|
|
733
737
|
commit(event) {
|
|
738
|
+
if (event?.type !== 'click') {
|
|
739
|
+
this.#flushPendingFilter();
|
|
740
|
+
}
|
|
734
741
|
if (event?.type !== 'click' && this.#shouldClearOnEmptyEnter()) {
|
|
735
742
|
if (!this.multiple()) {
|
|
736
743
|
this.reset(true);
|
|
@@ -862,8 +869,54 @@ class AXComboBoxComponent extends NXValueComponent {
|
|
|
862
869
|
const origin = this.originRef()?.nativeElement;
|
|
863
870
|
return Boolean(origin?.contains(node));
|
|
864
871
|
}
|
|
865
|
-
#
|
|
866
|
-
|
|
872
|
+
#applyFilterNow(query) {
|
|
873
|
+
this.#clearSearchDebounce();
|
|
874
|
+
this.#appliedFilterQuery.set(query);
|
|
875
|
+
}
|
|
876
|
+
#applyFilterDebounced(query) {
|
|
877
|
+
this.#clearSearchDebounce();
|
|
878
|
+
if (!query) {
|
|
879
|
+
this.#applyFilterNow('');
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
this.#searchDebounce = setTimeout(() => {
|
|
883
|
+
this.#searchDebounce = undefined;
|
|
884
|
+
this.#appliedFilterQuery.set(query);
|
|
885
|
+
}, this.#SEARCH_DEBOUNCE_MS);
|
|
886
|
+
}
|
|
887
|
+
#flushPendingFilter() {
|
|
888
|
+
if (!this.#searchDebounce) {
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
this.#applyFilterNow(this.searchQuery());
|
|
892
|
+
}
|
|
893
|
+
#clearSearchDebounce() {
|
|
894
|
+
if (!this.#searchDebounce) {
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
clearTimeout(this.#searchDebounce);
|
|
898
|
+
this.#searchDebounce = undefined;
|
|
899
|
+
}
|
|
900
|
+
#matchesItem(item, query) {
|
|
901
|
+
if (item.id.toLowerCase().includes(query)) {
|
|
902
|
+
return true;
|
|
903
|
+
}
|
|
904
|
+
const text = String(item.text ?? '');
|
|
905
|
+
if (text.toLowerCase().includes(query)) {
|
|
906
|
+
return true;
|
|
907
|
+
}
|
|
908
|
+
if (text.startsWith('@')) {
|
|
909
|
+
return this.#translateItemTextForFilter(text).toLowerCase().includes(query);
|
|
910
|
+
}
|
|
911
|
+
return false;
|
|
912
|
+
}
|
|
913
|
+
/** Fast path for search filtering — skips sync translation for plain labels. */
|
|
914
|
+
#translateItemTextForFilter(text) {
|
|
915
|
+
const value = String(text ?? '');
|
|
916
|
+
if (!value.startsWith('@')) {
|
|
917
|
+
return value;
|
|
918
|
+
}
|
|
919
|
+
return this.#translation.translateSync(value, { waitForLoad: false });
|
|
867
920
|
}
|
|
868
921
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
869
922
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXComboBoxComponent, isStandalone: true, selector: "ax-combo-box", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, adaptivityEnabled: { classPropertyName: "adaptivityEnabled", publicName: "adaptivityEnabled", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, alternate: { classPropertyName: "alternate", publicName: "alternate", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, highlightSearch: { classPropertyName: "highlightSearch", publicName: "highlightSearch", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedTemplate: { classPropertyName: "selectedTemplate", publicName: "selectedTemplate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { look: "lookChange", value: "valueChange", onValueChanged: "onValueChanged", onFocus: "onFocus", onBlur: "onBlur", onItemClick: "onItemClick", onItemSelected: "onItemSelected", onOpened: "onOpened", onClosed: "onClosed" }, providers: [
|