overview-components 1.1.33 → 1.1.35
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/dist/assets/icons/iconGlyphs.d.ts +12 -0
- package/dist/assets/icons/iconGlyphs.d.ts.map +1 -1
- package/dist/assets/icons/iconGlyphs.js +12 -0
- package/dist/assets/icons/iconGlyphs.js.map +1 -1
- package/dist/assets/illustration/aichatbot-illustration.d.ts +6 -0
- package/dist/assets/illustration/aichatbot-illustration.d.ts.map +1 -0
- package/dist/assets/illustration/aichatbot-illustration.js +152 -0
- package/dist/assets/illustration/aichatbot-illustration.js.map +1 -0
- package/dist/assets/illustration/delete-illustration.js +16 -16
- package/dist/assets/illustration/no-preview.js +21 -21
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/lit-ai-filter-assistant.d.ts +59 -0
- package/dist/components/lit-ai-filter-assistant.d.ts.map +1 -0
- package/dist/components/lit-ai-filter-assistant.js +439 -0
- package/dist/components/lit-ai-filter-assistant.js.map +1 -0
- package/dist/shared/filter-inputs.d.ts +1 -1
- package/dist/shared/filter-inputs.d.ts.map +1 -1
- package/dist/shared/filter-inputs.js +32 -32
- package/dist/shared/filter-inputs.js.map +1 -1
- package/dist/shared/lit-date-picker.d.ts.map +1 -1
- package/dist/shared/lit-date-picker.js +2 -0
- package/dist/shared/lit-date-picker.js.map +1 -1
- package/dist/shared/lit-icon.d.ts +2 -1
- package/dist/shared/lit-icon.d.ts.map +1 -1
- package/dist/shared/lit-icon.js +43 -13
- package/dist/shared/lit-icon.js.map +1 -1
- package/dist/shared/lit-select.d.ts.map +1 -1
- package/dist/shared/lit-select.js +1 -0
- package/dist/shared/lit-select.js.map +1 -1
- package/dist/shared/simple-popper.d.ts.map +1 -1
- package/dist/shared/simple-popper.js +3 -1
- package/dist/shared/simple-popper.js.map +1 -1
- package/dist/shared/styles/button-shared-styles.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../shared/lit-input.js';
|
|
3
|
+
import '../shared/lit-icon.js';
|
|
4
|
+
import '../shared/lit-icon-button.js';
|
|
5
|
+
import '../shared/simple-popper.js';
|
|
6
|
+
import '../shared/lit-button.js';
|
|
7
|
+
import './lit-badge.js';
|
|
8
|
+
import '../assets/illustration/aichatbot-illustration.js';
|
|
9
|
+
import type { SupportedLang } from '../components/lit-case-variables-tab.js';
|
|
10
|
+
export type FilterSuggestion = {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
[key: `label_${string}`]: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type AppliedFilter = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
message?: string;
|
|
20
|
+
severity?: 'error' | 'success';
|
|
21
|
+
isLoading?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type LitAiFilterAssistantProp = {
|
|
24
|
+
placeholder: string;
|
|
25
|
+
suggestions: FilterSuggestion[];
|
|
26
|
+
appliedFilters: AppliedFilter[];
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare class LitAiFilterAssistant extends LitElement {
|
|
31
|
+
placeholder: string;
|
|
32
|
+
userLang: SupportedLang;
|
|
33
|
+
suggestions: FilterSuggestion[];
|
|
34
|
+
appliedFilters: AppliedFilter[];
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
loading: boolean;
|
|
37
|
+
onInput?: (value: string) => void;
|
|
38
|
+
onSuggestionSelect?: (suggestion: FilterSuggestion) => void;
|
|
39
|
+
onApply?: (value: string) => void;
|
|
40
|
+
onFilterReload?: (filterId: AppliedFilter) => void;
|
|
41
|
+
onNewConversation?: () => void;
|
|
42
|
+
onClose?: () => void;
|
|
43
|
+
private inputValue;
|
|
44
|
+
static styles: import("lit").CSSResult[];
|
|
45
|
+
private handleNewConversation;
|
|
46
|
+
private togglePopper;
|
|
47
|
+
private handleInputChange;
|
|
48
|
+
private handleSuggestionClick;
|
|
49
|
+
private handleApply;
|
|
50
|
+
private handleKeyDown;
|
|
51
|
+
private handleFilterReload;
|
|
52
|
+
protected render(): TemplateResult;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'lit-ai-filter-assistant': LitAiFilterAssistant;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=lit-ai-filter-assistant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-ai-filter-assistant.d.ts","sourceRoot":"","sources":["../../src/components/lit-ai-filter-assistant.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,UAAU,EAAE,cAAc,EAA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EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAE1C,OAAO,CAAC,UAAU,CAAM;IAEjC,MAAM,CAAC,MAAM,4BAqLX;IAEF,OAAO,CAAC,qBAAqB,CAE3B;IACF,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,iBAAiB,CAGvB;IAEF,OAAO,CAAC,qBAAqB,CAG3B;IAEF,OAAO,CAAC,WAAW,CAIjB;IAEF,OAAO,CAAC,aAAa,CAQnB;IAEF,OAAO,CAAC,kBAAkB,CAExB;IAEF,SAAS,CAAC,MAAM,IAAI,cAAc;CAiKrC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,yBAAyB,EAAE,oBAAoB,CAAC;KACnD;CACJ"}
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
8
|
+
import { css, html, LitElement } from 'lit';
|
|
9
|
+
import { msg } from '@lit/localize';
|
|
10
|
+
// components
|
|
11
|
+
import '../shared/lit-input.js';
|
|
12
|
+
import '../shared/lit-icon.js';
|
|
13
|
+
import '../shared/lit-icon-button.js';
|
|
14
|
+
import '../shared/simple-popper.js';
|
|
15
|
+
import '../shared/lit-button.js';
|
|
16
|
+
import './lit-badge.js';
|
|
17
|
+
import { tooltip } from '../shared/simple-tooltip.js';
|
|
18
|
+
import '../assets/illustration/aichatbot-illustration.js';
|
|
19
|
+
let LitAiFilterAssistant = class LitAiFilterAssistant extends LitElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.placeholder = 'Type your filter request...';
|
|
23
|
+
this.userLang = 'cs';
|
|
24
|
+
this.suggestions = [];
|
|
25
|
+
this.appliedFilters = [];
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
this.loading = false;
|
|
28
|
+
this.inputValue = '';
|
|
29
|
+
this.handleNewConversation = () => {
|
|
30
|
+
this.onNewConversation?.();
|
|
31
|
+
};
|
|
32
|
+
this.togglePopper = () => {
|
|
33
|
+
this.onClose?.();
|
|
34
|
+
};
|
|
35
|
+
this.handleInputChange = (value) => {
|
|
36
|
+
this.inputValue = value || '';
|
|
37
|
+
this.onInput?.(this.inputValue);
|
|
38
|
+
};
|
|
39
|
+
this.handleSuggestionClick = (suggestion) => {
|
|
40
|
+
this.onSuggestionSelect?.(suggestion);
|
|
41
|
+
// this.inputValue = suggestion.label;
|
|
42
|
+
};
|
|
43
|
+
this.handleApply = () => {
|
|
44
|
+
if (!this.inputValue.trim())
|
|
45
|
+
return;
|
|
46
|
+
this.onApply?.(this.inputValue);
|
|
47
|
+
this.inputValue = '';
|
|
48
|
+
};
|
|
49
|
+
this.handleKeyDown = (e) => {
|
|
50
|
+
if (e.key === 'Enter' && !e.shiftKey && this.inputValue.trim()) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
this.handleApply();
|
|
53
|
+
}
|
|
54
|
+
if (e.key === 'Escape') {
|
|
55
|
+
this.onClose?.();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
this.handleFilterReload = (filterApplied) => {
|
|
59
|
+
this.onFilterReload?.(filterApplied);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return html `
|
|
64
|
+
<div class="dropdown-content">
|
|
65
|
+
<!-- Header -->
|
|
66
|
+
<header class="header">
|
|
67
|
+
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
68
|
+
<lit-icon size="1.25rem" aiIcon></lit-icon>
|
|
69
|
+
<div class="header-title" style="color: var(--text-primary, #111827)">
|
|
70
|
+
Filter AI Assistant
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="header-actions">
|
|
74
|
+
<lit-icon-button
|
|
75
|
+
variant="text"
|
|
76
|
+
icon="add"
|
|
77
|
+
size="small"
|
|
78
|
+
@click="${this.handleNewConversation}"
|
|
79
|
+
${tooltip(msg('Nová konverzace'), 'bottom')}
|
|
80
|
+
></lit-icon-button>
|
|
81
|
+
<lit-icon-button
|
|
82
|
+
variant="text"
|
|
83
|
+
icon="close"
|
|
84
|
+
size="small"
|
|
85
|
+
@click="${this.togglePopper}"
|
|
86
|
+
${tooltip(msg('Zavřít'), 'bottom')}
|
|
87
|
+
></lit-icon-button>
|
|
88
|
+
</div>
|
|
89
|
+
</header>
|
|
90
|
+
<!-- Applied Filters Section -->
|
|
91
|
+
<div class="applied-filters-container">
|
|
92
|
+
${this.appliedFilters.length > 0
|
|
93
|
+
? html `
|
|
94
|
+
<div class="applied-filters-section">
|
|
95
|
+
${this.appliedFilters.map((filter) => {
|
|
96
|
+
// Determine description color based on severity
|
|
97
|
+
let icon = 'sparkle';
|
|
98
|
+
let aiIcon = true;
|
|
99
|
+
let badgeContent = 'neutral';
|
|
100
|
+
if (filter.severity === 'success' && !filter.isLoading) {
|
|
101
|
+
badgeContent = 'info';
|
|
102
|
+
}
|
|
103
|
+
if (filter.severity === 'error' && !filter.isLoading) {
|
|
104
|
+
icon = 'warning';
|
|
105
|
+
aiIcon = false;
|
|
106
|
+
badgeContent = 'danger';
|
|
107
|
+
}
|
|
108
|
+
return html `
|
|
109
|
+
<div class="applied-filter-item">
|
|
110
|
+
${filter.isLoading
|
|
111
|
+
? html `<span
|
|
112
|
+
class="loading-spinner"
|
|
113
|
+
title="Loading"
|
|
114
|
+
></span>`
|
|
115
|
+
: html `<lit-icon
|
|
116
|
+
.aiIcon="${aiIcon}"
|
|
117
|
+
.icon="${icon}"
|
|
118
|
+
size="1.25rem"
|
|
119
|
+
style="padding-right: 0.5rem; color: var(--color-error-main, #dc2626);"
|
|
120
|
+
></lit-icon>`}
|
|
121
|
+
<div class="applied-filter-info">
|
|
122
|
+
<div class="applied-filter-label">
|
|
123
|
+
${filter.label}
|
|
124
|
+
</div>
|
|
125
|
+
${filter.message
|
|
126
|
+
? html `<lit-badge
|
|
127
|
+
content=${badgeContent}
|
|
128
|
+
text=${filter.message || ''}
|
|
129
|
+
></lit-badge>`
|
|
130
|
+
: ''}
|
|
131
|
+
</div>
|
|
132
|
+
<lit-icon-button
|
|
133
|
+
class="remove-filter-button"
|
|
134
|
+
icon="reload"
|
|
135
|
+
size="small"
|
|
136
|
+
variant="text"
|
|
137
|
+
@click="${() => this.handleFilterReload(filter)}"
|
|
138
|
+
title=${msg('Vyhledat znovu')}
|
|
139
|
+
${tooltip(msg('Vyhledat znovu'), 'bottom')}
|
|
140
|
+
></lit-icon-button>
|
|
141
|
+
</div>
|
|
142
|
+
`;
|
|
143
|
+
})}
|
|
144
|
+
</div>
|
|
145
|
+
`
|
|
146
|
+
: html `
|
|
147
|
+
<div class="empty-state">
|
|
148
|
+
<div style="height: 67px; width: 67px">
|
|
149
|
+
<aichatbot-illustration></aichatbot-illustration>
|
|
150
|
+
</div>
|
|
151
|
+
<div>
|
|
152
|
+
${msg('Žádná historie promptů. Začněte psát pro filtrování pomocí AI.')}
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
`}
|
|
156
|
+
</div>
|
|
157
|
+
<!-- Content -->
|
|
158
|
+
<div class="content-section">
|
|
159
|
+
<!-- Input Section -->
|
|
160
|
+
<div class="input-section">
|
|
161
|
+
<div class="input-wrapper">
|
|
162
|
+
<lit-input
|
|
163
|
+
type="text"
|
|
164
|
+
placeholder="${this.placeholder}"
|
|
165
|
+
.value="${this.inputValue}"
|
|
166
|
+
.onInput="${this.handleInputChange}"
|
|
167
|
+
@keydown="${this.handleKeyDown}"
|
|
168
|
+
.onClear="${() => {
|
|
169
|
+
this.inputValue = '';
|
|
170
|
+
this.onInput?.('');
|
|
171
|
+
}}"
|
|
172
|
+
.disabled="${this.disabled}"
|
|
173
|
+
fullWidth
|
|
174
|
+
></lit-input>
|
|
175
|
+
<lit-icon
|
|
176
|
+
aiIcon
|
|
177
|
+
icon="send"
|
|
178
|
+
@click="${this.handleApply}"
|
|
179
|
+
?disabled="${!this.inputValue.trim() || this.disabled}"
|
|
180
|
+
label="${msg('Vyhledat')}"
|
|
181
|
+
.isLoading="${this.loading}"
|
|
182
|
+
style="cursor: pointer"
|
|
183
|
+
>
|
|
184
|
+
</lit-icon>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<!-- Suggestions Section -->
|
|
189
|
+
${this.suggestions.length > 0
|
|
190
|
+
? html `
|
|
191
|
+
<div class="suggestions-section">
|
|
192
|
+
<div class="section-title">${msg('Návrhy')}</div>
|
|
193
|
+
<div class="suggestions-grid">
|
|
194
|
+
${this.suggestions.map((suggestion) => html `
|
|
195
|
+
<div class="suggestion-item">
|
|
196
|
+
<lit-badge
|
|
197
|
+
.text="${suggestion[`label_${this.userLang}`] || suggestion.label}"
|
|
198
|
+
content="neutral"
|
|
199
|
+
size="medium"
|
|
200
|
+
@click="${() => this.handleSuggestionClick(suggestion)}"
|
|
201
|
+
title="${suggestion[`label_${this.userLang}`] || suggestion.label}"
|
|
202
|
+
></lit-badge>
|
|
203
|
+
</div>
|
|
204
|
+
`)}
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
`
|
|
208
|
+
: ''}
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
`;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
LitAiFilterAssistant.styles = [
|
|
215
|
+
css `
|
|
216
|
+
:host {
|
|
217
|
+
display: inline-block;
|
|
218
|
+
position: relative;
|
|
219
|
+
width: 100%;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.dropdown-content {
|
|
223
|
+
|
|
224
|
+
background: var(--background-paper, #fff);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.header {
|
|
228
|
+
display: flex;
|
|
229
|
+
justify-content: space-between;
|
|
230
|
+
align-items: center;
|
|
231
|
+
padding: 0.375rem 0.75rem;
|
|
232
|
+
border-bottom: 0.0625rem solid transparent;
|
|
233
|
+
position: relative;
|
|
234
|
+
}
|
|
235
|
+
.header::after {
|
|
236
|
+
content: '';
|
|
237
|
+
position: absolute;
|
|
238
|
+
left: 0;
|
|
239
|
+
right: 0;
|
|
240
|
+
bottom: 0;
|
|
241
|
+
height: 0.0625rem;
|
|
242
|
+
background: linear-gradient(to right, #e78047, #573493);
|
|
243
|
+
z-index: 1;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.header-title {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
gap: 0.75rem;
|
|
251
|
+
font-size: 1.0625rem;
|
|
252
|
+
font-weight: 500;
|
|
253
|
+
margin-bottom: 4px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.input-section {
|
|
257
|
+
padding: 0.375rem 0.75rem;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.input-label {
|
|
261
|
+
display: block;
|
|
262
|
+
font-size: 0.875rem;
|
|
263
|
+
font-weight: 500;
|
|
264
|
+
color: var(--text-primary, #111827);
|
|
265
|
+
margin-bottom: 0.5rem;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.input-wrapper {
|
|
269
|
+
display: flex;
|
|
270
|
+
|
|
271
|
+
align-items: center;
|
|
272
|
+
gap: 0.5rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.suggestions-section {
|
|
276
|
+
padding: 0.375rem 0.75rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.suggestions-grid {
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-wrap: wrap;
|
|
282
|
+
gap: 0.5rem;
|
|
283
|
+
overflow-x: auto;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.applied-filters-section {
|
|
287
|
+
padding: 0.375rem 0.75rem;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.applied-filter-item {
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
justify-content: space-between;
|
|
294
|
+
border-radius: 0.5rem;
|
|
295
|
+
margin-bottom: 0.5rem;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.applied-filter-info {
|
|
299
|
+
flex: 1;
|
|
300
|
+
min-width: 0;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.applied-filter-label {
|
|
304
|
+
font-size: 0.875rem;
|
|
305
|
+
font-weight: 500;
|
|
306
|
+
color: var(--text-primary, #111827);
|
|
307
|
+
margin-bottom: 0.125rem;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.applied-filter-description {
|
|
311
|
+
font-size: 11px;
|
|
312
|
+
font-weight: 400;
|
|
313
|
+
color: var(--text-secondary, #111827);
|
|
314
|
+
margin-bottom: 0.125rem;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.applied-filter-value {
|
|
318
|
+
font-size: 0.75rem;
|
|
319
|
+
color: var(--text-secondary, #6b7280);
|
|
320
|
+
font-family: monospace;
|
|
321
|
+
background: var(--background-paper, #fff);
|
|
322
|
+
padding: 0.25rem 0.5rem;
|
|
323
|
+
border-radius: 0.25rem;
|
|
324
|
+
border: 0.0625rem solid var(--color-divider, #e5e7eb);
|
|
325
|
+
margin-bottom: 0.125rem;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.remove-filter-button {
|
|
329
|
+
margin-left: 0.5rem;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.loading-spinner {
|
|
333
|
+
width: 14px;
|
|
334
|
+
height: 14px;
|
|
335
|
+
border: 0.125rem solid var(--color-divider, #d0d3db);
|
|
336
|
+
border-top: 0.125rem solid var(--color-primary-main, #3b82f6);
|
|
337
|
+
border-radius: 50%;
|
|
338
|
+
animation: spin 1s linear infinite;
|
|
339
|
+
margin-right: 0.5rem;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@keyframes spin {
|
|
343
|
+
0% {
|
|
344
|
+
transform: rotate(0deg);
|
|
345
|
+
}
|
|
346
|
+
100% {
|
|
347
|
+
transform: rotate(360deg);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.empty-state {
|
|
352
|
+
display: flex;
|
|
353
|
+
gap: 0.75rem;
|
|
354
|
+
flex-direction: column;
|
|
355
|
+
align-items: center;
|
|
356
|
+
justify-content: center;
|
|
357
|
+
text-align: center;
|
|
358
|
+
padding: 2rem 1rem;
|
|
359
|
+
color: var(--text-secondary, #6b7280);
|
|
360
|
+
font-size: 0.875rem;
|
|
361
|
+
line-height: 1.5;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.empty-state lit-icon {
|
|
365
|
+
margin-bottom: 0.75rem;
|
|
366
|
+
color: var(--text-secondary, #9ca3af);
|
|
367
|
+
}
|
|
368
|
+
.applied-filters-container {
|
|
369
|
+
height: 12.5rem;
|
|
370
|
+
overflow-y: auto;
|
|
371
|
+
}
|
|
372
|
+
.suggestion-item {
|
|
373
|
+
cursor: pointer;
|
|
374
|
+
transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
375
|
+
will-change: transform;
|
|
376
|
+
&:hover {
|
|
377
|
+
transform: scale(1.06);
|
|
378
|
+
z-index: 1;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
.header-actions {
|
|
382
|
+
display: flex;
|
|
383
|
+
gap: 0.5rem;
|
|
384
|
+
}
|
|
385
|
+
.section-title {
|
|
386
|
+
font-size: 0.8125rem;
|
|
387
|
+
font-weight: 400;
|
|
388
|
+
color: var(--text-secondary, #111827);
|
|
389
|
+
margin-bottom: 0.5rem;
|
|
390
|
+
}
|
|
391
|
+
lit-input {
|
|
392
|
+
flex-grow: 1;
|
|
393
|
+
}
|
|
394
|
+
`,
|
|
395
|
+
];
|
|
396
|
+
__decorate([
|
|
397
|
+
property({ type: String })
|
|
398
|
+
], LitAiFilterAssistant.prototype, "placeholder", void 0);
|
|
399
|
+
__decorate([
|
|
400
|
+
property({ type: String })
|
|
401
|
+
], LitAiFilterAssistant.prototype, "userLang", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
property({ type: Array })
|
|
404
|
+
], LitAiFilterAssistant.prototype, "suggestions", void 0);
|
|
405
|
+
__decorate([
|
|
406
|
+
property({ type: Array })
|
|
407
|
+
], LitAiFilterAssistant.prototype, "appliedFilters", void 0);
|
|
408
|
+
__decorate([
|
|
409
|
+
property({ type: Boolean })
|
|
410
|
+
], LitAiFilterAssistant.prototype, "disabled", void 0);
|
|
411
|
+
__decorate([
|
|
412
|
+
property({ type: Boolean })
|
|
413
|
+
], LitAiFilterAssistant.prototype, "loading", void 0);
|
|
414
|
+
__decorate([
|
|
415
|
+
property({ type: Function })
|
|
416
|
+
], LitAiFilterAssistant.prototype, "onInput", void 0);
|
|
417
|
+
__decorate([
|
|
418
|
+
property({ type: Function })
|
|
419
|
+
], LitAiFilterAssistant.prototype, "onSuggestionSelect", void 0);
|
|
420
|
+
__decorate([
|
|
421
|
+
property({ type: Function })
|
|
422
|
+
], LitAiFilterAssistant.prototype, "onApply", void 0);
|
|
423
|
+
__decorate([
|
|
424
|
+
property({ type: Function })
|
|
425
|
+
], LitAiFilterAssistant.prototype, "onFilterReload", void 0);
|
|
426
|
+
__decorate([
|
|
427
|
+
property({ type: Function })
|
|
428
|
+
], LitAiFilterAssistant.prototype, "onNewConversation", void 0);
|
|
429
|
+
__decorate([
|
|
430
|
+
property({ type: Function })
|
|
431
|
+
], LitAiFilterAssistant.prototype, "onClose", void 0);
|
|
432
|
+
__decorate([
|
|
433
|
+
state()
|
|
434
|
+
], LitAiFilterAssistant.prototype, "inputValue", void 0);
|
|
435
|
+
LitAiFilterAssistant = __decorate([
|
|
436
|
+
customElement('lit-ai-filter-assistant')
|
|
437
|
+
], LitAiFilterAssistant);
|
|
438
|
+
export { LitAiFilterAssistant };
|
|
439
|
+
//# sourceMappingURL=lit-ai-filter-assistant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-ai-filter-assistant.js","sourceRoot":"","sources":["../../src/components/lit-ai-filter-assistant.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,aAAa;AACb,OAAO,wBAAwB,CAAC;AAChC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,8BAA8B,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,kDAAkD,CAAC;AA2BnD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;QACyB,gBAAW,GAAW,6BAA6B,CAAC;QACpD,aAAQ,GAAkB,IAAI,CAAC;QAChC,gBAAW,GAAuB,EAAE,CAAC;QACrC,mBAAc,GAAoB,EAAE,CAAC;QACnC,aA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;AAdxB,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CA6YhC"}
|
|
@@ -37,13 +37,13 @@ export declare class FilterInputs extends LitElement {
|
|
|
37
37
|
private handleKeyDown;
|
|
38
38
|
getFocusableElements(): HTMLElement[];
|
|
39
39
|
focus(): void;
|
|
40
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
41
40
|
renderNumberRangeInput(): import("lit-html").TemplateResult<1>;
|
|
42
41
|
renderSelectInput(multiselect?: boolean): import("lit-html").TemplateResult<1>;
|
|
43
42
|
renderNumberInput(): import("lit-html").TemplateResult<1>;
|
|
44
43
|
renderDateInput(): import("lit-html").TemplateResult<1>;
|
|
45
44
|
renderDateRangeInput(): import("lit-html").TemplateResult<1>;
|
|
46
45
|
renderTextInput(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
47
47
|
}
|
|
48
48
|
declare global {
|
|
49
49
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-inputs.d.ts","sourceRoot":"","sources":["../../src/shared/filter-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,KAAK,CAAC;AAI5D,OAAO,mCAAmC,CAAC;AAE3C,OAAO,eAAe,CAAC;AACvB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,iBAAiB,CAAC;AACzB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAQtE,qBACa,YAAa,SAAQ,UAAU;IACZ,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAK;IAC/B,MAAM,EAAE,OAAO,CAAS;IACzB,KAAK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AC,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAK;IAC/B,MAAM,EAAE,OAAO,CAAS;IACzB,KAAK,EAAE,GAAG,CAAa;IACvB,QAAQ,EAAE,GAAG,CAAa;IAC3B,eAAe,EAAE,GAAG,CAAM;IAC1B,YAAY,EAAE,GAAG,CAAM;IAEzC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,aAAa,EAAE,GAAG,CAAM;IAEjC,OAAO,CAAC,sBAAsB,CAA0B;IACxD,OAAO,CAAC,wBAAwB,CAA0B;IAC1D,OAAO,CAAC,aAAa,CAAS;IAE9B,MAAM,CAAC,MAAM,0BAUX;;IAeF,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ;IAUnD,OAAO,CAAC,iBAAiB,EAAE,GAAG;IAoB9B,eAAe,CAAC,KAAK,EAAE,GAAG;IAa1B,OAAO,CAAC,iBAAiB,CAavB;IAEF,iBAAiB;IAQjB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,aAAa;IAwDd,oBAAoB,IAAI,WAAW,EAAE;IAwBrC,KAAK;IASZ,sBAAsB;IA8CtB,iBAAiB,CAAC,WAAW,GAAE,OAAe;IAsB9C,iBAAiB;IAoBjB,eAAe;IAqBf,oBAAoB;IAyBpB,eAAe;IAsBb,MAAM;CAuBX;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACJ"}
|
|
@@ -195,38 +195,6 @@ let FilterInputs = class FilterInputs extends LitElement {
|
|
|
195
195
|
const firstFocusable = this.shadowRoot?.querySelector('lit-input, lit-select, lit-date-picker');
|
|
196
196
|
firstFocusable?.focus();
|
|
197
197
|
}
|
|
198
|
-
render() {
|
|
199
|
-
if (this.filterVariant === 'numberRange') {
|
|
200
|
-
return this.renderNumberRangeInput();
|
|
201
|
-
}
|
|
202
|
-
else if (this.filterVariant === 'select') {
|
|
203
|
-
return this.renderSelectInput();
|
|
204
|
-
}
|
|
205
|
-
else if (this.filterVariant === 'multiselect') {
|
|
206
|
-
return this.renderSelectInput(true);
|
|
207
|
-
}
|
|
208
|
-
else if (this.filterVariant === 'number') {
|
|
209
|
-
return this.renderNumberInput();
|
|
210
|
-
}
|
|
211
|
-
else if (this.filterVariant === 'currency') {
|
|
212
|
-
return this.renderNumberInput();
|
|
213
|
-
}
|
|
214
|
-
else if (this.filterVariant === 'date') {
|
|
215
|
-
return this.renderDateInput();
|
|
216
|
-
}
|
|
217
|
-
else if (this.filterVariant === 'dateTime') {
|
|
218
|
-
return this.renderDateInput();
|
|
219
|
-
}
|
|
220
|
-
else if (this.filterVariant === 'dateRange') {
|
|
221
|
-
return this.renderDateRangeInput();
|
|
222
|
-
}
|
|
223
|
-
else if (this.filterVariant === 'dateTimeRange') {
|
|
224
|
-
return this.renderDateRangeInput();
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
return this.renderTextInput();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
198
|
renderNumberRangeInput() {
|
|
231
199
|
const debouncedSetRangeFilter = debounce((min, max) => {
|
|
232
200
|
this.handleSetFilter([min, max]);
|
|
@@ -375,6 +343,38 @@ let FilterInputs = class FilterInputs extends LitElement {
|
|
|
375
343
|
></lit-input>
|
|
376
344
|
`;
|
|
377
345
|
}
|
|
346
|
+
render() {
|
|
347
|
+
if (this.filterVariant === 'numberRange') {
|
|
348
|
+
return this.renderNumberRangeInput();
|
|
349
|
+
}
|
|
350
|
+
else if (this.filterVariant === 'select') {
|
|
351
|
+
return this.renderSelectInput();
|
|
352
|
+
}
|
|
353
|
+
else if (this.filterVariant === 'multiselect') {
|
|
354
|
+
return this.renderSelectInput(true);
|
|
355
|
+
}
|
|
356
|
+
else if (this.filterVariant === 'number') {
|
|
357
|
+
return this.renderNumberInput();
|
|
358
|
+
}
|
|
359
|
+
else if (this.filterVariant === 'currency') {
|
|
360
|
+
return this.renderNumberInput();
|
|
361
|
+
}
|
|
362
|
+
else if (this.filterVariant === 'date') {
|
|
363
|
+
return this.renderDateInput();
|
|
364
|
+
}
|
|
365
|
+
else if (this.filterVariant === 'dateTime') {
|
|
366
|
+
return this.renderDateInput();
|
|
367
|
+
}
|
|
368
|
+
else if (this.filterVariant === 'dateRange') {
|
|
369
|
+
return this.renderDateRangeInput();
|
|
370
|
+
}
|
|
371
|
+
else if (this.filterVariant === 'dateTimeRange') {
|
|
372
|
+
return this.renderDateRangeInput();
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
return this.renderTextInput();
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
378
|
};
|
|
379
379
|
FilterInputs.styles = css `
|
|
380
380
|
.range {
|